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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4ec10f63de9b1284fc8c4ee1e2d67f1d6034951c | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/com/nytimes/android/external/store3/middleware/jackson/JacksonStringParserStoreTest.java | fa05e301c31730197b7f209f0b73aff18abadc2c | [] | 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,988 | java | package com.nytimes.android.external.store3.middleware.jackson;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.nytimes.android.external.store3.base.Fetcher;
import com.nytimes.android.external.store3.base.Parser;
import com.nytimes.android.external.store3.base.Persister;
import com.nytimes.android.external.store3.base.impl.BarCode;
import com.nytimes.android.external.store3.base.impl.Store;
import com.nytimes.android.external.store3.middleware.jackson.data.Foo;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.Mockito;
public class JacksonStringParserStoreTest {
private static final String KEY = "key";
private static final String source = "{\"number\":123,\"string\":\"abc\",\"bars\":[{\"string\":\"def\"},{\"string\":\"ghi\"}]}";
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Mock
Fetcher<String, BarCode> fetcher;
@Mock
Persister<String, BarCode> persister;
private final BarCode barCode = new BarCode("value", JacksonStringParserStoreTest.KEY);
@Test
public void testDefaultJacksonStringParser() {
Store<Foo, BarCode> store = com.nytimes.android.external.store3.base.impl.StoreBuilder.<BarCode, String, Foo>parsedWithKey().persister(persister).fetcher(fetcher).parser(JacksonParserFactory.createStringParser(Foo.class)).open();
Foo result = store.get(barCode).blockingGet();
validateFoo(result);
Mockito.verify(fetcher, Mockito.times(1)).fetch(barCode);
}
@Test
public void testCustomJsonFactoryStringParser() {
JsonFactory jsonFactory = new JsonFactory();
Parser<String, Foo> parser = JacksonParserFactory.createStringParser(jsonFactory, Foo.class);
Store<Foo, BarCode> store = com.nytimes.android.external.store3.base.impl.StoreBuilder.<BarCode, String, Foo>parsedWithKey().persister(persister).fetcher(fetcher).parser(parser).open();
Foo result = store.get(barCode).blockingGet();
validateFoo(result);
Mockito.verify(fetcher, Mockito.times(1)).fetch(barCode);
}
@Test
public void testNullJsonFactory() {
expectedException.expect(NullPointerException.class);
JacksonParserFactory.createStringParser(((JsonFactory) (null)), Foo.class);
}
@Test
public void testNullTypeWithValidJsonFactory() {
expectedException.expect(NullPointerException.class);
JacksonParserFactory.createStringParser(new JsonFactory(), null);
}
@Test
public void testNullObjectMapper() {
expectedException.expect(NullPointerException.class);
JacksonParserFactory.createStringParser(((ObjectMapper) (null)), Foo.class);
}
@Test
public void testNullType() {
expectedException.expect(NullPointerException.class);
JacksonParserFactory.createStringParser(null);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
c9636026a499a136cd55e4cbcd59f8c77e5ecadb | 6189bc8f09d38d476ee103618e58097330b1d851 | /src/thread/_3_communication/_3_threadLocal/_2_verify_isolation/_1_demo/ThreadA.java | 398efc91f2b82bd2a2b2f32f240a453e79df711a | [] | no_license | lyqlbst/thread_study | 08e3f0bd7527731294480536a1bf194cc9f4ef67 | f693e9e2e96ebe56ba90bedac9023c26fe2917e4 | refs/heads/master | 2020-03-15T09:11:37.080418 | 2018-05-25T08:41:15 | 2018-05-25T08:41:15 | 132,069,199 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 469 | java | package thread._3_communication._3_threadLocal._2_verify_isolation._1_demo;
class ThreadA extends Thread {
@Override
public void run() {
for (int i = 0; i < 10; i++) {
Tools.t.set("ThreadA" + (i + 1));
System.out.println("ThreadA get Value=" + Tools.t.get());
try {
Thread.sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
| [
"linyuqiang@bonc.com.cn"
] | linyuqiang@bonc.com.cn |
f915cb7390412e90ad7de34529e051e38a7e86b6 | e66dfd2f3250e0e271dcdac4883227873e914429 | /zml-jce/src/main/java/com/jce/framework/web/system/service/impl/DynamicDataSourceServiceImpl.java | d9cc5aa7feec0664f0b07a0b0d2a03e2ac4e4015 | [] | no_license | tianshency/zhuminle | d13b45a8a528f0da2142aab0fd999775fe476e0c | c864d0ab074dadf447504f54a82b2fc5b149b97e | refs/heads/master | 2020-03-18T00:54:16.153820 | 2018-05-20T05:20:08 | 2018-05-20T05:20:08 | 134,118,245 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,970 | java | package com.jce.framework.web.system.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jce.framework.core.common.service.impl.CommonServiceImpl;
import com.jce.framework.core.util.ResourceUtil;
import com.jce.framework.web.system.service.DynamicDataSourceServiceI;
import com.jce.framework.web.system.pojo.base.DynamicDataSourceEntity;
@Service("dynamicDataSourceService")
@Transactional
public class DynamicDataSourceServiceImpl extends CommonServiceImpl implements DynamicDataSourceServiceI {
/**初始化数据库信息,TOMCAT启动时直接加入到内存中**/
public List<DynamicDataSourceEntity> initDynamicDataSource() {
ResourceUtil.dynamicDataSourceMap.clear();
List<DynamicDataSourceEntity> dynamicSourceEntityList = this.commonDao.loadAll(DynamicDataSourceEntity.class);
for (DynamicDataSourceEntity dynamicSourceEntity : dynamicSourceEntityList) {
ResourceUtil.dynamicDataSourceMap.put(dynamicSourceEntity.getDbKey(), dynamicSourceEntity);
}
return dynamicSourceEntityList;
}
public static DynamicDataSourceEntity getDbSourceEntityByKey(String dbKey) {
DynamicDataSourceEntity dynamicDataSourceEntity = ResourceUtil.dynamicDataSourceMap.get(dbKey);
return dynamicDataSourceEntity;
}
public void refleshCache() {
initDynamicDataSource();
}
//add-begin--Author:luobaoli Date:20150620 for:增加通过数据源Key获取数据源Type
@Override
public DynamicDataSourceEntity getDynamicDataSourceEntityForDbKey(String dbKey){
List<DynamicDataSourceEntity> dynamicDataSourceEntitys = commonDao.findHql("from DynamicDataSourceEntity where dbKey = ?", dbKey);
if(dynamicDataSourceEntitys.size()>0)
return dynamicDataSourceEntitys.get(0);
return null;
}
//add-end--Author:luobaoli Date:20150620 for:增加通过数据源Key获取数据源Type
} | [
"tianshencaoyin@163.com"
] | tianshencaoyin@163.com |
fef51dfe71c85956c64d01bb4a5607a994a56ec3 | 73267be654cd1fd76cf2cb9ea3a75630d9f58a41 | /services/dws/src/main/java/com/huaweicloud/sdk/dws/v2/model/DisasterRecoveryClusterVo.java | 0352ea1877943b5db8981f177d2abe8462169b96 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-java-v3 | 51b32a451fac321a0affe2176663fed8a9cd8042 | 2f8543d0d037b35c2664298ba39a89cc9d8ed9a3 | refs/heads/master | 2023-08-29T06:50:15.642693 | 2023-08-24T08:34:48 | 2023-08-24T08:34:48 | 262,207,545 | 91 | 57 | NOASSERTION | 2023-09-08T12:24:55 | 2020-05-08T02:27:00 | Java | UTF-8 | Java | false | false | 2,193 | java | package com.huaweicloud.sdk.dws.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* 容灾可用集群信息
*/
public class DisasterRecoveryClusterVo {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "id")
private String id;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "name")
private String name;
public DisasterRecoveryClusterVo withId(String id) {
this.id = id;
return this;
}
/**
* 集群ID
* @return id
*/
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public DisasterRecoveryClusterVo withName(String name) {
this.name = name;
return this;
}
/**
* 集群名称
* @return name
*/
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
DisasterRecoveryClusterVo that = (DisasterRecoveryClusterVo) obj;
return Objects.equals(this.id, that.id) && Objects.equals(this.name, that.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DisasterRecoveryClusterVo {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
8f7ef4505345ad64dc2de6c22ab0868dd61bbe19 | 33874d398ae0e65875e5ed365af44acf5944bcc3 | /src/main/java/com/isis/util/xero/TrueOrFalse.java | b067d0120d8043e7300d280f6e45548fed053ac9 | [] | no_license | yorktips/XeroApiPrivateApp | ea6a5f5db112969b8d54d15cc75037c2679f4ff9 | f754a948fdd5d5b3a338a0f3adbe0c301a45ca37 | refs/heads/master | 2020-05-29T09:15:23.028113 | 2016-11-01T03:42:49 | 2016-11-01T03:42:49 | 69,526,820 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,445 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// 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: 2016.09.28 at 10:40:40 PM EDT
//
package com.isis.util.xero;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for trueOrFalse.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="trueOrFalse">
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
* <enumeration value="true"/>
* <enumeration value="false"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "trueOrFalse")
@XmlEnum
public enum TrueOrFalse {
@XmlEnumValue("true")
TRUE("true"),
@XmlEnumValue("false")
FALSE("false");
private final String value;
TrueOrFalse(String v) {
value = v;
}
public String value() {
return value;
}
public static TrueOrFalse fromValue(String v) {
for (TrueOrFalse c: TrueOrFalse.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"york.tips@gmail.com"
] | york.tips@gmail.com |
ff5f8260d165e74ab5306125aed210c4eac9e4dc | 902983386c123a70064866b2aa72c7748ae5269e | /independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/config/json/JsonRegistryConfig.java | a8b81a25f3e2006812920750628df9109b5850c2 | [
"Apache-2.0"
] | permissive | cemnura/quarkus | a14cd7609ca8423bf81db2cb093d89b93fa91cc6 | fdb9f5e504077ca476e6390f0f07609cabb28341 | refs/heads/main | 2023-01-23T05:00:15.397104 | 2021-10-02T11:36:00 | 2021-10-02T11:36:00 | 226,573,438 | 2 | 0 | Apache-2.0 | 2023-01-17T20:01:03 | 2019-12-07T20:42:05 | Java | UTF-8 | Java | false | false | 5,793 | java | package io.quarkus.registry.config.json;
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.databind.annotation.JsonDeserialize;
import io.quarkus.registry.config.RegistryConfig;
import io.quarkus.registry.config.RegistryDescriptorConfig;
import io.quarkus.registry.config.RegistryMavenConfig;
import io.quarkus.registry.config.RegistryNonPlatformExtensionsConfig;
import io.quarkus.registry.config.RegistryPlatformsConfig;
import io.quarkus.registry.config.RegistryQuarkusVersionsConfig;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class JsonRegistryConfig implements RegistryConfig {
private String id;
private boolean enabled = true;
private String updatePolicy;
private RegistryDescriptorConfig descriptor;
private RegistryPlatformsConfig platforms;
private RegistryNonPlatformExtensionsConfig nonPlatformExtensions;
private RegistryMavenConfig mavenConfig;
private RegistryQuarkusVersionsConfig versionsConfig;
private Map<String, Object> extra;
public JsonRegistryConfig() {
}
public JsonRegistryConfig(String id) {
this.id = Objects.requireNonNull(id, "QER ID can't be null");
}
@JsonIgnore
@Override
public String getId() {
return id;
}
public void setId(String id) {
this.id = Objects.requireNonNull(id);
}
@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = JsonBooleanTrueFilter.class)
@Override
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public String getUpdatePolicy() {
return updatePolicy;
}
public void setUpdatePolicy(String updatePolicy) {
this.updatePolicy = updatePolicy;
}
@Override
@JsonDeserialize(as = JsonRegistryDescriptorConfig.class)
public RegistryDescriptorConfig getDescriptor() {
return descriptor;
}
public void setDescriptor(RegistryDescriptorConfig descriptor) {
this.descriptor = descriptor;
}
@JsonDeserialize(as = JsonRegistryPlatformsConfig.class)
@Override
public RegistryPlatformsConfig getPlatforms() {
return platforms;
}
public void setPlatforms(RegistryPlatformsConfig platforms) {
this.platforms = platforms;
}
@JsonDeserialize(as = JsonRegistryNonPlatformExtensionsConfig.class)
@Override
public RegistryNonPlatformExtensionsConfig getNonPlatformExtensions() {
return nonPlatformExtensions;
}
public void setNonPlatformExtensions(RegistryNonPlatformExtensionsConfig nonPlatformExtensions) {
this.nonPlatformExtensions = nonPlatformExtensions;
}
boolean isIdOnly() {
return this.mavenConfig == null
&& this.enabled
&& this.descriptor == null
&& this.nonPlatformExtensions == null
&& this.platforms == null
&& this.updatePolicy == null
&& this.versionsConfig == null
&& (this.extra == null || this.extra.isEmpty());
}
@JsonDeserialize(as = JsonRegistryMavenConfig.class)
@Override
public RegistryMavenConfig getMaven() {
return mavenConfig;
}
public void setMaven(RegistryMavenConfig mavenConfig) {
this.mavenConfig = mavenConfig;
}
@JsonDeserialize(as = JsonRegistryQuarkusVersionsConfig.class)
@Override
public RegistryQuarkusVersionsConfig getQuarkusVersions() {
return versionsConfig;
}
public void setQuarkusVersions(RegistryQuarkusVersionsConfig quarkusVersions) {
this.versionsConfig = quarkusVersions;
}
@JsonAnyGetter
@Override
public Map<String, Object> getExtra() {
return extra == null ? Collections.emptyMap() : extra;
}
public void setExtra(Map<String, Object> extra) {
this.extra = extra;
}
@JsonAnySetter
public void setAny(String name, Object value) {
if (extra == null) {
extra = new HashMap<>();
}
extra.put(name, value);
}
public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append('[').append(id);
if (mavenConfig != null) {
buf.append(" maven=").append(mavenConfig);
}
if (extra != null && !extra.isEmpty()) {
buf.append(" extra=").append(extra);
}
return buf.append(']').toString();
}
@Override
public int hashCode() {
return Objects.hash(descriptor, enabled, extra, id, mavenConfig, nonPlatformExtensions, platforms,
updatePolicy, versionsConfig);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
JsonRegistryConfig other = (JsonRegistryConfig) obj;
return Objects.equals(descriptor, other.descriptor) && enabled == other.enabled
&& Objects.equals(extra, other.extra) && Objects.equals(id, other.id)
&& Objects.equals(mavenConfig, other.mavenConfig)
&& Objects.equals(nonPlatformExtensions, other.nonPlatformExtensions)
&& Objects.equals(platforms, other.platforms) && Objects.equals(updatePolicy, other.updatePolicy)
&& Objects.equals(versionsConfig, other.versionsConfig);
}
}
| [
"olubyans@redhat.com"
] | olubyans@redhat.com |
9e80d1e23ffa1a683e4668ac070265e6a943328b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/21/21_aebd77d0edf310a4dd23adf1669ac922e29def38/TestRichTCAccordion/21_aebd77d0edf310a4dd23adf1669ac922e29def38_TestRichTCAccordion_s.java | 7d34085bf0f8bc2ff93eee518f9c968862d4a069 | [] | 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,471 | java | /*******************************************************************************
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richToggleControl;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import java.net.URL;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.testng.annotations.Test;
/**
* Test case for page /faces/components/richToggleControl/accordion.xhtml
*
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
public class TestRichTCAccordion extends AbstractTestToggleControl {
JQueryLocator[] items1 = {pjq("div[id$=item11:content]"), pjq("div[id$=item12:content]"), pjq("div[id$=item13:content]")};
JQueryLocator[] items2 = {pjq("div[id$=item21:content]"), pjq("div[id$=item22:content]"), pjq("div[id$=item23:content]")};
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/richToggleControl/accordion.xhtml");
}
@Test
public void testSwitchFirstPanel() {
testSwitchFirstPanel(items1);
}
@Test
public void testSwitchSecondPanel() {
testSwitchSecondPanel(items2);
}
@Test
public void testTargetItem() {
testTargetItem(items1);
}
@Test
public void testTargetPanel() {
testTargetPanel(items2);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
9da32b01088dbbc30a708b428b7cd52526d24cc6 | b6ea417b48402d85b6fe90299c51411b778c07cc | /spring-beans/src/test/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditorTests.java | 2a8ea361630c94bf57c7ae41e6d64f087e40c26e | [
"Apache-2.0"
] | permissive | DevHui/spring-framework | 065f24e96eaaed38495b9d87bc322db82b6a046c | 4a2f291e26c6f78c3875dea13432be21bb1c0ed6 | refs/heads/master | 2020-12-04T21:08:18.445815 | 2020-01-15T03:54:42 | 2020-01-15T03:54:42 | 231,526,595 | 1 | 0 | Apache-2.0 | 2020-01-03T06:28:30 | 2020-01-03T06:28:29 | null | UTF-8 | Java | false | false | 1,755 | java | /*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.beans.propertyeditors;
import org.junit.Test;
import java.beans.PropertyEditor;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
* Unit tests for the {@link ByteArrayPropertyEditor} class.
*
* @author Rick Evans
*/
public class ByteArrayPropertyEditorTests {
private final PropertyEditor byteEditor = new ByteArrayPropertyEditor();
@Test
public void sunnyDaySetAsText() throws Exception {
final String text = "Hideous towns make me throw... up";
byteEditor.setAsText(text);
Object value = byteEditor.getValue();
assertNotNull(value);
assertTrue(value instanceof byte[]);
byte[] bytes = (byte[]) value;
for (int i = 0; i < text.length(); ++i) {
assertEquals("cyte[] differs at index '" + i + "'", text.charAt(i), bytes[i]);
}
assertEquals(text, byteEditor.getAsText());
}
@Test
public void getAsTextReturnsEmptyStringIfValueIsNull() throws Exception {
assertEquals("", byteEditor.getAsText());
byteEditor.setAsText(null);
assertEquals("", byteEditor.getAsText());
}
}
| [
"pengshaohui@markor.com.cn"
] | pengshaohui@markor.com.cn |
285949f7f9eaac76a1ca34239191946256e0d22f | 5ca3901b424539c2cf0d3dda52d8d7ba2ed91773 | /src_fernflower/com/google/security/zynamics/bindiff/graph/nodes/SingleDiffBasicBlockNode.java | 84ece3d34d9ba56b2b01935bfbda85ca3f5bb2be | [] | no_license | fjh658/bindiff | c98c9c24b0d904be852182ecbf4f81926ce67fb4 | 2a31859b4638404cdc915d7ed6be19937d762743 | refs/heads/master | 2021-01-20T06:43:12.134977 | 2016-06-29T17:09:03 | 2016-06-29T17:09:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,043 | java | package com.google.security.zynamics.bindiff.graph.nodes;
import com.google.security.zynamics.bindiff.enums.ESide;
import com.google.security.zynamics.bindiff.graph.nodes.SingleDiffNode;
import com.google.security.zynamics.bindiff.graph.nodes.SingleViewNode;
import com.google.security.zynamics.bindiff.resources.Colors;
import com.google.security.zynamics.zylib.gui.zygraph.realizers.CStyleRunData;
import com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLineContent;
import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.realizers.IZyNodeRealizer;
import java.awt.Color;
import java.util.Iterator;
import java.util.List;
import y.c.q;
public class SingleDiffBasicBlockNode extends SingleDiffNode {
public SingleDiffBasicBlockNode(q var1, IZyNodeRealizer var2, SingleViewNode var3, ESide var4) {
super(var1, var2, var3, var4);
}
protected void onSelectionChanged() {
Color var1 = this.getSide() == ESide.PRIMARY?Colors.PRIMARY_BASE:Colors.SECONDARY_BASE;
if(this.isSelected()) {
var1 = var1.darker();
}
Iterator var2 = this.getRealizer().getNodeContent().getContent().iterator();
while(true) {
ZyLineContent var3;
int var4;
do {
if(!var2.hasNext()) {
return;
}
var3 = (ZyLineContent)var2.next();
var4 = var3.getText().length();
} while(var4 <= 0);
List var5 = var3.getBackgroundStyleRunData(0, var4 - 1);
Iterator var6 = var5.iterator();
while(var6.hasNext()) {
CStyleRunData var7 = (CStyleRunData)var6.next();
Color var8 = var7.getColor();
if(var8 != Colors.SEARCH_HIGHLIGHT_COLOR && var8 != null) {
if(var4 == var7.getEnd()) {
var3.setBackgroundColor(var7.getStart(), var7.getLength(), var1);
} else {
var3.setBackgroundColor(var7.getStart(), var7.getLength() - 1, var1);
}
}
}
}
}
}
| [
"manouchehri@riseup.net"
] | manouchehri@riseup.net |
db41da574dc103666094ab5f6d54897112b42c66 | 07251556dde22700fe4828a7aaf85c27787b2fcf | /src/main/java/com/jm/mvc/vo/qo/OrderDetailQo.java | 4fb5fc365aa59334cf5327318e74228be3c223dd | [] | no_license | wanghonghong/mygit | 0a45dc9e7efa2bcc14b3279c6071dd73fc86da36 | d0f0e40e8897f30042a58a42ea772f887ab1551b | refs/heads/master | 2020-12-02T23:51:40.346895 | 2017-07-02T02:11:26 | 2017-07-02T02:11:26 | 95,954,161 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 566 | java | package com.jm.mvc.vo.qo;
import java.util.Date;
import java.util.List;
import com.jm.repository.po.order.OrderDetail;
import com.jm.repository.po.order.OrderInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*<p>查询商品详情信息</p>
*
* @author hantp
* @version latest
* @data 2016年5月19日
*/
@Data
public class OrderDetailQo {
@ApiModelProperty(value = "订单信息")
private OrderInfo orderInfo;
@ApiModelProperty(value = "订单详情信息")
private List<OrderDetail> detailList;
}
| [
"445605976@qq.com"
] | 445605976@qq.com |
ff2e55667acb0fdb4369c4fb82f22bde3d902a74 | 6f60c52828a9e7251021babbe8454621ff2cd7ff | /app/src/main/java/com/htcompany/educationerpforgansu/workpart/activitys/AssetMaintenanceActivity.java | 988094ac517a2fdfadc4f8da28584ab6de0ce705 | [] | no_license | liuhui-huatang/EducationERP | f193e41ec30491521b6ede08ef42f6f7e04447d3 | 894d27ef6ee13b817ade2e21c21b7794fb67cc70 | refs/heads/master | 2020-03-27T08:25:51.204410 | 2018-08-21T12:11:08 | 2018-08-21T12:11:08 | 146,253,621 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,310 | java | package com.htcompany.educationerpforgansu.workpart.activitys;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.htcompany.educationerpforgansu.R;
import com.htcompany.educationerpforgansu.commonpart.BaseActivity;
import com.htcompany.educationerpforgansu.commonpart.tools.ToastUtil;
import com.htcompany.educationerpforgansu.commonpart.views.WaitDialog;
import com.htcompany.educationerpforgansu.internet.workgrzx.WokrpersonalInternet;
import com.htcompany.educationerpforgansu.internet.workgrzx.WokrpersonalPersener;
import com.htcompany.educationerpforgansu.workpart.adapters.AssetMaintenanceAdapter;
import com.htcompany.educationerpforgansu.workpart.entities.AssetMaintenanceEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 资产维护
* Created by WRB on 2016/11/9.
*/
public class AssetMaintenanceActivity extends BaseActivity implements View.OnClickListener{
private TextView title,rightthree_btn_tv;
private RelativeLayout right_three_btn,reback_btn;
private ImageView assemanintenance_wsj_img;
private ListView assetmanintenance_lv;
private AssetMaintenanceAdapter assetMaintenanceAdapter;
private List<AssetMaintenanceEntity> assetMaintenanceEntities;
//网络请求类
private WokrpersonalInternet wokrpersonalInternet;
private WokrpersonalPersener wokrpersonalPersener;
private WaitDialog waitDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.assetmaintenance_activity);
initDatas();
initViews();
initViewValues();
initOnclicEvents();
}
public void initDatas(){
assetMaintenanceEntities = new ArrayList<AssetMaintenanceEntity>();
waitDialog = new WaitDialog(this,"");
wokrpersonalPersener = new WokrpersonalPersener(this);
wokrpersonalInternet = new WokrpersonalInternet(this,myHandler);
waitDialog.show();
wokrpersonalInternet.getAsset_RepairListDatas();
}
public void initViews(){
title = (TextView)this.findViewById(R.id.title);
rightthree_btn_tv= (TextView)this.findViewById(R.id.rightthree_btn_tv);
reback_btn= (RelativeLayout)this.findViewById(R.id.reback_btn);
right_three_btn =(RelativeLayout)this.findViewById(R.id.right_three_btn);
assemanintenance_wsj_img=(ImageView)this.findViewById(R.id.assemanintenance_wsj_img);
assetmanintenance_lv = (ListView)this.findViewById(R.id.assetmanintenance_lv);
assetMaintenanceAdapter = new AssetMaintenanceAdapter(this,assetMaintenanceEntities);
assetmanintenance_lv.setAdapter(assetMaintenanceAdapter);
assetmanintenance_lv.setOnItemClickListener(itemClickListener);
}
public void initViewValues(){
title.setText("资产维护");
right_three_btn.setVisibility(View.VISIBLE);
rightthree_btn_tv.setText("报修");
}
public void initOnclicEvents(){
reback_btn.setOnClickListener(this);
right_three_btn.setOnClickListener(this);
}
public AdapterView.OnItemClickListener itemClickListener = new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
AssetMaintenanceEntity entity = (AssetMaintenanceEntity) assetMaintenanceAdapter.getItem(position);
Intent intent = new Intent(AssetMaintenanceActivity.this,AssetMaintenanceDetialsActivity.class);
intent.putExtra("entity",entity);
startActivity(intent);
}
};
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.reback_btn:
this.finish();
break;
case R.id.right_three_btn:
Intent intent = new Intent(AssetMaintenanceActivity.this,AssetRepairsActivity.class);
startActivityForResult(intent,100);
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode){
case 100:
wokrpersonalInternet.getAsset_RepairListDatas();
break;
}
}
public Handler myHandler = new Handler(){
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch (msg.what){
case 400:
if(waitDialog!=null){
waitDialog.dismiss();
}
ToastUtil.showToast("连接超时",AssetMaintenanceActivity.this);
break;
case 200:
if(waitDialog!=null){
waitDialog.dismiss();
}
List<AssetMaintenanceEntity> datas = wokrpersonalPersener.parseAssetRepairListData((String)msg.obj);
if(datas!=null&&datas.size()>0){
assemanintenance_wsj_img.setVisibility(View.GONE);
setLVDatas(datas);
}else{
assemanintenance_wsj_img.setVisibility(View.VISIBLE);
}
break;
case 300:
if(waitDialog!=null){
waitDialog.dismiss();
}
ToastUtil.showToast("数据异常",AssetMaintenanceActivity.this);
break;
}
}
};
/**
* 更新列表数据
* @param datas
*/
public void setLVDatas(List<AssetMaintenanceEntity> datas){
if(assetMaintenanceEntities.size()>0){
assetMaintenanceEntities.clear();
}
for(AssetMaintenanceEntity entity:datas){
assetMaintenanceEntities.add(entity);
}
assetMaintenanceAdapter.notifyDataSetChanged();
}
}
| [
"liuhui@huatangjt.com"
] | liuhui@huatangjt.com |
30e6906a2c614562f27aeee38224ffe0a69ceed2 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_d39814f994bfaf192ff7dd091e110c9e7f17e4bf/DominoRunnable/29_d39814f994bfaf192ff7dd091e110c9e7f17e4bf_DominoRunnable_s.java | 29d4177e8a288588edc676e407b4015264dc97ca | [] | 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 | 861 | java | package org.openntf.domino.tests.ntf;
import lotus.domino.NotesFactory;
import org.openntf.domino.Database;
import org.openntf.domino.Session;
import org.openntf.domino.thread.DominoThread;
import org.openntf.domino.utils.Factory;
public class DominoRunnable implements Runnable {
public static void main(String[] args) {
DominoThread thread = new DominoThread(new DominoRunnable(), "My thread");
thread.start();
}
public DominoRunnable() {
// whatever you might want to do in your constructor, but stay away from Domino objects
}
@Override
public void run() {
try {
Session session = Factory.fromLotus(NotesFactory.createSession(), Session.class, null);
Database db = session.getDatabase("", "names.nsf");
// whatever you're gonna do, do it fast!
} catch (Throwable t) {
t.printStackTrace();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
16d26fdaa6b257da3b4453e64ebab6da726b24fb | 799416bfe4f90be18dc98563773839db47af9d38 | /src/com/corejava/Method/sample.java | 1f191c01b50a770a1d067f2acffaad2b8f195ce5 | [] | no_license | qamanoj/CoreJava | a0d7cfae4d5ef39e9583490d7d134e03c7211cdb | 47ba778619fa2144efad379f1a407a93e4da2314 | refs/heads/master | 2020-05-01T05:35:19.608416 | 2019-03-23T15:27:47 | 2019-03-23T15:27:47 | 177,306,147 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 135 | java | package com.corejava.Method;
public class sample
{
public static void main(String[] args)
{
System.out.println(sample1.x);
}
}
| [
"mail2manoj18@gmail.com"
] | mail2manoj18@gmail.com |
06372bb62f7fa11e3c27a94cca2e921cea62db11 | 0f2d15e30082f1f45c51fdadc3911472223e70e0 | /src/3.7/plugins/com.perforce.team.ui.mylyn/src/com/perforce/team/ui/mylyn/connection/LinkRepositoryAction.java | 15453d9a75bc70b290904a8b5fea25df811e736e | [
"BSD-2-Clause"
] | permissive | eclipseguru/p4eclipse | a28de6bd211df3009d58f3d381867d574ee63c7a | 7f91b7daccb2a15e752290c1f3399cc4b6f4fa54 | refs/heads/master | 2022-09-04T05:50:25.271301 | 2022-09-01T12:47:06 | 2022-09-01T12:47:06 | 136,226,938 | 2 | 1 | BSD-2-Clause | 2022-09-01T19:42:29 | 2018-06-05T19:45:54 | Java | UTF-8 | Java | false | false | 2,991 | java | /**
* Copyright (c) 2009 Perforce Software. All rights reserved.
*/
package com.perforce.team.ui.mylyn.connection;
import com.perforce.team.core.p4java.IP4Connection;
import com.perforce.team.ui.P4UIUtils;
import com.perforce.team.ui.PerforceUIPlugin;
import com.perforce.team.ui.mylyn.P4MylynUiUtils;
import com.perforce.team.ui.mylyn.preferences.IPreferenceConstants;
import com.perforce.team.ui.p4java.actions.P4Action;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.team.core.TeamException;
/**
* @author Kevin Sawicki (ksawicki@perforce.com)
*
*/
public class LinkRepositoryAction extends P4Action {
/**
* @see com.perforce.team.ui.p4java.actions.P4Action#isEnabledEx()
*/
@Override
protected boolean isEnabledEx() throws TeamException {
return containsSingleOnlineConnection();
}
/**
* Update the link. A null repository will unlink the connection from any
* task repository
*
* @param connection
* @param repository
*/
public void updateLink(IP4Connection connection, TaskRepository repository) {
if (connection != null) {
if (repository != null) {
P4MylynUiUtils.setConnectionSetting(
IPreferenceConstants.CONNECTION_LINK_URL,
repository.getRepositoryUrl(), connection);
P4MylynUiUtils.setConnectionSetting(
IPreferenceConstants.CONNECTION_LINK_KIND,
repository.getConnectorKind(), connection);
} else {
P4MylynUiUtils.setConnectionSetting(
IPreferenceConstants.CONNECTION_LINK_URL, "", //$NON-NLS-1$
connection);
P4MylynUiUtils.setConnectionSetting(
IPreferenceConstants.CONNECTION_LINK_KIND, "", //$NON-NLS-1$
connection);
}
}
}
/**
* @see com.perforce.team.ui.p4java.actions.P4Action#runAction()
*/
@Override
protected void runAction() {
final IP4Connection connection = getSingleOnlineConnectionSelection();
if (connection != null) {
PerforceUIPlugin.syncExec(new Runnable() {
public void run() {
TaskRepository repository = P4MylynUiUtils.getRepository(
connection.getParameters(), false);
ConnectionMappingDialog dialog = new ConnectionMappingDialog(
P4UIUtils.getDialogShell(),
new IP4Connection[] { connection }, P4MylynUiUtils
.getNonPerforceRepositories(), repository,
false);
if (ConnectionMappingDialog.OK == dialog.open()) {
updateLink(connection, dialog.getRepository());
}
}
});
}
}
}
| [
"gunnar@wagenknecht.org"
] | gunnar@wagenknecht.org |
3c96094987e6f2c608989bc145b3533af4ba20be | b02bdd9811b958fb52554ee906ecc3f99b0da4bb | /app/src/main/java/com/jxkj/fit_5a/view/adapter/MineJinDouAdapter.java | e9b965cfea6d244c432cd8fdce7fb2eb4d906c9a | [] | no_license | ltg263/5AFit_12 | 19d29773b9f0152dbc88ccf186b2868af7648039 | a7d545ab37a456b42f30eb03d6a6c95efb5b0541 | refs/heads/master | 2023-07-15T20:46:19.465180 | 2021-08-17T09:59:57 | 2021-08-17T09:59:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,223 | java | package com.jxkj.fit_5a.view.adapter;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jxkj.fit_5a.R;
import com.jxkj.fit_5a.entity.WalletListBean;
import java.util.List;
/**
* author : LiuJie
* date : 2020/5/2914:03
*/
public class MineJinDouAdapter extends BaseQuickAdapter<WalletListBean.ListBean, BaseViewHolder> {
public MineJinDouAdapter(@Nullable List<WalletListBean.ListBean> data) {
super(R.layout.item_mine_jindou, data);
}
@Override
protected void convert(@NonNull BaseViewHolder helper, WalletListBean.ListBean item) {
helper.setText(R.id.tv_user,item.getRemark()).setText(R.id.tv_paymentTime,item.getPaymentTime())
.setText(R.id.tv_amount,item.getAmount().replace(".00","")).setText(R.id.tv_amount_dou,item.getAmount().replace(".00",""))
.setVisible(R.id.tv_amount_dou,false).setVisible(R.id.tv_amount,false);
if(item.getType().equals("1")){
helper.setVisible(R.id.tv_amount_dou,true);
}else{
helper.setVisible(R.id.tv_amount,true);
}
}
}
| [
"qzj842179561@gmail.com"
] | qzj842179561@gmail.com |
5f40b8cf51c7386dff093f77a3884206aefb60a8 | eab6a4ff9231bd4a22c3ddf69a2fbb9fd1d0904c | /app/src/main/java/com/d1540173108/hrz/view/bottomFrg/CameraBottomFrg.java | 9197e7a4e3e7abef4c68752467cb4fe1850d46d3 | [] | no_license | edcedc/ClDwsj | 4f5d4a7209445c60c81a9e660177039f3cd4b32b | 9f381bc162b64894602baeb03376dbd3b71859fe | refs/heads/master | 2020-05-31T22:25:57.110325 | 2019-12-24T03:31:40 | 2019-12-24T03:31:40 | 166,632,032 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,525 | java | package com.d1540173108.hrz.view.bottomFrg;
import android.view.View;
import com.d1540173108.hrz.R;
import com.d1540173108.hrz.base.BaseBottomSheetFrag;
/**
* 作者:yc on 2018/8/4.
* 邮箱:501807647@qq.com
* 版本:v1.0
* 打开相册或相机
*/
public class CameraBottomFrg extends BaseBottomSheetFrag implements View.OnClickListener{
@Override
public int bindLayout() {
return R.layout.p_camera;
}
@Override
public void initView(View view) {
view.findViewById(R.id.tv_cancel).setOnClickListener(this);
view.findViewById(R.id.tv_camera).setOnClickListener(this);
view.findViewById(R.id.tv_photo).setOnClickListener(this);
view.findViewById(R.id.layout).setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.tv_cancel:
case R.id.layout:
dismiss();
break;
case R.id.tv_camera:
if (listener != null){
listener.camera();
}
break;
case R.id.tv_photo:
if (listener != null){
listener.photo();
}
break;
}
}
private onCameraListener listener;
public void setCameraListener(onCameraListener listener){
this.listener = listener;
}
public interface onCameraListener{
void camera();
void photo();
}
}
| [
"501807647@qq.com"
] | 501807647@qq.com |
6c2deb7a8214107bdc6853c6ef71b754fe46799e | e79b82c678db5f548f8b0228f9ebb9736cb6bfa8 | /JBomber/src/pl/edu/pw/elka/home/sjablon1/view/event/enemy/EnemyDieEvent.java | 2c4dad77e232018d73a6be51fc841f9029b6f27d | [] | no_license | veldrinlab/veldrinlabProjects | 5988822986271c53323d6d79af7a89c32e7ec6ba | 46992f5c7cc77b4fba3c3078dc444cf9fb49fcc0 | refs/heads/master | 2021-01-10T19:25:43.145557 | 2013-09-18T16:05:06 | 2013-09-18T16:05:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package pl.edu.pw.elka.home.sjablon1.view.event.enemy;
import pl.edu.pw.elka.home.sjablon1.view.event.*;
/**
* Class represents one of Enemy Event in Game - EnemyDie Event, which is
* fired when user Bomberman collides with Explosion and die. Every Events in
* JBomber extends GameEvent class.
* @version 1.0
*/
public class EnemyDieEvent extends GameEvent
{
/**
* Default constructor of EnemyDieEvent
*
* @param source is object witch has generated event.
*/
public EnemyDieEvent(Object source)
{
super(source);
}
} | [
"="
] | = |
658c0bd34df2f029970e06b276ebe8e4b211a140 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/34/1230.java | 1bfdc08de5aa02c9d7260e6d3ab17a5dc45c0834 | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 597 | java | package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n; //???n
n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
int x; //??????x
x = n; //???x
for (;x != 1;) //x??1????????
{
if (x % 2 == 1) //????
{
System.out.print(x);
System.out.print("*3+1=");
x = x * 3 + 1;
System.out.print(x);
System.out.print('\n');
}
else //????
{
System.out.print(x);
System.out.print("/2=");
x = x / 2;
System.out.print(x);
System.out.print('\n');
}
}
System.out.print("End");
return 0; //?> w <?
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
6a813c8fbaa43426b13e77d0753f5e23a28964da | 684300b2a57ce3418a13e3f9a4717640044b1ee4 | /shop/src/main/java/com/xxzlkj/shop/weight/MyPagerTitleView.java | decb198e8c6c46ca634ac3a9f394043266f57662 | [] | no_license | leifeng1991/HYYL | 524d12466dca04d72c946ec6c38f3970b998a880 | 18354d4998ed4f0c27ce7e22d6941b238cb09537 | refs/heads/master | 2020-04-25T03:12:44.782366 | 2019-02-25T08:46:08 | 2019-02-25T08:46:08 | 172,467,651 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,702 | java | package com.xxzlkj.shop.weight;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.xxzlkj.shop.R;
import net.lucode.hackware.magicindicator.buildins.UIUtil;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IMeasurablePagerTitleView;
/**
* 描述:
*
* @author zhangrq
* 2017/6/30 9:24
*/
public class MyPagerTitleView extends RelativeLayout implements IMeasurablePagerTitleView {
private ImageView imageView;
private TextView textView;
protected int mSelectedColor;
protected int mNormalColor;
public MyPagerTitleView(Context context) {
super(context);
init(context);
}
private void init(Context context) {
View rootView = View.inflate(context, R.layout.item_shop_home_top, null);
imageView = (ImageView) rootView.findViewById(R.id.iv_icon);
textView = (TextView) rootView.findViewById(R.id.tv_title);
addView(rootView, new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT));
int padding = UIUtil.dip2px(context, 10.0D);
this.setPadding(padding, 0, padding, 0);
}
@Override
public int getContentLeft() {
return this.getLeft();
}
@Override
public int getContentTop() {
return getTop();
}
@Override
public int getContentRight() {
return getRight();
}
@Override
public int getContentBottom() {
return getHeight();
}
@Override
public void onSelected(int i, int i1) {
textView.setTextColor(this.mSelectedColor);
}
@Override
public void onDeselected(int i, int i1) {
textView.setTextColor(this.mNormalColor);
}
@Override
public void onLeave(int i, int i1, float v, boolean b) {
}
@Override
public void onEnter(int i, int i1, float v, boolean b) {
}
public int getSelectedColor() {
return mSelectedColor;
}
public void setSelectedColor(int mSelectedColor) {
this.mSelectedColor = mSelectedColor;
}
public int getNormalColor() {
return mNormalColor;
}
public void setNormalColor(int mNormalColor) {
this.mNormalColor = mNormalColor;
}
public ImageView getImageView() {
return imageView;
}
public void setImageView(ImageView imageView) {
this.imageView = imageView;
}
public TextView getTextView() {
return textView;
}
public void setTextView(TextView textView) {
this.textView = textView;
}
}
| [
"15036833790@163.com"
] | 15036833790@163.com |
52e139333f0828b7647f9704237d9d2161878767 | cc6243837f70bd001af3905efc345ec210bd6e76 | /javalib/src/main/java/com/bhargavaroyal/javalib/designpattern/behavioral/strategy/StrategyPatternDemo.java | 2e9bec2dcdce6af688a31762dad707f3c5fa7cb5 | [] | 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 | 511 | java | package com.bhargavaroyal.javalib.designpattern.behavioral.strategy;
public class StrategyPatternDemo {
public static void main(String[] args) {
Context context = new Context(new OperationAdd());
System.out.println("10 + 5 = " + context.executeStrategy(10, 5));
context = new Context(new OperationSubstract());
System.out.println("10 - 5 = " + context.executeStrategy(10, 5));
context = new Context(new OperationMultiply());
System.out.println("10 * 5 = " + context.executeStrategy(10, 5));
}
} | [
"bhargavaroyal@gmail.com"
] | bhargavaroyal@gmail.com |
252d9204acfc3b2ca9bfb655a26b8add22623cac | a5a7c6814a41bc3d74c59072eb739cad8a714b33 | /src/main/src/com/sun/org/apache/bcel/internal/generic/DASTORE.java | 236641f5b496fb726e8926b2e198b1c0da33aece | [
"Apache-2.0"
] | permissive | as543343879/myReadBook | 3dcbbf739c184a84b32232373708c73db482f352 | 5f3af76e58357a0b2b78cc7e760c1676fe19414b | refs/heads/master | 2023-09-01T16:09:21.287327 | 2023-08-23T06:44:46 | 2023-08-23T06:44:46 | 139,959,385 | 3 | 3 | Apache-2.0 | 2023-06-14T22:31:32 | 2018-07-06T08:54:15 | Java | UTF-8 | Java | false | false | 3,762 | java | /*
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.org.apache.bcel.internal.generic;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache BCEL" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache BCEL", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/**
* DASTORE - Store into double array
* <PRE>Stack: ..., arrayref, index, value.word1, value.word2 -> ...</PRE>
*
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
*/
public class DASTORE extends ArrayInstruction implements StackConsumer {
/** Store double into array
*/
public DASTORE() {
super(com.sun.org.apache.bcel.internal.Constants.DASTORE);
}
/**
* Call corresponding visitor method(s). The order is:
* Call visitor methods of implemented interfaces first, then
* call methods according to the class hierarchy in descending order,
* i.e., the most specific visitXXX() call comes last.
*
* @param v Visitor object
*/
public void accept(Visitor v) {
v.visitStackConsumer(this);
v.visitExceptionThrower(this);
v.visitTypedInstruction(this);
v.visitArrayInstruction(this);
v.visitDASTORE(this);
}
}
| [
"543343879@qq.com"
] | 543343879@qq.com |
ef693845bd7dcf08f859932db7056a13d788c28b | f00328d9009784fb6e38091c286119c3aaf2710b | /app/src/main/java/com/smg/variety/db/SeachHistotyDBUtil.java | ac026f3eec467cae9f3c7d96a0d078bc0dddcf4e | [] | no_license | Meikostar/VarietyMall | 449b934d0c64b3156391bb19096e2ba6fbd90031 | b49202dec4d32f7983c640d933ec08991990d8f2 | refs/heads/master | 2022-07-31T06:32:25.629162 | 2020-05-25T08:36:25 | 2020-05-25T08:36:25 | 259,245,644 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,363 | java | package com.smg.variety.db;
import com.smg.variety.db.bean.SearchHistory;
import com.smg.variety.db.greendao.gen.SearchHistoryDao;
import java.util.List;
/**
* desc:
* last modified time:2018/8/21 17:20
*
* @author dahai.zhou
* @since 2018/8/21
*/
public class SeachHistotyDBUtil {
private static final byte[] slnstanceLock = new byte[0];
private static SeachHistotyDBUtil mInstance;
private SearchHistoryDao searchHistoryDao ;
private SeachHistotyDBUtil(){
searchHistoryDao = DaoManager.getInstance().getDaoSession().getSearchHistoryDao();
}
public static SeachHistotyDBUtil getInstance(){
if(mInstance == null){
synchronized (slnstanceLock) {
mInstance = new SeachHistotyDBUtil();
}
}
return mInstance;
}
public List<SearchHistory> loadAll(){
return searchHistoryDao.loadAll();
}
public void deleteAll(){
searchHistoryDao.deleteAll();
}
public void delete(SearchHistory searchHistory){
searchHistoryDao.delete(searchHistory);
}
public void save(SearchHistory searchHistory) {
searchHistoryDao.save(searchHistory);
}
public SearchHistory query(String key){
return searchHistoryDao.queryBuilder().where(SearchHistoryDao.Properties.Name.eq(key)).build().unique();
}
}
| [
"18166036747@163.com"
] | 18166036747@163.com |
a825be1146d2c0b4cbd492d5928788367307b860 | add1d65912b52683ea36dd8c180a1146b1509554 | /src/main/java/com/springboot/demo/util/Xml2Json.java | 985cd5130a035b2d4244eb11289a2b016ad4380f | [] | no_license | lixing888/springBootDemo | 2031affe267eb54a1089ae422149bf0b04771ec4 | 1f1ea895941e22b285f4ed8351ebd3533f06ee5d | refs/heads/master | 2022-12-05T15:28:49.568788 | 2021-08-20T14:23:09 | 2021-08-20T14:23:09 | 166,974,097 | 2 | 1 | null | 2022-11-16T11:34:43 | 2019-01-22T10:23:51 | Java | UTF-8 | Java | false | false | 7,434 | java | package com.springboot.demo.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.dom4j.*;
import org.dom4j.io.SAXReader;
import java.io.File;
import java.io.FileInputStream;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.Iterator;
import java.util.List;
/**
* @program: springBootDemo
* @description: xml转json
* @author: lixing
* @create: 2020-12-07 15:54
**/
public class Xml2Json {
public static void main(String[] args) throws Exception {
// String xmlStr = readFile("D:/demo.xml");
// readStringXml(xmlStr);
// Document doc = DocumentHelper.parseText(xmlStr);
// JSONObject json = new JSONObject();
// dom4j2Json(doc.getRootElement(), json);
// System.out.println("xml2Json:" + json.toJSONString());
String xmlStr = readFile("D:/demo.xml");
Document document = DocumentHelper.parseText(xmlStr);
// JSONObject json = new JSONObject();
// dom4j2Json(doc.getRootElement(), json);
// System.out.println("xml2Json:" + json.toJSONString());
// 创建xml解析对象
SAXReader reader = new SAXReader();
// 得到xml的根节点(message)
Element root = document.getRootElement();
//定义子循环体的变量
Element ticket = null;
Iterator iterator = null;
for (iterator = root.element("YKFP").elementIterator(); iterator.hasNext(); ) {
ticket = (Element) iterator.next();
System.out.print("原发票号码" + ticket.attributeValue("原发票号码") + " ");
System.out.print("价税合计" + ticket.attributeValue("价税合计") + " ");
System.out.print("客户识别号" + ticket.attributeValue("客户识别号"));
System.out.print("发票状态" + ticket.attributeValue("发票状态") + " ");
System.out.print("票信息表编号" + ticket.attributeValue("票信息表编号") + " ");
System.out.print("作废人" + ticket.attributeValue("作废人"));
System.out.print("发票代码" + ticket.attributeValue("发票代码") + " ");
System.out.print("合计金额" + ticket.attributeValue("合计金额") + " ");
System.out.print("税额" + ticket.attributeValue("税额"));
System.out.print("清单标识" + ticket.attributeValue("清单标识") + " ");
System.out.print("开票日期" + ticket.attributeValue("开票日期") + " ");
System.out.print("开票人" + ticket.attributeValue("开票人"));
System.out.print("作废日期" + ticket.attributeValue("作废日期") + " ");
System.out.print("原发票代码" + ticket.attributeValue("原发票代码") + " ");
System.out.print("上传状态" + ticket.attributeValue("上传状态"));
System.out.print("发票号码" + ticket.attributeValue("发票号码") + " ");
System.out.print("发票类型" + ticket.attributeValue("发票类型") + " ");
System.out.print("开票人" + ticket.attributeValue("开票人"));
System.out.println("客户名称" + ticket.attributeValue("客户名称"));
}
}
public static String readFile(String path) throws Exception {
File file = new File(path);
FileInputStream fis = new FileInputStream(file);
FileChannel fc = fis.getChannel();
ByteBuffer bb = ByteBuffer.allocate(new Long(file.length()).intValue());
//fc向buffer中读入数据
fc.read(bb);
bb.flip();
String str = new String(bb.array(), "GB2312");
fc.close();
fis.close();
return str;
}
/**
* xml转json
*
* @param xmlStr
* @return
* @throws DocumentException
*/
public static JSONObject xml2Json(String xmlStr) throws DocumentException {
Document doc = DocumentHelper.parseText(xmlStr);
JSONObject json = new JSONObject();
dom4j2Json(doc.getRootElement(), json);
return json;
}
/**
* xml转json
*
* @param element
* @param json
*/
public static void dom4j2Json(Element element, JSONObject json) {
//如果是属性
for (Object o : element.attributes()) {
Attribute attr = (Attribute) o;
if (!isEmpty(attr.getValue())) {
json.put("@" + attr.getName(), attr.getValue());
}
}
List<Element> chdEl = element.elements();
//如果没有子元素,只有一个值
if (chdEl.isEmpty() && !isEmpty(element.getText())) {
json.put(element.getName(), element.getText());
}
//有子元素
for (Element e : chdEl) {
//子元素也有子元素
if (!e.elements().isEmpty()) {
JSONObject chdjson = new JSONObject();
dom4j2Json(e, chdjson);
Object o = json.get(e.getName());
if (o != null) {
JSONArray jsona = null;
//如果此元素已存在,则转为jsonArray
if (o instanceof JSONObject) {
JSONObject jsono = (JSONObject) o;
json.remove(e.getName());
jsona = new JSONArray();
jsona.add(jsono);
jsona.add(chdjson);
}
if (o instanceof JSONArray) {
jsona = (JSONArray) o;
jsona.add(chdjson);
}
json.put(e.getName(), jsona);
} else {
if (!chdjson.isEmpty()) {
json.put(e.getName(), chdjson);
}
}
} else {//子元素没有子元素
for (Object o : element.attributes()) {
Attribute attr = (Attribute) o;
if (!isEmpty(attr.getValue())) {
json.put("@" + attr.getName(), attr.getValue());
}
}
if (!e.getText().isEmpty()) {
json.put(e.getName(), e.getText());
}
}
}
}
public static boolean isEmpty(String str) {
if (str == null || str.trim().isEmpty() || "null".equals(str)) {
return true;
}
return false;
}
public static void readStringXml(String xml) {
Document doc = null;
try {
doc = DocumentHelper.parseText(xml); // 将字符串转为XML
Element rootElt = doc.getRootElement(); // 获取根节点
System.out.println("根节点:" + rootElt.getName()); // 拿到根节点的名称
Iterator iter = rootElt.elementIterator("YKFP"); // 获取根节点下的子节点head
// 遍历head节点
while (iter.hasNext()) {
Element recordEle = (Element) iter.next();
String title = recordEle.elementTextTrim("Row"); // 拿到head节点下的子节点title值
System.out.println("客户识别号:" + title);
}
} catch (DocumentException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"85210279@qq.com"
] | 85210279@qq.com |
d45a58b4b175be4294b56665ab3ac789201b7d35 | 9e3e47ad4d090f1f29a15618a7909213f2b9628c | /APICloudModuleSDK/moduleDemo/src/main/java/com/apicloud/moduleDemo/util/PopDataUtil.java | fb1b617d43c6f37acfb35b1ba7295384ec62191a | [] | no_license | fuqingming/APICloud-SJT | 7d1bd788dbbf82d10ebbe85d586438e51f1fc280 | 6a101e7d43db704b62c3dd7ad3b8e1e82762e33c | refs/heads/master | 2020-03-17T02:37:58.049915 | 2018-06-06T06:56:06 | 2018-06-06T06:56:06 | 133,198,332 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,790 | java | package com.apicloud.moduleDemo.util;
import android.app.Activity;
import com.apicloud.moduleDemo.bean.base.MoneyMakingHallTypeBean;
import java.util.ArrayList;
import java.util.List;
/**
* Created by vip on 2018/5/18.
*/
public class PopDataUtil
{
public static List<MoneyMakingHallTypeBean> initOrderByData()
{
List<MoneyMakingHallTypeBean> m_arrAllType = new ArrayList<>();
m_arrAllType.add(new MoneyMakingHallTypeBean("","智能排序"));
m_arrAllType.add(new MoneyMakingHallTypeBean("id_1","最新"));
m_arrAllType.add(new MoneyMakingHallTypeBean("personnelAmount_id_1","金额由小到大"));
m_arrAllType.add(new MoneyMakingHallTypeBean("personnelAmount_1_id_1","金额由大到小"));
return m_arrAllType;
}
public static List<MoneyMakingHallTypeBean> initOrderByDatas()
{
List<MoneyMakingHallTypeBean> m_arrAllType = new ArrayList<>();
m_arrAllType.add(new MoneyMakingHallTypeBean("","智能排序"));
m_arrAllType.add(new MoneyMakingHallTypeBean("id_1","最新"));
m_arrAllType.add(new MoneyMakingHallTypeBean("guaranteeAmount_id_1","金额由小到大"));
m_arrAllType.add(new MoneyMakingHallTypeBean("guaranteeAmount_1_id_1","金额由大到小"));
return m_arrAllType;
}
public static List<MoneyMakingHallTypeBean> initOrderByAmountData()
{
List<MoneyMakingHallTypeBean> m_arrAllType = new ArrayList<>();
m_arrAllType.add(new MoneyMakingHallTypeBean("","全部"));
m_arrAllType.add(new MoneyMakingHallTypeBean("0","0-500"));
m_arrAllType.add(new MoneyMakingHallTypeBean("500","501-1000"));
m_arrAllType.add(new MoneyMakingHallTypeBean("1000","大于1001"));
return m_arrAllType;
}
}
| [
"3024097031@qq.com"
] | 3024097031@qq.com |
9b96c6abb3bfa84986fc2d1ec4876288701e8877 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Cli-34/org.apache.commons.cli.Option/BBC-F0-opt-50/2/org/apache/commons/cli/Option_ESTest_scaffolding.java | a6f227c713be1b02c25b56622ed41ecdd3f2787c | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 3,253 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Oct 13 14:22:15 GMT 2021
*/
package org.apache.commons.cli;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class Option_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.cli.Option";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Option_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.cli.OptionValidator",
"org.apache.commons.cli.Option"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Option_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.cli.Option",
"org.apache.commons.cli.OptionValidator"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
636804af2bd0eb3bf0a74d0bcf7c8ce13d3a9cae | 901a1474f4fc9f2d71ab5698b016a1882dd0ccb1 | /src/main/java/nc/render/tile/RenderSpin.java | 41fa38b5f1f1d6a83d7d74baa16dcdb9a83f8a8e | [
"CC0-1.0"
] | permissive | Valagraven/NuclearCraft | 2003479f69b67e2dfe6ab671cd889b4d6fa27cad | 67d5edea3a142f712adeb97c44d25c8242b0864d | refs/heads/master | 2021-05-17T00:04:52.235491 | 2020-03-27T05:30:24 | 2020-03-27T05:30:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,800 | java | package nc.render.tile;
import org.lwjgl.opengl.GL11;
import nc.Global;
import nc.block.tile.quantum.BlockSpin;
import nc.tile.quantum.TileSpin;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.common.model.TRSRTransformation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderSpin extends TileEntitySpecialRenderer<TileSpin> {
private static final Minecraft MC = Minecraft.getMinecraft();
private IModel modelAmbient, modelUp, modelDown;
private IBakedModel bakedModelAmbient, bakedModelUp, bakedModelDown;
@Override
public void render(TileSpin te, double posX, double posY, double posZ, float partialTicks, int destroyStage, float alpha) {
if(!(te.getBlockType() instanceof BlockSpin)) return;
GlStateManager.pushAttrib();
GlStateManager.pushMatrix();
GlStateManager.translate(posX, posY, posZ);
if (te.isMeasured()) {
if (te.measuredSpin > 0.49D && te.measuredSpin < 0.51D) renderUp(te);
else renderDown(te);
}
else renderAmbient(te);
GlStateManager.popMatrix();
GlStateManager.popAttrib();
}
private IBakedModel getBakedModelAmbient() {
if (bakedModelAmbient == null) {
try {
modelAmbient = ModelLoaderRegistry.getModel(new ResourceLocation(Global.MOD_ID, "block/spin"));
} catch (Exception e) {
throw new RuntimeException(e);
}
bakedModelAmbient = modelAmbient.bake(TRSRTransformation.identity(), DefaultVertexFormats.ITEM, location -> MC.getTextureMapBlocks().getAtlasSprite(location.toString()));
}
return bakedModelAmbient;
}
private IBakedModel getBakedModelUp() {
if (bakedModelUp == null) {
try {
modelUp = ModelLoaderRegistry.getModel(new ResourceLocation(Global.MOD_ID, "block/spin_up"));
} catch (Exception e) {
throw new RuntimeException(e);
}
bakedModelUp = modelUp.bake(TRSRTransformation.identity(), DefaultVertexFormats.ITEM, location -> MC.getTextureMapBlocks().getAtlasSprite(location.toString()));
}
return bakedModelUp;
}
private IBakedModel getBakedModelDown() {
if (bakedModelDown == null) {
try {
modelDown = ModelLoaderRegistry.getModel(new ResourceLocation(Global.MOD_ID, "block/spin_down"));
} catch (Exception e) {
throw new RuntimeException(e);
}
bakedModelDown = modelDown.bake(TRSRTransformation.identity(), DefaultVertexFormats.ITEM, location -> MC.getTextureMapBlocks().getAtlasSprite(location.toString()));
}
return bakedModelDown;
}
private void renderAmbient(TileSpin te) {
GlStateManager.pushAttrib();
GlStateManager.pushMatrix();
RenderHelper.disableStandardItemLighting();
bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
World world = getWorld();
GlStateManager.translate(-te.getPos().getX(), -te.getPos().getY(), -te.getPos().getZ());
Tessellator tessellator = Tessellator.getInstance();
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
MC.getBlockRendererDispatcher().getBlockModelRenderer().renderModel(
world,
getBakedModelAmbient(),
world.getBlockState(te.getPos()),
te.getPos(),
Tessellator.getInstance().getBuffer(), false);
tessellator.draw();
RenderHelper.enableStandardItemLighting();
GlStateManager.translate(te.getPos().getX(), te.getPos().getY(), te.getPos().getZ());
GlStateManager.popMatrix();
GlStateManager.popAttrib();
}
private void renderUp(TileSpin te) {
GlStateManager.pushAttrib();
GlStateManager.pushMatrix();
RenderHelper.disableStandardItemLighting();
bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
World world = getWorld();
GlStateManager.translate(-te.getPos().getX(), -te.getPos().getY(), -te.getPos().getZ());
Tessellator tessellator = Tessellator.getInstance();
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
MC.getBlockRendererDispatcher().getBlockModelRenderer().renderModel(
world,
getBakedModelUp(),
world.getBlockState(te.getPos()),
te.getPos(),
Tessellator.getInstance().getBuffer(), false);
tessellator.draw();
RenderHelper.enableStandardItemLighting();
GlStateManager.translate(te.getPos().getX(), te.getPos().getY(), te.getPos().getZ());
GlStateManager.popMatrix();
GlStateManager.popAttrib();
}
private void renderDown(TileSpin te) {
GlStateManager.pushAttrib();
GlStateManager.pushMatrix();
RenderHelper.disableStandardItemLighting();
bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
World world = getWorld();
GlStateManager.translate(-te.getPos().getX(), -te.getPos().getY(), -te.getPos().getZ());
Tessellator tessellator = Tessellator.getInstance();
tessellator.getBuffer().begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
MC.getBlockRendererDispatcher().getBlockModelRenderer().renderModel(
world,
getBakedModelDown(),
world.getBlockState(te.getPos()),
te.getPos(),
Tessellator.getInstance().getBuffer(), false);
tessellator.draw();
RenderHelper.enableStandardItemLighting();
GlStateManager.translate(te.getPos().getX(), te.getPos().getY(), te.getPos().getZ());
GlStateManager.popMatrix();
GlStateManager.popAttrib();
}
} | [
"joedodd35@gmail.com"
] | joedodd35@gmail.com |
b89c1c63562257f59be34edd7862e7a44974148f | de6b03d812bc011b18cb652863568fe35933a8e0 | /src/main/java/org/support/project/knowledge/logic/activity/AbstractAddPointForCommentProcessor.java | 55bf571d11ceeeee2391bc9080f0e78f7fc9e340 | [
"Apache-2.0"
] | permissive | support-project/knowledge | e53a51b276ad9787cc44c136811ad027163ab12c | bee4efe436eb3798cb546a60b948ebd8f7907ec0 | refs/heads/v1 | 2023-08-15T00:08:45.372764 | 2018-07-22T02:49:21 | 2018-07-22T02:49:21 | 28,609,126 | 790 | 295 | Apache-2.0 | 2022-09-08T00:38:37 | 2014-12-29T22:44:55 | Java | UTF-8 | Java | false | false | 5,071 | java | package org.support.project.knowledge.logic.activity;
import org.support.project.aop.Aspect;
import org.support.project.common.log.Log;
import org.support.project.common.log.LogFactory;
import org.support.project.di.DI;
import org.support.project.di.Instance;
import org.support.project.knowledge.dao.KnowledgesDao;
import org.support.project.knowledge.entity.ActivitiesEntity;
import org.support.project.knowledge.entity.CommentsEntity;
import org.support.project.knowledge.entity.KnowledgesEntity;
@DI(instance = Instance.Prototype)
public abstract class AbstractAddPointForCommentProcessor extends AbstractActivityProcessor {
private static final Log LOG = LogFactory.getLog(AbstractAddPointForCommentProcessor.class);
private CommentsEntity comment;
private KnowledgesEntity parentKnowledge;
/**
* @return the comment
*/
public CommentsEntity getComment() {
return comment;
}
/**
* @param comment the comment to set
*/
public void setComment(CommentsEntity comment) {
this.comment = comment;
this.parentKnowledge = KnowledgesDao.get().selectOnKey(getComment().getKnowledgeId());
}
public KnowledgesEntity getParentKnowledge() {
return parentKnowledge;
}
protected abstract Activity getActivity();
protected abstract TypeAndPoint getTypeAndPointForActivityExecuter();
protected abstract TypeAndPoint getTypeAndPointForCommentOwner();
protected abstract TypeAndPoint getTypeAndPointForKnowledge();
@Override
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
public void execute() throws Exception {
if (getComment() == null || eventUser == null) {
// ありえないけど念のため確認
return;
}
if (isExistsActivity(eventUser.getUserId(), getActivity(), String.valueOf(getComment().getCommentNo()))) {
LOG.debug("This activity is already exists. [Activity]" + getActivity().toString() + " [user]" + eventUser.getUserId()
+ " [comment]" + getComment().getCommentNo());
return;
}
if (parentKnowledge == null) {
LOG.debug("Knowledge is not found. [comment] " + getComment().getCommentNo() + " [knowledge]" + getComment().getKnowledgeId());
return;
}
TypeAndPoint exec = getTypeAndPointForActivityExecuter();
TypeAndPoint owner = getTypeAndPointForCommentOwner();
TypeAndPoint knowledge = getTypeAndPointForKnowledge();
if (exec == null && owner == null && knowledge == null) {
// ポイントをつける対象が無いので、処理終了
LOG.debug("This activity is not add point. [Activity]" + getActivity().toString() + " [user]" + eventUser.getUserId()
+ " [comment]" + getComment().getCommentNo());
return;
}
LOG.debug("activity process started. [Activity]" + getActivity().toString() + " [user]" + eventUser.getUserId()
+ " [comment]" + getComment().getCommentNo());
StringBuilder logmsg = new StringBuilder();
logmsg.append("Activity : " + getActivity().toString());
// ポイント発行アクティビティを生成
ActivitiesEntity activity = addActivity(
getActivity(),
String.valueOf(getComment().getCommentNo()));
// 実行したユーザのポイントアップ
if (exec != null) {
int point = addPointForUser(
eventUser.getUserId(), // ターゲットは、実行したユーザ
activity.getActivityNo(),
exec.type,
exec.point);
logmsg.append("\n\tAdd event user: [id]" + eventUser.getUserId() + " [type]" + exec.type + " [add]" + exec.point + " [result]" + point);
}
// コメントの登録者のポイントをアップ
if (owner != null) {
int point = addPointForUser(
getComment().getInsertUser(), // ターゲットは登録者
activity.getActivityNo(),
owner.type,
owner.point);
logmsg.append("\n\tAdd owner user: [id]" + getComment().getInsertUser() + " [type]" + owner.type + " [add]" + owner.point + " [result]" + point);
}
// 記事のポイントアップ(コメントにはポイントをもっていないので、親のナレッジのポイントをアップ)
if (knowledge != null) {
int point = addPointForKnowledge(
parentKnowledge.getKnowledgeId(),
activity.getActivityNo(),
knowledge.type,
knowledge.point);
logmsg.append("\n\tAdd knowledge: [id]" + parentKnowledge.getKnowledgeId() + " [type]" + knowledge.type + " [add]" + knowledge.point + " [result]" + point);
}
LOG.debug(logmsg.toString());
}
}
| [
"koda.masaru3@gmail.com"
] | koda.masaru3@gmail.com |
86bf55979724b12b5cd31622a79f2a38d2605551 | b111b77f2729c030ce78096ea2273691b9b63749 | /db-example-large-multi-project/project22/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project22/p114/Test2294.java | 329b2cba7ba4160e3d7f8f6a0b886b679ae08b19 | [] | no_license | WeilerWebServices/Gradle | a1a55bdb0dd39240787adf9241289e52f593ccc1 | 6ab6192439f891256a10d9b60f3073cab110b2be | refs/heads/master | 2023-01-19T16:48:09.415529 | 2020-11-28T13:28:40 | 2020-11-28T13:28:40 | 256,249,773 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,556 | java | package org.gradle.test.performance.mediumjavamultiproject.project22.p114;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test2294 {
Production2294 objectUnderTest = new Production2294();
@Test
public void testProperty0() throws Exception {
String value = "value";
objectUnderTest.setProperty0(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() throws Exception {
String value = "value";
objectUnderTest.setProperty1(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() throws Exception {
String value = "value";
objectUnderTest.setProperty2(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() throws Exception {
String value = "value";
objectUnderTest.setProperty3(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() throws Exception {
String value = "value";
objectUnderTest.setProperty4(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() throws Exception {
String value = "value";
objectUnderTest.setProperty5(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() throws Exception {
String value = "value";
objectUnderTest.setProperty6(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() throws Exception {
String value = "value";
objectUnderTest.setProperty7(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() throws Exception {
String value = "value";
objectUnderTest.setProperty8(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() throws Exception {
String value = "value";
objectUnderTest.setProperty9(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty9());
}
} | [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
73ef127494ae4477fed9de86d0dcdee8de1d7d39 | 78f7fd54a94c334ec56f27451688858662e1495e | /prrws/src/main/java/com/itgrids/dao/IRwsDistrictDAO.java | 471e26d2116690ddf2d8c4ca4152eff2a6b5abc9 | [] | no_license | hymanath/PA | 2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef | d166bf434601f0fbe45af02064c94954f6326fd7 | refs/heads/master | 2021-09-12T09:06:37.814523 | 2018-04-13T20:13:59 | 2018-04-13T20:13:59 | 129,496,146 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 304 | java | package com.itgrids.dao;
import java.util.List;
import org.appfuse.dao.GenericDao;
import com.itgrids.model.RwsDistrict;
public interface IRwsDistrictDAO extends GenericDao<RwsDistrict, Long> {
public String getRwsCode(Long districtId);
public List<Object[]> getAllDistricts();
}
| [
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] | itgrids@b17b186f-d863-de11-8533-00e0815b4126 |
137ed4750c912da6b1f825cc284d6115244d1037 | d22d04d8764afa7d3d25e8d3853a302b550350a7 | /HelloProjet/src/Main.java | 46835c0c6f5d3d64d951f36e51648224ed71c034 | [] | no_license | niepengpengjava/java-GIT | a6884bfa69e686bc344c46430acce649eec44035 | d810c56ceb929f70e04fd767b7e0478a7b1f1577 | refs/heads/master | 2020-06-27T04:38:05.356543 | 2019-07-31T13:07:29 | 2019-07-31T13:07:29 | 199,845,833 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 208 | java | import org.junit.Test;
public class Main {
@Test
public void testHelloWrold() {
System.out.println("HelloWorld!");
System.out.println("лл");
System.out.println("HelloJava!!!")
}
}
| [
"root"
] | root |
d58f0673833692bd48b67760ab79ca0c81992c18 | bea4f5482dcba171375e95477195f10b58682d98 | /src/com/bloom/realtime/components/FlowComponent.java | 2074a83fab68c29b2530ef6bb6f48131e6cf6fd0 | [] | no_license | keaneyang/BSP | 02dacded57fb32aa52222cbaf1b4aab5cd07ce8c | 7435bf80f161a9df5591bee0a5dca8123de1cb5b | refs/heads/master | 2020-12-31T02:32:42.844299 | 2016-08-07T08:07:36 | 2016-08-07T08:07:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,382 | java | package com.bloom.runtime.components;
import com.bloom.appmanager.NodeManager;
import com.bloom.exceptionhandling.ExceptionType;
import com.bloom.runtime.ActionType;
import com.bloom.runtime.BaseServer;
import com.bloom.runtime.ExceptionEvent;
import com.bloom.runtime.channels.Channel;
import com.bloom.runtime.containers.TaskEvent;
import com.bloom.runtime.meta.MetaInfo;
import com.bloom.runtime.meta.MetaInfo.Flow;
import com.bloom.runtime.meta.MetaInfo.MetaObject;
import com.bloom.runtime.meta.MetaInfo.MetaObjectInfo;
import com.bloom.uuid.UUID;
import com.bloom.recovery.Position;
import com.bloom.runtime.containers.WAEvent;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
public abstract class FlowComponent
extends MonitorableComponent
implements IFlowComponent
{
private static Logger logger = Logger.getLogger(FlowComponent.class);
private final BaseServer srv;
private final MetaInfo.MetaObject info;
private Flow flow;
private NodeManager nodeManager;
public FlowComponent(BaseServer srv, MetaInfo.MetaObject info)
{
this.srv = srv;
this.info = info;
}
public void setFlow(Flow f)
{
this.flow = f;
}
public Flow getFlow()
{
return this.flow;
}
public Flow getTopLevelFlow()
{
if (this.flow == null) {
return null;
}
if (this.flow.getFlow() == null) {
return this.flow;
}
return this.flow.getTopLevelFlow();
}
public boolean recoveryIsEnabled()
{
Flow f = getTopLevelFlow();
if (f == null) {
return false;
}
return f.recoveryIsEnabled();
}
public boolean isFlowInError()
{
if (this.nodeManager == null)
{
Flow topLevelflow = getTopLevelFlow();
if (topLevelflow == null) {
return false;
}
this.nodeManager = topLevelflow.getNodeManager();
if (this.nodeManager == null) {
return false;
}
}
return this.nodeManager.isError();
}
public abstract void close()
throws Exception;
public MetaInfo.MetaObject getMetaInfo()
{
return this.info;
}
public MetaInfo.MetaObjectInfo getMetaObjectInfo()
{
return getMetaInfo().makeMetaObjectInfo();
}
public EntityType getMetaType()
{
return getMetaInfo().getType();
}
public UUID getMetaID()
{
return getMetaInfo().getUuid();
}
public String getMetaName()
{
return getMetaInfo().getName();
}
public String getMetaNsName()
{
return getMetaInfo().getNsName();
}
public String getMetaFullName()
{
return getMetaInfo().getFullName();
}
public String getMetaUri()
{
return getMetaInfo().getUri();
}
public List<UUID> getMetaDependencies()
{
return getMetaInfo().getDependencies();
}
public String metaToString()
{
return getMetaInfo().metaToString();
}
public Position getCheckpoint()
{
return null;
}
public BaseServer srv()
{
return this.srv;
}
public void notifyAppMgr(EntityType entityType, String entityName, UUID entityId, Exception exception, String relatedActivity, Object... relatedObjects)
{
logger.warn("received exception from :" + entityType + ", of exception type : " + exception.getClass().getCanonicalName());
ExceptionEvent ee = new ExceptionEvent();
Flow topLevelFlow = getTopLevelFlow();
if (topLevelFlow == null) {
return;
}
MetaInfo.Flow app = (MetaInfo.Flow)topLevelFlow.getMetaInfo();
ee.setAppid(app.uuid);
ee.setType(ExceptionType.getExceptionType(exception));
ee.setEntityType(entityType);
ee.setClassName(exception.getClass().getName());
ee.setMessage(exception.getMessage());
ee.entityName = entityName;
ee.entityId = entityId;
ee.relatedActivity = relatedActivity;
ee.setRelatedObjects(relatedObjects);
ee.setAction(getUserRequestedActionForException(exception, ee.getType(), app.getEhandlers()));
if (logger.isInfoEnabled()) {
logger.info("exception event created :" + ee.toString());
}
publishException(ee);
if (getFlow().getNodeManager() != null) {
getFlow().getNodeManager().recvExceptionEvent(ee);
} else if (getFlow().getNodeManager() != null) {
getFlow().getNodeManager().recvExceptionEvent(ee);
} else if (getTopLevelFlow().getNodeManager() != null) {
getTopLevelFlow().getNodeManager().recvExceptionEvent(ee);
} else {
logger.warn("Failed to get app manager, so NOT notifying exception. ");
}
}
public ActionType getUserRequestedActionForException(Throwable ex, ExceptionType eType, Map<String, Object> ehandlers)
{
if ((ehandlers == null) || (ehandlers.isEmpty())) {
return getDefaultAction(ex);
}
for (String exceptionType : ehandlers.keySet()) {
if (eType.name().equalsIgnoreCase(exceptionType))
{
if (((String)ehandlers.get(exceptionType)).equalsIgnoreCase("stop")) {
return ActionType.STOP;
}
if (((String)ehandlers.get(exceptionType)).equalsIgnoreCase("crash")) {
return ActionType.CRASH;
}
return ActionType.IGNORE;
}
}
return getDefaultAction(ex);
}
private ActionType getDefaultAction(Throwable ex)
{
return ActionType.CRASH;
}
protected void publishException(ExceptionEvent event)
{
try
{
if (logger.isDebugEnabled()) {
logger.debug("publishing exception to exceptionStream.");
}
Stream exceptionStream = this.srv.getExceptionStream();
if (exceptionStream != null)
{
Channel channel = exceptionStream.getChannel();
if (channel != null)
{
if (logger.isDebugEnabled()) {
logger.debug("channel name :" + channel.getSubscribersCount() + ", channel:" + channel);
}
List<WAEvent> jsonBatch = new ArrayList();
jsonBatch.add(new WAEvent(event));
channel.publish(TaskEvent.createStreamEvent(jsonBatch));
logger.warn("channel to publish exceptions is not null and published to channel : " + channel.getSubscribersCount());
}
else
{
logger.warn("channel to publish exceptions is null.");
}
}
}
catch (Exception ex)
{
logger.error("Problem publishing exception event", ex);
}
}
}
| [
"theseusyang@gmail.com"
] | theseusyang@gmail.com |
9cc56ac379b0c3c46c8e48929725b336bc064d38 | 74b907699658f6301db682b9f85039de590fbaa7 | /app/src/main/java/com/yc/mugua/view/VideoFrg.java | e4bf701e558886a731dbd76f879ad7afe3ff0c48 | [] | no_license | edcedc/muguashipin | d06ee4691b2a2119c30da023d67cd31e17d9e279 | ff90df88a97c8ec059606a9c32912a1f36177b6b | refs/heads/master | 2020-06-19T02:46:45.212647 | 2019-09-28T07:27:27 | 2019-09-28T07:27:27 | 196,537,129 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 750 | java | package com.yc.mugua.view;
import android.os.Bundle;
import android.view.View;
import com.yc.mugua.R;
import com.yc.mugua.base.BaseFragment;
/**
* Created by Android Studio.
* User: ${edison}
* Date: 2019/7/21
* Time: 16:34
*/
public class VideoFrg extends BaseFragment {
public static VideoFrg newInstance() {
Bundle args = new Bundle();
VideoFrg fragment = new VideoFrg();
fragment.setArguments(args);
return fragment;
}
@Override
public void initPresenter() {
}
@Override
protected void initParms(Bundle bundle) {
}
@Override
protected int bindLayout() {
return R.layout.f_video;
}
@Override
protected void initView(View view) {
}
}
| [
"501807647@qq.com"
] | 501807647@qq.com |
49a1b57821f63d3370cacde9fcef214e7d151a81 | 2c42d04cba77776514bc15407cd02f6e9110b554 | /src/org/processmining/mining/organizationmining/ui/SimilarTaskPanel.java | 50ccb3f3f50f828ba77aebd3742d54097ed6517b | [] | no_license | pinkpaint/BPMNCheckingSoundness | 7a459b55283a0db39170c8449e1d262e7be21e11 | 48cc952d389ab17fc6407a956006bf2e05fac753 | refs/heads/master | 2021-01-10T06:17:58.632082 | 2015-06-22T14:58:16 | 2015-06-22T14:58:16 | 36,382,761 | 0 | 1 | null | 2015-06-14T10:15:32 | 2015-05-27T17:11:29 | null | UTF-8 | Java | false | false | 4,347 | java | package org.processmining.mining.organizationmining.ui;
import java.awt.GridBagLayout;
import java.util.ArrayList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import org.processmining.framework.util.GUIPropertyListEnumeration;
import org.processmining.mining.organizationmining.OrgMinerOptions;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author Minseok Song
* @version 1.0
*/
public class SimilarTaskPanel extends JPanel {
// private GuiPropertyListRadio doingSimilarTask;
private GUIPropertyListEnumeration doingSimilarTask;
private GridBagLayout gridBagLayout4 = new GridBagLayout();
private JRadioButton stEuclidianDistance = new JRadioButton();
private JRadioButton stCorrelationCoefficient = new JRadioButton();
private JRadioButton stSimilarityCoefficient = new JRadioButton();
private JRadioButton stHammingDistance = new JRadioButton();
public SimilarTaskPanel() {
init();
}
private void jbInit() throws Exception {
}
private void init() {
// ButtonGroup similarTaskGroup = new ButtonGroup();
// ----------- Similar task -----------------------------------
JPanel testPanel = new JPanel();
// testPanel.setLayout(new BoxLayout(testPanel, BoxLayout.PAGE_AXIS));
ArrayList<String> values = new ArrayList<String>();
values.add("Correlation coefficient");
values.add("Euclidian distance");
values.add("Similarity coefficient");
values.add("Hamming distance");
doingSimilarTask = new GUIPropertyListEnumeration("Doing Similar Task Options", values);
testPanel.add(doingSimilarTask.getPropertyPanel());
this.add(testPanel);
/*
* JPanel testPanel = new Panel(); // create parent panel <br>
* testPanel.setLayout(new BoxLayout(testPanel, BoxLayout.PAGE_AXIS)); <br>
* ArrayList<String> values = new ArrayList<String>();
* values.add("Male");
* values.add("Female");
* GUIPropertyListEnumeration gender = new GUIPropertyListEnumeration("Gender", values); <br>
* testPanel.add(gender.getPropertyPanel()); // add one property <br>
* return testPanel; <br>
*/
// this.add(doingSimilarTask.getPropertyPanel());
/*
this.setLayout(gridBagLayout4);
stEuclidianDistance.setText("Euclidian distance");
stCorrelationCoefficient.setText("Correlation coefficient");
stSimilarityCoefficient.setText("Similarity coefficient");
stHammingDistance.setText("Hamming distance");
stEuclidianDistance.setSelected(true);
this.add(stEuclidianDistance, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.add(stCorrelationCoefficient, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.add(stSimilarityCoefficient, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.add(stHammingDistance, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
similarTaskGroup.add(stEuclidianDistance);
similarTaskGroup.add(stCorrelationCoefficient);
similarTaskGroup.add(stSimilarityCoefficient);
similarTaskGroup.add(stHammingDistance);*/
}
public int getSimilarTaskSetting() {
String st = doingSimilarTask.getValue().toString();
System.out.println(st);
if(st.equals("Euclidian distance")) return OrgMinerOptions.EUCLIDIAN_DISTANCE;
else if (st.equals("Correlation coefficient")) return OrgMinerOptions.CORRELATION_COEFFICIENT;
else if (st.equals("Similarity coefficient")) return OrgMinerOptions.SIMILARITY_COEFFICIENT;
else return OrgMinerOptions.HAMMING_DISTANCE;
/* if (getEuclidianDistance())return OrgMinerOptions.EUCLIDIAN_DISTANCE;
else if (getCorrelationCoefficient())return OrgMinerOptions.CORRELATION_COEFFICIENT;
else if (getSimilarityCoefficient())return OrgMinerOptions.SIMILARITY_COEFFICIENT;
else return OrgMinerOptions.HAMMING_DISTANCE;*/
}
public boolean getEuclidianDistance() {
return stEuclidianDistance.isSelected();
}
public boolean getCorrelationCoefficient() {
return stCorrelationCoefficient.isSelected();
}
public boolean getSimilarityCoefficient() {
return stSimilarityCoefficient.isSelected();
}
}
| [
"pinkpaint.ict@gmail.com"
] | pinkpaint.ict@gmail.com |
32567644d05964175ab956e73585d5067012bcf6 | 400fa6f7950fcbc93f230559d649a7bfc50975fe | /src/com/jagex/OpenGlX3DTexture.java | b5d037d098516463163938ef121c8881123460af | [] | no_license | Rune-Status/Major--Renamed-839 | bd242a9b230c104a4021ec679e527fe752c27c4f | 0e9039aa22f7ecd0ebcf2473a4acb5e91f6c8f76 | refs/heads/master | 2021-07-15T08:58:15.963040 | 2017-10-22T20:14:35 | 2017-10-22T20:14:35 | 107,897,914 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.jagex;
import jaggl.OpenGL;
public class OpenGlX3DTexture extends OpenGlXTexture implements Native3DTexture {
int depth;
int width;
int height;
OpenGlX3DTexture(OpenGlXToolkit toolkit, Class121 class121, int width, int height, int depth, boolean mipmapped,
byte[] data) {
super(toolkit, 32879, class121, Class151.aClass151_2, width * height * depth, mipmapped);
this.width = width;
this.height = height;
this.depth = depth;
toolkit.method14689(this);
OpenGL.glPixelStorei(3317, 1);
OpenGL.glTexImage3Dub(target, 0, OpenGlXToolkit.method17357(aClass121_5266, aClass151_5267), width, height,
depth, 0, OpenGlXToolkit.method17363(aClass121_5266), 5121, data, 0);
OpenGL.glPixelStorei(3317, 4);
if (mipmapped) {
generateMipmaps();
}
}
@Override
public void method296(Class318 class318) {
super.method296(class318);
}
@Override
public void method301() {
super.method301();
}
@Override
public void deleteImmediately() {
super.deleteImmediately();
}
} | [
"iano2k4@hotmail.com"
] | iano2k4@hotmail.com |
d8bfa4f286af01619701b07eb553f58efff3c037 | f6ef1f50a476c3ed58b4f268feb6fb438996f06a | /有OJ/刷题指南(包含leetcode, POJ, PAT等)/hdu/h4002测试BigInteger.java | 5b94178f0b1bee5f650ecc916a54b206edc56533 | [] | no_license | February13/OJ_Guide | f9d6c72fc2863f5b6f3ad80b0d6c68b51f9a07db | a190942fae29a0dbee306adc81ee245be7fda44a | refs/heads/master | 2020-04-25T09:01:48.458939 | 2018-01-18T08:31:30 | 2018-01-18T08:31:30 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,427 | java | import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
public class h4002测试BigInteger {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
// int t = Integer.parseInt(scan.nextLine());
// BigInteger limit;
// for (int tt = 0; tt < t; tt++) {
// limit = scan.nextBigInteger();
BigInteger[] arr = new BigInteger[10001];
int[] arr2 = new int[1001];
for (int i = 2; i < 1000; i++)
if (arr2[i] == 0)
for (int j = 2; j * i <= 1000; j++)
arr2[i * j] = 1;
// 输出1000以内的素数
for (int i = 2; i < 1000; i++) {
if (arr2[i] == 0)
System.out.println(i);
}
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
int index = 0;
for (int i = 2; i < 1001; i++) {
if (arr2[i] == 0) {
arr[index] = BigInteger.valueOf(i);
index++;
}
}
// 输出前100个素数
BigInteger result = arr[0];
for (int k = 1; k <= 100; k++) {
System.out.println(arr[k]);
result = result.multiply(arr[k]);
}
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println();
System.out.println(result);
// }
}
}
| [
"you@example.com"
] | you@example.com |
f92b95d710fd3226cdb507084625de6007dcf25e | 754a0fdc13c70711b33a414e48f41333a7e8052d | /app/src/main/java/com/pbph/yuguo/dialog/CancelOrderPopWin.java | 8904ab7f77711a6acccd10fed2ed021fe42c1128 | [] | no_license | lianjf646/PbphYuGuo | b70b3315d9815af078101573066cbc215d46945c | 78e643cd1b0f142f96ce595fb0c5788b3e4bb09a | refs/heads/master | 2023-04-23T00:48:00.842462 | 2021-04-30T06:25:12 | 2021-04-30T06:25:12 | 363,044,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,178 | java | package com.pbph.yuguo.dialog;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.pbph.yuguo.R;
import com.pbph.yuguo.activity.OrderDetailActivity;
import com.pbph.yuguo.adapter.CancelReasonAdapter;
import com.pbph.yuguo.http.HttpAction;
import com.pbph.yuguo.myview.WaitUI;
import com.pbph.yuguo.observer.BaseObserver;
import com.pbph.yuguo.request.GetCancelOrderRequest;
import com.pbph.yuguo.util.PublicViewUtil;
import com.sobot.chat.utils.ToastUtil;
import java.util.ArrayList;
import java.util.List;
/**
* 取消订单弹出框
* Created by zyp on 2018/8/16 0016.
*/
public class CancelOrderPopWin extends PopupWindow {
private Context mContext;
private ImageView ivCancel;
private RelativeLayout rlContainer;
private TextView tvConfirm;
private GridView gvReasonList;
private CancelReasonAdapter adapter;
private int orderId;
private int type;
public CancelOrderPopWin(Context context, int orderId, int type) {
this.mContext = context;
this.orderId = orderId;
this.type = type;
init();
}
private void init() {
View view = View.inflate(mContext, R.layout.pop_win_cancel_order, null);
setContentView(view);
setOnDismissListener(() -> PublicViewUtil.backgroundAlpha((Activity) mContext, 1f));
initView(view);
initClick();
}
public void show(View view) {
setAnimationStyle(R.style.mypopwindow_anim_style);
setWidth(RelativeLayout.LayoutParams.MATCH_PARENT);
setHeight(RelativeLayout.LayoutParams.MATCH_PARENT);
setBackgroundDrawable(new ColorDrawable(0x00000000));
setFocusable(true);
setOutsideTouchable(true);
setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
showAtLocation(view, Gravity.BOTTOM, 0, 0);
PublicViewUtil.backgroundAlpha((Activity) mContext, 0.6f);
update();
setReasonItem();
}
private void initView(View view) {
TextView tiTitle = view.findViewById(R.id.tv_title);
ivCancel = view.findViewById(R.id.iv_cancel);
rlContainer = view.findViewById(R.id.rl_container);
gvReasonList = view.findViewById(R.id.gv_reason_list);
tvConfirm = view.findViewById(R.id.tv_confirm);
if (type == 2) {
tiTitle.setText("申请原因");
}
}
private void setReasonItem() {
List<String> list = new ArrayList<>();
list.add("不想买了");
list.add("无法签收");
list.add("重复购买");
list.add("其他原因");
gvReasonList.setVerticalSpacing(mContext.getResources().getDimensionPixelOffset(R.dimen.dp_20));
gvReasonList.setHorizontalSpacing(mContext.getResources().getDimensionPixelOffset(R.dimen.dp_20));
adapter = new CancelReasonAdapter(mContext, list);
gvReasonList.setAdapter(adapter);
}
private void initClick() {
ivCancel.setOnClickListener(v -> dismiss());
rlContainer.setOnClickListener(v -> dismiss());
gvReasonList.setOnItemClickListener((parent, view, position, id) -> {
adapter.setSelectItem(position);
});
tvConfirm.setOnClickListener(v -> {
String item = adapter.getReasonItem();
if (TextUtils.isEmpty(item)) {
if (type == 1) {
ToastUtil.showToast(mContext, "请选择取消原因");
} else {
ToastUtil.showToast(mContext, "请选择退款原因");
}
return;
}
WaitUI.Show(mContext);
GetCancelOrderRequest request = new GetCancelOrderRequest(orderId, item);
HttpAction.getInstance().cancelOrder(request).subscribe(new BaseObserver<>(mContext, response -> {
WaitUI.Cancel();
int code = response.getCode();
String msg = response.getMsg();
if (code == 200) {
if (mContext instanceof OrderDetailActivity) {
((OrderDetailActivity) mContext).cancelOrder();
}
if (type == 1) {
ToastUtil.showToast(mContext, "订单取消成功");
} else {
ToastUtil.showToast(mContext, "申请已提交,等待系统退款");
}
} else {
if (type == 1) {
ToastUtil.showToast(mContext, TextUtils.isEmpty(msg) ? "订单取消失败" : msg);
} else {
ToastUtil.showToast(mContext, TextUtils.isEmpty(msg) ? "申请退款失败" : msg);
}
}
dismiss();
}));
});
}
}
| [
"1548300188@qq.com"
] | 1548300188@qq.com |
6cb5159f7e8ffcb662f97c5eaeea73582a433c96 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/6/6_8509b11a869619a8deb8eb3d4ac0f68ef8d28599/PointsFragment/6_8509b11a869619a8deb8eb3d4ac0f68ef8d28599_PointsFragment_t.java | 2d742b8cb24554ffe441159f8417582557be0741 | [] | 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,890 | java | /*
* This file is part of OppiaMobile - http://oppia-mobile.org/
*
* OppiaMobile 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.
*
* OppiaMobile 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 OppiaMobile. If not, see <http://www.gnu.org/licenses/>.
*/
package org.digitalcampus.oppia.fragments;
import java.util.ArrayList;
import org.digitalcampus.mobile.learning.R;
import org.digitalcampus.oppia.adapter.PointsListAdapter;
import org.digitalcampus.oppia.application.MobileLearning;
import org.digitalcampus.oppia.listener.APIRequestListener;
import org.digitalcampus.oppia.model.Points;
import org.digitalcampus.oppia.task.APIRequestTask;
import org.digitalcampus.oppia.task.Payload;
import org.digitalcampus.oppia.utils.UIUtils;
import org.json.JSONException;
import org.json.JSONObject;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout.LayoutParams;
import android.widget.ListView;
import com.bugsense.trace.BugSenseHandler;
public class PointsFragment extends Fragment implements APIRequestListener{
public static final String TAG = PointsFragment.class.getSimpleName();
private JSONObject json;
public static PointsFragment newInstance() {
PointsFragment myFragment = new PointsFragment();
return myFragment;
}
public PointsFragment(){
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View vv = super.getLayoutInflater(savedInstanceState).inflate(R.layout.fragment_points, null);
LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
vv.setLayoutParams(lp);
return vv;
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getPoints();
}
private void getPoints(){
APIRequestTask task = new APIRequestTask(super.getActivity());
Payload p = new Payload(MobileLearning.SERVER_POINTS_PATH);
task.setAPIRequestListener(this);
task.execute(p);
}
public void refreshPointsList() {
try {
ArrayList<Points> points = new ArrayList<Points>();
for (int i = 0; i < (json.getJSONArray("objects").length()); i++) {
JSONObject json_obj = (JSONObject) json.getJSONArray("objects").get(i);
Points p = new Points();
p.setDescription(json_obj.getString("description"));
p.setDateTime(json_obj.getString("date"));
p.setPoints(json_obj.getInt("points"));
points.add(p);
}
PointsListAdapter pla = new PointsListAdapter(super.getActivity(), points);
ListView listView = (ListView) super.getActivity().findViewById(R.id.points_list);
listView.setAdapter(pla);
} catch (Exception e) {
e.printStackTrace();
}
}
public void apiRequestComplete(Payload response) {
if(response.isResult()){
try {
json = new JSONObject(response.getResultResponse());
refreshPointsList();
} catch (JSONException e) {
BugSenseHandler.sendException(e);
UIUtils.showAlert(super.getActivity(), R.string.loading, R.string.error_connection);
e.printStackTrace();
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
2b2a4ca9c83b82562d90c70f20e693da46ae8fd0 | 72eb0f33d802c7c66ae62294d3d1af9f99008a96 | /src/main/java/com/iteaj/network/device/client/breaker/fzwu/protocol/BreakerGatewayInfo.java | 79eb0f3af2b8907293d055f587456a884c91b435 | [] | no_license | iteaj/devices | 92e0d098f41e3cecb0e602f2db7fb06f90f2737b | e8f4c2ca509c6bbfdba530efdad71ac9ed1e458c | refs/heads/main | 2023-04-03T04:07:24.341725 | 2021-04-06T08:14:16 | 2021-04-06T08:14:16 | 336,150,110 | 2 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,968 | java | package com.iteaj.network.device.client.breaker.fzwu.protocol;
import com.iteaj.network.message.MqttClientMessage;
import com.iteaj.network.utils.ByteUtil;
import com.iteaj.network.device.client.breaker.fzwu.BreakerDeviceRequestProtocol;
import com.iteaj.network.device.client.breaker.fzwu.BreakerMessage;
import com.iteaj.network.device.client.breaker.fzwu.BreakerType;
/**
* 设备上报网关数据
*/
public class BreakerGatewayInfo extends BreakerDeviceRequestProtocol {
private String pv; // 6字节 程序版本
private String sn; // 6字节 硬件版本号 如 version:000012345678
private String macId; // 6字节 网关 MAC ID 如 MAC:00ABCDEF0123
/**
* 网关型号 1字节
* 1:WIFI 网口网关 + 485
* 2:2G 网关 + 485
* 3:4G 网关 + 485
* 4:NB 网关 + 485
*/
private byte dataModel;
public BreakerGatewayInfo(BreakerMessage requestMessage) {
super(requestMessage);
}
@Override
public BreakerType protocolType() {
return BreakerType.BH_32;
}
@Override
protected void doBuildRequestMessage(MqttClientMessage requestMessage) {
BreakerMessage breakerMessage = (BreakerMessage) requestMessage;
byte[] data = breakerMessage.getData();
this.macId = ByteUtil.bytesToHex(data, 0, 6);
String s = ByteUtil.bcdToStr(data, 6, 12);
this.sn = s.substring(0, 12);
this.pv = s.substring(12, 24);
this.dataModel = data[18];
}
public String getPv() {
return pv;
}
public void setPv(String pv) {
this.pv = pv;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getMacId() {
return macId;
}
public void setMacId(String macId) {
this.macId = macId;
}
public byte getDataModel() {
return dataModel;
}
public void setDataModel(byte dataModel) {
this.dataModel = dataModel;
}
}
| [
"iteaj@outlook.com"
] | iteaj@outlook.com |
6f244cdf63c1b8143fe1c5a39eb8e7fd538f11fc | 324fea83bc8135ab591f222f4cefa19b43d30944 | /src/main/java/ru/lanbilling/webservice/wsdl/InsupdUserPacket.java | aa7e91e8fa3b2c936fb6a53ddcd482105582301d | [
"MIT"
] | permissive | kanonirov/lanb-client | 2c14fac4d583c1c9f524634fa15e0f7279b8542d | bfe333cf41998e806f9c74ad257c6f2d7e013ba1 | refs/heads/master | 2021-01-10T08:47:46.996645 | 2015-10-26T07:51:35 | 2015-10-26T07:51:35 | 44,953,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,787 | java |
package ru.lanbilling.webservice.wsdl;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="isInsert" type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="val" type="{urn:api3}soapUserPacketFull"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"isInsert",
"val"
})
@XmlRootElement(name = "insupdUserPacket")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public class InsupdUserPacket {
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
protected long isInsert;
@XmlElement(required = true)
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
protected SoapUserPacketFull val;
/**
* Gets the value of the isInsert property.
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public long getIsInsert() {
return isInsert;
}
/**
* Sets the value of the isInsert property.
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public void setIsInsert(long value) {
this.isInsert = value;
}
/**
* Gets the value of the val property.
*
* @return
* possible object is
* {@link SoapUserPacketFull }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public SoapUserPacketFull getVal() {
return val;
}
/**
* Sets the value of the val property.
*
* @param value
* allowed object is
* {@link SoapUserPacketFull }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public void setVal(SoapUserPacketFull value) {
this.val = value;
}
}
| [
"kio@iteratia.com"
] | kio@iteratia.com |
3e0e630f0b98b874d982754edc87c9020b391301 | 242e90dff02d8ae45a5cc11ad2b42b0fb097a4b7 | /guest/webservices/rest-server/src/main/java/com/stackify/services/UserService.java | e78ed4627a3961f173f7e89f46b8098aba149d18 | [
"MIT"
] | permissive | naXa777/tutorials | 980e3ab816ad5698fdcf9c7e1b8bc6acf75c12a5 | c575ba8d6fc32c6d523bd9d73170b90250756e22 | refs/heads/master | 2020-03-30T08:06:09.918501 | 2019-02-27T17:54:22 | 2019-02-27T17:54:22 | 150,989,509 | 2 | 1 | MIT | 2018-09-30T17:30:55 | 2018-09-30T17:30:54 | null | UTF-8 | Java | false | false | 713 | java | package com.stackify.services;
import java.util.ArrayList;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import com.stackify.models.User;
@Path("/users")
public class UserService {
private static List<User> users = new ArrayList<>();
@POST
@Consumes(MediaType.APPLICATION_JSON)
public Response addUser(User user) {
users.add(user);
return Response.ok()
.build();
}
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<User> getUsers() {
return users;
}
}
| [
"hanriseldon@gmail.com"
] | hanriseldon@gmail.com |
48ba5657b48a718e0865be95ebbff7277ae581ac | a55e14b2baf85bade11480f7e26f10e1be341686 | /SmartHome/0.2-code/2.1-Trunk/2.1.2-server/SmartHome/hw-module/smart/src/main/java/com/hw/hwsafe/smart/pojo/SensorAirDetail.java | 849a5b40a74a4c26456812c930115ed0713d6f72 | [] | no_license | soon14/CODE | e9819180127c1d5c0e354090c25f55622e619d7b | 69a8dd13072cd7b181c98ec526b25ecdf98b228a | refs/heads/master | 2023-03-17T06:30:40.644267 | 2015-11-30T09:13:59 | 2015-11-30T09:13:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,914 | java | package com.hw.hwsafe.smart.pojo;
import java.io.Serializable;
/**
* 空气质量传感器明细
*
* @author 曾凡
* @time 2014年6月25日 下午12:19:04
*/
public class SensorAirDetail implements Serializable {
private static final long serialVersionUID = 7125861941849202383L;
/** 传感器唯一标识ID */
private String sensorId;
/** 用户定义的传感器名称 */
private String name;
/** 温度 0-50℃ */
private String temperature;
/** 湿度:0-100RH% */
private String humidity;
/** 二氧化碳:0-5000ppm */
private String co2;
/** PM2.5:0-1000ug/m3; */
private String pm25;
private String voc;
/** 单位、范围未定义 */
private String ch2o;
/** 单位、范围未定义 */
private String c6h6;
/** 传感器产生本条数据的创建日期 "yyyy-MM-dd HH:mm:ss" */
private String createTime;
/* 分享内容 */
private String shareContent;
public String getSensorId() {
return sensorId;
}
public void setSensorId(String sensorId) {
this.sensorId = sensorId;
}
public String getTemperature() {
return (temperature == null || "".equals(temperature)) ? "0"
: temperature;
}
public void setTemperature(String temperature) {
this.temperature = temperature;
}
public String getHumidity() {
return (humidity == null || "".equals(humidity)) ? "0"
: humidity;
}
public void setHumidity(String humidity) {
this.humidity = humidity;
}
public String getCo2() {
return (co2 == null || "".equals(co2)) ? "0" : co2;
}
public void setCo2(String co2) {
this.co2 = co2;
}
public String getPm25() {
return (pm25 == null || "".equals(pm25)) ? "0" : pm25;
}
public void setPm25(String pm25) {
this.pm25 = pm25;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCh2o() {
return (ch2o == null || "".equals(ch2o)) ? "0" : ch2o;
}
public void setCh2o(String ch2o) {
this.ch2o = ch2o;
}
public String getC6h6() {
return (c6h6 == null || "".equals(c6h6)) ? "0" : c6h6;
}
public void setC6h6(String c6h6) {
this.c6h6 = c6h6;
}
public void setShareContent(String shareContent) {
this.shareContent = shareContent;
}
public String getVoc() {
return (voc == null || "".equals(voc)) ? "0" : voc;
}
public void setVoc(String voc) {
this.voc = voc;
}
public String getShareContent() {
return shareContent;
}
@Override
public String toString() {
return "SensorAirDetail [sensorId=" + sensorId
+ ", name=" + name + ", temperature="
+ temperature + ", humidity=" + humidity
+ ", co2=" + co2 + ", pm25=" + pm25 + ", voc="
+ voc + ", ch2o=" + ch2o + ", c6h6=" + c6h6
+ ", createTime=" + createTime
+ ", shareContent=" + shareContent + "]";
}
}
| [
"835337572@qq.com"
] | 835337572@qq.com |
1b7f6c3eb6fea200bd428d324130ec9f4195c44a | 0ea271177f5c42920ac53cd7f01f053dba5c14e4 | /5.3.5/sources/android/support/design/widget/SnackbarManager.java | 60833209629d11df23f25020e92877f09e68d03f | [] | no_license | alireza-ebrahimi/telegram-talaeii | 367a81a77f9bc447e729b2ca339f9512a4c2860e | 68a67e6f104ab8a0888e63c605e8bbad12c4a20e | refs/heads/master | 2020-03-21T13:44:29.008002 | 2018-12-09T10:30:29 | 2018-12-09T10:30:29 | 138,622,926 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,560 | java | package android.support.design.widget;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import java.lang.ref.WeakReference;
class SnackbarManager {
private static final int LONG_DURATION_MS = 2750;
static final int MSG_TIMEOUT = 0;
private static final int SHORT_DURATION_MS = 1500;
private static SnackbarManager sSnackbarManager;
private SnackbarRecord mCurrentSnackbar;
private final Handler mHandler = new Handler(Looper.getMainLooper(), new C00591());
private final Object mLock = new Object();
private SnackbarRecord mNextSnackbar;
interface Callback {
void dismiss(int i);
void show();
}
/* renamed from: android.support.design.widget.SnackbarManager$1 */
class C00591 implements android.os.Handler.Callback {
C00591() {
}
public boolean handleMessage(Message message) {
switch (message.what) {
case 0:
SnackbarManager.this.handleTimeout((SnackbarRecord) message.obj);
return true;
default:
return false;
}
}
}
private static class SnackbarRecord {
final WeakReference<Callback> callback;
int duration;
boolean paused;
SnackbarRecord(int duration, Callback callback) {
this.callback = new WeakReference(callback);
this.duration = duration;
}
boolean isSnackbar(Callback callback) {
return callback != null && this.callback.get() == callback;
}
}
static SnackbarManager getInstance() {
if (sSnackbarManager == null) {
sSnackbarManager = new SnackbarManager();
}
return sSnackbarManager;
}
private SnackbarManager() {
}
public void show(int duration, Callback callback) {
synchronized (this.mLock) {
if (isCurrentSnackbarLocked(callback)) {
this.mCurrentSnackbar.duration = duration;
this.mHandler.removeCallbacksAndMessages(this.mCurrentSnackbar);
scheduleTimeoutLocked(this.mCurrentSnackbar);
return;
}
if (isNextSnackbarLocked(callback)) {
this.mNextSnackbar.duration = duration;
} else {
this.mNextSnackbar = new SnackbarRecord(duration, callback);
}
if (this.mCurrentSnackbar == null || !cancelSnackbarLocked(this.mCurrentSnackbar, 4)) {
this.mCurrentSnackbar = null;
showNextSnackbarLocked();
return;
}
}
}
public void dismiss(Callback callback, int event) {
synchronized (this.mLock) {
if (isCurrentSnackbarLocked(callback)) {
cancelSnackbarLocked(this.mCurrentSnackbar, event);
} else if (isNextSnackbarLocked(callback)) {
cancelSnackbarLocked(this.mNextSnackbar, event);
}
}
}
public void onDismissed(Callback callback) {
synchronized (this.mLock) {
if (isCurrentSnackbarLocked(callback)) {
this.mCurrentSnackbar = null;
if (this.mNextSnackbar != null) {
showNextSnackbarLocked();
}
}
}
}
public void onShown(Callback callback) {
synchronized (this.mLock) {
if (isCurrentSnackbarLocked(callback)) {
scheduleTimeoutLocked(this.mCurrentSnackbar);
}
}
}
public void pauseTimeout(Callback callback) {
synchronized (this.mLock) {
if (isCurrentSnackbarLocked(callback) && !this.mCurrentSnackbar.paused) {
this.mCurrentSnackbar.paused = true;
this.mHandler.removeCallbacksAndMessages(this.mCurrentSnackbar);
}
}
}
public void restoreTimeoutIfPaused(Callback callback) {
synchronized (this.mLock) {
if (isCurrentSnackbarLocked(callback) && this.mCurrentSnackbar.paused) {
this.mCurrentSnackbar.paused = false;
scheduleTimeoutLocked(this.mCurrentSnackbar);
}
}
}
public boolean isCurrent(Callback callback) {
boolean isCurrentSnackbarLocked;
synchronized (this.mLock) {
isCurrentSnackbarLocked = isCurrentSnackbarLocked(callback);
}
return isCurrentSnackbarLocked;
}
public boolean isCurrentOrNext(Callback callback) {
boolean z;
synchronized (this.mLock) {
z = isCurrentSnackbarLocked(callback) || isNextSnackbarLocked(callback);
}
return z;
}
private void showNextSnackbarLocked() {
if (this.mNextSnackbar != null) {
this.mCurrentSnackbar = this.mNextSnackbar;
this.mNextSnackbar = null;
Callback callback = (Callback) this.mCurrentSnackbar.callback.get();
if (callback != null) {
callback.show();
} else {
this.mCurrentSnackbar = null;
}
}
}
private boolean cancelSnackbarLocked(SnackbarRecord record, int event) {
Callback callback = (Callback) record.callback.get();
if (callback == null) {
return false;
}
this.mHandler.removeCallbacksAndMessages(record);
callback.dismiss(event);
return true;
}
private boolean isCurrentSnackbarLocked(Callback callback) {
return this.mCurrentSnackbar != null && this.mCurrentSnackbar.isSnackbar(callback);
}
private boolean isNextSnackbarLocked(Callback callback) {
return this.mNextSnackbar != null && this.mNextSnackbar.isSnackbar(callback);
}
private void scheduleTimeoutLocked(SnackbarRecord r) {
if (r.duration != -2) {
int durationMs = LONG_DURATION_MS;
if (r.duration > 0) {
durationMs = r.duration;
} else if (r.duration == -1) {
durationMs = 1500;
}
this.mHandler.removeCallbacksAndMessages(r);
this.mHandler.sendMessageDelayed(Message.obtain(this.mHandler, 0, r), (long) durationMs);
}
}
void handleTimeout(SnackbarRecord record) {
synchronized (this.mLock) {
if (this.mCurrentSnackbar == record || this.mNextSnackbar == record) {
cancelSnackbarLocked(record, 2);
}
}
}
}
| [
"alireza.ebrahimi2006@gmail.com"
] | alireza.ebrahimi2006@gmail.com |
563a69beb653c239cf7618759545d154db422814 | 126f6353d489ad721cb3062d38788437eeb7125a | /eclipse-sarl/plugins/io.sarl.eclipse/src/io/sarl/eclipse/properties/RuntimeEnvironmentPropertyPage.java | 92db8c8d85f97be4de217c94da0313814e9f15ee | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | amit2011/sarl | 69c89812c684f0e7012efc1417f0e9c49ff21331 | 243a8382d9a467fc0e6f9fe649152ebefb874388 | refs/heads/master | 2021-01-13T03:58:02.730346 | 2016-12-21T15:01:54 | 2016-12-21T15:01:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,114 | java | /*
* $Id$
*
* SARL is an general-purpose agent programming language.
* More details on http://www.sarl.io
*
* Copyright (C) 2014-2016 the original authors or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.sarl.eclipse.properties;
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import io.sarl.eclipse.SARLEclipsePlugin;
import io.sarl.eclipse.runtime.ISREInstall;
import io.sarl.eclipse.runtime.SARLRuntime;
import io.sarl.eclipse.runtime.SREConfigurationBlock;
/** Property page for selecting the SARL runtime environment
* associated to this page.
*
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
*/
public class RuntimeEnvironmentPropertyPage extends PropertyAndPreferencePage {
/** Identifier of the property page.
*/
public static final String PROPERTY_PAGE_ID = "io.sarl.eclipse.properties.SRE"; //$NON-NLS-1$
/** Identifier of the preference page.
*/
public static final String PREFERENCE_PAGE_ID = "io.sarl.eclipse.preferences.SREsPreferencePage"; //$NON-NLS-1$
/** Identifier of the context of the properties managed by this page.
*/
public static final String PROPERTY_QUALIFIER = "io.sarl.eclipse.launch.SRE"; //$NON-NLS-1$
/** Name of the property that contains the SRE install id.
*/
public static final String PROPERTY_NAME_SRE_INSTALL_ID = "SRE_INSTALL_ID"; //$NON-NLS-1$
/** Name of the property that indicates if the system-wide SRE should be used..
*/
public static final String PROPERTY_NAME_USE_SYSTEM_WIDE_SRE = "USE_SYSTEM_WIDE_SRE"; //$NON-NLS-1$
/** Name of the property that indicates if the project has specific options.
*/
public static final String PROPERTY_NAME_HAS_PROJECT_SPECIFIC = "HAS_PROJECT_SPECIFIC"; //$NON-NLS-1$
private SREConfigurationBlock sreBlock;
/**
* Constructor for RuntimeEnvironmentPropertyPage.
*/
public RuntimeEnvironmentPropertyPage() {
super();
}
/** Create a qualified name with the given name.
*
* @param name - the name.
* @return the qualified name.
*/
public static QualifiedName qualify(String name) {
return new QualifiedName(PROPERTY_QUALIFIER, name);
}
@Override
protected String getPreferencePageID() {
return PREFERENCE_PAGE_ID;
}
@Override
protected String getPropertyPageID() {
return PROPERTY_PAGE_ID;
}
@Override
protected Control createPreferenceContent(Composite composite) {
this.sreBlock = new SREConfigurationBlock(true, null, null);
final Control ctrl = this.sreBlock.createControl(composite);
this.sreBlock.initialize();
try {
final String useSystemWide = getProject().getPersistentProperty(
qualify(PROPERTY_NAME_USE_SYSTEM_WIDE_SRE));
final String sreInstallId = getProject().getPersistentProperty(
qualify(PROPERTY_NAME_SRE_INSTALL_ID));
final ISREInstall sre = SARLRuntime.getSREFromId(sreInstallId);
final boolean notify = this.sreBlock.getNotify();
try {
this.sreBlock.setNotify(false);
this.sreBlock.selectSpecificSRE(sre);
if (Boolean.parseBoolean(MoreObjects.firstNonNull(
Strings.emptyToNull(useSystemWide), Boolean.TRUE.toString()))) {
this.sreBlock.selectSystemWideSRE();
} else {
this.sreBlock.selectSpecificSRE();
}
} finally {
this.sreBlock.setNotify(notify);
}
} catch (CoreException e) {
SARLEclipsePlugin.getDefault().log(e);
}
return ctrl;
}
@Override
protected boolean hasProjectSpecificOptions(IProject project) {
try {
final String value = project.getPersistentProperty(
qualify(PROPERTY_NAME_HAS_PROJECT_SPECIFIC));
return Boolean.parseBoolean(value);
} catch (CoreException e) {
SARLEclipsePlugin.getDefault().log(e);
}
return false;
}
/** Save the flag that indicates if the specific project options must be
* used.
*
* @param project - the project.
* @param useSpecificOptions - indicates if the specifi options must be used.
* @return <code>true</code> if the property was saved successfully.
*/
@SuppressWarnings("static-method")
protected boolean saveProjectSpecificOptions(IProject project, boolean useSpecificOptions) {
if (project != null) {
try {
project.setPersistentProperty(
qualify(PROPERTY_NAME_HAS_PROJECT_SPECIFIC),
Boolean.toString(useSpecificOptions));
return true;
} catch (CoreException e) {
SARLEclipsePlugin.getDefault().log(e);
}
}
return false;
}
@Override
protected void performDefaults() {
this.sreBlock.selectSRE(null);
super.performDefaults();
}
@Override
public boolean performOk() {
final IProject prj = getProject();
if (prj == null || !super.performOk()
|| !saveProjectSpecificOptions(getProject(), useProjectSettings())) {
return false;
}
final ISREInstall projectSRE = this.sreBlock.getSelectedSRE();
final boolean isSystemWide = this.sreBlock.isSystemWideDefaultSRE();
final String id = (projectSRE == null) ? null : projectSRE.getId();
try {
prj.setPersistentProperty(
qualify(PROPERTY_NAME_USE_SYSTEM_WIDE_SRE),
Boolean.toString(isSystemWide));
prj.setPersistentProperty(
qualify(PROPERTY_NAME_SRE_INSTALL_ID),
id);
return true;
} catch (CoreException e) {
SARLEclipsePlugin.getDefault().log(e);
}
return false;
}
}
| [
"galland@arakhne.org"
] | galland@arakhne.org |
751e1eaae39cb0daba0340e11b2a9a68de633022 | 9b9dd4b68f21e57d219fb3af422e76be7fc7a7ee | /src/main/java/org/lanternpowered/server/inventory/PeekedPollTransactionResult.java | b1aca60f38145c9e07760c32aa3da3d8225cc93a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Mosaplex/Lantern | 3cf754db3a3e0240ecd1d6070074cf0d097f729c | 7f536b5b0d06a05dfeb62d2873664c42ee28f91f | refs/heads/master | 2021-03-21T11:02:08.501286 | 2019-07-02T15:49:13 | 2019-07-02T15:49:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,901 | java | /*
* This file is part of LanternServer, licensed under the MIT License (MIT).
*
* Copyright (c) LanternPowered <https://www.lanternpowered.org>
* 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.lanternpowered.server.inventory;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.item.inventory.transaction.SlotTransaction;
import java.util.List;
public final class PeekedPollTransactionResult extends PeekedTransactionResult {
/**
* Gets a empty {@link PeekedPollTransactionResult}.
*
* @return The empty peeked poll transaction result
*/
public static PeekedPollTransactionResult empty() {
return new PeekedPollTransactionResult(ImmutableList.of(), LanternItemStack.empty());
}
private final ItemStack polledItem;
/**
* Constructs a new {@link PeekedPollTransactionResult}.
*
* @param transactions The slot transactions that will occur
* @param polledItem The polled item stack
*/
public PeekedPollTransactionResult(List<SlotTransaction> transactions, ItemStack polledItem) {
super(transactions);
checkNotNull(polledItem, "polledItem");
this.polledItem = polledItem;
}
/**
* Gets the {@link ItemStack} that is polled when this
* result is accepted.
*
* @return The polled item stack
*/
public ItemStack getPolledItem() {
return this.polledItem;
}
@Override
protected MoreObjects.ToStringHelper toStringHelper() {
return super.toStringHelper()
.add("polledItem", this.polledItem);
}
}
| [
"seppevolkaerts@hotmail.com"
] | seppevolkaerts@hotmail.com |
7da33e3bee0bbc2e6a583456f9e3442e22e30600 | ed2252566617d5350287520505800d1fdcb55149 | /tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiator.java | 494c0ea0640b7101c299831b1f8c7f8e5407e092 | [
"Apache-2.0"
] | permissive | hao707822882/objenesis | f537516cdc36f04337fc8e80c62e87db2c9f74d1 | 89c898415297c68a186a7d1ff382061e59c1f631 | refs/heads/master | 2021-01-16T19:43:32.502474 | 2015-08-03T04:38:02 | 2015-08-03T04:38:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,911 | java | /**
* Copyright 2006-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.objenesis.tck.search;
import org.objenesis.instantiator.ObjectInstantiator;
import org.objenesis.strategy.PlatformDescription;
import org.objenesis.tck.candidates.SerializableNoConstructor;
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
/**
* This class will try every available instantiator on the platform to see which works.
*
* @author Henri Tremblay
*/
public class SearchWorkingInstantiator implements Serializable { // implements Serializable just for the test
private SearchWorkingInstantiatorListener listener;
public static void main(String[] args) throws Exception {
System.out.println();
System.out.println(PlatformDescription.describePlatform());
System.out.println();
SearchWorkingInstantiator searchWorkingInstantiator = new SearchWorkingInstantiator(new SystemOutListener());
searchWorkingInstantiator.searchForInstantiator(SerializableNoConstructor.class);
}
public SearchWorkingInstantiator(SearchWorkingInstantiatorListener listener) {
this.listener = listener;
}
public void searchForInstantiator(Class<?> toInstantiate) {
SortedSet<Class<?>> classes = ClassEnumerator.getClassesForPackage(ObjectInstantiator.class.getPackage());
for (Iterator<Class<?>> it = classes.iterator(); it.hasNext();) {
Class<?> c = it.next();
if(c.isInterface() || !ObjectInstantiator.class.isAssignableFrom(c)) {
continue;
}
Constructor<?> constructor;
try {
constructor = c.getConstructor(Class.class);
} catch (NoSuchMethodException e) {
throw new RuntimeException(e);
}
try {
ObjectInstantiator<?> instantiator =
(ObjectInstantiator<?>) constructor.newInstance(toInstantiate);
instantiator.newInstance();
listener.instantiatorSupported(c);
}
catch(Exception e) {
Throwable t = (e instanceof InvocationTargetException) ? e.getCause() : e;
listener.instantiatorUnsupported(c, t);
}
}
}
}
| [
"henri.tremblay@gmail.com"
] | henri.tremblay@gmail.com |
12ab8f90fa507d6dce9c0275158f7c173eb81af9 | 3de3dae722829727edfdd6cc3b67443a69043475 | /edexOsgi/com.raytheon.uf.common.dataplugin.satellite/src/com/raytheon/uf/common/dataplugin/satellite/units/goes/convert/LiftedIndexTempToPixelConverter.java | 15a4fb91bc5106bd67c246a2ca3f509e447573f5 | [
"LicenseRef-scancode-public-domain",
"Apache-2.0"
] | permissive | Unidata/awips2 | 9aee5b7ec42c2c0a2fa4d877cb7e0b399db74acb | d76c9f96e6bb06f7239c563203f226e6a6fffeef | refs/heads/unidata_18.2.1 | 2023-08-18T13:00:15.110785 | 2023-08-09T06:06:06 | 2023-08-09T06:06:06 | 19,332,079 | 161 | 75 | NOASSERTION | 2023-09-13T19:06:40 | 2014-05-01T00:59:04 | Java | UTF-8 | Java | false | false | 2,989 | java | /**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert;
import javax.measure.converter.ConversionException;
import javax.measure.converter.UnitConverter;
import javax.measure.unit.SI;
import org.apache.commons.lang3.builder.HashCodeBuilder;
/**
* Converts a Lifted Index in temperature Kelvin to a pixel value
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 30, 2007 njensen Initial creation
*
* </pre>
*
* @author njensen
*/
public class LiftedIndexTempToPixelConverter extends UnitConverter {
private static final long serialVersionUID = 1L;
private static UnitConverter kelvinToCelsius = SI.KELVIN
.getConverterTo(SI.CELSIUS);
/*
* (non-Javadoc)
*
* @see javax.measure.converter.UnitConverter#convert(double)
*/
@Override
public double convert(double aTemp) throws ConversionException {
// value is in kelvin, but below calculates pixel based on value being
// celsius
aTemp = kelvinToCelsius.convert(aTemp);
double result = -5 * (aTemp - 25);
if (result < 0) {
result = 0.0;
} else if (result > 255) {
result = 255;
}
return result;
}
/*
* (non-Javadoc)
*
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
*/
@Override
public boolean equals(Object aConverter) {
return (aConverter instanceof LiftedIndexTempToPixelConverter);
}
/*
* (non-Javadoc)
*
* @see javax.measure.converter.UnitConverter#hashCode()
*/
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
/*
* (non-Javadoc)
*
* @see javax.measure.converter.UnitConverter#inverse()
*/
@Override
public UnitConverter inverse() {
return new LiftedIndexPixelToTempConverter();
}
/*
* (non-Javadoc)
*
* @see javax.measure.converter.UnitConverter#isLinear()
*/
@Override
public boolean isLinear() {
return true;
}
}
| [
"mjames@unidata.ucar.edu"
] | mjames@unidata.ucar.edu |
25390d9b270408da4aa16583ba04630b3bf11efd | 802bd0e3175fe02a3b6ca8be0a2ff5347a1fd62c | /dblibrary/src/main/java/com/make/dblibrary/UserDao.java | f99a4fbc16c680693b29a1ba15562285814e0372 | [] | no_license | wuwind/CstFramePub | 87b8534d85cabcf6b8ca58077ef54d706c8a6a91 | 4059789b42224fe53806569673065a207c0890dd | refs/heads/master | 2023-04-11T20:58:37.505639 | 2021-04-14T06:11:29 | 2021-04-14T06:11:29 | 351,687,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 814 | java | package com.make.dblibrary;
import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
import com.make.dblibrary.model.User;
import java.util.List;
@Dao
public interface UserDao {
@Query("SELECT * FROM user")
LiveData<List<User>> getAll();
@Query("SELECT * FROM user WHERE uid IN (:userIds)")
List<User> loadAllByIds(int[] userIds);
@Query("SELECT * FROM user WHERE first_name LIKE :first AND " +
"last_name LIKE :last LIMIT 1")
User findByName(String first, String last);
@Insert
void insertAll(User... users);
@Insert
void insertList(List<User> users);
@Delete
void delete(User user);
} | [
"412719784@qq.com"
] | 412719784@qq.com |
386512d230a08e3f0934f9af72e677337a74711e | a1421333fb9813432d7b5e35eb7fde82c8c634f1 | /thongtin-phanhoi-portlet/.svn/pristine/75/75d64c76d9a34185b2523487c35e7fc781a0d906.svn-base | 1e7aae43b8ba4552721af979e4a081d7382cb16d | [] | no_license | pforr/Phan_Hoi | 6e1e98a8df8d693b054e1fc7ea3c217187d99e77 | 9f59c4a99f213b2dddd84370940b046d7badf26a | refs/heads/master | 2020-12-25T15:08:10.308560 | 2016-06-22T02:50:08 | 2016-06-22T02:50:08 | 61,683,456 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,373 | /**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package vn.dtt.ns.quanlynguoidung.permission;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.security.auth.PrincipalException;
import com.liferay.portal.security.permission.PermissionChecker;
public class UserNSPermission {
public static void check(PermissionChecker permissionChecker, long groupId,
String actionId)
throws PortalException {
if (!contains(permissionChecker, groupId, actionId)) {
throw new PrincipalException();
}
}
public static boolean contains(PermissionChecker permissionChecker,
long groupId, String actionId) {
return permissionChecker.hasPermission(groupId, RESOURCE_NAME, groupId,
actionId);
}
public static final String RESOURCE_NAME = "vn.dtt.cmon.user.dao.model.UserMapping";
}
| [
"hungvq@yahoo.com"
] | hungvq@yahoo.com | |
0fa59f4ba79d3963916e937791c48db337acb235 | 69610989358d6965de8164fe8f9426f0c92bed0f | /app/src/main/java/com/casc/rfidscanner/adapter/BucketAdapter.java | df80bd40da0254a6079e178cb5029f07bedb019c | [] | no_license | yanghang8612/RFIDScanner | f8e9c9d804e762f71bc029603b2b06805e682bf3 | 994f923cbad2abb28200d084143444457ac062f9 | refs/heads/master | 2020-04-02T08:23:24.340829 | 2019-06-19T13:34:24 | 2019-06-19T13:34:24 | 154,242,589 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 686 | java | package com.casc.rfidscanner.adapter;
import com.casc.rfidscanner.R;
import com.casc.rfidscanner.utils.CommonUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;
public class BucketAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public BucketAdapter(List<String> data) {
super(R.layout.item_bucket, data);
}
@Override
protected void convert(BaseViewHolder helper, String item) {
helper.setText(R.id.tv_bucket_body_code, CommonUtils.getBodyCode(item))
.setText(R.id.tv_bucket_product_name, CommonUtils.getProduct(item).getStr());
}
}
| [
"yanghang8612@163.com"
] | yanghang8612@163.com |
631c060918d33bf44dafc10e6fb069dcee410ac6 | ef1b72abf5554c94661c495a0bf0a6aded89e37c | /src/net/minecraft/src/cyo.java | 570d8c58ff9e5dc3e8465df7c7afb9ca0befa7c6 | [] | no_license | JimmyZJX/MC1.8_source | ad459b12d0d01db28942b9af87c86393011fd626 | 25f56c7884a320cbf183b23010cccecb5689d707 | refs/heads/master | 2016-09-10T04:26:40.951576 | 2014-11-29T06:22:02 | 2014-11-29T06:22:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 209 | java | package net.minecraft.src;
public class cyo
extends cl
{}
/* Location: C:\Minecraft1.7.5\.minecraft\versions\1.8\1.8.jar
* Qualified Name: cyo
* JD-Core Version: 0.7.0.1
*/ | [
"604590822@qq.com"
] | 604590822@qq.com |
8b46ebb7cd643f8b463b41b5769ab93d966f78ef | 4ed13753f5bc20ec143dc25039280f80c3edddd8 | /gosu-core-api/src/main/java/gw/lang/reflect/gs/IGosuClassTypeInfo.java | 20d35328a1fe4bb724c978c7731a02a9a06ba9ae | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] | permissive | hmsck/gosu-lang | 180a96aab69ff0184700e70876bb0cf10c8a938f | 78c5f6c839597a81ac5ec75a46259cbb6ad40545 | refs/heads/master | 2021-02-13T06:53:30.208378 | 2019-10-31T23:15:13 | 2019-10-31T23:15:13 | 244,672,021 | 0 | 0 | Apache-2.0 | 2020-03-03T15:27:47 | 2020-03-03T15:27:46 | null | UTF-8 | Java | false | false | 334 | java | /*
* Copyright 2014 Guidewire Software, Inc.
*/
package gw.lang.reflect.gs;
import gw.lang.reflect.IAttributedFeatureInfo;
import gw.lang.reflect.IRelativeTypeInfo;
import gw.lang.reflect.ITypeInfo;
public interface IGosuClassTypeInfo extends IAttributedFeatureInfo, ITypeInfo, IRelativeTypeInfo
{
IGosuClass getGosuClass();
}
| [
"lboasso@guidewire.com"
] | lboasso@guidewire.com |
25d5090d3f9d59defb893eb8ae82d18fa043c477 | d8e0a382dead230d5ec0a4065fdfe9f3a6bf3b56 | /spring-boot-core/src/main/java/spring/org/quartz/core/jmx/JobDataMapSupport.java | 73aed20148cb51c0baf0334b5cd4a5f17640dc29 | [] | no_license | mxuexxmy/spring-boot-okadmin | 3face6f44decb6a7bdb38a2bd1d45611e0244975 | 22e95cf229de264aa2cad1c5280f9f05a34446d8 | refs/heads/master | 2023-01-24T11:59:25.964026 | 2020-11-27T08:43:38 | 2020-11-27T08:43:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,116 | java | package spring.org.quartz.core.jmx;
import static javax.management.openmbean.SimpleType.STRING;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.OpenDataException;
import javax.management.openmbean.OpenType;
import javax.management.openmbean.TabularData;
import javax.management.openmbean.TabularDataSupport;
import javax.management.openmbean.TabularType;
import spring.org.quartz.JobDataMap;
public class JobDataMapSupport {
private static final String typeName = "JobDataMap";
private static final String[] keyValue = new String[] { "key", "value" };
private static final OpenType[] openTypes = new OpenType[] { STRING, STRING };
private static final CompositeType rowType;
public static final TabularType TABULAR_TYPE;
static {
try {
rowType = new CompositeType(typeName, typeName, keyValue, keyValue,
openTypes);
TABULAR_TYPE = new TabularType(typeName, typeName, rowType,
new String[] { "key" });
} catch (OpenDataException e) {
throw new RuntimeException(e);
}
}
public static JobDataMap newJobDataMap(TabularData tabularData) {
JobDataMap jobDataMap = new JobDataMap();
if(tabularData != null) {
for (final Iterator<?> pos = tabularData.values().iterator(); pos.hasNext();) {
CompositeData cData = (CompositeData) pos.next();
jobDataMap.put((String) cData.get("key"), (String) cData.get("value"));
}
}
return jobDataMap;
}
public static JobDataMap newJobDataMap(Map<String, Object> map) {
JobDataMap jobDataMap = new JobDataMap();
if(map != null) {
for (final Iterator<String> pos = map.keySet().iterator(); pos.hasNext();) {
String key = pos.next();
jobDataMap.put(key, map.get(key));
}
}
return jobDataMap;
}
/**
* @return composite data
*/
public static CompositeData toCompositeData(String key, String value) {
try {
return new CompositeDataSupport(rowType, keyValue, new Object[] {
key, value });
} catch (OpenDataException e) {
throw new RuntimeException(e);
}
}
/**
* @param jobDataMap
* @return TabularData
*/
public static TabularData toTabularData(JobDataMap jobDataMap) {
TabularData tData = new TabularDataSupport(TABULAR_TYPE);
ArrayList<CompositeData> list = new ArrayList<CompositeData>();
Iterator<String> iter = jobDataMap.keySet().iterator();
while (iter.hasNext()) {
String key = iter.next();
list.add(toCompositeData(key, String.valueOf(jobDataMap.get(key))));
}
tData.putAll(list.toArray(new CompositeData[list.size()]));
return tData;
}
}
| [
"dening1644@163.com"
] | dening1644@163.com |
e22247e045726dddb88e0794342ded193b0efa2b | 65d2ca49d02cf45bb47b96360cfc6c1e9dad84cc | /sample/src/main/java/com/anychart/sample/charts/Area3DChartActivity.java | ea8a26fe18be5a93068be6768e3eb9b965a8f193 | [] | no_license | dandycheung/AnyChart-Android | 28dbfe81a4a963397450489c4fed490dabdac8cc | f3d46f860bd3f855d4032c0f04ddadbc18b93128 | refs/heads/master | 2023-08-03T21:30:56.466730 | 2023-07-28T13:44:53 | 2023-07-28T13:44:53 | 239,239,227 | 0 | 0 | null | 2023-07-28T17:23:04 | 2020-02-09T03:13:35 | Java | UTF-8 | Java | false | false | 4,211 | java | package com.anychart.sample.charts;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.anychart.AnyChart;
import com.anychart.AnyChartView;
import com.anychart.chart.common.dataentry.DataEntry;
import com.anychart.chart.common.dataentry.ValueDataEntry;
import com.anychart.charts.Cartesian3d;
import com.anychart.core.cartesian.series.Area3d;
import com.anychart.data.Mapping;
import com.anychart.data.Set;
import com.anychart.enums.Anchor;
import com.anychart.enums.HoverMode;
import com.anychart.enums.Position;
import com.anychart.enums.TooltipPositionMode;
import com.anychart.graphics.vector.hatchfill.HatchFillType;
import com.anychart.sample.R;
import java.util.ArrayList;
import java.util.List;
public class Area3DChartActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chart_common);
AnyChartView anyChartView = findViewById(R.id.any_chart_view);
anyChartView.setProgressBar(findViewById(R.id.progress_bar));
Cartesian3d area3d = AnyChart.area3d();
area3d.xAxis(0).labels().format("${%Value}");
area3d.animation(true);
area3d.yAxis(0).title("The Share Price");
area3d.xAxis(0).title("Year/Month/Day");
area3d.xAxis(0).labels().padding(5d, 5d, 0d, 5d);
area3d.title("The cost of ACME\\'s shares<br/>' +\n" +
" '<span style=\"color:#212121; font-size: 13px;\">Statistics was collected from site N during September</span>");
area3d.title().useHtml(true);
area3d.title().padding(0d, 0d, 20d, 0d);
List<DataEntry> seriesData = new ArrayList<>();
seriesData.add(new CustomDataEntry("1986", 162, 42));
seriesData.add(new CustomDataEntry("1987", 134, 54));
seriesData.add(new CustomDataEntry("1988", 116, 26));
seriesData.add(new CustomDataEntry("1989", 122, 32));
seriesData.add(new CustomDataEntry("1990", 178, 68));
seriesData.add(new CustomDataEntry("1991", 144, 54));
seriesData.add(new CustomDataEntry("1992", 125, 35));
seriesData.add(new CustomDataEntry("1993", 176, 66));
seriesData.add(new CustomDataEntry("1994", 156, 80));
seriesData.add(new CustomDataEntry("1995", 195, 120));
seriesData.add(new CustomDataEntry("1996", 215, 115));
seriesData.add(new CustomDataEntry("1997", 176, 36));
seriesData.add(new CustomDataEntry("1998", 167, 47));
seriesData.add(new CustomDataEntry("1999", 142, 72));
seriesData.add(new CustomDataEntry("2000", 117, 37));
seriesData.add(new CustomDataEntry("2001", 113, 23));
seriesData.add(new CustomDataEntry("2002", 132, 30));
seriesData.add(new CustomDataEntry("2003", 146, 46));
seriesData.add(new CustomDataEntry("2004", 169, 59));
seriesData.add(new CustomDataEntry("2005", 184, 44));
Set set = Set.instantiate();
set.data(seriesData);
Mapping series1Data = set.mapAs("{ x: 'x', value: 'value' }");
Mapping series2Data = set.mapAs("{ x: 'x', value: 'value2' }");
Area3d series1 = area3d.area(series1Data);
series1.name("ACME Share Price");
series1.hovered().markers(false);
series1.hatchFill("diagonal", "#000", 0.6d, 10d);
Area3d series2 = area3d.area(series2Data);
series2.name("The Competitor\\'s Share Price");
series2.hovered().markers(false);
series2.hatchFill(HatchFillType.DIAGONAL_BRICK, "#000", 0.6d, 10d);
area3d.tooltip()
.position(Position.CENTER_TOP)
.positionMode(TooltipPositionMode.POINT)
.anchor(Anchor.LEFT_BOTTOM)
.offsetX(5d)
.offsetY(5d);
area3d.interactivity().hoverMode(HoverMode.BY_X);
area3d.zAspect("100%");
anyChartView.setChart(area3d);
}
private class CustomDataEntry extends ValueDataEntry {
CustomDataEntry(String x, Number value, Number value2) {
super(x, value);
setValue("value2", value2);
}
}
}
| [
"arsenymalkov@gmail.com"
] | arsenymalkov@gmail.com |
a9e08891be9c06cde53c985d800b63125094fae4 | 7507f1eb6f1cf630a237ecab0a16c1e3d665ca50 | /WaterLevel.java | d2648f79afde9bf7dbeaef4d72e0e62d54f74c68 | [] | no_license | charles-wangkai/topcoder | 1adacf868d1ac9103b4f1d46a9c5815b3459c078 | 8366e28ff870431c58b6e12280b53df51c9115be | refs/heads/master | 2023-05-12T02:24:15.759419 | 2023-05-08T11:36:25 | 2023-05-08T11:36:25 | 23,999,376 | 8 | 8 | null | null | null | null | UTF-8 | Java | false | false | 3,639 | java | public class WaterLevel {
public double netAmt(int evapNormal, int evapFlood, int[] rain) {
double amount = 0;
for (int r : rain) {
if (amount > 0) {
if (r >= evapFlood) {
amount += r - evapFlood;
} else {
double backTime = amount / (evapFlood - r);
if (backTime >= 1) {
amount -= evapFlood - r;
} else {
amount = 0;
if (r < evapNormal) {
amount -= (1 - backTime) * (evapNormal - r);
}
}
}
} else {
if (r <= evapNormal) {
amount -= evapNormal - r;
} else {
double backTime = -amount / (r - evapNormal);
if (backTime >= 1) {
amount += r - evapNormal;
} else {
amount = 0;
if (r > evapFlood) {
amount += (1 - backTime) * (r - evapFlood);
}
}
}
}
}
return amount;
}
// BEGIN KAWIGIEDIT TESTING
// Generated by KawigiEdit 2.1.4 (beta) modified by pivanof
private static boolean KawigiEdit_RunTest(
int testNum, int p0, int p1, int[] p2, boolean hasAnswer, double p3) {
System.out.print("Test " + testNum + ": [" + p0 + "," + p1 + "," + "{");
for (int i = 0; p2.length > i; ++i) {
if (i > 0) {
System.out.print(",");
}
System.out.print(p2[i]);
}
System.out.print("}");
System.out.println("]");
WaterLevel obj;
double answer;
obj = new WaterLevel();
long startTime = System.currentTimeMillis();
answer = obj.netAmt(p0, p1, p2);
long endTime = System.currentTimeMillis();
boolean res;
res = true;
System.out.println("Time: " + (endTime - startTime) / 1000.0 + " seconds");
if (hasAnswer) {
System.out.println("Desired answer:");
System.out.println("\t" + p3);
}
System.out.println("Your answer:");
System.out.println("\t" + answer);
if (hasAnswer) {
res = Math.abs(p3 - answer) <= 1e-9 * Math.max(1.0, Math.abs(p3));
}
if (!res) {
System.out.println("DOESN'T MATCH!!!!");
} else if ((endTime - startTime) / 1000.0 >= 2) {
System.out.println("FAIL the timeout");
res = false;
} else if (hasAnswer) {
System.out.println("Match :-)");
} else {
System.out.println("OK, but is it right?");
}
System.out.println("");
return res;
}
public static void main(String[] args) {
boolean all_right;
all_right = true;
int p0;
int p1;
int[] p2;
double p3;
// ----- test 0 -----
p0 = 20;
p1 = 40;
p2 = new int[] {0, 60, 0, 0};
p3 = -35.0D;
all_right = KawigiEdit_RunTest(0, p0, p1, p2, true, p3) && all_right;
// ------------------
// ----- test 1 -----
p0 = 20;
p1 = 39;
p2 = new int[] {0, 60};
p3 = 10.5D;
all_right = KawigiEdit_RunTest(1, p0, p1, p2, true, p3) && all_right;
// ------------------
// ----- test 2 -----
p0 = 20;
p1 = 40;
p2 = new int[] {0};
p3 = -20.0D;
all_right = KawigiEdit_RunTest(2, p0, p1, p2, true, p3) && all_right;
// ------------------
// ----- test 3 -----
p0 = 200;
p1 = 800;
p2 = new int[] {0, 600};
p3 = 0.0D;
all_right = KawigiEdit_RunTest(3, p0, p1, p2, true, p3) && all_right;
// ------------------
if (all_right) {
System.out.println("You're a stud (at least on the example cases)!");
} else {
System.out.println("Some of the test cases had errors.");
}
}
// END KAWIGIEDIT TESTING
}
// Powered by KawigiEdit 2.1.4 (beta) modified by pivanof!
| [
"charles.wangkai@gmail.com"
] | charles.wangkai@gmail.com |
0c76a72513bdd257264bb39ff5c6c18329c07ac0 | 8228efa27043e0a236ca8003ec0126012e1fdb02 | /L2JOptimus_Core/java/net/sf/l2j/gameserver/model/zone/type/L2WaterZone.java | e2801039483b7de717366f45d27c7807cec929f0 | [] | no_license | wan202/L2JDeath | 9982dfce14ae19a22392955b996b42dc0e8cede6 | e0ab026bf46ac82c91bdbd048a0f50dc5213013b | refs/heads/master | 2020-12-30T12:35:59.808276 | 2017-05-16T18:57:25 | 2017-05-16T18:57:25 | 91,397,726 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,788 | java | package net.sf.l2j.gameserver.model.zone.type;
import net.sf.l2j.gameserver.model.actor.Creature;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.model.zone.L2ZoneType;
import net.sf.l2j.gameserver.model.zone.ZoneId;
import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo.NpcInfo;
import net.sf.l2j.gameserver.network.serverpackets.ServerObjectInfo;
public class L2WaterZone extends L2ZoneType
{
public L2WaterZone(int id)
{
super(id);
}
@Override
protected void onEnter(Creature character)
{
character.setInsideZone(ZoneId.WATER, true);
if (character instanceof Player)
((Player) character).broadcastUserInfo();
else if (character instanceof Npc)
{
for (Player player : character.getKnownType(Player.class))
{
if (character.getMoveSpeed() == 0)
player.sendPacket(new ServerObjectInfo((Npc) character, player));
else
player.sendPacket(new NpcInfo((Npc) character, player));
}
}
}
@Override
protected void onExit(Creature character)
{
character.setInsideZone(ZoneId.WATER, false);
if (character instanceof Player)
((Player) character).broadcastUserInfo();
else if (character instanceof Npc)
{
for (Player player : character.getKnownType(Player.class))
{
if (character.getMoveSpeed() == 0)
player.sendPacket(new ServerObjectInfo((Npc) character, player));
else
player.sendPacket(new NpcInfo((Npc) character, player));
}
}
}
@Override
public void onDieInside(Creature character)
{
}
@Override
public void onReviveInside(Creature character)
{
}
public int getWaterZ()
{
return getZone().getHighZ();
}
} | [
"wande@DESKTOP-DM71DUV"
] | wande@DESKTOP-DM71DUV |
a57afae5c57269219187cf9c195a52c085e02b24 | 86c01941aa884489dc81e480e27b77f47b77529f | /vista/src/vista/gui/DocumentOutputStream.java | 008748cde32d58b51dc5cb0636e9ee8d7be8c91f | [] | no_license | CADWRDeltaModeling/dsm2-vista | cdcb3135a4bc8ed2af0d9a5242411b9aadf3e986 | 5115fbae9edae5fa1d90ed795687fd74e69d5051 | refs/heads/master | 2023-05-25T13:01:31.466663 | 2023-05-18T18:51:40 | 2023-05-18T18:51:40 | 32,541,476 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,766 | java | /*
Copyright (C) 1996-2000 State of California, Department of
Water Resources.
VISTA : A VISualization Tool and Analyzer.
Version 1.0
by Nicky Sandhu
California Dept. of Water Resources
Division of Planning, Delta Modeling Section
1416 Ninth Street
Sacramento, CA 95814
(916)-653-7552
nsandhu@water.ca.gov
Send bug reports to nsandhu@water.ca.gov
This program is licensed to you under the terms of the GNU General
Public License, version 2, as published by the Free Software
Foundation.
You should have received a copy of the GNU General Public License
along with this program; if not, contact Dr. Francis Chung, below,
or the Free Software Foundation, 675 Mass Ave, Cambridge, MA
02139, USA.
THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED BY THE CALIFORNIA
DEPARTMENT OF WATER RESOURCES AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CALIFORNIA
DEPARTMENT OF WATER RESOURCES OR ITS CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OR SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
For more information about VISTA, contact:
Dr. Francis Chung
California Dept. of Water Resources
Division of Planning, Delta Modeling Section
1416 Ninth Street
Sacramento, CA 95814
916-653-5601
chung@water.ca.gov
or see our home page: http://wwwdelmod.water.ca.gov/
Send bug reports to nsandhu@water.ca.gov or call (916)-653-7552
*/
package vista.gui;
import java.io.IOException;
import java.io.OutputStream;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
/**
* An OutputStream implementation that places it's output in a swing text model
* (Document). The Document can be either a plain text or styled document
* implementation. If styled, the attributes assigned to the output stream will
* be used in the display of the output.
*
* @author Timothy Prinzing
* @version 1.1 02/05/99
*/
public class DocumentOutputStream extends OutputStream {
/**
* Constructs an output stream that will output to the given document with
* the given set of character attributes.
*
* @param doc
* the document to write to.
* @param a
* the character attributes to use for the written text.
*/
public DocumentOutputStream(Document doc, AttributeSet a) {
this.doc = doc;
this.a = a;
}
/**
* Constructs an output stream that will output to the given document with
* whatever the default attributes are.
*
* @param doc
* the document to write to.
*/
public DocumentOutputStream(Document doc) {
this(doc, null);
}
/**
* Writes the specified byte to this output stream.
* <p>
* Subclasses of <code>OutputStream</code> must provide an implementation
* for this method.
*
* @param b
* the <code>byte</code>.
* @exception IOException
* if an I/O error occurs.
* @since JDK1.0
*/
public void write(int b) throws IOException {
one[0] = (byte) b;
write(one, 0, 1);
}
/**
* Writes <code>len</code> bytes from the specified byte array starting at
* offset <code>off</code> to this output stream.
* <p>
* The <code>write</code> method of <code>OutputStream</code> calls the
* write method of one argument on each of the bytes to be written out.
* Subclasses are encouraged to override this method and provide a more
* efficient implementation.
*
* @param b
* the data.
* @param off
* the start offset in the data.
* @param len
* the number of bytes to write.
* @exception IOException
* if an I/O error occurs.
* @since JDK1.0
*/
public void write(byte b[], int off, int len) throws IOException {
try {
doc.insertString(doc.getLength(), new String(b, off, len), a);
} catch (BadLocationException ble) {
throw new IOException(ble.getMessage());
}
}
private byte[] one = new byte[1];
private Document doc;
private AttributeSet a;
}
| [
"psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06"
] | psandhu@water.ca.gov@103a348e-0cfb-11df-a5af-b38b39d06e06 |
581bf3dd50b2064d210128fcb5d663480594bb2f | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-new-fitness/results/XWIKI-13316-1-25-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/com/xpn/xwiki/internal/skin/EnvironmentSkin_ESTest.java | 49f261483c5a3951d6dcbc469ed75cf7e60bcd5b | [
"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 | 1,859 | java | /*
* This file was automatically generated by EvoSuite
* Sun May 17 21:10:09 UTC 2020
*/
package com.xpn.xwiki.internal.skin;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.internal.skin.EnvironmentSkin;
import com.xpn.xwiki.internal.skin.InternalSkinConfiguration;
import com.xpn.xwiki.internal.skin.InternalSkinManager;
import javax.inject.Provider;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.xwiki.environment.Environment;
import org.xwiki.rendering.syntax.SyntaxFactory;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class EnvironmentSkin_ESTest extends EnvironmentSkin_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
InternalSkinManager internalSkinManager0 = mock(InternalSkinManager.class, new ViolatedAssumptionAnswer());
InternalSkinConfiguration internalSkinConfiguration0 = mock(InternalSkinConfiguration.class, new ViolatedAssumptionAnswer());
Logger logger0 = mock(Logger.class, new ViolatedAssumptionAnswer());
SyntaxFactory syntaxFactory0 = mock(SyntaxFactory.class, new ViolatedAssumptionAnswer());
Provider<XWikiContext> provider0 = (Provider<XWikiContext>) mock(Provider.class, new ViolatedAssumptionAnswer());
EnvironmentSkin environmentSkin0 = new EnvironmentSkin("@u%eF4IiD;WO1M", internalSkinManager0, internalSkinConfiguration0, logger0, syntaxFactory0, (Environment) null, provider0);
// Undeclared exception!
environmentSkin0.getOutputSyntaxString();
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
b224d5625473bca6ae205f17f90de206a03f47be | 6616059dbdfa40b5601fd5fa3d608770586ca378 | /src/main/java/org/sdo/rendezvous/enums/ErrorCodes.java | 7fcc32fb08ac9166243cc43ae16d8f4ed362cd83 | [
"Apache-2.0"
] | permissive | Darshini-Parikh93/rendezvous-service | 3af8b373de0db7ebe44c28892544ef163ff6cdf2 | 0b670375df67e9130519c05bffba886da5d3f1ce | refs/heads/master | 2023-05-28T04:54:06.001954 | 2020-06-01T04:36:01 | 2020-06-01T04:36:01 | 264,828,316 | 1 | 0 | Apache-2.0 | 2020-06-01T04:36:03 | 2020-05-18T04:42:46 | null | UTF-8 | Java | false | false | 1,281 | java | // Copyright 2019 Intel Corporation
// SPDX-License-Identifier: Apache 2.0
package org.sdo.rendezvous.enums;
import java.util.Arrays;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ErrorCodes {
UNKNOWN_ERROR((short) 0),
INVALID_JWT_TOKEN((short) 1),
INVALID_OWNERSHIP_VOUCHER((short) 2),
INVALID_OWNER_SIGN_BODY((short) 3),
INVALID_IP_ADDRESS((short) 4),
INVALID_GUID((short) 5),
RESOURCE_NOT_FOUND((short) 6),
MESSAGE_BODY_ERROR((short) 100),
INVALID_MESSAGE_ERROR((short) 101),
GENERIC_ERROR((short) 500);
private short value;
private static final String UNKNOWN_ERROR_MESSAGE = "Unknown error code";
/**
* Returns the description of error message as string.
*
* @param errorCodeId the id of error code
* @return error message
*/
public static String getDescriptionById(short errorCodeId) {
ErrorCodes ec =
Arrays.stream(values())
.filter(errorType -> errorType.value == errorCodeId)
.findFirst()
.orElse(UNKNOWN_ERROR);
if (ec == ErrorCodes.UNKNOWN_ERROR) {
return UNKNOWN_ERROR_MESSAGE;
} else {
return ec.name();
}
}
@Override
public String toString() {
return value + "(" + name() + ")";
}
}
| [
"tushar.ranjan.behera@intel.com"
] | tushar.ranjan.behera@intel.com |
23d259177f894a7fd34c96b2d19d668a2f92cca2 | 53e0056c0696b3fbdc663567937f8cfd973d48cb | /src/main/java/org/docksidestage/mysql/dbflute/cbean/cq/ciq/VendorConstraintNameAutoFooCIQ.java | 0ca1bf79ca277ead314b6d976fba246d28f91245 | [
"Apache-2.0"
] | permissive | dbflute-test/dbflute-test-dbms-mysql | cc22df45e25990f6f17b44dea38bd0888d464d48 | 096950eb304b0be8225ecebe90202ccfc27f6032 | refs/heads/master | 2023-08-10T23:56:02.770203 | 2023-07-19T18:43:53 | 2023-07-19T18:43:53 | 25,118,057 | 0 | 0 | Apache-2.0 | 2022-06-21T07:16:23 | 2014-10-12T11:58:50 | Java | UTF-8 | Java | false | false | 6,513 | java | /*
* Copyright 2004-2013 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.docksidestage.mysql.dbflute.cbean.cq.ciq;
import java.util.Map;
import org.dbflute.cbean.*;
import org.dbflute.cbean.ckey.*;
import org.dbflute.cbean.coption.ConditionOption;
import org.dbflute.cbean.cvalue.ConditionValue;
import org.dbflute.cbean.sqlclause.SqlClause;
import org.dbflute.exception.IllegalConditionBeanOperationException;
import org.docksidestage.mysql.dbflute.cbean.*;
import org.docksidestage.mysql.dbflute.cbean.cq.bs.*;
import org.docksidestage.mysql.dbflute.cbean.cq.*;
/**
* The condition-query for in-line of vendor_constraint_name_auto_foo.
* @author DBFlute(AutoGenerator)
*/
public class VendorConstraintNameAutoFooCIQ extends AbstractBsVendorConstraintNameAutoFooCQ {
// ===================================================================================
// Attribute
// =========
protected BsVendorConstraintNameAutoFooCQ _myCQ;
// ===================================================================================
// Constructor
// ===========
public VendorConstraintNameAutoFooCIQ(ConditionQuery referrerQuery, SqlClause sqlClause
, String aliasName, int nestLevel, BsVendorConstraintNameAutoFooCQ myCQ) {
super(referrerQuery, sqlClause, aliasName, nestLevel);
_myCQ = myCQ;
_foreignPropertyName = _myCQ.xgetForeignPropertyName(); // accept foreign property name
_relationPath = _myCQ.xgetRelationPath(); // accept relation path
_inline = true;
}
// ===================================================================================
// Override about Register
// =======================
protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq)
{ throw new IllegalConditionBeanOperationException("InlineView cannot use Union: " + bq + " : " + uq); }
@Override
protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col)
{ regIQ(k, v, cv, col); }
@Override
protected void setupConditionValueAndRegisterWhereClause(ConditionKey k, Object v, ConditionValue cv, String col, ConditionOption op)
{ regIQ(k, v, cv, col, op); }
@Override
protected void registerWhereClause(String wc)
{ registerInlineWhereClause(wc); }
@Override
protected boolean isInScopeRelationSuppressLocalAliasName() {
if (_onClause) { throw new IllegalConditionBeanOperationException("InScopeRelation on OnClause is unsupported."); }
return true;
}
// ===================================================================================
// Override about Query
// ====================
protected ConditionValue xgetCValueConstraintNameAutoFooId() { return _myCQ.xdfgetConstraintNameAutoFooId(); }
public String keepConstraintNameAutoFooId_ExistsReferrer_VendorConstraintNameAutoRefList(VendorConstraintNameAutoRefCQ sq)
{ throwIICBOE("ExistsReferrer"); return null; }
public String keepConstraintNameAutoFooId_NotExistsReferrer_VendorConstraintNameAutoRefList(VendorConstraintNameAutoRefCQ sq)
{ throwIICBOE("NotExistsReferrer"); return null; }
public String keepConstraintNameAutoFooId_SpecifyDerivedReferrer_VendorConstraintNameAutoRefList(VendorConstraintNameAutoRefCQ sq)
{ throwIICBOE("(Specify)DerivedReferrer"); return null; }
public String keepConstraintNameAutoFooId_QueryDerivedReferrer_VendorConstraintNameAutoRefList(VendorConstraintNameAutoRefCQ sq)
{ throwIICBOE("(Query)DerivedReferrer"); return null; }
public String keepConstraintNameAutoFooId_QueryDerivedReferrer_VendorConstraintNameAutoRefListParameter(Object vl)
{ throwIICBOE("(Query)DerivedReferrer"); return null; }
protected ConditionValue xgetCValueConstraintNameAutoFooName() { return _myCQ.xdfgetConstraintNameAutoFooName(); }
protected Map<String, Object> xfindFixedConditionDynamicParameterMap(String pp) { return null; }
public String keepScalarCondition(VendorConstraintNameAutoFooCQ sq)
{ throwIICBOE("ScalarCondition"); return null; }
public String keepSpecifyMyselfDerived(VendorConstraintNameAutoFooCQ sq)
{ throwIICBOE("(Specify)MyselfDerived"); return null;}
public String keepQueryMyselfDerived(VendorConstraintNameAutoFooCQ sq)
{ throwIICBOE("(Query)MyselfDerived"); return null;}
public String keepQueryMyselfDerivedParameter(Object vl)
{ throwIICBOE("(Query)MyselfDerived"); return null;}
public String keepMyselfExists(VendorConstraintNameAutoFooCQ sq)
{ throwIICBOE("MyselfExists"); return null;}
protected void throwIICBOE(String name)
{ throw new IllegalConditionBeanOperationException(name + " at InlineView is unsupported."); }
// ===================================================================================
// Very Internal
// =============
// very internal (for suppressing warn about 'Not Use Import')
protected String xinCB() { return VendorConstraintNameAutoFooCB.class.getName(); }
protected String xinCQ() { return VendorConstraintNameAutoFooCQ.class.getName(); }
}
| [
"dbflute@gmail.com"
] | dbflute@gmail.com |
9474c29b57a0dfc31a11a5370703bd4b3d8ab1b0 | fea683c0ec66ff872b001f39fba4bd0f5a772176 | /jpuppeteer-cdp/src/main/java/jpuppeteer/cdp/cdp/domain/ServiceWorker.java | 4ef62c581a3d92c47e59754440abf0dd23765b98 | [] | no_license | affjerry/jpuppeteer | c343f64636eabdf5c3da52b6c0d660054d837894 | 5dbd900862035b4403b975f91f1b18938b19f08b | refs/heads/master | 2023-08-15T23:45:39.292666 | 2020-05-27T01:48:41 | 2020-05-27T01:48:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,830 | java | package jpuppeteer.cdp.cdp.domain;
/**
* experimental
*/
public class ServiceWorker {
private jpuppeteer.cdp.CDPSession session;
public ServiceWorker(jpuppeteer.cdp.CDPSession session) {
this.session = session;
}
/**
* experimental
*/
public void deliverPushMessage(jpuppeteer.cdp.cdp.entity.serviceworker.DeliverPushMessageRequest request, int timeout) throws Exception {
session.send("ServiceWorker.deliverPushMessage", request, timeout);
}
public java.util.concurrent.Future<Void> asyncDeliverPushMessage(jpuppeteer.cdp.cdp.entity.serviceworker.DeliverPushMessageRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.deliverPushMessage", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void disable(int timeout) throws Exception {
session.send("ServiceWorker.disable", null, timeout);
}
public java.util.concurrent.Future<Void> asyncDisable() {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.disable");
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void dispatchSyncEvent(jpuppeteer.cdp.cdp.entity.serviceworker.DispatchSyncEventRequest request, int timeout) throws Exception {
session.send("ServiceWorker.dispatchSyncEvent", request, timeout);
}
public java.util.concurrent.Future<Void> asyncDispatchSyncEvent(jpuppeteer.cdp.cdp.entity.serviceworker.DispatchSyncEventRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.dispatchSyncEvent", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void dispatchPeriodicSyncEvent(jpuppeteer.cdp.cdp.entity.serviceworker.DispatchPeriodicSyncEventRequest request, int timeout) throws Exception {
session.send("ServiceWorker.dispatchPeriodicSyncEvent", request, timeout);
}
public java.util.concurrent.Future<Void> asyncDispatchPeriodicSyncEvent(jpuppeteer.cdp.cdp.entity.serviceworker.DispatchPeriodicSyncEventRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.dispatchPeriodicSyncEvent", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void enable(int timeout) throws Exception {
session.send("ServiceWorker.enable", null, timeout);
}
public java.util.concurrent.Future<Void> asyncEnable() {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.enable");
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void inspectWorker(jpuppeteer.cdp.cdp.entity.serviceworker.InspectWorkerRequest request, int timeout) throws Exception {
session.send("ServiceWorker.inspectWorker", request, timeout);
}
public java.util.concurrent.Future<Void> asyncInspectWorker(jpuppeteer.cdp.cdp.entity.serviceworker.InspectWorkerRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.inspectWorker", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void setForceUpdateOnPageLoad(jpuppeteer.cdp.cdp.entity.serviceworker.SetForceUpdateOnPageLoadRequest request, int timeout) throws Exception {
session.send("ServiceWorker.setForceUpdateOnPageLoad", request, timeout);
}
public java.util.concurrent.Future<Void> asyncSetForceUpdateOnPageLoad(jpuppeteer.cdp.cdp.entity.serviceworker.SetForceUpdateOnPageLoadRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.setForceUpdateOnPageLoad", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void skipWaiting(jpuppeteer.cdp.cdp.entity.serviceworker.SkipWaitingRequest request, int timeout) throws Exception {
session.send("ServiceWorker.skipWaiting", request, timeout);
}
public java.util.concurrent.Future<Void> asyncSkipWaiting(jpuppeteer.cdp.cdp.entity.serviceworker.SkipWaitingRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.skipWaiting", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void startWorker(jpuppeteer.cdp.cdp.entity.serviceworker.StartWorkerRequest request, int timeout) throws Exception {
session.send("ServiceWorker.startWorker", request, timeout);
}
public java.util.concurrent.Future<Void> asyncStartWorker(jpuppeteer.cdp.cdp.entity.serviceworker.StartWorkerRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.startWorker", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void stopAllWorkers(int timeout) throws Exception {
session.send("ServiceWorker.stopAllWorkers", null, timeout);
}
public java.util.concurrent.Future<Void> asyncStopAllWorkers() {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.stopAllWorkers");
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void stopWorker(jpuppeteer.cdp.cdp.entity.serviceworker.StopWorkerRequest request, int timeout) throws Exception {
session.send("ServiceWorker.stopWorker", request, timeout);
}
public java.util.concurrent.Future<Void> asyncStopWorker(jpuppeteer.cdp.cdp.entity.serviceworker.StopWorkerRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.stopWorker", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void unregister(jpuppeteer.cdp.cdp.entity.serviceworker.UnregisterRequest request, int timeout) throws Exception {
session.send("ServiceWorker.unregister", request, timeout);
}
public java.util.concurrent.Future<Void> asyncUnregister(jpuppeteer.cdp.cdp.entity.serviceworker.UnregisterRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.unregister", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
/**
* experimental
*/
public void updateRegistration(jpuppeteer.cdp.cdp.entity.serviceworker.UpdateRegistrationRequest request, int timeout) throws Exception {
session.send("ServiceWorker.updateRegistration", request, timeout);
}
public java.util.concurrent.Future<Void> asyncUpdateRegistration(jpuppeteer.cdp.cdp.entity.serviceworker.UpdateRegistrationRequest request) {
java.util.concurrent.Future<com.alibaba.fastjson.JSONObject> future = session.asyncSend("ServiceWorker.updateRegistration", request);
return new jpuppeteer.cdp.CDPFuture<Void>(future, Void.class);
}
} | [
"jarvis.xu@vipshop.com"
] | jarvis.xu@vipshop.com |
71ca96358d39dd87760d204f25dc63f7a9aabc41 | bb450bef04f1fab24a03858343f3e8fd9c5061ee | /tests/sources/local/java/8_checkpoint_policy_15seconds_deadline/src/main/java/checkpointPolicyEvery15secondsDeadline/SimpleImpl.java | 781bc981e6b50d56fff337695ce7cf7e41bfc748 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | bsc-wdc/compss | c02b1c6a611ed50d5f75716d35bd8201889ae9d8 | 5f7a31436d0e6f5acbeb66fa36ab8aad18dc4092 | refs/heads/stable | 2023-08-16T02:51:46.073185 | 2023-08-04T21:43:31 | 2023-08-04T21:43:31 | 123,949,037 | 39 | 21 | Apache-2.0 | 2022-07-05T04:08:53 | 2018-03-05T16:44:51 | Java | UTF-8 | Java | false | false | 818 | java | package checkpointPolicyEvery15secondsDeadline;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.FileNotFoundException;
public class SimpleImpl {
public static void increment(String counterFile) {
// Read value
try {
FileInputStream fis = new FileInputStream(counterFile);
int count = fis.read();
fis.close();
// Write new value
FileOutputStream fos = new FileOutputStream(counterFile);
fos.write(++count);
fos.close();
} catch (FileNotFoundException fnfe) {
fnfe.printStackTrace();
System.exit(-1);
} catch (IOException ioe) {
ioe.printStackTrace();
System.exit(-1);
}
}
}
| [
"francesc.lordan@gmail.com"
] | francesc.lordan@gmail.com |
3b25a606206532a1327aba4786c88cfba4cb4826 | 719cf27ec2c7fee79be76fc751f1d280ecd73885 | /wsrp1-ws/src/main/java/org/oasis/wsrp/v1/V1StateChange.java | f8ccf1a58f65cd770b89db49d4640b9b5610fc43 | [] | no_license | gatein/gatein-wsrp | 1b2d9c3e63be553da00c7fe2b5c3d1adba5afede | fa0edeed1b82763b4d7bbfc82233e8cae5a73918 | refs/heads/master | 2020-12-23T01:29:45.344725 | 2016-09-20T11:54:04 | 2016-09-20T11:54:04 | 4,052,579 | 0 | 4 | null | 2017-07-19T13:20:19 | 2012-04-17T13:11:29 | Java | UTF-8 | Java | false | false | 2,307 | java |
/*
* JBoss, a division of Red Hat
* Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.oasis.wsrp.v1;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for StateChange.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="StateChange">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="readWrite"/>
* <enumeration value="cloneBeforeWrite"/>
* <enumeration value="readOnly"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "StateChange")
@XmlEnum
public enum V1StateChange {
@XmlEnumValue("readWrite")
READ_WRITE("readWrite"),
@XmlEnumValue("cloneBeforeWrite")
CLONE_BEFORE_WRITE("cloneBeforeWrite"),
@XmlEnumValue("readOnly")
READ_ONLY("readOnly");
private final String value;
V1StateChange(String v) {
value = v;
}
public String value() {
return value;
}
public static V1StateChange fromValue(String v) {
for (V1StateChange c: V1StateChange.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"metacosm@gmail.com"
] | metacosm@gmail.com |
89c138f51d5033c1db7656f488166f014e927734 | 9322a162a1a1117e29d58bf6970a06f3e98247f5 | /src/main/java/uz/pdp/appatmsystem/service/EmployeeService.java | 6e02dfe6e56f5e2d5fb25dc033b2e827e8eccade | [] | no_license | Muhammad0224/app-atm-system | 5551ac35732bde2b7eed33b280581217160d3640 | a3219d4771e6dc071b613663d66076fb149bb793 | refs/heads/master | 2023-07-07T18:13:33.943387 | 2021-08-18T11:09:05 | 2021-08-18T11:09:05 | 397,568,141 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 211 | java | package uz.pdp.appatmsystem.service;
import uz.pdp.appatmsystem.model.ApiResponse;
import uz.pdp.appatmsystem.model.EmployeeDto;
public interface EmployeeService {
ApiResponse register(EmployeeDto dto);
}
| [
"murtazayevmuhammad@gmail.com"
] | murtazayevmuhammad@gmail.com |
e170ca6614a76886068f565ae31a8640c9c8ce49 | 3fd5c650e79da86d127b121c61160c2291c77828 | /2015-6-1-runescape-bots/me.rabrg.agility/src/me/rabrg/agility/gnome/ObstaclePipeNode.java | 406d7557b0d99239b218c354c9d57ec97184d5cf | [] | no_license | jxofficial/rs-scripts-project-archive | dd85145de99e49616113efb2763900f09a0061d6 | de8a460577761126135ec1d1d8e2223d9b0a26d9 | refs/heads/master | 2021-10-28T03:50:16.517017 | 2019-04-21T20:49:12 | 2019-04-21T20:49:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,253 | java | package me.rabrg.agility.gnome;
import org.dreambot.api.methods.Calculations;
import org.dreambot.api.methods.MethodContext;
import org.dreambot.api.methods.MethodProvider;
import org.dreambot.api.utilities.impl.Condition;
import org.dreambot.api.wrappers.interactive.GameObject;
public final class ObstaclePipeNode extends GnomeNode {
private GameObject obstaclePipe;
public ObstaclePipeNode(final MethodContext ctx) {
super(ctx);
}
@Override
public boolean validate() {
return OBSTACLE_PIPE_AREA.contains(ctx.getLocalPlayer()) && (obstaclePipe = ctx.getGameObjects().closest("Obstacle pipe")) != null;
}
@Override
public int execute() {
if (obstaclePipe.distance() > 5) {
ctx.getWalking().walk(obstaclePipe);
return Calculations.random(600, 1800);
} else if (!obstaclePipe.isOnScreen()) {
ctx.getCamera().rotateToEntity(obstaclePipe);
} else if (obstaclePipe.interactForceRight("Squeeze-through")) {
MethodProvider.sleepUntil(new Condition() {
@Override
public boolean verify() {
return OBSTACLE_NET_UP_AREA.contains(ctx.getLocalPlayer());
}
}, Calculations.random(5400, 7200));
}
return Calculations.random(0, 225);
}
@Override
public String getName() {
return "Obstacle pipe";
}
}
| [
"rabrg96@gmail.com"
] | rabrg96@gmail.com |
0f749d99d7db69bbbe36cecdd58ef26c2b7508c7 | 8048dc07dbbe351a8624eb8870958e20b24d9141 | /spring-restdocs-core/src/main/java/org/springframework/restdocs/hypermedia/ContentTypeLinkExtractor.java | fa8e5c6a745d6eb2346805d6fbe504bad89f409a | [
"Apache-2.0"
] | permissive | hubelias/spring-restdocs | b985749a18ecfddc7788645e69de5ce3a30da39a | 080156432142bae24861c19b0805bb36dd7642c9 | refs/heads/master | 2022-02-21T06:09:14.119190 | 2019-08-13T09:16:53 | 2019-08-13T09:16:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,330 | java | /*
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.restdocs.hypermedia;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.springframework.http.MediaType;
import org.springframework.restdocs.operation.OperationResponse;
/**
* {@link LinkExtractor} that delegates to other link extractors based on the response's
* content type.
*
* @author Andy Wilkinson
*/
class ContentTypeLinkExtractor implements LinkExtractor {
private Map<MediaType, LinkExtractor> linkExtractors = new HashMap<>();
ContentTypeLinkExtractor() {
this.linkExtractors.put(MediaType.APPLICATION_JSON, new AtomLinkExtractor());
this.linkExtractors.put(HalLinkExtractor.HAL_MEDIA_TYPE, new HalLinkExtractor());
}
ContentTypeLinkExtractor(Map<MediaType, LinkExtractor> linkExtractors) {
this.linkExtractors.putAll(linkExtractors);
}
@Override
public Map<String, List<Link>> extractLinks(OperationResponse response)
throws IOException {
MediaType contentType = response.getHeaders().getContentType();
LinkExtractor extractorForContentType = getExtractorForContentType(contentType);
if (extractorForContentType != null) {
return extractorForContentType.extractLinks(response);
}
throw new IllegalStateException(
"No LinkExtractor has been provided and one is not available for the "
+ "content type " + contentType);
}
private LinkExtractor getExtractorForContentType(MediaType contentType) {
if (contentType != null) {
for (Entry<MediaType, LinkExtractor> entry : this.linkExtractors.entrySet()) {
if (contentType.isCompatibleWith(entry.getKey())) {
return entry.getValue();
}
}
}
return null;
}
}
| [
"awilkinson@pivotal.io"
] | awilkinson@pivotal.io |
7f890f51d197e13c2c2b11cccc458ece71f0f63b | 3fc95dc07b0fad7164596651c5ef194a1eeceff8 | /sl-build/src/main/java/com/sl/ue/hj/entity/Entity3.java | ce760908d4fcad72fd0933ce902ba0e1595e27af | [] | no_license | li912583940/hjxt | 2c44c667e88f71727ede051dd86955e93751b00a | 551f9f1140ce00602c7f59530b3ac267ea1c85f7 | refs/heads/master | 2020-03-07T05:26:57.169822 | 2019-05-20T13:20:26 | 2019-05-20T13:20:26 | 127,296,158 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,533 | java | package com.sl.ue.hj.entity;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
public class Entity3 {
private String path ="G:\\声联项目\\hjxt\\HjSystem\\src\\main\\java\\com\\sl\\ue\\entity";
/** 目前直接从实体类读取的*/
public void executeVO(String fileName, String pick){
String startPath = path+"\\"+pick+"\\vo";
File folder = new File(startPath);
if(!folder.exists()){
folder.mkdirs();
}
String url = startPath+"\\"+fileName+"VO.java";
File file = new File(url);
if(file.exists()){
System.out.println("文件已存在: "+url);
}else{
writeFileVO(url, fileName, "."+pick);
}
}
private void writeFileVO(String filePath, String fileName, String _pack){
FileOutputStream fos = null;
PrintWriter pw = null;
try {
File file = new File(filePath);
StringBuffer sb = new StringBuffer();
sb.append("package com.sl.ue.entity"+_pack+".vo;").append("\r\n");
sb.append("\r\n");
sb.append("import com.sl.ue.entity"+_pack+"."+fileName+";").append("\r\n");
sb.append("\r\n");
sb.append("public class "+fileName+"VO extends "+fileName+"{").append("\r\n");
sb.append("\r\n");
sb.append(" /** 序列化 */").append("\r\n");
sb.append(" private static final long serialVersionUID = 1L;").append("\r\n");
sb.append("\r\n");
sb.append("\r\n");
sb.append("\r\n");
sb.append(" /*--------------------------- 处理关联表 -----------------------------*/").append("\r\n");
sb.append("\r\n");
sb.append(" private String leftJoinField; // 关联表字段").append("\r\n");
sb.append("\r\n");
sb.append(" private String leftJoinTable; // 关联表").append("\r\n");
sb.append("\r\n");
sb.append(" private String leftJoinWhere; // 关联表条件").append("\r\n");
sb.append("\r\n");
sb.append(" public String getLeftJoinField() {").append("\r\n");
sb.append(" return leftJoinField;").append("\r\n");
sb.append(" }").append("\r\n");
sb.append("\r\n");
sb.append(" public void setLeftJoinField(String leftJoinField) {").append("\r\n");
sb.append(" this.leftJoinField = leftJoinField;").append("\r\n");
sb.append(" }").append("\r\n");
sb.append("\r\n");
sb.append(" public String getLeftJoinTable() {").append("\r\n");
sb.append(" return leftJoinTable;").append("\r\n");
sb.append(" }").append("\r\n");
sb.append("\r\n");
sb.append(" public void setLeftJoinTable(String leftJoinTable) {").append("\r\n");
sb.append(" this.leftJoinTable = leftJoinTable;").append("\r\n");
sb.append(" }").append("\r\n");
sb.append("\r\n");
sb.append(" public String getLeftJoinWhere() {").append("\r\n");
sb.append(" return leftJoinWhere;").append("\r\n");
sb.append(" }").append("\r\n");
sb.append("\r\n");
sb.append(" public void setLeftJoinWhere(String leftJoinWhere) {").append("\r\n");
sb.append(" this.leftJoinWhere = leftJoinWhere;").append("\r\n");
sb.append(" }").append("\r\n");
sb.append("\r\n");
sb.append("\r\n");
sb.append("}").append("\r\n");
fos = new FileOutputStream(file);
pw= new PrintWriter(fos);
pw.write(sb.toString().toCharArray());
pw.flush();
} catch (Exception e) {
e.printStackTrace();
}finally{
if(pw != null){
pw.close();
}
if(fos != null){
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
| [
"912583940@qq.com"
] | 912583940@qq.com |
934ef8adfbf6911608e7efd2fb48468d3d5ccadc | 26794b8589cc64d84d2092404ec74d8020a02fd0 | /app/src/main/java/lk/aditi/ecom/models/RemovetoCartResponse.java | 02acf6a698fdf63233600eb9b8f5bc8e41d4b9f6 | [] | no_license | technorizenshesh/Aditi_User | db53b6d8e659ad4fe8afe75baba00832bc33a837 | 1eef470cda1170bd2ba8d4f0c9cd98ceb615ce23 | refs/heads/master | 2023-07-30T05:43:49.755661 | 2021-09-20T13:23:28 | 2021-09-20T13:23:28 | 408,447,324 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 832 | java | package lk.aditi.ecom.models;
import com.google.gson.annotations.SerializedName;
public class RemovetoCartResponse{
@SerializedName("result")
private String result;
@SerializedName("message")
private String message;
@SerializedName("status")
private String status;
public void setResult(String result){
this.result = result;
}
public String getResult(){
return result;
}
public void setMessage(String message){
this.message = message;
}
public String getMessage(){
return message;
}
public void setStatus(String status){
this.status = status;
}
public String getStatus(){
return status;
}
@Override
public String toString(){
return
"RemovetoCartResponse{" +
"result = '" + result + '\'' +
",message = '" + message + '\'' +
",status = '" + status + '\'' +
"}";
}
} | [
"ak4729176@gmail.com"
] | ak4729176@gmail.com |
2ab3a42345da57a5a1f230edbac48b2743240a71 | 70063cffef398af7d3e5bf288ad7ce3c10392777 | /app/src/main/java/qtc/project/pos_mobile/model/CustomerModel.java | c1aed64c82315bcf6d9e4c773e343c6baea643db | [] | no_license | dinhdeveloper/pos_mobile | 1a2dfb92de3fab222c901c47bc2b5c0f64115b9f | e80f17329ce2a5f8d0dcea8f52cffef5fdcb6b68 | refs/heads/master | 2022-12-16T07:52:15.047899 | 2020-09-26T08:08:37 | 2020-09-26T08:08:37 | 288,605,558 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,642 | java | package qtc.project.pos_mobile.model;
public class CustomerModel extends BaseResponseModel {
private String id = "";
private String id_code= "";
private String id_business= "";
private String full_name= "";
private String email= "";
private String phone_number= "";
private String address= "";
private String birthday= "";
private String level_id= "";
private String level_code= "";
private String level_name= "";
private String level_discount= "";
private String level_description= "";
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getId_business() {
return id_business;
}
public void setId_business(String id_business) {
this.id_business = id_business;
}
public String getId_code() {
return id_code;
}
public void setId_code(String id_code) {
this.id_code = id_code;
}
public String getFull_name() {
return full_name;
}
public void setFull_name(String full_name) {
this.full_name = full_name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone_number() {
return phone_number;
}
public void setPhone_number(String phone_number) {
this.phone_number = phone_number;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getLevel_id() {
return level_id;
}
public void setLevel_id(String level_id) {
this.level_id = level_id;
}
public String getLevel_code() {
return level_code;
}
public void setLevel_code(String level_code) {
this.level_code = level_code;
}
public String getLevel_name() {
return level_name;
}
public void setLevel_name(String level_name) {
this.level_name = level_name;
}
public String getLevel_discount() {
return level_discount;
}
public void setLevel_discount(String level_discount) {
this.level_discount = level_discount;
}
public String getLevel_description() {
return level_description;
}
public void setLevel_description(String level_description) {
this.level_description = level_description;
}
}
| [
"dinhtrancntt@gmail.com"
] | dinhtrancntt@gmail.com |
ab446226fc0b442dcd39a6ef4994f4f0154e29ba | 3a0bfd5e7c40d1b0b2917ad4a10e9f1680f18433 | /MIO/AS2/src/main/java/com/asinfo/as2/dao/SecuenciaDao.java | 08b39a98198f47c6b5bf8b1cee6a695b2b6beb5f | [] | no_license | CynPa/gambaSoftware | 983827a718058261c1f11eb63991d4be76423139 | 61ae4f46bc5fdf8d44ad678c4dd67a0a4a89aa6b | refs/heads/master | 2021-09-03T16:42:41.120391 | 2018-01-10T14:25:24 | 2018-01-10T14:25:24 | 109,645,375 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,211 | java | /* 1: */ package com.asinfo.as2.dao;
/* 2: */
/* 3: */ import com.asinfo.as2.entities.Secuencia;
/* 4: */ import javax.ejb.Stateless;
/* 5: */ import javax.persistence.EntityManager;
/* 6: */ import javax.persistence.Query;
/* 7: */
/* 8: */ @Stateless
/* 9: */ public class SecuenciaDao
/* 10: */ extends AbstractDaoAS2<Secuencia>
/* 11: */ {
/* 12: */ public SecuenciaDao()
/* 13: */ {
/* 14:32 */ super(Secuencia.class);
/* 15: */ }
/* 16: */
/* 17: */ public void actualizarSecuencia(Secuencia secuencia, int numero)
/* 18: */ {
/* 19:43 */ Query query = this.em.createQuery("UPDATE Secuencia s SET numero=:numero WHERE s.idSecuencia=:idSecuencia AND :numero>s.numero");
/* 20: */
/* 21: */
/* 22:46 */ query.setParameter("numero", Integer.valueOf(numero));
/* 23:47 */ query.setParameter("idSecuencia", Integer.valueOf(secuencia.getId()));
/* 24: */
/* 25:49 */ query.executeUpdate();
/* 26: */ }
/* 27: */ }
/* Location: C:\backups\AS2(26-10-2017)\WEB-INF\classes\
* Qualified Name: com.asinfo.as2.dao.SecuenciaDao
* JD-Core Version: 0.7.0.1
*/ | [
"Gambalit@DESKTOP-0C2RSIN"
] | Gambalit@DESKTOP-0C2RSIN |
b2d871f035af9341e5ab62229255d9f796272151 | 3ccaf24d7e8cb1452200043a6437ebb895c14610 | /framework.uwt.gwtx/src/org/plazmaforge/framework/uwt/gxt/adapter/GXTCoolBarAdapter.java | 748aa89eda940539aa4b778e6f4a22e48c9e48df | [] | no_license | mmalyutin/nbsframework | 5e58a3d927561fe5f523a108d481f017498a1870 | e0258b62ea5779a146462ee0b27ceb96d1f1ec11 | refs/heads/master | 2020-03-16T02:22:58.460124 | 2018-05-07T10:35:52 | 2018-05-07T10:35:52 | 132,463,700 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,810 | java | /*
* Copyright (C) 2012-2013 Oleh Hapon ohapon@users.sourceforge.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Oleh Hapon
* Kyiv, UKRAINE
* ohapon@users.sourceforge.net
*/
package org.plazmaforge.framework.uwt.gxt.adapter;
import org.plazmaforge.framework.uwt.UIElement;
import org.plazmaforge.framework.uwt.gxt.widget.XCoolBar;
import org.plazmaforge.framework.uwt.widget.Container;
/**
*
* @author ohapon
*
*/
public class GXTCoolBarAdapter extends GXTContainerAdapter {
public Object createDelegate(UIElement parent, UIElement element) {
XCoolBar xCoolBar = new XCoolBar();
addChild(getContent(parent.getDelegate()), xCoolBar, element);
return xCoolBar;
}
@Override
public void setProperty(UIElement element, String name, Object value) {
Object delegate = element.getDelegate();
if (delegate == null) {
return;
}
if (Container.PROPERTY_LAYOUT.equals(name) || Container.PROPERTY_BACKGROUND.equals(name)) {
// ignore
return;
}
super.setProperty(element, name, value);
}
}
| [
"ohapon@d4634b0a-978f-4fb5-935f-1a567c2cf0d6"
] | ohapon@d4634b0a-978f-4fb5-935f-1a567c2cf0d6 |
660e574365f49037cd9a514b68c4696c3e3fe35d | e05b599c10e9ee4203d840c7cd9114f3c50890d5 | /src/main/java/com/vertx/sample/MyFirstVerticle.java | d4529d0c41e323727320dddbe9da15a2828390ac | [] | no_license | dickanirwansyah/hello-vertx-rxJava | a56862d8d8fddd71e2dac484bb44ec0c8947824d | d3e65387fbd84e845e5b98f8a17d5c9353cd8506 | refs/heads/master | 2020-04-01T04:36:25.437521 | 2018-10-13T12:35:46 | 2018-10-13T12:35:46 | 152,870,089 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package com.vertx.sample;
import io.vertx.rxjava.core.AbstractVerticle;
import io.vertx.rxjava.core.http.HttpServer;
public class MyFirstVerticle extends AbstractVerticle {
/** by default
@Override
public void start() throws Exception{
vertx.createHttpServer()
.requestHandler(req -> {
req.response().end("Hallo from "+Thread.currentThread().getName());
}).listen(8080);
}
**/
@Override
public void start() {
HttpServer server = vertx.createHttpServer();
server.requestStream().toObservable()
.subscribe(req -> {
req.response().end("Hello from rxJava Verxt "
+Thread.currentThread().getName());
});
server
.rxListen(8080)
.subscribe();
}
}
| [
"dicka.nirwansyah@fusi24.com"
] | dicka.nirwansyah@fusi24.com |
f8dc51c0baedc8585b998fd46b5f1f1c8c39acba | 5a027c7a6d9afc1bbc8b2bc86e43e96b80dd9fa8 | /workspace_movistar_wl11/zejbVpiStbBa/ejbModule/co/com/telefonica/atiempo/vpistbba/servicios/ejb/sb/ConfCamaraZTEMDBBean.java | 5f927ab2c337112a5952483da15fe77e407b8c5e | [] | no_license | alexcamp/ArrobaTiempoGradle | 00135dc6f101e99026a377adc0d3b690cb5f2bd7 | fc4a845573232e332c5f1211b72216ce227c3f38 | refs/heads/master | 2020-12-31T00:18:57.337668 | 2016-05-27T15:02:04 | 2016-05-27T15:02:04 | 59,520,455 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 537 | java | package co.com.telefonica.atiempo.vpistbba.servicios.ejb.sb;
import co.com.telefonica.atiempo.intf.IServicio;
import co.com.telefonica.atiempo.vpistbba.servicios.ConfCamaraZTEServicio;
/**
* Bean implementation class for Enterprise Bean: ConfCamaraZTEMDB
*/
public class ConfCamaraZTEMDBBean extends
co.com.telefonica.atiempo.utiles.MDServicioBean {
/*
* (sin Javadoc)
*
* @see co.com.telefonica.atiempo.utiles.MDServicioBean#getServicio()
*/
public IServicio getServicio() {
return new ConfCamaraZTEServicio();
}
} | [
"alexander5075@hotmail.com"
] | alexander5075@hotmail.com |
e08b790f4b0cde6cd1ac0f93e9eab7e98a8b536f | 1332e3991b952f1d08d7b45224ac31a30e1845ba | /src/main/java/org/mbari/m3/vars/annotation/mediaplayers/vcr/MediaParamsPaneController.java | 7d08bfc5dd6486e7c813fb910c10462c2455446e | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Jinksi/vars-annotation | b5824cb50052c306501a4be68a8bb4df7ac24f6a | fd4fc42c94a9a1180a3d6db991884a5839d16849 | refs/heads/master | 2020-06-12T15:39:15.379052 | 2019-06-06T17:17:15 | 2019-06-06T17:17:15 | 194,349,315 | 0 | 0 | Apache-2.0 | 2019-06-29T00:57:26 | 2019-06-29T00:57:26 | null | UTF-8 | Java | false | false | 4,626 | java | package org.mbari.m3.vars.annotation.mediaplayers.vcr;
import com.jfoenix.controls.JFXCheckBox;
import com.jfoenix.controls.JFXComboBox;
import com.jfoenix.controls.JFXTextField;
import java.net.URL;
import java.util.Optional;
import java.util.ResourceBundle;
import java.util.function.UnaryOperator;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.TextFormatter;
import javafx.scene.layout.GridPane;
import org.mbari.m3.vars.annotation.Initializer;
import org.mbari.m3.vars.annotation.util.FXMLUtils;
import org.mbari.m3.vars.annotation.util.JFXUtilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Brian Schlining
* @since 2018-03-26T12:05:00
*/
public class MediaParamsPaneController {
private final Logger log = LoggerFactory.getLogger(getClass());
@FXML
private ResourceBundle resources;
@FXML
private URL location;
@FXML
private GridPane root;
@FXML
private JFXComboBox<String> cameraIdComboBox;
@FXML
private JFXTextField deploymentKeyTextField;
@FXML
private JFXTextField tapeNumberTextField;
@FXML
private JFXCheckBox hdCheckBox;
@FXML
private JFXComboBox<String> commportComboBox;
@FXML
void initialize() {
// Allow only numbers to be entered in the text field
UnaryOperator<TextFormatter.Change> filter = change -> {
String text = change.getText();
if (text.matches("[0-9]*")) {
return change;
}
return null;
};
TextFormatter<String> textFormatter1 = new TextFormatter<>(filter);
TextFormatter<String> textFormatter2 = new TextFormatter<>(filter);
deploymentKeyTextField.setTextFormatter(textFormatter1);
tapeNumberTextField.setTextFormatter(textFormatter2);
commportComboBox.setEditable(false);
ObservableList<String> serialPorts = FXCollections.observableArrayList(MediaControlsFactoryImpl.getSerialPorts());
commportComboBox.setItems(serialPorts);
MediaControlsFactoryImplOriginal.getSelectedSerialPort()
.ifPresent(sp -> commportComboBox.getSelectionModel().select(sp));
}
public void refresh() {
Initializer.getToolBox()
.getServices()
.getMediaService()
.findAllCameraIds()
.thenAccept(cameraIds -> {
JFXUtilities.runOnFXThread(() -> {
deploymentKeyTextField.setText(null);
tapeNumberTextField.setText(null);
hdCheckBox.setSelected(true);
final ObservableList<String> items = FXCollections.observableArrayList(cameraIds);
cameraIdComboBox.setItems(items);
updateUiWithDefaults();
});
});
}
public Optional<MediaParams> getMediaParams() {
Optional<MediaParams> params = Optional.empty();
try {
String rov = cameraIdComboBox.getSelectionModel().getSelectedItem();
int diveNumber = Integer.parseInt(deploymentKeyTextField.getText());
int tapeNumber = Integer.parseInt(tapeNumberTextField.getText());
boolean isHd = hdCheckBox.isSelected();
String serialPort = commportComboBox.getSelectionModel().getSelectedItem();
if (rov != null && !rov.isEmpty() &&
serialPort != null && !serialPort.isEmpty()) {
MediaParams mediaParams = new MediaParams(rov, diveNumber,
tapeNumber, isHd, serialPort);
params = Optional.of(mediaParams);
}
}
catch (Exception e) {
log.info("Failed to parse media params", e);
}
return params;
}
public static MediaParamsPaneController newInstance() {
return FXMLUtils.newInstance(MediaParamsPaneController.class,
"/fxml/VcrSettingsPane.fxml");
}
public GridPane getRoot() {
return root;
}
private void updateUiWithDefaults() {
try {
String cameraid = Initializer.getToolBox()
.getConfig()
.getString("app.defaults.cameraid");
cameraIdComboBox.getSelectionModel().select(cameraid);
}
catch (Exception e) {
log.info("No default cameraId was found in the configuration file." +
" (app.defaults.cameraid");
}
}
}
| [
"bschlining@gmail.com"
] | bschlining@gmail.com |
1cb627addbde5e01682ee20459d342b903049bd1 | 83e81c25b1f74f88ed0f723afc5d3f83e7d05da8 | /core/java/com/android/internal/widget/DialogViewAnimator.java | 4508b600fe67a083f15ad478a457a15398be2fd7 | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | Ankits-lab/frameworks_base | 8a63f39a79965c87a84e80550926327dcafb40b7 | 150a9240e5a11cd5ebc9bb0832ce30e9c23f376a | refs/heads/main | 2023-02-06T03:57:44.893590 | 2020-11-14T09:13:40 | 2020-11-14T09:13:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,139 | java | /*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.internal.widget;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ViewAnimator;
import java.util.ArrayList;
/**
* ViewAnimator with a more reasonable handling of MATCH_PARENT.
*/
public class DialogViewAnimator extends ViewAnimator {
private final ArrayList<View> mMatchParentChildren = new ArrayList<>(1);
public DialogViewAnimator(Context context) {
super(context);
}
public DialogViewAnimator(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final boolean measureMatchParentChildren =
MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY ||
MeasureSpec.getMode(heightMeasureSpec) != MeasureSpec.EXACTLY;
int maxHeight = 0;
int maxWidth = 0;
int childState = 0;
// First measure all children and record maximum dimensions where the
// spec isn't MATCH_PARENT.
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
if (getMeasureAllChildren() || child.getVisibility() != GONE) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final boolean matchWidth = lp.width == LayoutParams.MATCH_PARENT;
final boolean matchHeight = lp.height == LayoutParams.MATCH_PARENT;
if (measureMatchParentChildren && (matchWidth || matchHeight)) {
mMatchParentChildren.add(child);
}
measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
// Measured dimensions only count against the maximum
// dimensions if they're not MATCH_PARENT.
int state = 0;
if (measureMatchParentChildren && !matchWidth) {
maxWidth = Math.max(maxWidth, child.getMeasuredWidth()
+ lp.leftMargin + lp.rightMargin);
state |= child.getMeasuredWidthAndState() & MEASURED_STATE_MASK;
}
if (measureMatchParentChildren && !matchHeight) {
maxHeight = Math.max(maxHeight, child.getMeasuredHeight()
+ lp.topMargin + lp.bottomMargin);
state |= (child.getMeasuredHeightAndState() >> MEASURED_HEIGHT_STATE_SHIFT)
& (MEASURED_STATE_MASK >> MEASURED_HEIGHT_STATE_SHIFT);
}
childState = combineMeasuredStates(childState, state);
}
}
// Account for padding too.
maxWidth += getPaddingLeft() + getPaddingRight();
maxHeight += getPaddingTop() + getPaddingBottom();
// Check against our minimum height and width.
maxHeight = Math.max(maxHeight, getSuggestedMinimumHeight());
maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth());
// Check against our foreground's minimum height and width.
final Drawable drawable = getForeground();
if (drawable != null) {
maxHeight = Math.max(maxHeight, drawable.getMinimumHeight());
maxWidth = Math.max(maxWidth, drawable.getMinimumWidth());
}
setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
resolveSizeAndState(maxHeight, heightMeasureSpec,
childState << MEASURED_HEIGHT_STATE_SHIFT));
// Measure remaining MATCH_PARENT children again using real dimensions.
final int matchCount = mMatchParentChildren.size();
for (int i = 0; i < matchCount; i++) {
final View child = mMatchParentChildren.get(i);
final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
final int childWidthMeasureSpec;
if (lp.width == LayoutParams.MATCH_PARENT) {
childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(
getMeasuredWidth() - getPaddingLeft() - getPaddingRight()
- lp.leftMargin - lp.rightMargin,
MeasureSpec.EXACTLY);
} else {
childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
getPaddingLeft() + getPaddingRight() + lp.leftMargin + lp.rightMargin,
lp.width);
}
final int childHeightMeasureSpec;
if (lp.height == LayoutParams.MATCH_PARENT) {
childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(
getMeasuredHeight() - getPaddingTop() - getPaddingBottom()
- lp.topMargin - lp.bottomMargin,
MeasureSpec.EXACTLY);
} else {
childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
getPaddingTop() + getPaddingBottom() + lp.topMargin + lp.bottomMargin,
lp.height);
}
child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
}
mMatchParentChildren.clear();
}
}
| [
"keneankit01@gmail.com"
] | keneankit01@gmail.com |
67d13c0aff4b54c1e5fde63bbb0cf336218c1f30 | b1c1f87e19dec3e06b66b60ea32943ca9fceba81 | /spring-test/src/test/java/org/springframework/test/context/support/ContextLoaderUtilsConfigurationAttributesTests.java | e32515db057502c6268ccce398eb6063c028747e | [
"Apache-2.0"
] | permissive | JunMi/SpringFramework-SourceCode | d50751f79803690301def6478e198693e2ff7348 | 4918e0e6a0676a62fd2a9d95acf6eb4fa5edb82b | refs/heads/master | 2020-06-19T10:55:34.451834 | 2019-07-13T04:32:14 | 2019-07-13T13:11:54 | 196,678,387 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,067 | 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.test.context.support;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.core.annotation.AnnotationConfigurationException;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.ContextConfigurationAttributes;
import org.springframework.test.context.ContextLoader;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.springframework.test.context.support.ContextLoaderUtils.*;
/**
* Unit tests for {@link ContextLoaderUtils} involving {@link ContextConfigurationAttributes}.
*
* @author Sam Brannen
* @since 3.1
*/
public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractContextConfigurationUtilsTests {
@Rule
public final ExpectedException exception = ExpectedException.none();
private void assertLocationsFooAttributes(ContextConfigurationAttributes attributes) {
assertAttributes(attributes, LocationsFoo.class, new String[] { "/foo.xml" }, EMPTY_CLASS_ARRAY,
ContextLoader.class, false);
}
private void assertClassesFooAttributes(ContextConfigurationAttributes attributes) {
assertAttributes(attributes, ClassesFoo.class, EMPTY_STRING_ARRAY, new Class<?>[] {FooConfig.class},
ContextLoader.class, false);
}
private void assertLocationsBarAttributes(ContextConfigurationAttributes attributes) {
assertAttributes(attributes, LocationsBar.class, new String[] {"/bar.xml"}, EMPTY_CLASS_ARRAY,
AnnotationConfigContextLoader.class, true);
}
private void assertClassesBarAttributes(ContextConfigurationAttributes attributes) {
assertAttributes(attributes, ClassesBar.class, EMPTY_STRING_ARRAY, new Class<?>[] {BarConfig.class},
AnnotationConfigContextLoader.class, true);
}
@Test
public void resolveConfigAttributesWithConflictingLocations() {
exception.expect(AnnotationConfigurationException.class);
exception.expectMessage(containsString(ConflictingLocations.class.getName()));
exception.expectMessage(either(
containsString("attribute 'value' and its alias 'locations'")).or(
containsString("attribute 'locations' and its alias 'value'")));
exception.expectMessage(either(
containsString("values of [{x}] and [{y}]")).or(
containsString("values of [{y}] and [{x}]")));
exception.expectMessage(either(
containsString("Different @AliasFor mirror values")).or(
containsString("but only one is permitted")));
resolveContextConfigurationAttributes(ConflictingLocations.class);
}
@Test
public void resolveConfigAttributesWithBareAnnotations() {
Class<BareAnnotations> testClass = BareAnnotations.class;
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(testClass);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
assertAttributes(attributesList.get(0),
testClass, EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, ContextLoader.class, true);
}
@Test
public void resolveConfigAttributesWithLocalAnnotationAndLocations() {
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(LocationsFoo.class);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
assertLocationsFooAttributes(attributesList.get(0));
}
@Test
public void resolveConfigAttributesWithMetaAnnotationAndLocations() {
Class<MetaLocationsFoo> testClass = MetaLocationsFoo.class;
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(testClass);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
assertAttributes(attributesList.get(0),
testClass, new String[] {"/foo.xml"}, EMPTY_CLASS_ARRAY, ContextLoader.class, true);
}
@Test
public void resolveConfigAttributesWithMetaAnnotationAndLocationsAndOverrides() {
Class<MetaLocationsFooWithOverrides> testClass = MetaLocationsFooWithOverrides.class;
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(testClass);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
assertAttributes(attributesList.get(0),
testClass, new String[] {"/foo.xml"}, EMPTY_CLASS_ARRAY, ContextLoader.class, true);
}
@Test
public void resolveConfigAttributesWithMetaAnnotationAndLocationsAndOverriddenAttributes() {
Class<MetaLocationsFooWithOverriddenAttributes> testClass = MetaLocationsFooWithOverriddenAttributes.class;
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(testClass);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
assertAttributes(attributesList.get(0),
testClass, new String[] {"foo1.xml", "foo2.xml"}, EMPTY_CLASS_ARRAY, ContextLoader.class, true);
}
@Test
public void resolveConfigAttributesWithMetaAnnotationAndLocationsInClassHierarchy() {
Class<MetaLocationsBar> testClass = MetaLocationsBar.class;
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(testClass);
assertNotNull(attributesList);
assertEquals(2, attributesList.size());
assertAttributes(attributesList.get(0),
testClass, new String[] {"/bar.xml"}, EMPTY_CLASS_ARRAY, ContextLoader.class, true);
assertAttributes(attributesList.get(1),
MetaLocationsFoo.class, new String[] {"/foo.xml"}, EMPTY_CLASS_ARRAY, ContextLoader.class, true);
}
@Test
public void resolveConfigAttributesWithLocalAnnotationAndClasses() {
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(ClassesFoo.class);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
assertClassesFooAttributes(attributesList.get(0));
}
@Test
public void resolveConfigAttributesWithLocalAndInheritedAnnotationsAndLocations() {
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(LocationsBar.class);
assertNotNull(attributesList);
assertEquals(2, attributesList.size());
assertLocationsBarAttributes(attributesList.get(0));
assertLocationsFooAttributes(attributesList.get(1));
}
@Test
public void resolveConfigAttributesWithLocalAndInheritedAnnotationsAndClasses() {
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(ClassesBar.class);
assertNotNull(attributesList);
assertEquals(2, attributesList.size());
assertClassesBarAttributes(attributesList.get(0));
assertClassesFooAttributes(attributesList.get(1));
}
/**
* Verifies change requested in <a href="https://jira.spring.io/browse/SPR-11634">SPR-11634</a>.
* @since 4.0.4
*/
@Test
public void resolveConfigAttributesWithLocationsAndClasses() {
List<ContextConfigurationAttributes> attributesList = resolveContextConfigurationAttributes(LocationsAndClasses.class);
assertNotNull(attributesList);
assertEquals(1, attributesList.size());
}
// -------------------------------------------------------------------------
@ContextConfiguration(value = "x", locations = "y")
private static class ConflictingLocations {
}
@ContextConfiguration(locations = "x", classes = Object.class)
private static class LocationsAndClasses {
}
}
| [
"648326357@qq.com"
] | 648326357@qq.com |
d4d03191f755c5dda4877cc8181d56a436e20c98 | a770e95028afb71f3b161d43648c347642819740 | /sources/org/telegram/tgnet/TLRPC$TL_channels_deleteHistory.java | 5190ef34a7d20a914dd604fd3a860b1a0cb3a080 | [] | no_license | Edicksonjga/TGDecompiledBeta | d7aa48a2b39bbaefd4752299620ff7b72b515c83 | d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b | refs/heads/master | 2023-08-25T04:12:15.592281 | 2021-10-28T20:24:07 | 2021-10-28T20:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 650 | java | package org.telegram.tgnet;
public class TLRPC$TL_channels_deleteHistory extends TLObject {
public static int constructor = -NUM;
public TLRPC$InputChannel channel;
public int max_id;
public TLObject deserializeResponse(AbstractSerializedData abstractSerializedData, int i, boolean z) {
return TLRPC$Bool.TLdeserialize(abstractSerializedData, i, z);
}
public void serializeToStream(AbstractSerializedData abstractSerializedData) {
abstractSerializedData.writeInt32(constructor);
this.channel.serializeToStream(abstractSerializedData);
abstractSerializedData.writeInt32(this.max_id);
}
}
| [
"fabian_pastor@msn.com"
] | fabian_pastor@msn.com |
fbe28dacd23bfbbaa3096142cfe6403b1788ba54 | a35b21de1b30f820214ed6a3f42543e0005c295b | /AJC/03.JavaPersistenceAPI/03.ArtistMapping/src/main/java/com/ajc/models/Manager.java | f7b51ae6e19d30bf2e86aeaa378123bc6b0ef986 | [] | no_license | rosie-s/courses | a8baf2c0e0962b8e2429958e54cf1591f7aaaebf | 379d3b1472e4e79d40ea3b539368bd321174c209 | refs/heads/master | 2022-06-23T19:39:50.897293 | 2020-10-23T13:32:26 | 2020-10-23T13:32:26 | 117,899,193 | 2 | 0 | null | 2022-06-21T04:07:50 | 2018-01-17T22:14:54 | Java | UTF-8 | Java | false | false | 595 | java | package com.ajc.models;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name="department_table")
public class Manager {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@Column(name ="fName")
private String firstName;
@Column(name ="lName")
private String lastName;
@OneToMany(mappedBy = "manager")
private List<Artist> artists = new ArrayList<>();
public Manager(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
| [
"rosie-s@users.noreply.github.com"
] | rosie-s@users.noreply.github.com |
c805931eb079de3f0efa6d8b50e48bfa0a1fcb9b | d98c78ba919c70399bf8802bd4ff7d7b6a5279fe | /jmist-core/src/main/java/ca/eandb/jmist/framework/scene/SceneElementDecorator.java | 3d13196851ba3064356a242a53d66d78afe90a99 | [
"MIT"
] | permissive | bwkimmel/jmist | 4096f8d63321d7886ccaab1255eb772d0c1bb73d | 092654f4f4522d9c763d2f58aa770a8e134313d0 | refs/heads/master | 2023-06-11T17:29:51.509162 | 2022-02-17T20:44:59 | 2022-02-17T20:44:59 | 23,644,253 | 10 | 2 | MIT | 2022-02-17T20:45:00 | 2014-09-04T01:34:59 | Java | UTF-8 | Java | false | false | 4,251 | java | /**
* Java Modular Image Synthesis Toolkit (JMIST)
* Copyright (C) 2018 Bradley W. Kimmel
*
* 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 ca.eandb.jmist.framework.scene;
import java.io.Serializable;
import ca.eandb.jmist.framework.IntersectionRecorder;
import ca.eandb.jmist.framework.Light;
import ca.eandb.jmist.framework.SceneElement;
import ca.eandb.jmist.framework.ShadingContext;
import ca.eandb.jmist.framework.SurfacePoint;
import ca.eandb.jmist.math.Box3;
import ca.eandb.jmist.math.Ray3;
import ca.eandb.jmist.math.Sphere;
/**
* An abstract <code>SceneElement</code> that decorates another, underlying
* <code>SceneElement</code>. This class provides default implementations
* that delegate to the underlying <code>SceneElement</code>. It is the
* responsibility of the concrete derived <code>SceneElement</code> to
* override the appropriate methods.
* @author Brad Kimmel
*/
public abstract class SceneElementDecorator implements SceneElement, Serializable {
/** Serialization version ID. */
private static final long serialVersionUID = 7406144984143234198L;
private final SceneElement inner;
public SceneElementDecorator(SceneElement inner) {
this.inner = inner;
}
public Box3 boundingBox() {
return inner.boundingBox();
}
public Sphere boundingSphere() {
return inner.boundingSphere();
}
@Override
public void generateRandomSurfacePoint(int index, ShadingContext context, double ru, double rv, double rj) {
inner.generateRandomSurfacePoint(index, context, ru, rv, rj);
}
@Override
public void generateRandomSurfacePoint(ShadingContext context, double ru, double rv, double rj) {
inner.generateRandomSurfacePoint(context, ru, rv, rj);
}
@Override
public double generateImportanceSampledSurfacePoint(int index,
SurfacePoint x, ShadingContext context, double ru, double rv, double rj) {
return inner.generateImportanceSampledSurfacePoint(index, x, context, ru, rv, rj);
}
@Override
public double generateImportanceSampledSurfacePoint(SurfacePoint x,
ShadingContext context, double ru, double rv, double rj) {
return inner.generateImportanceSampledSurfacePoint(x, context, ru, rv, rj);
}
public Box3 getBoundingBox(int index) {
return inner.getBoundingBox(index);
}
public Sphere getBoundingSphere(int index) {
return inner.getBoundingSphere(index);
}
public int getNumPrimitives() {
return inner.getNumPrimitives();
}
public double getSurfaceArea() {
return inner.getSurfaceArea();
}
public double getSurfaceArea(int index) {
return inner.getSurfaceArea(index);
}
public void intersect(int index, Ray3 ray, IntersectionRecorder recorder) {
inner.intersect(index, ray, recorder);
}
public void intersect(Ray3 ray, IntersectionRecorder recorder) {
inner.intersect(ray, recorder);
}
public boolean intersects(int index, Box3 box) {
return inner.intersects(index, box);
}
public boolean visibility(int index, Ray3 ray) {
return inner.visibility(index, ray);
}
public boolean visibility(Ray3 ray) {
return inner.visibility(ray);
}
public Light createLight() {
return inner.createLight();
}
}
| [
"intrepidca@gmail.com"
] | intrepidca@gmail.com |
d15b7e7a9b17375f8cc88891b3305351f6c7ed05 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1873_internal/src/java/module1873_internal/a/Foo2.java | 27b3c2b7363868cb869cf01cb35d437d751b0b47 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,609 | java | package module1873_internal.a;
import java.nio.file.*;
import java.sql.*;
import java.util.logging.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.annotation.processing.Completion
* @see javax.lang.model.AnnotatedConstruct
* @see javax.management.Attribute
*/
@SuppressWarnings("all")
public abstract class Foo2<S> extends module1873_internal.a.Foo0<S> implements module1873_internal.a.IFoo2<S> {
javax.naming.directory.DirContext f0 = null;
javax.net.ssl.ExtendedSSLSession f1 = null;
javax.rmi.ssl.SslRMIClientSocketFactory f2 = null;
public S element;
public static Foo2 instance;
public static Foo2 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1873_internal.a.Foo0.create(input);
}
public String getName() {
return module1873_internal.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module1873_internal.a.Foo0.getInstance().setName(getName());
return;
}
public S get() {
return (S)module1873_internal.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (S)element;
module1873_internal.a.Foo0.getInstance().set(this.element);
}
public S call() throws Exception {
return (S)module1873_internal.a.Foo0.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
5a04e7a01cd547528fb537c51461bfdcd1619aaa | b3d0c731a8f7bd75b2dfd70e7ee12a4b5f20a423 | /spring-security/src/main/java/org/appfuse/webapp/UserSecurityAdvice.java | be411fbecc2807a06cd1156e083849268b2da1e0 | [
"Apache-2.0"
] | permissive | jameswsh8/appfuse-light | c4a55a4182085468cc5855c5523fd4940d4a8751 | 366a4c4a2197f3c1b30211cf975d06c8594a4393 | refs/heads/master | 2021-01-15T16:48:40.280850 | 2015-02-24T20:56:09 | 2015-02-24T20:56:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,374 | java | package org.appfuse.webapp;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;
import java.lang.reflect.Method;
/**
* Override UserSecurityAdvice from appfuse-service in order to allow anyone to
* update a user's information.
*
* @author mraible
*/
public class UserSecurityAdvice implements MethodBeforeAdvice, AfterReturningAdvice {
/**
* Method to enforce security and only allow administrators to modify users. Regular
* users are allowed to modify themselves.
*
* @param method the name of the method executed
* @param args the arguments to the method
* @param target the target class
* @throws Throwable thrown when args[0] is null or not a User object
*/
public void before(Method method, Object[] args, Object target) throws Throwable {
}
/**
* After returning, grab the user, check if they've been modified and reset the SecurityContext if they have.
* @param returnValue the user object
* @param method the name of the method executed
* @param args the arguments to the method
* @param target the target class
* @throws Throwable thrown when args[0] is null or not a User object
*/
public void afterReturning(Object returnValue, Method method, Object[] args, Object target)
throws Throwable {
}
}
| [
"matt@raibledesigns.com"
] | matt@raibledesigns.com |
1a8e49628c5a34f72625a6215d4dfc4fdc953f05 | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /zuiyou/sources/com/meizu/cloud/pushsdk/MzPushMessageReceiver$1.java | ee27f3c86af55a1e52ae67d009e39ab16273214a | [] | no_license | aheadlcx/analyzeApk | 050b261595cecc85790558a02d79739a789ae3a3 | 25cecc394dde4ed7d4971baf0e9504dcb7fabaca | refs/heads/master | 2020-03-10T10:24:49.773318 | 2018-04-13T09:44:45 | 2018-04-13T09:44:45 | 129,332,351 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,219 | java | package com.meizu.cloud.pushsdk;
import android.content.Context;
import android.content.Intent;
import com.meizu.cloud.a.a;
import com.meizu.cloud.pushsdk.handler.AbstractAppLogicListener;
import com.meizu.cloud.pushsdk.notification.PushNotificationBuilder;
import com.meizu.cloud.pushsdk.platform.message.PushSwitchStatus;
import com.meizu.cloud.pushsdk.platform.message.RegisterStatus;
import com.meizu.cloud.pushsdk.platform.message.SubAliasStatus;
import com.meizu.cloud.pushsdk.platform.message.SubTagsStatus;
import com.meizu.cloud.pushsdk.platform.message.UnRegisterStatus;
class MzPushMessageReceiver$1 extends AbstractAppLogicListener {
final /* synthetic */ MzPushMessageReceiver this$0;
MzPushMessageReceiver$1(MzPushMessageReceiver mzPushMessageReceiver) {
this.this$0 = mzPushMessageReceiver;
}
public void onRegister(Context context, String str) {
a.a(MzPushMessageReceiver.TAG, "onRegister " + str);
this.this$0.onRegister(context, str);
}
public void onMessage(Context context, String str) {
this.this$0.onMessage(context, str);
a.a(MzPushMessageReceiver.TAG, "receive message " + str);
}
public void onMessage(Context context, String str, String str2) {
this.this$0.onMessage(context, str, str2);
a.a(MzPushMessageReceiver.TAG, "receive message " + str + " platformExtra " + str2);
}
public void onUnRegister(Context context, boolean z) {
a.a(MzPushMessageReceiver.TAG, "onUnRegister " + z);
this.this$0.onUnRegister(context, z);
}
public void onMessage(Context context, Intent intent) {
a.a(MzPushMessageReceiver.TAG, "onMessage Flyme3 " + intent);
this.this$0.onMessage(context, intent);
}
public void onUpdateNotificationBuilder(PushNotificationBuilder pushNotificationBuilder) {
this.this$0.onUpdateNotificationBuilder(pushNotificationBuilder);
}
public void onPushStatus(Context context, PushSwitchStatus pushSwitchStatus) {
a.a(MzPushMessageReceiver.TAG, "onPushStatus " + pushSwitchStatus);
this.this$0.onPushStatus(context, pushSwitchStatus);
}
public void onRegisterStatus(Context context, RegisterStatus registerStatus) {
a.a(MzPushMessageReceiver.TAG, "onRegisterStatus " + registerStatus);
this.this$0.onRegisterStatus(context, registerStatus);
}
public void onUnRegisterStatus(Context context, UnRegisterStatus unRegisterStatus) {
a.a(MzPushMessageReceiver.TAG, "onUnRegisterStatus " + unRegisterStatus);
this.this$0.onUnRegisterStatus(context, unRegisterStatus);
}
public void onSubTagsStatus(Context context, SubTagsStatus subTagsStatus) {
a.a(MzPushMessageReceiver.TAG, "onSubTagsStatus " + subTagsStatus);
this.this$0.onSubTagsStatus(context, subTagsStatus);
}
public void onSubAliasStatus(Context context, SubAliasStatus subAliasStatus) {
a.a(MzPushMessageReceiver.TAG, "onSubAliasStatus " + subAliasStatus);
this.this$0.onSubAliasStatus(context, subAliasStatus);
}
public void onNotificationClicked(Context context, String str, String str2, String str3) {
a.a(MzPushMessageReceiver.TAG, "onNotificationClicked title " + str + "content " + str2 + " selfDefineContentString " + str3);
this.this$0.onNotificationClicked(context, str, str2, str3);
}
public void onNotificationArrived(Context context, String str, String str2, String str3) {
a.a(MzPushMessageReceiver.TAG, "onNotificationArrived title " + str + "content " + str2 + " selfDefineContentString " + str3);
this.this$0.onNotificationArrived(context, str, str2, str3);
}
public void onNotificationDeleted(Context context, String str, String str2, String str3) {
a.a(MzPushMessageReceiver.TAG, "onNotificationDeleted title " + str + "content " + str2 + " selfDefineContentString " + str3);
this.this$0.onNotificationDeleted(context, str, str2, str3);
}
public void onNotifyMessageArrived(Context context, String str) {
a.a(MzPushMessageReceiver.TAG, "onNotifyMessageArrived " + str);
this.this$0.onNotifyMessageArrived(context, str);
}
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
a0654bbb4831492f49e269a6b6cf7ad8b7ace317 | 425ac2b3d2ba036202c1dc72c561d3a904df33ad | /core/cas-server-core-webflow-mfa/src/test/java/org/apereo/cas/web/flow/authentication/RankedMultifactorAuthenticationProviderSelectorTests.java | ea2d216877e89454f3953677a28441dfdb91c423 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | fogbeam/cas_mirror | fee69b4b1a7bf5cac87da75b209edc3cc3c1d5d6 | b7daea814f1238e95a6674663b2553555a5b2eed | refs/heads/master | 2023-01-07T08:34:26.200966 | 2021-08-12T19:14:41 | 2021-08-12T19:14:41 | 41,710,765 | 1 | 2 | Apache-2.0 | 2022-12-27T15:39:03 | 2015-09-01T01:53:24 | Java | UTF-8 | Java | false | false | 2,280 | java | package org.apereo.cas.web.flow.authentication;
import org.apereo.cas.BaseCasWebflowMultifactorAuthenticationTests;
import org.apereo.cas.authentication.MultifactorAuthenticationProviderSelector;
import org.apereo.cas.authentication.mfa.TestMultifactorAuthenticationProvider;
import org.apereo.cas.configuration.model.support.mfa.BaseMultifactorAuthenticationProviderProperties;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.util.CollectionUtils;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import static org.junit.jupiter.api.Assertions.*;
/**
* This is {@link RankedMultifactorAuthenticationProviderSelectorTests}.
*
* @author Misagh Moayyed
* @since 6.1.0
*/
@Tag("Webflow")
public class RankedMultifactorAuthenticationProviderSelectorTests extends BaseCasWebflowMultifactorAuthenticationTests {
@Autowired
@Qualifier("multifactorAuthenticationProviderSelector")
private MultifactorAuthenticationProviderSelector multifactorAuthenticationProviderSelector;
@Test
public void verifySelectionOfMfaProvider() {
val dummy1 = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
dummy1.setOrder(10);
dummy1.setFailureMode(BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.PHANTOM);
val dummy2 = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
dummy2.setOrder(5);
val service = RegisteredServiceTestUtils.getRegisteredService();
servicesManager.save(service);
val provider = multifactorAuthenticationProviderSelector.resolve(CollectionUtils.wrapList(dummy1, dummy2),
service, RegisteredServiceTestUtils.getPrincipal());
assertNotNull(provider);
assertEquals(dummy1.getId(), provider.getId());
assertEquals(dummy1.getOrder(), provider.getOrder());
assertEquals(BaseMultifactorAuthenticationProviderProperties.MultifactorAuthenticationProviderFailureModes.PHANTOM, provider.getFailureMode());
}
}
| [
"mm1844@gmail.com"
] | mm1844@gmail.com |
96b933ce099d279812c2a3c34840a3273fcc7183 | 1d2fda2245888413e3eef8798a61236822f022db | /1.0/com/sun/codemodel/JMods.java | d6c1ea576869763f4606d03f4586b6d457c60787 | [
"IJG"
] | permissive | SynieztroLedPar/Wu | 3b4391e916f6a5605d60663f800702f3e45d5dfc | 5f7daebc2fb430411ddb76a179005eeecde9802b | refs/heads/master | 2023-04-29T17:27:08.301723 | 2020-10-10T22:28:40 | 2020-10-10T22:28:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,683 | java | package com.sun.codemodel;
import java.io.PrintWriter;
import java.io.StringWriter;
public class JMods
implements JGenerable
{
private static int VAR = 8;
private static int FIELD = 799;
private static int METHOD = 255;
private static int CLASS = 63;
private static int INTERFACE = 1;
private int mods;
private JMods(int mods)
{
this.mods = mods;
}
private static void check(int mods, int legal, String what)
{
if ((mods & (legal ^ 0xFFFFFFFF)) != 0) {
throw new IllegalArgumentException("Illegal modifiers for " + what + ": " + new JMods(mods).toString());
}
}
static JMods forVar(int mods)
{
check(mods, VAR, "variable");
return new JMods(mods);
}
static JMods forField(int mods)
{
check(mods, FIELD, "field");
return new JMods(mods);
}
static JMods forMethod(int mods)
{
check(mods, METHOD, "method");
return new JMods(mods);
}
static JMods forClass(int mods)
{
check(mods, CLASS, "class");
return new JMods(mods);
}
static JMods forInterface(int mods)
{
check(mods, INTERFACE, "class");
return new JMods(mods);
}
public boolean isAbstract()
{
return (this.mods & 0x20) != 0;
}
public boolean isNative()
{
return (this.mods & 0x40) != 0;
}
public boolean isSynchronized()
{
return (this.mods & 0x80) != 0;
}
public void setSynchronized(boolean newValue)
{
setFlag(128, newValue);
}
private void setFlag(int bit, boolean newValue)
{
this.mods = (this.mods & (bit ^ 0xFFFFFFFF) | (newValue ? bit : 0));
}
public void generate(JFormatter f)
{
if ((this.mods & 0x1) != 0) {
f.p("public");
}
if ((this.mods & 0x2) != 0) {
f.p("protected");
}
if ((this.mods & 0x4) != 0) {
f.p("private");
}
if ((this.mods & 0x8) != 0) {
f.p("final");
}
if ((this.mods & 0x10) != 0) {
f.p("static");
}
if ((this.mods & 0x20) != 0) {
f.p("abstract");
}
if ((this.mods & 0x40) != 0) {
f.p("native");
}
if ((this.mods & 0x80) != 0) {
f.p("synchronized");
}
if ((this.mods & 0x100) != 0) {
f.p("transient");
}
if ((this.mods & 0x200) != 0) {
f.p("volatile");
}
}
public String toString()
{
StringWriter s = new StringWriter();
JFormatter f = new JFormatter(new PrintWriter(s));
generate(f);
return s.toString();
}
}
/* Location: C:\Games\SteamLibrary\steamapps\common\Wurm Unlimited Dedicated Server\server.jar!\1.0\com\sun\codemodel\JMods.class
* Java compiler version: 2 (46.0)
* JD-Core Version: 0.7.1
*/ | [
"dwayne.griffiths@outlook.com"
] | dwayne.griffiths@outlook.com |
3721212147dd5e010fffb2a210fdbe044b65dfc5 | d0e4b32093eb4b977700834f98342be9fe1862c3 | /src/ex03operator/E07BitOperator.java | 19bef372ae046b44c01aa970f343d76a4a6c6756 | [] | no_license | bc0086/K01JAVA | 4bd88491219bf6d27b7c2ac21f3e55f307e1a7f9 | f0d57c06cc0b6fe7d4d434569bec98ee4aa84746 | refs/heads/master | 2021-04-20T11:48:20.166734 | 2020-10-22T11:39:17 | 2020-10-22T11:39:17 | 249,656,782 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,082 | java | package ex03operator;
public class E07BitOperator {
public static void main(String[] args) {
/*
비트연산자 : 자료를 bit단위로 논리 연산한다.
& : And, 좌우 둘다 1일때만 1을 반환. 나머지는 0
| : Or, 좌우 둘중 하나만 1이면 1을 반환. 둘다 0일때 0반환
^ : XOR, 둘이 같으면 0, 다르면 1을 반환
~ : NOT, 반전된 값을 반환. 1이면 0, 0이면 1을 반환
*/
int num1 = 5; //00000000 00000000 00000000 00000101
int num2 = 3; //00000000 00000000 00000000 00000011
int num3 = -1; //0001 -> 1110 -> 11111111 11111111 11111111 11111111
// -1이 위와같은 이유는 1을 더했을때 0이 되기 때문이다.
// 양수1을 2의 보수를 취하면 -1이 된다.
System.out.println("비트AND:" + (num1 & num2));//결과1 (0001)
System.out.println("비트OR:" + (num1 | num2));//결과7 (0111)
System.out.println("비트XOR:" + (num1 ^ num2));//결과6 (0110)
System.out.println("비트Not:" + (~num3));//결과0 (0000)
}
}
| [
"bc0086@naver.com"
] | bc0086@naver.com |
afe0179770c5e79493b24358016ad2401f3047cb | 3a80f6a8f09da3f489186d6d97710038afb1f431 | /src/main/java/rafa/thefull/repository/AuthorityRepository.java | 794afdb4f9df1363932d3379d5db829138f6bffd | [] | no_license | rafathefull/jhipster-sample-application | 5f9ab1c449f430bedab56f1f3d2e15b213bf416f | e2608904c8ff4ff724cc025aa42ebe14534c1967 | refs/heads/master | 2020-03-26T17:01:44.532304 | 2018-08-17T15:37:01 | 2018-08-17T15:37:01 | 145,138,045 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 282 | java | package rafa.thefull.repository;
import rafa.thefull.domain.Authority;
import org.springframework.data.jpa.repository.JpaRepository;
/**
* Spring Data JPA repository for the Authority entity.
*/
public interface AuthorityRepository extends JpaRepository<Authority, String> {
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
95ef0f4bcb4cc3df31c70e46c600595a7c57e7da | 156ed60b65c508f7210f279a6680280a10006400 | /1.JavaSyntax/src/com/javarush/task/task03/task0320/Solution.java | fca9d33012a193c251954c1dba864ea50b26c9cc | [] | no_license | Abergaz/JavaRushTasks | 90f42c6d37402098528d5cb6b7dfb63bd51220ae | 5dcb38dff61c09384bf711d2357848f7327b08ec | refs/heads/master | 2020-04-29T02:16:21.371765 | 2019-07-23T11:13:27 | 2019-07-23T11:13:27 | 175,760,604 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 560 | java | package com.javarush.task.task03.task0320;
/*
Скромность украшает программиста
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
InputStream inputStream = System.in;
Reader reader = new InputStreamReader(inputStream);
BufferedReader bufferedReader = new BufferedReader(reader);
System.out.println(bufferedReader.readLine() + " зарабатывает $5,000. Ха-ха-ха!");
}
}
| [
"zagreba@gmail.com"
] | zagreba@gmail.com |
0172be51b483116b5b9f1f5e7ed2f2fa2727560d | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/eclipse.jdt.ui/7124.java | 39fc3ab82ff7ad845a9e6d1fe1116a32d6adbec8 | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,313 | java | /*******************************************************************************
* Copyright (c) 2005, 2011 IBM Corporation and others.
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.ui.text.javadoc;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;
/**
*
* @since 3.2
*/
public final class JavadocContentAssistInvocationContext extends JavaContentAssistInvocationContext {
private final int fFlags;
/**
* @param viewer
* @param offset
* @param editor
* @param flags see {@link org.eclipse.jdt.ui.text.java.IJavadocCompletionProcessor#RESTRICT_TO_MATCHING_CASE}
*/
public JavadocContentAssistInvocationContext(ITextViewer viewer, int offset, IEditorPart editor, int flags) {
super(viewer, offset, editor);
fFlags = flags;
}
/**
* Returns the flags for this content assist invocation.
*
* @return the flags for this content assist invocation
* @see org.eclipse.jdt.ui.text.java.IJavadocCompletionProcessor#RESTRICT_TO_MATCHING_CASE
*/
public int getFlags() {
return fFlags;
}
/**
* Returns the selection length of the viewer.
*
* @return the selection length of the viewer
*/
public int getSelectionLength() {
return getViewer().getSelectedRange().y;
}
/*
* @see org.eclipse.jface.text.contentassist.TextContentAssistInvocationContext#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (!super.equals(obj))
return false;
return fFlags == ((JavadocContentAssistInvocationContext) obj).fFlags;
}
/*
* @see org.eclipse.jface.text.contentassist.TextContentAssistInvocationContext#hashCode()
*/
@Override
public int hashCode() {
return super.hashCode() << 2 | fFlags;
}
}
| [
"tim.menzies@gmail.com"
] | tim.menzies@gmail.com |
575cfda4d0f97ad15c8c5aaf7c3574e7ff3c2eee | 6d9e05fa98bd2fce890c56e4bdafc613d5802c30 | /org.erlide.jinterface.tests/src/org/erlide/runtime/backend/UtilTest.java | 42f84a99cba475d7fb2dbee8f5745ac8e852c770 | [] | no_license | jakobc/erlide | f35d361c5c64698b1a575794c345b4d63c6e197a | 5a8637a801aad902df9963937b437e3092a56304 | refs/heads/master | 2020-04-08T06:11:29.793508 | 2010-12-16T14:42:41 | 2010-12-16T14:42:41 | 349,956 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,468 | java | package org.erlide.runtime.backend;
import static org.junit.Assert.assertEquals;
import org.erlide.jinterface.backend.util.Util;
import org.junit.Test;
public class UtilTest {
@Test
public void normalizeSpaces_shouldKeepSingleSpaces() {
final String input = "a b c";
final String value = Util.normalizeSpaces(input);
final String expected = "a b c";
assertEquals(value, expected);
}
@Test
public void normalizeSpaces_shouldCompressMultipleSpaces() {
final String input = "a b c";
final String value = Util.normalizeSpaces(input);
final String expected = "a b c";
assertEquals(value, expected);
}
@Test
public void normalizeSpaces_shouldCompressTabs() {
final String input = "a\t\tb\tc";
final String value = Util.normalizeSpaces(input);
final String expected = "a b c";
assertEquals(value, expected);
}
@Test
public void normalizeSpaces_shouldCompressNewlines() {
final String input = "a\r\nb\nc";
final String value = Util.normalizeSpaces(input);
final String expected = "a b c";
assertEquals(value, expected);
}
@Test
public void normalizeSpaces_shouldCompressAll() {
final String input = "a\r\n\t b\n\t\t \tc";
final String value = Util.normalizeSpaces(input);
final String expected = "a b c";
assertEquals(value, expected);
}
}
| [
"vladdu55@gmail.com"
] | vladdu55@gmail.com |
f92e81e8c0b495fc1f1680851cf811e856c61ae5 | f66e2ad3fc0f8c88278c0997b156f5c6c8f77f28 | /Java/Imooc-Socket/Java-Socket/src/main/chat-room-sharding/clink/core/ReceiveDispatcher.java | aece352c00ac2e5ae43cee91ebaa8a3dc3e8563b | [
"Apache-2.0"
] | permissive | flyfire/Programming-Notes-Code | 3b51b45f8760309013c3c0cc748311d33951a044 | 4b1bdd74c1ba0c007c504834e4508ec39f01cd94 | refs/heads/master | 2020-05-07T18:00:49.757509 | 2019-04-10T11:15:13 | 2019-04-10T11:15:13 | 180,750,568 | 1 | 0 | Apache-2.0 | 2019-04-11T08:40:38 | 2019-04-11T08:40:38 | null | UTF-8 | Java | false | false | 785 | java | package clink.core;
import java.io.Closeable;
/**
* 接收数据包的调度者,把一份或多份 IoArgs 组合成一份 ReceivePack。
*
* @author Ztiany
* Email ztiany3@gmail.com
* Date 2018/11/18 16:42
*/
public interface ReceiveDispatcher extends Closeable {
/**
* 开始接收数据
*/
void stop();
/**
* 停止接收数据
*/
void start();
/**
* 数据接收的回调
*/
interface ReceivePacketCallback {
/**
* 当完成一个数据包的接收时被调用
*/
void onReceivePacketCompleted(ReceivePacket packet);
/**
* 根据类型和长度创建第一的 Packet
*/
ReceivePacket<?, ?> onArrivedNewPacket(byte type, long length);
}
}
| [
"ztiany3@gmail.com"
] | ztiany3@gmail.com |
6f39faeb84b6f5be7868d6113982b2e5c4fb0200 | 41589b12242fd642cb7bde960a8a4ca7a61dad66 | /teams/fibbyBot10/Messenger.java | cf1ba8208c6b23b0078e5eb77eadd82f1e2230e8 | [] | no_license | Cixelyn/bcode2011 | 8e51e467b67b9ce3d9cf1160d9bd0e9f20114f96 | eccb2c011565c46db942b3f38eb3098b414c154c | refs/heads/master | 2022-11-05T12:52:17.671674 | 2011-01-27T04:49:12 | 2011-01-27T04:49:12 | 275,731,519 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,878 | java | package fibbyBot10;
import java.util.LinkedList;
import battlecode.common.*;
/**
* Messenger Class. Loosely based on the old Lazer6 messaging code
*
*
* <pre>
* MESSAGE BLOCK FORMAT------------------------------------------|
* idx 0 1 2 3 |
* ints [ hash , header , data , data..........|
* locs [ source , origin , data , data..........|
* strs [-----------------------------------------------------|
* </pre>
* @author Cory
*
*/
public class Messenger {
//public variable
final RobotPlayer myPlayer;
//send component needs to be enabled
private boolean canSend;
public boolean shouldReceive;
//static limits
private static final int ROUND_MOD = 4;
private static final int ID_MOD = 1024;
private final int teamKey;
private final int myID;
//Defined indexes for readability
public static final int idxHash = 0;
public static final int idxHeader = 1;
public static final int idxSender = 0;
public static final int idxOrigin = 1;
public static final int firstData = 2;
public static final int minSize = firstData;
final LinkedList<Message> messageQueue;
private boolean[][] hasHeard = new boolean[ROUND_MOD][];
public Messenger(RobotPlayer player) {
myPlayer = player; //Assign the player
canSend = false; //Default robot doesn't have antennae
messageQueue = new LinkedList<Message>(); //Build Queue
shouldReceive = true;
//Initialize our entire 'has heard' table
for(int i=0; i<ROUND_MOD; i++) {
hasHeard[i] = new boolean[ID_MOD];
}
//set ID and key
myID = myPlayer.myRC.getRobot().getID();
if(myPlayer.myRC.getTeam()==Team.A) {
teamKey = 131071; //first 6 digit mersenne prime
} else {
teamKey = 174763; //first 6 digit wagstaff prime
}
}
/**
* This call is run whenever the robot gains an antennae
* Note that components can never be removed, so a robot cannot lose it's sending ability.
*/
public void enableSender() {
canSend = true;
}
/**
* Should the robot receive messages?
* Useful holding messages until robots are active.
* @param state whether you should
*/
public void toggleReceive(boolean state) {
shouldReceive = state;
}
/**
* Internal sending function
* @param m message to send where the relevant location blocks and int blocks reserved for headers
* and such are left blank. sendMsg computs the hashes and inserts them in.
*/
private void sendMsg(MsgType type, Message m) {
//debug code to make sure we're not calling something that can't be done.
assert canSend;
//fill in message
int currTime = Clock.getRoundNum();
m.ints[idxHeader] = Encoder.encodeMsgHeader(type, currTime, myID);
MapLocation myLoc = myPlayer.myRC.getLocation();
m.locations[idxSender] = myLoc; //sender location
m.locations[idxOrigin] = myLoc; //origin location
m.ints[idxHash] = teamKey; //super simple hash
messageQueue.add(m);
//I've heard my own message
hasHeard[currTime%ROUND_MOD][myID%ID_MOD] = true;
}
/**
* This internal function builds a <code>battlecode.common.Message</code> with
* <code>iSize</code> ints and <code>lSize</code> locations
* @param iSize number of ints
* @param lSize number of locations
* @return
*/
private Message buildNewMessage(int iSize, int lSize) {
Message m = new Message();
m.ints = new int[minSize+iSize];
m.locations = new MapLocation[minSize+lSize];
return m;
}
public void sendNotice(MsgType t) {
sendMsg(t,buildNewMessage(0,0));
}
public void sendInt(MsgType t, int int1)
{
Message m = buildNewMessage(1,0);
m.ints[firstData] = int1;
sendMsg(t,m);
}
public void sendLoc(MsgType t, MapLocation loc)
{
Message m = buildNewMessage(0,1);
m.locations[firstData ] = loc;
sendMsg(t,m);
}
public void sendIntDoubleLoc(MsgType t, int int1, MapLocation loc1, MapLocation loc2)
{
Message m = buildNewMessage(1,2);
m.ints[firstData] = int1;
m.locations[firstData ] = loc1;
m.locations[firstData+1] = loc2;
sendMsg(t,m);
}
public void sendDoubleLoc(MsgType t, MapLocation loc1, MapLocation loc2) {
Message m = buildNewMessage(0,2);
m.locations[firstData ] = loc1;
m.locations[firstData+1] = loc2;
sendMsg(t,m);
}
/**
* Very primitive receive function
*/
public void receiveAll() {
Message[] rcv = myPlayer.myRC.getAllMessages();
boolean isValid = true;
for(Message m: rcv) {
if (!isValid)
Utility.println("Message dropped!");
isValid = false;
////////BEGIN MESSAGE VALIDATION SYSTEM
///////Begin inlined message validation checker
if(m.ints==null) break;
if(m.ints.length<minSize) break;
//////We should have a checksum -- make sure the checksum is right.
if(m.ints[idxHash]!=teamKey) break;
//////We at least have a valid int header
MsgType t = Encoder.decodeMsgType(m.ints[idxHeader]); //pull out the header
//////Now make sure we have enough ints & enough maplocations
if(m.ints.length!=t.numInts) break;
if(m.locations==null) break;
if(m.locations.length!=t.numLocs) break;
////////MESSAGE HAS BEEN VALIDATED
isValid = true;
if(t.shouldCallback) { //Generic Callback Messages
myPlayer.myBehavior.newMessageCallback(t,m);
}
}
}
public void sendAll() throws Exception{
if(!messageQueue.isEmpty() && !myPlayer.myBroadcaster.isActive()) {
myPlayer.myBroadcaster.broadcast(messageQueue.pop());
}
}
}
| [
"51144+Cixelyn@users.noreply.github.com"
] | 51144+Cixelyn@users.noreply.github.com |
391ce06bd615f094db0fce53cb8bd9330e04b406 | 83593598f21cba234f08eca4dec44d2f73a6052d | /prj/bank/web-mrtProcForBankAll/src/main/java/gnnt/bank/adapter/bankBusiness/message/RSP_F607.java | e7d2709c342804d2be92ff821637567047f7b9c6 | [
"Apache-2.0"
] | permissive | bigstar18/prjs | 23a04309a51b0372ddf6c391ee42270e640ec13c | c29da4d0892ce43e074d9e9831f1eedf828cd9d8 | refs/heads/master | 2021-05-31T19:55:16.217893 | 2016-06-24T02:35:31 | 2016-06-24T02:35:31 | 42,025,473 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 322 | java | package gnnt.bank.adapter.bankBusiness.message;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="in")
public class RSP_F607
{
@XmlElement
public HEAD head = new HEAD();
@XmlElement
public RSP_BODY_F607 body = new RSP_BODY_F607();
}
| [
"hxx@hxx-PC"
] | hxx@hxx-PC |
24d7af6b1e9f353a2c68f8f47d9f85da7e9ca38d | 9856541e29e2597f2d0a7ef4729208190d9bbebe | /spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java | aac2913deac88a6dd4e9d1002decd7a37e89b554 | [
"Apache-2.0"
] | permissive | lakeslove/springSourceCodeTest | 74bffc0756fa5ea844278827d86a085b9fe4c14e | 25caac203de57c4b77268be60df2dcb2431a03e1 | refs/heads/master | 2020-12-02T18:10:14.048955 | 2017-07-07T00:41:55 | 2017-07-07T00:41:55 | 96,483,747 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,557 | java | /*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet;
import javax.servlet.http.HttpServletRequest;
/**
* Interface to be implemented by objects that define a mapping between
* requests and handler objects.
*
* <p>This class can be implemented by application developers, although this is not
* necessary, as {@link org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping}
* and {@link org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping}
* are included in the framework. The former is the default if no
* HandlerMapping bean is registered in the application context.
*
* <p>HandlerMapping implementations can support mapped interceptors but do not
* have to. A handler will always be wrapped in a {@link HandlerExecutionChain}
* instance, optionally accompanied by some {@link HandlerInterceptor} instances.
* The DispatcherServlet will first call each HandlerInterceptor's
* {@code preHandle} method in the given order, finally invoking the handler
* itself if all {@code preHandle} methods have returned {@code true}.
*
* <p>The ability to parameterize this mapping is a powerful and unusual
* capability of this MVC framework. For example, it is possible to write
* a custom mapping based on session state, cookie state or many other
* variables. No other MVC framework seems to be equally flexible.
*
* <p>Note: Implementations can implement the {@link org.springframework.core.Ordered}
* interface to be able to specify a sorting order and thus a priority for getting
* applied by DispatcherServlet. Non-Ordered instances get treated as lowest priority.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see org.springframework.core.Ordered
* @see org.springframework.web.servlet.handler.AbstractHandlerMapping
* @see org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping
* @see org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping
*/
public interface HandlerMapping {
/**
* Name of the {@link HttpServletRequest} attribute that contains the path
* within the handler mapping, in case of a pattern match, or the full
* relevant URI (typically within the DispatcherServlet's mapping) else.
* <p>Note: This attribute is not required to be supported by all
* HandlerMapping implementations. URL-based HandlerMappings will
* typically support it, but handlers should not necessarily expect
* this request attribute to be present in all scenarios.
*/
String PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE = HandlerMapping.class.getName() + ".pathWithinHandlerMapping";
/**
* Name of the {@link HttpServletRequest} attribute that contains the
* best matching pattern within the handler mapping.
* <p>Note: This attribute is not required to be supported by all
* HandlerMapping implementations. URL-based HandlerMappings will
* typically support it, but handlers should not necessarily expect
* this request attribute to be present in all scenarios.
*/
String BEST_MATCHING_PATTERN_ATTRIBUTE = HandlerMapping.class.getName() + ".bestMatchingPattern";
/**
* Name of the boolean {@link HttpServletRequest} attribute that indicates
* whether type-level mappings should be inspected.
* <p>Note: This attribute is not required to be supported by all
* HandlerMapping implementations.
*/
String INTROSPECT_TYPE_LEVEL_MAPPING = HandlerMapping.class.getName() + ".introspectTypeLevelMapping";
/**
* Name of the {@link HttpServletRequest} attribute that contains the URI
* templates map, mapping variable names to values.
* <p>Note: This attribute is not required to be supported by all
* HandlerMapping implementations. URL-based HandlerMappings will
* typically support it, but handlers should not necessarily expect
* this request attribute to be present in all scenarios.
*/
String URI_TEMPLATE_VARIABLES_ATTRIBUTE = HandlerMapping.class.getName() + ".uriTemplateVariables";
/**
* Name of the {@link HttpServletRequest} attribute that contains a map with
* URI matrix variables.
* <p>Note: This attribute is not required to be supported by all
* HandlerMapping implementations and may also not be present depending on
* whether the HandlerMapping is configured to keep matrix variable content
* in the request URI.
*/
String MATRIX_VARIABLES_ATTRIBUTE = HandlerMapping.class.getName() + ".matrixVariables";
/**
* Name of the {@link HttpServletRequest} attribute that contains the set of
* producible MediaTypes applicable to the mapped handler.
* <p>Note: This attribute is not required to be supported by all
* HandlerMapping implementations. Handlers should not necessarily expect
* this request attribute to be present in all scenarios.
*/
String PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE = HandlerMapping.class.getName() + ".producibleMediaTypes";
/**
* Return a handler and any interceptors for this request. The choice may be made
* on request URL, session state, or any factor the implementing class chooses.
* <p>The returned HandlerExecutionChain contains a handler Object, rather than
* even a tag interface, so that handlers are not constrained in any way.
* For example, a HandlerAdapter could be written to allow another framework's
* handler objects to be used.
* <p>Returns {@code null} if no match was found. This is not an error.
* The DispatcherServlet will query all registered HandlerMapping beans to find
* a match, and only decide there is an error if none can find a handler.
* @param request current HTTP request
* @return a HandlerExecutionChain instance containing handler object and
* any interceptors, or {@code null} if no mapping found
* @throws Exception if there is an internal error
*/
HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception;
}
| [
"lakeslove@126.com"
] | lakeslove@126.com |
87758f544221ed3db5965a0e31bb6da042c25dc7 | e5abd0951ba29057719e044b26571804eceb338e | /02.Encapsulation/HomeworkEncapsulation/src/p05_pizzaCalories/Topping.java | b00e192836a41e483cfbac493247361d5dc53bff | [] | no_license | tahirmuhammadcs/java-oop-basics | 2d30a4fbf0f5e10792580a4fb090943c372e5daf | a72400afd466764b1335de3947b63e56a0c2cb92 | refs/heads/master | 2020-03-31T07:24:12.367245 | 2017-04-25T21:23:49 | 2017-04-25T21:23:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | package p05_pizzaCalories;
public class Topping {
private String type;
private double weight;
public Topping(String type, double weight) throws Exception {
this.setType(type);
this.setWeight(weight);
}
public String getType() {
return type;
}
private void setType(String type) throws Exception {
if (type == null ||
!type.toLowerCase().equals("meat") &&
!type.toLowerCase().equals("veggies") &&
!type.toLowerCase().equals("cheese") &&
!type.toLowerCase().equals("sauce")) {
throw new Exception(String.format("Cannot place %s on top of your pizza.", type));
}
this.type = type;
}
public double getWeight() {
return weight;
}
private void setWeight(double weight) throws Exception {
if (weight < 1 || weight > 50) {
throw new Exception(String.format("%s weight should be in the range [1..50].", this.getType()));
}
this.weight = weight;
}
public double getCalories() {
double typeModifier = getTypeModifier();
return (2 * this.getWeight()) * typeModifier;
}
private double getTypeModifier() {
double typeModifier = 0.0;
switch (this.getType().toLowerCase()) {
case "meat":
typeModifier = 1.2;
break;
case "veggies":
typeModifier = 0.8;
break;
case "cheese":
typeModifier = 1.1;
break;
case "sauce":
typeModifier = 0.9;
break;
}
return typeModifier;
}
}
| [
"gramovv@gmail.com"
] | gramovv@gmail.com |
c5d5bf56942d4fcb1c8b97240ea7ee2b0cd70eb9 | 24954780906dd6956b901026e816752d30341924 | /ps-beneficiary-web-backend/src/main/resources/webroot/gwt/extra/app/src/com/progressoft/workshop/beneficiarieslist/client/requests/ObtainLayoutExtensionPointForBeneficiariesListPresenterClientRequest.java | 8849b863f5d0577b6c258e0083d88ec4effb8923 | [] | no_license | rjeeb/ps-beneficiary-web | b50a5d982fd2d98f07733d01e7c439a2781f79a5 | 53efe74defa6cd6801e8f4ac3d1d82c05ffae24c | refs/heads/master | 2021-06-28T09:17:15.794529 | 2017-09-14T14:39:33 | 2017-09-14T14:39:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 879 | java | package com.progressoft.workshop.beneficiarieslist.client.requests;
import com.progressoft.brix.domino.api.client.request.ClientRequest;
import com.progressoft.brix.domino.api.client.annotations.Request;
import com.progressoft.workshop.beneficiarieslist.client.presenters.BeneficiariesListPresenter;
import com.progressoft.brix.components.layout.shared.extension.LayoutExtensionPoint;
@Request
public class ObtainLayoutExtensionPointForBeneficiariesListPresenterClientRequest extends ClientRequest<BeneficiariesListPresenter>{
private LayoutExtensionPoint extensionPoint;
public ObtainLayoutExtensionPointForBeneficiariesListPresenterClientRequest(LayoutExtensionPoint extensionPoint){
this.extensionPoint=extensionPoint;
}
@Override
protected void process(BeneficiariesListPresenter presenter){
presenter.contributeToLayoutModule(extensionPoint.context());
}
} | [
"rafat.albarouki@gmail.com"
] | rafat.albarouki@gmail.com |
f9ea4d34b45da5746e8b8b036ab3308792349c00 | 8ece3650b1fe129a1f9d77108f397d036d0ee7e1 | /src/main/java/com/insoul/rental/controller/SystemController.java | 3c60aed9f637c75d10ee55d202497f69e421f6d7 | [
"MIT"
] | permissive | liufeiit/rental | cc96135345ab39e06ff660d0660fc1ae694ec9f5 | 3dbfe6fab649e7e2faa507db7e617fd6a292b85b | refs/heads/master | 2021-01-10T08:44:49.874300 | 2015-11-28T09:31:18 | 2015-11-28T09:31:18 | 47,017,499 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,188 | java | package com.insoul.rental.controller;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.insoul.rental.constant.SystemSettingPath;
import com.insoul.rental.service.SystemSettingService;
import com.insoul.rental.vo.request.SystemConfigRequest;
@Controller
public class SystemController extends BaseController {
@Autowired
private SystemSettingService systemSettingService;
@RequestMapping("/system/configPage")
public String getEditContentTemplatePage(Model model) {
Map<String, String> settings = systemSettingService.getSettings();
String watermeter = settings.get(SystemSettingPath.WATERMETER);
model.addAttribute("watermeter", watermeter);
String meter = settings.get(SystemSettingPath.METER);
model.addAttribute("meter", meter);
String first_quarter_start = settings.get(SystemSettingPath.FIRST_QUARTER_START);
model.addAttribute("first_quarter_start", first_quarter_start);
String first_quarter_end = settings.get(SystemSettingPath.FIRST_QUARTER_END);
model.addAttribute("first_quarter_end", first_quarter_end);
String second_quarter_start = settings.get(SystemSettingPath.SECOND_QUARTER_START);
model.addAttribute("second_quarter_start", second_quarter_start);
String second_quarter_end = settings.get(SystemSettingPath.SECOND_QUARTER_END);
model.addAttribute("second_quarter_end", second_quarter_end);
String third_quarter_start = settings.get(SystemSettingPath.THIRD_QUARTER_START);
model.addAttribute("third_quarter_start", third_quarter_start);
String third_quarter_end = settings.get(SystemSettingPath.THIRD_QUARTER_END);
model.addAttribute("third_quarter_end", third_quarter_end);
String fourth_quarter_start = settings.get(SystemSettingPath.FOURTH_QUARTER_START);
model.addAttribute("fourth_quarter_start", fourth_quarter_start);
String fourth_quarter_end = settings.get(SystemSettingPath.FOURTH_QUARTER_END);
model.addAttribute("fourth_quarter_end", fourth_quarter_end);
return "system/config";
}
@RequestMapping("/system/config")
public String editContentTemplate(@ModelAttribute SystemConfigRequest systemConfigRequest, Model model) {
Map<String, String> settings = new HashMap<String, String>();
if (StringUtils.isNotBlank(systemConfigRequest.getWatermeter())) {
settings.put(SystemSettingPath.WATERMETER, systemConfigRequest.getWatermeter());
}
if (StringUtils.isNotBlank(systemConfigRequest.getMeter())) {
settings.put(SystemSettingPath.METER, systemConfigRequest.getMeter());
}
systemSettingService.updateSettings(settings);
return "redirect:/system/configPage";
}
} | [
"liufei_it@126.com"
] | liufei_it@126.com |
ad4746ce2ec59618e5f9e2a885e0917cd98bdadf | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/24/24_092166b134b438b64e2b5292ed65fc48eab80898/DebugContextImplTest/24_092166b134b438b64e2b5292ed65fc48eab80898_DebugContextImplTest_s.java | 5d08305fa4fa27a1a020d7b30911c2eb554e569e | [] | 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,837 | java | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.sdk.internal;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.Collections;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.chromium.sdk.Breakpoint;
import org.chromium.sdk.BrowserTab.BreakpointCallback;
import org.chromium.sdk.internal.transport.FakeConnection;
import org.junit.Test;
/**
* A test for the DebugContextImpl class.
*/
public class DebugContextImplTest extends AbstractAttachedTest<FakeConnection>{
/**
* Tests the invalidation of the debug context for context-sensitive
* operations (lookup etc.) on the "continue" request.
* @throws Exception
*/
@Test
public void checkContextIsInvalidatedOnContinue() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
final Breakpoint[] bp = new Breakpoint[1];
final String[] failure = new String[1];
browserTab.setBreakpoint(Breakpoint.Type.SCRIPT_NAME, "file:///C:/1.js", 18, 3, true, null, 0,
new BreakpointCallback() {
public void failure(String errorMessage) {
failure[0] = errorMessage == null ? "" : errorMessage;
latch.countDown();
}
public void success(Breakpoint breakpoint) {
bp[0] = breakpoint;
latch.countDown();
}
});
latch.await(100, TimeUnit.MILLISECONDS);
assertNull("Failed to set a breakpoint: " + failure[0], failure[0]);
assertNotNull("Breakpoint not set", bp[0]);
messageResponder.hitBreakpoints(Collections.singleton(bp[0].getId()));
waitForSuspend();
JsVariableImpl[] variables = suspendContext.getStackFrames()[0].getVariables();
// This call invalidates the debug context for the "lookup" operation that is invoked
// inside "ensureProperties".
suspendContext.continueVm(null, 1, null);
JsObjectImpl jsObject = variables[0].getValue().asObject();
jsObject.ensureProperties();
assertTrue(jsObject.isFailedResponse());
}
/**
* Checks that the debug context for context-sensitive operations
* (lookup etc.) is valid before sending the "continue" request.
* @throws Exception
*/
@Test
public void checkContextIsValidOffHand() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
final Breakpoint[] bp = new Breakpoint[1];
final String[] failure = new String[1];
browserTab.setBreakpoint(Breakpoint.Type.SCRIPT_NAME, "file:///C:/1.js", 18, 3, true, null, 0,
new BreakpointCallback() {
public void failure(String errorMessage) {
failure[0] = errorMessage == null ? "" : errorMessage;
latch.countDown();
}
public void success(Breakpoint breakpoint) {
bp[0] = breakpoint;
latch.countDown();
}
});
latch.await(100, TimeUnit.MILLISECONDS);
assertNull("Failed to set a breakpoint: " + failure[0], failure[0]);
assertNotNull("Breakpoint not set", bp[0]);
messageResponder.hitBreakpoints(Collections.singleton(bp[0].getId()));
waitForSuspend();
JsVariableImpl[] variables = suspendContext.getStackFrames()[0].getVariables();
JsObjectImpl jsObject = variables[0].getValue().asObject();
jsObject.ensureProperties();
assertFalse(jsObject.isFailedResponse());
}
@Override
protected FakeConnection createConnection() {
return new FakeConnection(messageResponder);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
29f6f02d717659a828d76ff79723e92a6d13a604 | 5f71c4233733d778d441410dbc6444b300e3b18a | /youlai-admin/admin-api/src/main/java/com/youlai/admin/api/AdminUserFeignClient.java | b6d1b285b5701e4881463a1f88e2710f6b1d33a9 | [
"MulanPSL-2.0",
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | longcheng-wangxj/youlai-mall | cf802a72db817c4b63ec5b8a2e52d40c4b276a35 | a1794d1d3d238768f6a84d567387b9167e1a9f42 | refs/heads/master | 2023-01-20T09:12:15.215112 | 2020-11-25T12:13:10 | 2020-11-25T12:13:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 475 | java | package com.youlai.admin.api;
import com.youlai.admin.dto.UserDTO;
import com.youlai.common.core.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@FeignClient("youlai-admin")
public interface AdminUserFeignClient {
@GetMapping("/users/user/{username}")
Result<UserDTO> loadUserByUsername(@PathVariable String username);
}
| [
"1490493387@qq.com"
] | 1490493387@qq.com |
5ca4644f533f189a12b3f8062aa414c891bd44a5 | 609f24a151b5abcf815f69293dc555e6fdd241eb | /utils/src/main/java/com/lsm1998/util/reactive/TimeOut.java | d0b8ead6d4e93b384fac7c65c4597233ea4f0803 | [] | no_license | lsm1998/code | 3842cda6c591d78eb8385eb2e767de59697e6407 | b4232edde2b8f2e569efae205a8f322e3ae9641a | refs/heads/master | 2022-12-24T20:16:25.008443 | 2021-10-23T04:47:48 | 2021-10-23T04:47:48 | 193,066,068 | 3 | 4 | null | 2022-12-14T20:43:34 | 2019-06-21T08:59:36 | Java | UTF-8 | Java | false | false | 355 | java | package com.lsm1998.util.reactive;
import java.util.concurrent.TimeUnit;
public class TimeOut
{
public static void main(String[] args) throws InterruptedException
{
long start = System.currentTimeMillis();
TimeUnit.SECONDS.sleep(1);
long end = System.currentTimeMillis();
System.out.println(end - start);
}
}
| [
"487005831@qq.com"
] | 487005831@qq.com |
f7e568c2ee807a5058b75aafd2fc5d8e954b8288 | e6844b2d6956539f8f74dd66a18517f78c2a8b58 | /firenio-core/src/main/java/com/firenio/component/FastThreadLocalThread.java | 9c577ed2364cdc0f0d398392b8d2302e51f451be | [
"Apache-2.0"
] | permissive | kobeHub/firenio | ace0d6b0dd5b9ea4566d7b5ded240a400e84d643 | 08efd8cd4b4e5ea6c85f9f9c00d71e6ef204d47a | refs/heads/master | 2022-11-28T22:23:36.326176 | 2020-07-23T15:13:16 | 2020-07-28T14:25:05 | 285,988,869 | 1 | 0 | null | 2020-08-08T06:40:07 | 2020-08-08T06:40:06 | null | UTF-8 | Java | false | false | 1,260 | java | /*
* Copyright 2015 The FireNio 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.firenio.component;
/**
* @author wangkai
*/
public class FastThreadLocalThread extends Thread {
private final FastThreadLocal threadLocal = new FastThreadLocal();
public FastThreadLocalThread(Runnable target, String name) {
this(null, target, name);
}
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name) {
this(group, target, name, 0);
}
public FastThreadLocalThread(ThreadGroup group, Runnable target, String name, long stackSize) {
super(group, target, name, stackSize);
}
public FastThreadLocal getThreadLocal() {
return threadLocal;
}
}
| [
"8738115@qq.com"
] | 8738115@qq.com |
9b1753e6ab4c1e4533602b30ca3cd8a181149dbf | 26d5db2b87ade205de3df079c18bf8cbd9204dbd | /mplus-common/src/main/java/com/mplus/common/vo/PageVo.java | d548622bcc0ca55ad4f4defe974a948081fcbcbe | [
"Apache-2.0"
] | permissive | wuwj-cn/mplus | 65ba77bad6885edfb4cf1302bbc3b39833504709 | 1c65ad715dab0e5174f9ef045c599bfa4aa07324 | refs/heads/master | 2023-05-01T12:33:48.791793 | 2020-01-03T03:17:34 | 2020-01-03T03:17:34 | 198,807,687 | 0 | 0 | Apache-2.0 | 2022-06-17T02:20:10 | 2019-07-25T10:09:24 | Java | UTF-8 | Java | false | false | 942 | java | /*
* Copyright 2018-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
*
* 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.mplus.common.vo;
import lombok.Data;
import java.util.List;
/**
* PageVo
*
* @author wuwj [254513235@qq.com]
* @since 1.0
*/
@Data
public class PageVo<T> {
private long totalElements;
private int totalPages;
private int pageNumber;
private int pageSize;
private List<T> content;
}
| [
"wenjie.0617@gmail.com"
] | wenjie.0617@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.