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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f07f014a656107767b070328f5bc0213a5360a22
|
5af2c500ae1c52bd8d01aa6d1f361b46afaa51e9
|
/adminweb/console/branches/20150205/src/main/java/com/tuanche/mapper/che/read/CarstyleGroupbuyReadMapper.java
|
7e8a4bd4db5d7732477d91235ee27e5e73ffbc06
|
[] |
no_license
|
1183618052/tuanche-old
|
a0464769b52cbd8bd0bc70be12978d917116bfc7
|
d19773659fdd3796be14cf7849a7a99bf69bed9d
|
refs/heads/master
| 2021-03-08T13:40:48.789834
| 2016-07-16T05:36:25
| 2016-07-16T05:36:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 860
|
java
|
package com.tuanche.mapper.che.read;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.tuanche.bean.che.CarstyleGroupbuy;
public interface CarstyleGroupbuyReadMapper {
public int check(@Param(value="cityId")int cityId,@Param(value="carstyleId")int carstyleId);
public CarstyleGroupbuy find(int id);
public List<CarstyleGroupbuy> select(Map<String,Object> map);
public int count(Map<String,Object> map);
public int maxSort(@Param(value="cityId")int cityId,@Param(value="brandId")int brandId);
public List<CarstyleGroupbuy> findByBrandId(@Param("bid")int bid,@Param("stateName")Integer stateName);
public List<CarstyleGroupbuy> findByBrand(@Param("pid")Integer pid,@Param("cid")Integer cid);
public List<CarstyleGroupbuy> findCountIsDelBrand(@Param("bid")int brandId,@Param("status")int status);
}
|
[
"404644381@qq.com"
] |
404644381@qq.com
|
dcd3908bda14e41350064eaf257109348179ad02
|
ec5ee0c75640206efcb7f7bc4a3f46f0a55b7652
|
/src/main/java/com/bitmovin/api/sdk/model/StreamFilter.java
|
fe100fcc30d92c449ee888541af5a9c01c4e3e05
|
[
"MIT"
] |
permissive
|
mcherif/bitmovinexp
|
eb831c18b041c9c86f6d9520b1028dc9b2ea72f6
|
d4d746794f26c8e9692c834e63d5d19503693bbf
|
refs/heads/main
| 2023-04-30T08:14:33.171375
| 2021-05-11T11:19:04
| 2021-05-11T11:19:04
| 368,218,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,419
|
java
|
package com.bitmovin.api.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
/**
* StreamFilter
*/
public class StreamFilter {
@JsonProperty("id")
private String id;
@JsonProperty("position")
private Integer position;
/**
* The id of the filter that should be used in the stream (required)
* @return id
*/
public String getId() {
return id;
}
/**
* The id of the filter that should be used in the stream (required)
*
* @param id
* The id of the filter that should be used in the stream (required)
*/
public void setId(String id) {
this.id = id;
}
/**
* Defines the order in which filters are applied. Filters are applied in ascending order. (required)
* @return position
*/
public Integer getPosition() {
return position;
}
/**
* Defines the order in which filters are applied. Filters are applied in ascending order. (required)
*
* @param position
* Defines the order in which filters are applied. Filters are applied in ascending order. (required)
*/
public void setPosition(Integer position) {
this.position = position;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StreamFilter streamFilter = (StreamFilter) o;
return Objects.equals(this.id, streamFilter.id) &&
Objects.equals(this.position, streamFilter.position);
}
@Override
public int hashCode() {
return Objects.hash(id, position);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StreamFilter {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" position: ").append(toIndentedString(position)).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 ");
}
}
|
[
"openapi@bitmovin.com"
] |
openapi@bitmovin.com
|
493426ab280f381bd47699f5455f4045a3b94d1e
|
463e346d259bda4bcfcddb62dd9476d4d15b8a31
|
/src/main/java/com/beamofsoul/rabbit/primary/entity/BaseAbstractRelationalEntity.java
|
c0e66a51ef7c53874cd7f1f0013f12e8f4c777d5
|
[] |
no_license
|
beamofsoul/rabbit
|
ba6ae5a5b402fe953cced8fb10b67142ebf8f83b
|
a889946009d6bc32db2f19c0c1645f202f9839f7
|
refs/heads/master
| 2021-09-07T21:52:19.542983
| 2018-03-01T15:12:30
| 2018-03-01T15:12:30
| 104,691,538
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 891
|
java
|
package com.beamofsoul.rabbit.primary.entity;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
@MappedSuperclass
public class BaseAbstractRelationalEntity extends BaseAbstractEntity {
private static final long serialVersionUID = -5824855325045563971L;
@Transient
private Long countOfChildren;
@Transient
private Boolean isParent;
public BaseAbstractRelationalEntity() {
super();
}
public BaseAbstractRelationalEntity(Long countOfChildren) {
super();
setter(countOfChildren);
}
public void setCountOfChildren(Long countOfChildren) {
setter(countOfChildren);
}
private void setter(Long countOfChildren) {
if (countOfChildren == null) countOfChildren = 0L;
this.countOfChildren = countOfChildren;
this.isParent = countOfChildren > 0;
}
}
|
[
"beamofsoul@sina.com"
] |
beamofsoul@sina.com
|
973e4f14335b1e561ded0f5e3ccbaf9552dc5f49
|
5d76b555a3614ab0f156bcad357e45c94d121e2d
|
/src-v2/com/google/ads/AdRequest.java
|
23dbf3c189aefa4a1c6b3021b8f666b605d6b699
|
[] |
no_license
|
BinSlashBash/xcrumby
|
8e09282387e2e82d12957d22fa1bb0322f6e6227
|
5b8b1cc8537ae1cfb59448d37b6efca01dded347
|
refs/heads/master
| 2016-09-01T05:58:46.144411
| 2016-02-15T13:23:25
| 2016-02-15T13:23:25
| 51,755,603
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 994
|
java
|
/*
* Decompiled with CFR 0_110.
*/
package com.google.ads;
@Deprecated
public final class AdRequest {
public static final String LOGTAG = "Ads";
public static final String TEST_EMULATOR = com.google.android.gms.ads.AdRequest.DEVICE_ID_EMULATOR;
public static final String VERSION = "0.0.0";
private AdRequest() {
}
public static enum ErrorCode {
INVALID_REQUEST("Invalid Ad request."),
NO_FILL("Ad request successful, but no ad returned due to lack of ad inventory."),
NETWORK_ERROR("A network error occurred."),
INTERNAL_ERROR("There was an internal error.");
private final String description;
private ErrorCode(String string3) {
this.description = string3;
}
public String toString() {
return this.description;
}
}
public static enum Gender {
UNKNOWN,
MALE,
FEMALE;
private Gender() {
}
}
}
|
[
"binslashbash@otaking.top"
] |
binslashbash@otaking.top
|
fcbf019afd0f82b01241479ddbca5fb901c1169c
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-oos/src/main/java/com/aliyuncs/oos/model/v20190601/UpdateSecretParameterResponse.java
|
d07fe49b5ff6bf5c0e316e905cb8e84fc900036f
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 4,122
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.oos.model.v20190601;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.oos.transform.v20190601.UpdateSecretParameterResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class UpdateSecretParameterResponse extends AcsResponse {
private String requestId;
private Parameter parameter;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Parameter getParameter() {
return this.parameter;
}
public void setParameter(Parameter parameter) {
this.parameter = parameter;
}
public static class Parameter {
private String type;
private String updatedDate;
private String updatedBy;
private String keyId;
private String tags;
private String description;
private String constraints;
private String resourceGroupId;
private String createdBy;
private String createdDate;
private Integer parameterVersion;
private String name;
private String id;
private String shareType;
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public String getUpdatedDate() {
return this.updatedDate;
}
public void setUpdatedDate(String updatedDate) {
this.updatedDate = updatedDate;
}
public String getUpdatedBy() {
return this.updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getKeyId() {
return this.keyId;
}
public void setKeyId(String keyId) {
this.keyId = keyId;
}
public String getTags() {
return this.tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getConstraints() {
return this.constraints;
}
public void setConstraints(String constraints) {
this.constraints = constraints;
}
public String getResourceGroupId() {
return this.resourceGroupId;
}
public void setResourceGroupId(String resourceGroupId) {
this.resourceGroupId = resourceGroupId;
}
public String getCreatedBy() {
return this.createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedDate() {
return this.createdDate;
}
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
public Integer getParameterVersion() {
return this.parameterVersion;
}
public void setParameterVersion(Integer parameterVersion) {
this.parameterVersion = parameterVersion;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getShareType() {
return this.shareType;
}
public void setShareType(String shareType) {
this.shareType = shareType;
}
}
@Override
public UpdateSecretParameterResponse getInstance(UnmarshallerContext context) {
return UpdateSecretParameterResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
6526a247c4951d45eff8b371b76b9628e74468c2
|
09a00394429e4bad33d18299358a54fcd395423d
|
/gradle/wrapper/dists/gradle-2.2.1-all/c64ydeuardnfqctvr1gm30w53/gradle-2.2.1/src/core/org/gradle/initialization/DirectoryInitScriptFinder.java
|
fb74c5c700308a89cb1c42573c755272f715fbd7
|
[
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LGPL-2.1-or-later",
"MIT",
"CPL-1.0",
"LGPL-2.1-only"
] |
permissive
|
agneske-arter-walter-mostertruck-firetr/pushfish-android
|
35001c81ade9bb0392fda2907779c1d10d4824c0
|
09157e1d5d2e33a57b3def177cd9077cd5870b24
|
refs/heads/master
| 2021-12-02T21:13:04.281907
| 2021-10-18T21:48:59
| 2021-10-18T21:48:59
| 215,611,384
| 0
| 0
|
BSD-2-Clause
| 2019-10-16T17:58:05
| 2019-10-16T17:58:05
| null |
UTF-8
|
Java
| false
| false
| 1,371
|
java
|
/*
* Copyright 2011 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.gradle.initialization;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
public abstract class DirectoryInitScriptFinder implements InitScriptFinder {
protected void findScriptsInDir(File initScriptsDir, Collection<File> scripts) {
if (!initScriptsDir.isDirectory()) {
return;
}
List<File> files = new ArrayList<File>();
for (File file : initScriptsDir.listFiles()) {
if (file.isFile() && file.getName().endsWith(".gradle")) {
files.add(file);
}
}
Collections.sort(files);
for (File file : files) {
scripts.add(file);
}
}
}
|
[
"mega@ioexception.at"
] |
mega@ioexception.at
|
abb9ec932ae50dc49346fa9768ece4c7cff6f4f5
|
7b4fd58090aa7013137ba2734d7f256b812861e1
|
/src/Ellias/rm/CobraHallQmiProto/TQmiPlugInVerInfo.java
|
b95361b457471ac9f97166a96d8390a7826933b9
|
[] |
no_license
|
daihuabin/Ellias
|
e37798a6a2e63454f80de512319ece885b6a2237
|
fd010991a5677e6aa104b927b82fc3d6da801887
|
refs/heads/master
| 2023-03-16T21:12:33.908495
| 2020-02-10T15:42:22
| 2020-02-10T15:42:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,305
|
java
|
package CobraHallQmiProto;
import com.qq.taf.jce.JceDisplayer;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;
import com.qq.taf.jce.JceUtil;
public final class TQmiPlugInVerInfo extends JceStruct
implements Cloneable
{
public int pluginVer = 0;
public String runPkgName = "";
static
{
if (!TQmiPlugInVerInfo.class.desiredAssertionStatus());
for (boolean bool = true; ; bool = false)
{
$assertionsDisabled = bool;
return;
}
}
public TQmiPlugInVerInfo()
{
}
public TQmiPlugInVerInfo(String paramString, int paramInt)
{
this.runPkgName = paramString;
this.pluginVer = paramInt;
}
public String className()
{
return "CobraHallQmiProto.TQmiPlugInVerInfo";
}
public Object clone()
{
try
{
Object localObject2 = super.clone();
localObject1 = localObject2;
return localObject1;
}
catch (CloneNotSupportedException localCloneNotSupportedException)
{
boolean bool;
do
{
bool = $assertionsDisabled;
Object localObject1 = null;
}
while (bool);
}
throw new AssertionError();
}
public void display(StringBuilder paramStringBuilder, int paramInt)
{
JceDisplayer localJceDisplayer = new JceDisplayer(paramStringBuilder, paramInt);
localJceDisplayer.display(this.runPkgName, "runPkgName");
localJceDisplayer.display(this.pluginVer, "pluginVer");
}
public void displaySimple(StringBuilder paramStringBuilder, int paramInt)
{
JceDisplayer localJceDisplayer = new JceDisplayer(paramStringBuilder, paramInt);
localJceDisplayer.displaySimple(this.runPkgName, true);
localJceDisplayer.displaySimple(this.pluginVer, false);
}
public boolean equals(Object paramObject)
{
if (paramObject == null);
TQmiPlugInVerInfo localTQmiPlugInVerInfo;
do
{
return false;
localTQmiPlugInVerInfo = (TQmiPlugInVerInfo)paramObject;
}
while ((!JceUtil.equals(this.runPkgName, localTQmiPlugInVerInfo.runPkgName)) || (!JceUtil.equals(this.pluginVer, localTQmiPlugInVerInfo.pluginVer)));
return true;
}
public String fullClassName()
{
return "CobraHallQmiProto.TQmiPlugInVerInfo";
}
public int getPluginVer()
{
return this.pluginVer;
}
public String getRunPkgName()
{
return this.runPkgName;
}
public int hashCode()
{
try
{
throw new Exception("Need define key first!");
}
catch (Exception localException)
{
localException.printStackTrace();
}
return 0;
}
public void readFrom(JceInputStream paramJceInputStream)
{
this.runPkgName = paramJceInputStream.readString(0, true);
this.pluginVer = paramJceInputStream.read(this.pluginVer, 1, true);
}
public void setPluginVer(int paramInt)
{
this.pluginVer = paramInt;
}
public void setRunPkgName(String paramString)
{
this.runPkgName = paramString;
}
public void writeTo(JceOutputStream paramJceOutputStream)
{
paramJceOutputStream.write(this.runPkgName, 0);
paramJceOutputStream.write(this.pluginVer, 1);
}
}
/* Location: D:\rm_src\classes_dex2jar\
* Qualified Name: CobraHallQmiProto.TQmiPlugInVerInfo
* JD-Core Version: 0.6.0
*/
|
[
"sevarsti@sina.com"
] |
sevarsti@sina.com
|
739225d9b764cb2d8fc5f075abbad66733539f66
|
da8fac5eaf6c40e593768fff9ab9f9a9567a2808
|
/tlatools/org.lamport.tlatools/test/tlc2/tool/suite/Test220.java
|
259446f119cc80aed98fb104d02536a7d435b97f
|
[
"MIT"
] |
permissive
|
tlaplus/tlaplus
|
dd02971ea1fface9a4e6642d0b433291ad462db4
|
baf6f1b4000ba72cd4ac2704d07c60ea2ae8343b
|
refs/heads/master
| 2023-09-03T17:39:23.238115
| 2023-08-28T00:28:30
| 2023-08-28T02:46:40
| 50,906,927
| 2,214
| 203
|
MIT
| 2023-09-05T21:38:47
| 2016-02-02T08:48:27
|
Java
|
UTF-8
|
Java
| false
| false
| 2,133
|
java
|
/*******************************************************************************
* Copyright (c) 2020 Microsoft Research. All rights reserved.
*
* The MIT License (MIT)
*
* 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 tlc2.tool.suite;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import tlc2.output.EC;
public class Test220 extends SuiteETestCase {
/* (non-Javadoc)
* @see tlc2.tool.liveness.ModelCheckerTestCase#checkDeadLock()
*/
protected boolean checkDeadLock() {
// Disable command-line parameter "-deadlock" to let configuration file take control.
return true;
}
@Test
public void testSpec() {
assertFalse(recorder.recorded(EC.TLC_DEADLOCK_REACHED));
assertTrue(recorder.recorded(EC.TLC_FINISHED));
assertTrue(recorder.recordedWithStringValues(EC.TLC_STATS, "2", "2", "0"));
assertFalse(recorder.recorded(EC.GENERAL));
assertZeroUncovered();
}
}
|
[
"tlaplus.net@lemmster.de"
] |
tlaplus.net@lemmster.de
|
799735303f0fb2fcd6f15e768c0cbfcb3f956f0a
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/di/da/src/main/java/org.wp.da/ui/media/MediaImageLoader.java
|
1aca7f35c346f9b7bf2733d6776e01d40aedc19e
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 1,558
|
java
|
package org.wp.da.ui.media;
import android.content.Context;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.Volley;
import org.wp.da.WordPress;
import org.wp.da.models.Blog;
import org.wp.da.util.AppLog;
import org.wp.da.util.VolleyUtils;
/**
* provides the ImageLoader and backing RequestQueue for media image requests - necessary because
* images in protected blogs need to be authenticated, which requires a separate RequestQueue
*/
class MediaImageLoader {
private MediaImageLoader() {
throw new AssertionError();
}
static ImageLoader getInstance() {
return getInstance(WordPress.getCurrentBlog());
}
static ImageLoader getInstance(Blog blog) {
if (blog != null && VolleyUtils.isCustomHTTPClientStackNeeded(blog)) {
// use ImageLoader with authenticating request queue for protected blogs
AppLog.d(AppLog.T.MEDIA, "using custom imageLoader");
Context context = WordPress.getContext();
RequestQueue authRequestQueue = Volley.newRequestQueue(context, VolleyUtils.getHTTPClientStack(context, blog));
ImageLoader imageLoader = new ImageLoader(authRequestQueue, WordPress.getBitmapCache());
imageLoader.setBatchedResponseDelay(0);
return imageLoader;
} else {
// use default ImageLoader for all others
AppLog.d(AppLog.T.MEDIA, "using default imageLoader");
return WordPress.imageLoader;
}
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
eca434d578eeff7364defa12b7c564376b4922ed
|
18b20a45faa4cf43242077e9554c0d7d42667fc2
|
/HelicoBacterMod/build/tmp/expandedArchives/forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3-sources.jar_db075387fe30fb93ccdc311746149f9d/net/minecraft/client/renderer/entity/layers/IronGolenFlowerLayer.java
|
2adb48dc8315caaee1e9c3d60240291ed35c64f7
|
[] |
no_license
|
qrhlhplhp/HelicoBacterMod
|
2cbe1f0c055fd5fdf97dad484393bf8be32204ae
|
0452eb9610cd70f942162d5b23141b6bf524b285
|
refs/heads/master
| 2022-07-28T16:06:03.183484
| 2021-03-20T11:01:38
| 2021-03-20T11:01:38
| 347,618,857
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,112
|
java
|
package net.minecraft.client.renderer.entity.layers;
import com.mojang.blaze3d.platform.GLX;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.IEntityRenderer;
import net.minecraft.client.renderer.entity.model.IronGolemModel;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.entity.passive.IronGolemEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class IronGolenFlowerLayer extends LayerRenderer<IronGolemEntity, IronGolemModel<IronGolemEntity>> {
public IronGolenFlowerLayer(IEntityRenderer<IronGolemEntity, IronGolemModel<IronGolemEntity>> p_i50935_1_) {
super(p_i50935_1_);
}
public void render(IronGolemEntity entityIn, float p_212842_2_, float p_212842_3_, float p_212842_4_, float p_212842_5_, float p_212842_6_, float p_212842_7_, float p_212842_8_) {
if (entityIn.getHoldRoseTick() != 0) {
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.rotatef(5.0F + 180.0F * this.getEntityModel().func_205071_a().rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
GlStateManager.rotatef(90.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.translatef(-0.9375F, -0.625F, -0.9375F);
float f = 0.5F;
GlStateManager.scalef(0.5F, -0.5F, 0.5F);
int i = entityIn.getBrightnessForRender();
int j = i % 65536;
int k = i / 65536;
GLX.glMultiTexCoord2f(GLX.GL_TEXTURE1, (float)j, (float)k);
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
Minecraft.getInstance().getBlockRendererDispatcher().renderBlockBrightness(Blocks.POPPY.getDefaultState(), 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
public boolean shouldCombineTextures() {
return false;
}
}
|
[
"rubickraft169@gmail.com"
] |
rubickraft169@gmail.com
|
8ed6fc8d1e00b337e95299b4379ea6d022adc5e3
|
d3af09ab5a8f3bf175a2b82f10a8604d30ffbffc
|
/app/src/androidTest/java/com/example/ibb/ExampleInstrumentedTest.java
|
418f20a3de24eea433cac1d2a4ff16589fec0d58
|
[] |
no_license
|
zhizhulp/IBB
|
30cb8afbdc75367b2bc4d41defeced26185d490c
|
eb6860cd317036afe2ee39b2b34e2c696e30ed81
|
refs/heads/master
| 2020-07-13T18:07:42.541714
| 2019-08-29T09:25:36
| 2019-08-29T09:25:36
| 205,127,878
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 315
|
java
|
package com.example.ibb;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleInstrumentedTest {
void useAppContext() throws Exception {
// Context of the app under test.
}
}
|
[
"liping@donglan.com"
] |
liping@donglan.com
|
f962cb6ea413a5b57bfd071395f70e3cd1b3c128
|
afa1cfbfb813d80910c49df964ab36537b0d29db
|
/src/test/java/io/github/hako/application/cucumber/stepdefs/UserStepDefs.java
|
15dd1fd46b017c88ebe60fe30e6d14540ee39d09
|
[] |
no_license
|
akiroussama/hako-blank-application
|
784bd2624e5164f8fed21b8109c6088bfc0790cf
|
2d35dcacb9efe48d29b872b56a78d144eb6ec38a
|
refs/heads/master
| 2020-05-03T11:45:27.914802
| 2019-03-30T20:34:50
| 2019-03-30T20:34:50
| 178,608,571
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,533
|
java
|
package io.github.hako.application.cucumber.stepdefs;
import cucumber.api.java.Before;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import io.github.hako.application.web.rest.UserResource;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
public class UserStepDefs extends StepDefs {
@Autowired
private UserResource userResource;
private MockMvc restUserMockMvc;
@Before
public void setup() {
this.restUserMockMvc = MockMvcBuilders.standaloneSetup(userResource).build();
}
@When("I search user {string}")
public void i_search_user(String userId) throws Throwable {
actions = restUserMockMvc.perform(get("/api/users/" + userId)
.accept(MediaType.APPLICATION_JSON));
}
@Then("the user is found")
public void the_user_is_found() throws Throwable {
actions
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE));
}
@Then("his last name is {string}")
public void his_last_name_is(String lastName) throws Throwable {
actions.andExpect(jsonPath("$.lastName").value(lastName));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
3a42d64fcf04f9f05d2ea23f540704049d6fb026
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/16/org/apache/commons/lang3/text/StrTokenizer_getTSVInstance_226.java
|
4d7b94acc37c7029888e412151e4acc7b146ed90
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,367
|
java
|
org apach common lang3 text
token string base base delimit separ
support quot charact concept
split string smaller string aim
similar job link java util string token stringtoken string token stringtoken
offer control flexibl includ implement
code list iter listiter code set
code string token stringtoken code
input string split number token
token separ string delimit
delimit charact
token surround quot
quot matcher specifi quot charact
quot escap quot section duplic
token delimit potenti charact trim
trimmer matcher specifi charact
usag trim whitespac charact
point quot potenti invalid charact
matcher specifi charact remov
usag remov line charact
empti token remov return
pre
token comma delimit
token csv process trim whitespac
token quot text untouch
pre
token properti option
tabl
properti type default
delim char set matcher charsetmatch
quot matcher nonematch
ignor matcher nonematch
empti token null emptytokenasnul
ignor empti token ignoreemptytoken
tabl
version
str token strtoken list iter listiter string cloneabl
token instanc pars tab separ string
csv process trim whitespac end
overridden set trimmer settrimm method
param input string pars
token instanc pars tab separ string
str token strtoken tsv instanc gettsvinst input
str token strtoken tok tsv clone gettsvclon
tok reset input
tok
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
873b6a2ab5f8d35b8d353cef137da2f780abfd30
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava16/Foo255.java
|
1a267b34f3f94187dc0baf216f0be8c91e850683
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package applicationModulepackageJava16;
public class Foo255 {
public void foo0() {
new applicationModulepackageJava16.Foo254().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
eda4cde3276d3e71f63d418538d57015e4993ea5
|
5741045375dcbbafcf7288d65a11c44de2e56484
|
/reddit-decompilada/com/google/android/gms/internal/zzye.java
|
86e93fbd094f6c1ffb6e9aaf244ec2cad75dadc1
|
[] |
no_license
|
miarevalo10/ReporteReddit
|
18dd19bcec46c42ff933bb330ba65280615c281c
|
a0db5538e85e9a081bf268cb1590f0eeb113ed77
|
refs/heads/master
| 2020-03-16T17:42:34.840154
| 2018-05-11T10:16:04
| 2018-05-11T10:16:04
| 132,843,706
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 480
|
java
|
package com.google.android.gms.internal;
final class zzye implements Runnable {
private /* synthetic */ zzafo f8147a;
private /* synthetic */ zzyd f8148b;
zzye(zzyd com_google_android_gms_internal_zzyd, zzafo com_google_android_gms_internal_zzafo) {
this.f8148b = com_google_android_gms_internal_zzyd;
this.f8147a = com_google_android_gms_internal_zzafo;
}
public final void run() {
this.f8148b.f18341a.mo3389b(this.f8147a);
}
}
|
[
"mi.arevalo10@uniandes.edu.co"
] |
mi.arevalo10@uniandes.edu.co
|
779892015f97fda48d70c5dd611027aed722bda7
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/141/183/CWE601_Open_Redirect__Servlet_connect_tcp_66b.java
|
b0322af53d9ad13ebe861dd5baefe8832eb78db1
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,514
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE601_Open_Redirect__Servlet_connect_tcp_66b.java
Label Definition File: CWE601_Open_Redirect__Servlet.label.xml
Template File: sources-sink-66b.tmpl.java
*/
/*
* @description
* CWE: 601 Open Redirect
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded string
* Sinks:
* BadSink : place redirect string directly into redirect api call
* Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package
*
* */
import javax.servlet.http.*;
import java.net.URI;
import java.net.URISyntaxException;
public class CWE601_Open_Redirect__Servlet_connect_tcp_66b
{
public void badSink(String dataArray[] , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataArray[2];
if (data != null)
{
/* This prevents \r\n (and other chars) and should prevent incidentals such
* as HTTP Response Splitting and HTTP Header Injection.
*/
URI uri;
try
{
uri = new URI(data);
}
catch (URISyntaxException exceptURISyntax)
{
response.getWriter().write("Invalid redirect URL");
return;
}
/* POTENTIAL FLAW: redirect is sent verbatim; escape the string to prevent ancillary issues like XSS, Response splitting etc */
response.sendRedirect(data);
return;
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(String dataArray[] , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataArray[2];
if (data != null)
{
/* This prevents \r\n (and other chars) and should prevent incidentals such
* as HTTP Response Splitting and HTTP Header Injection.
*/
URI uri;
try
{
uri = new URI(data);
}
catch (URISyntaxException exceptURISyntax)
{
response.getWriter().write("Invalid redirect URL");
return;
}
/* POTENTIAL FLAW: redirect is sent verbatim; escape the string to prevent ancillary issues like XSS, Response splitting etc */
response.sendRedirect(data);
return;
}
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
553f6be07e2759075622b40f1b3824501d42eb08
|
e977c424543422f49a25695665eb85bfc0700784
|
/benchmark/icse15/1050439/buggy-version/lucene/dev/branches/branch_3x/lucene/backwards/src/test/org/apache/lucene/index/TestSegmentMerger.java
|
435c04179b104dc2c97759ce3a84762aa9c2eb00
|
[] |
no_license
|
amir9979/pattern-detector-experiment
|
17fcb8934cef379fb96002450d11fac62e002dd3
|
db67691e536e1550245e76d7d1c8dced181df496
|
refs/heads/master
| 2022-02-18T10:24:32.235975
| 2019-09-13T15:42:55
| 2019-09-13T15:42:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,621
|
java
|
package org.apache.lucene.index;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.document.Document;
import java.io.IOException;
import java.util.Collection;
public class TestSegmentMerger extends LuceneTestCase {
//The variables for the new merged segment
private Directory mergedDir = new RAMDirectory();
private String mergedSegment = "test";
//First segment to be merged
private Directory merge1Dir = new RAMDirectory();
private Document doc1 = new Document();
private SegmentReader reader1 = null;
//Second Segment to be merged
private Directory merge2Dir = new RAMDirectory();
private Document doc2 = new Document();
private SegmentReader reader2 = null;
public TestSegmentMerger(String s) {
super(s);
}
@Override
protected void setUp() throws Exception {
super.setUp();
DocHelper.setupDoc(doc1);
SegmentInfo info1 = DocHelper.writeDoc(merge1Dir, doc1);
DocHelper.setupDoc(doc2);
SegmentInfo info2 = DocHelper.writeDoc(merge2Dir, doc2);
reader1 = SegmentReader.get(true, info1, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
reader2 = SegmentReader.get(true, info2, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
}
public void test() {
assertTrue(mergedDir != null);
assertTrue(merge1Dir != null);
assertTrue(merge2Dir != null);
assertTrue(reader1 != null);
assertTrue(reader2 != null);
}
public void testMerge() throws IOException {
SegmentMerger merger = new SegmentMerger(mergedDir, mergedSegment);
merger.add(reader1);
merger.add(reader2);
int docsMerged = merger.merge();
assertTrue(docsMerged == 2);
//Should be able to open a new SegmentReader against the new directory
SegmentReader mergedReader = SegmentReader.get(true, new SegmentInfo(mergedSegment, docsMerged, mergedDir, false, true), IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
assertTrue(mergedReader != null);
assertTrue(mergedReader.numDocs() == 2);
Document newDoc1 = mergedReader.document(0);
assertTrue(newDoc1 != null);
//There are 2 unstored fields on the document
assertTrue(DocHelper.numFields(newDoc1) == DocHelper.numFields(doc1) - DocHelper.unstored.size());
Document newDoc2 = mergedReader.document(1);
assertTrue(newDoc2 != null);
assertTrue(DocHelper.numFields(newDoc2) == DocHelper.numFields(doc2) - DocHelper.unstored.size());
TermDocs termDocs = mergedReader.termDocs(new Term(DocHelper.TEXT_FIELD_2_KEY, "field"));
assertTrue(termDocs != null);
assertTrue(termDocs.next() == true);
Collection stored = mergedReader.getFieldNames(IndexReader.FieldOption.INDEXED_WITH_TERMVECTOR);
assertTrue(stored != null);
//System.out.println("stored size: " + stored.size());
assertTrue("We do not have 3 fields that were indexed with term vector",stored.size() == 3);
TermFreqVector vector = mergedReader.getTermFreqVector(0, DocHelper.TEXT_FIELD_2_KEY);
assertTrue(vector != null);
String [] terms = vector.getTerms();
assertTrue(terms != null);
//System.out.println("Terms size: " + terms.length);
assertTrue(terms.length == 3);
int [] freqs = vector.getTermFrequencies();
assertTrue(freqs != null);
//System.out.println("Freqs size: " + freqs.length);
assertTrue(vector instanceof TermPositionVector == true);
for (int i = 0; i < terms.length; i++) {
String term = terms[i];
int freq = freqs[i];
//System.out.println("Term: " + term + " Freq: " + freq);
assertTrue(DocHelper.FIELD_2_TEXT.indexOf(term) != -1);
assertTrue(DocHelper.FIELD_2_FREQS[i] == freq);
}
TestSegmentReader.checkNorms(mergedReader);
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
e47964660f5c12b78738b57a2e38f256952a92fa
|
711b1a5ce5053ff134c1832053901dd6a4794452
|
/src/br/edu/ufcg/lsd/oursim/events/peer/DisposeWorkerEvent.java
|
0fc5adaec77692e1da1fdd2c88cf04b813493d18
|
[] |
no_license
|
marcosnobrega/oursim-ext
|
072480c24a88cdf5a79cb113c64d286f6ae09640
|
98a202a10c26603eaa62cf33cd5437b5512e5aeb
|
refs/heads/master
| 2021-01-17T06:35:10.127245
| 2011-05-16T02:15:08
| 2011-05-16T02:15:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 811
|
java
|
package br.edu.ufcg.lsd.oursim.events.peer;
import br.edu.ufcg.lsd.oursim.OurSim;
import br.edu.ufcg.lsd.oursim.entities.grid.Peer;
import br.edu.ufcg.lsd.oursim.events.AbstractEvent;
import br.edu.ufcg.lsd.oursim.events.Event;
import br.edu.ufcg.lsd.oursim.events.peer.allocation.WorkerDistributionHelper;
public class DisposeWorkerEvent extends AbstractEvent {
private final String workerId;
private final String peerId;
public DisposeWorkerEvent(Long time, String workerId, String peerId) {
super(time, Event.DEF_PRIORITY, null);
this.workerId = workerId;
this.peerId = peerId;
}
@Override
public void process(OurSim ourSim) {
Peer peer = ourSim.getGrid().getObject(peerId);
WorkerDistributionHelper.redistributeWorker(getTime(), peer, workerId, ourSim);
}
}
|
[
"abmargb@gmail.com"
] |
abmargb@gmail.com
|
67a9b68435c74743ed5d932c48fa55061746004a
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/yandex/mobile/ads/mediation/banner/e.java
|
c667a1c9289294fc99233f656eb37703920ae2d8
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,499
|
java
|
package com.yandex.mobile.ads.mediation.banner;
import android.content.Context;
import android.support.annotation.NonNull;
import com.yandex.mobile.ads.impl.a;
import com.yandex.mobile.ads.impl.bd;
import com.yandex.mobile.ads.impl.bg;
import com.yandex.mobile.ads.impl.bi;
import com.yandex.mobile.ads.impl.bj;
import com.yandex.mobile.ads.impl.bm;
import com.yandex.mobile.ads.impl.fo;
import com.yandex.mobile.ads.impl.x;
import com.yandex.mobile.ads.mediation.banner.MediatedBannerAdapter;
public final class e implements b {
@NonNull
private final MediatedBannerAdapter.MediatedBannerAdapterListener a;
@NonNull
private final bd<MediatedBannerAdapter, MediatedBannerAdapter.MediatedBannerAdapterListener> b;
public e(@NonNull a aVar, @NonNull x<String> xVar, @NonNull bm bmVar) {
fo s = aVar.s();
f fVar = new f(s);
bj bjVar = new bj(s, xVar);
bd<MediatedBannerAdapter, MediatedBannerAdapter.MediatedBannerAdapterListener> bdVar = new bd<>(s, new d(), bjVar, new c(new bg(bmVar, fVar, bjVar)), new bi(aVar, bmVar));
this.b = bdVar;
this.a = new a(aVar, bdVar, new g(aVar.a(), bdVar));
}
@Override // com.yandex.mobile.ads.mediation.banner.b
public final void a(@NonNull Context context) {
this.b.a(context);
}
@Override // com.yandex.mobile.ads.mediation.banner.b
public final void a(@NonNull Context context, @NonNull x<String> xVar) {
this.b.a(context, (Context) this.a);
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
8812a226fe40f1c0a0025e434ae380a7e483617c
|
f9b254b3d57453bd6fc4e66dc082f3e92dce4179
|
/EHomeHDV5_1/CustomView/src/com/yuantuo/customview/tabs/adapters/TabPagerViewAdapter.java
|
aa834bb656934bc16f861c22ba530450ab954966
|
[] |
no_license
|
zcz123/ehome
|
a45255bb4ebbfeb7804f424b1be53cf531589bf6
|
5a2df0be832f542cab6b49e7a0e8071d4f101525
|
refs/heads/master
| 2021-01-19T21:47:57.674732
| 2017-04-19T04:13:16
| 2017-04-19T04:13:16
| 88,708,738
| 3
| 0
| null | 2017-04-19T06:24:17
| 2017-04-19T06:24:17
| null |
UTF-8
|
Java
| false
| false
| 1,446
|
java
|
package com.yuantuo.customview.tabs.adapters;
import java.util.ArrayList;
import java.util.List;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;
import com.yuantuo.customview.tabs.TabPagerSpace;
import com.yuantuo.customview.tabs.interfaces.IPagerAction;
import com.yuantuo.customview.tabs.interfaces.OnTabAndPagerChanged;
public class TabPagerViewAdapter extends PagerAdapter implements IPagerAction
{
private List<View> mTabViews;
private OnTabAndPagerChanged impl;
public TabPagerViewAdapter()
{
mTabViews = new ArrayList<View>();
}
public void addPager( TabPagerSpace space ){
mTabViews.add((View)space.mPagerContent.createContent());
}
public void removePager(int pos){
mTabViews.remove(pos);
}
@Override
public int getCount(){
return impl.getTabPagerCount();
}
@Override
public boolean isViewFromObject( View view, Object object ){
return view == object;
}
@Override
public Object instantiateItem( ViewGroup container, int position ){
View view = mTabViews.get(position);
container.addView(view);
return view;
}
@Override
public void destroyItem( ViewGroup container, int position, Object object ){
container.removeView((View) object);
}
@Override
public void setOnTabAndPagerChanged( OnTabAndPagerChanged pagerChanged ){
impl = pagerChanged;
}
@Override
public OnTabAndPagerChanged geTabAndPagerChanged(){
return impl;
}
}
|
[
"584692417@qq.com"
] |
584692417@qq.com
|
cfa2f922b1c20701ff38334e0ba6bf6749e05832
|
160a34361073a54d39ffa14fdae6ce3cbc7d6e6b
|
/src/main/java/com/alipay/api/domain/AlipayOpenMiniInnerversionPreviewUploadModel.java
|
54b3125cbadcb9aec1d78d063b3abd3215cc98e5
|
[
"Apache-2.0"
] |
permissive
|
appbootup/alipay-sdk-java-all
|
6a5e55629b9fc77e61ee82ea2c4cdab2091e0272
|
9ae311632a4053b8e5064b83f97cf1503a00147b
|
refs/heads/master
| 2020-05-01T09:45:44.940180
| 2019-03-15T09:52:14
| 2019-03-15T09:52:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,182
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 多端小程序-真机预览接口
*
* @author auto create
* @since 1.0, 2018-02-26 16:16:03
*/
public class AlipayOpenMiniInnerversionPreviewUploadModel extends AlipayObject {
private static final long serialVersionUID = 4742332697118196599L;
/**
* 构建参数- JSAPI 权限文件, JSON 字符串
*/
@ApiField("build_js_permission")
private String buildJsPermission;
/**
* 构建参数-IDE 构建好的包地址
*/
@ApiField("build_pkg_url")
private String buildPkgUrl;
/**
* 小程序ID
*/
@ApiField("mini_app_id")
private String miniAppId;
public String getBuildJsPermission() {
return this.buildJsPermission;
}
public void setBuildJsPermission(String buildJsPermission) {
this.buildJsPermission = buildJsPermission;
}
public String getBuildPkgUrl() {
return this.buildPkgUrl;
}
public void setBuildPkgUrl(String buildPkgUrl) {
this.buildPkgUrl = buildPkgUrl;
}
public String getMiniAppId() {
return this.miniAppId;
}
public void setMiniAppId(String miniAppId) {
this.miniAppId = miniAppId;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
22a56f82408a9fed78fea5e493e06e5c9e7c26b2
|
4692a13a5cf139cb89549e7791337c6e7568fdd5
|
/Editors/org.palladiosimulator.editors.dialogs/src/org/palladiosimulator/editors/dialogs/usage/OpenInterArrivalTimeDialog.java
|
6e8f51d7077a0a449b4904fd61c631a812fb3b08
|
[] |
no_license
|
SQuAT-Team/kamp-test
|
95b87067d03c3e2ed36912f898a3130e9de40dd9
|
8285478066a760fcd2ed1972b799c6895493d256
|
refs/heads/master
| 2022-06-26T21:29:19.209964
| 2019-04-01T11:53:59
| 2019-04-01T11:53:59
| 56,880,344
| 0
| 1
| null | 2021-06-03T19:33:40
| 2016-04-22T19:31:42
|
Java
|
UTF-8
|
Java
| false
| false
| 1,368
|
java
|
package org.palladiosimulator.editors.dialogs.usage;
import org.eclipse.emf.ecore.EObject;
import org.palladiosimulator.pcm.usagemodel.OpenWorkload;
import de.uka.ipd.sdq.stoex.RandomVariable;
import de.uka.ipd.sdq.stoex.analyser.visitors.TypeEnum;
// TODO: Auto-generated Javadoc
// Manually written open policy to open the StoEx Dialog. It's
// called via a CustomBehaviour in the genmap
/**
* The Class OpenInterArrivalTimeDialog.
*/
public class OpenInterArrivalTimeDialog extends OpenStoExDialog {
/**
* Gets the random variable.
*
* @param parent the parent
* @return the random variable
* @see org.palladiosimulator.editors.dialogs.usage.OpenStoExDialog#getRandomVariable(org.eclipse.emf.ecore.EObject)
*/
@Override
protected RandomVariable getRandomVariable(EObject parent) {
OpenWorkload ow = (OpenWorkload) parent;
RandomVariable rv = ow.getInterArrivalTime_OpenWorkload();
return rv;
}
/**
* Gets the expected type.
*
* @param rv the rv
* @return the expected type
* @see org.palladiosimulator.editors.dialogs.usage.OpenStoExDialog#getExpectedType(de.uka.ipd.sdq.stoex.RandomVariable)
*/
@Override
protected TypeEnum getExpectedType(RandomVariable rv) {
return TypeEnum.DOUBLE;
}
}
|
[
"alejandrorago@MacBook-Pro.local"
] |
alejandrorago@MacBook-Pro.local
|
f609aa5694c05dc0f862709010b8d3241d0aa606
|
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
|
/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/quests/Q00166_MassOfDarkness/Q00166_MassOfDarkness.java
|
e4335eabede8593322488fda029f090cff9a5a8d
|
[] |
no_license
|
BETAJIb/ikol
|
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
|
f3709ea10be2d155b0bf1dee487f53c723f570cf
|
refs/heads/master
| 2021-01-05T10:37:17.831153
| 2019-12-24T22:23:02
| 2019-12-24T22:23:02
| 240,993,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,150
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00166_MassOfDarkness;
import java.util.HashMap;
import java.util.Map;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
/**
* Mass of Darkness (166)
* @author xban1x
*/
public class Q00166_MassOfDarkness extends Quest
{
// NPCs
private static final int UNDRIAS = 30130;
private static final int IRIA = 30135;
private static final int DORANKUS = 30139;
private static final int TRUDY = 30143;
// Items
private static final int UNDRIAS_LETTER = 1088;
private static final int CEREMONIAL_DAGGER = 1089;
private static final int DREVIANT_WINE = 1090;
private static final int GARMIELS_SCRIPTURE = 1091;
// Misc
private static final int MIN_LVL = 2;
private static final Map<Integer, Integer> NPCs = new HashMap<>();
static
{
NPCs.put(IRIA, CEREMONIAL_DAGGER);
NPCs.put(DORANKUS, DREVIANT_WINE);
NPCs.put(TRUDY, GARMIELS_SCRIPTURE);
}
public Q00166_MassOfDarkness()
{
super(166);
addStartNpc(UNDRIAS);
addTalkId(UNDRIAS, IRIA, DORANKUS, TRUDY);
registerQuestItems(UNDRIAS_LETTER, CEREMONIAL_DAGGER, DREVIANT_WINE, GARMIELS_SCRIPTURE);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && event.equals("30130-03.htm"))
{
qs.startQuest();
giveItems(player, UNDRIAS_LETTER, 1);
return event;
}
return null;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (npc.getId())
{
case UNDRIAS:
{
switch (qs.getState())
{
case State.CREATED:
{
htmltext = (player.getRace() == Race.DARK_ELF) ? (player.getLevel() >= MIN_LVL) ? "30130-02.htm" : "30130-01.htm" : "30130-00.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(2) && hasQuestItems(player, UNDRIAS_LETTER, CEREMONIAL_DAGGER, DREVIANT_WINE, GARMIELS_SCRIPTURE))
{
showOnScreenMsg(player, NpcStringId.DELIVERY_DUTY_COMPLETE_N_GO_FIND_THE_NEWBIE_HELPER, 2, 5000); // TODO: Newbie Guide
giveAdena(player, 50, true);
qs.exitQuest(false, true);
htmltext = "30130-05.html";
}
else
{
htmltext = "30130-04.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
break;
}
case IRIA:
case DORANKUS:
case TRUDY:
{
if (qs.isStarted())
{
final int npcId = npc.getId();
final int itemId = NPCs.get(npcId);
if (qs.isCond(1) && !hasQuestItems(player, itemId))
{
giveItems(player, itemId, 1);
if (hasQuestItems(player, CEREMONIAL_DAGGER, DREVIANT_WINE, GARMIELS_SCRIPTURE))
{
qs.setCond(2, true);
}
htmltext = npcId + "-01.html";
}
else
{
htmltext = npcId + "-02.html";
}
break;
}
}
}
return htmltext;
}
}
|
[
"mobius@cyber-wizard.com"
] |
mobius@cyber-wizard.com
|
ce54ca42a1f9ecc67562ead45a5aa8c9bf1fd876
|
cf729a7079373dc301d83d6b15e2451c1f105a77
|
/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201601/cm/OfflineConversionFeedServiceInterfacemutateResponse.java
|
21a9434467f84700f63c37332413cdf654513163
|
[] |
no_license
|
cvsogor/Google-AdWords
|
044a5627835b92c6535f807ea1eba60c398e5c38
|
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
|
refs/heads/master
| 2023-03-23T05:49:33.827251
| 2021-03-17T14:35:13
| 2021-03-17T14:35:13
| 348,719,387
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,689
|
java
|
package com.google.api.ads.adwords.jaxws.v201601.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for mutateResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="mutateResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://adwords.google.com/api/adwords/cm/v201601}OfflineConversionFeedReturnValue" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "mutateResponse")
public class OfflineConversionFeedServiceInterfacemutateResponse {
protected OfflineConversionFeedReturnValue rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link OfflineConversionFeedReturnValue }
*
*/
public OfflineConversionFeedReturnValue getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link OfflineConversionFeedReturnValue }
*
*/
public void setRval(OfflineConversionFeedReturnValue value) {
this.rval = value;
}
}
|
[
"vacuum13@gmail.com"
] |
vacuum13@gmail.com
|
c5e279ea5dcac7d727a4a7eeca756145c11efd33
|
d1f18a98261ef1d870afb5b705387a34fa1ae8d4
|
/offer-algorithm/src/main/java/leetcode/contest/week252/Test5833_统计特殊子序列的数目.java
|
bec1bf15e7c697130d560bbc96929a02151d3e23
|
[] |
no_license
|
luguanxing/Offer-Algorithm
|
6472cca1bcd4b51a9b603226a787f18acfe521a9
|
7ec579a5359295b4f1b23f0afd551f434184a61e
|
refs/heads/master
| 2023-09-01T05:36:46.417275
| 2023-09-01T02:18:56
| 2023-09-01T02:18:56
| 244,928,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,233
|
java
|
package leetcode.contest.week252;
public class Test5833_统计特殊子序列的数目 {
public static void main(String[] args) {
System.out.println(new Solution().countSpecialSubsequences(
new int[]{0, 1, 2, 2}
));
System.out.println(new Solution().countSpecialSubsequences(
new int[]{2, 2, 0, 0}
));
System.out.println(new Solution().countSpecialSubsequences(
new int[]{0, 1, 2, 0, 1, 2}
));
System.out.println(new Solution().countSpecialSubsequences(
new int[]{1, 0, 1, 0, 2}
));
}
static class Solution {
public int countSpecialSubsequences(int[] nums) {
int len = nums.length;
int MOD = 1000000007;
// fx[i]表示前i项可存在x的方法数
long[] f0 = new long[len];
long[] f1 = new long[len];
long[] f2 = new long[len];
if (nums[0] == 0) {
f0[0] = 1;
}
for (int i = 1; i < len; i++) {
long num = nums[i];
if (num == 0) {
f1[i] = f1[i - 1];
f2[i] = f2[i - 1];
// 不要该0的方法数
f0[i] += f0[i - 1];
// 要该0方法数,也可单独存在
f0[i] += f0[i - 1] + 1;
f0[i] %= MOD;
} else if (num == 1) {
f0[i] = f0[i - 1];
f2[i] = f2[i - 1];
// 不要该1的方法数
f1[i] += f1[i - 1];
// 要该1方法数,需要前面为0或1
f1[i] += f0[i - 1] + f1[i - 1];
f1[i] %= MOD;
} else if (num == 2) {
f0[i] = f0[i - 1];
f1[i] = f1[i - 1];
// 不要该2的方法数
f2[i] += f2[i - 1];
// 要该2方法数,需要前面为1或2
f2[i] += f1[i - 1] + f2[i - 1];
f2[i] %= MOD;
}
}
return (int) f2[len - 1];
}
}
}
|
[
"651571925@qq.com"
] |
651571925@qq.com
|
d3539843d104b397b7c9f83ff452e8d68e2e13d8
|
7721407d859fb513d0dec265887ed1cf661a3273
|
/framework/src/test/java/com/jinhe/tss/framework/mock/UMServiceTest.java
|
c1f47bebe7d52481730ada4da3714a294f43fc50
|
[] |
no_license
|
search-cloud/jinhe-tss
|
03ccc70bb7a2b8ba47f0c230b339d8b7b90c7696
|
1fdd31bf0410fe385667b6ae0a51216369681b32
|
refs/heads/master
| 2021-05-26T21:08:49.393299
| 2013-12-05T12:25:38
| 2013-12-05T12:25:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,036
|
java
|
package com.jinhe.tss.framework.mock;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import com.jinhe.tss.framework.TxTestSupport;
import com.jinhe.tss.framework.mock.dao._IUserDAO;
import com.jinhe.tss.framework.mock.model._Group;
import com.jinhe.tss.framework.mock.model._GroupRole;
import com.jinhe.tss.framework.mock.model._GroupRoleId;
import com.jinhe.tss.framework.mock.model._Role;
import com.jinhe.tss.framework.mock.model._User;
import com.jinhe.tss.framework.mock.service._IUMSerivce;
public class UMServiceTest extends TxTestSupport {
@Autowired _IUMSerivce umSerivce;
@Autowired _IUserDAO userDao;
@Test
public void testGetEntitiesByHQL() {
_Group group = new _Group();
group.setCode("RD");
group.setName("研发");
umSerivce.createGroup(group);
_User user = new _User();
user.setGroup(group);
user.setUserName("JohnXa");
user.setPassword("123456");
user.setAge(new Integer(25));
user.setAddr("New York");
user.setEmail("john@hotmail.com");
umSerivce.createUser(user);
String hql = "from _User t where t.userName in ( :names ) ";
List<String> nameList = new ArrayList<String>();
nameList.add("JohnXa");
List<?> result = userDao.getEntities(hql, new Object[]{"names"}, new Object[]{nameList});
assertEquals(1, result.size());
log.debug(result.get(0));
}
@Test
public void testGetEntitiesByNativeSql() {
_Group group = new _Group();
group.setCode("RD");
group.setName("研发");
umSerivce.createGroup(group);
_User user = new _User();
user.setGroup(group);
user.setUserName("JohnXa");
user.setPassword("123456");
user.setAge(new Integer(25));
user.setAddr("New York");
user.setEmail("john@hotmail.com");
umSerivce.createUser(user);
String nativeSql = "select t.* from test_user t where t.userName = ? ";
List<?> result = userDao.getEntitiesByNativeSql(nativeSql, _User.class, "JohnXa");
assertEquals(1, result.size());
log.debug(result.get(0));
}
@Test
public void testUMCRUD() {
log.info("test start......");
_Group group = new _Group();
group.setCode("RD");
group.setName("研发");
umSerivce.createGroup(group);
_User user = new _User();
user.setGroup(group);
user.setUserName("JohnXa");
user.setPassword("123456");
user.setAge(new Integer(25));
user.setAddr("New York");
user.setEmail("john@hotmail.com");
umSerivce.createUser(user);
List<_User> result = umSerivce.queryAllUsers();
assertEquals(1, result.size());
_User userPo = result.get(0);
log.info(userPo + userPo.getCreateTime().toString());
userPo.setUserName("Jon.King");
umSerivce.updateUser(userPo);
log.info(userPo + userPo.getUpdateTime().toString());
result = umSerivce.queryAllUsers();
userPo = result.get(0);
log.info(userPo);
umSerivce.deleteUser(userPo);
result = umSerivce.queryAllUsers();
assertEquals(0, result.size());
_Role role = new _Role();
role.setCode("Engineer");
role.setName("工程师");
umSerivce.createRole(role);
_GroupRole gr = new _GroupRole();
gr.setId(new _GroupRoleId(group.getId(), role.getId()));
umSerivce.createGroupRole(gr);
_UMCondition condition = new _UMCondition();
assertEquals(1, umSerivce.queryGroupRole(condition).size());
}
}
|
[
"jinpujun@gmail.com"
] |
jinpujun@gmail.com
|
25395af735ee80c6cea04df0a652414a7f022fb9
|
8a5c4fed881352b3e559f6a5d54beaab83d57920
|
/src/Origins/IA.java
|
25ed025bff93409b8af7123873565e161c39a2e5
|
[] |
no_license
|
Blackdread/Origins
|
587681972a87f50b2386c6963882c12e4b85e4eb
|
5de79807eae38e5e083a20b306b0bde8ab3f844d
|
refs/heads/master
| 2016-09-05T13:18:28.330733
| 2015-12-06T04:44:51
| 2015-12-06T04:44:51
| 14,828,840
| 0
| 0
| null | null | null | null |
MacCentralEurope
|
Java
| false
| false
| 2,318
|
java
|
package Origins;
import java.util.ArrayList;
import org.lwjgl.Sys;
/**
* Classe IA
* Créer une IA basique
*
* @author Yoann CAPLAIN
* @version 0.5
*/
@SuppressWarnings("unused")
public class IA implements Runnable{
private Game _game;
// *************
// Variable de base de l'IA
private static int NB_NAIN_MAX = 80;
private static int NB_UNIT_ATTAQ_MAX = 200;
private static int INTERVAL_ATTAQ = 21000; // ms
// *************
// Une var qui se met automatiquement apres certain temps ą false -> Savoir si on est attaquer et gerer ća
// Une autre pour voir depuis quand on a attaquer l'ennemie, puis preparer une attaque
// avoir un min de nain, voir pour le milieu
// Si dans un combat, voir les unités dans la zone puis transformer ce qui faut
private long lastAttack;
// J1
private ArrayList<Monster> arrayMonsterOwnerInCombat = new ArrayList<Monster>();
// J2 (l'ordinateur)
private ArrayList<Monster> arrayMonsterEnnemyInCombat = new ArrayList<Monster>();
// LES DEUX
// Constructeur
IA(Game game){
this._game = game;
lastAttack = getTime();
}
@Override
public void run(){
}
private void checkCombat(){
}
/** Compte les différents combats, combien d'unité au combat
* Mais va surtout compter le nombre d'unité ennemie dans le combat
* */
private void checkUnitEngaged(){
}
private void checkUnitDistanceCooldownRun(){
}
/** Vérifie s'il y a d'autre unité amis dans un périmŹtre dans lequel l'unité se fait attaquer */
private void checkUnitAllieArround(){
}
private void checkUnit(ArrayList<Monster> array){
}
/** Vérifie le nb de nain, il faut en avoir un minimum */
private void checkNbNain(){
}
/** Utilise les zones dans Game zone(x,y) et place les nains */
private void checkNainPos(){
}
/** Regarde les unités de l'ennemie et agit pour mettre ses nains au milieu */
private void checkNainStrategy(){
}
/** Verifier s'il est possible d'acheter des nains */
private void checkAchatNain(){
while(_game.argentJ2 >= Game.getCOST_NAIN())
_game.acheterUnit(0,2);
}
/**
* Get the accurate system time
*
* @return The system time in milliseconds
*/
public long getTime() {
return (Sys.getTime() * 1000) / Sys.getTimerResolution();
}
}
|
[
"jojo.julien@gmail.com"
] |
jojo.julien@gmail.com
|
947b2a217937e4308095d2513e96a08077c86268
|
16ba716cf9beebad3c4c78f656acbe513502d57a
|
/src/com/forge/fex/verilogprime/ext/Net_typeContextExt.java
|
7984420e890f319958e75a44aa1235e4f1518a8a
|
[] |
no_license
|
wwei1988/forge
|
27c336013a883cf75f0d69a68068c80e04e81253
|
7793c7c645d33bb6b24a55ba757b42e226a40b36
|
refs/heads/master
| 2020-06-26T08:25:59.871561
| 2018-03-12T17:55:10
| 2018-03-12T17:55:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 992
|
java
|
package com.forge.fex.verilogprime.ext;
import org.antlr.v4.runtime.ParserRuleContext;
import com.forge.fex.verilogprime.gen.VerilogPrimeParser.Net_typeContext;
import com.forge.fex.verilogprime.utils.PopulateExtendedContextVisitor;
public class Net_typeContextExt extends AbstractBaseExt {
public Net_typeContextExt(Net_typeContext ctx) {
addToContexts(ctx);
parent = ctx;
}
@Override
public Net_typeContext getContext() {
return (Net_typeContext) contexts.get(contexts.size() - 1);
}
@Override
public ParserRuleContext getContext(String str) {
return new PopulateExtendedContextVisitor().visit(getPrimeParser(str).net_type());
}
@Override
public void setContext(ParserRuleContext ctx) {
if (ctx != null) {
if (ctx instanceof Net_typeContext) {
addToContexts(ctx);
} else {
throw new ClassCastException(
ctx.getClass().getSimpleName() + " cannot be cased to " + Net_typeContext.class.getName());
}
} else {
addToContexts(null);
}
}
}
|
[
"sgodugul@cisco.com"
] |
sgodugul@cisco.com
|
86fb303d92451b73ccd750a4a3afa857dce6bbe9
|
6fae2e8073f12c8c9848d580fb99788999fdaee7
|
/gen/com/zju/mobilepaymentapp/BuildConfig.java
|
897e8459ebf92228655020070e7d045b8cd3644a
|
[] |
no_license
|
COFFEE-ZJU/MobilePaymentApp
|
4699a03cbe8af812137198b92e97b4301845345f
|
6abfa2fa45610f57f8b257f874039ea298edd31a
|
refs/heads/master
| 2021-01-22T00:55:03.162332
| 2013-06-15T08:27:43
| 2013-06-15T08:27:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
/** Automatically generated file. DO NOT MODIFY */
package com.zju.mobilepaymentapp;
public final class BuildConfig {
public final static boolean DEBUG = true;
}
|
[
"zhangkf92@gmail.com"
] |
zhangkf92@gmail.com
|
f24bae9dd803ddd075fc60740764cce0ffec07a9
|
1c53d5257ea7be9450919e6b9e0491944a93ba80
|
/merge-scenarios/dubbo/247f88088-dubbo-common-src-main-java-org-apache-dubbo-common-constants-RegistryConstants/right.java
|
9d5d857b1af2d8060778c711e36c71afa08afb19
|
[] |
no_license
|
anonyFVer/mastery-material
|
89062928807a1f859e9e8b9a113b2d2d123dc3f1
|
db76ee571b84be5db2d245f3b593b29ebfaaf458
|
refs/heads/master
| 2023-03-16T13:13:49.798374
| 2021-02-26T04:19:19
| 2021-02-26T04:19:19
| 342,556,129
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
package org.apache.dubbo.common.constants;
public interface RegistryConstants {
String REGISTRY_KEY = "registry";
String REGISTRY_PROTOCOL = "registry";
String DYNAMIC_KEY = "dynamic";
String CATEGORY_KEY = "category";
String PROVIDERS_CATEGORY = "providers";
String CONSUMERS_CATEGORY = "consumers";
String ROUTERS_CATEGORY = "routers";
String DYNAMIC_ROUTERS_CATEGORY = "dynamicrouters";
String DEFAULT_CATEGORY = PROVIDERS_CATEGORY;
String CONFIGURATORS_CATEGORY = "configurators";
String DYNAMIC_CONFIGURATORS_CATEGORY = "dynamicconfigurators";
String APP_DYNAMIC_CONFIGURATORS_CATEGORY = "appdynamicconfigurators";
String ROUTERS_SUFFIX = ".routers";
String EMPTY_PROTOCOL = "empty";
String ROUTE_PROTOCOL = "route";
String OVERRIDE_PROTOCOL = "override";
String COMPATIBLE_CONFIG_KEY = "compatible_config";
String REGISTRY_TYPE_KEY = "registry-type";
String SERVICE_REGISTRY_TYPE = "service";
String SERVICE_REGISTRY_PROTOCOL = "service-discovery-registry";
String SUBSCRIBED_SERVICE_NAMES_KEY = "subscribed-services";
String INSTANCES_REQUEST_SIZE_KEY = "instances-request-size";
int DEFAULT_INSTANCES_REQUEST_SIZE = 100;
String ACCEPTS_KEY = "accepts";
}
|
[
"namasikanam@gmail.com"
] |
namasikanam@gmail.com
|
66f99a4d60325f4df57796452f6b4edf6e6a874e
|
f7f29b8c8a8b997ecd8ae3009d17bd7cd42317f8
|
/22 - IOCProj22-StrategyPattern-Spring-AutoWiring-byType/src/com/nt/comp/Vehicle.java
|
7e59876414eaa11583ac0440baa70eeb02a91710
|
[] |
no_license
|
PraveenJavaWorld/Spring
|
802244885ec9f4e5710a5af630e47621c1c6d973
|
d4f987b987f2a8b142440c992114ecb66aec3412
|
refs/heads/master
| 2023-05-29T08:06:25.273785
| 2021-06-11T16:18:35
| 2021-06-11T16:18:35
| 315,967,988
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 491
|
java
|
package com.nt.comp;
public class Vehicle {
private IEngine engg; //HAS-A property/Composition
public void setEngg(IEngine engg) {
System.out.println("Vehicle.setEngg(-)");
this.engg = engg;
}
public void journey(String Source,String Destination) {
engg.start();
System.out.println("Journey Started at :: "+Source);
System.out.println("Journey is going on ----");
engg.stop();
System.out.println("Journey Stopped at :: "+Destination);
}
}
|
[
"praveen97javaworld@gmail.com"
] |
praveen97javaworld@gmail.com
|
b1d3fecfb5d9d66e75dce6ce974467e7281641aa
|
16a3610cda4afe9ebf4a1ed45e57cddd6b0a768b
|
/src/main/java/framework/execution/ReflectionRunner.java
|
b61843d0b2587c4be06c2cf51656acb2bb3dd6ea
|
[] |
no_license
|
jphong89/Grader
|
f558299712313a15078ae14be745e18f338b2ab8
|
8464b331eec46f1f12b74e0d6f895ce2b95f576d
|
refs/heads/master
| 2020-02-26T13:56:46.118821
| 2014-12-05T01:48:46
| 2014-12-05T01:48:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,309
|
java
|
package framework.execution;
import framework.project.ClassDescription;
import framework.project.ClassesManager;
import framework.project.Project;
import tools.TimedProcess;
import util.misc.TeePrintStream;
import util.pipe.InputGenerator;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/**
* Runs a project in the same JVM using reflection to invoke the main method.
* @see {@link grader.execution.AReflectionBasedProjectRunner}
*/
public class ReflectionRunner implements Runner {
private Project project;
public ReflectionRunner(Project project) {
this.project = project;
}
/**
* Runs the project with no arguments
* @param input The input to provide
* @return A RunningProject object which you can use for synchronization and acquiring output
* @throws NotRunnableException
*/
@Override
public RunningProject run(String input) throws NotRunnableException {
return run(input, new String[]{}, -1);
}
@Override
public RunningProject run(String input, int timeout) throws NotRunnableException {
// TODO: Add timeout
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* This runs the project with no arguments
* @param input Input to use as System.in
* @param args Arguments for the program
* @return A RunningProject object which you can use for synchronization and acquiring output
* @throws NotRunnableException
*/
@Override
public RunningProject run(final String input, final String[] args, int timeout) throws NotRunnableException {
final RunningProject runner = new RunningProject(project, null, input);
try {
runner.start();
} catch (InterruptedException e) {
throw new NotRunnableException();
}
new Thread(new Runnable() {
@Override
public void run() {
InputStream systemIn = System.in;
PrintStream systemOut = new PrintStream(System.out);
try {
// Create the input/output streams
InputStream stdin = new ByteArrayInputStream(input.getBytes());
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PrintStream stdout = new TeePrintStream(outputStream, System.out);
System.setIn(stdin);
System.setOut(stdout);
// Get the main method and invoke it
Class mainClass = getMainClass();
Object[] mainArgs = new Object[]{args};
Method mainMethod = getMainMethod(mainClass);
mainMethod.invoke(mainClass, mainArgs);
// Close the Tee stream
stdin.close();
stdout.close();
// Do something with the output
runner.setOutput(outputStream.toString());
runner.end();
} catch (Exception e) {
runner.error();
runner.end();
} finally {
System.setIn(systemIn);
System.setOut(systemOut);
}
}
}).start();
return runner;
}
/**
* Finds which class has the main method. This finds the first class with main
* @return The Class containing main
* @throws NotRunnableException
*/
private Class<?> getMainClass() throws NotRunnableException {
if (project.getClassesManager().isDefined()) {
ClassesManager manager = (ClassesManager) project.getClassesManager().get();
for (ClassDescription classDescription : manager.getClassDescriptions()) {
Class<?> _class = classDescription.getJavaClass();
try {
Method method = _class.getMethod("main", String[].class);
if (Modifier.isStatic(method.getModifiers()))
return _class;
} catch (NoSuchMethodException e) {
}
}
throw new NotRunnableException();
} else
throw new NotRunnableException();
}
/**
* This gets the main method giving a class. This also transforms the exception to a NotRunnableException
* @param mainClass The class containing main
* @return The main {@link Method}
* @throws NotRunnableException
*/
private Method getMainMethod(Class<?> mainClass) throws NotRunnableException {
try {
return mainClass.getMethod("main", String[].class);
} catch (NoSuchMethodException e) {
throw new NotRunnableException();
}
}
@Override
public RunningProject run(InputGenerator anOutputBasedInputGenerator, String[] command, String input,
String[] args, int timeout) throws NotRunnableException {
// TODO Auto-generated method stub
return null;
}
@Override
public RunningProject run(InputGenerator aDynamicInputProvider, String anEntryPoint, String input,
String[] args, int timeout) throws NotRunnableException {
// TODO Auto-generated method stub
return null;
}
@Override
public TimedProcess run(RunningProject aRunner, InputGenerator anOutputBasedInputGenerator,
String[] command, String input, String[] args, int timeout, String aProcess, boolean wait)
throws NotRunnableException {
// TODO Auto-generated method stub
return null;
}
@Override
public RunningProject run(InputGenerator aDynamicInputProvider, String input, String[] args,
int timeout)
throws NotRunnableException {
// TODO Auto-generated method stub
return null;
}
@Override
public RunningProject run(
InputGenerator anOutputBasedInputGenerator,
String input, int timeout) throws NotRunnableException {
// TODO Auto-generated method stub
return null;
}
}
|
[
"dewan@cs.unc.edu"
] |
dewan@cs.unc.edu
|
78e7640db0458d4c7791fc06a638149a7d441b36
|
bc25e657ee14b5b2d0b5132bb756dc4a3a345cd9
|
/psm/basic/src/t04_map/T02_mapGetOrDefault.java
|
e3c04f7de1c0c2fc7af54c0a2f5710e915111815
|
[] |
no_license
|
chosi30629/study
|
8b57c795cf88c16b17a140e0e3295599ec01e258
|
e8d2f4cceefbe6fa76ebbb04018636251fcf570e
|
refs/heads/main
| 2023-03-20T06:34:51.673083
| 2021-03-10T13:54:05
| 2021-03-10T13:54:05
| 342,790,048
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,107
|
java
|
package t04_map;
import java.util.HashMap;
import java.util.Map;
/**
* - 주어진 문자열에서 반복되지 않는 첫 번째 문자를 찾아서 Index 를 return 합니다.
* - 존재하지 않으면 -1을 반환합니다.
*
* Example
* String s = "inflearninlove"
*
* Note
* 문자열에 영문 소문자만 포함
*/
public class T02_mapGetOrDefault {
public static void main(String[] args) {
String s = "inflearninlove";
System.out.println(solve(s));
}
public static int solve(String s) {
if (s == null || s.length() == 0) {
return -1;
}
Map<Character, Integer> map = new HashMap<>();
for (char c : s.toCharArray()) {
// if (!map.containsKey(c)) {
// map.put(c, 1);
// } else {
// map.put(c, map.get(c) + 1);
// }
map.put(c, map.getOrDefault(c, 0) + 1);
}
for (int i = 0; i < s.length(); i++) {
if (map.get(s.charAt(i)) == 1) {
return i;
}
}
return -1;
}
}
|
[
"chosi30629@gmail.com"
] |
chosi30629@gmail.com
|
c7c45a2041529c4c5a8452d4835a320baa3e5318
|
6071619d795e873f108b7f2d539c2b56da97574e
|
/myconfig-service-impl/src/test/java/net/myconfig/service/audit/AuditedInterface.java
|
2e12110ef7d57bee8a9d67984e221debd256237c
|
[] |
no_license
|
liveqmock/myconfig
|
0362efa4a7498944ce097a8b4c8ba1f526fb64f2
|
806bda3950cf4f77ad05e078be459b8beeb54449
|
refs/heads/master
| 2020-12-26T04:49:12.948935
| 2012-11-30T20:05:56
| 2012-11-30T20:05:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 619
|
java
|
package net.myconfig.service.audit;
import net.myconfig.core.UserFunction;
import net.myconfig.core.model.Ack;
public interface AuditedInterface {
void noAudit();
void identifierOnly(int id);
void identifierAndMessage(int id, String message);
Ack identifierAndResult (int id);
void allKeys(String application, String environment, String version, String key);
Ack withCollection (String application, CollectionItems items);
void withException(String id);
void expressionMismatch(String application);
Ack userAndFunctionOnly (String user, UserFunction function);
}
|
[
"damien.coraboeuf@gmail.com"
] |
damien.coraboeuf@gmail.com
|
e7a19fe0c3515fc5eefee2a03fdd4194e8ad8c40
|
6a876694dc5276b9cc41e43c3445a5e792766c57
|
/src/main/java/org/three/one/exercises/Exercise24.java
|
a3d2feec6fe811af38b0e6b035fe02d9f2fba261
|
[] |
no_license
|
zchengi/Algorithm
|
9bcfdefdf5d8852be624d49ffb82fa3f0190d5f4
|
7276aed9934147acc02a52ac06fd83bd85822deb
|
refs/heads/master
| 2021-09-18T15:20:26.974991
| 2018-07-16T09:24:21
| 2018-07-16T09:24:21
| 107,095,799
| 0
| 0
| null | 2017-10-17T03:31:08
| 2017-10-16T07:54:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,751
|
java
|
package org.three.one.exercises;
import org.one.day9.StopWatch;
import java.util.Arrays;
/**
* 3.1.24 插值法查找。假设符号表的键支持算数操作(例如,它们可能是Double或者Integer类型的值)。
* 编写一个二分炒作来模拟查字典的行为,例如当单词的字母在字母表的开头时我们也会在字典的前半部分进行查找。
* 具体来说,设Klo为符号表的第一个键,Khi为符号表的最后一个键,当要查找Kx时,先和 (Kx - Klo) / (Khi - Klo) 进行比较,
* 而非取中间元素。用SearchComparable调用FrequencyCounter来比较你的实现和BinarySearchST的性能。
*
* 分析:插值查找比较灵活,并不是简单的从中间进行的,它是根据我们需要查询的值的渐进进行搜索的。
* 插值查找的不同点在于每一次并不是从中间切分,而是根据离所求值的距离进行搜索的。
*
* 结论:插值法查找比较次数更少。
*
* @author cheng
* 2018/2/11 23:45
*/
public class Exercise24 {
public static int compares;
public static int interpolationSearch(int[] a, int key) {
int lo = 0;
int hi = a.length - 1;
while (lo <= hi) {
double scale = 1.0 * (key - lo) / (hi - lo);
int mid = lo + (int) (scale * (hi - lo));
compares++;
if (key < mid) hi = mid - 1;
else if (key > mid) lo = mid + 1;
else return mid;
}
return -1;
}
public static int BinarySearch(int[] a, int key) {
int lo = 0;
int hi = a.length - 1;
while (lo <= hi) {
int mid = (hi - lo) / 2 + lo;
compares++;
if (key < mid) hi = mid - 1;
else if (key > mid) lo = mid + 1;
else return mid;
}
return -1;
}
public static void main(String[] args) {
int n = 10000000;
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = (int) (Math.random() * n) + 1;
}
Arrays.sort(a);
int key = (int) (Math.random() * n) + 1;
StopWatch timer = new StopWatch();
int res1 = interpolationSearch(a, key);
int cmp1 = compares;
double t1 = timer.elapsedTime();
compares = 0;
timer = new StopWatch();
int res2 = BinarySearch(a, key);
int cmp2 = compares;
double t2 = timer.elapsedTime();
System.out.println("插值法查找值:" + key + ",结果为:" + res1 + "比较次数:" + cmp1 + ",耗时:" + t1);
System.out.println("插值法查找值:" + key + ",结果为:" + res2 + "比较次数:" + cmp2 + ",耗时:" + t2);
}
}
|
[
"792702352@qq.com"
] |
792702352@qq.com
|
b2e3a310c7fc355e569dcd73d227ebdafb470b1d
|
9aab0199da3bd87897baf024cef6febce6d1c6bc
|
/sharding-transaction-spi-impl/sharding-transaction-base-spi-impl/sharding-transaction-base-saga/src/main/java/io/shardingsphere/transaction/base/hook/revert/snapshot/UpdateSnapshotAccessor.java
|
42504084c552f629b04f0fa4217763eb71e7ebfb
|
[
"Apache-2.0"
] |
permissive
|
hzhangse/shardingsphere-spi-impl
|
0aafcb6d6b21183fd407ca25fbd47cd8df05b53c
|
2ea42c17cda15a30649aba9d0efbdfa0ace4b87f
|
refs/heads/master
| 2020-08-30T04:30:25.616851
| 2019-09-13T15:21:40
| 2019-09-13T15:21:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,457
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.shardingsphere.transaction.base.hook.revert.snapshot;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import io.shardingsphere.transaction.base.hook.revert.executor.SQLRevertExecutorContext;
import org.apache.shardingsphere.core.parse.sql.segment.dml.assignment.AssignmentSegment;
import org.apache.shardingsphere.core.parse.sql.segment.dml.predicate.WhereSegment;
import org.apache.shardingsphere.core.parse.sql.segment.generic.TableSegment;
import org.apache.shardingsphere.core.parse.sql.statement.dml.UpdateStatement;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
/**
* Update snapshot accessor.
*
* @author zhaojun
*/
public final class UpdateSnapshotAccessor extends DMLSnapshotAccessor {
private UpdateStatement updateStatement;
public UpdateSnapshotAccessor(final SQLRevertExecutorContext executorContext) {
super(executorContext);
this.updateStatement = (UpdateStatement) executorContext.getShardingStatement().getSQLStatement();
}
@Override
protected SnapshotSQLContext getSnapshotSQLContext(final SQLRevertExecutorContext context) {
return new SnapshotSQLContext(context.getConnection(), context.getActualTableName(), getWhereParameters(context),
getQueryColumnNames(context), getTableAlias().or(""), getWhereClause());
}
private Collection<String> getQueryColumnNames(final SQLRevertExecutorContext context) {
Collection<String> result = new LinkedList<>();
Preconditions.checkState(!context.getPrimaryKeyColumns().isEmpty(),
"Could not found primary key columns, datasourceName:[%s], tableName:[%s]", context.getDataSourceName(), context.getActualTableName());
List<String> remainPrimaryKeys = new LinkedList<>(context.getPrimaryKeyColumns());
for (AssignmentSegment each : updateStatement.getSetAssignment().getAssignments()) {
result.add(each.getColumn().getName());
remainPrimaryKeys.remove(each.getColumn().getName());
}
result.addAll(remainPrimaryKeys);
return result;
}
private Optional<String> getTableAlias() {
Optional<TableSegment> table = findLogicTable(getExecutorContext().getLogicTableName());
if (table.isPresent() && table.get().getAlias().isPresent() && !table.get().getAlias().get().equals(table.get().getTableName())) {
return table.get().getAlias();
}
return Optional.absent();
}
private Optional<TableSegment> findLogicTable(final String logicTableName) {
for (TableSegment each : updateStatement.getTables()) {
if (logicTableName.equals(each.getTableName())) {
return Optional.of(each);
}
}
return Optional.absent();
}
private String getWhereClause() {
Optional<WhereSegment> whereSegment = updateStatement.getWhere();
return whereSegment.isPresent() ? getExecutorContext().getLogicSQL().substring(whereSegment.get().getStartIndex(), whereSegment.get().getStopIndex() + 1) : "";
}
private Collection<Object> getWhereParameters(final SQLRevertExecutorContext context) {
Collection<Object> result = new LinkedList<>();
Optional<WhereSegment> whereSegment = updateStatement.getWhere();
if (whereSegment.isPresent()) {
for (int i = whereSegment.get().getParameterStartIndex(); i <= whereSegment.get().getParametersCount(); i++) {
result.add(context.getParameters().get(i));
}
}
return result;
}
}
|
[
"zhaojunv3@126.com"
] |
zhaojunv3@126.com
|
21ac002872f64886a6d714105f31a9fc0165f96c
|
922746e28e43f54a086d1cdcff2cfe426b173dd7
|
/wang/src/main/java/com/jc/oa/machine/service/impl/ToaMachineOperatorServiceImpl.java
|
0dcf296aec899b7798ef014deb87da591606c77c
|
[] |
no_license
|
wtfc/springboot-shyt
|
f934161c6cdf37ba99515257ffba7f8d50822b5c
|
1b67918f7a129ffef16ca61be0738c241029866f
|
refs/heads/master
| 2020-04-09T05:24:39.017913
| 2018-12-02T17:42:27
| 2018-12-02T17:42:27
| 160,063,362
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,657
|
java
|
package com.jc.oa.machine.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.jc.foundation.service.impl.BaseServiceImpl;
import com.jc.oa.machine.domain.ToaMachineOperator;
import com.jc.oa.machine.dao.IToaMachineOperatorDao;
import com.jc.oa.machine.service.IToaMachineOperatorService;
import com.jc.system.CustomException;
/**
* @author mrb
* @version 机房操作
*/
@Service
public class ToaMachineOperatorServiceImpl extends BaseServiceImpl<ToaMachineOperator> implements IToaMachineOperatorService {
public ToaMachineOperatorServiceImpl(){}
private IToaMachineOperatorDao toaMachineOperatorDao;
@Autowired
public ToaMachineOperatorServiceImpl(IToaMachineOperatorDao toaMachineOperatorDao){
super(toaMachineOperatorDao);
this.toaMachineOperatorDao = toaMachineOperatorDao;
}
/**
* @description 根据主键删除多条记录方法
* @param EatOutreg eatOutreg 实体类
* @return Integer 处理结果
* @author
* @version 2015-03-31
*/
@Transactional(rollbackFor=Exception.class,propagation=Propagation.REQUIRED)
public Integer deleteByIds(ToaMachineOperator toaMachineOperator) throws CustomException{
Integer result = -1;
try{
propertyService.fillProperties(toaMachineOperator,true);
result = toaMachineOperatorDao.delete(toaMachineOperator);
}catch(Exception e){
CustomException ce = new CustomException(e);
ce.setBean(toaMachineOperator);
throw ce;
}
return result;
}
}
|
[
"1226105567@qq.com"
] |
1226105567@qq.com
|
fc15fd35f7fa8713589b7b1190a70cad53d0f73a
|
ebce08cdc71226bf780ba700ba255667b518f54f
|
/memory-leak/src/com/example/Main.java
|
da9bdb756b4412e4a776f70a267a56d92938a24f
|
[
"MIT"
] |
permissive
|
deepcloudlabs/dcl200-java-performance-tuning-and-optimization
|
80c008b1dbd624cfa0c21843b89857ed53edbc85
|
5b61920e4c2ddecf9eb23cb70b35e316802d9fcd
|
refs/heads/main
| 2023-08-05T11:10:44.051278
| 2021-09-16T15:04:25
| 2021-09-16T15:04:25
| 406,115,959
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,033
|
java
|
package com.example;
import java.util.*;
import static java.util.Objects.hash;
public class Main {
public static void main(String[] args) {
ArrayList<Employee> emps= new ArrayList<>(100_000);
emps.ensureCapacity(300_000);
HashSet<Employee> employees = new HashSet<>(100_000);
employees.add(new Employee("1", 10000,"jack bauer"));
employees.add(new Employee("2", 20000,"kate austen"));
employees.add(new Employee("3", 30000,"james sawyer"));
System.out.println(employees.size());
System.out.println(employees.contains(new Employee("2", 20000,"kate austen")));
// after some codes...
System.out.println("After a long long long time...");
employees.remove(new Employee("2", 20000,"kate austen"));
System.out.println(employees.contains(new Employee("2", 20000,"kate austen")));
System.out.println(employees.size());
}
}
class Employee {
private String identityNo;
private double salary;
private String fullName;
public Employee(String identityNo, double salary, String fullName) {
this.identityNo = identityNo;
this.salary = salary;
this.fullName = fullName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Employee employee = (Employee) o;
return Objects.equals(identityNo, employee.identityNo);
}
@Override
public int hashCode() {
return hash(identityNo);
}
public String getIdentityNo() {
return identityNo;
}
public void setIdentityNo(String identityNo) {
this.identityNo = identityNo;
}
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
}
|
[
"deepcloudlabs@gmail.com"
] |
deepcloudlabs@gmail.com
|
f9624dfe38ec535ccd889bcd718319547bdc3391
|
3953a0fdfc7da2b47b81c48df0a398850f17da4a
|
/src/main/java/br/inf/portalfiscal/xsd/cte/consReciCTe_v300/TUnidadeTransp.java
|
b3dde43387c0ab19c92234f467bd61a06fef5e19
|
[] |
no_license
|
tlmacedo/xsd_Nfe_Cte
|
83d34088ad063e04906c6c910ac4d501d560d65d
|
6b3eea5027cf2927323c4247c7c3c7a3349c8be0
|
refs/heads/main
| 2023-01-27T14:58:48.453452
| 2020-12-02T22:53:14
| 2020-12-02T22:53:14
| 318,008,134
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,856
|
java
|
//
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementaxe7xe3o de Referxeancia (JAXB) de Bind XML, v2.3.1-b171012.0423
// Consulte <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Todas as modificaxe7xf5es neste arquivo serxe3o perdidas apxf3s a recompilaxe7xe3o do esquema de origem.
// Gerado em: 2020.06.27 xe0s 02:46:34 PM AMT
//
package br.inf.portalfiscal.xsd.cte.consReciCTe_v300;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Tipo Dados Unidade de Transporte
*
* <p>Classe Java de TUnidadeTransp complex type.
*
* <p>O seguinte fragmento do esquema especifica o contexFAdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="TUnidadeTransp">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="tpUnidTransp" type="{http://www.portalfiscal.inf.br/cte}TtipoUnidTransp"/>
* <element name="idUnidTransp" type="{http://www.portalfiscal.inf.br/cte}TContainer"/>
* <element name="lacUnidTransp" maxOccurs="unbounded" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="nLacre">
* <simpleType>
* <restriction base="{http://www.portalfiscal.inf.br/cte}TString">
* <minLength value="1"/>
* <maxLength value="20"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* <element name="infUnidCarga" type="{http://www.portalfiscal.inf.br/cte}TUnidCarga" maxOccurs="unbounded" minOccurs="0"/>
* <element name="qtdRat" type="{http://www.portalfiscal.inf.br/cte}TDec_0302_0303" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TUnidadeTransp", propOrder = {
"tpUnidTransp",
"idUnidTransp",
"lacUnidTransp",
"infUnidCarga",
"qtdRat"
})
public class TUnidadeTransp {
@XmlElement(required = true)
protected String tpUnidTransp;
@XmlElement(required = true)
protected String idUnidTransp;
protected List<TUnidadeTransp.LacUnidTransp> lacUnidTransp;
protected List<TUnidCarga> infUnidCarga;
protected String qtdRat;
/**
* ObtxE9m o valor da propriedade tpUnidTransp.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTpUnidTransp() {
return tpUnidTransp;
}
/**
* Define o valor da propriedade tpUnidTransp.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTpUnidTransp(String value) {
this.tpUnidTransp = value;
}
/**
* ObtxE9m o valor da propriedade idUnidTransp.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIdUnidTransp() {
return idUnidTransp;
}
/**
* Define o valor da propriedade idUnidTransp.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIdUnidTransp(String value) {
this.idUnidTransp = value;
}
/**
* Gets the value of the lacUnidTransp property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the lacUnidTransp property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getLacUnidTransp().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TUnidadeTransp.LacUnidTransp }
*
*
*/
public List<TUnidadeTransp.LacUnidTransp> getLacUnidTransp() {
if (lacUnidTransp == null) {
lacUnidTransp = new ArrayList<TUnidadeTransp.LacUnidTransp>();
}
return this.lacUnidTransp;
}
/**
* Gets the value of the infUnidCarga property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the infUnidCarga property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getInfUnidCarga().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TUnidCarga }
*
*
*/
public List<TUnidCarga> getInfUnidCarga() {
if (infUnidCarga == null) {
infUnidCarga = new ArrayList<TUnidCarga>();
}
return this.infUnidCarga;
}
/**
* ObtxE9m o valor da propriedade qtdRat.
*
* @return
* possible object is
* {@link String }
*
*/
public String getQtdRat() {
return qtdRat;
}
/**
* Define o valor da propriedade qtdRat.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setQtdRat(String value) {
this.qtdRat = value;
}
/**
* <p>Classe Java de anonymous complex type.
*
* <p>O seguinte fragmento do esquema especifica o contexFAdo esperado contido dentro desta classe.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="nLacre">
* <simpleType>
* <restriction base="{http://www.portalfiscal.inf.br/cte}TString">
* <minLength value="1"/>
* <maxLength value="20"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"nLacre"
})
public static class LacUnidTransp {
@XmlElement(required = true)
protected String nLacre;
/**
* ObtxE9m o valor da propriedade nLacre.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNLacre() {
return nLacre;
}
/**
* Define o valor da propriedade nLacre.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNLacre(String value) {
this.nLacre = value;
}
}
}
|
[
"tl.macedo@hotmail.com"
] |
tl.macedo@hotmail.com
|
f5e4e27f0e9c9b35abcab9802e2dc9ad8ed7eca8
|
9b91a5007c782574d1b93b4907550f8eab332ff5
|
/base.utils/src/main/java/com/framework/utils/http/Method.java
|
179e4b7dc6051738dfb04f28bcc983bf1b4da25e
|
[] |
no_license
|
wangyongst/myframework
|
c1ee26b1fbaa8af8153d942c6a9919e8807fac09
|
4359e8d463b077eacb3b7ff21f62c6fc999fd3b8
|
refs/heads/master
| 2020-12-31T04:56:02.405349
| 2018-03-21T03:13:30
| 2018-03-21T03:13:30
| 56,040,147
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 158
|
java
|
package com.framework.utils.http;
/**
* Http方法枚举
* @author
*
*/
public enum Method {
GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, CONNECT;
}
|
[
"wangyongst@gmail.com"
] |
wangyongst@gmail.com
|
038a7d1e7ad707bc388dc098252a6d7e0f0e93c9
|
4402e1c82572b327eee84938425cf2bc66a88336
|
/library/src/main/java/com/just/agentwebX5/DefaultWebLifeCycleImpl.java
|
3747ae59527cfaf9f85631128d70567393c297ab
|
[
"Apache-2.0"
] |
permissive
|
13971643458/AgentWebX5
|
e196213eca614a292885cd9daf858641b48b280e
|
045841c69a3b0551b9e21c5df5d1f62c4f7129e7
|
refs/heads/master
| 2021-08-22T12:33:15.052974
| 2017-11-30T06:57:05
| 2017-11-30T06:57:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,027
|
java
|
package com.just.agentwebX5;
import android.os.Build;
import com.tencent.smtt.sdk.WebView;
/**
* Created by cenxiaozhong on 2017/6/3.
*
* source CODE https://github.com/Justson/AgentWebX5
*/
public class DefaultWebLifeCycleImpl implements WebLifeCycle {
private WebView mWebView;
DefaultWebLifeCycleImpl(WebView webView) {
this.mWebView = webView;
}
@Override
public void onResume() {
if (this.mWebView != null) {
if (Build.VERSION.SDK_INT >= 11)
this.mWebView.onResume();
this.mWebView.resumeTimers();
}
}
@Override
public void onPause() {
if (this.mWebView != null) {
this.mWebView.pauseTimers();
if (Build.VERSION.SDK_INT >= 11)
this.mWebView.onPause();
}
}
@Override
public void onDestroy() {
if(this.mWebView!=null){
this.mWebView.resumeTimers();
}
AgentWebX5Utils.clearWebView(this.mWebView);
}
}
|
[
"xiaozhongcen@gmail.com"
] |
xiaozhongcen@gmail.com
|
e26f4728313b286ca40c8818d19c2d815da624db
|
975945cf2c76b20d5d4448b89f7057e33d1a9ebc
|
/business/src/main/java/com/shareshenghuo/app/shop/network/response/LoginResponse.java
|
63775c491bcacf214ef72fc83d27f6a9333f4f1f
|
[] |
no_license
|
gy121681/Share
|
aa64f67746f88d55e884e5ae48b3789422175f8f
|
031286dc1d2ce4ebe7fe2665ebd525d1946ad163
|
refs/heads/master
| 2021-01-15T12:02:34.908825
| 2017-08-08T03:01:07
| 2017-08-08T03:01:07
| 99,643,530
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 187
|
java
|
package com.shareshenghuo.app.shop.network.response;
import com.shareshenghuo.app.shop.network.bean.UserInfo;
public class LoginResponse extends BaseResponse {
public UserInfo data;
}
|
[
"295306443@qq.com"
] |
295306443@qq.com
|
990ecf7d2e4d8f260895539b03b211ab7bf4b4ee
|
14ba82fc777376361df92a1036b20b2ad4594d21
|
/com/planet_ink/coffee_mud/Abilities/Spells/Spell_HardenBullets.java
|
3a9197bce57d90eda78b9e92278aaa33564bdf92
|
[
"Apache-2.0"
] |
permissive
|
pinkmagicdev/SwagWorld-Java
|
60580378c89bdc4f17c9244ac3d84eb0b74d2299
|
ee05447c0d39abe347f01ad90118be4ba5d6b0ed
|
refs/heads/master
| 2021-09-15T10:20:30.005970
| 2018-03-09T04:28:16
| 2018-03-09T04:28:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,175
|
java
|
package com.planet_ink.coffee_mud.Abilities.Spells;
import com.planet_ink.coffee_mud.Abilities.StdAbility;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.ExpertiseLibrary;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2014-2018 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class Spell_HardenBullets extends Spell
{
@Override
public String ID()
{
return "Spell_HardenBullets";
}
private final static String localizedName = CMLib.lang().L("Harden Bullets");
@Override
public String name()
{
return localizedName;
}
@Override
protected int canAffectCode()
{
return CAN_ITEMS;
}
@Override
protected int canTargetCode()
{
return CAN_ITEMS;
}
@Override
public int classificationCode()
{
return Ability.ACODE_SPELL|Ability.DOMAIN_ALTERATION;
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_INDIFFERENT;
}
protected volatile boolean norecurse=false;
@Override
public void affectPhyStats(Physical host, PhyStats affectableStats)
{
affectableStats.setDisposition(affectableStats.disposition()|PhyStats.IS_BONUS);
}
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
super.executeMsg(myHost,msg);
final MOB mob;
if((affected instanceof Item)&&(((Item)affected).owner() instanceof MOB))
{
mob=(MOB)((Item)affected).owner();
}
else
return;
if((msg.targetMinor()==CMMsg.TYP_DAMAGE)
&&(msg.value()>0)
&&(msg.target() instanceof MOB)
&&(!((MOB)msg.target()).amDead())
&&(msg.tool()!=this)
&&(msg.source().location()!=null))
{
if((msg.tool()==affected)
&&(!msg.amITarget(mob))
&&(msg.amISource(mob))
&&(!(msg.tool() instanceof Wand)))
{
final int damage=msg.value() + CMath.s_int(text());
final String str=L("^F^<FIGHT^><S-YOUPOSS> hard bullet <DAMAGE> <T-NAME>!^</FIGHT^>^?");
synchronized(this)
{
if(!norecurse)
{
norecurse=true;
try
{
CMLib.combat().postDamage(msg.source(),(MOB)msg.target(),affected,Math.round(damage),
CMMsg.MASK_MALICIOUS|CMMsg.MASK_ALWAYS|CMMsg.TYP_WEAPONATTACK,Weapon.TYPE_BASHING,str);
}
finally
{
norecurse=false;
}
}
}
}
}
}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
final Physical target=super.getTarget(mob, mob.location(), givenTarget, commands, Wearable.FILTER_UNWORNONLY);
if(target==null)
return false;
if((!(target instanceof Ammunition))||(!((Ammunition)target).ammunitionType().equals("bullets")))
{
mob.tell(mob,target,null,L("You can only alter sling bullets with this spell, which <T-NAME> is not."));
return false;
}
if(target.fetchEffect("Spell_HardenBullets")!=null)
{
mob.tell(mob,target,null,L("<T-NAME> is already altered."));
return false;
}
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
final CMMsg msg=CMClass.getMsg(mob,target,this,somanticCastCode(mob,target,auto),L("^S<S-NAME> move(s) <S-HIS-HER> fingers around <T-NAMESELF>.^?"));
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
mob.location().show(mob,target,null,CMMsg.MSG_OK_VISUAL,L("<T-NAME> become(s) denser and harder."));
Ability A=CMClass.getAbility(ID());
if(A!=null)
{
A.setMiscText(""+super.getXLEVELLevel(invoker()));
target.addNonUninvokableEffect(A);
}
target.recoverPhyStats();
}
}
else
beneficialVisualFizzle(mob,target,L("<S-NAME> move(s) <S-HIS-HER> fingers around <T-NAMESELF> and looking very frustrated."));
// return whether it worked
return success;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
1f48c21ae5e4bbdffafc3b9878e55eeb74adeb4d
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/org/xml/sax/helpers/ParserFactory.java
|
f33889b2e11450468f8ad9ab0a2bb588513177b6
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package org.xml.sax.helpers;
import org.xml.sax.Parser;
@Deprecated
public class ParserFactory {
private ParserFactory() {
}
public static Parser makeParser() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NullPointerException, ClassCastException {
String className = System.getProperty("org.xml.sax.parser");
if (className != null) {
return makeParser(className);
}
throw new NullPointerException("No value for sax.parser property");
}
public static Parser makeParser(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException, ClassCastException {
return (Parser) NewInstance.newInstance(NewInstance.getClassLoader(), className);
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
34ed6b7e61aa795b69fd02e9bbce02f07f74591c
|
e7facb708781879f176a75c311fe08dbaf11f41a
|
/src/main/java/com/xrk/uiac/sdk/entity/PushResponse.java
|
4e9ade7b114f7a5b47a80984a4b947b213ff7a42
|
[] |
no_license
|
mendylee/uiac-sdk
|
dd92e33de56ced7fdb437c67bfff014a416cbbcd
|
397571f7951fd70ea62832f36b708b541d0ced4d
|
refs/heads/master
| 2020-04-07T01:55:58.386411
| 2018-11-17T06:32:55
| 2018-11-17T06:32:55
| 157,957,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 975
|
java
|
package com.xrk.uiac.sdk.entity;
import java.util.Date;
/**
*
* PushResponse: PushResponse.java.
*
* <br>==========================
* <br> 公司:广州向日葵信息科技有限公司
* <br> 开发:shunchiguo<shunchiguo@xiangrikui.com>
* <br> 版本:1.0
* <br> 创建时间:2015年7月15日
* <br> JDK版本:1.7
* <br>==========================
*/
public class PushResponse
{
private String appID;
private String status;
private Date regTime;
private Date delTime;
public String getAppID()
{
return appID;
}
public void setAppID(String appID)
{
this.appID = appID;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public Date getRegTime()
{
return regTime;
}
public void setRegTime(Date regTime)
{
this.regTime = regTime;
}
public Date getDelTime()
{
return delTime;
}
public void setDelTime(Date delTime)
{
this.delTime = delTime;
}
}
|
[
"yufuyong@xiangrikui.com"
] |
yufuyong@xiangrikui.com
|
4147ceb8a6f44e12c1bf8dc830c0951752e94347
|
77b7f3b87ef44182c5d0efd42ae1539a9b8ca14c
|
/src/generated/java/com/turnengine/client/api/local/action/ClearActionsQueuedAtPlayer.java
|
d1436eec67662a02c2700d34cdf904473f7d827d
|
[] |
no_license
|
robindrew/turnengine-client-api
|
b4d9e767e9cc8401859758d83b43b0104bce7cd1
|
5bac91a449ad7f55201ecd64e034706b16578c36
|
refs/heads/master
| 2023-03-16T05:59:14.189396
| 2023-03-08T14:09:24
| 2023-03-08T14:09:24
| 232,931,212
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,919
|
java
|
package com.turnengine.client.api.local.action;
import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class ClearActionsQueuedAtPlayer implements IClearActionsQueuedAtPlayer {
/** The loginId field. */
private long loginId = 0l;
/** The instanceId field. */
private int instanceId = 0;
/** The groupId field. */
private int groupId = 0;
/**
* The empty constructor.
*/
public ClearActionsQueuedAtPlayer() {
}
/**
* The fields constructor.
*/
public ClearActionsQueuedAtPlayer(long loginId, int instanceId, int groupId) {
setLoginId(loginId);
setInstanceId(instanceId);
setGroupId(groupId);
}
/**
* The clone constructor.
*/
public ClearActionsQueuedAtPlayer(IClearActionsQueuedAtPlayer clone) {
setLoginId(clone.getLoginId());
setInstanceId(clone.getInstanceId());
setGroupId(clone.getGroupId());
}
/**
* Returns the serialization id.
* @return the serialization id.
*/
@Override
public int getSerializationId() {
return SERIALIZATION_ID;
}
/**
* Getter for the loginId field.
* @return the value of the loginId field.
*/
@Override
public long getLoginId() {
return loginId;
}
/**
* Getter for the instanceId field.
* @return the value of the instanceId field.
*/
@Override
public int getInstanceId() {
return instanceId;
}
/**
* Getter for the groupId field.
* @return the value of the groupId field.
*/
@Override
public int getGroupId() {
return groupId;
}
/**
* Setter for the loginId field.
* @param loginId the loginId value to set.
*/
@Override
public void setLoginId(long loginId) {
this.loginId = loginId;
}
/**
* Setter for the instanceId field.
* @param instanceId the instanceId value to set.
*/
@Override
public void setInstanceId(int instanceId) {
if (instanceId < -1) {
throw new IllegalArgumentException("instanceId too small, minimum of -1, value: '" + instanceId + "'");
}
this.instanceId = instanceId;
}
/**
* Setter for the groupId field.
* @param groupId the groupId value to set.
*/
@Override
public void setGroupId(int groupId) {
if (groupId < -1) {
throw new IllegalArgumentException("groupId too small, minimum of -1, value: '" + groupId + "'");
}
this.groupId = groupId;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
builder.append(getLoginId());
builder.append(getInstanceId());
builder.append(getGroupId());
return builder.toHashCode();
}
@Override
public boolean equals(Object object) {
// Identity check
if (object == this) {
return true;
}
// Null check
if (object == null) {
return false;
}
// Compare types
if (!this.getClass().equals(object.getClass())) {
return false;
}
// Compare fields
IClearActionsQueuedAtPlayer that = (IClearActionsQueuedAtPlayer) object;
EqualsBuilder builder = new EqualsBuilder();
builder.append(this.getLoginId(), that.getLoginId());
builder.append(this.getInstanceId(), that.getInstanceId());
builder.append(this.getGroupId(), that.getGroupId());
return builder.isEquals();
}
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
builder.append(getLoginId());
builder.append(getInstanceId());
builder.append(getGroupId());
return builder.toString();
}
@Override
public int compareTo(IClearActionsQueuedAtPlayer that) {
CompareToBuilder builder = new CompareToBuilder();
builder.append(this.getLoginId(), that.getLoginId());
builder.append(this.getInstanceId(), that.getInstanceId());
builder.append(this.getGroupId(), that.getGroupId());
return builder.toComparison();
}
}
|
[
"robin.drew@gmail.com"
] |
robin.drew@gmail.com
|
75d717eac58dd9f277b22962cee8e28104287058
|
5716022b0c6eeb25ad81486cc1ae32074b2a4c48
|
/src/leetcode/124-binary-tree-maximum-path-sum.java
|
bce6828f6ad67901f1cbfde73253ff3385de5b2d
|
[] |
no_license
|
albkim/leet2019
|
bd8b2844160b4ce647f64e0bbf1df841f67a143c
|
8191d7f860705a411caca8c62042cbd915fa381a
|
refs/heads/master
| 2020-05-04T21:02:50.555908
| 2019-04-04T09:08:55
| 2019-04-04T09:08:55
| 179,462,151
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,847
|
java
|
/*
Given a non-empty binary tree, find the maximum path sum.
For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree
along the parent-child connections. The path must contain at least one node and does not need to go through the root.
Example 1:
Input: [1,2,3]
1
/ \
2 3
Output: 6
Example 2:
Input: [-10,9,20,null,null,15,7]
-10
/ \
9 20
/ \
15 7
Output: 42
post order traversal and disregard any negatively contributing sub tree
*/
package leetcode;
import leetcode.models.TreeNode;
class BinaryTreeMaximumPathSum {
public int maxPathSum(TreeNode root) {
return (int)maxPathSumRecursive(root)[0];
}
private long[] maxPathSumRecursive(TreeNode root) {
if (root == null) {
return new long[] { Integer.MIN_VALUE, 0 };
}
long[] leftSum = maxPathSumRecursive(root.left);
long[] rightSum = maxPathSumRecursive(root.right);
long current = root.val;
// one gotcha is that if current doesn't contribute, we should either consider this as max but we cannot
// contribute this in the upper path.
// assume current contributes, find the larger path
long larger = Math.max(leftSum[1] + current, rightSum[1] + current);
if (larger < 0) {
// if contribution is less than 0, might as well not contribute
larger = 0;
}
return new long[]{
Math.max(Math.max(Math.max(Math.max(
Math.max(leftSum[0], rightSum[0]),
current),
leftSum[1] + current),
rightSum[1] + current),
leftSum[1] + rightSum[1] + current
),
larger
};
}
}
|
[
"a@a.com"
] |
a@a.com
|
f0da22237491b4671e7fedd45a37615b05ab92b2
|
1e867f9b411800deb712971f391bdf6d89a59794
|
/Utils/Builder/src/bc/assets/types/Animation.java
|
4b9937e4874f0c06144089241e959f849b9d8ceb
|
[] |
no_license
|
bbqchickenrobot/atomic-bomberman-xna
|
0fb16562e25be028e3f8d743db7dbf9af1638a32
|
2721209f12285a87eef38208ed1a652a2337207d
|
refs/heads/master
| 2021-01-18T02:12:34.627423
| 2013-10-20T06:17:32
| 2013-10-20T06:17:32
| 46,894,333
| 1
| 0
| null | 2015-11-26T00:00:13
| 2015-11-26T00:00:13
| null |
UTF-8
|
Java
| false
| false
| 782
|
java
|
package bc.assets.types;
import java.util.ArrayList;
import java.util.List;
import bc.assets.Asset;
public class Animation extends Asset
{
private String name;
private Texture texture;
private List<AnimationFrame> frames;
public Animation(String name, Texture texture)
{
this.name = name;
this.texture = texture;
frames = new ArrayList<AnimationFrame>();
}
public String getName()
{
return name;
}
public Texture getTexture()
{
return texture;
}
public void addFrame(AnimationFrame frame)
{
frames.add(frame);
}
public List<AnimationFrame> getFrames()
{
return frames;
}
public static class AnimationFrame
{
public int x;
public int y;
public int ox;
public int oy;
public int w;
public int h;
public int duration;
}
}
|
[
"a.lementuev@gmail.com"
] |
a.lementuev@gmail.com
|
65c4ff459d39aaef409e5afe65bf6d647eae062d
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/140/904/CWE566_Authorization_Bypass_Through_SQL_Primary__Servlet_52a.java
|
a43391ca618de092998a491b1d8087c8520636e8
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,104
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE566_Authorization_Bypass_Through_SQL_Primary__Servlet_52a.java
Label Definition File: CWE566_Authorization_Bypass_Through_SQL_Primary__Servlet.label.xml
Template File: sources-sink-52a.tmpl.java
*/
/*
* @description
* CWE: 566 Authorization Bypass through SQL primary
* BadSource: user id taken from url parameter
* GoodSource: hardcoded user id
* Sinks: writeConsole
* BadSink : user authorization not checked
* Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package
*
* */
import javax.servlet.http.*;
public class CWE566_Authorization_Bypass_Through_SQL_Primary__Servlet_52a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
/* FLAW: Get the user ID from a URL parameter */
data = request.getParameter("id");
(new CWE566_Authorization_Bypass_Through_SQL_Primary__Servlet_52b()).badSink(data , request, response);
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
/* FIX: Use a hardcoded user ID */
data = "10";
(new CWE566_Authorization_Bypass_Through_SQL_Primary__Servlet_52b()).goodG2BSink(data , request, response);
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
44076ce17b564f506c30031b2bfa357442a17286
|
e7c108162fa1718200ba83596e9d50ed5fc5bab5
|
/restnet-sparql/src/main/java/net/idea/restnet/sparql/StreamSPARQLReporter.java
|
22b5db1634354f593c37708d7dc450c858fc3d58
|
[] |
no_license
|
vedina/RESTNet
|
90b88cbb16c6cbcde7c798952200de7b4deffda8
|
675dda7b71520418843d20b2eb5019fb55fe4e78
|
refs/heads/master
| 2021-11-01T23:09:55.524552
| 2021-10-17T11:37:46
| 2021-10-17T11:37:46
| 2,387,024
| 0
| 1
| null | 2021-06-04T01:33:34
| 2011-09-14T17:38:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,823
|
java
|
package net.idea.restnet.sparql;
import java.io.OutputStream;
import org.restlet.Request;
import org.restlet.data.MediaType;
import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.query.ResultSetFormatter;
import com.hp.hpl.jena.rdf.model.Model;
public class StreamSPARQLReporter extends AbstractSPARQLReporter<OutputStream> {
/**
*
*/
private static final long serialVersionUID = 5609996394531534127L;
public StreamSPARQLReporter(Model model, MediaType mediaType, Request request) {
super(model, mediaType, request);
}
@Override
public void processResults(Query query, ResultSet results, OutputStream output) throws Exception {
/*
if (getMediaType().equals(MediaType.APPLICATION_RDF_XML))
ResultSetFormatter.outputAsRDF(output, "RDF/XML", results);
else if (getMediaType().equals(MediaType.APPLICATION_RDF_TURTLE))
ResultSetFormatter.outputAsRDF(output, "TURTLE", results);
else if (getMediaType().equals(MediaType.TEXT_RDF_N3))
ResultSetFormatter.outputAsRDF(output, "N3", results);
else if (getMediaType().equals(MediaType.TEXT_RDF_NTRIPLES))
ResultSetFormatter.outputAsRDF(output, "N-TRIPLE", results);
else
*/
if (getMediaType().equals(MediaType.APPLICATION_SPARQL_RESULTS_XML))
ResultSetFormatter.outputAsXML(output, results);
else if (getMediaType().equals(MediaType.TEXT_CSV))
ResultSetFormatter.outputAsCSV(output, results);
else if (getMediaType().equals(MediaType.APPLICATION_SPARQL_RESULTS_JSON))
ResultSetFormatter.outputAsJSON(output, results);
else if (getMediaType().equals(MediaType.TEXT_PLAIN))
ResultSetFormatter.out(output, results, query);
else
ResultSetFormatter.outputAsXML(output, results);
}
}
|
[
"jeliazkova.nina@gmail.com"
] |
jeliazkova.nina@gmail.com
|
99de75fd72938d43d402738d5b6408fe49287208
|
6c53fff1200762c620a0e55ff8e6061e33731dc6
|
/src/main/java/ch/ethz/idsc/sophus/app/avg/BezierFunctionSplitsDemo.java
|
339185448e134df43c4b17841dfa4015d35d1c6c
|
[] |
no_license
|
gbmxdwmssj/owl
|
e9b218e147cbd2ca6c976faf8bd974940d1f9bef
|
ebf0f0d0a9eb7adc0db99ea8e90ed4e511160c17
|
refs/heads/master
| 2020-05-17T21:37:32.327326
| 2019-04-28T10:31:26
| 2019-04-28T10:31:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,617
|
java
|
// code by jph
package ch.ethz.idsc.sophus.app.avg;
import java.awt.Dimension;
import javax.swing.JSlider;
import ch.ethz.idsc.sophus.app.api.AbstractDemo;
import ch.ethz.idsc.sophus.curve.BezierFunction;
import ch.ethz.idsc.sophus.sym.SymGeodesic;
import ch.ethz.idsc.sophus.sym.SymScalar;
import ch.ethz.idsc.tensor.RationalScalar;
import ch.ethz.idsc.tensor.RealScalar;
import ch.ethz.idsc.tensor.Scalar;
import ch.ethz.idsc.tensor.Tensor;
import ch.ethz.idsc.tensor.Tensors;
import ch.ethz.idsc.tensor.opt.ScalarTensorFunction;
/** visualization of geodesic average along geodesics */
public class BezierFunctionSplitsDemo extends GeodesicSplitsDemo {
private final JSlider jSlider = new JSlider(0, 1000, 500);
public BezierFunctionSplitsDemo() {
jSlider.setPreferredSize(new Dimension(500, 28));
timerFrame.jToolBar.add(jSlider);
// ---
setControl(Tensors.fromString("{{0,0,0},{2,2,1},{5,0,2}}"));
}
@Override // from GeodesicAverageDemo
SymScalar symScalar(Tensor vector) {
ScalarTensorFunction scalarTensorFunction = BezierFunction.of(SymGeodesic.INSTANCE, vector);
int n = vector.length();
Scalar parameter = n <= 1 //
? RealScalar.ZERO
: RationalScalar.of(n, n - 1);
parameter = parameter.multiply(RationalScalar.of(jSlider.getValue(), 1000));
return (SymScalar) scalarTensorFunction.apply(parameter);
}
public static void main(String[] args) {
AbstractDemo abstractDemo = new BezierFunctionSplitsDemo();
abstractDemo.timerFrame.jFrame.setBounds(100, 100, 1000, 600);
abstractDemo.timerFrame.jFrame.setVisible(true);
}
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
9521311e289af0df549bb49b6327ff1b0398acc9
|
588d9caa14ffa6f98e6fc5bd784367284b5bd44c
|
/dubboApi/src/main/java/zhou/yi/pojo/User.java
|
24b44c5988d1be17850978bc3c9df84bfe1080b2
|
[] |
no_license
|
renmingpinming/dubbo-test
|
3c3a53382c5512a366c24a20c72c6dab11bfd1c3
|
c64e611419e6f616c21e35dbdb553b1cda495243
|
refs/heads/master
| 2020-04-30T05:53:44.964032
| 2019-04-03T10:41:08
| 2019-04-03T10:41:08
| 176,637,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,117
|
java
|
package zhou.yi.pojo;
/**
* @Author: XiaoLang
* @Date: 2019/3/19 17:36
*/
public class User implements java.io.Serializable{
private static final long serialVersionUID = -2668999087589887337L;
private Long id;
private String username;
private String password;
private Integer age;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", username='" + username + '\'' +
", password='" + password + '\'' +
", age=" + age +
'}';
}
}
|
[
"renmingpinming@163.com"
] |
renmingpinming@163.com
|
d9208c3442ae99edce6102d51e68bf4e51ec85af
|
a61e5ea207cff4ac8041ae748c56629e121f339b
|
/Task03b/src/com/gmail/granovskiy/s/Main.java
|
2c417fc23086e9aa57162164271b5a74f107702e
|
[] |
no_license
|
SviatoslavExpert/JavaStart-Tasks-ProgKievUa
|
2f516e5457afa8f01a5c89ed1d8d8be558c7f620
|
43352cf2f3dc0ba7f03135ff12fa0cda397e11ae
|
refs/heads/master
| 2020-04-02T13:36:17.991412
| 2018-10-30T17:15:54
| 2018-10-30T17:15:54
| 154,488,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,323
|
java
|
/*
Java Start Task 03.02
Есть девятиэтажный дом, в котором 4 подъезда. Номер подъезда
начинается с единицы. На одном этаже 4 квартиры. Напишите программу
которая получит номер квартиры с клавиатуры, и выведет на экран на
каком этаже, какого подъезда расположенна эта квартира. Если такой
квартиры нет в этом доме то нужно сообщить об этом пользователю.
*/
package com.gmail.granovskiy.s;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int flatNumber;
int floor;
int entrance;
System.out.println("Enter flat number: ");
flatNumber = sc.nextInt();
if (flatNumber > 0 && flatNumber <= 144) {
entrance = (flatNumber - 1) / 36 + 1;
floor = ((flatNumber - 1) % 36) / 4 + 1;
System.out.println(
"The flat #" + flatNumber + " is on the floor #" + floor + " , entrance #" + entrance + ".");
} else {
System.out.println("There is no such flat.");
}
sc.close();
}
}
|
[
"s.granovskiy@gmail.com"
] |
s.granovskiy@gmail.com
|
51222fbcade2a9c943737953ad59d2ca22046100
|
c7fd9f53ebaa76195b5551720b624bc1cb20e4a6
|
/karate-core/src/main/java/com/intuit/karate/ui/AppSession.java
|
904f9fe1f158cb502a2edad3a216be64d98c9af9
|
[
"MIT"
] |
permissive
|
ptrthomas/karate-DIY-coverage
|
0942a77024d7e5fe7eaff8e5d3c336e32d260ed6
|
a0bf66cf8b7a9fa50351a1912617be39a7c3c48b
|
refs/heads/master
| 2021-01-25T14:33:06.979436
| 2018-02-27T10:07:03
| 2018-02-27T10:07:03
| 123,707,911
| 1
| 0
|
MIT
| 2018-03-03T16:07:32
| 2018-03-03T16:07:32
| null |
UTF-8
|
Java
| false
| false
| 5,668
|
java
|
/*
* The MIT License
*
* Copyright 2017 Intuit Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.intuit.karate.ui;
import com.intuit.karate.CallContext;
import com.intuit.karate.FileUtils;
import com.intuit.karate.ScriptEnv;
import com.intuit.karate.ScriptValue;
import com.intuit.karate.ScriptValueMap;
import com.intuit.karate.cucumber.CucumberUtils;
import com.intuit.karate.cucumber.FeatureFilePath;
import com.intuit.karate.cucumber.FeatureSection;
import com.intuit.karate.cucumber.FeatureWrapper;
import com.intuit.karate.cucumber.KarateBackend;
import com.intuit.karate.cucumber.ScenarioOutlineWrapper;
import com.intuit.karate.cucumber.ScenarioWrapper;
import com.intuit.karate.cucumber.StepWrapper;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author pthomas3
*/
public class AppSession {
private static final Logger logger = LoggerFactory.getLogger(AppSession.class);
public final File featureFile;
private FeatureWrapper feature; // mutable, can be re-built
public final KarateBackend backend;
public final HeaderPanel headerPanel;
public final FeaturePanel featurePanel;
public final VarsPanel varsPanel;
public final LogPanel logPanel;
public FeatureWrapper getFeature() {
return feature;
}
public AppSession(File featureFile, String envString) {
this(featureFile, envString, false);
}
public ScriptEnv getEnv() {
return backend.getEnv();
}
public void resetBackendAndVarsTable(String env) {
backend.getObjectFactory().reset(env);
refreshVarsTable();
}
public void resetAll(String env) {
resetBackendAndVarsTable(env);
featurePanel.action(AppAction.RESET);
}
public void runAll() {
try {
featurePanel.action(AppAction.RUN);
} catch (StepException se) {
logger.error("step execution paused.");
}
}
public AppSession(File featureFile, String envString, boolean test) {
this.featureFile = featureFile;
FeatureFilePath ffp = FileUtils.parseFeaturePath(featureFile);
ScriptEnv env = ScriptEnv.init(envString, ffp.file, ffp.searchPaths, logger);
feature = FeatureWrapper.fromFile(ffp.file, env);
CallContext callContext = new CallContext(null, 0, null, -1, false, true, null);
backend = CucumberUtils.getBackendWithGlue(env, callContext);
if (!test) {
headerPanel = new HeaderPanel(this);
featurePanel = new FeaturePanel(this);
varsPanel = new VarsPanel(this);
logPanel = new LogPanel();
} else {
headerPanel = null;
featurePanel = null;
varsPanel = null;
logPanel = null;
}
}
public void logVar(Var var) {
if (logPanel != null) {
logPanel.append(var.toString());
}
}
public void refreshVarsTable() {
varsPanel.refresh();
}
public FeatureSection refresh(FeatureSection section) {
return feature.getSection(section.getIndex());
}
public ScenarioOutlineWrapper refresh(ScenarioOutlineWrapper outline) {
return feature.getSection(outline.getSection().getIndex()).getScenarioOutline();
}
public ScenarioWrapper refresh(ScenarioWrapper scenario) {
return feature.getScenario(scenario.getSection().getIndex(), scenario.getIndex());
}
public StepWrapper refresh(StepWrapper step) {
int stepIndex = step.getIndex();
int scenarioIndex = step.getScenario().getIndex();
int sectionIndex = step.getScenario().getSection().getIndex();
return feature.getStep(sectionIndex, scenarioIndex, stepIndex);
}
public void replace(StepWrapper step, String text) {
feature = feature.replaceStep(step, text);
featurePanel.action(AppAction.REFRESH);
headerPanel.initTextContent();
}
public ObservableList<Var> getVars() {
if (backend.getStepDefs() == null) {
return FXCollections.emptyObservableList();
}
ScriptValueMap map = backend.getStepDefs().getContext().getVars();
List<Var> list = new ArrayList(map.size());
for (Map.Entry<String, ScriptValue> entry : map.entrySet()) {
list.add(new Var(entry.getKey(), entry.getValue()));
}
return FXCollections.observableList(list);
}
}
|
[
"peter_thomas@intuit.com"
] |
peter_thomas@intuit.com
|
699092d20a4b946659515d9f74727fdf66ba7deb
|
8eb13941b4d237b7f30bcba5741f518dfe2ce042
|
/enerbos-eam-vo/src/main/java/com/enerbos/cloud/eam/vo/MaintenanceWorkOrderAssetVo.java
|
1f4017bee9ea56cb2e6a1db05eaa4caca0ccca28
|
[] |
no_license
|
pdslxy/cloud_eam
|
d0b75f41f7dd3dfb2015ae7fa4eefea401e43868
|
6cfdf20c40f41df4afa2e254725dce82c240ab70
|
refs/heads/master
| 2020-03-24T11:12:33.865313
| 2018-07-29T03:54:26
| 2018-07-29T03:54:26
| 142,678,755
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,668
|
java
|
package com.enerbos.cloud.eam.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
/**
* All rights Reserved, Designed By 翼虎能源
* Copyright: Copyright(C) 2015-2017
* Company 北京翼虎能源科技有限公司
*
* @author 庞慧东
* @version 1.0.0
* @date 2017年06月13日
* @Description 工单设备表VO
*/
@ApiModel(value = "工单设备表VO", description = "工单设备表的实体对应的VO")
public class MaintenanceWorkOrderAssetVo implements Serializable{
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty(value = "(新增不用传值)")
@Length(max = 36, message = "不能超过36个字符")
private String id;
/**
*
*/
@ApiModelProperty(value = "设备ID")
@Length(max = 36, message = "不能超过36个字符")
private String assetId;
/**
*
*/
@ApiModelProperty(value = "维保工单ID")
@Length(max = 36, message = "不能超过36个字符")
private String workOrderId;
public String getId(){
return id;
}
public void setId(String id){
this.id = id;
}
public String getAssetId() {
return assetId;
}
public void setAssetId(String assetId) {
this.assetId = assetId;
}
public String getWorkOrderId() {
return workOrderId;
}
public void setWorkOrderId(String workOrderId) {
this.workOrderId = workOrderId;
}
@Override
public String toString() {
return "MaintenanceWorkOrderAssetVo{" +
"id='" + id + '\'' +
", assetId='" + assetId + '\'' +
", workOrderId='" + workOrderId + '\'' +
'}';
}
}
|
[
"lxy@enerbos.com"
] |
lxy@enerbos.com
|
cf854201e4e8e5180ce8fecc0b0cf358aba4bfd9
|
69fc3bcd65ef7c35b99686cd7f5806789f5b8d80
|
/src/main/java/org/yx/rpc/RpcUtils.java
|
a20232ed64f38a5e3b0b1f7b775c3d1b3564e4c7
|
[] |
no_license
|
malachun/sumk
|
07ef29fcdf72de5d06830566cbe1c379d5360323
|
c77d3d6e1bd6c32c959d5bbc8833b262763d5eb1
|
refs/heads/master
| 2021-01-12T16:14:54.146118
| 2016-10-15T04:54:26
| 2016-10-15T04:54:26
| 71,958,950
| 2
| 0
| null | 2016-10-26T02:39:36
| 2016-10-26T02:39:36
| null |
UTF-8
|
Java
| false
| false
| 293
|
java
|
package org.yx.rpc;
public final class RpcUtils {
/**
* 返回appId
*
* @param method
* appId.clz.method
* @return
*/
public static String getAppId(String method) {
int k = method.indexOf(".");
return k > 0 ? method.substring(0, k) : method;
}
}
|
[
"Administrator@youxia"
] |
Administrator@youxia
|
16d0e3d3c5a63c25de8a7a26ba3282f7778d0817
|
11e0f6f8f68ede4148f283ffde61ce0f79434cbf
|
/src/OOP/Abstraction/Abstraction_Demo.java
|
aa561cdc2571bf56ff6dff485418df0f8016d3c3
|
[] |
no_license
|
meetmmpatel/Demo-JavaClass
|
043ac7995b86a5e09756249032b5e7e4c45bb0b6
|
414161d1cf45bdb50eafdd891565e78d35f56576
|
refs/heads/master
| 2020-06-20T05:35:45.031423
| 2019-07-15T14:09:17
| 2019-07-15T14:09:17
| 196,623,851
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 614
|
java
|
package OOP.Abstraction;
public class Abstraction_Demo extends Demotest{
@Override
void myMethod() {
System.out.println("this override method");
}
public static void main(String[] args) {
Demotest demo = new Abstraction_Demo();
demo.myMethod();
}
}
abstract class Demotest {
// you can not create an instance of an abstract class
// can have method also as abstract method.
// all abstract methods are public ..
// all abstract methods must be override by child class..
// you are not allowed to have body of method for abstract method.
abstract void myMethod();
}
|
[
"meetmmpatel@gmail.com"
] |
meetmmpatel@gmail.com
|
f3c6451632a4e7bafad345145f120279bf9213ab
|
6451c77ce976b7b927b6345e9dd4c586fd15b317
|
/cgi_kunde2.0_shop/shop/build/hybris/bin/custom/pacoshop/pacoshopfulfilmentprocess/src/com/cgi/pacoshop/fulfilmentprocess/model/SSOAccountRequest.java
|
19a76e7c4ef9bb7d5c65319a3e4be3b8b01054d9
|
[] |
no_license
|
dixit-anup/maventotalproject
|
eefae3fbc1de085b3057edd87dcb3605f7e8750b
|
2c0f5581d32dd1aa265e455a9447ab7d160cf5f1
|
refs/heads/master
| 2021-01-16T21:57:39.423961
| 2014-08-21T14:58:18
| 2014-08-21T14:58:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,461
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2014 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package com.cgi.pacoshop.fulfilmentprocess.model;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* Here goes 1 line. Here goes 2 line.
*
* @module build
* @version 1.0v Feb 25, 2014
* @author symmetrics - a CGI Group brand <info@symmetrics.de>
* @author Oleg Ierofeiev <oleg.ierofeiev@symmetrics.de>
* @link http://www.symmetrics.de/
* @see https://wiki.hybris.com/
* @copyright 2014 symmetrics - a CGI Group brand
*
*
*/
public class SSOAccountRequest implements Serializable
{
private static final long serialVersionUID = -7939223536042927150L;
private String email;
private String sapGpNumbers;
private String dynamicFields;
private boolean populated = false;
@Override
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
/**
* @return the email
*/
public String getEmail()
{
return email;
}
/**
* @param email
* the email to set
*/
public void setEmail(final String email)
{
this.email = email;
}
/**
* @return the sapGpNumbers
*/
public String getSapGpNumbers()
{
return sapGpNumbers;
}
/**
* @param sapGpNumbers
* the sapGpNumbers to set
*/
public void setSapGpNumbers(final String sapGpNumbers)
{
this.sapGpNumbers = sapGpNumbers;
}
/**
* @return the dynamicFields
*/
public String getDynamicFields()
{
return dynamicFields;
}
/**
* @param dynamicFields
* the dynamicFields to set
*/
public void setDynamicFields(final String dynamicFields)
{
this.dynamicFields = dynamicFields;
}
/**
* @return the populated
*/
public boolean isPopulated()
{
return populated;
}
/**
* @param populated
* the populated to set
*/
public void setPopulated(final boolean populated)
{
this.populated = populated;
}
}
|
[
"dmitry.bilyk@symmetrics.de"
] |
dmitry.bilyk@symmetrics.de
|
ce17818c2d29d11f35b83b56ecb0da52317b34fc
|
b2917c90089432697b0666cab176ac186293e13b
|
/common/src/main/java/io/github/flemmli97/runecraftory/common/network/S2CEntityDataSync.java
|
ee1fbab25563212053178679cd55bb9b0d153073
|
[] |
no_license
|
Flemmli97/RuneCraftory
|
42fa7fe440bf20173dea7c35ad90cda99eac28ba
|
9712d5fbe7e4fea6406f215e8f0678d89de715f5
|
refs/heads/1.18
| 2023-09-01T08:00:57.410057
| 2023-08-31T22:52:10
| 2023-08-31T22:52:10
| 118,181,636
| 5
| 0
| null | 2023-01-30T20:26:08
| 2018-01-19T21:42:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,177
|
java
|
package io.github.flemmli97.runecraftory.common.network;
import io.github.flemmli97.runecraftory.RuneCraftory;
import io.github.flemmli97.runecraftory.client.ClientHandlers;
import io.github.flemmli97.runecraftory.platform.Platform;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
public record S2CEntityDataSync(int entityID,
S2CEntityDataSync.Type type,
boolean flag) implements Packet {
public static final ResourceLocation ID = new ResourceLocation(RuneCraftory.MODID, "s2c_entity_data_sync");
public static S2CEntityDataSync read(FriendlyByteBuf buf) {
return new S2CEntityDataSync(buf.readInt(), buf.readEnum(Type.class), buf.readBoolean());
}
public static void handle(S2CEntityDataSync pkt) {
Player player = ClientHandlers.getPlayer();
if (player == null)
return;
Entity e = player.level.getEntity(pkt.entityID);
if (e instanceof LivingEntity living) {
Platform.INSTANCE.getEntityData(living).ifPresent(data -> {
switch (pkt.type) {
case POISON -> data.setPoison(living, pkt.flag);
case SLEEP -> data.setSleeping(living, pkt.flag);
case PARALYSIS -> data.setParalysis(living, pkt.flag);
case COLD -> data.setCold(living, pkt.flag);
case INVIS -> data.setInvis(living, pkt.flag);
case ORTHOVIEW -> data.setOrthoView(living, pkt.flag);
}
});
}
}
@Override
public void write(FriendlyByteBuf buf) {
buf.writeInt(this.entityID);
buf.writeEnum(this.type);
buf.writeBoolean(this.flag);
}
@Override
public ResourceLocation getID() {
return ID;
}
public enum Type {
POISON,
SLEEP,
PARALYSIS,
COLD,
FATIGUE,
SEAL,
INVIS,
ORTHOVIEW
}
}
|
[
"Flemmli97@users.noreply.github.com"
] |
Flemmli97@users.noreply.github.com
|
ee95702df97d62ae8a12ccc01b232502f1725008
|
ff720d3b4f0d831827f70b8229505dd800720e0e
|
/src_organization/com/seeyon/ctp/organization/manager/MoveDeptManager.java
|
bc96716a06740690dbbe0f3e692df1c9d4f635e9
|
[] |
no_license
|
wqsccdhy-wq/v71gwk
|
9acd23ddbdac8c099332cd5416f6b93c1282faec
|
2436cae7c2fdbcf95093880e847fbd2d9dc50e09
|
refs/heads/master
| 2020-08-22T22:55:44.142185
| 2019-11-07T08:50:59
| 2019-11-07T08:50:59
| 216,492,656
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
/**
* $Author: $
* $Rev: $
* $Date:: 2012-06-05 15:14:56#$:
*
* Copyright (C) 2012 Seeyon, Inc. All rights reserved.
*
* This software is the proprietary information of Seeyon, Inc.
* Use is subject to license terms.
*/
package com.seeyon.ctp.organization.manager;
import java.util.List;
import java.util.Map;
import com.seeyon.ctp.common.exceptions.BusinessException;
import com.seeyon.ctp.organization.webmodel.WebV3xOrgResult;
public interface MoveDeptManager {
/**
* 调整部门
* @param dept
* @return
* @throws Exception
*/
public List<WebV3xOrgResult> movedept(Map team) throws BusinessException;
/**
* 调整部门动作Manager
* @param deptId
* @param accountId
* @return
* @throws BusinessException
*/
public List<String[]> moveDept(Long deptId, Long accountId) throws BusinessException;
/**
* 调整部门的校验方法
* @param deptId
* @param accountId
* @return
* @throws BusinessException
*/
public List<String> validateMoveDept(Long deptId, Long accountId) throws BusinessException;
}
|
[
"wangqingsc2009@126.com"
] |
wangqingsc2009@126.com
|
23e44e42da184d6d72851be698ca235027a3084d
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/org/kaaproject/kaa/server/sync/ServerSyncTest.java
|
73726b8e21f77f523c979c25ba96d9399b6b6baa
|
[] |
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
| 1,915
|
java
|
/**
* Copyright 2014-2016 CyberVision, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kaaproject.kaa.server.sync;
import org.junit.Assert;
import org.junit.Test;
import static SyncStatus.SUCCESS;
public class ServerSyncTest {
private static ProfileServerSync profileServerSync;
private static ConfigurationServerSync configurationServerSync;
private static NotificationServerSync notificationServerSync;
private static UserServerSync userServerSync;
private static EventServerSync eventServerSync;
private static RedirectServerSync redirectServerSync;
private static LogServerSync logServerSync = new LogServerSync();
@Test
public void deepCopyNullServerSyncTest() {
ServerSync copiedServerSync = ServerSync.deepCopy(null);
Assert.assertNull(copiedServerSync);
}
@Test
public void deepCopyServerSyncTest() {
ServerSync serverSync = new ServerSync(1, SUCCESS, ServerSyncTest.profileServerSync, ServerSyncTest.configurationServerSync, ServerSyncTest.notificationServerSync, ServerSyncTest.userServerSync, ServerSyncTest.eventServerSync, ServerSyncTest.redirectServerSync, ServerSyncTest.logServerSync);
ServerSync serverSyncCopy = ServerSync.deepCopy(serverSync);
Assert.assertEquals(serverSync, serverSyncCopy);
Assert.assertFalse((serverSync == serverSyncCopy));
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
ae695dd3ee66b82d812f029f65f33a31a0b5ffa2
|
1167da7da5bcde75b5cccbdf16269d4ecbb246d0
|
/source/adalid-alfa/src/main/java/adalid/core/annotations/EntityExportOperation.java
|
091e3349f2d7b746d7b50a50e1f4687742656c05
|
[] |
no_license
|
proyecto-adalid/adalid
|
7f64a94397b31bef558547dbdbfb108b7e39693c
|
e85b71614c9593639f5528b9d6be41efa1bff31a
|
refs/heads/main
| 2023-08-07T14:14:06.808810
| 2023-07-30T14:10:36
| 2023-07-30T14:10:36
| 32,926,877
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,956
|
java
|
/*
* Copyright 2017 Jorge Campins y David Uzcategui
*
* Este archivo forma parte de Adalid.
*
* Adalid es software libre; usted puede redistribuirlo y/o modificarlo bajo los terminos de la
* licencia "GNU General Public License" publicada por la Fundacion "Free Software Foundation".
* Adalid se distribuye con la esperanza de que pueda ser util, pero SIN NINGUNA GARANTIA; sin
* siquiera las garantias implicitas de COMERCIALIZACION e IDONEIDAD PARA UN PROPOSITO PARTICULAR.
*
* Para mas detalles vea la licencia "GNU General Public License" en http://www.gnu.org/licenses
*/
package adalid.core.annotations;
import adalid.core.*;
import adalid.core.enums.*;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* La anotación EntityExportOperation se utiliza para establecer atributos de la operación export de la entidad.
*
* @author Jorge Campins
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface EntityExportOperation {
/**
* enabled indica si las vistas (páginas) de consulta y registro deben permitir, o no, exportar el resultado de la consulta. Su valor es uno de
* los elementos de la enumeración Kleenean. Seleccione TRUE para permitir exportar; en caso contrario, seleccione FALSE. Alternativamente, omita
* el elemento o seleccione UNSPECIFIED para utilizar el valor predeterminado del atributo. El valor predeterminado del atributo es TRUE.
*
* @return enabled
*/
Kleenean enabled() default Kleenean.UNSPECIFIED; // TRUE
/**
* rowsLimit específica el número de máximo de filas que se deben exportar. Este elemento es relevante solo si el valor especificado, o
* determinado, para el elemento enabled es TRUE. Su valor debe ser un número entero entre 0 y 1.000.000. Utilice 0 cuando no exista límite. El
* valor predeterminado es 10.000
*
* @return rowsLimit
*/
int rowsLimit() default Constants.DEFAULT_EXPORT_ROWS_LIMIT;
/**
* sortOption especifica el criterio de ordenamiento por omisión de las filas exportadas. Este elemento es relevante solo si el valor
* especificado, o determinado, para el elemento enabled es TRUE. Su valor es uno de los elementos de la enumeración SortOption. Seleccione ASC o
* DESC para exportar las filas ordenadas por el valor de su clave primaria, de manera ascendente o descendente, respectivamente.
* Alternativamente, omita el elemento o seleccione UNSPECIFIED para utilizar el valor predeterminado del atributo. El valor predeterminado del
* atributo es ASC. Este criterio de ordenamiento se utiliza solo si no se establece otro criterio mediante el método setOrderBy.
*
* @return sortOption
*/
SortOption sortOption() default SortOption.ASC;
}
|
[
"jrcampins@gmail.com"
] |
jrcampins@gmail.com
|
ff7b468b3cb051026d2bb0846073afbbcb9472a1
|
38c34ff168b64a67e969bd81a60556ad0b17e62c
|
/iot-20180120/src/main/java/com/aliyun/iot20180120/models/BatchGetEdgeInstanceDeviceDriverRequest.java
|
f49888411db73a030609e8d8ff559d00db49c8e1
|
[
"Apache-2.0"
] |
permissive
|
bestchendong/alibabacloud-java-sdk
|
1474344c006641fbab882af4c277b5cbb343ea80
|
737c2b966c5e46903d5875e269c971cb80dd678f
|
refs/heads/master
| 2023-04-15T05:34:29.011451
| 2021-04-22T09:14:46
| 2021-04-22T09:14:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,937
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.iot20180120.models;
import com.aliyun.tea.*;
public class BatchGetEdgeInstanceDeviceDriverRequest extends TeaModel {
@NameInMap("ApiProduct")
public String apiProduct;
@NameInMap("ApiRevision")
public String apiRevision;
@NameInMap("IotInstanceId")
public String iotInstanceId;
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("IotIds")
public java.util.List<String> iotIds;
public static BatchGetEdgeInstanceDeviceDriverRequest build(java.util.Map<String, ?> map) throws Exception {
BatchGetEdgeInstanceDeviceDriverRequest self = new BatchGetEdgeInstanceDeviceDriverRequest();
return TeaModel.build(map, self);
}
public BatchGetEdgeInstanceDeviceDriverRequest setApiProduct(String apiProduct) {
this.apiProduct = apiProduct;
return this;
}
public String getApiProduct() {
return this.apiProduct;
}
public BatchGetEdgeInstanceDeviceDriverRequest setApiRevision(String apiRevision) {
this.apiRevision = apiRevision;
return this;
}
public String getApiRevision() {
return this.apiRevision;
}
public BatchGetEdgeInstanceDeviceDriverRequest setIotInstanceId(String iotInstanceId) {
this.iotInstanceId = iotInstanceId;
return this;
}
public String getIotInstanceId() {
return this.iotInstanceId;
}
public BatchGetEdgeInstanceDeviceDriverRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public BatchGetEdgeInstanceDeviceDriverRequest setIotIds(java.util.List<String> iotIds) {
this.iotIds = iotIds;
return this;
}
public java.util.List<String> getIotIds() {
return this.iotIds;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f99cfbefb167fc982cad3b892fb4d84373afd351
|
e4a77f7707d3bd39e14ec5c656e7635d9abfeb2b
|
/sysmanager Maven Webapp/src/main/java/com/yb/service/impl/ShiroServiceImpl.java
|
1495494d7ff6e44b7c3d616154e3d8ae42ebd19a
|
[] |
no_license
|
zhanghslq/sys
|
fcbabb0cbe067a3d3cdda39e55d9b5b8b1567a55
|
132d96cdd9826c7fae28724dd4c77e5b0b4daf73
|
refs/heads/master
| 2021-07-06T22:08:13.246785
| 2019-03-29T05:32:07
| 2019-03-29T05:32:07
| 106,373,351
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 813
|
java
|
package com.yb.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yb.dao.ShiroDao;
import com.yb.entity.Permission;
import com.yb.entity.Role;
import com.yb.service.ShiroService;
/**
*
* @author Administrator
* @date 2017/6/20 0020
*/
@Service
public class ShiroServiceImpl implements ShiroService {
@Autowired
private ShiroDao shiroDao;
@Override
public List<Permission> queryPermission(String name) {
List<Permission> permissions = shiroDao.queryPermission(name);
return permissions;
}
@Override
public List<Role> queryRole(String name) {
List<Role> roles = shiroDao.queryRole(name);
return roles;
}
}
|
[
"zhanghslq@163.com"
] |
zhanghslq@163.com
|
6cd6428708c7d81561d48bd6ab7c8e4ebf35b6f7
|
b09f56919e3baac6aff3cc7a590505b21efd72eb
|
/src/main/java/com/zorm/query/AbstractExplicitParameterSpecification.java
|
3ba0d3f97858bd2d9d3e8a5bc449d3fbd2fd338c
|
[] |
no_license
|
SHENJIAYUN/zorm
|
51d2d2674dfb98bf77203e3de35f7f5191148180
|
fe849f55d5523bd24d5069e8f54678108a9de162
|
refs/heads/master
| 2021-01-18T21:50:28.686984
| 2016-05-19T14:52:39
| 2016-05-19T14:52:39
| 52,928,318
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 964
|
java
|
package com.zorm.query;
import com.zorm.type.Type;
public abstract class AbstractExplicitParameterSpecification implements ExplicitParameterSpecification {
private final int sourceLine;
private final int sourceColumn;
private Type expectedType;
/**
* Constructs an AbstractExplicitParameterSpecification.
*
* @param sourceLine See {@link #getSourceLine()}
* @param sourceColumn See {@link #getSourceColumn()}
*/
protected AbstractExplicitParameterSpecification(int sourceLine, int sourceColumn) {
this.sourceLine = sourceLine;
this.sourceColumn = sourceColumn;
}
/**
* {@inheritDoc}
*/
public int getSourceLine() {
return sourceLine;
}
/**
* {@inheritDoc}
*/
public int getSourceColumn() {
return sourceColumn;
}
/**
* {@inheritDoc}
*/
public Type getExpectedType() {
return expectedType;
}
/**
* {@inheritDoc}
*/
public void setExpectedType(Type expectedType) {
this.expectedType = expectedType;
}
}
|
[
"1096392316@qq.com"
] |
1096392316@qq.com
|
d7620c540316b8dbae31e51c32e482285251e0a8
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/fc/co/rec/FC_CO_1041_LCURLISTRecord.java
|
1df55ba58f02877f9b0a56c7fb9486af8e5d1199
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,995
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.fc.co.rec;
import java.sql.*;
import chosun.ciis.fc.co.dm.*;
import chosun.ciis.fc.co.ds.*;
/**
*
*/
public class FC_CO_1041_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{
public String seci_clsf_cd;
public String seci_no;
public String comp_dt;
public String mtry_dt;
public String face_val_amt;
public String seci_clsf_cd1;
public FC_CO_1041_LCURLISTRecord(){}
public void setSeci_clsf_cd(String seci_clsf_cd){
this.seci_clsf_cd = seci_clsf_cd;
}
public void setSeci_no(String seci_no){
this.seci_no = seci_no;
}
public void setComp_dt(String comp_dt){
this.comp_dt = comp_dt;
}
public void setMtry_dt(String mtry_dt){
this.mtry_dt = mtry_dt;
}
public void setFace_val_amt(String face_val_amt){
this.face_val_amt = face_val_amt;
}
public void setSeci_clsf_cd1(String seci_clsf_cd1){
this.seci_clsf_cd1 = seci_clsf_cd1;
}
public String getSeci_clsf_cd(){
return this.seci_clsf_cd;
}
public String getSeci_no(){
return this.seci_no;
}
public String getComp_dt(){
return this.comp_dt;
}
public String getMtry_dt(){
return this.mtry_dt;
}
public String getFace_val_amt(){
return this.face_val_amt;
}
public String getSeci_clsf_cd1(){
return this.seci_clsf_cd1;
}
}
/* 작성시간 : Sat Apr 11 18:11:36 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
795790fb731978aba3782c1d14f3b72bc4ae9b81
|
4b027a96e457f90fdd146c73a92a99a63b5f6cab
|
/level26/lesson10/home01/Consumer.java
|
665c6b64ec96c541443724ce0b39274170cc64e0
|
[] |
no_license
|
Byshevsky/JavaRush
|
c44a3b25afca677bbe5b6c015aec7c2561ca4830
|
d8965bc8b5f060af558cc86924ae6488727cdbd4
|
refs/heads/master
| 2021-05-02T12:17:48.896494
| 2016-12-26T21:56:12
| 2016-12-26T21:56:12
| 52,143,706
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 517
|
java
|
package com.javarush.test.level26.lesson10.home01;
import java.util.concurrent.BlockingQueue;
/**
* Created by IGOR on 03.12.2015.
*/
public class Consumer implements Runnable
{
protected BlockingQueue queue;
public Consumer(BlockingQueue queue)
{
this.queue = queue;
}
public void run() {
try {
while (true) {
System.out.println(queue.take());
}
} catch (InterruptedException e) {
}
}
}
|
[
"igberda2011@gmail.com"
] |
igberda2011@gmail.com
|
f700e064ab652f0727e794ddd28daa2ad688e94b
|
06d71c9e817f5db60550145dcf61d045d5609448
|
/java/src/com/wj/socket/bio/Client.java
|
d3d1a7c3fc722215dd4dddf23966eb279963b7d1
|
[] |
no_license
|
jie8023yu/JavaBase
|
792839588496c08388760347bc11d00dbf04793d
|
4b01a54c9117ccc1c8ce8c1d0a949372348ae1d5
|
refs/heads/master
| 2021-07-06T19:19:42.021639
| 2020-09-03T10:02:30
| 2020-09-03T10:02:30
| 177,577,914
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
package com.wj.socket.bio;
import java.io.*;
import java.net.Socket;
public class Client {
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
new Thread(new Runnable() {
@Override
public void run() {
try {
Socket socket = new Socket("127.0.0.1",18888);
System.out.println("成功");
OutputStream outputStream = socket.getOutputStream();
PrintWriter writer = new PrintWriter(outputStream);
writer.println("getTime");
writer.flush();
InputStream inputStream = socket.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
System.out.println(bufferedReader.readLine());
} catch (Exception e) {
e.printStackTrace();
}
}
}).start();
}
}
}
|
[
"15236730688@163.com"
] |
15236730688@163.com
|
dac3e2f765efc1e97d84458809c996743692769b
|
faf19a81334d753c5ad81d0cb98b5f0acf046119
|
/07. Basket Example/src/main/java/ru/itis/forms/SignInForm.java
|
61e5f355b9c9dad84518df5bfab6eada30e67640
|
[] |
no_license
|
MarselSidikov/JAVA_ENTERPRISE_2
|
311dd2989b685993d8ba08246d021898c79b6d0c
|
0a499cbe9edd566ece80e1efedbfafef374abf80
|
refs/heads/master
| 2022-12-22T07:35:48.354995
| 2020-04-27T17:01:20
| 2020-04-27T17:01:20
| 140,073,232
| 19
| 19
| null | 2022-12-15T23:52:17
| 2018-07-07T10:04:51
|
Java
|
UTF-8
|
Java
| false
| false
| 391
|
java
|
package ru.itis.forms;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 25.10.2018
* SignInForm
*
* @author Sidikov Marsel (First Software Engineering Platform)
* @version v1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SignInForm {
private String name;
private String password;
}
|
[
"sidikov.marsel@gmail.com"
] |
sidikov.marsel@gmail.com
|
c3f72715a010ca9356a8c3fc218973e5877169d5
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-2.1.1/transports/jdbc/src/test/java/org/mule/transport/jdbc/functional/JdbcNullParamsTestCase.java
|
ae8f793f35d75b5a5b97869af72c579f6db2eabc
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 2,253
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.transport.jdbc.functional;
import org.mule.DefaultMuleMessage;
import org.mule.api.MuleMessage;
import org.mule.module.client.MuleClient;
import org.mule.transport.NullPayload;
import java.util.Collection;
import java.util.Map;
public class JdbcNullParamsTestCase extends AbstractJdbcFunctionalTestCase
{
public JdbcNullParamsTestCase()
{
setPopulateTestData(false);
}
protected String getConfigResources()
{
return "jdbc-null-params.xml";
}
public void testJdbcNullParams() throws Exception
{
MuleClient client = new MuleClient();
//check that db is still empty
MuleMessage reply = client.request("jdbc://getTest", 1000);
assertTrue(reply.getPayload() instanceof Collection);
assertTrue(((Collection)reply.getPayload()).isEmpty());
//execute the write query by sending a message on the jdbc://writeTest
//the message is a nullpayload since we are not taking any params from any object
//No other params will be sent to this endpoint
client.send("jdbc://writeTest", new DefaultMuleMessage(NullPayload.getInstance()));
//get the data which was written by the previous statement and test it
reply = client.request("jdbc://getTest", 1000);
assertNotNull(reply);
assertTrue(reply.getPayload() instanceof Collection);
Collection result = (Collection)reply.getPayload();
assertEquals(1, result.size());
Map res = (Map)result.iterator().next();
//check that id is equal to the one set originally and all others are null
Integer id = (Integer)res.get("ID");
assertEquals(1, id.intValue());
assertNull(res.get("TYPE"));
assertNull(res.get("DATA"));
assertNull(res.get("RESULT"));
}
}
|
[
"dfeist@bf997673-6b11-0410-b953-e057580c5b09"
] |
dfeist@bf997673-6b11-0410-b953-e057580c5b09
|
85f109490090c023bc808e58520460dcd895dbf4
|
5f6edf313639dbe464a1c9cbb62762b427786235
|
/lydsj-webserver/SSM/esbapiSSM/src/com/naswork/model/RoleMenu.java
|
8ec27a5e78a11cf2f1ea39d31158054f6cb8f3b5
|
[] |
no_license
|
magicgis/outfile
|
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
|
497635e2cd947811bf616304e9563e59f0ab4f56
|
refs/heads/master
| 2020-05-07T19:24:08.371572
| 2019-01-23T04:57:18
| 2019-01-23T04:57:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,379
|
java
|
package com.naswork.model;
import java.io.Serializable;
import java.util.List;
public class RoleMenu implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4254584950692755284L;
private String menuId;
private String parentMenuId;
private String menuName;
private String menuUrl;
private String isLeaf;
private String yxbz;
private String menuOrder;
private String rootMenuId;
private String checked;
public String getChecked() {
return checked;
}
public void setChecked(String checked) {
this.checked = checked;
}
public String getRootMenuId() {
return rootMenuId;
}
public void setRootMenuId(String rootMenuId) {
this.rootMenuId = rootMenuId;
}
//option 1
private List<String> roleIdList;
private List<String> unRoleIdList;
public List<String> getRoleIdList() {
return roleIdList;
}
public void setRoleIdList(List<String> roleIdList) {
this.roleIdList = roleIdList;
}
public List<String> getUnRoleIdList() {
return unRoleIdList;
}
public void setUnRoleIdList(List<String> unRoleIdList) {
this.unRoleIdList = unRoleIdList;
}
/*
//option 2
private String roleIdList;
private String unRoleIdList;
public String getRoleIdList() {
return roleIdList;
}
public void setRoleIdList(String roleIdList) {
this.roleIdList = roleIdList;
}
public String getUnRoleIdList() {
return unRoleIdList;
}
public void setUnRoleIdList(String unRoleIdList) {
this.unRoleIdList = unRoleIdList;
}
*/
public String getMenuOrder() {
return menuOrder;
}
public void setMenuOrder(String menuOrder) {
this.menuOrder = menuOrder;
}
public String getYxbz() {
return yxbz;
}
public void setYxbz(String yxbz) {
this.yxbz = yxbz;
}
public String getMenuId() {
return menuId;
}
public void setMenuId(String menuId) {
this.menuId = menuId;
}
public String getParentMenuId() {
return parentMenuId;
}
public void setParentMenuId(String parentMenuId) {
this.parentMenuId = parentMenuId;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getMenuUrl() {
return menuUrl;
}
public void setMenuUrl(String menuUrl) {
this.menuUrl = menuUrl;
}
public String getIsLeaf() {
return isLeaf;
}
public void setIsLeaf(String isLeaf) {
this.isLeaf = isLeaf;
}
}
|
[
"942364283@qq.com"
] |
942364283@qq.com
|
72e56747dd856abc27df8c12973099b3b5fdd52e
|
4c09637e52c3c53a896a351c6e59dd1ad938b5b3
|
/Hibernate/EmployeeManage/src/java/com/javaweb/bean/Employee.java
|
f96e3ebea4cae4bfcc70aa593ee2f93970e6c1ff
|
[] |
no_license
|
huyhue/PROJECTS-WEB
|
20f9e3da9ef09a0565aedb97030d4003ae234103
|
cadbcb6cb81aa719bc697de9e1f054ca639d84e4
|
refs/heads/main
| 2023-05-14T17:21:43.694583
| 2021-06-04T14:23:14
| 2021-06-04T14:23:14
| 358,826,288
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,238
|
java
|
package com.javaweb.bean;
import java.sql.Date;
import java.sql.Time;
import javax.persistence.*;
@Entity
@Table(name = "tb_employee")
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
private String name;
private String sex;
private Integer age;
private Date birthday;
private Time startTime;
private Time endTime;
private Double salary;
@Basic(fetch = FetchType.LAZY)
@Column(columnDefinition = "text")
private String description;
@Temporal(TemporalType.TIMESTAMP)
private java.util.Date dateCreated;
private boolean disabled;
@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
@JoinColumn(name = "department_id")
private Department department;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public Time getStartTime() {
return startTime;
}
public void setStartTime(Time startTime) {
this.startTime = startTime;
}
public Time getEndTime() {
return endTime;
}
public void setEndTime(Time endTime) {
this.endTime = endTime;
}
public Double getSalary() {
return salary;
}
public void setSalary(Double salary) {
this.salary = salary;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public java.util.Date getDateCreated() {
return dateCreated;
}
public void setDateCreated(java.util.Date dateCreated) {
this.dateCreated = dateCreated;
}
public boolean isDisabled() {
return disabled;
}
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
public Department getDepartment() {
return department;
}
public void setDepartment(Department department) {
this.department = department;
}
}
|
[
"tpgiahuy5@gmail.com"
] |
tpgiahuy5@gmail.com
|
763e4ac1fe3d260caa71ddfa476cc658d707e2be
|
0bd0c3c44e28c72cc4fa7c3d2e4b1f3d71c7188e
|
/yixiekeji-pc/src/main/java/com/yixiekeji/web/job/TimerTaskListener.java
|
de2e7524f565af889e1c5ce722a7c6d6338765e4
|
[] |
no_license
|
jbzhang99/xingfuyi
|
022030ddf03414ad769e71ca665693bb6d2c6855
|
797f752104b0703ad249ee6fe29b26b121338147
|
refs/heads/master
| 2021-01-02T03:12:57.428953
| 2019-10-30T07:53:59
| 2019-10-30T07:53:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,254
|
java
|
package com.yixiekeji.web.job;
import java.util.Timer;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpServlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.yixiekeji.core.EjavashopConfig;
/**
*
* @author wangpeng
* 功能:监听器,用来实现定时器
*/
@WebListener
public class TimerTaskListener extends HttpServlet implements ServletContextListener {
/**
*
*/
private static final long serialVersionUID = 1L;
protected static Logger log = LoggerFactory.getLogger(TimerTaskListener.class);
private Timer timer = null;
public TimerTaskListener() {
}
public void contextDestroyed(ServletContextEvent event) {
timer.cancel();
log.info("定时器销毁");
}
public void contextInitialized(ServletContextEvent event) {
timer = new Timer(true);
log.info("定时器已启动");
timer.schedule(new IndexCacheTimerTask(event.getServletContext()),
EjavashopConfig.TIME_DELAY, EjavashopConfig.TIME_PERIOD);
log.info("已经添加任务调度表");
}
}
|
[
"524662994@qq.com"
] |
524662994@qq.com
|
a7143588897b48d4c6dd591cfec178ed68ebf40c
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/LANG-12b-2-17-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/lang3/RandomStringUtils_ESTest_scaffolding.java
|
a0e98632d21884e8fb5cbf6e1ef8433af06ea87b
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,944
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 11:26:18 UTC 2020
*/
package org.apache.commons.lang3;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class RandomStringUtils_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.lang3.RandomStringUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
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.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RandomStringUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang3.RandomStringUtils"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
1cb3ac2fd974d9afcc77be6ad6bd53dae8de2375
|
883b7801d828a0994cae7367a7097000f2d2e06a
|
/python/experiments/projects/Angel-ML-angel/real_error_dataset/1/784/Loss.java
|
532910ef21174f42853b55a217ae8a919a43fbc1
|
[] |
no_license
|
pombredanne/styler
|
9c423917619912789289fe2f8982d9c0b331654b
|
f3d752d2785c2ab76bacbe5793bd8306ac7961a1
|
refs/heads/master
| 2023-07-08T05:55:18.284539
| 2020-11-06T05:09:47
| 2020-11-06T05:09:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,742
|
java
|
/*
* Tencent is pleased to support the open source community by making Angel available.
*
* Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* 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.tencent.angel.ml.algorithm.objective;
import com.tencent.angel.ml.algorithm.utils.MathUtils;
/**
* Description: implementation of popular loss function
*
*/
public class Loss {
/**
* Linear square loss loss. (y, y') = 1/2(y'-y)^2, grad = y'-y
*/
public static class LinearSquareLoss implements LossHelper {
public LinearSquareLoss() {}
@Override
public float predTransform(float x) {
return x;
}
@Override
public boolean checkLabel(float x) {
return true;
}
@Override
public float firOrderGrad(float pred, float label) {
return (pred - label);
}
@Override
public float secOrderGrad(float pred, float label) {
return 1.0f;
}
@Override
public float prob2Margin(float baseScore) {
return baseScore;
}
@Override
public String labelErrorMsg() {
return "";
}
@Override
public String defaultEvalMetric() {
return "rmse";
}
}
/**
* logistic loss for probability regression task. loss(y,y')=y*log(1+e^-y')+(1-y)*log(1+e^y'),
* grad = y'-y, 2nd-grad = y'*(1-y')
*/
public static class LogisticRegression implements LossHelper {
public LogisticRegression() {}
@Override
public float predTransform(float x) {
return MathUtils.sigmoid(x);
}
@Override
public boolean checkLabel(float x) {
return x >= 0.0f && x <= 1.0f;
}
@Override
public float firOrderGrad(float pred, float label) {
return pred - label;
}
@Override
public float secOrderGrad(float pred, float label) {
float eps = 1e-16f;
return Math.max(pred * (1 - pred), eps);
}
@Override
public float prob2Margin(float baseScore) {
assert baseScore > 0 && baseScore < 1.0f; // base_score must be in (0,1) for logistic loss
return (float) Math.log(1.0 / (double) baseScore - 1.0);
}
@Override
public String labelErrorMsg() {
return "label must be in [0,1] for logistic regression";
}
@Override
public String defaultEvalMetric() {
return "rmse";
}
}
// logistic loss for binary classification task.
public static class LogisticClassification extends LogisticRegression {
public LogisticClassification() {}
@Override
public String defaultEvalMetric() {
return "error";
}
}
// logistic loss, but predict un-transformed margin
public static class LogisticRaw extends LogisticRegression {
public LogisticRaw() {}
@Override
public float predTransform(float x) {
return x;
}
@Override
public float firOrderGrad(float pred, float label) {
pred = MathUtils.sigmoid(pred);
return pred - label;
}
@Override
public float secOrderGrad(float pred, float label) {
float eps = 1e-16f;
pred = MathUtils.sigmoid(pred);
return Math.max(pred * (1 - pred), eps);
}
@Override
public String defaultEvalMetric() {
return "auc";
}
}
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
9d7e26b7dc83a4b347a5449dbb6b157e337262cf
|
4ee20015ad08afa094b23bd3c75cdec1e19c77e6
|
/dev/infrared2/base/src/main/java/net/sf/infrared/base/model/AbstractStatistics.java
|
2616e94b19e11a2188cce2838bfb5f58cc5ca46c
|
[] |
no_license
|
anyframejava/anyframe-monitoring
|
5b2953c7839f6f643e265cefe9cfd0ec8ec1d535
|
07590d5d321fd6e4a6d6f1f61ca2b011f4bc3fcf
|
refs/heads/master
| 2021-01-17T18:31:53.009247
| 2016-11-07T01:36:20
| 2016-11-07T01:36:20
| 71,343,725
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,526
|
java
|
/*
* Copyright 2005 Tavant Technologies and Contributors
*
* 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.
*
*
*
* Original Author: binil.thomas (Tavant Technologies)
* Contributor(s): -;
*
*/
package net.sf.infrared.base.model;
import java.io.Serializable;
/**
* Abstract base class for statistics.
*
* @author binil.thomas
*/
public abstract class AbstractStatistics implements Serializable {
private String applicationName;
private String instanceId;
public AbstractStatistics(){
}
public AbstractStatistics(String appName, String instId) {
this.applicationName = appName;
this.instanceId = instId;
}
public String getApplicationName() {
return applicationName;
}
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String id) {
this.instanceId = id;
}
}
|
[
"anyframe@samsung.com"
] |
anyframe@samsung.com
|
283592ef6fa22d80520ba90d4627762cc5904d4b
|
1a58c178773f6aeab14a58cb4d853710aac3eea9
|
/modules/lwjgl/nanovg/src/generated/java/org/lwjgl/nanovg/NanoVGBGFX.java
|
5354432738ac9e5eb94c2584a6c4d18c6ed251f2
|
[
"Zlib",
"MIT",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] |
permissive
|
CRKatri/lwjgl3
|
12343871fd3eab7e5584a0b4a1e6bf82381b2f5d
|
139988556d4f1e45b3a73b799f9bf54014778b8a
|
refs/heads/master
| 2023-08-15T15:25:28.770018
| 2021-10-20T18:36:00
| 2021-10-20T18:36:00
| 383,857,413
| 11
| 2
|
BSD-3-Clause
| 2021-07-07T16:14:39
| 2021-07-07T16:14:38
| null |
UTF-8
|
Java
| false
| false
| 7,308
|
java
|
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.nanovg;
import javax.annotation.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.APIUtil.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.nanovg.NanoVG.*;
/** Implementation of the NanoVG API using bgfx. */
public class NanoVGBGFX {
/** Contains the function pointers loaded from bgfx. */
public static final class Functions {
private Functions() {}
/** Function address. */
public static final long
Create = apiGetFunctionAddress(BGFX.getLibrary(), "nvgCreate"),
Delete = apiGetFunctionAddress(BGFX.getLibrary(), "nvgDelete"),
SetViewId = apiGetFunctionAddress(BGFX.getLibrary(), "nvgSetViewId"),
GetViewId = apiGetFunctionAddress(BGFX.getLibrary(), "nvgGetViewId"),
luCreateFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluCreateFramebuffer"),
luBindFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluBindFramebuffer"),
luDeleteFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluDeleteFramebuffer"),
luSetViewFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluSetViewFramebuffer"),
CreateBgfxTexture = apiGetFunctionAddress(BGFX.getLibrary(), "nvgCreateBgfxTexture"),
org_lwjgl_nanovg_setup = apiGetFunctionAddress(BGFX.getLibrary(), "org_lwjgl_nanovg_setup");
}
static {
MemoryAllocator allocator = getAllocator(Configuration.DEBUG_MEMORY_ALLOCATOR_INTERNAL.get(true));
org_lwjgl_nanovg_setup(
allocator.getRealloc(),
allocator.getFree(),
nvgCreateInternal,
nvgInternalParams,
nvgDeleteInternal
);
}
protected NanoVGBGFX() {
throw new UnsupportedOperationException();
}
// --- [ nvgCreate ] ---
public static long nnvgCreate(int _edgeaa, short _viewId, long _allocator) {
long __functionAddress = Functions.Create;
return invokePP(_edgeaa, _viewId, _allocator, __functionAddress);
}
@NativeType("NVGcontext *")
public static long nvgCreate(@NativeType("int32_t") boolean _edgeaa, @NativeType("bgfx_view_id_t") int _viewId, @NativeType("bgfx_allocator_interface_t *") long _allocator) {
return nnvgCreate(_edgeaa ? 1 : 0, (short)_viewId, _allocator);
}
// --- [ nvgDelete ] ---
public static void nvgDelete(@NativeType("NVGcontext *") long _ctx) {
long __functionAddress = Functions.Delete;
if (CHECKS) {
check(_ctx);
}
invokePV(_ctx, __functionAddress);
}
// --- [ nvgSetViewId ] ---
public static void nnvgSetViewId(long _ctx, short _viewId) {
long __functionAddress = Functions.SetViewId;
if (CHECKS) {
check(_ctx);
}
invokePV(_ctx, _viewId, __functionAddress);
}
public static void nvgSetViewId(@NativeType("NVGcontext *") long _ctx, @NativeType("bgfx_view_id_t") int _viewId) {
nnvgSetViewId(_ctx, (short)_viewId);
}
// --- [ nvgGetViewId ] ---
@NativeType("uint16_t")
public static short nvgGetViewId(@NativeType("NVGcontext *") long _ctx) {
long __functionAddress = Functions.GetViewId;
if (CHECKS) {
check(_ctx);
}
return invokePS(_ctx, __functionAddress);
}
// --- [ nvgluCreateFramebuffer ] ---
public static long nnvgluCreateFramebuffer(long _ctx, int _width, int _height, int imageFlags) {
long __functionAddress = Functions.luCreateFramebuffer;
if (CHECKS) {
check(_ctx);
}
return invokePP(_ctx, _width, _height, imageFlags, __functionAddress);
}
@Nullable
@NativeType("NVGLUframebuffer *")
public static NVGLUFramebufferBGFX nvgluCreateFramebuffer(@NativeType("NVGcontext *") long _ctx, @NativeType("int32_t") int _width, @NativeType("int32_t") int _height, @NativeType("int32_t") int imageFlags) {
long __result = nnvgluCreateFramebuffer(_ctx, _width, _height, imageFlags);
return NVGLUFramebufferBGFX.createSafe(__result);
}
// --- [ nvgluBindFramebuffer ] ---
public static void nnvgluBindFramebuffer(long _framebuffer) {
long __functionAddress = Functions.luBindFramebuffer;
invokePV(_framebuffer, __functionAddress);
}
public static void nvgluBindFramebuffer(@Nullable @NativeType("NVGLUframebuffer *") NVGLUFramebufferBGFX _framebuffer) {
nnvgluBindFramebuffer(memAddressSafe(_framebuffer));
}
// --- [ nvgluDeleteFramebuffer ] ---
public static void nnvgluDeleteFramebuffer(long _framebuffer) {
long __functionAddress = Functions.luDeleteFramebuffer;
invokePV(_framebuffer, __functionAddress);
}
public static void nvgluDeleteFramebuffer(@NativeType("NVGLUframebuffer *") NVGLUFramebufferBGFX _framebuffer) {
nnvgluDeleteFramebuffer(_framebuffer.address());
}
// --- [ nvgluSetViewFramebuffer ] ---
public static void nnvgluSetViewFramebuffer(short _view_id, long _framebuffer) {
long __functionAddress = Functions.luSetViewFramebuffer;
invokePV(_view_id, _framebuffer, __functionAddress);
}
public static void nvgluSetViewFramebuffer(@NativeType("bgfx_view_id_t") int _view_id, @NativeType("NVGLUframebuffer *") NVGLUFramebufferBGFX _framebuffer) {
nnvgluSetViewFramebuffer((short)_view_id, _framebuffer.address());
}
// --- [ nvgCreateBgfxTexture ] ---
public static void nvgCreateBgfxTexture(@NativeType("NVGcontext *") long _ctx, @NativeType("bgfx_texture_handle_t") short _id, int _width, int _height, int flags) {
long __functionAddress = Functions.CreateBgfxTexture;
if (CHECKS) {
check(_ctx);
}
invokePV(_ctx, _id, _width, _height, flags, __functionAddress);
}
// --- [ org_lwjgl_nanovg_setup ] ---
private static void org_lwjgl_nanovg_setup(@NativeType("void *") long realloc, @NativeType("void *") long free, @NativeType("void *") long nvgCreateInternal, @NativeType("void *") long nvgInternalParams, @NativeType("void *") long nvgDeleteInternal) {
long __functionAddress = Functions.org_lwjgl_nanovg_setup;
if (CHECKS) {
check(realloc);
check(free);
check(nvgCreateInternal);
check(nvgInternalParams);
check(nvgDeleteInternal);
}
invokePPPPPV(realloc, free, nvgCreateInternal, nvgInternalParams, nvgDeleteInternal, __functionAddress);
}
private static class BGFX {
private static final SharedLibrary library;
static {
try {
library = (SharedLibrary)Class.forName("org.lwjgl.bgfx.BGFX").getMethod("getLibrary").invoke(null);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
static SharedLibrary getLibrary() {
return library;
}
}
}
|
[
"iotsakp@gmail.com"
] |
iotsakp@gmail.com
|
25105f0d87ffa73e096fc05bb5a7b550eec08a07
|
45c84e64a486a3c48bd41a78e28252acbc0cc1b0
|
/src/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorViewBinderTest.java
|
82ad13aff3d9e1d3ba572d6e5f993052b64d4bf9
|
[
"BSD-3-Clause",
"MIT"
] |
permissive
|
stanleywxc/chromium-noupdator
|
47f9cccc6256b1e5b0cb22c598b7a86f5453eb42
|
637f32e9bf9079f31430c9aa9c64a75247993a71
|
refs/heads/master
| 2022-12-03T22:00:20.940455
| 2019-10-04T16:29:31
| 2019-10-04T16:29:31
| 212,851,250
| 1
| 2
|
MIT
| 2022-11-17T09:51:04
| 2019-10-04T15:49:33
| null |
UTF-8
|
Java
| false
| false
| 6,076
|
java
|
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.status_indicator;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import android.graphics.drawable.Drawable;
import android.support.test.annotation.UiThreadTest;
import android.support.test.filters.SmallTest;
import android.support.v4.content.res.ResourcesCompat;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.widget.ViewResourceFrameLayout;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.ui.DummyUiActivity;
import org.chromium.chrome.test.ui.DummyUiActivityTestCase;
import org.chromium.content_public.browser.test.util.TestThreadUtils;
import org.chromium.ui.modelutil.PropertyModel;
import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
/**
* Tests for {@link StatusIndicatorViewBinder}.
*/
@RunWith(ChromeJUnit4ClassRunner.class)
public class StatusIndicatorViewBinderTest extends DummyUiActivityTestCase {
private static final String STATUS_TEXT = "Offline";
private ViewResourceFrameLayout mContainer;
private TextView mStatusTextView;
private MockStatusIndicatorSceneLayer mSceneLayer;
private PropertyModel mModel;
private PropertyModelChangeProcessor mMCP;
@BeforeClass
public static void setUpBeforeActivityLaunched() {
DummyUiActivity.setTestLayout(R.layout.status_indicator_container);
}
@Override
public void setUpTest() throws Exception {
super.setUpTest();
TestThreadUtils.runOnUiThreadBlocking(() -> {
mContainer = getActivity().findViewById(R.id.status_indicator);
mStatusTextView = mContainer.findViewById(R.id.status_text);
});
mSceneLayer = new MockStatusIndicatorSceneLayer(mContainer);
mModel = new PropertyModel.Builder(StatusIndicatorProperties.ALL_KEYS)
.with(StatusIndicatorProperties.STATUS_TEXT, "")
.with(StatusIndicatorProperties.STATUS_ICON, null)
.with(StatusIndicatorProperties.ANDROID_VIEW_VISIBLE, false)
.with(StatusIndicatorProperties.COMPOSITED_VIEW_VISIBLE, false)
.build();
mMCP = PropertyModelChangeProcessor.create(mModel,
new StatusIndicatorViewBinder.ViewHolder(mContainer, mSceneLayer),
StatusIndicatorViewBinder::bind);
}
@Override
public void tearDownTest() throws Exception {
mMCP.destroy();
super.tearDownTest();
}
@Test
@SmallTest
@UiThreadTest
public void testTextView() {
Assert.assertTrue(
"Wrong initial status text.", TextUtils.isEmpty(mStatusTextView.getText()));
Assert.assertNull(
"Wrong initial status icon.", mStatusTextView.getCompoundDrawablesRelative()[0]);
Assert.assertTrue(
"Rest of the compound drawables are not null.", areRestOfCompoundDrawablesNull());
Drawable drawable = ResourcesCompat.getDrawable(getActivity().getResources(),
R.drawable.ic_error_white_24dp_filled, getActivity().getTheme());
TestThreadUtils.runOnUiThreadBlocking(() -> {
mModel.set(StatusIndicatorProperties.STATUS_TEXT, STATUS_TEXT);
mModel.set(StatusIndicatorProperties.STATUS_ICON, drawable);
});
assertThat("Wrong status text.", mStatusTextView.getText(), equalTo(STATUS_TEXT));
assertThat("Wrong status icon.", mStatusTextView.getCompoundDrawablesRelative()[0],
equalTo(drawable));
Assert.assertTrue(
"Rest of the compound drawables are not null.", areRestOfCompoundDrawablesNull());
}
@Test
@SmallTest
@UiThreadTest
public void testVisibility() {
assertThat("Wrong initial Android view visibility.", mContainer.getVisibility(),
equalTo(View.GONE));
Assert.assertFalse("Wrong initial composited view visibility.",
mSceneLayer.isSceneOverlayTreeShowing());
TestThreadUtils.runOnUiThreadBlocking(() -> {
mModel.set(StatusIndicatorProperties.ANDROID_VIEW_VISIBLE, true);
mModel.set(StatusIndicatorProperties.COMPOSITED_VIEW_VISIBLE, true);
});
assertThat(
"Android view is not visible.", mContainer.getVisibility(), equalTo(View.VISIBLE));
Assert.assertTrue(
"Composited view is not visible.", mSceneLayer.isSceneOverlayTreeShowing());
TestThreadUtils.runOnUiThreadBlocking(() -> {
mModel.set(StatusIndicatorProperties.ANDROID_VIEW_VISIBLE, false);
mModel.set(StatusIndicatorProperties.COMPOSITED_VIEW_VISIBLE, false);
});
assertThat("Android view is not gone.", mContainer.getVisibility(), equalTo(View.GONE));
Assert.assertFalse("Composited view is visible.", mSceneLayer.isSceneOverlayTreeShowing());
}
private boolean areRestOfCompoundDrawablesNull() {
final Drawable[] drawables = mStatusTextView.getCompoundDrawablesRelative();
for (int i = 1; i < drawables.length; i++) {
if (drawables[i] != null) {
return false;
}
}
return true;
}
/** Mock {@link StatusIndicatorSceneLayer} class to avoid native initialization. */
private class MockStatusIndicatorSceneLayer extends StatusIndicatorSceneLayer {
MockStatusIndicatorSceneLayer(ViewResourceFrameLayout statusIndicator) {
super(statusIndicator);
}
@Override
protected void initializeNative() {}
@Override
public void destroy() {}
}
}
|
[
"stanley@moon.lan"
] |
stanley@moon.lan
|
f62f756e8ddd2410d220c7d3f1b939f4cddf83a4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/24/24_4b13722748fbd1e6281e35443e838be65fb47253/ScheduledTaskContainer/24_4b13722748fbd1e6281e35443e838be65fb47253_ScheduledTaskContainer_s.java
|
7d2af46ebea89a1cba943f697de59b248313f1e2
|
[] |
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
| 6,175
|
java
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Mylyn project committers 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
*******************************************************************************/
package org.eclipse.mylyn.internal.tasks.core;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
/**
* @author Rob Elves
* @author Mik Kersten
*/
public class ScheduledTaskContainer extends AbstractTaskContainer {
private final TaskActivityManager activityManager;
private final String summary;
private final DateRange range;
public ScheduledTaskContainer(TaskActivityManager activityManager, DateRange range, String summary) {
super(summary == null ? range.toString() : summary);
this.activityManager = activityManager;
this.range = range;
if (summary == null) {
this.summary = range.toString();
} else {
this.summary = summary;
}
}
public ScheduledTaskContainer(TaskActivityManager taskActivityManager, DateRange day) {
this(taskActivityManager, day, null);
}
public boolean isFuture() {
return !isPresent() && range.getStartDate().after(Calendar.getInstance());
}
public boolean isPresent() {
return range.getStartDate().before(Calendar.getInstance()) && range.getEndDate().after(Calendar.getInstance());
}
public boolean isWeekDay() {
return TaskActivityUtil.getCurrentWeek().isCurrentWeekDay(range);
}
public boolean isToday() {
return isPresent()
&& range.getStartDate().get(Calendar.DAY_OF_YEAR) == range.getEndDate().get(Calendar.DAY_OF_YEAR);
}
// public Collection<ITask> getChildren() {
// Set<ITask> children = new HashSet<ITask>();
// Calendar beginning = TaskActivityUtil.getCalendar();
// beginning.setTimeInMillis(0);
// if (isFloating() && !isFuture()) {
// for (ITask task : activityManager.getScheduledTasks(rangebeginning, getEndDate())) {
// if (task.internalIsFloatingScheduledDate()) {
// children.add(task);
// }
// }
// } else if (isPresent()) {
// // add all due/overdue
// Calendar end = TaskActivityUtil.getCalendar();
// end.set(5000, 12, 1);
// for (ITask task : activityManager.getDueTasks(beginning, getEndDate())) {
// if (activityManager.isOwnedByUser(task)) {
// children.add(task);
// }
// }
//
// // add all scheduled/overscheduled
// for (ITask task : activityManager.getScheduledTasks(beginning, getEndDate())) {
// if (!task.internalIsFloatingScheduledDate() && !task.isCompleted()) {
// children.add(task);
// }
// }
//
// // if not scheduled or due in future, and is active, place in today bin
// ITask activeTask = activityManager.getActiveTask();
// if (activeTask != null && !children.contains(activeTask)) {
// Set<ITask> futureScheduled = activityManager.getScheduledTasks(getStartDate(), end);
// for (ITask task : activityManager.getDueTasks(getStartDate(), end)) {
// if (activityManager.isOwnedByUser(task)) {
// futureScheduled.add(task);
// }
// }
// if (!futureScheduled.contains(activeTask)) {
// children.add(activeTask);
// }
// }
// } else if (isFuture()) {
// children.addAll(activityManager.getScheduledTasks(getStartDate(), getEndDate()));
// for (ITask task : activityManager.getDueTasks(getStartDate(), getEndDate())) {
// if (activityManager.isOwnedByUser(task)) {
// children.add(task);
// }
// }
// } else {
// children.addAll(activityManager.getActiveTasks(range.getStartDate(), range.getEndDate()));
// }
// return children;
// }
@Override
public Collection<ITask> getChildren() {
// TODO: Cache this information until the next modificaiton to pertinent data
Set<ITask> children = new HashSet<ITask>();
// All tasks scheduled for this date range
for (ITask task : activityManager.getScheduledTasks(range)) {
if (!task.isCompleted()) {
children.add(task);
}
}
// Add due tasks if not the This Week container
if (!(range instanceof WeekDateRange && isPresent())) {
for (ITask task : activityManager.getDueTasks(range.getStartDate(), range.getEndDate())) {
if (activityManager.isOwnedByUser(task)) {
children.add(task);
}
}
}
// All over due/scheduled tasks are present in the Today folder
if (isToday()) {
children.addAll(activityManager.getOverScheduledTasks());
children.addAll(activityManager.getOverDueTasks());
// if not scheduled or due in future, and is active, place in today bin
ITask activeTask = activityManager.getActiveTask();
if (activeTask != null && !children.contains(activeTask)) {
children.add(activeTask);
}
}
return children;
}
@Override
public String getSummary() {
if (summary != null) {
return summary;
}
return range.toString();
}
@Override
public String getHandleIdentifier() {
return summary;
}
@Override
public String getPriority() {
return "";
}
@Override
public String getUrl() {
return "";
}
@Override
public int compareTo(IRepositoryElement element) {
if (element instanceof ScheduledTaskContainer) {
ScheduledTaskContainer container = ((ScheduledTaskContainer) element);
return range.compareTo(container.getDateRange());
}
return 0;
}
public DateRange getDateRange() {
return range;
}
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
return null;
}
public Calendar getEnd() {
return range.getEndDate();
}
public Calendar getStart() {
return range.getStartDate();
}
public boolean includes(Calendar pastWeeksTaskStart) {
return range.includes(pastWeeksTaskStart);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
dc8d65505f176e9ae9954a3997f7e263cef1ebee
|
bf0232a3871c081303d6e802c7720182c5c0726e
|
/core/src/main/java/org/jboss/arquillian/persistence/core/exception/ContextNotAvailableException.java
|
844eb5d887933ea1208ec1a7312682283bf5940f
|
[
"Apache-2.0"
] |
permissive
|
abdelguezrou/arquillian-extension-persistence
|
c66384fab069afcca10e038c2c5cf9ef6089c8ca
|
28a002694497391b281389970cec517a03232b2d
|
refs/heads/master
| 2021-01-22T23:58:27.523934
| 2017-03-10T17:04:44
| 2017-03-17T17:28:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,408
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.jboss.arquillian.persistence.core.exception;
/**
* @author <a href="mailto:bartosz.majsak@gmail.com">Bartosz Majsak</a>
*/
public class ContextNotAvailableException extends RuntimeException {
private static final long serialVersionUID = -845961691356399463L;
public ContextNotAvailableException() {
}
public ContextNotAvailableException(String message) {
super(message);
}
public ContextNotAvailableException(Throwable cause) {
super(cause);
}
public ContextNotAvailableException(String message, Throwable cause) {
super(message, cause);
}
}
|
[
"bartosz.majsak@gmail.com"
] |
bartosz.majsak@gmail.com
|
8eeb160db475c9bc90cd693ca2b5d2b91e0b8f81
|
504f0ba5c18ccc7393e6715f1ce9b236c4f6d99f
|
/drds-20190123/src/main/java/com/aliyun/drds20190123/models/DescribeDrdsDbTestLinkRequest.java
|
3eeeb251b60e6612c7da6c1655e2f03280cf2892
|
[
"Apache-2.0"
] |
permissive
|
jhz-duanmeng/alibabacloud-java-sdk
|
77f69351dee8050f9c40d7e19b05cf613d2448d6
|
ac8bfeb15005d3eac06091bbdf50e7ed3e891c38
|
refs/heads/master
| 2023-01-16T04:30:12.898713
| 2020-11-25T11:45:31
| 2020-11-25T11:45:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,005
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.drds20190123.models;
import com.aliyun.tea.*;
public class DescribeDrdsDbTestLinkRequest extends TeaModel {
@NameInMap("DrdsInstanceId")
@Validation(required = true)
public String drdsInstanceId;
@NameInMap("DbName")
public String dbName;
public static DescribeDrdsDbTestLinkRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeDrdsDbTestLinkRequest self = new DescribeDrdsDbTestLinkRequest();
return TeaModel.build(map, self);
}
public DescribeDrdsDbTestLinkRequest setDrdsInstanceId(String drdsInstanceId) {
this.drdsInstanceId = drdsInstanceId;
return this;
}
public String getDrdsInstanceId() {
return this.drdsInstanceId;
}
public DescribeDrdsDbTestLinkRequest setDbName(String dbName) {
this.dbName = dbName;
return this;
}
public String getDbName() {
return this.dbName;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
0969a76e7e71ed8c4ce35f004577300389571d6b
|
cfa7d9ef4015cbab56388835842d8e27ba9aeb45
|
/integrator-service.war/WEB-INF/src/com/ail/service/integrator/model/PolicySummary.java
|
d679fc2184d48797e3fc5e66a049cc239a93e0cd
|
[] |
no_license
|
sangnguyensoftware/openunderwriter
|
678ff8cfe83f781a03b9cd62313e3d6594e74556
|
380cfa83e135084d29cd0b29d1ed4780cdb62408
|
refs/heads/master
| 2020-03-21T09:24:40.328042
| 2018-06-26T00:13:27
| 2018-06-26T00:13:27
| 138,398,507
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,407
|
java
|
/* Copyright Applied Industrial Logic Limited 2016. All rights Reserved */
/*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.ail.service.integrator.model;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
public class PolicySummary implements Serializable {
private static final long serialVersionUID = 1L;
private long systemId;
private String externalSystemId;
private String policyNumber;
private String quotationNumber;
private String clientName;
private String quoteDate;
private String inceptionDate;
private String expiryDate;
private String product;
private String premium;
private String status;
private Date createdDate;
private Date updatedDate;
private Map<String,String> pageFlowPageMap;
private Long owningUserId;
private String owningUserName;
public PolicySummary(long systemId, String externalSystemId, Date createdDate, Date updatedDate, String policyNumber,
String quotationNumber, String clientName, String quoteDate, String inceptionDate, String expiryDate,
String product, String premium, String status, Map<String,String> pageFlowPageMap, Long owningUserId, String owningUserName) {
this.systemId = systemId;
this.externalSystemId = externalSystemId;
this.createdDate = createdDate;
this.updatedDate = updatedDate;
this.policyNumber = policyNumber;
this.quotationNumber = quotationNumber;
this.clientName = clientName;
this.quoteDate = quoteDate;
this.inceptionDate = inceptionDate;
this.expiryDate = expiryDate;
this.product = product;
this.premium = premium;
this.status = status;
this.pageFlowPageMap = pageFlowPageMap;
this.owningUserId = owningUserId;
this.owningUserName = owningUserName;
}
public long getSystemId() {
return systemId;
}
public String getExternalSystemId() {
return externalSystemId;
}
public String getPolicyNumber() {
return policyNumber;
}
public String getQuotationNumber() {
return quotationNumber;
}
public String getClientName() {
return clientName;
}
public String getQuoteDate() {
return quoteDate;
}
public String getInceptionDate() {
return inceptionDate;
}
public String getExpiryDate() {
return expiryDate;
}
public String getProduct() {
return product;
}
public String getPremium() {
return premium;
}
public String getStatus() {
return status;
}
public Date getCreatedDate() {
return createdDate;
}
public Date getUpdatedDate() {
return updatedDate;
}
public Long getOwningUserId() {
return owningUserId;
}
public String getOwningUserName() {
return owningUserName;
}
public Map<String,String> getPageFlowPageMap() {
return pageFlowPageMap;
}
@Override
public String toString() {
return "PolicySummary [systemId=" + systemId + ", externalSystemId=" + externalSystemId + ", policyNumber=" + policyNumber + ", quotationNumber=" + quotationNumber + ", clientName="
+ clientName + ", quoteDate=" + quoteDate + ", inceptionDate=" + inceptionDate + ", expiryDate=" + expiryDate + ", product=" + product + ", premium=" + premium + ", status=" + status
+ ", createdDate=" + createdDate + ", updatedDate=" + updatedDate + ", pageFlowPageMap=" + pageFlowPageMap + ", owningUserId=" + owningUserId + ", owningUserName=" + owningUserName
+ "]";
}
}
|
[
"40519615+sangnguyensoftware@users.noreply.github.com"
] |
40519615+sangnguyensoftware@users.noreply.github.com
|
29c3601ccf14b00eeedb074f359a9e6ba9019df0
|
92225460ebca1bb6a594d77b6559b3629b7a94fa
|
/src/com/kingdee/eas/fdc/sellhouse/AbstractCommerceRoomEntryInfo.java
|
bf4151770aca4b0f1e8b49a096d4c6e4534b1a58
|
[] |
no_license
|
yangfan0725/sd
|
45182d34575381be3bbdd55f3f68854a6900a362
|
39ebad6e2eb76286d551a9e21967f3f5dc4880da
|
refs/heads/master
| 2023-04-29T01:56:43.770005
| 2023-04-24T05:41:13
| 2023-04-24T05:41:13
| 512,073,641
| 0
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,626
|
java
|
package com.kingdee.eas.fdc.sellhouse;
import java.io.Serializable;
import com.kingdee.bos.dao.AbstractObjectValue;
import java.util.Locale;
import com.kingdee.util.TypeConversionUtils;
import com.kingdee.bos.util.BOSObjectType;
public class AbstractCommerceRoomEntryInfo extends com.kingdee.eas.framework.CoreBillEntryBaseInfo implements Serializable
{
public AbstractCommerceRoomEntryInfo()
{
this("id");
}
protected AbstractCommerceRoomEntryInfo(String pkField)
{
super(pkField);
}
/**
* Object: 商机意向房间分录 's 商机 property
*/
public com.kingdee.eas.fdc.sellhouse.CommerceChanceInfo getCommerceChance()
{
return (com.kingdee.eas.fdc.sellhouse.CommerceChanceInfo)get("commerceChance");
}
public void setCommerceChance(com.kingdee.eas.fdc.sellhouse.CommerceChanceInfo item)
{
put("commerceChance", item);
}
/**
* Object: 商机意向房间分录 's 意向房间 property
*/
public com.kingdee.eas.fdc.sellhouse.RoomInfo getRoom()
{
return (com.kingdee.eas.fdc.sellhouse.RoomInfo)get("room");
}
public void setRoom(com.kingdee.eas.fdc.sellhouse.RoomInfo item)
{
put("room", item);
}
/**
* Object:商机意向房间分录's 计划更改意向property
*/
public boolean isPlanToChange()
{
return getBoolean("planToChange");
}
public void setPlanToChange(boolean item)
{
setBoolean("planToChange", item);
}
public BOSObjectType getBOSType()
{
return new BOSObjectType("E9CCEE41");
}
}
|
[
"yfsmile@qq.com"
] |
yfsmile@qq.com
|
fd3849dc3bcbe9d61cbbe05a4ec3e1d4a578bc8c
|
8ef5dba87266ec527514fe14a79e23f10bd02a6e
|
/didn't work/TawseelReallyClone/app/src/main/java/com/google/android/gms/tasks/zzb.java
|
65af38042f13e69abe103547fbf11ec896dd0b66
|
[] |
no_license
|
ahmedmgh67/What-s-Fatora
|
4cfff6ae6c5b41f4b8fc23068d219f63251854ff
|
53c90a17542ecca1fe267816219d9f0c78471c92
|
refs/heads/master
| 2020-04-28T06:14:33.730056
| 2019-02-15T21:41:28
| 2019-02-15T21:41:28
| 175,049,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,381
|
java
|
package com.google.android.gms.tasks;
import android.support.annotation.NonNull;
import java.util.concurrent.Executor;
class zzb<TResult, TContinuationResult>
implements OnFailureListener, OnSuccessListener<TContinuationResult>, zzf<TResult>
{
private final Executor zzbDK;
private final Continuation<TResult, Task<TContinuationResult>> zzbLs;
private final zzh<TContinuationResult> zzbLt;
public zzb(@NonNull Executor paramExecutor, @NonNull Continuation<TResult, Task<TContinuationResult>> paramContinuation, @NonNull zzh<TContinuationResult> paramzzh)
{
this.zzbDK = paramExecutor;
this.zzbLs = paramContinuation;
this.zzbLt = paramzzh;
}
public void cancel()
{
throw new UnsupportedOperationException();
}
public void onComplete(@NonNull final Task<TResult> paramTask)
{
this.zzbDK.execute(new Runnable()
{
public void run()
{
try
{
Task localTask = (Task)zzb.zza(zzb.this).then(paramTask);
if (localTask == null)
{
zzb.this.onFailure(new NullPointerException("Continuation returned null"));
return;
}
}
catch (RuntimeExecutionException localRuntimeExecutionException)
{
if ((localRuntimeExecutionException.getCause() instanceof Exception))
{
zzb.zzb(zzb.this).setException((Exception)localRuntimeExecutionException.getCause());
return;
}
zzb.zzb(zzb.this).setException(localRuntimeExecutionException);
return;
}
catch (Exception localException)
{
zzb.zzb(zzb.this).setException(localException);
return;
}
localException.addOnSuccessListener(TaskExecutors.zzbLG, zzb.this);
localException.addOnFailureListener(TaskExecutors.zzbLG, zzb.this);
}
});
}
public void onFailure(@NonNull Exception paramException)
{
this.zzbLt.setException(paramException);
}
public void onSuccess(TContinuationResult paramTContinuationResult)
{
this.zzbLt.setResult(paramTContinuationResult);
}
}
/* Location: H:\As A Bussines Man\confedince\App Dev Department\What's Fatora\Tawseel APK\Client\dex2jar-2.0\t-dex2jar.jar!\com\google\android\gms\tasks\zzb.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ahmedmgh67@gmail.com"
] |
ahmedmgh67@gmail.com
|
caadad6e1ff2d073c38b2e6b4ec010638401e879
|
750d06d12ce6e408301fdf9bdbb08ddef0b6f1f1
|
/Databases_Advanced/Spring-data-auto-mapping-objects/src/main/java/com/springdata/simple_mapping_part_two/data/entities/Employee.java
|
6c71b6ac47b2fb3c95bb5e890751a7e777ba38dd
|
[] |
no_license
|
Deianov/Java-DB
|
e16245af70527a33efa9789d03276b449bbee70c
|
e7023500f76e84f220f621a598e460177ce327d3
|
refs/heads/master
| 2022-07-31T02:31:18.508054
| 2022-06-23T11:06:28
| 2022-06-23T11:06:28
| 239,293,956
| 1
| 3
| null | 2022-06-23T11:06:29
| 2020-02-09T11:35:24
|
Java
|
UTF-8
|
Java
| false
| false
| 690
|
java
|
package com.springdata.simple_mapping_part_two.data.entities;
import com.springdata.simple_mapping_part_two.data.entities.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.*;
import java.math.BigDecimal;
@Entity
@Table(name = "employees")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Employee extends BaseEntity {
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@Column
private BigDecimal salary;
@ManyToOne
@JoinColumn(name = "city_id")
private City city;
}
|
[
"44973718+Deianov@users.noreply.github.com"
] |
44973718+Deianov@users.noreply.github.com
|
2d3ca45a583ca70eca38b8dcef18ad63299d9932
|
e042eb6da97087e3ace484b2419bcaed5e7ea039
|
/AppPortalTurismo/ViewController/src/cl/com/ccla/dashboardnotif/DashboardNotifImpl.java
|
ad507826fd127e950bba7bcae62ea03f5cbff54d
|
[] |
no_license
|
gmemo4523/S4tCcla
|
601627d34e4464db6545e6dc17ee5e36c5e86d38
|
d1c6536496a0597fccb44256be59d4e263f20048
|
refs/heads/master
| 2020-03-27T22:25:17.304662
| 2018-09-04T15:34:17
| 2018-09-04T15:34:17
| 147,229,436
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,969
|
java
|
package cl.com.ccla.dashboardnotif;
import com.google.gson.Gson;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class DashboardNotifImpl {
public DashboardNotifImpl() {
super();
}
public Respuesta ejecutarServicio(Input input,
String hostRest) throws IOException {
Gson gson;
Respuesta respuesta;
try {
URL url =
new URL("http://" + hostRest + "/CclaServices/servicios/DashboardNotificacionBean/DashboardNotificacion");
HttpURLConnection connection =
(HttpURLConnection)url.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestMethod("POST");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("Content-Type",
"application/json; charset=UTF-8");
OutputStreamWriter writer =
new OutputStreamWriter(connection.getOutputStream(), "UTF-8");
gson = new Gson();
writer.write(gson.toJson(input));
writer.close();
BufferedReader br =
new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuffer jsonString = new StringBuffer();
String line;
while ((line = br.readLine()) != null) {
jsonString.append(line);
}
br.close();
connection.disconnect();
gson = new Gson();
respuesta = gson.fromJson(jsonString.toString(), Respuesta.class);
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
return respuesta;
}
}
|
[
"seed4tech"
] |
seed4tech
|
99482bff0c8eeefaedbd3b9005e0707bd607adbd
|
69011b4a6233db48e56db40bc8a140f0dd721d62
|
/src/com/jshx/http/command/GetTjbhgjlListCommand.java
|
2c8f9080d753c98d8e9cc7653428e43b8a0c3e90
|
[] |
no_license
|
gechenrun/scysuper
|
bc5397e5220ee42dae5012a0efd23397c8c5cda0
|
e706d287700ff11d289c16f118ce7e47f7f9b154
|
refs/heads/master
| 2020-03-23T19:06:43.185061
| 2018-06-10T07:51:18
| 2018-06-10T07:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,672
|
java
|
package com.jshx.http.command;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.duanpf.http.comm.BaseResponse;
import com.duanpf.http.comm.Command;
import com.jshx.core.utils.SpringContextHolder;
import com.jshx.http.bean.SummaryBean;
import com.jshx.http.service.HttpService;
import com.jshx.http.util.StringTools;
/**
* 获取体检不合格记录列表接口
* @author 周云琳 2015-10-13
*
*/
public class GetTjbhgjlListCommand implements Command{
private HttpService httpService = (HttpService) SpringContextHolder.getBean("httpService");
public BaseResponse execute(JSONObject obj) {
SummaryBean br = new SummaryBean();
String userId = obj.getString("userId");//获取用户的id
String pageNum = obj.getString("pageNum");//获取分页的起始页
String pageSize = obj.getString("pageSize");//获取分页的每页条数
String companyId = obj.getString("companyId");//获取用户的id
int s = Integer.parseInt(pageNum);
int l = Integer.parseInt(pageSize);
Map<String, Object> paraMap = new HashMap<String, Object>();
paraMap.put("table", "PHY_UNQ_REC");
paraMap.put("sqlId", "getListByTableAndCompanyId");
paraMap.put("start", pageNum);
paraMap.put("limit", pageSize);
paraMap.put("companyId", companyId);
List<Map<String, Object>> phyUnqRec=httpService.findListDataByMap(paraMap);
Map<String, Object> paraMap2 = new HashMap<String, Object>();
paraMap2.put("table", "PHY_UNQ_REC");
paraMap2.put("sqlId", "getListByTableAndCompanyIdForCount");
paraMap2.put("companyId", companyId);
int total=Integer.parseInt(httpService.findListDataByMap(paraMap2).get(0).get("TOTAL").toString());
int page=total/(l);
page = total%l==0?page:(page+1);
JSONArray ja = new JSONArray();
try {
if(phyUnqRec!=null&&!phyUnqRec.isEmpty()){
for(Map bean:phyUnqRec){
JSONObject jo = new JSONObject();
jo.put("id", null==bean.get("ROW_ID").toString()?"":bean.get("ROW_ID"));//主键
jo.put("name", null==bean.get("JSHX_NAME").toString()?"":bean.get("JSHX_NAME"));//姓名
jo.put("identification", null==bean.get("IDENTIFICATION")?"":bean.get("IDENTIFICATION"));//身份证
ja.add(jo);
}
br.setCode("0");
br.setMessage("成功");
br.setTotal(total+"");
br.setPage(page+"");
br.setContent(ja.toString());
}else{
br.setCode("1");
br.setMessage("无数据");
}
} catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
br.setCode("2");
br.setMessage("异常");
}
return br;
}
}
|
[
"shellchange@sina.com"
] |
shellchange@sina.com
|
b33c59e150f25768e816f3fa318b46c52bded762
|
e54131810055aedeb3a33e5eebdf485feac501d6
|
/yzvenden.service/src/main/java/com/at/frame/annotation/MapperCustom.java
|
9410a207dbed325627c8817847ec30de72553892
|
[] |
no_license
|
xiaoxian075/yzven
|
755c8d521deee7dd9e9723c17007ba706b82a04f
|
26dd5a3ff0fb4acf0ad71daa09bedcd991e804ee
|
refs/heads/master
| 2021-01-23T09:41:47.379895
| 2017-09-06T10:13:32
| 2017-09-06T10:13:32
| 102,593,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 405
|
java
|
package com.at.frame.annotation;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import java.lang.annotation.*;
/**
* Created by Administrator on 2017/5/15.
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Component
public @interface MapperCustom {
Class value();
}
|
[
"xiaoxian075@126.com"
] |
xiaoxian075@126.com
|
131a139941db402ed8d2ac4659f0de20dd9c8946
|
a59ac307b503ff470e9be5b1e2927844eff83dbe
|
/wheatfield/branches/rkylin-wheatfield-AQFY/wheatfield/src/main/java/com/rkylin/wheatfield/manager/impl/OrgInfoManagerImpl.java
|
c75d8be8417676eb63ed3baab1514e58bebae717
|
[] |
no_license
|
yangjava/kylin-wheatfield
|
2cc82ee9e960543264b1cfc252f770ba62669e05
|
4127cfca57a332d91f8b2ae1fe1be682b9d0f5fc
|
refs/heads/master
| 2020-12-02T22:07:06.226674
| 2017-07-03T07:59:15
| 2017-07-03T07:59:15
| 96,085,446
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
/*
* Powered By chanjetpay-code-generator
* Web Site: http://www.chanjetpay.com
* Since 2014 - 2015
*/
package com.rkylin.wheatfield.manager.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import com.rkylin.wheatfield.dao.OrgInfoDao;
import com.rkylin.wheatfield.manager.OrgInfoManager;
import com.rkylin.wheatfield.pojo.OrgInfo;
import com.rkylin.wheatfield.pojo.OrgInfoQuery;
@Component("orgInfoManager")
public class OrgInfoManagerImpl implements OrgInfoManager {
@Autowired
@Qualifier("orgInfoDao")
private OrgInfoDao orgInfoDao;
@Override
public void saveOrgInfo(OrgInfo orgInfo) {
if (orgInfo.getOrgId() == null) {
orgInfoDao.insertSelective(orgInfo);
} else {
orgInfoDao.updateByPrimaryKeySelective(orgInfo);
}
}
@Override
public OrgInfo findOrgInfoById(Long id) {
return orgInfoDao.selectByPrimaryKey(id);
}
@Override
public List<OrgInfo> queryList(OrgInfoQuery query) {
return orgInfoDao.selectByExample(query);
}
@Override
public void deleteOrgInfoById(Long id) {
orgInfoDao.deleteByPrimaryKey(id);
}
@Override
public void deleteOrgInfo(OrgInfoQuery query) {
orgInfoDao.deleteByExample(query);
}
}
|
[
"yangjava@users.noreply.github.com"
] |
yangjava@users.noreply.github.com
|
ceace961220121024edb82c7865165f4be5a7778
|
98ab5f328996e57081f0bf976403d2038a65d8ca
|
/src/test/java/account/numberOf125/Account2ThreadDepositandWithdrawTest15.java
|
f51285bbef07cad43ebc0f8e9aaaf3898eeb4a2d
|
[] |
no_license
|
GenaGeng/StressTest
|
6efae871c7f096c2a7944c2b1f93e615c490abda
|
980747d3d04e4b5e7a17b6e60188209f5de9165a
|
refs/heads/master
| 2023-01-01T09:51:55.407744
| 2020-10-28T01:24:37
| 2020-10-28T01:24:38
| 307,870,124
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,070
|
java
|
package account.numberOf125;
import account.Account;
import junit.framework.TestCase;
import org.junit.Before;
import org.junit.After;
import org.junit.Test;
public class Account2ThreadDepositandWithdrawTest15 extends TestCase{
Account2ThreadDepositandWithdrawTest15 accountTest;
@Before
public void setUp(){
accountTest = new Account2ThreadDepositandWithdrawTest15();
}
@After
public void tearDown() {
accountTest = null;
}
@Test
public void runTest() throws Exception {
accountTest.test2ThreadDepositAndWithdrawAndCheckInvariant();
}
@Test
public boolean test2ThreadDepositAndWithdrawAndCheckInvariant() throws Exception {
return performDepositsAndWithdrawalsAndCheckInvariant(2);
}
private class DepositThread implements Runnable {
private final Account account;
private final double money;
public DepositThread(Account account, double money) {
this.account = account;
this.money = money;
}
@Override
public void run() {
account.depsite(money);
}
}
private class WithdrawThread implements Runnable {
private final Account account;
private final double money;
public WithdrawThread(Account account, double money) {
this.account = account;
this.money = money;
}
@Override
public void run() {
account.withdraw(money);
}
}
@Test
public boolean performDepositsAndWithdrawalsAndCheckInvariant(int numThreads) throws Exception {
Account account = new Account("The Account",8318);
Thread[] withdrawalThreads = new Thread[numThreads];
Thread[] depositThreads = new Thread[numThreads];
for (int i = 0; i < numThreads; i++) {
depositThreads[i] = new Thread(new DepositThread(account,3799));
withdrawalThreads[i] = new Thread(new WithdrawThread(account,4091));
}
for (int i = 0; i < numThreads; i++) {
depositThreads[i].start();
withdrawalThreads[i].start();
}
for (int i = 0; i < numThreads; i++) {
depositThreads[i].join();
withdrawalThreads[i].join();
}
if (account.amount!=7734){
return false;
}else {
return true;
}
}
}
|
[
"17854284492@163.com"
] |
17854284492@163.com
|
fbfcdee8a0335b791e02f4f3b05e04940ab3fe3a
|
16bc3511f95fcb9f8df3fff0a456be94c3dfb2a9
|
/reactions-jobs-common/src/main/java/com/diamondq/reactions/common/process/package-info.java
|
6c387a5fbeea136fa744871efaf44b50d47ae8ef
|
[
"Apache-2.0"
] |
permissive
|
diamondq/dq-reactions
|
2cba471c3a76c7fda17b381d2fe6c70b2a247d4a
|
2af2db32172218b315b13b6637e935d7cdea6497
|
refs/heads/master
| 2021-09-10T14:14:31.927843
| 2018-03-27T17:21:40
| 2018-03-27T17:21:40
| 100,425,420
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 277
|
java
|
/**
* Information about the reaction.network.process package
*/
@org.checkerframework.framework.qual.DefaultQualifier(value = org.checkerframework.checker.nullness.qual.NonNull.class)
@org.eclipse.jdt.annotation.NonNullByDefault
package com.diamondq.reactions.common.process;
|
[
"me@michaelmansell.com"
] |
me@michaelmansell.com
|
c96c694f9c96b6c499bc7378e5fd95d504c48bd3
|
95db9f68294c1720426b78015a36dee4c2cf12ad
|
/src/main/java/org/bcos/web3j/protocol/core/methods/response/DbPutHex.java
|
a1b2b79e47556f711be151882366498104e69b4d
|
[
"Apache-2.0"
] |
permissive
|
liuqikri/web3sdk
|
5642ca77953331cbdb88258751af1d49dfd6c336
|
1d8b914af4c72325b329c07aea4e1dd2d8cda936
|
refs/heads/master
| 2020-03-31T20:52:40.393387
| 2018-10-10T09:07:26
| 2018-10-10T09:07:26
| 144,581,044
| 0
| 0
|
Apache-2.0
| 2018-08-13T13:06:25
| 2018-08-13T13:06:24
| null |
UTF-8
|
Java
| false
| false
| 247
|
java
|
package org.bcos.web3j.protocol.core.methods.response;
import org.bcos.web3j.protocol.core.Response;
/**
* db_putHex.
*/
public class DbPutHex extends Response<Boolean> {
public boolean valueStored() {
return getResult();
}
}
|
[
"dev@fisco.com.cn"
] |
dev@fisco.com.cn
|
e6b799dbd19819c009e8bbc3fd34c13508bb05d3
|
708571785b6bd6d4ec1c0279cfa09a2cd3859ca4
|
/core-ng/src/main/java/core/framework/impl/web/route/PathPatternValidator.java
|
347a5435fe9660aadef9cedbc53ba5a1b7962884
|
[
"Apache-2.0"
] |
permissive
|
jarvisxiong/core-ng-project
|
6512276d94a425b2ab8e7a565965177940dfe55e
|
9153f3b72fea87b8c817707d3206c7eb01a41102
|
refs/heads/master
| 2021-01-17T23:19:20.361265
| 2017-03-07T15:48:23
| 2017-03-07T15:48:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,371
|
java
|
package core.framework.impl.web.route;
import core.framework.api.util.ASCII;
import core.framework.api.util.Exceptions;
import core.framework.api.util.Sets;
import core.framework.api.util.Strings;
import java.util.Set;
/**
* @author neo
*/
class PathPatternValidator {
void validate(String pathPattern) {
if (Strings.isEmpty(pathPattern))
throw Exceptions.error("path pattern must not be empty, pathPattern={}", pathPattern);
if (!pathPattern.startsWith("/"))
throw Exceptions.error("path pattern must start with '/', pathPattern={}", pathPattern);
Set<String> variables = Sets.newHashSet();
String[] tokens = Strings.split(pathPattern, '/');
for (String token : tokens) {
if (token.startsWith(":")) {
int paramIndex = token.indexOf('(');
int endIndex = paramIndex > 0 ? paramIndex : token.length();
String variable = token.substring(1, endIndex);
validateVariable(variable, pathPattern);
boolean notDuplicated = variables.add(variable);
if (!notDuplicated)
throw Exceptions.error("path must not have duplicated param name, path={}", pathPattern);
} else {
validatePathSegment(token, pathPattern);
}
}
}
private void validatePathSegment(String segment, String pathPattern) {
if (segment.length() == 0) return;
if (segment.charAt(segment.length() - 1) == '.')
throw Exceptions.error("path segment must not end with '.', segment={}, pathPattern={}", segment, pathPattern);
for (int i = 0; i < segment.length(); i++) {
char ch = segment.charAt(i);
if (!ASCII.isLetter(ch) && !ASCII.isDigit(ch) && ch != '_' && ch != '-' && ch != '.') {
throw Exceptions.error("path segment must only contain (letter / digit / _ / - / .), segment={}, pathPattern={}", segment, pathPattern);
}
}
}
private void validateVariable(String variable, String pathPattern) {
for (int i = 0; i < variable.length(); i++) {
char ch = variable.charAt(i);
if (!ASCII.isLetter(ch)) throw Exceptions.error("path variable must be letter, variable={}, pathPattern={}", variable, pathPattern);
}
}
}
|
[
"neowu.us@gmail.com"
] |
neowu.us@gmail.com
|
57ac78c03f99ed13f815cfebccecdee0764f2e6b
|
ade60a0cd4d5ce7ce7d3ecc0ca9e1c599219705c
|
/studyspring3/src/main/java/org/yy/studyspring3/bookstore/service/impl/BookstoreServiceImpl.java
|
3f2dcc5375755d2974857369f2994c44e3b3f224
|
[
"Apache-2.0"
] |
permissive
|
yyitsz/myjavastudio
|
bc7d21ed8ece3eccc07cb0fbc6bbad0be04a7f60
|
f5563d45c36d1a0b0a7ce1f5a360ff6017f068e8
|
refs/heads/master
| 2021-06-11T23:04:43.228001
| 2017-03-24T10:05:27
| 2017-03-24T10:05:27
| 17,080,356
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,105
|
java
|
package org.yy.studyspring3.bookstore.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Service;
import org.yy.studyspring3.bookstore.domain.Book;
import org.yy.studyspring3.bookstore.service.BookSearchCriteria;
import org.yy.studyspring3.bookstore.service.BookstoreService;
@Service
public class BookstoreServiceImpl implements BookstoreService {
ArrayList<Book> books = new ArrayList<Book>();
public BookstoreServiceImpl() {
initBookStore();
}
private void initBookStore() {
Book b = new Book();
b.setId(1);
b.setTitle("Programmer");
b.setDescription("good book.");
b.setPrice(new BigDecimal("89.00"));
b.setYear(2010);
b.setAuthor("zhange");
b.setIsbn("ISBN-1212121-121");
books.add(b);
b = new Book();
b.setId(2);
b.setTitle("Programmer2");
b.setDescription("good book.");
b.setPrice(new BigDecimal("389.00"));
b.setYear(2010);
b.setAuthor("zhange");
b.setIsbn("ISBN-1212121-121");
books.add(b);
b = new Book();
b.setId(3);
b.setTitle("Programmer3");
b.setDescription("good book.");
b.setPrice(new BigDecimal("289.00"));
books.add(b);
b.setYear(2010);
b.setAuthor("zhange");
b.setIsbn("ISBN-1212121-121");
b = new Book();
b.setId(4);
b.setTitle("Programmer4");
b.setDescription("good book.");
b.setPrice(new BigDecimal("189.00"));
b.setYear(2010);
b.setAuthor("zhange");
b.setIsbn("ISBN-1212121-121");
books.add(b);
}
@Override
public List<Book> search(BookSearchCriteria criteria) {
return books;
}
@Override
public Book findBook(long bookId) {
for(Book b : books){
if(b.getId() == bookId){
return b;
}
}
return null;
}
}
|
[
"yyitsz@163.com"
] |
yyitsz@163.com
|
5b2f5ca91cf683da5fb48ded10d8332ae9785318
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Time/7/org/joda/time/DateTimeZone_toString_1283.java
|
301bafd12d66d7fb2d54bca9c5d4017fc9f91248
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,461
|
java
|
org joda time
date time zone datetimezon repres time zone
time zone system rule convert time geograph
locat pari franc hour ahead
london england london pari
time zone rule express histor reason rel
greenwich london local time greenwich refer greenwich
time gmt similar precis ident univers
coordin time utc librari term utc
system america lo angel express utc utc
summer offset america lo angel time
obtain utc ad subtract hour
offset differ summer daylight save time dst
definit time gener
utc refer time
standard time local time daylight save time offset
pari standard time utc
daylight save time local time daylight save time
offset offset typic hour typic
countri equat pari daylight save
time utc
wall time local clock wall read
standard time daylight save time depend time year
locat daylight save time
unlik java time zone timezon date time zone datetimezon immut
support format time zone id est ect accept
factori accept time zone timezon attempt convert
suitabl
date time zone datetimezon thread safe immut subclass
author brian neill o'neil
author stephen colebourn
date time zone datetimezon serializ
datetim zone string simpli
zone
string string tostr
getid
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
96842d2899ea85c994047a7c82cc8e26126bfc50
|
24748d9c3311c5683f1d6e815fa7e24740c3709a
|
/Spring/Dependency_Object/src/Com/Artek/Bus.java
|
a5c33979df5a64453e1f960be8e69e3d17d6f748
|
[] |
no_license
|
pradeepp82/mypractice
|
6262a862770f4a8bcfaf5e6be725d51c5d24b915
|
3b845d2b7635271d5a75631ae47515c429d4a7cb
|
refs/heads/master
| 2021-07-17T07:48:18.324173
| 2017-10-25T07:20:23
| 2017-10-25T07:20:23
| 108,234,160
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 323
|
java
|
package Com.Artek;
public class Bus implements Vehicle {
private int maxspeed;
public int getMaxspeed() {
return maxspeed;
}
public void setMaxspeed(int maxspeed) {
this.maxspeed = maxspeed;
}
public void move() {
System.out.println("max speed"+maxspeed);
System.out.println("Bus started");
}
}
|
[
"panwarp82@gmail.com"
] |
panwarp82@gmail.com
|
e4e53674e4bd85fc46164b0b5b94e9e9c8ca8412
|
031882972460a497477c694db71018c01d1bd31c
|
/ruoyi-app/src/main/java/com/ruoyi/app/util/hz/factory/response/other/Doc.java
|
c6a48d023a848a63a0f4c58739855633c0638c2d
|
[] |
no_license
|
jackjzy/msbstydy
|
77393bff92ea14845f015fc0b8998586f64949a4
|
78781c65769c4a163db47c1617d8e1d13488a4c6
|
refs/heads/master
| 2023-06-23T14:20:25.459222
| 2021-07-26T07:07:33
| 2021-07-26T07:07:33
| 389,536,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 697
|
java
|
package com.ruoyi.app.util.hz.factory.response.other;
/**
* @description 悟空API
* @author 澄泓
* @date 2020/10/30 10:35
* @version
*/
public class Doc {
private String fileId;
private String fileName;
private String fileUrl;
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
}
|
[
"你的邮箱"
] |
你的邮箱
|
5e08c88249f4f0383a18c364f01fede67ac4bfae
|
36c7d9828c5158370144b61eeb7f56ac8ed50162
|
/src/main/java/org/opensha/commons/util/modules/OpenSHA_Module.java
|
a1cd0e3e5f79671a2ccac4504af6df64474788bc
|
[
"Apache-2.0"
] |
permissive
|
Aditya-Zutshi/opensha
|
92f1a5112c855fec37afea27150b4588fd14d077
|
d0e862a62bb3cdd262c4f33742b3a071da6b21b7
|
refs/heads/master
| 2023-08-28T05:00:38.792472
| 2021-10-26T08:13:18
| 2021-10-26T08:13:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 555
|
java
|
package org.opensha.commons.util.modules;
import org.opensha.commons.data.Named;
/**
* Interface for modules that can be added to a {@link ModuleContainer}, currently just a tagging interface that
* extends {@link Named}.
* <p>
* TODO: should this exist, or should we remove and make the containers accept anything that extends Named?
* Is there any future functionality that we want here?
*
* @author kevin
*
*/
@ModuleHelper // don't map this class to any implementation in ModuleContainer
public interface OpenSHA_Module extends Named {
}
|
[
"kmilner@usc.edu"
] |
kmilner@usc.edu
|
ea9673680d944227e92f70eea040fee1a597aeaf
|
932246ec3982dd2748099395a34c4ad138a0087f
|
/src/main/java/biweekly/util/ICalFloatFormatter.java
|
30916df973025ea8bdcf7d67474ddd300eda1656
|
[
"BSD-2-Clause-Views",
"BSD-2-Clause"
] |
permissive
|
MichiganLabs/biweekly
|
76edf535187162845f3b10bbb64d56525473c115
|
a0ccda2b1e5408f4583cf580f372843ee070fb0a
|
refs/heads/master
| 2021-01-12T08:45:40.526810
| 2016-12-16T19:21:09
| 2016-12-16T19:21:09
| 76,678,580
| 0
| 1
| null | 2016-12-16T19:08:21
| 2016-12-16T19:08:20
| null |
UTF-8
|
Java
| false
| false
| 2,302
|
java
|
package biweekly.util;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
/*
Copyright (c) 2013-2016, Michael Angstadt
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.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* Formats floating-point values for iCalendar objects. Notably, this ensures
* that a "." is used as decimal separater, no matter the locale.
* @author Michael Angstadt
*/
public class ICalFloatFormatter extends DecimalFormat {
private static final long serialVersionUID = 7755109373108919576L;
/**
* Creates a new formatter with a max of 6 decimals.
*/
public ICalFloatFormatter() {
this(6);
}
/**
* Creates a new formatter.
* @param decimals the max number of decimal places
*/
public ICalFloatFormatter(int decimals) {
setMaximumFractionDigits(decimals);
if (decimals > 0) {
setMinimumFractionDigits(1);
}
//decimal separator differs by locale (e.g. Germany uses ",")
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator('.');
symbols.setMinusSign('-');
setDecimalFormatSymbols(symbols);
}
}
|
[
"mike.angstadt@gmail.com"
] |
mike.angstadt@gmail.com
|
eb2e5dc2f257f2c1b23da7c8a78b150c74bb15fa
|
b59f5a4fa9c6151ee1f757a0d265543eea7331dc
|
/examples/fuml/language_workbench/org.modelexecution.xmof.examples.fuml.fewsteps.xmof.dynamic/src/fumlConfigurationFewSteps/StructuralFeatureConfiguration.java
|
d10bf90cbf76214e6f95ec57aaa44447403336af
|
[] |
no_license
|
vatmi/moliz.gemoc
|
a8b7a6ac5d7bafb6b331655010975f2a44206d95
|
471f3128608986ddee1a7c4722d3620446e3726d
|
refs/heads/master
| 2020-03-30T23:32:19.818605
| 2017-10-20T09:20:17
| 2017-10-20T09:21:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 572
|
java
|
/**
*/
package fumlConfigurationFewSteps;
import org.eclipse.uml2.uml.StructuralFeature;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Structural Feature Configuration</b></em>'.
* <!-- end-user-doc -->
*
*
* @see fumlConfigurationFewSteps.FumlConfigurationFewStepsPackage#getStructuralFeatureConfiguration()
* @model
* @generated
*/
public interface StructuralFeatureConfiguration extends StructuralFeature, FeatureConfiguration, TypedElementConfiguration, MultiplicityElementConfiguration {
} // StructuralFeatureConfiguration
|
[
"ebousse@users.noreply.github.com"
] |
ebousse@users.noreply.github.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.