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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
310c99938a619a613c3c883176b8e603a1a3f58d | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /java/java-tests/testData/codeInsight/slice/backward/Postfix.java | 3f5ff87748afd99cc7d1075e6b9c56de3eef1c14 | [
"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 | 130 | java | class IncrDecrIgnore {
int <caret>i = <flown1>0;
int incr() {
return <flown2>i++;
}
int decr() {
return <flown3>--i;
}
} | [
"cdr@intellij.com"
] | cdr@intellij.com |
737b99a2a16d85ee3d7451463884335d5c4725c5 | 88d41a18d1ad0ccc1a79b623cf4006e52f6e20ab | /mybatis-3/src/test/java/org/apache/ibatis/io/ClassLoaderWrapperTest.java | b4d3662e215fe35e8c26d5a2f9f0164f09dc9c7a | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | huifer/javaBook-src | 87369e5f175197166dcae49ffde9a41ad3965bf7 | 5f319dbf46401f7f5770ed3ca80079e48392d2f8 | refs/heads/master | 2023-08-30T12:58:56.644540 | 2023-08-30T01:36:09 | 2023-08-30T01:36:09 | 173,409,096 | 57 | 19 | Apache-2.0 | 2023-02-22T08:11:26 | 2019-03-02T05:51:32 | Java | UTF-8 | Java | false | false | 2,696 | java | /**
* Copyright 2009-2019 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.io;
import org.apache.ibatis.BaseDataTest;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
class ClassLoaderWrapperTest extends BaseDataTest {
private final String RESOURCE_NOT_FOUND = "some_resource_that_does_not_exist.properties";
private final String CLASS_NOT_FOUND = "some.random.class.that.does.not.Exist";
private final String CLASS_FOUND = "java.lang.Object";
private ClassLoaderWrapper wrapper;
private ClassLoader loader;
@BeforeEach
void beforeClassLoaderWrapperTest() {
wrapper = new ClassLoaderWrapper();
loader = getClass().getClassLoader();
}
@Test
void classForName() throws ClassNotFoundException {
assertNotNull(wrapper.classForName(CLASS_FOUND));
}
@Test
void classForNameNotFound() {
Assertions.assertThrows(ClassNotFoundException.class, () -> assertNotNull(wrapper.classForName(CLASS_NOT_FOUND)));
}
@Test
void classForNameWithClassLoader() throws ClassNotFoundException {
assertNotNull(wrapper.classForName(CLASS_FOUND, loader));
}
@Test
void getResourceAsURL() {
assertNotNull(wrapper.getResourceAsURL(JPETSTORE_PROPERTIES));
}
@Test
void getResourceAsURLNotFound() {
assertNull(wrapper.getResourceAsURL(RESOURCE_NOT_FOUND));
}
@Test
void getResourceAsURLWithClassLoader() {
assertNotNull(wrapper.getResourceAsURL(JPETSTORE_PROPERTIES, loader));
}
@Test
void getResourceAsStream() {
assertNotNull(wrapper.getResourceAsStream(JPETSTORE_PROPERTIES));
}
@Test
void getResourceAsStreamNotFound() {
assertNull(wrapper.getResourceAsStream(RESOURCE_NOT_FOUND));
}
@Test
void getResourceAsStreamWithClassLoader() {
assertNotNull(wrapper.getResourceAsStream(JPETSTORE_PROPERTIES, loader));
}
}
| [
"huifer97@163.com"
] | huifer97@163.com |
c7eb3cf64a094aba798f2f495a9e1532d4f601dd | 1af49694004c6fbc31deada5618dae37255ce978 | /chrome/test/android/javatests/src/org/chromium/chrome/test/ReducedModeNativeTestRule.java | 2fb454465a8536f7db4c2b7024b98eb6d23f4a7e | [
"BSD-3-Clause"
] | permissive | sadrulhc/chromium | 59682b173a00269ed036eee5ebfa317ba3a770cc | a4b950c23db47a0fdd63549cccf9ac8acd8e2c41 | refs/heads/master | 2023-02-02T07:59:20.295144 | 2020-12-01T21:32:32 | 2020-12-01T21:32:32 | 317,678,056 | 3 | 0 | BSD-3-Clause | 2020-12-01T21:56:26 | 2020-12-01T21:56:25 | null | UTF-8 | Java | false | false | 2,986 | java | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.test;
import org.junit.Assert;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.chromium.base.task.PostTask;
import org.chromium.base.test.util.CriteriaHelper;
import org.chromium.chrome.browser.init.BrowserParts;
import org.chromium.chrome.browser.init.ChromeBrowserInitializer;
import org.chromium.chrome.browser.init.EmptyBrowserParts;
import org.chromium.content_public.browser.BrowserStartupController;
import org.chromium.content_public.browser.UiThreadTaskTraits;
import org.chromium.content_public.browser.test.util.TestThreadUtils;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* Custom {@link TestRule} for test using native in reduced mode. This also enables the flags
* required for reduced mode to work.
*/
public class ReducedModeNativeTestRule implements TestRule {
private final AtomicBoolean mNativeLoaded = new AtomicBoolean();
private final boolean mAutoLoadNative;
public ReducedModeNativeTestRule() {
this(true /*autoLoadNative*/);
}
public ReducedModeNativeTestRule(boolean autoLoadNative) {
mAutoLoadNative = autoLoadNative;
}
@Override
public Statement apply(final Statement base, final Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
if (mAutoLoadNative) {
loadNative();
}
base.evaluate();
}
};
}
public void loadNative() {
final BrowserParts parts = new EmptyBrowserParts() {
@Override
public void finishNativeInitialization() {
mNativeLoaded.set(true);
}
@Override
public boolean startMinimalBrowser() {
return true;
}
};
PostTask.postTask(UiThreadTaskTraits.DEFAULT, () -> {
ChromeBrowserInitializer.getInstance().handlePreNativeStartup(parts);
ChromeBrowserInitializer.getInstance().handlePostNativeStartup(true, parts);
});
waitForNativeLoaded();
}
private void waitForNativeLoaded() {
CriteriaHelper.pollUiThread(
mNativeLoaded::get, "Failed while waiting for starting minimal browser.");
}
public void assertMinimalBrowserStarted() {
TestThreadUtils.runOnUiThreadBlocking(() -> {
Assert.assertTrue("Native has not been started.",
BrowserStartupController.getInstance().isNativeStarted());
Assert.assertFalse("The full browser is started instead of minimal browser.",
BrowserStartupController.getInstance().isFullBrowserStarted());
});
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
9da5826cf8231c2d403f8354f0ae93d973f8ca99 | 5976fada6f069cb52615c0c02b2c989a7657b3cb | /designpattern/src/main/java/visitor/Person.java | 87082bc5a3f130823d49d3a3607032d1b0f00cfb | [] | no_license | cdncn/Code | ca216a7b9256ade05f16f408dfd2e20e555a6172 | cf0b72da47156b81e47c4b984b2d7c044c215ba0 | refs/heads/master | 2022-11-13T11:16:08.109727 | 2019-07-03T17:01:09 | 2019-07-03T17:01:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 185 | java | package visitor;
/**
* @author HT
* @version V1.0
* @package visitor
* @date 2019-05-12 21:15
*/
public abstract class Person {
public abstract void accept(Action visitor);
}
| [
"fengyunhetao@gmail.com"
] | fengyunhetao@gmail.com |
b8f8df1c23cf106767b13ab19a18c079eff78f79 | 56d6fa60f900fb52362d4cce950fa81f949b7f9b | /aws-sdk-java/src/main/java/com/amazonaws/services/dynamodbv2/model/transform/DescribeTableResultJsonUnmarshaller.java | 90070a0fdaab8fb069e18bb2225ab897682ae3a4 | [
"JSON",
"Apache-2.0"
] | permissive | TarantulaTechnology/aws | 5f9d3981646e193c89f1c3fa746ec3db30252913 | 8ce079f5628334f83786c152c76abd03f37281fe | refs/heads/master | 2021-01-19T11:14:53.050332 | 2013-09-15T02:37:02 | 2013-09-15T02:37:02 | 12,839,311 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,665 | java | /*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.dynamodbv2.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import com.amazonaws.services.dynamodbv2.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* Describe Table Result JSON Unmarshaller
*/
public class DescribeTableResultJsonUnmarshaller implements Unmarshaller<DescribeTableResult, JsonUnmarshallerContext> {
public DescribeTableResult unmarshall(JsonUnmarshallerContext context) throws Exception {
DescribeTableResult describeTableResult = new DescribeTableResult();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.currentToken;
if (token == null) token = context.nextToken();
while (true) {
if (token == null) break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("Table", targetDepth)) {
context.nextToken();
describeTableResult.setTable(TableDescriptionJsonUnmarshaller.getInstance().unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth) break;
}
}
token = context.nextToken();
}
return describeTableResult;
}
private static DescribeTableResultJsonUnmarshaller instance;
public static DescribeTableResultJsonUnmarshaller getInstance() {
if (instance == null) instance = new DescribeTableResultJsonUnmarshaller();
return instance;
}
}
| [
"TarantulaTechnology@users.noreply.github.com"
] | TarantulaTechnology@users.noreply.github.com |
152ae2c988c6516b1dff2c6dc466e7cc087b54e0 | c4352bde96e74d997be29e31517aa5f1f54e9795 | /JavaOOP_2019/OOP_Exams/JavaOOPAdvancedRetakeExam_09January2018_Panzer/src/main/java/panzer/models/Vehicles/BaseVehicle.java | d4f6586dccd372f010e5e7a2e396933d1be92616 | [] | no_license | chmitkov/SoftUni | b0f4ec10bb89a7dc350c063a02a3535ef9e901b4 | 52fd6f85718e07ff492c67d8166ed5cfaf5a58ff | refs/heads/master | 2022-11-29T01:06:51.947775 | 2019-10-12T12:29:03 | 2019-10-12T12:29:03 | 138,323,012 | 1 | 0 | null | 2022-11-24T09:42:25 | 2018-06-22T16:09:50 | Java | UTF-8 | Java | false | false | 3,411 | java | package panzer.models.Vehicles;
import panzer.contracts.Assembler;
import panzer.contracts.Part;
import panzer.contracts.Vehicle;
import panzer.models.miscellaneous.VehicleAssembler;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
public abstract class BaseVehicle implements Vehicle {
private String model;
private Double weight;
private BigDecimal price;
private Integer attack;
private Integer defense;
private Integer hitPoints;
private Assembler assembler;
protected BaseVehicle(String model, Double weight, BigDecimal price,
Integer attack, Integer defense, Integer hitPoints) {
this.model = model;
this.weight = weight;
this.price = price;
this.attack = attack;
this.defense = defense;
this.hitPoints = hitPoints;
this.assembler = new VehicleAssembler();
}
@Override
public double getTotalWeight() {
return this.weight + this.assembler.getTotalWeight();
}
@Override
public BigDecimal getTotalPrice() {
return this.price.add(this.assembler.getTotalPrice());
}
@Override
public long getTotalAttack() {
return this.attack + this.assembler.getTotalAttackModification();
}
@Override
public long getTotalDefense() {
return this.defense + this.assembler.getTotalDefenseModification();
}
@Override
public long getTotalHitPoints() {
return this.hitPoints + this.assembler.getTotalHitPointModification();
}
@Override
public void addArsenalPart(Part arsenalPart) {
this.assembler.addArsenalPart(arsenalPart);
}
@Override
public void addShellPart(Part shellPart) {
this.assembler.addShellPart(shellPart);
}
@Override
public void addEndurancePart(Part endurancePart) {
this.assembler.addEndurancePart(endurancePart);
}
@Override
public Iterable<Part> getParts() {
List<Part> result = null;
try {
Field field = this.assembler.getClass().getDeclaredField("allParts");
field.setAccessible(true);
result = (List<Part>) field.get(this.assembler);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
return result;
}
@Override
public String getModel() {
return this.model;
}
@Override
public String toString() {
List<String> allPartsNames = new ArrayList<>();
this.getParts().forEach(x -> allPartsNames.add(x.getModel()));
DecimalFormat df = new DecimalFormat("###############.000");
return String.format(" - %s\n" +
"Total Weight: %.3f\n" +
"Total Price: %s\n" +
"Attack: %d\n" +
"Defense: %d\n" +
"HitPoints: %d\n" +
"Parts: %s",
this.getModel(), this.getTotalWeight(),
df.format(this.getTotalPrice()), this.getTotalAttack(),
this.getTotalDefense(), this.getTotalHitPoints(),
allPartsNames.isEmpty()
? "None"
: String.join(", ", allPartsNames));
}
}
| [
"ch.mitkov@gmail.com"
] | ch.mitkov@gmail.com |
d2e4a66e188c0c84c5da31f1bfa34b2cb1c994f3 | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project355/src/test/java/org/gradle/test/performance/largejavamultiproject/project355/p1779/Test35587.java | bceef50364c814edbb0d485e3fcebb50866edecf | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,182 | java | package org.gradle.test.performance.largejavamultiproject.project355.p1779;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test35587 {
Production35587 objectUnderTest = new Production35587();
@Test
public void testProperty0() {
Production35584 value = new Production35584();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production35585 value = new Production35585();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production35586 value = new Production35586();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"sterling.greene@gmail.com"
] | sterling.greene@gmail.com |
065bf076bdb5e4df021338ce1952c8a86559e039 | 3bf0b6c1856e9fa90a651e9170aac3ba71382e3c | /MSFileToolbox/src/umich/ms/fileio/filetypes/mzxml/example/Example2.java | df8fe29ce32bc9a95fff1c6127a0378a8d82d2eb | [
"Apache-2.0"
] | permissive | KaiLiCn/MSFTBX | d31030b9bdbe9330b3aed3a928e17aa94ee7f112 | b3e10ccbccef2dd19ff2cf449512c370aa9a7c60 | refs/heads/master | 2021-01-01T18:18:52.843738 | 2017-07-11T21:12:06 | 2017-07-11T21:12:06 | 98,298,710 | 0 | 0 | null | 2017-07-25T11:25:38 | 2017-07-25T11:25:38 | null | UTF-8 | Java | false | false | 2,554 | java | /*
* Copyright (c) 2016 Dmitry Avtonomov
*
* 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 umich.ms.fileio.filetypes.mzxml.example;
import umich.ms.datatypes.scan.IScan;
import umich.ms.fileio.exceptions.FileParsingException;
import umich.ms.fileio.filetypes.mzxml.MZXMLFile;
import umich.ms.fileio.filetypes.mzxml.MZXMLIndex;
import umich.ms.fileio.filetypes.mzxml.MZXMLIndexElement;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.NavigableMap;
/**
* Created by Dmitry Avtonomov on 2016-04-18.
*/
public class Example2 {
public static void main(String[] args) throws FileParsingException {
// Creating data source
Path path = Paths.get("some-path-to.mzXML");
path = Paths.get(args[0]);
MZXMLFile source = new MZXMLFile(path.toString());
// Notice that we use fetchIndex() instead of getIndex().
// fetchIndex() will either get a cached copy or parse it from
// disk, if no cache is available. The index will be cached after parsing.
MZXMLIndex index = source.fetchIndex();
// The index gives you the scan numbers, on the lowest level you can parse
// the file using those numbers. We need the raw scan numbers (the numbers
// as they're used in the file). The internal scan numbering scheme always
// renumbers all scans starting from 1 and increasing by 1 consecutively.
for (Integer scanNumRaw : index.getMapByRawNum().keySet()) {
// The second parameter asks the parser to parse the spectrum along
// with meta-info about the scan itself
IScan scan = source.parseScan(scanNumRaw, true);
// Do something with the scan.
// Note that some features, like scan.getChildScans() will not work in
// this case, as there is not enough information to build those
// relationships.
System.out.println(scan.toString());
}
}
}
| [
"dmitriy.avtonomov@gmail.com"
] | dmitriy.avtonomov@gmail.com |
c9d249a5ec51b84b918a51527f6379b46b3f64bb | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/com/google/android/gms/internal/zzdsx.java | c5e4f66137b8dcb255cbcd68114e6e200e51a11e | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,833 | java | package com.google.android.gms.internal;
import com.google.android.gms.internal.zzffu.zzg;
final /* synthetic */ class zzdsx {
static final /* synthetic */ int[] f7283a = new int[zzg.m6003a().length];
static {
/* JADX: method processing error */
/*
Error: java.lang.NullPointerException
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
at jadx.core.ProcessClass.process(ProcessClass.java:37)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:199)
*/
/*
r0 = com.google.android.gms.internal.zzffu.zzg.m6003a();
r0 = r0.length;
r0 = new int[r0];
f7283a = r0;
r0 = 1;
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0011 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7409g; Catch:{ NoSuchFieldError -> 0x0011 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0011 }
r1[r2] = r0; Catch:{ NoSuchFieldError -> 0x0011 }
L_0x0011:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0019 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7403a; Catch:{ NoSuchFieldError -> 0x0019 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0019 }
r3 = 2; Catch:{ NoSuchFieldError -> 0x0019 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0019 }
L_0x0019:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0021 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7408f; Catch:{ NoSuchFieldError -> 0x0021 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0021 }
r3 = 3; Catch:{ NoSuchFieldError -> 0x0021 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0021 }
L_0x0021:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0029 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7410h; Catch:{ NoSuchFieldError -> 0x0029 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0029 }
r3 = 4; Catch:{ NoSuchFieldError -> 0x0029 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0029 }
L_0x0029:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0031 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7404b; Catch:{ NoSuchFieldError -> 0x0031 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0031 }
r3 = 5; Catch:{ NoSuchFieldError -> 0x0031 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0031 }
L_0x0031:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0039 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7407e; Catch:{ NoSuchFieldError -> 0x0039 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0039 }
r3 = 6; Catch:{ NoSuchFieldError -> 0x0039 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0039 }
L_0x0039:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0041 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7411i; Catch:{ NoSuchFieldError -> 0x0041 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0041 }
r3 = 7; Catch:{ NoSuchFieldError -> 0x0041 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0041 }
L_0x0041:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x004a }
r2 = com.google.android.gms.internal.zzffu.zzg.f7412j; Catch:{ NoSuchFieldError -> 0x004a }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x004a }
r3 = 8; Catch:{ NoSuchFieldError -> 0x004a }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x004a }
L_0x004a:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x0053 }
r2 = com.google.android.gms.internal.zzffu.zzg.f7405c; Catch:{ NoSuchFieldError -> 0x0053 }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x0053 }
r3 = 9; Catch:{ NoSuchFieldError -> 0x0053 }
r1[r2] = r3; Catch:{ NoSuchFieldError -> 0x0053 }
L_0x0053:
r1 = f7283a; Catch:{ NoSuchFieldError -> 0x005c }
r2 = com.google.android.gms.internal.zzffu.zzg.f7406d; Catch:{ NoSuchFieldError -> 0x005c }
r2 = r2 - r0; Catch:{ NoSuchFieldError -> 0x005c }
r0 = 10; Catch:{ NoSuchFieldError -> 0x005c }
r1[r2] = r0; Catch:{ NoSuchFieldError -> 0x005c }
L_0x005c:
return;
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.zzdsx.<clinit>():void");
}
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
c5a7c9b3e2b3de9736f4389dea88b2593ea5e36d | 6b2e1f5fdd3668b32c471ff872f03f043b18d5f7 | /mutants/dataset/lcs_length/5676/LCS_LENGTH.java | a7e26b431bd362e9b0a99ac28b79a67f23c35f1e | [] | no_license | mou23/Impact-of-Similarity-on-Repairing-Small-Programs | 87e58676348f1b55666171128ecced3571979d44 | 6704d78b2bc9c103d97bcf55ecd5c12810ba2851 | refs/heads/master | 2023-03-25T10:42:17.464870 | 2021-03-20T04:55:17 | 2021-03-20T04:55:17 | 233,513,246 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,972 | java | package buggy_java_programs;
import java.util.*;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author derricklin
*/
public class LCS_LENGTH {
public static Integer lcs_length(String s, String t) {
// make a Counter
// pair? no! just hashtable to a hashtable.. woo.. currying
Map<Integer, Map<Integer,Integer>> dp = new HashMap<Integer,Map<Integer,Integer>>();
// just set all the internal maps to 0
for (int i=0; i < s.length(); i++) {
Map<Integer,Integer> initialize = new HashMap<Integer,Integer>();
dp.put(i, initialize);
for (int j=0; j < t.length(); j++) {
Map<Integer,Integer> internal_map = dp.get(i);
internal_map.put(j,0);
dp.put(i, internal_map);
}
}
// now the actual code
for (int i=0; i < s.length(); i++) {
for (int j=0; j < t.length(); j++) {
if (s.buggy_java_programs(i) == t.charAt(j)) {
if (dp.containsKey(i-1)) {
Map<Integer, Integer> internal_map = dp.get(i);
int insert_value = dp.get(i-1).get(j) + 1;
internal_map.put(j, insert_value);
dp.put(i,internal_map);
} else {
Map<Integer, Integer> internal_map = dp.get(i);
internal_map.put(j,1);
dp.put(i,internal_map);
}
}
}
}
if (!dp.isEmpty()) {
List<Integer> ret_list = new ArrayList<Integer>();
for (int i=0; i<s.length(); i++) {
ret_list.add(!dp.get(i).isEmpty() ? Collections.max(dp.get(i).values()) : 0);
}
return Collections.max(ret_list);
} else {
return 0;
}
}
}
| [
"bsse0731@iit.du.ac.bd"
] | bsse0731@iit.du.ac.bd |
7356e805d18dfdbf1b3618db425a5c6525aba908 | 92225460ebca1bb6a594d77b6559b3629b7a94fa | /src/com/kingdee/eas/fdc/market/app/JudgeQuestionEditUIHandler.java | 9d6f4519b49c402daa36175798ef7af84235fb5a | [] | no_license | yangfan0725/sd | 45182d34575381be3bbdd55f3f68854a6900a362 | 39ebad6e2eb76286d551a9e21967f3f5dc4880da | refs/heads/master | 2023-04-29T01:56:43.770005 | 2023-04-24T05:41:13 | 2023-04-24T05:41:13 | 512,073,641 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 546 | java | /**
* output package name
*/
package com.kingdee.eas.fdc.market.app;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.eas.framework.batchHandler.ResponseContext;
/**
* output class name
*/
public class JudgeQuestionEditUIHandler extends AbstractJudgeQuestionEditUIHandler
{
protected void _handleInit(RequestContext request,ResponseContext response, Context context) throws Exception {
super._handleInit(request,response,context);
}
} | [
"yfsmile@qq.com"
] | yfsmile@qq.com |
08b4b8faa3122e1447a6b75272955001507161b7 | e888329773e0f96ca8b183d986c2c8d550faaf06 | /nan21.dnet.module.ad.domain/src/main/java/net/nan21/dnet/module/ad/domain/impl/system/JobParam.java | 133c52d79933b3cffafa012050ca009e644fe9c7 | [] | no_license | dnet-ebs/nan21.dnet.module.ad | fb47fd84b0d3ceee65e5acd36ff3383bae46e4c5 | d8ed6dbb4eaf013f7fbcee461df67e07448793fd | refs/heads/master | 2020-06-05T01:54:43.136671 | 2013-11-14T07:43:29 | 2013-11-14T07:43:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,533 | java | /**
* DNet eBusiness Suite
* Copyright: 2010-2013 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package net.nan21.dnet.module.ad.domain.impl.system;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.PrePersist;
import javax.persistence.QueryHint;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import net.nan21.dnet.core.domain.impl.AbstractTypeNT;
import net.nan21.dnet.module.ad.domain.impl.system.Job;
import org.eclipse.persistence.config.HintValues;
import org.eclipse.persistence.config.QueryHints;
import org.hibernate.validator.constraints.NotBlank;
@NamedQueries({
@NamedQuery(name = JobParam.NQ_FIND_BY_NAME, query = "SELECT e FROM JobParam e WHERE e.job = :job and e.name = :name", hints = @QueryHint(name = QueryHints.BIND_PARAMETERS, value = HintValues.TRUE)),
@NamedQuery(name = JobParam.NQ_FIND_BY_NAME_PRIMITIVE, query = "SELECT e FROM JobParam e WHERE e.job.id = :jobId and e.name = :name", hints = @QueryHint(name = QueryHints.BIND_PARAMETERS, value = HintValues.TRUE))})
@Entity
@Table(name = JobParam.TABLE_NAME, uniqueConstraints = {@UniqueConstraint(name = JobParam.TABLE_NAME
+ "_UK1", columnNames = {"JOB_ID", "NAME"})})
public class JobParam extends AbstractTypeNT {
public static final String TABLE_NAME = "SYS_JOB_PARAM";
private static final long serialVersionUID = -8865917134914502125L;
/**
* Named query find by unique key: Name.
*/
public static final String NQ_FIND_BY_NAME = "JobParam.findByName";
/**
* Named query find by unique key: Name using the ID field for references.
*/
public static final String NQ_FIND_BY_NAME_PRIMITIVE = "JobParam.findByName_PRIMITIVE";
@NotBlank
@Column(name = "DATATYPE", nullable = false, length = 255)
private String dataType;
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Job.class)
@JoinColumn(name = "JOB_ID", referencedColumnName = "ID")
private Job job;
public String getDataType() {
return this.dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public Job getJob() {
return this.job;
}
public void setJob(Job job) {
this.job = job;
}
@PrePersist
public void prePersist() {
super.prePersist();
}
}
| [
"attila.mathe@dnet-ebusiness-suite.com"
] | attila.mathe@dnet-ebusiness-suite.com |
a16b3d742ae61a48619a0f8ff4454b78d2d044f8 | c6f3fbce0b7304c672fc99a94fe43b418eae9e6c | /src/main/java/com/junyou/utils/DownloadServerConfig.java | 1571a412369dfeee8ba05842feb3294d3ebcabd1 | [] | no_license | hw233/cq_game-java | a6f1fa6526062c10a9ea322cc832b4c42e6b8f9a | c2384b58efa73472752742a93bf36ef02d65fe48 | refs/heads/master | 2020-04-27T11:24:29.835913 | 2018-06-03T14:03:36 | 2018-06-03T14:03:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,414 | java | package com.junyou.utils;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.junyou.bus.serverinfo.export.ServerInfoServiceManager;
import com.junyou.log.ChuanQiLog;
import com.junyou.utils.common.CovertObjectUtil;
import com.junyou.utils.http.HttpUtil;
/**
* 下载游戏启动配置文件
* @author 作者:wind
* @version 创建时间:2017-4-28 上午10:14:01
*/
public class DownloadServerConfig {
// private static String ROOT_PATH = DownlandServerConfig.class.getClass().getResource("/").getPath();
private static String ROOT_PATH = DownloadServerConfig.class.getClassLoader().getResource("").getPath();
public static String gameconfigInfo = "gameconfig-info.properties";
public static String gamebaseconfig = "game-base-config.xml";
public static String jdbc = "jdbc.properties";
public static String REMOTE_URL = "{0}/serverInfo.do";
public static String REMOTE_KF_URL = "{0}/serverKfInfo.do";
public static Pattern p = Pattern.compile("[${](\\w+)[}]");
public static void replaceFiles(String serverId,String remoteUrl,String platform){
Map<String,String> datas = new HashMap<>();
datas.put(gameconfigInfo, ROOT_PATH+"/config/");
datas.put(gamebaseconfig, ROOT_PATH+"/config/");
datas.put(jdbc, ROOT_PATH+"/config/data/");
Map<String, String> params = getServerConfig(serverId, remoteUrl,platform);
//set openserver time
long openServerTime = CovertObjectUtil.obj2long(params.get("open_server_time"));
ServerInfoServiceManager.getInstance().setOpenServerTime(openServerTime);
//replace file
for (Entry<String,String> entry : datas.entrySet()) {
String fileName = entry.getKey();
String path = entry.getValue();
replaceParam(params, fileName,path);
}
}
/**
* 替换参数
* @param datas
*/
public static void replaceParam(Map<String,String> datas,String fileName,String path) {
FileInputStream fileInputStream = null;
FileOutputStream fileOutputStream = null;
try {
String inputFile = path+"tpl_"+fileName;
String outputFile = path+fileName;
File checkFlag = new File(inputFile);
if(!checkFlag.exists()){
ChuanQiLog.debug("模板文件不存在:"+inputFile);
return;
}
fileInputStream = new FileInputStream(inputFile);
BufferedReader br = new BufferedReader(new InputStreamReader(fileInputStream,"utf-8"));
StringBuffer allContent = new StringBuffer();
String content = null;
while(null != (content = br.readLine())){
Matcher m = p.matcher(content);
while(m.find()){
String key = m.group(1);
String value = datas.get(key);
if(value == null){
ChuanQiLog.error("游戏启动重要参数缺少,key="+key);
System.exit(0);
}
content = content.replaceAll("\\$\\{"+key+"\\}", value);
}
allContent.append(content);
allContent.append("\r\n");
}
fileOutputStream = new FileOutputStream(outputFile);
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fileOutputStream,"utf-8"));
bw.write(allContent.toString());
bw.flush();
} catch (Exception e) {
e.printStackTrace();
}finally{
try {
if(fileInputStream != null){
fileInputStream.close();
}
if(fileOutputStream != null){
fileOutputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* 获取远程ServerConfig参数
* @param serverId
* @param remoteUrl
* @return
*/
public static Map<String,String> getServerConfig(String serverId,String remoteUrl,String platform){
Map<String, String> result = null;
String contentStr = null;
String url = null;
String paramStr = null;
try {
Map<String,Object> paramObject = new HashMap<>();
paramObject.put("serverId", serverId);
paramObject.put("platform", platform);
paramStr = HttpUtil.paramsMapToString(paramObject);
if(remoteUrl.endsWith("_kf")){
remoteUrl = remoteUrl.substring(0,remoteUrl.length() - 3);
url = MessageFormat.format(REMOTE_KF_URL,remoteUrl);
}else{
url = MessageFormat.format(REMOTE_URL, remoteUrl);
}
contentStr = HttpUtil.excuteHttpCall(url, paramStr);
if(contentStr == null || "".equals(contentStr)){
ChuanQiLog.error("请求gameserver 重要配置url连接失败,url=" + remoteUrl);
System.exit(0);
}
result = JSONObject.parseObject(contentStr,new TypeReference<Map<String,String>>(){});
} catch (Exception e) {
System.out.println("数据:contentStr=" + contentStr+"\t url="+url+"\t paramStr="+paramStr);
e.printStackTrace();
System.exit(0);
}
return result;
}
public static void replaceFiles(String[] args) {
try {
if(args != null && args.length >= 2){
String remoteUrl = args[0];
String serverId = args[1];
String platform ="";
if(args.length >= 3){
platform = args[2];
}
replaceFiles(serverId, remoteUrl,platform);
}
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
}
}
}
| [
"18221610336@163.com"
] | 18221610336@163.com |
184b5a82da5b7f696c375ebd3064245e1e4d29b3 | 484d4e7366e8f1e10ceb6ff7da118ad32bb4c1df | /ezbakehelpers/ezconfigurationhelpers/src/main/java/ezbakehelpers/ezconfigurationhelpers/kafka/KafkaConfigurationHelper.java | 8beae2d6b9245c2e8ddfa4e6d0afc4c13e229ce7 | [
"Apache-2.0"
] | permissive | ezbake/ezbake-common-java | b548843214760215bd0c053f153b346adbe527b9 | 41b34f937656526af89a089e248dc75469582e0f | refs/heads/master | 2020-05-09T14:22:51.045102 | 2015-03-02T19:29:29 | 2015-03-02T19:29:29 | 31,557,606 | 1 | 2 | null | 2015-04-28T22:32:38 | 2015-03-02T19:08:35 | Java | UTF-8 | Java | false | false | 1,704 | java | /* Copyright (C) 2013-2014 Computer Sciences Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. */
package ezbakehelpers.ezconfigurationhelpers.kafka;
import ezbake.configuration.constants.EzBakePropertyConstants;
import java.util.Properties;
public class KafkaConfigurationHelper {
private Properties props;
public KafkaConfigurationHelper(Properties props) {
this.props = props;
}
public String getKafkaZookeeper() {
return props.getProperty(EzBakePropertyConstants.KAFKA_ZOOKEEPER);
}
public String getKafkaBrokerList() {
return props.getProperty(EzBakePropertyConstants.KAFKA_BROKER_LIST);
}
public String getKafkaProducerType() {
return props.getProperty(EzBakePropertyConstants.KAFKA_PRODUCER_TYPE);
}
public String getKafkaQueueSize() {
return props.getProperty(EzBakePropertyConstants.KAFKA_QUEUE_SIZE);
}
public String getKafkaQueueTime() {
return props.getProperty(EzBakePropertyConstants.KAFKA_QUEUE_TIME);
}
public String getKafkaZookeeperSessionTimeout() {
return props.getProperty(EzBakePropertyConstants.KAFKA_ZOOKEEPER_SESSION_TIMEOUT);
}
}
| [
"jhastings@42six.com"
] | jhastings@42six.com |
44a9e0d9e502f46e415fbed0d25a8d3f99fb742b | f7ae2f00b280099be88d4fdc7d5bd0f3cdd13f41 | /workspace/5AdvancedProgramming/src/o20170302Collection/In2LinkedList.java | fe51912551c64bf54fdadc862e1221da97886809 | [] | no_license | fendou666/ZRZYJava | 5d177120f27dddad7bba1abaa6afa60225d86341 | 48e65f04a715f44aeb0aad429e6c6f37d904853c | refs/heads/master | 2020-05-22T11:36:20.127473 | 2017-09-14T23:11:25 | 2017-09-14T23:11:25 | 84,693,046 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 621 | java | package o20170302Collection;
import java.util.LinkedList;
import java.util.List;
/**
*
*
* void addFirst(e), addLast(e);
* element() 返回头对象
* getFirst(), getLast();
*
*
*
* @author ls
*
*/
public class In2LinkedList {
public static void main(String[] args) {
LinkedList<In11Book> linkedL = new LinkedList<In11Book>();
In11Book b1 = new In11Book("红楼梦1", 11);
In11Book b2 = new In11Book("西游记2", 12);
In11Book b3 = new In11Book("盗墓笔3", 41);
In11Book b4 = new In11Book("斗破苍4", 31);
In11Book b5 = new In11Book("鹿鼎记5", 33);
linkedL.
}
}
| [
"ls_code@126.com"
] | ls_code@126.com |
082dcb6852c44cdef1c843ba20ab3bc5288c526c | b4420eef1cb3289449cbcd52f98aa618332e53cf | /office/src/main/java/com/hunglv/office/thirdpart/emf/io/EncodingException.java | e1d94331e9691f46d3baced2d7f61767f0be28d1 | [] | no_license | hunglvv/TestDocument | 941a3bd9560ef3bef9a93eab70964a04cc03e620 | d1cdce4c61377f0118440138acb7f0bf3f3d4b6d | refs/heads/main | 2023-03-11T12:33:50.022945 | 2021-03-02T10:33:31 | 2021-03-02T10:33:31 | 342,557,038 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 613 | java | // Copyright 2001, FreeHEP.
package com.hunglv.office.thirdpart.emf.io;
import java.io.IOException;
/**
* Encoding Exception for any of the encoding streams.
*
* @author Mark Donszelmann
* @version $Id: src/main/java/org/freehep/util/io/EncodingException.java
* 96b41b903496 2005/11/21 19:50:18 duns $
*/
public class EncodingException extends IOException {
/**
*
*/
private static final long serialVersionUID = 8496816190751796701L;
/**
* Creates an Encoding Exception
*
* @param msg
* message
*/
public EncodingException(String msg) {
super(msg);
}
}
| [
"hunglv@solarapp.asia"
] | hunglv@solarapp.asia |
8541b5b0f751adc364a911601feb6f4b0974f4f5 | 77fb90c41fd2844cc4350400d786df99e14fa4ca | /f/g/e/core/ExampleValueString.java | 6756c77be008715629e3ae8192baaff004f5d619 | [] | no_license | highnes7/umaang_decompiled | 341193b25351188d69b4413ebe7f0cde6525c8fb | bcfd90dffe81db012599278928cdcc6207632c56 | refs/heads/master | 2020-06-19T07:47:18.630455 | 2019-07-12T17:16:13 | 2019-07-12T17:16:13 | 196,615,053 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 366 | java | package f.g.e.core;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.TYPE})
public @interface ExampleValueString
{
double value();
}
| [
"highnes.7@gmail.com"
] | highnes.7@gmail.com |
dd2b567908c7ae7119ea9153e24a4163e9596c28 | 296c411aecf0b8d1e0fc5ad0f87f28c6b5ca5189 | /src/main/java/com/zslin/basic/controller/RoleController.java | 89c2ad370d142b7b7190ab883aa70865b1f6880d | [] | no_license | zsl131/ztw | 25115e70881cc95544f92f86d0fe704cc3565ad6 | 795135f1ceba19c233c271b56813fa97af8db298 | refs/heads/master | 2021-01-13T04:19:50.650361 | 2017-01-08T09:22:06 | 2017-01-08T09:22:06 | 77,433,868 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,305 | java | package com.zslin.basic.controller;
import com.zslin.basic.annotations.AdminAuth;
import com.zslin.basic.annotations.Token;
import com.zslin.basic.exception.SystemException;
import com.zslin.basic.model.Role;
import com.zslin.basic.repository.SimplePageBuilder;
import com.zslin.basic.service.IRoleService;
import com.zslin.basic.service.MenuServiceImpl;
import com.zslin.basic.service.RoleMenuServiceImpl;
import com.zslin.basic.tools.PinyinToolkit;
import com.zslin.basic.tools.TokenTools;
import com.zslin.basic.utils.ParamFilterUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* 角色管理Controller
* @author zslin.com 20160513
*
*/
@Controller
@RequestMapping(value="admin/role")
@AdminAuth(name = "角色管理", psn="权限管理", orderNum = 2, pentity=0, porderNum=2)
public class RoleController {
@Autowired
private IRoleService roleService;
@Autowired
private MenuServiceImpl menuServiceImpl;
@Autowired
private RoleMenuServiceImpl roleMenuServiceImpl;
/** 列表 */
@AdminAuth(name = "角色管理", orderNum = 1, icon="icon-list", type="1")
@RequestMapping(value="list", method= RequestMethod.GET)
public String list(Model model, Integer page, HttpServletRequest request) {
// Page<Role> datas = roleService.findAll(new ParamFilterUtil<Role>().buildSearch(model, request), PageableUtil.basicPage(page));
Page<Role> datas = roleService.findAll(new ParamFilterUtil<Role>().buildSearch(model, request), SimplePageBuilder.generate(page));
model.addAttribute("datas", datas);
return "admin/basic/role/list";
}
@AdminAuth(name="角色授权", orderNum=5)
@RequestMapping(value="menus/{id}", method=RequestMethod.GET)
public String menus(Model model, @PathVariable Integer id, HttpServletRequest request) {
String treeJson = menuServiceImpl.queryTreeJson(null);
model.addAttribute("role", roleService.findOne(id)); //获取当前角色
List<Integer> curAuthList = roleService.listRoleMenuIds(id);
StringBuffer sb = new StringBuffer();
for(Integer aid : curAuthList) {sb.append(aid).append(",");}
sb.append("0");
model.addAttribute("curAuth", sb.toString()); //获取角色已有的菜单id
model.addAttribute("treeJson", treeJson);
return "admin/basic/role/menus";
}
/** 添加角色 */
@Token(flag=Token.READY)
@AdminAuth(name = "添加角色", orderNum = 2, icon="icon-plus")
@RequestMapping(value="add", method=RequestMethod.GET)
public String add(Model model, HttpServletRequest request) {
Role role = new Role();
model.addAttribute("role", role);
return "admin/basic/role/add";
}
/** 添加角色POST */
@Token(flag=Token.CHECK)
@RequestMapping(value="add", method=RequestMethod.POST)
public String add(Model model, Role role, HttpServletRequest request) {
// Boolean isRepeat = (Boolean) request.getAttribute("isRepeat");
if(TokenTools.isNoRepeat(request)) { //不是重复提交
role.setSn(PinyinToolkit.cn2Spell(role.getName(), ""));
roleService.save(role);
}
return "redirect:/admin/role/list";
}
@Token(flag=Token.READY)
@AdminAuth(name="修改角色", orderNum=3)
@RequestMapping(value="update/{id}", method=RequestMethod.GET)
public String update(Model model, @PathVariable Integer id, HttpServletRequest request) {
Role r = roleService.findOne(id);
model.addAttribute("role", r);
return "admin/basic/role/update";
}
@Token(flag=Token.CHECK)
@RequestMapping(value="update/{id}", method=RequestMethod.POST)
public String update(Model model, @PathVariable Integer id, Role role, HttpServletRequest request) {
// Boolean isRepeat = (Boolean) request.getAttribute("isRepeat");
if(TokenTools.isNoRepeat(request)) {
Role r = roleService.findOne(id);
r.setName(role.getName());
roleService.save(r);
}
return "redirect:/admin/role/list";
}
@AdminAuth(name="删除角色", orderNum=4)
@RequestMapping(value="delete/{id}", method=RequestMethod.POST)
public @ResponseBody String delete(@PathVariable Integer id) {
try {
roleService.delete(id);
return "1";
} catch (Exception e) {
return "0";
}
}
@RequestMapping(value = "addOrDelRoleMenu", method = RequestMethod.POST)
@AdminAuth(name="为角色授权资源", orderNum=5)
public @ResponseBody String addOrDelRoleMenu(Integer roleId, Integer menuId) {
try {
roleMenuServiceImpl.addOrDelete(roleId, menuId);
} catch (Exception e) {
throw new SystemException("为角色授权资源失败");
}
return "1";
}
} | [
"398986099@qq.com"
] | 398986099@qq.com |
60241a65bcbed81b6240f321bb2f77abc34eea6a | 2e743d39b9928e352f1a8c7ecc33bf7c9f7481fb | /AE-Game/src/org/typezero/gameserver/model/ai/BombTemplate.java | 1f11a7f1a6ff376990f8fd0989a0e32d4c711c4c | [] | no_license | webdes27/AionTypeZero | 40461b3b99ae7ca229735889277e62eed4c5db7e | ff234a0a515c1155f18e61e5b5ba2afad7dfd8c9 | refs/heads/master | 2021-05-30T12:14:08.672390 | 2016-01-29T13:54:32 | 2016-01-29T13:54:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,146 | java | /*
* Copyright (c) 2015, TypeZero Engine (game.developpers.com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 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 TypeZero Engine nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
package org.typezero.gameserver.model.ai;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
*
* @author xTz
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BombTemplate")
public class BombTemplate {
@XmlAttribute(name = "skillId")
private int SkillId = 0;
@XmlAttribute(name = "cd")
private int cd = 0;
public int getCd() {
return this.cd;
}
public int getSkillId() {
return this.SkillId;
}
}
| [
"game.fanpage@gmail.com"
] | game.fanpage@gmail.com |
af2db7fb770f28855b75c738dc663418d4ba82bc | 2c7bbc8139c4695180852ed29b229bb5a0f038d7 | /com/google/android/exoplayer/ExoPlayerImpl$1.java | 9f095d228495783dcf5b98f04bab4635ed335053 | [] | no_license | suliyu/evolucionNetflix | 6126cae17d1f7ea0bc769ee4669e64f3792cdd2f | ac767b81e72ca5ad636ec0d471595bca7331384a | refs/heads/master | 2020-04-27T05:55:47.314928 | 2017-05-08T17:08:22 | 2017-05-08T17:08:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 425 | java | //
// Decompiled by Procyon v0.5.30
//
package com.google.android.exoplayer;
import android.os.Message;
import android.os.Handler;
class ExoPlayerImpl$1 extends Handler
{
final /* synthetic */ ExoPlayerImpl this$0;
ExoPlayerImpl$1(final ExoPlayerImpl this$0) {
this.this$0 = this$0;
}
public void handleMessage(final Message message) {
this.this$0.handleEvent(message);
}
}
| [
"sy.velasquez10@uniandes.edu.co"
] | sy.velasquez10@uniandes.edu.co |
9331ceedbd34b2fcbc7190dcd735a2a430c27dd3 | 45a77ade1c5db89eca8dac4a87d2f8ef9bf18796 | /src/java/org/apache/cassandra/utils/NanoTimeToCurrentTimeMillis.java | a6c5d2879e899d376d43310fc5085ce04befe0e8 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | vcostet/cassandra-kmean | f2edca52d22027c89a406b8db40b7113a55054ac | b55d64f7b8862c8bd81cdd66d1acb38f4e586a13 | refs/heads/master | 2020-04-06T05:31:19.905398 | 2015-06-12T06:43:46 | 2015-06-12T06:43:46 | 33,725,876 | 1 | 1 | Apache-2.0 | 2023-03-20T11:56:28 | 2015-04-10T11:49:23 | Java | UTF-8 | Java | false | false | 3,328 | 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.util.concurrent.TimeUnit;
import org.apache.cassandra.config.Config;
import com.google.common.annotations.VisibleForTesting;
/*
* Convert from nanotime to non-monotonic current time millis. Beware of weaker ordering guarantees.
*/
public class NanoTimeToCurrentTimeMillis
{
/*
* How often to pull a new timestamp from the system.
*/
private static final String TIMESTAMP_UPDATE_INTERVAL_PROPERTY = Config.PROPERTY_PREFIX + "NANOTIMETOMILLIS_TIMESTAMP_UPDATE_INTERVAL";
private static final long TIMESTAMP_UPDATE_INTERVAL = Long.getLong(TIMESTAMP_UPDATE_INTERVAL_PROPERTY, 10000);
private static volatile long TIMESTAMP_BASE[] = new long[] { System.currentTimeMillis(), System.nanoTime() };
@VisibleForTesting
public static final Object TIMESTAMP_UPDATE = new Object();
/*
* System.currentTimeMillis() is 25 nanoseconds. This is 2 nanoseconds (maybe) according to JMH.
* Faster than calling both currentTimeMillis() and nanoTime().
*
* There is also the issue of how scalable nanoTime() and currentTimeMillis() are which is a moving target.
*
* These timestamps don't order with System.currentTimeMillis() because currentTimeMillis() can tick over
* before this one does. I have seen it behind by as much as 2 milliseconds.
*/
public static final long convert(long nanoTime)
{
final long timestampBase[] = TIMESTAMP_BASE;
return timestampBase[0] + TimeUnit.NANOSECONDS.toMillis(nanoTime - timestampBase[1]);
}
static
{
//Pick up updates from NTP periodically
Thread t = new Thread("NanoTimeToCurrentTimeMillis updater")
{
@Override
public void run()
{
while (true)
{
try
{
synchronized (TIMESTAMP_UPDATE)
{
TIMESTAMP_UPDATE.wait(TIMESTAMP_UPDATE_INTERVAL);
}
}
catch (InterruptedException e)
{
return;
}
TIMESTAMP_BASE = new long[] {
Math.max(TIMESTAMP_BASE[0], System.currentTimeMillis()),
Math.max(TIMESTAMP_BASE[1], System.nanoTime()) };
}
}
};
t.setDaemon(true);
t.start();
}
}
| [
"vcostet@juniorisep.com"
] | vcostet@juniorisep.com |
67a00d0a4560b221ef2576c84832722f4f8508bd | bee4de4cdda2739e0c62f15168b52d089dcee2a0 | /src/main/java/com/sop4j/base/apache/io/input/TailerListenerAdapter.java | ce7b544b4c25672ad98bbaa055f6a687f17bc36a | [
"Apache-2.0"
] | permissive | wspeirs/sop4j-base | 5be82eafa27bbdb42a039d7642d5efb363de56d0 | 3640cdd20c5227bafc565c1155de2ff756dca9da | refs/heads/master | 2021-01-19T11:29:34.918100 | 2013-11-27T22:15:26 | 2013-11-27T22:15:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,884 | 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 com.sop4j.base.apache.io.input;
/**
* {@link TailerListener} Adapter.
*
* @version $Id: TailerListenerAdapter.java 1304052 2012-03-22 20:55:29Z ggregory $
* @since 2.0
*/
public class TailerListenerAdapter implements TailerListener {
/**
* The tailer will call this method during construction,
* giving the listener a method of stopping the tailer.
* @param tailer the tailer.
*/
public void init(Tailer tailer) {
}
/**
* This method is called if the tailed file is not found.
*/
public void fileNotFound() {
}
/**
* Called if a file rotation is detected.
*
* This method is called before the file is reopened, and fileNotFound may
* be called if the new file has not yet been created.
*/
public void fileRotated() {
}
/**
* Handles a line from a Tailer.
* @param line the line.
*/
public void handle(String line) {
}
/**
* Handles an Exception .
* @param ex the exception.
*/
public void handle(Exception ex) {
}
}
| [
"bill.speirs@gmail.com"
] | bill.speirs@gmail.com |
7920624640f5ebc6431dd26e0491077b229ad140 | b7e2001c5656cc601938b8148069aa45aae2be8d | /iCAide/src/main/java/com/deya/hospital/vo/DoucmentVo.java | c046daf53e096fce1a58cd0656d9e44de5bb43f2 | [] | no_license | xiongzhuo/Nursing | f260cec3b2b4c46d395a4cc93040358bd7c2cc38 | 25e6c76ccd69836407dcc6b59ca2daa41a3c9459 | refs/heads/master | 2021-01-18T08:10:21.098781 | 2017-08-15T08:56:59 | 2017-08-15T08:57:23 | 100,354,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,653 | java | package com.deya.hospital.vo;
import java.io.Serializable;
public class DoucmentVo implements Serializable{
/**
*
*/
private static final long serialVersionUID = 0x000040004L;
public String getTop_pic() {
return top_pic;
}
public void setTop_pic(String top_pic) {
this.top_pic = top_pic;
}
public String getRead_count() {
return read_count;
}
public void setRead_count(String read_count) {
this.read_count = read_count;
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getContents() {
return contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public String getCreate_time() {
return create_time;
}
public void setCreate_time(String create_time) {
this.create_time = create_time;
}
public String getDegest() {
return degest;
}
public void setDegest(String degest) {
this.degest = degest;
}
private String top_pic;
private String read_count;
private String topic;
private String id;
private String author;
private String contents;
private String create_time;
private String document_id;
public String getDocument_id() {
return document_id;
}
public void setDocument_id(String document_id) {
this.document_id = document_id;
}
public String getHas_pic() {
return has_pic;
}
public void setHas_pic(String has_pic) {
this.has_pic = has_pic;
}
public String getTypes() {
return types;
}
public void setTypes(String types) {
this.types = types;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
public String getRevision_time() {
return revision_time;
}
public void setRevision_time(String revision_time) {
this.revision_time = revision_time;
}
public String getExecution_time() {
return execution_time;
}
public void setExecution_time(String execution_time) {
this.execution_time = execution_time;
}
public String getDrafting_unit() {
return drafting_unit;
}
public void setDrafting_unit(String drafting_unit) {
this.drafting_unit = drafting_unit;
}
public String getPublish_unit() {
return publish_unit;
}
public void setPublish_unit(String publish_unit) {
this.publish_unit = publish_unit;
}
public String getKind() {
return kind;
}
public void setKind(String kind) {
this.kind = kind;
}
public String getPdf_attach() {
return pdf_attach;
}
public void setPdf_attach(String pdf_attach) {
this.pdf_attach = pdf_attach;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
private String has_pic;//是否有图',
private String degest;//文章摘要',
private String types;//'资讯分类',
private String platform;//发布平台',
private String revision_time;//修订时间',
private String execution_time; //执行时间',
private String drafting_unit;//起草单位',
public String getDrafting_person() {
return drafting_person;
}
public void setDrafting_person(String drafting_person) {
this.drafting_person = drafting_person;
}
private String drafting_person;//起草人',
private String publish_unit;//发布单位
private String kind;
private String pdf_attach;
String attachment;
public String getAttachment() {
return attachment;
}
public void setAttachment(String attachment) {
this.attachment = attachment;
}
}
| [
"15388953585@163.com"
] | 15388953585@163.com |
b98da10aec92a873dfdbe332caf97bb155f7f13b | b549c4bb55b9298563c01d6b3eadaf0e0ce7e239 | /src/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | ae7c70c4c50ab4f4f3ec62f8e4ac740f61305fd1 | [] | no_license | yuexiaoguang/tomcat4 | be5b743a1b3281e98afaffb0674f4a02696bfd29 | f39c53184dd8e3e373a8e5acf6b3dd92f5d2a7d5 | refs/heads/master | 2020-05-27T19:27:10.008723 | 2019-05-27T02:53:52 | 2019-05-27T02:53:52 | 188,760,243 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 8,388 | java | package org.apache.catalina.mbeans;
import java.util.Iterator;
import javax.naming.Binding;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;
import org.apache.catalina.Group;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.Role;
import org.apache.catalina.User;
import org.apache.catalina.UserDatabase;
import org.apache.commons.modeler.Registry;
/**
* <code>LifecycleListener</code>实现类,实例化管理的全局JNDI资源相关的MBeans集合.
*/
public class GlobalResourcesLifecycleListener implements LifecycleListener {
// ----------------------------------------------------- Instance Variables
/**
* 附属的Catalina组件
*/
protected Lifecycle component = null;
/**
* 管理bean的配置信息注册表
*/
protected static Registry registry = MBeanUtils.createRegistry();
// ------------------------------------------------------------- Properties
/**
* 调试等级
*/
protected int debug = 0;
public int getDebug() {
return (this.debug);
}
public void setDebug(int debug) {
this.debug = debug;
}
// ---------------------------------------------- LifecycleListener Methods
/**
* 启动和关闭事件的主要入口点
*
* @param event The event that has occurred
*/
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.START_EVENT.equals(event.getType())) {
component = event.getLifecycle();
createMBeans();
} else if (Lifecycle.STOP_EVENT.equals(event.getType())) {
destroyMBeans();
component = null;
}
}
// ------------------------------------------------------ Protected Methods
/**
* 为相关的全局JNDI资源创建MBeans.
*/
protected void createMBeans() {
// 查找全局命名上下文
Object context = null;
try {
context = (new InitialContext()).lookup("java:/");
} catch (NamingException e) {
e.printStackTrace();
throw new IllegalStateException
("No global naming context defined for server");
}
if( ! (context instanceof Context) )
return;
// 遍历定义的全局JNDI资源上下文
try {
createMBeans("", (Context)context);
} catch (NamingException e) {
log("Exception processing Global JNDI Resources", e);
} catch (RuntimeException e) {
log("RuntimeException processing Global JNDI Resources" + e.toString());
}
}
/**
* 为指定命名上下文相关的全局JNDI资源创建MBeans.
*
* @param prefix 完整对象名称路径的前缀
* @param context 要扫描的上下文
*
* @exception NamingException if a JNDI exception occurs
*/
protected void createMBeans(String prefix, Context context)
throws NamingException {
if (debug >= 1) {
log("Creating MBeans for Global JNDI Resources in Context '" +
prefix + "' " + context );
}
NamingEnumeration bindings = context.listBindings("");
while (bindings.hasMore()) {
Object next=bindings.next();
if( next instanceof Binding ) {
Binding binding = (Binding) next;
String name = prefix + binding.getName();
Object value = context.lookup(binding.getName());
if (debug >= 1 && name!=null) {
log("Processing resource " + name + " " + name.getClass().getName());
}
try {
if (value instanceof Context) {
createMBeans(name + "/", (Context) value);
} else if (value instanceof UserDatabase) {
try {
createMBeans(name, (UserDatabase) value);
} catch (Exception e) {
log("Exception creating UserDatabase MBeans for " + name,
e);
}
}
} catch( OperationNotSupportedException nex ) {
log( "OperationNotSupportedException processing " + next + " " + nex.toString());
} catch( NamingException nex ) {
log( "Naming exception processing " + next + " " + nex.toString());
} catch( RuntimeException ex ) {
log( "Runtime exception processing " + next + " " + ex.toString());
}
} else {
log("Foreign context " + context.getClass().getName() + " " +
next.getClass().getName()+ " " + context);
}
}
}
/**
* 为指定的UserDatabase和它的内容创建MBeans.
*
* @param name 这个 UserDatabase完整的资源名称
* @param database 要处理的 UserDatabase
*
* @exception Exception if an exception occurs while creating MBeans
*/
protected void createMBeans(String name, UserDatabase database) throws Exception {
// Create the MBean for the UserDatabase itself
if (debug >= 2) {
log("Creating UserDatabase MBeans for resource " + name);
log("Database=" + database);
}
if (MBeanUtils.createMBean(database) == null) {
throw new IllegalArgumentException
("Cannot create UserDatabase MBean for resource " + name);
}
// Create the MBeans for each defined Role
Iterator roles = database.getRoles();
while (roles.hasNext()) {
Role role = (Role) roles.next();
if (debug >= 3) {
log(" Creating Role MBean for role " + role);
}
if (MBeanUtils.createMBean(role) == null) {
throw new IllegalArgumentException
("Cannot create Role MBean for role " + role);
}
}
// Create the MBeans for each defined Group
Iterator groups = database.getGroups();
while (groups.hasNext()) {
Group group = (Group) groups.next();
if (debug >= 3) {
log(" Creating Group MBean for group " + group);
}
if (MBeanUtils.createMBean(group) == null) {
throw new IllegalArgumentException
("Cannot create Group MBean for group " + group);
}
}
// Create the MBeans for each defined User
Iterator users = database.getUsers();
while (users.hasNext()) {
User user = (User) users.next();
if (debug >= 3) {
log(" Creating User MBean for user " + user);
}
if (MBeanUtils.createMBean(user) == null) {
throw new IllegalArgumentException
("Cannot create User MBean for user " + user);
}
}
}
/**
* 为相关的全局JNDI资源销毁MBeans.
*/
protected void destroyMBeans() {
if (debug >= 1) {
log("Destroying MBeans for Global JNDI Resources");
}
}
/**
* 日志消息的目的地
*/
protected java.io.PrintStream stream = System.out;
/**
* 记录日志
*
* @param message The message to be logged
*/
protected void log(String message) {
/*
if (stream == System.out) {
try {
stream = new java.io.PrintStream
(new java.io.FileOutputStream("grll.log"));
} catch (Throwable t) {
;
}
}
*/
stream.print("GlobalResourcesLifecycleListener: ");
stream.println(message);
}
/**
* 记录日志
*
* @param message The message to be logged
* @param throwable The exception to be logged
*/
protected void log(String message, Throwable throwable) {
log(message);
throwable.printStackTrace(stream);
}
}
| [
"yuexiaoguang@vortexinfo.cn"
] | yuexiaoguang@vortexinfo.cn |
97e23a6a1cf0f4366f87adc01b90a33f4e2abf29 | e7cb38a15026d156a11e4cf0ea61bed00b837abe | /groundwork-monitor-framework/core/src/main/org/jboss/portal/core/model/portal/command/action/MoveWindowCommand.java | 90695cc287d29b71bc94cc6d9a8e20c484e5259f | [] | no_license | wang-shun/groundwork-trunk | 5e0ce72c739fc07f634aeefc8f4beb1c89f128af | ea1ca766fd690e75c3ee1ebe0ec17411bc651a76 | refs/heads/master | 2020-04-01T08:50:03.249587 | 2018-08-20T21:21:57 | 2018-08-20T21:21:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,486 | java | /******************************************************************************
* JBoss, a division of Red Hat *
* Copyright 2006, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
* *
* This 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 software is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this software; if not, write to the Free *
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
package org.jboss.portal.core.model.portal.command.action;
import org.jboss.portal.common.util.ListMap;
import org.jboss.portal.core.controller.ControllerException;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.command.WindowCommand;
import org.jboss.portal.theme.ThemeConstants;
import org.jboss.portal.theme.ThemeTools;
import java.util.Comparator;
import java.util.Iterator;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 8786 $
*/
public class MoveWindowCommand extends WindowCommand
{
/** . */
private static final CommandInfo info = new ActionCommandInfo(false);
/** . */
private int fromPos;
/** . */
private String fromRegion;
/** . */
private int toPos;
/** . */
private String toRegion;
public MoveWindowCommand(PortalObjectId windowId, int fromPos, String fromRegion, int toPos, String toRegion)
throws IllegalArgumentException
{
super(windowId);
//
this.fromPos = fromPos;
this.fromRegion = fromRegion;
this.toPos = toPos;
this.toRegion = toRegion;
}
public CommandInfo getInfo()
{
return info;
}
public ControllerResponse execute() throws ControllerException
{
if (isDashboard())
{
// First relayout all windows correctly except the target window
ListMap blah = new ListMap(tmp);
for (Iterator i = page.getChildren(PortalObject.WINDOW_MASK).iterator(); i.hasNext();)
{
Window window = (Window)i.next();
if (window != target)
{
String region = window.getDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION);
if (region != null)
{
blah.put(region, window);
}
}
}
//
for (Iterator i = blah.keySet().iterator(); i.hasNext();)
{
String key = (String)i.next();
//
boolean processFrom = key.equals(fromRegion);
boolean processTo = key.equals(toRegion);
//
if (!processFrom && !processTo)
{
int order = 0;
for (Iterator j = blah.iterator(key); j.hasNext();)
{
Window window = (Window)j.next();
window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, Integer.toString(order++));
}
}
else
{
if (processFrom)
{
int order = 0;
for (Iterator j = blah.iterator(key); j.hasNext();)
{
Window window = (Window)j.next();
//
if (window == target)
{
order--;
}
else
{
window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, Integer.toString(order++));
}
}
}
if (processTo)
{
int order = 0;
for (Iterator j = blah.iterator(key); j.hasNext();)
{
Window window = (Window)j.next();
//
if (order == toPos)
{
order++;
}
//
window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, Integer.toString(order++));
}
}
}
}
//
target.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, toRegion);
target.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, Integer.toString(toPos));
}
//
return null;
}
private static final Comparator tmp = new Comparator()
{
public int compare(Object o1, Object o2)
{
Window window1 = (Window)o1;
Window window2 = (Window)o2;
String order1 = window1.getDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER);
String order2 = window2.getDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER);
return ThemeTools.compareWindowOrder(order1, window1.getName(), order2, window2.getName());
}
};
}
| [
"gibaless@gmail.com"
] | gibaless@gmail.com |
170454e1e47ce67db2a3cec19212d5773f1db3f3 | 2f4a058ab684068be5af77fea0bf07665b675ac0 | /app/com/facebook/orca/mqtt/messages/SubscribePayload.java | fddaa608d6d4652d9ddbfd81db522cc7d650167e | [] | no_license | cengizgoren/facebook_apk_crack | ee812a57c746df3c28fb1f9263ae77190f08d8d2 | a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b | refs/heads/master | 2021-05-26T14:44:04.092474 | 2013-01-16T08:39:00 | 2013-01-16T08:39:00 | 8,321,708 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 574 | java | package com.facebook.orca.mqtt.messages;
import com.google.common.collect.ImmutableList;
import java.util.List;
public class SubscribePayload
{
private final ImmutableList<SubscribeTopic> a;
public SubscribePayload(List<SubscribeTopic> paramList)
{
this.a = ImmutableList.a(paramList);
}
public ImmutableList<SubscribeTopic> a()
{
return this.a;
}
}
/* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar
* Qualified Name: com.facebook.orca.mqtt.messages.SubscribePayload
* JD-Core Version: 0.6.0
*/ | [
"macluz@msn.com"
] | macluz@msn.com |
9c6dfd4253fe88d2a82371a5582f47804e83c4a9 | 96f24caba3511efb342fd9bb991698e7a0ba1c63 | /6. Patterns-Free/src/patternsdemo/l6_facade/objects/Client.java | 01f25f752dfe53610eab3315e7973b15f9b5f446 | [] | no_license | Abergaz/JavaBeginWork | 877f87b0f21b6fdac6d24ad14f6d28d574a14742 | a443adacfd8265839ced00b1eeab22294e9fb42d | refs/heads/master | 2020-06-30T11:15:53.414126 | 2019-11-16T06:00:45 | 2019-11-16T06:00:45 | 200,809,640 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 663 | java | package patternsdemo.l6_facade.objects;
import patternsdemo.l6_facade.facade.CarFacade;
import patternsdemo.l6_facade.parts.Door;
import patternsdemo.l6_facade.parts.Wheel;
import patternsdemo.l6_facade.parts.Zazhiganie;
public class Client {
public static void main(String[] args) {
// вызов без фасада
Door door = new Door();
door.open();
Zazhiganie zazhiganie = new Zazhiganie();
zazhiganie.fire();
Wheel wheel = new Wheel();
wheel.turn();
// вызов с фасадом
CarFacade carFacade = new CarFacade();
carFacade.go();
}
}
| [
"zagreba@gmail.com"
] | zagreba@gmail.com |
46731ed6a1f8096ff902b1ec2a133318e371d122 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_0f2b7fb6af723adb7b0f0e8f894a412ded8aae5a/PlatformImpl/15_0f2b7fb6af723adb7b0f0e8f894a412ded8aae5a_PlatformImpl_t.java | ed0ac7186982b8f0ef1b5c42fd6e4d14ad4c4c45 | [] | 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 | 8,131 | java | /**
*
*/
package edu.thu.keg.mdap_impl;
import java.io.IOException;
import javax.naming.OperationNotSupportedException;
import edu.thu.keg.mdap.DataProviderManager;
import edu.thu.keg.mdap.DataSetManager;
import edu.thu.keg.mdap.Platform;
import edu.thu.keg.mdap.datamodel.DataContent;
import edu.thu.keg.mdap.datamodel.DataField;
import edu.thu.keg.mdap.datamodel.DataField.FieldType;
import edu.thu.keg.mdap.datamodel.DataSet;
import edu.thu.keg.mdap.datamodel.GeneralDataField;
import edu.thu.keg.mdap.datamodel.Query;
import edu.thu.keg.mdap.datamodel.Query.Operator;
import edu.thu.keg.mdap.datamodel.Query.Order;
import edu.thu.keg.mdap.datasetfeature.DataSetFeature;
import edu.thu.keg.mdap.datasetfeature.GeoFeature;
import edu.thu.keg.mdap.datasetfeature.StatisticsFeature;
import edu.thu.keg.mdap.provider.DataProvider;
import edu.thu.keg.mdap.provider.DataProviderException;
/**
* @author Yuanchao Ma
*
*/
public class PlatformImpl implements Platform {
public PlatformImpl(String file) {
try {
Config.init(file);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/* (non-Javadoc)
* @see edu.thu.keg.mdap.Platform#getDataSetManager()
*/
@Override
public DataSetManager getDataSetManager() {
return DataSetManagerImpl.getInstance();
}
/* (non-Javadoc)
* @see edu.thu.keg.mdap.Platform#getDataProviderManager()
*/
@Override
public DataProviderManager getDataProviderManager() {
return DataProviderManagerImpl.getInstance();
}
public void crud() {
// Platform p = new PlatformImpl(
// "C:\\Users\\ybz\\GitHub\\keg-operator-data\\platform\\config.xml");
// Construct a new dataset
DataProvider provider = getDataProviderManager().getDefaultSQLProvider("BeijingData");
DataField[] fields = new DataField[2];
fields[0] = new GeneralDataField("WebsiteId", FieldType.Int, "", true );
fields[1] = new GeneralDataField("URL", FieldType.Double, "", false );
getDataSetManager().createDataSet("WebsiteId_URL", "Website info",
provider, fields, true);
fields = new DataField[4];
fields[0] = new GeneralDataField("Region", FieldType.Int, "", true );
fields[1] = new GeneralDataField("Name", FieldType.ShortString, "", false );
fields[2] = new GeneralDataField("Latitude", FieldType.Double, "", false );
fields[3] = new GeneralDataField("Longitude", FieldType.Double, "", false );
getDataSetManager().createDataSet("RegionInfo3", "Region info 3",
provider, fields, true,
new GeoFeature(fields[2], fields[3], fields[1], null, false));
fields = new DataField[3];
fields[0] = new GeneralDataField("SiteName", FieldType.ShortString, "", false );
fields[1] = new GeneralDataField("Latitude", FieldType.Double, "", false );
fields[2] = new GeneralDataField("Longitude", FieldType.Double, "", false );
getDataSetManager().createDataSet("RegionInfo2", "Region info 2",
provider, fields, true,
new GeoFeature(fields[1], fields[2], fields[0], null, false));
fields = new DataField[6];
fields[0] = new GeneralDataField("Domain", FieldType.LongString,
"Domain", true);
fields[1] = new GeneralDataField("DayCount", FieldType.Int,
"appear days of this domain", false);
fields[2] = new GeneralDataField("HourCount", FieldType.Int,
"appear hours of this domain", false);
fields[3] = new GeneralDataField("LocCount", FieldType.Int,
"appear locations of this domain", false);
fields[4] = new GeneralDataField("UserCount", FieldType.Int,
"number of users visiting this domain", false);
fields[5] = new GeneralDataField("TotalCount", FieldType.Int,
"total visits of this domain", false);
DataSetFeature feature = new StatisticsFeature(
new DataField[]{fields[0]},
new DataField[]
{fields[1],fields[2],fields[3],fields[4],fields[5]});
getDataSetManager().createDataSet("FilteredByCT_Domain",
"Domain statistics", provider, fields, false, feature);
fields = new DataField[2];
fields[0] = new GeneralDataField("ContentType", FieldType.LongString,
"Content Type of websites", true);
fields[1] = new GeneralDataField("times", FieldType.Int,
"appear times of the ContentType", false);
getDataSetManager().createDataSet("DataAggr_ContentTypes_Up90",
"Top 90% Content Type distribution", provider, fields, true,
new StatisticsFeature(fields[0], fields[1]));
fields = new DataField[4];
fields[0] = new GeneralDataField("Imsi", FieldType.ShortString,
"User IMSI", true);
fields[1] = new GeneralDataField("WebsiteCount", FieldType.Int,
"Total count of visited websites", false);
fields[2] = new GeneralDataField("RegionCount", FieldType.Int,
"Total count of appeared regions", false);
fields[3] = new GeneralDataField("TotalCount", FieldType.Int,
"Total count of requests", false);
feature = new StatisticsFeature(
new DataField[]{fields[0]},
new DataField[]
{fields[1],fields[2],fields[3]});
getDataSetManager().createDataSet("slot_Imsi_All",
"User statistics by time slot", provider, fields, true,
feature);
// fields = new DataField[2];
// fields[0] = new GeneralDataField("ContentType", FieldType.LongString,
// "Content Type of websites", true);
// fields[1] = new GeneralDataField("times", FieldType.Int,
// "appear times of the ContentType", false);
// DataSet tds2 = p.getDataSetManager().createDataSet("New_Test",
// "Top 90% Content Type distribution", provider, fields, true,
// new StatisticsFeature(fields[0], fields[1]));
//
// try {
// tds2.writeData(tds.getQuery());
// } catch (OperationNotSupportedException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// } catch (DataProviderException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// //remove a dataset
// try {
// p.getDataSetManager().removeDataSet(tds2);
// } catch (DataProviderException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
try {
getDataSetManager().saveChanges();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
for (DataSet ds : getDataSetManager().getDataSetList()) {
System.out.println(ds.getName() + " " + ds.getDescription());
}
}
public static void main(String[] args) {
PlatformImpl p = new PlatformImpl(
"C:\\Users\\ybz\\GitHub\\keg-operator-data\\platform\\config.xml");
p.query();
}
private void query() {
//Get a dataset
for (DataSet ds : getDataSetManager().getDataSetList()) {
//Read data from a dataset
try {
System.out.println(ds.getDescription());
DataContent q = ds.getQuery();
// GeoDataSet gds = (GeoDataSet)ds.getFeature(GeoDataSet.class);
q.open();
int count = 0;
while (q.next()) {
count ++;
// System.out.println(
// q.getValue(gds.getTagField()).toString()
// + " " + q.getValue(gds.getLatitudeField()).toString()
// + " " + q.getValue(gds.getLongitudeField()).toString());
}
q.close();
System.out.println(count);
} catch (DataProviderException | OperationNotSupportedException ex) {
ex.printStackTrace();
}
}
DataSet ds = getDataSetManager().getDataSet("DataAggr_ContentTypes_Up90");
try {
System.out.println(ds.getDescription());
DataContent q = ds.getQuery(StatisticsFeature.class);
// GeoDataSet gds = (GeoDataSet)ds.getFeature(GeoDataSet.class);
q.open();
int count = 0;
while (q.next()) {
count ++;
System.out.println(
q.getValue(ds.getDataFields()[0]).toString()
+ " " + q.getValue(ds.getDataFields()[1]).toString());
}
q.close();
System.out.println(count);
} catch (DataProviderException | OperationNotSupportedException ex) {
ex.printStackTrace();
}
ds = getDataSetManager().getDataSet("RegionInfo2");
System.out.println(ds.getField("SiteName"));
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
2387b0c404f32e9d6b96ab8dc03b86b512ef2f1c | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/17/17_a4e8e128c252cd3512cefffb359034add7976f98/IRCEventAdapter/17_a4e8e128c252cd3512cefffb359034add7976f98_IRCEventAdapter_s.java | cf6c385eee1c947fe23a502855228c326f1f4242 | [] | 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,253 | java | package com.test9.irc.engine;
import com.test9.irc.display.ChatWindow;
import com.test9.irc.parser.Message;
/**
*
* @author Jared Patton
*
*/
public class IRCEventAdapter implements IRCEventListener {
private ConnectionEngine owner;
private IRCConnection connection;
private ChatWindow cw;
public IRCEventAdapter(ConnectionEngine connectionEngine) {
this.owner = connectionEngine;
connection = owner.getConnection();
cw = connectionEngine.getCw();
}
@Override
public void onConnect(Message m) {
}
@Override
public void onDisconnect() {
// TODO Auto-generated method stub
}
@Override
public void onError(Message m) {
int numCode = Integer.valueOf(m.getCommand());
if(numCode == IRCUtil.ERR_NICKNAMEINUSE) {
System.out.println("ERR_NICKNAMEINUSE");
connection.setNick(connection.getNick()+"_");
connection.send("NICK "+ connection.getNick());
}
}
@Override
public void onInvite() {
// TODO Auto-generated method stub
}
@Override
public void onJoin(String host, Message m) {
if(m.getUser().equals(connection.getNick())) {
cw.getListener().onJoinChannel(host, m.getContent());
} else {
cw.getListener().onUserJoin(host, m.getContent(), m.getNickname());
System.out.println(!(connection.getUsers().contains(m.getNickname())));
if(!(connection.getUsers().contains(m.getNickname())))
{
connection.getUsers().add(new User(m.getNickname(), false));
}
}
}
@Override
public void onKick() {
// TODO Auto-generated method stub
}
@Override
public void onMode(Message m) {
}
@Override
public void onMode(int two) {
// TODO Auto-generated method stub
}
@Override
public void onNick(Message m) {
cw.getListener().onNickChange(m.getNickname(), m.getContent());
// If it is me
if(m.getNickname().equals(connection.getNick()))
connection.setNick(m.getContent());
connection.getUser(m.getNickname()).setNick(m.getContent());
}
@Override
public void onNotice() {
// TODO Auto-generated method stub
}
@Override
public void onPart(Message m) {
System.out.println("onPart()");
if(m.getNickname().equals(connection.getNick())) {
cw.getListener().onPartChannel(connection.getHost(), m.getParams()[0]);
} else {
cw.getListener().onUserPart(connection.getHost(), m.getParams()[0], m.getNickname());
}
}
@Override
public void onPing(String line) {
connection.send("PONG " + line);
}
@Override
public void onPrivmsg(String host, Message m) {
if(m.getContent().contains(connection.getNick()))
cw.newMessageHighlight(host, m.getParams()[0], m.getNickname(), m.getContent());
else
cw.getListener().onNewPrivMessage(
connection.getUser(m.getNickname()), host, m.getParams()[0],
m.getNickname(), m.getContent());
}
@Override
public void onQuit(Message m) {
cw.getListener().onUserQuit(connection.getHost(), m.getNickname(), m.getContent());
}
@Override
public void onReply(Message m) {
int numCode = Integer.valueOf(m.getCommand());
if(numCode == IRCUtil.RPL_WELCOME) {
cw.getIrcConnections().add(connection);
cw.getListener().onJoinServer(m.getServerName());
} else if(numCode == IRCUtil.RPL_NAMREPLY) {
System.out.println("RPL_NAMERPKY");
String[] nicks = m.getContent().split(" ");
for(String n : nicks)
{
cw.getListener().onUserJoin(connection.getHost(), m.getParams()[2], n);
if(!n.equals(connection.getNick()))
connection.getUsers().add(new User(n,false));
else
connection.getUsers().add(new User(n,true));
}
} else if(numCode == IRCUtil.RPL_TOPIC) {
cw.getListener().onNewTopic(m.getPrefix(), m.getParams()[1], m.getContent());
cw.getListener().onNewMessage(m.getPrefix(), m.getParams()[1], "<Topic> " + m.getContent());
} else if(numCode == IRCUtil.RPL_NOWAWAY) {
}
}
@Override
public void onTopic(String host, Message m) {
cw.getListener().onNewTopic(host, m.getParams()[0], m.getContent());
}
@Override
public void onUnknown(String host, String line) {
try{
cw.getListener().onNewMessage(host, host, line);
}catch(Exception e){}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
2375b6a9d4ed67fc4f36d703847b22357fd47ea9 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/alibaba--druid/e4927358c0f2c97ab2448e2a4414bd9be67b18ac/after/OracleWallVisitor.java | e7895e0c4b0d3c4663a7a3324aac20f2510191c3 | [] | 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 | 842 | java | package com.alibaba.druid.filter.wall.spi;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.druid.filter.wall.Violation;
import com.alibaba.druid.filter.wall.WallVisitor;
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVIsitorAdapter;
public class OracleWallVisitor extends OracleASTVIsitorAdapter implements WallVisitor {
private final List<Violation> violations;
public OracleWallVisitor(){
this(new ArrayList<Violation>());
}
public OracleWallVisitor(List<Violation> violations){
this.violations = violations;
}
public List<Violation> getViolations() {
return violations;
}
public boolean visit(SQLBinaryOpExpr x) {
WallVisitorUtils.check(this, x);
return true;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
c4d0cd4dd38c1d083ea227df81e18428a4fea1c3 | b63d49dd45087307958dbd875baef0b11b7c227c | /oro/oro-svn/tags/oro-2.0.6/src/java/examples/filter.java | 286104177e77727551d447ca50b7aafe598ab0a6 | [
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | afs/jena-workspace | 5fad7409852a8de64c2f92ce408eb74a56776b3d | 21147336aa7694fa5d75d2ee0d733ddcb06773f2 | refs/heads/main | 2023-03-15T05:45:20.325177 | 2023-03-10T10:25:18 | 2023-03-10T10:25:18 | 38,121,320 | 0 | 0 | Apache-2.0 | 2022-06-20T17:34:12 | 2015-06-26T16:25:27 | Java | UTF-8 | Java | false | false | 4,142 | java | /* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation", "Jakarta-Oro"
* must not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their
* name, without prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* Portions of this software are based upon software originally written
* by Daniel F. Savarese. We appreciate his contributions.
*/
/*
* $Id: filter.java 54340 2001-05-20 23:55:26Z dfs $
*/
import java.io.*;
import java.util.*;
import org.apache.oro.io.*;
import org.apache.oro.text.*;
/**
* This is a sample program demonstrating how to use the regular expression
* filename filter classes.
*
* @author <a href="mailto:oro-dev@jakarta.apache.org">Daniel F. Savarese</a>
* @version @version@
*/
public final class filter {
public static void printList(String[] list) {
System.out.println();
for(int i=0; i < list.length; i++)
System.out.println(list[i]);
System.out.println();
}
public static final void main(String[] args) {
File dir;
FilenameFilter filter;
String[] list;
dir = new File(System.getProperty("user.dir"));
// List all files ending in .java
filter = new GlobFilenameFilter("*.java",
GlobCompiler.STAR_CANNOT_MATCH_NULL_MASK);
System.out.println("Glob: *.java");
printList(dir.list(filter));
// List all files ending in .class
filter = new AwkFilenameFilter(".+\\.class");
System.out.println("Awk: .+\\.class");
printList(dir.list(filter));
// List all files ending in .java or .class
filter = new Perl5FilenameFilter(".+\\.(?:java|class)");
System.out.println("Perl5: .+\\.(?:java|class)");
printList(dir.list(filter));
}
}
| [
"andy@apache.org"
] | andy@apache.org |
2d521b6aff4334057abea88d645c8dc01967cd21 | f0568343ecd32379a6a2d598bda93fa419847584 | /modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201211/CustomCriteriaSetLogicalOperator.java | 0222b6a8430b578f94d9ed5af15041a583d42777 | [
"Apache-2.0"
] | permissive | frankzwang/googleads-java-lib | bd098b7b61622bd50352ccca815c4de15c45a545 | 0cf942d2558754589a12b4d9daa5902d7499e43f | refs/heads/master | 2021-01-20T23:20:53.380875 | 2014-07-02T19:14:30 | 2014-07-02T19:14:30 | 21,526,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,927 | java | /**
* CustomCriteriaSetLogicalOperator.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.v201211;
public class CustomCriteriaSetLogicalOperator implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected CustomCriteriaSetLogicalOperator(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _AND = "AND";
public static final java.lang.String _OR = "OR";
public static final CustomCriteriaSetLogicalOperator AND = new CustomCriteriaSetLogicalOperator(_AND);
public static final CustomCriteriaSetLogicalOperator OR = new CustomCriteriaSetLogicalOperator(_OR);
public java.lang.String getValue() { return _value_;}
public static CustomCriteriaSetLogicalOperator fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
CustomCriteriaSetLogicalOperator enumeration = (CustomCriteriaSetLogicalOperator)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static CustomCriteriaSetLogicalOperator 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(CustomCriteriaSetLogicalOperator.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201211", "CustomCriteriaSet.LogicalOperator"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
| [
"jradcliff@google.com"
] | jradcliff@google.com |
a77979052baf8c228c7620b6a9c4d9ec1a94c534 | d31d744f62c09cb298022f42bcaf9de03ad9791c | /java/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesSerializeEnsemble.java | 287c9e9054a2639cf2de0aa8fc538504ab5f6bd1 | [] | no_license | yuhuofei/TensorFlow-1 | b2085cb5c061aefe97e2e8f324b01d7d8e3f04a0 | 36eb6994d36674604973a06159e73187087f51c6 | refs/heads/master | 2023-02-22T13:57:28.886086 | 2021-01-26T14:18:18 | 2021-01-26T14:18:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,685 | java | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=======================================================================*/
// This class has been generated, DO NOT EDIT!
package org.tensorflow.op.estimator;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
import org.tensorflow.OperationBuilder;
import org.tensorflow.Output;
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.TInt64;
import org.tensorflow.types.TString;
/**
* Serializes the tree ensemble to a proto.
*/
public final class BoostedTreesSerializeEnsemble extends RawOp {
/**
* Factory method to create a class wrapping a new BoostedTreesSerializeEnsemble operation.
*
* @param scope current scope
* @param treeEnsembleHandle Handle to the tree ensemble.
* @return a new instance of BoostedTreesSerializeEnsemble
*/
@Endpoint(describeByClass = true)
public static BoostedTreesSerializeEnsemble create(Scope scope, Operand<?> treeEnsembleHandle) {
OperationBuilder opBuilder = scope.env().opBuilder("BoostedTreesSerializeEnsemble", scope.makeOpName("BoostedTreesSerializeEnsemble"));
opBuilder.addInput(treeEnsembleHandle.asOutput());
opBuilder = scope.applyControlDependencies(opBuilder);
return new BoostedTreesSerializeEnsemble(opBuilder.build());
}
/**
* Stamp token of the tree ensemble resource.
*/
public Output<TInt64> stampToken() {
return stampToken;
}
/**
* Serialized proto of the ensemble.
*/
public Output<TString> treeEnsembleSerialized() {
return treeEnsembleSerialized;
}
/** The name of this op, as known by TensorFlow core engine */
public static final String OP_NAME = "BoostedTreesSerializeEnsemble";
private Output<TInt64> stampToken;
private Output<TString> treeEnsembleSerialized;
private BoostedTreesSerializeEnsemble(Operation operation) {
super(operation);
int outputIdx = 0;
stampToken = operation.output(outputIdx++);
treeEnsembleSerialized = operation.output(outputIdx++);
}
}
| [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
20c5bac15273ae860defad3173c6b396adc72cfb | 14aa7a85e4778556f3d158be3c87bd4e75c7de0b | /src/day30_struts2/Demo1LoginAction2.java | 4feb09555428062a453bc6ed3fe770637687c38b | [] | no_license | CLgithub/JavaLearn2 | 0c7f9016eebe8f2a56f5c530a6922622ba1d96fe | 321b8287b837d8efa39fac46f29e679fb54ffa48 | refs/heads/master | 2020-05-22T01:40:00.406672 | 2016-12-27T08:22:50 | 2016-12-27T08:22:50 | 57,429,718 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 867 | java | package day30_struts2;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
public class Demo1LoginAction2 extends ActionSupport implements ModelDriven<User> {
private User user = new User();
@Override
public User getModel() {
return user;
}
public String doLogin() {
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
if (serviceDoLogin(user)) {
session.setAttribute("user", user);
return SUCCESS;
} else {
return "uSuccess";
}
}
public boolean serviceDoLogin(User user) {
if ("aa".equals(user.getName()) && "123".equals(user.getPassword())) {
return true;
} else {
return false;
}
}
}
| [
"1064134436@qq.com"
] | 1064134436@qq.com |
bf8ebade1c7d6d42bc45a945ccefd9b494f0c61f | 4bb4f0d58b8ac719a5fc49a3addc2999bf0a9cbc | /car_storage/src/test/java/ru/shaplov/service/CrudDAOXmlTest.java | b936654e27f59c0c29ae6a44a075346e01bfb62d | [
"Apache-2.0"
] | permissive | DmitriyShaplov/job4j_hibernate | 22fbb5990b4d2278663f2a3a911f7f430dbc1c03 | 5a385932c2bdad7371a26080a20de313c1f79604 | refs/heads/master | 2022-12-24T07:03:59.822967 | 2019-10-31T09:58:44 | 2019-10-31T09:58:44 | 195,185,160 | 0 | 0 | Apache-2.0 | 2022-12-16T05:00:35 | 2019-07-04T06:50:27 | Java | UTF-8 | Java | false | false | 2,844 | java | package ru.shaplov.service;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import ru.shaplov.models.*;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
/**
* @author shaplov
* @since 08.07.2019
*/
public class CrudDAOXmlTest {
private static final SessionFactory FACTORY;
private CarBodyXML carBody;
private EngineXML engine;
private TransmissionXML transmission;
private CarXML car;
static {
final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()
.configure()
.build();
try {
FACTORY = new MetadataSources(registry).buildMetadata().buildSessionFactory();
} catch (Exception e) {
StandardServiceRegistryBuilder.destroy(registry);
throw e;
}
}
@Before
public void setUp() {
carBody = new CarBodyXML();
carBody.setName("test car body");
engine = new EngineXML();
engine.setName("test engine");
transmission = new TransmissionXML();
transmission.setName("test transmission");
car = new CarXML();
car.setName("test car");
car.setCarBody(carBody);
car.setEngine(engine);
car.setTransmission(transmission);
}
@After
public void clear() {
try (Session session = FACTORY.openSession()) {
session.beginTransaction();
session.delete(car);
session.delete(carBody);
session.delete(engine);
session.delete(transmission);
session.getTransaction().commit();
}
}
@Test
public void whenAddCarThenEngineNameTestEngine() {
CrudDAO dao = CrudDAO.getInstance();
dao.add(car);
EngineXML result = (EngineXML) dao.get(engine);
assertThat(result.getName(), is("test engine"));
}
@Test
public void whenUpdateCarThenNewName() {
CrudDAO dao = CrudDAO.getInstance();
dao.add(car);
engine.setName("updated engine name");
dao.update(engine);
EngineXML result = (EngineXML) dao.get(engine);
assertThat(result.getName(), is("updated engine name"));
}
@Test
public void whenDeleteThenNull() {
CrudDAO dao = CrudDAO.getInstance();
TransmissionXML tran = new TransmissionXML();
tran.setName("deleted transmission");
dao.add(tran);
dao.delete(tran);
IEntity result = dao.get(tran);
assertNull(result);
}
}
| [
"shaplovd@gmail.com"
] | shaplovd@gmail.com |
baf051bf76dc8de0e27634f9f0d5088c4ae000f5 | bc557f4a6bc1f673f6013d20361a000fc7daac11 | /android/app/src/main/java/com/citywithincity/ecard/user/activities/QuestionActivity.java | 5e397718ff3d894e698a0f2dd215fd5b20dc0cc4 | [] | no_license | gxl244642529/ecard_realName | 6ec14e5feb19dac70e8df1ea2e2fe6111a93b15c | 23d9fd11d8a78196433681519c7dec479e2a809e | refs/heads/master | 2021-04-09T10:17:42.834082 | 2018-03-16T09:41:04 | 2018-03-16T09:41:04 | 125,492,140 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 364 | java | package com.citywithincity.ecard.user.activities;
import android.os.Bundle;
import com.citywithincity.ecard.R;
import com.damai.auto.DMActivity;
public class QuestionActivity extends DMActivity {
@Override
protected void onSetContent(Bundle savedInstanceState) {
setContentView(R.layout.activity_question_item);
setTitle("常见问题和解答");
}
}
| [
"244642529@qq.com"
] | 244642529@qq.com |
5d388274a55fe9b529b7565889b0c0b9f9f8d5d6 | 92e79f38a66d0875d2b611a6b518ecfcc167dc94 | /app/src/main/java/eu/uk/ncl/pet5o/esper/core/context/factory/StatementAgentInstancePostLoadSelect.java | 178b242b8a26a98567f6543086d8f59ea9e998eb | [] | no_license | PetoMichalak/EsperOn | f8f23d24db21269070e302c0a6c329312491388b | 688012d2a92217f4b24bf072dac04ed8902a313d | refs/heads/master | 2020-03-24T01:06:17.446804 | 2018-07-25T15:53:50 | 2018-07-25T15:53:50 | 142,322,329 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,752 | java | /*
***************************************************************************************
* Copyright (C) 2006 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
***************************************************************************************
*/
package eu.uk.ncl.pet5o.esper.core.context.factory;
import eu.uk.ncl.pet5o.esper.client.EventBean;
import eu.uk.ncl.pet5o.esper.epl.expression.core.ExprEvaluatorContext;
import eu.uk.ncl.pet5o.esper.epl.expression.core.ExprNode;
import eu.uk.ncl.pet5o.esper.epl.expression.core.ExprNodeUtilityCore;
import eu.uk.ncl.pet5o.esper.epl.join.base.JoinSetComposerDesc;
import eu.uk.ncl.pet5o.esper.epl.join.plan.QueryGraph;
import eu.uk.ncl.pet5o.esper.epl.named.NamedWindowTailViewInstance;
import eu.uk.ncl.pet5o.esper.view.HistoricalEventViewable;
import eu.uk.ncl.pet5o.esper.view.Viewable;
import java.lang.annotation.Annotation;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class StatementAgentInstancePostLoadSelect implements StatementAgentInstancePostLoad {
private final Viewable[] streamViews;
private final JoinSetComposerDesc joinSetComposer;
private final NamedWindowTailViewInstance[] namedWindowTailViews;
private final QueryGraph[] namedWindowPostloadFilters;
private final List<ExprNode>[] namedWindowFilters;
private final Annotation[] annotations;
private final ExprEvaluatorContext exprEvaluatorContext;
public StatementAgentInstancePostLoadSelect(Viewable[] streamViews, JoinSetComposerDesc joinSetComposer, NamedWindowTailViewInstance[] namedWindowTailViews, QueryGraph[] namedWindowPostloadFilters, List<ExprNode>[] namedWindowFilters, Annotation[] annotations, ExprEvaluatorContext exprEvaluatorContext) {
this.streamViews = streamViews;
this.joinSetComposer = joinSetComposer;
this.namedWindowTailViews = namedWindowTailViews;
this.namedWindowPostloadFilters = namedWindowPostloadFilters;
this.namedWindowFilters = namedWindowFilters;
this.annotations = annotations;
this.exprEvaluatorContext = exprEvaluatorContext;
}
public void executePostLoad() {
if (joinSetComposer == null || !joinSetComposer.getJoinSetComposer().allowsInit()) {
return;
}
eu.uk.ncl.pet5o.esper.client.EventBean[][] events = new eu.uk.ncl.pet5o.esper.client.EventBean[streamViews.length][];
for (int stream = 0; stream < streamViews.length; stream++) {
Viewable streamView = streamViews[stream];
if (streamView instanceof HistoricalEventViewable) {
continue;
}
Collection<EventBean> eventsInWindow;
if (namedWindowTailViews[stream] != null) {
NamedWindowTailViewInstance nwtail = namedWindowTailViews[stream];
Collection<EventBean> snapshot = nwtail.snapshotNoLock(namedWindowPostloadFilters[stream], annotations);
if (namedWindowFilters[stream] != null) {
eventsInWindow = new ArrayList<EventBean>(snapshot.size());
ExprNodeUtilityCore.applyFilterExpressionsIterable(snapshot, namedWindowFilters[stream], exprEvaluatorContext, eventsInWindow);
} else {
eventsInWindow = snapshot;
}
} else if (namedWindowFilters[stream] != null && !namedWindowFilters[stream].isEmpty()) {
eventsInWindow = new ArrayDeque<EventBean>();
ExprNodeUtilityCore.applyFilterExpressionsIterable(streamViews[stream], namedWindowFilters[stream], exprEvaluatorContext, eventsInWindow);
} else {
eventsInWindow = new ArrayDeque<EventBean>();
for (eu.uk.ncl.pet5o.esper.client.EventBean aConsumerView : streamViews[stream]) {
eventsInWindow.add(aConsumerView);
}
}
events[stream] = eventsInWindow.toArray(new eu.uk.ncl.pet5o.esper.client.EventBean[eventsInWindow.size()]);
}
joinSetComposer.getJoinSetComposer().init(events, exprEvaluatorContext);
}
public void acceptIndexVisitor(StatementAgentInstancePostLoadIndexVisitor visitor) {
// no action
}
}
| [
"P.Michalak1@newcastle.ac.uk"
] | P.Michalak1@newcastle.ac.uk |
397123a8e52e4e7266a90d636461f16ba0b26fba | 920b542441734dd116558a99d2dba20858030515 | /xiaoshixun2/xiao3_daima/rikaoday1_02_21/src/main/java/com/bw/rikaoday1_02_21/Headpic.java | 2b572020d6050f948a3f5c52b16d7e74dd923295 | [] | no_license | 2318279444/xiaoshixun1_1 | b06a2dfb49c82458f438b86b22f74385f9db7751 | 43f9c4c20a5cc62e4e6058c9714d1259a7b3ac09 | refs/heads/master | 2020-12-02T00:44:07.748727 | 2020-04-20T14:40:53 | 2020-04-20T14:40:53 | 230,830,720 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | package com.bw.rikaoday1_02_21;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import androidx.annotation.Nullable;
/*
*@auther:邓先超
*@Date: 2020/3/6
*@Time:16:35
*@Description:
**/
public class Headpic extends LinearLayout {
public Headpic(Context context) {
super(context);
}
public Headpic(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public Headpic(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
}
| [
"2318279444@qq.com"
] | 2318279444@qq.com |
5d48d4d3c442d32803c5f2f8b22db02b2c800056 | cfa9d3ed69bf73172c3b1d6a0f2cb6660c976b93 | /j2se/JavaSE(LGame-0.3.2 &LAE-1.1)/LGame-0.3.2(OpenGL)/src/other/stg/org/loon/framework/javase/game/stg/effect/EffectTwo.java | 3db273f2e55f93dcf88744c20d6b906fe6ced870 | [] | no_license | jackyglony/loon-simple | 7f3c6fd49a05de28daff0495a202d281a18706ce | cbf9c70e41ef5421bc1a5bb55939aa527aac675d | refs/heads/master | 2020-12-25T12:18:22.710566 | 2013-06-30T03:11:06 | 2013-06-30T03:11:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,769 | java | package org.loon.framework.javase.game.stg.effect;
import org.loon.framework.javase.game.core.graphics.opengl.GLEx;
import org.loon.framework.javase.game.core.graphics.opengl.LTexture;
/**
* Copyright 2008 - 2011
*
* 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.
*
* @project loonframework
* @author chenpeng
* @email:ceponline@yahoo.com.cn
* @version 0.1
*/
public class EffectTwo extends EffectOne {
private String message;
private int mesWidth;
private int mesHeight;
private LTexture[] shoutImg;
public static final int TYPE_STRING = 3;
public static final int TYPE_IMGS = 4;
public EffectTwo(String fileName) {
this(new LTexture(fileName));
}
public EffectTwo(final LTexture texture) {
this(new LTexture[] { texture });
}
public EffectTwo(LTexture[] image) {
this(image, 20);
}
public EffectTwo(LTexture[] image, int num) {
super(image, num);
this.message = "";
}
public void setString(String str, int width, int height) {
this.message = str;
this.mesWidth = width;
this.mesHeight = height;
}
public void setShoutImg(LTexture[] img) {
this.shoutImg = img;
}
protected void renderExpand(GLEx g, int type) {
if (type == TYPE_STRING) {
drawString(g);
} else if (type == TYPE_IMGS && shoutImg != null) {
drawImage(g);
}
}
private void drawString(GLEx g) {
int activeNum = getActiveNum();
arrayR[activeNum] = 20;
g.setColor(224, 255, 255);
for (int j = 0; j < number; j++) {
arrayR[j] += 8;
g.drawString(message, getShoutX(j) - mesWidth, getShoutY(j)
- mesHeight);
}
g.resetColor();
}
protected int getShoutX(int direct) {
return drawX + (int) ((double) arrayR[direct] * cosX[direct]);
}
protected int getShoutY(int direct) {
return drawY + (int) ((double) arrayR[direct] * sinX[direct]);
}
private void drawImage(GLEx g) {
int length = shoutImg.length;
if (length == 0) {
return;
}
int activeNum = getActiveNum();
arrayR[activeNum] = 20;
for (int j = 0; j < number; j++) {
arrayR[j] += 8;
for (int i = 0; i < 20; i++) {
g.drawTexture(shoutImg[arrayR[j] / 8 & length], getX(j, i),
getY(j, i));
}
}
}
}
| [
"loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff"
] | loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff |
9e392a8516912f028769a5ec4afa61c282fc2f24 | da8013fd299b2b5b2b75dba8e890cc9212e408af | /app/src/main/java/com/xxjr/xxjr/other/zhexiantu/BarData.java | dfe5490868ed66370706be731d5f4855438ec5f0 | [] | no_license | xnn1987/XXJR | 65085be7aca8fc347a35f1ca77f089c0b8ef90b9 | 52e006f216f9c7175e7b999bbb890800f794b93a | refs/heads/master | 2021-01-19T04:49:59.279675 | 2017-04-06T07:30:57 | 2017-04-06T07:30:57 | 87,399,813 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,718 | java | /**
* Copyright 2014 XCL-Charts
*
* 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.
*
* @Project XCL-Charts
* @Description Android图表基类库
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
* @license http://www.apache.org/licenses/ Apache v2 License
* @version 1.0
*/
package com.xxjr.xxjr.other.zhexiantu;
import android.graphics.Color;
import java.util.LinkedList;
import java.util.List;
/**
* @ClassName BarData
* @Description 数据类, 所有柱形图都用这个传数据
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
* * MODIFIED YYYY-MM-DD REASON
*/
public class BarData {
//线上每个点的值
private List<Double> mDataSet;
//用于为每个柱形定制颜色
private List<Integer> mDataColor;
//值
private String mKey;
//线上的颜色
private Integer mColor;
public BarData() {
// TODO Auto-generated constructor stub
}
/**
* 构成一条完整的数据集合
* @param key 键值
* @param color 颜色
* @param dataSeries 对应的数据集
*/
public BarData(String key, List<Double> dataSeries, Integer color)
{
setKey(key);
setColor(color);
setDataSet(dataSeries);
}
/**
* 构成一条完整的数据集合
* @param key 键值
* @param dataSeries 对应的数据集
*/
public BarData(String key, Double dataSeries)
{
setKey(key);
List<Double> valueList= new LinkedList<Double>();
valueList.add(dataSeries);
setDataSet(valueList);
setColor(Color.BLACK);
}
/**
* 可用于处理单独针对某些柱子指定颜色的情况,常见于标签单柱的情况
* @param key 键值
* @param dataSeries 对应的数据集
* @param dataColor 每个数据柱形所对应的显示颜色
* @param color 柱形颜色
*/
public BarData(String key, List<Double> dataSeries,
List<Integer> dataColor, Integer color)
{
setKey(key);
setColor(color);
setDataSet(dataSeries);
setDataColor(dataColor);
}
/**
* 设置每个数据柱形所对应的显示颜色
* @param dataColor 柱形颜色集
*/
public void setDataColor(List<Integer> dataColor)
{
if(null != mDataColor)mDataColor.clear();
mDataColor = dataColor;
}
/**
* 每个数据柱形所对应的显示颜色
* @return 柱形颜色集
*/
public List<Integer> getDataColor()
{
return mDataColor;
}
/**
* 设置数据源
* @param dataSeries 数据集合序列
*/
public void setDataSet(List<Double> dataSeries)
{
if(null != mDataSet)mDataSet.clear();
mDataSet = dataSeries;
}
/**
* 设置Key值
* @param value Key值
*/
public void setKey(String value)
{
mKey = value;
}
/**
* 设置颜色
* @param value 颜色
*/
public void setColor(Integer value)
{
mColor = value;
}
/**
* 返回数据集合序列
* @return 集合序列
*/
public List<Double> getDataSet() {
return mDataSet;
}
/**
* 返回Key值
* @return Key值
*/
public String getKey() {
return mKey;
}
/**
* 返回颜色
* @return 颜色
*/
public Integer getColor() {
return mColor;
}
}
| [
"xnn1987@163.com"
] | xnn1987@163.com |
9c0b19851337c1b59cb2f7025ee6bc752503cde6 | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/appbrand/jsapi/file/f$a.java | 1ccf9ad0222e8b8269361870b2cf3ac3ec21c028 | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | package com.tencent.mm.plugin.appbrand.jsapi.file;
import java.util.HashMap;
import java.util.Map;
public final class f$a {
public final String Yy;
public final Map<String, Object> values = new HashMap();
public f$a(String str, Object... objArr) {
this.Yy = String.format(str, objArr);
}
public final f$a t(String str, Object obj) {
this.values.put(str, obj);
return this;
}
public final f$a z(Map<String, Object> map) {
if (map != null) {
this.values.putAll(map);
}
return this;
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
603a33d9d06d2b549774953caa45afc49a7a5dae | 4fae46cd30e0e3c42562d61dc2efd3837df55b13 | /yesway-pay-center-gateway/src/main/java/com/alipay/api/domain/ShopInfo.java | 9027fb0db61a14d3f492bab0b28750ee14b3dc92 | [] | no_license | Pancratius/fzt-pay | 2b4937e185038909b6d6fde1a9b168a92ce91738 | 7414615604f9f29860e97c5c07dfd148e009257a | refs/heads/master | 2021-10-21T14:01:31.799564 | 2019-03-04T10:28:32 | 2019-03-04T10:28:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 店铺信息
*
* @author auto create
* @since 1.0, 2016-10-26 17:43:42
*/
public class ShopInfo extends AlipayObject {
private static final long serialVersionUID = 4576572894282845885L;
/**
* 企业门店名称
*/
@ApiField("shop_name")
private String shopName;
/**
* 店铺内景图片,如要签约当面付产品,需上传3张店铺内景图片
*/
@ApiListField("shop_scene_pic")
@ApiField("string")
private List<String> shopScenePic;
/**
* 店铺门头照图片
*/
@ApiField("shop_sign_board_pic")
private String shopSignBoardPic;
public String getShopName() {
return this.shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public List<String> getShopScenePic() {
return this.shopScenePic;
}
public void setShopScenePic(List<String> shopScenePic) {
this.shopScenePic = shopScenePic;
}
public String getShopSignBoardPic() {
return this.shopSignBoardPic;
}
public void setShopSignBoardPic(String shopSignBoardPic) {
this.shopSignBoardPic = shopSignBoardPic;
}
}
| [
"fengzt@sqbj.com"
] | fengzt@sqbj.com |
461efb73b17bc519f1ba5a7f3422f9df30789244 | 00a5e743c797b6cf68ef65208e2a4ea2e6190e5d | /src/test/java/io/zbus/examples/mq/consumer/ConsumerAckExample.java | 7b9197eb40ebdeadfd742201d131f1e7be10cd19 | [
"MIT"
] | permissive | legendzhouqiang/zbus | c7d5b33193cee068e94a60cfc30b64576516a5f8 | 52706c0b746e28db68ac74eeeff75b5a6f498dd0 | refs/heads/master | 2020-03-19T06:47:37.733418 | 2018-01-19T04:24:09 | 2018-01-19T04:24:09 | 136,055,676 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,268 | java | package io.zbus.examples.mq.consumer;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import io.zbus.mq.Broker;
import io.zbus.mq.ConsumeGroup;
import io.zbus.mq.Consumer;
import io.zbus.mq.ConsumerConfig;
import io.zbus.mq.Message;
import io.zbus.mq.MessageHandler;
import io.zbus.mq.MqClient;
public class ConsumerAckExample {
@SuppressWarnings("resource")
public static void main(String[] args) throws Exception {
Broker broker = new Broker("localhost:15555");
ConsumerConfig config = new ConsumerConfig(broker);
config.setTopic("MyTopic");
config.setConsumeTimeout(10, TimeUnit.SECONDS);
ConsumeGroup group = new ConsumeGroup(); //ConsumeGroup default to same as topic
group.setAck(true); //Enable ACK. Disabled by default
group.setAckWindow(10);
//group.setAckTimeout(10, TimeUnit.SECONDS); //If not set, same as ConsumeTimeout
config.setConsumeGroup(group);
config.setMessageHandler(new MessageHandler() {
@Override
public void handle(Message msg, MqClient client) throws IOException {
System.out.println(msg);
client.ack(msg); //If no ack, message will be consumed again after timeout
}
});
Consumer consumer = new Consumer(config);
consumer.start();
}
}
| [
"44194462@qq.com"
] | 44194462@qq.com |
abd30cf33464d2ea4f7d4dbdeb2a3c0b44114e9b | a43d4202628ecb52e806d09f0f3dc1f5bab3ef4f | /src/main/java/pnc/mesadmin/dto/GetWoTypeInfo/GetWoTypeInfoRes.java | 1fc095248427bf96ca698055895956b274c35837 | [] | no_license | pnc-mes/base | b88583929e53670340a704f848e4e9e2027f1334 | 162135b8752b4edc397b218ffd26664929f6920d | refs/heads/main | 2023-01-07T22:06:10.794300 | 2020-10-27T07:47:20 | 2020-10-27T07:47:20 | 307,621,190 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 941 | java | package pnc.mesadmin.dto.GetWoTypeInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
/**
* 公司名称:驭航信息技术(上海)有限公司
* 系统名称:PNC-MES管理系统
* 子系统名称:获取工单列表返回的Res
* 创建人:ZC
* 创建时间:2017-06-08
* 修改人:
* 修改时间:
*/
public class GetWoTypeInfoRes implements Serializable{
@JsonProperty("Status")
private String Status;
@JsonProperty("Body")
private GetWoTypeInfoResB Body;
@JsonIgnore
public String getStatus() {
return Status;
}
@JsonIgnore
public void setStatus(String status) {
Status = status;
}
@JsonIgnore
public GetWoTypeInfoResB getBody() {
return Body;
}
@JsonIgnore
public void setBody(GetWoTypeInfoResB body) {
Body = body;
}
}
| [
"95887577@qq.com"
] | 95887577@qq.com |
527958a02484e986ed5d5ff7809563a7fb47683a | f0c110a5d801955aae6e69dc23786b206a5267a5 | /src/scratch/kevin/simulators/ruptures/MPJ_BBP_CatalogSimScriptGen.java | 37c90ffa31440ad512134f2596287c3a0268a8f7 | [
"Apache-2.0"
] | permissive | seiszhang/opensha-dev | 8ace79e62f1dbeba0ff822ff1197c1e559718fda | 0c7ab594f59c4a81e1819673ef473123c726eb97 | refs/heads/master | 2021-05-09T07:50:10.735660 | 2018-01-23T22:30:05 | 2018-01-23T22:30:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,929 | java | package scratch.kevin.simulators.ruptures;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.opensha.commons.hpc.mpj.MPJExpressShellScriptWriter;
import org.opensha.commons.hpc.pbs.BatchScriptWriter;
import org.opensha.commons.hpc.pbs.USC_HPCC_ScriptWriter;
import org.opensha.sha.simulators.srf.RSQSimSRFGenerator.SRFInterpolationMode;
import com.google.common.base.Preconditions;
import com.google.common.io.Files;
import scratch.kevin.bbp.BBP_Module.Method;
import scratch.kevin.bbp.BBP_Module.VelocityModel;
import scratch.kevin.bbp.BBP_Site;
class MPJ_BBP_CatalogSimScriptGen {
public static void main(String[] args) throws IOException {
// REMOTE paths
@SuppressWarnings("unused")
File myHPCDir = new File("/auto/scec-02/kmilner/simulators/catalogs/");
File jacquiCSDir = new File("/home/scec-00/gilchrij/RSQSim/CISM/cybershake/");
// File catalogDir = new File(jacquiCSDir, "UCERF3_millionElement");
// File catalogDir = new File(jacquiCSDir, "rundir2194_long");
// File catalogDir = new File("/home/scec-00/gilchrij/RSQSim/CISM/cybershake/rundir2194_long");
// File catalogDir = new File(myHPCDir, "rundir2342");
// File catalogDir = new File(jacquiCSDir, "rundir2194_K2");
// File catalogDir = new File(jacquiCSDir, "modLoad_testB");
File catalogDir = new File(jacquiCSDir, "tunedBase1m_ddotEQmod");
double minMag = 6;
// double minMag = 7;
int numRG = 0;
// double minMag = 7;
// int numRG = 20;
int skipYears = 5000;
int threads = 20;
int nodes = 36;
String queue = "scec";
int mins = 24*60;
int heapSizeMB = 60*1024;
String bbpDataDir = "${TMPDIR}";
File localDir = new File("/home/kevin/bbp/parallel");
File remoteDir = new File("/auto/scec-02/kmilner/bbp/parallel");
String jobName = new SimpleDateFormat("yyyy_MM_dd").format(new Date());
jobName += "-"+catalogDir.getName()+"-all-m"+(float)minMag+"-skipYears"+skipYears;
if (!RSQSimBBP_Config.DO_HF)
jobName += "-noHF";
if (numRG > 0)
jobName += "-rg"+numRG;
File localJobDir = new File(localDir, jobName);
System.out.println(localJobDir.getAbsolutePath());
Preconditions.checkState(localJobDir.exists() || localJobDir.mkdir());
File remoteJobDir = new File(remoteDir, jobName);
// copy sites file
List<BBP_Site> sites = RSQSimBBP_Config.getStandardSites();
File sitesFile = new File(localJobDir, "sites.stl");
BBP_Site.writeToFile(sitesFile, sites);
File remoteSitesFile = new File(remoteJobDir, sitesFile.getName());
String argz = "--min-dispatch "+threads+" --max-dispatch 500 --threads "+threads;
argz += " --vm "+RSQSimBBP_Config.VM.name()+" --method "+RSQSimBBP_Config.METHOD.name();
argz += " --sites-file "+remoteSitesFile.getAbsolutePath();
argz += " --catalog-dir "+catalogDir.getAbsolutePath();
argz += " --output-dir "+remoteJobDir.getAbsolutePath();
argz += " --time-step "+(float)RSQSimBBP_Config.SRF_DT+" --srf-interp "+RSQSimBBP_Config.SRF_INTERP_MODE.name();
argz += " --min-mag "+(float)minMag+" --skip-years "+skipYears;
if (!RSQSimBBP_Config.DO_HF)
argz += " --no-hf";
if (bbpDataDir != null && !bbpDataDir.isEmpty())
argz += " --bbp-data-dir "+bbpDataDir;
if (numRG > 0)
argz += " --rup-gen-sims "+numRG;
List<File> classpath = new ArrayList<>();
classpath.add(new File(remoteDir, "opensha-dev-all.jar"));
BatchScriptWriter pbsWrite = new USC_HPCC_ScriptWriter();
MPJExpressShellScriptWriter mpjWrite = new MPJExpressShellScriptWriter(
USC_HPCC_ScriptWriter.JAVA_BIN, heapSizeMB, classpath, USC_HPCC_ScriptWriter.MPJ_HOME);
List<String> script = mpjWrite.buildScript(MPJ_BBP_CatalogSim.class.getName(), argz);
script = pbsWrite.buildScript(script, mins, nodes, threads, queue);
pbsWrite.writeScript(new File(localJobDir, "cat_bbp_parallel.pbs"), script);
}
}
| [
"kmilner@usc.edu"
] | kmilner@usc.edu |
c71937d6e4dc244aef7080c885ffd3a21f7944eb | c3d8c6f45f1e5a1f6685d117f9d22ca4862773d8 | /dbs/dbs-demo/micro-user-service/src/main/java/com/vcg/micro/user/support/dubbo/service/DubboServiceExport.java | 2988f0f52eec41411149f7764b01fa7fc45bc53f | [] | no_license | ihanfeng/BusPlat | 69cb18c01e1fbad81377569ea6f4395037e312fb | 83c950149d80aa24f33993295e7a039b481af1b7 | refs/heads/master | 2021-01-13T03:14:52.012643 | 2016-12-27T15:28:25 | 2016-12-27T15:28:25 | 77,612,272 | 1 | 1 | null | 2016-12-29T12:57:23 | 2016-12-29T12:57:22 | null | UTF-8 | Java | false | false | 1,691 | java | package com.vcg.micro.user.support.dubbo.service;
import com.alibaba.dubbo.config.ServiceConfig;
import com.alibaba.dubbo.config.spring.AnnotationBean;
import com.alibaba.dubbo.config.spring.ServiceBean;
import com.vcg.micro.user.service.UserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Field;
import java.util.Set;
/**
* Created by wuyu on 2016/7/5.
* <p/>
* 导出服务
*/
@Configuration
@Component
public class DubboServiceExport {
private AnnotationBean annotationBean;
@Bean
public ServiceBean<UserService> userServiceBean(UserService userService) {
return export(userService, UserService.class);
}
@Bean
public AnnotationBean annotationBean() {
annotationBean = new AnnotationBean();
return annotationBean;
}
public <T> ServiceBean<T> export(T t, Class<T> iFace) {
ServiceBean<T> serviceBean = new ServiceBean<>();
serviceBean.setRef(t);
serviceBean.setInterface(iFace);
registerServiceBean(serviceBean);
return serviceBean;
}
public <T> void registerServiceBean(ServiceBean<T> t) {
if (annotationBean != null) {
Field serviceConfigField = ReflectionUtils.findField(AnnotationBean.class, "serviceConfigs");
serviceConfigField.setAccessible(true);
Set<ServiceConfig<?>> serviceConfig = (Set<ServiceConfig<?>>) ReflectionUtils.getField(serviceConfigField, annotationBean);
serviceConfig.add(t);
}
}
}
| [
"huiwq1990@163.com"
] | huiwq1990@163.com |
a790af6e4672db49e50bf42f53add0dfc6abffb4 | aed0236a359c0a603566cf56ba7dca975eba2311 | /dop/group-01/release-3/fixed-date-static-category/src/reminder/fixeddatestaticcategory/util/Mask.java | e04e387ddc96edd03c50a5bb07502930077894f6 | [] | no_license | Reminder-App/reminder-tests | e1fde7bbd262e1e6161b979a2a69f9af62cc06d7 | 8497ac2317f174eb229fb85ae66f1086ce0e0e4d | refs/heads/master | 2020-03-21T05:43:08.928315 | 2018-07-01T20:16:09 | 2018-07-01T20:16:09 | 138,175,840 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,324 | java | package reminder.fixeddatestaticcategory.util;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
/*** added by dManageReminder
*/
public abstract class Mask {
public static String unmask(String str) {
return str.replaceAll("[:]", "").replaceAll("[.]", "").replaceAll("[-]",
"").replaceAll("[/]", "").replaceAll("[(]", "").replaceAll("[)]", "");
}
public static TextWatcher insert(final String mask, final EditText ediTxt) {
return new TextWatcher() {
boolean isUpdating;
String old = "";
public void onTextChanged(CharSequence s, int start, int before, int count)
{
String str = Mask.unmask(s.toString());
String txt = "";
if(isUpdating) {
old = str;
isUpdating = false;
return;
}
int i = 0;
boolean done = false;
for(char m : mask.toCharArray()) {
if(! done && m != '#' && str.length() > old.length()) {
txt += m;
}
else if(! done && i < str.length()) {
txt += str.charAt(i);
i ++;
}
else {
done = true;
}
}
isUpdating = true;
ediTxt.setText(txt);
ediTxt.setSelection(txt.length());
}
public void beforeTextChanged(CharSequence s, int start, int count, int
after) {
}
public void afterTextChanged(Editable s) {
}
};
}
} | [
"leomarcamargodesouza@gmail.com"
] | leomarcamargodesouza@gmail.com |
3990c598bfa665205beaaeadb006ffa90eea6826 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/protocal/c/oz.java | 30d8ec4942966c50b27a18da23137161a8883e09 | [] | no_license | jianghan200/wxsrc6.6.7 | d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849 | eb6c56587cfca596f8c7095b0854cbbc78254178 | refs/heads/master | 2020-03-19T23:40:49.532494 | 2018-06-12T06:00:50 | 2018-06-12T06:00:50 | 137,015,278 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,159 | java | package com.tencent.mm.protocal.c;
import f.a.a.b;
import java.util.LinkedList;
public final class oz
extends bhp
{
public LinkedList<baw> rtg = new LinkedList();
protected final int a(int paramInt, Object... paramVarArgs)
{
if (paramInt == 0)
{
paramVarArgs = (f.a.a.c.a)paramVarArgs[0];
if (this.six == null) {
throw new b("Not all required fields were included: BaseResponse");
}
if (this.six != null)
{
paramVarArgs.fV(1, this.six.boi());
this.six.a(paramVarArgs);
}
paramVarArgs.d(2, 8, this.rtg);
return 0;
}
if (paramInt == 1) {
if (this.six == null) {
break label438;
}
}
label438:
for (paramInt = f.a.a.a.fS(1, this.six.boi()) + 0;; paramInt = 0)
{
return paramInt + f.a.a.a.c(2, 8, this.rtg);
if (paramInt == 2)
{
paramVarArgs = (byte[])paramVarArgs[0];
this.rtg.clear();
paramVarArgs = new f.a.a.a.a(paramVarArgs, unknownTagHandler);
for (paramInt = bhp.a(paramVarArgs); paramInt > 0; paramInt = bhp.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cJS();
}
}
if (this.six != null) {
break;
}
throw new b("Not all required fields were included: BaseResponse");
}
if (paramInt == 3)
{
Object localObject1 = (f.a.a.a.a)paramVarArgs[0];
oz localoz = (oz)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
Object localObject2;
boolean bool;
switch (paramInt)
{
default:
return -1;
case 1:
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new fl();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((fl)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhp.a((f.a.a.a.a)localObject2))) {}
localoz.six = ((fl)localObject1);
paramInt += 1;
}
}
paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt);
int i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new baw();
localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((baw)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, bhp.a((f.a.a.a.a)localObject2))) {}
localoz.rtg.add(localObject1);
paramInt += 1;
}
break;
}
return -1;
}
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/protocal/c/oz.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"526687570@qq.com"
] | 526687570@qq.com |
fa283f0278c134a02412b8ded868da2ac615c40d | 4babdcabcce7ead338a174a7ac7eaed3b3d0bb42 | /src/com/xjtu/algorithm/FloydProblem.java | 310544d9388737d8fb79beebf7d7ce2d14dd4775 | [] | no_license | guaguahuahua/Practice_workPC | b95643e3167114c15004624ea96615ab07b411c9 | a9ddac711fe1d1290a6d92813a78ab5fc7c1bd59 | refs/heads/master | 2021-09-14T06:49:56.310284 | 2018-05-09T02:44:42 | 2018-05-09T02:44:42 | 116,376,569 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,636 | java | package com.xjtu.algorithm;
public class FloydProblem {
public static final int inf=999999;
/**
* floyd算法实现
* 通过添加中间节点来减少任意两个节点之间的距离
* @param e
*/
public static void floydProblem(int [][]e) {
//首先实现添加一个中间节点a来减少距离值,中间节点一单添加成功便会更新整体的路径长度值、
//也就是不断遍历的过程中,不断添加中间节点的过程,
for(int k=0; k<e.length; k++) {
for(int i=0; i<e.length; i++) {
for(int j=0; j<e[i].length; j++) {
if(e[i][j]>e[i][k]+e[k][j]) {
e[i][j]=e[i][k]+e[k][j];
}
}
}
}
show(e);
}
public static void show(int [][]nums) {
for(int row=0; row<nums.length; row++) {
for(int col=0; col<nums.length; col++) {
System.out.print(nums[row][col]+"\t");
}
System.out.println();
}
}
/**
* 代码的识记过程
* @param e
*/
public static void floydProblem_2(int [][]e) {
//首先实现插入1号节点的效果
for(int k=0; k<e.length; k++) {
for(int i=0; i<e.length; i++) {
for(int j=0; j<e.length; j++) {
//这块一定得注意下标是从哪开始的,一般的都是从顶点1开始,但是我们这里是从顶点0开始的
if(e[i][j]>e[i][k]+e[k][j]) {
e[i][j]=e[i][k]+e[k][j];
}
}
}
}
show(e);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int[][] e = {
{ 0, 2, 6, 4 },
{ inf, 0, 3, inf },
{ 7, inf, 0, 1 },
{ 5, inf, 12, 0 }
};
floydProblem_2(e);
}
}
| [
"dante.zyd@gmail.com"
] | dante.zyd@gmail.com |
855570637f4d53dbef06d7e6c1b7da11791d1580 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/com/hazelcast/cache/CacheClearTest.java | 3e10ec5a75293c79b60992041c4402e0077e21c1 | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 6,990 | java | /**
* Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.cache;
import ICacheService.SERVICE_NAME;
import com.hazelcast.cache.impl.CacheEventListener;
import com.hazelcast.cache.impl.ICacheRecordStore;
import com.hazelcast.cache.impl.ICacheService;
import com.hazelcast.config.CacheConfig;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.instance.Node;
import com.hazelcast.internal.nearcache.impl.invalidation.Invalidation;
import com.hazelcast.internal.partition.InternalPartitionService;
import com.hazelcast.nio.serialization.Data;
import com.hazelcast.spi.serialization.SerializationService;
import com.hazelcast.test.AssertTask;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.HazelcastTestSupport;
import com.hazelcast.test.TestHazelcastInstanceFactory;
import com.hazelcast.test.annotation.ParallelTest;
import com.hazelcast.test.annotation.QuickTest;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Assert;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
@RunWith(HazelcastParallelClassRunner.class)
@Category({ QuickTest.class, ParallelTest.class })
public class CacheClearTest extends CacheTestSupport {
private static final int INSTANCE_COUNT = 2;
private TestHazelcastInstanceFactory factory = getInstanceFactory(CacheClearTest.INSTANCE_COUNT);
private HazelcastInstance[] hazelcastInstances;
private HazelcastInstance hazelcastInstance;
@Test
public void testClear() {
ICache<String, String> cache = createCache();
String cacheName = cache.getName();
Map<String, String> entries = createAndFillEntries();
for (Map.Entry<String, String> entry : entries.entrySet()) {
cache.put(entry.getKey(), entry.getValue());
}
// Verify that put works
for (Map.Entry<String, String> entry : entries.entrySet()) {
String key = entry.getKey();
String expectedValue = entries.get(key);
String actualValue = cache.get(key);
Assert.assertEquals(expectedValue, actualValue);
}
Node node = HazelcastTestSupport.getNode(hazelcastInstance);
InternalPartitionService partitionService = node.getPartitionService();
SerializationService serializationService = node.getSerializationService();
// Verify that backup of put works
for (Map.Entry<String, String> entry : entries.entrySet()) {
String key = entry.getKey();
String expectedValue = entries.get(key);
Data keyData = serializationService.toData(key);
int keyPartitionId = partitionService.getPartitionId(keyData);
for (int i = 0; i < (CacheClearTest.INSTANCE_COUNT); i++) {
Node n = HazelcastTestSupport.getNode(hazelcastInstances[i]);
ICacheService cacheService = n.getNodeEngine().getService(SERVICE_NAME);
ICacheRecordStore recordStore = cacheService.getRecordStore(("/hz/" + cacheName), keyPartitionId);
Assert.assertNotNull(recordStore);
String actualValue = serializationService.toObject(recordStore.get(keyData, null));
Assert.assertEquals(expectedValue, actualValue);
}
}
cache.clear();
// Verify that clear works
for (Map.Entry<String, String> entry : entries.entrySet()) {
String key = entry.getKey();
String actualValue = cache.get(key);
Assert.assertNull(actualValue);
}
// Verify that backup of clear works
for (Map.Entry<String, String> entry : entries.entrySet()) {
String key = entry.getKey();
Data keyData = serializationService.toData(key);
int keyPartitionId = partitionService.getPartitionId(keyData);
for (int i = 0; i < (CacheClearTest.INSTANCE_COUNT); i++) {
Node n = HazelcastTestSupport.getNode(hazelcastInstances[i]);
ICacheService cacheService = n.getNodeEngine().getService(SERVICE_NAME);
ICacheRecordStore recordStore = cacheService.getRecordStore(("/hz/" + cacheName), keyPartitionId);
Assert.assertNotNull(recordStore);
String actualValue = serializationService.toObject(recordStore.get(keyData, null));
Assert.assertNull(actualValue);
}
}
}
@Test
public void testInvalidationListenerCallCount() {
final ICache<String, String> cache = createCache();
Map<String, String> entries = createAndFillEntries();
for (Map.Entry<String, String> entry : entries.entrySet()) {
cache.put(entry.getKey(), entry.getValue());
}
// Verify that put works
for (Map.Entry<String, String> entry : entries.entrySet()) {
String key = entry.getKey();
String expectedValue = entries.get(key);
String actualValue = cache.get(key);
Assert.assertEquals(expectedValue, actualValue);
}
final AtomicInteger counter = new AtomicInteger(0);
final CacheConfig config = cache.getConfiguration(CacheConfig.class);
registerInvalidationListener(new CacheEventListener() {
@Override
public void handleEvent(Object eventObject) {
if (eventObject instanceof Invalidation) {
Invalidation event = ((Invalidation) (eventObject));
if ((null == (event.getKey())) && (config.getNameWithPrefix().equals(event.getName()))) {
counter.incrementAndGet();
}
}
}
}, config.getNameWithPrefix());
cache.clear();
// Make sure that one event is received
HazelcastTestSupport.assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
Assert.assertEquals(1, counter.get());
}
}, 5);
// Make sure that the callback is not called for a while
HazelcastTestSupport.assertTrueAllTheTime(new AssertTask() {
@Override
public void run() throws Exception {
Assert.assertTrue(((counter.get()) <= 1));
}
}, 3);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
bc08fcdad121dc4910ebccfba632cb5960e73129 | db2ca48fffaf6689c9db439abaf9d98729548e0b | /minsu-service/minsu-service-house/minsu-service-house-provider/src/main/java/com/ziroom/minsu/services/house/dao/HousePriceWeekConfDao.java | dcbb2a139a8c605a5a978c212061cdff1749017d | [] | no_license | majinwen/sojourn | 46a950dbd64442e4ef333c512eb956be9faef50d | ab98247790b1951017fc7dd340e1941d5b76dc39 | refs/heads/master | 2020-03-22T07:07:05.299160 | 2018-03-18T13:45:23 | 2018-03-18T13:45:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,481 | java | package com.ziroom.minsu.services.house.dao;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import com.asura.framework.base.util.Check;
import com.asura.framework.base.util.UUIDGenerator;
import com.asura.framework.dao.mybatis.base.MybatisDaoContext;
import com.ziroom.minsu.entity.house.HousePriceWeekConfEntity;
import com.ziroom.minsu.services.house.dto.LeaseCalendarDto;
import com.ziroom.minsu.valenum.common.YesOrNoEnum;
/**
*
* <p>房源星期价格配置dao</p>
*
* <PRE>
* <BR> 修改记录
* <BR>-----------------------------------------------
* <BR> 修改日期 修改人 修改内容
* </PRE>
*
* @author zl
* @since 1.0
* @version 1.0
*/
@Repository("house.housePriceWeekConfDao")
public class HousePriceWeekConfDao {
private String SQLID="house.housePriceWeekConfDao.";
@Autowired
@Qualifier("house.MybatisDaoContext")
private MybatisDaoContext mybatisDaoContext;
/**
* 按照星期设置特殊价格
*
* @author zl
* @created 2016年9月9日
*
* @param createUid
* @param houseBaseFid
* @param roomFid
* @param weeks
* @param price
* @return
*/
public int saveHousePriceWeekConf(String createUid, String houseBaseFid, String roomFid, List<Integer> weeks, int price,Integer isValid) {
int num = 0;
if (Check.NuNStr(createUid) || (Check.NuNStr(houseBaseFid) && Check.NuNStr(roomFid)) || price <= 0 || Check.NuNCollection(weeks)
|| weeks.size() == 0) {
return 0;
}
HousePriceWeekConfEntity housePricedto = new HousePriceWeekConfEntity();
if(!Check.NuNStr(houseBaseFid)){
housePricedto.setHouseBaseFid(houseBaseFid);
}
if(!Check.NuNStr(roomFid)){
housePricedto.setRoomFid(roomFid);
}
delHousePriceWeekConfByHouseFid(housePricedto);//删除以前的设置
for (int wk : weeks) {
HousePriceWeekConfEntity housePricedConf = new HousePriceWeekConfEntity();
housePricedConf.setCreateDate(new Date());
housePricedConf.setCreateUid(createUid);
housePricedConf.setFid(UUIDGenerator.hexUUID());
housePricedConf.setHouseBaseFid(houseBaseFid);
housePricedConf.setLastModifyDate(new Date());
housePricedConf.setPriceVal(price);
housePricedConf.setRoomFid(roomFid);
housePricedConf.setSetWeek(wk);
housePricedConf.setIsValid(YesOrNoEnum.YES.getCode());
if(!Check.NuNObj(isValid)){
housePricedConf.setIsValid(isValid);
}
num += mybatisDaoContext.save(SQLID + "insertHousePriceWeekConf", housePricedConf);
}
return num;
}
/**
* 查询某天是否按照星期配置了特殊价格,并返回
*
* @author zl
* @created 2016年9月9日
*
* @param houseBaseFid
* @param roomFid
* @param day
* @return
*/
public HousePriceWeekConfEntity findHousePriceWeekConfByDate(String houseBaseFid,String roomFid,Date day){
if( (Check.NuNStr(houseBaseFid)&&Check.NuNStr(roomFid)) || Check.NuNObj(day)){
return null;
}
LeaseCalendarDto housePricedto = new LeaseCalendarDto();
if(!Check.NuNStr(houseBaseFid)){
housePricedto.setHouseBaseFid(houseBaseFid);
}
if(!Check.NuNStr(roomFid)){
housePricedto.setHouseRoomFid(roomFid);
}
housePricedto.setNowDate(day);
return mybatisDaoContext.findOne(SQLID+"findHousePriceWeekConfByDateHouseFid", HousePriceWeekConfEntity.class, housePricedto);
}
/**
* 按照房源或者房间查询星期价格配置列表
*
* @author zl
* @created 2016年9月9日
*
* @param houseBaseFid
* @param roomFid
* @return
*/
public List<HousePriceWeekConfEntity> findSpecialPriceList(String houseBaseFid, String roomFid,Integer isValid) {
if ((Check.NuNStrStrict(houseBaseFid) && Check.NuNStrStrict(roomFid))) {
return null;
}
LeaseCalendarDto housePricedto = new LeaseCalendarDto();
if (!Check.NuNStrStrict(houseBaseFid)) {
housePricedto.setHouseBaseFid(houseBaseFid);
}
if (!Check.NuNStrStrict(roomFid)) {
housePricedto.setHouseRoomFid(roomFid);
}
if(!Check.NuNObj(isValid)){
housePricedto.setIsValid(isValid);
}
return mybatisDaoContext.findAll(SQLID+"findHousePriceWeekConfListByHouseFid", HousePriceWeekConfEntity.class, housePricedto);
}
/**
* 按照fid删除特殊价格
*
* @author zl
* @created 2016年9月9日
*
* @param housePriceWeekConf
* @return
*/
public int delHousePriceWeekConfByFid(HousePriceWeekConfEntity housePriceWeekConf) {
if( Check.NuNStr(housePriceWeekConf.getFid())){
return 0;
}
return mybatisDaoContext.update(SQLID+"delHousePriceWeekConfByFid", housePriceWeekConf);
}
/**
* 按照房源或者房间fid删除特殊价格
*
* @author zl
* @created 2016年9月9日
*
* @param housePriceWeekConf
* @return
*/
public int delHousePriceWeekConfByHouseFid(HousePriceWeekConfEntity housePriceWeekConf) {
if (Check.NuNStr(housePriceWeekConf.getHouseBaseFid()) && Check.NuNStr(housePriceWeekConf.getRoomFid())) {
return 0;
}
return mybatisDaoContext.update(SQLID+"delHousePriceWeekConfByHouseFid", housePriceWeekConf);
}
/**
*
* 更新房源周末价格信息
* 仅限于priceVal isDel isValid字段
*
* @author liujun
* @created 2016年12月7日
*
* @param housePriceWeekConf
* @return
*/
public int updateHousePriceWeekConfByFid(HousePriceWeekConfEntity housePriceWeekConf) {
if (Check.NuNStr(housePriceWeekConf.getFid())) {
return 0;
}
return mybatisDaoContext.update(SQLID+"updateHousePriceWeekConfByFid", housePriceWeekConf);
}
/**
*
* 合租转整租删除合租周末价格配置
*
* @author bushujie
* @created 2017年7月21日 上午11:24:46
*
* @param houseBaseFid
*/
public void delRoomPriceWeekByHouseBaseFid(String houseBaseFid){
Map<String, Object> paramMap=new HashMap<String, Object>();
paramMap.put("houseBaseFid", houseBaseFid);
mybatisDaoContext.delete(SQLID+"delRoomPriceWeekByHouseBaseFid", paramMap);
}
} | [
"068411Lsp"
] | 068411Lsp |
7c2ce4c13acc3e8e2766162aa2c9c1d86971a887 | ec4d98a48525933e4385daa3baef48b4e35d0cf8 | /jing/src/main/java/com/thaiopensource/validate/nrl/NrlSchemaReceiverFactory.java | 091e2db80fe2e9b7e1e61b80fde38949e0b7493b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | dashorst/wicket-stuff-markup-validator | a7118d7e1e94fb7ccd7d79b2e5a990bc5ec00a47 | 693c8a5bc9b1ed4e577e0e6900a18ac22f69e937 | refs/heads/master | 2023-09-05T09:02:13.505696 | 2020-09-15T14:51:40 | 2020-09-15T14:51:40 | 131,122 | 9 | 7 | Apache-2.0 | 2022-07-07T23:09:15 | 2009-02-17T21:38:21 | Java | UTF-8 | Java | false | false | 598 | java | package com.thaiopensource.validate.nrl;
import com.thaiopensource.util.PropertyMap;
import com.thaiopensource.validate.auto.SchemaReceiver;
import com.thaiopensource.validate.auto.SchemaReceiverFactory;
import com.thaiopensource.validate.Option;
public class NrlSchemaReceiverFactory implements SchemaReceiverFactory {
public SchemaReceiver createSchemaReceiver(String namespaceUri, PropertyMap properties) {
if (!SchemaImpl.NRL_URI.equals(namespaceUri))
return null;
return new SchemaReceiverImpl(properties);
}
public Option getOption(String uri) {
return null;
}
}
| [
"martijn.dashorst@gmail.com"
] | martijn.dashorst@gmail.com |
96b8359f1c0b89bd21ff0527775b9544510b888f | fe06f97c2cf33a8b4acb7cb324b79a6cb6bb9dac | /java/po/impl/PTWCS/Bin$2r/tiedgavdgu6wfrji+gg==$0Po.java | a27325eb584977c6ef56c149db1ab4da4bc38548 | [] | no_license | HeimlichLin/TableSchema | 3f67dae0b5b169ee3a1b34837ea9a2d34265f175 | 64b66a2968c3a169b75d70d9e5cf75fa3bb65354 | refs/heads/master | 2023-02-11T09:42:47.210289 | 2023-02-01T02:58:44 | 2023-02-01T02:58:44 | 196,526,843 | 0 | 0 | null | 2022-06-29T18:53:55 | 2019-07-12T07:03:58 | Java | UTF-8 | Java | false | false | 331 | java | package com.doc.common.po.impl;
public class Bin$2r/tiedgavdgu6wfrji+gg==$0Po implements IBin$2r/tiedgavdgu6wfrji+gg==$0Po {
public enum COLUMNS {
;
private final String comment;
private COLUMNS(final String comment) {
this.comment = comment;
}
public String getComment() {
return this.comment;
}
}
}
| [
"jerry.l@acer.com"
] | jerry.l@acer.com |
4ac0a3937a81468cf86cbd701fc0fda023a561a0 | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.companion.server-CompanionServer/sources/com/facebook/systrace/TraceDirect.java | eac1da1af6fca0d3ace24ee43c49c5de234260bf | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 3,458 | java | package com.facebook.systrace;
import android.annotation.SuppressLint;
import android.util.Log;
import com.facebook.androidinternals.android.os.SystemPropertiesInternal;
import com.facebook.common.util.TriState;
import com.facebook.soloader.nativeloader.NativeLoader;
/* access modifiers changed from: package-private */
@SuppressLint({"BadMethodUse-android.util.Log.v", "BadMethodUse-android.util.Log.d", "BadMethodUse-android.util.Log.i", "BadMethodUse-android.util.Log.w", "BadMethodUse-android.util.Log.e", "MissingNativeLoadLibrary", "MissingSoLoaderLibrary"})
public class TraceDirect {
private static final String TAG = "TraceDirect";
private static final boolean sForceJavaImpl = "true".equals(SystemPropertiesInternal.get("debug.fbsystrace.force_java"));
private static volatile TriState sNativeAvailable = TriState.UNSET;
private static volatile int sPrevSoLoaderSourcesVersion = -1;
private static final boolean sTraceLoad = "true".equals(SystemPropertiesInternal.get("debug.fbsystrace.trace_load"));
private static native void nativeBeginSection(String str);
private static native void nativeEndSection();
private static native void nativeSetEnabledTags(long j);
private static native void nativeTraceMetadata(String str, String str2, int i);
TraceDirect() {
}
@SuppressLint({"LogMethodNoExceptionInCatch", "StringFormatUse", "ThrowException"})
private static boolean checkNative() {
if (sNativeAvailable == TriState.UNSET) {
if (sForceJavaImpl) {
Log.i(TAG, "Forcing java implementation.");
sNativeAvailable = TriState.NO;
} else {
int soSourcesVersion = NativeLoader.isInitialized() ? NativeLoader.getSoSourcesVersion() : -1;
if (soSourcesVersion != sPrevSoLoaderSourcesVersion) {
sPrevSoLoaderSourcesVersion = soSourcesVersion;
Log.d(TAG, String.format("Attempting to load fbsystrace.so [%d|%d].", Integer.valueOf(sPrevSoLoaderSourcesVersion), Integer.valueOf(soSourcesVersion)), sTraceLoad ? new Exception() : null);
try {
NativeLoader.loadLibrary("fbsystrace");
sNativeAvailable = TriState.YES;
nativeSetEnabledTags(TraceConfig.computeTraceTags());
Log.i(TAG, "fbsystrace.so loaded.");
} catch (UnsatisfiedLinkError unused) {
Log.w(TAG, "fbsystrace.so could not be loaded - switching to Java implementation.");
}
}
}
}
return sNativeAvailable == TriState.YES;
}
public static void beginSection(String str) {
if (checkNative()) {
nativeBeginSection(str);
} else {
TraceDirectJavaImpl.beginSection(str);
}
}
public static void endSection() {
if (checkNative()) {
nativeEndSection();
} else {
TraceDirectJavaImpl.endSection();
}
}
public static void traceMetadata(String str, String str2, int i) {
if (checkNative()) {
nativeTraceMetadata(str, str2, i);
} else {
TraceDirectJavaImpl.traceMetadata(str, str2, i);
}
}
public static void setEnabledTags(long j) {
if (checkNative()) {
nativeSetEnabledTags(j);
}
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
9181ca5e151a5913436e72c5e497ab6229411ce0 | a9d882e3aa37482dae7ce3ee1dd08aa02a9d6e6d | /src/children/org/hpin/webservice/service/PushEventQRCodeInfo.java | 9f6b8e7d05eac30649788929e4e9e2e129663450 | [] | no_license | dym3093/hlSys | df5b0158fe4a4b4f3fb3dd81a757f5c800ca6bf7 | 40892bf0b0f8b4cce1ac1b81776bd1a65151e01e | refs/heads/master | 2021-01-20T04:25:52.590206 | 2017-04-30T15:42:04 | 2017-04-30T15:42:04 | 89,689,302 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,504 | java | /**
* PushEventQRCodeInfo.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package org.hpin.webservice.service;
public class PushEventQRCodeInfo implements java.io.Serializable {
private java.lang.String arg0;
public PushEventQRCodeInfo() {
}
public PushEventQRCodeInfo(
java.lang.String arg0) {
this.arg0 = arg0;
}
/**
* Gets the arg0 value for this PushEventQRCodeInfo.
*
* @return arg0
*/
public java.lang.String getArg0() {
return arg0;
}
/**
* Sets the arg0 value for this PushEventQRCodeInfo.
*
* @param arg0
*/
public void setArg0(java.lang.String arg0) {
this.arg0 = arg0;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof PushEventQRCodeInfo)) return false;
PushEventQRCodeInfo other = (PushEventQRCodeInfo) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.arg0==null && other.getArg0()==null) ||
(this.arg0!=null &&
this.arg0.equals(other.getArg0())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getArg0() != null) {
_hashCode += getArg0().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(PushEventQRCodeInfo.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://service.webservice.hpin.org/", "pushEventQRCodeInfo"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("arg0");
elemField.setXmlName(new javax.xml.namespace.QName("", "arg0"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
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.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
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.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"youming3093@163.com"
] | youming3093@163.com |
f742f130ed18c72a0d780e4777cded15fa26f35d | b59a518d8bf03443668552f5b24a2950e96816a7 | /src/apps/gu-prj/src/main/java/com/xukaiqiang/gu/orm/dialect/AbstractCuUsC.java | 5bbac2dc4ae9383db25fdc6db74c1c9213cc92a9 | [] | no_license | jjmnbv/guitar | 94ecbfca238580e6916ad6bd6c6d0ebc4407f6ae | 36a668c814356e8343c6f0a451bec645ec41c112 | refs/heads/master | 2021-06-23T10:33:43.654118 | 2017-07-21T09:09:48 | 2017-07-21T09:09:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,586 | java | package com.xukaiqiang.gu.orm.dialect;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
@MappedSuperclass
public abstract class AbstractCuUsC implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = Columns.CUUSC_ID)
private Long id;
/**
* @return
*/
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
* 列名
*/
public static interface Columns {
/**
* CUUSC.ID
*/
public static final String CUUSC_ID = "id";
/**
* CUUSC.VE
*/
public static final String CUUSC_VE = "ve";
/**
* CUUSC.CRDT
*/
public static final String CUUSC_CRDT = "cr_dt";
/**
* CUUSC.CRTM
*/
public static final String CUUSC_CRTM = "cr_tm";
/**
* CUUSC.LAUPDT
*/
public static final String CUUSC_LAUPDT = "la_up_dt";
/**
* CUUSC.LAUPUSID
*/
public static final String CUUSC_LAUPUSID = "la_up_us_id";
/**
* CUUSC.PWDLE
*/
public static final String CUUSC_PWDLE = "pwd_le";
/**
* CUUSC.PWDALGCD
*/
public static final String CUUSC_PWDALGCD = "pwd_alg_cd";
/**
* CUUSC.LOGINERRQT
*/
public static final String CUUSC_LOGINERRQT = "login_err_qt";
/**
* CUUSC.UNLOCKTYCD
*/
public static final String CUUSC_UNLOCKTYCD = "unlock_ty_cd";
/**
* CUUSC.AUTOUNLOCKMINUQT
*/
public static final String CUUSC_AUTOUNLOCKMINUQT = "auto_unlock_minu_qt";
}
}
| [
"994028591@qq.com"
] | 994028591@qq.com |
bc14b226a900b3bbbd268308f7a89a9e8365c98d | 7edbf7dfcfa9e1a3c9dc08b793f2e2a012cc5f2f | /WebApplicationTesting/src/com/Facebook/Facebook_LogInTest.java | 310a0294743902f63d039b2e67b4e131590f8c8e | [] | no_license | srinuqatrainer/PradeepSeleniumTesting | 7ad59af4d8852d14be79821e072f0459a0091681 | 7cc39d47acdcb7f1c67ef7e3ab5e5751a36d7718 | refs/heads/master | 2020-05-21T05:43:46.545089 | 2019-05-10T05:58:51 | 2019-05-10T05:58:51 | 185,927,738 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,127 | java | package com.Facebook;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Facebook_LogInTest {
public static void main(String[] args)
{
WebDriver driver = null;
String url="http://facebook.com";
//System.setProperty("webdriver.gecko.driver", "./driverFiles/geckodriver.exe");
driver = new FirefoxDriver();
driver.get(url);
/*
<input type="email" class="inputtext" name="email" id="email" data-testid="royal_email">
locator - id
selector - email
*/
driver.findElement(By.id("email")).sendKeys("Pradeep");
// <input type="password" class="inputtext" name="pass" id="pass" data-testid="royal_pass">
// locator - id
// selector - pass
driver.findElement(By.id("pass")).sendKeys("Hello");
// <label class="uiButton uiButtonConfirm" id="loginbutton" for="u_0_2"><input value="Log In" aria-label="Log In" data-testid="royal_login_button" type="submit" id="u_0_2"></label>
// locator - id
// selector - loginbutton
driver.findElement(By.id("loginbutton")).click();
}
}
| [
"srinu.qatrainer@gmail.com"
] | srinu.qatrainer@gmail.com |
ed2374f66c4aefe9854a5ac8310f703c6e8fd357 | 3efe4de7bfb3a95112c0bdc512498d5fe48d8be3 | /platform/holley-platform-common/src/main/java/com/holley/platform/common/dataobject/LoginCountBean.java | b3c68fb63b38abcdb8dc50cf8e711b2093030d91 | [] | no_license | wang-shun/commonProject | 4b1bc10301bd4b310263bdaf5e9007183c1ddc96 | 2f9040f2e075ca33bb000ab48418e9c1604a928a | refs/heads/master | 2020-04-02T12:18:52.003496 | 2018-09-27T05:31:37 | 2018-09-27T05:31:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,512 | java | package com.holley.platform.common.dataobject;
import java.io.Serializable;
import java.util.Date;
public class LoginCountBean implements Serializable {
private static final long serialVersionUID = 6098497446916700331L;
private String account;
private int count; // 登录失败次数
private Date logintime;
private int reTryCount; // 登录剩余重试次数
private boolean isRefuseLogin = false; // 是否拒绝登录,超过6次后等半小时登录
private String loginFailMsg;
public String getLoginFailMsg() {
return loginFailMsg;
}
public void setLoginFailMsg(String loginFailMsg) {
this.loginFailMsg = loginFailMsg;
}
public boolean isRefuseLogin() {
return isRefuseLogin;
}
public void setRefuseLogin(boolean isRefuseLogin) {
this.isRefuseLogin = isRefuseLogin;
}
public int getReTryCount() {
return reTryCount;
}
public void setReTryCount(int reTryCount) {
this.reTryCount = reTryCount;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public Date getLogintime() {
return logintime;
}
public void setLogintime(Date logintime) {
this.logintime = logintime;
}
}
| [
"525423071@qq.com"
] | 525423071@qq.com |
eecdc0ab4d21869fd7cfd3bbbfea933c8fc49272 | 5d76b555a3614ab0f156bcad357e45c94d121e2d | /src-v2/com/fasterxml/jackson/annotation/JsonTypeId.java | 0dd3b3e688895835796525485715202a7e80a139 | [] | no_license | BinSlashBash/xcrumby | 8e09282387e2e82d12957d22fa1bb0322f6e6227 | 5b8b1cc8537ae1cfb59448d37b6efca01dded347 | refs/heads/master | 2016-09-01T05:58:46.144411 | 2016-02-15T13:23:25 | 2016-02-15T13:23:25 | 51,755,603 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 543 | java | /*
* Decompiled with CFR 0_110.
*/
package com.fasterxml.jackson.annotation;
import com.fasterxml.jackson.annotation.JacksonAnnotation;
import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@JacksonAnnotation
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value={ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
public @interface JsonTypeId {
}
| [
"binslashbash@otaking.top"
] | binslashbash@otaking.top |
ffc54f0bd1ca8ff952e03641c88acbec85a1d2ec | 0ed639db8bad755bdc8683bea8aa0cbe2bb6fa8b | /src/test/java/org/kcpc/precep/web/rest/TestUtil.java | 2288fa260ddd972e4d2ea136b4869275d7a87301 | [] | no_license | kcpcdev/pre-cep | 669616e665794da71a871c765aa91b6401eee6b9 | 13fb9de7fb782fe07dc727fb79ab1bf85d553a40 | refs/heads/main | 2023-06-22T15:45:15.432224 | 2021-07-23T18:13:34 | 2021-07-23T18:13:34 | 386,799,333 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,878 | java | package org.kcpc.precep.web.rest;
import static org.assertj.core.api.Assertions.assertThat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.time.format.DateTimeParseException;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeDiagnosingMatcher;
import org.hamcrest.TypeSafeMatcher;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.format.support.DefaultFormattingConversionService;
import org.springframework.format.support.FormattingConversionService;
/**
* Utility class for testing REST controllers.
*/
public final class TestUtil {
private static final ObjectMapper mapper = createObjectMapper();
private static ObjectMapper createObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS, false);
mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
mapper.registerModule(new JavaTimeModule());
return mapper;
}
/**
* Convert an object to JSON byte array.
*
* @param object the object to convert.
* @return the JSON byte array.
* @throws IOException
*/
public static byte[] convertObjectToJsonBytes(Object object) throws IOException {
return mapper.writeValueAsBytes(object);
}
/**
* Create a byte array with a specific size filled with specified data.
*
* @param size the size of the byte array.
* @param data the data to put in the byte array.
* @return the JSON byte array.
*/
public static byte[] createByteArray(int size, String data) {
byte[] byteArray = new byte[size];
for (int i = 0; i < size; i++) {
byteArray[i] = Byte.parseByte(data, 2);
}
return byteArray;
}
/**
* A matcher that tests that the examined string represents the same instant as the reference datetime.
*/
public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> {
private final ZonedDateTime date;
public ZonedDateTimeMatcher(ZonedDateTime date) {
this.date = date;
}
@Override
protected boolean matchesSafely(String item, Description mismatchDescription) {
try {
if (!date.isEqual(ZonedDateTime.parse(item))) {
mismatchDescription.appendText("was ").appendValue(item);
return false;
}
return true;
} catch (DateTimeParseException e) {
mismatchDescription.appendText("was ").appendValue(item).appendText(", which could not be parsed as a ZonedDateTime");
return false;
}
}
@Override
public void describeTo(Description description) {
description.appendText("a String representing the same Instant as ").appendValue(date);
}
}
/**
* Creates a matcher that matches when the examined string represents the same instant as the reference datetime.
*
* @param date the reference datetime against which the examined string is checked.
*/
public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) {
return new ZonedDateTimeMatcher(date);
}
/**
* A matcher that tests that the examined number represents the same value - it can be Long, Double, etc - as the reference BigDecimal.
*/
public static class NumberMatcher extends TypeSafeMatcher<Number> {
final BigDecimal value;
public NumberMatcher(BigDecimal value) {
this.value = value;
}
@Override
public void describeTo(Description description) {
description.appendText("a numeric value is ").appendValue(value);
}
@Override
protected boolean matchesSafely(Number item) {
BigDecimal bigDecimal = asDecimal(item);
return bigDecimal != null && value.compareTo(bigDecimal) == 0;
}
private static BigDecimal asDecimal(Number item) {
if (item == null) {
return null;
}
if (item instanceof BigDecimal) {
return (BigDecimal) item;
} else if (item instanceof Long) {
return BigDecimal.valueOf((Long) item);
} else if (item instanceof Integer) {
return BigDecimal.valueOf((Integer) item);
} else if (item instanceof Double) {
return BigDecimal.valueOf((Double) item);
} else if (item instanceof Float) {
return BigDecimal.valueOf((Float) item);
} else {
return BigDecimal.valueOf(item.doubleValue());
}
}
}
/**
* Creates a matcher that matches when the examined number represents the same value as the reference BigDecimal.
*
* @param number the reference BigDecimal against which the examined number is checked.
*/
public static NumberMatcher sameNumber(BigDecimal number) {
return new NumberMatcher(number);
}
/**
* Verifies the equals/hashcode contract on the domain object.
*/
public static <T> void equalsVerifier(Class<T> clazz) throws Exception {
T domainObject1 = clazz.getConstructor().newInstance();
assertThat(domainObject1.toString()).isNotNull();
assertThat(domainObject1).isEqualTo(domainObject1);
assertThat(domainObject1).hasSameHashCodeAs(domainObject1);
// Test with an instance of another class
Object testOtherObject = new Object();
assertThat(domainObject1).isNotEqualTo(testOtherObject);
assertThat(domainObject1).isNotEqualTo(null);
// Test with an instance of the same class
T domainObject2 = clazz.getConstructor().newInstance();
assertThat(domainObject1).isNotEqualTo(domainObject2);
// HashCodes are equals because the objects are not persisted yet
assertThat(domainObject1).hasSameHashCodeAs(domainObject2);
}
/**
* Create a {@link FormattingConversionService} which use ISO date format, instead of the localized one.
* @return the {@link FormattingConversionService}.
*/
public static FormattingConversionService createFormattingConversionService() {
DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService();
DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
registrar.setUseIsoFormat(true);
registrar.registerFormatters(dfcs);
return dfcs;
}
/**
* Makes a an executes a query to the EntityManager finding all stored objects.
* @param <T> The type of objects to be searched
* @param em The instance of the EntityManager
* @param clss The class type to be searched
* @return A list of all found objects
*/
public static <T> List<T> findAll(EntityManager em, Class<T> clss) {
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<T> cq = cb.createQuery(clss);
Root<T> rootEntry = cq.from(clss);
CriteriaQuery<T> all = cq.select(rootEntry);
TypedQuery<T> allQuery = em.createQuery(all);
return allQuery.getResultList();
}
private TestUtil() {}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
42fcf932c194f8b59e823b7bcf661b316e1a5c06 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_32b09dacf4b3da51a17e5c65685b4cb84c433a7a/TestUtil/13_32b09dacf4b3da51a17e5c65685b4cb84c433a7a_TestUtil_s.java | aadfe8d574244f2605cce4d7d1471e7b70dc9bb5 | [] | 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 | 3,447 | java | /*
* This file is part of Math.
*
* Copyright (c) 2011 Spout LLC <http://www.spout.org/>
* Math is licensed under the Spout License Version 1.
*
* Math 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 3 of the License, or (at your option)
* any later version.
*
* In addition, 180 days after any changes are published, you can use the
* software, incorporating those changes, under the terms of the MIT license,
* as described in the Spout License Version 1.
*
* Math 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,
* the MIT license and the Spout License Version 1 along with this program.
* If not, see <http://www.gnu.org/licenses/> for the GNU Lesser General Public
* License and see <http://spout.in/licensev1> for the full license, including
* the MIT license.
*/
package org.spout.math.test;
import org.junit.Assert;
import org.spout.math.vector.Vector2;
import org.spout.math.vector.Vector3;
import org.spout.math.vector.Vector4;
import org.spout.math.vector.VectorN;
public class TestUtil {
private static final float DEFAULT_EPSILON_FLOAT = 0.001f;
private static final double DEFAULT_EPSILON_DOUBLE = 0.001;
public static void assertEquals(float value, float expected) {
Assert.assertEquals(expected, value, DEFAULT_EPSILON_FLOAT);
}
public static void assertEquals(double value, double expected) {
Assert.assertEquals(expected, value, DEFAULT_EPSILON_DOUBLE);
}
public static void assertEquals(Vector2 v, float x, float y) {
assertEquals(v.getX(), x);
assertEquals(v.getY(), y);
}
public static void assertEquals(Vector2 v, double x, double y) {
assertEquals(v.getX(), x);
assertEquals(v.getY(), y);
}
public static void assertEquals(Vector3 v, float x, float y, float z) {
assertEquals(v.getX(), x);
assertEquals(v.getY(), y);
assertEquals(v.getZ(), z);
}
public static void assertEquals(Vector3 v, double x, double y, double z) {
assertEquals(v.getX(), x);
assertEquals(v.getY(), y);
assertEquals(v.getZ(), z);
}
public static void assertEquals(Vector4 v, float x, float y, float z, float w) {
assertEquals(v.getX(), x);
assertEquals(v.getY(), y);
assertEquals(v.getZ(), z);
assertEquals(v.getW(), w);
}
public static void assertEquals(Vector4 v, double x, double y, double z, double w) {
assertEquals(v.getX(), x);
assertEquals(v.getY(), y);
assertEquals(v.getZ(), z);
assertEquals(v.getW(), w);
}
public static void assertEquals(VectorN v, float... f) {
for (int i = 0; i < v.size(); i++) {
assertEquals(v.get(i), f[i]);
}
}
public static void assertEquals(VectorN v, double... d) {
for (int i = 0; i < v.size(); i++) {
assertEquals(v.get(i), d[i]);
}
}
public static void assertEquals(float[] v, float... f) {
for (int i = 0; i < v.length; i++) {
assertEquals(v[i], f[i]);
}
}
public static void assertEquals(double[] v, double... d) {
for (int i = 0; i < v.length; i++) {
assertEquals(v[i], d[i]);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
bfa979ebc1e0493c4a4c27f838f81f6e5bc6aa26 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/21/21_4b2d3ac859c9a9eb865cb02cdc3bff8c53b64328/SwipeServerThread/21_4b2d3ac859c9a9eb865cb02cdc3bff8c53b64328_SwipeServerThread_t.java | f70a030b4db4293c13180fff3a2126ce078bb3e1 | [] | 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,388 | java | package com.appspot.manup.autograph;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InterruptedIOException;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import android.os.Process;
import android.util.Log;
/**
*
* Opens socket server.
*
* Can be killed by an interrupt
*
*/
public class SwipeServerThread extends Thread
{
private static final String TAG = SwipeServerThread.class.getSimpleName();
private static final int PORT = 12345;
private static final int BACKLOG = 10;
private static final int SOCKET_TIME_OUT = 5000;
private final SignatureDatabase mSignatureDatabase;
public SwipeServerThread(SignatureDatabase signatureDatabase)
{
super(TAG);
mSignatureDatabase = signatureDatabase;
} // SwipeServerThread
@Override
public void run()
{
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
try
{
handleRequests();
} // try
catch (final InterruptedException e)
{
Log.v(TAG, "Interrupted, now stopping.", e);
} // catch
catch (final IOException e)
{
Log.d(TAG, "An error occured while handling requests.", e);
} // catch
} // run
private void handleRequests() throws IOException, InterruptedException
{
InetAddress hostInetAddress = NetworkUtils.getLocalIpAddress();
if (hostInetAddress == null)
{
Log.e(TAG, "Could not get host inet address, aborting running server");
return;
} // if
Log.d(TAG, "host inet: " + hostInetAddress);
ServerSocket serverSocket = null;
try
{
serverSocket = new ServerSocket(PORT, BACKLOG, hostInetAddress);
serverSocket.setSoTimeout(SOCKET_TIME_OUT);
Log.d(TAG, "Server socket: " + serverSocket.getInetAddress() + ":"
+ serverSocket.getLocalPort());
while (true)
{
try
{
handleRequest(serverSocket);
} // try
catch (final IOException e)
{
Log.d(TAG, "Failed to handle request.", e);
} // catch
} // while
} // try
finally
{
if (serverSocket != null)
{
serverSocket.close();
} // if
} // finally
}
private void handleRequest(final ServerSocket serverSocket) throws InterruptedException,
IOException
{
Socket socket = null;
try
{
socket = waitForIncomingConnection(serverSocket);
final String magStripeNumber = readMagStripeNumber(socket);
if (magStripeNumber == null)
{
Log.w(TAG, "Mag stripe number could not be read.");
return;
} // if
Log.d(TAG, "Mag stripe number: " + magStripeNumber);
final boolean inserted = insertMagStripeNumber(magStripeNumber);
if (!inserted)
{
Log.e(TAG, "Failed to insert mag stripe number into database.");
} // if
writeResponse(socket, inserted);
} // try
finally
{
if (socket != null)
{
socket.close();
} // if
} // finally
} // handleRequest
private Socket waitForIncomingConnection(final ServerSocket serverSocket)
throws InterruptedException, IOException
{
Log.d(TAG, "Waiting for incoming connection...");
while (!Thread.currentThread().isInterrupted())
{
try
{
return serverSocket.accept();
} // try
catch (final InterruptedIOException e)
{
// Timed out, loop.
} // catch
} // while
throw new InterruptedException("Interrupted while waiting for incoming connection.");
} // read
private String readMagStripeNumber(final Socket socket) throws IOException
{
try
{
return new BufferedReader(new InputStreamReader(socket.getInputStream())).readLine();
} // try
finally
{
socket.shutdownInput();
} // finally
} // readMagStripe
private boolean insertMagStripeNumber(final String magStripeNumber)
{
return mSignatureDatabase.addSignature(magStripeNumber) != -1;
} // insertMagStripeNumber
private void writeResponse(final Socket socket, final boolean inserted) throws IOException
{
PrintWriter output = null;
try
{
output = new PrintWriter(socket.getOutputStream());
output.print("Ciao buddy");
} // try
finally
{
if (output != null)
{
output.flush();
} // if
socket.shutdownOutput();
} // finally
} // writeResponse
} // SwipeServerThread
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
50a6a02d53051a60e4cf7ff60e7aba4912351974 | 4f0968da7ac2711910fae06a99a04f557d704abe | /forge/src/forge/ai/ability/LegendaryRuleAi.java | 9246024dfb825400eb9307742b3f16cbe056b7a1 | [] | no_license | lzybluee/Reeforge | 00c6e0900f55fb2927f2e85b130cebb1da4b350b | 63d0dadcb9cf86c9c64630025410951e3e044117 | refs/heads/master | 2021-06-04T16:52:31.413465 | 2020-11-08T14:04:33 | 2020-11-08T14:04:33 | 101,260,125 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,023 | java | package forge.ai.ability;
import com.google.common.collect.Iterables;
import forge.ai.SpellAbilityAi;
import forge.game.card.Card;
import forge.game.card.CounterType;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
/**
* TODO: Write javadoc for this type.
*
*/
public class LegendaryRuleAi extends SpellAbilityAi {
/* (non-Javadoc)
* @see forge.card.ability.SpellAbilityAi#canPlayAI(forge.game.player.Player, forge.card.spellability.SpellAbility)
*/
@Override
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
return false; // should not get here
}
@Override
public Card chooseSingleCard(Player ai, SpellAbility sa, Iterable<Card> options, boolean isOptional, Player targetedPlayer) {
// Choose a single legendary/planeswalker card to keep
Card firstOption = Iterables.getFirst(options, null);
boolean choosingFromPlanewalkers = firstOption.isPlaneswalker();
if ( choosingFromPlanewalkers ) {
// AI decision making - should AI compare counters?
} else {
// AI decision making - should AI compare damage and debuffs?
}
// TODO: Can this be made more generic somehow?
if (firstOption.getName().equals("Dark Depths")) {
Card best = firstOption;
for (Card c : options) {
if (c.getCounters(CounterType.ICE) < best.getCounters(CounterType.ICE)) {
best = c;
}
}
return best;
} else if (firstOption.getCounters(CounterType.KI) > 0) {
// Extra Rule for KI counter
Card best = firstOption;
for (Card c : options) {
if (c.getCounters(CounterType.KI) > best.getCounters(CounterType.KI)) {
best = c;
}
}
return best;
}
return firstOption;
}
}
| [
"lzybluee@gmail.com"
] | lzybluee@gmail.com |
16b04d8265a7e58c0d4525b701076442169cb96c | 573d5ef5b906825779a467fcfc52b8b60675d3a0 | /JAVA-BEGINNERS-PROGRAMS/tutorial5/src/Application.java | 30b2c8ce005995395539e5884fe4a7a53249188a | [
"MIT"
] | permissive | harshen/Java-Programs | bc9edadeb630f46c9568089e56659c8790b89174 | 2914add7452c979798da3f5602808c20fbdac0d7 | refs/heads/master | 2020-03-28T11:33:24.980817 | 2018-10-26T04:36:57 | 2018-10-26T04:36:57 | 148,225,521 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 159 | java | public class Application {
public static void main(String[] args) {
for(int i=0; i < 5; i++) {
System.out.printf("The value of i is: %d\n", i);
}
}
}
| [
"you@example.com"
] | you@example.com |
f212129b31c203f370d010347d3a7f73c294189b | 038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad | /schemaOrgDomaConv/src/org/kyojo/schemaOrg/m3n3/doma/healthLifesci/medicalObservationalStudyDesign/CohortStudyConverter.java | b61ac333c0e3315c8edfd264e9500c67a2140a3a | [
"Apache-2.0"
] | permissive | nagaikenshin/schemaOrg | 3dec1626781913930da5585884e3484e0b525aea | 4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8 | refs/heads/master | 2021-06-25T04:52:49.995840 | 2019-05-12T06:22:37 | 2019-05-12T06:22:37 | 134,319,974 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 672 | java | package org.kyojo.schemaorg.m3n3.doma.healthLifesci.medicalObservationalStudyDesign;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n3.healthLifesci.medicalObservationalStudyDesign.COHORT_STUDY;
import org.kyojo.schemaorg.m3n3.healthLifesci.MedicalObservationalStudyDesign.CohortStudy;
@ExternalDomain
public class CohortStudyConverter implements DomainConverter<CohortStudy, String> {
@Override
public String fromDomainToValue(CohortStudy domain) {
return domain.getNativeValue();
}
@Override
public CohortStudy fromValueToDomain(String value) {
return new COHORT_STUDY(value);
}
}
| [
"nagai@nagaikenshin.com"
] | nagai@nagaikenshin.com |
11c737d657a3bc4706b05e30d3ae558b9473703a | d65616c2f8e38b5db19a02670918add435ad4254 | /easyreport-domain/src/main/java/com/easytoolsoft/easyreport/view/EasyUIQueryFormView.java | ddb7c429cee16723e7370fc21ce4745012af032a | [
"Apache-2.0"
] | permissive | zhang637/EasyReport | f2c49ae4021fcf60a30c04e56c3bb5d61c5ef932 | 1c51136c997aa536931f3816fb7e94ab7e97a5ca | refs/heads/master | 2021-01-21T01:34:35.347130 | 2015-02-15T02:39:38 | 2015-02-15T02:39:38 | 30,817,386 | 1 | 0 | null | 2015-02-15T04:05:49 | 2015-02-15T04:05:49 | null | UTF-8 | Java | false | false | 3,585 | java | package com.easytoolsoft.easyreport.view;
import com.easytoolsoft.easyreport.viewmodel.HtmlCheckBox;
import com.easytoolsoft.easyreport.viewmodel.HtmlCheckBoxList;
import com.easytoolsoft.easyreport.viewmodel.HtmlComboBox;
import com.easytoolsoft.easyreport.viewmodel.HtmlDateBox;
import com.easytoolsoft.easyreport.viewmodel.HtmlSelectOption;
import com.easytoolsoft.easyreport.viewmodel.HtmlTextBox;
/**
* JQueryEasyUI控件报表查询参数表单视图
*
*/
public class EasyUIQueryFormView extends AbstractQueryParamFormView implements QueryParamFormView {
@Override
protected String getDateBoxText(HtmlDateBox dateBox) {
String template = "<input id=\"%s\" name=\"%s\" type=\"text\" class=\"easyui-datebox\" required=\"true\" value=\"%s\" />";
String easyuiText = String.format(template, dateBox.getName(), dateBox.getName(), dateBox.getValue());
return String.format("<span class=\"j-item\"><label style=\"width: 120px;\">%s:</label>%s</span>", dateBox.getText(), easyuiText);
}
@Override
protected String getTexBoxText(HtmlTextBox textBox) {
String template = "<input id=\"%s\" name=\"%s\" type=\"text\" value=\"%s\" />";
String easyuiText = String.format(template, textBox.getName(), textBox.getName(), textBox.getValue());
return String.format("<span class=\"j-item\"><label style=\"width: 120px;\">%s:</label>%s</span>", textBox.getText(), easyuiText);
}
@Override
protected String getCheckBoxText(HtmlCheckBox checkBox) {
String checked = checkBox.isChecked() ? "" : "checked=\"checked\"";
return String.format("<input id=\"%s\" name=\"%s\" type=\"checkbox\" value=\"%s\" %s />%s",
checkBox.getName(), checkBox.getName(), checkBox.getValue(), checked, checkBox.getText());
}
@Override
protected String getComboBoxText(HtmlComboBox comboBox) {
String multiple = comboBox.isMultipled() ? "data-options=\"multiple:true\"" : "";
StringBuilder htmlText = new StringBuilder("");
htmlText.append(String.format("<span class=\"j-item\"><label style=\"width: 120px;\">%s:</label>", comboBox.getText()));
htmlText.append(String.format("<select id=\"%s\" name=\"%s\" class=\"easyui-combobox\" style=\"width: 200px;\" %s>",
comboBox.getName(), comboBox.getName(), multiple));
for (HtmlSelectOption option : comboBox.getValue()) {
String selected = option.isSelected() ? "selected=\"selected\"" : "";
htmlText.append(String.format("<option value=\"%s\" %s>%s</option>", option.getValue(), selected, option.getText()));
}
htmlText.append("</select>");
htmlText.append("</span>");
return htmlText.toString();
}
@Override
protected String getCheckboxListText(HtmlCheckBoxList checkBoxList) {
boolean isCheckedAll = true;
StringBuilder htmlText = new StringBuilder("");
htmlText.append(String.format("<span class=\"j-item\" data-type=\"checkbox\"><label style=\"width: 120px;\">%s:</label>",
checkBoxList.getText()));
for (HtmlCheckBox checkBox : checkBoxList.getValue()) {
if (!checkBox.isChecked())
isCheckedAll = false;
String checked = checkBox.isChecked() ? "checked=\"checked\"" : "";
htmlText.append(String.format("<input name=\"%s\" type=\"checkbox\" value=\"%s\" data-name=\"%s\" %s/>%s ",
checkBoxList.getName(), checkBox.getName(), checkBox.getText(), checked, checkBox.getText()));
}
htmlText.append(String.format("<input id=\"checkAllStatColumn\" name=\"checkAllStatColumn\" type=\"checkbox\" %s />全选</span>",
isCheckedAll ? "checked=\"checked\"" : ""));
return htmlText.toString();
}
}
| [
"14068728@qq.com"
] | 14068728@qq.com |
1a2202282e9be519f07f63f061b35edf5adb824c | fc4e0c9d846bddb5768fde39ee07284a668a1e75 | /0814_BinaryTreePrune/Solution.java | 9019fdb01ed95277fb23051bb61b45d5073cf504 | [] | no_license | chialin-liu/Leetcode | d9f9ce94ac8cc3bdb71145d9fc59d7c2311e4ef7 | bf5ee75fe266353ce574d8aa38973f325b239079 | refs/heads/master | 2020-06-19T09:48:08.036214 | 2020-03-14T09:55:00 | 2020-03-14T09:55:00 | 196,667,938 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 692 | java | /**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
class Solution {
public TreeNode pruneTree(TreeNode root) {
dfs(root);
return root;
}
public TreeNode dfs(TreeNode root){
if(root == null) return null;
root.left = dfs(root.left);
root.right = dfs(root.right);
if(root.left == null && root.right == null){
if(root.val == 0){
return null;
}
else{
return root;
}
}
else{
return root;
}
}
}
| [
"charles.ee96@g2.nctu.edu.tw"
] | charles.ee96@g2.nctu.edu.tw |
bb82d3eef09adfe6a2777f478c677dd16beba534 | 4c01db9b8deeb40988d88f9a74b01ee99d41b176 | /GinTong/Crawlnew/src/cn/futures/data/importor/ExcelSchema.java | 8fa17565615247a8776c7c3fb2986daa00feb1cd | [] | no_license | GGPay/- | 76743bf63d059cbf34c058b55edfdb6a58a41f71 | 20b584467142c6033ff92549fd77297da8ae6bfc | refs/heads/master | 2020-04-29T10:24:29.949835 | 2018-04-07T04:34:19 | 2018-04-07T04:34:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,200 | java | package cn.futures.data.importor;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import cn.futures.chart.PriceExcel2Db;
public class ExcelSchema {
public static final String SCHEMA_FILE = "cn/futures/data/importor/ExcelSchema.xls";
public static Map<String, String> schema;
public static String getTableByName(String filename) {
if (schema == null) {
synchronized (ExcelSchema.class){
if (schema == null) {
schema = loadSchema();
}
}
}
return schema.get(filename);
}
public static Map<String, String> loadSchema() {
HashMap<String, String> map = new LinkedHashMap<String, String>();
HSSFWorkbook book = null;
try {
InputStream input = PriceExcel2Db.class.getClassLoader()
.getResourceAsStream(SCHEMA_FILE);
book = new HSSFWorkbook(input);
} catch (IOException e) {
e.printStackTrace();
}
for (int sheetIndex = 0; sheetIndex < book.getNumberOfSheets(); sheetIndex++){
HSSFSheet sheet = book.getSheetAt(sheetIndex);
String sheetName = book.getSheetName(sheetIndex);
// System.out.println(sheetName);
if (sheetName == null || sheetName.startsWith("Sheet")) continue;
int totalRow = sheet.getLastRowNum();
for(int i=0; i<totalRow; i++){
HSSFRow row = sheet.getRow(i);
if (row == null) continue;
String varname = getValue(row.getCell((short)1));
String table_cn = getValue(row.getCell((short)2));
String table_en = getValue(row.getCell((short)3));
if (varname != null && table_cn != null && table_en != null) {
map.put(sheetName+"-"+varname+"-"+table_cn, table_en);
// System.out.println(sheetName+"-"+varname+"-"+table_cn +" # "+ table_en);
}
}
}
return map;
}
private static String getValue(final HSSFCell cell){
if (cell == null) return null;
String s = cell.getStringCellValue();
if (s == null || s.trim().length() == 0) return null;
return s.trim();
}
}
| [
"pinggaimuir@sina.com"
] | pinggaimuir@sina.com |
f9fac73bf4e30ca1df92b9a0dd41f892f85336ec | 8ec2cbabd6125ceeb00e0c6192c3ce84477bdde6 | /com.alcatel.as.http.ioh/src/com/alcatel/as/http2/client/Http2Connection.java | aad1b6012848b830815cc67391e36260f2efbd23 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | nokia/osgi-microfeatures | 2cc2b007454ec82212237e012290425114eb55e6 | 50120f20cf929a966364550ca5829ef348d82670 | refs/heads/main | 2023-08-28T12:13:52.381483 | 2021-11-12T20:51:05 | 2021-11-12T20:51:05 | 378,852,173 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,466 | java | // Copyright 2000-2021 Nokia
//
// Licensed under the Apache License 2.0
// SPDX-License-Identifier: Apache-2.0
//
package com.alcatel.as.http2.client;
import org.osgi.annotation.versioning.ProviderType;
import java.nio.ByteBuffer;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.function.Consumer;
@ProviderType
public interface Http2Connection {
public static enum Status {
AVAILABLE (true, true),
UNAVAILABLE_MAX_CONCURRENT (false, true),
UNAVAILABLE_FULL_WINDOW (false, true),
UNAVAILABLE_EXHAUSTED (false, false),
UNAVAILABLE_NOT_CONNECTED (false, false);
private boolean _available, _retriable;
private Status (boolean available, boolean retriable){
_available = available;
_retriable = retriable;
}
public boolean available (){ return _available;}
public boolean retriable (){ return _retriable;}
}
public <T> T attachment ();
public void attach (Object o);
public java.net.InetSocketAddress remoteAddress ();
public java.net.InetSocketAddress proxyAddress ();
public java.net.InetSocketAddress localAddress ();
public Map<String, Object> exportTlsKey ();
// must be called in writeExecutor
public Http2Request newRequest (Http2ResponseListener listener);
// must be called in writeExecutor
public Http2Connection onAvailable (Runnable onSuccess, Runnable onFailure, long delay);
// must be called in writeExecutor
// weight between 1 and 256 (inclusive)
public void sendPriority (int streamId, boolean exclusive, int streamDepId, int weight);
// must be called in writeExecutor
// delay :
// 0 : now ! (idleTimeout is ignored)
// -1 : wait until all reqs are done, possibly forever
// N : max N millis to wait for all reqs to be done, then close
// if idleTimeout>0 it is set and may generate a close of its own
public void close (int code, String msg, long delay, long idleTimeout);
// old method : idleTimeout set to 0
public void close (int code, String msg, long delay);
public void clone (java.util.function.Consumer<Http2Connection> onSuccess,
Runnable onFailure,
Runnable onClose);
public Executor writeExecutor ();
public Executor readExecutor ();
// must be called in writeExecutor
public Status status ();
// must be called in writeExecutor - returns the nb of requests that can still be created
public int remainingRequests ();
}
| [
"pierre.de_rop@nokia.com"
] | pierre.de_rop@nokia.com |
1e686b1de0af1e4c0802070e7c475dcf83fcbc09 | c52ec6b903c6a3e6b82a6c820c321b35b9afedbb | /src/main/java/com/mycompany/myapp/domain/Agency.java | 90c89f539e76682b76e0e41ff7f7d07d545ef875 | [] | no_license | mathiamry/bank-advice-system | c582fc3f0c16b6dd1f3f5dd3d8cb61f2c8ac561e | 9c8bbc5f6e7d22fc6b8bb8e3c8f790e0adb8d2af | refs/heads/main | 2023-07-20T07:50:26.635223 | 2021-08-27T13:22:13 | 2021-08-27T13:22:13 | 398,625,821 | 0 | 0 | null | 2021-08-21T18:16:20 | 2021-08-21T18:04:46 | Java | UTF-8 | Java | false | false | 3,109 | java | package com.mycompany.myapp.domain;
import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
/**
* A Agency.
*/
@Entity
@Table(name = "agency")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Agency implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Column(name = "name", nullable = false)
private String name;
@NotNull
@Column(name = "address", nullable = false)
private String address;
@Column(name = "contact")
private String contact;
@NotNull
@Pattern(regexp = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$")
@Column(name = "email", nullable = false)
private String email;
// jhipster-needle-entity-add-field - JHipster will add fields here
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Agency id(Long id) {
this.id = id;
return this;
}
public String getName() {
return this.name;
}
public Agency name(String name) {
this.name = name;
return this;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return this.address;
}
public Agency address(String address) {
this.address = address;
return this;
}
public void setAddress(String address) {
this.address = address;
}
public String getContact() {
return this.contact;
}
public Agency contact(String contact) {
this.contact = contact;
return this;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getEmail() {
return this.email;
}
public Agency email(String email) {
this.email = email;
return this;
}
public void setEmail(String email) {
this.email = email;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Agency)) {
return false;
}
return id != null && id.equals(((Agency) o).id);
}
@Override
public int hashCode() {
// see https://vladmihalcea.com/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
return getClass().hashCode();
}
// prettier-ignore
@Override
public String toString() {
return "Agency{" +
"id=" + getId() +
", name='" + getName() + "'" +
", address='" + getAddress() + "'" +
", contact='" + getContact() + "'" +
", email='" + getEmail() + "'" +
"}";
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
8ad25bf4c741fa131fe249168512a321129da0e3 | ee577c60b8e6d1df59dec8d9104b07f28e569bd6 | /simple-core/src/main/java/com/github/liuzhengyang/simplerpc/core/IRpcClient.java | a3626d921a353d1ec5837ddcf0f0652f71d17091 | [] | no_license | maliqiang/simple-rpc | 0f6596214e4dfa0350f49b23cf8b0acd67637d70 | 0cc7c5f3610aa3b6d30c630ba11c610db209ac4c | refs/heads/master | 2021-01-11T20:15:09.370089 | 2017-01-15T09:26:47 | 2017-01-15T09:26:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 244 | java | package com.github.liuzhengyang.simplerpc.core;
/**
* Description:
*
* @author liuzhengyang
* @version 1.0
* @since 2017-01-07
*/
public interface IRpcClient {
void init();
void destroy();
void notifyEvent(NotifyEvent notifyEvent);
}
| [
"liuzhengyang@meituan.com"
] | liuzhengyang@meituan.com |
c011deb39055ee9946790d1a9806a9dace60398c | 2453c87a7419cf38e2a412b30da7ebf7f555889a | /cache2k-testsuite/src/main/java/org/cache2k/testsuite/api/DummyToggleFeature.java | 7e583e78e3380bdbb8ebc21bcf34ba000bcda1f5 | [
"Apache-2.0"
] | permissive | tslyc/cache2k | a8685d8ddfef99fe0f0f3da305508b76a627ff72 | ce36051cbf5c3b73dc30ba015550647324741181 | refs/heads/master | 2023-01-24T18:55:59.354601 | 2020-11-24T04:00:00 | 2020-11-24T04:00:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 934 | java | package org.cache2k.testsuite.api;
/*
* #%L
* cache2k testsuite on public API
* %%
* Copyright (C) 2000 - 2020 headissue GmbH, Munich
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.cache2k.config.CacheBuildContext;
import org.cache2k.config.ToggleFeature;
public class DummyToggleFeature extends ToggleFeature {
@Override
protected void doEnlist(CacheBuildContext<?, ?> ctx) {
}
}
| [
"jw_github@headissue.com"
] | jw_github@headissue.com |
b782802ffb905a5b5447fc48dbfe3036ba887e37 | d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb | /PROMISE/archives/ant/1.5/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantCPInfo.java | f3a9429cab7f41e86bec1ebeec8a7b29d99125b4 | [] | no_license | hvdthong/DEFECT_PREDICTION | 78b8e98c0be3db86ffaed432722b0b8c61523ab2 | 76a61c69be0e2082faa3f19efd76a99f56a32858 | refs/heads/master | 2021-01-20T05:19:00.927723 | 2018-07-10T03:38:14 | 2018-07-10T03:38:14 | 89,766,606 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,124 | java | package org.apache.tools.ant.taskdefs.optional.depend.constantpool;
/**
* A Constant Pool entry which represents a constant value.
*
* @author Conor MacNeill
*/
public abstract class ConstantCPInfo extends ConstantPoolEntry {
/**
* The entry's untyped value. Each subclass interprets the constant
* value based on the subclass's type. The value here must be
* compatible.
*/
private Object value;
/**
* Initialise the constant entry.
*
* @param tagValue the constant pool entry type to be used.
* @param entries the number of constant pool entry slots occupied by
* this entry.
*/
protected ConstantCPInfo(int tagValue, int entries) {
super(tagValue, entries);
}
/**
* Get the value of the constant.
*
* @return the value of the constant (untyped).
*/
public Object getValue() {
return value;
}
/**
* Set the constant value.
*
* @param newValue the new untyped value of this constant.
*/
public void setValue(Object newValue) {
value = newValue;
}
}
| [
"hvdthong@github.com"
] | hvdthong@github.com |
ee74fb45bd645a433920cf4d6db7afe1b03eb185 | 6edf6c315706e14dc6aef57788a2abea17da10a3 | /com/planet_ink/marble_mud/Abilities/Paladin/Paladin_ImprovedResists.java | 57844114ecdd1d7232f2f01089fc82823db6204b | [] | no_license | Cocanuta/Marble | c88efd73c46bd152098f588ba1cdc123316df818 | 4306fbda39b5488dac465a221bf9d8da4cbf2235 | refs/heads/master | 2020-12-25T18:20:08.253300 | 2012-09-10T17:09:50 | 2012-09-10T17:09:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,084 | java | package com.planet_ink.marble_mud.Abilities.Paladin;
import com.planet_ink.marble_mud.core.interfaces.*;
import com.planet_ink.marble_mud.core.*;
import com.planet_ink.marble_mud.core.collections.*;
import com.planet_ink.marble_mud.Abilities.interfaces.*;
import com.planet_ink.marble_mud.Areas.interfaces.*;
import com.planet_ink.marble_mud.Behaviors.interfaces.*;
import com.planet_ink.marble_mud.CharClasses.interfaces.*;
import com.planet_ink.marble_mud.Commands.interfaces.*;
import com.planet_ink.marble_mud.Common.interfaces.*;
import com.planet_ink.marble_mud.Exits.interfaces.*;
import com.planet_ink.marble_mud.Items.interfaces.*;
import com.planet_ink.marble_mud.Locales.interfaces.*;
import com.planet_ink.marble_mud.MOBS.interfaces.*;
import com.planet_ink.marble_mud.Races.interfaces.*;
import java.util.*;
/*
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.
*/
public class Paladin_ImprovedResists extends PaladinSkill
{
public String ID() { return "Paladin_ImprovedResists"; }
public String name(){ return "Paladin`s Resistance";}
public int classificationCode(){return Ability.ACODE_SKILL|Ability.DOMAIN_HOLYPROTECTION;}
public void affectCharStats(MOB affected, CharStats affectableStats)
{
super.affectCharStats(affected,affectableStats);
if((affected!=null)&&(CMLib.flags().isGood(affected)))
{
int amount=(int)Math.round(CMath.mul(CMath.div(proficiency(),100.0),affected.phyStats().level()+(2*getXLEVELLevel(invoker))));
for(int i : CharStats.CODES.SAVING_THROWS())
affectableStats.setStat(i,affectableStats.getStat(i)+amount);
}
}
}
| [
"Cocanuta@Gmail.com"
] | Cocanuta@Gmail.com |
8a2b28eb837242f89b1bcdacc250e674732c6191 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /api-vs-impl-small/app/src/main/java/org/gradle/testapp/performancenull_36/Productionnull_3535.java | d42961bf4f53db6cb7a5b8d2efd9f46d7b91d91a | [] | 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 | 588 | java | package org.gradle.testapp.performancenull_36;
public class Productionnull_3535 {
private final String property;
public Productionnull_3535(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
350f7688ead589d7a342e024f54f225a4fad416a | 8a787e93fea9c334122441717f15bd2f772e3843 | /odfdom/src/main/java/org/odftoolkit/odfdom/dom/element/chart/ChartStockGainMarkerElement.java | 748bef5f437a3ab20bb63cc9c7bb7f6d77d6a39b | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"W3C",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | apache/odftoolkit | 296ea9335bfdd78aa94829c915a6e9c24e5b5166 | 99975f3be40fc1c428167a3db7a9a63038acfa9f | refs/heads/trunk | 2023-07-02T16:30:24.946067 | 2018-10-02T11:11:40 | 2018-10-02T11:11:40 | 5,212,656 | 39 | 45 | Apache-2.0 | 2018-04-11T11:57:17 | 2012-07-28T07:00:12 | Java | UTF-8 | Java | false | false | 3,637 | java | /************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
*
* Use is subject to license terms.
*
* 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
*
* 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.
*
************************************************************************/
/*
* This file is automatically generated.
* Don't edit manually.
*/
package org.odftoolkit.odfdom.dom.element.chart;
import org.odftoolkit.odfdom.dom.element.OdfStylableElement;
import org.odftoolkit.odfdom.dom.element.OdfStyleableShapeElement;
import org.odftoolkit.odfdom.dom.style.OdfStyleFamily;
import org.odftoolkit.odfdom.pkg.ElementVisitor;
import org.odftoolkit.odfdom.pkg.OdfFileDom;
import org.odftoolkit.odfdom.pkg.OdfName;
import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
import org.odftoolkit.odfdom.dom.attribute.chart.ChartStyleNameAttribute;
/**
* DOM implementation of OpenDocument element {@odf.element chart:stock-gain-marker}.
*
*/
public class ChartStockGainMarkerElement extends OdfStylableElement {
public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.CHART, "stock-gain-marker");
/**
* Create the instance of <code>ChartStockGainMarkerElement</code>
*
* @param ownerDoc The type is <code>OdfFileDom</code>
*/
public ChartStockGainMarkerElement(OdfFileDom ownerDoc) {
super(ownerDoc, ELEMENT_NAME, OdfStyleFamily.Chart, OdfName.newName(OdfDocumentNamespace.CHART, "style-name"));
}
/**
* Get the element name
*
* @return return <code>OdfName</code> the name of element {@odf.element chart:stock-gain-marker}.
*/
public OdfName getOdfName() {
return ELEMENT_NAME;
}
/**
* Receives the value of the ODFDOM attribute representation <code>ChartStyleNameAttribute</code> , See {@odf.attribute chart:style-name}
*
* @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined.
*/
public String getChartStyleNameAttribute() {
ChartStyleNameAttribute attr = (ChartStyleNameAttribute) getOdfAttribute(OdfDocumentNamespace.CHART, "style-name");
if (attr != null) {
return String.valueOf(attr.getValue());
}
return null;
}
/**
* Sets the value of ODFDOM attribute representation <code>ChartStyleNameAttribute</code> , See {@odf.attribute chart:style-name}
*
* @param chartStyleNameValue The type is <code>String</code>
*/
public void setChartStyleNameAttribute(String chartStyleNameValue) {
ChartStyleNameAttribute attr = new ChartStyleNameAttribute((OdfFileDom) this.ownerDocument);
setOdfAttribute(attr);
attr.setValue(chartStyleNameValue);
}
@Override
public void accept(ElementVisitor visitor) {
if (visitor instanceof DefaultElementVisitor) {
DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
defaultVisitor.visit(this);
} else {
visitor.visit(this);
}
}
}
| [
"dev-null@apache.org"
] | dev-null@apache.org |
bd36bb9878196dd7d0d7e1e668c637744532178d | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/model_seeding/88_jopenchart-de.progra.charting.swing.ChartPanel-1.0-9/de/progra/charting/swing/ChartPanel_ESTest_scaffolding.java | cb9c7b41d483dac00d4c8fbd16224fe328e07639 | [] | 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 | 541 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Oct 26 01:11:45 GMT 2019
*/
package de.progra.charting.swing;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class ChartPanel_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
0db96b09e3e2e9e9b6dde710fd7322dcdee4ccdb | 66e2f35b7b56865552616cf400e3a8f5928d12a2 | /src/main/java/com/alipay/api/domain/BailDetailResult.java | 8bd9a23f94307c3b4bb13c15b6df47ea36f03684 | [
"Apache-2.0"
] | permissive | xiafaqi/alipay-sdk-java-all | 18dc797400847c7ae9901566e910527f5495e497 | 606cdb8014faa3e9125de7f50cbb81b2db6ee6cc | refs/heads/master | 2022-11-25T08:43:11.997961 | 2020-07-23T02:58:22 | 2020-07-23T02:58:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,278 | 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-10-11 10:57:08
*/
public class BailDetailResult extends AlipayObject {
private static final long serialVersionUID = 7732834823115669925L;
/**
* 保证金收支金额
*/
@ApiField("amount")
private String amount;
/**
* 保证金类型描述,仅供参考
*/
@ApiField("bail_type")
private String bailType;
/**
* 保证金余额
*/
@ApiField("balance")
private String balance;
/**
* 业务描述,资金收支对应的详细业务场景信息
*/
@ApiField("biz_desc")
private String bizDesc;
/**
* 业务基础订单号,资金收支对应的原始业务订单唯一识别编号
*/
@ApiField("biz_orig_no")
private String bizOrigNo;
/**
* 保证金说明
*/
@ApiField("memo")
private String memo;
/**
* 业务发生时间
*/
@ApiField("trans_dt")
private String transDt;
/**
* 保证金业务流水号
*/
@ApiField("trans_log_id")
private String transLogId;
public String getAmount() {
return this.amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getBailType() {
return this.bailType;
}
public void setBailType(String bailType) {
this.bailType = bailType;
}
public String getBalance() {
return this.balance;
}
public void setBalance(String balance) {
this.balance = balance;
}
public String getBizDesc() {
return this.bizDesc;
}
public void setBizDesc(String bizDesc) {
this.bizDesc = bizDesc;
}
public String getBizOrigNo() {
return this.bizOrigNo;
}
public void setBizOrigNo(String bizOrigNo) {
this.bizOrigNo = bizOrigNo;
}
public String getMemo() {
return this.memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getTransDt() {
return this.transDt;
}
public void setTransDt(String transDt) {
this.transDt = transDt;
}
public String getTransLogId() {
return this.transLogId;
}
public void setTransLogId(String transLogId) {
this.transLogId = transLogId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
1745644822e77dd1d49fba5c3e1d86c55fb3f8e3 | 6b0af00c82ecd16c4251b72331d398c4c7314eba | /server/trunk/balancer-ribbon/src/main/java/com/xplus/server/balancer/ribbon/Application.java | f7c6b9bcdfb4910a1cf76e516da93cd7cea31026 | [
"MIT"
] | permissive | hunny/xplus | 0c918259f9a4c61586cab37081ec793276297b79 | 506b963498bd3196c3d4de95893993dae2688a7d | refs/heads/master | 2021-01-22T23:29:46.425201 | 2018-07-15T04:16:37 | 2018-07-15T04:16:37 | 85,644,862 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 673 | java | package com.xplus.server.balancer.ribbon;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
@SpringBootApplication
@EnableDiscoveryClient
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Bean
@LoadBalanced
public RestTemplate restTemplate() {
return new RestTemplate();
}
}
| [
"huxiong888@163.com"
] | huxiong888@163.com |
224ed7953b92fbbf1736f70ced7cf3d3047a57b5 | 1b599e3a9adee5dd8af011fdf82972824562a872 | /sa_center/sacenter-parent/sacenter-core/src/main/java/com/ai/sacenter/common/UpdbcSystemTfImpl.java | 10f57f152969bb0d23e8fa6464d13ca3b5b5426a | [] | no_license | mtbdc-dy/zhongds01 | e1381d44b0562d576cfdff6b7a5fb7297990a2a4 | ceb5e90d468add16d982f3eb10d5503a7a5c1cea | refs/heads/master | 2020-07-07T10:30:32.012016 | 2019-08-07T08:18:08 | 2019-08-07T08:18:08 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,890 | java | package com.ai.sacenter.common;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.ai.sacenter.SFException;
import com.ai.sacenter.util.CenterUtils;
import com.ai.sacenter.util.ClassUtils;
import com.ai.sacenter.util.SystemUtils;
import com.asiainfo.appframe.ext.exeframe.tf.config.CfgTf;
import com.asiainfo.appframe.ext.exeframe.tf.interfaces.ITfRegister;
import com.asiainfo.appframe.ext.exeframe.tf.interfaces.ITransform;
/**
* <p>Title: ucmframe</p>
* <p>Description: TF数据转移[目标表[服务开通],原表/历史表[调度框架]][路由中心未设置]</p>
* <p>Copyright: Copyright (c) 2011-11-1</p>
* <p>Company: AI(NanJing)</p>
* @author maohuiyun
* @version 2.0
*
*/
public class UpdbcSystemTfImpl extends UpdbcSystemImpl implements ITfRegister,ITransform {
protected final static Log log = LogFactory.getLog( UpdbcSystemTfImpl.class );
protected final static java.util.Map _graphics = new java.util.concurrent.ConcurrentHashMap();
protected final static java.util.Map _center = new java.util.concurrent.ConcurrentHashMap();
protected CfgTf CfgTfInfo = null;
public UpdbcSystemTfImpl() {
super();
}
/**
*
* @param fromUpdbm
* @throws SFException
* @throws Exception
*/
protected void _execute( java.util.HashMap fromUpdbm[] ) throws SFException,Exception{
throw new java.lang.UnsupportedOperationException();
}
/**
* @return the CfgTfInfo
*/
public CfgTf getCfgTfInfo() {
return CfgTfInfo;
}
/* (non-Javadoc)
* @see com.asiainfo.appframe.ext.exeframe.tf.interfaces.ITfRegister#register(java.lang.String)
*/
public void register(String aCfgTfCode) {
String aINDEX = ClassUtils.getINDEX( new String[]{"CFG_TF_$_",aCfgTfCode} );
if( (CfgTfInfo = (CfgTf)_graphics.get( aINDEX ) ) == null ){
synchronized ( _graphics ) {
if( (CfgTfInfo = (CfgTf)_graphics.get( aINDEX ) ) == null ){
java.util.Map fromCenter = null;
try
{
_graphics.put( aINDEX , CfgTfInfo = SystemUtils.ICustom.getISTKCfgTf( aCfgTfCode ) );
fromCenter = CenterUtils.ICustom.getAllRegion();
if( fromCenter != null ) ClassUtils.IMerge.merge( fromCenter, _center );
}
catch( java.lang.Exception exception ){
log.error( exception.getMessage(), exception );
throw new java.lang.RuntimeException( exception.getMessage(), exception );
}
finally{
if( fromCenter != null ){ fromCenter.clear(); fromCenter = null; }
}
}
}
}
}
/* (non-Javadoc)
* @see com.asiainfo.appframe.ext.exeframe.tf.interfaces.ITransform#transform(java.util.HashMap[])
*/
public void transform(java.util.HashMap[] fromUpfwm) throws Exception {
try
{
_execute( fromUpfwm );
}
catch( java.lang.Exception exception ){
log.error( exception.getMessage(), exception );
throw exception;
}
finally{
}
}
}
| [
"1246696804@qq.com"
] | 1246696804@qq.com |
ed8a3030bede8da3b61718930be3886583fc778c | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/25/25_67e566476ed2acc2ccbca4b4166bf4bd172f37d5/ColAllreduce/25_67e566476ed2acc2ccbca4b4166bf4bd172f37d5_ColAllreduce_s.java | fb8307b9bbb717ff41444a55b0e84f5c8a58bb98 | [] | 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 | 8,086 | java | /* $Id$ */
/*
* Created on 19.06.2005
*/
package ibis.mpj;
import ibis.io.BufferedArrayInputStream;
import ibis.io.BufferedArrayOutputStream;
import ibis.io.IbisSerializationInputStream;
import ibis.io.IbisSerializationOutputStream;
import ibis.io.SerializationInput;
import ibis.io.SerializationOutput;
import java.io.IOException;
/**
* Implementation of the collective operation: allreduce.
*/
public class ColAllreduce {
private Object sendbuf = null;
private int sendoffset = 0;
private Object recvbuf = null;
private int recvoffset = 0;
private int count = 0;
private Datatype datatype = null;
private Op op = null;
private Intracomm comm = null;
private int tag = 0;
ColAllreduce(Object sendbuf, int sendoffset, Object recvbuf, int recvoffset, int count, Datatype datatype, Op op, Intracomm comm, int tag) throws MPJException {
this.sendbuf = sendbuf;
this.sendoffset = sendoffset;
this.recvbuf = recvbuf;
this.recvoffset = recvoffset;
this.count = count;
this.datatype = datatype;
this.op = op;
this.comm = comm;
this.tag = tag;
}
// taken from MPICH
protected void call() throws MPJException {
int pof2 = 1;
while (pof2 <= this.comm.size()) pof2 <<= 1;
pof2 >>=1;
int rem = this.comm.size()-pof2;
int newrank = this.comm.rank() -rem;
int mask = 0x1;
int rank = this.comm.rank();
int tempoffset = 0;
Object tempbuf = null;
if (sendbuf instanceof byte[]) {
tempbuf = new byte[((byte[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof char[]) {
tempbuf = new char[((char[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof short[]) {
tempbuf = new short[((short[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof boolean[]) {
tempbuf = new boolean[((boolean[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof int[]) {
tempbuf = new int[((int[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof long[]) {
tempbuf = new long[((long[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof float[]) {
tempbuf = new float[((float[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else if (sendbuf instanceof double[]) {
tempbuf = new double[((double[])this.recvbuf).length];
System.arraycopy(this.sendbuf, this.sendoffset, this.recvbuf, this.recvoffset, this.count * this.datatype.extent());
}
else {
tempbuf = new Object[((Object[])this.recvbuf).length];
StoreBuffer stBuf = new StoreBuffer();
// StoreArrayInputStream sin = null;
SerializationOutput mout = null;
SerializationInput min = null;
StoreOutputStream store_out = new StoreOutputStream(stBuf);
StoreInputStream store_in = new StoreInputStream(stBuf);
ibis.io.DataOutputStream out = out = new BufferedArrayOutputStream(store_out);
ibis.io.DataInputStream in = in = new BufferedArrayInputStream(store_in);
try {
mout = new IbisSerializationOutputStream(out);
min = new IbisSerializationInputStream(in);
for (int i=0; i < count * datatype.extent(); i++) {
mout.writeObject(((Object[])sendbuf)[i+sendoffset]);
}
mout.flush();
for (int i=0; i < count * datatype.extent(); i++) {
((Object[])recvbuf)[i+recvoffset] = min.readObject();
}
}
catch (ClassNotFoundException e) {
throw new MPJException("ClassNotFoundException in Ibis serialization stream");
}
catch (IOException e) {
throw new MPJException("IOException in Ibis serialization stream");
}
}
if (rank < 2*rem) {
if (rank % 2 == 0) { /* even */
this.comm.send(recvbuf, recvoffset, count, datatype, rank+1, this.tag);
/* temporarily set the rank to -1 so that this
process does not pariticipate in recursive
doubling */
newrank = -1;
}
else { /* odd */
this.comm.recv(tempbuf, tempoffset, count, datatype, rank-1, this.tag);
/* do the reduction on received data. since the
ordering is right, it doesn't matter whether
the operation is commutative or not. */
this.op.call(tempbuf, tempoffset, recvbuf, recvoffset, count, datatype);
newrank = rank / 2;
}
}
else /* rank >= 2*rem */
newrank = rank - rem;
if (newrank != -1) {
while (mask < pof2) {
int newdst = newrank ^ mask;
/* find real rank of dest */
int dst = (newdst < rem) ? newdst*2 + 1 : newdst + rem;
/* Send the most current data, which is in recvbuf. Recv
into tmp_buf */
if (this.comm.rank() < dst) {
this.comm.send(recvbuf, recvoffset, count, datatype, dst, this.tag);
this.comm.recv(tempbuf, tempoffset, count, datatype, dst, this.tag);
}
else {
this.comm.recv(tempbuf, tempoffset, count, datatype, dst, this.tag);
this.comm.send(recvbuf, recvoffset, count, datatype, dst, this.tag);
}
/* tempbuf contains data received in this step.
recvbuf contains data accumulated so far */
if (op.isCommute() || (dst < this.comm.rank())) {
/* op is commutative OR the order is already right */
op.call(tempbuf, tempoffset, recvbuf, recvoffset, count, datatype);
}
else {
/* op is noncommutative and the order is not right */
op.call(recvbuf, recvoffset, tempbuf, tempoffset, count, datatype);
/* copy result back into recvbuf */
comm.localcopy1type(tempbuf, tempoffset, recvbuf, recvoffset, count, datatype);
}
mask <<= 1;
}
}
/* In the non-power-of-two case, all odd-numbered */
if (rank < 2*rem) {
if ((rank % 2) != 0) {/* odd */
this.comm.send(recvbuf, recvoffset, count, datatype, rank-1, this.tag);}
else /* even */{
this.comm.recv(recvbuf, recvoffset, count, datatype, rank+1, this.tag);
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
3a6e00bd1249aa3d383b7c2bf4c4ad62f3cd3ab3 | 620a39fe25cc5fbd0ed09218b62ccbea75863cda | /wfj_front/src/tang/tangstore/service/imp/StoreImgService.java | 5fa08d2af4249f12f5b158ff0e9c5f8d1097c7b7 | [] | no_license | hukeling/wfj | f9d2a1dc731292acfc67b1371f0f6933b0af1d17 | 0aed879a73b1349d74948efd74dadd97616d8fb8 | refs/heads/master | 2021-01-16T18:34:47.111453 | 2017-08-12T07:48:58 | 2017-08-12T07:48:58 | 100,095,588 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 478 | java | package tang.tangstore.service.imp;
import tang.tangstore.dao.IStoreImgDao;
import tang.tangstore.pojo.StoreImg;
import tang.tangstore.service.IStoreImgService;
import util.service.BaseService;
public class StoreImgService extends BaseService<StoreImg> implements IStoreImgService {
@SuppressWarnings("unused")
private IStoreImgDao storeImgDao;
public void setStoreImgDao(IStoreImgDao storeImgDao) {
this.baseDao=this.storeImgDao = storeImgDao;
}
}
| [
"hukelingwork@163.com"
] | hukelingwork@163.com |
c1632f3f83010335f84126382a091ae51a391726 | 1c41cd04fa1c004957d110b9d248fb8ca728642a | /evosuite-tests/teapot/pga/Utils_ESTest_scaffolding.java | d9efdd2ca0cc2505a0c8f1fd92dd107142c09479 | [
"Apache-2.0"
] | permissive | dubenju/teapot-pga | 8a82cedd26b131324516cbb9ed3f7389a35b67f6 | 049e90bf8b24e832e01d18c0b383f9242e53968e | refs/heads/master | 2021-07-08T11:09:18.923869 | 2020-06-23T21:45:36 | 2020-06-23T21:45:36 | 102,662,797 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,378 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Jun 18 11:06:08 GMT 2020
*/
package teapot.pga;
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 Utils_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 = "teapot.pga.Utils";
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("file.encoding", "MS932");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "C:\\Users\\benju\\AppData\\Local\\Temp\\");
java.lang.System.setProperty("user.country", "JP");
java.lang.System.setProperty("user.dir", "C:\\Users\\benju\\git\\teapot-pga");
java.lang.System.setProperty("user.home", "C:\\Users\\benju");
java.lang.System.setProperty("user.language", "ja");
java.lang.System.setProperty("user.name", "benju");
java.lang.System.setProperty("user.timezone", "Asia/Tokyo");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Utils_ESTest_scaffolding.class.getClassLoader() ,
"teapot.pga.Options",
"teapot.pga.Utils",
"teapot.pga.SumModel",
"teapot.pga.LocModel",
"teapot.pga.FileModel"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Utils_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"teapot.pga.Utils",
"teapot.pga.LocModel",
"teapot.pga.FileModel",
"teapot.pga.SumModel",
"teapot.pga.Options"
);
}
}
| [
"dubenju@163.com"
] | dubenju@163.com |
9be209e9384835b89ee0034ccf1b66204f8045c5 | fa020b84e7c86a6d29b6f11c404373f30e0889ff | /src/test/java/io/pivotal/cf/nozzle/syslog/SyslogSenderTest.java | 6d0c7dd9fd303dbec13567f02aa0cc5460f4a4e4 | [] | no_license | rpan93/boot-firehose-to-syslog | be0c71f0c2829ebca520cd14ef933d0b93b3c182 | fbd1bc8546cfa95a7f9f3c4cbd31ebf2dc89f795 | refs/heads/master | 2021-06-13T16:44:59.017706 | 2017-02-01T04:33:20 | 2017-02-01T04:33:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 637 | java | package io.pivotal.cf.nozzle.syslog;
import io.pivotal.cf.nozzle.props.SyslogConnectionType;
import io.pivotal.cf.nozzle.props.SyslogProperties;
import org.junit.Test;
public class SyslogSenderTest {
@Test(expected = IllegalStateException.class) //invalid server..
public void testSimpleSendOfMessage() {
SyslogProperties syslogProperties = new SyslogProperties();
syslogProperties.setServer("aNonExistentServer");
syslogProperties.setPort(123);
syslogProperties.setConnectionType(SyslogConnectionType.TCP);
SyslogSender syslogSender = new TcpSyslogSenderImpl(syslogProperties);
syslogSender.sendMessage("hello");
}
}
| [
"biju.kunjummen@gmail.com"
] | biju.kunjummen@gmail.com |
41d13da8053aca5d82f512e1c02704584ad6143d | 2719cab59432235e9529f06b86486e159ed9dd49 | /day-14/src/com/ming1/TestDemo.java | 581a945c7601cf256588c1e7a7ff2365bb2588da | [] | no_license | Magiewire/Employment-class | 86e4aa00a23550156427025ef2ddb9983f72ab87 | fff0233ead3ac485015becf1d3845f86a26fd38c | refs/heads/master | 2022-04-10T13:24:25.682348 | 2020-02-24T03:30:06 | 2020-02-24T03:30:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 723 | java | package com.ming1;
public class TestDemo {
public static void main(String[] args) throws ClassNotFoundException {
// 通过类的静态成员获取
Class clazz1 = Cat.class;
// 进行打印
System.out.println(clazz1);
// 通过类的某个对象,获取class对象
Cat cc = new Cat();
// 获取class
Class clazz2 = cc.getClass();
// 通过静态方法
Class classzz3 = Class.forName("com.ming1.Cat");
// 进行打印
System.out.println(classzz3);
// 进行比较
System.out.println(classzz3 == clazz1);
System.out.println(clazz2 == clazz2);
System.out.println(clazz1 == classzz3);
}
}
| [
"mingming@mingming.email"
] | mingming@mingming.email |
de841628aa5f08429f323ec688019f93de51445a | 293b1640eba7ddc7dd75a14b33b9aaa803caa906 | /src/ec/ssr/functions/Exp.java | 67d9ff61d8a9bf9a4d067089ba8d77c9f9187cd7 | [] | no_license | luizvbo/ssr | a5703087456b3037c64082760c41e98cc31d4dcf | 522ae0b7d72eb60f19cba30b876950871c7ae6db | refs/heads/master | 2020-03-29T20:53:24.718687 | 2016-12-02T00:08:25 | 2016-12-02T00:08:25 | 150,337,098 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,424 | java | /*
Copyright 2006 by Sean Luke
Licensed under the Academic Free License version 3.0
See the file "LICENSE" for more information
*/
package ec.ssr.functions;
import ec.*;
import ec.app.regression.*;
import ec.gp.*;
/*
* Exp.java
*
* Created: Wed Nov 3 18:26:37 1999
* By: Sean Luke
*/
/**
* @author Sean Luke
* @version 1.0
*/
public class Exp extends GPNode implements Function{
public String toString() {
return "exp";
}
public int expectedChildren() {
return 1;
}
public void eval(final EvolutionState state,
final int thread,
final GPData input,
final ADFStack stack,
final GPIndividual individual,
final Problem problem){
RegressionData rd = ((RegressionData)(input));
children[0].eval(state,thread,input,stack,individual,problem);
rd.x = /*Strict*/Math.exp(rd.x);
}
@Override
public double eval(double[] val) {
double evaluated = ((Function)children[0]).eval(val);
return Math.exp(evaluated);
}
@Override
public String print() {
return "exp(" + ((Function)children[0]).print() + ")";
}
@Override
public int getNumNodes() {
return numNodes(GPNode.NODESEARCH_ALL);
}
}
| [
"luiz.vbo@gmail.com"
] | luiz.vbo@gmail.com |
1de48b1b9739c061aaf41b1d0be7a1a50142a629 | e2ccf3562798013294e7f93cebea937c5fe35414 | /rpiVertx-sensors/src/main/java/ch/trivadis/com/sensors/I2cPin.java | 54779f47737aa4661792d1c54065fe6783be5346 | [
"Apache-2.0"
] | permissive | amoAHCP/rpiIncubator | 0b40b3d70ea80df92721fa726cc8cef609d9057d | ee45404ab30c69cd94243f0a809398d05b2ce817 | refs/heads/master | 2020-05-20T16:13:55.490965 | 2015-07-07T05:54:26 | 2015-07-07T05:54:26 | 34,278,444 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 832 | java | package ch.trivadis.com.sensors;
import java.io.IOException;
/**
* A pin on the GrovePi board for a digital Grove device.
*
* The Grove device attached to this pin is not an I2C device. The GrovePi uses
* I2C communication to instruct the built in Arduino to read or write data to a
* GrovePi pin.
*
* @author Johannes Bergmann
*/
public class I2cPin extends GrovePi.Pin {
I2cPin(GrovePi grovePi, int pin) throws IOException {
super(grovePi, pin);
}
public byte[] read(int numberOfBytes) throws IOException {
return grovePi.readI2c(numberOfBytes);
}
public void write(int... bytes) throws IOException {
grovePi.writeI2c(bytes);
}
public void writeCommand(int command) throws IOException {
write(command, pin, 0, 0);
}
public void sleep(int msec) throws IOException {
GrovePi.sleep(msec);
}
}
| [
"amo.ahcp@gmail.com"
] | amo.ahcp@gmail.com |
c7bbf94abc727582286b989f468fbf008de0bf36 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-12482-7-10-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/query/internal/DefaultQueryExecutorManager_ESTest_scaffolding.java | 7369c4a70801822a6417c9244b3feda37649180e | [] | 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 | 456 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 18:41:14 UTC 2020
*/
package org.xwiki.query.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultQueryExecutorManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
00d254f836155112028c97ecac226203540ff873 | 776f7a8bbd6aac23678aa99b72c14e8dd332e146 | /src/com/google/android/gms/common/server/response/zzc.java | a32e5c6c34db7cd44555bfff2720588d03733003 | [] | no_license | arvinthrak/com.nianticlabs.pokemongo | aea656acdc6aa419904f02b7331f431e9a8bba39 | bcf8617bafd27e64f165e107fdc820d85bedbc3a | refs/heads/master | 2020-05-17T15:14:22.431395 | 2016-07-21T03:36:14 | 2016-07-21T03:36:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,885 | java | package com.google.android.gms.common.server.response;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zza.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
import java.util.ArrayList;
public class zzc
implements Parcelable.Creator<FieldMappingDictionary>
{
static void zza(FieldMappingDictionary paramFieldMappingDictionary, Parcel paramParcel, int paramInt)
{
paramInt = zzb.zzaq(paramParcel);
zzb.zzc(paramParcel, 1, paramFieldMappingDictionary.getVersionCode());
zzb.zzc(paramParcel, 2, paramFieldMappingDictionary.zzpS(), false);
zzb.zza(paramParcel, 3, paramFieldMappingDictionary.zzpT(), false);
zzb.zzI(paramParcel, paramInt);
}
public FieldMappingDictionary zzax(Parcel paramParcel)
{
String str = null;
int j = zza.zzap(paramParcel);
int i = 0;
ArrayList localArrayList = null;
while (paramParcel.dataPosition() < j)
{
int k = zza.zzao(paramParcel);
switch (zza.zzbM(k))
{
default:
zza.zzb(paramParcel, k);
break;
case 1:
i = zza.zzg(paramParcel, k);
break;
case 2:
localArrayList = zza.zzc(paramParcel, k, FieldMappingDictionary.Entry.CREATOR);
break;
case 3:
str = zza.zzp(paramParcel, k);
}
}
if (paramParcel.dataPosition() != j) {
throw new zza.zza("Overread allowed size end=" + j, paramParcel);
}
return new FieldMappingDictionary(i, localArrayList, str);
}
public FieldMappingDictionary[] zzbV(int paramInt)
{
return new FieldMappingDictionary[paramInt];
}
}
/* Location:
* Qualified Name: com.google.android.gms.common.server.response.zzc
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
e66edb7c47f11f083921c7a3131bf01ecdb51efe | ce0e785348eccfbe071648e1a32ba7b9b74ead60 | /guoren-market-web-springboot/src/main/java/com/gop/common/CommonController.java | 8ca56aea40e0270a78142eb030e177bb8a2679a3 | [] | no_license | littleOrange8023/market | 0c279e8dd92db4dd23e20aeff037e4b2998f9e0e | 093ce8850624061bb6e51dd064b606c82fccbadd | refs/heads/master | 2020-04-19T11:05:11.191298 | 2019-01-25T07:04:27 | 2019-01-25T07:04:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,290 | java | package com.gop.common;
import com.alibaba.fastjson.JSON;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Strings;
import com.gop.authentication.service.UserResourceManagerService;
import com.gop.code.consts.CommonCodeConst;
import com.gop.common.Environment.EnvironmentEnum;
import com.gop.conetxt.EnvironmentContxt;
import com.gop.domain.UserUploadResourceLog;
import com.gop.exception.AppException;
import com.gop.uploadLog.UserUploadResourcLogService;
import com.gop.web.base.annotation.AuthForHeader;
import com.gop.web.base.auth.AuthContext;
import com.gop.web.base.auth.annotation.Strategy;
import com.gop.web.base.auth.annotation.Strategys;
import lombok.extern.slf4j.Slf4j;
@Controller
@RequestMapping("/common")
@Slf4j
public class CommonController {
public static JSONObject json;
public static ScheduledExecutorService sche = Executors.newScheduledThreadPool(10);
@Autowired
private RestTemplate restTemplate;
/**
* Description:获取图片
*
* @return 返回状态
* @see
*/
// 七牛的实现
@Autowired
@Qualifier("ImageQiniuServiceImpl")
private UserResourceManagerService userResourceManagerServiceqiNiu;
@Autowired
@Qualifier("MongoManagerServiceImpl")
private UserResourceManagerService userResourceManagerServicemongo;
@Autowired
@Qualifier("UserUploadResourcLogServiceImpl")
private UserUploadResourcLogService uploadLogService;
@Autowired
private EnvironmentContxt environmentContxt;
@PostConstruct
public void init() {
sche.scheduleWithFixedDelay(() -> {
try {
json = restTemplate.getForEntity("https://api.bitfinex.com/v1/pubticker/BTCUSD", JSONObject.class)
.getBody();
} catch (RestClientException e) {
log.error("查询usdbtc异常", e);
}
}, 0, 10, TimeUnit.MINUTES);
}
@PreDestroy
public void destory() {
if (!sche.isShutdown()) {
sche.shutdownNow();
}
}
/**
* 获取图片
*
* @param name
* @param resp
*/
@RequestMapping(value = "/photo", method = RequestMethod.GET)
public void getPhoto(@RequestParam("name") String name, HttpServletResponse resp,
@AuthForHeader AuthContext context) {
JSONObject json = new JSONObject();
InputStream imageStream = null;
if (environmentContxt.getSystemEnvironMent().equals(EnvironmentEnum.CHINA)) {
imageStream = userResourceManagerServiceqiNiu.getResourcesWithPrivateStream(name);
} else {
imageStream = userResourceManagerServicemongo.getResourcesWithPrivateStream(name);
}
if (imageStream == null) {
try {
resp.getOutputStream().close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// json.put("base64", resources);
// return json;
try {
byte[] buffer = new byte[1024];
// BufferedInputStream b = new BufferedInputStream(imageStream);
int len = -1;
while ((len = imageStream.read(buffer)) != -1) {
resp.getOutputStream().write(buffer, 0, len);
}
} catch (Exception e) {
// TODO: handle exception
} finally {
try {
resp.getOutputStream().close();
if (imageStream != null) {
imageStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
// return imageStream;
}
/**
* 上传图片
*
* @param context
* @param file
* @param imageTag
* 图片参数,区分七牛存储空间
* @return
*/
@Strategys(strategys = @Strategy(authStrategy = "exe({{'checkLoginStrategy'}})"))
@RequestMapping(value = "/upload-photo/{imageTag}", method = RequestMethod.POST)
@ResponseBody
public JSONObject uploadPhoto(@AuthForHeader AuthContext context, @RequestParam("file") MultipartFile file,
@PathVariable(value = "imageTag", required = false) String imageTag) {
if (Strings.isNullOrEmpty(imageTag)) {
imageTag = "public";
}
Integer uid = context.getLoginSession().getUserId();
log.info(file.getContentType());
if (file == null || file.isEmpty()) {
log.error("上传文件为空!");
throw new AppException(CommonCodeConst.FIELD_ERROR, null);
}
String tag = null;
try {
if ("private".equals(imageTag)) {
tag = userResourceManagerServicemongo.saveResourcesWithPrivate(file.getInputStream());
} else if ("public".equals(imageTag)) {
tag = userResourceManagerServicemongo.saveResourcesWithPublic(file.getInputStream());
}
UserUploadResourceLog log = new UserUploadResourceLog();
log.setUid(uid);
log.setTag(tag);
log.setDatatype("string");
log.setSoucre(imageTag);
log.setCreatetime(new Date());
log.setUpdatetime(new Date());
log.setStoretype("qiniu");
uploadLogService.loggingUserUpload(log);
} catch (IOException e) {
throw new AppException(CommonCodeConst.SERVICE_ERROR);
}
if (tag == null) {
throw new AppException(CommonCodeConst.SERVICE_ERROR);
}
JSONObject json = new JSONObject();
json.put("name", tag);
// 返回json字符串给前端,dto等以后再改
return json;
}
@RequestMapping(value = "/usdbtc", method = RequestMethod.GET)
@ResponseBody
public JSONObject getBit() {
return json;
}
}
| [
"ydq@yangdongqiongdeMacBook-Air.local"
] | ydq@yangdongqiongdeMacBook-Air.local |
848784add9a1007b52eb2c2c1335f7dd69f951ae | c2091a77af5174dc04426414d76a2c3f474fcaae | /spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/test/webmvc/FamilyRepository.java | 96ebc1492aca9f711249588dd935ea696c095b5c | [
"Apache-2.0"
] | permissive | fvarg00/spring-data-rest | 4661913a46bbd289612b8ba067e8e7aeba2f7498 | 269d6f5983b73971f7a7a70dc409a520a8d8421c | refs/heads/master | 2021-01-18T12:01:05.077404 | 2012-11-27T16:43:22 | 2012-11-27T16:43:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 241 | java | package org.springframework.data.rest.test.webmvc;
import org.springframework.data.repository.CrudRepository;
/**
* @author Jon Brisbin <jon@jbrisbin.com>
*/
public interface FamilyRepository
extends CrudRepository<Family, Long> {
}
| [
"jon@jbrisbin.com"
] | jon@jbrisbin.com |
5b00ba0a3b579b3a31b0a9e5ac6edcc26e7a44c4 | 7ab398058a931ade5be64e474643127e1c5f72fe | /精灵之泉/src/main/java/com/sxbwstxpay/activity/YouHuiQuanActivity.java | 8ccf3c342edd791b0a0bfd3d445880756b6fd264 | [] | no_license | liuzgAs/JingLingZhiQuan | a7e4cadaddd5f799ea347729c771d1c9be6492b0 | 89d365cf1f2b653c3f3e9630e0d140d230ba0f6f | refs/heads/master | 2020-03-11T01:05:53.682687 | 2019-04-19T11:38:56 | 2019-04-19T11:38:56 | 129,681,484 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,020 | java | package com.sxbwstxpay.activity;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.jude.easyrecyclerview.EasyRecyclerView;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter;
import com.jude.easyrecyclerview.decoration.DividerDecoration;
import com.sxbwstxpay.R;
import com.sxbwstxpay.base.MyDialog;
import com.sxbwstxpay.base.ZjbBaseActivity;
import com.sxbwstxpay.constant.Constant;
import com.sxbwstxpay.model.CouponIndex;
import com.sxbwstxpay.model.OkObject;
import com.sxbwstxpay.util.ApiClient;
import com.sxbwstxpay.util.GsonUtils;
import com.sxbwstxpay.util.LogUtil;
import com.sxbwstxpay.viewholder.YouHuiQuanViewHolder;
import java.util.HashMap;
import java.util.List;
import okhttp3.Response;
public class YouHuiQuanActivity extends ZjbBaseActivity implements View.OnClickListener, SwipeRefreshLayout.OnRefreshListener {
private EasyRecyclerView recyclerView;
private RecyclerArrayAdapter<CouponIndex.DataBean> adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_you_hui_quan);
init(YouHuiQuanActivity.class);
}
@Override
protected void initSP() {
}
@Override
protected void initIntent() {
}
@Override
protected void findID() {
recyclerView = (EasyRecyclerView) findViewById(R.id.recyclerView);
}
@Override
protected void initViews() {
((TextView)findViewById(R.id.textViewTitle)).setText("优惠券");
initRecycler();
}
/**
* 初始化recyclerview
*/
private void initRecycler() {
recyclerView.setLayoutManager(new LinearLayoutManager(this));
DividerDecoration itemDecoration = new DividerDecoration(Color.TRANSPARENT, (int) getResources().getDimension(R.dimen.line_width), 0, 0);
itemDecoration.setDrawLastItem(false);
recyclerView.addItemDecoration(itemDecoration);
recyclerView.setRefreshingColorResources(R.color.basic_color);
recyclerView.setAdapterWithProgress(adapter = new RecyclerArrayAdapter<CouponIndex.DataBean>(YouHuiQuanActivity.this) {
@Override
public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
int layout = R.layout.item_youhuiquan;
return new YouHuiQuanViewHolder(parent, layout);
}
});
adapter.setMore(R.layout.view_more, new RecyclerArrayAdapter.OnMoreListener() {
@Override
public void onMoreShow() {
ApiClient.post(YouHuiQuanActivity.this, getOkObject(), new ApiClient.CallBack() {
@Override
public void onSuccess(String s) {
LogUtil.LogShitou("DingDanGLActivity--加载更多", s+"");
try {
page++;
CouponIndex couponIndex = GsonUtils.parseJSON(s, CouponIndex.class);
int status = couponIndex.getStatus();
if (status == 1) {
List<CouponIndex.DataBean> dataBeanList = couponIndex.getData();
adapter.addAll(dataBeanList);
} else if (status == 3) {
MyDialog.showReLoginDialog(YouHuiQuanActivity.this);
} else {
adapter.pauseMore();
}
} catch (Exception e) {
adapter.pauseMore();
}
}
@Override
public void onError(Response response) {
adapter.pauseMore();
}
});
}
@Override
public void onMoreClick() {
}
});
adapter.setNoMore(R.layout.view_nomore, new RecyclerArrayAdapter.OnNoMoreListener() {
@Override
public void onNoMoreShow() {
}
@Override
public void onNoMoreClick() {
}
});
adapter.setError(R.layout.view_error, new RecyclerArrayAdapter.OnErrorListener() {
@Override
public void onErrorShow() {
adapter.resumeMore();
}
@Override
public void onErrorClick() {
adapter.resumeMore();
}
});
adapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
}
});
recyclerView.setRefreshListener(this);
}
@Override
protected void setListeners() {
findViewById(R.id.imageBack).setOnClickListener(this);
}
@Override
protected void initData() {
onRefresh();
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.imageBack:
finish();
break;
default:
break;
}
}
int page =1;
/**
* des: 网络请求参数
* author: ZhangJieBo
* date: 2017/8/28 0028 上午 9:55
*/
private OkObject getOkObject() {
String url = Constant.HOST + Constant.Url.COUPON_INDEX;
HashMap<String, String> params = new HashMap<>();
if (isLogin) {
params.put("uid", userInfo.getUid());
params.put("tokenTime",tokenTime);
}
params.put("p", String.valueOf(page));
return new OkObject(params, url);
}
@Override
public void onRefresh() {
page =1;
ApiClient.post(this, getOkObject(), new ApiClient.CallBack() {
@Override
public void onSuccess(String s) {
LogUtil.LogShitou("", s);
try {
page++;
CouponIndex couponIndex = GsonUtils.parseJSON(s, CouponIndex.class);
if (couponIndex.getStatus() == 1) {
List<CouponIndex.DataBean> dataBeanList = couponIndex.getData();
adapter.clear();
adapter.addAll(dataBeanList);
} else if (couponIndex.getStatus()== 3) {
MyDialog.showReLoginDialog(YouHuiQuanActivity.this);
} else {
showError(couponIndex.getInfo());
}
} catch (Exception e) {
showError("数据出错");
}
}
@Override
public void onError(Response response) {
showError("网络出错");
}
/**
* 错误显示
* @param msg
*/
private void showError(String msg) {
try {
View viewLoader = LayoutInflater.from(YouHuiQuanActivity.this).inflate(R.layout.view_loaderror, null);
TextView textMsg = (TextView) viewLoader.findViewById(R.id.textMsg);
textMsg.setText(msg);
viewLoader.findViewById(R.id.buttonReLoad).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
recyclerView.showProgress();
initData();
}
});
recyclerView.setErrorView(viewLoader);
recyclerView.showError();
} catch (Exception e) {
}
}
});
}
}
| [
"530092772@qq.com"
] | 530092772@qq.com |
5577d1d6cd65eabfa88bd076623d8f76f3dce0f4 | becfc02168247c141747ef5a52ce10dc581ab0bc | /playwd-root/playwd-ui/src/main/java/cn/gyyx/playwd/ui/viewmodule/ArticleInstertModule.java | 00aa41ebb0edc9afa5684d3685645941e7154381 | [] | no_license | wangqingxian/springBoot | 629d71200f2f62466ac6590924d49bd490601276 | 0efcd6ed29816c31f2843a24d9d6dc5d1c7f98d2 | refs/heads/master | 2020-04-22T02:42:01.757523 | 2017-06-08T10:56:51 | 2017-06-08T10:56:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,887 | java | package cn.gyyx.playwd.ui.viewmodule;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotBlank;
public class ArticleInstertModule {
@NotBlank(message = "invalid-title|标题不能为空")
private String title;
@NotNull(message = "invalid-categoryId|二级分类不可为空")
private Integer categoryId;
@NotBlank(message = "invalid-author|作者名称不可为空")
private String author;
@NotBlank(message = "invalid-content|编辑内容不可为空")
private String content;
@NotBlank(message = "invalid-cover|图片不可为空")
private String cover;
@NotBlank(message = "invalid-summary|描述不可为空")
private String summary;
@NotBlank(message = "invalid-keywords|关键词不可为空")
private String keywords;
@NotNull(message = "invalid-serverId|服务器ID不可为空")
private Integer serverId;
@NotBlank(message = "invalid-serverName|服务器名称不可为空")
private String serverName;
@NotNull(message = "invalid-netId|网络ID不可为空")
private Integer netId;
//@NotBlank(message = "invalid-netName|网络名称不可为空")
private String netName;
public String getTitle() {
return title;
}
public Integer getNetId() {
return netId;
}
public void setNetId(Integer netId) {
this.netId = netId;
}
public String getNetName() {
return netName;
}
public void setNetName(String netName) {
this.netName = netName;
}
public void setTitle(String title) {
this.title = title;
}
public Integer getCategoryId() {
return categoryId;
}
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCover() {
return cover;
}
public void setCover(String cover) {
this.cover = cover;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
public Integer getServerId() {
return serverId;
}
public void setServerId(Integer serverId) {
this.serverId = serverId;
}
public String getServerName() {
return serverName;
}
public void setServerName(String serverName) {
this.serverName = serverName;
}
}
| [
"lihu@gyyx.cn"
] | lihu@gyyx.cn |
44f81e1987e7a4b149d96ad35af02c1471578572 | 9f907527f44fdfc33b5add9f8d313bbeb96d1192 | /src/uva/volume118/CD.java | cdebb7ffab8ef07ceadd62299d5eebc12741a56d | [] | no_license | kocko/algorithms | 7af7052b13a080992dcfbff57171a2cac7c50c67 | 382b6b50538220a26e1af1644e72a4e1796374b6 | refs/heads/master | 2023-08-03T21:15:27.070471 | 2023-08-03T14:39:45 | 2023-08-03T14:39:45 | 45,342,667 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,158 | java | package uva.volume118;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
import static java.lang.Integer.max;
public class CD implements Closeable {
private InputReader in = new InputReader(System.in);
private PrintWriter out = new PrintWriter(System.out);
public void solve() {
int n, m;
while ((n = in.ni()) != 0 | (m = in.ni()) != 0) {
Set<Long> set = new HashSet<>();
for (int i = 0; i < n; i++) {
set.add(in.nl() - 1);
}
int result = 0;
for (int i = 0; i < m; i++) {
if (set.contains(in.nl() - 1)) result++;
}
out.println(result);
}
}
@Override
public void close() throws IOException {
in.close();
out.close();
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int ni() {
return Integer.parseInt(next());
}
public long nl() {
return Long.parseLong(next());
}
public void close() throws IOException {
reader.close();
}
}
public static void main(String[] args) throws IOException {
try (CD instance = new CD()) {
instance.solve();
}
}
}
| [
"konstantin.yovkov@tis.biz"
] | konstantin.yovkov@tis.biz |
9cbbd14cfa27f2d3db1fc061f7e8989b69500099 | 62ab8c6f006bd139a98bf013d360a13e6b936ea0 | /Core_Java/in28Minutes/src/main/java/com/in28Minutes/oops/level2/FanRunner.java | c97fb095a2762a189e692755caad7747a17be3ec | [] | no_license | sagarrao1/in28Minutes | 1ce1f89d1ef623b38773bad02db1b97f3821d322 | 8a9bf2e3520f8280366db00943afbef55f256c97 | refs/heads/master | 2023-08-10T14:41:30.272595 | 2023-07-20T04:28:36 | 2023-07-20T04:28:36 | 230,353,633 | 0 | 0 | null | 2022-12-16T06:37:14 | 2019-12-27T01:46:36 | Java | UTF-8 | Java | false | false | 576 | java | package com.in28Minutes.oops.level2;
public class FanRunner {
public static void main(String[] args) {
Fan fan1 = new Fan("Crompton", "black", 7.50);
System.out.println("first :" + fan1);
fan1.swicthOn();
System.out.println("Switch on:" + fan1);
fan1.swicthOff();
System.out.println("SwitchOff:" + fan1);
fan1.setSpeed((byte) 3); // speed can 1.. 5
System.out.println("set Speed:" + fan1);
fan1.swicthOn();
System.out.println("Switch on:" + fan1);
fan1.setSpeed((byte) 5); // speed can 1.. 5
System.out.println("set Speed:" + fan1);
}
}
| [
"sagarrao1@gmail.com"
] | sagarrao1@gmail.com |
453f86c0cfa2cbd2ee0521365c407b42d47962f6 | 5b7f0c9be2d2a003597aa7946d772f37241866a5 | /test/timetable/extra/FlowEditFormTest.java | 9bbe331dd0f813270fce7b36db591b91acacc77b | [] | no_license | oleggye/BSAC | 8803b87036c3491a1da3d1c05c1d38601bcb6193 | 0927d9821f0f1332c714740159fe1b2da7c5f1bb | refs/heads/master | 2020-06-01T22:47:00.709311 | 2017-08-02T14:11:56 | 2017-08-02T14:11:56 | 94,086,805 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 430 | java | package timetable.extra;
import javax.swing.JDialog;
import by.bsac.timetable.view.extra.FlowEditForm;
public class FlowEditFormTest {
private static final FlowEditFormTest test = new FlowEditFormTest();
public static void main(String[] args) {
test.test();
}
public void test() {
FlowEditForm dialog = new FlowEditForm();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
}
} | [
"4ydak2008@gmail.com"
] | 4ydak2008@gmail.com |
3c7d1e12acdf5d6f04b7380d75855f7ade22ccd1 | 84dda14fb8eece4f7ebed3b9fa253531e02d114b | /tests/common/com/android/documentsui/testing/TestPredicate.java | ca594827a6154c241c424dbed22bf0e24b1b56a1 | [] | no_license | Ankits-lab/packages_apps_DocumentsUI | 90c04addfc4b78f8c554cfa5e459e8a30aad8662 | 33893178a5e4586798706031f165dcda58d1afd2 | refs/heads/main | 2023-01-12T03:40:56.461032 | 2020-11-14T10:43:21 | 2020-11-14T10:43:21 | 312,795,942 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,259 | java | /*
* Copyright (C) 2016 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.documentsui.testing;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Predicate;
import javax.annotation.Nullable;
/**
* Test {@link Predicate} that can be used to spy on, control responses from,
* and make assertions against values tested.
*/
public class TestPredicate<T> implements Predicate<T> {
private final CompletableFuture<T> mFuture = new CompletableFuture<>();
private @Nullable T mLastValue;
private boolean mNextReturnValue;
private boolean mCalled;
@Override
public boolean test(T t) {
mCalled = true;
mLastValue = t;
mFuture.complete(t);
return mNextReturnValue;
}
public void assertLastArgument(@Nullable T expected) {
assertEquals(expected, mLastValue);
}
public void assertCalled() {
assertTrue(mCalled);
}
public void assertNotCalled() {
assertFalse(mCalled);
}
public void nextReturn(boolean value) {
mNextReturnValue = value;
}
public @Nullable T waitForCall(int timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
return mFuture.get(timeout, unit);
}
public @Nullable T getLastValue() {
return mLastValue;
}
}
| [
"keneankit01@gmail.com"
] | keneankit01@gmail.com |
fc1ba90231f1783e1e0e45231168714316b0a640 | d0c4364fe35d4cebc9787bfd52e1a9a40fa8b8c1 | /paypal/src/com/ebay/api/ButtonSearchResultType.java | 3f7b283d1153f4cb3b39d54cd9aef64d9d449cc0 | [] | no_license | vamshivushakola/Asian-Paints-Everything | 6f92b153474b1c5416821846867319bb1719e845 | 2a7147537aebf5b58ed94902ba6fbc72595c7134 | refs/heads/master | 2021-01-20T20:52:21.611576 | 2016-07-16T18:21:01 | 2016-07-16T18:21:01 | 63,496,094 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,715 | java |
package com.ebay.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
/**
* <p>Java class for ButtonSearchResultType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ButtonSearchResultType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="HostedButtonID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ButtonType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ItemName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ModifyDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ButtonSearchResultType", propOrder = {
"hostedButtonID",
"buttonType",
"itemName",
"modifyDate"
})
public class ButtonSearchResultType {
@XmlElement(name = "HostedButtonID")
protected String hostedButtonID;
@XmlElement(name = "ButtonType")
protected String buttonType;
@XmlElement(name = "ItemName")
protected String itemName;
@XmlElement(name = "ModifyDate")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar modifyDate;
/**
* Gets the value of the hostedButtonID property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHostedButtonID() {
return hostedButtonID;
}
/**
* Sets the value of the hostedButtonID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHostedButtonID(String value) {
this.hostedButtonID = value;
}
/**
* Gets the value of the buttonType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getButtonType() {
return buttonType;
}
/**
* Sets the value of the buttonType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setButtonType(String value) {
this.buttonType = value;
}
/**
* Gets the value of the itemName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getItemName() {
return itemName;
}
/**
* Sets the value of the itemName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setItemName(String value) {
this.itemName = value;
}
/**
* Gets the value of the modifyDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getModifyDate() {
return modifyDate;
}
/**
* Sets the value of the modifyDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setModifyDate(XMLGregorianCalendar value) {
this.modifyDate = value;
}
}
| [
"vamshi.vshk@gmail.com"
] | vamshi.vshk@gmail.com |
c272302fcb222045c3a37964b4f16dddba3733c2 | 2debba6c9584cc682179c0d51c014523ec41765b | /core/src/main/java/software/amazon/awssdk/client/SdkAsyncClientHandler.java | d969d162bf193721ed93757ff63732c4ae6e9784 | [
"Apache-2.0"
] | permissive | pdcqjw/aws-sdk-java-v2 | 23e976b238fc86a33cc50e7d8f56b11c1a67a0db | 076ac89810aeb7e2ce79610a6861b7f283a9cbe0 | refs/heads/master | 2021-01-02T09:05:05.859205 | 2017-07-28T17:49:11 | 2017-07-28T18:00:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,308 | java | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package software.amazon.awssdk.client;
import java.util.concurrent.CompletableFuture;
import software.amazon.awssdk.AmazonWebServiceRequest;
import software.amazon.awssdk.annotation.Immutable;
import software.amazon.awssdk.annotation.ThreadSafe;
import software.amazon.awssdk.internal.AmazonWebServiceRequestAdapter;
import software.amazon.awssdk.internal.http.response.AwsErrorResponseHandler;
import software.amazon.awssdk.metrics.spi.AwsRequestMetrics;
/**
* Client handler for SDK clients.
*/
@ThreadSafe
@Immutable
public class SdkAsyncClientHandler extends AsyncClientHandler {
private final AsyncClientHandler delegateHandler;
public SdkAsyncClientHandler(ClientHandlerParams handlerParams) {
this.delegateHandler = new AsyncClientHandlerImpl(handlerParams);
}
@Override
public <InputT, OutputT> CompletableFuture<OutputT> execute(
ClientExecutionParams<InputT, OutputT> executionParams) {
return delegateHandler.execute(
addRequestConfig(executionParams)
// TODO this is a hack to get the build working. Also doesn't deal with AwsResponseHandlerAdapter
.withErrorResponseHandler(
new AwsErrorResponseHandler(executionParams.getErrorResponseHandler(), new AwsRequestMetrics())));
}
@Override
public void close() throws Exception {
delegateHandler.close();
}
private <InputT, OutputT> ClientExecutionParams<InputT, OutputT> addRequestConfig(
ClientExecutionParams<InputT, OutputT> params) {
return params.withRequestConfig(new AmazonWebServiceRequestAdapter((AmazonWebServiceRequest) params.getInput()));
}
}
| [
"millem@amazon.com"
] | millem@amazon.com |
3eb1b228e277be921468b9dcd8b9d194bc357c4f | 6f559135d1c0814dd4e520e49093de9db06ab171 | /src/main/java/basic/chapter8/it/DivFactory.java | 8872b030e813d9d646998018a6a717bc8c2ac78f | [] | no_license | sBobHuang/Design-Patterns | c3b2885a05f7cd270a91caebfcecb935935b3c4d | ab0aaa0bb8cff8d31c56ecd648bb254b8de0501c | refs/heads/master | 2022-04-27T23:17:11.366601 | 2020-04-30T07:32:59 | 2020-04-30T07:32:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 246 | java | package basic.chapter8.it;
/**
* @author xiangdotzhaoAtwoqutechcommacom
* @date 2020/4/14
*/
public class DivFactory implements IFactory {
@Override
public BaseOperation createOperation() {
return new OperationDiv();
}
}
| [
"xiangflight@foxmail.com"
] | xiangflight@foxmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.