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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e01f370c5c294d179f9c3a90bed3009ceee87c0a
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/95/org/apache/commons/math/linear/RealMatrixImpl_getColumnDimension_759.java
|
93d9e0a57adad2fcdd780de6b478e61c40474aab
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,086
|
java
|
org apach common math linear
implement real matrix realmatrix arrai store entri
href http www math gatech bourbaki math2601 web note 2num pdf
decomposit support linear system
solut invers
decomposit perform need support oper
solv
singular issingular
determin getdetermin
invers
strong usag note strong
decomposit cach reus subsequ call
data modifi refer underli arrai obtain
code data ref getdataref code store decomposit
discard explicitli invok
code decompos ludecompos code recomput decomposit
method
link real matrix realmatrix matrix element index
base code entri getentri code
return element row column matrix
version revis date
real matrix impl realmatriximpl real matrix realmatrix serializ
column dimens columndimens
column dimens getcolumndimens
data length
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
63f21dc75bfab9ce37bb553759016f62e66f3ad3
|
380a44fcc5b4c0b40e3c50ccd9421220576b822d
|
/services/client/src/main/java/shop/OrderLineDTO.java
|
9ded3a3e26ec21c180b718a61302486d616cbdeb
|
[] |
no_license
|
paulatumwine/SWA
|
2958671713d6b4e10339855093e08f16cb574ba5
|
fa17d4031be4e421debc6a075f3c23b92022ef27
|
refs/heads/master
| 2023-02-16T01:37:30.797002
| 2021-01-10T02:13:31
| 2021-01-10T02:13:31
| 308,220,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 337
|
java
|
package shop;
public class OrderLineDTO {
int quantity;
ProductDTO product;
public ProductDTO getProduct() {
return product;
}
public void setProduct(ProductDTO product) {
this.product = product;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
}
|
[
"paulatumwine@gmail.com"
] |
paulatumwine@gmail.com
|
da7c621e196a40d85e9c4d2d858b3cb7ed6b6836
|
022980735384919a0e9084f57ea2f495b10c0d12
|
/src/ext-lltnxp/ext-impl/src/com/sgs/portlet/permissonuserbyfile/util/PermissionUserByFileSearchUtil.java
|
cb9c73159896a14ef1afeec498f8cf3305b7f820
|
[] |
no_license
|
thaond/nsscttdt
|
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
|
ae7dacc924efe578ce655ddfc455d10c953abbac
|
refs/heads/master
| 2021-01-10T03:00:24.086974
| 2011-02-19T09:18:34
| 2011-02-19T09:18:34
| 50,081,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
package com.sgs.portlet.permissonuserbyfile.util;
import com.liferay.portal.kernel.util.OrderByComparator;
public class PermissionUserByFileSearchUtil {
public static OrderByComparator getUserOrderByComparator(
String orderByCol, String orderByType) {
boolean orderByAsc = false;
if (orderByType.equals("asc")) {
orderByAsc = true;
}
OrderByComparator orderByComparator = null;
if (orderByCol.equals("userName")) {
orderByComparator = new PermissionUserNameComparator(orderByAsc);
} else {
orderByComparator = new PermissionUserNameComparator(orderByAsc);
}
return orderByComparator;
}
}
|
[
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] |
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
|
ef32a9eacc462a88a435b8d1fb769a41121d87e3
|
439874522c15194dbf83b63ccdfefeee217ab3c5
|
/java/java-tests/testData/inspection/dataFlow/jspecify/SuperObjectUnspec.java
|
363c8a97e548ce18f31bd622da23d4e075dacce1
|
[
"Apache-2.0"
] |
permissive
|
jbeckers/intellij-community
|
c473f51026be1ffcdd5979c6e750274133b2b847
|
37e4976327f5f5b595a4d20192482f966c9683b6
|
refs/heads/master
| 2023-04-29T11:21:10.165921
| 2023-02-16T07:10:25
| 2023-02-16T07:35:15
| 62,625,846
| 1
| 0
|
Apache-2.0
| 2021-03-18T16:36:09
| 2016-07-05T09:59:44
| null |
UTF-8
|
Java
| false
| false
| 1,559
|
java
|
/*
* Copyright 2020 The JSpecify Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.jspecify.nullness.NullMarked;
import org.jspecify.nullness.Nullable;
import org.jspecify.nullness.NullnessUnspecified;
@NullMarked
class SuperObjectUnspec {
void foo(
Lib<? super @NullnessUnspecified Object> lib,
Object t,
@NullnessUnspecified Object tUnspec,
@Nullable Object tUnionNull) {
lib.useT(t);
// jspecify_nullness_not_enough_information
lib.useT(tUnspec);
// jspecify_nullness_not_enough_information
lib.useT(tUnionNull);
//
lib.useTUnspec(t);
// jspecify_nullness_not_enough_information
lib.useTUnspec(tUnspec);
// jspecify_nullness_not_enough_information
lib.useTUnspec(tUnionNull);
//
lib.useTUnionNull(t);
lib.useTUnionNull(tUnspec);
lib.useTUnionNull(tUnionNull);
}
interface Lib<T extends @Nullable Object> {
void useT(T t);
void useTUnspec(@NullnessUnspecified T t);
void useTUnionNull(@Nullable T t);
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
72111b6d252e1e5ea3d27f1998b58b8f42b641d5
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/org/pentaho/di/repository/pur/PurRepository_RepositoryDirectory_IT.java
|
69be5885963d49cefa0cc60c334931cc82cea8c9
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,534
|
java
|
/**
* !
* Copyright 2016 - 2017 Hitachi Vantara. 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 org.pentaho.di.repository.pur;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.pentaho.di.repository.RepositoryDirectoryInterface;
import org.pentaho.di.repository.RepositoryElementMetaInterface;
import org.pentaho.di.trans.TransMeta;
/**
* Created by nbaker on 1/14/16.
*/
public class PurRepository_RepositoryDirectory_IT extends PurRepositoryTestBase {
private TransMeta transMeta;
private RepositoryDirectoryInterface defaultSaveDirectory;
public PurRepository_RepositoryDirectory_IT(Boolean lazyRepo) {
super(lazyRepo);
}
@Test
public void testGetRepositoryObjectsFirst() throws Exception {
// Try it accessing getRepositoryObjects() first
List<RepositoryElementMetaInterface> repositoryObjects = defaultSaveDirectory.getRepositoryObjects();
Assert.assertEquals(1, repositoryObjects.size());
Assert.assertEquals("Test", repositoryObjects.get(0).getName());
}
@Test
public void testGetChildrenFirst() throws Exception {
// Try it again this time calling getChildren() then getRepositoryObjects()
defaultSaveDirectory.getChildren();
List<RepositoryElementMetaInterface> repositoryObjects = defaultSaveDirectory.getRepositoryObjects();
Assert.assertEquals(1, repositoryObjects.size());
Assert.assertEquals("Test", repositoryObjects.get(0).getName());
}
@Test
public void testGetChildrenThenGetSubDirectory() throws Exception {
// Try it again this time calling getChildren() then getRepositoryObjects()
defaultSaveDirectory.getChildren();
defaultSaveDirectory.getSubdirectory(0);
List<RepositoryDirectoryInterface> children = defaultSaveDirectory.getChildren();
Assert.assertEquals(1, children.size());
Assert.assertEquals("test dir", children.get(0).getName());
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
3e8053a274f5a983226d65a82424016a0b3e5b47
|
f40c5613a833bc38fca6676bad8f681200cffb25
|
/kubernetes-model-generator/openshift-model/src/generated/java/io/fabric8/openshift/api/model/WebhookTokenAuthenticator.java
|
1154daad2d05e091ef2ffdfe9b01dd24b25939ee
|
[
"Apache-2.0"
] |
permissive
|
rohanKanojia/kubernetes-client
|
2d599e4ed1beedf603c79d28f49203fbce1fc8b2
|
502a14c166dce9ec07cf6adb114e9e36053baece
|
refs/heads/master
| 2023-07-25T18:31:33.982683
| 2022-04-12T13:39:06
| 2022-04-13T05:12:38
| 106,398,990
| 2
| 3
|
Apache-2.0
| 2023-04-28T16:21:03
| 2017-10-10T09:50:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,273
|
java
|
package io.fabric8.openshift.api.model;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.IntOrString;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.api.model.LabelSelector;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"kubeConfig"
})
@ToString
@EqualsAndHashCode
@Setter
@Accessors(prefix = {
"_",
""
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = {
@BuildableReference(ObjectMeta.class),
@BuildableReference(LabelSelector.class),
@BuildableReference(Container.class),
@BuildableReference(PodTemplateSpec.class),
@BuildableReference(ResourceRequirements.class),
@BuildableReference(IntOrString.class),
@BuildableReference(ObjectReference.class),
@BuildableReference(LocalObjectReference.class),
@BuildableReference(PersistentVolumeClaim.class)
})
public class WebhookTokenAuthenticator implements KubernetesResource
{
@JsonProperty("kubeConfig")
private SecretNameReference kubeConfig;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public WebhookTokenAuthenticator() {
}
/**
*
* @param kubeConfig
*/
public WebhookTokenAuthenticator(SecretNameReference kubeConfig) {
super();
this.kubeConfig = kubeConfig;
}
@JsonProperty("kubeConfig")
public SecretNameReference getKubeConfig() {
return kubeConfig;
}
@JsonProperty("kubeConfig")
public void setKubeConfig(SecretNameReference kubeConfig) {
this.kubeConfig = kubeConfig;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
|
[
"marc@marcnuri.com"
] |
marc@marcnuri.com
|
bc015eec0d3f78de1770f2bf17641fc7f1e5ca0d
|
b4e6fe7474d0c5fccd7099a52ff4bb941baa6b81
|
/src/main/java/com/qvim/hs/news/JaroWinkler.java
|
48354ee649d810ca2bf9877a088292af055a35d6
|
[] |
no_license
|
RinesThaix/TwitFinance
|
01f2f24f54854d127ea5753e131c2558068e0ed2
|
e96db2e15ecd7c431e810387e1495ba7fb6a8038
|
refs/heads/master
| 2021-01-20T00:04:18.891250
| 2017-04-23T21:14:59
| 2017-04-23T21:14:59
| 89,072,188
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,678
|
java
|
package com.qvim.hs.news;
import java.util.Arrays;
/**
* Created by RINES on 22.04.17.
*/
public class JaroWinkler {
private JaroWinkler() {}
static double similarity(String s1, String s2) {
if (s1 == null)
throw new NullPointerException("s1 must not be null");
if (s2 == null)
throw new NullPointerException("s2 must not be null");
if (s1.equals(s2))
return 1;
int[] mtp = matches(s1, s2);
float m = mtp[0];
if (m == 0)
return 0f;
double j = ((m / s1.length() + m / s2.length() + (m - mtp[1]) / m)) / 3;
return j < 0.7d ? j : j + Math.min(0.1d, 1.0d / mtp[3]) * mtp[2] * (1 - j);
}
static double distance(String s1, String s2) {
return 1.0 - similarity(s1, s2);
}
private static int[] matches(String s1, String s2) {
String max, min;
if (s1.length() > s2.length()) {
max = s1;
min = s2;
} else {
max = s2;
min = s1;
}
int range = Math.max(max.length() / 2 - 1, 0);
int[] matchIndexes = new int[min.length()];
Arrays.fill(matchIndexes, -1);
boolean[] matchFlags = new boolean[max.length()];
int matches = 0;
for (int mi = 0; mi < min.length(); mi++) {
char c1 = min.charAt(mi);
for (int xi = Math.max(mi - range, 0),
xn = Math.min(mi + range + 1, max.length()); xi < xn; xi++) {
if (!matchFlags[xi] && c1 == max.charAt(xi)) {
matchIndexes[mi] = xi;
matchFlags[xi] = true;
matches++;
break;
}
}
}
char[] ms1 = new char[matches];
char[] ms2 = new char[matches];
for (int i = 0, si = 0; i < min.length(); i++) {
if (matchIndexes[i] != -1) {
ms1[si] = min.charAt(i);
si++;
}
}
for (int i = 0, si = 0; i < max.length(); i++) {
if (matchFlags[i]) {
ms2[si] = max.charAt(i);
si++;
}
}
int transpositions = 0;
for (int mi = 0; mi < ms1.length; mi++) {
if (ms1[mi] != ms2[mi]) {
transpositions++;
}
}
int prefix = 0;
for (int mi = 0; mi < min.length(); mi++) {
if (s1.charAt(mi) == s2.charAt(mi)) {
prefix++;
} else {
break;
}
}
return new int[]{matches, transpositions / 2, prefix, max.length()};
}
}
|
[
"iam@kostya.sexy"
] |
iam@kostya.sexy
|
b93a29f8f4c9ea61fa0602cfa812e3e48ba804bb
|
4fe2271293410196af2fe5fa2cc924dba5f9de71
|
/archive/branches/mavenization/src/java/org/skife/jdbi/v2/Binding.java
|
96b3effe4e4f4d43f1c29ac918c510bb1aa07ed9
|
[
"Apache-2.0"
] |
permissive
|
TimVonsee/jdbi
|
888058ae0dca71d33201aceca86eefa568e123b6
|
21a2a38ab60d2cef07029db8e98cf20def45db4c
|
refs/heads/master
| 2020-03-11T15:34:39.734809
| 2011-12-01T18:44:45
| 2011-12-01T18:44:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,253
|
java
|
/*
* Copyright 2004-2006 Brian McCallister
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.skife.jdbi.v2;
import org.skife.jdbi.v2.tweak.Argument;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Represents the arguments bound to a particular statement
*/
public class Binding
{
private Map<Integer, Argument> positionals = new HashMap<Integer, Argument>();
private Map<String, Argument> named = new HashMap<String, Argument>();
private List<LazyArguments> lazyArguments = new ArrayList<LazyArguments>();
void addPositional(int position, Argument parameter)
{
positionals.put(position, parameter);
}
/**
* Look up an argument by name
*
* @param name the key to lookup the value of
* @return the bound Argument
*/
public Argument forName(String name)
{
if (named.containsKey(name))
{
return named.get(name);
}
else
{
for (LazyArguments arguments : lazyArguments)
{
Argument arg = arguments.find(name);
if (arg != null)
{
return arg;
}
}
}
return null;
}
/**
* Look up an argument by position
* @param position starts at 0, not 1
* @return arfument bound to that position
*/
public Argument forPosition(int position)
{
return positionals.get(position);
}
void addNamed(String name, Argument argument)
{
this.named.put(name, argument);
}
void addLazyNamedArguments(LazyArguments args)
{
lazyArguments.add(args);
}
}
|
[
"brianm@bef26512-0eee-0310-aad4-d1eb80de6c02"
] |
brianm@bef26512-0eee-0310-aad4-d1eb80de6c02
|
200a095a131725321ab791d2e9b5351471785fed
|
0205999a193bf670cd9d6e5b37e342b75f4e15b8
|
/spring-jms/src/test/java/org/springframework/jms/support/JmsMessageHeaderAccessorTests.java
|
b46a9643823f3c1a1c6719359d27ef57a374bd90
|
[
"Apache-2.0"
] |
permissive
|
leaderli/spring-source
|
18aa9a8c7c5e22d6faa6167e999ff88ffa211ba0
|
0edd75b2cedb00ad1357e7455a4fe9474b3284da
|
refs/heads/master
| 2022-02-18T16:34:19.625966
| 2022-01-29T08:56:48
| 2022-01-29T08:56:48
| 204,468,286
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,984
|
java
|
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.jms.support;
import org.junit.Test;
import org.springframework.jms.StubTextMessage;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import javax.jms.Destination;
import javax.jms.JMSException;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Stephane Nicoll
*/
public class JmsMessageHeaderAccessorTests {
@Test
public void validateJmsHeaders() throws JMSException {
Destination destination = new Destination() {
};
Destination replyTo = new Destination() {
};
StubTextMessage jmsMessage = new StubTextMessage("test");
jmsMessage.setJMSCorrelationID("correlation-1234");
jmsMessage.setJMSPriority(9);
jmsMessage.setJMSDestination(destination);
jmsMessage.setJMSDeliveryMode(1);
jmsMessage.setJMSExpiration(1234L);
jmsMessage.setJMSMessageID("abcd-1234");
jmsMessage.setJMSPriority(9);
jmsMessage.setJMSReplyTo(replyTo);
jmsMessage.setJMSRedelivered(true);
jmsMessage.setJMSType("type");
jmsMessage.setJMSTimestamp(4567L);
Map<String, Object> mappedHeaders = new SimpleJmsHeaderMapper().toHeaders(jmsMessage);
Message<String> message = MessageBuilder.withPayload("test").copyHeaders(mappedHeaders).build();
JmsMessageHeaderAccessor headerAccessor = JmsMessageHeaderAccessor.wrap(message);
assertThat(headerAccessor.getCorrelationId()).isEqualTo("correlation-1234");
assertThat(headerAccessor.getDestination()).isEqualTo(destination);
assertThat(headerAccessor.getDeliveryMode()).isEqualTo(Integer.valueOf(1));
assertThat(headerAccessor.getExpiration()).isEqualTo(1234);
assertThat(headerAccessor.getMessageId()).isEqualTo("abcd-1234");
assertThat(headerAccessor.getPriority()).isEqualTo(Integer.valueOf(9));
assertThat(headerAccessor.getReplyTo()).isEqualTo(replyTo);
assertThat(headerAccessor.getRedelivered()).isEqualTo(true);
assertThat(headerAccessor.getType()).isEqualTo("type");
assertThat(headerAccessor.getTimestamp()).isEqualTo(4567);
// Making sure replyChannel is not mixed with replyTo
assertThat(headerAccessor.getReplyChannel()).isNull();
}
}
|
[
"429243408@qq.com"
] |
429243408@qq.com
|
8302ac10e34386fd71b0cda269942e45fa1084b2
|
3f233a0146ffb9aba645bbb1622c4babfb8d8f7c
|
/latte-core/src/main/java/com/flj/latte/net/download/DownloadHandler.java
|
737bdb373a4d682f1c100f6715984eec92c08f65
|
[] |
no_license
|
BeiJingLgs/FastEC
|
488a9c276c92a9f8e00713b1a715f9367846dfe6
|
fea4be18712faa8f8d7b7fe85d72534cc87a4010
|
refs/heads/master
| 2020-04-03T14:41:28.221048
| 2018-10-30T05:57:32
| 2018-10-30T05:57:32
| 155,331,009
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,243
|
java
|
package com.flj.latte.net.download;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import com.flj.latte.net.RestCreator;
import com.flj.latte.net.callback.IError;
import com.flj.latte.net.callback.IFailure;
import com.flj.latte.net.callback.IRequest;
import com.flj.latte.net.callback.ISuccess;
import java.util.WeakHashMap;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* Created by 傅令杰 on 2017/4/2
*/
public final class DownloadHandler {
private final String URL;
private final WeakHashMap<String, Object> PARAMS;
private final IRequest REQUEST;
private final String DOWNLOAD_DIR;
private final String EXTENSION;
private final String NAME;
private final ISuccess SUCCESS;
private final IFailure FAILURE;
private final IError ERROR;
public DownloadHandler(String url,
WeakHashMap<String, Object> params,
IRequest request,
String downDir,
String extension,
String name,
ISuccess success,
IFailure failure,
IError error) {
this.URL = url;
this.PARAMS = params;
this.REQUEST = request;
this.DOWNLOAD_DIR = downDir;
this.EXTENSION = extension;
this.NAME = name;
this.SUCCESS = success;
this.FAILURE = failure;
this.ERROR = error;
}
public final void handleDownload() {
if (REQUEST != null) {
REQUEST.onRequestStart();
}
RestCreator
.getRestService()
.download(URL, PARAMS)
.enqueue(new Callback<ResponseBody>() {
@Override
public void onResponse(@NonNull Call<ResponseBody> call, @NonNull Response<ResponseBody> response) {
if (response.isSuccessful()) {
final ResponseBody responseBody = response.body();
final SaveFileTask task = new SaveFileTask(REQUEST, SUCCESS);
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
DOWNLOAD_DIR, EXTENSION, responseBody, NAME);
//这里一定要注意判断,否则文件下载不全
if (task.isCancelled()) {
if (REQUEST != null) {
REQUEST.onRequestEnd();
}
}
} else {
if (ERROR != null) {
ERROR.onError(response.code(), response.message());
}
}
}
@Override
public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) {
if (FAILURE != null) {
FAILURE.onFailure();
}
}
});
}
}
|
[
"gogs@fake.local"
] |
gogs@fake.local
|
4b726fd21880775dba990ff134fbac6af688d079
|
35bcd98e350230015c57971f55f962507895720b
|
/src/com/zen/androidhtmleditor/PreferenceObfuscator.java
|
3c727e0357e6e97224d9f15df8154769d63c728c
|
[] |
no_license
|
mmicky/android-html-editor
|
58494b617b1348eaa9e472330fadec1f3c92f680
|
215d6322cb8c57043fc65bfc490f1dde1ef2ebd0
|
refs/heads/master
| 2020-04-05T18:30:39.179445
| 2015-12-17T17:19:22
| 2015-12-17T17:19:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,400
|
java
|
/*
* Copyright (C) 2010 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.zen.androidhtmleditor;
import android.content.SharedPreferences;
import android.util.Log;
/**
* An wrapper for SharedPreferences that transparently performs data obfuscation.
*/
public class PreferenceObfuscator {
private static final String TAG = "PreferenceObfuscator";
private final SharedPreferences mPreferences;
private final Obfuscator mObfuscator;
private SharedPreferences.Editor mEditor;
/**
* Constructor.
*
* @param sp A SharedPreferences instance provided by the system.
* @param o The Obfuscator to use when reading or writing data.
*/
public PreferenceObfuscator(SharedPreferences sp, Obfuscator o) {
mPreferences = sp;
mObfuscator = o;
mEditor = null;
}
public void putString(String key, String value) {
if (mEditor == null) {
mEditor = mPreferences.edit();
}
String obfuscatedValue = mObfuscator.obfuscate(value, key);
mEditor.putString(key, obfuscatedValue);
}
public String getString(String key, String defValue) {
String result;
String value = mPreferences.getString(key, null);
if (value != null) {
try {
result = mObfuscator.unobfuscate(value, key);
} catch (ValidationException e) {
// Unable to unobfuscate, data corrupt or tampered
Log.w(TAG, "Validation error while reading preference: " + key);
result = defValue;
}
} else {
// Preference not found
result = defValue;
}
return result;
}
public void commit() {
if (mEditor != null) {
mEditor.commit();
mEditor = null;
}
}
}
|
[
"ankurlkw@gmail.com"
] |
ankurlkw@gmail.com
|
2e130136e86975957673b69a6caa074abc726446
|
7d3230a233f12d68ebf357d1e663eef00b941dc0
|
/java/Final_Year/BST/Assignment/BSTPriorityQueue.java
|
8c1d9794cf51013438242a27fb82169da4016c69
|
[] |
no_license
|
OliverMensahDev/system-programming
|
606912ec7ec4f8a44e9a7197b3677c2621b376e8
|
50989b1af65c8ca013f5b456e04fae80f26e8374
|
refs/heads/master
| 2021-09-22T15:48:58.519488
| 2018-06-05T03:54:55
| 2018-06-05T03:54:55
| 135,923,454
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
import java.util.Scanner;
public class BSTPriorityQueue<T>{
BinarySearchTree<Integer> bst = new BinarySearchTree<Integer>();
public Integer get(){
return bst.findMax();
}
public void insert(int item){
bst.insertV2(item);
}
public void remove(int item){
bst.remove(item);
}
public static void main(String []args){
BSTPriorityQueue<Integer> pq = new BSTPriorityQueue<Integer>();
Scanner keyboard = new Scanner(System.in);
String input;
boolean done = false;
System.out.println("Please enter numbers to enter into the tree." +
"Type a non-numerical string when you're done.");
do {
input = keyboard.next();
try {
int n = Integer.parseInt(input);
pq.insert(n);
}
catch (Exception e) {
done = true;
}
} while (!done);
System.out.println( pq.get());
}
}
|
[
"olivermensah96@gmail.com"
] |
olivermensah96@gmail.com
|
58bccc6d4e4c2bfaecdac2b02534e61955887f1e
|
14b497b11196ca5bf170bbed99b54e172404c4ce
|
/src/LeetCode/No106.java
|
4dd8fcd9fd1365fa861242ab4678908d55996fc7
|
[] |
no_license
|
lenfranky/java_learning_lz
|
54a326cf23f3248bd2a5386dd146ec36cbfeeed4
|
619bcf7b4ab60156940260debed3bd9dc8c702ba
|
refs/heads/master
| 2020-04-03T15:43:49.104485
| 2019-06-26T12:24:22
| 2019-06-26T12:24:22
| 155,374,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,269
|
java
|
package LeetCode;
import java.util.HashMap;
import java.util.Map;
public class No106 {
private Map<Integer, Integer> indexMap = new HashMap<>();
public TreeNode buildTree(int[] inorder, int[] postorder) {
for (int i = 0; i < inorder.length; i ++) {
indexMap.put(inorder[i], i);
}
return helper(inorder, postorder, 0, inorder.length - 1, 0, postorder.length - 1);
}
// public static TreeNode helper(int[] inorder, int[] postorder, int inStartIndex, int inEndIndex, int postStartIndex, int postEndIndex) {
// if (inEndIndex < inStartIndex || postEndIndex < postStartIndex) return null;
// int currVal = postorder[postEndIndex];
// TreeNode root = new TreeNode(currVal);
// int currInIndex = -1;
// for (int i = inStartIndex; i <= inEndIndex; i ++) {
// if (inorder[i] == currVal) {
// currInIndex = i;
// break;
// }
// }
// if (currInIndex != -1) {
// root.left = helper(inorder, postorder, inStartIndex, currInIndex - 1, postStartIndex, postStartIndex + (currInIndex - inStartIndex) - 1);
// root.right = helper(inorder, postorder, currInIndex + 1, inEndIndex, postStartIndex + (currInIndex - inStartIndex), postEndIndex - 1);
// }
// return root;
// }
public TreeNode helper(int[] inorder, int[] postorder, int inStartIndex, int inEndIndex, int postStartIndex, int postEndIndex) {
if (inEndIndex < inStartIndex || postEndIndex < postStartIndex) return null;
int currVal = postorder[postEndIndex];
TreeNode root = new TreeNode(currVal);
int currInIndex = indexMap.get(currVal);
if (currInIndex != -1) {
root.left = helper(inorder, postorder, inStartIndex, currInIndex - 1, postStartIndex, postStartIndex + (currInIndex - inStartIndex) - 1);
root.right = helper(inorder, postorder, currInIndex + 1, inEndIndex, postStartIndex + (currInIndex - inStartIndex), postEndIndex - 1);
}
return root;
}
public static void main(String[] args) {
TreeNode root = new No106().buildTree(new int[] {9, 3, 15, 20, 7}, new int[] {9, 15, 7, 20, 3});
TreeOperation.show(root);
}
}
|
[
"327792549@qq.com"
] |
327792549@qq.com
|
759569edf05dc69219688acf28bb04fbb805f009
|
6cd25cba927b89c42317a0c799715fe99c553d27
|
/src/main/java/com/edt/service/IRoleService.java
|
a3b54033e8af3dea741d2abb22d0ab7ff828519c
|
[] |
no_license
|
EDT777/car-business
|
0d08ee7c45d527bd1d49985d29dcd9142987046f
|
4de0548d19a88d0ab66ce1b1e76a10e49e31d419
|
refs/heads/master
| 2023-02-09T17:02:14.038830
| 2021-01-03T09:10:22
| 2021-01-03T09:10:22
| 323,578,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 456
|
java
|
package com.edt.service;
import com.edt.domain.Role;
import com.edt.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import java.util.List;
public interface IRoleService {
void save(Role role, Long[] ids);
void delete(Long id);
void update(Role role, Long[] ids);
Role get(Long id);
List<Role> listAll();
//分页查询方法
PageInfo<Role> query(QueryObject queryobject);
void updateRole(Long id, long roleId);
}
|
[
"1445417290@qq.com"
] |
1445417290@qq.com
|
ba6d89f7452aa0e14fa66abfe4257703a2f7ba77
|
a8a588a8ebe1ee5b20f451fe5e684cc84362ee67
|
/src/main/java/com/athena/component/input/ChejDBDataWriter.java
|
4e39d301883d97ddc1bf10db9574f3a167398ecb
|
[] |
no_license
|
liyq1406/athena-interface-service
|
69b0b6c3547fb850378f51c736cbb5f4497cfe15
|
7d901f6d54e1d47ef6397d60a278cb6ca6b206a7
|
refs/heads/master
| 2021-01-21T14:32:43.778297
| 2017-06-07T06:35:31
| 2017-06-07T06:35:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,984
|
java
|
package com.athena.component.input;
import java.util.Date;
import com.athena.component.exchange.Record;
import com.athena.component.exchange.config.DataParserConfig;
import com.athena.component.exchange.txt.TxtInputDBSerivce;
import com.athena.util.exception.ServiceException;
/**
* 2580 车间
* @author hzg
*
*/
public class ChejDBDataWriter extends TxtInputDBSerivce{
private Date date= new Date();
public ChejDBDataWriter(DataParserConfig dataParserConfig) {
super(dataParserConfig);
}
/**
* 解析数据之前清空ckx_chej 中间表数据
*/
@Override
public void before() {
try{
dataParserConfig.getBaseDao().getSdcDataSource(dataParserConfig.getWriterConfig().getDatasourceId())
.execute("inPutzxc.chejDelete");
}catch(RuntimeException e)
{
logger.error("线程--接口" + interfaceId +"清除ckx_chej表时报错"+e.getMessage());
throw new ServiceException("线程--接口" + interfaceId +"清除ckx_chej表时报错"+e.getMessage());
}
}
/**
* 行记录解析之后 给行记录增加创建人、创建时间、修改人、修改时间
* */
@Override
public boolean afterRecord(Record record) {
record.put("creator", interfaceId);
record.put("create_time", date);
record.put("editor", interfaceId);
record.put("edit_time", date);
return true;
}
@Override
public void after() {
//对主表标记editor为temp
dataParserConfig.getBaseDao().getSdcDataSource(dataParserConfig.getWriterConfig().getDatasourceId())
.execute("inPutzxc.chejUpdateTemp");
//对主表与中间表进行合并
dataParserConfig.getBaseDao().getSdcDataSource(dataParserConfig.getWriterConfig().getDatasourceId())
.execute("inPutzxc.chejMerge");
//删除主表标记editor为temp的数据
dataParserConfig.getBaseDao().getSdcDataSource(dataParserConfig.getWriterConfig().getDatasourceId())
.execute("inPutzxc.chejDeleteTemp");
}
}
|
[
"Administrator@ISS110302000330.isoftstone.com"
] |
Administrator@ISS110302000330.isoftstone.com
|
c18c4f592225065cdaa6a0671badea39734b3cd7
|
29e3f451c901e3a698d3ddb05e3cf0e553de06ae
|
/src/inflearn_lecture/structures/MapGetOrDefaultTest.java
|
c059af889610aa11e293deb4fd8fdadfdff5686e
|
[] |
no_license
|
camel-man-ims/coding-test-java
|
864bf06d9aa49cc9adbd69a5839faf5dfd07c5e3
|
9af9076574938798ec88753719c897e769aaf0a3
|
refs/heads/master
| 2023-06-24T04:06:38.556456
| 2021-07-23T08:46:57
| 2021-07-23T08:46:57
| 310,873,173
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
package inflearn_lecture.structures;
import java.util.HashMap;
public class MapGetOrDefaultTest {
public static void main(String[] args) {
String [] alphabet = { "A", "B", "C" ,"A","A"};
HashMap<String, Integer> map = new HashMap<>();
for(String key : alphabet){
map.put(key, map.getOrDefault(key, 0)+1);
System.out.println(map);
}
Integer a = map.getOrDefault("A", 0);
// System.out.println(a);
// 왜 {A:1,B:1,C:1,A:1,A:1} 이런식으로 출력 안되는지 의문이었는데, Hashmap 이라서 key 의 중복을 허용하지 않음.
// MapTest.java 의 코드를 보면 이해됨
// 왜 map.getOrDefault(key,0)+1 이냐. 전에 있던 거를 불러오는 것 = getOrDefault. 전에 거를 불러오고 그 다음에 +1
System.out.println("결과 : " + map);
}
}
|
[
"gudwnsrh@gmail.com"
] |
gudwnsrh@gmail.com
|
51b973768b86dedaf1c6c4f45390eebc41aada1a
|
493004baf3d0c60b40202b0b331807c7f7cde2c4
|
/src/com/mobile/meishang/model/bean/CategoryDistance.java
|
b1d5caaabfe303f0ce065b8f3ff6d05000b76611
|
[] |
no_license
|
zhangbin131421/Meishang
|
5d50e4f58d02dbcebec9e21aee31c73b963cffaf
|
51e6d17d5c7ac8e43a53c85fe6dac1c90a8b8bab
|
refs/heads/master
| 2021-01-21T23:33:51.313009
| 2015-06-28T10:47:55
| 2015-06-28T10:47:55
| 34,308,491
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 550
|
java
|
package com.mobile.meishang.model.bean;
public class CategoryDistance {
private String id;
private String name;
public CategoryDistance() {
}
public CategoryDistance(String id, String name) {
this.id = id;
this.name = name;
}
// public CategoryDistance(JSONObject json) throws JSONException {
// id = FunctionUtil.getJsonStrValue(json, "cat_id");
// value = FunctionUtil.getJsonStrValue(json, "cat_name");
// }
public String getId() {
return id;
}
public String getName() {
return name;
}
}
|
[
"zhangbin131421@163.com"
] |
zhangbin131421@163.com
|
86afac2ffbef1af7a756585b1f76ec6fcc554be4
|
cc6243837f70bd001af3905efc345ec210bd6e76
|
/javalib/src/main/java/com/bhargavaroyal/javalib/designpattern/behavioral/visitor/Computer.java
|
4520ebb4d960397c6e41b2fb16566baa357fb6de
|
[] |
no_license
|
bhargavaroyal/OutlineAndJav
|
01ddb3e30e4c7b1db4ea869d587335a0b9fd9efa
|
526ce6b697078226a8428ee6219d3a49063ed05c
|
refs/heads/main
| 2023-08-03T09:11:06.291351
| 2021-09-18T16:52:56
| 2021-09-18T16:52:56
| 387,354,146
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 444
|
java
|
package com.bhargavaroyal.javalib.designpattern.behavioral.visitor;
public class Computer implements ComputerPart {
ComputerPart[] parts;
public Computer() {
parts = new ComputerPart[] { new Mouse(), new Keyboard(), new Monitor() };
}
@Override
public void accept(ComputerPartVisitor computerPartVisitor) {
for (int i = 0; i < parts.length; i++) {
parts[i].accept(computerPartVisitor);
}
computerPartVisitor.visit(this);
}
}
|
[
"bhargavaroyal@gmail.com"
] |
bhargavaroyal@gmail.com
|
883df6a198e353ea7c6dfeba57b0f7f6af25434e
|
2edbc7267d9a2431ee3b58fc19c4ec4eef900655
|
/AL-Game/data/scripts/system/handlers/ai/worlds/reshanta/SWBRam_LightAI2.java
|
8174181a11a0cdb4819c94459de4402679fe45a5
|
[] |
no_license
|
EmuZONE/Aion-Lightning-5.1
|
3c93b8bc5e63fd9205446c52be9b324193695089
|
f4cfc45f6aa66dfbfdaa6c0f140b1861bdcd13c5
|
refs/heads/master
| 2020-03-08T14:38:42.579437
| 2018-04-06T04:18:19
| 2018-04-06T04:18:19
| 128,191,634
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,358
|
java
|
/*
* This file is part of Encom. **ENCOM FUCK OTHER SVN**
*
* Encom is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Encom 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 Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with Encom. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.worlds.reshanta;
import ai.ActionItemNpcAI2;
import com.aionemu.gameserver.ai2.*;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.skillengine.SkillEngine;
/****/
/** Author Rinzler (Encom)
/****/
@AIName("SWBRam_Light")
public class SWBRam_LightAI2 extends ActionItemNpcAI2
{
@Override
protected void handleDialogStart(Player player) {
super.handleDialogStart(player);
}
@Override
protected void handleUseItemFinish(Player player) {
SkillEngine.getInstance().getSkill(player, 21080, 1, player).useNoAnimationSkill();
AI2Actions.deleteOwner(this);
AI2Actions.scheduleRespawn(this);
}
}
|
[
"naxdevil@gmail.com"
] |
naxdevil@gmail.com
|
27098a46ddde72a37157b03155f7ea647c757b8c
|
4d0cd1f41a30184f9ff32e9faa82f204f891721b
|
/external/jglobus/jglobus-4.0.3/src/org/globus/gatekeeper/ServiceRequest.java
|
f27a3dba6a4663690cfc2bdc8062b6a945bf097f
|
[
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
NCIP/cagrid-general
|
ce9680f6d58fe1dc8893ba69b5c72d86d60b45fc
|
318cf185789453c4a025cc12af2a172bc85a19d6
|
refs/heads/master
| 2016-08-05T11:31:20.726557
| 2013-07-16T20:04:41
| 2013-07-16T20:04:41
| 8,959,797
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 584
|
java
|
/*
* Portions of this file Copyright 1999-2005 University of Chicago
* Portions of this file Copyright 1999-2005 The University of Southern California.
*
* This file or a portion of this file is licensed under the
* terms of the Globus Toolkit Public License, found at
* http://www.globus.org/toolkit/download/license.html.
* If you redistribute this file, with or without
* modifications, you must include this notice in the file.
*/
package org.globus.gatekeeper;
import java.io.InputStream;
public interface ServiceRequest {
public InputStream getInputStream();
}
|
[
"ervind"
] |
ervind
|
d64531e836bde427432f9492734e4c135635cfae
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/net/p1740b/$$Lambda$t0TBUZWo7sBGpFYzhnPcQpebKMY.java
|
732a6469a9f2ba95ca3719e15caf1861c51ca837
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package com.zhihu.android.net.p1740b;
import com.zhihu.android.net.p1740b.EncryptInterceptor;
import com.zhihu.android.p1669m.CryptoUtils;
/* renamed from: com.zhihu.android.net.b.-$$Lambda$t0TBUZWo7sBGpFYzhnPcQpebKMY reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$t0TBUZWo7sBGpFYzhnPcQpebKMY implements EncryptInterceptor.AbstractC22283c {
public static final /* synthetic */ $$Lambda$t0TBUZWo7sBGpFYzhnPcQpebKMY INSTANCE = new $$Lambda$t0TBUZWo7sBGpFYzhnPcQpebKMY();
private /* synthetic */ $$Lambda$t0TBUZWo7sBGpFYzhnPcQpebKMY() {
}
@Override // com.zhihu.android.net.p1740b.EncryptInterceptor.AbstractC22283c
public final byte[] encrypt(byte[] bArr) {
return CryptoUtils.m105804a(bArr);
}
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
40461f553cac095f8055c6ea5d0abaa0786204ef
|
f28dce60491e33aefb5c2187871c1df784ccdb3a
|
/src/main/java/com/boohee/myview/CommonLineView$$ViewInjector.java
|
6965053c5a081a1f8de0570139a6aa5c006f4088
|
[
"Apache-2.0"
] |
permissive
|
JackChan1999/boohee_v5.6
|
861a5cad79f2bfbd96d528d6a2aff84a39127c83
|
221f7ea237f491e2153039a42941a515493ba52c
|
refs/heads/master
| 2021-06-11T23:32:55.977231
| 2017-02-14T18:07:04
| 2017-02-14T18:07:04
| 81,962,585
| 8
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,050
|
java
|
package com.boohee.myview;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.ButterKnife.Finder;
import butterknife.ButterKnife.Injector;
import com.boohee.one.R;
public class CommonLineView$$ViewInjector<T extends CommonLineView> implements Injector<T> {
public void inject(Finder finder, T target, Object source) {
target.ivIcon = (ImageView) finder.castView((View) finder.findRequiredView(source, R.id
.iv_icon, "field 'ivIcon'"), R.id.iv_icon, "field 'ivIcon'");
target.tvTitle = (TextView) finder.castView((View) finder.findRequiredView(source, R.id
.tv_title, "field 'tvTitle'"), R.id.tv_title, "field 'tvTitle'");
target.tvText = (TextView) finder.castView((View) finder.findRequiredView(source, R.id
.tv_text, "field 'tvText'"), R.id.tv_text, "field 'tvText'");
}
public void reset(T target) {
target.ivIcon = null;
target.tvTitle = null;
target.tvText = null;
}
}
|
[
"jackychan2040@gmail.com"
] |
jackychan2040@gmail.com
|
d2af1336f2150dddea5378d52df76c2af8a44197
|
97f73b2a963551981fa566f33ec9e87ffc34dcb7
|
/manage-dao/src/main/java/com/github/quick/spring/boot/manage/dao/entity/MiddleUserDepartment.java
|
e1fa70d3ff268576aee6fa7d0f11a24856227a7b
|
[
"Apache-2.0"
] |
permissive
|
gitter-badger/manage-project
|
72d6afe06420e36b1452005cd591a768e55a52ea
|
51a4326515b8131954d2de6166791a2633c9f54a
|
refs/heads/main
| 2022-12-25T03:53:19.538709
| 2020-10-02T13:25:21
| 2020-10-02T13:25:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,179
|
java
|
package com.github.quick.spring.boot.manage.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* 用户和部门关系表
*/
@ApiModel(value="com-github-quick-spring-boot-manage-dao-entity-MiddleUserDepartment")
@TableName(value = "middle_user_department")
public class MiddleUserDepartment implements Serializable {
@TableId(value = "id", type = IdType.INPUT)
@ApiModelProperty(value="")
private Long id;
/**
* 管理端用户id
*/
@TableField(value = "user_id")
@ApiModelProperty(value="管理端用户id")
private Long userId;
/**
* 部门id
*/
@TableField(value = "department_id")
@ApiModelProperty(value="部门id")
private Long departmentId;
private static final long serialVersionUID = 1L;
public static final String COL_ID = "id";
public static final String COL_USER_ID = "user_id";
public static final String COL_DEPARTMENT_ID = "department_id";
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 获取管理端用户id
*
* @return user_id - 管理端用户id
*/
public Long getUserId() {
return userId;
}
/**
* 设置管理端用户id
*
* @param userId 管理端用户id
*/
public void setUserId(Long userId) {
this.userId = userId;
}
/**
* 获取部门id
*
* @return department_id - 部门id
*/
public Long getDepartmentId() {
return departmentId;
}
/**
* 设置部门id
*
* @param departmentId 部门id
*/
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
MiddleUserDepartment other = (MiddleUserDepartment) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
return result;
}
}
|
[
"huifer97@163.com"
] |
huifer97@163.com
|
ffad9b389a188eed7b95c50b76a9d688f90bbc01
|
5253dcf5b8c35f8ea1ff632f87d61d009879d8a7
|
/commonlibrary/src/main/java/com/juggist/commonlibrary/rx/RxBus.java
|
6d949d066da0f69d5b1b075a4a47fa033e818892
|
[] |
no_license
|
lufeisong1988/changcai
|
7e682ed2de796ecfd5204c9abf9485567714a477
|
cd578f8de84c8ce2e71c5537c90d808ef398e2b3
|
refs/heads/master
| 2021-09-10T23:14:23.028466
| 2018-04-04T01:53:46
| 2018-04-04T01:53:46
| 116,357,165
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,011
|
java
|
package com.juggist.commonlibrary.rx;
import android.support.annotation.NonNull;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import rx.Observable;
import rx.subjects.PublishSubject;
import rx.subjects.Subject;
/**
* Created by liuxingwei on 2017/2/15.
* 事件总线
*/
public class RxBus {
public static synchronized RxBus get() {
return RxBusGenerator.instance;
}
private static class RxBusGenerator {
private static RxBus instance = new RxBus();
}
private RxBus() {
}
private ConcurrentHashMap<Object, Vector<Subject>> subjectMapper = new ConcurrentHashMap<>();
public <T> Observable<T> register(@NonNull Class<T> clazz) {
return register(clazz.getName(), clazz);
}
public <T> Observable<T> register(@NonNull Object tag, @NonNull Class<T> clazz) {
Vector<Subject> subjects = subjectMapper.get(tag);
if (null == subjects) {
subjects = new Vector<>();
subjectMapper.put(tag, subjects);
}
Subject<T, T> subject;
subjects.add(subject = PublishSubject.create());
return subject;
}
public void unregister(@NonNull Object tag, @NonNull Observable observable) {
Vector<Subject> subjects = subjectMapper.get(tag);
if (null != subjects) {
subjects.remove((Subject) observable);
if (subjects.isEmpty()) {
subjectMapper.remove(tag);
}
}
}
public void post(@NonNull String content) {
post(content, content);
}
public void post(@NonNull Object content) {
post(content.getClass().getName(), content);
}
public void post(@NonNull Object tag, @NonNull Object content) {
Vector<Subject> subjectList = subjectMapper.get(tag);
if (!(null == subjectList || subjectList.isEmpty())) {
for (Subject subject : subjectList) {
subject.onNext(content);
}
}
}
}
|
[
"735596768@qq.com"
] |
735596768@qq.com
|
393f6afbb33b983eb5e76bccf76dc91eb6dd2143
|
d88b98ac7d896f69c5250ac28a6c503dbd8692b7
|
/app/src/main/java/gbq/com/myaccount/base/IBaseCtrl.java
|
e6e0b2629d703e6565229f880b0dcc816df45ed4
|
[] |
no_license
|
gaobingqiu/MyAccount
|
a4fe83d52f3f8c4f5cf03ade1e4196e2e9865061
|
fd8dbea809f43a727b138e5f47a445bd2f542280
|
refs/heads/master
| 2020-08-03T16:21:21.555478
| 2016-12-08T09:56:07
| 2016-12-08T09:56:07
| 73,543,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 290
|
java
|
package gbq.com.myaccount.base;
/**
* 基本的Activity的控制接口,主要包含一些Activity的公共方法
* Created by gbq on 2016/11/19.
*/
public interface IBaseCtrl {
void showToast(String msg);
void showAlert(String msg);
void showProcess();
void closeProcess();
}
|
[
"990924291@qq.com"
] |
990924291@qq.com
|
614a40206ea18c29897512c715bca58308052137
|
4dd17e465e3fe270271d9e8b05b034f7434b0ad4
|
/document/src/main/java/by/bsuir/document/processor/impl/FioProcessor.java
|
1a94ca4b06c974cc9131e87c00759060a5fcc1c3
|
[] |
no_license
|
Vyacheslav-Kn/cooperative
|
dcfb27e1c307cefe118b148580480a545fcd74c6
|
e5c6553a219972f19b562eb4797417d430e0c2ac
|
refs/heads/master
| 2021-03-24T01:30:50.389409
| 2020-03-14T20:17:45
| 2020-03-14T20:17:45
| 247,503,452
| 0
| 0
| null | 2020-03-15T16:18:34
| 2020-03-15T16:18:34
| null |
UTF-8
|
Java
| false
| false
| 628
|
java
|
package by.bsuir.document.processor.impl;
import by.bsuir.document.model.template.Tag;
import by.bsuir.document.processor.TagProcessor;
import lombok.AllArgsConstructor;
import java.util.Map;
/**
* {@link TagProcessor} of {@link Tag#FIO}.
*
* @author Vladislav Novitskiy
*/
@AllArgsConstructor
public class FioProcessor implements TagProcessor {
@Override
public Object process(Map<Tag.Param, String> paramValues) {
// TODO: 12.03.2020
// - Add apartment number to property
// - Fix frontend
// - Then implements this
throw new UnsupportedOperationException();
}
}
|
[
"novlad26@gmail.com"
] |
novlad26@gmail.com
|
c2bdd2b7f544263af02f7af1ad98461fc5f4efa4
|
07e55f35a0521fee220f336b3cdd41d1940abe57
|
/src/com/soarcms/core/manager/CmsSiteMng.java
|
5f5794e089106d476c3a35d1df2b2e95f7ce7b29
|
[] |
no_license
|
yt-zgl/cms
|
3bba22fcee48da6dc97be9ac413ddba327bf484b
|
30d6157396ff7cab14aa0ee65da8175393ae48d1
|
refs/heads/master
| 2020-12-02T19:49:47.514009
| 2015-12-11T02:28:54
| 2015-12-11T02:28:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 834
|
java
|
package com.soarcms.core.manager;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import com.soarcms.core.entity.CmsSite;
import com.soarcms.core.entity.CmsUser;
public interface CmsSiteMng {
public List<CmsSite> getList();
public List<CmsSite> getListFromCache();
public CmsSite findByDomain(String domain);
public boolean hasRepeatByProperty(String property);
public CmsSite findById(Integer id);
public CmsSite save(CmsSite currSite, CmsUser currUser, CmsSite bean,
Integer uploadFtpId) throws IOException;
public CmsSite update(CmsSite bean, Integer uploadFtpId);
public void updateTplSolution(Integer siteId, String solution);
public void updateAttr(Integer siteId,Map<String,String>attr);
public CmsSite deleteById(Integer id);
public CmsSite[] deleteByIds(Integer[] ids);
}
|
[
"chenyuguxing@163.com"
] |
chenyuguxing@163.com
|
b4c59017b84dd2683bc1eb75bcb94d04ff55bb98
|
995e655293513d0b9f93d62e28f74b436245ae74
|
/src/com/google/gson/internal/bind/TypeAdapters$8.java
|
a1e3d5391577af7df819ffd5624ee25d42375932
|
[] |
no_license
|
JALsnipe/HTC-RE-YouTube-Live-Android
|
796e7c97898cac41f0f53120e79cde90d3f2fab1
|
f941b64ad6445c0a0db44318651dc76715291839
|
refs/heads/master
| 2021-01-17T09:46:50.725810
| 2015-01-09T23:32:14
| 2015-01-09T23:32:14
| 29,039,855
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,270
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.gson.internal.bind;
import com.google.gson.JsonSyntaxException;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
final class extends TypeAdapter
{
public Number read(JsonReader jsonreader)
{
if (jsonreader.peek() == JsonToken.NULL)
{
jsonreader.nextNull();
return null;
}
Long long1;
try
{
long1 = Long.valueOf(jsonreader.nextLong());
}
catch (NumberFormatException numberformatexception)
{
throw new JsonSyntaxException(numberformatexception);
}
return long1;
}
public volatile Object read(JsonReader jsonreader)
{
return read(jsonreader);
}
public void write(JsonWriter jsonwriter, Number number)
{
jsonwriter.value(number);
}
public volatile void write(JsonWriter jsonwriter, Object obj)
{
write(jsonwriter, (Number)obj);
}
()
{
}
}
|
[
"josh.lieberman92@gmail.com"
] |
josh.lieberman92@gmail.com
|
393fd5809ef9a8917225d03eb110fbceddcb2ed5
|
12b17568e3b89820018ac1d2366c55d662355ccf
|
/splat/sort/src/main/java/org/unix4j/sort/option/DefaultOptionSet.java
|
85c60f0837074ae2bce49e519c63a2928b1b0d9e
|
[] |
no_license
|
miguelvelezmj25/performance-mapper-evaluation
|
0b086d60767250b9df7d89dfa70336b2e884af49
|
e8f42e1f9006826a79e65edae30d9aa906eb8a30
|
refs/heads/master
| 2023-08-18T04:36:38.878803
| 2021-10-20T13:47:54
| 2021-10-20T13:47:54
| 91,713,239
| 0
| 0
| null | 2021-01-15T15:33:51
| 2017-05-18T16:05:51
|
Java
|
UTF-8
|
Java
| false
| false
| 7,386
|
java
|
package org.unix4j.sort.option;
import java.util.Collection;
import java.util.EnumSet;
import java.util.Iterator;
/**
* Default implementation of a modifiable option set. The option set is backed
* by an efficient {@link EnumSet}.
*
* @param <E> the option enum type
*/
public class DefaultOptionSet<E extends Enum<E> & Option> implements OptionSet<E>, Iterable<E>, Cloneable {
private final Class<E> optionType;
private EnumSet<E> options; // cannot be final because of clone
private EnumSet<E> useAcronym; // cannot be final because of clone
/**
* Constructor for option set initialized with a single option.
*
* @param option the option to be set
*/
public DefaultOptionSet(E option) {
this.optionType = option.getDeclaringClass();
this.options = EnumSet.of(option);
this.useAcronym = EnumSet.noneOf(optionType);
}
/**
* Constructor for option set initialized with at least one active options.
*
* @param first the first option to be set
* @param rest the remaining options to be set
*/
@SuppressWarnings("unchecked")
public DefaultOptionSet(E first, E... rest) {
this.optionType = first.getDeclaringClass();
this.options = EnumSet.of(first, rest);
this.useAcronym = EnumSet.noneOf(optionType);
}
/**
* Constructor for an empty option set with no active options.
*
* @param optionType the option type class
*/
public DefaultOptionSet(Class<E> optionType) {
this.optionType = optionType;
this.options = EnumSet.noneOf(optionType);
this.useAcronym = EnumSet.noneOf(optionType);
}
public static <O extends Option> String toString(OptionSet<O> optionSet) {
final StringBuilder sb = new StringBuilder();
// first, the options with acronym
for(final O opt : optionSet) {
if(optionSet.useAcronymFor(opt)) {
if(sb.length() == 0) {
sb.append("-");
}
sb.append(opt.acronym());
}
}
// now all options with long names
for(final O opt : optionSet) {
if(!optionSet.useAcronymFor(opt)) {
if(sb.length() != 0) {
sb.append(" ");
}
sb.append("--").append(opt.name());
}
}
return sb.toString();
}
@Override
public Class<E> optionType() {
return optionType;
}
/**
* Sets the specified {@code option}.
*
* @param option the option to set
*/
public void set(E option) {
options.add(option);
}
/**
* Sets all specified {@code options}.
*
* @param options the options to set
*/
@SuppressWarnings("unchecked")
public void setAll(E... options) {
for(int i = 0; i < options.length; i++) {
set(options[i]);
}
}
/**
* Sets all specified {@code options}.
*
* @param options the options to set
*/
public void setAll(Collection<? extends E> options) {
for(final E option : options) {
set(option);
setUseAcronymFor(option, false);
}
}
/**
* Sets all the options contained in the specified {@code optionSet}.
* <p>
* Note that also the {@link #useAcronymFor(Option)} flags are also
* inherited from the specified {@code optionSet}.
*
* @param optionSet the optionSet with options to be set in this {@code OptionSet}
*/
public void setAll(OptionSet<E> optionSet) {
options.addAll(optionSet.asSet());
for(E option : optionType.getEnumConstants()) {
setUseAcronymFor(option, optionSet.useAcronymFor(option));
}
}
@Override
public boolean isSet(E option) {
return options.contains(option);
}
/**
* Returns the number of set options in this {@code OptionSet}
*
* @return the number of set options
*/
@Override
public int size() {
return options.size();
}
/**
* Returns true if no option is set.
*
* @return true if no option is set.
*/
public boolean isEmpty() {
return options.isEmpty();
}
/**
* Returns the underlying backing {@link EnumSet}. Changing the returned set
* will also alter this {@code OptionSet} and vice versa.
*
* @return the underlying backing enum set
*/
@Override
public EnumSet<E> asSet() {
return options;
}
/**
* Returns an iterator over all set options in this {@code OptionSet}.
* Removing an option from the
*
* @return an iterator over all set options
*/
@Override
public Iterator<E> iterator() {
return options.iterator();
}
@Override
public int hashCode() {
return options.hashCode();
}
@Override
public boolean equals(Object o) {
if(this == o) {
return true;
}
if(o instanceof DefaultOptionSet) {
return options.equals(((DefaultOptionSet<?>) o).options);
}
return false;
}
@Override
public DefaultOptionSet<E> clone() {
try {
@SuppressWarnings("unchecked") final DefaultOptionSet<E> clone = (DefaultOptionSet<E>) super.clone();
clone.options = clone.options.clone();
clone.useAcronym = clone.useAcronym.clone();
return clone;
} catch(CloneNotSupportedException e) {
throw new RuntimeException("should be cloneable", e);
}
}
@Override
public boolean useAcronymFor(E option) {
if(useAcronym.contains(option)) {
if(options.contains(option)) {
return true;
}
useAcronym.remove(option);
}
return false;
}
/**
* Sets the flag indicating whether string representations should use the
* {@link Option#acronym() acronym} instead of the long option
* {@link Option#name() name} for all options.
*
* @param useAcronym new flag value to set, true if the option acronym should be
* used for all options
* @see #setUseAcronymFor(Enum, boolean)
*/
public void setUseAcronymForAll(boolean useAcronym) {
if(useAcronym) {
this.useAcronym.addAll(EnumSet.complementOf(this.useAcronym));
}
else {
this.useAcronym.removeAll(EnumSet.copyOf(this.useAcronym));
}
}
/**
* Sets the flag indicating whether string representations should use the
* {@link Option#acronym() acronym} instead of the long option
* {@link Option#name() name} for the specified {@code option}.
*
* @param option the option for which this flag is set
* @param useAcronym new flag value to set, true if the option acronym should be
* used for the specified {@code option}
* @see #setUseAcronymForAll(boolean)
*/
public void setUseAcronymFor(E option, boolean useAcronym) {
if(useAcronym) {
this.useAcronym.add(option);
}
else {
this.useAcronym.remove(option);
}
}
@Override
public String toString() {
return toString(this);
}
}
|
[
"miguelvelez@mijecu25.com"
] |
miguelvelez@mijecu25.com
|
21b682affa2ea2e7ce3387592eb176cdca7a58b1
|
c8757aa578e53b2ff0d94bc97b7cc2c0bd515e0d
|
/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/rest/RestServletBindingModeOffWithContractTest.java
|
fa481be5516192703ade26dcbf00531357707174
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
kaiserahmed-isu/camel
|
3971b9ea03b289f0be8e9d8fa4534ff2e1440118
|
7b2a3ae36cb42184604c01195ed5499dc92ea1ff
|
refs/heads/master
| 2021-04-03T01:05:16.526119
| 2018-03-08T12:05:27
| 2018-03-08T12:05:47
| 124,423,290
| 1
| 0
|
Apache-2.0
| 2018-03-08T17:09:29
| 2018-03-08T17:09:29
| null |
UTF-8
|
Java
| false
| false
| 4,283
|
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.camel.component.servlet.rest;
import java.io.ByteArrayInputStream;
import com.meterware.httpunit.PostMethodWebRequest;
import com.meterware.httpunit.WebRequest;
import com.meterware.httpunit.WebResponse;
import com.meterware.servletunit.ServletUnitClient;
import org.apache.camel.Converter;
import org.apache.camel.Exchange;
import org.apache.camel.TypeConverters;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.servlet.ServletCamelRouterTestSupport;
import org.apache.camel.model.dataformat.JsonDataFormat;
import org.apache.camel.model.dataformat.JsonLibrary;
import org.apache.camel.model.rest.RestBindingMode;
import org.apache.camel.model.rest.RestDefinition;
import org.junit.Test;
public class RestServletBindingModeOffWithContractTest extends ServletCamelRouterTestSupport {
@Test
public void testBindingModeOffWithContract() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:input");
mock.expectedMessageCount(1);
mock.message(0).body().isInstanceOf(UserPojoEx.class);
String body = "{\"id\": 123, \"name\": \"Donald Duck\"}";
WebRequest req = new PostMethodWebRequest(CONTEXT_URL + "/services/users/new", new ByteArrayInputStream(body.getBytes()), "application/json");
ServletUnitClient client = newClient();
client.setExceptionsThrownOnErrorStatus(false);
WebResponse response = client.getResponse(req);
assertEquals(200, response.getResponseCode());
String answer = response.getText();
assertTrue("Unexpected response: " + answer, answer.contains("\"active\":true"));
assertMockEndpointsSatisfied();
Object obj = mock.getReceivedExchanges().get(0).getIn().getBody();
assertEquals(UserPojoEx.class, obj.getClass());
UserPojoEx user = (UserPojoEx)obj;
assertNotNull(user);
assertEquals(123, user.getId());
assertEquals("Donald Duck", user.getName());
assertEquals(true, user.isActive());
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
restConfiguration().component("servlet").bindingMode(RestBindingMode.off);
JsonDataFormat jsondf = new JsonDataFormat();
jsondf.setLibrary(JsonLibrary.Jackson);
jsondf.setAllowUnmarshallType(true);
jsondf.setUnmarshalType(UserPojoEx.class);
transformer()
.fromType("json")
.toType(UserPojoEx.class)
.withDataFormat(jsondf);
transformer()
.fromType(UserPojoEx.class)
.toType("json")
.withDataFormat(jsondf);
rest("/users/")
// REST binding does nothing
.post("new")
.route()
// contract advice converts betweeen JSON and UserPojoEx directly
.inputType(UserPojoEx.class)
.outputType("json")
.process(ex -> {
ex.getIn().getBody(UserPojoEx.class).setActive(true);
})
.to("mock:input");
}
};
}
}
|
[
"tm.igarashi@gmail.com"
] |
tm.igarashi@gmail.com
|
b14391d2e4e99ff6aba18dc48719cb49cf9717ed
|
bfe820fdaf9a525245553c0a03ea6bf03e6648a3
|
/marathon-core/src/main/java/net/sourceforge/marathon/util/BlurbInfo.java
|
c12619416376989d7f2e595ad71cea5607433280
|
[
"Apache-2.0"
] |
permissive
|
jalian-systems/marathonv5
|
323aee5ea5b1b521063835f604fe6d9c85eabb57
|
d957a6a920b4c458d3db4f684529d3619a3124a2
|
refs/heads/master
| 2022-05-03T01:36:52.214118
| 2021-01-13T08:01:28
| 2021-01-13T08:01:28
| 83,883,701
| 14
| 24
|
Apache-2.0
| 2022-04-19T12:20:52
| 2017-03-04T09:54:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,668
|
java
|
/*******************************************************************************
* Copyright 2016 Jalian Systems Pvt. Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package net.sourceforge.marathon.util;
import java.net.URL;
import java.util.logging.Logger;
public class BlurbInfo {
public static final Logger LOGGER = Logger.getLogger(BlurbInfo.class.getName());
private URL url;
private String title;
private boolean cancelNeeded;
private String html;
public BlurbInfo(URL url, String title, boolean cancelNeeded) {
this.url = url;
this.title = title;
this.cancelNeeded = cancelNeeded;
}
public BlurbInfo(String html, String title, boolean cancelNeeded) {
this.html = html;
this.title = title;
this.cancelNeeded = cancelNeeded;
}
public String getTitle() {
return title;
}
public URL getURL() {
return url;
}
public boolean isCancelNeeded() {
return cancelNeeded;
}
public String getHtml() {
return html;
}
}
|
[
"dakshinamurthy.karra@jaliansystems.com"
] |
dakshinamurthy.karra@jaliansystems.com
|
479601a82624d5ac0341b353b9a7478b31d5683f
|
c96b0be86c08f639d388498851384706a3c87815
|
/KCX-Mapping-Convert/src/com/kewill/kcx/component/mapping/common/start/customer/in/CmpToKidsMule.java
|
6f70aecbf3a1d8297c28bbfea60f0264a1b9938c
|
[] |
no_license
|
joelsousa/KCX-Mapping-Convert
|
cf1b4b785af839f6f369bcdf539bd023d4478f72
|
9da4b25db31f5b1dfbefd279eb76c555f3977c0e
|
refs/heads/master
| 2020-06-07T12:06:43.517765
| 2014-10-03T14:14:51
| 2014-10-03T14:14:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,812
|
java
|
package com.kewill.kcx.component.mapping.common.start.customer.in;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import org.apache.log4j.Logger;
import org.apache.tools.ant.filters.StringInputStream;
import org.mule.api.MuleEventContext;
import org.mule.api.MuleMessage;
import org.mule.api.lifecycle.Callable;
import com.kewill.kcx.component.mapping.EDirections;
import com.kewill.kcx.component.mapping.common.CommonFieldsDTO;
import com.kewill.kcx.component.mapping.common.start.CMPToKidsConverter;
import com.kewill.kcx.component.mapping.conf.Config;
import com.kewill.kcx.component.mapping.formats.kcx.KcxEnvelope;
import com.kewill.kcx.component.mapping.formats.kids.common.KidsHeader;
import com.kewill.kcx.component.mapping.util.MuleUtils;
import com.kewill.kcx.component.mapping.util.Utils;
import com.kewill.kcx.util.AuditUtils;
import com.kewill.kcx.util.KCXProperties;
/**
* Modul : KidsToKids<br>
* Erstellt : 14.06.2013<br>
* Beschreibung : Transformer called by Mule to convert KIDS-Format to KIDS
* messages.
*
* @author iwaniuk
* @version 1.0.00
*/
public class CmpToKidsMule extends CMPToKidsConverter implements Callable {
private static Logger logger = null; // Logger
private MuleEventContext muleEventContext = null;
public Object onCall(MuleEventContext muleEventContext) throws Exception {
logger = Logger.getLogger("kcx");
Config.configure("conf", "kcx.ini");
getConfiguration();
muleEventContext.transformMessageToString();
MuleMessage message = muleEventContext.getMessage();
this.muleEventContext = muleEventContext;
String payload = message.getPayloadAsString();
if (Config.getLogXML()) {
Utils.log("(CmpToKids onCall) payloadString = \n" + payload);
}
Utils.log("(CmpToKids onCall) message.getEncoding() = "
+ message.getEncoding());
String encoding = message.getEncoding();
String auditId = AuditUtils.getAuditId(message);
InputStream ins = new StringInputStream(payload);
InputStreamReader is = new InputStreamReader(ins, encoding);
XMLInputFactory factory = XMLInputFactory.newInstance();
XMLEventReader parser = factory.createXMLEventReader(is);
Utils.createAuditContext(muleEventContext,
"<CmpToKids>" +
message.getStringProperty("directory", ".") + "/" +
message.getStringProperty("originalFilename", "") +
"</CmpToKids>");
Utils.addAuditEvent(muleEventContext,
"CmpToKids: File Name",
message.getStringProperty("directory", ".") + "/" +
message.getStringProperty("originalFilename", ""));
String xml = readCmp(parser, payload, auditId, EDirections.CustomerToCountry);
if (Config.getLogXML()) {
Utils.log("(CmpToKids onCall) xml = " + xml);
}
message.setStringProperty("MessageReferenceNumber", commonFieldsDTO.getMessageReferenceNumber().trim());
message.setBooleanProperty(KCXProperties.SYNTACTICALLY_CORRECT, true);
if (Config.isCreateInName()) {
String filename = MuleUtils.createFileName(commonFieldsDTO);
message.setStringProperty("filename", filename);
}
MuleUtils.writeInFileMessage(message, payload, commonFieldsDTO);
return xml;
}
private static void getConfiguration() {
logger.debug("Konfiguration wird geholt.");
Utils.setDebug(Config.getDebug());
Utils.setLogLevel(Config.getLogLevel());
}
public void logAudit(KcxEnvelope kcxEnvelope, KidsHeader kidsHeader, CommonFieldsDTO commonFieldsDTO)
throws Exception {
if (muleEventContext != null) {
String msg = kidsHeader.getMessageName();
Utils.addAuditEvent(muleEventContext, "KidsToKidsConverter: KCX-Header", kcxEnvelope.toString());
Utils.addAuditEvent(muleEventContext, "KidsToKidsConverter: Message Name", kidsHeader.getMessageName());
Utils.addAuditEvent(muleEventContext, "KidsToKidsConverter: Message Version", kidsHeader.getRelease());
Utils.addAuditEvent(muleEventContext, "KidsToKidsConverter: Message ID", kidsHeader.getMessageID());
// Utils.addAuditEvent(muleEventContext, "KidsToKidsConverter: Reference Number",
// commonFieldsDTO.getReferenceNumber());
Utils.addAuditEvent(muleEventContext, "KidsToKidsConverter: Message State", msg + ": converted");
}
}
}
|
[
"joel@moredata.pt"
] |
joel@moredata.pt
|
083dd6fd3e262ec40f3f6518e661557a1f76f4ee
|
db2ca48fffaf6689c9db439abaf9d98729548e0b
|
/minsu-service/minsu-service-message/minsu-service-message-provider/src/test/java/com/ziroom/minsu/services/message/test/dao/HuanxinImOfflineDaoTest.java
|
731fe23aeb29c5c16aed1a7fd8219ab1079d8b5d
|
[] |
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
| 2,013
|
java
|
/**
* @FileName: HuanxinImOfflineDaoTest.java
* @Package com.ziroom.minsu.services.message.test.dao
*
* @author loushuai
* @created 2017年8月30日 下午7:44:05
*
* Copyright 2011-2015 asura
*/
package com.ziroom.minsu.services.message.test.dao;
import javax.annotation.Resource;
import org.junit.Test;
import com.asura.framework.base.util.UUIDGenerator;
import com.ziroom.minsu.entity.message.HuanxinImOfflineEntity;
import com.ziroom.minsu.entity.message.MsgUserRelEntity;
import com.ziroom.minsu.entity.message.MsgUserRelOperaEntity;
import com.ziroom.minsu.services.message.dao.HuanxinImOfflineDao;
import com.ziroom.minsu.services.message.dao.MsgUserRelOperaDao;
import com.ziroom.minsu.services.message.test.base.BaseTest;
/**
* <p>TODO</p>
*
* <PRE>
* <BR> 修改记录
* <BR>-----------------------------------------------
* <BR> 修改日期 修改人 修改内容
* </PRE>
*
* @author loushuai
* @since 1.0
* @version 1.0
*/
public class HuanxinImOfflineDaoTest extends BaseTest{
@Resource(name = "message.huanxinImOfflineDao")
private HuanxinImOfflineDao huanxinImOfflineDao;
@Test
public void saveTest() {
HuanxinImOfflineEntity record = new HuanxinImOfflineEntity();
record.setMsgId(UUIDGenerator.hexUUID());
record.setFromUid("app_3a59968c-1eb9-4612-e325-5cc0a856ac34");
record.setToUid("52a4aea1-5527-7421-1b25-83fbca1c1856");
record.setZiroomFlag("ZIROOM_CHANGZU_IM");
int i = huanxinImOfflineDao.insertSelective(record);
System.out.println(i);
}
@Test
public void queryStatusConfByKeyTest(){
HuanxinImOfflineEntity record = this.huanxinImOfflineDao.selectByMsgid("8a9e9aa35e32f860015e32f860030000");
System.out.println(record);
}
@Test
public void updateByConditionTest(){
HuanxinImOfflineEntity record = new HuanxinImOfflineEntity();
record.setMsgId("8a9e9aa35e32f860015e32f860030000");
record.setZiroomFlag("ZIROOM_ZRY_IM");
int i = this.huanxinImOfflineDao.updateByMsgid(record);
System.out.println(i);
}
}
|
[
"068411Lsp"
] |
068411Lsp
|
77a658d80b3b350bd9ead61551b5de7fc4db0b6a
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas_ReducedClassCount/applicationModule/src/main/java/applicationModulepackageJava1/Foo838.java
|
748cd36afae30cca7fd9eb02121fd9a8e13db8cb
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 506
|
java
|
package applicationModulepackageJava1;
public class Foo838 {
public void foo0() {
new applicationModulepackageJava1.Foo837().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
d4a6947086287eac6690535f3083f5109cf8b2fc
|
f546311c30ec470f31816e8e25d17e098b8df019
|
/app/src/main/java/com/sdxxtop/mvprobot/di/module/AppModule.java
|
871190493b5a0b5db86dedf66fe92e9ae274f31c
|
[] |
no_license
|
ZhouSilverBullet/MvpRobot
|
1bd19ded223f7ac1e62f6f0198f8364905ebef09
|
36aa9f3e6c663a8c228f9050c697effa55424f94
|
refs/heads/master
| 2020-04-11T01:40:37.920418
| 2018-12-12T02:40:20
| 2018-12-12T02:40:20
| 161,422,775
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 407
|
java
|
package com.sdxxtop.mvprobot.di.module;
import com.sdxxtop.mvprobot.app.App;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
@Module
public class AppModule {
private App application;
public AppModule(App application) {
this.application = application;
}
@Singleton
@Provides
public App getApplication() {
return application;
}
}
|
[
"zhousaito@163.com"
] |
zhousaito@163.com
|
008e3d0632f81c5cb55f6ca78d232271b755e2b1
|
dc25b23f8132469fd95cee14189672cebc06aa56
|
/vendor/mediatek/proprietary/packages/apps/Mms/src/com/mediatek/mms/util/MmsSizeUtils.java
|
0ee313ca7afe75b3dba9825383a5894a7ca573ab
|
[
"Apache-2.0"
] |
permissive
|
nofearnohappy/alps_mm
|
b407d3ab2ea9fa0a36d09333a2af480b42cfe65c
|
9907611f8c2298fe4a45767df91276ec3118dd27
|
refs/heads/master
| 2020-04-23T08:46:58.421689
| 2019-03-28T21:19:33
| 2019-03-28T21:19:33
| 171,048,255
| 1
| 5
| null | 2020-03-08T03:49:37
| 2019-02-16T20:25:00
|
Java
|
UTF-8
|
Java
| false
| false
| 5,067
|
java
|
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or its licensors,
* any reproduction, modification, use or disclosure of MediaTek Software,
* and information contained herein, in whole or in part, shall be strictly prohibited.
*/
/* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
* THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
* CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
* SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
* CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek Software")
* have been modified by MediaTek Inc. All revisions are subject to any receiver's
* applicable license agreements with MediaTek Inc.
*/
/*
* Copyright (C) 2008 Esmertec AG.
* Copyright (C) 2008 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.mediatek.mms.util;
import java.util.Iterator;
import com.android.mms.model.MediaModel;
import com.android.mms.model.SlideModel;
import com.android.mms.model.SlideshowModel;
public class MmsSizeUtils {
private static final int SMIL_TAG_SIZE_TEXT = 120;
public static final int SMIL_TAG_SIZE_PAGE = 26;
public static final int SMIL_TAG_SIZE_ATTACH = 26;
public static final int SMIL_TAG_SIZE_IMAGE = 50;
private static final int SMIL_TAG_SIZE_AUDIO = 50;
private static final int SMIL_TAG_SIZE_VIDEO = 50;
private static final int MMS_HEADER_SIZE = 128;
private static final int MMS_CONTENT_TYPE_HEAER_LENGTH = 128;
private static final int SMIL_HEADER_SIZE = 128;
public static int getMediaPackagedSize(MediaModel media, int size) {
int packagedSize = 0;
if (true == media.isText()) {
packagedSize = size == 0 ? 0 : (size + getSlideSmilSize());
} else {
packagedSize = size + getSlideSmilSize();
}
return packagedSize;
}
public static int getSlideModelPackagedSize(SlideModel slide) {
int packagedSize = 0;
for (Iterator<MediaModel> it = slide.iterator(); it.hasNext();) {
MediaModel media = it.next();
packagedSize += media.getMediaPackagedSize();
}
return packagedSize;
}
/// M: fix bug ALPS00500614, solute shake when delete text and appear301kb. @{
public static int getSlideSmilSize() {
return (SMIL_TAG_SIZE_ATTACH + SMIL_TAG_SIZE_PAGE + SMIL_TAG_SIZE_TEXT);
}
/// @}
/* M: Code analyze 003, fix bug ALPS00261194,
* let recorder auto stop when the messaging reach limit.
*/
public static int getSlideshowInitSize() {
return MMS_HEADER_SIZE + MMS_CONTENT_TYPE_HEAER_LENGTH
+ SMIL_HEADER_SIZE + SlideshowModel.SLIDESHOW_SLOP;
}
public static int getSlideshowReserveSize() {
return MMS_HEADER_SIZE + MMS_CONTENT_TYPE_HEAER_LENGTH
+ SMIL_HEADER_SIZE + SlideshowModel.SLIDESHOW_SLOP;
}
}
|
[
"fetpoh@mail.ru"
] |
fetpoh@mail.ru
|
bdfb7c1a5c910e4b1b7ea8d80e2d5ab3f98a1ec9
|
980cd2a67564e499016a65042178b4ad4a10b00b
|
/src/day28_DateTime/Time_Formatting.java
|
9bb2e31bfa62fde5fddfb0b9e6d6452a3e547962
|
[] |
no_license
|
Marat311/Spring2020_JavaPractice
|
be4463497c555abafd5604b19c23f7d0ca7c407f
|
278076f8e294587b7436e37bd91a7a9d8c5a39be
|
refs/heads/master
| 2022-08-26T10:40:56.892256
| 2020-05-28T17:33:31
| 2020-05-28T17:33:31
| 257,803,746
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 537
|
java
|
package day28_DateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
public class Time_Formatting {
public static void main(String[] args) {
DateTimeFormatter dtf =DateTimeFormatter.ofPattern("hh:mm:ss a");
LocalTime time1 = LocalTime.of(23, 30, 30);
System.out.println(time1.format(dtf));
LocalTime time2 =LocalTime.of(10,0, 40);
System.out.println(time2.format(dtf));
boolean result=time1.isAfter(time2);
System.out.println(result);
}
}
|
[
"marinavelitskaia@gmail.com"
] |
marinavelitskaia@gmail.com
|
e200b8f3895b66e38d449983bf5d7f5c2b462d3d
|
6452d328c9a70f23a037a9226e79d6f5820a44e4
|
/org/sintef/edap_aspects/org.sintef.edap.smartadapters/src/smartadapters4MODERATES/InstantiationStrategy.java
|
05c09442e1022242b331b25eeb1ebae352414a16
|
[] |
no_license
|
manualem/moderates
|
2132bf76b7f540c1fa4d74b78154a71070ef0fff
|
ad8d74667c3532cee44e572ca3d8d8ca316451bd
|
refs/heads/master
| 2020-12-29T01:42:11.865055
| 2011-06-21T09:03:28
| 2011-06-21T09:03:28
| 38,399,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,379
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package smartadapters4MODERATES;
import edap_relaxed.AspectModelElement;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Instantiation Strategy</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link smartadapters4MODERATES.InstantiationStrategy#getAdviceElements <em>Advice Elements</em>}</li>
* </ul>
* </p>
*
* @see smartadapters4MODERATES.Smartadapters4MODERATESPackage#getInstantiationStrategy()
* @model abstract="true"
* @generated
*/
public interface InstantiationStrategy extends EObject {
/**
* Returns the value of the '<em><b>Advice Elements</b></em>' reference list.
* The list contents are of type {@link edap_relaxed.AspectModelElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Advice Elements</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Advice Elements</em>' reference list.
* @see smartadapters4MODERATES.Smartadapters4MODERATESPackage#getInstantiationStrategy_AdviceElements()
* @model
* @generated
*/
EList<AspectModelElement> getAdviceElements();
} // InstantiationStrategy
|
[
"fleurey@18f204b0-11dd-0995-6934-10920bfec807"
] |
fleurey@18f204b0-11dd-0995-6934-10920bfec807
|
847fa4c730c2b74fa4f0534bccf070b42e472a21
|
5ecd15baa833422572480fad3946e0e16a389000
|
/framework/Pipeline-Open/subsystems/pipeline/main/api/java/com/volantis/xml/pipeline/sax/drivers/webservice/WSDLEntry.java
|
e91cfc7a51ec6c1c4ad24e2e6a32d999445662d7
|
[] |
no_license
|
jabley/volmobserverce
|
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
|
6d760f27ac5917533eca6708f389ed9347c7016d
|
refs/heads/master
| 2021-01-01T05:31:21.902535
| 2009-02-04T02:29:06
| 2009-02-04T02:29:06
| 38,675,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,048
|
java
|
/*
This file is part of Volantis Mobility Server.
Volantis Mobility Server is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Volantis Mobility Server is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Volantis Mobility Server. If not, see <http://www.gnu.org/licenses/>.
*/
/* ----------------------------------------------------------------------------
* (c) Volantis Systems Ltd 2003.
* ----------------------------------------------------------------------------
*/
package com.volantis.xml.pipeline.sax.drivers.webservice;
import com.volantis.synergetics.log.LogDispatcher;
import com.volantis.pipeline.localization.LocalizationFactory;
import com.volantis.xml.pipeline.sax.XMLPipelineContext;
import com.volantis.shared.net.url.URLContentManager;
import org.xml.sax.InputSource;
import java.util.ArrayList;
/**
* A WSDLEntry contains the uri for a WSDL document and alternative sources for
* this document if any. These alternative sources are provided by
* WSDLResource objects. The order that these WSDLResource objects are added to
* the WSDLEntry are the order in which they will be tried. If none of the
* alternative sources provide the WSDL document (or if there are no
* alternatives) then the uri property of the WSDLEntry is used.
*/
public class WSDLEntry {
/**
* Used for logging
*/
private static final LogDispatcher logger =
LocalizationFactory.createLogger(WSDLEntry.class);
/**
* The uri of this WSDLEntry.
*/
private String uri;
/**
* The List of alternative sources for the WSDL document. These alternatives
* are stored as WSDLResource objects. The order that they are in this list
* are the order in which they will be tried. Since a WSDLEntry may have no
* associated WSDLResources, this list is lazilly initialized.
*/
private ArrayList wsdlResources;
/**
* Creates a new WSDLEntry with no properties set.
*/
public WSDLEntry() {
this(null);
}
/**
* Creates a new WSDLEntry with a given uri.
* @param uri The uri for this WSDLEntry.
*/
public WSDLEntry(String uri) {
this.uri = uri;
}
/**
* Get the uri for this WSDLEntry.
* @return the uri.
*/
public String getURI() {
return uri;
}
/**
* Set the uri for this WSDLEntry.
* @param uri The uri.
*/
public void setURI(String uri) {
this.uri = uri;
}
/**
* Add a WSDLResource to the list of alternative sources for the WSDL doc.
* @param wsdlResource the WSDLResource to add.
*/
public void addWSDLResource(WSDLResource wsdlResource) {
if (wsdlResources == null) {
wsdlResources = new ArrayList(4);
}
wsdlResources.add(wsdlResource);
}
/**
* Remove a specified WSDLResource from the list of alternative sources
* for the WSDL doc.
* @param wsdlResource the WSDLResource to remove.
*/
public void removeWSDLResouce(WSDLResource wsdlResource) {
if (wsdlResources != null) {
wsdlResources.remove(wsdlResource);
}
}
/**
* Provide an alternative InputSource for the WSDL document associated with
* this WSDLEntry. This method tries all the available alternatives but not
* the uri. If there is no available alternative InputSource then null is
* returned.
* @return An alternative org.xml.sax.InputSource that specifies the
* WSDL doc.
*/
public InputSource provideAlternativeInputSource(
XMLPipelineContext context,
URLContentManager manager) {
InputSource inputSource = null;
if (wsdlResources != null) {
for (int i = 0;
i < wsdlResources.size() && inputSource == null;
i++) {
WSDLResource wsdlResource = (WSDLResource)wsdlResources.get(i);
try {
inputSource = wsdlResource.provideInputSource(context);
} catch (WSDLResourceException wsdl) {
logger.warn("wsdl-resource-input-source-failure",
wsdlResource,
wsdl);
}
}
}
return inputSource;
}
}
/*
===========================================================================
Change History
===========================================================================
$Log$
04-Oct-05 9724/1 philws VBM:2005092810 Port forward of the generic pipeline connection timeout functionality
04-Oct-05 9679/1 philws VBM:2005092810 Provide a connection timeout mechanism and configuration for pipeline operations
29-Nov-04 6232/1 doug VBM:2004111702 Refactored Logging framework
20-Oct-04 5438/3 philws VBM:2004082706 Reformat production pipeline code
20-Oct-04 5438/1 philws VBM:2004082706 Transfer Pipeline source into MCS
04-Aug-03 294/1 allan VBM:2003070709 Fixed merge conflicts
31-Jul-03 217/3 allan VBM:2003071702 Fixed javadoc issue with contains and containsIdentity.
31-Jul-03 217/1 allan VBM:2003071702 Made HTTPMessageEntities into a set.
24-Jun-03 124/1 adrian VBM:2003061902 Implemented provideInputSource method for ServletRequestResource
23-Jun-03 111/1 adrian VBM:2003061903 Implemented URIResource provideInputSource method
19-Jun-03 98/4 allan VBM:2003022822 WS Connector renamed to WS Driver
18-Jun-03 98/1 allan VBM:2003022822 Promote prelimary classes so that other can access them
===========================================================================
*/
|
[
"iwilloug@b642a0b7-b348-0410-9912-e4a34d632523"
] |
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
|
bd56d06228bca448c25dc0595b097626a9394ca3
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/tencent/im/msg/im_msg_head$InstInfo.java
|
d73b4c1ea589278fc7de50c30778750f5a742841
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,205
|
java
|
package tencent.im.msg;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.mobileqq.pb.MessageMicro;
import com.tencent.mobileqq.pb.MessageMicro.FieldMap;
import com.tencent.mobileqq.pb.PBEnumField;
import com.tencent.mobileqq.pb.PBField;
import com.tencent.mobileqq.pb.PBUInt32Field;
public final class im_msg_head$InstInfo
extends MessageMicro
{
static final MessageMicro.FieldMap __fieldMap__ = MessageMicro.initFieldMap(new int[] { 8, 16, 24, 80 }, new String[] { "uint32_apppid", "uint32_instid", "uint32_platform", "enum_device_type" }, new Object[] { Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0) }, InstInfo.class);
public final PBEnumField enum_device_type = PBField.initEnum(0);
public final PBUInt32Field uint32_apppid = PBField.initUInt32(0);
public final PBUInt32Field uint32_instid = PBField.initUInt32(0);
public final PBUInt32Field uint32_platform = PBField.initUInt32(0);
static
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\tencent\im\msg\im_msg_head$InstInfo.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
ad56c84f5de2cf1a3802091d61e6ea8fe5769e50
|
31b6578da63280b11188039aee6dc4b957044e19
|
/src/test/java/com/chaung/entityaudit/web/rest/util/PaginationUtilUnitTest.java
|
beb3c029cfa9cdcdbaafe2aac6343fc901806173
|
[] |
no_license
|
BulkSecurityGeneratorProject/chaung-entity-audit
|
69553745c989d24161ab10353e9ec46428a8f460
|
9cbef291c1b2ecb01b93c699ed9008bf0d96e10b
|
refs/heads/master
| 2022-12-09T11:40:42.627310
| 2018-12-27T10:41:23
| 2018-12-27T10:41:23
| 296,582,704
| 0
| 0
| null | 2020-09-18T09:58:17
| 2020-09-18T09:58:16
| null |
UTF-8
|
Java
| false
| false
| 1,750
|
java
|
package com.chaung.entityaudit.web.rest.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.HttpHeaders;
/**
* Tests based on parsing algorithm in app/components/util/pagination-util.service.js
*
* @see PaginationUtil
*/
public class PaginationUtilUnitTest {
@Test
public void generatePaginationHttpHeadersTest() {
String baseUrl = "/api/_search/example";
List<String> content = new ArrayList<>();
Page<String> page = new PageImpl<>(content, PageRequest.of(6, 50), 400L);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl);
List<String> strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
String headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 4);
String expectedData = "</api/_search/example?page=7&size=50>; rel=\"next\","
+ "</api/_search/example?page=5&size=50>; rel=\"prev\","
+ "</api/_search/example?page=7&size=50>; rel=\"last\","
+ "</api/_search/example?page=0&size=50>; rel=\"first\"";
assertEquals(expectedData, headerData);
List<String> xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L));
}
}
|
[
"nguyen.min@ascendcorp.com"
] |
nguyen.min@ascendcorp.com
|
2d111ce5238d2d0cde8610231e1d0b552235fdfa
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/42/org/apache/commons/math/stat/regression/MillerUpdatingRegression_clear_333.java
|
4fe9547e8ac3bfb84a5abc6beaa7575bbd687117
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,865
|
java
|
org apach common math stat regress
concret implement link updat multipl linear regress updatingmultiplelinearregress
algorithm pre
algorithm squar routin supplement gentleman
author alan miller
sourc journal royal statist societi
seri appli statist vol
publish blackwel publish royal statist societi
stabl url http www jstor org stabl pre
method multipl regress form solut ol problem
updat decomposit gentleman
version
miller updat regress millerupdatingregress updat multipl linear regress updatingmultiplelinearregress
suggest clear wipe intern reorder
canon order
clear
arrai fill
arrai fill rh
arrai fill
arrai fill tol
arrai fill rss
arrai fill work tolset
arrai fill work sing
arrai fill sing
arrai fill lindep
nvar
vorder
nob
sserr
sumi
sumsqi
rss set
tol set
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
fed5ecfa79b37d9d7f11a9614b43644009d4e958
|
ca7cb99bbeca56ce44205eb6ffa7747d0e1656f3
|
/code/JavaCourse/src/test/java/ttl/larku/solutions/exceptions/Exceptions3.java
|
32ff97839f95a065d989204f5fcbc892bc15922c
|
[] |
no_license
|
patpating/IntJava
|
563f4bbeb9e1c33c2a841c944c03ac65a0ff52cb
|
ec69f802bcb1ea752f6aaf9ee7d0f0374d7759df
|
refs/heads/master
| 2023-08-22T09:35:22.558894
| 2021-10-08T21:25:58
| 2021-10-08T21:25:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,929
|
java
|
package ttl.larku.solutions.exceptions;
import io.vavr.control.Try;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.time.LocalTime;
import java.util.List;
import static java.util.stream.Collectors.toList;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* @author whynot
*/
public class Exceptions3 {
List<String> siteAddresses = List.of("https://google.com", "https://xyz.com", "https://zyx.com");
//TODO - Part A. This method should process a list of address and
// return a List of results. We have to turn each
// String address into a URI, and then "connect" to that
// address. We are faking the connecting part for now.
// For this use case, we don't care about the errors, we
// just want to throw them away.
// Add code to this method to do the needful. Use Streams
// and make it work without try/catch.
public List<String> processAddresses() {
List<String> results = siteAddresses.stream()
.map(address -> Try.of(() -> connectAndGetResult(address)))
.filter(t -> t.isSuccess())
.map(t -> t.get())
.collect(toList());
return results;
}
public String connectAndGetResult(String address) throws IOException {
URL url = new URL(address);
URLConnection connection = url.openConnection();
connection.connect();
//make network call and get result;
String result = "Address: " + address + ", at: " + LocalTime.now();
return result;
}
//TODO - Part A. Make this test run
@Test
public void testGetOnlySuccesses() {
List<String> results = processAddresses();
System.out.println("Results.size: " + results.size());
results.forEach(System.out::println);
assertEquals(1, results.size());
}
}
|
[
"anil@panix.com"
] |
anil@panix.com
|
cbdc1d8f816d5738fde543aa4bf8d314d336a284
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-41-16-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/doc/XWikiDocument_ESTest.java
|
a67cc9e4d008947a3e1591a85b0766fa45d5545a
|
[] |
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
| 550
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 04 21:05:35 UTC 2020
*/
package com.xpn.xwiki.doc;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XWikiDocument_ESTest extends XWikiDocument_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
3059c3003b00ceed9369ec70f19c82b7aa4af58d
|
59e6dc1030446132fb451bd711d51afe0c222210
|
/components/cassandra-search/org.wso2.carbon.cassandra.search.mgt/4.2.1/src/main/java/org/wso2/carbon/cassandra/search/data/Column.java
|
7d21108cbcbde1813cbd258e445064e9bbb8bf5c
|
[] |
no_license
|
Alsan/turing-chunk07
|
2f7470b72cc50a567241252e0bd4f27adc987d6e
|
e9e947718e3844c07361797bd52d3d1391d9fb5e
|
refs/heads/master
| 2020-05-26T06:20:24.554039
| 2014-02-07T12:02:53
| 2014-02-07T12:02:53
| 38,284,349
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,425
|
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.wso2.carbon.cassandra.search.data;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
* representation of a column of Cassandra
*/
public class Column implements Comparable{
private String name="" ;
private long timeStamp = 0L ;
private String value = "";
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getTimeStamp() {
return timeStamp;
}
public void setTimeStamp(long timeStamp) {
this.timeStamp = timeStamp;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public boolean equals(Object o) {
if (o == null) {
return false;
}
if (o == this) {
return true;
}
if (!(o instanceof Column)) {
return false;
}
Column column = (Column) o;
return column.getName().equals(this.name)
&& Long.valueOf(column.getTimeStamp()).equals(this.timeStamp)
&& column.getValue().equals(this.value);
}
public int hashCode() {
return new HashCodeBuilder(17, 31).
append(this.name).append(this.timeStamp).
append(this.value).toHashCode();
}
public int compareTo(Object o) {
if (!(o instanceof Column)){
throw new ClassCastException("Invalid object");
}
Column column = (Column) o;
return (Long.valueOf(column.getTimeStamp())).compareTo(timeStamp);
}
}
|
[
"malaka@wso2.com"
] |
malaka@wso2.com
|
64dd7d7861e7a59d2777bef58adfe68b8679f335
|
c8ec156aff710230b23fcdcad3cff99e90ec43b1
|
/src/main/java/jmind/pigg/interceptor/InvocationInterceptorChain.java
|
825a2830952dbb6dbd0764c8f5d92658c34c72ec
|
[
"Apache-2.0"
] |
permissive
|
weiboxie/jmind-pigg
|
b13f7c98acb55cde74fabb31de2662b5abfd1cbe
|
37a9d39042e15b214a2dbb2b4206be15da585ae9
|
refs/heads/master
| 2023-08-28T19:20:50.323692
| 2021-05-19T06:59:07
| 2021-05-19T06:59:07
| 415,533,073
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,534
|
java
|
/*
*
*
* The jmind-pigg Project 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 jmind.pigg.interceptor;
import javax.sql.DataSource;
import jmind.pigg.binding.BoundSql;
import jmind.pigg.binding.InvocationContext;
import jmind.pigg.descriptor.MethodDescriptor;
import jmind.pigg.descriptor.ParameterDescriptor;
import jmind.pigg.util.jdbc.SQLType;
import java.util.ArrayList;
import java.util.List;
/**
* @author xieweibo
*/
public class InvocationInterceptorChain {
private InterceptorChain interceptorChain;
private List<ParameterDescriptor> parameterDescriptors;
private SQLType sqlType;
public InvocationInterceptorChain(InterceptorChain interceptorChain,
List<ParameterDescriptor> parameterDescriptors,
SQLType sqlType) {
this.interceptorChain = interceptorChain;
this.parameterDescriptors = parameterDescriptors;
this.sqlType = sqlType;
}
// public void intercept(BoundSql boundSql, InvocationContext context, DataSource dataSource) {
// if (interceptorChain != null) {
// List<Object> parameterValues = context.getParameterValues();
// List<Parameter> parameters = new ArrayList<Parameter>(parameterValues.size());
// for (int i = 0; i < parameterValues.size(); i++) {
// ParameterDescriptor pd = parameterDescriptors.get(i);
// parameters.add(new Parameter(pd, parameterValues.get(i)));
// }
// interceptorChain.intercept(boundSql, parameters, sqlType, dataSource);
// }
// }
public void preIntercept(InvocationContext context, MethodDescriptor md, DataSource dataSource) {
if(interceptorChain!=null){
interceptorChain.preIntercept(context, sqlType,md, dataSource);
}
}
public void postIntercept(InvocationContext context,MethodDescriptor md,DataSource dataSource, Object result) {
if(interceptorChain!=null){
interceptorChain.postIntercept(context,sqlType,md,dataSource,result);
}
}
}
|
[
"weibo.xwb@alibaba-inc.com"
] |
weibo.xwb@alibaba-inc.com
|
2c503d847b2f0d84366bf55ec93bde1d6d86ccb7
|
2c2a0a09840120d0572cd67ae405f8bc759e380c
|
/app/src/main/java/com/d/retrofit/model/Links.java
|
97b45d8f71af30db6c52a938d3472f55b0942b50
|
[] |
no_license
|
huuhuybn/RetrofitVolley
|
454d18e33c1a5592e7282da7ab8479c1fda136db
|
2637461dae87499b412415fedddeb434005589dc
|
refs/heads/master
| 2022-01-20T17:02:13.174986
| 2019-07-22T04:08:52
| 2019-07-22T04:08:52
| 198,144,890
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,174
|
java
|
package com.d.retrofit.model;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Links {
@SerializedName("self")
@Expose
private List<Self> self = null;
@SerializedName("collection")
@Expose
private List<Collection> collection = null;
@SerializedName("about")
@Expose
private List<About> about = null;
@SerializedName("author")
@Expose
private List<Author> author = null;
@SerializedName("replies")
@Expose
private List<Reply> replies = null;
@SerializedName("version-history")
@Expose
private List<VersionHistory> versionHistory = null;
@SerializedName("predecessor-version")
@Expose
private List<PredecessorVersion> predecessorVersion = null;
@SerializedName("wp:featuredmedia")
@Expose
private List<WpFeaturedmedium> wpFeaturedmedia = null;
@SerializedName("wp:attachment")
@Expose
private List<WpAttachment> wpAttachment = null;
@SerializedName("wp:term")
@Expose
private List<WpTerm> wpTerm = null;
@SerializedName("curies")
@Expose
private List<Cury> curies = null;
public List<Self> getSelf() {
return self;
}
public void setSelf(List<Self> self) {
this.self = self;
}
public List<Collection> getCollection() {
return collection;
}
public void setCollection(List<Collection> collection) {
this.collection = collection;
}
public List<About> getAbout() {
return about;
}
public void setAbout(List<About> about) {
this.about = about;
}
public List<Author> getAuthor() {
return author;
}
public void setAuthor(List<Author> author) {
this.author = author;
}
public List<Reply> getReplies() {
return replies;
}
public void setReplies(List<Reply> replies) {
this.replies = replies;
}
public List<VersionHistory> getVersionHistory() {
return versionHistory;
}
public void setVersionHistory(List<VersionHistory> versionHistory) {
this.versionHistory = versionHistory;
}
public List<PredecessorVersion> getPredecessorVersion() {
return predecessorVersion;
}
public void setPredecessorVersion(List<PredecessorVersion> predecessorVersion) {
this.predecessorVersion = predecessorVersion;
}
public List<WpFeaturedmedium> getWpFeaturedmedia() {
return wpFeaturedmedia;
}
public void setWpFeaturedmedia(List<WpFeaturedmedium> wpFeaturedmedia) {
this.wpFeaturedmedia = wpFeaturedmedia;
}
public List<WpAttachment> getWpAttachment() {
return wpAttachment;
}
public void setWpAttachment(List<WpAttachment> wpAttachment) {
this.wpAttachment = wpAttachment;
}
public List<WpTerm> getWpTerm() {
return wpTerm;
}
public void setWpTerm(List<WpTerm> wpTerm) {
this.wpTerm = wpTerm;
}
public List<Cury> getCuries() {
return curies;
}
public void setCuries(List<Cury> curies) {
this.curies = curies;
}
}
|
[
"huuhuybn@gmail.com"
] |
huuhuybn@gmail.com
|
722165132ced95d04022c1311993ea9534008e0e
|
3dd35c0681b374ce31dbb255b87df077387405ff
|
/generated/com/guidewire/_generated/entity/AuditInfoCriteriaInternal.java
|
785066a3131e9fb33e13f4d5ea7c8fd6ca0bdab9
|
[] |
no_license
|
walisashwini/SBTBackup
|
58b635a358e8992339db8f2cc06978326fed1b99
|
4d4de43576ec483bc031f3213389f02a92ad7528
|
refs/heads/master
| 2023-01-11T09:09:10.205139
| 2020-11-18T12:11:45
| 2020-11-18T12:11:45
| 311,884,817
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 732
|
java
|
package com.guidewire._generated.entity;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "AuditInfoCriteria.eti;AuditInfoCriteria.eix;AuditInfoCriteria.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
public interface AuditInfoCriteriaInternal extends com.guidewire._generated.entity.VersionableInternal {
/**
* Gets the value of the ActualAuditMethod field.
* The actual audit method used in auditInformation
*/
@gw.internal.gosu.parser.ExtendedProperty
public typekey.AuditMethod getActualAuditMethod();
/**
* Sets the value of the ActualAuditMethod field.
*/
public void setActualAuditMethod(typekey.AuditMethod value);
}
|
[
"ashwini@cruxxtechnologies.com"
] |
ashwini@cruxxtechnologies.com
|
c4249ad055a0be0cb0034c48496ff70cb3865649
|
b2f9ad08b5772bf9350982c422de4d2f91813162
|
/src/test/java/org/spongepowered/api/text/TextsTest.java
|
4cf68a89599d33a1f785aaa89a6f23158e0d849b
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
hsyyid/SpongeAPI
|
3503a0cc8377248d6a4ae4c4f6e261db8faccdcc
|
c3c82b74be517d3d52562a54c02e8a2f8b82a8f9
|
refs/heads/master
| 2021-01-18T07:00:25.764181
| 2015-10-20T09:31:05
| 2015-11-09T21:01:04
| 45,940,519
| 0
| 1
| null | 2015-11-10T21:13:47
| 2015-11-10T21:13:47
| null |
UTF-8
|
Java
| false
| false
| 3,645
|
java
|
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.text;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
public class TextsTest {
@Test
public void testFormatMap() {
String killer = "PvPMaster";
String killed = "Innocent";
String weapon = "Stick of Doom";
Text noKiller = Texts.placeholder("killer");
Text noKilled = Texts.placeholder("killed");
Text noWeapon = Texts.placeholder("weapon", Texts.of("his bare hands"));
Text template = build(noKiller, noKilled, noWeapon);
// Need to wrap this in another Text since Text.format does that as well
Text expected = build(Texts.of((Object) killer), Texts.of((Object) killed), Texts.of((Object) weapon));
Text notFormated = Texts.format(template, new HashMap<String, Object>());
assertEquals(template, notFormated);
Map<String, Object> replacements = new HashMap<String, Object>();
replacements.put("killer", killer);
replacements.put("killed", killed);
replacements.put("weapon", weapon);
Text formated = Texts.format(template, replacements);
assertEquals(expected, formated);
}
@Test
public void testFormatArray() {
String killer = "PvPMaster";
String killed = "Innocent";
String weapon = "Stick of Doom";
Text noKiller = Texts.placeholder("0");
Text noKilled = Texts.placeholder("1");
Text noWeapon = Texts.placeholder("2", Texts.of("his bare hands"));
Text template = build(noKiller, noKilled, noWeapon);
// Need to wrap this in another Text since Text.format does that as well
Text expected = build(Texts.of((Object) killer), Texts.of((Object) killed), Texts.of((Object) weapon));
Text notFormated = Texts.format(template, new HashMap<String, Object>());
assertEquals(template, notFormated);
Text formated = Texts.format(template, killer, killed, weapon);
assertEquals(expected, formated);
}
private Text build(Text killer, Text killed, Text weapon) {
return Texts.builder("Player ")
.append(killer)
.append(Texts.of(" has killed "))
.append(killed)
.append(Texts.of(" with "))
.append(weapon)
.build();
}
}
|
[
"zml@aoeu.xyz"
] |
zml@aoeu.xyz
|
31331a5ac2e4d7f55218b9544218e9a9cda45ed8
|
fc875ae0713344a52ba5b86013fba0ec8e63748b
|
/app/src/main/java/com/future/zhh/ticket/libswiperefreshandloadmore/loadingIndicator/indicator/BaseIndicatorController.java
|
d0860d03ae6680dde2a341b0c2f3ba3f7cd9fe65
|
[] |
no_license
|
zhaohuanhui/Ticket
|
86f01b6392b78c4c50abc68940657368528605aa
|
aa2f72513981a387c6c2579329c8906847398595
|
refs/heads/master
| 2021-10-07T19:54:33.157338
| 2018-11-22T14:01:14
| 2018-11-22T14:01:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,396
|
java
|
package com.future.zhh.ticket.libswiperefreshandloadmore.loadingIndicator.indicator;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;
import com.nineoldandroids.animation.Animator;
import java.lang.ref.WeakReference;
import java.util.List;
/**
* Created by Jack on 2015/10/15.
*/
public abstract class BaseIndicatorController {
private WeakReference<View> mTarget;
private List<Animator> mAnimators;
public void setTarget(View target){
this.mTarget=new WeakReference<>(target);
}
public View getTarget(){
return mTarget!=null?mTarget.get():null;
}
public int getWidth(){
return getTarget()!=null?getTarget().getWidth():0;
}
public int getHeight(){
return getTarget()!=null?getTarget().getHeight():0;
}
public void postInvalidate(){
if (getTarget()!=null){
getTarget().postInvalidate();
}
}
/**
* draw indicator
* @param canvas
* @param paint
*/
public abstract void draw(Canvas canvas, Paint paint);
/**
* create animation or animations
*/
public abstract List<Animator> createAnimation();
public void initAnimation(){
mAnimators=createAnimation();
}
/**
* make animation to start or end when target
* view was be Visible or Gone or Invisible.
* make animation to cancel when target view
* be onDetachedFromWindow.
* @param animStatus
*/
public void setAnimationStatus(AnimStatus animStatus){
if (mAnimators==null){
return;
}
int count=mAnimators.size();
for (int i = 0; i < count; i++) {
Animator animator=mAnimators.get(i);
boolean isRunning=animator.isRunning();
switch (animStatus){
case START:
if (!isRunning){
animator.start();
}
break;
case END:
if (isRunning){
animator.end();
}
break;
case CANCEL:
if (isRunning){
animator.cancel();
}
break;
}
}
}
public enum AnimStatus{
START,END,CANCEL
}
}
|
[
"you@example.com"
] |
you@example.com
|
2f7e2b5216f93fcd8493a01a5c931d4b01a946ac
|
ffed6d50602610adfb4eaf3f960b9118782a18cc
|
/Multithreading Basics/templates/ThreadStateDemo.java
|
84bcfddc9f27784f9358e819ea1cbc981f03fa57
|
[] |
no_license
|
OrshiKozek/lectures
|
864792ec1af5a67f7bb3846c8cd442303e703e5b
|
6036991ea3f61040ad80b548b7b19f3e8e89d357
|
refs/heads/master
| 2022-06-01T06:37:17.098465
| 2020-05-02T20:50:07
| 2020-05-02T20:50:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 848
|
java
|
import java.util.Arrays;
public class ThreadStateDemo {
public static final String FORMAT = "[%-11s] Run by: %-8s Parent: %s is %-8s Worker: %s is %s%n";
private Thread parentThread;
private Thread workerThread;
public ThreadStateDemo() throws InterruptedException {
// TODO
}
public static void calculate(int size) {
double[] junk = new double[size];
for (int i = 0; i < junk.length; i++) {
junk[i] = Math.random();
}
Arrays.sort(junk);
}
public void output(String message) {
System.out.printf(FORMAT, message, Thread.currentThread().getName(), parentThread.getName(),
parentThread.getState().toString(), workerThread.getName(),
workerThread.getState().toString());
}
public static void main(String[] args) throws InterruptedException {
new ThreadStateDemo();
}
}
|
[
"sjengle@cs.usfca.edu"
] |
sjengle@cs.usfca.edu
|
56ebaf0b58302697105ef3e48a679b31d264f62d
|
f3414e405d68daa615b8010a949847b3fb7bd5b9
|
/utilities/idcserver.src/intradoc/common/LengthLimitedInputStream.java
|
34615c49aa81953fb62179488c315d193d7f3347
|
[] |
no_license
|
osgirl/ProjectUCM
|
ac2c1d554746c360f24414d96e85a6c61e31b102
|
5e0cc24cfad53d1f359d369d57b622c259f88311
|
refs/heads/master
| 2020-04-22T04:11:13.373873
| 2019-03-04T19:26:48
| 2019-03-04T19:26:48
| 170,114,287
| 0
| 0
| null | 2019-02-11T11:02:25
| 2019-02-11T11:02:25
| null |
UTF-8
|
Java
| false
| false
| 3,012
|
java
|
/* */ package intradoc.common;
/* */
/* */ import java.io.FilterInputStream;
/* */ import java.io.IOException;
/* */ import java.io.InputStream;
/* */
/* */ public class LengthLimitedInputStream extends FilterInputStream
/* */ {
/* */ public long m_length;
/* */ public long m_numLeft;
/* */
/* */ public LengthLimitedInputStream(InputStream is, long length)
/* */ {
/* 37 */ super(is);
/* 38 */ this.m_length = length;
/* 39 */ this.m_numLeft = length;
/* */ }
/* */
/* */ public int read(byte[] b, int off, int len)
/* */ throws IOException
/* */ {
/* 45 */ if (this.m_numLeft <= 0L)
/* */ {
/* 47 */ return -1;
/* */ }
/* */
/* 50 */ long numToRead = this.m_numLeft;
/* 51 */ if (numToRead > len)
/* */ {
/* 53 */ numToRead = len;
/* */ }
/* */
/* 56 */ int numRead = super.read(b, off, (int)numToRead);
/* 57 */ if (numRead > 0)
/* */ {
/* 59 */ this.m_numLeft -= numRead;
/* */ }
/* */
/* 62 */ return numRead;
/* */ }
/* */
/* */ public int read()
/* */ throws IOException
/* */ {
/* 68 */ if (this.m_numLeft <= 0L)
/* */ {
/* 70 */ return -1;
/* */ }
/* */
/* 73 */ int ret = super.read();
/* 74 */ if (ret == -1)
/* */ {
/* 76 */ this.m_numLeft = 0L;
/* */ }
/* */ else
/* */ {
/* 80 */ this.m_numLeft -= 1L;
/* */ }
/* */
/* 83 */ return ret;
/* */ }
/* */
/* */ public int available()
/* */ throws IOException
/* */ {
/* 89 */ if (this.m_numLeft <= 0L)
/* */ {
/* 91 */ return 0;
/* */ }
/* */
/* 94 */ int available = super.available();
/* 95 */ if (available > this.m_numLeft)
/* */ {
/* 97 */ available = (int)this.m_numLeft;
/* */ }
/* */
/* 100 */ return available;
/* */ }
/* */
/* */ public long skip(long n)
/* */ throws IOException
/* */ {
/* 106 */ if (this.m_numLeft <= 0L)
/* */ {
/* 108 */ return 0L;
/* */ }
/* */
/* 111 */ long numToSkip = this.m_numLeft;
/* 112 */ if (numToSkip > n)
/* */ {
/* 114 */ numToSkip = n;
/* */ }
/* */
/* 117 */ long numSkipped = super.skip(numToSkip);
/* 118 */ if (numSkipped > 0L)
/* */ {
/* 120 */ this.m_numLeft -= numSkipped;
/* */ }
/* */
/* 123 */ return numSkipped;
/* */ }
/* */
/* */ public static Object idcVersionInfo(Object arg)
/* */ {
/* 128 */ return "releaseInfo=dev,releaseRevision=$Rev: 66660 $";
/* */ }
/* */ }
/* Location: C:\Documents and Settings\rastogia.EMEA\My Documents\idcserver\
* Qualified Name: intradoc.common.LengthLimitedInputStream
* JD-Core Version: 0.5.4
*/
|
[
"ranjodh.singh@hays.com"
] |
ranjodh.singh@hays.com
|
e13d990f634faab2620753958f3a544cfc997099
|
223bb37709c01a21509df653f1453d5cc0badc57
|
/java-example-spring/src/main/java/com/goodsave/example/spring/autowireda/SimplePerson.java
|
224a48ca4d7af248a2b7d9d2ebadca107f36258b
|
[
"Apache-2.0"
] |
permissive
|
goodsave/java-example
|
99fc57f18cac4fe4bcfda688158997ad86f71706
|
67802e8a202ac693b3e1a0042e01bf0fba943d26
|
refs/heads/master
| 2021-04-03T07:03:36.041482
| 2018-03-16T12:30:08
| 2018-03-16T12:30:08
| 124,855,220
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 514
|
java
|
package com.goodsave.example.spring.autowireda;
import org.springframework.stereotype.Service;
/**
* SimplePersion
* Created by Joker on 2017/7/25.
*/
@Service
/*@Service("SimplePerson")*/
public class SimplePerson implements Person {
@Override
public Person sayWhat(String str) {
System.out.println("Star:"+this+"\tsay:"+str);
return this;
}
@Override
public Person doWhat(String str) {
System.out.println("Star:"+this+"\tdo:"+str);
return this;
}
}
|
[
"goodsave@qq.com"
] |
goodsave@qq.com
|
8dfc595395f05764ca9919b8c5a28fcfe0880629
|
3f7a5d7c700199625ed2ab3250b939342abee9f1
|
/src/gcom/batch/cobranca/BatchInserirResumoAcoesCobrancaCronogramaMDB.java
|
79cc9cf7896d03a5d1da46298038a149fe0d02ae
|
[] |
no_license
|
prodigasistemas/gsan-caema
|
490cecbd2a784693de422d3a2033967d8063204d
|
87a472e07e608c557e471d555563d71c76a56ec5
|
refs/heads/master
| 2021-01-01T06:05:09.920120
| 2014-10-08T20:10:40
| 2014-10-08T20:10:40
| 24,958,220
| 1
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 5,230
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* GSAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.batch.cobranca;
import gcom.cobranca.ControladorCobrancaLocal;
import gcom.cobranca.ControladorCobrancaLocalHome;
import gcom.util.ConstantesJNDI;
import gcom.util.ControladorException;
import gcom.util.ServiceLocator;
import gcom.util.ServiceLocatorException;
import gcom.util.SistemaException;
import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
/**
* Descrição da classe
*
* @author Pedro Alexandre
* @date 22/01/2007
*/
public class BatchInserirResumoAcoesCobrancaCronogramaMDB implements
MessageDrivenBean, MessageListener {
/**
*
*/
private static final long serialVersionUID = 1L;
public BatchInserirResumoAcoesCobrancaCronogramaMDB() {
super();
}
public void setMessageDrivenContext(MessageDrivenContext ctx)
throws EJBException {
}
public void ejbRemove() throws EJBException {
}
public void onMessage(Message message) {
if (message instanceof ObjectMessage) {
ObjectMessage objectMessage = (ObjectMessage) message;
try {
this
.getControladorCobranca()
.inserirResumoAcoesCobrancaCronograma(
(Object[]) ((Object[]) objectMessage
.getObject())[0],
(Integer) ((Object[]) objectMessage.getObject())[1]);
} catch (JMSException e) {
System.out.println("Erro no MDB");
e.printStackTrace();
} catch (ControladorException e) {
System.out.println("Erro no MDB");
e.printStackTrace();
}
}
}
private ControladorCobrancaLocal getControladorCobranca() {
ControladorCobrancaLocalHome localHome = null;
ControladorCobrancaLocal local = null;
ServiceLocator locator = null;
try {
locator = ServiceLocator.getInstancia();
localHome = (ControladorCobrancaLocalHome) locator
.getLocalHomePorEmpresa(ConstantesJNDI.CONTROLADOR_COBRANCA_SEJB);
local = localHome.create();
return local;
} catch (CreateException e) {
throw new SistemaException(e);
} catch (ServiceLocatorException e) {
throw new SistemaException(e);
}
}
/**
* Default create method
*
* @throws CreateException
*/
public void ejbCreate() {
}
}
|
[
"felipesantos2089@gmail.com"
] |
felipesantos2089@gmail.com
|
7b1cf0767ee6179bf6ee6f935206ed504611569f
|
d9d8bf3702848435edeaf92e9f5b55a8a5ea8254
|
/solvers/java/src/main/java/com/analog/lyric/dimple/factorfunctions/Not.java
|
37d5ada8c9fc53d6d86d4710fe5c6c1dd2ebbfd7
|
[
"BSD-3-Clause",
"Minpack",
"Apache-2.0"
] |
permissive
|
yujianyuanhaha/Co-Channel-Sig-Detection
|
8fb79cfbbd560dcb3205c53fa57c2e19081a8ad7
|
5c6b4d203957fb043966ff17a2241555cf03e5fe
|
refs/heads/master
| 2022-01-22T23:20:18.052915
| 2019-06-17T04:38:11
| 2019-06-17T04:38:11
| 166,728,619
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,923
|
java
|
/*******************************************************************************
* Copyright 2012 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
********************************************************************************/
package com.analog.lyric.dimple.factorfunctions;
import com.analog.lyric.dimple.factorfunctions.core.FactorFunction;
import com.analog.lyric.dimple.model.values.Value;
/**
* Deterministic logical NOT. This is a deterministic directed factor.
*
* The variables are ordered as follows in the argument list:
*
* 1) Output (Logical NOT of input)
* 2) Input (inputs may be boolean, double 0.0/1.0 or integer 0/1)
*
*/
public class Not extends FactorFunction
{
@Override
public final double evalEnergy(Value[] arguments)
{
final boolean outValue = arguments[0].getBoolean();
final boolean inValue = arguments[1].getBoolean();
final boolean notValue = !inValue;
return (notValue == outValue) ? 0 : Double.POSITIVE_INFINITY;
}
@Override
public final boolean isDirected() {return true;}
@Override
public final int[] getDirectedToIndices() {return new int[]{0};}
@Override
public final boolean isDeterministicDirected() {return true;}
@Override
public final void evalDeterministic(Value[] arguments)
{
arguments[0].setBoolean(!arguments[1].getBoolean());
}
}
|
[
"jianyuan@vt.edu"
] |
jianyuan@vt.edu
|
b294ebcb65a678f32cf9c05cc3a6c34bed507111
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-14227-24-4-Single_Objective_GGA-WeightedSum/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
|
a6beefd6d89b546cebbfa27b087ba28a9d0f7725
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 429
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Jan 17 18:41:12 UTC 2020
*/
package org.xwiki.job;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a40ba78775338db8a5b04dbd3494894b4413575b
|
8a42be3f930d8a215394a96ad2e91c95c3b7ff86
|
/Source/RecordEditor_Tests1/src/net/sf/RecordEditor/test/filestorage2d/TstLargeListVB61.java
|
7c0bff8293c72b6b1a20c8f3a1437ab2c84187d9
|
[] |
no_license
|
java-tools/jrec
|
742e741418c987baa4350390d126d74c0d7c4689
|
9ece143cdd52832804eca6f3fb4a1490e2a6f891
|
refs/heads/master
| 2021-09-27T19:24:11.979955
| 2017-11-18T06:35:31
| 2017-11-18T06:35:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,638
|
java
|
package net.sf.RecordEditor.test.filestorage2d;
import java.io.ByteArrayInputStream;
import junit.framework.TestCase;
import net.sf.JRecord.Details.LayoutDetail;
import net.sf.JRecord.External.RecordEditorXmlLoader;
import net.sf.RecordEditor.utils.common.Common;
import net.sf.RecordEditor.utils.fileStorage.FileDetails;
import net.sf.RecordEditor.utils.params.Parameters;
import net.sf.RecordEditor.test.filestorage1.TstLargeListVB50;
public class TstLargeListVB61 extends TestCase {
private TstLargeListVB50 main = new TstLargeListVB50();
private LayoutDetail layout;
public TstLargeListVB61() throws Exception {
String c = "<?xml version=\"1.0\" ?>"
+ "<RECORD RECORDNAME=\"VbFile1\" COPYBOOK=\"\" DELIMITER=\"<Tab>\" FONTNAME=\"utf8\" FILESTRUCTURE=\"Text_Unicode\" STYLE=\"0\" RECORDTYPE=\"GroupOfRecords\" LIST=\"Y\" QUOTE=\"\" RecSep=\"default\">"
+ " <RECORDS>"
+ " <RECORD RECORDNAME=\"VbRec1\" COPYBOOK=\"\" DELIMITER=\"<Tab>\" FONTNAME=\"utf8\" FILESTRUCTURE=\"Default\" STYLE=\"0\" RECORDTYPE=\"RecordLayout\" LIST=\"Y\" PARENT=\"VbRec1\" QUOTE=\"\" RecSep=\"default\">"
+ " <FIELDS>"
+ " <FIELD NAME=\"f11\" POSITION=\"1\" LENGTH=\"6\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " <FIELD NAME=\"f12\" POSITION=\"7\" LENGTH=\"3\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " <FIELD NAME=\"f13\" POSITION=\"10\" LENGTH=\"6\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " </FIELDS>"
+ " </RECORD>"
+ " <RECORD RECORDNAME=\"VbRec2\" COPYBOOK=\"\" DELIMITER=\"<Tab>\" FONTNAME=\"utf8\" FILESTRUCTURE=\"Default\" STYLE=\"0\" RECORDTYPE=\"RecordLayout\" LIST=\"Y\" PARENT=\"VbRec1\" QUOTE=\"\" RecSep=\"default\">"
+ " <FIELDS>"
+ " <FIELD NAME=\"f11\" POSITION=\"1\" LENGTH=\"6\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " <FIELD NAME=\"f12\" POSITION=\"7\" LENGTH=\"3\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " <FIELD NAME=\"f13\" POSITION=\"24\" LENGTH=\"6\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " </FIELDS>"
+ " </RECORD>"
+ " <RECORD RECORDNAME=\"VbRec3\" COPYBOOK=\"\" DELIMITER=\"<Tab>\" FONTNAME=\"utf8\" FILESTRUCTURE=\"Default\" STYLE=\"0\" RECORDTYPE=\"RecordLayout\" LIST=\"Y\" PARENT=\"VbRec1\" QUOTE=\"\" RecSep=\"default\">"
+ " <FIELDS>"
+ " <FIELD NAME=\"f11\" POSITION=\"1\" LENGTH=\"6\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " <FIELD NAME=\"f12\" POSITION=\"7\" LENGTH=\"3\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " <FIELD NAME=\"f13\" POSITION=\"36\" LENGTH=\"6\" TYPE=\"Num (Right Justified zero padded)\"/>"
+ " </FIELDS>"
+ " </RECORD>"
+ " </RECORDS>"
+ "</RECORD>";
ByteArrayInputStream bs = new ByteArrayInputStream(c.getBytes());
RecordEditorXmlLoader loader = new RecordEditorXmlLoader();
layout = loader.loadCopyBook(bs, "Csv Layout").asLayoutDetail();
main.setup(layout);
}
@Override
protected void setUp() throws Exception {
super.setUp();
Parameters.getInitialisedProperties()
.put(Parameters.PROPERTY_BIG_FILE_DISK_FLAG, "Y");
}
public void testCharLine611() {
main.checkLines = false;
Parameters.getInitialisedProperties().put(Parameters.PROPERTY_BIG_FILE_CHUNK_SIZE, "1");
Common.OPTIONS.doCompress.set(false);
System.out.println("Test 1:");
tst("CharLine 611.1.1 ", 1, 0, 600);
tst("CharLine 611.1.2 ", 12, 0, 400);
tst("CharLine 611.1.3 ", 15, 0, 600);
tst("CharLine 611.1.4 ", 17, 0, 400);
tst("CharLine 611.2.1 ", 121, 0, 400);
tst("CharLine 611.2.2 ", 1213, 0, 800);
tst("CharLine 611.2.3 ", 1215, 0, 400);
tst("CharLine 611.2.4 ", 1217, 0, 800);
}
public void testCharLine612() {
main.checkLines = false;
Parameters.getInitialisedProperties().put(Parameters.PROPERTY_BIG_FILE_CHUNK_SIZE, "1");
Common.OPTIONS.doCompress.set(false);
tst("CharLine 612.2.1 ", System.nanoTime(), 0, 400);
tst("CharLine 612.2.2 ", System.nanoTime() + 12, 0, 600);
tst("CharLine 612.2.3 ", System.nanoTime() + 15, 0, 500);
tst("CharLine 612.2.4 ", System.nanoTime() + 17, 0, 600);
tst("CharLine 612.3.1 ", System.nanoTime() + 121, 0, 400);
tst("CharLine 612.3.2 ", System.nanoTime() + 1213, 0, 800);
tst("CharLine 612.3.3 ", System.nanoTime() + 1215, 0, 400);
tst("CharLine 612.3.4 ", System.nanoTime() + 1217, 0, 800);
}
public void testCharLine613() {
main.checkLines = true;
Parameters.getInitialisedProperties().put(Parameters.PROPERTY_BIG_FILE_CHUNK_SIZE, "1");
Common.OPTIONS.doCompress.set(false);
System.out.println("Test 3:");
tst("CharLine 613.1.1 ", 1, 0, 400);
tst("CharLine 613.1.2 ", 12, 0, 600);
tst("CharLine 613.1.3 ", 15, 0, 400);
tst("CharLine 613.2.1 ", 121, 0, 400);
tst("CharLine 613.2.2 ", 1213, 0, 600);
tst("CharLine 613.2.3 ", 1215, 0, 400);
}
public void testCharLine614() {
main.checkLines = true;
Parameters.getInitialisedProperties().put(Parameters.PROPERTY_BIG_FILE_CHUNK_SIZE, "1");
Common.OPTIONS.doCompress.set(false);
tst("CharLine 614.2.1 ", System.nanoTime(), 0, 400);
tst("CharLine 614.2.2 ", System.nanoTime() + 12, 0, 600);
tst("CharLine 614.2.3 ", System.nanoTime() + 15, 0, 500);
tst("CharLine 614.3.1 ", System.nanoTime() + 121, 0, 400);
tst("CharLine 614.3.2 ", System.nanoTime() + 1213, 0, 700);
tst("CharLine 614.3.3 ", System.nanoTime() + 1215, 0, 400);
}
public void tst(String desc, long seed, int firstLine, int numActions) {
main.tst(FileDetails.CHAR_LINE, desc, seed, firstLine, numActions, layout.getMaximumRecordLength());
}
}
|
[
"bruce_a_martin@b856f413-25aa-4700-8b60-b3441822b2ec"
] |
bruce_a_martin@b856f413-25aa-4700-8b60-b3441822b2ec
|
3490eb3f4d809bc33bf3a9e0319fbe332c996a3d
|
47f9344d9dab3408209d47eee7592967563efe41
|
/src/bean/Blog.java
|
950dd6c19c44d46a2759065eec1f1d62094ac3db
|
[] |
no_license
|
MurphysL/MBlog
|
2293007abf82dc6f8846f7138ae32e61e3f02579
|
8a0674b75ee3801f9df2acf6b459d96415fe9a02
|
refs/heads/master
| 2021-01-19T13:08:09.504915
| 2017-04-16T05:59:09
| 2017-04-16T05:59:09
| 88,066,728
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,402
|
java
|
package bean;
/**
* 博客类
* Created by lenovo on 2017/4/10.
*/
public class Blog {
private int blog_id;
private String email;
private String title;
private String article;
private int watch;
private long time;
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
public int getBlog_id() {
return blog_id;
}
public void setBlog_id(int blog_id) {
this.blog_id = blog_id;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getArticle() {
return article;
}
public void setArticle(String article) {
this.article = article;
}
public int getWatch() {
return watch;
}
public void setWatch(int watch) {
this.watch = watch;
}
@Override
public String toString() {
return "Blog{" +
"blog_id=" + blog_id +
", email=" + email +
", title='" + title + '\'' +
", article='" + article + '\'' +
", watch=" + watch +
", time=" + time +
'}';
}
}
|
[
"1619673065@qq.com"
] |
1619673065@qq.com
|
cf543fe2a29822abee2f496fb72284a30907ad67
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2007-11-08/s2-tiger-2.4.18-rc2/s2-tiger/src/test/java/org/seasar/extension/jdbc/entity/Identity.java
|
4b7f129cf710f6d39ddc3f675be016db7da5c0e0
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,021
|
java
|
/*
* Copyright 2004-2007 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.extension.jdbc.entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
/**
* @author koichik
*/
@Entity
public class Identity {
/**
*
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public int id;
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
8b0888b4d408009ad07cc368b96b4463cc9c336a
|
e9124854d2bb3a40f6642858f3777e89a88b1d54
|
/custom/toint/tointstorefront/web/src/org/toint/storefront/filters/ConsentFilter.java
|
045c4785ffbb2bbcd3d8b63d270669480b2d06f1
|
[] |
no_license
|
Prashanth-techouts/Toint
|
9bcba94fd0422f20131c24cd9e0ec19e789941d6
|
dbd466fae6303a6c796ffd52f169119a4a7ee134
|
refs/heads/master
| 2023-09-03T02:20:49.827317
| 2021-10-22T10:48:30
| 2021-10-22T10:48:30
| 419,990,956
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,135
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package org.toint.storefront.filters;
import de.hybris.platform.acceleratorstorefrontcommons.constants.WebConstants;
import de.hybris.platform.commercefacades.consent.AnonymousConsentFacade;
import de.hybris.platform.commercefacades.consent.data.AnonymousConsentData;
import de.hybris.platform.commercefacades.user.UserFacade;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.util.WebUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import static java.nio.charset.StandardCharsets.UTF_8;
/**
* Filter which handle consent for anonymous customers.<br/>
* It read consent cookie and based on it set proper consent in session.
*/
public class ConsentFilter extends OncePerRequestFilter
{
private static final Logger LOG = LoggerFactory.getLogger(ConsentFilter.class);
private static final ObjectMapper mapper = new ObjectMapper();
private static final int NEVER_EXPIRES = (int) TimeUnit.DAYS.toSeconds(365); // 365 days for expiring
private UserFacade userFacade;
private AnonymousConsentFacade anonymousConsentFacade;
@Override
protected void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response,
final FilterChain filterChain) throws ServletException, IOException
{
handleConsents(request, response);
filterChain.doFilter(request, response);
}
void handleConsents(final HttpServletRequest request, final HttpServletResponse response)
{
if (!getUserFacade().isAnonymousUser())
{
LOG.debug("user is not anonymous, nothing to filter");
return;
}
final Supplier<List<AnonymousConsentData>> consentReader = () -> readConsentCookies(request);
final Consumer<List<AnonymousConsentData>> consentWriter = consents -> writeConsentCookies(response, consents);
getAnonymousConsentFacade().synchronizeAnonymousConsents(consentReader, consentWriter);
}
protected List<AnonymousConsentData> readConsentCookies(final HttpServletRequest request)
{
final Cookie cookie = WebUtils.getCookie(request, WebConstants.ANONYMOUS_CONSENT_COOKIE);
if (cookie != null)
{
try
{
final String cookieValue = URLDecoder.decode(cookie.getValue(), UTF_8);
return Arrays.asList(mapper.readValue(cookieValue, AnonymousConsentData[].class));
}
catch (final IOException e)
{
LOG.error("IOException occurred while reading the cookie", e);
}
}
return Collections.emptyList();
}
protected void writeConsentCookies(final HttpServletResponse response, final List<AnonymousConsentData> consents)
{
try
{
final String cookieValue = mapper.writeValueAsString(consents);
final Cookie cookie = new Cookie(WebConstants.ANONYMOUS_CONSENT_COOKIE, URLEncoder.encode(cookieValue, UTF_8));
cookie.setMaxAge(NEVER_EXPIRES);
cookie.setPath("/");
cookie.setHttpOnly(true);
cookie.setSecure(true);
response.addCookie(cookie);
}
catch (final IOException e)
{
LOG.error("IOException occurred while writing the cookie to the Servlet Response", e);
}
}
protected UserFacade getUserFacade()
{
return userFacade;
}
@Required
public void setUserFacade(final UserFacade userFacade)
{
this.userFacade = userFacade;
}
protected AnonymousConsentFacade getAnonymousConsentFacade()
{
return anonymousConsentFacade;
}
@Required
public void setAnonymousConsentFacade(final AnonymousConsentFacade anonymousConsentFacade)
{
this.anonymousConsentFacade = anonymousConsentFacade;
}
}
|
[
"prashanth.g@techouts.com"
] |
prashanth.g@techouts.com
|
43c040d4db8b38271f5e9d3bd8f8518b2a0bb118
|
8adc4e0536ebf07054ba0acdbf0b2c2b987c267a
|
/xmy/.svn/pristine/58/588513c0fee468692446e3f9df05de25f5d42865.svn-base
|
4ebb3162faa7edf021f25560b4f2488b147c162e
|
[] |
no_license
|
haifeiforwork/xmy
|
f53c9e5f8d345326e69780c9ae6d7cf44e951016
|
abcf424be427168f9a9dac12a04f5a46224211ab
|
refs/heads/master
| 2020-05-03T02:05:40.499935
| 2018-03-06T09:21:15
| 2018-03-06T09:21:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,209
|
package com.zfj.xmy.wap.web.controller.home.dto;
import java.util.HashMap;
import java.util.List;
import com.zfj.xmy.activity.persistence.common.pojo.dto.LimitActivityDir;
import com.zfj.xmy.activity.persistence.common.pojo.dto.WapContainerOutDto;
import com.zfj.xmy.common.persistence.pojo.AdImage;
public class IndexWapDataDto {
private List<AdImage> topAdInfo;
private List<AdImage> firstAdInfo;
private List<WapContainerOutDto> containers;
private List<LimitActivityDir> limitActivityDir;
public List<AdImage> getTopAdInfo() {
return topAdInfo;
}
public void setTopAdInfo(List<AdImage> topAdInfo) {
this.topAdInfo = topAdInfo;
}
public List<AdImage> getFirstAdInfo() {
return firstAdInfo;
}
public void setFirstAdInfo(List<AdImage> firstAdInfo) {
this.firstAdInfo = firstAdInfo;
}
public List<WapContainerOutDto> getContainers() {
return containers;
}
public void setContainers(List<WapContainerOutDto> containers) {
this.containers = containers;
}
public List<LimitActivityDir> getLimitActivityDir() {
return limitActivityDir;
}
public void setLimitActivityDir(List<LimitActivityDir> limitActivityDir) {
this.limitActivityDir = limitActivityDir;
}
}
|
[
"359479295@qq.com"
] |
359479295@qq.com
|
|
b5402390a1bb85dfe4bd1e4c04eaa41751b835ca
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/eslengine-20190120/src/main/java/com/aliyun/eslengine20190120/models/ActiveMboxDeviceRequest.java
|
6f06af92c23805707354235d38e8541283d32389
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 3,506
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.eslengine20190120.models;
import com.aliyun.tea.*;
public class ActiveMboxDeviceRequest extends TeaModel {
// deviceType
@NameInMap("DeviceType")
public String deviceType;
// companyId
@NameInMap("CompanyId")
public String companyId;
// groupName
@NameInMap("GroupName")
public String groupName;
// appVersion
@NameInMap("AppVersion")
public String appVersion;
// productCode
@NameInMap("ProductCode")
public String productCode;
// registerId
@NameInMap("RegisterId")
public String registerId;
// accountName
@NameInMap("AccountName")
public String accountName;
// groupId
@NameInMap("GroupId")
public String groupId;
// deviceMac
@NameInMap("DeviceMac")
public String deviceMac;
// appCode
@NameInMap("AppCode")
public String appCode;
// deviceName
@NameInMap("DeviceName")
public String deviceName;
public static ActiveMboxDeviceRequest build(java.util.Map<String, ?> map) throws Exception {
ActiveMboxDeviceRequest self = new ActiveMboxDeviceRequest();
return TeaModel.build(map, self);
}
public ActiveMboxDeviceRequest setDeviceType(String deviceType) {
this.deviceType = deviceType;
return this;
}
public String getDeviceType() {
return this.deviceType;
}
public ActiveMboxDeviceRequest setCompanyId(String companyId) {
this.companyId = companyId;
return this;
}
public String getCompanyId() {
return this.companyId;
}
public ActiveMboxDeviceRequest setGroupName(String groupName) {
this.groupName = groupName;
return this;
}
public String getGroupName() {
return this.groupName;
}
public ActiveMboxDeviceRequest setAppVersion(String appVersion) {
this.appVersion = appVersion;
return this;
}
public String getAppVersion() {
return this.appVersion;
}
public ActiveMboxDeviceRequest setProductCode(String productCode) {
this.productCode = productCode;
return this;
}
public String getProductCode() {
return this.productCode;
}
public ActiveMboxDeviceRequest setRegisterId(String registerId) {
this.registerId = registerId;
return this;
}
public String getRegisterId() {
return this.registerId;
}
public ActiveMboxDeviceRequest setAccountName(String accountName) {
this.accountName = accountName;
return this;
}
public String getAccountName() {
return this.accountName;
}
public ActiveMboxDeviceRequest setGroupId(String groupId) {
this.groupId = groupId;
return this;
}
public String getGroupId() {
return this.groupId;
}
public ActiveMboxDeviceRequest setDeviceMac(String deviceMac) {
this.deviceMac = deviceMac;
return this;
}
public String getDeviceMac() {
return this.deviceMac;
}
public ActiveMboxDeviceRequest setAppCode(String appCode) {
this.appCode = appCode;
return this;
}
public String getAppCode() {
return this.appCode;
}
public ActiveMboxDeviceRequest setDeviceName(String deviceName) {
this.deviceName = deviceName;
return this;
}
public String getDeviceName() {
return this.deviceName;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
ae3f1f2483582690a5c8a3832aa57040fb2fa27c
|
3c7502cc9da3b1827b0a7529985a4e62fa1ade61
|
/freeipa/src/main/java/com/sequenceiq/freeipa/kerberos/v1/KerberosConfigV1Controller.java
|
0893719b2a8b75b856950839176ae2f1c006b10e
|
[
"LicenseRef-scancode-warranty-disclaimer",
"ANTLR-PD",
"CDDL-1.0",
"bzip2-1.0.6",
"Zlib",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0"
] |
permissive
|
jdesjean/cloudbreak
|
d77d630dab058df4aaa6cf609cb97f542c4cdf8c
|
d533f24162c043bd5345d07adef0e4074e938027
|
refs/heads/master
| 2020-07-06T05:06:10.822481
| 2019-08-13T19:55:33
| 2019-08-16T19:58:23
| 202,900,069
| 0
| 0
|
Apache-2.0
| 2019-08-17T15:42:47
| 2019-08-17T15:42:46
| null |
UTF-8
|
Java
| false
| false
| 1,401
|
java
|
package com.sequenceiq.freeipa.kerberos.v1;
import javax.inject.Inject;
import javax.transaction.Transactional;
import javax.transaction.Transactional.TxType;
import javax.validation.Valid;
import org.springframework.stereotype.Controller;
import com.sequenceiq.freeipa.api.v1.kerberos.KerberosConfigV1Endpoint;
import com.sequenceiq.freeipa.api.v1.kerberos.model.create.CreateKerberosConfigRequest;
import com.sequenceiq.freeipa.api.v1.kerberos.model.describe.DescribeKerberosConfigResponse;
import com.sequenceiq.notification.NotificationController;
@Controller
@Transactional(TxType.NEVER)
public class KerberosConfigV1Controller extends NotificationController implements KerberosConfigV1Endpoint {
@Inject
private KerberosConfigV1Service kerberosConfigV1Service;
@Override
public DescribeKerberosConfigResponse describe(String environmentId) {
return kerberosConfigV1Service.describe(environmentId);
}
@Override
public DescribeKerberosConfigResponse create(@Valid CreateKerberosConfigRequest request) {
return kerberosConfigV1Service.post(request);
}
@Override
public void delete(String environmentId) {
kerberosConfigV1Service.delete(environmentId);
}
@Override
public CreateKerberosConfigRequest getRequest(String environmentId) {
return kerberosConfigV1Service.getCreateRequest(environmentId);
}
}
|
[
"keyki.kk@gmail.com"
] |
keyki.kk@gmail.com
|
9193ac89608c87aa19820ea1fc329707cb3fd15c
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_2nd/Nicad_t1_beam_2nd855.java
|
1daab9403c85300afc85f51c0240aca242844c73
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 463
|
java
|
// clone pairs:4528:80%
// 5704:beam/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterPaneStateMachine.java
public class Nicad_t1_beam_2nd855
{
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof AfterPaneStateMachine)) {
return false;
}
AfterPaneStateMachine that = (AfterPaneStateMachine) obj;
return this.countElems == that.countElems;
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
92ac16d746370b590564fb8e63c5ce557be5907e
|
8b82369d50b41495d46f3403dc1051a7bdcb9c70
|
/java5/src/Java5/impl/CastExpressionImpl.java
|
30bd8d7cccbc8cd5bea76cff806713e2901d206f
|
[] |
no_license
|
githubbrunob/DSLTransGIT
|
7dd106ffdddbd0eeda4642c931c41d2ceb4961c2
|
efbbb5dacc02d5cb3365422a46cf00805baab13e
|
refs/heads/master
| 2020-04-07T03:53:43.455696
| 2017-04-30T20:44:23
| 2017-04-30T20:44:23
| 12,057,373
| 1
| 1
| null | 2017-09-12T13:43:19
| 2013-08-12T14:08:05
|
Java
|
UTF-8
|
Java
| false
| false
| 6,512
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package Java5.impl;
import Java5.CastExpression;
import Java5.Expression;
import Java5.Java5Package;
import Java5.NamedElementRef;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Cast Expression</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link Java5.impl.CastExpressionImpl#getExpression <em>Expression</em>}</li>
* <li>{@link Java5.impl.CastExpressionImpl#getType <em>Type</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class CastExpressionImpl extends ExpressionImpl implements CastExpression {
/**
* The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getExpression()
* @generated
* @ordered
*/
protected Expression expression;
/**
* The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected NamedElementRef type;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CastExpressionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return Java5Package.Literals.CAST_EXPRESSION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Expression getExpression() {
return expression;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) {
Expression oldExpression = expression;
expression = newExpression;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Java5Package.CAST_EXPRESSION__EXPRESSION, oldExpression, newExpression);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setExpression(Expression newExpression) {
if (newExpression != expression) {
NotificationChain msgs = null;
if (expression != null)
msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Java5Package.CAST_EXPRESSION__EXPRESSION, null, msgs);
if (newExpression != null)
msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Java5Package.CAST_EXPRESSION__EXPRESSION, null, msgs);
msgs = basicSetExpression(newExpression, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Java5Package.CAST_EXPRESSION__EXPRESSION, newExpression, newExpression));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NamedElementRef getType() {
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetType(NamedElementRef newType, NotificationChain msgs) {
NamedElementRef oldType = type;
type = newType;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Java5Package.CAST_EXPRESSION__TYPE, oldType, newType);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setType(NamedElementRef newType) {
if (newType != type) {
NotificationChain msgs = null;
if (type != null)
msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Java5Package.CAST_EXPRESSION__TYPE, null, msgs);
if (newType != null)
msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Java5Package.CAST_EXPRESSION__TYPE, null, msgs);
msgs = basicSetType(newType, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Java5Package.CAST_EXPRESSION__TYPE, newType, newType));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Java5Package.CAST_EXPRESSION__EXPRESSION:
return basicSetExpression(null, msgs);
case Java5Package.CAST_EXPRESSION__TYPE:
return basicSetType(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Java5Package.CAST_EXPRESSION__EXPRESSION:
return getExpression();
case Java5Package.CAST_EXPRESSION__TYPE:
return getType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Java5Package.CAST_EXPRESSION__EXPRESSION:
setExpression((Expression)newValue);
return;
case Java5Package.CAST_EXPRESSION__TYPE:
setType((NamedElementRef)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Java5Package.CAST_EXPRESSION__EXPRESSION:
setExpression((Expression)null);
return;
case Java5Package.CAST_EXPRESSION__TYPE:
setType((NamedElementRef)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Java5Package.CAST_EXPRESSION__EXPRESSION:
return expression != null;
case Java5Package.CAST_EXPRESSION__TYPE:
return type != null;
}
return super.eIsSet(featureID);
}
} //CastExpressionImpl
|
[
"mailbrunob@gmail.com"
] |
mailbrunob@gmail.com
|
fad257e4073bcac5b05a7caebb2712848b6cb711
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/16/16_63279a0f1726bd86f1207427b6f9511eb4f34885/ProfilerLauncher/16_63279a0f1726bd86f1207427b6f9511eb4f34885_ProfilerLauncher_t.java
|
f699aeb588b09fb4f9df706526983e2fe0ced7bc
|
[] |
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,024
|
java
|
/*******************************************************************************
* Copyright (c) 2009, 2012 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.m2m.atl.profiler.emfvm;
import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.m2m.atl.common.ATLLaunchConstants;
import org.eclipse.m2m.atl.core.ATLCoreException;
import org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher;
import org.eclipse.m2m.atl.engine.emfvm.launch.ITool;
import org.eclipse.m2m.atl.engine.parser.AtlParser;
import org.eclipse.m2m.atl.profiler.core.Messages;
/**
* EMFVM Profiler launcher.
*
* @author <a href="mailto:william.piers@obeo.fr">William Piers</a>
*/
public class ProfilerLauncher extends EMFVMLauncher {
/**
* {@inheritDoc}
*
* @see org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher#launch(java.lang.String,
* org.eclipse.core.runtime.IProgressMonitor, java.util.Map, java.lang.Object[])
*/
@Override
public Object launch(String mode, IProgressMonitor monitor, Map<String, Object> options,
Object... modules) {
if (options.get(ATLLaunchConstants.OPTION_ATL_FILE_PATH) != null) {
String fileName = options.get(ATLLaunchConstants.OPTION_ATL_FILE_PATH).toString();
IFile currentAtlFile = ResourcesPlugin.getWorkspace().getRoot().getFile(
Path.fromOSString(fileName));
try {
EObject atlModel = AtlParser.getDefault().parse(currentAtlFile.getContents());
if (atlModel == null) {
throw new RuntimeException(Messages.getString("ProfilerLauncher_INVALID_ATL_FILE")); //$NON-NLS-1$
} else {
return internalLaunch(new ITool[] {new ProfilingTool(atlModel),}, new NullProgressMonitor(),
options, modules);
}
} catch (ATLCoreException e) {
throw new RuntimeException(Messages.getString("ProfilerLauncher_INVALID_ATL_FILE")); //$NON-NLS-1$
} catch (CoreException e) {
throw new RuntimeException(Messages.getString("ProfilerLauncher_INVALID_ATL_FILE")); //$NON-NLS-1$
}
} else {
throw new RuntimeException(Messages.getString("ProfilerLauncher_INVALID_ATL_FILE")); //$NON-NLS-1$
}
}
/**
* {@inheritDoc}
*
* @see org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher#getName()
*/
@Override
public String getName() {
return super.getName() + " Profiler"; //$NON-NLS-1$
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
eb41718003d2d598d20c51082f1453505a019886
|
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
|
/acm-module-sys/src/main/java/com/wisdom/acm/sys/vo/SysPwdRuleVo.java
|
c079e194c36d7e054792353cbca0d0059cac609d
|
[
"Apache-2.0"
] |
permissive
|
daiqingsong2021/ord_project
|
332056532ee0d3f7232a79a22e051744e777dc47
|
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
|
refs/heads/master
| 2023-09-04T12:11:51.519578
| 2021-10-28T01:58:43
| 2021-10-28T01:58:43
| 406,659,566
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
package com.wisdom.acm.sys.vo;
import lombok.Data;
@Data
public class SysPwdRuleVo {
private Integer id;
/**
* 修改周期
*/
private Integer cycle;
/**
* 密码长度
*/
private Integer length;
/**
* 错误次数
*/
private Integer errorNumber;
/**
* 锁定时长(分钟)
*/
private Integer lockTime;
}
|
[
"homeli@126.com"
] |
homeli@126.com
|
c108739eaa4a293c6584e3347012729408c16a40
|
992bf9c4be7fad96a6c5626d9a0308af3b80b405
|
/ceri-serial/src/main/java/ceri/serial/ftdi/FtdiBitMode.java
|
1beafd1891d03a2242df0f5aec20c92c58c61994
|
[] |
no_license
|
cerijerome/ceri
|
75a8926911b7e3d9441d566e3a991df28359c65f
|
d72eb6de868c42f1320b27863bb2c859e86ef8fe
|
refs/heads/master
| 2023-08-02T20:19:05.466295
| 2023-07-31T00:02:10
| 2023-07-31T00:02:10
| 6,892,749
| 1
| 0
| null | 2023-05-04T07:08:06
| 2012-11-27T23:17:21
|
Java
|
UTF-8
|
Java
| false
| false
| 2,063
|
java
|
package ceri.serial.ftdi;
import static ceri.common.math.MathUtil.ubyte;
import static ceri.serial.ftdi.jna.LibFtdi.ftdi_mpsse_mode.BITMODE_BITBANG;
import static ceri.serial.ftdi.jna.LibFtdi.ftdi_mpsse_mode.BITMODE_RESET;
import java.util.Objects;
import ceri.common.text.ToString;
import ceri.serial.ftdi.jna.LibFtdi.ftdi_mpsse_mode;
public class FtdiBitMode {
public static final FtdiBitMode OFF = builder(BITMODE_RESET).build();
public static final FtdiBitMode BITBANG =
builder(BITMODE_BITBANG).allLines(LineDirection.out).build();
public final ftdi_mpsse_mode mode;
public final int mask;
public enum LineDirection {
in,
out;
}
public static FtdiBitMode of(ftdi_mpsse_mode mode) {
return builder(mode).allLines(LineDirection.out).build();
}
public static class Builder {
final ftdi_mpsse_mode mode;
int mask = 0;
Builder(ftdi_mpsse_mode mode) {
this.mode = mode;
}
public Builder mask(int mask) {
this.mask = ubyte(mask);
return this;
}
public Builder allLines(LineDirection dir) {
if (dir == LineDirection.out) mask = 0xff;
else mask = 0;
return this;
}
public Builder line(LineDirection dir, int... bits) {
int mask = 0;
for (int bit : bits)
if (bit < Byte.SIZE) mask |= 1L << bit;
if (dir == LineDirection.out) this.mask |= mask;
else this.mask &= ubyte(~mask);
return this;
}
public FtdiBitMode build() {
return new FtdiBitMode(this);
}
}
public static Builder builder(ftdi_mpsse_mode mode) {
return new Builder(mode);
}
FtdiBitMode(Builder builder) {
mode = builder.mode;
mask = builder.mask;
}
@Override
public int hashCode() {
return Objects.hash(mode, mask);
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof FtdiBitMode)) return false;
FtdiBitMode other = (FtdiBitMode) obj;
if (!Objects.equals(mode, other.mode)) return false;
if (mask != other.mask) return false;
return true;
}
@Override
public String toString() {
return ToString.forClass(this, mode, mask);
}
}
|
[
"cerijerome@gmail.com"
] |
cerijerome@gmail.com
|
9c524a5803b1f47303c6494f9f2c93204a75c2b6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_81b816c59a581dce504b01e5e8161db3ed761c58/NotificationList/1_81b816c59a581dce504b01e5e8161db3ed761c58_NotificationList_t.java
|
86b82ab1823afb2e9fd33c28606285b7fb9ddac1
|
[] |
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,309
|
java
|
package client.gui.panels;
import java.awt.Dimension;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import javax.swing.DefaultListModel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ListSelectionModel;
import client.model.NotificationModel;
/**
* Display NotificationListElem in a vertical list w/ scroll bar
*
* @author Peter Ringset
*
*/
public class NotificationList extends JPanel {
/**
*
*/
private static final long serialVersionUID = -2045270300264712032L;
private static final int MAX_SIZE = 10;
public static final String
NOTIFICATION_READ = "notification read",
NOTIFICATION_ARRIVED = "notification arrived",
NOTIFICATION_OLD_READ = "notification old read";
private JScrollPane scrollPane;
private JList list;
private DefaultListModel listModel;
private ArrayList<NotificationModel> unread, read;
private PropertyChangeSupport pcs;
public NotificationList() {
this.setBorder(null);
pcs = new PropertyChangeSupport(this);
unread = new ArrayList<NotificationModel>();
read = new ArrayList<NotificationModel>();
list = new JList();
list.addMouseListener(new ListClickedListener());
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
listModel = new DefaultListModel();
list.setModel(listModel);
list.setCellRenderer(new NotificationListCellRenderer());
scrollPane = new JScrollPane(list);
scrollPane.setPreferredSize(new Dimension(310, 485));
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
this.add(scrollPane);
}
/**
* Initialize the list
* @param models
* An ArrayList containing all the NotificationModels
* that the user owns at login time
*/
public void initializeList(ArrayList<NotificationModel> models) {
Collections.sort(models);
for (NotificationModel notificationModel : models) {
listModel.addElement(notificationModel);
if (notificationModel.isRead()) read.add(notificationModel);
else unread.add(notificationModel);
}
pcs.firePropertyChange(NOTIFICATION_ARRIVED, null, new Integer(unread.size()));
}
/**
* Add a new notification to the list
* This routine will see to that the number of elements in the list
* is always less than MAX_SIZE as long as the number of unread notifications
* is less than MAX_SIZE.
* @param newNotification
* the notification to be added. It is presumed that this
* is an unread notification and that the notification's time stamp
* is newer than that of all existing notifications
*/
public void addElement(NotificationModel newNotification) {
if (read.contains(newNotification) || unread.contains(newNotification)) return;
if (unread.size() + read.size() >= MAX_SIZE && read.size() > 0) {
for (int i = listModel.size() - 1; i >= 0; i--) {
NotificationModel extract;
extract = (NotificationModel) listModel.getElementAt(i);
if (extract.isRead()) {
listModel.removeElementAt(i);
read.remove(extract);
}
}
}
listModel.add(0, newNotification);
unread.add(newNotification);
pcs.firePropertyChange(NOTIFICATION_ARRIVED, null, new Integer(unread.size()));
}
public int getUnreadCount() {
return unread.size();
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
pcs.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
pcs.removePropertyChangeListener(listener);
}
class ListClickedListener implements MouseListener {
long timestamp;
boolean secondClick;
@Override
public void mouseClicked(MouseEvent arg0) {
// Clock the click and calculate delta time since last click
long now = System.currentTimeMillis();
long delta = now - timestamp;
timestamp = now;
// Only care about double clicks with delta < 500 ms
if (delta < 500 && !secondClick) {
// Propagate event to all listeners and reorganize notification arrays
NotificationModel clickedNotification = (NotificationModel) list.getSelectedValue();
if (unread.contains(clickedNotification)) {
unread.remove(clickedNotification);
clickedNotification.setRead(true);
read.add(clickedNotification);
pcs.firePropertyChange(NOTIFICATION_READ, null, clickedNotification);
try {
clickedNotification.store();
} catch (IOException e) {
System.err.println("ERROR: Exception happened while trying to store a notification as read");
e.printStackTrace();
}
} else {
pcs.firePropertyChange(NOTIFICATION_OLD_READ, null, clickedNotification);
}
secondClick = true;
} else {
secondClick = false;
}
}
/*
* Unused methods
*/
@Override
public void mouseEntered(MouseEvent arg0) {}
@Override
public void mouseExited(MouseEvent arg0) {}
@Override
public void mousePressed(MouseEvent arg0) {}
@Override
public void mouseReleased(MouseEvent arg0) {}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3b0fe9ae14e7367ca164030b7e6b6b4b0ee38f49
|
6aeba6834cadd5122e6dc128e10e1e3830b25f84
|
/src/Graph_dfs_bfs/Maze1_bfs.java
|
677151e49020a6a0f10c9dc2a0dbe611bf9740f1
|
[] |
no_license
|
jadefromkorea/codingTest
|
fbf1b7199e060a8dc686216ae1bc79b31b7bf8fd
|
842798883a7f9c5e46d4eb95be440e4055a195f0
|
refs/heads/master
| 2022-12-14T14:54:47.782350
| 2020-08-23T07:11:05
| 2020-08-23T07:11:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,035
|
java
|
package Graph_dfs_bfs;
import java.util.*;
public class Maze1_bfs {
public static void main(String[] args) {
int[][] maze= {
{0,0,1,0,0},
{0,0,0,0,0},
{0,0,0,1,0},
{1,1,0,1,1},
{0,0,0,0,0}
};
int [] start= {0,4};
// int[] dest = {4,4};
int[] dest = {3,2};
Maze1_bfs a= new Maze1_bfs();
System.out.println(a.hasPath(maze, start,dest ));
}
int[][] dirs = {{-1,0},{1,0},{0,-1},{0,1}};
int m ,n;
public boolean hasPath(int[][] maze, int[] start, int[] destination) {
m=maze.length;
n=maze[0].length;
if (start[0]==destination[0] && start[1]==destination[1]) return true;
boolean[][] visited=new boolean[m][n];
Queue<int[]> queue=new LinkedList<>();
visited[start[0]][start[1]]=true;
queue.offer(new int[] {start[0], start[1]});
while (!queue.isEmpty()) {
int[] p=queue.poll();
for(int[] dir: dirs) {
int x=p[0];
int y=p[1];
while (x>=0 && x<m && y>=0 && y<n && maze[x][y]==0) {
System.out.println("");
System.out.println("11 x: "+x+" y: "+y);
x+=dir[0];
y+=dir[1];
System.out.println("22x: "+x+" y: "+y);
}
x-=dir[0];
y-=dir[1];
System.out.println("33x: "+x+" y: "+y);
if (visited[x][y]) continue;
visited[x][y]=true;
print(visited);
if (x==destination[0] && y==destination[1]) return true;
queue.offer(new int[] {x,y});
}
System.out.println("");
}
return false;
}
private void print(boolean[][] visited) {
if(visited==null|| visited.length==0)return;
for(int i=0; i<m; i++) {
for(int j=0; j<n; j++) {
System.out.print(visited[i][j]+"\t");
}
System.out.println();
}
}
}
|
[
"jadefromkorea@gmail.com"
] |
jadefromkorea@gmail.com
|
99c1bda94230e09c5a7155f82cab0cb90b9aad49
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_3996acf75f4828ca14689fd13a057036ce9f2b03/RavenWeaponSystem/8_3996acf75f4828ca14689fd13a057036ce9f2b03_RavenWeaponSystem_s.java
|
bb2619d2b7b253943e0262a9040e54d13d921706
|
[] |
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
| 7,866
|
java
|
package raven.game;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.HashMap;
import java.util.Map;
import raven.game.armory.Rocket;
import raven.math.Transformations;
import raven.math.Vector2D;
import raven.ui.GameCanvas;
public class RavenWeaponSystem {
private RavenBot owner;
/** map of weapons the bot is carrying (a bot may only carry one instance
* of each weapon) */
private Map<RavenObject, RavenWeapon> weaponMap;
/** the weapon the bot is currently holding */
private RavenWeapon currentWeapon;
/** this is the minimum amount of time a bot needs to see an opponent
* before it can react to it. This variable is used to prevent a bot
* shooting at an opponent the instant it becomes visible. */
private double reactionTime;
/** each time the current weapon is fired a certain amount of random noise
* is added to the the angle of the shot. This prevents the bots from
* hitting their opponents 100% of the time. The lower this value the more
* accurate a bot's aim will be. Recommended values are between 0 and 0.2
* (the value represents the max deviation in radians that can be added to
* each shot). */
private double aimAccuracy;
/** the amount of time a bot will continue aiming at the position of the
* target even if the target disappears from view. */
private double aimPersistance;
/** predicts where the target will be by the time it takes the current
* weapon's projectile type to reach it. Used by TakeAimAndShoot */
private Vector2D predictFuturePositionOfTarget() {
double maxSpeed = getCurrentWeapon().getMaxProjectileSpeed();
// if the target is ahead and facing the bot shoot at its current pos
Vector2D toEnemy = owner.getTargetBot().pos().sub(owner.pos());
// the lookahead time is proportional to the distance between the
// enemy and the persuer; and is inversely proportional to the sum of
// the agents' velocities
double lookAheadTime = toEnemy.length() / (maxSpeed + owner.getTargetBot().getMaxSpeed());
// return the predicted future position of the enemy
return owner.getTargetBot().pos().add(owner.getTargetBot().velocity().mul(lookAheadTime));
}
/** adds a random deviation to the firing angle not greater than
* aimAccuracy radians */
private void addNoiseToAim(Vector2D aimingPos) {
Vector2D toPos = aimingPos.sub(owner.pos());
Transformations.Vec2DRotateAroundOrigin(toPos, Math.random() * 2.0 * aimAccuracy - aimAccuracy);
aimingPos = toPos.add(owner.pos());
}
public RavenWeaponSystem(RavenBot owner, double reactionTime, double aimAccuracy, double aimPersistence) {
this.owner = owner;
this.reactionTime = reactionTime;
this.aimAccuracy = aimAccuracy;
this.aimPersistance = aimPersistence;
initialize();
}
/** sets up the weapon map with just one weapon: the blaster */
public void initialize() {
weaponMap = new HashMap<RavenObject, RavenWeapon>();
// set up the container
currentWeapon = new Blaster(owner);
weaponMap.put(RavenObject.BLASTER, currentWeapon);
}
public void takeAimAndShoot() {
// aim the weapon only if the current target is shootable or if it has
// only very recently gone out of view (this latter condition is to
// ensure the weapon is aimed at the target even if it temporarily
// dodges behind a wall or other cover)
if (owner.getTargetSys().isTargetShootable() || owner.getTargetSys().getTimeTargetHasBeenOutOfView() < aimPersistance) {
// the position the weapon will be aimed at
Vector2D aimingPos = owner.getTargetBot().pos();
// if the current weapon is not an instant hit type gun the target
// position must be adjusted to take into account the predicted
// movement of the target
if (owner.rotateFacingTowardPosition(aimingPos)
&& owner.getTargetSys().getTimeTargetHasBeenVisible() > reactionTime
&& owner.hasLOSto(aimingPos)) {
aimingPos = predictFuturePositionOfTarget();
// if the weapon is aimed correctly, there is line of sight
// between the bot and the aiming position and it has been in
// view for a period longer than the bot's reaction time,
// shoot the weapon
if (owner.rotateFacingTowardPosition(aimingPos)
&& owner.getTargetSys().getTimeTargetHasBeenVisible() > reactionTime
&& owner.hasLOSto(aimingPos)) {
addNoiseToAim(aimingPos);
getCurrentWeapon().shootAt(aimingPos);
}
}
// no need to predict movement, aim directly at target
else {
// if the weapon is aimed correctly and it has been in view for a
// period longer than the bot's reaction time, shoot the weapon
if (owner.rotateFacingTowardPosition(aimingPos)
&& owner.getTargetSys().getTimeTargetHasBeenVisible() > reactionTime
&& owner.hasLOSto(aimingPos)) {
addNoiseToAim(aimingPos);
getCurrentWeapon().shootAt(aimingPos);
}
}
}
// no target to shoot at so rotate facing to be parallel with the
// bot's heading direction
else {
owner.rotateFacingTowardPosition(owner.pos().add(owner.heading()));
}
}
public void selectWeapon() {
// if a target is present use fuzzy logic to determine the most
// desirable weapon
if (owner.getTargetSys().isTargetPresent()) {
// calculate the distance to the target
double distToTarget = owner.pos().distance(owner.getTargetSys().getTarget().pos());
// for each weapon in the inventory calculate its desirability
// given the current situation. The most desirable weapon is
// selected
double bestSoFar = Double.MIN_VALUE;
for (RavenWeapon weapon : weaponMap.values()) {
// grab the desirability of this weapon (desirability is based
// upon distance to target and ammo remaining)
double score = weapon.getDesirability(distToTarget);
if (score > bestSoFar) {
bestSoFar = score;
currentWeapon = weapon;
}
}
} else {
currentWeapon = weaponMap.get(RavenObject.BLASTER);
}
}
public void addWeapon(RavenObject weaponType) {
RavenWeapon newWeap;
switch (weaponType) {
case RAIL_GUN:
newWeap = new RailGun(owner);
break;
case SHOTGUN:
newWeap = new ShotGun(owner);
break;
case ROCKET_LAUNCHER:
newWeap = new RocketLauncher(owner);
break;
}
RavenWeapon present = getWeaponFromInventory(weaponType);
if (present != null) {
present.incrementRounds(newWeap.numRoundsRemaining());
} else {
weaponMap.put(weaponType, newWeap);
}
}
public void changeWeapon(RavenObject type) {
if (weaponMap.containsKey(type)) {
currentWeapon = weaponMap.get(type);
}
}
public void shootAt(Vector2D pos) {
getCurrentWeapon().shootAt(pos);
}
/** returns a pointer to the current weapon */
public RavenWeapon getCurrentWeapon() { return currentWeapon; }
public RavenWeapon getWeaponFromInventory(RavenObject weaponType) {
return weaponMap.get(weaponType);
}
public int getAmmoRemainingForWeapon(RavenObject weaponType) {
if (weaponMap.containsKey(weaponType)) {
return weaponMap.get(weaponType).numRoundsRemaining();
}
return 0;
}
public double reactionTime() { return reactionTime; }
public void renderCurrentWeapon() {
getCurrentWeapon().render();
}
public void renderDesirabilities() {
Vector2D p = owner.pos();
int offset = 15 * weaponMap.size();
for (RavenObject weaponKey : weaponMap.keySet()) {
double score = weaponMap.get(weaponKey).getLastDesirabilityScore();
final DecimalFormat formatter = new DecimalFormat("0.00")
GameCanvas.textAtPos(p.x + 10, p.y - offset, formatter.format(score) + " " + weaponKey.getDescription());
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
bd4e11e13726eb70ce5890222f8f521fe8f30db6
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/spring-webflux-threads/src/main/java/com/surya/webflux/Controller.java
|
8ce2d63cb3d0552bedad6a1383b6826f852e1acf
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,348
|
java
|
package com.surya.webflux;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.IntegerDeserializer;
import org.apache.kafka.common.serialization.IntegerSerializer;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;
import io.reactivex.Observable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;
import reactor.kafka.receiver.KafkaReceiver;
import reactor.kafka.receiver.ReceiverOptions;
import reactor.kafka.receiver.ReceiverRecord;
import reactor.kafka.sender.KafkaSender;
import reactor.kafka.sender.SenderOptions;
import reactor.kafka.sender.SenderRecord;
@RestController
@RequestMapping("/")
public class Controller {
@Autowired
private PersonRepository personRepository;
private Scheduler scheduler = Schedulers.newBoundedElastic(5, 10, "MyThreadGroup");
private Logger logger = LoggerFactory.getLogger(Controller.class);
@GetMapping("/threads/webflux")
public Flux<String> getThreadsWebflux() {
return Flux.fromIterable(getThreads());
}
@GetMapping("/threads/webclient")
public Flux<String> getThreadsWebClient() {
WebClient.create("http://localhost:8080/index")
.get()
.retrieve()
.bodyToMono(String.class)
.subscribeOn(scheduler)
.publishOn(scheduler)
.doOnNext(s -> logger.info("Response: {}", s))
.subscribe();
return Flux.fromIterable(getThreads());
}
@GetMapping("/threads/rxjava")
public Observable<String> getIndexRxJava() {
Observable.fromIterable(Arrays.asList("Hello", "World"))
.map(s -> s.toUpperCase())
.observeOn(io.reactivex.schedulers.Schedulers.trampoline())
.doOnNext(s -> logger.info("String: {}", s))
.subscribe();
return Observable.fromIterable(getThreads());
}
@GetMapping("/threads/mongodb")
public Flux<String> getIndexMongo() {
personRepository.findAll()
.doOnNext(p -> logger.info("Person: {}", p))
.subscribe();
return Flux.fromIterable(getThreads());
}
@GetMapping("/threads/reactor-kafka")
public Flux<String> getIndexKafka() {
Map<String, Object> producerProps = new HashMap<>();
producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
producerProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, IntegerSerializer.class);
producerProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
SenderOptions<Integer, String> senderOptions = SenderOptions.create(producerProps);
KafkaSender<Integer, String> sender = KafkaSender.create(senderOptions);
Flux<SenderRecord<Integer, String, Integer>> outboundFlux = Flux.range(1, 10)
.map(i -> SenderRecord.create(new ProducerRecord<>("reactive-test", i, "Message_" + i), i));
sender.send(outboundFlux)
.subscribe();
Map<String, Object> consumerProps = new HashMap<>();
consumerProps.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
consumerProps.put(ConsumerConfig.CLIENT_ID_CONFIG, "my-consumer");
consumerProps.put(ConsumerConfig.GROUP_ID_CONFIG, "my-group");
consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, IntegerDeserializer.class);
consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
ReceiverOptions<Integer, String> receiverOptions = ReceiverOptions.create(consumerProps);
receiverOptions.subscription(Collections.singleton("reactive-test"));
KafkaReceiver<Integer, String> receiver = KafkaReceiver.create(receiverOptions);
Flux<ReceiverRecord<Integer, String>> inboundFlux = receiver.receive();
inboundFlux.subscribe(r -> {
logger.info("Received message: {}", r.value());
r.receiverOffset()
.acknowledge();
});
return Flux.fromIterable(getThreads());
}
@GetMapping("/index")
public Mono<String> getIndex() {
return Mono.just("Hello world!");
}
private List<String> getThreads() {
return Thread.getAllStackTraces()
.keySet()
.stream()
.map(t -> String.format("%-20s \t %s \t %d \t %s\n", t.getName(), t.getState(), t.getPriority(), t.isDaemon() ? "Daemon" : "Normal"))
.collect(Collectors.toList());
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
64de61cd518f9e5f34fc915722f00aaa2c3b204b
|
b6e1b1aed4ba7cfe893909695ba93ac3f3c98efd
|
/Sling Shot_WAVEUpdated_Careplan_Original_Code/Slingshot/src/bg/framework/app/functional/action/Slingshot/CustomerServiceAgentAction.java
|
cb8b6ba9976fafd7886dd5c9dbe6ccdf9992dbe2
|
[] |
no_license
|
Syedbasha82/Automation
|
40908c0026fd486c371ccb7754c749d2d55f71f0
|
be0b278b78a5e1e0b8decde1b4e2b804435d068e
|
refs/heads/master
| 2021-04-03T06:29:45.484929
| 2018-03-16T06:02:15
| 2018-03-16T06:02:15
| 124,533,774
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,950
|
java
|
package bg.framework.app.functional.action.Slingshot;
import bg.framework.app.functional.page.Slingshot.CustomerServiceAgentPage;
import bg.framework.app.functional.page.Slingshot.RegistrationPage;
import bg.framework.app.functional.page.common.LegacyHomePage;
import bg.framework.app.functional.entities.UserProfile;
public class CustomerServiceAgentAction {
UserProfile userProfile=new UserProfile();
public CustomerServiceAgentAction navigateToCsaRegistration() {
LegacyHomePage legacyHomePage = new LegacyHomePage();
legacyHomePage.navigateToCsaRegistrationPage();
return this;
}
public CustomerServiceAgentAction verifyCsaContentScreen() {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.verifyCsaAgentScreen();
return this;
}
public CustomerServiceAgentAction clickAndverifyRegister(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
RegistrationPage rsapage = new RegistrationPage();
csapage.clickRegisteraUser();
rsapage.verifyRegistrationPageByCsa(userProfile);
/*csapage.enterRegisterEmail(userProfile);
csapage.clickRegisterButton();*/
csapage.verifyAfterRegistration(userProfile);
return this;
}
public CustomerServiceAgentAction valdiateBpNumber(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.clickLookUpUser();
csapage.validateBpNumber();
return this;
}
public CustomerServiceAgentAction verifyFindUser(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.clickLookUpUser();
csapage.enterEmailIdInFindUser(userProfile);
csapage.clickFindUser();
return this;
}
public CustomerServiceAgentAction verifyUpdateUserDetailsPage() {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.verifyUpdateUserDetailsPage();
return this;
}
/*public CustomerServiceAgentAction clickAndverifyRegister() {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.clickRegisteraUser();
csapage.enterRegisterEmail();
csapage.clickRegisterButton();
csapage.verifyAfterRegistration(userProfile);
return this;
}*/
public CustomerServiceAgentAction verifyUserAccountInformation(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.verifyStatusInUi(userProfile);
csapage.verifyUserAccountInfoInDb(userProfile);
return this;
}
public CustomerServiceAgentAction updateAndVerifyStatus(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.updateStatusInUi(userProfile,"FREEZED");
csapage.verifyStatusInDbAfterUpdated(userProfile,"Y");
csapage.updateOrRevertProfileStatusInDb(userProfile,1,"Revert");
csapage.clickCsaLoginInThankYouPage();
csapage.enterEmailIdInFindUser(userProfile);
csapage.clickFindUser();
csapage.updateStatusInUi(userProfile,"LOCKED");
csapage.verifyStatusInDbAfterUpdated(userProfile,"LOCKED");
csapage.updateOrRevertProfileStatusInDb(userProfile,2,"Revert");
return this;
}
public CustomerServiceAgentAction verifyRegisterEmailErrorMessage(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.clickRegisteraUser();
csapage.registerEmailErrorMessageValidation(userProfile);
return this;
}
public CustomerServiceAgentAction verifyLookUpEmailErrorMessage(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.clickLookUpUser();
csapage.lookupEmailErrorMessageValidation(userProfile);
return this;
}
public CustomerServiceAgentAction verifyPasswordLink(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.checkPasswordReset();
csapage.verifyPasswordResetPage();
csapage.verifyResetPasswordFlag(userProfile);
/*csapage.enterNewPassword();
csapage.resetOldPassword(userProfile);*/
return this;
}
public CustomerServiceAgentAction verifyEnterNewPassword(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.checkPasswordReset();
csapage.verifyPasswordResetPage();
return this;
}
public CustomerServiceAgentAction verifyFindUserBpNumber(UserProfile userProfile) {
CustomerServiceAgentPage csapage = new CustomerServiceAgentPage();
csapage.clickLookUpUser();
csapage.enterBpNumberFindUser(userProfile);
csapage.clickFindUser();
csapage.verifyUpdateUserDetailsPage();
return this;
}
}
|
[
"shobanbabu.manohar@cognizant.com"
] |
shobanbabu.manohar@cognizant.com
|
c587c4f2dd83b85f1f119a8ad9dd815d402fedd5
|
26852514163127783354dc42402b1d2564694695
|
/YoYo-Base/YoYo-Support/src/main/java/com/cnit/yoyo/domain/ResultObject.java
|
383c5174430ccfc69701fc2b8d73757ae19a526b
|
[] |
no_license
|
magicgis/cnit
|
2a2a35c1c7f1bb3c8c28c4d75f035343f5ff0c9f
|
122323f848cb39cfc0d4a94f7ddc395cee0b2dfa
|
refs/heads/master
| 2020-12-27T09:35:00.010392
| 2015-10-28T06:11:42
| 2015-10-28T06:11:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,820
|
java
|
/**
* 文 件 名 : ResultObject.java
* 版 权 : Ltd. Copyright (c) 2014 ,All rights reserved
* 描 述 : <描述>
* 创建人 : <a href="liming@cnit.com">李明</a>
* 创建时间 : 2015-1-27 上午9:25:55
* 修改跟踪表
* 修改单号 修改人 修改时间 是否测试通过 修改描述
* ——————————————————————————————————
*
*/
package com.cnit.yoyo.domain;
import java.io.Serializable;
import net.sf.json.JSONObject;
/**
* @description 返回页面结果集
* @detail <功能详细描述>
* @author <a href="liming@cnit.com">李明</a>
* @version 1.0.0
*/
public class ResultObject implements Serializable {
private static final long serialVersionUID = -8948747420144666605L;
/** 返回数据头部信息 */
private HeadObject head;
/** 返回数据体 */
private Object content;
public ResultObject() {
}
public ResultObject(HeadObject head) {
this.head = head;
}
public ResultObject(HeadObject head, Object content) {
this.head = head;
this.content = content;
}
public HeadObject getHead() {
return head;
}
public void setHead(HeadObject head) {
this.head = head;
}
public Object getContent() {
return content;
}
public void setContent(Object content) {
this.content = content;
}
public String getRetCode() {
return this.head.getRetCode();
}
public String getRetMsg() {
return this.head.getRetMsg();
}
@Override
public String toString() {
JSONObject jsonObject = JSONObject.fromObject(this);
return jsonObject.toString();
}
}
|
[
"heaven6059@126.com"
] |
heaven6059@126.com
|
351ead3968bc1894400d4de6542c6db4708a4652
|
a4109313924a00fe9a636d72772bc2691c47a658
|
/src/seven/one/Tester.java
|
141579275ff92871810e81c8d433e65e61c6f807
|
[] |
no_license
|
anelKovac/JavaCoreProgramming2021
|
8c625dccacddbd7e78de28d387d027065343ccc4
|
c91542b6845afcc8b6cd83ac00275a83ae66c595
|
refs/heads/master
| 2023-01-31T05:54:38.051747
| 2020-12-14T19:47:22
| 2020-12-14T19:47:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 608
|
java
|
package seven.one;
import seven.one.animal.Animal;
import seven.one.animal.Cat;
import seven.one.animal.Dog;
import seven.one.animal.Fish;
public class Tester {
public static void main(String[] args) {
Person student = new Student();
student.setName("Mujaga");
student.setSurname("Hadžispahić");
student.setAge(12);//COMPILE ERROR
//student.setIndexNumber("MH134444");
Animal animal = new Cat("Tom");
animal = new Dog("Felix");
student.setAnimal(animal);
Fish fish = new Fish("Ribica");
student.setAnimal(fish);
}
}
|
[
"emir.puska@it-akademija.com"
] |
emir.puska@it-akademija.com
|
b80a10608f631e134fde54bda9861367f0d1e411
|
1be137c1b98d87ad90cc54c95c75c6b3518976cc
|
/src/main/java/com/joshuamason/masonmoney/MasonMoneyApp.java
|
39f01ad7c1211d78975ff47b2de3058dfc40d811
|
[] |
no_license
|
Jmason15/MasonMoney
|
1f422f4d6eeb55731ef47c403835f96156636fbe
|
b52bb6826897e7ef6ec39bfa5332b5a86b6455f8
|
refs/heads/master
| 2022-12-10T05:40:15.856696
| 2020-08-07T15:38:30
| 2020-08-07T15:38:30
| 285,864,255
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,100
|
java
|
package com.joshuamason.masonmoney;
import com.joshuamason.masonmoney.config.ApplicationProperties;
import io.github.jhipster.config.DefaultProfileUtil;
import io.github.jhipster.config.JHipsterConstants;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collection;
import javax.annotation.PostConstruct;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.core.env.Environment;
@SpringBootApplication
@EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class })
public class MasonMoneyApp {
private static final Logger log = LoggerFactory.getLogger(MasonMoneyApp.class);
private final Environment env;
public MasonMoneyApp(Environment env) {
this.env = env;
}
/**
* Initializes MasonMoney.
* <p>
* Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile
* <p>
* You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>.
*/
@PostConstruct
public void initApplication() {
Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());
if (
activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) &&
activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)
) {
log.error(
"You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."
);
}
if (
activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) &&
activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)
) {
log.error(
"You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."
);
}
}
/**
* Main method, used to run the application.
*
* @param args the command line arguments.
*/
public static void main(String[] args) {
SpringApplication app = new SpringApplication(MasonMoneyApp.class);
DefaultProfileUtil.addDefaultProfile(app);
Environment env = app.run(args).getEnvironment();
logApplicationStartup(env);
}
private static void logApplicationStartup(Environment env) {
String protocol = "http";
if (env.getProperty("server.ssl.key-store") != null) {
protocol = "https";
}
String serverPort = env.getProperty("server.port");
String contextPath = env.getProperty("server.servlet.context-path");
if (StringUtils.isBlank(contextPath)) {
contextPath = "/";
}
String hostAddress = "localhost";
try {
hostAddress = InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
log.warn("The host name could not be determined, using `localhost` as fallback");
}
log.info(
"\n----------------------------------------------------------\n\t" +
"Application '{}' is running! Access URLs:\n\t" +
"Local: \t\t{}://localhost:{}{}\n\t" +
"External: \t{}://{}:{}{}\n\t" +
"Profile(s): \t{}\n----------------------------------------------------------",
env.getProperty("spring.application.name"),
protocol,
serverPort,
contextPath,
protocol,
hostAddress,
serverPort,
contextPath,
env.getActiveProfiles()
);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
1b041c2cb7ca84d68b49e9d6edf7b5173e657426
|
6c986b31636574dc9a7c4f5a1e23b1e09f209211
|
/DesignPatterns/src/Creational/Singleton/SynchronizedSingleton.java
|
b9bf0687b1a430a9e38ff1948cee180a99223c1b
|
[] |
no_license
|
kidaak/Examples
|
62f27c0e09e44fd5177b4168e2b4cdafb1fbe4a8
|
d782b337ef5da415a61f31031268308926a7a3ab
|
refs/heads/master
| 2021-01-17T19:55:00.456881
| 2015-12-22T22:50:29
| 2015-12-22T22:50:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
package Creational.Singleton;
/**
* Created by Dell on 6/19/2015.
*/
public class SynchronizedSingleton {
public static SynchronizedSingleton instance;
private SynchronizedSingleton(){}
public static synchronized SynchronizedSingleton getInstance()
{
// Second thread will be waiting till the first thread
// stop his action inside the synchronized block.
// When the first thread return instance = new Object();
// second thread will enter in synchronized block.
// In case, that instance will not be null for second thread,
// he will not create a new exemplar from Private constructor
if(instance == null)
{
instance = new SynchronizedSingleton();
}
return instance;
}
}
|
[
"marloncheg182@gmail.com"
] |
marloncheg182@gmail.com
|
7d2cb46fe66cb1fa7cea8c41d39be17839f9a79a
|
319a371ab83c04a9a2466b0ec1e2a67b93fa7f2f
|
/zx-erp/src/main/java/com/apih5/service/ZxCtContrJzItemService.java
|
bca7c693259eda2185ebb2a96584267795d82834
|
[] |
no_license
|
zhangrenyi666/apih5-2
|
0232faa65e2968551d55db47fb35f689e5a03996
|
afd9b7d574fab11410aab5e0465a0bd706bcf942
|
refs/heads/master
| 2023-08-01T13:11:51.678508
| 2021-09-10T05:52:34
| 2021-09-10T05:52:34
| 406,647,352
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 912
|
java
|
package com.apih5.service;
import java.util.List;
import com.apih5.framework.entity.ResponseEntity;
import com.apih5.mybatis.pojo.ZxCtContrJzItem;
public interface ZxCtContrJzItemService {
public ResponseEntity getZxCtContrJzItemListByCondition(ZxCtContrJzItem zxCtContrJzItem);
public ResponseEntity getZxCtContrJzItemDetail(ZxCtContrJzItem zxCtContrJzItem);
public ResponseEntity saveZxCtContrJzItem(ZxCtContrJzItem zxCtContrJzItem);
public ResponseEntity updateZxCtContrJzItem(ZxCtContrJzItem zxCtContrJzItem);
public ResponseEntity batchDeleteUpdateZxCtContrJzItem(List<ZxCtContrJzItem> zxCtContrJzItemList);
public ResponseEntity addZxCtContrJzItemForCs(ZxCtContrJzItem zxCtContrJzItem);
public ResponseEntity addZxCtContrJzItemForDq(ZxCtContrJzItem zxCtContrJzItem);
// ↓↓↓----扩展-(命名格式:export导出;import导入;sync同步;)----↓↓↓
}
|
[
"2267843676@qq.com"
] |
2267843676@qq.com
|
e01ca7ff9bdb0742253ce933fa9bb927aec9e78f
|
ef0dc6007b383f9e385e14dc7f31c8da7b221349
|
/observer-pattern/src/main/java/com/me/observer/mouse/Mouse.java
|
992264a81130d9406e01add539163cc46d11f20b
|
[] |
no_license
|
5noob/design-pattern
|
0e0994904e7f45bf8eb816894d6b8e4bd41db976
|
04df97f80b77ab5fe6b9d9e8e90c6db933f33977
|
refs/heads/master
| 2020-04-01T17:54:18.700893
| 2018-11-10T07:38:48
| 2018-11-10T07:38:48
| 153,447,445
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 746
|
java
|
package com.me.observer.mouse;
/**
* 被观察者
* @Description:
*/
public class Mouse implements IMouse {
@Override
public void click(){
System.out.println("鼠标单击");
}
@Override
public void doubleClick(){
System.out.println("鼠标双击");
}
@Override
public void up(){
System.out.println("鼠标弹起");
}
@Override
public void down(){
System.out.println("鼠标按下");
}
@Override
public void wheel(){
System.out.println("鼠标滚动");
}
@Override
public void move(){
System.out.println("鼠标移动");
}
@Override
public void over(){
System.out.println("鼠标悬停");
}
}
|
[
"xxx"
] |
xxx
|
e7b0a82ce859d1740c083bed7768419ac360b4cb
|
b5c485493f675bcc19dcadfecf9e775b7bb700ed
|
/jee-utility-client-controller/src/main/java/org/cyk/utility/client/controller/component/Component.java
|
506a5c0848f0fa306159070373c500a6826fbcda
|
[] |
no_license
|
devlopper/org.cyk.utility
|
148a1aafccfc4af23a941585cae61229630b96ec
|
14ec3ba5cfe0fa14f0e2b1439ef0f728c52ec775
|
refs/heads/master
| 2023-03-05T23:45:40.165701
| 2021-04-03T16:34:06
| 2021-04-03T16:34:06
| 16,252,993
| 1
| 0
| null | 2022-10-12T20:09:48
| 2014-01-26T12:52:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,698
|
java
|
package org.cyk.utility.client.controller.component;
import org.cyk.utility.bean.Property;
import org.cyk.utility.client.controller.Objectable;
import org.cyk.utility.client.controller.component.layout.LayoutItem;
import org.cyk.utility.client.controller.event.Events;
import org.cyk.utility.__kernel__.object.Objects;
public interface Component extends Objectable {
ComponentBuilder<?> getBuilder();
Component setBuilder(ComponentBuilder<?> builder);
LayoutItem getLayoutItem();
Component setLayoutItem(LayoutItem layoutItem);
ComponentRoles getRoles();
ComponentRoles getRoles(Boolean injectIfNull);
Component setRoles(ComponentRoles roles);
Objects getUpdatables();
Objects getUpdatables(Boolean injectIfNull);
Component setUpdatables(Objects updatables);
Events getEvents();
Events getEvents(Boolean injectIfNull);
Component setEvents(Events events);
Property getTargetModel();
Property getTargetModel(Boolean injectIfNull);
Component setTargetModel(Property targetModel);
Object getTargetModelValue();
Property getTargetBinding();
Property getTargetBinding(Boolean injectIfNull);
Component setTargetBinding(Property targetBinding);
Object getTargetBindingValue();
void setTargetBindingValue(Object targetBindingValue);
Throwable getThrowable();
Component setThrowable(Throwable throwable);
String getThrowableInternalizationMessage();
Component setThrowableInternalizationMessage(String throwableInternalizationMessage);
String getGetByIdentifierExpressionLanguageFormat();
Component setGetByIdentifierExpressionLanguageFormat(String getByIdentifierExpressionLanguageFormat);
Object getLinkedTo();
Component setLinkedTo(Object linkedTo);
}
|
[
"kycdev@gmail.com"
] |
kycdev@gmail.com
|
ab1da9abd2e3fe4ae400b399d5ff4f7b1c41b5a7
|
ed657210a17ce8fbe1be3f2a32263182987da177
|
/com.conx.logistics.kernel/com.conx.logistics.kernel.system/kernel.system.ui/src/main/java/com/conx/logistics/kernel/system/ui/view/ITaskDefSearchView.java
|
ce5e35d4d1a71b5896a033303fad2c04d64ac648
|
[] |
no_license
|
conxgit/conxlogistics-gerrit4
|
e6b3becee3561899cf283b1cbd88b737de6af0f4
|
24885e639432ab45082060ca66d0de45d80fdd82
|
refs/heads/master
| 2021-03-12T20:12:32.324680
| 2012-12-18T18:17:00
| 2012-12-18T18:17:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,044
|
java
|
package com.conx.logistics.kernel.system.ui.view;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.Form;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalSplitPanel;
import com.vaadin.ui.VerticalLayout;
public interface ITaskDefSearchView {
public abstract void setDetailComponent(Component component);
public abstract Table getSearchGrid();
public abstract VerticalSplitPanel getSplitLayout();
public abstract VerticalLayout getMainLayout();
public abstract Button getCreateTaskDef();
public abstract Button getRemoveTaskDef();
public abstract Button getSaveTaskDef();
public abstract Button getCancelEditTaskDef();
public abstract Button getEditTaskDef();
public abstract Form getTaskDefForm();
public abstract HorizontalLayout getButtonLayout();
public abstract VerticalLayout getGridLayout();
public abstract VerticalLayout getDetailLayout();
}
|
[
"mduduzi.keswa@bconv.com"
] |
mduduzi.keswa@bconv.com
|
cd17e85a3d860c47a8c052e3dc66f43b70aa36a5
|
1889962c3fb26e0a276335dfc82542a59875ea3e
|
/bos_management/src/main/java/cn/itcast/bos/javabean/Archive.java
|
0e61d103fec68fc01252d2d806d08c9ddd05cac1
|
[] |
no_license
|
yixingxiaocao/wuliu
|
e1f7b9397f63dd8c8d7d89cec02fd09d06071e6c
|
4a9cb42fe9586cc211572f2fc9631450ec6823fe
|
refs/heads/master
| 2021-05-12T07:26:53.296703
| 2018-01-12T14:10:26
| 2018-01-12T14:10:26
| 117,242,260
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,962
|
java
|
package cn.itcast.bos.javabean;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* @description:档案类,记录所有的分类信息,在子档中
*/
public class Archive implements Serializable {
private Integer id; // 主键
private String archiveNum;// 档案编号
private String archiveName; // 档案名称
private String remark; // 备注
private Integer hasChild;// 是否分级 0代表不分级 1代表分级
private Date operatingTime;// 操作时间
private String operator; // 操作员
private String operatingCompany; // 操作单位
private Set<SubArchive> subArchives = new HashSet<>(); // 子档案
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getArchiveNum() {
return archiveNum;
}
public void setArchiveNum(String archiveNum) {
this.archiveNum = archiveNum;
}
public String getArchiveName() {
return archiveName;
}
public void setArchiveName(String archiveName) {
this.archiveName = archiveName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getOperatingTime() {
return operatingTime;
}
public void setOperatingTime(Date operatingTime) {
this.operatingTime = operatingTime;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public Set<SubArchive> getSubArchives() {
return subArchives;
}
public void setSubArchives(Set<SubArchive> subArchives) {
this.subArchives = subArchives;
}
public String getOperatingCompany() {
return operatingCompany;
}
public void setOperatingCompany(String operatingCompany) {
this.operatingCompany = operatingCompany;
}
public Integer getHasChild() {
return hasChild;
}
public void setHasChild(Integer hasChild) {
this.hasChild = hasChild;
}
}
|
[
"bos@itcast.cn"
] |
bos@itcast.cn
|
51a83efd6c7e5fabc8778cc3e96287e7d73e0471
|
863acb02a064a0fc66811688a67ce3511f1b81af
|
/sources/p005cm/aptoide/p006pt/ApplicationModule_ProvidesAppCenterFactory.java
|
67a4df3ec41273eedbf1216e7fc0e52aa8290bca
|
[
"MIT"
] |
permissive
|
Game-Designing/Custom-Football-Game
|
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
|
47283462b2066ad5c53b3c901182e7ae62a34fc8
|
refs/heads/master
| 2020-08-04T00:02:04.876780
| 2019-10-06T06:55:08
| 2019-10-06T06:55:08
| 211,914,568
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,729
|
java
|
package p005cm.aptoide.p006pt;
import javax.inject.Provider;
import org.jacoco.agent.p025rt.internal_8ff85ea.Offline;
import p005cm.aptoide.p006pt.view.app.AppCenter;
import p005cm.aptoide.p006pt.view.app.AppCenterRepository;
import p318e.p319a.C13181b;
import p318e.p319a.C13182c;
/* renamed from: cm.aptoide.pt.ApplicationModule_ProvidesAppCenterFactory */
public final class ApplicationModule_ProvidesAppCenterFactory implements C13181b<AppCenter> {
private static transient /* synthetic */ boolean[] $jacocoData;
private final Provider<AppCenterRepository> appCenterRepositoryProvider;
private final ApplicationModule module;
private static /* synthetic */ boolean[] $jacocoInit() {
boolean[] zArr = $jacocoData;
if (zArr != null) {
return zArr;
}
boolean[] probes = Offline.getProbes(1335091938714579528L, "cm/aptoide/pt/ApplicationModule_ProvidesAppCenterFactory", 7);
$jacocoData = probes;
return probes;
}
public ApplicationModule_ProvidesAppCenterFactory(ApplicationModule module2, Provider<AppCenterRepository> appCenterRepositoryProvider2) {
boolean[] $jacocoInit = $jacocoInit();
this.module = module2;
this.appCenterRepositoryProvider = appCenterRepositoryProvider2;
$jacocoInit[0] = true;
}
public AppCenter get() {
boolean[] $jacocoInit = $jacocoInit();
ApplicationModule applicationModule = this.module;
Provider<AppCenterRepository> provider = this.appCenterRepositoryProvider;
$jacocoInit[1] = true;
AppCenter providesAppCenter = applicationModule.providesAppCenter((AppCenterRepository) provider.get());
$jacocoInit[2] = true;
C13182c.m43111a(providesAppCenter, "Cannot return null from a non-@Nullable @Provides method");
AppCenter appCenter = providesAppCenter;
$jacocoInit[3] = true;
return appCenter;
}
public static C13181b<AppCenter> create(ApplicationModule module2, Provider<AppCenterRepository> appCenterRepositoryProvider2) {
boolean[] $jacocoInit = $jacocoInit();
ApplicationModule_ProvidesAppCenterFactory applicationModule_ProvidesAppCenterFactory = new ApplicationModule_ProvidesAppCenterFactory(module2, appCenterRepositoryProvider2);
$jacocoInit[4] = true;
return applicationModule_ProvidesAppCenterFactory;
}
public static AppCenter proxyProvidesAppCenter(ApplicationModule instance, AppCenterRepository appCenterRepository) {
boolean[] $jacocoInit = $jacocoInit();
AppCenter providesAppCenter = instance.providesAppCenter(appCenterRepository);
$jacocoInit[5] = true;
return providesAppCenter;
}
}
|
[
"tusharchoudhary0003@gmail.com"
] |
tusharchoudhary0003@gmail.com
|
42f7219675db3ac45766ee5038825b0d7b380429
|
7a414ea00eef321280842e6e1832c29ba1073854
|
/Solution1.java
|
66143f5406c717ff6e52e344d2ae416fa2b14162
|
[] |
no_license
|
DRC9702/mdiff
|
e6c183571362b1cfb564eb8478e9a75ed51069b8
|
7cada5e91c7cd9f6cf6baa2be9f12eea316b2aba
|
refs/heads/master
| 2020-12-26T21:47:33.222031
| 2017-01-31T21:42:15
| 2017-01-31T21:42:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 506
|
java
|
import java.util.*; // Stack
import java.util.concurrent.ThreadLocalRandom;
import java.util.Date;
import java.security.Timestamp;
import java.security.cert.CertPath;
import java.text.*;
import java.util.ArrayList;
import java.util.List;
import java.io.*;
public class Solution1{
public static void main(String[] args) throws java.io.IOException {
int a, b;
a = 0;
b = 1;
if(a == 0){
System.out.println("Hello mdiff!");
}
else{
System.out.println("Bye mudiff!");
}
return;
}
}
|
[
"chih-hung.lu@columbia.edu"
] |
chih-hung.lu@columbia.edu
|
a6707e9ca1c0deb94a5a6af7c4d22b6660f2fac6
|
9cdd3fe250219ede904bed16fbb78c2630e4061e
|
/src/main/java/com/pzy/service/GradeService.java
|
a1c57aa068122a66ae7c5db1ce6d4c71825d7feb
|
[] |
no_license
|
zhaoyang0501/pxxt
|
8fcfd0f0bc160b82f6c37c0e621b70ee8c4a2711
|
2305de8433b1ea35e2c0cb7965434ddcaec38486
|
refs/heads/master
| 2021-01-21T12:54:01.496775
| 2016-04-26T11:38:04
| 2016-04-26T11:38:04
| 50,089,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,151
|
java
|
package com.pzy.service;
import java.sql.Date;
import java.util.List;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.pzy.entity.Grade;
import com.pzy.repository.GradeRepository;
import com.pzy.repository.ReportRepository;
/***
*
* @author qq:263608237
*
*/
@Component
@Service
public class GradeService {
@Autowired
private GradeRepository gradeRepository;
@Autowired
private ReportRepository reportRepository;
public List<Grade> findTop3() {
return gradeRepository.findAll(
new PageRequest(0, 15, new Sort(Direction.DESC, "createDate")))
.getContent();
}
public List<Grade> findAll() {
List<Grade> grades=(List<Grade> ) gradeRepository.findAll(new Sort(Direction.DESC, "id"));
for(Grade grade: grades){
grade.setUsernum(reportRepository.findByGrade(grade).size());
}
return grades;
}
public Page<Grade> findAll(final int pageNumber, final int pageSize,final String name){
PageRequest pageRequest = new PageRequest(pageNumber - 1, pageSize, new Sort(Direction.DESC, "id"));
Specification<Grade> spec = new Specification<Grade>() {
public Predicate toPredicate(Root<Grade> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
Predicate predicate = cb.conjunction();
if (name != null) {
predicate.getExpressions().add(cb.like(root.get("name").as(String.class), "%"+name+"%"));
}
return predicate;
}
};
Page<Grade> result = (Page<Grade>) gradeRepository.findAll(spec, pageRequest);
return result;
}
public Page<Grade> findAll(final int pageNumber, final int pageSize,final Integer type ){
PageRequest pageRequest = new PageRequest(pageNumber - 1, pageSize, new Sort(Direction.DESC, "id"));
Specification<Grade> spec = new Specification<Grade>() {
public Predicate toPredicate(Root<Grade> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
Predicate predicate = cb.conjunction();
if (type != null) {
predicate.getExpressions().add(cb.equal(root.get("type").as(Integer.class),type));
}
return predicate;
}
};
Page<Grade> result = (Page<Grade>) gradeRepository.findAll(spec, pageRequest);
return result;
}
public void delete(Long id){
gradeRepository.delete(id);
}
public Grade find(Long id){
return gradeRepository.findOne(id);
}
public void save(Grade grade){
gradeRepository.save(grade);
}
public void AutoEndGrade(){
System.out.println("fuckyou!----");
List<Grade> grades=(List<Grade> ) gradeRepository.findAll(new Sort(Direction.DESC, "id"));
for(Grade grade: grades){
grade.setUsernum(reportRepository.findByGrade(grade).size());
}
for(Grade grade: grades){
if(grade.getUsernum()>=30||grade.getEnd().before(new Date(System.currentTimeMillis()))){
grade.setState("报名结束");
grade.setCreateDate(new Date(System.currentTimeMillis()));
this.save(grade);
}
}
System.out.println("fuckyouend!----");
}
}
|
[
"zhaoyang0501@126.com"
] |
zhaoyang0501@126.com
|
97e68f80da9fcfb1294571e3aaddd1905f9806d4
|
f43a0e822d6887e0614bbeb69c06ccdf3b2b2458
|
/generated/gwt-activitiesandplaces-requestfactory-maps/src/main/resources/archetype-resources/src/main/java/client/application/home/HomeView.java
|
5179d22a6a7b8ac9e76ff65560fc655d6a0dc6d7
|
[] |
no_license
|
alassane0101/Archetypes
|
b539068f0f236c7f73b6cd5ca1c42a6f8744bde3
|
a3603fcd11ccb45698ea8824ded807974468b663
|
refs/heads/master
| 2020-06-17T04:39:43.158505
| 2019-02-13T22:17:28
| 2019-02-13T22:17:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 756
|
java
|
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.client.application.home;
import ${package}.client.application.Presenter;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
public class HomeView extends Composite {
private static Binder uiBinder = GWT.create(Binder.class);
interface Binder extends UiBinder<Widget, HomeView> {}
private Presenter presenter;
public HomeView() {
initWidget(uiBinder.createAndBindUi(this));
}
public void setPresenter(Presenter presenter) {
this.presenter = presenter;
}
public void start() {
}
}
|
[
"branflake2267@gmail.com"
] |
branflake2267@gmail.com
|
499c196c6204354866aaf3210b58215483576a1b
|
a544cb5ab5b1762d720653fa7233b1cfffe5220a
|
/Exam/Most-Wanted/src/main/java/org/softuni/mostwanted/model/dto/xml/MostWantedExportDtoXML.java
|
fecf73f1d6bac313b04e0d473dc44d2d41c263de
|
[] |
no_license
|
AtanasYordanov/JavaDB-Frameworks---Hibernate-Spring-Data
|
ec2c7954ffed8df767d950a0a4e8aff231c185b4
|
cecd44ee0a6e20f6ea23c7bec5e9f62796a612a5
|
refs/heads/master
| 2021-04-03T10:08:36.875455
| 2018-06-19T07:42:06
| 2018-06-19T07:42:06
| 125,184,186
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 836
|
java
|
package org.softuni.mostwanted.model.dto.xml;
import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@XmlRootElement(name = "racer")
@XmlAccessorType(XmlAccessType.FIELD)
public class MostWantedExportDtoXML {
@XmlAttribute
private String name;
@XmlElementWrapper(name = "entries")
@XmlElement(name = "entry")
private List<MostWantedEntryExportDtoXML> entries;
public MostWantedExportDtoXML() {
this.entries = new ArrayList<>();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<MostWantedEntryExportDtoXML> getEntries() {
return entries;
}
public void setEntries(List<MostWantedEntryExportDtoXML> entries) {
this.entries = entries;
}
}
|
[
"naskoraist@gmail.com"
] |
naskoraist@gmail.com
|
dfcccc051f26f16ee2881e9586efa8ee9476cf5c
|
45b2918284fc39da50c16d5842fbeba1f5feae70
|
/src/main/java/com/infy/eoncamera/service/CustomerService.java
|
d252ab6101480057573904a5925d31954bc4d1fb
|
[] |
no_license
|
knive35/eoncamera
|
48310efb8506e62bfa26bd04c5049e5ec990145b
|
06a5ec3e87173b92e164136919438a3f59f03f67
|
refs/heads/master
| 2020-07-09T16:01:17.716383
| 2019-08-23T14:44:55
| 2019-08-23T14:44:55
| 204,017,123
| 0
| 0
| null | 2019-11-02T16:55:56
| 2019-08-23T14:44:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,713
|
java
|
package com.infy.eoncamera.service;
import com.infy.eoncamera.domain.Customer;
import com.infy.eoncamera.repository.CustomerRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
/**
* Service Implementation for managing {@link Customer}.
*/
@Service
public class CustomerService {
private final Logger log = LoggerFactory.getLogger(CustomerService.class);
private final CustomerRepository customerRepository;
public CustomerService(CustomerRepository customerRepository) {
this.customerRepository = customerRepository;
}
/**
* Save a customer.
*
* @param customer the entity to save.
* @return the persisted entity.
*/
public Customer save(Customer customer) {
log.debug("Request to save Customer : {}", customer);
return customerRepository.save(customer);
}
/**
* Get all the customers.
*
* @return the list of entities.
*/
public List<Customer> findAll() {
log.debug("Request to get all Customers");
return customerRepository.findAll();
}
/**
* Get one customer by id.
*
* @param id the id of the entity.
* @return the entity.
*/
public Optional<Customer> findOne(String id) {
log.debug("Request to get Customer : {}", id);
return customerRepository.findById(id);
}
/**
* Delete the customer by id.
*
* @param id the id of the entity.
*/
public void delete(String id) {
log.debug("Request to delete Customer : {}", id);
customerRepository.deleteById(id);
}
}
|
[
"default"
] |
default
|
90ea828b4d3185b8ad3e64f8a6e1c7fffaaa4c7f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_3eb9af9e2f9df77c675992fdd9c6da093378f936/Export/29_3eb9af9e2f9df77c675992fdd9c6da093378f936_Export_t.java
|
ec5ec1003d25ded2f5f59e09ae89091ef2efea4a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,967
|
java
|
package gr.uoi.cs.daintiness.hecate.io;
import gr.uoi.cs.daintiness.hecate.diff.DiffResult;
import gr.uoi.cs.daintiness.hecate.transitions.Deletion;
import gr.uoi.cs.daintiness.hecate.transitions.Insersion;
import gr.uoi.cs.daintiness.hecate.transitions.TransitionList;
import gr.uoi.cs.daintiness.hecate.transitions.Transitions;
import gr.uoi.cs.daintiness.hecate.transitions.Update;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
public class Export {
static private int id;
public static void xml(Transitions trs, String path) {
try {
JAXBContext jaxbContext = JAXBContext.newInstance(Update.class, Deletion.class, Insersion.class, TransitionList.class, Transitions.class);
Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
String filePath = getDir(path) + File.separator + "transitions.xml";
jaxbMarshaller.marshal(trs, new FileOutputStream(filePath));
} catch (Exception e) {
e.printStackTrace();
}
}
public static void metrics(DiffResult res, String path) throws IOException {
String filePath = getDir(path) + File.separator + "metrics.csv";
BufferedWriter metrics = new BufferedWriter(new FileWriter(filePath, true));
String name = res.met.getVersionNames()[1];
String time = name.substring(0, name.length()-4);
metrics.write(
(id++) + "\t" +
time + "\t" +
res.met.getVersionNames()[0] + "\t" +
res.met.getVersionNames()[1] + "\t" +
res.met.getOldSizes()[0] + "\t" +
res.met.getNewSizes()[0] + "\t" +
res.met.getOldSizes()[1] + "\t" +
res.met.getNewSizes()[1] + "\t" +
res.met.getTableMetrics()[0] + "\t" +
res.met.getTableMetrics()[1] + "\t" +
res.met.getAttributeMetrics()[0] + "\t" +
res.met.getAttributeMetrics()[1] + "\t" +
res.met.getAttributeMetrics()[2] + "\t" +
res.met.getAttributeMetrics()[3] + "\t" +
res.met.getTotalMetrics()[2] + "\t" +
res.met.getAttributeMetrics()[4] + "\t" +
res.met.getAttributeMetrics()[5] + "\t" +
res.met.getTableMetrics()[2] + "\n"
);
metrics.close();
}
public static void initMetrics(String path) throws IOException {
String filePath = getDir(path) + File.separator + "metrics.csv";
BufferedWriter metrics = new BufferedWriter(new FileWriter(filePath));
metrics.write("# trID\ttime\toldVer\tnewVer\t#oldT\t#newT\t#oldA"
+ "\tnewA\ttIns\ttDel\taIns\taDel"
+ "\taTypeAlt\tkeyAlt\ttotAlt\taTabIns\taTabDel\n");
metrics.close();
}
private static String getDir(String path) {
String parrent = (new File(path)).getParent();
File dir = new File(parrent + File.separator + "results");
if (!dir.exists()) {
dir.mkdir();
}
return dir.getPath();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
77f3fb86e0c23eaf3c9ef49041d746374b776b61
|
1b73e8efd1ec9fbdd2c32162eaf0f8ce30666d08
|
/Mosima/Projet_Calibration_M2/lib/Repast-3.1/RepastJ/src/uchicago/src/sim/parameter/rpl/SimpleNode.java
|
8d7e0f951c480368816306559880530358b09d7a
|
[] |
no_license
|
dtbinh/M2_Androide
|
060db9575aa10b8ab0a9707db3e34cc64f5d0e03
|
a828b7ff477470c8e00c012dd36d61df2ef7d910
|
refs/heads/master
| 2020-06-16T05:02:29.653270
| 2016-11-29T11:54:24
| 2016-11-29T11:54:24
| 75,243,702
| 1
| 0
| null | 2016-12-01T01:38:37
| 2016-12-01T01:38:36
| null |
UTF-8
|
Java
| false
| false
| 4,568
|
java
|
/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
package uchicago.src.sim.parameter.rpl;
import ViolinStrings.Strings;
public class SimpleNode implements Node {
public Node parent;
public Node[] children;
public int id;
public RPLParser parser;
public int beginLine, endLine, beginColumn, endColumn;
Object info;
public SimpleNode(int i) {
id = i;
}
public SimpleNode(RPLParser p, int i) {
this(i);
parser = p;
}
public void jjtOpen() {
}
public void jjtClose() {
}
public void jjtSetParent(Node n) {
parent = n;
}
public Node jjtGetParent() {
return parent;
}
public void jjtAddChild(Node n, int i) {
if (children == null) {
children = new Node[i + 1];
} else if (i >= children.length) {
Node c[] = new Node[i + 1];
System.arraycopy(children, 0, c, 0, children.length);
children = c;
}
children[i] = n;
}
public Node jjtGetChild(int i) {
return children[i];
}
public int jjtGetNumChildren() {
return (children == null) ? 0 : children.length;
}
/* You can override these two methods in subclasses of SimpleNode to
customize the way the node appears when the tree is dumped. If
your output uses more than one line you should override
toString(String), otherwise overriding toString() is probably all
you need to do. */
public String toString() {
return RPLParserTreeConstants.jjtNodeName[id];
}
public String toString(String prefix) {
return prefix + toString();
}
/* Override this method if you want to customize how the node dumps
out its children. */
public void dump(String prefix) {
System.out.println(toString(prefix));
if (children != null) {
for (int i = 0; i < children.length; ++i) {
SimpleNode n = (SimpleNode) children[i];
if (n != null) {
n.dump(prefix + " ");
}
}
}
}
public Object getInfo() {
return info;
}
public void setInfo(Object o) {
info = o;
//System.out.println("name: "+info);
}
public void setString(String s, int quotes) {
info = parseString(s, quotes);
}
public String parseString(String s, int quotes) {
String val = s.substring(quotes, s.length() - quotes);
val = Strings.change(val, "\\n", "\n");
val = Strings.change(val, "\\\"", "\"");
val = Strings.change(val, "\\t", "\t");
val = Strings.change(val, "\\r", "\r");
return val;
}
public void setInteger(String s, int radix) {
if (s.endsWith("L") || s.endsWith("l")) {
s = s.substring(0, s.length() - 1);
try {
setInfo(Long.valueOf(s, radix));
} catch (NumberFormatException ex) {
String message = "Error creating long value";
throwError(message, ex);
}
} else {
int ndigits = s.length();
int i = 0;
while (i < ndigits && s.charAt(i) == '0') i++;
if ((ndigits - i) > 11) {
throwError("Integer literal too large");
}
long l = Long.valueOf(s, radix).longValue();
if (l > 0xffffffffl || (radix == 10 && l > Integer.MAX_VALUE)) {
throwError("Integer literal too large");
}
setInfo(new Integer((int) l));
}
}
public void setFloat(String s) {
if (s.endsWith("F") || s.endsWith("f")) {
s = s.substring(0, s.length() - 1);
try {
setInfo(Float.valueOf(s));
} catch (NumberFormatException ex) {
String message = "Error creating float value";
throwError(message, ex);
}
} else {
setInfo(Double.valueOf(s));
}
}
public RPLObject getValue() {
throw new UnsupportedOperationException(this.getClass().getName() + " does not" +
" support getValue()");
}
public void preProcess(RPLCompiler compiler) {
throw new UnsupportedOperationException(this.getClass().getName() + " does not" +
" support compile()");
}
public void compile(RPLCompiler compiler) {
throw new UnsupportedOperationException(this.getClass().getName() + " does not" +
" support compile(RPLCompiler)");
}
public void throwError(String message) {
throw new CompilerException("Error at line " + this.endLine +
" " + message);
}
public void throwError(String message, Exception ex) {
throw new CompilerException("Error at line " + this.endLine +
" " + message, ex);
}
}
|
[
"keithdae@gmail.com"
] |
keithdae@gmail.com
|
a7a28453f5efb795ca260542c3ee52f09bb920ad
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13372-18-25-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest.java
|
bf50ee244d9f4c5cbbcc51af79e05d44d9386044
|
[] |
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
| 542
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 04 06:07:54 UTC 2020
*/
package org.xwiki.job;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractJob_ESTest extends AbstractJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
87a2699350ea3b2628b1138b91c5c15b33a19b23
|
db38a0520ade2d149415a8988bd4e301f9a19165
|
/src/test/java/com/canzs/lhjz/util/CommonTest.java
|
475b5b67c631ebe8049bc3c3ce2e7fbc07443cb4
|
[
"Apache-2.0"
] |
permissive
|
czs/lhjz
|
6a378b478a86e5f457de3083fdf41f2b221190d7
|
b9ae0a2d5c4a21d83c18213c1f0c817a2d7157b3
|
refs/heads/master
| 2021-01-13T17:04:24.947433
| 2014-09-18T15:37:14
| 2014-09-18T15:37:14
| 24,099,101
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 512
|
java
|
package com.canzs.lhjz.util;
import static org.junit.Assert.assertTrue;
import java.util.HashSet;
import java.util.Set;
import org.junit.Test;
public class CommonTest {
@Test
public void test01() {
Set<Long> set = new HashSet<>();
set.add(Long.valueOf(1));
set.add(Long.valueOf(2));
set.add(Long.valueOf(3));
assertTrue(set.contains(Long.valueOf(1)));
assertTrue(set.contains(Long.valueOf(2)));
assertTrue(set.contains(Long.valueOf(3)));
assertTrue(set.contains(Long.valueOf(4)));
}
}
|
[
"xiweicheng@yeah.net"
] |
xiweicheng@yeah.net
|
ee44ec73f731b749fc4cfec0fd65ed3aa45e15f9
|
f6dacb34c10fa1c3be84ebbc7cb482344b6fbd5d
|
/pdf-as-lib/src/main/java/at/gv/egiz/sl/schema/ResultElement.java
|
0d511989fac250b7ace1facfaa1a9174d59d54b4
|
[] |
no_license
|
primesign/pdf-as-4
|
2f2a2f4cfdbff64ecf926fee64327c93c07d3473
|
29c19a50b93ea379feae1bb0d7f576c758be175b
|
refs/heads/master
| 2023-04-28T06:31:36.838914
| 2023-01-23T14:09:11
| 2023-01-23T14:10:33
| 30,864,921
| 4
| 2
| null | 2023-04-27T23:54:32
| 2015-02-16T11:14:06
|
Java
|
UTF-8
|
Java
| false
| false
| 5,506
|
java
|
/*******************************************************************************
* <copyright> Copyright 2014 by E-Government Innovation Center EGIZ, Graz, Austria </copyright>
* PDF-AS has been contracted by the E-Government Innovation Center EGIZ, a
* joint initiative of the Federal Chancellery Austria and Graz University of
* Technology.
*
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
* the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
* http://www.osor.eu/eupl/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* This product combines work with different licenses. See the "NOTICE" text
* file for details on the various modules and licenses.
* The "NOTICE" text file is part of the distribution. Any derivative works
* that you distribute must include a readable copy of the "NOTICE" text file.
******************************************************************************/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.04.22 at 04:01:10 PM CEST
//
package at.gv.egiz.sl.schema;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ResultElement complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ResultElement">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="CardAction" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CardActionType" />
* <attribute name="ApplicationIdentifier" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}ApplicationIdentifierType" />
* <attribute name="Result" use="required" type="{http://www.buergerkarte.at/namespaces/securitylayer/1.2#}CardActionResponseType" />
* <attribute name="RetryCount" type="{http://www.w3.org/2001/XMLSchema}integer" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ResultElement")
public class ResultElement {
@XmlAttribute(name = "CardAction", required = true)
protected CardActionType cardAction;
@XmlAttribute(name = "ApplicationIdentifier", required = true)
protected ApplicationIdentifierType applicationIdentifier;
@XmlAttribute(name = "Result", required = true)
protected CardActionResponseType result;
@XmlAttribute(name = "RetryCount")
protected BigInteger retryCount;
/**
* Gets the value of the cardAction property.
*
* @return
* possible object is
* {@link CardActionType }
*
*/
public CardActionType getCardAction() {
return cardAction;
}
/**
* Sets the value of the cardAction property.
*
* @param value
* allowed object is
* {@link CardActionType }
*
*/
public void setCardAction(CardActionType value) {
this.cardAction = value;
}
/**
* Gets the value of the applicationIdentifier property.
*
* @return
* possible object is
* {@link ApplicationIdentifierType }
*
*/
public ApplicationIdentifierType getApplicationIdentifier() {
return applicationIdentifier;
}
/**
* Sets the value of the applicationIdentifier property.
*
* @param value
* allowed object is
* {@link ApplicationIdentifierType }
*
*/
public void setApplicationIdentifier(ApplicationIdentifierType value) {
this.applicationIdentifier = value;
}
/**
* Gets the value of the result property.
*
* @return
* possible object is
* {@link CardActionResponseType }
*
*/
public CardActionResponseType getResult() {
return result;
}
/**
* Sets the value of the result property.
*
* @param value
* allowed object is
* {@link CardActionResponseType }
*
*/
public void setResult(CardActionResponseType value) {
this.result = value;
}
/**
* Gets the value of the retryCount property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getRetryCount() {
return retryCount;
}
/**
* Sets the value of the retryCount property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setRetryCount(BigInteger value) {
this.retryCount = value;
}
}
|
[
"andreas.fitzek@iaik.tugraz.at"
] |
andreas.fitzek@iaik.tugraz.at
|
d62e0527e27e568f42e45ee739ab5efd11b7e04a
|
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
|
/aliyun-java-sdk-onsmqtt/src/main/java/com/aliyuncs/onsmqtt/transform/v20200420/QueryMqttTraceMessagePublishResponseUnmarshaller.java
|
a179dbfbfffc1b1a3fc55e94b8dc039664722ea4
|
[
"Apache-2.0"
] |
permissive
|
caojiele/aliyun-openapi-java-sdk
|
b6367cc95469ac32249c3d9c119474bf76fe6db2
|
ecc1c949681276b3eed2500ec230637b039771b8
|
refs/heads/master
| 2023-06-02T02:30:02.232397
| 2021-06-18T04:08:36
| 2021-06-18T04:08:36
| 172,076,930
| 0
| 0
|
NOASSERTION
| 2019-02-22T14:08:29
| 2019-02-22T14:08:29
| null |
UTF-8
|
Java
| false
| false
| 3,238
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.onsmqtt.transform.v20200420;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.onsmqtt.model.v20200420.QueryMqttTraceMessagePublishResponse;
import com.aliyuncs.onsmqtt.model.v20200420.QueryMqttTraceMessagePublishResponse.MessageTraceListsItem;
import com.aliyuncs.transform.UnmarshallerContext;
public class QueryMqttTraceMessagePublishResponseUnmarshaller {
public static QueryMqttTraceMessagePublishResponse unmarshall(QueryMqttTraceMessagePublishResponse queryMqttTraceMessagePublishResponse, UnmarshallerContext _ctx) {
queryMqttTraceMessagePublishResponse.setRequestId(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.RequestId"));
queryMqttTraceMessagePublishResponse.setSuccess(_ctx.booleanValue("QueryMqttTraceMessagePublishResponse.Success"));
queryMqttTraceMessagePublishResponse.setCode(_ctx.integerValue("QueryMqttTraceMessagePublishResponse.Code"));
queryMqttTraceMessagePublishResponse.setMessage(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.Message"));
queryMqttTraceMessagePublishResponse.setTotal(_ctx.longValue("QueryMqttTraceMessagePublishResponse.Total"));
queryMqttTraceMessagePublishResponse.setCurrentPage(_ctx.integerValue("QueryMqttTraceMessagePublishResponse.CurrentPage"));
queryMqttTraceMessagePublishResponse.setPageSize(_ctx.integerValue("QueryMqttTraceMessagePublishResponse.PageSize"));
List<MessageTraceListsItem> messageTraceLists = new ArrayList<MessageTraceListsItem>();
for (int i = 0; i < _ctx.lengthValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists.Length"); i++) {
MessageTraceListsItem messageTraceListsItem = new MessageTraceListsItem();
messageTraceListsItem.setClientId(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists["+ i +"].ClientId"));
messageTraceListsItem.setActionInfo(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists["+ i +"].ActionInfo"));
messageTraceListsItem.setAction(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists["+ i +"].Action"));
messageTraceListsItem.setActionCode(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists["+ i +"].ActionCode"));
messageTraceListsItem.setTime(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists["+ i +"].Time"));
messageTraceListsItem.setMsgId(_ctx.stringValue("QueryMqttTraceMessagePublishResponse.MessageTraceLists["+ i +"].MsgId"));
messageTraceLists.add(messageTraceListsItem);
}
queryMqttTraceMessagePublishResponse.setMessageTraceLists(messageTraceLists);
return queryMqttTraceMessagePublishResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
b06c9075bb5bb1cb31c63351e992cde34ce1ece8
|
6705be9c56b6567bd63e4f5d313e248088fdd5d7
|
/src/MergeInterval.java
|
92c492720ef4ee3d07a9abf2e509f72fa701ff1c
|
[] |
no_license
|
ghost2004/LeetCode2
|
21a020f8040cf57b4cfbc176e36449973a18859c
|
48d52f6770ff4116a29e8b5f407c772675e250ef
|
refs/heads/master
| 2020-03-30T06:50:13.871186
| 2015-02-04T01:06:38
| 2015-02-04T01:06:38
| 16,282,327
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,393
|
java
|
/*
* Given a collection of intervals, merge all
* overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
*/
import java.util.*;
public class MergeInterval {
static final Comparator<Interval> Int_compare = new Comparator<Interval>(){
public int compare(Interval i, Interval j){
return new Integer(i.start).compareTo(new Integer(j.start));
}
};
public ArrayList<Interval> merge(ArrayList<Interval> intervals) {
ArrayList<Interval> result = new ArrayList<Interval>();
if (intervals == null || intervals.size() < 2)
return intervals;
int len = intervals.size();
Collections.sort(intervals, Int_compare);
Interval intval = intervals.get(0);
int start = intval.start;
int end = intval.end;
for (int i = 1; i < len; i++) {
intval = intervals.get(i);
if (intval.start > end) {
Interval t = new Interval(start, end);
result.add(t);
start = intval.start;
end = intval.end;
} else {
end = Math.max(end, intval.end);
}
}
Interval t = new Interval(start, end);
result.add(t);
return result;
}
}
|
[
"liutg@hotmail.com"
] |
liutg@hotmail.com
|
132cc7b79aecf4ca3e93508081c621f22b1601ab
|
3c49f0766779f1c4b5865b0a70f82ab790d9866a
|
/01trunk/xwoa/src/main/java/com/centit/dispatchdoc/dao/VProcTransUsersDao.java
|
6bbaac8cf5859c9ac2f8e80653deb1e4e42809b8
|
[] |
no_license
|
laoqianlaile/xwoa
|
bfa9e64ca01e9333efbc5602b41c1816f1fa746e
|
fe8a618ff9c0ddfcb8b51bc9d6786e2658b62fa1
|
refs/heads/master
| 2022-01-09T23:27:17.273124
| 2019-05-21T08:35:34
| 2019-05-21T08:35:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
package com.centit.dispatchdoc.dao;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.centit.core.dao.BaseDaoImpl;
import com.centit.core.dao.CodeBook;
import com.centit.dispatchdoc.po.VProcTransUsers;
public class VProcTransUsersDao extends BaseDaoImpl<VProcTransUsers>{
private static final long serialVersionUID = 1L;
public static final Log log = LogFactory.getLog(VProcTransUsersDao.class);
public Map<String, String> getFilterField() {
if (filterField == null) {
filterField = new HashMap<String, String>();
filterField.put("djId" , CodeBook.EQUAL_HQL_ID);
filterField.put("usercode" , CodeBook.EQUAL_HQL_ID);
filterField.put("username" , CodeBook.EQUAL_HQL_ID);
filterField.put("transdate" , CodeBook.EQUAL_HQL_ID);
filterField.put("nodeCode" , CodeBook.EQUAL_HQL_ID);
}
return filterField;
}
}
|
[
"1820244007@qq.com"
] |
1820244007@qq.com
|
de4034fa91b20656ce941ef93ef9a92ffc99ad00
|
369270a14e669687b5b506b35895ef385dad11ab
|
/java.corba/com/sun/corba/se/spi/activation/ORBAlreadyRegistered.java
|
479b107a13bcb60e6d92c094faaa11234db584be
|
[] |
no_license
|
zcc888/Java9Source
|
39254262bd6751203c2002d9fc020da533f78731
|
7776908d8053678b0b987101a50d68995c65b431
|
refs/heads/master
| 2021-09-10T05:49:56.469417
| 2018-03-20T06:26:03
| 2018-03-20T06:26:03
| 125,970,208
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,072
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/ORBAlreadyRegistered.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /scratch/opt/mach5/mesos/work_dir/slaves/5af44a71-976a-41b7-81de-5773b84ec572-S39643/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a3f74ad9-294f-4385-b9cc-31da721d8f41/runs/504babbb-611e-4037-9ed3-2563bc56551c/workspace/corba/src/java.corba/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Tuesday, December 19, 2017 6:09:01 PM PST
*/
public final class ORBAlreadyRegistered extends org.omg.CORBA.UserException
{
public String orbId = null;
public ORBAlreadyRegistered ()
{
super(ORBAlreadyRegisteredHelper.id());
} // ctor
public ORBAlreadyRegistered (String _orbId)
{
super(ORBAlreadyRegisteredHelper.id());
orbId = _orbId;
} // ctor
public ORBAlreadyRegistered (String $reason, String _orbId)
{
super(ORBAlreadyRegisteredHelper.id() + " " + $reason);
orbId = _orbId;
} // ctor
} // class ORBAlreadyRegistered
|
[
"841617433@qq.com"
] |
841617433@qq.com
|
8a5f392f938221f6e02768f19d4e1f0702743ce4
|
0493ffe947dad031c7b19145523eb39209e8059a
|
/OpenJdk8uTest/src/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/GenSSLConfigs/TestThread.java
|
47a2bcf7b47667ec424b06fa86d797dac067841b
|
[] |
no_license
|
thelinh95/Open_Jdk8u_Test
|
7612f1b63b5001d1df85c1df0d70627b123de80f
|
4df362a71e680dbd7dfbb28c8922e8f20373757a
|
refs/heads/master
| 2021-01-16T19:27:30.506632
| 2017-08-13T23:26:05
| 2017-08-13T23:26:05
| 100,169,775
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,918
|
java
|
package test.sun.security.ssl.com.sun.net.ssl.internal.ssl.GenSSLConfigs;
/*
* Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.PrintStream;
import java.security.SecureRandom;
//
// This holds all the configuration data that's shared between
// threads that are associated with passive and active SSL sockets.
//
// Passive sockets are SSLServer sockets, which produce active ones
// (SSLSockets) that inherit attributes specified here.
//
// Active sockets are associated with a client or server side handler.
// Those are almost identical from the application perspective.
//
class TestThread extends Thread
{
protected String basicCipherSuites [];
protected SecureRandom prng;
protected int iterations = -1;
// basic test flags
protected boolean doRenegotiate;
protected boolean initiateHandshake;
protected boolean listenHandshake;
protected boolean reverseRole;
// how much output to have, where
protected int verbosity = 0;
protected PrintStream out = System.out;
TestThread (String s)
{ super (s); }
//
// Defines the cipher suites that'll be used in initial
// handshaking
//
public void setBasicCipherSuites (String suites [])
{ basicCipherSuites = suites; }
//
// Says whether to register a callback on handshake
// completeion.
//
public void setListenHandshake (boolean flag)
{ listenHandshake = flag; }
//
// Says whether to renegotiate after sending some
// initial data.
//
public void setDoRenegotiate (boolean flag)
{ doRenegotiate = flag; }
//
// Says whether to try initiating handshaking. It's
// fine of both client and server do this, or if neither
// does it; sending data triggers it regardless.
//
public void setInitiateHandshake (boolean flag)
{ initiateHandshake = flag; }
//
// For half-duplex tests, who sends data first?
//
public void setReverseRole (boolean flag)
{ reverseRole = flag; }
//
// Where does the diagnostic output go?
//
public void setOutput (PrintStream out)
{ this.out = out; }
//
// How much output is desired? 2 == noisy-typical, lower is less
//
public void setVerbosity (int level)
{ verbosity = level; }
//
// How many loops of random data should a given "client" start?
//
public void setIterations (int level)
{ iterations = level; }
//
// Provide some randomness for use with random data I/O.
// By default, the "random" data is fully predictable (the
// data is generated with a fixed seed). However, both the
// client and server could agree to use truly random data.
//
void setPRNG (SecureRandom prng)
{ this.prng = prng; }
}
|
[
"truongthelinh95@gmail.com"
] |
truongthelinh95@gmail.com
|
16d9def7ddcf32fda14f8181c1e3eb46f78ad3d3
|
13779adeb942eea5c3f3a90f0010e30257553436
|
/ch.eugster.events.member/src/ch/eugster/events/member/handlers/AddMembershipHandler.java
|
7e8d0e8cb492e22c30ac347f6e7b12ed2432751e
|
[] |
no_license
|
ceugster/administrator
|
56b6ad51a409d06f2579aecf4d229ef3811bcdf7
|
ec0b6688b85ac3ab231f9648fd071915197da17d
|
refs/heads/master
| 2022-03-12T11:42:37.597568
| 2022-02-22T09:51:08
| 2022-02-22T09:51:08
| 256,752,288
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,363
|
java
|
package ch.eugster.events.member.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.expressions.EvaluationContext;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import ch.eugster.events.member.editors.MembershipEditor;
import ch.eugster.events.member.editors.MembershipEditorInput;
import ch.eugster.events.member.views.MembershipView;
import ch.eugster.events.persistence.model.Membership;
public class AddMembershipHandler extends AbstractHandler implements IHandler
{
@Override
public Object execute(ExecutionEvent event) throws ExecutionException
{
EvaluationContext context = (EvaluationContext) event.getApplicationContext();
IViewPart viewPart = (IViewPart) context.getParent().getVariable("activePart");
if (viewPart instanceof MembershipView)
{
Membership membership = Membership.newInstance();
try
{
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.openEditor(new MembershipEditorInput(membership), MembershipEditor.ID);
}
catch (PartInitException e)
{
e.printStackTrace();
}
}
return null;
}
}
|
[
"christian.eugster@gmx.net"
] |
christian.eugster@gmx.net
|
1047ba48079cf87ce22c65c82aeaf8f91dc09863
|
e376695c827b014cf84563a346e2b29a7895a9f6
|
/src/ua/azbest/study/algorithms/tasks/percolation/Percolation.java
|
efaef6ce32174ccb44d4219d19e5b35507326cfb
|
[] |
no_license
|
powerex/NPU
|
5cbd1a94b3e79b0d61a553fa20f5f521460d40cb
|
c7b7dce0845ef293761e6f522d4e69c0bf7bdd46
|
refs/heads/master
| 2021-04-15T09:39:25.934339
| 2018-03-21T22:12:45
| 2018-03-21T22:12:45
| 126,246,743
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,548
|
java
|
package ua.azbest.study.algorithms.tasks.percolation;
import ua.azbest.study.aditionals.StdArrayIO;
import ua.azbest.study.aditionals.StdDraw;
import ua.azbest.study.aditionals.StdOut;
import ua.azbest.study.aditionals.StdRandom;
/**
* Created by AZbest on 18.10.2015.
*/
public class Percolation {
// given an N-by-N matrix of open sites, return an N-by-N matrix
// of sites reachable from the top
public static boolean[][] flow(boolean[][] open) {
int N = open.length;
boolean[][] full = new boolean[N][N];
for (int j = 0; j < N; j++) {
flow(open, full, 0, j);
}
return full;
}
// determine set of full sites using depth first search
public static void flow(boolean[][] open, boolean[][] full, int i, int j) {
int N = open.length;
// base cases
if (i < 0 || i >= N) return; // invalid row
if (j < 0 || j >= N) return; // invalid column
if (!open[i][j]) return; // not an open site
if (full[i][j]) return; // already marked as full
// mark i-j as full
full[i][j] = true;
flow(open, full, i+1, j); // down
flow(open, full, i, j+1); // right
flow(open, full, i, j-1); // left
flow(open, full, i-1, j); // up
}
// does the system percolate?
public static boolean percolates(boolean[][] open) {
int N = open.length;
boolean[][] full = flow(open);
for (int j = 0; j < N; j++) {
if (full[N-1][j]) return true;
}
return false;
}
// draw the N-by-N boolean matrix to standard draw
public static void show(boolean[][] a, boolean which) {
int N = a.length;
StdDraw.setXscale(-1, N);
StdDraw.setYscale(-1, N);
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++)
if (a[i][j] == which)
StdDraw.filledSquare(j, N - i - 1, .5);
}
// return a random N-by-N boolean matrix, where each entry is
// true with probability p
public static boolean[][] random(int N, double p) {
boolean[][] a = new boolean[N][N];
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++)
a[i][j] = StdRandom.bernoulli(p);
return a;
}
// test client
public static void main(String[] args) {
boolean[][] open = StdArrayIO.readBoolean2D();
StdArrayIO.print(flow(open));
StdOut.println(percolates(open));
}
}
|
[
"flaxazbest@gmail.com"
] |
flaxazbest@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.