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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1e4e084779a03aaf0ca132df8251831054e6662f
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/no_seeding/32_httpanalyzer-httpanalyzer.RequestParamsDialog-1.0-2/httpanalyzer/RequestParamsDialog_ESTest.java
|
9ca7153cb45fba58f2434d02192d2d73aa2ea157
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,731
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Oct 28 14:32:41 GMT 2019
*/
package httpanalyzer;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import httpanalyzer.RequestParamsDialog;
import java.awt.Frame;
import java.awt.HeadlessException;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class RequestParamsDialog_ESTest extends RequestParamsDialog_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
RequestParamsDialog requestParamsDialog0 = null;
try {
requestParamsDialog0 = new RequestParamsDialog((Frame) null, false);
fail("Expecting exception: HeadlessException");
} catch(HeadlessException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("java.awt.GraphicsEnvironment", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
String string0 = RequestParamsDialog.getRequestParams();
assertEquals("&null", string0);
}
@Test(timeout = 4000)
public void test2() throws Throwable {
String[] stringArray0 = new String[1];
RequestParamsDialog.main(stringArray0);
assertEquals(1, stringArray0.length);
}
@Test(timeout = 4000)
public void test3() throws Throwable {
boolean boolean0 = RequestParamsDialog.isDataChanged();
assertFalse(boolean0);
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
a62fe0f709f18a0254cc43e1dd11de6add744e31
|
c2a1ee07b424b423c0f0c2a9e5af1784f3702686
|
/app-management-admin/app-management-admin-server/src/main/java/com/yulece/app/management/pms/repository/AdminRoleRepository.java
|
0f174b207c7dc167438f382725fd5b44254c9602
|
[
"Apache-2.0"
] |
permissive
|
qq1026290752/app-management
|
41253912d414f05c5f3325c737474be3e1eb68e3
|
f3fadda77a1e88a55e9531a10b9ffddf46c29ec1
|
refs/heads/master
| 2023-01-22T02:49:04.661541
| 2020-08-05T04:57:28
| 2020-08-05T04:57:28
| 149,980,635
| 15
| 8
|
Apache-2.0
| 2023-01-07T17:30:20
| 2018-09-23T12:05:17
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 543
|
java
|
package com.yulece.app.management.pms.repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yulece.app.management.pms.entity.AdminRole;
import org.springframework.stereotype.Repository;
/**
* Copyright © 2019 eSunny Info. Tech Ltd. All rights reserved.
* 接口类
*
* @author wangyichao@28ph.cn
* @Title: AdminRoleRepository
* @Package com.yulece.app.management.pms.repository
* @Description:
* @Date 2019-11-09 16:42
**/
@Repository
public interface AdminRoleRepository extends BaseMapper<AdminRole> {
}
|
[
"admin@example.com"
] |
admin@example.com
|
057c296fb94f920fd3e33e8a7f83a08daaab5abb
|
9e72d2ec74a613a586499360707910e983a14370
|
/src/org/ace/insurance/life/policy/PolicyInsuredPersonDTO.java
|
34de898d499bbfacfc4848f7291624fd0b830fa2
|
[] |
no_license
|
pyaesonehein1141991/FNI-LIFE
|
30ecefca8b12455c0a90906004f85f32217c5bf4
|
a40b502147b32193d467c2db7d49e2872f2fcab6
|
refs/heads/master
| 2020-08-31T11:20:22.757995
| 2019-10-30T11:02:47
| 2019-10-30T11:02:47
| 218,678,685
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,340
|
java
|
package org.ace.insurance.life.policy;
import java.util.Date;
public class PolicyInsuredPersonDTO {
private String fullName;
private String fatherName;
private String occupation;
private String typeOfSport;
private String fullIdNo;
private Date dateOfBirth;
private String beneficiaryNames;
private String beneRelationships;
private String beneFullIdNos;
private double sumInsured;
private double premium;
private double termPremium;
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getFatherName() {
return fatherName;
}
public void setFatherName(String fatherName) {
this.fatherName = fatherName;
}
public String getOccupation() {
return occupation;
}
public void setOccupation(String occupation) {
this.occupation = occupation;
}
public String getFullIdNo() {
return fullIdNo;
}
public void setFullIdNo(String fullIdNo) {
this.fullIdNo = fullIdNo;
}
public Date getDateOfBirth() {
return dateOfBirth;
}
public void setDateOfBirth(Date dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
public String getBeneficiaryNames() {
return beneficiaryNames;
}
public void setBeneficiaryNames(String beneficiaryNames) {
this.beneficiaryNames = beneficiaryNames;
}
public String getBeneRelationships() {
return beneRelationships;
}
public void setBeneRelationships(String beneRelationships) {
this.beneRelationships = beneRelationships;
}
public String getBeneFullIdNos() {
return beneFullIdNos;
}
public void setBeneFullIdNos(String beneFullIdNos) {
this.beneFullIdNos = beneFullIdNos;
}
public double getSumInsured() {
return sumInsured;
}
public void setSumInsured(double sumInsured) {
this.sumInsured = sumInsured;
}
public double getPremium() {
return premium;
}
public void setPremium(double premium) {
this.premium = premium;
}
public String getTypeOfSport() {
return typeOfSport;
}
public void setTypeOfSport(String typeOfSport) {
this.typeOfSport = typeOfSport;
}
public double getTermPremium() {
return termPremium;
}
public void setTermPremium(double termPremium) {
this.termPremium = termPremium;
}
}
|
[
"ASUS@DESKTOP-37IOB4I"
] |
ASUS@DESKTOP-37IOB4I
|
02ec6660cd9026d52b8e14e31b70c1f2328a0181
|
a522f8b3c03ab28df0b95a03ca40c1628630f065
|
/microservices/microservices-experiments-master/order-service/src/main/java/com/typesafe/service/order/service/Order.java
|
384637237ca0d5f98a74b14239ebc01bdb526202
|
[] |
no_license
|
aristotllforks/boot
|
418b67317a5f1cd04a6d72cb3e10306ec6a8eb98
|
84b333920e1187fe91c1fdd2426e52a4d5a7ddf6
|
refs/heads/master
| 2023-03-17T17:19:16.562186
| 2018-03-31T23:45:10
| 2018-03-31T23:45:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 397
|
java
|
package com.typesafe.service.order.service;
import lombok.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@Setter
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Order {
String reference;
String accountName;
LocalDateTime timestamp;
List<OrderDetail> details = new ArrayList<>();
double total = 0.0;
}
|
[
"jahanvi.bansal@gmail.com"
] |
jahanvi.bansal@gmail.com
|
2ba2673871283bc608ad084e97dada675ce0154e
|
84c2b8ef2fc8e3aee7c3e02845d121c7fca7c7c1
|
/src/main/java/org/soraworld/chinachess/event/ModEvent.java
|
2ebba831741421bae4c4b8b6dc7705334f98735b
|
[
"MIT"
] |
permissive
|
Himmelt/ChinaChess
|
96bd9bb469a07b9af10bd9fa7747a39977faa7a9
|
45037e9b2b026a1f354b7d5970318c04de008fcc
|
refs/heads/master
| 2021-01-20T17:32:59.011951
| 2016-07-30T10:53:23
| 2016-07-30T10:53:23
| 64,114,522
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
/*******************************************************************************
* Created by Himmelt on 2016/7/25.
* Copyright (c) 2015-2016. Himmelt All rights reserved.
* https://opensource.org/licenses/MIT
******************************************************************************/
package org.soraworld.chinachess.event;
public class ModEvent {
}
|
[
"master@void-3.cn"
] |
master@void-3.cn
|
f6e60ecaa99778469b1bdc0c648e498c422503e8
|
354ed8b713c775382b1e2c4d91706eeb1671398b
|
/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java
|
f4af1821b28d81d5ac67524305a490f7885d8e57
|
[] |
no_license
|
JessenPan/spring-framework
|
8c7cc66252c2c0e8517774d81a083664e1ad4369
|
c0c588454a71f8245ec1d6c12f209f95d3d807ea
|
refs/heads/master
| 2021-06-30T00:54:08.230154
| 2019-10-08T10:20:25
| 2019-10-08T10:20:25
| 91,221,166
| 2
| 0
| null | 2017-05-14T05:01:43
| 2017-05-14T05:01:42
| null |
UTF-8
|
Java
| false
| false
| 6,523
|
java
|
/*
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.support;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.UrlPathHelper;
import javax.servlet.http.HttpServletRequest;
/**
* A UriComponentsBuilder that extracts information from an HttpServletRequest.
*
* @author Rossen Stoyanchev
* @since 3.1
*/
public class ServletUriComponentsBuilder extends UriComponentsBuilder {
/**
* Default constructor. Protected to prevent direct instantiation.
*
* @see #fromContextPath(HttpServletRequest)
* @see #fromServletMapping(HttpServletRequest)
* @see #fromRequest(HttpServletRequest)
* @see #fromCurrentContextPath()
* @see #fromCurrentServletMapping()
* @see #fromCurrentRequest()
*/
protected ServletUriComponentsBuilder() {
}
// Factory methods based on a HttpServletRequest
/**
* Prepare a builder from the host, port, scheme, and context path of
* an HttpServletRequest.
*/
public static ServletUriComponentsBuilder fromContextPath(HttpServletRequest request) {
ServletUriComponentsBuilder builder = fromRequest(request);
builder.replacePath(request.getContextPath());
builder.replaceQuery(null);
return builder;
}
/**
* Prepare a builder from the host, port, scheme, context path, and
* servlet mapping of the given HttpServletRequest.
* <p>If the servlet is mapped by name, e.g. {@code "/main/*"}, the path
* will end with "/main". If the servlet is mapped otherwise, e.g.
* {@code "/"} or {@code "*.do"}, the result will be the same as
* if calling {@link #fromContextPath(HttpServletRequest)}.
*/
public static ServletUriComponentsBuilder fromServletMapping(HttpServletRequest request) {
ServletUriComponentsBuilder builder = fromContextPath(request);
if (StringUtils.hasText(new UrlPathHelper().getPathWithinServletMapping(request))) {
builder.path(request.getServletPath());
}
return builder;
}
/**
* Prepare a builder from the host, port, scheme, and path of
* an HttpSevletRequest.
*/
public static ServletUriComponentsBuilder fromRequestUri(HttpServletRequest request) {
ServletUriComponentsBuilder builder = fromRequest(request);
builder.replacePath(request.getRequestURI());
builder.replaceQuery(null);
return builder;
}
/**
* Prepare a builder by copying the scheme, host, port, path, and
* query string of an HttpServletRequest.
*/
public static ServletUriComponentsBuilder fromRequest(HttpServletRequest request) {
String scheme = request.getScheme();
int port = request.getServerPort();
String host = request.getServerName();
String header = request.getHeader("X-Forwarded-Host");
if (StringUtils.hasText(header)) {
String[] hosts = StringUtils.commaDelimitedListToStringArray(header);
String hostToUse = hosts[0];
if (hostToUse.contains(":")) {
String[] hostAndPort = StringUtils.split(hostToUse, ":");
host = hostAndPort[0];
port = Integer.parseInt(hostAndPort[1]);
} else {
host = hostToUse;
}
}
ServletUriComponentsBuilder builder = new ServletUriComponentsBuilder();
builder.scheme(scheme);
builder.host(host);
if (("http".equals(scheme) && port != 80) || ("https".equals(scheme) && port != 443)) {
builder.port(port);
}
builder.path(request.getRequestURI());
builder.query(request.getQueryString());
return builder;
}
// Alternative methods relying on RequestContextHolder to find the request
/**
* Same as {@link #fromContextPath(HttpServletRequest)} except the
* request is obtained through {@link RequestContextHolder}.
*/
public static ServletUriComponentsBuilder fromCurrentContextPath() {
return fromContextPath(getCurrentRequest());
}
/**
* Same as {@link #fromServletMapping(HttpServletRequest)} except the
* request is obtained through {@link RequestContextHolder}.
*/
public static ServletUriComponentsBuilder fromCurrentServletMapping() {
return fromServletMapping(getCurrentRequest());
}
/**
* Same as {@link #fromRequestUri(HttpServletRequest)} except the
* request is obtained through {@link RequestContextHolder}.
*/
public static ServletUriComponentsBuilder fromCurrentRequestUri() {
return fromRequestUri(getCurrentRequest());
}
/**
* Same as {@link #fromRequest(HttpServletRequest)} except the
* request is obtained through {@link RequestContextHolder}.
*/
public static ServletUriComponentsBuilder fromCurrentRequest() {
return fromRequest(getCurrentRequest());
}
/**
* Obtain current request through {@link RequestContextHolder}.
*/
protected static HttpServletRequest getCurrentRequest() {
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
Assert.state(requestAttributes != null, "Could not find current request via RequestContextHolder");
Assert.isInstanceOf(ServletRequestAttributes.class, requestAttributes);
HttpServletRequest servletRequest = ((ServletRequestAttributes) requestAttributes).getRequest();
Assert.state(servletRequest != null, "Could not find current HttpServletRequest");
return servletRequest;
}
}
|
[
"jessenpan@qq.com"
] |
jessenpan@qq.com
|
886a0b2c2800e2bbd4ffa40db83aaffa1d6e1927
|
7f42cd8c28c8542fd3c6a8c824f7a950c4641255
|
/src/main/java/games/bevs/survivalgames/commons/utils/EffectUtils.java
|
4a3c54b6380850ace96a079305fcec543d584c4a
|
[] |
no_license
|
HeathLoganCampbell/SurvivalGames
|
18ba29245ff90b41b38948bcd160574a95f4f905
|
78b241c485a094128b621829ddf33ae5e1687863
|
refs/heads/master
| 2022-06-04T04:35:34.259290
| 2020-05-11T12:50:23
| 2020-05-11T12:50:23
| 209,241,896
| 4
| 0
| null | 2021-06-04T02:38:10
| 2019-09-18T07:08:42
|
Java
|
UTF-8
|
Java
| false
| false
| 331
|
java
|
package games.bevs.survivalgames.commons.utils;
import org.bukkit.entity.Player;
public class EffectUtils
{
/**
* Clears all active potion effects
* @param player
*/
public static void clearEffects(Player player)
{
player.getActivePotionEffects().forEach(effect -> player.removePotionEffect(effect.getType()));;
}
}
|
[
"github@heathlogancampbell.com"
] |
github@heathlogancampbell.com
|
0c08cfb7e0058eb801eacf2a26bc1cdd248ef22d
|
ebf0620542f2f9d659fd2827a40f76ce935b5db1
|
/src/model/OperatiiAdresa.java
|
94cd60f801f333c6aff215b298b1f48438753bb5
|
[] |
no_license
|
florin-b/LSFTST_
|
3d929dbe0ea1ad85efd741bedf9d2d714b9d7cee
|
5b070c65be5f8c67941a131bb0ad3186d1296832
|
refs/heads/master
| 2021-08-10T17:33:09.976715
| 2021-06-25T05:50:34
| 2021-06-25T05:50:34
| 168,500,262
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,113
|
java
|
package model;
import java.util.HashMap;
import java.util.List;
import listeners.OperatiiAdresaListener;
import beans.BeanAdreseJudet;
import beans.BeanDateLivrareClient;
import enums.EnumLocalitate;
public interface OperatiiAdresa {
public void getLocalitatiJudet(HashMap<String, String> params, EnumLocalitate tipLocalitate);
public void getAdreseJudet(HashMap<String, String> params, EnumLocalitate tipLocalitate);
public BeanAdreseJudet deserializeListAdrese(Object values);
public List<String> deserializeListLocalitati(Object values);
public void setOperatiiAdresaListener(OperatiiAdresaListener listener);
public void isAdresaValida(HashMap<String, String> params, EnumLocalitate tipLocalitate);
public void getDateLivrare(HashMap<String, String> params);
public void getAdreseLivrareClient(HashMap<String, String> params);
public void getLocalitatiLivrareRapida();
public void getDateLivrareClient(HashMap<String, String> params);
public BeanDateLivrareClient deserializeDateLivrareClient(String result);
public void getFilialaLivrareMathaus(HashMap<String, String> params);
}
|
[
"gflorinb@yahoo.com"
] |
gflorinb@yahoo.com
|
1e51bc29662003c385762f6a37c4f964c800bdee
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-eflo/src/main/java/com/aliyuncs/eflo/model/v20220530/ListErRouteEntriesRequest.java
|
57f271d9ea45d44264f8466d0b751a2f66841f00
|
[
"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,144
|
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.eflo.model.v20220530;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
/**
* @author auto create
* @version
*/
public class ListErRouteEntriesRequest extends RpcAcsRequest<ListErRouteEntriesResponse> {
private Boolean ignoreDetailedRouteEntry;
private Integer pageNumber;
private String routeType;
private Integer pageSize;
private String nextHopId;
private String nextHopType;
private String destinationCidrBlock;
private String erId;
private String instanceId;
private Boolean enablePage;
private String status;
public ListErRouteEntriesRequest() {
super("eflo", "2022-05-30", "ListErRouteEntries", "eflo");
setMethod(MethodType.POST);
}
public Boolean getIgnoreDetailedRouteEntry() {
return this.ignoreDetailedRouteEntry;
}
public void setIgnoreDetailedRouteEntry(Boolean ignoreDetailedRouteEntry) {
this.ignoreDetailedRouteEntry = ignoreDetailedRouteEntry;
if(ignoreDetailedRouteEntry != null){
putBodyParameter("IgnoreDetailedRouteEntry", ignoreDetailedRouteEntry.toString());
}
}
public Integer getPageNumber() {
return this.pageNumber;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
if(pageNumber != null){
putBodyParameter("PageNumber", pageNumber.toString());
}
}
public String getRouteType() {
return this.routeType;
}
public void setRouteType(String routeType) {
this.routeType = routeType;
if(routeType != null){
putBodyParameter("RouteType", routeType);
}
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
if(pageSize != null){
putBodyParameter("PageSize", pageSize.toString());
}
}
public String getNextHopId() {
return this.nextHopId;
}
public void setNextHopId(String nextHopId) {
this.nextHopId = nextHopId;
if(nextHopId != null){
putBodyParameter("NextHopId", nextHopId);
}
}
public String getNextHopType() {
return this.nextHopType;
}
public void setNextHopType(String nextHopType) {
this.nextHopType = nextHopType;
if(nextHopType != null){
putBodyParameter("NextHopType", nextHopType);
}
}
public String getDestinationCidrBlock() {
return this.destinationCidrBlock;
}
public void setDestinationCidrBlock(String destinationCidrBlock) {
this.destinationCidrBlock = destinationCidrBlock;
if(destinationCidrBlock != null){
putBodyParameter("DestinationCidrBlock", destinationCidrBlock);
}
}
public String getErId() {
return this.erId;
}
public void setErId(String erId) {
this.erId = erId;
if(erId != null){
putBodyParameter("ErId", erId);
}
}
public String getInstanceId() {
return this.instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
if(instanceId != null){
putBodyParameter("InstanceId", instanceId);
}
}
public Boolean getEnablePage() {
return this.enablePage;
}
public void setEnablePage(Boolean enablePage) {
this.enablePage = enablePage;
if(enablePage != null){
putBodyParameter("EnablePage", enablePage.toString());
}
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
if(status != null){
putBodyParameter("Status", status);
}
}
@Override
public Class<ListErRouteEntriesResponse> getResponseClass() {
return ListErRouteEntriesResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
80b54fd9695735c47f7785300b3e864a746f4440
|
5709173057b2364f6e23cf2cb377695e682ff57b
|
/src/test/java/com/maxdemarzi/search/GetLatestTest.java
|
79a5fe57e7e6fd8d77708e0cd8e4be369e5a3131
|
[
"MIT"
] |
permissive
|
BoredProg/grittier_ext
|
bd144c59ba9e20225bf7301d06f90d905777ce01
|
4d16db75dfa09fe933cd92ef615a4241a694d983
|
refs/heads/master
| 2020-04-15T16:14:46.169440
| 2017-05-03T17:57:41
| 2017-05-03T17:57:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,991
|
java
|
package com.maxdemarzi.search;
import com.maxdemarzi.Schema;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.neo4j.harness.junit.Neo4jRule;
import org.neo4j.test.server.HTTP;
import java.util.ArrayList;
import java.util.HashMap;
import static java.lang.Thread.sleep;
public class GetLatestTest {
@Rule
public Neo4jRule neo4j = new Neo4jRule()
.withFixture(FIXTURE)
.withExtension("/v1", Search.class)
.withExtension("/v1", Schema.class);
@Test
public void shouldGetLatest() throws InterruptedException {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
sleep(1000);
HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search/latest").toString());
ArrayList<HashMap> actual = response.content();
Assert.assertEquals(expected, actual);
}
@Test
public void shouldGetLatestWithUser() throws InterruptedException {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
sleep(1000);
HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search/latest?username=jexp").toString());
ArrayList<HashMap> actual = response.content();
Assert.assertEquals(expected2, actual);
}
@Test
public void shouldGetLatestLimited() throws InterruptedException {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
sleep(1000);
HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search/latest?limit=1").toString());
ArrayList<HashMap> actual = response.content();
Assert.assertTrue(actual.size() == 1);
Assert.assertEquals(expected.get(0), actual.get(0));
}
@Test
public void shouldGetLatestSince() throws InterruptedException {
HTTP.POST(neo4j.httpURI().resolve("/v1/schema/create").toString());
sleep(1000);
HTTP.Response response = HTTP.GET(neo4j.httpURI().resolve("/v1/search/latest?since=1490140300").toString());
ArrayList<HashMap> actual = response.content();
Assert.assertTrue(actual.size() == 1);
Assert.assertEquals(expected.get(1), actual.get(0));
}
private static final String FIXTURE =
"CREATE (max:User {username:'maxdemarzi', " +
"email: 'max@neo4j.com', " +
"hash: 'hash', " +
"name: 'Max De Marzi'," +
"time: 1490054400," +
"password: 'swordfish'})" +
"CREATE (jexp:User {username:'jexp', " +
"email: 'michael@neo4j.com', " +
"name: 'Michael Hunger'," +
"hash: '0bd90aeb51d5982062f4f303a62df935'," +
"time: 1490054400," +
"password: 'tunafish'})" +
"CREATE (post1:Post {status:'Hello World!', " +
"time: 1490140299})" +
"CREATE (post2:Post {status:'Hello @jexp', " +
"time: 1490208700})" +
"CREATE (max)-[:POSTED_ON_2017_03_21 {time: 1490140299}]->(post1)" +
"CREATE (jexp)-[:LIKES {time: 1490141300}]->(post1)" +
"CREATE (max)-[:POSTED_ON_2017_03_22 {time: 1490208700}]->(post2)";
private static final ArrayList<HashMap<String, Object>> expected = new ArrayList<HashMap<String, Object>>() {{
add(new HashMap<String, Object>() {{
put("status", "Hello @jexp");
put("time", 1490208700);
put("name", "Max De Marzi");
put("username", "maxdemarzi");
put("hash", "hash");
put("reposts", 0);
put("likes", 0);
}});
add(new HashMap<String, Object>() {{
put("status", "Hello World!");
put("time", 1490140299);
put("name", "Max De Marzi");
put("username", "maxdemarzi");
put("hash", "hash");
put("reposts", 0);
put("likes", 1);
}});
}};
private static final ArrayList<HashMap<String, Object>> expected2 = new ArrayList<HashMap<String, Object>>() {{
add(new HashMap<String, Object>() {{
put("status", "Hello @jexp");
put("time", 1490208700);
put("name", "Max De Marzi");
put("username", "maxdemarzi");
put("hash", "hash");
put("reposts", 0);
put("likes", 0);
put("liked", false);
put("reposted", false);
}});
add(new HashMap<String, Object>() {{
put("status", "Hello World!");
put("time", 1490140299);
put("name", "Max De Marzi");
put("username", "maxdemarzi");
put("hash", "hash");
put("reposts", 0);
put("likes", 1);
put("liked", true);
put("reposted", false);
}});
}};
}
|
[
"maxdemarzi@hotmail.com"
] |
maxdemarzi@hotmail.com
|
a71d6ba86e64f8e06037ee523d0dac7ae31bf86c
|
7d80b8cbdbbb704591373f6ef130bc1dbfddb722
|
/src/main/java/com/wwh/iot/easylinker/controller/H5ConsoleController.java
|
2f98846ee9c13ae69aba418c8e9fa7881f90b012
|
[] |
no_license
|
jjzhang166/EasyLinker
|
bb8de7216bb27bd8a64607534be0d361d1f38df5
|
d8c3da0dc877e2fbd46fe4f2eb5c7c487a00ec44
|
refs/heads/master
| 2021-07-22T14:41:07.233713
| 2017-10-18T12:40:54
| 2017-10-18T12:40:54
| 109,204,167
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
package com.wwh.iot.easylinker.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* Created by wwhai on 2017/10/6.
*/
@Controller
@RequestMapping("/h5console")
public class H5ConsoleController {
@RequestMapping("/index/{deviceId}")
public String index(@PathVariable String deviceId){
return "h5console/index";
}
}
|
[
"751957846@qq.com"
] |
751957846@qq.com
|
20391d6647dc9f3f407990a771db583cd2176f85
|
1240bbd9cd653274ee8de51277c7b13a3df0ee0f
|
/src/main/java/com/jhlabs/image/ErodeFilter.java
|
4569a92ffc3e9264b1961acaa4db08b6c9633607
|
[] |
no_license
|
miguelvelezmj25/density-converter
|
827497991d39493368629541d7bd3cca8e6ce206
|
5166a1faffc798be6659b266b9f7d01ea2562642
|
refs/heads/master
| 2023-08-28T11:50:42.250366
| 2021-02-02T18:53:16
| 2021-02-02T18:53:16
| 301,763,223
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,745
|
java
|
/*
Copyright 2006 Jerry Huxtable
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.jhlabs.image;
import java.awt.*;
/**
* Given a binary image, this filter performs binary erosion, setting all removed pixels to the
* given 'new' color.
*/
public class ErodeFilter extends BinaryFilter {
private int threshold = 2;
public ErodeFilter() {
newColor = 0xffffffff;
}
/**
* Set the threshold - the number of neighbouring pixels for dilation to occur.
*
* @param threshold the new threshold
* @see #getThreshold
*/
public void setThreshold(int threshold) {
this.threshold = threshold;
}
/**
* Return the threshold - the number of neighbouring pixels for dilation to occur.
*
* @return the current threshold
* @see #setThreshold
*/
public int getThreshold() {
return threshold;
}
protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace) {
int[] outPixels = new int[width * height];
for (int i = 0; i < iterations; i++) {
int index = 0;
if (i > 0) {
int[] t = inPixels;
inPixels = outPixels;
outPixels = t;
}
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int pixel = inPixels[y * width + x];
if (blackFunction.isBlack(pixel)) {
int neighbours = 0;
for (int dy = -1; dy <= 1; dy++) {
int iy = y + dy;
int ioffset;
if (0 <= iy && iy < height) {
ioffset = iy * width;
for (int dx = -1; dx <= 1; dx++) {
int ix = x + dx;
if (!(dy == 0 && dx == 0) && 0 <= ix && ix < width) {
int rgb = inPixels[ioffset + ix];
if (!blackFunction.isBlack(rgb)) neighbours++;
}
}
}
}
if (neighbours >= threshold) {
if (colormap != null) pixel = colormap.getColor((float) i / iterations);
else pixel = newColor;
}
}
outPixels[index++] = pixel;
}
}
}
return outPixels;
}
public String toString() {
return "Binary/Erode...";
}
}
|
[
"miguelvelez@mijecu25.com"
] |
miguelvelez@mijecu25.com
|
90217d0212fac449f6fd1f0967ba48f53746e571
|
5cfd0c4011998936902f7e70e8a45982524c3d47
|
/XCL-Charts/src/org/xclcharts/renderer/plot/PlotArea.java
|
0a9d74b556b8ab8ca45806f95c2797d3e9745756
|
[
"Apache-2.0"
] |
permissive
|
jiangzhonghui/XCL-Charts
|
78edb3ec9190ae0534af0aeee631e91c5a9fb252
|
61c7fb466e8eb8cef59256993ace0c1b28fd94e7
|
refs/heads/master
| 2020-12-30T17:32:01.695171
| 2014-07-13T12:15:07
| 2014-07-13T12:15:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,244
|
java
|
/**
* Copyright 2014 XCL-Charts
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @Project XCL-Charts
* @Description Android图表基类库
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
* @license http://www.apache.org/licenses/ Apache v2 License
* @version 1.0
*/
package org.xclcharts.renderer.plot;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
/**
* @ClassName PlotArea
* @Description 主图表区类,用于定制其属性
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
*
*/
public class PlotArea {
//主图表区范围
protected float mLeft = 0.0f;
protected float mTop = 0.0f;
protected float mRight = 0.0f;
protected float mBottom = 0.0f;
private float mWidth = 0.0f;
private float mHeight = 0.0f;
//主图表区背景色,即画X轴与Y轴围成的区域
private Paint mBackgroundPaint = null;
//是否画背景色
private boolean mBackgroundColorVisible = false;
public PlotArea()
{
init();
}
private void init()
{
mBackgroundPaint = new Paint();
mBackgroundPaint.setStyle(Style.FILL);
mBackgroundPaint.setColor(Color.WHITE);
}
/**
* 开放主图表区背景画笔,即画X轴与Y轴围成的区域的背景画笔。
* @return 画笔
*/
public Paint getBackgroundPaint()
{
return mBackgroundPaint;
}
/**
* 设置是否显示背景色
* @param visible 是否显示背景色
*/
public void setBackgroundColorVisible(boolean visible)
{
mBackgroundColorVisible = visible;
}
/**
* 返回是否显示背景色
* @return 是否显示背景色
*/
public boolean getBackgroundColorVisible()
{
return mBackgroundColorVisible;
}
/**
* 设置是否显示背景色及其背景色的值
* @param visible 是否显示背景色
* @param color 背景色
*/
public void setBackgroundColor(boolean visible,int color)
{
mBackgroundColorVisible = visible;
getBackgroundPaint().setColor(color);
}
/**
* 绘图区左边位置X坐标
* @return X坐标
*/
public float getLeft() {
return mLeft;
}
/**
* 绘图区上方Y坐标
* @return Y坐标
*/
public float getTop() {
return mTop;
}
/**
* 绘图区下方Y坐标
* @return Y坐标
*/
public float getBottom() {
return mBottom;
}
/**
* 绘图区右边位置X坐标
* @return X坐标
*/
public float getRight() {
return mRight;
}
/**
* 绘图区宽度
* @return 宽度
*/
public float getWidth() {
mWidth = (float)Math.abs(mRight - mLeft);
return mWidth;
}
/**
* 绘图区高度
* @return 高度
*/
public float getHeight() {
mHeight = Math.abs(getBottom() - getTop());
return mHeight;
}
}
|
[
"xcl_168@aliyun.com"
] |
xcl_168@aliyun.com
|
5febdf67203fecc5319ae2e910ebcfb92635b7b2
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a013/A013759Test.java
|
1f677bfe36c800bd53754f0798d1a054a3ca9b3d
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a013;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A013759Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
b80355879a69e19c37dd407e84604476a898c0a4
|
146a30bee123722b5b32c0022c280bbe7d9b6850
|
/depsWorkSpace/bc-java-master/core/src/main/java/org/mightyfish/asn1/ua/DSTU4145BinaryField.java
|
fbc9021a4ea2c55c33f4013af5d68b755ef8bfed
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
GLC-Project/java-experiment
|
1d5aa7b9974c8ae572970ce6a8280e6a65417837
|
b03b224b8d5028dd578ca0e7df85d7d09a26688e
|
refs/heads/master
| 2020-12-23T23:47:57.341646
| 2016-02-13T16:20:45
| 2016-02-13T16:20:45
| 237,313,620
| 0
| 1
| null | 2020-01-30T21:56:54
| 2020-01-30T21:56:53
| null |
UTF-8
|
Java
| false
| false
| 2,789
|
java
|
package org.mightyfish.asn1.ua;
import org.mightyfish.asn1.ASN1EncodableVector;
import org.mightyfish.asn1.ASN1Integer;
import org.mightyfish.asn1.ASN1Object;
import org.mightyfish.asn1.ASN1Primitive;
import org.mightyfish.asn1.ASN1Sequence;
import org.mightyfish.asn1.DERSequence;
public class DSTU4145BinaryField
extends ASN1Object
{
private int m, k, j, l;
private DSTU4145BinaryField(ASN1Sequence seq)
{
m = ASN1Integer.getInstance(seq.getObjectAt(0)).getPositiveValue().intValue();
if (seq.getObjectAt(1) instanceof ASN1Integer)
{
k = ((ASN1Integer)seq.getObjectAt(1)).getPositiveValue().intValue();
}
else if (seq.getObjectAt(1) instanceof ASN1Sequence)
{
ASN1Sequence coefs = ASN1Sequence.getInstance(seq.getObjectAt(1));
k = ASN1Integer.getInstance(coefs.getObjectAt(0)).getPositiveValue().intValue();
j = ASN1Integer.getInstance(coefs.getObjectAt(1)).getPositiveValue().intValue();
l = ASN1Integer.getInstance(coefs.getObjectAt(2)).getPositiveValue().intValue();
}
else
{
throw new IllegalArgumentException("object parse error");
}
}
public static DSTU4145BinaryField getInstance(Object obj)
{
if (obj instanceof DSTU4145BinaryField)
{
return (DSTU4145BinaryField)obj;
}
if (obj != null)
{
return new DSTU4145BinaryField(ASN1Sequence.getInstance(obj));
}
return null;
}
public DSTU4145BinaryField(int m, int k1, int k2, int k3)
{
this.m = m;
this.k = k1;
this.j = k2;
this.l = k3;
}
public int getM()
{
return m;
}
public int getK1()
{
return k;
}
public int getK2()
{
return j;
}
public int getK3()
{
return l;
}
public DSTU4145BinaryField(int m, int k)
{
this(m, k, 0, 0);
}
/**
* BinaryField ::= SEQUENCE {
* M INTEGER,
* CHOICE {Trinomial, Pentanomial}
* Trinomial::= INTEGER
* Pentanomial::= SEQUENCE {
* k INTEGER,
* j INTEGER,
* l INTEGER}
*/
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(m));
if (j == 0) //Trinomial
{
v.add(new ASN1Integer(k));
}
else
{
ASN1EncodableVector coefs = new ASN1EncodableVector();
coefs.add(new ASN1Integer(k));
coefs.add(new ASN1Integer(j));
coefs.add(new ASN1Integer(l));
v.add(new DERSequence(coefs));
}
return new DERSequence(v);
}
}
|
[
"a.eslampanah@live.com"
] |
a.eslampanah@live.com
|
1c123901dc9ae2ffa9302f06472f6b65f1a35d0c
|
fd5d1eeadc45b942eb5e64ccef467f07e3ebf110
|
/core/src/test/java/com/taradevko/aem/AppContextSetup.java
|
da393e19272f235a9f105fa099cf774f09889ab7
|
[
"Apache-2.0"
] |
permissive
|
otarsko/aem-context-callback-example
|
d6ec29c64e33362f6779299efbec65d82c72c490
|
ecf6973a14f895df35a3d456d05c09274a925b9d
|
refs/heads/master
| 2021-04-29T17:55:30.664278
| 2018-02-15T21:12:21
| 2018-02-15T21:12:21
| 121,682,438
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,543
|
java
|
/*
Copyright 2018 Oleksandr Tarasenko
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.taradevko.aem;
import io.wcm.testing.mock.aem.junit.AemContext;
import io.wcm.testing.mock.aem.junit.AemContextCallback;
import org.apache.sling.api.resource.Resource;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
public class AppContextSetup implements AemContextCallback, TestRule {
private Class testClass;
@Override
public void execute(final AemContext aemContext) throws Exception {
aemContext.addModelsForPackage("com.taradevko.aem");
final Resource content = aemContext.load().json(
String.format("/%s/%s.json", testClass.getPackage().getName(), testClass.getSimpleName()), "/content");
aemContext.currentResource(content);
}
@Override
public Statement apply(final Statement base, final Description description) {
testClass = description.getTestClass();
return base;
}
}
|
[
"aa"
] |
aa
|
e853c7bb15ead621ece506f70b46b65b92174c67
|
40d6f0084a73a1525c5e8d7e3939587857f9a3ef
|
/basicKnowledge/src/com/xdc/basic/api/socket/udp/FortuneServer.java
|
44d180d1a6964551069139878216f85388850b9b
|
[] |
no_license
|
sherlock111/java-code
|
51b894ce8414141c082c08aadbc6c60294e45328
|
4c4156eb1ab81f0af830667d6a78ee121c97d166
|
refs/heads/master
| 2021-01-20T03:39:33.624628
| 2017-03-30T14:25:10
| 2017-03-30T14:25:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,933
|
java
|
package com.xdc.basic.api.socket.udp;
import java.io.File;
import java.io.FileInputStream;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import org.apache.commons.io.IOUtils;
import com.xdc.basic.skills.GetPath;
class FortuneServer
{
public static void main(String args[])
{
String curPath = GetPath.getRelativePath();
DatagramSocket ServerSocket = null;
FileInputStream inStream = null;
try
{
// 创建绑定到1114端口的ServerSocket对象
ServerSocket = new DatagramSocket(1114);
while (true)
{
// 创建缓冲区
byte[] data = new byte[256];
// 创建接收数据包
DatagramPacket rPacket = new DatagramPacket(data, data.length);
System.out.println("等待客户端连接...");
// 等待接收数据包
ServerSocket.receive(rPacket);
System.out.println("已有客户端发来请求: " + rPacket.getAddress().getHostAddress() + ":" + rPacket.getPort());
// 读取待发送的内容
inStream = new FileInputStream(new File(curPath + "Fortunes.txt"));
if (inStream.read(data) <= 0)
{
System.err.println("Error: couldn't read fortunes");
}
// 创建发送数据包
DatagramPacket sPacket = new DatagramPacket(data, data.length, rPacket.getAddress(), rPacket.getPort());
// 发送报文
ServerSocket.send(sPacket);
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
IOUtils.closeQuietly(ServerSocket);
IOUtils.closeQuietly(inStream);
}
}
}
|
[
"xdc0209@qq.com"
] |
xdc0209@qq.com
|
9ba849456cc9a66fae4813ab6b6fce41d64d98d2
|
6d6e93cf5cf0860f73aa3e44d0ef5b8f15c68c69
|
/src/test/java/io/demo/application/web/rest/LogsResourceIntTest.java
|
7f34500b5c8a25afd4589fb0fd2ec460932bfc46
|
[] |
no_license
|
sanjeev1787/jhipster-sample-application
|
4f426d9670dab01aa33b311ceacc4d997346c908
|
4b7d7cf6c0a18436ccbd3c0fece84f8dc561e5dd
|
refs/heads/master
| 2020-04-01T01:04:59.127438
| 2018-10-12T09:17:56
| 2018-10-12T09:17:56
| 152,725,531
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,380
|
java
|
package io.demo.application.web.rest;
import io.demo.application.DemojhipsterApp;
import io.demo.application.web.rest.vm.LoggerVM;
import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.LoggerContext;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Test class for the LogsResource REST controller.
*
* @see LogsResource
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = DemojhipsterApp.class)
public class LogsResourceIntTest {
private MockMvc restLogsMockMvc;
@Before
public void setup() {
LogsResource logsResource = new LogsResource();
this.restLogsMockMvc = MockMvcBuilders
.standaloneSetup(logsResource)
.build();
}
@Test
public void getAllLogs() throws Exception {
restLogsMockMvc.perform(get("/management/logs"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE));
}
@Test
public void changeLogs() throws Exception {
LoggerVM logger = new LoggerVM();
logger.setLevel("INFO");
logger.setName("ROOT");
restLogsMockMvc.perform(put("/management/logs")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(logger)))
.andExpect(status().isNoContent());
}
@Test
public void testLogstashAppender() {
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
assertThat(context.getLogger("ROOT").getAppender("ASYNC_LOGSTASH")).isInstanceOf(AsyncAppender.class);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
449b730d2d7ae23c1d9dfafbc2dba9a4faf22aac
|
9cd474ff195074d2fa31cc6062e86ebd98e83329
|
/com.spark.psi.order/src/com/spark/onlineorder/intf/publish/entity/OnlineOrderListEntityImpl.java
|
a1590b8de477c58d6f5bb1d87e7f606e98cdc2b9
|
[] |
no_license
|
jideas/spark-whxc-psi
|
543c24abe53b3243876f4a90198fd2a18276562a
|
cb3160395c61421685a110628da1d82a761d483f
|
refs/heads/master
| 2021-01-10T09:07:46.430871
| 2013-05-11T13:46:55
| 2013-05-11T13:46:55
| 47,181,021
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 515
|
java
|
package com.spark.onlineorder.intf.publish.entity;
import java.util.List;
import com.spark.psi.publish.onlineorder.entity.OnlineOrderItem;
import com.spark.psi.publish.onlineorder.entity.OnlineOrderListEntity;
public class OnlineOrderListEntityImpl extends OnlineOrderListEntity {
public void setTotalAmount(double totalAmount) {
this.totalAmount = totalAmount;
}
public OnlineOrderListEntityImpl(List<OnlineOrderItem> dataList,int totalCount)
{
super(dataList, totalCount);
}
}
|
[
"weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454"
] |
weiyi1286@e4103974-2435-85cb-9e1d-4ec83b94b454
|
b50d665e68e9673119db75b701a453ff41cab9d2
|
78abf18502c86ceb3b45795e8698d08253b82b46
|
/src/main/java/dev/cobblesword/nanocraft/network/pipeline/encapsulation/Decapsulator.java
|
d9d55f2b5e4d1f0553bcc26fae5b6ce60adea6c4
|
[] |
no_license
|
HeathLoganCampbell/Nanocraft
|
c842f20d6c4541b3232dd0ce6a3a104881622d34
|
0daf354586bff17b13ef0153920ca6600838a078
|
refs/heads/master
| 2023-06-23T08:08:15.412314
| 2020-07-31T11:17:39
| 2020-07-31T11:17:39
| 284,018,099
| 8
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,357
|
java
|
package dev.cobblesword.nanocraft.network.pipeline.encapsulation;
import dev.cobblesword.nanocraft.common.ProtocolUtils;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.CorruptedFrameException;
import java.util.List;
public class Decapsulator extends ByteToMessageDecoder
{
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception
{
if (!in.isReadable()) return;
int origReaderIndex = in.readerIndex();
for (int i = 0; i <= 2; i++)
{
if (!in.isReadable())
{
in.readerIndex(origReaderIndex);
return;
}
byte read = in.readByte();
if (read >= 0) {
in.readerIndex(origReaderIndex);
int length = ProtocolUtils.readVarInt(in);
if (length == 0)
return;
if (in.readableBytes() < length)
{
in.readerIndex(origReaderIndex);
return;
}
out.add(in.readRetainedSlice(length));
return;
}
}
throw new CorruptedFrameException("VarInt too big");
}
}
|
[
"github@heathlogancampbell.com"
] |
github@heathlogancampbell.com
|
2fd64dd952b070bb90d346ec7eb51430902604e0
|
d9161d80a6cd20e970d102cf64dec8bc19c90fa6
|
/src/main/java/me/itzgeoff/vidsync/server/ServerAppConfig.java
|
315c6d3e4ab29a5647d259dfbe7c0ceeef1e8df7
|
[] |
no_license
|
itzg/vidsync
|
60b609d275390d4249bd240b08659746ecdb4eca
|
4d2406d264f47055d9df46fb38916090e730547d
|
refs/heads/master
| 2021-01-23T11:54:56.804248
| 2014-01-19T00:10:09
| 2014-01-19T00:10:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,655
|
java
|
package me.itzgeoff.vidsync.server;
import java.util.concurrent.Executor;
import me.itzgeoff.vidsync.common.ServiceDiscovery.ServiceInstance;
import me.itzgeoff.vidsync.common.VidSyncConstants;
import me.itzgeoff.vidsync.services.VidSyncClientService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.core.task.TaskExecutor;
import org.springframework.remoting.rmi.RmiProxyFactoryBean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Configuration
@EnableAsync
public class ServerAppConfig {
private static final Logger logger = LoggerFactory.getLogger(ServerAppConfig.class);
@Autowired
private Environment env;
@Bean
public static PropertyPlaceholderConfigurer propertyPlaceholder() {
PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
Resource[] resources = new Resource[] {
new ClassPathResource("defaults.properties"),
new FileSystemResource("config/vidsync.properties")
};
configurer.setIgnoreResourceNotFound(true);
configurer.setLocations(resources);
return configurer;
}
public RmiProxyFactoryBean dynamicRmiProxyFactory(String hostAddress, int port) {
// NOTE: This is a "fake" bean creator in order to allow the passing of prototype specific arguments.
// If was an actual @Bean @Scope("prototype") then Spring will attempt to autowire the arguments
// from the Spring context.
RmiProxyFactoryBean factoryBean = new RmiProxyFactoryBean();
factoryBean.setServiceInterface(VidSyncClientService.class);
// This dynamically/discovered URL is what drove the need for this fake bean creator.
factoryBean.setServiceUrl(String.format("rmi://%s:%d/%s",
hostAddress, port, VidSyncConstants.RMI_SERVICE_CLIENT));
// This is another part of the fake-ness...make the code think it was blessed as a Spring bean and
// trigger the RMI proxy construction.
factoryBean.afterPropertiesSet();
return factoryBean;
}
@Bean
public ServerViewOfClientManager serverViewOfClientManager() {
return new ServerViewOfClientManager() {
@Override
public ServerViewOfClientInstance createViewOfClient(
ServiceInstance info) {
ServerViewOfClientInstance instance = serverViewOfClientInstance();
instance.setServiceInfo(info);
return instance;
}
@Override
public VidSyncClientService createClientServiceProxy(ServiceInstance info) {
RmiProxyFactoryBean factory = dynamicRmiProxyFactory(info.getRemoteAddress().getHostAddress(), info.getPort());
return (VidSyncClientService) factory.getObject();
}
};
}
@Bean
@Scope("prototype")
public ServerViewOfClientInstance serverViewOfClientInstance() {
return new ServerViewOfClientInstance();
}
@Bean
@Qualifier("signature")
public TaskExecutor signatureExecutor(@Value("${executors.signature.maxPoolSize:2}") int maxPoolSize) {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
logger.debug("Creating signature executor with pool size of {}", maxPoolSize);
executor.setCorePoolSize(maxPoolSize);
executor.setMaxPoolSize(maxPoolSize);
executor.setThreadNamePrefix("SignatureScan-");
return executor;
}
@Bean
@Qualifier("sender")
public TaskExecutor senderExecutor(@Value("${executors.sender.maxPoolSize:1}") int maxPoolSize) {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(maxPoolSize);
executor.setMaxPoolSize(maxPoolSize);
executor.setThreadNamePrefix("Sender-");
return executor;
}
@Bean
@Qualifier("worker")
public Executor workerExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(getCoreCount());
executor.setMaxPoolSize(getCoreCount());
executor.setThreadNamePrefix("Worker-");
return executor;
}
private int getCoreCount() {
return Runtime.getRuntime().availableProcessors();
}}
|
[
"itzgeoff@gmail.com"
] |
itzgeoff@gmail.com
|
bc092e9039a63db0c3c46ec3d268f8bd13ba1249
|
94794838498dc5e8262e0d812be6436981e7c748
|
/src/core/Configuration.java
|
072ace6fba315c37a462a139b91e0d2c521d8145
|
[] |
no_license
|
wh01683/Project-Aeolus
|
f69ae34a9d28885439fc7edceaaca02fd71fb2b6
|
ded26041a225130b6f21092bcd8914a537e63f8b
|
refs/heads/master
| 2021-01-17T06:49:41.793869
| 2015-11-30T00:47:19
| 2015-11-30T00:47:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,588
|
java
|
package core;
/**
* Class that contains all the main configurations of the server.
*/
public class Configuration {
public static final int SERVER_PORT = 43594;
/**
* Location of the data
*/
public static final String DATA_DIR = "./Data/";
/**
* True enables all the debug messages, which is very helpful in a
* debug case scenario.
*/
public static boolean SERVER_DEBUG = false;
/**
* The name of the server
*/
public static final String SERVER_NAME = "Project Aeolus";
/**
* The welcome message/messages displayed upon login
*/
public static final String WELCOME_MESSAGE = "Welcome to a highly optimized PI by 7Winds.";
/**
* Forums link, if any
*/
public static final String FORUMS = "your forums here";
/**
* Toggles the ability to log player chat messages
*/
public static final boolean logChat = true;
/**
* Toggles the ability for players to swear
*/
public static final boolean enableCensor = true;
/**
* Toggles the use of sound effects
*/
public static boolean enableSound = true;
/**
* Toggles the use of regional music
*/
public static boolean enableMusic = true;
/**
* Toggles the ability for admins to trade
*/
public static final boolean ADMIN_CAN_TRADE = false;
/**
* Toggles the ability for admins to sell items
*/
public static final boolean ADMIN_CAN_SELL_ITEMS = false;
/**
* Toggles the ability for admins to drop items
*/
public static final boolean ADMIN_DROP_ITEMS = false;
/**
* How many squares away from origin a player respawns after dying in the dueling arena
*/
public static final int RANDOM_DUELING_RESPAWN = 5;
/**
* The start of the wilderness that blocks the ability for a player to teleport
*/
public static final int NO_TELEPORT_WILD_LEVEL = 20;
/**
* How long the skull lasts for. (seconds)
*/
public static final int SKULL_TIMER = 1200;
/**
* How long in (milliseconds) a player cannot teleport for
* 20000 represents 20 seconds
*/
public static final int TELEBLOCK_DELAY = 20000;
/**
* Toggles the ability to have single and multi zones
*/
public static final boolean SINGLE_AND_MULTI_ZONES = true;
/**
* The difference between 2 players levels within a wilderness
*/
public static final boolean COMBAT_LEVEL_DIFFERENCE = true;
/**
* Toggles the ability for items to have their level requirements
*/
public static final boolean itemRequirements = true;
/**
* Toggles the ability for prayer points to be used
*/
public static final boolean PRAYER_POINTS_REQUIRED = true;
/**
* Toggles the use of prayer levels
*/
public static final boolean PRAYER_LEVEL_REQUIRED = true;
/**
* Toggles the use of magic levels
*/
public static final boolean MAGIC_LEVEL_REQUIRED = true;
/**
* Toggles the use of runes
*/
public static final boolean RUNES_REQUIRED = true;
/**
* Toggles the use of proper arrows
*/
public static final boolean CORRECT_ARROWS = true;
/**
* Toggles the ability for a crystal bow to degrade
*/
public static final boolean CRYSTAL_BOW_DEGRADES = true;
/**
* An array of items that cannot be sold
*/
public static final int[] ITEM_SELLABLE = {
};
/**
* An array of items that cannot be traded
*/
public static final String[] UNTRADEABLE_ITEMS = { "fire cape"
};
/**
* An array of items that cannot be dropped
*/
public static final int[] UNDROPPABLE_ITEMS = {
};
/**
* An array of fun items
*/
public static final int[] FUN_WEAPONS = {
};
/**
* An array of items that are rare
*/
public static final int[] ITEM_RARE = {4151, 11732, 6737, 11694, 11692, 11690, 11696, 11688, 6585, 4700, 4702, 4704, 4706, 4708, 4710, 4712,
4714, 4716, 4718, 4720, 4722, 4724, 4726, 4728, 4730, 4732, 4736, 4738, 4740, 4742, 4744, 11286, 11724,
11726, 11718, 11720, 11722, 11995, 11994, 15019, 15023, 15020, 15021, 15022, 12009, 12011, 11989, 11990,
11999, 11988, 11987, 11986, 12000, 15030, 13263, 10556, 10557, 10558, 10559};
/**
* An array of undead npcs, used for the magic spell on undead npcs
*/
public static final int[] UNDEAD_NPCS = { 90, 91, 92, 93, 94, 103, 104, 73, 74, 75, 76, 77 };
/**
* The servers main cycle time in (milliseconds)
*/
public static final int CYCLE_TIME = 600;
/**
* Cheap hack for a worlds list fix
*/
public static final boolean WORLD_LIST_FIX = false;
}
|
[
"nshusa99@gmail.com"
] |
nshusa99@gmail.com
|
575843fd25a3f8604bf7b902ae5859df47a99540
|
db3e5334189c7840e0a036064bd755236538d120
|
/srcFor1.7.10/src(FatalInjuryAndNoDrop)20170309/main/java/fatalinjury/core/EventCaller.java
|
e397b3864d1de23f640af37bc8f4d2e1ba7d1981
|
[] |
no_license
|
AsakaHikari/m
|
0011bb617e655443cb3970f0994d5399e9ddc9a5
|
19680d4757fd6848bf716181cd0b18a06d08b22d
|
refs/heads/master
| 2022-01-18T19:35:30.258085
| 2019-07-22T02:17:44
| 2019-07-22T02:17:44
| 198,129,758
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,810
|
java
|
package fatalinjury.core;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.terraingen.OreGenEvent;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
public class EventCaller {
@SubscribeEvent
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent e){
/*
PotionEffect[] effects=new PotionEffect[3];
effects[0]=new PotionEffect(Potion.moveSlowdown.id,24000,2);
effects[1]=new PotionEffect(Potion.weakness.id,24000,2);
effects[2]=new PotionEffect(Potion.digSlowdown.id,24000,2);
List<ItemStack> list=new ArrayList<ItemStack>();
for(int i=0;i<effects.length;i++){
effects[i].setCurativeItems(list)
e.player.addPotionEffect(effects[i]);
}
*/
List<ItemStack> list=new ArrayList<ItemStack>();
PotionEffect effect=new PotionEffect(NoOreCore.potionId,12000,0);
effect.setCurativeItems(list);
e.player.addPotionEffect(effect);
}
@SubscribeEvent
public void cancelDrop(LivingDropsEvent e){
if(!(e.entityLiving instanceof EntityPlayer) && !e.recentlyHit){
e.setCanceled(true);
}
}
}
|
[
"namakeya5@gmail.com"
] |
namakeya5@gmail.com
|
fe3179c026b3eaddc8e4642638d663691393f351
|
0d681cc3e93e75b713937beb409b48ecf423e137
|
/hw08-0036479615/src/main/java/hr/fer/zemris/optjava/dz8/nn/SigmoidFunction.java
|
1bc57532df38e13b64b9185d3a5c42d184f7bd4d
|
[] |
no_license
|
svennjegac/FER-java-optjava
|
fe86ead9bd80b4ef23944ef9234909353673eaab
|
89d9aa124e2e2e32b0f8f1ba09157f03ecd117c6
|
refs/heads/master
| 2020-03-29T04:17:20.952593
| 2018-09-20T08:59:01
| 2018-09-20T08:59:01
| 149,524,350
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 204
|
java
|
package hr.fer.zemris.optjava.dz8.nn;
public class SigmoidFunction implements IActivationFunction {
@Override
public double valueAt(double input) {
return 1d / (1d + Math.pow(Math.E, -input));
}
}
|
[
"sven.njegac@fer.hr"
] |
sven.njegac@fer.hr
|
584979e64762196947d5b087b9c15b41452d8890
|
d49e3ff34467c71630681df5a791cb3e4bd72ab7
|
/src/android/support/v7/app/AlertController$AlertParams$4.java
|
69ac936ba5ba62307c8eedbc1451e61e219263d9
|
[] |
no_license
|
reverseengineeringer/com.gogoair.ife
|
124691cf49e832f5dd8009ceb590894a7a058dfa
|
e88a26eec5640274844e6cdafcd706be727e8ae3
|
refs/heads/master
| 2020-09-15T19:45:27.094286
| 2016-09-01T13:32:34
| 2016-09-01T13:32:34
| 67,133,682
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
package android.support.v7.app;
import android.content.DialogInterface.OnMultiChoiceClickListener;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
class AlertController$AlertParams$4
implements AdapterView.OnItemClickListener
{
AlertController$AlertParams$4(AlertController.AlertParams paramAlertParams, ListView paramListView, AlertController paramAlertController) {}
public void onItemClick(AdapterView paramAdapterView, View paramView, int paramInt, long paramLong)
{
if (this$0.mCheckedItems != null) {
this$0.mCheckedItems[paramInt] = val$listView.isItemChecked(paramInt);
}
this$0.mOnCheckboxClickListener.onClick(AlertController.access$600(val$dialog), paramInt, val$listView.isItemChecked(paramInt));
}
}
/* Location:
* Qualified Name: android.support.v7.app.AlertController.AlertParams.4
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
2125c7e4b2f2100861402f49ac70311e54656594
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/FaceRecognitionApplicationTests.java
|
70f7e2b46e09ab4363029794e4c2c1ee6be7e909
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 543
|
java
|
2
https://raw.githubusercontent.com/ck003/face_recognition/master/src/test/java/me/kyriechen/face_recognition/FaceRecognitionApplicationTests.java
//package me.kyriechen.face_recognition;
//
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class FaceRecognitionApplicationTests {
//
// @Test
// public void contextLoads() {
// }
//
//}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
7f9b18be5a9b429a36361f23f4bc31035790a582
|
f41bdbc59cb6f1f48d6520a93f517fd44f83f153
|
/net/minecraft/client/resources/data/AnimationMetadataSection.java
|
9de1f4d0dbfc788506c9f147a446ef5647eb1a57
|
[
"MIT"
] |
permissive
|
BantorSchwanzVor/plotscanner-leak
|
f9ec02b2538fe51af94cfc807c7beb3ef158f106
|
cbf130076159711d939affb4b0343c46c3466107
|
refs/heads/master
| 2021-05-20T12:02:47.993998
| 2020-04-01T21:23:59
| 2020-04-01T21:23:59
| 252,285,321
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,130
|
java
|
package net.minecraft.client.resources.data;
import com.google.common.collect.Sets;
import java.util.List;
import java.util.Set;
public class AnimationMetadataSection implements IMetadataSection {
private final List<AnimationFrame> animationFrames;
private final int frameWidth;
private final int frameHeight;
private final int frameTime;
private final boolean interpolate;
public AnimationMetadataSection(List<AnimationFrame> animationFramesIn, int frameWidthIn, int frameHeightIn, int frameTimeIn, boolean interpolateIn) {
this.animationFrames = animationFramesIn;
this.frameWidth = frameWidthIn;
this.frameHeight = frameHeightIn;
this.frameTime = frameTimeIn;
this.interpolate = interpolateIn;
}
public int getFrameHeight() {
return this.frameHeight;
}
public int getFrameWidth() {
return this.frameWidth;
}
public int getFrameCount() {
return this.animationFrames.size();
}
public int getFrameTime() {
return this.frameTime;
}
public boolean isInterpolate() {
return this.interpolate;
}
private AnimationFrame getAnimationFrame(int frame) {
return this.animationFrames.get(frame);
}
public int getFrameTimeSingle(int frame) {
AnimationFrame animationframe = getAnimationFrame(frame);
return animationframe.hasNoTime() ? this.frameTime : animationframe.getFrameTime();
}
public boolean frameHasTime(int frame) {
return !((AnimationFrame)this.animationFrames.get(frame)).hasNoTime();
}
public int getFrameIndex(int frame) {
return ((AnimationFrame)this.animationFrames.get(frame)).getFrameIndex();
}
public Set<Integer> getFrameIndexSet() {
Set<Integer> set = Sets.newHashSet();
for (AnimationFrame animationframe : this.animationFrames)
set.add(Integer.valueOf(animationframe.getFrameIndex()));
return set;
}
}
/* Location: C:\Users\BSV\AppData\Local\Temp\Rar$DRa6216.20396\Preview\Preview.jar!\net\minecraft\client\resources\data\AnimationMetadataSection.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"germangamera@gmail.com"
] |
germangamera@gmail.com
|
6b5bafae5d41c00b07294a5edbfe911c743b0c7e
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/no_seeding/56_jhandballmoves-visu.handball.moves.actions.StartAnimationAction-1.0-8/visu/handball/moves/actions/StartAnimationAction_ESTest_scaffolding.java
|
fabc36ebbfe92a0510f2d5a74244b8e562de101e
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,582
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 28 22:00:56 GMT 2019
*/
package visu.handball.moves.actions;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class StartAnimationAction_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "visu.handball.moves.actions.StartAnimationAction";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.home", "/home/pderakhshanfar");
java.lang.System.setProperty("user.dir", "/home/pderakhshanfar/evosuite-model-seeding-ee/evosuite-model-seeding-empirical-evaluation");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StartAnimationAction_ESTest_scaffolding.class.getClassLoader() ,
"visu.handball.moves.model.player.Ball",
"visu.handball.moves.resources.Resources",
"visu.handball.moves.views.BallDrawer",
"visu.handball.moves.model.player.MovePoint",
"visu.handball.moves.Main",
"visu.handball.moves.model.TableHandballModel$1",
"visu.handball.moves.views.Field",
"visu.handball.moves.actions.SetMoveNameAction",
"visu.handball.moves.model.ColorModelListener",
"visu.handball.moves.actions.StartAnimationAction$1",
"visu.handball.moves.model.ColorModel",
"visu.handball.moves.model.MoveEvent",
"visu.handball.moves.views.EventDrawer",
"visu.handball.moves.model.animation.CurveIterator",
"visu.handball.moves.model.player.HighlightableItem",
"visu.handball.moves.views.PlayerToolBar",
"visu.handball.moves.views.CommentView",
"visu.handball.moves.model.PlayerRemovedListener",
"visu.handball.moves.views.DefenderDrawer",
"visu.handball.moves.model.TableHandballModel",
"visu.handball.moves.model.PassEvent",
"visu.handball.moves.model.HandballModelListener",
"visu.handball.moves.model.player.Player",
"visu.handball.moves.model.player.Circle",
"visu.handball.moves.model.animation.Animator",
"visu.handball.moves.views.FieldDrawer",
"visu.handball.moves.actions.CloseAction",
"visu.handball.moves.views.CircleDrawer",
"visu.handball.moves.model.animation.AnimationModel",
"visu.handball.moves.model.player.Offender",
"visu.handball.moves.views.StatusBar",
"visu.handball.moves.views.OffenderDrawer",
"visu.handball.moves.views.EventPointDrawer",
"visu.handball.moves.views.AbstractPlayerDrawer",
"visu.handball.moves.views.ColoredShape",
"visu.handball.moves.model.player.Defender",
"visu.handball.moves.model.HandballModel",
"visu.handball.moves.actions.AbstractSupportSaveAction",
"visu.handball.moves.controller.HandballFileFilter",
"visu.handball.moves.actions.StartAnimationAction",
"visu.handball.moves.actions.SaveAction",
"visu.handball.moves.model.HandballModel$State"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(StartAnimationAction_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"visu.handball.moves.actions.StartAnimationAction",
"visu.handball.moves.resources.Resources",
"visu.handball.moves.model.HandballModel$State",
"visu.handball.moves.actions.StartAnimationAction$1",
"visu.handball.moves.model.HandballModel",
"visu.handball.moves.model.player.Player",
"visu.handball.moves.model.player.Defender",
"visu.handball.moves.model.player.Offender",
"visu.handball.moves.model.player.Circle",
"visu.handball.moves.model.player.Ball",
"visu.handball.moves.Main",
"visu.handball.moves.views.AbstractPlayerDrawer",
"visu.handball.moves.views.OffenderDrawer",
"visu.handball.moves.views.CircleDrawer",
"visu.handball.moves.views.BallDrawer",
"visu.handball.moves.model.MoveEvent",
"visu.handball.moves.model.player.MovePoint",
"visu.handball.moves.model.ColorModel",
"visu.handball.moves.views.DefenderDrawer",
"visu.handball.moves.model.TableHandballModel",
"visu.handball.moves.model.TableHandballModel$1",
"visu.handball.moves.model.animation.AnimationModel",
"visu.handball.moves.model.animation.CurveIterator",
"visu.handball.moves.model.player.HighlightableItem",
"visu.handball.moves.views.Field",
"visu.handball.moves.views.FieldDrawer",
"visu.handball.moves.views.ColoredShape",
"visu.handball.moves.views.EventDrawer",
"visu.handball.moves.views.EventPointDrawer",
"visu.handball.moves.model.animation.Animator"
);
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
8661ec461091c5ab07dfb22cb5c00e05228af17c
|
589dcd422402477ce80e9c349bd483c2d36b80cd
|
/trunk/adhoc-solr/src/main/java/org/apache/solr/analysis/LetterTokenizerFactory.java
|
311d395ff9dda28e35b7a929a6c3fd870abcb80e
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode-mappings",
"BSD-3-Clause",
"CDDL-1.0",
"Python-2.0",
"MIT",
"ICU",
"CPL-1.0"
] |
permissive
|
baojiawei1230/mdrill
|
e3d92f4f1f85b34f0839f8463e7e5353145a9c78
|
edacdb4dc43ead6f14d83554c1f402aa1ffdec6a
|
refs/heads/master
| 2021-06-10T17:42:11.076927
| 2021-03-15T16:43:06
| 2021-03-15T16:43:06
| 95,193,877
| 0
| 0
|
Apache-2.0
| 2021-03-15T16:43:06
| 2017-06-23T07:15:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,615
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.analysis;
import org.apache.lucene.analysis.LetterTokenizer;
import java.io.Reader;
import java.util.Map;
/**
* Factory for {@link LetterTokenizer}.
* <pre class="prettyprint" >
* <fieldType name="text_letter" class="solr.TextField" positionIncrementGap="100">
* <analyzer>
* <tokenizer class="solr.LetterTokenizerFactory"/>
* </analyzer>
* </fieldType></pre>
* @version $Id: LetterTokenizerFactory.java 1073810 2011-02-23 16:27:55Z koji $
*/
public class LetterTokenizerFactory extends BaseTokenizerFactory {
@Override
public void init(Map<String,String> args) {
super.init(args);
assureMatchVersion();
}
public LetterTokenizer create(Reader input) {
return new LetterTokenizer(luceneMatchVersion, input);
}
}
|
[
"myn@163.com"
] |
myn@163.com
|
09a0a1d34e16a405ab9a966680b14cc6f62f1de4
|
a71aa6d6eb4bcb1802cb512bc240c5716b50f08b
|
/Plugin/src/main/java/dev/rosewood/rosestacker/manager/EntityCacheManager.java
|
544ecc30cc0bf38e362ae238953620f5d0fb64ed
|
[
"LicenseRef-scancode-other-permissive"
] |
permissive
|
Rosewood-Development/RoseStacker
|
f1fe7f7b99be52d2fd42210e0f62c99d042bf615
|
ffdabca47b931493c11c1aec3d2fd8e3f30f0ebb
|
refs/heads/master
| 2023-09-01T10:06:36.284655
| 2023-08-18T02:16:13
| 2023-08-18T02:16:13
| 204,793,266
| 117
| 44
|
NOASSERTION
| 2023-07-02T01:14:00
| 2019-08-27T21:26:17
|
Java
|
UTF-8
|
Java
| false
| false
| 5,592
|
java
|
package dev.rosewood.rosestacker.manager;
import dev.rosewood.rosegarden.RosePlugin;
import dev.rosewood.rosegarden.manager.Manager;
import dev.rosewood.rosestacker.stack.StackingThread;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.util.BoundingBox;
public class EntityCacheManager extends Manager {
private final Map<ChunkLocation, Collection<Entity>> entityCache;
private BukkitTask refreshTask;
public EntityCacheManager(RosePlugin rosePlugin) {
super(rosePlugin);
this.entityCache = new ConcurrentHashMap<>();
}
@Override
public void reload() {
this.refreshTask = Bukkit.getScheduler().runTaskTimer(this.rosePlugin, this::refresh, 5L, 60L);
}
@Override
public void disable() {
this.entityCache.clear();
if (this.refreshTask != null) {
this.refreshTask.cancel();
this.refreshTask = null;
}
}
/**
* Gets nearby entities from cache
*
* @param center The center of the area to check
* @param radius The radius to check around
* @param predicate Conditions to be met
* @return A Set of nearby entities
*/
public Collection<Entity> getNearbyEntities(Location center, double radius, Predicate<Entity> predicate) {
List<Entity> nearbyEntities = new ArrayList<>();
World world = center.getWorld();
if (world == null)
return nearbyEntities;
BoundingBox boundingBox = new BoundingBox(
center.getX() - radius,
center.getY() - radius,
center.getZ() - radius,
center.getX() + radius,
center.getY() + radius,
center.getZ() + radius
);
int minX = (int) boundingBox.getMinX() >> 4;
int maxX = (int) boundingBox.getMaxX() >> 4;
int minZ = (int) boundingBox.getMinZ() >> 4;
int maxZ = (int) boundingBox.getMaxZ() >> 4;
for (int x = minX; x <= maxX; x++) {
for (int z = minZ; z <= maxZ; z++) {
Collection<Entity> entities = this.entityCache.get(new ChunkLocation(world.getName(), x, z));
if (entities != null)
nearbyEntities.addAll(entities);
}
}
return nearbyEntities.stream()
.filter(Entity::isValid)
.filter(x -> boundingBox.contains(x.getLocation().toVector()))
.filter(predicate)
.collect(Collectors.toSet());
}
/**
* Gets entities in the Chunk of a Location
*
* @param location The Location of the Chunk
* @param predicate Conditions to be met
* @return A Set of entities in the chunk
*/
public Collection<Entity> getEntitiesInChunk(Location location, Predicate<Entity> predicate) {
World world = location.getWorld();
if (world == null)
return new ArrayList<>();
Collection<Entity> entities = this.entityCache.get(new ChunkLocation(world.getName(), location.getBlockX() >> 4, location.getBlockZ() >> 4));
if (entities == null)
return new ArrayList<>();
return entities.stream()
.filter(Entity::isValid)
.filter(predicate)
.collect(Collectors.toSet());
}
/**
* Forces an entry into the cache, used for newly spawned entities
*
* @param entity The entity to cache
*/
public void preCacheEntity(Entity entity) {
Location location = entity.getLocation();
ChunkLocation chunkLocation = new ChunkLocation(entity.getWorld().getName(), location.getBlockX() >> 4, location.getBlockZ() >> 4);
Collection<Entity> entities = this.entityCache.get(chunkLocation);
if (entities == null) {
entities = new LinkedBlockingDeque<>();
this.entityCache.put(chunkLocation, entities);
}
entities.add(entity);
}
private void refresh() {
synchronized (this.entityCache) {
this.entityCache.clear();
for (StackingThread stackingThread : this.rosePlugin.getManager(StackManager.class).getStackingThreads().values()) {
World world = stackingThread.getTargetWorld();
for (Entity entity : world.getEntities()) {
EntityType type = entity.getType();
if (type != EntityType.DROPPED_ITEM && (!type.isAlive() || type == EntityType.PLAYER || type == EntityType.ARMOR_STAND))
continue;
ChunkLocation chunkLocation = new ChunkLocation(world.getName(), entity.getLocation().getBlockX() >> 4, entity.getLocation().getBlockZ() >> 4);
Collection<Entity> entities = this.entityCache.get(chunkLocation);
if (entities == null) {
entities = new LinkedBlockingDeque<>();
this.entityCache.put(chunkLocation, entities);
}
entities.add(entity);
}
}
}
}
private record ChunkLocation(String world, int x, int z) { }
}
|
[
"esophose@gmail.com"
] |
esophose@gmail.com
|
6fc61f3e8d1e528447efc290c25ad501c847eca7
|
d19e7baad4e8818b652d0bf36529a4c518f8fea3
|
/src/main/java/org/scijava/util/ShortArray.java
|
0d8e1fbb426d5ec6eda816dba35c31c5116690d4
|
[
"BSD-2-Clause"
] |
permissive
|
LeeKamentsky/scijava-common
|
47f341ad8fab27b70e3cee1f0afcb9b889e7affb
|
7622d982527cefeb68d6537532626d0612cb3652
|
refs/heads/master
| 2021-01-24T00:32:01.456695
| 2013-10-16T19:49:09
| 2013-10-16T20:00:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,997
|
java
|
/*
* #%L
* SciJava Common shared library for SciJava software.
* %%
* Copyright (C) 2009 - 2013 Board of Regents of the University of
* Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck
* Institute of Molecular Cell Biology and Genetics.
* %%
* 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 HOLDERS 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.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of any organization.
* #L%
*/
package org.scijava.util;
import java.util.Collection;
/**
* An extensible array of {@code short} elements.
*
* @author Johannes Schindelin
* @author Curtis Rueden
*/
public class ShortArray extends AbstractPrimitiveArray<short[], Short> {
/** The backing array. */
private short[] array;
/**
* Constructs an extensible array of shorts, backed by a fixed-size array.
*/
public ShortArray() {
super(Short.TYPE);
}
/**
* Constructs an extensible array of shorts, backed by a fixed-size array.
*
* @param size the initial size
*/
public ShortArray(final int size) {
super(Short.TYPE, size);
}
/**
* Constructs an extensible array of shorts, backed by the given fixed-size
* array.
*
* @param array the array to wrap
*/
public ShortArray(final short[] array) {
super(Short.TYPE, array);
}
// -- ShortArray methods --
public void addValue(final short value) {
addValue(size(), value);
}
public boolean removeValue(final short value) {
final int index = indexOf(value);
if (index < 0) return false;
delete(index, 1);
return true;
}
public short getValue(final int index) {
checkBounds(index);
return array[index];
}
public short setValue(final int index, final short value) {
checkBounds(index);
final short oldValue = getValue(index);
array[index] = value;
return oldValue;
}
public void addValue(final int index, final short value) {
insert(index, 1);
array[index] = value;
}
public int indexOf(final short value) {
for (int i = 0; i < size(); i++) {
if (array[i] == value) return i;
}
return -1;
}
public int lastIndexOf(final short value) {
for (int i = size() - 1; i >= 0; i--) {
if (array[i] == value) return i;
}
return -1;
}
public boolean contains(final short value) {
return indexOf(value) >= 0;
}
// -- PrimitiveArray methods --
@Override
public short[] getArray() {
return array;
}
@Override
public void setArray(final short[] array) {
if (array.length < size()) {
throw new IllegalArgumentException("Array too small");
}
this.array = array;
}
// -- List methods --
@Override
public Short get(final int index) {
return getValue(index);
}
@Override
public Short set(final int index, final Short element) {
return setValue(index, element == null ? defaultValue() : element);
}
@Override
public void add(final int index, final Short element) {
addValue(index, element);
}
// NB: Overridden for performance.
@Override
public int indexOf(final Object o) {
if (!(o instanceof Short)) return -1;
final short value = (Short) o;
return indexOf(value);
}
// NB: Overridden for performance.
@Override
public int lastIndexOf(final Object o) {
if (!(o instanceof Short)) return -1;
final short value = (Short) o;
return lastIndexOf(value);
}
// -- Collection methods --
// NB: Overridden for performance.
@Override
public boolean contains(final Object o) {
if (!(o instanceof Short)) return false;
final short value = (Short) o;
return contains(value);
}
// NB: Overridden for performance.
@Override
public boolean remove(final Object o) {
if (!(o instanceof Short)) return false;
final short value = (Short) o;
return removeValue(value);
}
// NB: Overridden for performance.
@Override
public boolean containsAll(final Collection<?> c) {
for (final Object o : c) {
if (!(o instanceof Short)) return false;
final short value = (Short) o;
if (indexOf(value) < 0) return false;
}
return true;
}
// NB: Overridden for performance.
@Override
public boolean addAll(final int index, final Collection<? extends Short> c)
{
if (c.size() == 0) return false;
insert(index, c.size());
int i = index;
for (final short e : c) {
setValue(i++, e);
}
return true;
}
// NB: Overridden for performance.
@Override
public boolean removeAll(final Collection<?> c) {
boolean changed = false;
for (final Object o : c) {
if (!(o instanceof Short)) continue;
final short value = (Short) o;
final boolean result = removeValue(value);
if (result) changed = true;
}
return changed;
}
@Override
public Short defaultValue() {
return 0;
}
}
|
[
"ctrueden@wisc.edu"
] |
ctrueden@wisc.edu
|
e36285d425af46a9afb3d0fd8e7c95a2603db18f
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_procyon/y/h/fE_1.java
|
17afdccc271dd3a3aa7d88511f67032716baa81a
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,565
|
java
|
package y.h;
import java.awt.event.*;
import java.awt.geom.*;
class fE implements KeyListener
{
private final fD a;
fE(final fD a) {
this.a = a;
}
public void keyTyped(final KeyEvent keyEvent) {
}
public void keyReleased(final KeyEvent keyEvent) {
}
public void keyPressed(final KeyEvent keyEvent) {
final boolean z = fj.z;
if (!Boolean.TRUE.equals(this.a.getClientProperty("Overview.AllowKeyboardNavigation"))) {
return;
}
Label_0349: {
switch (keyEvent.getKeyCode()) {
case 109: {
this.a.tc.setZoom(this.a.tc.getZoom() / 1.25);
this.a.tc.updateView();
if (z) {
break Label_0349;
}
break;
}
case 107: {
this.a.tc.setZoom(this.a.tc.getZoom() * 1.25);
this.a.tc.updateView();
if (z) {
break Label_0349;
}
break;
}
case 37: {
final Point2D center = this.a.tc.getCenter();
this.a.b(center.getX() - this.a.tc.getCanvasComponent().getWidth() * 0.5 / this.a.tc.getZoom(), center.getY(), 0.5);
if (z) {
break Label_0349;
}
break;
}
case 39: {
final Point2D center2 = this.a.tc.getCenter();
this.a.b(center2.getX() + this.a.tc.getCanvasComponent().getWidth() * 0.5 / this.a.tc.getZoom(), center2.getY(), 0.5);
if (z) {
break Label_0349;
}
break;
}
case 38: {
final Point2D center3 = this.a.tc.getCenter();
this.a.b(center3.getX(), center3.getY() - this.a.tc.getCanvasComponent().getHeight() * 0.5 / this.a.tc.getZoom(), 0.5);
if (z) {
break Label_0349;
}
break;
}
case 40: {
final Point2D center4 = this.a.tc.getCenter();
this.a.b(center4.getX(), center4.getY() + this.a.tc.getCanvasComponent().getHeight() * 0.5 / this.a.tc.getZoom(), 0.5);
break;
}
}
}
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
aa440d23022a58f9a152c0ac494ef88ce4b40586
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipseswt_cluster/48791/tar_1.java
|
15254814d8e4d226797b3bed17c5c13cc981f93c
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,985
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.dnd;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
class TreeDragUnderEffect extends DragUnderEffect {
Tree tree;
TreeItem currentItem = null;
int currentEffect = DND.FEEDBACK_NONE;
TreeItem[] selection = new TreeItem[0];
TreeDragUnderEffect(Tree tree) {
this.tree = tree;
}
void show(int effect, int x, int y) {
TreeItem item = null;
if (effect != DND.FEEDBACK_NONE) item = findItem(x, y);
if (item == null) effect = DND.FEEDBACK_NONE;
if (currentEffect != effect && currentEffect == DND.FEEDBACK_NONE) {
selection = tree.getSelection();
tree.setSelection(new TreeItem[0]);
}
boolean restoreSelection = currentEffect != effect && effect == DND.FEEDBACK_NONE;
setDragUnderEffect(effect, item);
if (restoreSelection) {
tree.setSelection(selection);
selection = new TreeItem[0];
}
}
TreeItem findItem(int x , int y){
Point coordinates = new Point(x, y);
coordinates = tree.toControl(coordinates);
return tree.getItem(coordinates);
}
void setDragUnderEffect(int effect, TreeItem item) {
switch (effect) {
case DND.FEEDBACK_SELECT:
if (currentEffect == DND.FEEDBACK_INSERT_AFTER ||
currentEffect == DND.FEEDBACK_INSERT_BEFORE) {
setInsertMark(null, false);
currentEffect = DND.FEEDBACK_NONE;
currentItem = null;
}
if (currentEffect != effect || currentItem != item) {
setDropSelection(item);
currentEffect = DND.FEEDBACK_SELECT;
currentItem = item;
}
break;
case DND.FEEDBACK_INSERT_AFTER:
case DND.FEEDBACK_INSERT_BEFORE:
if (currentEffect == DND.FEEDBACK_SELECT) {
setDropSelection(null);
currentEffect = DND.FEEDBACK_NONE;
currentItem = null;
}
if (currentEffect != effect || currentItem != item) {
setInsertMark(item, effect == DND.FEEDBACK_INSERT_AFTER);
currentEffect = effect;
currentItem = item;
}
break;
default :
if (currentEffect == DND.FEEDBACK_INSERT_AFTER ||
currentEffect == DND.FEEDBACK_INSERT_BEFORE) {
setInsertMark(null, false);
}
if (currentEffect == DND.FEEDBACK_SELECT) {
setDropSelection(null);
}
currentEffect = DND.FEEDBACK_NONE;
currentItem = null;
break;
}
}
void setDropSelection (TreeItem item) {
if (item == null) {
tree.setSelection(new TreeItem[0]);
} else {
tree.setSelection(new TreeItem[]{item});
}
}
void setInsertMark (TreeItem item, boolean after) {
// not currently implemented
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
644a2bcadeacb6e16ba93e3d736c65e98173facf
|
3f5b613d1caf00814415d76c300a7a79ee5c18e1
|
/src/test/java/io/github/stayhungrystayfoolish/web/rest/errors/ExceptionTranslatorTestController.java
|
0c15bde57cc8608f31e0331f0e544427fa6e833d
|
[] |
no_license
|
StayHungryStayFoolish/security-design
|
79d46d86b7a77794ce39236a60b969426b2b5cf9
|
66bdf87d0ad9b4f4a4c72f0e7da9e54795e73010
|
refs/heads/master
| 2021-06-05T10:29:47.953929
| 2018-08-26T07:29:57
| 2018-08-26T07:29:57
| 145,530,536
| 1
| 1
| null | 2020-09-18T16:56:46
| 2018-08-21T08:17:31
|
Java
|
UTF-8
|
Java
| false
| false
| 2,997
|
java
|
package io.github.stayhungrystayfoolish.web.rest.errors;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.support.MissingServletRequestPartException;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;
@RestController
public class ExceptionTranslatorTestController {
@GetMapping("/test/concurrency-failure")
public void concurrencyFailure() {
throw new ConcurrencyFailureException("test concurrency failure");
}
@PostMapping("/test/method-argument")
public void methodArgument(@Valid @RequestBody TestDTO testDTO) {
}
@GetMapping("/test/parameterized-error")
public void parameterizedError() {
throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value");
}
@GetMapping("/test/parameterized-error2")
public void parameterizedError2() {
Map<String, Object> params = new HashMap<>();
params.put("foo", "foo_value");
params.put("bar", "bar_value");
throw new CustomParameterizedException("test parameterized error", params);
}
@GetMapping("/test/missing-servlet-request-part")
public void missingServletRequestPartException() throws Exception {
throw new MissingServletRequestPartException("missing Servlet request part");
}
@GetMapping("/test/missing-servlet-request-parameter")
public void missingServletRequestParameterException() throws Exception {
throw new MissingServletRequestParameterException("missing Servlet request parameter", "parameter type");
}
@GetMapping("/test/access-denied")
public void accessdenied() {
throw new AccessDeniedException("test access denied!");
}
@GetMapping("/test/unauthorized")
public void unauthorized() {
throw new BadCredentialsException("test authentication failed!");
}
@GetMapping("/test/response-status")
public void exceptionWithReponseStatus() {
throw new TestResponseStatusException();
}
@GetMapping("/test/internal-server-error")
public void internalServerError() {
throw new RuntimeException();
}
public static class TestDTO {
@NotNull
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status")
@SuppressWarnings("serial")
public static class TestResponseStatusException extends RuntimeException {
}
}
|
[
"bonismo@hotmail.com"
] |
bonismo@hotmail.com
|
c0f65af71451358d400d5143aa53cb022ff6d96a
|
c3a83420ab341677929e4be7676467294e52aee3
|
/20_11_09 std/src/WholeArrangement.java
|
24a8a4af90b7cafd918f6a9e5e351e5312a4d587
|
[] |
no_license
|
LYHccc/study_java
|
525474403d9c0aaadaac84c1bf1ba7d7d77de89e
|
732e1ada5e3d9d2117ddfefac750f9b1354fbb6f
|
refs/heads/master
| 2022-11-25T19:57:18.091460
| 2020-11-13T14:29:58
| 2020-11-13T14:29:58
| 217,519,014
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 808
|
java
|
/*
* 全排列
* 对于某个串,比如:“1234”,求它的所有全排列。
* 并且要求这些全排列一定要按照字母的升序排列。
*/
import java.util.*;
public class WholeArrangement {
public static void dfs(List<String> list, String s, boolean[] flag, String cur){
if(cur.length() == s.length()){
list.add(cur);
return;
}
for(int i = 0; i < s.length(); i++){
if(flag[i]){
continue;
}
flag[i] = true;
dfs(list, s, flag, cur + s.charAt(i));
flag[i] = false;
}
}
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
String s = scanner.nextLine();
List<String> list = new ArrayList<>();
boolean[] flag = new boolean[s.length()];
dfs(list, s, flag, "");
System.out.println(list);
scanner.close();
}
}
|
[
"1587168434@qq.com"
] |
1587168434@qq.com
|
8f28e9619c4409d0677f9d5a0e1fb2fe467e8036
|
847d94b6a8861b0acad3e9b14090716019bfd25e
|
/src/main/java/org/kitteh/irc/client/library/feature/twitch/messagetag/Color.java
|
84341c45cdf77904450e90ff744713d22bfcfe9c
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
KittehOrg/KittehIRCClientLib
|
0268ebe228b5b3c84c5e44020a2bfc3e4f58632c
|
46b5795227c075b39c98b57c5a490a9009c6d52d
|
refs/heads/master
| 2022-02-01T16:32:39.799783
| 2021-09-30T22:24:29
| 2021-10-01T03:24:45
| 27,287,741
| 150
| 50
|
NOASSERTION
| 2021-12-29T12:05:00
| 2014-11-29T01:27:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,967
|
java
|
/*
* * Copyright (C) 2013-2021 Matt Baxter https://kitteh.org
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.kitteh.irc.client.library.feature.twitch.messagetag;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.feature.MessageTagManager;
import org.kitteh.irc.client.library.util.TriFunction;
/**
* Message tag for color.
*/
public class Color extends MessageTagManager.DefaultMessageTag {
/**
* Name of this message tag.
*/
public static final String NAME = "color";
/**
* Function to create this message tag.
*/
@SuppressWarnings("ConstantConditions")
public static final TriFunction<Client, String, String, Color> FUNCTION = (client, name, value) -> new Color(name, value);
private Color(@NonNull String name, @NonNull String value) {
super(name, value);
}
}
|
[
"matt@phozop.net"
] |
matt@phozop.net
|
11c33b37080f1385b4a7eff4684b9b3a80b93b8f
|
715356bfe2f8a296a9b1e131fff6cd7c142c33a8
|
/core/src/main/java/hudson/tasks/test/DefaultTestResultParserImpl.java
|
f01d68dc68044dad307af7e302bd883ee13db3c4
|
[
"MIT"
] |
permissive
|
vivek/hudson
|
6cf0c141e334be0e1da801ce15b71d21aeaa287f
|
1921f721f787934bb375ef69c434e829e20cf796
|
refs/heads/master
| 2021-08-08T03:49:04.316656
| 2010-05-28T17:45:31
| 2010-05-28T17:45:31
| 692,626
| 0
| 0
|
MIT
| 2021-02-03T19:30:14
| 2010-05-29T13:49:59
|
Java
|
UTF-8
|
Java
| false
| false
| 5,611
|
java
|
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, 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 hudson.tasks.test;
import hudson.AbortException;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.Launcher;
import hudson.Util;
import hudson.model.AbstractBuild;
import hudson.model.TaskListener;
import hudson.remoting.VirtualChannel;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* Default partial implementation of {@link TestResultParser} that handles GLOB dereferencing
* and other checks for user errors, such as misconfigured GLOBs, up-to-date checks on test reports.
*
* <p>
* The instance of the parser will be serialized to the node that performed the build and the parsing will be done
* remotely on that slave.
*
* @since 1.343
* @author Kohsuke Kawaguchi
*/
public abstract class DefaultTestResultParserImpl extends TestResultParser implements Serializable {
/**
* This method is executed on the slave that has the report files to parse test reports and builds {@link TestResult}.
*
* @param reportFiles
* List of files to be parsed. Never be empty nor null.
* @param launcher
* Can be used to fork processes on the machine where the build is running. Never null.
* @param listener
* Use this to report progress and other problems. Never null.
*
* @throws InterruptedException
* If the user cancels the build, it will be received as a thread interruption. Do not catch
* it, and instead just forward that through the call stack.
* @throws IOException
* If you don't care about handling exceptions gracefully, you can just throw IOException
* and let the default exception handling in Hudson takes care of it.
* @throws AbortException
* If you encounter an error that you handled gracefully, throw this exception and Hudson
* will not show a stack trace.
*/
protected abstract TestResult parse(List<File> reportFiles, Launcher launcher, TaskListener listener) throws InterruptedException, IOException;
@Override
public TestResult parse(final String testResultLocations, final AbstractBuild build, final Launcher launcher, final TaskListener listener) throws InterruptedException, IOException {
return build.getWorkspace().act(new FileCallable<TestResult>() {
final boolean ignoreTimestampCheck = IGNORE_TIMESTAMP_CHECK; // so that the property can be set on the master
final long buildTime = build.getTimestamp().getTimeInMillis();
final long nowMaster = System.currentTimeMillis();
public TestResult invoke(File dir, VirtualChannel channel) throws IOException, InterruptedException {
final long nowSlave = System.currentTimeMillis();
// files older than this timestamp is considered stale
long localBuildTime = buildTime + (nowSlave - nowMaster);
FilePath[] paths = new FilePath(dir).list(testResultLocations);
if (paths.length==0)
throw new AbortException("No test reports that matches "+testResultLocations+" found. Configuration error?");
// since dir is local, paths all point to the local files
List<File> files = new ArrayList<File>(paths.length);
for (FilePath path : paths) {
File report = new File(path.getRemote());
if (ignoreTimestampCheck || localBuildTime - 3000 /*error margin*/ < report.lastModified()) {
// this file is created during this build
files.add(report);
}
}
if (files.isEmpty()) {
// none of the files were new
throw new AbortException(
String.format(
"Test reports were found but none of them are new. Did tests run? \n"+
"For example, %s is %s old\n", paths[0].getRemote(),
Util.getTimeSpanString(localBuildTime-paths[0].lastModified())));
}
return parse(files,launcher,listener);
}
});
}
private static final long serialVersionUID = 1L;
public static final boolean IGNORE_TIMESTAMP_CHECK = Boolean.getBoolean(TestResultParser.class.getName()+".ignoreTimestampCheck");
}
|
[
"kohsuke@71c3de6d-444a-0410-be80-ed276b4c234a"
] |
kohsuke@71c3de6d-444a-0410-be80-ed276b4c234a
|
52c0a1647da7a1a01aeb12530e9c4a7e3e96d762
|
d56aab67eb85c7dd99f83c94d2e38a15673429c9
|
/hr/src/main/java/com/shanjing/hr/utils/HRHomePopWindow.java
|
ff9753241df81c7470fb0875961f84bed616e0b5
|
[] |
no_license
|
cuiwenju2017/rdgzh-hotspot
|
b2e732433027f45475b09ed986688f37a0a9ec34
|
f9f9aa3db7961e3e37ca661bbb92ac1b45e2dae8
|
refs/heads/master
| 2020-08-26T15:23:59.265857
| 2019-10-23T12:43:56
| 2019-10-23T12:43:56
| 217,053,159
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,920
|
java
|
package com.shanjing.hr.utils;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;
import android.widget.Toast;
import com.shanjing.hr.R;
/**
* 首页分享弹窗
*/
public class HRHomePopWindow extends PopupWindow implements View.OnClickListener {
private Context context;
private ImageView iv_share;
public HRHomePopWindow(Context context) {
super(context);
this.context = context;
initalize();
}
private void initalize() {
LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(R.layout.popup_hr_home, null);
iv_share = view.findViewById(R.id.iv_share);
iv_share.setOnClickListener(this);
setContentView(view);
initWindow();
}
private void initWindow() {
DisplayMetrics d = context.getResources().getDisplayMetrics();
this.setWidth((int) (d.widthPixels * 0.38));
this.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
this.setFocusable(true);
this.setOutsideTouchable(true);//设置
this.update();
//实例化一个ColorDrawable颜色为半透明
ColorDrawable dw = new ColorDrawable(0x00000000);
//设置SelectPicPopupWindow弹出窗体的背景
this.setBackgroundDrawable(dw);
backgroundAlpha((Activity) context, 1.0f);//0.0-1.0
this.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
backgroundAlpha((Activity) context, 1f);
}
});
}
//设置添加屏幕的背景透明度
public void backgroundAlpha(Activity context, float bgAlpha) {
WindowManager.LayoutParams lp = context.getWindow().getAttributes();
lp.alpha = bgAlpha;
context.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
context.getWindow().setAttributes(lp);
}
public void showAtBottom(View view) {
//弹窗位置设置
showAsDropDown(view, -430, -75);
}
private Dialog dialog;
private View inflate;
@Override
public void onClick(View v) {
int i = v.getId();
if (i == R.id.iv_share) {//分享弹窗
dialog = new Dialog(context, R.style.ActionSheetDialogStyle);
//填充对话框的布局
inflate = LayoutInflater.from(context).inflate(R.layout.dialog_share, null);
//获取控件
TextView tv_cancel = inflate.findViewById(R.id.tv_cancel);
LinearLayout ll_wx = inflate.findViewById(R.id.ll_wx);
LinearLayout ll_qq = inflate.findViewById(R.id.ll_qq);
LinearLayout ll_wb = inflate.findViewById(R.id.ll_wb);
LinearLayout ll_pyq = inflate.findViewById(R.id.ll_pyq);
LinearLayout ll_copy_link = inflate.findViewById(R.id.ll_copy_link);
//获取监听
tv_cancel.setOnClickListener(this);
ll_wx.setOnClickListener(this);
ll_qq.setOnClickListener(this);
ll_wb.setOnClickListener(this);
ll_pyq.setOnClickListener(this);
ll_copy_link.setOnClickListener(this);
//将布局设置给Dialog
dialog.setContentView(inflate);
//获取当前Activity所在的窗体
Window dialogWindow = dialog.getWindow();
//设置Dialog从窗体底部弹出
dialogWindow.setGravity(Gravity.BOTTOM);
//获得窗体的属性
WindowManager.LayoutParams lp = dialogWindow.getAttributes();
lp.y = 0;//设置Dialog距离底部的距离
//宽度填满
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
//将属性设置给窗体
dialogWindow.setAttributes(lp);
dialog.show();//显示对话框
} else if (i == R.id.tv_cancel) {
dialog.dismiss();
} else if (i == R.id.ll_wx) {
Toast.makeText(context, "微信", Toast.LENGTH_SHORT).show();
} else if (i == R.id.ll_qq) {
Toast.makeText(context, "QQ", Toast.LENGTH_SHORT).show();
} else if (i == R.id.ll_wb) {
Toast.makeText(context, "微博", Toast.LENGTH_SHORT).show();
} else if (i == R.id.ll_pyq) {
Toast.makeText(context, "朋友圈", Toast.LENGTH_SHORT).show();
} else if (i == R.id.ll_copy_link) {
Toast.makeText(context, "复制链接", Toast.LENGTH_SHORT).show();
}
}
}
|
[
"1755140651@qq.com"
] |
1755140651@qq.com
|
7f31c3302570d6b3019f9552a8aff400789d17e8
|
4e3bce973db2abf6883fa38b4aa80e9e77f70be8
|
/2.JavaCore/src/com/javarush/task/task13/task1304/Solution.java
|
60a83e5216f149306f7e5ef9a746c6b982ea8d95
|
[] |
no_license
|
sergei00787/JavaRushTasks
|
462fcd29dca26ecbd93486c95a8e0ea7748e8e38
|
5389004d10fa3496bea9d21eaf68b69e96638d26
|
refs/heads/master
| 2023-05-20T03:23:56.882693
| 2021-06-11T04:31:58
| 2021-06-11T04:31:58
| 345,182,963
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 464
|
java
|
package com.javarush.task.task13.task1304;
/*
Selectable и Updatable
*/
public class Solution {
public static void main(String[] args) throws Exception {
}
interface Selectable {
void onSelect();
}
interface Updatable {
void refresh();
}
//напишите тут ваш класс
public class Screen implements Selectable, Updatable{
public void onSelect(){
}
public void refresh(){
}
}
}
|
[
"sergei007_87@mail.ru"
] |
sergei007_87@mail.ru
|
237bb126bb040c37ac4502181235dc9ea35ddb5b
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Struts/Struts1570.java
|
e929e6f9004cf2a1d8a31a9444ff7d5466f7d4c6
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 990
|
java
|
public void testMatchNoTrim() throws Exception {
MyTestPerson testPerson = new MyTestPerson();
testPerson.setUsername("Secret "); // must end with one whitespace
ValueStack stack = ActionContext.getContext().getValueStack();
ActionContext.getContext().setValueStack(stack);
RegexFieldValidator validator = new RegexFieldValidator();
validator.setTrim(false);
validator.setRegex("^Sec.*\\s");
validator.setValidatorContext(new DummyValidatorContext(new Object(), tpf));
validator.setFieldName("username");
validator.setValueStack(ActionContext.getContext().getValueStack());
validator.validate(testPerson);
assertFalse(validator.getValidatorContext().hasErrors());
assertFalse(validator.getValidatorContext().hasActionErrors());
assertFalse(validator.getValidatorContext().hasActionMessages());
assertFalse(validator.getValidatorContext().hasFieldErrors());
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
c1ae2f40a0c717c306342d4a0715941446ec3fe4
|
cc0db09b40e04d46224001d85b5aa48bbcb1e8b0
|
/common/actor/src/test/java/org/thingsboard/server/actors/TestRootActor.java
|
54bf044aa80aa2c6347bea4c332d02aa3f88042d
|
[
"Apache-2.0"
] |
permissive
|
hansen-jun/thingsboard
|
e2de4c11963cc2b17025f4446a80bfb90a194d5e
|
bd98ce8deb0794ca4edbd64cac4ad3cd2396ef51
|
refs/heads/master
| 2022-09-20T14:08:39.513771
| 2020-06-04T07:11:35
| 2020-06-04T07:11:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,303
|
java
|
/**
* Copyright © 2016-2020 The Thingsboard 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.thingsboard.server.actors;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.thingsboard.server.common.msg.TbActorMsg;
@Slf4j
public class TestRootActor implements TbActor {
@Getter
private final TbActorId actorId;
@Getter
private final ActorTestCtx testCtx;
private boolean initialized;
private long sum;
private int count;
public TestRootActor(TbActorId actorId, ActorTestCtx testCtx) {
this.actorId = actorId;
this.testCtx = testCtx;
}
@Override
public void init() {
initialized = true;
}
@Override
public boolean process(TbActorCtx ctx, TbActorMsg msg) {
if (initialized) {
int value = ((IntTbActorMsg) msg).getValue();
sum += value;
count += 1;
if (count == testCtx.getExpectedInvocationCount()) {
testCtx.getActual().set(sum);
testCtx.getInvocationCount().addAndGet(count);
testCtx.getLatch().countDown();
}
}
return true;
}
@Override
public void destroy() {
}
public static class TestRootActorCreator implements TbActorCreator {
private final TbActorId actorId;
private final ActorTestCtx testCtx;
public TestRootActorCreator(TbActorId actorId, ActorTestCtx testCtx) {
this.actorId = actorId;
this.testCtx = testCtx;
}
@Override
public TbActorId createActorId() {
return actorId;
}
@Override
public TbActor createActor() {
return new TestRootActor(actorId, testCtx);
}
}
}
|
[
"ashvayka@thingsboard.io"
] |
ashvayka@thingsboard.io
|
aff3a0522c2726d9fa605182a1c7e6955fb8242f
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XRENDERING-481-35-26-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java
|
2d082c02771561d6b8a6a79b99992ed67a1171b1
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 459
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Mar 31 18:43:45 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class InternalTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
f63c82c5c1d3d374ea5203b35c10591046604ba4
|
82c593f4a668ae176738bb6b928d33ae2bae87ec
|
/RoofFloor1.java
|
6b9c54796b2560058122d50c3afff65837da7d4c
|
[] |
no_license
|
ajay-sreeram/My-Coding-Practice
|
02db43b8d31e7ffb590c1b0aa8f012a3623ffd83
|
0a6308f26cba44137f032e91703cac8934b2f9a8
|
refs/heads/master
| 2021-06-05T02:39:36.776488
| 2018-04-07T19:57:56
| 2018-04-07T19:57:56
| 32,878,814
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 547
|
java
|
import java.io.*;
public class RoofFloor1 {
public static void main(String[] args)throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(br.readLine());
int i;
int p=-1;
int arr[]=new int[n];
int tot=0;
for(i=0;i<n;i++){
int num=Integer.parseInt(br.readLine());
arr[i]=num;
if(num==0){
if(p>0){
tot-=arr[p];
p--;
}
}else{
tot+=num;
p=i;
}
System.out.println("prev: "+arr[p]+" index:"+p);
}
System.out.println(tot);
}
}
|
[
"sreeram.ajay18@gmail.com"
] |
sreeram.ajay18@gmail.com
|
39660c3fafe56ff8b9cd5d1227dc32e6bbed657d
|
ebc3a4a62ce3c2f313f029b2f70fc21bdc7f8bc1
|
/servers/dist/gameserver/data/scripts/quests/Q10275_ContainingTheAttributePower.java
|
21195115cd54d831c0ac05913c26025751d52db5
|
[] |
no_license
|
MaskedRiders/L2Jmobius_jp_pvp
|
9804fc4c26aa0a05e5b0fe6932ea8793895b6994
|
f74276128f7cd04b876d740ac4518335a9c295dd
|
refs/heads/gh-pages
| 2020-12-22T05:27:07.208114
| 2014-12-08T12:44:09
| 2014-12-08T12:44:09
| 27,674,627
| 0
| 1
| null | 2015-12-01T22:37:21
| 2014-12-07T15:32:04
|
Java
|
UTF-8
|
Java
| false
| false
| 7,120
|
java
|
/*
* 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;
import lineage2.commons.util.Rnd;
import lineage2.gameserver.model.Player;
import lineage2.gameserver.model.base.Element;
import lineage2.gameserver.model.instances.NpcInstance;
import lineage2.gameserver.model.items.Inventory;
import lineage2.gameserver.model.quest.Quest;
import lineage2.gameserver.model.quest.QuestState;
import lineage2.gameserver.scripts.ScriptFile;
import lineage2.gameserver.tables.SkillTable;
public class Q10275_ContainingTheAttributePower extends Quest implements ScriptFile
{
// Npcs
private final static int Holly = 30839;
private final static int Weber = 31307;
private final static int Yin = 32325;
private final static int Yang = 32326;
// Monsters
private final static int Water = 27380;
private final static int Air = 27381;
// Items
private final static int YinSword = 13845;
private final static int YangSword = 13881;
private final static int SoulPieceWater = 13861;
private final static int SoulPieceAir = 13862;
public Q10275_ContainingTheAttributePower()
{
super(false);
addStartNpc(Holly, Weber);
addTalkId(Yin, Yang);
addKillId(Air, Water);
addQuestItem(YinSword, YangSword, SoulPieceWater, SoulPieceAir);
}
@Override
public String onEvent(String event, QuestState qs, NpcInstance npc)
{
String htmltext = event;
final Player player = qs.getPlayer();
switch (event)
{
case "30839-02.htm":
case "31307-02.htm":
qs.setCond(1);
qs.setState(STARTED);
qs.playSound(SOUND_ACCEPT);
break;
case "30839-05.htm":
qs.setCond(2);
qs.playSound(SOUND_MIDDLE);
break;
case "31307-05.htm":
qs.setCond(7);
qs.playSound(SOUND_MIDDLE);
break;
case "32325-03.htm":
qs.setCond(3);
qs.giveItems(YinSword, 1, Element.FIRE, 10);
qs.playSound(SOUND_MIDDLE);
break;
case "32326-03.htm":
qs.setCond(8);
qs.giveItems(YangSword, 1, Element.EARTH, 10);
qs.playSound(SOUND_MIDDLE);
break;
case "32325-06.htm":
if (qs.getQuestItemsCount(YinSword) > 0)
{
qs.takeItems(YinSword, 1);
htmltext = "32325-07.htm";
}
qs.giveItems(YinSword, 1, Element.FIRE, 10);
break;
case "32326-06.htm":
if (qs.getQuestItemsCount(YangSword) > 0)
{
qs.takeItems(YangSword, 1);
htmltext = "32326-07.htm";
}
qs.giveItems(YangSword, 1, Element.EARTH, 10);
break;
case "32325-09.htm":
qs.setCond(5);
SkillTable.getInstance().getInfo(2635, 1).getEffects(player, player, false, false);
qs.giveItems(YinSword, 1, Element.FIRE, 10);
qs.playSound(SOUND_MIDDLE);
break;
case "32326-09.htm":
qs.setCond(10);
SkillTable.getInstance().getInfo(2636, 1).getEffects(player, player, false, false);
qs.giveItems(YangSword, 1, Element.EARTH, 10);
qs.playSound(SOUND_MIDDLE);
break;
default:
int item = 0;
switch (event)
{
case "1":
item = 10521;
break;
case "2":
item = 10522;
break;
case "3":
item = 10523;
break;
case "4":
item = 10524;
break;
case "5":
item = 10525;
break;
case "6":
item = 10526;
break;
}
if (item > 0)
{
qs.giveItems(item, 2, true);
qs.addExpAndSp(10000000, 11200000);
qs.exitCurrentQuest(false);
qs.playSound(SOUND_FINISH);
if (npc != null)
{
htmltext = str(npc.getId()) + "-1" + event + ".htm";
}
else
{
htmltext = null;
}
}
break;
}
return htmltext;
}
@Override
public String onTalk(NpcInstance npc, QuestState qs)
{
String htmltext = "noquest";
final int id = qs.getState();
final int cond = qs.getCond();
final int npcId = npc.getId();
if (id == COMPLETED)
{
if (npcId == Holly)
{
htmltext = "30839-0a.htm";
}
else if (npcId == Weber)
{
htmltext = "31307-0a.htm";
}
}
else if (id == CREATED)
{
if (qs.getPlayer().getLevel() >= 76)
{
if (npcId == Holly)
{
htmltext = "30839-01.htm";
}
else
{
htmltext = "31307-01.htm";
}
}
else if (npcId == Holly)
{
htmltext = "30839-00.htm";
}
else
{
htmltext = "31307-00.htm";
}
}
else if (npcId == Holly)
{
if (cond == 1)
{
htmltext = "30839-03.htm";
}
else if (cond == 2)
{
htmltext = "30839-05.htm";
}
}
else if (npcId == Weber)
{
if (cond == 1)
{
htmltext = "31307-03.htm";
}
else if (cond == 7)
{
htmltext = "31307-05.htm";
}
}
else if (npcId == Yin)
{
if (cond == 2)
{
htmltext = "32325-01.htm";
}
else if ((cond == 3) || (cond == 5))
{
htmltext = "32325-04.htm";
}
else if (cond == 4)
{
htmltext = "32325-08.htm";
qs.takeItems(YinSword, 1);
qs.takeItems(SoulPieceWater, -1);
}
else if (cond == 6)
{
htmltext = "32325-10.htm";
}
}
else if (npcId == Yang)
{
if (cond == 7)
{
htmltext = "32326-01.htm";
}
else if ((cond == 8) || (cond == 10))
{
htmltext = "32326-04.htm";
}
else if (cond == 9)
{
htmltext = "32326-08.htm";
qs.takeItems(YangSword, 1);
qs.takeItems(SoulPieceAir, -1);
}
else if (cond == 11)
{
htmltext = "32326-10.htm";
}
}
return htmltext;
}
@Override
public String onKill(NpcInstance npc, QuestState qs)
{
if (qs.getState() != STARTED)
{
return null;
}
final int cond = qs.getCond();
switch (npc.getId())
{
case Air:
if ((qs.getItemEquipped(Inventory.PAPERDOLL_RHAND) == YangSword) && ((cond == 8) || (cond == 10)) && (qs.getQuestItemsCount(SoulPieceAir) < 6) && Rnd.chance(30))
{
qs.giveItems(SoulPieceAir, 1, false);
if (qs.getQuestItemsCount(SoulPieceAir) >= 6)
{
qs.setCond(cond + 1);
qs.playSound(SOUND_MIDDLE);
}
}
break;
case Water:
if ((qs.getItemEquipped(Inventory.PAPERDOLL_RHAND) == YinSword) && ((cond == 3) || (cond == 5)) && (qs.getQuestItemsCount(SoulPieceWater) < 6) && Rnd.chance(30))
{
qs.giveItems(SoulPieceWater, 1, false);
if (qs.getQuestItemsCount(SoulPieceWater) >= 6)
{
qs.setCond(cond + 1);
qs.playSound(SOUND_MIDDLE);
}
}
break;
}
return null;
}
@Override
public void onLoad()
{
}
@Override
public void onReload()
{
}
@Override
public void onShutdown()
{
}
}
|
[
"nakamura.shingo+l2j@gmail.com"
] |
nakamura.shingo+l2j@gmail.com
|
2a51acb8f858b879df65756a94886df7315443f2
|
935c61aebdf27e528d8ca8936b21e866c379c763
|
/src/main/java/me/itzg/helpers/assertcmd/PropertyEquals.java
|
ad7b366bb1a57fa01eb0fc251a9fddd5a2e9b722
|
[
"MIT"
] |
permissive
|
itzg/mc-image-helper
|
581be6d590b3af7dcaa30b7f53e145f86412b0c8
|
3994d557c4e85efa9a96f41577159f8d65a17e53
|
refs/heads/master
| 2023-08-31T19:40:47.791601
| 2023-08-29T16:22:29
| 2023-08-29T16:22:29
| 404,894,256
| 37
| 20
|
MIT
| 2023-09-09T03:38:34
| 2021-09-09T23:09:45
|
Java
|
UTF-8
|
Java
| false
| false
| 1,473
|
java
|
package me.itzg.helpers.assertcmd;
import java.io.BufferedReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.Callable;
import picocli.CommandLine.Command;
import picocli.CommandLine.ExitCode;
import picocli.CommandLine.Option;
@Command(name = "propertyEquals")
public class PropertyEquals implements Callable<Integer> {
@Option(names = "--file", description = "Property file", required = true)
Path file;
@Option(names = "--property", required = true)
String property;
@Option(names = "--expect", required = true)
String expectedValue;
@Override
public Integer call() throws Exception {
if (!Files.exists(file)) {
System.err.printf("The file %s does not exist%n", file);
return ExitCode.SOFTWARE;
}
final Properties properties = new Properties();
try (BufferedReader reader = Files.newBufferedReader(file)) {
properties.load(reader);
}
final String value = properties.getProperty(this.property);
if (value == null) {
System.err.printf("The property %s in the file %s does not exist%n", property, file);
return ExitCode.SOFTWARE;
}
if (!Objects.equals(value, expectedValue)) {
System.err.printf("Expected the property %s in the file %s to be '%s', but was '%s'%n",
property, file, expectedValue, value);
return ExitCode.SOFTWARE;
}
return ExitCode.OK;
}
}
|
[
"itzgeoff@gmail.com"
] |
itzgeoff@gmail.com
|
a9b38ba0d28533d688aed8eb9e9f8891d13c66d9
|
b7936f9a99afb096bc6d68448c32631d7416e177
|
/build/tmp/recompileMc/sources/net/minecraftforge/items/wrapper/EmptyHandler.java
|
cbc9d834d27992b97f51e21b57822511c26d0463
|
[] |
no_license
|
AlphaWolf21/JATMA
|
ff786893893879d1f158a549659bbf13a5e0763c
|
93cf49cca9e23fa1660099999b2b46ce26fb3bbb
|
refs/heads/master
| 2021-01-19T02:43:34.989869
| 2016-11-07T04:06:16
| 2016-11-07T04:06:16
| 73,483,501
| 2
| 0
| null | 2016-11-11T14:20:06
| 2016-11-11T14:20:05
| null |
UTF-8
|
Java
| false
| false
| 1,588
|
java
|
/*
* Minecraft Forge
* Copyright (c) 2016.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.items.wrapper;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
public class EmptyHandler implements IItemHandlerModifiable
{
public static final IItemHandler INSTANCE = new EmptyHandler();
@Override
public int getSlots()
{
return 0;
}
@Override
public ItemStack getStackInSlot(int slot)
{
return null;
}
@Override
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate)
{
return stack;
}
@Override
public ItemStack extractItem(int slot, int amount, boolean simulate)
{
return null;
}
@Override
public void setStackInSlot(int slot, ItemStack stack)
{
// nothing to do here
}
}
|
[
"techperson71@gmail.com"
] |
techperson71@gmail.com
|
30174249c78ebc402cd9e64a740b92799a0edc40
|
e91b6f25ea849f44f5834ba8f9bfc8c0742722a1
|
/source/1_Java/ch11_inheritance/src/com/tj/ex12_final/MainClass.java
|
38207d73cd6cafeeea6e4ab5c572b7f97bb0b65d
|
[] |
no_license
|
AsnemBlue/mega_IT
|
c1e7ede26515a981179e1986a18144da0646d33f
|
710236379ec2c2cf5baac7c9dc9253cb4197bf39
|
refs/heads/master
| 2021-05-26T09:03:32.138726
| 2020-04-08T05:53:52
| 2020-04-08T05:53:52
| 254,068,727
| 1
| 0
| null | 2020-04-08T11:28:53
| 2020-04-08T11:28:52
| null |
UTF-8
|
Java
| false
| false
| 307
|
java
|
package com.tj.ex12_final;
public class MainClass {
public static void main(String[] args) {
Animal[] animal = {new Dog(), new Rabbit()};
animal[0].running();
animal[1].running();
animal[1].stop();
for(Animal a : animal) {
a.running();
a.running();
a.stop();
}//for
}//main
}//class
|
[
"spacenyi@naver.com"
] |
spacenyi@naver.com
|
cb273afa57d3baa4a9b28250509d553e54f75cf1
|
b0fef22d7e13bc650cd787df71128d57eb3dea32
|
/AutoFixer/src/main/resources/javaparser/modified/java/com/github/javaparser/ast/body/AnnotationDeclaration.java
|
ad905f62dfae737705a000dfb87a30ef5e93ec2f
|
[] |
no_license
|
1096kc/Autofixer
|
88b3879bfe6a8d82d6bf56a516a24cc25d2e8a66
|
6467ea43b42ddf34268235d9e840eb4407881560
|
refs/heads/master
| 2021-06-24T12:36:15.866967
| 2019-12-06T16:28:42
| 2019-12-06T16:28:42
| 223,191,917
| 0
| 0
| null | 2021-03-31T21:34:13
| 2019-11-21T14:24:26
|
Java
|
UTF-8
|
Java
| false
| false
| 5,660
|
java
|
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
package com.github.javaparser.ast.body;
import com.github.javaparser.ast.AllFieldsConstructor;
import com.github.javaparser.ast.Modifier;
import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.expr.AnnotationExpr;
import com.github.javaparser.ast.expr.SimpleName;
import com.github.javaparser.ast.nodeTypes.modifiers.NodeWithAbstractModifier;
import com.github.javaparser.ast.type.Type;
import com.github.javaparser.ast.visitor.CloneVisitor;
import com.github.javaparser.ast.visitor.GenericVisitor;
import com.github.javaparser.ast.visitor.VoidVisitor;
import com.github.javaparser.metamodel.AnnotationDeclarationMetaModel;
import com.github.javaparser.metamodel.JavaParserMetaModel;
import com.github.javaparser.TokenRange;
import com.github.javaparser.resolution.Resolvable;
import com.github.javaparser.resolution.declarations.ResolvedAnnotationDeclaration;
import java.util.function.Consumer;
import java.util.Optional;
import com.github.javaparser.ast.Generated;
/**
* An annotation type declaration.<br/><code>@interface X { ... }</code>
*
* @author Julio Vilmar Gesser
*/
public class AnnotationDeclaration extends TypeDeclaration<AnnotationDeclaration> implements NodeWithAbstractModifier<AnnotationDeclaration>, Resolvable<ResolvedAnnotationDeclaration> {
public AnnotationDeclaration() {
this(null, new NodeList<>(), new NodeList<>(), new SimpleName(), new NodeList<>());
}
public AnnotationDeclaration(NodeList<Modifier> modifiers, String name) {
this(null, modifiers, new NodeList<>(), new SimpleName(name), new NodeList<>());
}
@AllFieldsConstructor
public AnnotationDeclaration(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<BodyDeclaration<?>> members) {
this(null, modifiers, annotations, name, members);
}
/**
* This constructor is used by the parser and is considered private.
*/
@Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator")
public AnnotationDeclaration(TokenRange tokenRange, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, SimpleName name, NodeList<BodyDeclaration<?>> members) {
super(tokenRange, modifiers, annotations, name, members);
customInitialization();
}
@Override
@Generated("com.github.javaparser.generator.core.node.AcceptGenerator")
public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) {
return v.visit(this, arg);
}
@Override
@Generated("com.github.javaparser.generator.core.node.AcceptGenerator")
public <A> void accept(final VoidVisitor<A> v, final A arg) {
v.visit(this, arg);
}
@Override
@Generated("com.github.javaparser.generator.core.node.RemoveMethodGenerator")
public boolean remove(Node node) {
if (node == null) {
return false;
}
return super.remove(node);
}
@Override
@Generated("com.github.javaparser.generator.core.node.CloneGenerator")
public AnnotationDeclaration clone() {
return (AnnotationDeclaration) accept(new CloneVisitor(), null);
}
@Override
@Generated("com.github.javaparser.generator.core.node.GetMetaModelGenerator")
public AnnotationDeclarationMetaModel getMetaModel() {
return JavaParserMetaModel.annotationDeclarationMetaModel;
}
@Override
@Generated("com.github.javaparser.generator.core.node.ReplaceMethodGenerator")
public boolean replace(Node node, Node replacementNode) {
if (node == null) {
return false;
}
return super.replace(node, replacementNode);
}
@Override
@Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
public boolean isAnnotationDeclaration() {
return true;
}
@Override
@Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
public AnnotationDeclaration asAnnotationDeclaration() {
return this;
}
@Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
public void ifAnnotationDeclaration(Consumer<AnnotationDeclaration> action) {
action.accept(this);
}
@Override
public ResolvedAnnotationDeclaration resolve() {
return getSymbolResolver().resolveDeclaration(this, ResolvedAnnotationDeclaration.class);
}
@Override
@Generated("com.github.javaparser.generator.core.node.TypeCastingGenerator")
public Optional<AnnotationDeclaration> toAnnotationDeclaration() {
return Optional.of(this);
}
@Override
public FieldDeclaration addField(Type type, String name, Modifier.Keyword... modifiers) {
throw new IllegalStateException("Cannot add a field to an annotation declaration.");
}
}
|
[
"1412621@mail.nankai.edu.cn"
] |
1412621@mail.nankai.edu.cn
|
bc1bdd2e663bb84eff51427c5e527b77d58544a0
|
46ef867eb57c7b7f57b03c00bb16725b18ea8180
|
/15.13-reagindo-a-domain-events-em-fases-especificas-da-transacao/algafood-api/src/main/java/com/algaworks/algafood/api/assembler/CidadeInputDisassembler.java
|
9e5da1a860e18259d62d31e163f32f57e5e8cd45
|
[] |
no_license
|
johnyguido/curso-especialista-spring-rest
|
cb9d027b50f4982aab677876e09b07fedecd3c81
|
94e99c75e5a8475fee333798145113c5ecff41fe
|
refs/heads/master
| 2023-06-07T22:36:08.802975
| 2023-05-24T17:41:56
| 2023-05-24T17:41:56
| 399,998,423
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
package com.algaworks.algafood.api.assembler;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.algaworks.algafood.api.model.input.CidadeInput;
import com.algaworks.algafood.domain.model.Cidade;
import com.algaworks.algafood.domain.model.Estado;
@Component
public class CidadeInputDisassembler {
@Autowired
private ModelMapper modelMapper;
public Cidade toDomainObject(CidadeInput cidadeInput) {
return modelMapper.map(cidadeInput, Cidade.class);
}
public void copyToDomainObject(CidadeInput cidadeInput, Cidade cidade) {
// Para evitar org.hibernate.HibernateException: identifier of an instance of
// com.algaworks.algafood.domain.model.Estado was altered from 1 to 2
cidade.setEstado(new Estado());
modelMapper.map(cidadeInput, cidade);
}
}
|
[
"thiagofa@gmail.com"
] |
thiagofa@gmail.com
|
60f03a19e6bceb927cc04103a9fd2efe7e403561
|
4a6cc69db16aec71b8ac69abbe86ef427a71353e
|
/ebx/src/main/java/com/metservice/beryllium/BerylliumCommandHttpDispatcher.java
|
eeca3141b8acb5af9d5b2203aee171c3edd6cae4
|
[] |
no_license
|
craig-a-roach/geowx
|
0532c1d4dbea383ad229200b208aaebbdbbe2b5d
|
7cd7e2b7254f4a6b38762f4965dacb290f47bad1
|
refs/heads/master
| 2021-03-12T22:04:17.573558
| 2014-04-28T06:39:09
| 2014-04-28T06:39:09
| 9,379,471
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,488
|
java
|
/*
* Copyright 2012 Meteorological Service of New Zealand Limited all rights reserved. No part of this work may be stored
* in a retrievable system, transmitted or reproduced in any way without the prior written permission of the
* Meteorological Service of New Zealand
*/
package com.metservice.beryllium;
import java.io.IOException;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Request;
import com.metservice.argon.ArgonClock;
import com.metservice.argon.Binary;
import com.metservice.argon.json.JsonObject;
import com.metservice.argon.json.JsonSchemaException;
/**
* @author roach
*/
public class BerylliumCommandHttpDispatcher extends BerylliumHttpDispatcher {
public void handle(IBerylliumCommandHttpService service, BerylliumPath path, Request rq, HttpServletResponse rp)
throws IOException, ServletException {
if (service == null) throw new IllegalArgumentException("object is null");
if (path == null) throw new IllegalArgumentException("object is null");
if (rq == null) throw new IllegalArgumentException("object is null");
if (rp == null) throw new IllegalArgumentException("object is null");
try {
final JsonObject jrq = UBeryllium.transformParameterMapToJson(rq);
BerylliumBinaryHttpPayload vOut = service.createPayload(path, rq, jrq);
if (vOut == null) {
vOut = BerylliumBinaryHttpPayload.newEmpty(ArgonClock.tsNow());
}
final Binary contentBinary = vOut.content();
final String qlcContentType = vOut.qlcContentType();
final Date lastModified = vOut.lastModified();
traceResponse(qlcContentType, rq, contentBinary);
BerylliumIO.writeStreamNoCache(rp, qlcContentType, contentBinary, lastModified);
} catch (final BerylliumHttpNotFoundException ex) {
onStatus(path, rq, rp, HttpServletResponse.SC_NOT_FOUND, ex);
} catch (final BerylliumHttpBadRequestException ex) {
onWarn(path, rq, rp, HttpServletResponse.SC_BAD_REQUEST, ex);
} catch (final JsonSchemaException ex) {
onWarn(path, rq, rp, HttpServletResponse.SC_BAD_REQUEST, ex);
} catch (final InterruptedException ex) {
onWarn(path, rq, rp, HttpServletResponse.SC_SERVICE_UNAVAILABLE, "Cancelled");
Thread.currentThread().interrupt();
} catch (final RuntimeException ex) {
onWarn(path, rq, rp, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
}
}
public BerylliumCommandHttpDispatcher(IBerylliumNetProbe probe) {
super(probe);
}
}
|
[
"roach@metservice.com"
] |
roach@metservice.com
|
c1e55958e56f0313ea703140ab5ae1f0e1371576
|
8f2657a98e0a1103d90af63fe0dacaccffed28fc
|
/SharedPreferences/app/src/main/java/com/edimaudo/sharedpreferences/MainActivity.java
|
b0ead476dbbd733eda4f2747ab8bdacf20a2c96b
|
[] |
no_license
|
edimaudo/Android-Projects
|
0634468b5cee9c9564761d4e4603865aa9bbe1d3
|
9d0f484db93bb6787f98ceacd91d004a1bbac270
|
refs/heads/master
| 2022-10-02T08:09:29.757671
| 2022-09-02T01:37:59
| 2022-09-02T01:37:59
| 64,692,993
| 9
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,434
|
java
|
package com.edimaudo.sharedpreferences;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.AlertDialog;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//creates shared preferences
SharedPreferences preferences = this.getSharedPreferences("com.edimaudo.sharedpreferences", Context.MODE_PRIVATE);//mode private to keep your info proviate
preferences.edit().putString("username","ed").apply();//create shared preference info
String username = preferences.getString("username","");//get shared preference info
//shows a dialog box
new AlertDialog.Builder(this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle("Are you sure?")
.setMessage("Do you definitely want to do this")
.setPositiveButton("Yes",new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.setNegativeButton("No",null)
.show();
}
}
|
[
"edimaudo@gmail.com"
] |
edimaudo@gmail.com
|
bc8e90ec96aa76523a56366f0661f50225da97d5
|
bfb5460ad62e42015efb58bf1d0b154a0251d8da
|
/arachnidium-integration-samples/arachnidium-selenide/src/main/java/com/github/arachnidium/selenide/google/WikiPage.java
|
13b3a5dc6b3fe3d9b7cf0ed93b1bb91d30ae7743
|
[] |
no_license
|
thinkd1fferent/arachnidium-java
|
1d05398c82108957acdb2d7ed7a0ac532545e33c
|
a56cf9a7876a8ce997e6cb7a6cdfe764677aafe2
|
refs/heads/master
| 2021-05-29T01:29:51.809542
| 2015-08-22T13:55:13
| 2015-08-22T13:55:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package com.github.arachnidium.selenide.google;
import com.github.arachnidium.core.BrowserWindow;
import com.github.arachnidium.model.browser.BrowserPage;
import com.github.arachnidium.model.support.annotations.ExpectedPageTitle;
import com.github.arachnidium.model.support.annotations.ExpectedURL;
@ExpectedURL(regExp = "https://ru.wikipedia.org/wiki")
@ExpectedURL(regExp = "wikipedia.org")
@ExpectedPageTitle(regExp = "^*[?[Hello]\\?[world]]")
public class WikiPage extends BrowserPage {
public WikiPage(BrowserWindow browserWindow){
super(browserWindow);
}
}
|
[
"tichomirovsergey@gmail.com"
] |
tichomirovsergey@gmail.com
|
75743a1192b5eea7c788d15dd13f091f1477ff6a
|
ad5cd983fa810454ccbb8d834882856d7bf6faca
|
/platform/ext/processing/testsrc/de/hybris/platform/task/impl/DefaultTaskServiceBufferedAuxiliaryTablesRepollTest.java
|
efa6b16f061deb34d586bd01676d08359fef8269
|
[] |
no_license
|
amaljanan/my-hybris
|
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
|
ef9f254682970282cf8ad6d26d75c661f95500dd
|
refs/heads/master
| 2023-06-12T17:20:35.026159
| 2021-07-09T04:33:13
| 2021-07-09T04:33:13
| 384,177,175
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,304
|
java
|
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.task.impl;
import static org.assertj.core.api.Assertions.assertThat;
import de.hybris.bootstrap.annotations.IntegrationTest;
import de.hybris.platform.testframework.PropertyConfigSwitcher;
import javax.annotation.Resource;
import org.junit.After;
import org.junit.Before;
@IntegrationTest
public class DefaultTaskServiceBufferedAuxiliaryTablesRepollTest extends DefaultTaskServiceAuxiliaryTablesRepollTest
{
private final PropertyConfigSwitcher schedulerInterval = new PropertyConfigSwitcher(
AuxiliaryTablesBasedTaskProvider.Params.SCHEDULER_INTERVAL.getName());
@Override
@Before
public void setUp()
{
schedulerInterval.switchToValue("2");
super.setUp();
}
@Override
@After
public void tearDown()
{
super.tearDown();
schedulerInterval.switchBackToDefault();
}
@Override
protected TasksProvider getTasksProvider()
{
//this gives a new instance of stateful AuxiliaryTablesBasedTaskProvider
final TasksProvider tasksProvider = super.getTasksProvider();
assertThat(tasksProvider).isInstanceOf(AuxiliaryTablesBasedTaskProvider.class);
return new BufferedAuxTablesTasksProvider(((AuxiliaryTablesBasedTaskProvider) tasksProvider), metricRegistry);
}
}
|
[
"amaljanan333@gmail.com"
] |
amaljanan333@gmail.com
|
3d4f3464fd3b9b50981664af42f2961bb480ea1a
|
5277d0686319332e74cb30c6c89b1de1620a8708
|
/flowless-mvp-example/src/main/java/com/zhuinden/examplegithubclient/data/model/BaseDataSource.java
|
64d49b3fce641b342fb9e12a824331d731da735b
|
[
"Apache-2.0"
] |
permissive
|
Zhuinden/flowless
|
bbf434a585a242a0bd1f5fa81b8f304cd96423e2
|
a958f08cd91352ad5430fb3bce986e6b132f5cd9
|
refs/heads/master
| 2023-01-18T22:26:29.073202
| 2022-12-24T13:15:39
| 2022-12-24T13:15:39
| 62,426,066
| 170
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,403
|
java
|
package com.zhuinden.examplegithubclient.data.model;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
/**
* Created by Zhuinden on 2017.01.02..
*/
public abstract class BaseDataSource<M>
implements DataSource<M> {
protected abstract List<M> getData();
private Set<ChangeListener<M>> changeListenerSet = new HashSet<>();
public Unbinder registerChangeListener(final ChangeListener<M> changeListener) {
changeListenerSet.add(changeListener);
changeListener.onChange(Collections.unmodifiableList(getData()));
return () -> changeListenerSet.remove(changeListener);
}
private void notifyChangeListeners() {
List<M> unmodifiable = Collections.unmodifiableList(getData());
for(ChangeListener<M> changeListener : changeListenerSet) {
changeListener.onChange(unmodifiable);
}
}
public <R> R modify(Modify<R, M> modify) {
R m = modify.modify(getData());
Single.fromCallable(() -> true).subscribeOn(AndroidSchedulers.mainThread()).subscribe(ignored -> {
notifyChangeListeners();
});
return m;
}
public <R> R search(Search<R, M> search) {
return search.search(Collections.unmodifiableList(getData()));
}
}
|
[
"zhuinden@gmail.com"
] |
zhuinden@gmail.com
|
2019bcaf63610b348e43560bdd82ca226d7aa2a5
|
9bc7656de21d4c530b0b0227ada9a2c3dadb81a6
|
/netty-im-server/src/main/java/io/github/bootsrc/im/server/handler/ServerPoHandlerProto.java
|
58c102f93ef42891f9c9b731f883d41f7762533f
|
[
"Apache-2.0"
] |
permissive
|
bootsrc/netty-im
|
cdd27620a0bd42496575cc4ad60b9925cf661b32
|
7cff8f26ce85fe67a4a553a29fc44c28ec682ac7
|
refs/heads/master
| 2022-12-23T18:47:23.729587
| 2019-11-12T02:49:20
| 2019-11-12T02:49:20
| 202,705,627
| 3
| 1
|
Apache-2.0
| 2022-12-12T23:48:26
| 2019-08-16T10:08:40
|
Java
|
UTF-8
|
Java
| false
| false
| 883
|
java
|
package io.github.bootsrc.im.server.handler;
import io.github.bootsrc.im.core.message.MessageProto;
import io.github.bootsrc.im.server.core.ConnectionPool;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
public class ServerPoHandlerProto extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
MessageProto.Message message = (MessageProto.Message) msg;
if (ConnectionPool.getChannel(message.getId()) == null) {
ConnectionPool.putChannel(message.getId(), ctx);
}
System.err.println("server:" + message.getId());
// ping
if (message.getType() == 1) {
ctx.writeAndFlush(message);
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
cause.printStackTrace();
ctx.close();
}
}
|
[
"liushaomingdev@163.com"
] |
liushaomingdev@163.com
|
f6f2503c3681609def724348fb12809ef891673e
|
eb67344dcc07a3354e749bc79e2d3a96b900f1cc
|
/app/src/androidTest/java/com/thoughtworks/todo_list/LoginActivityTest.java
|
5f7fc399409735782815a0da6aa4a7d091d86b0c
|
[
"Apache-2.0"
] |
permissive
|
chengzhu6/todo-list
|
03da8cd14df26e749929ed8d99b731ad3fcf8953
|
f4b0c8b6527139183b957edf938d271e13a74977
|
refs/heads/master
| 2022-12-04T00:47:39.899151
| 2020-08-16T12:47:34
| 2020-08-16T12:47:34
| 287,942,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,467
|
java
|
package com.thoughtworks.todo_list;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.ActivityTestRule;
import com.thoughtworks.todo_list.ui.login.UserRepository;
import com.thoughtworks.todo_list.repository.user.entity.User;
import com.thoughtworks.todo_list.repository.utils.Encryptor;
import com.thoughtworks.todo_list.ui.login.LoginActivity;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.reactivex.Maybe;
import io.reactivex.MaybeObserver;
import io.reactivex.internal.operators.maybe.MaybeCreate;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.RootMatchers.withDecorView;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.mockito.Mockito.when;
@RunWith(AndroidJUnit4.class)
public class LoginActivityTest {
@Rule
public ActivityTestRule<LoginActivity> mActivityRule = new ActivityTestRule<>(LoginActivity.class);
@Test
public void should_login_successfully_when_login_given_correct_username_and_password() {
MainApplication applicationContext = (MainApplication) InstrumentationRegistry.getInstrumentation().getTargetContext().getApplicationContext();
UserRepository userRepository = applicationContext.userRepository();
User user = new User();
user.setId(1);
user.setPassword(Encryptor.md5("123456"));
user.setName("sjyuan");
when(userRepository.findByName("sjyuan")).thenReturn(new MaybeCreate(emitter -> emitter.onSuccess(user)));
onView(withId(R.id.username)).perform(typeText("sjyuan"));
onView(withId(R.id.password)).perform(typeText("123456"));
onView(withId(R.id.login)).perform(click());
onView(withText("Welcome !sjyuan")).inRoot(withDecorView(not(is(mActivityRule.getActivity().getWindow().getDecorView()))))
.check(matches(isDisplayed()));
}
@Test
public void should_login_failed_when_login_given_invalid_password() {
MainApplication applicationContext = (MainApplication) InstrumentationRegistry.getInstrumentation().getTargetContext().getApplicationContext();
UserRepository userRepository = applicationContext.userRepository();
User user = new User();
user.setId(1);
user.setPassword(Encryptor.md5("12345"));
user.setName("sjyuan");
when(userRepository.findByName("sjyuan")).thenReturn(new MaybeCreate(emitter -> emitter.onSuccess(user)));
onView(withId(R.id.username)).perform(typeText("sjyuan"));
onView(withId(R.id.password)).perform(typeText("123456"));
onView(withId(R.id.login)).perform(click());
onView(withText(R.string.login_failed_password)).inRoot(withDecorView(not(is(mActivityRule.getActivity().getWindow().getDecorView()))))
.check(matches(isDisplayed()));
}
@Test
public void should_login_failed_when_login_given_username_does_not_exist() {
MainApplication applicationContext = (MainApplication) InstrumentationRegistry.getInstrumentation().getTargetContext().getApplicationContext();
UserRepository userRepository = applicationContext.userRepository();
User user = new User();
user.setId(1);
user.setPassword("12345");
user.setName("sjyuan");
when(userRepository.findByName("notexist")).thenReturn(new Maybe<User>() {
@Override
protected void subscribeActual(MaybeObserver<? super User> observer) {
observer.onComplete();
}
});
onView(withId(R.id.username)).perform(typeText("notexist"));
onView(withId(R.id.password)).perform(typeText("12345"));
onView(withId(R.id.login)).perform(click());
onView(withText(R.string.login_failed_username)).inRoot(withDecorView(not(is(mActivityRule.getActivity().getWindow().getDecorView()))))
.check(matches(isDisplayed()));
}
}
|
[
"sjyuan@thoughtworks.com"
] |
sjyuan@thoughtworks.com
|
89ee2eb1bf07f69f6dfa9c2ca9415eba3fa0b140
|
36b3dd585b149a48f0f6f6bf130734820dbf93d2
|
/mall-business/goods-center/src/main/java/com/mallplus/goods/controller/PmsProductAttributeValueController.java
|
a40867aa037a803a066e1e471779260dfe7005c9
|
[
"Apache-2.0"
] |
permissive
|
shenzhuan/zscat-me
|
5d391e00bb2864bbf4aaca82b845f9f8bacfd38d
|
23ac9ab9e97d7d63433887168961881a011f217c
|
refs/heads/master
| 2023-07-23T12:41:19.688624
| 2022-10-18T02:26:50
| 2022-10-18T02:26:50
| 102,570,841
| 218
| 95
|
Apache-2.0
| 2023-07-16T05:02:47
| 2017-09-06T06:23:37
|
PLpgSQL
|
UTF-8
|
Java
| false
| false
| 6,065
|
java
|
package com.mallplus.goods.controller;
import com.mallplus.common.utils.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.mallplus.common.entity.pms.PmsProductAttributeValue;
import com.mallplus.goods.service.IPmsProductAttributeValueService;
import com.mallplus.common.utils.ValidatorUtils;
import com.mallplus.common.annotation.SysLog;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
* 存储产品参数信息的表
* </p>
*
* @author zscat
* @since 2019-04-19
*/
@Slf4j
@RestController
@Api(tags = "PmsProductAttributeValueController", description = "存储产品参数信息的表管理")
@RequestMapping("/pms/PmsProductAttributeValue")
public class PmsProductAttributeValueController {
@Resource
private IPmsProductAttributeValueService IPmsProductAttributeValueService;
@SysLog(MODULE = "pms", REMARK = "根据条件查询所有存储产品参数信息的表列表")
@ApiOperation("根据条件查询所有存储产品参数信息的表列表")
@GetMapping(value = "/list")
@PreAuthorize("hasAuthority('pms:PmsProductAttributeValue:read')")
public Object getPmsProductAttributeValueByPage(PmsProductAttributeValue entity,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
return new CommonResult().success(IPmsProductAttributeValueService.page(new Page<PmsProductAttributeValue>(pageNum, pageSize), new QueryWrapper<>(entity)));
} catch (Exception e) {
log.error("根据条件查询所有存储产品参数信息的表列表:%s", e.getMessage(), e);
}
return new CommonResult().failed();
}
@SysLog(MODULE = "pms", REMARK = "保存存储产品参数信息的表")
@ApiOperation("保存存储产品参数信息的表")
@PostMapping(value = "/create")
@PreAuthorize("hasAuthority('pms:PmsProductAttributeValue:create')")
public Object savePmsProductAttributeValue(@RequestBody PmsProductAttributeValue entity) {
try {
if (IPmsProductAttributeValueService.save(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("保存存储产品参数信息的表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
}
@SysLog(MODULE = "pms", REMARK = "更新存储产品参数信息的表")
@ApiOperation("更新存储产品参数信息的表")
@PostMapping(value = "/update/{id}")
@PreAuthorize("hasAuthority('pms:PmsProductAttributeValue:update')")
public Object updatePmsProductAttributeValue(@RequestBody PmsProductAttributeValue entity) {
try {
if (IPmsProductAttributeValueService.updateById(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("更新存储产品参数信息的表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
}
@SysLog(MODULE = "pms", REMARK = "删除存储产品参数信息的表")
@ApiOperation("删除存储产品参数信息的表")
@GetMapping(value = "/delete/{id}")
@PreAuthorize("hasAuthority('pms:PmsProductAttributeValue:delete')")
public Object deletePmsProductAttributeValue(@ApiParam("存储产品参数信息的表id") @PathVariable Long id) {
try {
if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("存储产品参数信息的表id");
}
if (IPmsProductAttributeValueService.removeById(id)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("删除存储产品参数信息的表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
}
@SysLog(MODULE = "pms", REMARK = "给存储产品参数信息的表分配存储产品参数信息的表")
@ApiOperation("查询存储产品参数信息的表明细")
@GetMapping(value = "/{id}")
@PreAuthorize("hasAuthority('pms:PmsProductAttributeValue:read')")
public Object getPmsProductAttributeValueById(@ApiParam("存储产品参数信息的表id") @PathVariable Long id) {
try {
if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("存储产品参数信息的表id");
}
PmsProductAttributeValue coupon = IPmsProductAttributeValueService.getById(id);
return new CommonResult().success(coupon);
} catch (Exception e) {
log.error("查询存储产品参数信息的表明细:%s", e.getMessage(), e);
return new CommonResult().failed();
}
}
@ApiOperation(value = "批量删除存储产品参数信息的表")
@RequestMapping(value = "/delete/batch", method = RequestMethod.POST)
@ResponseBody
@SysLog(MODULE = "pms", REMARK = "批量删除存储产品参数信息的表")
@PreAuthorize("hasAuthority('pms:PmsProductAttributeValue:delete')")
public Object deleteBatch(@RequestParam("ids") List<Long> ids) {
boolean count = IPmsProductAttributeValueService.removeByIds(ids);
if (count) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
}
|
[
"shen@913656048"
] |
shen@913656048
|
5a77b6171fa40579c96e62a4f2cc02b3effa1514
|
b056a8c3a0bc86bef77385732415030135ec3c7d
|
/src/main/java/com/github/xetorthio/redis/clients/jedis/SentinelCommands.java
|
3b0e5033ad12fcedba3425242158f9a78c8e3903
|
[
"MIT"
] |
permissive
|
howe/jedisque
|
eadaea02ace64886ef6d58e2046292a1b35a2648
|
c39e7c07d36da54d536a1a77334485f239f6b230
|
refs/heads/master
| 2021-07-04T21:20:51.524688
| 2017-09-28T02:53:34
| 2017-09-28T02:53:34
| 104,645,235
| 0
| 0
| null | 2017-09-24T13:17:15
| 2017-09-24T13:17:15
| null |
UTF-8
|
Java
| false
| false
| 652
|
java
|
package com.github.xetorthio.redis.clients.jedis;
import java.util.List;
import java.util.Map;
public interface SentinelCommands {
public List<Map<String, String>> sentinelMasters();
public List<String> sentinelGetMasterAddrByName(String masterName);
public Long sentinelReset(String pattern);
public List<Map<String, String>> sentinelSlaves(String masterName);
public String sentinelFailover(String masterName);
public String sentinelMonitor(String masterName, String ip, int port, int quorum);
public String sentinelRemove(String masterName);
public String sentinelSet(String masterName, Map<String, String> parameterMap);
}
|
[
"howechiang@gmail.com"
] |
howechiang@gmail.com
|
76418deb9c3ec559ad84fe8c7a0f33f1920bb54a
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/96/org/apache/commons/math/transform/FastSineTransformer_inversetransform2_187.java
|
514ce4ad6975038ba3a9e466592e1fa13bfcdc37
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,047
|
java
|
org apach common math transform
implement href http document wolfram add on link onslink
standard packag standardpackag linear algebra linearalgebra fourier trig fouriertrig html fast sine transform
transform dimension data set refer
fast fourier transform isbn chapter
fst invers multipli depend convent
equat list comment method
similar fft requir length data set power
addit element enforc function
transform sampl
version revis date
fast sine transform fastsinetransform serializ
invers transform real data set
formula sqrt sigma sin
param real data arrai invers transform
real invers transform arrai
math except mathexcept math relat error occur
illeg argument except illegalargumentexcept paramet invalid
inversetransform2 math except mathexcept
illeg argument except illegalargumentexcept
transform2
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
d889b1bad63e90d9bf834c87ec11cb8b6150280a
|
16a7a5d045e8f4bdea837fe3fb3607d7e6b68f13
|
/module1/src/staticimport/ImportSystemOut.java
|
23e129d2906ef5468815c023b05997217fdf55f0
|
[] |
no_license
|
Pratik-Singh786/new_core_java
|
2d19cf74c629b70a3400a26000a30e6396b03f4a
|
6fa7186cd5f60d7030e95b4030e15800ee19b045
|
refs/heads/main
| 2023-09-03T07:44:12.908410
| 2021-11-20T13:22:08
| 2021-11-20T13:22:08
| 430,109,672
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 397
|
java
|
package staticimport;
import static java.lang.System.out;
public class ImportSystemOut {
public static void main(String[] args)
{
out.println("hello");//System is a class present in the java.util.pack,
//out is static variable present in the system class of the type print
//println present in the print stream class
out.println("hi");
}
}
|
[
"pratik.rxl@gmail.com"
] |
pratik.rxl@gmail.com
|
7cb49fc31f51988525cb1714de970b938b00329f
|
2582eb6b960d7dd81e0a1ae30a8f467c7cd231ec
|
/.svn/pristine/61/610697a06838027836d4d2f7b2cd2b78d3cc9453.svn-base
|
7d7ec5eb5a4792d4b45017276e1e65720981e444
|
[] |
no_license
|
garuda-secure-technologies-pvt-ltd/garudaclubplus
|
cdca4f7068a74fc68b9ed22fc4ed4b9fce09223a
|
1161adda36114f6953a2287043085e4ae79e4566
|
refs/heads/master
| 2022-07-16T05:22:22.957736
| 2021-04-18T16:34:43
| 2021-04-18T16:34:43
| 171,704,350
| 0
| 0
| null | 2022-06-30T15:23:00
| 2019-02-20T16:03:57
|
Java
|
UTF-8
|
Java
| false
| false
| 184
|
package com.openbravo.data.loader;
/**
*
* @author adrianromero
* Created on 27 de febrero de 2007, 22:08
*
*/
public interface IKeyed {
public Object getKey();
}
|
[
"akkipatel5@gmail.com"
] |
akkipatel5@gmail.com
|
|
f36c008fa511fa2443857e28d6fd5b6a1b1b01ba
|
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
|
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/gif/GifDataTransformation.java
|
22402e2dee843472984ffa9c6b53d4b04fd2a590
|
[
"BSD-2-Clause-Views"
] |
permissive
|
mirek190/x86-android-5.0
|
9d1756fa7ff2f423887aa22694bd737eb634ef23
|
eb1029956682072bb7404192a80214189f0dc73b
|
refs/heads/master
| 2020-05-27T01:09:51.830208
| 2015-10-07T22:47:36
| 2015-10-07T22:47:36
| 41,942,802
| 15
| 20
| null | 2020-03-09T00:21:03
| 2015-09-05T00:11:19
| null |
UTF-8
|
Java
| false
| false
| 911
|
java
|
package com.bumptech.glide.load.resource.gif;
import android.graphics.Bitmap;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.MultiTransformation;
import com.bumptech.glide.load.Transformation;
public class GifDataTransformation implements Transformation<GifData> {
private Transformation<Bitmap> wrapped;
public GifDataTransformation(Transformation<Bitmap> wrapped) {
this.wrapped = wrapped;
}
@Override
public Resource<GifData> transform(Resource<GifData> resource, int outWidth, int outHeight) {
GifData data = resource.get();
Transformation<Bitmap> newTransformation =
new MultiTransformation<Bitmap>(data.getFrameTransformation(), wrapped);
data.setFrameTransformation(newTransformation);
return resource;
}
@Override
public String getId() {
return wrapped.getId();
}
}
|
[
"mirek190@gmail.com"
] |
mirek190@gmail.com
|
9dab36e1a6ccb743fbd117339c2babcace8d7058
|
7ceafb397501c016c1c434a9b8bec9bb9f8abd08
|
/discovery/src/main/java/com/ibm/watson/discovery/v1/model/DeleteEnvironmentResponse.java
|
3440e64bda52a32be5e9447cb64a3cbc9d11bcaf
|
[
"Apache-2.0"
] |
permissive
|
kanazawaLri/java-sdk
|
0cdf1faa1b417a4da2ba56fd635f52bcc2ce8ad9
|
31e119269fbd8cc8c813f61913f11be1e0835edb
|
refs/heads/master
| 2020-07-18T10:37:10.387401
| 2019-10-07T03:27:19
| 2019-10-07T03:27:19
| 206,228,148
| 0
| 0
|
Apache-2.0
| 2019-09-04T04:03:17
| 2019-09-04T04:03:17
| null |
UTF-8
|
Java
| false
| false
| 1,432
|
java
|
/*
* Copyright 2018 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.watson.discovery.v1.model;
import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;
/**
* DeleteEnvironmentResponse.
*/
public class DeleteEnvironmentResponse extends GenericModel {
/**
* Status of the environment.
*/
public interface Status {
/** deleted. */
String DELETED = "deleted";
}
@SerializedName("environment_id")
private String environmentId;
private String status;
/**
* Gets the environmentId.
*
* The unique identifier for the environment.
*
* @return the environmentId
*/
public String getEnvironmentId() {
return environmentId;
}
/**
* Gets the status.
*
* Status of the environment.
*
* @return the status
*/
public String getStatus() {
return status;
}
}
|
[
"loganpatino10@gmail.com"
] |
loganpatino10@gmail.com
|
d54fb281901d7ea9f70dc5b5e8716f0614f864e0
|
98c9d4575781bfbd26fa20673ba5a216c4a06429
|
/src/main/java/com/minshang/erp/modules/base/controller/TestController.java
|
288aaa296cbfb6245fe101ba32f94e3ba81ee112
|
[] |
no_license
|
JackLuhan/minshang_back
|
e06e21899b142a489715fa8110cfad5874992ad8
|
f54c6a36798005012029d96b355ba9518a33aef3
|
refs/heads/master
| 2020-04-13T17:50:56.929733
| 2019-01-10T16:38:03
| 2019-01-10T16:38:03
| 163,357,735
| 1
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,668
|
java
|
package com.minshang.erp.modules.base.controller;
import com.minshang.erp.common.annotation.RateLimiter;
import com.minshang.erp.common.lock.Callback;
import com.minshang.erp.common.lock.RedisDistributedLockTemplate;
import com.minshang.erp.common.utils.ResultUtil;
import com.minshang.erp.common.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
/**
* @author houyi
*/
@Slf4j
@Controller
@Api(description = "测试接口")
@Transactional
@RequestMapping(value = "/test")
public class TestController {
@Autowired
private RedisDistributedLockTemplate lockTemplate;
@RequestMapping(value = "/lockAndLimit",method = RequestMethod.GET)
@RateLimiter(limit = 1, timeout = 5000)
@ApiOperation(value = "同步锁限流测试")
@ResponseBody
public Result<Object> test1(){
lockTemplate.execute("订单流水号", 5000, new Callback() {
@Override
public Object onGetLock() throws InterruptedException {
//TODO 获得锁后要做的事
log.info("生成订单流水号");
return null;
}
@Override
public Object onTimeout() throws InterruptedException {
//TODO 获得锁超时后要做的事
return null;
}
});
return new ResultUtil<Object>().setData(null);
}
}
|
[
"1317406121@qq.com"
] |
1317406121@qq.com
|
5a0635d483f231f4509844b6a49391e54ba9699f
|
2c140a0632890ce2a28a9025b493cbc67fab3bd5
|
/src/main/java/org/hl7/v3/ActRelationshipHasGoal.java
|
205cae988e9fe185bdc4ba1accfc58e3df911286
|
[] |
no_license
|
darkxi/hl7-Edition2012
|
cf5d475e06464c776b8b39676953835aae1fb3f5
|
add3330c499fd0491fd18a2f71be04a3c1efb391
|
refs/heads/master
| 2020-06-07T01:21:19.768327
| 2017-07-18T03:23:43
| 2017-08-18T09:03:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
//
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2017.08.10 时间 10:45:02 AM CST
//
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>ActRelationshipHasGoal的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
* <p>
* <pre>
* <simpleType name="ActRelationshipHasGoal">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="GOAL"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ActRelationshipHasGoal")
@XmlEnum
public enum ActRelationshipHasGoal {
GOAL;
public String value() {
return name();
}
public static ActRelationshipHasGoal fromValue(String v) {
return valueOf(v);
}
}
|
[
"2319457455@qq.com"
] |
2319457455@qq.com
|
4d17d40df094eab44e363b3d77c380b78fc40295
|
958b13739d7da564749737cb848200da5bd476eb
|
/src/main/java/com/alipay/api/domain/AntMerchantExpandActivityQualificationQueryModel.java
|
81f47b0b9bfc083c4d57edef96065390c08fb439
|
[
"Apache-2.0"
] |
permissive
|
anywhere/alipay-sdk-java-all
|
0a181c934ca84654d6d2f25f199bf4215c167bd2
|
649e6ff0633ebfca93a071ff575bacad4311cdd4
|
refs/heads/master
| 2023-02-13T02:09:28.859092
| 2021-01-14T03:17:27
| 2021-01-14T03:17:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,361
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 商家服务活动平台活动资格查询
*
* @author auto create
* @since 1.0, 2019-07-24 13:02:01
*/
public class AntMerchantExpandActivityQualificationQueryModel extends AlipayObject {
private static final long serialVersionUID = 1648979777818966735L;
/**
* 商家活动平台活动编码
*/
@ApiField("activity_code")
private String activityCode;
/**
* 业务扩展信息
*/
@ApiField("biz_ext")
private String bizExt;
/**
* 外部业务时间
*/
@ApiField("out_biz_time")
private String outBizTime;
/**
* 蚂蚁统一会员ID
*/
@ApiField("user_id")
private String userId;
public String getActivityCode() {
return this.activityCode;
}
public void setActivityCode(String activityCode) {
this.activityCode = activityCode;
}
public String getBizExt() {
return this.bizExt;
}
public void setBizExt(String bizExt) {
this.bizExt = bizExt;
}
public String getOutBizTime() {
return this.outBizTime;
}
public void setOutBizTime(String outBizTime) {
this.outBizTime = outBizTime;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
c022861c5dbc55fe047110e5eccaca35a04e84c6
|
d806df387cd725e3a19ed9590def227cfa6da9a1
|
/sts0121/src/main/java/net/hb/crud/reply/ReplyDTO.java
|
62b1d76527f5711e9d1f6d1219be77c109fff334
|
[] |
no_license
|
JIN-0616/spring
|
0c0f433eca2de69e97b6a5296a2b555988052da8
|
6afa7a30f4b6ebb0fa4cb895d9f4299e9bef89b3
|
refs/heads/master
| 2020-04-21T11:57:07.800736
| 2019-02-13T10:44:54
| 2019-02-13T10:44:54
| 169,545,559
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,038
|
java
|
package net.hb.crud.reply;
public class ReplyDTO {
private int rhobby_idx;
private String rwriter;
private String rmemo;
private int hobby_idx;
private int rcnt;
private int rrn;
private int seq;
public int getSeq() {
return seq;
}
public void setSeq(int seq) {
this.seq = seq;
}
public int getRrn() {
return rrn;
}
public void setRrn(int rrn) {
this.rrn = rrn;
}
public int getRcnt() {
return rcnt;
}
public void setRcnt(int rcnt) {
this.rcnt = rcnt;
}
public int getRhobby_idx() {
return rhobby_idx;
}
public void setRhobby_idx(int rhobby_idx) {
this.rhobby_idx = rhobby_idx;
}
public String getRwriter() {
return rwriter;
}
public void setRwriter(String rwriter) {
this.rwriter = rwriter;
}
public String getRmemo() {
return rmemo;
}
public void setRmemo(String rmemo) {
this.rmemo = rmemo;
}
public int getHobby_idx() {
return hobby_idx;
}
public void setHobby_idx(int hobby_idx) {
this.hobby_idx = hobby_idx;
}
}
|
[
"kgitbank@DESKTOP-U6AB831"
] |
kgitbank@DESKTOP-U6AB831
|
bf1f33829080a3e8c84bb60ea4a3401f3ccf01a7
|
5f8109fa4637634b458c196967e0a8d9a0bb2c3c
|
/workspace_07_08/java_02/src/day17/Book.java
|
6ce583a1be2c2aa039fb7b27c68c60e172931d7f
|
[] |
no_license
|
mini222333/mini
|
72e7a9f2126dfdd0b5dde551cfaa4d375c0256d2
|
787b02e0d4db27a208a3e2cac652711898ed2cbe
|
refs/heads/master
| 2020-07-29T09:31:16.776045
| 2019-09-20T08:54:40
| 2019-09-20T08:54:40
| 209,746,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,254
|
java
|
package day17;
public class Book<T,P> {
T title;
P price;
public Book() {}
public Book(T title, P price) {
super();
this.title = title;
this.price = price;
}
public T getTitle() {
return title;
}
public void setTitle(T title) {
this.title = title;
}
public P getPrice() {
return price;
}
public void setPrice(P price) {
this.price = price;
}
@Override
public String toString() {
return "Book [title=" + title + ", price=" + price + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((price == null) ? 0 : price.hashCode());
result = prime * result + ((title == null) ? 0 : title.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Book other = (Book) obj;
if (price == null) {
if (other.price != null)
return false;
} else if (!price.equals(other.price))
return false;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
return true;
}
}
|
[
"user@DESKTOP-V882PTR"
] |
user@DESKTOP-V882PTR
|
3ca89e32ca7ad1c2a84fe1dd73bd3437fb7858f9
|
17756c8000d020769bb3453815aed72625d7b842
|
/src/test/java/org/docksidestage/compatible10x/dbflute/whitebox/cbean/innerjoin/WxCBInnerJoinManualTest.java
|
10984e527f372db2f7688e9a9612e40a162d6917
|
[
"Apache-2.0"
] |
permissive
|
dbflute-test/dbflute-test-option-compatible10x
|
26224ba8a1e642933cc44ea04873c2e8d8b848a7
|
4f4463e91fd2fa1b25f5a964c4d187c801571803
|
refs/heads/master
| 2023-09-01T04:52:26.922328
| 2023-08-17T03:36:08
| 2023-08-17T03:36:08
| 24,925,079
| 0
| 0
|
Apache-2.0
| 2022-05-25T06:14:18
| 2014-10-08T04:49:28
|
Java
|
UTF-8
|
Java
| false
| false
| 7,357
|
java
|
package org.docksidestage.compatible10x.dbflute.whitebox.cbean.innerjoin;
import org.dbflute.cbean.result.ListResultBean;
import org.dbflute.cbean.scoping.UnionQuery;
import org.dbflute.util.Srl;
import org.docksidestage.compatible10x.dbflute.cbean.MemberCB;
import org.docksidestage.compatible10x.dbflute.exbhv.MemberBhv;
import org.docksidestage.compatible10x.dbflute.exentity.Member;
import org.docksidestage.compatible10x.unit.UnitContainerTestCase;
/**
* @author jflute
* @since 0.6.0 (2008/01/16 Wednesday)
*/
public class WxCBInnerJoinManualTest extends UnitContainerTestCase {
// ===================================================================================
// Attribute
// =========
private MemberBhv memberBhv;
// ===================================================================================
// Basic
// =====
public void test_innerJoin_query() {
// ## Arrange ##
int countAll = memberBhv.selectCount(new MemberCB());
MemberCB cb = new MemberCB();
cb.getSqlClause().disableInnerJoinAutoDetect();
cb.query().queryMemberStatus().setDisplayOrder_Equal(1);
cb.query().queryMemberStatus().innerJoin();
// ## Act ##
ListResultBean<Member> memberList = memberBhv.selectList(cb);
// ## Assert ##
assertTrue(cb.toDisplaySql().contains("inner join"));
assertFalse(cb.toDisplaySql().contains("left outer join"));
assertFalse(memberList.isEmpty());
assertNotSame(countAll, memberList.size());
assertTrue(countAll > memberList.size());
for (Member member : memberList) {
log(ln() + member.toStringWithRelation());
}
}
public void test_innerJoin_setupSelect() {
// ## Arrange ##
int countAll = memberBhv.selectCount(new MemberCB());
MemberCB cb = new MemberCB();
cb.getSqlClause().disableInnerJoinAutoDetect();
cb.setupSelect_MemberStatus();
cb.setupSelect_MemberWithdrawalAsOne();
cb.query().queryMemberWithdrawalAsOne().innerJoin();
// ## Act ##
ListResultBean<Member> memberList = memberBhv.selectList(cb);
// ## Assert ##
assertTrue(cb.toDisplaySql().contains("inner join"));
assertTrue(cb.toDisplaySql().contains("left outer join"));
assertFalse(memberList.isEmpty());
assertNotSame(countAll, memberList.size());
assertTrue(countAll > memberList.size());
for (Member member : memberList) {
assertNotNull(member.getMemberWithdrawalAsOne());
log(ln() + member.toStringWithRelation());
}
}
public void test_innerJoin_setupSelect_before() {
// ## Arrange ##
int countAll = memberBhv.selectCount(new MemberCB());
MemberCB cb = new MemberCB();
cb.getSqlClause().disableInnerJoinAutoDetect();
cb.setupSelect_MemberWithdrawalAsOne();
cb.query().queryMemberWithdrawalAsOne().innerJoin();
cb.setupSelect_MemberStatus();
// ## Act ##
ListResultBean<Member> memberList = memberBhv.selectList(cb);
// ## Assert ##
assertTrue(cb.toDisplaySql().contains("inner join"));
assertTrue(cb.toDisplaySql().contains("left outer join"));
assertFalse(memberList.isEmpty());
assertNotSame(countAll, memberList.size());
assertTrue(countAll > memberList.size());
for (Member member : memberList) {
assertNotNull(member.getMemberWithdrawalAsOne());
log(member.toStringWithRelation());
}
}
public void test_innerJoin_inline_query() {
// ## Arrange ##
int countAll = memberBhv.selectCount(new MemberCB());
MemberCB cb = new MemberCB();
cb.getSqlClause().disableInnerJoinAutoDetect();
cb.query().queryMemberStatus().inline().setDisplayOrder_Equal(1);
cb.query().queryMemberStatus().innerJoin();
// ## Act ##
ListResultBean<Member> memberList = memberBhv.selectList(cb);
// ## Assert ##
assertTrue(cb.toDisplaySql().contains("inner join"));
assertFalse(cb.toDisplaySql().contains("left outer join"));
assertFalse(memberList.isEmpty());
assertNotSame(countAll, memberList.size());
assertTrue(countAll > memberList.size());
for (Member member : memberList) {
log(member.toStringWithRelation());
}
}
// ===================================================================================
// Union
// =====
public void test_innerJoin_union() {
// ## Arrange ##
int countAll = memberBhv.selectCount(new MemberCB());
MemberCB cb = new MemberCB();
cb.getSqlClause().disableInnerJoinAutoDetect();
cb.query().queryMemberStatus().setDisplayOrder_Equal(1);
cb.query().queryMemberStatus().innerJoin();
cb.union(new UnionQuery<MemberCB>() {
public void query(MemberCB unionCB) {
unionCB.query().queryMemberStatus().setDisplayOrder_Equal(2);
}
});
// ## Act ##
ListResultBean<Member> memberList = memberBhv.selectList(cb);
// ## Assert ##
String sql = cb.toDisplaySql();
assertTrue(sql.contains("inner join"));
assertTrue(sql.contains("left outer join")); // independent
assertEquals(1, Srl.count(sql, "inner join"));
assertFalse(memberList.isEmpty());
assertNotSame(countAll, memberList.size());
assertTrue(countAll > memberList.size());
for (Member member : memberList) {
log(member.toStringWithRelation());
}
}
// ===================================================================================
// Nested
// ======
public void test_innerJoin_nested() {
// ## Arrange ##
int countAll;
{
MemberCB cb = new MemberCB();
cb.query().setMemberStatusCode_Equal_Withdrawal();
cb.query().queryMemberWithdrawalAsOne().setWithdrawalReasonCode_IsNotNull();
countAll = memberBhv.selectCount(cb);
}
MemberCB cb = new MemberCB();
cb.query().queryMemberWithdrawalAsOne().queryWithdrawalReason().innerJoin();
// ## Act ##
ListResultBean<Member> memberList = memberBhv.selectList(cb);
// ## Assert ##
assertTrue(cb.toDisplaySql().contains("inner join"));
assertTrue(cb.toDisplaySql().contains("left outer join"));
assertFalse(memberList.isEmpty());
assertEquals(countAll, memberList.size());
for (Member member : memberList) {
log(member.toStringWithRelation());
}
}
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
369983df66ac42bc27beb5dbffd8dee449bb2d96
|
6bdcc2e0e6cddf16b54dfdee29427c91f5bff3fc
|
/dataserver/dataserver.server/src/test/java/com/alibaba/doris/common/router/virtual/VirtualRouterImpl.java
|
8339c5d5f898d2dafca9dc96cf4e22464ab0715e
|
[
"MIT",
"LicenseRef-scancode-public-domain-disclaimer",
"FSFAP",
"Apache-2.0"
] |
permissive
|
Happy-sc/Doris-api
|
2d15185c99243843ec6a275f58c6b5ea281581cc
|
51508ef1b8407ee9c7b4d9f87178e2d653a5ffa2
|
refs/heads/master
| 2021-01-23T15:58:32.067904
| 2017-09-07T10:04:48
| 2017-09-07T10:04:48
| 102,718,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,771
|
java
|
package com.alibaba.doris.common.router.virtual;
import com.alibaba.doris.algorithm.RouteAlgorithm;
import com.alibaba.doris.algorithm.vpm.VpmRouterAlgorithm;
import com.alibaba.doris.common.adminservice.AdminServiceFactory;
import com.alibaba.doris.common.route.VirtualRouter;
/**
* @author ajun Email:jack.yuj@alibaba-inc.com
*/
public class VirtualRouterImpl implements VirtualRouter {
private static VirtualRouterImpl instance = new VirtualRouterImpl();
protected int virtualNum = 100; // default.
protected RouteAlgorithm algorithm;
public static VirtualRouter getInstance() {
return instance;
}
public int findVirtualNode(String key) {
checkInitInstance();
if (isDebug) {
int index = Math.abs(key.hashCode()) % virtualNode.length;
return virtualNode[index];
} else {
return algorithm.getVirtualByKey(key);
}
}
private int[] virtualNode = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
public int getVirtualNum() {
checkInitInstance();
if (isDebug) {
return virtualNode.length;
} else {
return virtualNum;
}
}
public static void setDebug(boolean debug) {
isDebug = debug;
}
private void checkInitInstance() {
if (!isDebug && !isInitialized) {
virtualNum = AdminServiceFactory.getVirtualNumberService().getVirtualNumber();
algorithm = new VpmRouterAlgorithm(1, virtualNum);
isInitialized = true;
}
}
private static boolean isDebug = false;
private boolean isInitialized = false;
}
|
[
"zhihui.li@intel.com"
] |
zhihui.li@intel.com
|
54c28273939128fb2d5893e2794a8196363ff537
|
59093aa1cf57209c2027ddeeec924da7dc6abe5a
|
/ssm_strongpower_web/src/main/java/com/kylin/electricassistsys/tools/sqlfilter/EncryptionReqestWrapper.java
|
ae54dfaf24cb714dbd864cf01b767fcb0ed2f888
|
[] |
no_license
|
wuhuaqiang/SSM
|
70807d50ca32f58fa182b84dfce82a9a40c5c875
|
06bdfcac39f1f37a7e2a2f19cb3866ee387ac586
|
refs/heads/master
| 2020-03-13T18:04:52.893183
| 2019-01-14T05:51:15
| 2019-01-14T05:51:15
| 131,229,168
| 0
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 229
|
java
|
package com.kylin.electricassistsys.tools.sqlfilter;
/**
* @Auther: cwx
* @Date: 2018/6/6 15:26
* @Description:对请求参数进行解密,我现在做的单个参数的解密
*/
public class EncryptionReqestWrapper {
}
|
[
"609676374@qq.com"
] |
609676374@qq.com
|
f0a5bd39065810e0c33015270658d2bbbba54e37
|
4f7283916ce142df67f6278497007632d6ee41d3
|
/src/cec/chronicles/handler/Handler.java
|
3af87d2616d952d03b47bd24b5ec4b66161a87cb
|
[
"MIT"
] |
permissive
|
aeris170/TimeGame
|
913e5c8ff6cb7007bf91c784860355bb954a3a5b
|
d8044531f05e1a5064fd2a11e01b4999d5b9432b
|
refs/heads/master
| 2020-05-07T05:44:30.132984
| 2020-04-27T00:39:56
| 2020-04-27T00:39:56
| 180,282,324
| 5
| 0
|
MIT
| 2020-04-27T00:39:57
| 2019-04-09T04:04:56
|
Java
|
ISO-8859-9
|
Java
| false
| false
| 1,058
|
java
|
package cec.chronicles.handler;
import cec.chronicles.entities.Entity;
import java.awt.Graphics;
import java.util.LinkedList;
/**
* GameObject(Entity) Handler, conventional type.
*
* @author Doğa Oruç
* @version 07.5.2017
*/
public class Handler {
public LinkedList<Entity> object = new LinkedList<Entity>();
/**
* Cycles through the LinkedList
*/
public void tick() {
for (int i = 0; i < object.size(); i++) {
Entity tempObject = object.get(i);
tempObject.tick();
}
}
/**
* Draws every individual object inside the handler to the canvas
*
* @param g
*/
public void render(Graphics g) {
for (int i = 0; i < object.size(); i++) {
Entity tempObject = object.get(i);
tempObject.render(g);
}
}
/**
* Adds a game object(entity) to the handler
*
* @param object
*/
public void addObject(Entity object) {
this.object.add(object);
}
/**
* Removes a game object(entity) from the handler
*
* @param object
*/
public void removeObject(Entity object) {
this.object.remove(object);
}
}
|
[
"aeris170@users.noreply.github.com"
] |
aeris170@users.noreply.github.com
|
f3f88534017cc177f17756e543633278be60c410
|
bf92629bef0dea162c468a9b939dec3ac55ae677
|
/examples/composition/iot/org.xtext.lua.semantics/src-gen/lua_exec/revisitor/operations/lua_exec/StatementOperation.java
|
17b93d369a01804a7e955c4ff90785dee5a6ca17
|
[] |
no_license
|
tdegueul/ale-xbase
|
32db3ee08792e53769971698962a9dcdc80a90a4
|
3f6de93c322367fd78b1d4d23b20a24edba268d3
|
refs/heads/master
| 2021-01-21T21:15:12.645906
| 2018-08-27T13:47:15
| 2018-08-27T13:47:15
| 98,518,635
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 218
|
java
|
package lua_exec.revisitor.operations.lua_exec;
import org.xtext.lua.semantics.model.Environment;
@SuppressWarnings("all")
public interface StatementOperation {
public abstract void execute(final Environment c);
}
|
[
"manuel.leduc@inria.fr"
] |
manuel.leduc@inria.fr
|
1630d5b41017c52edb897c81b66d95d38dd2c0d0
|
d132a32f07cdc583c021e56e61a4befff6228900
|
/src/main/java/net/minecraft/client/renderer/entity/RenderPainting.java
|
094f682bd426b7fe1b9b23e9f4d6f33a44ce9dcc
|
[] |
no_license
|
TechCatOther/um_clean_forge
|
27d80cb6e12c5ed38ab7da33a9dd9e54af96032d
|
b4ddabd1ed7830e75df9267e7255c9e79d1324de
|
refs/heads/master
| 2020-03-22T03:14:54.717880
| 2018-07-02T09:28:10
| 2018-07-02T09:28:10
| 139,421,233
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,111
|
java
|
package net.minecraft.client.renderer.entity;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityPainting;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderPainting extends Render
{
private static final ResourceLocation field_110807_a = new ResourceLocation("textures/painting/paintings_kristoffer_zetterstrand.png");
private static final String __OBFID = "CL_00001018";
public RenderPainting(RenderManager p_i46150_1_)
{
super(p_i46150_1_);
}
public void doRender(EntityPainting entity, double x, double y, double z, float p_76986_8_, float partialTicks)
{
GlStateManager.pushMatrix();
GlStateManager.translate(x, y, z);
GlStateManager.rotate(180.0F - p_76986_8_, 0.0F, 1.0F, 0.0F);
GlStateManager.enableRescaleNormal();
this.bindEntityTexture(entity);
EntityPainting.EnumArt enumart = entity.art;
float f2 = 0.0625F;
GlStateManager.scale(f2, f2, f2);
this.func_77010_a(entity, enumart.sizeX, enumart.sizeY, enumart.offsetX, enumart.offsetY);
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, p_76986_8_, partialTicks);
}
protected ResourceLocation func_180562_a(EntityPainting p_180562_1_)
{
return field_110807_a;
}
private void func_77010_a(EntityPainting p_77010_1_, int p_77010_2_, int p_77010_3_, int p_77010_4_, int p_77010_5_)
{
float f = (float)(-p_77010_2_) / 2.0F;
float f1 = (float)(-p_77010_3_) / 2.0F;
float f2 = 0.5F;
float f3 = 0.75F;
float f4 = 0.8125F;
float f5 = 0.0F;
float f6 = 0.0625F;
float f7 = 0.75F;
float f8 = 0.8125F;
float f9 = 0.001953125F;
float f10 = 0.001953125F;
float f11 = 0.7519531F;
float f12 = 0.7519531F;
float f13 = 0.0F;
float f14 = 0.0625F;
for (int i1 = 0; i1 < p_77010_2_ / 16; ++i1)
{
for (int j1 = 0; j1 < p_77010_3_ / 16; ++j1)
{
float f15 = f + (float)((i1 + 1) * 16);
float f16 = f + (float)(i1 * 16);
float f17 = f1 + (float)((j1 + 1) * 16);
float f18 = f1 + (float)(j1 * 16);
this.func_77008_a(p_77010_1_, (f15 + f16) / 2.0F, (f17 + f18) / 2.0F);
float f19 = (float)(p_77010_4_ + p_77010_2_ - i1 * 16) / 256.0F;
float f20 = (float)(p_77010_4_ + p_77010_2_ - (i1 + 1) * 16) / 256.0F;
float f21 = (float)(p_77010_5_ + p_77010_3_ - j1 * 16) / 256.0F;
float f22 = (float)(p_77010_5_ + p_77010_3_ - (j1 + 1) * 16) / 256.0F;
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.startDrawingQuads();
worldrenderer.setNormal(0.0F, 0.0F, -1.0F);
worldrenderer.addVertexWithUV((double)f15, (double)f18, (double)(-f2), (double)f20, (double)f21);
worldrenderer.addVertexWithUV((double)f16, (double)f18, (double)(-f2), (double)f19, (double)f21);
worldrenderer.addVertexWithUV((double)f16, (double)f17, (double)(-f2), (double)f19, (double)f22);
worldrenderer.addVertexWithUV((double)f15, (double)f17, (double)(-f2), (double)f20, (double)f22);
worldrenderer.setNormal(0.0F, 0.0F, 1.0F);
worldrenderer.addVertexWithUV((double)f15, (double)f17, (double)f2, (double)f3, (double)f5);
worldrenderer.addVertexWithUV((double)f16, (double)f17, (double)f2, (double)f4, (double)f5);
worldrenderer.addVertexWithUV((double)f16, (double)f18, (double)f2, (double)f4, (double)f6);
worldrenderer.addVertexWithUV((double)f15, (double)f18, (double)f2, (double)f3, (double)f6);
worldrenderer.setNormal(0.0F, 1.0F, 0.0F);
worldrenderer.addVertexWithUV((double)f15, (double)f17, (double)(-f2), (double)f7, (double)f9);
worldrenderer.addVertexWithUV((double)f16, (double)f17, (double)(-f2), (double)f8, (double)f9);
worldrenderer.addVertexWithUV((double)f16, (double)f17, (double)f2, (double)f8, (double)f10);
worldrenderer.addVertexWithUV((double)f15, (double)f17, (double)f2, (double)f7, (double)f10);
worldrenderer.setNormal(0.0F, -1.0F, 0.0F);
worldrenderer.addVertexWithUV((double)f15, (double)f18, (double)f2, (double)f7, (double)f9);
worldrenderer.addVertexWithUV((double)f16, (double)f18, (double)f2, (double)f8, (double)f9);
worldrenderer.addVertexWithUV((double)f16, (double)f18, (double)(-f2), (double)f8, (double)f10);
worldrenderer.addVertexWithUV((double)f15, (double)f18, (double)(-f2), (double)f7, (double)f10);
worldrenderer.setNormal(-1.0F, 0.0F, 0.0F);
worldrenderer.addVertexWithUV((double)f15, (double)f17, (double)f2, (double)f12, (double)f13);
worldrenderer.addVertexWithUV((double)f15, (double)f18, (double)f2, (double)f12, (double)f14);
worldrenderer.addVertexWithUV((double)f15, (double)f18, (double)(-f2), (double)f11, (double)f14);
worldrenderer.addVertexWithUV((double)f15, (double)f17, (double)(-f2), (double)f11, (double)f13);
worldrenderer.setNormal(1.0F, 0.0F, 0.0F);
worldrenderer.addVertexWithUV((double)f16, (double)f17, (double)(-f2), (double)f12, (double)f13);
worldrenderer.addVertexWithUV((double)f16, (double)f18, (double)(-f2), (double)f12, (double)f14);
worldrenderer.addVertexWithUV((double)f16, (double)f18, (double)f2, (double)f11, (double)f14);
worldrenderer.addVertexWithUV((double)f16, (double)f17, (double)f2, (double)f11, (double)f13);
tessellator.draw();
}
}
}
private void func_77008_a(EntityPainting p_77008_1_, float p_77008_2_, float p_77008_3_)
{
int i = MathHelper.floor_double(p_77008_1_.posX);
int j = MathHelper.floor_double(p_77008_1_.posY + (double)(p_77008_3_ / 16.0F));
int k = MathHelper.floor_double(p_77008_1_.posZ);
EnumFacing enumfacing = p_77008_1_.field_174860_b;
if (enumfacing == EnumFacing.NORTH)
{
i = MathHelper.floor_double(p_77008_1_.posX + (double)(p_77008_2_ / 16.0F));
}
if (enumfacing == EnumFacing.WEST)
{
k = MathHelper.floor_double(p_77008_1_.posZ - (double)(p_77008_2_ / 16.0F));
}
if (enumfacing == EnumFacing.SOUTH)
{
i = MathHelper.floor_double(p_77008_1_.posX - (double)(p_77008_2_ / 16.0F));
}
if (enumfacing == EnumFacing.EAST)
{
k = MathHelper.floor_double(p_77008_1_.posZ + (double)(p_77008_2_ / 16.0F));
}
int l = this.renderManager.worldObj.getCombinedLight(new BlockPos(i, j, k), 0);
int i1 = l % 65536;
int j1 = l / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)i1, (float)j1);
GlStateManager.color(1.0F, 1.0F, 1.0F);
}
protected ResourceLocation getEntityTexture(Entity entity)
{
return this.func_180562_a((EntityPainting)entity);
}
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float partialTicks)
{
this.doRender((EntityPainting)entity, x, y, z, p_76986_8_, partialTicks);
}
}
|
[
"alone.inbox@gmail.com"
] |
alone.inbox@gmail.com
|
472fdf95dbe7945b3a6fce4895868d261871f790
|
8f8dfbc9f3543a12934bb652d141100d315f1f78
|
/client/src/test/java/org/ehrbase/client/classgenerator/examples/openereactcarecomposition/definition/SepsisScreeningLikelySourceOfInfectionElement.java
|
6ecfc892d08071f0278f4767bc15439c70d1227d
|
[
"Apache-2.0"
] |
permissive
|
yasir2000/openEHR_SDK
|
f36081d2d507809fc2b5dcd2c8d239497c133148
|
31605a69a982be2f1f10e24be92f39171059b93d
|
refs/heads/master
| 2023-08-06T00:32:41.467027
| 2021-07-13T12:45:52
| 2021-07-13T12:45:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,569
|
java
|
package org.ehrbase.client.classgenerator.examples.openereactcarecomposition.definition;
import com.nedap.archie.rm.archetyped.FeederAudit;
import java.util.List;
import javax.annotation.processing.Generated;
import org.ehrbase.client.annotations.Choice;
import org.ehrbase.client.annotations.Entity;
import org.ehrbase.client.annotations.Path;
import org.ehrbase.client.classgenerator.interfaces.LocatableEntity;
@Entity
@Generated(
value = "org.ehrbase.client.classgenerator.ClassGenerator",
date = "2021-02-16T12:59:53.590779900+01:00",
comments = "https://github.com/ehrbase/openEHR_SDK Version: null"
)
public class SepsisScreeningLikelySourceOfInfectionElement implements LocatableEntity {
/**
* Path: open_eREACT-Care/Assessment/Sepsis/Sepsis screening/Any event/feeder_audit
*/
@Path("/feeder_audit")
private FeederAudit feederAudit;
/**
* Path: open_eREACT-Care/Assessment/Sepsis/Sepsis screening/Any event/Likely source of infection
* Description: Used to record details of source of any infection from the sepsis screening tool.
*/
@Path("/value")
@Choice
private List<SepsisScreeningLikelySourceOfInfectionChoice> value;
public void setFeederAudit(FeederAudit feederAudit) {
this.feederAudit = feederAudit;
}
public FeederAudit getFeederAudit() {
return this.feederAudit ;
}
public void setValue(List<SepsisScreeningLikelySourceOfInfectionChoice> value) {
this.value = value;
}
public List<SepsisScreeningLikelySourceOfInfectionChoice> getValue() {
return this.value ;
}
}
|
[
"s.spiska@symeda.de"
] |
s.spiska@symeda.de
|
f7eea6a4d525b8373a56a716fbd7a80cf1dce512
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_f88f813667a30356ae6b26b48f40ce08de9884fd/Mapper/35_f88f813667a30356ae6b26b48f40ce08de9884fd_Mapper_s.java
|
49506ba56835a98aa63d4a2756625d440a718657
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,607
|
java
|
package com.github.jmkgreen.morphia.mapping;
import com.github.jmkgreen.morphia.EntityInterceptor;
import com.github.jmkgreen.morphia.Key;
import com.github.jmkgreen.morphia.converters.DefaultConverters;
import com.github.jmkgreen.morphia.mapping.cache.EntityCache;
import com.mongodb.DBObject;
import com.mongodb.DBRef;
import java.util.Collection;
import java.util.Map;
/**
* Maps POJOs and MongoDB DBObjects. Holds a list of {@link EntityInterceptor}s
* that are invoked during lifecycle phases across all mapped entity classes.
* <p/>
* Implementations should be thread-safe.
*/
@SuppressWarnings("rawtypes")
public interface Mapper {
/**
* The @{@link com.github.jmkgreen.morphia.annotations.Id} field name that is stored with mongodb.
*/
String ID_KEY = "_id";
/**
* Special name that can never be used. Used as default for some fields to indicate default state.
*/
String IGNORED_FIELDNAME = ".";
/**
* Special field used by morphia to support various possibly loading issues; will be replaced when discriminators are implemented to support polymorphism
*/
String CLASS_NAME_FIELDNAME = "className";
void addInterceptor(EntityInterceptor ei);
Collection<EntityInterceptor> getInterceptors();
MapperOptions getOptions();
void setOptions(MapperOptions options);
boolean isMapped(Class c);
MappedClass addMappedClass(Class c);
MappedClass addMappedClass(MappedClass mc);
Collection<MappedClass> getMappedClasses();
Map<String, MappedClass> getMCMap();
MappedClass getMappedClass(Object obj);
String getCollectionName(Object object);
void updateKeyInfo(Object entity, DBObject dbObj, EntityCache cache);
Object fromDBObject(Class entityClass, DBObject dbObject, EntityCache cache);
Object toMongoObject(MappedField mf, MappedClass mc, Object value);
Object getId(Object entity);
<T> Key<T> getKey(T entity);
DBObject toDBObject(Object entity);
DBObject toDBObject(Object entity, Map<Object, DBObject> involvedObjects);
// TODO might be better to expose via some "options" object?
DefaultConverters getConverters();
EntityCache createEntityCache();
<T> Key<T> refToKey(DBRef ref);
DBRef keyToRef(Key key);
String updateKind(Key key);
Class<?> getClassFromKind(String kind);
boolean isCached(Class<?> clazz);
Object cacheClass(Class<?> clazz, Object instance);
Object getCachedClass(Class<?> clazz);
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1f7b9325b0fdf70cf674f0d19b2ca299b4f862d0
|
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
|
/ossopenapi/src/main/java/com/jdcloud/sdk/service/ossopenapi/model/GetHistoricalReplicatTaskResponse.java
|
1290a19b3b9a4c286247ec6215b86bfd49da92ba
|
[
"Apache-2.0"
] |
permissive
|
jdcloud-api/jdcloud-sdk-java
|
3fec9cf552693520f07b43a1e445954de60e34a0
|
bcebe28306c4ccc5b2b793e1a5848b0aac21b910
|
refs/heads/master
| 2023-07-25T07:03:36.682248
| 2023-07-25T06:54:39
| 2023-07-25T06:54:39
| 126,275,669
| 47
| 61
|
Apache-2.0
| 2023-09-07T08:41:24
| 2018-03-22T03:41:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,133
|
java
|
/*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* history replicator task
* 同步历史数据API
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.ossopenapi.model;
import com.jdcloud.sdk.service.JdcloudResponse;
/**
* 根据bucket名称获取该bucket下的同步任务
*/
public class GetHistoricalReplicatTaskResponse extends JdcloudResponse<GetHistoricalReplicatTaskResult> implements java.io.Serializable {
private static final long serialVersionUID = 1L;
}
|
[
"tancong@jd.com"
] |
tancong@jd.com
|
96277178916dcd0caa5af9d29b564cb98e4b634b
|
fd01e679faf3f95c00145f2ed464b5e2a5acb2c5
|
/day10/Q2.java
|
c01d81fef0c36cd604b764d90795edfc11ec2c7d
|
[] |
no_license
|
yusuke-as/503javalessons
|
b2207f5606d7c99686c12123f1eb31fde57ecd6f
|
8c1d67eae2cdfcfea75497d8388eca432ff487f6
|
refs/heads/master
| 2020-06-23T19:20:08.868777
| 2019-08-22T02:48:58
| 2019-08-22T02:48:58
| 198,726,637
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 323
|
java
|
import java.util.*;
public class Q2{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
System.out.print("整数Aを入力>>");
int A=sc.nextInt();
System.out.print("整数Bを入力>>");
int B=sc.nextInt();
for (; A>=B ; A--) {
if(A%2==0){
System.out.print(A+" ");
}
}
}
}
|
[
"test@test"
] |
test@test
|
a7648d422173268038aba98cb6adfd7a91db451a
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipsejdt_cluster/56926/src_1.java
|
5724f92822f11ac57f27692ea9af4c9a78d6eb0b
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,200
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.core.search.matching;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.internal.compiler.util.SimpleSet;
public class DeclarationOfAccessedFieldsPattern extends FieldPattern {
protected IJavaElement enclosingElement;
protected SimpleSet knownFields;
public DeclarationOfAccessedFieldsPattern(IJavaElement enclosingElement) {
super(null, null, null, null, null, IJavaSearchConstants.REFERENCES, R_PATTERN_MATCH);
this.enclosingElement = enclosingElement;
this.knownFields = new SimpleSet();
((InternalSearchPattern)this).mustResolve = true;
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
9565dd2543cd9f7804c97a250116a5669830bd10
|
269bce0bf0e23f5e5f7b5d31167c8a804b62ae52
|
/comparator-tools/modagame/MODAGAME_hppc_0.6.1/src.main.java/com/carrotsearch/hppc/ShortLongAssociativeContainer.java
|
6f98bc0145534e715b88ed9f7d7bdc126e66e16f
|
[] |
no_license
|
acapulco-spl/acapulco_replication_package
|
5c4378b7662d6aa10f11f52a9fa8793107b34d6d
|
7de4d9a96c11977f0cd73d761a4f8af1e0e064e0
|
refs/heads/master
| 2023-04-15T17:40:14.003166
| 2022-04-13T08:37:11
| 2022-04-13T08:37:11
| 306,005,002
| 3
| 1
| null | 2022-04-11T17:35:06
| 2020-10-21T11:39:59
|
Java
|
UTF-8
|
Java
| false
| false
| 4,153
|
java
|
package com.carrotsearch.hppc;
import java.util.Iterator;
import com.carrotsearch.hppc.cursors.*;
import com.carrotsearch.hppc.predicates.*;
import com.carrotsearch.hppc.procedures.*;
/**
* An associative container (alias: map, dictionary) from keys to (one or possibly more) values.
* Object keys must fulfill the contract of {@link Object#hashCode()} and {@link Object#equals(Object)}.
*
* <p>Note that certain associative containers (like multimaps) may return the same key-value pair
* multiple times from iterators.</p>
*
* @see ShortContainer
*/
@javax.annotation.Generated(date = "2014-09-08T10:42:29+0200", value = "HPPC generated from: ShortLongAssociativeContainer.java")
public interface ShortLongAssociativeContainer
extends Iterable<ShortLongCursor>
{
/**
* Returns a cursor over the entries (key-value pairs) in this map. The iterator is
* implemented as a cursor and it returns <b>the same cursor instance</b> on every
* call to {@link Iterator#next()}. To read the current key and value use the cursor's
* public fields. An example is shown below.
* <pre>
* for (IntShortCursor c : intShortMap)
* {
* System.out.println("index=" + c.index
* + " key=" + c.key
* + " value=" + c.value);
* }
* </pre>
*
* <p>The <code>index</code> field inside the cursor gives the internal index inside
* the container's implementation. The interpretation of this index depends on
* to the container.
*/
@Override
public Iterator<ShortLongCursor> iterator();
/**
* Returns <code>true</code> if this container has an association to a value for
* the given key.
*/
public boolean containsKey(short key);
/**
* @return Returns the current size (number of assigned keys) in the container.
*/
public int size();
/**
* @return Return <code>true</code> if this hash map contains no assigned keys.
*/
public boolean isEmpty();
/**
* Removes all keys (and associated values) present in a given container. An alias to:
* <pre>
* keys().removeAll(container)
* </pre>
* but with no additional overhead.
*
* @return Returns the number of elements actually removed as a result of this call.
*/
public int removeAll(ShortContainer container);
/**
* Removes all keys (and associated values) for which the predicate returns <code>true</code>.
* An alias to:
* <pre>
* keys().removeAll(container)
* </pre>
* but with no additional overhead.
*
* @return Returns the number of elements actually removed as a result of this call.
*/
public int removeAll(ShortPredicate predicate);
/**
* Applies a given procedure to all keys-value pairs in this container. Returns the argument (any
* subclass of {@link ShortLongProcedure}. This lets the caller to call methods of the argument
* by chaining the call (even if the argument is an anonymous type) to retrieve computed values,
* for example.
*/
public <T extends ShortLongProcedure> T forEach(T procedure);
/**
* Clear all keys and values in the container.
*/
public void clear();
/**
* Returns a collection of keys of this container. The returned collection is a view
* over the key set and any modifications (if allowed) introduced to the collection will
* propagate to the associative container immediately.
*/
public ShortCollection keys();
/**
* Returns a container view of all values present in this container. The returned collection is a view
* over the key set and any modifications (if allowed) introduced to the collection will
* propagate to the associative container immediately.
*/
public LongContainer values();
}
|
[
"daniel_str@gmx.de"
] |
daniel_str@gmx.de
|
f037e301b4fc5835a9b54aa36787afc6a42e4626
|
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
|
/src/main/java/com/alipay/api/response/KoubeiCateringPosPracticeDeleteResponse.java
|
95fa515849df095077ab31858c7ca455cbf77a37
|
[
"Apache-2.0"
] |
permissive
|
cc-shifo/alipay-sdk-java-all
|
38b23cf946b73768981fdeee792e3dae568da48c
|
938d6850e63160e867d35317a4a00ed7ba078257
|
refs/heads/master
| 2022-12-22T14:06:26.961978
| 2020-09-23T04:00:10
| 2020-09-23T04:00:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.catering.pos.practice.delete response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiCateringPosPracticeDeleteResponse extends AlipayResponse {
private static final long serialVersionUID = 7265214237386657953L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
2876d6222ccdfea48a256bd50ef9cef324683d28
|
b765ff986f0cd8ae206fde13105321838e246a0a
|
/Inspect/app/src/main/java/com/growingio_rewriter/b/b/a/p.java
|
bdf4a52868c3a62649684c57025c1ddfdb6a5d0a
|
[] |
no_license
|
piece-the-world/inspect
|
fe3036409b20ba66343815c3c5c9f4b0b768c355
|
a660dd65d7f40501d95429f8d2b126bd8f59b8db
|
refs/heads/master
| 2020-11-29T15:28:39.406874
| 2016-10-09T06:24:32
| 2016-10-09T06:24:32
| 66,539,462
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.growingio.b.b.a;
import com.growingio.b.b.a.v;
import com.growingio.b.b.a.x;
import com.growingio.b.b.e;
import com.growingio.b.t;
public class p
extends v {
private t b = null;
public p(String string) {
super(string);
}
public void a(t t2) {
this.b = t2;
}
public t c() {
return this.b;
}
@Override
public void a(x x2) throws e {
x2.a(this);
}
}
|
[
"taochao@corp.netease.com"
] |
taochao@corp.netease.com
|
d6f5a0152b8ebc4eac4ddcf656d69bf3da61eecf
|
086401d50df124164bc8c914c1d5b0710a0effb4
|
/jeecms/src/com/jeecms/cms/action/front/TagAct.java
|
3544f9cfb4ef5abcbb0f0b3f3dfeb8592f46875b
|
[] |
no_license
|
leoRui/jeecms
|
2ba6453e8c4cfdec1b816a0d971e433c6964d97d
|
dcba632bd340f51beeaa761ebba614102d0f5282
|
refs/heads/master
| 2021-01-11T04:41:57.276283
| 2016-10-17T07:24:56
| 2016-10-17T07:24:56
| 71,110,852
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,597
|
java
|
package com.jeecms.cms.action.front;
import static com.jeecms.cms.Constants.TPLDIR_SPECIAL;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.jeecms.cms.entity.main.CmsSite;
import com.jeecms.cms.entity.main.ContentTag;
import com.jeecms.cms.manager.main.ContentTagMng;
import com.jeecms.cms.web.CmsUtils;
import com.jeecms.cms.web.FrontUtils;
@Controller
public class TagAct {
public static final String TAGS_INDEX = "tpl.tagIndex";
public static final String TAGS_DETAIL = "tpl.tagDetail";
@RequestMapping(value = "/tag*.jspx", method = RequestMethod.GET)
public String index(HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
FrontUtils.frontData(request, model, site);
FrontUtils.frontPageData(request, model);
return FrontUtils.getTplPath(request, site.getSolutionPath(),
TPLDIR_SPECIAL, TAGS_INDEX);
}
@RequestMapping(value = "/tag/{path}.jspx", method = RequestMethod.GET)
public String tags(@PathVariable String path, HttpServletRequest request,
HttpServletResponse response, ModelMap model) {
CmsSite site = CmsUtils.getSite(request);
if (StringUtils.isBlank(path)) {
return FrontUtils.pageNotFound(request, response, model);
}
int index = path.indexOf("_");
int pageNo, id;
try {
if (index != -1) {
id = Integer.valueOf(path.substring(0, index));
pageNo = Integer.valueOf(path.substring(index + 1, path
.length()));
} else {
id = Integer.valueOf(path);
pageNo = 1;
}
} catch (NumberFormatException e) {
return FrontUtils.pageNotFound(request, response, model);
}
ContentTag tag = contentTagMng.findById(id);
if (tag == null) {
return FrontUtils.pageNotFound(request, response, model);
}
model.addAttribute("tag", tag);
model.addAttribute(FrontUtils.PAGE_NO, pageNo);
FrontUtils.frontData(request, model, site);
FrontUtils.frontPageData(request, model);
return FrontUtils.getTplPath(request, site.getSolutionPath(),
TPLDIR_SPECIAL, TAGS_DETAIL);
}
@Autowired
private ContentTagMng contentTagMng;
}
|
[
"Administrator@USERUSE-5P6AB6M"
] |
Administrator@USERUSE-5P6AB6M
|
113193e8a3fe81486b22b321a3aa9dbad6a78ef6
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/sources/com/google/android/gms/internal/ads/zzayf.java
|
cce22a14c05d93724600571f069347f43951d5d4
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,907
|
java
|
package com.google.android.gms.internal.ads;
import com.google.android.gms.internal.ads.zzbbo.zzb;
import com.google.android.gms.internal.ads.zzbbo.zze;
import java.util.List;
public final class zzayf extends zzbbo<zzayf, zza> implements zzbcw {
private static volatile zzbdf<zzayf> zzakh;
private static final zzayf zzdmt = new zzayf();
private int zzdlq;
private String zzdmr = "";
private zzbbt<zzaxp> zzdms = zzadd();
public static final class zza extends com.google.android.gms.internal.ads.zzbbo.zza<zzayf, zza> implements zzbcw {
private zza() {
super(zzayf.zzdmt);
}
public final zza zzb(zzaxp zzaxp) {
zzadh();
((zzayf) this.zzdtx).zza(zzaxp);
return this;
}
public final zza zzej(String str) {
zzadh();
((zzayf) this.zzdtx).zzei(str);
return this;
}
}
static {
zzbbo.zza(zzayf.class, zzdmt);
}
private zzayf() {
}
private final void zza(zzaxp zzaxp) {
if (zzaxp == null) {
throw new NullPointerException();
}
if (!this.zzdms.zzaay()) {
zzbbt zzbbt = this.zzdms;
int size = zzbbt.size();
this.zzdms = zzbbt.zzbm(size == 0 ? 10 : size << 1);
}
this.zzdms.add(zzaxp);
}
public static zza zzaam() {
return (zza) ((com.google.android.gms.internal.ads.zzbbo.zza) zzdmt.zza(zze.zzdue, null, null));
}
private final void zzei(String str) {
if (str == null) {
throw new NullPointerException();
}
this.zzdmr = str;
}
protected final Object zza(int i, Object obj, Object obj2) {
switch (zzayg.zzakf[i - 1]) {
case 1:
return new zzayf();
case 2:
return new zza();
case 3:
Object[] objArr = new Object[]{"zzdlq", "zzdmr", "zzdms", zzaxp.class};
return zza(zzdmt, "\u0000\u0002\u0000\u0001\u0001\u0002\u0002\u0003\u0000\u0001\u0000\u0001Ȉ\u0002\u001b", objArr);
case 4:
return zzdmt;
case 5:
zzbdf zzbdf = zzakh;
if (zzbdf != null) {
return zzbdf;
}
Object obj3;
synchronized (zzayf.class) {
obj3 = zzakh;
if (obj3 == null) {
obj3 = new zzb(zzdmt);
zzakh = obj3;
}
}
return obj3;
case 6:
return Byte.valueOf((byte) 1);
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
public final List<zzaxp> zzaal() {
return this.zzdms;
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
5c26072ee38f26c70b2656221e65462f5be3c5e3
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/java-msf4j/generated/src/gen/java/org/openapitools/model/ComDayCqWcmCoreImplEventPagePostProcessorInfo.java
|
26cf45de56e49ec0050b745bc885a1b14829e39e
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 4,052
|
java
|
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ComDayCqWcmCoreImplEventPagePostProcessorProperties;
/**
* ComDayCqWcmCoreImplEventPagePostProcessorInfo
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen", date = "2019-08-05T00:54:29.762Z[GMT]")
public class ComDayCqWcmCoreImplEventPagePostProcessorInfo {
@JsonProperty("pid")
private String pid = null;
@JsonProperty("title")
private String title = null;
@JsonProperty("description")
private String description = null;
@JsonProperty("properties")
private ComDayCqWcmCoreImplEventPagePostProcessorProperties properties = null;
public ComDayCqWcmCoreImplEventPagePostProcessorInfo pid(String pid) {
this.pid = pid;
return this;
}
/**
* Get pid
* @return pid
**/
@ApiModelProperty(value = "")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public ComDayCqWcmCoreImplEventPagePostProcessorInfo title(String title) {
this.title = title;
return this;
}
/**
* Get title
* @return title
**/
@ApiModelProperty(value = "")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public ComDayCqWcmCoreImplEventPagePostProcessorInfo description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@ApiModelProperty(value = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ComDayCqWcmCoreImplEventPagePostProcessorInfo properties(ComDayCqWcmCoreImplEventPagePostProcessorProperties properties) {
this.properties = properties;
return this;
}
/**
* Get properties
* @return properties
**/
@ApiModelProperty(value = "")
public ComDayCqWcmCoreImplEventPagePostProcessorProperties getProperties() {
return properties;
}
public void setProperties(ComDayCqWcmCoreImplEventPagePostProcessorProperties properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComDayCqWcmCoreImplEventPagePostProcessorInfo comDayCqWcmCoreImplEventPagePostProcessorInfo = (ComDayCqWcmCoreImplEventPagePostProcessorInfo) o;
return Objects.equals(this.pid, comDayCqWcmCoreImplEventPagePostProcessorInfo.pid) &&
Objects.equals(this.title, comDayCqWcmCoreImplEventPagePostProcessorInfo.title) &&
Objects.equals(this.description, comDayCqWcmCoreImplEventPagePostProcessorInfo.description) &&
Objects.equals(this.properties, comDayCqWcmCoreImplEventPagePostProcessorInfo.properties);
}
@Override
public int hashCode() {
return Objects.hash(pid, title, description, properties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComDayCqWcmCoreImplEventPagePostProcessorInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).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 ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
f7084d96ace6de3788cf7250b049be24c7d31a60
|
c343a0ef45405fb447d6a8735509efe2c1d6febf
|
/Pucho Codes/Pucho/app/src/main/java/com/indiainnovates/pucho/events/ErrorEvent.java
|
e0b6819706f4b2edb5668eff7d8cf03b48cc4ca3
|
[] |
no_license
|
MouleshS/SamplesAndroid
|
89fcc15efb707e63fcf01adf5b02a33f9a5f39c4
|
8342cc4a5d596a4ac33db12a3c2aa4ef3aaea83e
|
refs/heads/master
| 2020-03-18T21:02:51.889155
| 2018-05-26T16:50:58
| 2018-05-26T16:50:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 333
|
java
|
package com.indiainnovates.pucho.events;
import com.indiainnovates.pucho.models.LoginResponse;
/**
* Created by Raghunandan on 26-12-2015.
*/
public class ErrorEvent {
private Throwable e;
public ErrorEvent(Throwable e)
{
this.e = e;
}
public Throwable getErrorEvent() {
return e;
}
}
|
[
"raghunandankavi2010@gmail.com"
] |
raghunandankavi2010@gmail.com
|
c721d946d3604d87a8bc1aa2613db626bbd5529f
|
9d32980f5989cd4c55cea498af5d6a413e08b7a2
|
/A1_7_1_1/src/main/java/java/net/CacheResponse.java
|
5f7b8fc287db6620fc40cdde85ce9a5f36352bf5
|
[] |
no_license
|
liuhaosource/OppoFramework
|
e7cc3bcd16958f809eec624b9921043cde30c831
|
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
|
refs/heads/master
| 2023-06-03T23:06:17.572407
| 2020-11-30T08:40:07
| 2020-11-30T08:40:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,491
|
java
|
package java.net;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/* JADX ERROR: NullPointerException in pass: ExtractFieldInit
java.lang.NullPointerException
at jadx.core.utils.BlockUtils.isAllBlocksEmpty(BlockUtils.java:546)
at jadx.core.dex.visitors.ExtractFieldInit.getConstructorsList(ExtractFieldInit.java:221)
at jadx.core.dex.visitors.ExtractFieldInit.moveCommonFieldsInit(ExtractFieldInit.java:121)
at jadx.core.dex.visitors.ExtractFieldInit.visit(ExtractFieldInit.java:46)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:12)
at jadx.core.ProcessClass.process(ProcessClass.java:32)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
*/
public abstract class CacheResponse {
/* JADX ERROR: Method load error
jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 0073 in method: java.net.CacheResponse.<init>():void, dex:
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)
at jadx.core.ProcessClass.process(ProcessClass.java:29)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)
at com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)
at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)
at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)
... 5 more
*/
public CacheResponse() {
/*
// Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.net.CacheResponse.<init>():void, dex:
*/
throw new UnsupportedOperationException("Method not decompiled: java.net.CacheResponse.<init>():void");
}
public abstract InputStream getBody() throws IOException;
public abstract Map<String, List<String>> getHeaders() throws IOException;
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
07759636ced6d35fe9a5548385fb7c8e7f85852a
|
fc6c7a82fcad534ddc06cb368d9209384f74a385
|
/2.JavaCore/src/com/javarush/task/task11/task1116/Solution.java
|
6ab25309f0197748af5bb0d416a373391fd8adb2
|
[] |
no_license
|
edmams789/JavaRushTasks
|
51d2cb4525b98f3e79718a58fb6301aa8eb43570
|
d8c8d33af04cd1ea67d846db1d0a435462fabd60
|
refs/heads/master
| 2023-05-05T12:20:34.636306
| 2021-05-19T14:45:35
| 2021-05-19T14:45:35
| 368,760,470
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 874
|
java
|
package com.javarush.task.task11.task1116;
/*
Цепочка наследования
Расставь правильно "цепочку наследования" в классах: Pet (домашнее животное), Cat (кот), Dog (собака).
Требования:
1. В классе Solution должен быть public класс Pet (домашнее животное).
2. В классе Solution должен быть public класс Cat (кот).
3. В классе Solution должен быть public класс Dog (собака).
4. Правильно унаследуй класс Cat.
5. Правильно унаследуй класс Dog.
*/
public class Solution {
public static void main(String[] args) {
}
public class Pet {
}
public class Cat extends Pet {
}
public class Dog extends Pet {
}
}
|
[
"edmams789@gmail.com"
] |
edmams789@gmail.com
|
90fa58ff9ddc241dcfdd35e40533e026f9832bea
|
0023fd443b4ddbc70ed3b5fe52f889ee2a5d6d8e
|
/src/main/java/com/innee/czyhInterface/service/TimingTaskService.java
|
0a5b2b05dd5157250a8d0cff051c311a1044c515
|
[] |
no_license
|
qinkangkang/czyh_coupon_Interface
|
48623255c22918f90ba4b41019784c5c2c983c71
|
23cae1e9dda09be908d3882caff16d1abc893118
|
refs/heads/master
| 2021-05-07T14:21:00.312990
| 2017-11-07T08:45:37
| 2017-11-07T08:45:37
| 109,808,936
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,036
|
java
|
package com.innee.czyhInterface.service;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.innee.czyhInterface.dao.CouponDAO;
import com.innee.czyhInterface.dao.CustomerBargainingDAO;
import com.innee.czyhInterface.dao.CustomerDAO;
import com.innee.czyhInterface.dao.DeliveryDAO;
import com.innee.czyhInterface.dao.EventBargainingDAO;
import com.innee.czyhInterface.dao.EventDAO;
import com.innee.czyhInterface.dao.TimingTaskDAO;
import com.innee.czyhInterface.entity.TCustomer;
import com.innee.czyhInterface.entity.TCustomerBargaining;
import com.innee.czyhInterface.entity.TEventBargaining;
import com.innee.czyhInterface.entity.TTimingTask;
import com.innee.czyhInterface.util.Constant;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
/**
* 定时器任务管理类
*
* @author jinshengzhi
*/
@Component
@Transactional
public class TimingTaskService {
private static final Logger logger = LoggerFactory.getLogger(TimingTaskService.class);
// private static JsonMapper mapper = new JsonMapper(Include.ALWAYS);
@Autowired
private FxlService fxlService;
@Autowired
private EventDAO eventDAO;
@Autowired
private TimingTaskDAO timingTaskDAO;
@Autowired
private CouponDAO couponDAO;
@Autowired
private CacheManager cacheManager;
@Autowired
private DeliveryDAO deliveryDAO;
@Autowired
private CustomerDAO customerDAO;
@Autowired
private CustomerBargainingDAO customerBargainingDAO;
@Autowired
private EventBargainingDAO eventBargainingDAO;
public int updateEventStatus() {
// 1、活动自动上架任务 x
// 2、活动自动下架任务 (去掉钉钉任务推送)
// 3、场次报名截止任务 x
// 4、场次退款截止任务 x
// 5、场次开始任务 x
// 6、场次结束任务 x
// 7、未支付订单过期作废
// 8、活动手动上架任务,这时活动已经是上架状态,但是活动场次信息在场次日历表中的数据还没有增加,需要添加本任务来异步处理 x
// 9、活动手动下架任务,这时活动已经是下架状态,但是活动场次信息在场次日历表中的数据还没有减去,需要添加本任务来异步处理 x
// 10、优惠券领取有效期开始任务,将该优惠券的状态变更为可领取状态
// 11、优惠券领取有效期截止任务,将该优惠券的状态变更为领取过期状态
// 12、APP版本发布定时任务,到期后将去执行将新的APP版本信息更新到APP版本MAP中
// 13、文章下架定时任务,到期后将执行清除文章推荐数缓存
// 14、优惠券使用有效期开始任务,到期后更改用户优惠券未到有效期状态变更为可使用状态
// 15、优惠券使用有效期截止任务,到期后将该优惠券的状态变更为使用过期状态,同时更改用户优惠券未使用状态变更为使用过期状态
// 16、推送信息定时任务,触发友盟推送任务
// 17、 发送订单评价提醒模板消息 (可变更为短信消息/推送消息)
// 18、 发送订单未支付通知模板消息 (可变更为短信消息/推送消息)
// 20、自动核销订单 x
List<TTimingTask> list = timingTaskDAO.findByTaskTimeLessThan(new Date().getTime());
int taskType = 0;
// 定义场次起止日期的最小值和最大值,为了去日历表中获取日历记录为条件
for (TTimingTask timingTask : list) {
taskType = timingTask.getTaskType().intValue();
switch (taskType) {
case 1: {
break;
}
case 2: {
// 同步发送钉钉通知
break;
}
case 3: {
break;
}
// case 4: {
// break;
// }
// case 5: {
// eventSessionDAO.saveStatus(40, timingTask.getEntityId());
// break;
// }
// case 6: {
// eventSessionDAO.saveStatus(50, timingTask.getEntityId());
// break;
// }
case 7: {
break;
}
case 8: {
break;
}
case 9: {
break;
}
case 10: {
couponDeliveryStart(timingTask.getEntityId());
break;
}
case 11: {
couponDeliveryEnd(timingTask.getEntityId());
break;
}
case 12: {
break;
}
case 13: {
break;
}
case 14: {
couponUseStart(timingTask.getEntityId());
break;
}
case 15: {
couponUseEnd(timingTask.getEntityId());
break;
}
case 16: {
pushMessage(timingTask.getEntityId());
break;
}
case 17: {
break;
}
case 18: {
break;
}
case 19: {
break;
}
case 20: {
break;
}
default: {
break;
}
}
}
return list.size();
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
private void couponDeliveryStart(String delivareyId) {
deliveryDAO.updateStatus(delivareyId, 40);
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
private void couponDeliveryEnd(String delivareyId) {
deliveryDAO.updateStatus(delivareyId, 100);
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
private void couponUseStart(String couponId) {
// couponDeliveryDAO.updateStatusByCouponId2(couponId, 80, 10);
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
private void couponUseEnd(String couponId) {
couponDAO.updateStatus(couponId, 110);
// couponDeliveryDAO.updateStatusByCouponId(couponId, 20, 90);
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
private void pushMessage(String pushId) {
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
private void eventAutoOnsale(String eventId) {
//eventDAO.updateStockFlagBySpec(eventId);
}
}
|
[
"shemar.qin@sdeals.me"
] |
shemar.qin@sdeals.me
|
a7580079532ffb789f7bb0aa2fef00b983dc77fa
|
2d1c51fbf54c69e4a8e5bf01190c53d8ab719efd
|
/service_rc/src/main/java/com/run/dao/unity/gp/IGpTokenUntDal.java
|
7716f4fbff279d758f8b9e324201470d701cbd05
|
[] |
no_license
|
aixiaoqie/Tools
|
fa2077856532eae617f9a08aff9c4795aaa2582f
|
5c79c946c191f11e2f5f8d63b4f007a41ce30502
|
refs/heads/master
| 2022-07-15T04:24:34.144909
| 2019-12-10T12:51:09
| 2019-12-10T12:51:09
| 227,120,564
| 0
| 0
| null | 2022-06-30T14:46:56
| 2019-12-10T12:53:43
|
Java
|
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.run.dao.unity.gp;
import com.run.dao.unity.base.IBaseUntDal;
import com.run.ent.extend.gp.GpToken;
/**
* @author Zee
* @createDate 2017/05/22 14:01:29
* @updateDate 2019/9/29 12:00:22
* @description 扩展自实体类IBaseUntDal<GpToken>,可手动更改。token信息。
*/
public interface IGpTokenUntDal extends IBaseUntDal<GpToken> {
}
|
[
"2390734879@qq.com"
] |
2390734879@qq.com
|
dac5bfd67b2fe2bd4ff0d7440119caf9b04ffcec
|
940115ee15ab5d08926ea8191631056e742af4fb
|
/ui-web-primefaces-api/src/main/java/org/cyk/ui/web/primefaces/page/party/person/PersonRelationshipTypePagesConfiguration.java
|
0d47cbff013a4ef8e377bad3e45fb85f2f93ef2b
|
[] |
no_license
|
devlopper/org.cyk.ui
|
4afea2996c228f1e9d5435bab6a88215060d2cee
|
a1e1b5bafe291bb640506c3340aad90455bb95be
|
refs/heads/master
| 2021-01-23T19:36:43.239894
| 2018-05-21T21:12:06
| 2018-05-21T21:12:06
| 17,086,978
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 750
|
java
|
package org.cyk.ui.web.primefaces.page.party.person;
import java.io.Serializable;
import org.cyk.system.root.model.party.person.PersonRelationshipType;
import org.cyk.ui.web.primefaces.page.pattern.tree.AbstractDataTreePagesConfiguration;
public class PersonRelationshipTypePagesConfiguration extends AbstractDataTreePagesConfiguration<PersonRelationshipType> implements Serializable {
private static final long serialVersionUID = 1L;
/*@Override
protected String[] getFieldNames(Action action) {
return ArrayUtils.addAll(super.getFieldNames(action),PersonRelationshipTypeEditPage.Form.FIELD_GLOBAL_POSITION,GlobalPositionFormModel.FIELD_LONGITUDE
,GlobalPositionFormModel.FIELD_LATITUDE,GlobalPositionFormModel.FIELD_ALTITUDE);
}*/
}
|
[
"Christian@CYK-HP-LAPTOP"
] |
Christian@CYK-HP-LAPTOP
|
c91daf603685840c5b20ef2e4f1d694d82c57817
|
2cf3e4cd9875c7fe3a26b2993c0f6df71da6aad9
|
/src/main/java/ch/ethz/idsc/sophus/app/hermite/Se2HermitePlot.java
|
400f63a53a2ae0a403a54967f2b197d12381f558
|
[] |
no_license
|
datahaki/owlOLD
|
3824e903356613f2d6596c84245a16889b308b11
|
193d255d4c3a49eb636781a7f9054dc1231e44ae
|
refs/heads/master
| 2023-03-07T17:55:08.049485
| 2021-02-27T19:57:57
| 2021-02-27T19:57:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,209
|
java
|
// code by jph
package ch.ethz.idsc.sophus.app.hermite;
import java.awt.Color;
import java.awt.Graphics2D;
import ch.ethz.idsc.java.awt.Hsluv;
import ch.ethz.idsc.owl.gui.RenderInterface;
import ch.ethz.idsc.owl.gui.win.GeometricLayer;
import ch.ethz.idsc.sophus.lie.se2.Se2Matrix;
import ch.ethz.idsc.tensor.Scalar;
import ch.ethz.idsc.tensor.Tensor;
import ch.ethz.idsc.tensor.lie.Cross;
/* package */ class Se2HermitePlot implements RenderInterface {
private final Tensor points;
private final Scalar scale;
/** @param points with dimensions N x 2 x 3
* @param scale */
public Se2HermitePlot(Tensor points, Scalar scale) {
this.points = points;
this.scale = scale;
}
@Override // from RenderInterface
public void render(GeometricLayer geometricLayer, Graphics2D graphics) {
for (Tensor point : points) {
geometricLayer.pushMatrix(Se2Matrix.of(point.get(0)));
Tensor pv = point.get(1);
Color color = Hsluv.of(pv.Get(2).number().doubleValue() * 0.3, 1, 0.5, 0.5);
graphics.setColor(color);
Tensor vec = Cross.of(pv.extract(0, 2).multiply(scale));
graphics.draw(geometricLayer.toLine2D(vec));
geometricLayer.popMatrix();
}
}
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
8ffd01da340b412ce4d6d02beb7356126a024abc
|
242e90dff02d8ae45a5cc11ad2b42b0fb097a4b7
|
/libraries/src/main/java/com/baeldung/opencsv/pojos/CsvTransfer.java
|
79366e3d2032d2cfb9930b68e40886dd3caf38f0
|
[
"MIT"
] |
permissive
|
naXa777/tutorials
|
980e3ab816ad5698fdcf9c7e1b8bc6acf75c12a5
|
c575ba8d6fc32c6d523bd9d73170b90250756e22
|
refs/heads/master
| 2020-03-30T08:06:09.918501
| 2019-02-27T17:54:22
| 2019-02-27T17:54:22
| 150,989,509
| 2
| 1
|
MIT
| 2018-09-30T17:30:55
| 2018-09-30T17:30:54
| null |
UTF-8
|
Java
| false
| false
| 922
|
java
|
package com.baeldung.opencsv.pojos;
import com.baeldung.opencsv.beans.CsvBean;
import java.util.ArrayList;
import java.util.List;
public class CsvTransfer {
private List<String[]> csvStringList;
private List<CsvBean> csvList;
public CsvTransfer() {}
public List<String[]> getCsvStringList() {
if (csvStringList != null) return csvStringList;
return new ArrayList<String[]>();
}
public void addLine(String[] line) {
if (this.csvList == null) this.csvStringList = new ArrayList<>();
this.csvStringList.add(line);
}
public void setCsvStringList(List<String[]> csvStringList) {
this.csvStringList = csvStringList;
}
public void setCsvList(List<CsvBean> csvList) {
this.csvList = csvList;
}
public List<CsvBean> getCsvList() {
if (csvList != null) return csvList;
return new ArrayList<CsvBean>();
}
}
|
[
"hanriseldon@gmail.com"
] |
hanriseldon@gmail.com
|
4f6990ca9142decffffc8557d16b18b76b059685
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/se/snd/ds/SE_SND_2020_ADataSet.java
|
e1eb82e581ed8d22fbf9a4208b7af1ca5b9ff1a1
|
[] |
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
| 3,117
|
java
|
/***************************************************************************************************
* 파일명 : SE_SND_2010_LDataSet.java
* 기능 : 판매-발송관리-노선순위변경
* 작성일자 : 2009-02-12
* 작성자 : 김대준
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.snd.ds;
import java.sql.*;
import java.util.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.se.snd.dm.*;
import chosun.ciis.se.snd.rec.*;
/**
*
*/
public class SE_SND_2020_ADataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{
public ArrayList curlist = new ArrayList();
public String errcode;
public String errmsg;
public SE_SND_2020_ADataSet(){}
public SE_SND_2020_ADataSet(String errcode, String errmsg){
this.errcode = errcode;
this.errmsg = errmsg;
}
public void setErrcode(String errcode){
this.errcode = errcode;
}
public void setErrmsg(String errmsg){
this.errmsg = errmsg;
}
public String getErrcode(){
return this.errcode;
}
public String getErrmsg(){
return this.errmsg;
}
public void getValues(CallableStatement cstmt) throws SQLException{
this.errcode = Util.checkString(cstmt.getString(1));
this.errmsg = Util.checkString(cstmt.getString(2));
}
}/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체 관련 코드 작성시 사용하십시오.
<%
SE_SND_2010_LDataSet ds = (SE_SND_2010_LDataSet)request.getAttribute("ds");
%>
Web Tier에서 Record 객체 관련 코드 작성시 사용하십시오.
<%
for(int i=0; i<ds.curlist.size(); i++){
SE_SND_2010_LCURLISTRecord curlistRec = (SE_SND_2010_LCURLISTRecord)ds.curlist.get(i);%>
HTML 코드들....
<%}%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DataSet 객체의 <%= %> 작성시 사용하십시오.
<%= ds.getErrcode()%>
<%= ds.getErrmsg()%>
<%= ds.getCurlist()%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 Record 객체의 <%= %> 작성시 사용하십시오.
<%= curlistRec.cmpy_cd%>
<%= curlistRec.prt_plac_cd%>
<%= curlistRec.route_clsf%>
<%= curlistRec.route_cd%>
<%= curlistRec.route_nm%>
<%= curlistRec.route_rank%>
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Thu Feb 12 17:16:24 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
8b2086a1ba839c0eb49c42ee8f0a740aee14a2c2
|
68c3d68dd6660a1d6dab15676841e97abe501b60
|
/pinyougou-search-service/src/main/java/com.pinyougou.search.service.impl/ItemSearchListener.java
|
2796b9f45d14cf8a35e217b9522422307233258b
|
[] |
no_license
|
haikuopingyuyue7085/Idea_test
|
3992c198bb9c2854dd41067a4b808f5989c3f12f
|
1862019d6e48c7bb4dd0f0602bfaa6c326b4218f
|
refs/heads/master
| 2020-05-02T21:31:59.607124
| 2019-03-28T14:34:21
| 2019-03-28T14:36:15
| 178,223,290
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,211
|
java
|
package com.pinyougou.search.service.impl;
import com.alibaba.fastjson.JSON;
import com.pinyougou.pojo.TbItem;
import com.pinyougou.search.service.ItemSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import java.util.List;
//扫描注解
@Component
public class ItemSearchListener implements MessageListener {
@Autowired
private ItemSearchService itemSearchService;
@Override
public void onMessage(Message message) {
//将消息强转成text类型
TextMessage textMessage = (TextMessage) message;
try {
String text=textMessage.getText();
System.out.println("监听到消息"+text);
//再将字符串转回原来的list
List<TbItem> list= JSON.parseArray(text, TbItem.class);//定义数据属于哪个实体表(做泛型)
itemSearchService.importList(list);
System.out.println("导入solr索引库成功!");
} catch (JMSException e) {
e.printStackTrace();
}
}
}
|
[
"admin@qq.com"
] |
admin@qq.com
|
25ababc5b747181be294d4791f633036f2fff03f
|
93c56db47169ff189c01cf3cba628f4019df817c
|
/JavaRushTasks/4.JavaCollections/src/com/javarush/task/task33/task3303/Solution.java
|
8221e0f4aee95752e877614c2df0d0104f6ac3b3
|
[] |
no_license
|
sah-lob/JavaRushTasks
|
69c063b8057391e1c28477980314a33d8b107886
|
f05345afd5693db23546ff2fadadebee00c57c96
|
refs/heads/master
| 2020-04-06T11:48:37.433206
| 2018-12-08T08:31:38
| 2018-12-08T08:31:38
| 157,427,997
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 628
|
java
|
//package com.javarush.task.task33.task3303;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//
//import java.io.File;
//import java.io.FileReader;
//import java.io.IOException;
//
///*
//Десериализация JSON объекта
//*/
//
//public class Solution {
//
// public static <T> T convertFromJsonToNormal(String fileName, Class<T> clazz) throws IOException {
// ObjectMapper mapper = new ObjectMapper();
// FileReader reader = new FileReader(new File(fileName));
// return mapper.readValue(reader, clazz);
// }
//
// public static void main(String[] args) {
//
// }
//}
|
[
"Sah-lob@ya.ru"
] |
Sah-lob@ya.ru
|
58d3faa28d9d9168ea5cec48d4ba36fc6b1012ad
|
302af4aa0bf08a66dde5fa95bc6e8992e4505c7d
|
/com.gumtree.android.beta/java/com/gumtree/android/vip/VIPMainFragment$$Lambda$10.java
|
7a53692d616434077ab95dc9ca2e0e829b4c9ddb
|
[] |
no_license
|
hakat0m/Chessboxing
|
0f5ce696a55a5b40f1d8fa226bbdc5673ef5dbc5
|
0a576dec5aaafa219c340a013726037d852b91a2
|
refs/heads/master
| 2021-01-19T08:51:23.932830
| 2017-04-09T06:48:44
| 2017-04-09T06:48:44
| 87,688,753
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 508
|
java
|
package com.gumtree.android.vip;
import java.lang.invoke.LambdaForm.Hidden;
import javax.inject.Provider;
final /* synthetic */ class VIPMainFragment$$Lambda$10 implements Provider {
private final long arg$1;
private VIPMainFragment$$Lambda$10(long j) {
this.arg$1 = j;
}
public static Provider lambdaFactory$(long j) {
return new VIPMainFragment$$Lambda$10(j);
}
@Hidden
public Object get() {
return VIPAdRefFragment.newInstance(this.arg$1);
}
}
|
[
"vuesz@outlook.com"
] |
vuesz@outlook.com
|
4ac9af3a4cad7a3d69666a1e222131bfa618e9d6
|
5ebfe7bb05c0bf9a1f957eeb53b9d925038df0b7
|
/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/FilePublicHandler.java
|
d6f26eea6c4cd2ffdc9509cca1a91281b1d017ba
|
[
"MIT"
] |
permissive
|
aoberoi/java-slack-sdk
|
0c0fba0f57fabbd1f5095176e7548649bede6435
|
807f4c12799326fe406e452532178f269f142a29
|
refs/heads/master
| 2020-12-22T05:02:15.520881
| 2020-01-27T21:36:39
| 2020-01-27T21:36:39
| 236,676,613
| 0
| 0
|
MIT
| 2020-01-28T06:59:53
| 2020-01-28T06:59:52
| null |
UTF-8
|
Java
| false
| false
| 405
|
java
|
package com.slack.api.app_backend.events.handler;
import com.slack.api.model.event.FilePublicEvent;
import com.slack.api.app_backend.events.EventHandler;
import com.slack.api.app_backend.events.payload.FilePublicPayload;
public abstract class FilePublicHandler extends EventHandler<FilePublicPayload> {
@Override
public String getEventType() {
return FilePublicEvent.TYPE_NAME;
}
}
|
[
"seratch@gmail.com"
] |
seratch@gmail.com
|
76680428f95b1b76ef1eea72d7aab310dc2bf9d9
|
be25b2c018dbacd8147a8fbfbc66f257b050ea1f
|
/plugins/execution-languages/commands/source_gen/jetbrains/mps/execution/commands/behavior/DebuggerSettingsCommandParameterDeclaration_Behavior.java
|
06d268213a260705e60829221143830507f272b1
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
blutkind/MPS
|
f5bef8c27c3cb65940ba74a5d1942fdab35ee096
|
cac72cce91d98dec40bbadf7a049ed9dbbc18231
|
refs/heads/master
| 2020-04-08T01:22:10.782234
| 2011-12-09T20:58:07
| 2011-12-09T20:58:07
| 2,950,220
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,142
|
java
|
package jetbrains.mps.execution.commands.behavior;
/*Generated by MPS */
import jetbrains.mps.smodel.SNode;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import java.util.Set;
import java.util.HashSet;
import jetbrains.mps.smodel.SModelUtil_new;
import jetbrains.mps.project.GlobalScope;
public class DebuggerSettingsCommandParameterDeclaration_Behavior {
public static void init(SNode thisNode) {
SLinkOperations.setTarget(thisNode, "type", new DebuggerSettingsCommandParameterDeclaration_Behavior.QuotationClass_9qz3p8_a2a0a0().createNode(), true);
}
public static class QuotationClass_9qz3p8_a2a0a0 {
public QuotationClass_9qz3p8_a2a0a0() {
}
public SNode createNode() {
SNode result = null;
Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
SNode quotedNode_1 = null;
{
quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration("jetbrains.mps.baseLanguage.structure.StringType", null, GlobalScope.getInstance(), false);
SNode quotedNode1_2 = quotedNode_1;
result = quotedNode1_2;
}
return result;
}
}
}
|
[
"Julia.Beliaeva@jetbrains.com"
] |
Julia.Beliaeva@jetbrains.com
|
bc7c696264f196c2e6caa5566079254399196315
|
0142cf26037894a85069b5a8fc26d4b6c60435b2
|
/src/main/java/com/bridgeit/fundoonotes/Response/Response.java
|
fb24adc29dfdd3c432ee33ffc0ae3586e4dcfdc4
|
[] |
no_license
|
Shreyascrs/fundoo
|
6580ee0457ffae0a1cb2f6d88d5f5745679af91a
|
03dd949e3bde2d8d5e90d236fbd1ebf0cf0d1852
|
refs/heads/master
| 2022-11-21T08:59:36.715821
| 2019-07-24T13:29:55
| 2019-07-24T13:29:55
| 187,847,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,005
|
java
|
package com.bridgeit.fundoonotes.Response;
public class Response {
private int statusCode;
private String message;
private String data;
public Response(int statusCode, String message, String data) {
super();
this.statusCode = statusCode;
this.message = message;
this.data = data;
}
public Response sendresponse(int statusCode, String message, String data)
{
this.statusCode = statusCode;
this.message = message;
this.data = data;
return this;
}
public int getStatusCode() {
return statusCode;
}
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
public String getMssage() {
return message;
}
public void setMssage(String mssage) {
this.message = mssage;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
@Override
public String toString() {
return "Response [statusCode=" + statusCode + ", mssage=" + message + ", data=" + data + "]";
}
public Response() {
}
}
|
[
"you@example.com"
] |
you@example.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.