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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d427ba7a4b504e9a44763f0a2cf74054744ae0ca
|
ffc35e9fe729af2ae24dbb3043e10ebad8fabdf5
|
/src/main/java/io/choerodon/base/api/dto/payload/OrganizationRemoteTokenPayload.java
|
25a225dcbd631c603380f91097b1abd4f85ffe87
|
[
"Apache-2.0"
] |
permissive
|
liji2003888/base-service
|
3f400b787df98a1be1554b5f3bf43e3b5b95bc59
|
7bcb3416cb47bddca6884220a661287b81738d1a
|
refs/heads/master
| 2020-12-03T14:08:23.772773
| 2020-01-02T08:04:46
| 2020-01-02T08:04:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,602
|
java
|
package io.choerodon.base.api.dto.payload;
/**
* 组织生成远程连接Token的DTO
*/
public class OrganizationRemoteTokenPayload {
//主键ID/非必填
private Long id;
//组织ID
private Long organizationId;
//令牌名称
private String name;
//联系邮箱
private String email;
//令牌状态
private Boolean expired;
//远程连接令牌
private String remoteToken;
public Long getId() {
return id;
}
public OrganizationRemoteTokenPayload setId(Long id) {
this.id = id;
return this;
}
public Long getOrganizationId() {
return organizationId;
}
public OrganizationRemoteTokenPayload setOrganizationId(Long organizationId) {
this.organizationId = organizationId;
return this;
}
public String getName() {
return name;
}
public OrganizationRemoteTokenPayload setName(String name) {
this.name = name;
return this;
}
public String getEmail() {
return email;
}
public OrganizationRemoteTokenPayload setEmail(String email) {
this.email = email;
return this;
}
public Boolean getExpired() {
return expired;
}
public OrganizationRemoteTokenPayload setExpired(Boolean expired) {
this.expired = expired;
return this;
}
public String getRemoteToken() {
return remoteToken;
}
public OrganizationRemoteTokenPayload setRemoteToken(String remoteToken) {
this.remoteToken = remoteToken;
return this;
}
}
|
[
"Longhe1996@foxmail.com"
] |
Longhe1996@foxmail.com
|
80e4f865d00275565b85909d724e46e47245a3a9
|
a653c9fa8cc7a97765323c0230dc62b9b3309654
|
/src/cn/demi/base/system/po/Template.java
|
63cfa6f5772c524bf47a83df2805154327c7b06e
|
[] |
no_license
|
peterwuhua/springBootDemoT
|
ef065d082017420dc56ac54f4714b11a4fbe9ee3
|
f8cebcae3becaa425fad93f116c40fb7ceb65e43
|
refs/heads/master
| 2020-09-13T22:47:25.013935
| 2019-11-20T13:16:09
| 2019-11-20T13:16:09
| 222,925,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,797
|
java
|
package cn.demi.base.system.po;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import cn.core.framework.common.po.Po;
import cn.core.framework.utils.code.ActionType;
import cn.core.framework.utils.code.CreateCodeUtils;
import cn.core.framework.utils.code.annotation.Module;
@Entity(name="sys_template")
@Table(name="sys_template")
@Module(value="sys.template")
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Template extends Po<Template> {
private static final long serialVersionUID = 1L;
public static final String EXPORT = "export";
public static final String IMPORT = "import";
/**
* 对象转换为map时,需要转换的属性
*/
public String[] PROPERTY_TO_MAP= {"id","sort","type","name","code","user","versionNo","describtion","path","busType"};
/**
* 标记模板类别(导入模板/导出模板)
*/
private String type;//标记模板类别(导入模板/导出模板)
/**
* 模板名称
*/
private String name;//模板名称
/**
* 模板编码
*/
private String code;//模板编码
/**
* 负责人
*/
private String user;//负责人
/**
* 版本号
*/
private String versionNo;//版本号
/**
* 说明
*/
private String describtion;//说明
/**
* 存储路径
*/
private String path;//存储路径
/**
* 业务模块
*/
private String busType;//业务模块
@Column(length=64)
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Column(length=64)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(length=64)
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
@Column(length=64)
public String getVersionNo() {
return versionNo;
}
public void setVersionNo(String versionNo) {
this.versionNo = versionNo;
}
public String getDescribtion() {
return describtion;
}
public void setDescribtion(String describtion) {
this.describtion = describtion;
}
@Column(length=64)
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
@Column(length=64)
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Column(length=64)
public String getBusType() {
return busType;
}
public void setBusType(String busType) {
this.busType = busType;
}
public static void main(String[] args) {
CreateCodeUtils.autoCreateCode(Template.class, false, ActionType.JSP);
}
@Override
@Transient
public String[] getPropertyToMap() {
return PROPERTY_TO_MAP;
}
}
|
[
"1053185268@qq.com"
] |
1053185268@qq.com
|
dcffd997485a173ebccfeb49438232ce771e64b7
|
a45291bda95d42214a5345b976f2ab725f160164
|
/src/com/kubeiwu/commontool/wedget/KApplication.java
|
d7f0a6a21b49d2f4b0f7bfff07c173397dc28d49
|
[] |
no_license
|
cgpllx/cgp_commontool
|
64d262ce97a19cf7d3352e30de26c65b111519b1
|
91d73d5627994c05077f48fdf90a229c1e0b8db1
|
refs/heads/master
| 2021-01-10T19:16:24.175299
| 2014-08-25T08:23:12
| 2014-08-25T08:23:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,148
|
java
|
package com.kubeiwu.commontool.wedget;
import com.kubeiwu.commontool.volley.cache.KRequestQueueManager;
import android.app.Application;
import android.content.Context;
import android.preference.PreferenceManager;
import android.util.DisplayMetrics;
import android.view.WindowManager;
public class KApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
init(getApplicationContext());
initImageLoder(getApplicationContext());
}
private void init(Context context) {
if (PreferenceManager.getDefaultSharedPreferences(context).getInt("screenheight", -1) < 0) {
WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics dm = new DisplayMetrics();
windowManager.getDefaultDisplay().getMetrics(dm);
PreferenceManager.getDefaultSharedPreferences(context).edit().putInt("screenwidth", dm.widthPixels).commit();
PreferenceManager.getDefaultSharedPreferences(context).edit().putInt("screenheight", dm.heightPixels).commit();
}
}
public void initImageLoder(Context context) {
KRequestQueueManager.getInstance().init(context);
}
}
|
[
"cgpllx1@qq.com"
] |
cgpllx1@qq.com
|
5c714eec3b97038090edffdf93ff42d2c184f42a
|
3a9cfde041de4c53e9c18338e6ecde6f28cc271e
|
/src/main/java/Coop/service/MobileAuthenticationService.java
|
c1839e4b0da031f2f35b5d42b6ff507b9bc1a87d
|
[] |
no_license
|
razarian/Coop-Project
|
421587d98d670d5c102a22a03a09c8206270e482
|
301eaa5a0ee345b63a0f8bbe625430edb0da891d
|
refs/heads/master
| 2021-06-17T09:08:53.408818
| 2017-05-26T12:50:12
| 2017-05-26T12:50:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 270
|
java
|
package Coop.service;
import org.springframework.stereotype.Service;
import Coop.model.User;
@Service
public class MobileAuthenticationService {
public boolean AuthenticationUser(User user){
if(user==null){
return false;
}
else{
return true;
}
}
}
|
[
"aj1155@naver.com"
] |
aj1155@naver.com
|
ef2b8be7b84c99b3645d1d54ab5d1c0d94bd2d76
|
3927258e502590626dd18034000e7cad5bb46af6
|
/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/IntermediateModelBuilder.java
|
34a867e148594b1bae2c0a669297d0f9abb956b0
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
gauravbrills/aws-sdk-java
|
332f9cf1e357c3d889f753b348eb8d774a30f07c
|
09d91b14bfd6fbc81a04763d679e0f94377e9007
|
refs/heads/master
| 2021-01-21T18:15:06.060014
| 2016-06-11T18:12:40
| 2016-06-11T18:12:40
| 58,072,311
| 0
| 0
| null | 2016-05-04T17:52:28
| 2016-05-04T17:52:28
| null |
UTF-8
|
Java
| false
| false
| 4,612
|
java
|
/*
* Copyright (c) 2016. Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.codegen;
import com.amazonaws.codegen.customization.CodegenCustomizationProcessor;
import com.amazonaws.codegen.customization.processors.DefaultCustomizationProcessor;
import com.amazonaws.codegen.internal.Utils;
import com.amazonaws.codegen.model.config.BasicCodeGenConfig;
import com.amazonaws.codegen.model.config.customization.CustomizationConfig;
import com.amazonaws.codegen.model.intermediate.*;
import com.amazonaws.codegen.model.service.ServiceModel;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import static com.amazonaws.codegen.AddEmptyInputShape.addEmptyInputShapes;
import static com.amazonaws.codegen.AddMetadata.constructMetadata;
import static com.amazonaws.codegen.AddOperations.constructOperations;
import static com.amazonaws.codegen.RemoveUnusedShapes.removeUnusedShapes;
/**
* Builds an intermediate model to be used by the templates from the service model and
* customizations.
*/
public class IntermediateModelBuilder {
private final CustomizationConfig customConfig;
private final BasicCodeGenConfig codeGenConfig;
private final ServiceModel service;
private final ServiceExamples examples;
public IntermediateModelBuilder(CustomizationConfig customConfig,
BasicCodeGenConfig codeGenConfig, ServiceModel service,
ServiceExamples examples) {
this.customConfig = customConfig;
this.codeGenConfig = codeGenConfig;
this.service = service;
this.examples = examples;
}
public IntermediateModel build() {
CodegenCustomizationProcessor customization = DefaultCustomizationProcessor
.getProcessorFor(customConfig);
customization.preprocess(service);
Map<String, OperationModel> operations = new TreeMap<String, OperationModel>();
Map<String, ShapeModel> shapes = new HashMap<String, ShapeModel>();
operations.putAll(constructOperations(service));
shapes.putAll(new AddInputShapes(service, customConfig).constructInputShapes());
shapes.putAll(new AddOutputShapes(service, customConfig).constructOutputShapes());
shapes.putAll(new AddExceptionShapes(service, customConfig).constructExceptionShapes());
shapes.putAll(new AddModelShapes(service, customConfig)
.constructModelShapes(shapes.keySet())); // shapes to skip
shapes.putAll(addEmptyInputShapes(operations, service));
System.out.println(shapes.size() + " shapes found in total.");
IntermediateModel fullModel = new IntermediateModel(
constructMetadata(service, codeGenConfig, customConfig),
operations,
shapes,
customConfig,
examples);
customization.postprocess(fullModel);
System.out.println(fullModel.getShapes().size() + " shapes remained after " +
"applying customizations.");
shapes = removeUnusedShapes(fullModel);
System.out.println(shapes.size() + " shapes remained after removing unused shapes.");
IntermediateModel trimmedModel = new IntermediateModel(
fullModel.getMetadata(),
fullModel.getOperations(),
shapes,
fullModel.getCustomizationConfig(),
fullModel.getExamples());
linkMembersToShapes(trimmedModel);
return trimmedModel;
}
/**
* Link the member to it's corresponding shape (if it exists).
*
* @param model
* Final IntermediateModel
*/
private void linkMembersToShapes(IntermediateModel model) {
for (Map.Entry<String, ShapeModel> entry : model.getShapes().entrySet()) {
if (entry.getValue().getMembers() != null) {
for (MemberModel member : entry.getValue().getMembers()) {
member.setShape(Utils.findShapeModelByC2jNameIfExists(model, member.getC2jShape()));
}
}
}
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
b5f2412d443e4a8909e987e9e6a90eac3c37de2f
|
db4b3857c87c577718050ee458ce44c8dbec9e02
|
/greatage-tapestry/src/main/java/org/greatage/tapestry/internal/SecurityExceptionHandler.java
|
90c518a1a27338ad601896ec20dffc96c84c1241
|
[] |
no_license
|
sody/greatage
|
1f1a06e1665e41f33a1258321beb40377d807670
|
42a31dc7f22c0344888a0417cf91d56631b4ffb3
|
refs/heads/develop
| 2021-01-17T07:24:40.955180
| 2012-06-22T13:05:18
| 2012-11-02T11:49:04
| 1,054,336
| 1
| 1
| null | 2013-05-03T10:09:50
| 2010-11-05T14:48:32
|
Java
|
UTF-8
|
Java
| false
| false
| 2,209
|
java
|
/*
* Copyright (c) 2008-2011 Ivan Khalopik.
*
* 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.greatage.tapestry.internal;
import org.apache.tapestry5.services.ComponentClassResolver;
import org.apache.tapestry5.services.RequestExceptionHandler;
import org.apache.tapestry5.services.ResponseRenderer;
import org.greatage.security.SecurityException;
import org.greatage.util.ReflectionUtils;
import org.slf4j.Logger;
import java.io.IOException;
/**
* @author Ivan Khalopik
* @since 1.0
*/
public class SecurityExceptionHandler implements RequestExceptionHandler {
private final RequestExceptionHandler delegate;
private final ResponseRenderer renderer;
private final ComponentClassResolver resolver;
private final Class loginPage;
private final Logger logger;
public SecurityExceptionHandler(final RequestExceptionHandler delegate,
final ResponseRenderer renderer,
final ComponentClassResolver resolver,
final Class loginPage,
final Logger logger) {
this.delegate = delegate;
this.renderer = renderer;
this.resolver = resolver;
this.loginPage = loginPage;
this.logger = logger;
}
@SuppressWarnings({"ThrowableResultOfMethodCallIgnored"})
public void handleRequestException(final Throwable exception) throws IOException {
final SecurityException securityException = ReflectionUtils.findException(exception, SecurityException.class);
if (securityException != null) {
final String pageName = resolver.resolvePageClassNameToPageName(loginPage.getName());
renderer.renderPageMarkupResponse(pageName);
logger.info(securityException.getMessage());
} else {
delegate.handleRequestException(exception);
}
}
}
|
[
"ikhalopik@gmail.com"
] |
ikhalopik@gmail.com
|
0b6c6c14b388ccc554d99de67f195b1715e880e2
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__int_File_add_01.java
|
cbbc1859544723a48127858cfcd3fc6a81cf929e
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 7,506
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_File_add_01.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-01.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: File Read data from file (named c:\data.txt)
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before adding 1 to data
* BadSink : Add 1 to data, which can cause an overflow
* Flow Variant: 01 Baseline
*
* */
package testcases.CWE190_Integer_Overflow;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE190_Integer_Overflow__int_File_add_01 extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
{
File f = new File("C:\\data.txt");
FileInputStream fis = null;
InputStreamReader isread = null;
BufferedReader buffread = null;
try {
/* read string from file into data */
fis = new FileInputStream(f);
isread = new InputStreamReader(fis, "UTF-8");
buffread = new BufferedReader(isread);
/* POTENTIAL FLAW: Read data from a file */
String s_data = buffread.readLine(); // This will be reading the first "line" of the file, which
// could be very long if there are little or no newlines in the file
if (s_data != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally {
/* Close stream reading objects */
try {
if( buffread != null )
{
buffread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe);
}
try {
if( isread != null )
{
isread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe);
}
try {
if( fis != null )
{
fis.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
/* POTENTIAL FLAW: if data == Integer.MAX_VALUE, this will overflow */
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
/* POTENTIAL FLAW: if data == Integer.MAX_VALUE, this will overflow */
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
{
File f = new File("C:\\data.txt");
FileInputStream fis = null;
InputStreamReader isread = null;
BufferedReader buffread = null;
try {
/* read string from file into data */
fis = new FileInputStream(f);
isread = new InputStreamReader(fis, "UTF-8");
buffread = new BufferedReader(isread);
/* POTENTIAL FLAW: Read data from a file */
String s_data = buffread.readLine(); // This will be reading the first "line" of the file, which
// could be very long if there are little or no newlines in the file
if (s_data != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally {
/* Close stream reading objects */
try {
if( buffread != null )
{
buffread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", ioe);
}
try {
if( isread != null )
{
isread.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", ioe);
}
try {
if( fis != null )
{
fis.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
/* FIX: Add a check to prevent an overflow from occurring */
if (data < Integer.MAX_VALUE)
{
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
else {
IO.writeLine("data value is too large to perform addition.");
}
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
12a8033001c3e9e86ed6ddebf8fb3816297e6756
|
0c207c2c8996f9e5fd79077484858b217a22ca36
|
/day31_okhttp/TestServer/src/com/nan/okhttpserver/LoginServlet.java
|
cc2918fe8b4a7cb668e4cb1c70c8aa6cd56adf88
|
[] |
no_license
|
huannan/Architecture
|
13a75919eaa2a952125aa2c5868ee17ad111b9d5
|
f41ac58b1533c75bd8945a30efd9ff23c243bfe1
|
refs/heads/master
| 2022-08-23T07:52:43.482888
| 2022-06-30T08:45:23
| 2022-06-30T08:45:23
| 292,816,424
| 11
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,522
|
java
|
package com.nan.okhttpserver;
import com.nan.okhttpserver.base.BaseJsonServlet;
import com.nan.okhttpserver.response.ResponseCode;
import com.nan.okhttpserver.response.ResponseEntity;
import com.nan.okhttpserver.response.UserInfoEntity;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* http://localhost:8080/TestServer/login?name=huannan&pwd=123456
*/
@WebServlet("/login")
public class LoginServlet extends BaseJsonServlet {
@Override
protected ResponseEntity onHandle(HttpServletRequest req, HttpServletResponse resp) throws Exception {
ResponseEntity responseEntity = new ResponseEntity();
responseEntity.code = ResponseCode.LOGIN_ERROR;
responseEntity.msg = "用户名或者密码错误";
if ("huannan".equals(req.getParameter("name")) && "123456".equals(req.getParameter("pwd"))) {
UserInfoEntity userInfoEntity = new UserInfoEntity();
userInfoEntity.setName("huannan");
userInfoEntity.setPwd("123456");
userInfoEntity.setSex("男");
responseEntity.code = ResponseCode.OK;
responseEntity.msg = "登录成功";
responseEntity.data = userInfoEntity.toString();
Cookie cookie = new Cookie("userinfo", userInfoEntity.getName());
cookie.setMaxAge(10);
resp.addCookie(cookie);
}
return responseEntity;
}
}
|
[
"wuhuannan@meizu.com"
] |
wuhuannan@meizu.com
|
3bd65c45bc6dd0c548d0df9ad3d08767faffe7bd
|
28dd8b0cda4b054aa45ebbe06578bd49c5c11240
|
/src/main/java/com/haulmont/tickman/screen/ticket/TicketExportScreen.java
|
cd6cfeb91dc235a0f502928a176ae440f37438dc
|
[] |
no_license
|
knstvk/tickman
|
6af67f287806a9afc88f8f25481ffef6e7c68a82
|
01892862fcfae108ac178ce34277a9f32bf5deb5
|
refs/heads/master
| 2023-03-25T00:45:57.346080
| 2021-03-21T13:43:28
| 2021-03-21T13:43:28
| 267,277,207
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,732
|
java
|
package com.haulmont.tickman.screen.ticket;
import com.haulmont.tickman.entity.Ticket;
import io.jmix.ui.component.HasValue;
import io.jmix.ui.component.RadioButtonGroup;
import io.jmix.ui.component.TextArea;
import io.jmix.ui.screen.Screen;
import io.jmix.ui.screen.Subscribe;
import io.jmix.ui.screen.UiController;
import io.jmix.ui.screen.UiDescriptor;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
@UiController("tickman_TicketExportScreen")
@UiDescriptor("ticket-export-screen.xml")
public class TicketExportScreen extends Screen {
public static final String URL = "URL";
public static final String MARKDOWN = "Markdown";
@Autowired
private TextArea<String> textArea;
@Autowired
private RadioButtonGroup<String> radioGroup;
private Collection<Ticket> tickets;
public void setTickets(Collection<Ticket> tickets) {
this.tickets = tickets;
radioGroup.setValue(URL);
}
@Subscribe
public void onInit(InitEvent event) {
radioGroup.setOptionsList(Arrays.asList(URL, MARKDOWN));
}
@Subscribe("radioGroup")
public void onRadioGroupValueChange(HasValue.ValueChangeEvent event) {
render();
}
private void render() {
String text = tickets.stream()
.map(ticket ->
radioGroup.getValue().equals(URL) ?
ticket.getHtmlUrl() :
"[" + ticket.getTitle() + "](" + ticket.getHtmlUrl() + ")"
)
.collect(Collectors.joining("\n"));
textArea.setValue(text);
}
}
|
[
"krivopustov@haulmont.com"
] |
krivopustov@haulmont.com
|
480655ae833ccd761289f145a493f27c33808382
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_4c7f0bcf633c02ffb7f9a1ba2c8209a6d9df1226/Coord/2_4c7f0bcf633c02ffb7f9a1ba2c8209a6d9df1226_Coord_s.java
|
140157d17cb86e6eca291d81078aca83beb12bd5
|
[] |
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
| 1,315
|
java
|
package rebelkeithy.mods.keithyutils;
import java.util.ArrayList;
import java.util.List;
public class Coord
{
public int x;
public int y;
public int z;
public Coord(int dx, int dy, int dz)
{
x = dx;
y = dy;
z = dz;
}
public static List<Coord> get4AdjacentSides()
{
return get4AdjacentSides(0, 0, 0);
}
public static List<Coord> get4AdjacentSides(int x, int y, int z)
{
List<Coord> coords = new ArrayList<Coord>();
coords.add(new Coord(x + 1, y, z));
coords.add(new Coord(x - 1, y, z));
coords.add(new Coord(x, y, z + 1));
coords.add(new Coord(x, y, z - 1));
return coords;
}
public static List<Coord> get6AdjacentSides()
{
return get6AdjacentSides(0, 0, 0);
}
public static List<Coord> get6AdjacentSides(int x, int y, int z)
{
List<Coord> coords = new ArrayList<Coord>();
coords.add(new Coord(x + 1, y, z));
coords.add(new Coord(x - 1, y, z));
coords.add(new Coord(x, y, z + 1));
coords.add(new Coord(x, y, z - 1));
coords.add(new Coord(x, y + 1, z));
coords.add(new Coord(x, y - 1, z));
return coords;
}
public int getBlockID(World world)
{
return world.getBlockId(x, y, z);
}
public int getMetadata(World world)
{
return world.getBlockMetadata(x, y, z);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
23aae4efe227b0805671b8367c19e1b52799a4e2
|
6d97d61e4606922ef4e2e4eaf43cb272890defa4
|
/src/main/java/com/mycompany/myapp/web/rest/CategoryResource.java
|
f5973e086713a061f6156dfb4414874224f58a10
|
[] |
no_license
|
l7777777b/sample-onlineshop
|
54072adec581ab0ff3f30a866754e65ebee4c855
|
247a3d415680297f994f6092a944a4dfabd6e050
|
refs/heads/master
| 2022-09-03T15:34:11.304974
| 2020-05-20T21:09:42
| 2020-05-20T21:09:42
| 265,685,802
| 0
| 0
| null | 2020-05-20T21:09:43
| 2020-05-20T21:04:57
|
Java
|
UTF-8
|
Java
| false
| false
| 6,620
|
java
|
package com.mycompany.myapp.web.rest;
import com.mycompany.myapp.service.CategoryService;
import com.mycompany.myapp.web.rest.errors.BadRequestAlertException;
import com.mycompany.myapp.service.dto.CategoryDTO;
import com.mycompany.myapp.service.dto.CategoryCriteria;
import com.mycompany.myapp.service.CategoryQueryService;
import io.github.jhipster.web.util.HeaderUtil;
import io.github.jhipster.web.util.PaginationUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
/**
* REST controller for managing {@link com.mycompany.myapp.domain.Category}.
*/
@RestController
@RequestMapping("/api")
public class CategoryResource {
private final Logger log = LoggerFactory.getLogger(CategoryResource.class);
private static final String ENTITY_NAME = "sampleonlineshopCategory";
@Value("${jhipster.clientApp.name}")
private String applicationName;
private final CategoryService categoryService;
private final CategoryQueryService categoryQueryService;
public CategoryResource(CategoryService categoryService, CategoryQueryService categoryQueryService) {
this.categoryService = categoryService;
this.categoryQueryService = categoryQueryService;
}
/**
* {@code POST /categories} : Create a new category.
*
* @param categoryDTO the categoryDTO to create.
* @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new categoryDTO, or with status {@code 400 (Bad Request)} if the category has already an ID.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PostMapping("/categories")
public ResponseEntity<CategoryDTO> createCategory(@Valid @RequestBody CategoryDTO categoryDTO) throws URISyntaxException {
log.debug("REST request to save Category : {}", categoryDTO);
if (categoryDTO.getId() != null) {
throw new BadRequestAlertException("A new category cannot already have an ID", ENTITY_NAME, "idexists");
}
CategoryDTO result = categoryService.save(categoryDTO);
return ResponseEntity.created(new URI("/api/categories/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* {@code PUT /categories} : Updates an existing category.
*
* @param categoryDTO the categoryDTO to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated categoryDTO,
* or with status {@code 400 (Bad Request)} if the categoryDTO is not valid,
* or with status {@code 500 (Internal Server Error)} if the categoryDTO couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PutMapping("/categories")
public ResponseEntity<CategoryDTO> updateCategory(@Valid @RequestBody CategoryDTO categoryDTO) throws URISyntaxException {
log.debug("REST request to update Category : {}", categoryDTO);
if (categoryDTO.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
CategoryDTO result = categoryService.save(categoryDTO);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, categoryDTO.getId().toString()))
.body(result);
}
/**
* {@code GET /categories} : get all the categories.
*
* @param pageable the pagination information.
* @param criteria the criteria which the requested entities should match.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of categories in body.
*/
@GetMapping("/categories")
public ResponseEntity<List<CategoryDTO>> getAllCategories(CategoryCriteria criteria, Pageable pageable) {
log.debug("REST request to get Categories by criteria: {}", criteria);
Page<CategoryDTO> page = categoryQueryService.findByCriteria(criteria, pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page);
return ResponseEntity.ok().headers(headers).body(page.getContent());
}
/**
* {@code GET /categories/count} : count all the categories.
*
* @param criteria the criteria which the requested entities should match.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the count in body.
*/
@GetMapping("/categories/count")
public ResponseEntity<Long> countCategories(CategoryCriteria criteria) {
log.debug("REST request to count Categories by criteria: {}", criteria);
return ResponseEntity.ok().body(categoryQueryService.countByCriteria(criteria));
}
/**
* {@code GET /categories/:id} : get the "id" category.
*
* @param id the id of the categoryDTO to retrieve.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the categoryDTO, or with status {@code 404 (Not Found)}.
*/
@GetMapping("/categories/{id}")
public ResponseEntity<CategoryDTO> getCategory(@PathVariable Long id) {
log.debug("REST request to get Category : {}", id);
Optional<CategoryDTO> categoryDTO = categoryService.findOne(id);
return ResponseUtil.wrapOrNotFound(categoryDTO);
}
/**
* {@code DELETE /categories/:id} : delete the "id" category.
*
* @param id the id of the categoryDTO to delete.
* @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}.
*/
@DeleteMapping("/categories/{id}")
public ResponseEntity<Void> deleteCategory(@PathVariable Long id) {
log.debug("REST request to delete Category : {}", id);
categoryService.delete(id);
return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())).build();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
d7bb66ad3a277d167276ee9bdb828d585b1aaf8e
|
6555870206c1a569644a5cca79a8f9c88492ff04
|
/src/test/java/com/xavier/mosquitotrap/MosquitotrapApplicationTests.java
|
7c669614bfdd2c57ab9c1018e85e99d3b70242c6
|
[] |
no_license
|
fxavier/mosquitotrap
|
11933cc19c87fb552f9f660e0d880a1a19f05665
|
27bb9eec9ff1473cbd4b3c11cd7c68e3bc3df7ce
|
refs/heads/master
| 2020-07-24T01:47:00.403715
| 2019-09-11T19:01:11
| 2019-09-11T19:01:11
| 207,765,634
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package com.xavier.mosquitotrap;
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 MosquitotrapApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"xavierfrancisco353@gmail.com"
] |
xavierfrancisco353@gmail.com
|
5523a27278a454ee428d7b0ae7e0646f86382ee4
|
2d63c2e35be7458ee21cc205439f577c3060c609
|
/pcap4j-packetfactory-propertiesbased/src/main/java/org/pcap4j/packet/factory/PacketFactoryBinder.java
|
216d5fde50efad2743099c4c272ad0ffa4f233a8
|
[
"MIT"
] |
permissive
|
PeteSL/pcap4j
|
5d56c18c4d075be7aff3e92590716ab98e9b2259
|
24f61db72627fd3f5870d7941dcf3fd7b805c90b
|
refs/heads/v1
| 2020-12-25T09:08:20.970759
| 2019-01-02T04:53:56
| 2019-01-02T04:53:56
| 41,912,087
| 0
| 0
|
NOASSERTION
| 2018-11-12T11:37:17
| 2015-09-04T11:22:19
|
Java
|
UTF-8
|
Java
| false
| false
| 3,274
|
java
|
/*_##########################################################################
_##
_## Copyright (C) 2013-2014 Pcap4J.org
_##
_##########################################################################
*/
package org.pcap4j.packet.factory;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.pcap4j.packet.Packet;
import org.pcap4j.packet.namednumber.NamedNumber;
/**
* @author Kaito Yamada
* @since pcap4j 0.9.16
*/
final class PacketFactoryBinder {
private static final PacketFactoryBinder INSTANCE = new PacketFactoryBinder();
private final Map<CacheKey, PacketFactory<?, ?>> cache =
new ConcurrentHashMap<CacheKey, PacketFactory<?, ?>>();
public static PacketFactoryBinder getInstance() {
return INSTANCE;
}
public <T, N extends NamedNumber<?, ?>> PacketFactory<T, N> getPacketFactory(
Class<T> targetClass, Class<N> numberClass) {
if (Packet.class.isAssignableFrom(targetClass)) {
@SuppressWarnings("unchecked")
PacketFactory<T, N> factory =
(PacketFactory<T, N>) PropertiesBasedPacketFactory.getInstance();
return factory;
}
CacheKey key = new CacheKey(targetClass, numberClass);
@SuppressWarnings("unchecked")
PacketFactory<T, N> cachedFactory = (PacketFactory<T, N>) cache.get(key);
if (cachedFactory != null) {
return cachedFactory;
}
@SuppressWarnings("unchecked")
Class<? extends PacketFactory<T, N>> factoryClass =
(Class<? extends PacketFactory<T, N>>)
PacketFactoryPropertiesLoader.getInstance()
.getPacketFactoryClass(targetClass, numberClass);
try {
Method getInstance = factoryClass.getMethod("getInstance");
@SuppressWarnings("unchecked")
PacketFactory<T, N> factory = (PacketFactory<T, N>) getInstance.invoke(null);
cache.put(key, factory);
return factory;
} catch (SecurityException e) {
throw new IllegalStateException(e);
} catch (NoSuchMethodException e) {
throw new IllegalStateException(e);
} catch (IllegalArgumentException e) {
throw new IllegalStateException(e);
} catch (IllegalAccessException e) {
throw new IllegalStateException(e);
} catch (InvocationTargetException e) {
throw new IllegalStateException(e);
}
}
private static final class CacheKey {
private final Class<?> targetClass;
private final Class<? extends NamedNumber<?, ?>> numberClass;
public CacheKey(Class<?> targetClass, Class<? extends NamedNumber<?, ?>> numberClass) {
this.targetClass = targetClass;
this.numberClass = numberClass;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!this.getClass().isInstance(obj)) {
return false;
}
CacheKey other = (CacheKey) obj;
return other.numberClass.equals(this.numberClass)
&& other.targetClass.equals(this.targetClass);
}
@Override
public int hashCode() {
int result = 17;
result = 31 * result + targetClass.hashCode();
result = 31 * result + numberClass.hashCode();
return result;
}
}
}
|
[
"kaitoy@pcap4j.org"
] |
kaitoy@pcap4j.org
|
2f3001718aa39ee1276eb75440b100d33d0a6830
|
a5721d03524d9094f344bdc12746ca3b5579bc04
|
/hy-lyjc-industrial-operation-monitoring/src/main/java/net/cdsunrise/hy/lyjc/industrialoperationmonitoring/usermanage/domain/dto/RoleMenuDTO.java
|
f59d83a64f2e90e8e8f8a61b2353ea60ee4eca02
|
[] |
no_license
|
yesewenrou/test
|
2aeaa0ea09842eeed2b0e589895b4f00319bf13b
|
992a70bed383f5574e4cc0db539dd764d984e5c6
|
refs/heads/master
| 2023-02-16T21:02:59.801518
| 2021-01-20T02:31:17
| 2021-01-20T02:31:17
| 327,574,246
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 465
|
java
|
package net.cdsunrise.hy.lyjc.industrialoperationmonitoring.usermanage.domain.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* @author LHY
*/
@Data
@TableName("hy_role_menu")
public class RoleMenuDTO {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long roleId;
private Long menuId;
}
|
[
"896586757@qq.com"
] |
896586757@qq.com
|
fdac8bf9dac0ab8273406791aa8292fc03f28b96
|
b045c9bbdf90925292f044a0fc7feea73824e20f
|
/project01/study/src/main/java/com/example/study/model/network/request/ItemApiRequest.java
|
d958d4469c9ad833c992b930a906f553d931d484
|
[] |
no_license
|
minhee0327/fc-Spring-Boot
|
2203545a5e690343c0486d0b89b4e729bb261557
|
ca128c57c0dfeb34c6c558e5d788e76f7e684442
|
refs/heads/master
| 2023-06-17T09:43:07.467876
| 2021-07-20T05:27:07
| 2021-07-20T05:27:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 701
|
java
|
package com.example.study.model.network.request;
import com.example.study.model.enumclass.ItemStatus;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ItemApiRequest {
private Long id;
private ItemStatus status;
private String name;
private String title;
private String content;
private BigDecimal price;
private String brandName;
private LocalDateTime registeredAt;
private LocalDateTime unregisteredAt;
private Long partnerId;
}
|
[
"queen.minhee@gmail.com"
] |
queen.minhee@gmail.com
|
5b57a792b08456cec490c5360b304861fbf194fa
|
ea38db0eaecefcbf4f7f85056eefe2e06f015dc4
|
/java-basic/src/main/java/bitcamp/java100/ch04/Test20_3.java
|
e35cdaa1f1a38235fa54ebb8512e690519c3786e
|
[] |
no_license
|
tjr7788/bitcamp
|
5b8dfff352a812719b2013a8e59c72f271e3e758
|
89cfab1e2cc1de403a04d033db431b29dde7e361
|
refs/heads/master
| 2021-09-05T05:17:05.620145
| 2018-01-24T09:53:16
| 2018-01-24T09:53:16
| 104,423,411
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 946
|
java
|
package bitcamp.java100.ch04;
import java.io.File;
public class Test20_3 {
static void print1(String value) {
System.out.println(value);
}
static void print2(int value) {
System.out.println(value);
}
static void print3(float value) {
System.out.println(value);
}
static void print4(Object value) {
System.out.println(value);
}
public static void main(String[] args){
print1("문자열");
print2(300);
print3(3.14f);
String v1 = "홍길동";
StringBuffer v2 = new StringBuffer("임꺽정");
File v3 = new File(".");
print1(v1);
// print1(v2); -> 컴파일 오류
// print1(v3); -> 컴파일 오류
print4(v1);
print4(v2);
print4(v3);
print4(100);
print4(3.14f);
print4(true);
}
}
|
[
"sig4213@naver.com"
] |
sig4213@naver.com
|
061c6e3677f87b09c8204f5b97429da4d6b36b26
|
4aa68ba10a69fcb2b6e293bf2b557987bca4486e
|
/spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/reactive/AbstractEncoderMethodReturnValueHandler.java
|
28387c292d8eed8e295a81d951f142c2a7f2ba69
|
[
"Apache-2.0"
] |
permissive
|
spring-operator/spring-framework
|
853575bdc9ab90b9418f4ade0f3fa819e3239066
|
18f2e6a12de6dd435c28d5fa2a694f66a1a5c046
|
refs/heads/master
| 2020-04-27T02:31:36.912263
| 2019-03-05T17:26:04
| 2019-03-05T17:26:04
| 173,997,184
| 4
| 0
| null | 2019-03-05T18:13:13
| 2019-03-05T18:13:13
| null |
UTF-8
|
Java
| false
| false
| 7,853
|
java
|
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.messaging.handler.invocation.reactive;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.core.MethodParameter;
import org.springframework.core.ReactiveAdapter;
import org.springframework.core.ReactiveAdapterRegistry;
import org.springframework.core.ResolvableType;
import org.springframework.core.codec.Encoder;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.MessagingException;
import org.springframework.util.Assert;
import org.springframework.util.MimeType;
/**
* Base class for a return value handler that encodes return values to
* {@code Flux<DataBuffer>} through the configured {@link Encoder}s.
*
* <p>Sub-classes must implement the abstract method
* {@link #handleEncodedContent} to handle the resulting encoded content.
*
* <p>This handler should be ordered last since its {@link #supportsReturnType}
* returns {@code true} for any method parameter type.
*
* @author Rossen Stoyanchev
* @since 5.2
*/
public abstract class AbstractEncoderMethodReturnValueHandler implements HandlerMethodReturnValueHandler {
private static final ResolvableType VOID_RESOLVABLE_TYPE = ResolvableType.forClass(Void.class);
private static final ResolvableType OBJECT_RESOLVABLE_TYPE = ResolvableType.forClass(Object.class);
protected final Log logger = LogFactory.getLog(getClass());
private final List<Encoder<?>> encoders;
private final ReactiveAdapterRegistry adapterRegistry;
private DataBufferFactory defaultBufferFactory = new DefaultDataBufferFactory();
protected AbstractEncoderMethodReturnValueHandler(List<Encoder<?>> encoders, ReactiveAdapterRegistry registry) {
Assert.notEmpty(encoders, "At least one Encoder is required");
Assert.notNull(registry, "ReactiveAdapterRegistry is required");
this.encoders = Collections.unmodifiableList(encoders);
this.adapterRegistry = registry;
}
/**
* The configured encoders.
*/
public List<Encoder<?>> getEncoders() {
return this.encoders;
}
/**
* The configured adapter registry.
*/
public ReactiveAdapterRegistry getAdapterRegistry() {
return this.adapterRegistry;
}
@Override
public boolean supportsReturnType(MethodParameter returnType) {
// We could check canEncode but we're probably last in order anyway
return true;
}
@Override
public Mono<Void> handleReturnValue(
@Nullable Object returnValue, MethodParameter returnType, Message<?> message) {
if (returnValue == null) {
return handleNoContent(returnType, message);
}
DataBufferFactory bufferFactory = (DataBufferFactory) message.getHeaders()
.getOrDefault(HandlerMethodReturnValueHandler.DATA_BUFFER_FACTORY_HEADER, this.defaultBufferFactory);
MimeType mimeType = (MimeType) message.getHeaders().get(MessageHeaders.CONTENT_TYPE);
Flux<DataBuffer> encodedContent = encodeContent(
returnValue, returnType, bufferFactory, mimeType, Collections.emptyMap());
return new ChannelSendOperator<>(encodedContent, publisher ->
handleEncodedContent(Flux.from(publisher), returnType, message));
}
@SuppressWarnings("unchecked")
private Flux<DataBuffer> encodeContent(
@Nullable Object content, MethodParameter returnType, DataBufferFactory bufferFactory,
@Nullable MimeType mimeType, Map<String, Object> hints) {
ResolvableType returnValueType = ResolvableType.forMethodParameter(returnType);
ReactiveAdapter adapter = getAdapterRegistry().getAdapter(returnValueType.resolve(), content);
Publisher<?> publisher;
ResolvableType elementType;
if (adapter != null) {
publisher = adapter.toPublisher(content);
ResolvableType genericType = returnValueType.getGeneric();
elementType = getElementType(adapter, genericType);
}
else {
publisher = Mono.justOrEmpty(content);
elementType = returnValueType.toClass() == Object.class && content != null ?
ResolvableType.forInstance(content) : returnValueType;
}
if (elementType.resolve() == void.class || elementType.resolve() == Void.class) {
return Flux.from(publisher).cast(DataBuffer.class);
}
Encoder<?> encoder = getEncoder(elementType, mimeType);
return Flux.from((Publisher) publisher).concatMap(value ->
encodeValue(value, elementType, encoder, bufferFactory, mimeType, hints));
}
private ResolvableType getElementType(ReactiveAdapter adapter, ResolvableType type) {
if (adapter.isNoValue()) {
return VOID_RESOLVABLE_TYPE;
}
else if (type != ResolvableType.NONE) {
return type;
}
else {
return OBJECT_RESOLVABLE_TYPE;
}
}
@Nullable
@SuppressWarnings("unchecked")
private <T> Encoder<T> getEncoder(ResolvableType elementType, @Nullable MimeType mimeType) {
for (Encoder<?> encoder : getEncoders()) {
if (encoder.canEncode(elementType, mimeType)) {
return (Encoder<T>) encoder;
}
}
return null;
}
@SuppressWarnings("unchecked")
private <T> Mono<DataBuffer> encodeValue(
Object element, ResolvableType elementType, @Nullable Encoder<T> encoder,
DataBufferFactory bufferFactory, @Nullable MimeType mimeType,
@Nullable Map<String, Object> hints) {
if (encoder == null) {
encoder = getEncoder(ResolvableType.forInstance(element), mimeType);
if (encoder == null) {
return Mono.error(new MessagingException(
"No encoder for " + elementType + ", current value type is " + element.getClass()));
}
}
Mono<T> mono = Mono.just((T) element);
Flux<DataBuffer> dataBuffers = encoder.encode(mono, bufferFactory, elementType, mimeType, hints);
return DataBufferUtils.join(dataBuffers);
}
/**
* Sub-classes implement this method to handle encoded values in some way
* such as creating and sending messages.
*
* @param encodedContent the encoded content; each {@code DataBuffer}
* represents the fully-aggregated, encoded content for one value
* (i.e. payload) returned from the HandlerMethod.
* @param returnType return type of the handler method that produced the data
* @param message the input message handled by the handler method
* @return completion {@code Mono<Void>} for the handling
*/
protected abstract Mono<Void> handleEncodedContent(
Flux<DataBuffer> encodedContent, MethodParameter returnType, Message<?> message);
/**
* Invoked for a {@code null} return value, which could mean a void method
* or method returning an async type parameterized by void.
* @param returnType return type of the handler method that produced the data
* @param message the input message handled by the handler method
* @return completion {@code Mono<Void>} for the handling
*/
protected abstract Mono<Void> handleNoContent(MethodParameter returnType, Message<?> message);
}
|
[
"rstoyanchev@pivotal.io"
] |
rstoyanchev@pivotal.io
|
85fd0df21ed53892ac2a9555330e3c7206061287
|
5977381239a3a9ef98dfccea4cb1ac1ca8ad1deb
|
/fw_web/src/main/java/com/fw/web/logistics/service/fbk/LogisticsCheckHouseServiceFbk.java
|
8d2ad706cee1aed0c2f416eb7e64ae86cf680728
|
[] |
no_license
|
957001352/simplefw
|
ec689bc485c26934e96204f6cddb6126ad0e63c1
|
f4d4df449ab8702b81d8fcdf1e9b3fe32c38ff78
|
refs/heads/main
| 2023-02-12T15:01:16.118871
| 2020-12-31T03:52:41
| 2020-12-31T03:52:41
| 324,302,481
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,504
|
java
|
package com.fw.web.logistics.service.fbk;
import com.fw.domain.Result;
import com.fw.entity.logistics.LogisticsCheckHouse;
import com.fw.enums.ResultEnum;
import com.fw.utils.ResultUtils;
import com.fw.web.logistics.service.LogisticsCheckHouseService;
import org.springframework.stereotype.Service;
/**
* 盘库
* @author lpsong
* @since 2020-11-12
*/
@Service
public class LogisticsCheckHouseServiceFbk implements LogisticsCheckHouseService {
@Override
public Result insert(LogisticsCheckHouse logisticsCheckHouse) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
@Override
public Result update(LogisticsCheckHouse logisticsCheckHouse) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
@Override
public Result updateStatus(Integer id) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
@Override
public Result findList(String houseNo, String checkTime, Integer status, Integer checkResult,Integer checkUser, Integer pageNum, Integer pageSize) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
@Override
public Result findDetailList(Integer checkHouseId) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
@Override
public Result findStoragePorductList(Integer locationId) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
@Override
public Result findTreeList(String name) {
return ResultUtils.error(ResultEnum.NETWORK_ERR);
}
}
|
[
"gchen@dhlk-tech.com"
] |
gchen@dhlk-tech.com
|
09aed7ae6def3e74013d218977e022a608a14520
|
036b13f99c161e13ca9a3f3c5262db38544131f7
|
/1_java/Chapter14_exception/src/com/tj/ex0trycatch/Ex01.java
|
d5992a6adb43ef88dba45c568e86176593faae0c
|
[] |
no_license
|
highwindLeos/Webstudy-In-TheJoeun
|
4e442c1ad500232ad69ae11c2a9faa8634ca8ed3
|
06b779765551e617cf37499336d6741720f23fa8
|
refs/heads/master
| 2022-12-22T10:46:37.241449
| 2020-07-28T09:54:03
| 2020-07-28T09:54:03
| 132,757,543
| 0
| 0
| null | 2022-12-16T01:05:47
| 2018-05-09T13:00:52
|
HTML
|
UHC
|
Java
| false
| false
| 972
|
java
|
package com.tj.ex0trycatch;
import java.util.Scanner;
public class Ex01 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i= 0, j = 0;
System.out.println("사칙연산을 할겁니다.");
System.out.println("첫번째 수?");
try {
i = sc.nextInt();
} catch (Exception e) {
System.out.println("꼭 수를 입력하세요.");
}
sc.nextLine(); // 버퍼 삭제
System.out.println("두번째 수?");
try {
j = sc.nextInt();
} catch (Exception e) {
System.out.println("꼭 수를 입력하세요.");
}
System.out.println("i * j = " + (i * j));
try {
System.out.println("i / j = " + (i / j));
} catch (ArithmeticException e) {
System.out.println(e.getMessage());
} finally {
System.out.println("계속 수행됨니다.");
}
System.out.println("i + j = " + (i + j));
System.out.println("i - j = " + (i - j));
System.out.println("이상입니다.");
sc.close();
}
}
|
[
"highwind26@gmail.com"
] |
highwind26@gmail.com
|
58d0b788408e71f63505d43bc926b28687295e45
|
6602ebf7ad0049bd8816aa3d4d7beb170084f505
|
/mybot-master/src/main/java/com/boot/lea/mybot/entity/Order.java
|
5f5e084e9e148f261b384a531d0b29d07f6c636d
|
[] |
no_license
|
tgy616/framework
|
7115880fa6a42206806237f2c5a15ad035e870c9
|
ebe7a0c3453e05b6def806c8ce423e661f2cdad7
|
refs/heads/master
| 2022-12-21T22:44:09.670187
| 2020-10-24T06:08:49
| 2020-10-24T06:08:49
| 198,574,960
| 0
| 1
| null | 2022-12-16T15:17:05
| 2019-07-24T06:44:41
|
CSS
|
UTF-8
|
Java
| false
| false
| 759
|
java
|
package com.boot.lea.mybot.entity;
/**
* @Title: Order.java
* @Package com.boot.lea.mybot.entity
* @Description: TODO(用一句话描述该文件做什么)
* @author LiJing
* @date 2019/8/9 15:33
* @version v.3.0
*/
import com.boot.lea.mybot.annotation.NeedSetValue;
import com.boot.lea.mybot.mapper.UserMapper;
/**
* @ClassName: Order
* @Description: TODO(这里用一句话描述这个类的作用)
* @author LiJing
* @date 2019/8/9 15:33
*
*/
public class Order {
private Integer id;
private String name;
private Integer customerId;
// 使用注解定义在参数上
@NeedSetValue(beanClass = UserMapper.class, params = "customerId", method = "getUserById",targetFiled = "name")
private String customerName;
}
|
[
"418982690@qq.com"
] |
418982690@qq.com
|
56932fcff8e15a2663c79de17f56679a396bfc68
|
49a0cedbd7bd3af9a90ba4c3dfc2521a5a80ca51
|
/limsproduct/src/main/java/net/zjcclims/service/lab/LabConstructionFundingService.java
|
9aacbe2037064ff596975fdaae5efb2ecc82864c
|
[] |
no_license
|
sangjiexun/limsproduct2
|
a08c611e4197609f36f52c4762585664defe8248
|
7eedf8fa2944ebbd3b3769f1c4cba61864c66b3a
|
refs/heads/master
| 2023-05-05T07:47:11.293957
| 2019-07-21T12:39:48
| 2019-07-21T12:39:48
| 234,906,524
| 0
| 0
| null | 2023-04-14T17:11:46
| 2020-01-19T13:39:52
| null |
UTF-8
|
Java
| false
| false
| 1,963
|
java
|
package net.zjcclims.service.lab;
import java.util.List;
import net.zjcclims.domain.LabConstructionFunding;
/**
* Spring service that handles CRUD requests for LabConstructionFunding entities
*
*/
public interface LabConstructionFundingService {
/***************************
* 功能:根据查询条件实验项目经费数量
* 作者: 贺子龙
* 日期:2015-10-05
**************************/
public int findAllLabConstructionFundingsByQueryCount(LabConstructionFunding labConstructionFunding);
/***************************
* 功能:根据查询条件分页实验项目经费记录(分页)
* 作者: 贺子龙
* 日期:2015-10-05
**************************/
public List<LabConstructionFunding> findAllLabConstructionFundingsByQuery(Integer currpage, Integer pageSize,LabConstructionFunding labConstructionFunding);
/***************************
* 功能:根据查询条件分页实验项目经费记录(不分页)
* 作者: 贺子龙
* 日期:2015-10-05
**************************/
public List<LabConstructionFunding> findAllLabConstructionFundingsByQuery(LabConstructionFunding labConstructionFunding);
/********************************
* 功能:保存项目经费
* 作者:贺子龙
* 日期:2015-10-05
*********************************/
public LabConstructionFunding saveLabConstructionFunding(LabConstructionFunding labConstructionFunding);
/********************************
* 功能:根据主键查询实验项目经费记录
* 作者:贺子龙
* 日期:2015-10-05
*********************************/
public LabConstructionFunding findLabConstructionFundingByPrimaryKey(Integer labConstructionFundingId);
/********************************
* 功能:删除主键查询实验项目经费记录
* 作者:贺子龙
* 日期:2015-10-05
*********************************/
public void deleteLabConstructionFunding(Integer labConstructionFundingId);
}
|
[
"2798779364@qq.com"
] |
2798779364@qq.com
|
6480d5da9372ac4abbfe80aaffe244be798dba81
|
c98ded3f6de5a1bb91c7930cd090208fbee0081f
|
/skWeiChatBaidu/src/main/java/com/sk/weichat/bean/event/EventTransfer.java
|
bccab35599a9687a6e74b81b50bb6c101aa442ac
|
[] |
no_license
|
GJF19981210/IM_Android
|
e628190bb504b52ec04e8beaf5449bd847904c84
|
7743586eac5ca07d1a7e9a2d4b2cc24d68a082ac
|
refs/heads/master
| 2023-01-01T11:15:42.085782
| 2020-10-19T07:10:43
| 2020-10-19T07:10:43
| 305,293,872
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package com.sk.weichat.bean.event;
import com.sk.weichat.bean.message.ChatMessage;
public class EventTransfer {
private ChatMessage chatMessage;
public EventTransfer(ChatMessage chatMessage) {
this.chatMessage = chatMessage;
}
public ChatMessage getChatMessage() {
return chatMessage;
}
}
|
[
"2937717941@qq.com"
] |
2937717941@qq.com
|
6a1aac0e0ae8907fba22bdf32e657481655f13fb
|
964601fff9212bec9117c59006745e124b49e1e3
|
/matos-android/src/main/java/android/os/Environment.java
|
6f306dfbe262c8a426d028093d976fe07727e40f
|
[
"Apache-2.0"
] |
permissive
|
vadosnaprimer/matos-profiles
|
bf8300b04bef13596f655d001fc8b72315916693
|
fb27c246911437070052197aa3ef91f9aaac6fc3
|
refs/heads/master
| 2020-05-23T07:48:46.135878
| 2016-04-05T13:14:42
| 2016-04-05T13:14:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,174
|
java
|
package android.os;
/*
* #%L
* Matos
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2010 - 2014 Orange SA
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
@com.francetelecom.rd.stubs.annotation.ClassDone(0)
public class Environment
{
// Fields
public static java.lang.String DIRECTORY_MUSIC;
public static java.lang.String DIRECTORY_PODCASTS;
public static java.lang.String DIRECTORY_RINGTONES;
public static java.lang.String DIRECTORY_ALARMS;
public static java.lang.String DIRECTORY_NOTIFICATIONS;
public static java.lang.String DIRECTORY_PICTURES;
public static java.lang.String DIRECTORY_MOVIES;
public static java.lang.String DIRECTORY_DOWNLOADS;
public static java.lang.String DIRECTORY_DCIM;
public static final java.lang.String MEDIA_REMOVED = "removed";
public static final java.lang.String MEDIA_UNMOUNTED = "unmounted";
public static final java.lang.String MEDIA_CHECKING = "checking";
public static final java.lang.String MEDIA_NOFS = "nofs";
public static final java.lang.String MEDIA_MOUNTED = "mounted";
public static final java.lang.String MEDIA_MOUNTED_READ_ONLY = "mounted_ro";
public static final java.lang.String MEDIA_SHARED = "shared";
public static final java.lang.String MEDIA_BAD_REMOVAL = "bad_removal";
public static final java.lang.String MEDIA_UNMOUNTABLE = "unmountable";
// Constructors
public Environment(){
}
// Methods
public static boolean isExternalStorageEmulated(){
return false;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getDataDirectory", pos = -1, report = "-")
public static java.io.File getDataDirectory(){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getDownloadCacheDirectory", pos = -1, report = "-")
public static java.io.File getDownloadCacheDirectory(){
return (java.io.File) null;
}
public static boolean isExternalStorageRemovable(){
return false;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStorageDirectory", pos = -1, report = "-")
public static java.io.File getExternalStorageDirectory(){
return (java.io.File) null;
}
public static java.lang.String getExternalStorageState(){
return (java.lang.String) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStorageAppCacheDirectory", pos = -1, report = "-")
public static java.io.File getExternalStorageAppCacheDirectory(java.lang.String arg1){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStorageAppDataDirectory", pos = -1, report = "-")
public static java.io.File getExternalStorageAppDataDirectory(java.lang.String arg1){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStorageAppMediaDirectory", pos = -1, report = "-")
public static java.io.File getExternalStorageAppMediaDirectory(java.lang.String arg1){
return (java.io.File) null;
}
public static java.io.File getExternalStorageAppObbDirectory(java.lang.String arg1){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStoragePublicDirectory", pos = -1, report = "-")
public static java.io.File getExternalStoragePublicDirectory(java.lang.String arg1){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getRootDirectory", pos = -1, report = "-")
public static java.io.File getRootDirectory(){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStorageAppFilesDirectory", pos = -1, report = "-")
public static java.io.File getExternalStorageAppFilesDirectory(java.lang.String arg1){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getExternalStorageDataDir", pos = -1, report = "-")
public static java.io.File getExternalStorageAndroidDataDir(){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getSecureDataDirectory", pos = -1, report = "-")
public static java.io.File getSecureDataDirectory(){
return (java.io.File) null;
}
@com.francetelecom.rd.stubs.annotation.ArgsRule(value = "Environment.getSystemSecureDirectory", pos = -1, report = "-")
public static java.io.File getSystemSecureDirectory(){
return (java.io.File) null;
}
public static boolean isEncryptedFilesystemEnabled(){
return false;
}
}
|
[
"pierre.cregut@orange.com"
] |
pierre.cregut@orange.com
|
791fd1066c6cc1fa85d616e7ea16f61a8e3de06e
|
e09d79b030cf788a8131bd38d5e8138ec469a903
|
/tests/a2l.tests.atlmr/src-gen/a2l/tests/atlmr/anomalies/ShortInstantiation.java
|
fa4b208e43da23fc253dc9a2b9accc48b6e2df9f
|
[] |
no_license
|
anatlyzer/a2l
|
3c28b71804c1bdd5c378a7cf85e9a04498d8869a
|
74f2c3ca81e45233a44461e95a4898ba1f237983
|
refs/heads/master
| 2021-01-16T04:34:21.940706
| 2020-02-25T23:35:00
| 2020-02-25T23:35:00
| 242,977,197
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 367
|
java
|
/**
*/
package a2l.tests.atlmr.anomalies;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Short Instantiation</b></em>'.
* <!-- end-user-doc -->
*
*
* @see a2l.tests.atlmr.anomalies.AnomaliesPackage#getShortInstantiation()
* @model
* @generated
*/
public interface ShortInstantiation extends Anomaly {
} // ShortInstantiation
|
[
"jesus.sanchez.cuadrado@gmail.com"
] |
jesus.sanchez.cuadrado@gmail.com
|
4fa5096ebf4215994734f1ad0ceebda00a343f17
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/83/org/apache/commons/math/linear/ArrayRealVector_mapMultiplyToSelf_346.java
|
4a2813aa7e1a2ccaa6de9d1f8f6ada12c8b81c08
|
[] |
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,650
|
java
|
org apach common math linear
link real vector realvector arrai
version revis date
arrai real vector arrayrealvector real vector realvector serializ
inherit doc inheritdoc
real vector realvector map multipli mapmultiplytoself
data length
data data
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
878bcc73ea03563a4d6b49cbb32b66c037d9d72f
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/131/033/CWE191_Integer_Underflow__byte_console_readLine_multiply_67a.java
|
8d83ecd316b798106b7bf6aac242b01f08f915ad
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 6,106
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__byte_console_readLine_multiply_67a.java
Label Definition File: CWE191_Integer_Underflow.label.xml
Template File: sources-sinks-67a.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: console_readLine Read data from the console using readLine
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an underflow before multiplying data by 2
* BadSink : If data is negative, multiply by 2, which can cause an underflow
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.logging.Level;
public class CWE191_Integer_Underflow__byte_console_readLine_multiply_67a extends AbstractTestCase
{
static class Container
{
public byte containerOne;
}
public void bad() throws Throwable
{
byte data;
/* init data */
data = -1;
/* POTENTIAL FLAW: Read data from console with readLine*/
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
readerInputStream = new InputStreamReader(System.in, "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
String stringNumber = readerBuffered.readLine();
if (stringNumber != null)
{
data = Byte.parseByte(stringNumber.trim());
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
catch (NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Error with number parsing", exceptNumberFormat);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
finally
{
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
}
}
Container dataContainer = new Container();
dataContainer.containerOne = data;
(new CWE191_Integer_Underflow__byte_console_readLine_multiply_67b()).badSink(dataContainer );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
byte data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
Container dataContainer = new Container();
dataContainer.containerOne = data;
(new CWE191_Integer_Underflow__byte_console_readLine_multiply_67b()).goodG2BSink(dataContainer );
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
byte data;
/* init data */
data = -1;
/* POTENTIAL FLAW: Read data from console with readLine*/
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
readerInputStream = new InputStreamReader(System.in, "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
String stringNumber = readerBuffered.readLine();
if (stringNumber != null)
{
data = Byte.parseByte(stringNumber.trim());
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
catch (NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Error with number parsing", exceptNumberFormat);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
finally
{
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
}
}
Container dataContainer = new Container();
dataContainer.containerOne = data;
(new CWE191_Integer_Underflow__byte_console_readLine_multiply_67b()).goodB2GSink(dataContainer );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
69f271608ac004f9f02c4621520bc086b8a2b5dc
|
cfd1ba06de65f085426ecaebac5612daed725b31
|
/src/test/java/com/jstarcraft/rns/search/converter/MockComplexObject.java
|
714f1db36701b734789bee70f98125a5545ba507
|
[
"Apache-2.0"
] |
permissive
|
xfxCSB/jstarcraft-rns
|
37646d1acbc50e0563aff18a89aca2f9100fb574
|
9f39401670780f27b011513f91f377ed0950a38b
|
refs/heads/master
| 2020-06-30T23:17:56.840539
| 2019-08-06T12:24:12
| 2019-08-06T12:24:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,790
|
java
|
package com.jstarcraft.rns.search.converter;
import java.time.Instant;
import java.util.HashMap;
import java.util.LinkedList;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.jstarcraft.rns.search.annotation.SearchIndex;
import com.jstarcraft.rns.search.annotation.SearchSort;
import com.jstarcraft.rns.search.annotation.SearchStore;
/**
* 模仿复杂对象
*
* @author Birdy
*
*/
public class MockComplexObject {
@SearchIndex
@SearchSort
@SearchStore
private Integer id;
@SearchIndex
@SearchSort
@SearchStore
private String firstName;
@SearchIndex
@SearchSort
@SearchStore
private String lastName;
@SearchIndex
@SearchStore
private String[] names;
@SearchIndex
@SearchSort
@SearchStore
private int money;
@SearchIndex
@SearchStore
private int[] currencies;
@SearchIndex
@SearchSort
@SearchStore
private Instant instant;
@SearchIndex
@SearchSort
@SearchStore
private MockEnumeration race;
@SearchStore
private MockSimpleObject object;
@SearchStore
private LinkedList<MockSimpleObject> list;
@SearchStore
private HashMap<Integer, MockSimpleObject> map;
public MockComplexObject() {
}
public Integer getId() {
return id;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String[] getNames() {
return names;
}
public int getMoney() {
return money;
}
public int[] getCurrencies() {
return currencies;
}
public Instant getInstant() {
return instant;
}
public MockEnumeration getRace() {
return race;
}
public MockSimpleObject getObject() {
return object;
}
public LinkedList<MockSimpleObject> getList() {
return list;
}
public HashMap<Integer, MockSimpleObject> getMap() {
return map;
}
@Override
public boolean equals(Object object) {
if (this == object)
return true;
if (object == null)
return false;
if (getClass() != object.getClass())
return false;
MockComplexObject that = (MockComplexObject) object;
EqualsBuilder equal = new EqualsBuilder();
equal.append(this.id, that.id);
equal.append(this.firstName, that.firstName);
equal.append(this.lastName, that.lastName);
equal.append(this.names, that.names);
equal.append(this.money, that.money);
equal.append(this.currencies, that.currencies);
equal.append(this.instant, that.instant);
equal.append(this.race, that.race);
equal.append(this.object, that.object);
equal.append(this.list, that.list);
equal.append(this.map, that.map);
return equal.isEquals();
}
@Override
public int hashCode() {
HashCodeBuilder hash = new HashCodeBuilder();
hash.append(id);
hash.append(firstName);
hash.append(lastName);
hash.append(names);
hash.append(money);
hash.append(currencies);
hash.append(instant);
hash.append(race);
hash.append(object);
hash.append(list);
hash.append(map);
return hash.toHashCode();
}
@Override
public String toString() {
ToStringBuilder string = new ToStringBuilder(this);
string.append(id);
string.append(firstName);
string.append(lastName);
string.append(names);
string.append(money);
string.append(currencies);
string.append(instant);
string.append(race);
string.append(object);
string.append(list);
string.append(map);
return string.toString();
}
public static MockComplexObject instanceOf(Integer id, String firstName, String lastName, int money, Instant instant, MockEnumeration race) {
MockComplexObject instance = new MockComplexObject();
instance.id = id;
instance.firstName = firstName;
instance.lastName = lastName;
instance.names = new String[] { firstName, lastName };
instance.money = money;
instance.currencies = new int[] { money };
instance.instant = instant;
instance.race = race;
instance.list = new LinkedList<>();
instance.map = new HashMap<>();
instance.object = MockSimpleObject.instanceOf(money, firstName);
instance.list.add(instance.object);
instance.map.put(money, instance.object);
return instance;
}
}
|
[
"Birdy@LAPTOP-QRG8T75T"
] |
Birdy@LAPTOP-QRG8T75T
|
7e8522b5a4209f8f41f1ef9095a101dd97be91af
|
5cb1a8ffe3ed009c85d534c5ac0b00d3fb447626
|
/subprojects/execution/src/main/java/org/gradle/internal/execution/history/impl/DefaultBeforeExecutionState.java
|
8a55d47b5eef6b60c8cb34fd74d089acc49fd112
|
[
"BSD-3-Clause",
"LGPL-2.1-or-later",
"MIT",
"CPL-1.0",
"Apache-2.0",
"LGPL-2.1-only",
"LicenseRef-scancode-mit-old-style"
] |
permissive
|
Verdinjoshua26/gradle
|
f11184f20bf45456d8a903c6677cc29a0ac1117b
|
cfeeb71d1e3159f5d10856aef854344ba92c4a0f
|
refs/heads/master
| 2023-08-05T20:44:50.692054
| 2019-05-17T13:59:27
| 2019-05-17T13:59:30
| 187,253,049
| 2
| 0
|
Apache-2.0
| 2023-07-22T05:59:51
| 2019-05-17T17:00:44
|
Groovy
|
UTF-8
|
Java
| false
| false
| 1,819
|
java
|
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.internal.execution.history.impl;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedMap;
import org.gradle.internal.execution.history.BeforeExecutionState;
import org.gradle.internal.fingerprint.CurrentFileCollectionFingerprint;
import org.gradle.internal.snapshot.ValueSnapshot;
import org.gradle.internal.snapshot.impl.ImplementationSnapshot;
public class DefaultBeforeExecutionState extends AbstractExecutionState<CurrentFileCollectionFingerprint> implements BeforeExecutionState {
public DefaultBeforeExecutionState(
ImplementationSnapshot implementation,
ImmutableList<ImplementationSnapshot> additionalImplementations,
ImmutableSortedMap<String, ValueSnapshot> inputProperties,
ImmutableSortedMap<String, CurrentFileCollectionFingerprint> inputFileProperties,
ImmutableSortedMap<String, CurrentFileCollectionFingerprint> outputFileProperties
) {
super(
implementation,
additionalImplementations,
inputProperties,
inputFileProperties,
outputFileProperties
);
}
}
|
[
"lorant@gradle.com"
] |
lorant@gradle.com
|
ecf972fb52d687d5b1b996d2d93719d2a8547c06
|
71f4c92ae45f43fac3e835ab2ba1a45acfeb991d
|
/BitcampJava80/SJ/java01/src/step20$InnerClass/exam03/Test6.java
|
c2acbc300588a1893be47c9c59159b0fc2346b8e
|
[] |
no_license
|
SeongJunKang/BitCamp-data-project
|
0a33774d74a1e116100d237c580828a987e8e50b
|
c188ab6aa28f242e3a9c8a514c273b1869ff1799
|
refs/heads/master
| 2021-10-07T23:56:29.618066
| 2018-12-06T00:13:25
| 2018-12-06T00:13:25
| 61,281,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 516
|
java
|
package step20$InnerClass.exam03;
public class Test6 {
public static void main(String[] args) {
Outer5 p = new Outer5();
p.m();
}
}
/*
중첩클래스와 .class 파일
- 자바 컴파일러는 클래스 선언 당 한개의 .class(bytecode) vkdlfdmf todtjdgksek.
- 중첩 클래스의 경우 "바깥클래스명 $ 중첩클래스명.class" 형식으로 클래스파일을 만듦
- 익명 중첩 클래스는 "바깥클래스명$1.class" 처럼 $ 다음에 선언된 순서대로 번호가 붙음
*/
|
[
"tjdwns8574@gmail.com"
] |
tjdwns8574@gmail.com
|
94f3c3136827162bccb09aa470265b28f0f63ed9
|
2b5d790da7cc5775326ab48dd31aea2a333dbab4
|
/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/reintegr/TEmpregador.java
|
bc9640960e0208fb3b0c0cfbee38d0bd32eb9a5a
|
[] |
no_license
|
edipojuan/esocial
|
93854a78b7d25cd524d1b5ac71bf97940ce143d6
|
b5dbbd48e3266f5344c06706fc770250e5d8707a
|
refs/heads/master
| 2020-03-27T01:54:41.540941
| 2018-08-17T20:46:32
| 2018-08-17T20:46:32
| 145,753,063
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,646
|
java
|
//
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
// Gerado em: 2018.04.09 às 12:51:04 PM BRT
//
package br.jus.tst.esocial.esquemas.eventos.reintegr;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java de TEmpregador complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="TEmpregador">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="tpInsc">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}byte">
* <pattern value="\d"/>
* </restriction>
* </simpleType>
* </element>
* <element name="nrInsc">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <pattern value="\d{8,15}"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TEmpregador", namespace = "http://www.esocial.gov.br/schema/evt/evtReintegr/v02_04_02", propOrder = {
"tpInsc",
"nrInsc"
})
public class TEmpregador {
protected byte tpInsc;
@XmlElement(required = true)
protected String nrInsc;
/**
* Obtém o valor da propriedade tpInsc.
*
*/
public byte getTpInsc() {
return tpInsc;
}
/**
* Define o valor da propriedade tpInsc.
*
*/
public void setTpInsc(byte value) {
this.tpInsc = value;
}
/**
* Obtém o valor da propriedade nrInsc.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNrInsc() {
return nrInsc;
}
/**
* Define o valor da propriedade nrInsc.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNrInsc(String value) {
this.nrInsc = value;
}
}
|
[
"calimaborges@gmail.com"
] |
calimaborges@gmail.com
|
a8f7b0aa6c04bd136e18caf08ac38cc43753b922
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/97/714.java
|
7685b9f0f2b39346b1aff0badf3cb98919182169
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,113
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int a1 = 0;
int a2 = 0;
int a3 = 0;
int a4 = 0;
int a5 = 0;
int a6 = 0;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (;;)
{
if (n - 100 >= 0)
{
a1 += 1;
n -= 100;
}
else
{
break;
}
}
for (;;)
{
if (n - 50 >= 0)
{
a2 += 1;
n -= 50;
}
else
{
break;
}
}
for (;;)
{
if (n - 20 >= 0)
{
a3 += 1;
n -= 20;
}
else
{
break;
}
}
for (;;)
{
if (n - 10 >= 0)
{
a4 += 1;
n -= 10;
}
else
{
break;
}
}
for (;;)
{
if (n - 5 >= 0)
{
a5 += 1;
n -= 5;
}
else
{
break;
}
}
for (;;)
{
if (n - 1 >= 0)
{
a6 += 1;
n -= 1;
}
else
{
break;
}
}
System.out.printf("%d\n",a1);
System.out.printf("%d\n",a2);
System.out.printf("%d\n",a3);
System.out.printf("%d\n",a4);
System.out.printf("%d\n",a5);
System.out.printf("%d\n",a6);
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
56245b932d2d875ccc8d89e4293d08ec561e385b
|
3ecfb64886471681f9ff441c26eeaf138b5b29e9
|
/src/all_my_ages.java
|
e9e50d3ed86b64ef7ec8d4d2eed2b1a2f6dfcd95
|
[] |
no_license
|
League-Level0-Student/level-0-module-1-ayanna08
|
0b213b50b5ea51404b4180a4eb052e149068a3bc
|
ebbcdee4d44971cc3e292a6407aa32094401aa69
|
refs/heads/master
| 2020-09-22T14:41:12.503636
| 2019-12-15T23:46:50
| 2019-12-15T23:46:50
| 225,243,534
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 192
|
java
|
public class all_my_ages {
public static void main(String[] args) {
for (int i = 2008; i < 2020; i++) {
System.out.println("In " + i+ ", I was " +(i-2008)+ " years old");
}
}
}
|
[
"league@iMac.attlocal.net"
] |
league@iMac.attlocal.net
|
3c8f2cf864989fbb2e77a3018f08e292cf0256a2
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/biznessapps/food_ordering/entities/PastOrderEntity.java
|
cc493298f6a0906a7a76a25d25121c0653090610
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,924
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.biznessapps.food_ordering.entities;
import android.text.Html;
import com.biznessapps.location.entities.LocationEntity;
import java.util.Date;
import java.util.List;
public class PastOrderEntity extends LocationEntity
{
private static final long serialVersionUID = 0x790a8f5a89c6720fL;
private String address;
private String id;
private String locationId;
private int orderType;
private List orderedItems;
private String thumbnail;
private Date time;
private long timestamp;
private float totalAmount;
public PastOrderEntity()
{
}
public String getLocationId()
{
return locationId;
}
public int getOrderType()
{
return orderType;
}
public List getOrderedItems()
{
return orderedItems;
}
public String getThumbnail()
{
return thumbnail;
}
public Date getTime()
{
return time;
}
public long getTimestamp()
{
return timestamp;
}
public String getTotalAmount()
{
return Html.fromHtml(String.format("%s %.2f", new Object[] {
getCurrencySign(), Float.valueOf(totalAmount)
})).toString();
}
public void setLocationId(String s)
{
locationId = s;
}
public void setOrderType(int i)
{
orderType = i;
}
public void setOrderedItems(List list)
{
orderedItems = list;
}
public void setThumbnail(String s)
{
thumbnail = s;
}
public void setTime(Date date)
{
time = date;
}
public void setTimestamp(long l)
{
timestamp = l;
}
public void setTotalAmount(float f)
{
totalAmount = f;
}
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
06f7a9c368ad8e71298468edea5465f8a41a7b5a
|
07db58fddcb6fd598358ae9289bc452d7e1c239f
|
/JLibrary12/lib/ResearchInformatics/OmicsReporting/JCS_1.3/java/org/apache/jcs/auxiliary/AuxiliaryCacheManager.java
|
a6e56b9c53ff7f506fb39d975460584ea2d1d0aa
|
[] |
no_license
|
amitabha66/JLibrary12
|
85ccf15b47ea6f6c618284b2c19161402ec68897
|
00dffbb6a99fd8ae03ebfa6efa854a36a414461d
|
refs/heads/master
| 2020-12-20T18:53:02.886465
| 2016-06-23T19:42:24
| 2016-06-23T19:42:24
| 61,831,797
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,716
|
java
|
package org.apache.jcs.auxiliary;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.jcs.engine.behavior.ICacheType;
/**
* AuxiliaryCacheManager
*
* FIXME: Should not need to extend ICacheType
*
*/
public interface AuxiliaryCacheManager
extends ICacheType
{
/**
* Return the appropriate auxiliary cache for this region.
*
* @param cacheName
* @return AuxiliaryCache
*/
public AuxiliaryCache getCache( String cacheName );
/**
* This allows the cache manager to be plugged into the auxiliary caches,
* rather then having them get it themselves. Cache maangers can be mocked
* out and the auxiliaries will be easier to test.
*
* @param cacheName
* @param cacheManager
* @return AuxiliaryCache
*/
//public AuxiliaryCache getCache( String cacheName, ICompositeCacheManager
// cacheManager );
}
|
[
"amitabha66@gmail.com"
] |
amitabha66@gmail.com
|
3988b2b1ffb52ef680474899b90caa58884bcc63
|
fc114b0c74894cfb7f0eb4fc7801e1ceba3188f4
|
/sample-wallpaper/src/main/java/xyz/rasp/laiquendi/wallpaper/helper/WallpaperUtil.java
|
a4a60db1e17f20158e3949001626a1ad5c8f7fe0
|
[
"Apache-2.0"
] |
permissive
|
cjhgo/Laiquendi
|
c6254f5d311dad94fe2627e561d2c721721dd048
|
e4bb9947bafe4f2f1791c07174b3ee29b7752e40
|
refs/heads/master
| 2021-01-23T03:54:33.696920
| 2017-03-25T03:53:30
| 2017-03-25T03:53:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,817
|
java
|
package xyz.rasp.laiquendi.wallpaper.helper;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.provider.MediaStore;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import java.io.ByteArrayOutputStream;
/**
* Created by twiceYuan on 2017/3/25.
* <p>
* 壁纸设置工具
*/
public class WallpaperUtil {
public static void set(Activity context, String url) {
ProgressDialog progressDialog = new ProgressDialog(context);
progressDialog.setMessage("下载中");
progressDialog.show();
Glide.with(context).load(url).asBitmap().into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
progressDialog.dismiss();
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(getImageUri(context, resource, Uri.parse(url).getLastPathSegment()), "image/jpeg");
intent.putExtra("mimeType", "image/jpeg");
context.startActivity(Intent.createChooser(intent, "设为壁纸"));
}
});
}
private static Uri getImageUri(Context inContext, Bitmap bitmap, String name) {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
String path = MediaStore.Images.Media.insertImage(inContext.getContentResolver(), bitmap, name, null);
return Uri.parse(path);
}
}
|
[
"twiceyuan@gmail.com"
] |
twiceyuan@gmail.com
|
b04c241633fe124849ae09d4ad8321f33494dfe4
|
a51778ee2a96630785541ce331e178ce15bdc7c4
|
/skola/Fel_bc/2.semestr/PJV/NetBeansProjects/NetBeansProjects/NejvetsiPodposloupnost/test/nejvetsipodposloupnost/MainTest.java
|
17e2dc368942fb385f83cf48e19f215bf000b729
|
[] |
no_license
|
majacQ/migrace_databaze
|
45ed405ab0f0fc31578264c983a4f2e4beacb528
|
51cc735d7db6db1a6454e51ae596e09711783104
|
refs/heads/master
| 2023-05-08T19:01:09.294920
| 2021-05-24T20:15:33
| 2021-05-24T20:15:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,228
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nejvetsipodposloupnost;
import java.util.ArrayList;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author já
*/
public class MainTest {
public MainTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of action method, of class Main.
*/
@Test
public void testAction() {
System.out.println("action");
ArrayList<Integer> pole = null;
ArrayList<Integer> expResult = null;
ArrayList<Integer> result = Main.action(pole);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of nPP method, of class Main.
*/
@Test
public void testNPP() {
System.out.println("nPP");
ArrayList<Integer> pole = null;
ArrayList<Integer> expResult = null;
ArrayList<Integer> result = Main.nPP(pole);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of print method, of class Main.
*/
@Test
public void testPrint() {
System.out.println("print");
ArrayList list = null;
Main.print(list);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of main method, of class Main.
*/
@Test
public void testMain() {
System.out.println("main");
String[] args = null;
Main.main(args);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
}
|
[
"wox2@seznam.cz"
] |
wox2@seznam.cz
|
db2e28e540cf46628d3e672ef324813f9553bfac
|
b09f56919e3baac6aff3cc7a590505b21efd72eb
|
/src/main/java/com/zorm/annotations/reflection/Pair.java
|
12b30e843fa9a64e6c778fad3ae3ec1235a41d27
|
[] |
no_license
|
SHENJIAYUN/zorm
|
51d2d2674dfb98bf77203e3de35f7f5191148180
|
fe849f55d5523bd24d5069e8f54678108a9de162
|
refs/heads/master
| 2021-01-18T21:50:28.686984
| 2016-05-19T14:52:39
| 2016-05-19T14:52:39
| 52,928,318
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,025
|
java
|
package com.zorm.annotations.reflection;
public class Pair<T, U> {
private final T o1;
private final U o2;
private final int hashCode;
Pair(T o1,U o2) {
this.o1 = o1;
this.o2 = o2;
this.hashCode = doHashCode();
}
@Override
public boolean equals(Object obj) {
if ( ! (obj instanceof Pair) ) {
return false;
}
Pair other = (Pair) obj;
return !differentHashCode( other ) && safeEquals( o1, other.o1 ) && safeEquals( o2, other.o2 );
}
private boolean differentHashCode(Pair other) {
return hashCode != other.hashCode;
}
@Override
public int hashCode() {
//cached because the inheritance can be big
return hashCode;
}
private int doHashCode() {
return safeHashCode( o1 ) ^ safeHashCode( o2 );
}
private int safeHashCode(Object o) {
if ( o == null ) {
return 0;
}
return o.hashCode();
}
private boolean safeEquals(Object obj1, Object obj2) {
if ( obj1 == null ) {
return obj2 == null;
}
return obj1.equals( obj2 );
}
}
|
[
"1096392316@qq.com"
] |
1096392316@qq.com
|
c49d01d4afb1714a67946f7672c50f506ee16aff
|
c3e183b9b3ff1a511c6182893d70aaa352c167f0
|
/src/main/java/com/m2m/mapper/BillboardMapper.java
|
58d7e25bfae7ed2de41e67fe882456bc492baac8
|
[] |
no_license
|
hushunjian/rest
|
a47a6e00b038eb5fb635ec4362ff0b6a5a92813b
|
15b49ada2725bdba17a92986ed8372a0d56ef748
|
refs/heads/master
| 2021-05-04T12:33:54.762619
| 2018-02-05T11:37:10
| 2018-02-05T11:37:10
| 120,258,667
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,960
|
java
|
package com.m2m.mapper;
import com.m2m.domain.Billboard;
import com.m2m.domain.BillboardExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
public interface BillboardMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
int countByExample(BillboardExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
int deleteByExample(BillboardExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
@Delete({
"delete from billboard",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
@Insert({
"insert into billboard (id, type, ",
"name, summary, bg_color, ",
"image, img_width, ",
"img_height, show_name, ",
"create_time, update_time, ",
"status, mode)",
"values (#{id,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, ",
"#{name,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{bgColor,jdbcType=VARCHAR}, ",
"#{image,jdbcType=VARCHAR}, #{imgWidth,jdbcType=INTEGER}, ",
"#{imgHeight,jdbcType=INTEGER}, #{showName,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{mode,jdbcType=INTEGER})"
})
int insert(Billboard record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
int insertSelective(Billboard record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
List<Billboard> selectByExample(BillboardExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
@Select({
"select",
"id, type, name, summary, bg_color, image, img_width, img_height, show_name, ",
"create_time, update_time, status, mode",
"from billboard",
"where id = #{id,jdbcType=BIGINT}"
})
@ResultMap("BaseResultMap")
Billboard selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
int updateByExampleSelective(@Param("record") Billboard record, @Param("example") BillboardExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
int updateByExample(@Param("record") Billboard record, @Param("example") BillboardExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
int updateByPrimaryKeySelective(Billboard record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table billboard
*
* @mbggenerated Thu Jan 11 17:51:54 CST 2018
*/
@Update({
"update billboard",
"set type = #{type,jdbcType=INTEGER},",
"name = #{name,jdbcType=VARCHAR},",
"summary = #{summary,jdbcType=VARCHAR},",
"bg_color = #{bgColor,jdbcType=VARCHAR},",
"image = #{image,jdbcType=VARCHAR},",
"img_width = #{imgWidth,jdbcType=INTEGER},",
"img_height = #{imgHeight,jdbcType=INTEGER},",
"show_name = #{showName,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"status = #{status,jdbcType=INTEGER},",
"mode = #{mode,jdbcType=INTEGER}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(Billboard record);
}
|
[
"hushunjian950420@163.com"
] |
hushunjian950420@163.com
|
8b1695045801bdd9f9fb7481abc77a64e108f4dd
|
22e9aae293443a93d04192f9510bb6585c1f77c3
|
/express3/express-client/src/main/java/express/presentation/transRepoUI/OutUI.java
|
a58f53c69b664b74c99e95ea5f88670c154e5382
|
[] |
no_license
|
Goldenbullet/presentationCODE
|
212ff5abe50ac5eb1b3406f4d4f542ce50e6483c
|
e5f172e1e95d8a3e646a02a9c50527285d959f93
|
refs/heads/master
| 2021-01-10T16:42:45.447261
| 2015-12-08T16:56:17
| 2015-12-08T16:56:17
| 46,796,185
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,529
|
java
|
package express.presentation.transRepoUI;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import express.presentation.mainUI.MainUIService;
public class OutUI extends JPanel{
// private JButton button_out;
// private JButton button_return;
private JButton button_cancel;
private JButton button_confirm;
private MainUIService m;
public OutUI(MainUIService main){
int textlength=150;
int textwidth=30;
int labellength=100;
int labelwidth=30;
String number,date,arrival,district,row,shelf,position;
setLayout(null);
this.m=main;
this.setBounds(0, 0, 850, 700);
this.setBackground(Color.WHITE);
JTextArea textArea1 = new JTextArea("快递编号");
textArea1.setBounds(300, 100, textlength, textwidth);
textArea1.setBackground(Color.BLUE);
// textAreaOutput.setSelectedTextColor(Color.RED);
textArea1.setLineWrap(true); // 激活自动换行功能
textArea1.setWrapStyleWord(true);// 激活断行不断字功能
number = textArea1.getText();
this.add(textArea1);
JTextArea textArea2 = new JTextArea("出库日期");
textArea2.setBounds(300, 100 + textwidth * 2, textlength, textwidth);
textArea2.setBackground(Color.BLUE);
textArea2.setLineWrap(true);
textArea2.setWrapStyleWord(true);
date = textArea2.getText();
this.add(textArea2);
JTextArea textArea3 = new JTextArea("目的地");
textArea3.setBounds(300, 100 + textwidth * 4, textlength, textwidth);
textArea3.setBackground(Color.BLUE);
textArea3.setLineWrap(true);
textArea3.setWrapStyleWord(true);
arrival = textArea3.getText();
this.add(textArea3);
JTextArea textArea4 = new JTextArea("装运形式");
textArea4.setBounds(300, 100 + textwidth * 6, textlength, textwidth);
textArea4.setBackground(Color.BLUE);
textArea4.setLineWrap(true);
textArea4.setWrapStyleWord(true);
district = textArea4.getText();
this.add(textArea4);
JTextArea textArea5 = new JTextArea("中转单编号");
textArea5.setBounds(300, 100 + textwidth * 8, textlength, textwidth);
textArea5.setBackground(Color.BLUE);
textArea5.setLineWrap(true);
textArea5.setWrapStyleWord(true);
row = textArea5.getText();
this.add(textArea5);
JLabel label1 = new JLabel("快递编号");
label1.setBounds(200, 100, labellength, labelwidth);
this.add(label1);
JLabel label2 = new JLabel("出库日期");
label2.setBounds(200, 100 + labelwidth * 2, labellength, labelwidth);
this.add(label2);
JLabel label3 = new JLabel("目的地");
label3.setBounds(200, 100 + labelwidth * 4, labellength, labelwidth);
this.add(label3);
JLabel label4 = new JLabel("装运形式");
label4.setBounds(200, 100 + labelwidth * 6, labellength, labelwidth);
this.add(label4);
JLabel label5 = new JLabel("中转单编号");
label5.setBounds(200, 100 + labelwidth * 8, labellength, labelwidth);
this.add(label5);
button_confirm=new JButton("确定");
button_confirm.setBounds(250, 520, 60, 30);
this.add(button_confirm);
button_cancel=new JButton("取消");
button_cancel.setBounds(350, 520, 60, 30);
this.add(button_cancel);
JListener listener=new JListener();
// button_out=new JButton("在你点击出库之后");
// button_out.setBounds(100, 100, 150, 50);
// button_out.addMouseListener(listener);
//
// button_return=new JButton("返回");
// button_return.setBounds(100, 200, 150, 50);
// button_return.addMouseListener(listener);
//
//
// this.add( button_out);
// this.add(button_return);
}
class JListener implements MouseListener{
public void mouseClicked(MouseEvent e) {
// if (e.getSource()== button_out){
// System.out.println("你点击了“点击出库之后”");
//
// }
// else if (e.getSource()==button_return){
// System.out.println("应该回到了repo界面");
// }
}
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mousePressed(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mouseReleased(MouseEvent arg0) {
// TODO Auto-generated method stub
}
}
}
|
[
"hzluhailong@163.com"
] |
hzluhailong@163.com
|
1249ca3115689a0386481b4aed690b6de6570a62
|
c9106d023a926f5968808a9958449e56a4170612
|
/jenax-arq-parent/jenax-arq-constraints/src/main/java/org/aksw/jenax/constraint/api/CBinding.java
|
0f223c8eb33dd722057b0f5987ed6e433d453b1c
|
[] |
no_license
|
Scaseco/jenax
|
c6f726fa25fd4b15e05119d05dbafaf44c8f5411
|
58a8dec0b055eaca3f6848cab4b552c9fd19a6ec
|
refs/heads/develop
| 2023-08-24T13:37:16.574857
| 2023-08-24T11:53:24
| 2023-08-24T11:53:24
| 416,700,558
| 5
| 0
| null | 2023-08-03T14:41:53
| 2021-10-13T10:54:14
|
Java
|
UTF-8
|
Java
| false
| false
| 723
|
java
|
package org.aksw.jenax.constraint.api;
import java.util.Collection;
import org.apache.jena.sparql.core.Var;
import org.apache.jena.sparql.engine.binding.Binding;
/**
* ConstrainedBinding.
* Whereas a {@link Binding} is a mapping of variables to concrete nodes,
* this class represents a mapping of variables to their possible values.
*/
public interface CBinding
extends Contradictable
{
CBinding stateIntersection(CBinding that);
CBinding stateUnion(CBinding that);
CBinding stateIntersection(Var var, VSpace space);
CBinding stateUnion(Var var, VSpace space);
CBinding project(Collection<Var> vars);
CBinding cloneObject();
Collection<Var> getVars();
VSpace get(Var var);
}
|
[
"RavenArkadon@googlemail.com"
] |
RavenArkadon@googlemail.com
|
80671cf69d9521b64dc3ada70348850f2075f2ea
|
482fe32082940c1c2b6b78fedfcf967022564c6e
|
/Object_Oriented_Software_Construction/Assignment3/code/src/main/java/net.n3.nanoxml/net/n3/nanoxml/XMLException.java
|
e01970c3c4e41165a0c6eb8457f9b25f7e7baf9a
|
[] |
no_license
|
ulfet/RWTH-Informatik
|
9f33b3b8afca8d738119c25a6341b4707f3d8b32
|
38ae6779f97287b838d20caac1706ac3a1e8a183
|
refs/heads/main
| 2023-02-11T14:05:18.356824
| 2021-01-16T17:55:26
| 2021-01-16T17:55:26
| 330,211,701
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,484
|
java
|
/* XMLException.java NanoXML/Java
*
* $Revision: 1.4 $
* $Date: 2002/01/04 21:03:29 $
* $Name: RELEASE_2_2_1 $
*
* This file is part of NanoXML 2 for Java.
* Copyright (C) 2000-2002 Marc De Scheemaecker, All Rights Reserved.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the
* use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in
* a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*/
package net.n3.nanoxml;
import java.io.PrintStream;
import java.io.PrintWriter;
/**
* An XMLException is thrown when an exception occurred while processing the
* XML data.
*
* @author Marc De Scheemaecker
* @version $Name: RELEASE_2_2_1 $, $Revision: 1.4 $
*/
public class XMLException
extends Exception
{
private static final long serialVersionUID = 1L;
/**
* The message of the exception.
*/
private String msg;
/**
* The system ID of the XML data where the exception occurred.
*/
private String systemID;
/**
* The line number in the XML data where the exception occurred.
*/
private int lineNr;
/**
* Encapsulated exception.
*/
private Exception encapsulatedException;
/**
* Creates a new exception.
*
* @param msg the message of the exception.
*/
public XMLException(String msg)
{
this(null, -1, null, msg, false);
}
/**
* Creates a new exception.
*
* @param e the encapsulated exception.
*/
public XMLException(Exception e)
{
this(null, -1, e, "Nested Exception", false);
}
/**
* Creates a new exception.
*
* @param systemID the system ID of the XML data where the exception
* occurred
* @param lineNr the line number in the XML data where the exception
* occurred.
* @param e the encapsulated exception.
*/
public XMLException(String systemID,
int lineNr,
Exception e)
{
this(systemID, lineNr, e, "Nested Exception", true);
}
/**
* Creates a new exception.
*
* @param systemID the system ID of the XML data where the exception
* occurred
* @param lineNr the line number in the XML data where the exception
* occurred.
* @param msg the message of the exception.
*/
public XMLException(String systemID,
int lineNr,
String msg)
{
this(systemID, lineNr, null, msg, true);
}
/**
* Creates a new exception.
*
* @param systemID the system ID from where the data came
* @param lineNr the line number in the XML data where the exception
* occurred.
* @param e the encapsulated exception.
* @param msg the message of the exception.
* @param reportParams true if the systemID, lineNr and e params need to be
* appended to the message
*/
public XMLException(String systemID,
int lineNr,
Exception e,
String msg,
boolean reportParams)
{
super(XMLException.buildMessage(systemID, lineNr, e, msg,
reportParams));
this.systemID = systemID;
this.lineNr = lineNr;
this.encapsulatedException = e;
this.msg = XMLException.buildMessage(systemID, lineNr, e, msg,
reportParams);
}
/**
* Builds the exception message
*
* @param systemID the system ID from where the data came
* @param lineNr the line number in the XML data where the exception
* occurred.
* @param e the encapsulated exception.
* @param msg the message of the exception.
* @param reportParams true if the systemID, lineNr and e params need to be
* appended to the message
*/
private static String buildMessage(String systemID,
int lineNr,
Exception e,
String msg,
boolean reportParams)
{
String str = msg;
if (reportParams) {
if (systemID != null) {
str += ", SystemID='" + systemID + "'";
}
if (lineNr >= 0) {
str += ", Line=" + lineNr;
}
if (e != null) {
str += ", Exception: " + e;
}
}
return str;
}
/**
* Returns the system ID of the XML data where the exception occurred.
* If there is no system ID known, null is returned.
*/
public String getSystemID()
{
return this.systemID;
}
/**
* Returns the line number in the XML data where the exception occurred.
* If there is no line number known, -1 is returned.
*/
public int getLineNr()
{
return this.lineNr;
}
/**
* Returns the encapsulated exception, or null if no exception is
* encapsulated.
*/
public Exception getException()
{
return this.encapsulatedException;
}
/**
* Dumps the exception stack to a print writer.
*
* @param writer the print writer
*/
public void printStackTrace(PrintWriter writer)
{
super.printStackTrace(writer);
if (this.encapsulatedException != null) {
writer.println("*** Nested Exception:");
this.encapsulatedException.printStackTrace(writer);
}
}
/**
* Dumps the exception stack to an output stream.
*
* @param stream the output stream
*/
public void printStackTrace(PrintStream stream)
{
super.printStackTrace(stream);
if (this.encapsulatedException != null) {
stream.println("*** Nested Exception:");
this.encapsulatedException.printStackTrace(stream);
}
}
/**
* Dumps the exception stack to System.err.
*/
public void printStackTrace()
{
super.printStackTrace();
if (this.encapsulatedException != null) {
System.err.println("*** Nested Exception:");
this.encapsulatedException.printStackTrace();
}
}
/**
* Returns a string representation of the exception.
*/
public String toString()
{
return this.msg;
}
}
|
[
"ulfet.rwth@gmail.com"
] |
ulfet.rwth@gmail.com
|
149a28a5381247acb2235a0994b9d29c8693795b
|
f9e5e888e1c2f64c2716b3683598ad7485bd1881
|
/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/security/credential/impl/X509InlineCredentialFactoryBean.java
|
bdb5658866d3f3522f598f2b837ba63403fdda3c
|
[] |
no_license
|
nagyistge/shibboleth-idp-v3
|
cc53646106761727f26941d9358e84520dcc6212
|
e3fbf872a8e5fc74657bfc89cabd584751e92336
|
refs/heads/master
| 2021-05-02T12:14:18.926237
| 2015-11-19T20:26:49
| 2015-11-19T20:26:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,886
|
java
|
/*
* Licensed to the University Corporation for Advanced Internet Development,
* Inc. (UCAID) under one or more contributor license agreements. See the
* NOTICE file distributed with this work for additional information regarding
* copyright ownership. The UCAID 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 net.shibboleth.idp.profile.spring.relyingparty.security.credential.impl;
import java.security.PrivateKey;
import java.security.cert.CRLException;
import java.security.cert.CertificateException;
import java.security.cert.X509CRL;
import java.security.cert.X509Certificate;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.collection.LazyList;
import org.cryptacular.util.KeyPairUtil;
import org.opensaml.security.x509.X509Support;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.FatalBeanException;
/**
* A factory bean to understand X509Inline credentials.
*/
public class X509InlineCredentialFactoryBean extends AbstractX509CredentialFactoryBean {
/** log. */
private final Logger log = LoggerFactory.getLogger(X509InlineCredentialFactoryBean.class);
/** The entity certificate. */
private String entityCertificate;
/** The certificates. */
private List<String> certificates;
/** The private key. */
private byte[] privateKey;
/** The crls. */
private List<String> crls;
/**
* Set the file with the entity certificate.
*
* @param entityCert The file to set.
*/
public void setEntity(@Nonnull final String entityCert) {
entityCertificate = entityCert;
}
/**
* Sets the files which contain the certificates.
*
* @param certs The value to set.
*/
public void setCertificates(@Nullable @NotEmpty final List<String> certs) {
certificates = certs;
}
/**
* Set the file with the entity certificate.
*
* @param key The file to set.
*/
public void setPrivateKey(@Nullable final byte[] key) {
privateKey = key;
}
/**
* Sets the files which contain the crls.
*
* @param list The value to set.
*/
public void setCRLs(@Nullable @NotEmpty final List<String> list) {
crls = list;
}
/** {@inheritDoc}. */
@Override @Nullable protected X509Certificate getEntityCertificate() {
if (null == entityCertificate) {
return null;
}
try {
return X509Support.decodeCertificate(entityCertificate);
} catch (CertificateException e) {
log.error("{}: Could not decode provided Entity Certificate", getConfigDescription(), e);
throw new FatalBeanException("Could not decode provided Entity Certificate", e);
}
}
/** {@inheritDoc} */
@Override @Nonnull protected List<X509Certificate> getCertificates() {
List<X509Certificate> certs = new LazyList<>();
for (String cert : certificates) {
try {
certs.add(X509Support.decodeCertificate(cert.trim()));
} catch (CertificateException e) {
log.error("{}: Could not decode provided Certificate", getConfigDescription(), e);
throw new FatalBeanException("Could not decode provided Certificate", e);
}
}
return certs;
}
/** {@inheritDoc} */
@Override @Nullable protected PrivateKey getPrivateKey() {
if (null == privateKey) {
return null;
}
return KeyPairUtil.decodePrivateKey(privateKey, getPrivateKeyPassword());
}
/** {@inheritDoc} */
@Override @Nullable protected List<X509CRL> getCRLs() {
if (null == crls) {
return null;
}
List<X509CRL> result = new LazyList<>();
for (String crl : crls) {
try {
result.add(X509Support.decodeCRL(crl));
} catch (CRLException | CertificateException e) {
log.error("{}: Could not decode provided CRL", getConfigDescription(), e);
throw new FatalBeanException("Could not decode provided CRL", e);
}
}
return result;
}
}
|
[
"tzeller@03af267c-bfd3-464a-89ef-4aea903fec54"
] |
tzeller@03af267c-bfd3-464a-89ef-4aea903fec54
|
53f8dc6b3646f82eee034974ec04c6d0b50329b7
|
3b150be1b781b17495e43c73daab94a940ba1fef
|
/lib_common/src/main/java/com/sg/cj/common/base/App.java
|
db4d99360c0bf44202c50d4992e00ead75f3fd4b
|
[] |
no_license
|
DreamFly01/SuanNiHen
|
e43346a86eb156e36b3eb643e176e735811c4024
|
c10832fb402a011a93923d074d5755b64ccf1d93
|
refs/heads/master
| 2022-01-06T21:52:02.597929
| 2019-08-02T03:06:49
| 2019-08-02T03:06:49
| 195,406,683
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,118
|
java
|
package com.sg.cj.common.base;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.support.v7.app.AppCompatDelegate;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
import java.util.HashSet;
import java.util.Set;
/**
* author : ${CHENJIE}
* created at 2018/10/25 16:13
* e_mail : chenjie_goodboy@163.com
* describle :
*/
public class App extends Application {
private static App instance;
private Set<Activity> allActivities;
public static int SCREEN_WIDTH = -1;
public static int SCREEN_HEIGHT = -1;
public static float DIMEN_RATE = -1.0F;
public static int DIMEN_DPI = -1;
public static synchronized App getInstance() {
return instance;
}
static {
AppCompatDelegate.setDefaultNightMode(
AppCompatDelegate.MODE_NIGHT_NO);
}
@Override
public void onCreate() {
super.onCreate();
instance = this;
//初始化屏幕宽高
getScreenSize();
}
public void addActivity(Activity act) {
if (allActivities == null) {
allActivities = new HashSet<>();
}
allActivities.add(act);
}
public void removeActivity(Activity act) {
if (allActivities != null) {
allActivities.remove(act);
}
}
public void exitApp() {
if (allActivities != null) {
synchronized (allActivities) {
for (Activity act : allActivities) {
act.finish();
}
}
}
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(0);
}
public void getScreenSize() {
WindowManager windowManager = (WindowManager)this.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics dm = new DisplayMetrics();
Display display = windowManager.getDefaultDisplay();
display.getMetrics(dm);
DIMEN_RATE = dm.density / 1.0F;
DIMEN_DPI = dm.densityDpi;
SCREEN_WIDTH = dm.widthPixels;
SCREEN_HEIGHT = dm.heightPixels;
if(SCREEN_WIDTH > SCREEN_HEIGHT) {
int t = SCREEN_HEIGHT;
SCREEN_HEIGHT = SCREEN_WIDTH;
SCREEN_WIDTH = t;
}
}
}
|
[
"y290206959@163.com"
] |
y290206959@163.com
|
4790168180d1ed869b066956948380ceb54d38f3
|
bc3e61091c0f3edd1e9d27e78e022bec217b44e3
|
/app/src/test/java/br/com/erudio/converter/DozerConverterTest.java
|
6f7781f1850f9d032d6f245f66478c0acb3ad0ab
|
[
"Apache-2.0"
] |
permissive
|
elcarvalho/DockerFromZeroToMastery-SpingBootAndJava
|
3d80b9a9940901078100cbd009e335725b5b94cb
|
f4d98dd7e456b7cf118c155ff5037bc6c6d7c008
|
refs/heads/master
| 2022-11-13T07:19:46.538903
| 2020-07-09T13:18:11
| 2020-07-09T13:18:11
| 278,365,851
| 0
| 0
|
Apache-2.0
| 2020-07-09T13:00:47
| 2020-07-09T13:00:47
| null |
UTF-8
|
Java
| false
| false
| 4,242
|
java
|
package br.com.erudio.converter;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import br.com.erudio.converter.mocks.MockPerson;
import br.com.erudio.data.model.Person;
import br.com.erudio.data.vo.v1.PersonVO;
public class DozerConverterTest {
MockPerson inputObject;
@Before
public void setUp() {
inputObject = new MockPerson();
}
@Test
public void parseEntityToVOTest() {
PersonVO output = DozerConverter.parseObject(inputObject.mockEntity(), PersonVO.class);
Assert.assertEquals(Long.valueOf(0L), output.getKey());
Assert.assertEquals("First Name Test0", output.getFirstName());
Assert.assertEquals("Last Name Test0", output.getLastName());
Assert.assertEquals("Addres Test0", output.getAddress());
Assert.assertEquals("Male", output.getGender());
}
@Test
public void parseEntityListToVOListTest() {
List<PersonVO> outputList = DozerConverter.parseListObjects(inputObject.mockEntityList(), PersonVO.class);
PersonVO outputZero = outputList.get(0);
Assert.assertEquals(Long.valueOf(0L), outputZero.getKey());
Assert.assertEquals("First Name Test0", outputZero.getFirstName());
Assert.assertEquals("Last Name Test0", outputZero.getLastName());
Assert.assertEquals("Addres Test0", outputZero.getAddress());
Assert.assertEquals("Male", outputZero.getGender());
PersonVO outputSeven = outputList.get(7);
Assert.assertEquals(Long.valueOf(7L), outputSeven.getKey());
Assert.assertEquals("First Name Test7", outputSeven.getFirstName());
Assert.assertEquals("Last Name Test7", outputSeven.getLastName());
Assert.assertEquals("Addres Test7", outputSeven.getAddress());
Assert.assertEquals("Female", outputSeven.getGender());
PersonVO outputTwelve = outputList.get(12);
Assert.assertEquals(Long.valueOf(12L), outputTwelve.getKey());
Assert.assertEquals("First Name Test12", outputTwelve.getFirstName());
Assert.assertEquals("Last Name Test12", outputTwelve.getLastName());
Assert.assertEquals("Addres Test12", outputTwelve.getAddress());
Assert.assertEquals("Male", outputTwelve.getGender());
}
@Test
public void parseVOToEntityTest() {
Person output = DozerConverter.parseObject(inputObject.mockVO(), Person.class);
Assert.assertEquals(Long.valueOf(0L), output.getId());
Assert.assertEquals("First Name Test0", output.getFirstName());
Assert.assertEquals("Last Name Test0", output.getLastName());
Assert.assertEquals("Addres Test0", output.getAddress());
Assert.assertEquals("Male", output.getGender());
}
@Test
public void parserVOListToEntityListTest() {
List<Person> outputList = DozerConverter.parseListObjects(inputObject.mockVOList(), Person.class);
Person outputZero = outputList.get(0);
Assert.assertEquals(Long.valueOf(0L), outputZero.getId());
Assert.assertEquals("First Name Test0", outputZero.getFirstName());
Assert.assertEquals("Last Name Test0", outputZero.getLastName());
Assert.assertEquals("Addres Test0", outputZero.getAddress());
Assert.assertEquals("Male", outputZero.getGender());
Person outputSeven = outputList.get(7);
Assert.assertEquals(Long.valueOf(7L), outputSeven.getId());
Assert.assertEquals("First Name Test7", outputSeven.getFirstName());
Assert.assertEquals("Last Name Test7", outputSeven.getLastName());
Assert.assertEquals("Addres Test7", outputSeven.getAddress());
Assert.assertEquals("Female", outputSeven.getGender());
Person outputTwelve = outputList.get(12);
Assert.assertEquals(Long.valueOf(12L), outputTwelve.getId());
Assert.assertEquals("First Name Test12", outputTwelve.getFirstName());
Assert.assertEquals("Last Name Test12", outputTwelve.getLastName());
Assert.assertEquals("Addres Test12", outputTwelve.getAddress());
Assert.assertEquals("Male", outputTwelve.getGender());
}
}
|
[
"leandrocgsi@gmail.com"
] |
leandrocgsi@gmail.com
|
8820e4dfa0bc1d340724ef6ea796cc3f34a1f09b
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/143/100/CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_53a.java
|
3075ea4fb295908ec1d255e95271a658958be665
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 4,698
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_53a.java
Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml
Template File: sources-sink-53a.tmpl.java
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: HashSet
* BadSink : Create a HashSet using data as the initial size
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.Socket;
import java.util.logging.Level;
public class CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_53a extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* Read data using an outbound tcp connection */
{
Socket socket = null;
BufferedReader readerBuffered = null;
InputStreamReader readerInputStream = null;
try
{
/* Read data using an outbound tcp connection */
socket = new Socket("host.example.org", 39544);
/* read input from socket */
readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8");
readerBuffered = new BufferedReader(readerInputStream);
/* POTENTIAL FLAW: Read data using an outbound tcp connection */
String stringNumber = readerBuffered.readLine();
if (stringNumber != null) /* avoid NPD incidental warnings */
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO);
}
finally
{
/* clean up stream reading objects */
try
{
if (readerBuffered != null)
{
readerBuffered.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO);
}
try
{
if (readerInputStream != null)
{
readerInputStream.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO);
}
/* clean up socket objects */
try
{
if (socket != null)
{
socket.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO);
}
}
}
(new CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_53b()).badSink(data );
}
public void good() throws Throwable
{
goodG2B();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
(new CWE789_Uncontrolled_Mem_Alloc__connect_tcp_HashSet_53b()).goodG2BSink(data );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
e063b8e5d08adc935e84f37dae213f98770cb73b
|
18cfb24c4914acd5747e533e88ce7f3a52eee036
|
/src/main/jdk8/javax/swing/text/html/FormSubmitEvent.java
|
3127f1a6b2920fb0880c256830517f44a87c2aca
|
[] |
no_license
|
douguohai/jdk8-code
|
f0498e451ec9099e4208b7030904e1b4388af7c5
|
c8466ed96556bfd28cbb46e588d6497ff12415a0
|
refs/heads/master
| 2022-12-19T03:10:16.879386
| 2020-09-30T05:43:20
| 2020-09-30T05:43:20
| 273,399,965
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,149
|
java
|
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing.text.html;
import javax.swing.text.*;
import java.net.URL;
/**
* FormSubmitEvent is used to notify interested
* parties that a form was submitted.
*
* @since 1.5
* @author Denis Sharypov
*/
public class FormSubmitEvent extends HTMLFrameHyperlinkEvent {
/**
* Represents an HTML form method type.
* <UL>
* <LI><code>GET</code> corresponds to the GET form method</LI>
* <LI><code>POST</code> corresponds to the POST from method</LI>
* </UL>
* @since 1.5
*/
public enum MethodType { GET, POST };
/**
* Creates a new object representing an html form submit event.
*
* @param source the object responsible for the event
* @param type the event type
* @param actionURL the form action URL
* @param sourceElement the element that corresponds to the source
* of the event
* @param targetFrame the Frame to display the document in
* @param method the form method type
* @param data the form submission data
*/
FormSubmitEvent(Object source, EventType type, URL targetURL,
Element sourceElement, String targetFrame,
MethodType method, String data) {
super(source, type, targetURL, sourceElement, targetFrame);
this.method = method;
this.data = data;
}
/**
* Gets the form method type.
*
* @return the form method type, either
* <code>Method.GET</code> or <code>Method.POST</code>.
*/
public MethodType getMethod() {
return method;
}
/**
* Gets the form submission data.
*
* @return the string representing the form submission data.
*/
public String getData() {
return data;
}
private MethodType method;
private String data;
}
|
[
"douguohai@163.com"
] |
douguohai@163.com
|
04f830b77bd2b83d426752b0b877318dba209cda
|
75c4712ae3f946db0c9196ee8307748231487e4b
|
/src/main/java/com/alipay/api/domain/AlipayCommerceLotteryPresentlistQueryModel.java
|
9c0905ecccd7c093d13c49ad38a21f894478cb6d
|
[
"Apache-2.0"
] |
permissive
|
yuanbaoMarvin/alipay-sdk-java-all
|
70a72a969f464d79c79d09af8b6b01fa177ac1be
|
25f3003d820dbd0b73739d8e32a6093468d9ed92
|
refs/heads/master
| 2023-06-03T16:54:25.138471
| 2021-06-25T14:48:21
| 2021-06-25T14:48:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,407
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询调用者指定时间范围内的彩票赠送列表,由亚博科技提供服务
*
* @author auto create
* @since 1.0, 2020-12-14 15:46:59
*/
public class AlipayCommerceLotteryPresentlistQueryModel extends AlipayObject {
private static final long serialVersionUID = 8465552662464167413L;
/**
* 结束日期,格式为yyyyMMdd
*/
@ApiField("gmt_end")
private String gmtEnd;
/**
* 开始日期,格式为yyyyMMdd
*/
@ApiField("gmt_start")
private String gmtStart;
/**
* 页号,必须大于0,默认为1
*/
@ApiField("page_no")
private Long pageNo;
/**
* 页大小,必须大于0,最大为500,默认为500
*/
@ApiField("page_size")
private Long pageSize;
public String getGmtEnd() {
return this.gmtEnd;
}
public void setGmtEnd(String gmtEnd) {
this.gmtEnd = gmtEnd;
}
public String getGmtStart() {
return this.gmtStart;
}
public void setGmtStart(String gmtStart) {
this.gmtStart = gmtStart;
}
public Long getPageNo() {
return this.pageNo;
}
public void setPageNo(Long pageNo) {
this.pageNo = pageNo;
}
public Long getPageSize() {
return this.pageSize;
}
public void setPageSize(Long pageSize) {
this.pageSize = pageSize;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
021bda98055fd5ae0f479d03c125f6c3c7505fa1
|
0da40259673d642aaf8b5685d36d9f240a5fc67a
|
/projects/jasn1-compiler/src/test/java-gen/org/openmuc/jasn1/compiler/rspdefinitions/generated/pkix1implicit88/CRLReason.java
|
af340b375fc527d5d6d5aa440e216486c1533b5d
|
[] |
no_license
|
leerduo/jASN1
|
ae389412e3ba47b3ad48b79fb9ffa36188f571ba
|
48cc84955590db91313c3c73b468c311d803c706
|
refs/heads/master
| 2021-01-11T21:35:10.565155
| 2016-11-29T17:57:09
| 2016-11-29T17:57:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 931
|
java
|
/**
* This class file was automatically generated by jASN1 v1.6.1-SNAPSHOT (http://www.openmuc.org)
*/
package org.openmuc.jasn1.compiler.rspdefinitions.generated.pkix1implicit88;
import java.io.IOException;
import java.io.EOFException;
import java.io.InputStream;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.io.UnsupportedEncodingException;
import org.openmuc.jasn1.ber.*;
import org.openmuc.jasn1.ber.types.*;
import org.openmuc.jasn1.ber.types.string.*;
import org.openmuc.jasn1.compiler.rspdefinitions.generated.teletexdomaindefinedattributes.*;
import org.openmuc.jasn1.compiler.rspdefinitions.generated.rspdefinitions.*;
import org.openmuc.jasn1.compiler.rspdefinitions.generated.pkix1explicit88.*;
public class CRLReason extends BerEnum {
public CRLReason() {
}
public CRLReason(byte[] code) {
super(code);
}
public CRLReason(long value) {
super(value);
}
}
|
[
"karsten.ohme@ohmesoftware.de"
] |
karsten.ohme@ohmesoftware.de
|
9124df1ae66071b6e5c1294a526e4dc4cdf3a7b2
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/facebook/internal/ImageResponseCache$BufferedHttpInputStream.java
|
c4315eb12b94fc3392b45151433a8c90785be397
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 821
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.facebook.internal;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
// Referenced classes of package com.facebook.internal:
// ImageResponseCache, Utility
private static class connection extends BufferedInputStream
{
HttpURLConnection connection;
public void close()
throws IOException
{
super.close();
Utility.disconnectQuietly(connection);
}
(InputStream inputstream, HttpURLConnection httpurlconnection)
{
super(inputstream, 8192);
connection = httpurlconnection;
}
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
1029628b04460dbaa374ab6226ed2b405577cd6b
|
6b9812c4d0abe3506d2edfd170989996f5b5089c
|
/src/com/fontar/web/action/administracion/PaqueteAction.java
|
cab970675cebd48fd816136baea53d521d50237f
|
[] |
no_license
|
zorzal2/zorzal-tomcat
|
e570acd9826f8313fff6fc68f61ae2d39c20b402
|
4009879d14c6fe1b97fa8cf66a447067aeef7e2e
|
refs/heads/master
| 2022-12-24T19:53:56.790015
| 2019-07-28T20:56:25
| 2019-07-28T20:56:25
| 195,703,062
| 0
| 0
| null | 2022-12-15T23:23:46
| 2019-07-07T22:32:10
|
Java
|
IBM852
|
Java
| false
| false
| 7,624
|
java
|
package com.fontar.web.action.administracion;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.DynaActionForm;
import com.fontar.bus.api.workflow.WFPaqueteServicio;
import com.fontar.bus.impl.misc.CollectionHandler;
import com.fontar.data.api.dao.InstrumentoDAO;
import com.fontar.data.impl.domain.codes.paquete.TipoPaquete;
import com.fontar.data.impl.domain.codes.paquete.TratamientoPaquete;
import com.fontar.web.util.ActionUtil;
import com.pragma.util.FormUtil;
import com.pragma.web.WebContextUtil;
import com.pragma.web.action.BaseMappingDispatchAction;
/**
* Acci˛n para la administraci˛n de paquetes en el sistema
* @author ssanchez
*/
public class PaqueteAction extends BaseMappingDispatchAction {
private WFPaqueteServicio wfPaqueteServicio;
public void setWfPaqueteServicio(WFPaqueteServicio wfPaqueteServicio) {
this.wfPaqueteServicio = wfPaqueteServicio;
}
/**
* PaqueteAction
*/
// TODO: Cambiar el nombre del mÚtodo
public ActionForward agregarPaquete(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
ActionMessages messages = getErrors(request);
ActionUtil.checkValidEncryptionContext(messages);
if (messages.isEmpty() ){
if(isTokenValid(request)) {
resetToken(request);
// obtengo los valores del formulario
String instrumentoFiltrado = BeanUtils.getProperty(form, "instrumentoFiltrado");
String tratamientoFiltrado = BeanUtils.getProperty(form, "tratamientoFiltrado");
String[] proyectoArray = ((DynaActionForm) form).getStrings("proyectoArray");
Long idInstrumento = FormUtil.getLongValue(form, "instrumentoFiltrado");
String tratamiento = FormUtil.getStringValue(form, "tratamientoFiltrado");
String tipoPaquete = FormUtil.getStringValue(form, "tipoPaquete");
request.setAttribute("tipoPaquete", tipoPaquete);
if (instrumentoFiltrado.equals("")) {
addError(messages, "app.paquete.requiereInstrumento");
}
else if (tratamientoFiltrado.equals("")) {
addError(messages, "app.paquete.requiereTratamiento");
}
else if (proyectoArray.length <= 0) {
addError(messages, "app.paquete.requiereUnProyecto");
}
else {
wfPaqueteServicio.armarPaquete(proyectoArray, idInstrumento, tratamiento, tipoPaquete);
}
}
else {
addError(messages, "app.error.abmAction");
}
}
// ┐hay errores?
if (!messages.isEmpty()) {
saveErrors(request, messages);
if (mapping.getInput() != null) {
return mapping.getInputForward();
}
else {
return mapping.findForward("invalid");
}
}
else {
return mapping.findForward("success");
}
}
/**
* Muestra la pantalla inicial para armar paquetes
*/
public ActionForward armarPaquete(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
saveToken(request);
setCollections(request);
// seteo el tipo de paquete que se quiere generar
String tipoPaquete = request.getParameter("tipoPaquete");
request.setAttribute("tipoPaquete", tipoPaquete);
// obtengo el listado de proyecto segun los filtros instrumento y tratamiento
String instrumentoFiltrado = FormUtil.getStringValue(form, "instrumentoFiltrado");
String tratamientoFiltrado = FormUtil.getStringValue(form, "tratamientoFiltrado");
List proyectosList = null;
if (instrumentoFiltrado != null && tratamientoFiltrado != null) {
// cargo la lista de proyectos
proyectosList = wfPaqueteServicio.obtenerProyectos(new Long(instrumentoFiltrado), tratamientoFiltrado, tipoPaquete);
// usados para validar que los filtros se hayan aplicados
((DynaActionForm) form).set("instrumento", instrumentoFiltrado);
((DynaActionForm) form).set("tratamiento", tratamientoFiltrado);
// guardo la collection en el request
request.setAttribute("proyectosList", proyectosList);
}
return mapping.findForward("success");
}
/**
* Muestra los proyectos que cumplen con los filtros de instrumento y
* tratamiento
*/
public ActionForward mostrarProyectos(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
form.validate(mapping, request);
// Cola de mensajes de error
ActionMessages messages = getErrors(request);
String tipoPaquete = null;
List proyectosList = null;
setCollections(request);
//requiere contexto de encriptacion
ActionUtil.checkValidEncryptionContext(messages);
// seteo el tipo de paquete que se quiere generar
tipoPaquete = request.getParameter("tipoPaquete");
// obtengo el listado de proyecto segun los filtros instrumento y tratamiento
String instrumento = FormUtil.getStringValue(form, "instrumento");
String tratamiento = FormUtil.getStringValue(form, "tratamiento");
if (instrumento == null || instrumento.equals("")) {
addError(messages, "app.paquete.requiereInstrumento");
}
else if (tratamiento == null || tratamiento.equals("")) {
addError(messages, "app.paquete.requiereTratamiento");
}
// ┐hay errores?
if (!messages.isEmpty()) {
saveErrors(request, messages);
if (mapping.getInput() != null) {
return mapping.getInputForward();
}
else {
return mapping.findForward("invalid");
}
}
else {
proyectosList = wfPaqueteServicio.obtenerProyectos(new Long(instrumento), tratamiento, tipoPaquete);
// usados para validar que los filtros se hayan aplicados
((DynaActionForm) form).set("instrumentoFiltrado", instrumento);
((DynaActionForm) form).set("tratamientoFiltrado", tratamiento);
// guardo la collection en el request
request.setAttribute("proyectosList", proyectosList);
request.setAttribute("tipoPaquete", tipoPaquete);
return mapping.findForward("success");
}
}
/**
* LLeno los combos para agregar y editar
* @param request: usado para setear collections
* @throws Exception
*/
@SuppressWarnings("unchecked")
private void setCollections(HttpServletRequest request) throws Exception {
CollectionHandler collectionHandler = new CollectionHandler();
String tipoPaquete;
if (request.getParameter("tipoPaquete") != null && !request.getParameter("tipoPaquete").equals("")) {
tipoPaquete = request.getParameter("tipoPaquete");
}
else {
tipoPaquete = request.getAttribute("tipoPaquete").toString();
}
InstrumentoDAO instrumentoDAO = (InstrumentoDAO) WebContextUtil.getBeanFactory().getBean("instrumentoDao");
Collection instrumentoList = new ArrayList();
if (tipoPaquete.equals(TipoPaquete.COMISION.getName())) {
instrumentoList.addAll(collectionHandler.getInstrumentoComision(instrumentoDAO));
}
else if (tipoPaquete.equals(TipoPaquete.SECRETARIA.getName())) {
instrumentoList.addAll(collectionHandler.getInstrumentoSecretaria(instrumentoDAO));
}
else {
instrumentoList.addAll(collectionHandler.getInstrumentoDirectorio(instrumentoDAO));
}
Collection tratamientoList = new ArrayList();
tratamientoList.addAll(collectionHandler.getTratamientosPaquete(TratamientoPaquete.class, tipoPaquete));
request.setAttribute("instrumentos", instrumentoList);
request.setAttribute("tratamientos", tratamientoList);
}
}
|
[
"15364292+llobeto@users.noreply.github.com"
] |
15364292+llobeto@users.noreply.github.com
|
3c72497b3fc5a2b8041137fc805e575a13b1b722
|
d9f98dd1828e25bc2e8517e5467169830c5ded60
|
/src/main/java/com/alipay/api/request/ZhimaCustomerEpCertificationCertifyRequest.java
|
5a54bde75131c06469e87ae1768ec7d8cfba1000
|
[] |
no_license
|
benhailong/open_kit
|
6c99f3239de6dcd37f594f7927dc8b0e666105dc
|
a45dd2916854ee8000d2fb067b75160b82bc2c04
|
refs/heads/master
| 2021-09-19T18:22:23.628389
| 2018-07-30T08:18:18
| 2018-07-30T08:18:26
| 117,778,328
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,054
|
java
|
package com.alipay.api.request;
import com.alipay.api.domain.ZhimaCustomerEpCertificationCertifyModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.ZhimaCustomerEpCertificationCertifyResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: zhima.customer.ep.certification.certify request
*
* @author auto create
* @since 1.0, 2017-11-23 19:13:17
*/
public class ZhimaCustomerEpCertificationCertifyRequest implements AlipayRequest<ZhimaCustomerEpCertificationCertifyResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 企业认证引导(页面接口)
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "zhima.customer.ep.certification.certify";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<ZhimaCustomerEpCertificationCertifyResponse> getResponseClass() {
return ZhimaCustomerEpCertificationCertifyResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"694201656@qq.com"
] |
694201656@qq.com
|
cd4112e62075a872f5a2da21f0780bf23dbf3ed9
|
ceeea83e2553c0ffef73bb8d3dc784477e066531
|
/e-ResourceOrginal/src/java/com/erp/Reports/Employeeinformation.java
|
5927a2b682b26dca9d785f2cd2acd1e05d451cbf
|
[
"Apache-2.0"
] |
permissive
|
anupammaiti/ERP
|
99bf67f9335a2fea96e525a82866810875bc8695
|
8c124deb41c4945c7cd55cc331b021eae4100c62
|
refs/heads/master
| 2020-08-13T19:30:59.922232
| 2019-10-09T17:04:58
| 2019-10-09T17:04:58
| 215,025,440
| 1
| 0
|
Apache-2.0
| 2019-10-14T11:26:11
| 2019-10-14T11:26:10
| null |
UTF-8
|
Java
| false
| false
| 3,517
|
java
|
package com.erp.Reports;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Properties;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperRunManager;
import com.svs.erp.Hr.db.ConnectionUtils;
import com.svs.erp.company.DAO.CompanyRegistrationDAO;
import com.svs.util.ConvertStackTracetoString;
import com.svs.util.Properties_Util;
public class Employeeinformation extends HttpServlet
{
private ServletContext servletContext;
final static Logger logger = Logger.getLogger(Employeeinformation.class);
ConvertStackTracetoString util_stacktrace=new ConvertStackTracetoString();
private CompanyRegistrationDAO companyregdao=new CompanyRegistrationDAO();
private Properties_Util util_prop=new Properties_Util();
private Properties prop=new Properties();
/** Initializes the Servlet and gets the Initial parameters */
public void init(ServletConfig Conf) throws ServletException {
super.init(Conf);
try {
servletContext = Conf.getServletContext();
} catch (Exception ex) {
logger.error(util_stacktrace.sendingErrorAsString(ex));
}
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
String name=null;
String empid=request.getParameter("empid");
////////System.out.println("Employee ID in report....."+empid);
try {
ServletOutputStream servletOutputStream = response.getOutputStream();
InputStream reportStream = servletContext.getResourceAsStream("/Reports/employeeinformations.jasper");
////////System.out.println("Emp1");
Connection con = null;
ConnectionUtils conn=new ConnectionUtils();
con=conn.getDBConnection();
PreparedStatement ps=con.prepareStatement("select name,lname from employee where empno=?");
ps.setString(1,empid);
ResultSet rs=ps.executeQuery();
while(rs.next())
{
String fname=rs.getString(1);
String lname=rs.getString(2);
name=fname+" "+lname;
}
HashMap hm = new HashMap();
//Map reportParameters = new HashMap();
hm.put("empid",empid);
hm.put("name",name);
String companyname=(String)request.getSession().getAttribute("comp");
String imageName=companyregdao.viewImageNameByCompanyName(companyname);//Getting Image Name by using Companyname.
prop=util_prop.getMessageUpload();//Setting properties file to properties Object.
String imagePath=prop.getProperty("logopath")+imageName;//Merging(Concatinate) the Path and ImageName.
hm.put("imagePath", imagePath);
//hm.put("John Doe", new Double(3434.34));
JasperRunManager.runReportToPdfStream(reportStream , servletOutputStream, hm, con);
//////System.out.println("Clicked on....."+empid);
response.setContentType("application/pdf");
servletOutputStream.flush();
servletOutputStream.close();
} catch (JRException e1) {
logger.error(util_stacktrace.sendingErrorAsString(e1));
} catch (Exception e) {
logger.error(util_stacktrace.sendingErrorAsString(e));
}
}
}
// JavaScript Document
|
[
"rrkravikiranrrk@gmail.com"
] |
rrkravikiranrrk@gmail.com
|
826cae9a2b5ead25d92eb44f51dc74624f457c05
|
e617f4ae796f16eeb4705200935a90dfd31955b2
|
/com/google/android/gms/maps/model/i.java
|
34deda5eaf55c29bb82fead866c7f20b56169190
|
[] |
no_license
|
mascot6699/Go-Jek.Android
|
98dfb73b1c52a7c2100c7cf8baebc0a95d5d511d
|
051649d0622bcdc7872cb962a0e1c4f6c0f2a113
|
refs/heads/master
| 2021-01-20T00:24:46.431341
| 2016-01-11T05:59:34
| 2016-01-11T05:59:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,563
|
java
|
package com.google.android.gms.maps.model;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.a.a;
import com.google.android.gms.common.internal.safeparcel.b;
public class i
implements Parcelable.Creator<LatLng>
{
static void a(LatLng paramLatLng, Parcel paramParcel, int paramInt)
{
paramInt = b.D(paramParcel);
b.c(paramParcel, 1, paramLatLng.getVersionCode());
b.a(paramParcel, 2, paramLatLng.latitude);
b.a(paramParcel, 3, paramLatLng.longitude);
b.H(paramParcel, paramInt);
}
public LatLng cM(Parcel paramParcel)
{
double d1 = 0.0D;
int j = a.C(paramParcel);
int i = 0;
double d2 = 0.0D;
while (paramParcel.dataPosition() < j)
{
int k = a.B(paramParcel);
switch (a.aD(k))
{
default:
a.b(paramParcel, k);
break;
case 1:
i = a.g(paramParcel, k);
break;
case 2:
d2 = a.m(paramParcel, k);
break;
case 3:
d1 = a.m(paramParcel, k);
}
}
if (paramParcel.dataPosition() != j) {
throw new a.a("Overread allowed size end=" + j, paramParcel);
}
return new LatLng(i, d2, d1);
}
public LatLng[] eC(int paramInt)
{
return new LatLng[paramInt];
}
}
/* Location: /Users/michael/Downloads/dex2jar-2.0/GO_JEK.jar!/com/google/android/gms/maps/model/i.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"michael@MJSTONE-MACBOOK.local"
] |
michael@MJSTONE-MACBOOK.local
|
79c05dac441d1ee80a9520f49e6ac98cb1db0fbf
|
3adff95369515e42aa6a7822a2f57afa7ccf00d9
|
/src/main/resources/archetype-resources/src/main/java/launch/TomcatEmbeddedBootstrap.java
|
26f0674a9004e72ff76974fcdc720083a69c8e03
|
[] |
no_license
|
Johnny850807/maven-tomcat-embedded-archetype
|
a2bdb8b5391e022e18184bb5fffa06e136c70c08
|
5368bf44826a924b94b8fcb825166cb076bf1d7e
|
refs/heads/master
| 2021-06-19T11:06:00.486849
| 2019-12-28T13:44:43
| 2019-12-28T13:44:43
| 205,090,405
| 1
| 0
| null | 2021-06-16T17:55:11
| 2019-08-29T05:52:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,760
|
java
|
package ${package}.launch;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.WebResourceRoot;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.webresources.DirResourceSet;
import org.apache.catalina.webresources.StandardRoot;
import javax.servlet.ServletException;
import java.io.File;
public class TomcatEmbeddedBootstrap {
private static final String WEBAPP_DIR_PATH = "src/main/webapp";
private static final String PORT = "8080";
private static final String CLASS_PATH = "target/classes";
public static void main(String[] args) throws LifecycleException, ServletException {
Tomcat tomcat = new Tomcat();
//The port that we should run on can be set into an environment variable
//Look for that variable and default to 8080 if it isn't there.
String webPort = System.getenv("PORT");
if(webPort == null || webPort.isEmpty()) {
webPort = PORT;
}
tomcat.setPort(Integer.valueOf(webPort));
StandardContext ctx = (StandardContext) tomcat.addWebapp("", new File(WEBAPP_DIR_PATH).getAbsolutePath());
System.out.println("configuring app with basedir: " + new File("./" + WEBAPP_DIR_PATH).getAbsolutePath());
// Declare an alternative location for your "WEB-INF/classes" dir
// Servlet 3.0 annotation will work
WebResourceRoot resources = new StandardRoot(ctx);
resources.addPreResources(new DirResourceSet(resources, "/WEB-INF/classes",
CLASS_PATH, "/"));
ctx.setResources(resources);
tomcat.start();
System.out.println("The tomcat is started.");
tomcat.getServer().await();
}
}
|
[
"johnny850807@gmail.com"
] |
johnny850807@gmail.com
|
2cd1bf533e07572e999a8ae8f460a551ac991577
|
15448fc168098b8adc44c5905bd861adfd1832b7
|
/ejbca/modules/cesecore-common/src/org/cesecore/util/ui/MultiLineString.java
|
15278cda47da36416e5f9f0b98ed6dfc4f38295b
|
[] |
no_license
|
gangware72/Ejbca-Sample
|
d9ff359d0c3a675ca7e487bb181f4cdb101c123b
|
821d126072f38225ae321ec45011a5d72750e97a
|
refs/heads/main
| 2023-07-19T22:35:36.414622
| 2021-08-19T23:17:28
| 2021-08-19T23:17:28
| 398,092,842
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
/*************************************************************************
* *
* CESeCore: CE Security Core *
* *
* This software is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or any later version. *
* *
* See terms of license at gnu.org. *
* *
*************************************************************************/
package org.cesecore.util.ui;
import java.io.Serializable;
/**
* Representation of a multi-line String (text area) for use with DynamicUiProperty.
*
* Since the type of DynamicUiProperty determines how it should be rendered (for example in this
* case a HTML input of type "textarea"), this class is needed as a distinction from a regular
* String (that is assumed to be a single line).
*
* @version $Id$
*/
public class MultiLineString implements Serializable {
private static final long serialVersionUID = 1L;
private String value;
public MultiLineString(final String value) {
this.value = value;
}
public String getValue() {
return value;
}
public void setValue(final String value) {
this.value = value;
}
}
|
[
"edgar.gangware@cradlepoint.com"
] |
edgar.gangware@cradlepoint.com
|
228a4c6acbd24377375f56652e8a96cf1ac07694
|
7aeccbe055cb97fc1533f0ce5a483bbc9f66f7fd
|
/src/main/java/com/codetaylor/mc/artisanworktables/common/event/RecipeSerializerRegistrationEventHandler.java
|
94250b9a5a7f85b21195837f090212479f5490b1
|
[
"Apache-2.0"
] |
permissive
|
codetaylor/artisan-worktables-1.16
|
f5f0b212a388ef1683fd084c63447d4b5e6a5189
|
780606327080d314c605951e9f35f123da9c902f
|
refs/heads/master
| 2023-07-21T01:05:17.649537
| 2023-07-10T15:33:27
| 2023-07-10T15:33:27
| 330,765,663
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,752
|
java
|
package com.codetaylor.mc.artisanworktables.common.event;
import com.codetaylor.mc.artisanworktables.common.recipe.ArtisanRecipe;
import com.codetaylor.mc.artisanworktables.common.recipe.ArtisanRecipeShaped;
import com.codetaylor.mc.artisanworktables.common.recipe.ArtisanRecipeShapeless;
import com.codetaylor.mc.artisanworktables.common.recipe.serializer.*;
import com.codetaylor.mc.artisanworktables.common.reference.EnumType;
import com.codetaylor.mc.artisanworktables.common.reference.Reference;
import com.codetaylor.mc.artisanworktables.common.util.Key;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.registries.IForgeRegistry;
import java.util.EnumMap;
public class RecipeSerializerRegistrationEventHandler {
private final EnumMap<EnumType, IRecipeSerializer<? extends ArtisanRecipe>> registeredSerializersShaped;
private final EnumMap<EnumType, IRecipeSerializer<? extends ArtisanRecipe>> registeredSerializersShapeless;
public RecipeSerializerRegistrationEventHandler(
EnumMap<EnumType, IRecipeSerializer<? extends ArtisanRecipe>> registeredSerializersShaped,
EnumMap<EnumType, IRecipeSerializer<? extends ArtisanRecipe>> registeredSerializersShapeless
) {
this.registeredSerializersShaped = registeredSerializersShaped;
this.registeredSerializersShapeless = registeredSerializersShapeless;
}
@SubscribeEvent
public void on(RegistryEvent.Register<IRecipeSerializer<?>> event) {
IForgeRegistry<IRecipeSerializer<?>> registry = event.getRegistry();
for (EnumType type : EnumType.values()) {
String name = type.getName();
{
RecipeSerializer<ArtisanRecipeShaped> serializer = new RecipeSerializer<>(
new RecipeSerializerShapedJsonReader(type, Reference.MAX_RECIPE_WIDTH, Reference.MAX_RECIPE_HEIGHT),
new RecipeSerializerShapedPacketReader(type),
new RecipeSerializerShapedPacketWriter()
);
serializer.setRegistryName(Key.from(name + "_shaped"));
this.registeredSerializersShaped.put(type, serializer);
registry.register(serializer);
}
{
RecipeSerializer<ArtisanRecipeShapeless> serializer = new RecipeSerializer<>(
new RecipeSerializerShapelessJsonReader(type, Reference.MAX_RECIPE_WIDTH, Reference.MAX_RECIPE_HEIGHT),
new RecipeSerializerShapelessPacketReader(type),
new RecipeSerializerShapelessPacketWriter()
);
serializer.setRegistryName(Key.from(name + "_shapeless"));
this.registeredSerializersShapeless.put(type, serializer);
registry.register(serializer);
}
}
}
}
|
[
"jason@codetaylor.com"
] |
jason@codetaylor.com
|
d43914c14f4518af1c432f56d09c753a37fc0180
|
0bffcdd8c5f803627956bd7cec7b28d1cea00dc3
|
/src/main/java/com/parse/ParseApacheHttpClient.java
|
b0cb8971ec4ba9d2fb113b4ff39b863bb0a418b5
|
[] |
no_license
|
sinzua/baseApk
|
eb5d8c28cdb385ec49413217151ebba7c2fbb723
|
9011fb631ed84b1747561244cc08fff38205e97c
|
refs/heads/master
| 2021-01-21T17:39:20.367401
| 2017-05-21T18:06:26
| 2017-05-21T18:06:26
| 91,977,496
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,850
|
java
|
package com.parse;
import android.net.SSLCertificateSocketFactory;
import android.net.SSLSessionCache;
import android.net.http.AndroidHttpClient;
import com.parse.ParseHttpResponse.Builder;
import com.parse.ParseRequest.Method;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.params.HttpClientParams;
import org.apache.http.conn.params.ConnManagerParams;
import org.apache.http.conn.params.ConnPerRouteBean;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.entity.InputStreamEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
class ParseApacheHttpClient extends ParseHttpClient<HttpUriRequest, HttpResponse> {
private DefaultHttpClient apacheClient;
private static class ParseApacheHttpEntity extends InputStreamEntity {
private ParseHttpBody parseBody;
public ParseApacheHttpEntity(ParseHttpBody parseBody) {
super(parseBody.getContent(), (long) parseBody.getContentLength());
super.setContentType(parseBody.getContentType());
this.parseBody = parseBody;
}
public void writeTo(OutputStream out) throws IOException {
this.parseBody.writeTo(out);
}
}
public ParseApacheHttpClient(int socketOperationTimeout, SSLSessionCache sslSessionCache) {
HttpParams params = new BasicHttpParams();
HttpConnectionParams.setStaleCheckingEnabled(params, false);
HttpConnectionParams.setConnectionTimeout(params, socketOperationTimeout);
HttpConnectionParams.setSoTimeout(params, socketOperationTimeout);
HttpConnectionParams.setSocketBufferSize(params, 8192);
HttpClientParams.setRedirecting(params, false);
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
schemeRegistry.register(new Scheme("https", SSLCertificateSocketFactory.getHttpSocketFactory(socketOperationTimeout, sslSessionCache), 443));
String maxConnectionsStr = System.getProperty("http.maxConnections");
if (maxConnectionsStr != null) {
int maxConnections = Integer.parseInt(maxConnectionsStr);
ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(maxConnections));
ConnManagerParams.setMaxTotalConnections(params, maxConnections);
}
String host = System.getProperty("http.proxyHost");
String portString = System.getProperty("http.proxyPort");
if (!(host == null || host.length() == 0 || portString == null || portString.length() == 0)) {
params.setParameter("http.route.default-proxy", new HttpHost(host, Integer.parseInt(portString), "http"));
}
this.apacheClient = new DefaultHttpClient(new ThreadSafeClientConnManager(params, schemeRegistry), params);
}
ParseHttpResponse executeInternal(ParseHttpRequest parseRequest) throws IOException {
return getResponse(this.apacheClient.execute(getRequest(parseRequest)));
}
ParseHttpResponse getResponse(HttpResponse apacheResponse) throws IOException {
if (apacheResponse == null) {
throw new IllegalArgumentException("HttpResponse passed to getResponse should not be null.");
}
int statusCode = apacheResponse.getStatusLine().getStatusCode();
InputStream content = AndroidHttpClient.getUngzippedContent(apacheResponse.getEntity());
int totalSize = -1;
Header[] contentLengthHeader = apacheResponse.getHeaders("Content-Length");
if (contentLengthHeader.length > 0) {
totalSize = Integer.parseInt(contentLengthHeader[0].getValue());
}
String reasonPhrase = apacheResponse.getStatusLine().getReasonPhrase();
Map<String, String> headers = new HashMap();
for (Header header : apacheResponse.getAllHeaders()) {
headers.put(header.getName(), header.getValue());
}
String contentType = null;
HttpEntity entity = apacheResponse.getEntity();
if (!(entity == null || entity.getContentType() == null)) {
contentType = entity.getContentType().getValue();
}
return ((Builder) ((Builder) ((Builder) ((Builder) ((Builder) ((Builder) new Builder().setStatusCode(statusCode)).setContent(content)).setTotalSize(totalSize)).setReasonPhase(reasonPhrase)).setHeaders(headers)).setContentType(contentType)).build();
}
HttpUriRequest getRequest(ParseHttpRequest parseRequest) throws IOException {
if (parseRequest == null) {
throw new IllegalArgumentException("ParseHttpRequest passed to getApacheRequest should not be null.");
}
HttpUriRequest apacheRequest;
Method method = parseRequest.getMethod();
String url = parseRequest.getUrl();
switch (method) {
case GET:
apacheRequest = new HttpGet(url);
break;
case DELETE:
apacheRequest = new HttpDelete(url);
break;
case POST:
apacheRequest = new HttpPost(url);
break;
case PUT:
apacheRequest = new HttpPut(url);
break;
default:
throw new IllegalStateException("Unsupported http method " + method.toString());
}
for (Entry<String, String> entry : parseRequest.getAllHeaders().entrySet()) {
apacheRequest.setHeader((String) entry.getKey(), (String) entry.getValue());
}
AndroidHttpClient.modifyRequestToAcceptGzipResponse(apacheRequest);
ParseHttpBody body = parseRequest.getBody();
switch (method) {
case POST:
((HttpPost) apacheRequest).setEntity(new ParseApacheHttpEntity(body));
break;
case PUT:
((HttpPut) apacheRequest).setEntity(new ParseApacheHttpEntity(body));
break;
}
return apacheRequest;
}
}
|
[
"sinzua@gmail.com"
] |
sinzua@gmail.com
|
771b891e0a52783525d35cd0974ffbc65f3884cd
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project71/src/main/java/org/gradle/test/performance71_1/Production71_12.java
|
a94d54e85f7f642545f9c8f4a9c08dcdda95478e
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 302
|
java
|
package org.gradle.test.performance71_1;
public class Production71_12 extends org.gradle.test.performance16_1.Production16_12 {
private final String property;
public Production71_12() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
99e4f653778e87c6358157066893ec9a5c023332
|
20240a61b712e13bff98c2055317a8500e08c3ca
|
/ca/ca-cmp/src/main/java/org/xipki/ca/cmp/client/type/EnrollCertResultEntryType.java
|
0bbd0d392bd640ec539d52a009c96adc54046f72
|
[] |
no_license
|
tempbottle/xipki
|
fc215ffea193dd07480a995c372eea7a16f72a24
|
aaf69c31f77dc71f1297ddfb671b565f9c20dca6
|
refs/heads/master
| 2021-01-18T05:09:20.408000
| 2014-10-16T18:45:31
| 2014-10-16T18:45:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
/*
* Copyright (c) 2014 Lijun Liao
*
* TO-BE-DEFINE
*
*/
package org.xipki.ca.cmp.client.type;
import org.bouncycastle.asn1.cmp.CMPCertificate;
import org.bouncycastle.asn1.cmp.PKIStatus;
/**
* @author Lijun Liao
*/
public class EnrollCertResultEntryType extends ResultEntryType
{
private final CMPCertificate cert;
private final int status;
public EnrollCertResultEntryType(String id, CMPCertificate cert)
{
this(id, cert, PKIStatus.GRANTED);
}
public EnrollCertResultEntryType(String id, CMPCertificate cert, int status)
{
super(id);
this.cert = cert;
this.status = status;
}
public CMPCertificate getCert()
{
return cert;
}
public int getStatus()
{
return status;
}
}
|
[
"lijun.liao@gmail.com"
] |
lijun.liao@gmail.com
|
ccbf91221f6263ce55164fc2b7ee1a7454e955a7
|
07bd7613fe758060ace00d8d35a48731cb8a0040
|
/protected-method-scheduled-job/spring-sec-31/src/main/java/net/petrikainulainen/spring/trenches/scheduling/job/ScheduledJobOne.java
|
fe35c7fc14b7acf73dca34b568cce8eaadca1571
|
[
"Apache-2.0"
] |
permissive
|
beginsmauel/spring-from-the-trenches
|
5ebf0f80d2dd4795587acb9dd61fef5d8631cb4d
|
da57ba1469bbce78125c7ffbe225acfa3453eea7
|
refs/heads/master
| 2021-01-11T16:03:35.957046
| 2017-10-13T04:12:58
| 2017-10-13T04:12:58
| 79,996,327
| 0
| 0
| null | 2017-01-25T08:31:59
| 2017-01-25T08:31:59
| null |
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
package net.petrikainulainen.spring.trenches.scheduling.job;
import net.petrikainulainen.spring.trenches.scheduling.service.MessageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author Petri Kainulainen
*/
@Component
public class ScheduledJobOne {
private static final Logger LOGGER = LoggerFactory.getLogger(ScheduledJobOne.class);
private final MessageService messageService;
@Autowired
public ScheduledJobOne(MessageService messageService) {
this.messageService = messageService;
}
@Scheduled(cron = "${scheduling.job.cron}")
public void run() {
LOGGER.debug("Starting scheduled job 1.");
AuthenticationUtil.configureAuthentication("ROLE_USER");
String message = messageService.getMessage();
LOGGER.debug("Received message 1: {}", message);
AuthenticationUtil.clearAuthentication();
LOGGER.debug("Scheduled job 1 is finished.");
}
}
|
[
"petri.kainulainen@gmail.com"
] |
petri.kainulainen@gmail.com
|
06f0aa32e20fa0d0692835bdb760869348bc90d6
|
702674cd6456486025a08a9a081a41aff6fdfb09
|
/app/src/main/java/com/tsyc/tianshengyoucai/vo/BossMineVo.java
|
d2520e77c002f633061a75558113442b8e86cc8e
|
[] |
no_license
|
yufeilong92/2019-9-12
|
b9730b128e6bdf37bc7dd007559e0ec15e4c46ed
|
ac9c14467ea6e513c057062880da2b193b4eff86
|
refs/heads/master
| 2020-07-24T12:58:51.588137
| 2019-09-12T02:08:21
| 2019-09-12T02:08:21
| 207,935,624
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,341
|
java
|
package com.tsyc.tianshengyoucai.vo;
import com.tsyc.tianshengyoucai.model.bean.NormalBean;
/**
* @Author : YFL is Creating a porject in PC$
* @Email : yufeilong92@163.com
* @Time :2019/9/4 09:49
* @Purpose :
*/
public class BossMineVo extends NormalBean {
/**
* result : {"boss":{"avatar":"http://tsyc.jiefutong.net/uploads/home/membertag/201909/8_2019090318004962880.jpg","id":1,"user_id":3,"username":"game over"},"cv_sends":{"interview":0,"others":6,"send":1}}
*/
private ResultBean result;
public ResultBean getResult() {
return result;
}
public void setResult(ResultBean result) {
this.result = result;
}
public static class ResultBean {
/**
* boss : {"avatar":"http://tsyc.jiefutong.net/uploads/home/membertag/201909/8_2019090318004962880.jpg","id":1,"user_id":3,"username":"game over"}
* cv_sends : {"interview":0,"others":6,"send":1}
*/
private BossBean boss;
private CvSendsBean cv_sends;
public BossBean getBoss() {
return boss;
}
public void setBoss(BossBean boss) {
this.boss = boss;
}
public CvSendsBean getCv_sends() {
return cv_sends;
}
public void setCv_sends(CvSendsBean cv_sends) {
this.cv_sends = cv_sends;
}
public static class BossBean {
/**
* avatar : http://tsyc.jiefutong.net/uploads/home/membertag/201909/8_2019090318004962880.jpg
* id : 1
* user_id : 3
* username : game over
*/
private String avatar;
private int id;
private int user_id;
private String username;
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUser_id() {
return user_id;
}
public void setUser_id(int user_id) {
this.user_id = user_id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
public static class CvSendsBean {
/**
* interview : 0
* others : 6
* send : 1
*/
private int interview;
private int others;
private int send;
public int getInterview() {
return interview;
}
public void setInterview(int interview) {
this.interview = interview;
}
public int getOthers() {
return others;
}
public void setOthers(int others) {
this.others = others;
}
public int getSend() {
return send;
}
public void setSend(int send) {
this.send = send;
}
}
}
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
c277a5f5796209a5888f0f2db1e2d4f12369f0f8
|
b2016b74acf02c0117128b505baac48338d825c9
|
/sophia.mmorpg/src/main/java/sophia/mmorpg/player/team/actionEvent/info/G2C_PlayerTeam_Modify.java
|
6bdb65f6f57cfa1c27a2fc5e0d48b5f84a455dd3
|
[] |
no_license
|
atom-chen/server
|
979830e60778a3fba1740ea3afb2e38937e84cea
|
c44e12a3efe5435d55590c9c0fd9e26cec58ed65
|
refs/heads/master
| 2020-06-17T02:54:13.348191
| 2017-10-13T18:40:21
| 2017-10-13T18:40:21
| 195,772,502
| 0
| 1
| null | 2019-07-08T08:46:37
| 2019-07-08T08:46:37
| null |
UTF-8
|
Java
| false
| false
| 530
|
java
|
package sophia.mmorpg.player.team.actionEvent.info;
import org.apache.mina.core.buffer.IoBuffer;
import sophia.foundation.communication.core.ActionEventBase;
public class G2C_PlayerTeam_Modify extends ActionEventBase {
private byte succeed;
@Override
protected IoBuffer packBody(IoBuffer buffer) {
buffer.put(succeed);
return buffer;
}
@Override
public void unpackBody(IoBuffer buffer) {
}
public byte getSucceed() {
return succeed;
}
public void setSucceed(byte succeed) {
this.succeed = succeed;
}
}
|
[
"hi@luanhailiang.cn"
] |
hi@luanhailiang.cn
|
37166b256dde572d8a2bf45293c512af89845a0c
|
8799ac7be9e0fe8a80ea2ae002beb7a68a1a4392
|
/Algorithm/BaekJoon Algorithm/BJ1068.java
|
b0bd96c184d15d9e8a2d6ba330b1faf9796fdf5b
|
[] |
no_license
|
jeon9825/TIP
|
c45f73db7e1f9dffc8edf5a4268f0d7ee14e6709
|
fc8067e4597189b1762453ed29ba91d000e03160
|
refs/heads/master
| 2021-08-18T10:00:26.373784
| 2021-08-05T13:52:42
| 2021-08-05T13:52:42
| 174,329,195
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,580
|
java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;
public class BJ1068 {
static int[] tree;
static ArrayList<Integer> list[];
static int delete;
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(reader.readLine());
StringTokenizer tokenizer = new StringTokenizer(reader.readLine());
tree = new int[n];
list = new ArrayList[n];
for (int i = 0; i < list.length; i++) {
list[i] = new ArrayList<>();
}
int root = 0;
for (int i = 0; i < tree.length; i++) {
tree[i] = Integer.parseInt(tokenizer.nextToken());
if (tree[i] != -1)
list[tree[i]].add(i);
else
root = i;
}
delete = Integer.parseInt(reader.readLine());
tree[delete] = -1;
list[delete].clear();
for (int i = 0; i < list.length; i++) {
if (list[i].contains(delete))
list[i].remove(new Integer(delete));
}
if (delete == root)
System.out.println(0);
else
System.out.println(BFS(root));
}
static int BFS(int root) {
Queue<Integer> q = new LinkedList<>();
q.add(root);
int leaf = 0;
while (!q.isEmpty()) {
int parent = q.poll();
if (delete == parent)
continue;
if (list[parent].isEmpty())
leaf++;
else
for (int i = 0; i < tree.length; i++) {
if (tree[i] == parent) {
q.add(i);
}
}
}
return leaf;
}
}
|
[
"jeon9825@naver.com"
] |
jeon9825@naver.com
|
ee10327a81be7918068b7767b97f38d711546d4a
|
8c5e64d7000edf7a201179eeb1020c591d8fd0cd
|
/Minecraft/build/tmp/recompileMc/sources/net/minecraft/client/model/ModelHumanoidHead.java
|
360d76398efebe55fe696bbc19c7d5348e40bd42
|
[
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"BSD-3-Clause",
"MIT"
] |
permissive
|
shaw-wong/Malmo
|
1f1bec86ff5b2c8038540d029a9d2288201e0f3a
|
2683891206e8ab7f015d5d0feb6b5a967f02c94f
|
refs/heads/master
| 2021-06-25T13:14:30.097602
| 2018-06-03T14:25:19
| 2018-06-03T14:25:19
| 125,961,215
| 1
| 0
|
MIT
| 2018-04-10T05:34:35
| 2018-03-20T04:35:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,619
|
java
|
package net.minecraft.client.model;
import net.minecraft.entity.Entity;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ModelHumanoidHead extends ModelSkeletonHead
{
private final ModelRenderer head = new ModelRenderer(this, 32, 0);
public ModelHumanoidHead()
{
super(0, 0, 64, 64);
this.head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.25F);
this.head.setRotationPoint(0.0F, 0.0F, 0.0F);
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
super.render(entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
this.head.render(scale);
}
/**
* Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
* "far" arms and legs can swing at most.
*/
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
{
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
this.head.rotateAngleY = this.skeletonHead.rotateAngleY;
this.head.rotateAngleX = this.skeletonHead.rotateAngleX;
}
}
|
[
"254664427@qq.com"
] |
254664427@qq.com
|
bc3fa2652341ccb2dec7934b6868395d5808ad3d
|
f2b70e4c2f38ff4a814650df12ee9cecd877c65a
|
/src/main/java/osm5/ns/yang/nfvo/mano/types/rev170208/host/epa/host/epa/OmCpuFeatureKey.java
|
c466cdff1d80357990737af20e6806afe2e26c06
|
[
"Apache-2.0"
] |
permissive
|
5GinFIRE/eu.5ginfire.nbi.osm5java
|
34f17f78930178bdf3b428db7a0e9b24982c7c2a
|
19b6a70cd39e5b0eddd1d0a63069532fa2a1cee0
|
refs/heads/master
| 2021-08-11T15:50:07.182421
| 2019-06-14T12:25:45
| 2019-06-14T12:25:45
| 182,989,539
| 0
| 0
|
Apache-2.0
| 2021-08-02T17:16:53
| 2019-04-23T10:15:57
|
Java
|
UTF-8
|
Java
| false
| false
| 1,737
|
java
|
package osm5.ns.yang.nfvo.mano.types.rev170208.host.epa.host.epa;
import com.google.common.base.MoreObjects;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import org.opendaylight.yangtools.yang.binding.CodeHelpers;
import org.opendaylight.yangtools.yang.binding.Identifier;
public class OmCpuFeatureKey
implements Identifier<OmCpuFeature> {
private static final long serialVersionUID = 8816526446650637089L;
private final String _feature;
public OmCpuFeatureKey(String _feature) {
this._feature = _feature;
}
/**
* Creates a copy from Source Object.
*
* @param source Source object
*/
public OmCpuFeatureKey(OmCpuFeatureKey source) {
this._feature = source._feature;
}
public String getFeature() {
return _feature;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Objects.hashCode(_feature);
return result;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
OmCpuFeatureKey other = (OmCpuFeatureKey) obj;
if (!Objects.equals(_feature, other._feature)) {
return false;
}
return true;
}
@Override
public String toString() {
final MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper(OmCpuFeatureKey.class);
CodeHelpers.appendValue(helper, "_feature", _feature);
return helper.toString();
}
}
|
[
"ioannischatzis@gmail.com"
] |
ioannischatzis@gmail.com
|
743f6036c4399cc3e593897146b3c3cd8f047dd4
|
de7b67d4f8aa124f09fc133be5295a0c18d80171
|
/workspace_java-src/java-src-test/src/sun/security/x509/InhibitAnyPolicyExtension.java
|
805e74313c48f3b31652a1c9a28513a0fa156057
|
[] |
no_license
|
lin-lee/eclipse_workspace_test
|
adce936e4ae8df97f7f28965a6728540d63224c7
|
37507f78bc942afb11490c49942cdfc6ef3dfef8
|
refs/heads/master
| 2021-05-09T10:02:55.854906
| 2018-01-31T07:19:02
| 2018-01-31T07:19:02
| 119,460,523
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,963
|
java
|
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package sun.security.x509;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Enumeration;
import sun.security.util.Debug;
import sun.security.util.DerOutputStream;
import sun.security.util.DerValue;
import sun.security.util.ObjectIdentifier;
/**
* This class represents the Inhibit Any-Policy Extension.
*
* <p>The inhibit any-policy extension can be used in certificates issued
* to CAs. The inhibit any-policy indicates that the special any-policy
* OID, with the value {2 5 29 32 0}, is not considered an explicit
* match for other certificate policies. The value indicates the number
* of additional certificates that may appear in the path before any-
* policy is no longer permitted. For example, a value of one indicates
* that any-policy may be processed in certificates issued by the sub-
* ject of this certificate, but not in additional certificates in the
* path.
* <p>
* This extension MUST be critical.
* <p>
* The ASN.1 syntax for this extension is:
* <code><pre>
* id-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::= { id-ce 54 }
*
* InhibitAnyPolicy ::= SkipCerts
*
* SkipCerts ::= INTEGER (0..MAX)
* </pre></code>
* @author Anne Anderson
* @version %I%, %G%
* @see CertAttrSet
* @see Extension
*/
public class InhibitAnyPolicyExtension extends Extension
implements CertAttrSet {
private static final Debug debug = Debug.getInstance("certpath");
/**
* Identifier for this attribute, to be used with the
* get, set, delete methods of Certificate, x509 type.
*/
public static final String IDENT = "x509.info.extensions.InhibitAnyPolicy";
/**
* Object identifier for "any-policy"
*/
public static ObjectIdentifier AnyPolicy_Id;
static {
try {
AnyPolicy_Id = new ObjectIdentifier("2.5.29.32.0");
} catch (IOException ioe) {
// Should not happen
}
}
/**
* Attribute names.
*/
public static final String NAME = "InhibitAnyPolicy";
public static final String SKIP_CERTS = "skip_certs";
// Private data members
private int skipCerts = Integer.MAX_VALUE;
// Encode this extension value
private void encodeThis() throws IOException {
DerOutputStream out = new DerOutputStream();
out.putInteger(skipCerts);
this.extensionValue = out.toByteArray();
}
/**
* Default constructor for this object.
*
* @param skipCerts specifies the depth of the certification path.
* Use value of -1 to request unlimited depth.
*/
public InhibitAnyPolicyExtension(int skipCerts) throws IOException {
if (skipCerts < -1)
throw new IOException("Invalid value for skipCerts");
if (skipCerts == -1)
this.skipCerts = Integer.MAX_VALUE;
else
this.skipCerts = skipCerts;
this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;
critical = true;
encodeThis();
}
/**
* Create the extension from the passed DER encoded value of the same.
*
* @param critical criticality flag to use. Must be true for this
* extension.
* @param value a byte array holding the DER-encoded extension value.
* @exception ClassCastException if value is not an array of bytes
* @exception IOException on error.
*/
public InhibitAnyPolicyExtension(Boolean critical, Object value)
throws IOException {
this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;
if (!critical.booleanValue())
throw new IOException("Criticality cannot be false for " +
"InhibitAnyPolicy");
this.critical = critical.booleanValue();
this.extensionValue = (byte[]) value;
DerValue val = new DerValue(this.extensionValue);
if (val.tag != DerValue.tag_Integer)
throw new IOException("Invalid encoding of InhibitAnyPolicy: "
+ "data not integer");
if (val.data == null)
throw new IOException("Invalid encoding of InhibitAnyPolicy: "
+ "null data");
int skipCertsValue = val.getInteger();
if (skipCertsValue < -1)
throw new IOException("Invalid value for skipCerts");
if (skipCertsValue == -1) {
this.skipCerts = Integer.MAX_VALUE;
} else {
this.skipCerts = skipCertsValue;
}
}
/**
* Return user readable form of extension.
*/
public String toString() {
String s = super.toString() + "InhibitAnyPolicy: " + skipCerts + "\n";
return s;
}
/**
* Encode this extension value to the output stream.
*
* @param out the DerOutputStream to encode the extension to.
*/
public void encode(OutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
if (extensionValue == null) {
this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;
critical = true;
encodeThis();
}
super.encode(tmp);
out.write(tmp.toByteArray());
}
/**
* Set the attribute value.
*
* @param name name of attribute to set. Must be SKIP_CERTS.
* @param obj value to which attribute is to be set. Must be Integer
* type.
* @throws IOException on error
*/
public void set(String name, Object obj) throws IOException {
if (name.equalsIgnoreCase(SKIP_CERTS)) {
if (!(obj instanceof Integer))
throw new IOException("Attribute value should be of type Integer.");
int skipCertsValue = ((Integer)obj).intValue();
if (skipCertsValue < -1)
throw new IOException("Invalid value for skipCerts");
if (skipCertsValue == -1) {
skipCerts = Integer.MAX_VALUE;
} else {
skipCerts = skipCertsValue;
}
} else
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:InhibitAnyPolicy.");
encodeThis();
}
/**
* Get the attribute value.
*
* @param name name of attribute to get. Must be SKIP_CERTS.
* @returns value of the attribute. In this case it will be of type
* Integer.
* @throws IOException on error
*/
public Object get(String name) throws IOException {
if (name.equalsIgnoreCase(SKIP_CERTS))
return (new Integer(skipCerts));
else
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:InhibitAnyPolicy.");
}
/**
* Delete the attribute value.
*
* @param name name of attribute to delete. Must be SKIP_CERTS.
* @throws IOException on error. In this case, IOException will always be
* thrown, because the only attribute, SKIP_CERTS, is
* required.
*/
public void delete(String name) throws IOException {
if (name.equalsIgnoreCase(SKIP_CERTS))
throw new IOException("Attribute " + SKIP_CERTS +
" may not be deleted.");
else
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:InhibitAnyPolicy.");
}
/**
* Return an enumeration of names of attributes existing within this
* attribute.
*
* @returns enumeration of elements
*/
public Enumeration getElements() {
AttributeNameEnumeration elements = new AttributeNameEnumeration();
elements.addElement(SKIP_CERTS);
return (elements.elements());
}
/**
* Return the name of this attribute.
*
* @returns name of attribute.
*/
public String getName() {
return (NAME);
}
}
|
[
"lilin@lvmama.com"
] |
lilin@lvmama.com
|
bc3f7942c961d4d7c199e91ff257f23c56c70fa4
|
e8a327e05ccda42a35857c8e9ed2f057fdd1a1a4
|
/kie-nio2-backport/kie-nio2-model/src/main/java/org/kie/commons/java/nio/base/version/VersionAttributes.java
|
e5dc7a0dca82eea947338500a9fc3071aae46f73
|
[
"Apache-2.0"
] |
permissive
|
mswiderski/kie-commons
|
d9e750fd9277b47597148cdd294cca9cef95cc56
|
cff64c07153d5fe34f8c3823f7fe46be7dd12be5
|
refs/heads/master
| 2021-01-23T20:17:09.323357
| 2013-02-06T14:26:48
| 2013-02-14T12:51:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package org.kie.commons.java.nio.base.version;
import java.util.List;
import org.kie.commons.java.nio.file.attribute.BasicFileAttributes;
/**
*
*/
public interface VersionAttributes extends BasicFileAttributes {
List<VersionRecord> history();
}
|
[
"alexandre.porcelli@gmail.com"
] |
alexandre.porcelli@gmail.com
|
4db2b65c6dde47485fdc7d80eb7d5739df6cd8ec
|
1dfa87318ec70f2167894470b703506a85af3117
|
/x-manerger/x-manerger-sys-ui/x-manerger-sys-ui-beetl-tag/src/main/java/com/company/manerger/sys/ui/beetl/tag/ArgumentAware.java
|
650ebcc9e92c5a52ab8b0433f3a1cad41725fa87
|
[] |
no_license
|
huangjian888/jeeweb-mybatis-springboot
|
2d6e9d2f420a89bf6f7f2aca2b1ab31dce6e0095
|
22926faf93f960e02da4a1cad36ed7d8f980b399
|
refs/heads/v3.0-master
| 2023-07-20T11:42:30.526563
| 2019-08-20T07:34:56
| 2019-08-20T07:34:56
| 145,819,401
| 356
| 138
| null | 2023-07-17T20:03:38
| 2018-08-23T07:45:54
|
Java
|
UTF-8
|
Java
| false
| false
| 449
|
java
|
package com.company.manerger.sys.ui.beetl.tag;
import com.company.manerger.sys.ui.beetl.tag.exception.BeetlTagException;
import org.springframework.lang.Nullable;
public interface ArgumentAware {
/**
* Callback hook for nested spring:argument tags to pass their value
* to the parent tag.
* @param argument the result of the nested {@code spring:argument} tag
*/
void addArgument(@Nullable Object argument) throws BeetlTagException;
}
|
[
"465265897@qq.com"
] |
465265897@qq.com
|
68dddf7866b9916178e77dcd9a2ac7660f6eff68
|
b7d5a0595cfb23d16b8e495f7afbd03191543ec5
|
/branches/V1.02/zhdj/src/main/java/cn/com/do1/component/news/hotnewsinfo/model/TbHotNewsPO.java
|
ef96f32272547fcea6dd7b0dd2812ce4e5ee71eb
|
[] |
no_license
|
github188/Dangjian
|
a2a4aa6b875c5fa90c379fcb964ac1cdf25980fc
|
b510eb89c3b2edff9998105e043c4a56dbbe1106
|
refs/heads/master
| 2021-05-27T08:51:16.381332
| 2014-05-20T15:46:20
| 2014-05-20T15:46:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,591
|
java
|
package cn.com.do1.component.news.hotnewsinfo.model;
import cn.com.do1.common.annotation.bean.FormatMask;
import cn.com.do1.common.annotation.bean.PageView;
import cn.com.do1.common.annotation.bean.Validation;
import cn.com.do1.common.annotation.po.LargeObject;
import cn.com.do1.common.framebase.dqdp.IBaseDBVO;
import cn.com.do1.common.util.reflation.ConvertUtil;
/**
* Copyright © 2010 广州市道一信息技术有限公司
* All rights reserved.
* User: ${user}
*/
public class TbHotNewsPO implements IBaseDBVO {
private java.lang.String id ;
@Validation(must=false,length=100,fieldType="pattern",regex="^.*$")
@PageView(showName="title",showType="input",showOrder=1,showLength=100)
private java.lang.String title ;
@Validation(must=false,length=4000,fieldType="pattern",regex="^\\w*$")
@PageView(showName="content",showType="editor",showOrder=2,showLength=4000)
@LargeObject
private String content ;
@Validation(must=false,length=22,fieldType="pattern",regex="^.*$")
@PageView(showName="status",showType="input",showOrder=3,showLength=22)
private java.lang.Long status ;
@Validation(must=false,length=22,fieldType="pattern",regex="^.*$")
@PageView(showName="buyTop",showType="input",showOrder=4,showLength=22)
private java.lang.Long buyTop ;
@Validation(must=false,length=36,fieldType="pattern",regex="^.*$")
@PageView(showName="organizationId",showType="input",showOrder=5,showLength=36)
private java.lang.String organizationId ;
@Validation(must=false,length=200,fieldType="pattern",regex="^.*$")
@PageView(showName="imgPath",showType="input",showOrder=6,showLength=200)
private java.lang.String imgPath ;
@Validation(must=false,length=36,fieldType="pattern",regex="^.*$")
@PageView(showName="pushUserId",showType="input",showOrder=7,showLength=36)
private java.lang.String pushUserId ;
@Validation(must=false,length=7,fieldType="datetime",regex="")
@PageView(showName="pushTime",showType="datetime",showOrder=13,showLength=7)
@FormatMask(type = "date", value = "yyyy-MM-dd HH:mm:ss")
private java.util.Date pushTime ;
@Validation(must=false,length=50,fieldType="pattern",regex="^.*$")
@PageView(showName="createUserId",showType="input",showOrder=9,showLength=50)
private java.lang.String createUserId ;
@Validation(must=false,length=7,fieldType="datetime",regex="")
@PageView(showName="createTime",showType="datetime",showOrder=10,showLength=7)
@FormatMask(type = "date", value = "yyyy-MM-dd HH:mm:ss")
private java.util.Date createTime ;
@Validation(must=false,length=36,fieldType="pattern",regex="^.*$")
@PageView(showName="lastModifyUserId",showType="input",showOrder=11,showLength=36)
private java.lang.String lastModifyUserId ;
@Validation(must=false,length=7,fieldType="datetime",regex="")
@PageView(showName="lastModifyTime",showType="datetime",showOrder=12,showLength=7)
@FormatMask(type = "date", value = "yyyy-MM-dd HH:mm:ss")
private java.util.Date lastModifyTime ;
@Validation(must=false,length=100,fieldType="pattern",regex="^.*$")
@PageView(showName="source",showType="source",showOrder=1,showLength=100)
private java.lang.String source ;
@Validation(must=false,length=100,fieldType="pattern",regex="^.*$")
@PageView(showName="bodyDigest",showType="bodyZaiyao",showOrder=1,showLength=100)
private java.lang.String bodyDigest ;
public java.lang.String getBodyDigest() {
return bodyDigest;
}
public void setBodyDigest(java.lang.String bodyDigest) {
this.bodyDigest = bodyDigest;
}
public java.lang.String getSource() {
return source;
}
public void setSource(java.lang.String source) {
this.source = source;
}
public void setId(java.lang.String id){
this.id=id ;
}
public java.lang.String getId(){
return this.id ;
}
public void setTitle(java.lang.String title){
this.title=title ;
}
public java.lang.String getTitle(){
return this.title ;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public void setStatus(java.lang.Long status){
this.status=status ;
}
public java.lang.Long getStatus(){
return this.status ;
}
public void setBuyTop(java.lang.Long buyTop){
this.buyTop=buyTop ;
}
public java.lang.Long getBuyTop(){
return this.buyTop ;
}
public void setOrganizationId(java.lang.String organizationId){
this.organizationId=organizationId ;
}
public java.lang.String getOrganizationId(){
return this.organizationId ;
}
public void setImgPath(java.lang.String imgPath){
this.imgPath=imgPath ;
}
public java.lang.String getImgPath(){
return this.imgPath ;
}
public void setPushUserId(java.lang.String pushUserId){
this.pushUserId=pushUserId ;
}
public java.lang.String getPushUserId(){
return this.pushUserId ;
}
public void setPushTime(java.util.Date pushTime){
this.pushTime=pushTime ;
}
public void setPushTime(java.lang.String pushTime){
this.pushTime=ConvertUtil.cvStUtildate(pushTime) ;
}
public java.util.Date getPushTime(){
return this.pushTime ;
}
public void setCreateUserId(java.lang.String createUserId){
this.createUserId=createUserId ;
}
public java.lang.String getCreateUserId(){
return this.createUserId ;
}
public void setCreateTime(java.util.Date createTime){
this.createTime=createTime ;
}
public void setCreateTime(java.lang.String createTime){
this.createTime=ConvertUtil.cvStUtildate(createTime) ;
}
public java.util.Date getCreateTime(){
return this.createTime ;
}
public void setLastModifyUserId(java.lang.String lastModifyUserId){
this.lastModifyUserId=lastModifyUserId ;
}
public java.lang.String getLastModifyUserId(){
return this.lastModifyUserId ;
}
public void setLastModifyTime(java.util.Date lastModifyTime){
this.lastModifyTime=lastModifyTime ;
}
public void setLastModifyTime(java.lang.String lastModifyTime){
this.lastModifyTime=ConvertUtil.cvStUtildate(lastModifyTime) ;
}
public java.util.Date getLastModifyTime(){
return this.lastModifyTime ;
}
/**
* 获取数据库中对应的表名
*
* @return
*/
public String _getTableName() {
return "TB_HOT_NEWS";
}
/**
* 获取对应表的主键字段名称
*
* @return
*/
public String _getPKColumnName() {
return "id";
}
/**
* 获取主键值
*
* @return
*/
public String _getPKValue() {
return String.valueOf(id);
}
/**
* 设置主键的值
*
* @return
*/
public void _setPKValue(Object value) {
this.id=(java.lang.String)value;
}
/**
* 重写默认的toString方法,使其调用输出的内容更有意义
*/
public String toString() {
return id+title;
}
}
|
[
"mac@mactekiMacBook-Pro.local"
] |
mac@mactekiMacBook-Pro.local
|
0d6168d401abb61f0885482985fbbe0342382e82
|
5194981697a363648cb049b8176e730cb61cccbd
|
/OCP8Apress/src/chapter11/_12/stream/Test04StringSplitAndConcatenateParallel.java
|
d67555623e2ae667be2c3d7064dbc7fa9ddca363
|
[] |
no_license
|
demirramazan/OCP8
|
1b91d52c98dbf28946dddb87798be8af7a4db0c6
|
ec21bd4c0afba467f1e6084756a090b04a5ffbc8
|
refs/heads/master
| 2020-03-29T02:08:29.972513
| 2018-06-16T19:19:30
| 2018-06-16T19:19:30
| 149,422,202
| 1
| 0
| null | 2018-09-19T09:01:23
| 2018-09-19T09:01:22
| null |
UTF-8
|
Java
| false
| false
| 614
|
java
|
package chapter11._12.stream;
import java.util.Arrays;
class StringConcatenator2 {
public static String result = "";
public static void concatStr(String str) {
result = result + " " + str;
}
}
class Test04StringSplitAndConcatenateParallel {
public static void main(String[] args) {
String words[] = "the quick brown fox jumps over the lazy dog".split(" ");
Arrays.stream(words).parallel().forEach(StringConcatenator2::concatStr);
System.out.println(StringConcatenator2.result);
// When the stream is parallel, the task is split into multiple
// sub-tasks and different threads execute it.
}
}
|
[
"erguder.levent@gmail.com"
] |
erguder.levent@gmail.com
|
5ac515c41a22cfdd5f246602a533874e9143c6d1
|
778da6dbb2eb27ace541338d0051f44353c3f924
|
/src/main/java/com/espertech/esper/epl/agg/service/AggregationServiceFactoryServiceImpl.java
|
a5b5078f3b5978f2daba7254fca1e3784150ed06
|
[] |
no_license
|
jiji87432/ThreadForEsperAndBenchmark
|
daf7188fb142f707f9160173d48c2754e1260ec7
|
fd2fc3579b3dd4efa18e079ce80d3aee98bf7314
|
refs/heads/master
| 2021-12-12T02:15:18.810190
| 2016-12-01T12:15:01
| 2016-12-01T12:15:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,925
|
java
|
/*
* *************************************************************************************
* Copyright (C) 2006-2015 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
* *************************************************************************************
*/
package com.espertech.esper.epl.agg.service;
import com.espertech.esper.client.annotation.Hint;
import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair;
import com.espertech.esper.epl.agg.access.AggregationAgent;
import com.espertech.esper.epl.agg.util.AggregationLocalGroupByPlan;
import com.espertech.esper.epl.expression.core.ExprEvaluator;
import com.espertech.esper.epl.expression.core.ExprNode;
import com.espertech.esper.epl.expression.core.ExprValidationException;
import com.espertech.esper.epl.spec.IntoTableSpec;
import com.espertech.esper.epl.table.mgmt.TableColumnMethodPair;
import com.espertech.esper.epl.table.mgmt.TableMetadata;
import com.espertech.esper.epl.variable.VariableService;
public class AggregationServiceFactoryServiceImpl implements AggregationServiceFactoryService {
public final static AggregationServiceFactoryService DEFAULT_FACTORY = new AggregationServiceFactoryServiceImpl();
public AggregationServiceFactory getNullAggregationService() {
return AggregationServiceNullFactory.AGGREGATION_SERVICE_NULL_FACTORY;
}
public AggregationServiceFactory getNoGroupNoAccess(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr) {
return new AggSvcGroupAllNoAccessFactory(evaluatorsArr, aggregatorsArr, null);
}
public AggregationServiceFactory getNoGroupAccessOnly(AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggSpecs, boolean join) {
return new AggSvcGroupAllAccessOnlyFactory(pairs, accessAggSpecs, join);
}
public AggregationServiceFactory getNoGroupAccessMixed(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggregations, boolean join) {
return new AggSvcGroupAllMixedAccessFactory(evaluatorsArr, aggregatorsArr, null, pairs, accessAggregations, join);
}
public AggregationServiceFactory getGroupedNoReclaimNoAccess(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, Object groupKeyBinding) {
return new AggSvcGroupByNoAccessFactory(evaluatorsArr, aggregatorsArr, groupKeyBinding);
}
public AggregationServiceFactory getGroupNoReclaimAccessOnly(AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggSpecs, Object groupKeyBinding, boolean join) {
return new AggSvcGroupByAccessOnlyFactory(pairs, accessAggSpecs, groupKeyBinding, join);
}
public AggregationServiceFactory getGroupNoReclaimMixed(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggregations, boolean join, Object groupKeyBinding) {
return new AggSvcGroupByMixedAccessFactory(evaluatorsArr, aggregatorsArr, groupKeyBinding, pairs, accessAggregations, join);
}
public AggregationServiceFactory getGroupReclaimAged(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, Hint reclaimGroupAged, Hint reclaimGroupFrequency, VariableService variableService, AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggregations, boolean join, Object groupKeyBinding, String optionalContextName) throws ExprValidationException{
return new AggSvcGroupByReclaimAgedFactory(evaluatorsArr, aggregatorsArr, groupKeyBinding, reclaimGroupAged, reclaimGroupFrequency, variableService, pairs, accessAggregations, join, optionalContextName);
}
public AggregationServiceFactory getGroupReclaimNoAccess(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggregations, boolean join, Object groupKeyBinding) {
return new AggSvcGroupByRefcountedNoAccessFactory(evaluatorsArr, aggregatorsArr, groupKeyBinding);
}
public AggregationServiceFactory getGroupReclaimMixable(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggregations, boolean join, Object groupKeyBinding) {
return new AggSvcGroupByRefcountedWAccessFactory(evaluatorsArr, aggregatorsArr, groupKeyBinding, pairs, accessAggregations, join);
}
public AggregationServiceFactory getGroupReclaimMixableRollup(ExprEvaluator[] evaluatorsArr, AggregationMethodFactory[] aggregatorsArr, AggregationAccessorSlotPair[] pairs, AggregationStateFactory[] accessAggregations, boolean join, Object groupKeyBinding, AggregationGroupByRollupDesc groupByRollupDesc) {
return new AggSvcGroupByRefcountedWAccessRollupFactory(evaluatorsArr, aggregatorsArr, groupKeyBinding, pairs, accessAggregations, join, groupByRollupDesc);
}
public AggregationServiceFactory getGroupWBinding(TableMetadata tableMetadata, TableColumnMethodPair[] methodPairs, AggregationAccessorSlotPair[] accessorPairs, boolean join, IntoTableSpec bindings, int[] targetStates, ExprNode[] accessStateExpr, AggregationAgent[] agents, AggregationGroupByRollupDesc groupByRollupDesc) {
return new AggSvcGroupByWTableFactory(tableMetadata, methodPairs, accessorPairs, join, targetStates, accessStateExpr, agents, groupByRollupDesc);
}
public AggregationServiceFactory getNoGroupWBinding(AggregationAccessorSlotPair[] accessors, boolean join, TableColumnMethodPair[] methodPairs, String tableName, int[] targetStates, ExprNode[] accessStateExpr, AggregationAgent[] agents) {
return new AggSvcGroupAllMixedAccessWTableFactory(accessors, join, methodPairs, tableName, targetStates, accessStateExpr, agents);
}
public AggregationServiceFactory getNoGroupLocalGroupBy(boolean join, AggregationLocalGroupByPlan localGroupByPlan, Object groupKeyBinding) {
return new AggSvcGroupAllLocalGroupByFactory(join, localGroupByPlan, groupKeyBinding);
}
public AggregationServiceFactory getGroupLocalGroupBy(boolean join, AggregationLocalGroupByPlan localGroupByPlan, Object groupKeyBinding) {
return new AggSvcGroupByLocalGroupByFactory(join, localGroupByPlan, groupKeyBinding);
}
}
|
[
"qinjie2012@163.com"
] |
qinjie2012@163.com
|
b52688cfc0a12286181e226b2cc96ae99e79785d
|
327d615dbf9e4dd902193b5cd7684dfd789a76b1
|
/base_source_from_JADX/sources/com/google/android/gms/internal/ads/zzbio.java
|
a6ecd1dd3be925c89aac26b2a7d8aabc9aafb484
|
[] |
no_license
|
dnosauro/singcie
|
e53ce4c124cfb311e0ffafd55b58c840d462e96f
|
34d09c2e2b3497dd452246b76646b3571a18a100
|
refs/heads/main
| 2023-01-13T23:17:49.094499
| 2020-11-20T10:46:19
| 2020-11-20T10:46:19
| 314,513,307
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.google.android.gms.internal.ads;
import com.google.android.gms.ads.internal.zzb;
public final class zzbio implements zzepf<zzb> {
private final zzbim zzfou;
public zzbio(zzbim zzbim) {
this.zzfou = zzbim;
}
public final /* synthetic */ Object get() {
return (zzb) zzepl.zza(this.zzfou.zzahu(), "Cannot return null from a non-@Nullable @Provides method");
}
}
|
[
"dno_sauro@yahoo.it"
] |
dno_sauro@yahoo.it
|
33c6e77b243c49f37c5cf6d8a4f110e167140476
|
6be39fc2c882d0b9269f1530e0650fd3717df493
|
/weixin反编译/sources/com/tencent/mm/f/a/u.java
|
d9622f6b473b2326255ff2d512fc6c58ac5807a7
|
[] |
no_license
|
sir-deng/res
|
f1819af90b366e8326bf23d1b2f1074dfe33848f
|
3cf9b044e1f4744350e5e89648d27247c9dc9877
|
refs/heads/master
| 2022-06-11T21:54:36.725180
| 2020-05-07T06:03:23
| 2020-05-07T06:03:23
| 155,177,067
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 338
|
java
|
package com.tencent.mm.f.a;
import com.tencent.mm.sdk.b.b;
public final class u extends b {
public a foF;
public static final class a {
public int mode;
}
public u() {
this((byte) 0);
}
private u(byte b) {
this.foF = new a();
this.xmE = false;
this.frD = null;
}
}
|
[
"denghailong@vargo.com.cn"
] |
denghailong@vargo.com.cn
|
3b5732cc9ac7408e42292867a61a102b5467bd62
|
1f47217ad740b03b5ca7c965a01788dee3c0fbf7
|
/JLibrary06/lib/XML/JAXB/jaxb/src/com/sun/xml/bind/api/package-info.java
|
864c4449e0133c42d80d356d5475c2baf1bf83f8
|
[] |
no_license
|
amitabha66/JLibrary06
|
bee7fddca01188991af968a5678fe1d89dce7ee3
|
f19056cee7a88318315f9c25f8618aface8f0683
|
refs/heads/master
| 2021-01-19T07:03:19.133486
| 2016-06-23T16:41:59
| 2016-06-23T16:41:59
| 61,802,950
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 500
|
java
|
/**
* <h1>Runtime API for the JAX-WS RI</h1>.
*
* This API is designed for the use by the JAX-WS RI runtime. The API is is subject to
* change without notice.
*
* <p>
* In an container environment, such as in J2SE/J2EE, if a new version with
* a modified runtime API is loaded into a child class loader, it will still be bound
* against the old runtime API in the base class loader.
*
* <p>
* So the compatibility of this API has to be managed carefully.
*/
package com.sun.xml.bind.api;
|
[
"amitabha66@gmail.com"
] |
amitabha66@gmail.com
|
a85a87b59fe95975198384887a4617478a07ef03
|
b9a51deb97fc6a2dffcc7f36f8aa121541fd1608
|
/src/main/java/org/docx4j/math/CTEqArrPr.java
|
74d9d95b398045c9fa4e8be057f585ab8da41e2f
|
[
"Apache-2.0"
] |
permissive
|
vansuca/docx4j
|
c592ea04e5736edef46a4a3e7ffab84cbc0b206f
|
72d061bd2606b58b8de7b36d203b58232a552e49
|
refs/heads/master
| 2020-12-30T19:23:31.287757
| 2012-11-28T02:08:47
| 2012-11-28T02:08:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,432
|
java
|
/*
* Copyright 2010-2012, Plutext Pty Ltd.
*
* This file is part of pptx4j, a component of docx4j.
docx4j is 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.docx4j.math;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.ppp.Child;
/**
* <p>Java class for CT_EqArrPr complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CT_EqArrPr">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="baseJc" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_YAlign" minOccurs="0"/>
* <element name="maxDist" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_OnOff" minOccurs="0"/>
* <element name="objDist" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_OnOff" minOccurs="0"/>
* <element name="rSpRule" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_SpacingRule" minOccurs="0"/>
* <element name="rSp" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_UnSignedInteger" minOccurs="0"/>
* <element name="ctrlPr" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_CtrlPr" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CT_EqArrPr", propOrder = {
"baseJc",
"maxDist",
"objDist",
"rSpRule",
"rSp",
"ctrlPr"
})
public class CTEqArrPr
implements Child
{
protected CTYAlign baseJc;
protected CTOnOff maxDist;
protected CTOnOff objDist;
protected CTSpacingRule rSpRule;
protected CTUnSignedInteger rSp;
protected CTCtrlPr ctrlPr;
@XmlTransient
private Object parent;
/**
* Gets the value of the baseJc property.
*
* @return
* possible object is
* {@link CTYAlign }
*
*/
public CTYAlign getBaseJc() {
return baseJc;
}
/**
* Sets the value of the baseJc property.
*
* @param value
* allowed object is
* {@link CTYAlign }
*
*/
public void setBaseJc(CTYAlign value) {
this.baseJc = value;
}
/**
* Gets the value of the maxDist property.
*
* @return
* possible object is
* {@link CTOnOff }
*
*/
public CTOnOff getMaxDist() {
return maxDist;
}
/**
* Sets the value of the maxDist property.
*
* @param value
* allowed object is
* {@link CTOnOff }
*
*/
public void setMaxDist(CTOnOff value) {
this.maxDist = value;
}
/**
* Gets the value of the objDist property.
*
* @return
* possible object is
* {@link CTOnOff }
*
*/
public CTOnOff getObjDist() {
return objDist;
}
/**
* Sets the value of the objDist property.
*
* @param value
* allowed object is
* {@link CTOnOff }
*
*/
public void setObjDist(CTOnOff value) {
this.objDist = value;
}
/**
* Gets the value of the rSpRule property.
*
* @return
* possible object is
* {@link CTSpacingRule }
*
*/
public CTSpacingRule getRSpRule() {
return rSpRule;
}
/**
* Sets the value of the rSpRule property.
*
* @param value
* allowed object is
* {@link CTSpacingRule }
*
*/
public void setRSpRule(CTSpacingRule value) {
this.rSpRule = value;
}
/**
* Gets the value of the rSp property.
*
* @return
* possible object is
* {@link CTUnSignedInteger }
*
*/
public CTUnSignedInteger getRSp() {
return rSp;
}
/**
* Sets the value of the rSp property.
*
* @param value
* allowed object is
* {@link CTUnSignedInteger }
*
*/
public void setRSp(CTUnSignedInteger value) {
this.rSp = value;
}
/**
* Gets the value of the ctrlPr property.
*
* @return
* possible object is
* {@link CTCtrlPr }
*
*/
public CTCtrlPr getCtrlPr() {
return ctrlPr;
}
/**
* Sets the value of the ctrlPr property.
*
* @param value
* allowed object is
* {@link CTCtrlPr }
*
*/
public void setCtrlPr(CTCtrlPr value) {
this.ctrlPr = value;
}
/**
* Gets the parent object in the object tree representing the unmarshalled xml document.
*
* @return
* The parent object.
*/
public Object getParent() {
return this.parent;
}
public void setParent(Object parent) {
this.parent = parent;
}
/**
* This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
*
* @param parent
* The parent object in the object tree.
* @param unmarshaller
* The unmarshaller that generated the instance.
*/
public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
setParent(parent);
}
}
|
[
"jason@plutext.org"
] |
jason@plutext.org
|
6218dafdd86ee47c5166d4406ab791a3c2164d96
|
8411d30dc751956554fd97c70b48b7415d148de4
|
/src/test/java/org/kasource/commons/reflection/filter/fields/FieldClassFieldFilterTest.java
|
b578df99635ea344ebbaec9ac08049a295cea270
|
[] |
no_license
|
wigforss/Ka-Commons
|
66b7d471271aebac0334b7a6ab6de11bd24f1a1c
|
d3f33a631a55c9f6de3d606cb2b7526535aa3498
|
refs/heads/master
| 2021-01-20T15:37:16.314765
| 2014-01-14T23:13:15
| 2014-01-14T23:13:15
| 4,138,920
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,609
|
java
|
package org.kasource.commons.reflection.filter.fields;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Field;
import org.easymock.classextension.EasyMock;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kasource.commons.reflection.filter.classes.ClassFilter;
import org.unitils.UnitilsJUnit4TestClassRunner;
import org.unitils.easymock.EasyMockUnitils;
import org.unitils.easymock.annotation.Mock;
import org.unitils.inject.annotation.InjectIntoByType;
import org.unitils.inject.annotation.TestedObject;
@RunWith(UnitilsJUnit4TestClassRunner.class)
public class FieldClassFieldFilterTest {
@InjectIntoByType
@Mock
private ClassFilter classFilter;
@TestedObject
private FieldClassFieldFilter filter = new FieldClassFieldFilter(classFilter);
@Test
public void passTrue() throws SecurityException, NoSuchFieldException {
EasyMock.expect(classFilter.passFilter(int.class)).andReturn(true);
EasyMockUnitils.replay();
Field field = MyClass.class.getField("number");
assertTrue(filter.passFilter(field));
}
@Test
public void passFalse() throws SecurityException, NoSuchFieldException {
EasyMock.expect(classFilter.passFilter(int.class)).andReturn(false);
EasyMockUnitils.replay();
Field field = MyClass.class.getField("number");
assertFalse(filter.passFilter(field));
}
private static class MyClass {
@SuppressWarnings("unused")
public int number;
}
}
|
[
"rikard.wigforss@gmail.com"
] |
rikard.wigforss@gmail.com
|
3a29fca6b24c89818d4fa7cf1667f2a68e2a99fb
|
cd764337c772013c6eb6429615c982be0967eb96
|
/BruceCoreLib/src/main/java/com/bruce/core/net/callback/StringCallback.java
|
434d6b28b1d7da9b5cc0886ab91b06c3803e86ba
|
[
"Apache-2.0"
] |
permissive
|
weileng11/BruceTestDemo
|
166abd9b1c0852bf89483b5d297cda2594ced9f9
|
2eb9c05f255a1166251e73023be383ab908b8722
|
refs/heads/master
| 2021-01-21T12:20:21.094992
| 2017-09-14T02:58:51
| 2017-09-14T02:58:51
| 102,065,790
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package com.bruce.core.net.callback;
import java.io.IOException;
import okhttp3.Response;
/**
* Created by zhy on 15/12/14.
*/
public abstract class StringCallback extends Callback<String>
{
/**
* 以String 方式返回回调
* @param response
* @return
* @throws IOException
*/
@Override
public String parseNetworkResponse(Response response) throws IOException
{
return response.body().string();
}
}
|
[
"275762645@qq.com"
] |
275762645@qq.com
|
f3d37f2e2c242b21a218c119386e08166ef865d6
|
5aa4d6e75dff32e54ccaa4b10709e7846721af05
|
/samples/j2ee/snippets/com.ibm.sbt.automation.test/src/main/java/com/ibm/sbt/test/js/authentication/OAuth20Popup.java
|
a841332fde1d9ac4f41bf20c48f4ce3117eba5a9
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gnuhub/SocialSDK
|
6bc49880e34c7c02110b7511114deb8abfdee924
|
02cc3ac4d131b7a094f6983202c1b5e0043b97eb
|
refs/heads/master
| 2021-01-16T20:08:07.509051
| 2014-07-09T08:53:03
| 2014-07-09T08:53:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,385
|
java
|
/*
* � Copyright IBM Corp. 2013
*
* 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.sbt.test.js.authentication;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.ibm.sbt.automation.core.test.BaseAuthServiceTest;
/**
* @author mwallace
*
* @date 6 Mar 2013
*/
public class OAuth20Popup extends BaseAuthServiceTest {
@Test
public void testOAuth20AutoDetect() {
setAuthType(AuthType.AUTO_DETECT);
boolean result = checkExpected("Authentication_API_OAuth20Popup", "Successfully logged in");
assertTrue(getExpectedErrorMsg(), result);
}
@Test
public void testOAuth20() {
setAuthType(AuthType.OAUTH10);
boolean result = checkExpected("Authentication_API_OAuth20_Popup", "Successfully logged in");
assertTrue(getExpectedErrorMsg(), result);
}
}
|
[
"LORENZOB@ie.ibm.com"
] |
LORENZOB@ie.ibm.com
|
1d33e409989d656b4a77f1450d3b501cca1f8985
|
2d53d6f8d3e0e389bba361813e963514fdef3950
|
/Sql_injection/s02/CWE89_SQL_Injection__Environment_executeQuery_81_goodG2B.java
|
fdf9d686bbf69573b13d30c4f42869f9b9f6ef62
|
[] |
no_license
|
apobletts/ml-testing
|
6a1b95b995fdfbdd68f87da5f98bd969b0457234
|
ee6bb9fe49d9ec074543b7ff715e910110bea939
|
refs/heads/master
| 2021-05-10T22:55:57.250937
| 2018-01-26T20:50:15
| 2018-01-26T20:50:15
| 118,268,553
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,800
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__Environment_executeQuery_81_goodG2B.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-81_goodG2B.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded string
* Sinks: executeQuery
* GoodSink: Use prepared statement and executeQuery (properly)
* BadSink : data concatenated into SQL statement used in executeQuery(), which could result in SQL Injection
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE89_SQL_Injection.s02;
import testcasesupport.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.logging.Level;
public class CWE89_SQL_Injection__Environment_executeQuery_81_goodG2B extends CWE89_SQL_Injection__Environment_executeQuery_81_base
{
public void action(String data ) throws Throwable
{
Connection dbConnection = null;
Statement sqlStatement = null;
ResultSet resultSet = null;
try
{
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statement used in executeQuery(), which could result in SQL Injection */
resultSet = sqlStatement.executeQuery("select * from users where name='"+data+"'");
IO.writeLine(resultSet.getRow()); /* Use ResultSet in some way */
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (resultSet != null)
{
resultSet.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql);
}
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
}
|
[
"anna.pobletts@praetorian.com"
] |
anna.pobletts@praetorian.com
|
a1cf4f49e9473d58c2b16a51490408faa8030107
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/lakeformation/src/main/java/com/huaweicloud/sdk/lakeformation/v1/model/ListDatabaseNamesRequest.java
|
3c2d5c1c93307f9b84eba29fceab1cc2ea20e597
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 3,214
|
java
|
package com.huaweicloud.sdk.lakeformation.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* Request Object
*/
public class ListDatabaseNamesRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "instance_id")
private String instanceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "catalog_name")
private String catalogName;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "database_pattern")
private String databasePattern;
public ListDatabaseNamesRequest withInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* 实例Id
* @return instanceId
*/
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public ListDatabaseNamesRequest withCatalogName(String catalogName) {
this.catalogName = catalogName;
return this;
}
/**
* catalog名字
* @return catalogName
*/
public String getCatalogName() {
return catalogName;
}
public void setCatalogName(String catalogName) {
this.catalogName = catalogName;
}
public ListDatabaseNamesRequest withDatabasePattern(String databasePattern) {
this.databasePattern = databasePattern;
return this;
}
/**
* 数据库名字通配符
* @return databasePattern
*/
public String getDatabasePattern() {
return databasePattern;
}
public void setDatabasePattern(String databasePattern) {
this.databasePattern = databasePattern;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListDatabaseNamesRequest that = (ListDatabaseNamesRequest) obj;
return Objects.equals(this.instanceId, that.instanceId) && Objects.equals(this.catalogName, that.catalogName)
&& Objects.equals(this.databasePattern, that.databasePattern);
}
@Override
public int hashCode() {
return Objects.hash(instanceId, catalogName, databasePattern);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListDatabaseNamesRequest {\n");
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
sb.append(" catalogName: ").append(toIndentedString(catalogName)).append("\n");
sb.append(" databasePattern: ").append(toIndentedString(databasePattern)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
4605049f92a116e725c1f7e4c2f24cecfa3b00da
|
5e7bc3cbaceaba8be2cb9de951198c5283844173
|
/super/PCore/src/main/java/com/fast/dev/core/mvc/MVCResponseConfiguration.java
|
4470374f2fdd9616e32fb34dd78b37cbd55df843
|
[] |
no_license
|
lianshufeng/Fast
|
abbb162db05b4b0ece3db60a7eea0c38c686462a
|
0b29400c2ec88db033729e9dd645db9aa792d06f
|
refs/heads/master
| 2022-07-08T23:30:13.190635
| 2021-05-26T05:41:10
| 2021-05-26T05:41:10
| 130,854,753
| 9
| 1
| null | 2022-06-25T07:26:27
| 2018-04-24T12:58:53
|
Java
|
UTF-8
|
Java
| false
| false
| 2,222
|
java
|
package com.fast.dev.core.mvc;
import com.fast.dev.core.endpoints.SuperEndpoints;
import com.fast.dev.core.util.result.InvokerExceptionResolver;
import com.fast.dev.core.util.result.InvokerResult;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
@Configuration
public class MVCResponseConfiguration {
/**
* 通用的异常捕获
*
* @return
*/
@Bean
@ConditionalOnMissingBean
public InvokerExceptionResolver invokerExceptionResolver() {
return new InvokerExceptionResolver();
}
@Bean
public ResponseBodyAdvice responseBodyAdvice() {
return new UserApiResponseBodyAdvice();
}
@RestControllerAdvice
public class UserApiResponseBodyAdvice implements ResponseBodyAdvice<Object> {
@Override
public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) {
return true;
}
@Override
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
if (body instanceof InvokerResult) {
return body;
}
String path = request.getURI().getPath();
return StringUtils.hasText(path) && (path.indexOf("manager") > -1 || path.indexOf(SuperEndpoints.DefaultEndPointName) > -1 || path.indexOf("openapi") > -1) ? body : InvokerResult.notNull(body);
}
}
}
|
[
"251708339@qq.com"
] |
251708339@qq.com
|
39fed9ac0e820883427296f470ce2fea3c2f70dc
|
b9bfebe568f1afd9b90f83f3067e2aa1f266a8ee
|
/FlyweightPattern/src/zrc/flyweightpattern/ConcreteWebSite.java
|
ae90d587dc554073ac3234edd30fa519f1a3a2a8
|
[] |
no_license
|
ZrcLeibniz/Java
|
fa7c737840d33e572e5d8d87951b6ccd609a38af
|
cfc3119712844dd8856009101575c819874d89f0
|
refs/heads/master
| 2023-06-21T01:49:48.132730
| 2021-07-23T07:07:42
| 2021-07-23T07:07:42
| 267,491,828
| 0
| 0
| null | 2020-10-13T02:18:30
| 2020-05-28T04:20:10
|
Java
|
GB18030
|
Java
| false
| false
| 320
|
java
|
package zrc.flyweightpattern;
public class ConcreteWebSite extends WebSite {
private String type = "";
@Override
public void use(User user) {
System.out.println("网站的发布形式为:" + type + "目前是" + user + "在用");
}
public ConcreteWebSite(String type) {
super();
this.type = type;
}
}
|
[
"2834511920@qq.com"
] |
2834511920@qq.com
|
1fbe5fb1ddfb221a7c6af4620a9794fa59ec6b01
|
128a75c5455097d5cfc33628433f2a8d49e826a7
|
/tools/substance-tools/src/main/java/org/pushingpixels/tools/substance/flamingo/docrobot/skins/Twilight.java
|
9762aa8cfa29f7fe0609ad2f5fcf38c65cff0565
|
[
"BSD-3-Clause"
] |
permissive
|
ankaufma/radiance
|
ac280665939c46b4017ed79ca6c0b212965939b0
|
536d42b0484a7d153069516ea6027b41739f65f9
|
refs/heads/master
| 2020-03-27T01:25:36.310738
| 2018-08-22T01:49:35
| 2018-08-22T01:49:35
| 145,709,324
| 0
| 0
|
BSD-3-Clause
| 2018-08-22T12:57:23
| 2018-08-22T12:57:23
| null |
UTF-8
|
Java
| false
| false
| 2,128
|
java
|
/*
* Copyright (c) 2005-2018 Substance Kirill Grouchnikov. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* o 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.
*
* o Neither the name of Substance Kirill Grouchnikov nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.pushingpixels.tools.substance.flamingo.docrobot.skins;
import org.pushingpixels.substance.api.skin.TwilightSkin;
import org.pushingpixels.tools.substance.flamingo.docrobot.SkinRobot;
/**
* Screenshot robot for {@link TwilightSkin}.
*
* @author Kirill Grouchnikov
*/
public class Twilight extends SkinRobot {
/**
* Creates the screenshot robot.
*/
public Twilight() {
super(
new TwilightSkin(),
"/Users/kirillg/Projects/substance-flamingo/www/images/screenshots/skins/twilight");
}
}
|
[
"kirill.grouchnikov@gmail.com"
] |
kirill.grouchnikov@gmail.com
|
6ceeba0b0ae3b8cdd7646917dc780a17538d0100
|
2e30d10ba2d1013329f1b0f86df4bdfd052a83e2
|
/src/com/bit2016/paint/main/PaintApp.java
|
8acedc7ce87d7523b918a82627b8310060528551
|
[] |
no_license
|
splendorbass/chapter02-3
|
fdc7b84c4f5d0c32ecfc4d56f263593f79e069e4
|
ea33f0b4c78f6553649738e53bb41a0be3c3b417
|
refs/heads/master
| 2021-01-18T13:24:10.127663
| 2016-09-21T05:56:42
| 2016-09-21T05:56:42
| 68,582,115
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,443
|
java
|
package com.bit2016.paint.main;
import com.bit2016.paint.i.Drawable;
import com.bit2016.paint.i.Resizable;
import com.bit2016.paint.point.ColorPoint;
import com.bit2016.paint.point.Point;
import com.bit2016.paint.shape.Circle;
import com.bit2016.paint.shape.Rectangle;
import com.bit2016.paint.shape.Shape;
import com.bit2016.paint.shape.Triangle;
public class PaintApp {
public static void main(String[] args) {
Point point = new Point();
point.setX(100);
point.setY(1000);
point.show();
Point point2 = new Point(200 , 200);
point2.show(true);
point2.show(false);
Point point3 = new ColorPoint(50, 50, "red");
point3.show();
point3.show(false);
point3.show(true);
Drawable rectangle = new Rectangle();
draw( rectangle );
draw( new Circle() );
draw( new Triangle() );
draw( new Rectangle() );
draw( new ColorPoint(200,100,"white") );
resize( new Circle( 10 ) );
// instanceof test
Circle c10 = new Circle();
System.out.println( c10 instanceof Circle );
// 오류 instanceof 는 상속관계에 있는 클래스만 확인할 수 있다.
//System.out.println( c10 instanceof Rectangle );
System.out.println( c10 instanceof Shape );
// instanceof는 모든 인터페이스에 구현관계를 확인할수 있다.
System.out.println( c10 instanceof Drawable );
System.out.println( c10 instanceof Resizable );
Rectangle rect = new Rectangle();
System.out.println( rect instanceof Rectangle );
System.out.println( rect instanceof Shape );
System.out.println( rect instanceof Drawable );
System.out.println( rect instanceof Resizable );
resize2( new Rectangle() );
// Shape circle = new Circle();
// //circle.draw();
// draw(circle);
//
// Shape triangle = new Triangle();
// triangle.draw();
//
// draw( new Pentagon() );
}
public static void draw( Drawable drawable ){
drawable.draw();
}
public static void resize2( Drawable drawable ){
if( drawable instanceof Resizable == false){
return;
}
Resizable re = (Resizable)drawable;
re.resize( 0.8 );
}
public static void resize( Resizable resizable){
Shape shape = (Shape)resizable;
double area = shape.calculateArea();
System.out.println(area);
resizable.resize(0.5);
}
// public static void draw( Shape shape ){
// shape.draw();
//
// }
}
|
[
"bit-user@bit"
] |
bit-user@bit
|
1cf12602235b2a069a2889f380be22a2afc55bb8
|
9c6d2de9e85c679c9b9bae0c91f84fae0d410053
|
/2015-02/Individual Projects/Grupo 1/Proyecto Instancia 2/Generador/generado/androidApplication/app/src/main/java/co/edu/uniandes/proyectoautomatizacion/pojo/ImagenSliderItem.java
|
acb98939c5fc360c4feccba47bdd10ec55f5e11a
|
[] |
no_license
|
phillipus85/ETLMetricsDataset
|
902b526900b8c91889570b15538fa92df0db980f
|
7756381f9d580911b1dff9048f3cff002b110b19
|
refs/heads/master
| 2021-06-21T12:02:38.368652
| 2017-07-12T05:13:21
| 2017-07-12T05:13:21
| 79,398,957
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
package co.edu.uniandes.proyectoautomatizacion.pojo;
import java.io.Serializable;
/**
* Created by juandavid on 5/8/15.
*/
public class ImagenSliderItem implements Serializable {
private String imagen;
private String url;
private String tipo;
public String getImagen() {
return imagen;
}
public void setImagen(String imagen) {
this.imagen = imagen;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTipo() {
return tipo;
}
public void setTipo(String tipo) {
this.tipo = tipo;
}
}
|
[
"n.bonet2476@uniandes.edu.co"
] |
n.bonet2476@uniandes.edu.co
|
9a53c4946c1a48dc9e3ccbf349b7d98bc80ab4bd
|
25052216308feeab27f677595a8c0a1dad7829cc
|
/core/src/main/java/com/git/hui/fix/core/endpoint/BasicHttpServer.java
|
c4eecdbd3abf4b93d18e0cd4015a6a14b39d633d
|
[] |
no_license
|
hwthwt/quick-fix
|
c6cf340a6c39078a683c074ea3181975beee3961
|
af8e91d665b0927cd98fb71af0b7d67f99a83f0f
|
refs/heads/master
| 2020-07-08T06:32:20.842315
| 2019-08-19T09:54:50
| 2019-08-19T09:54:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,268
|
java
|
package com.git.hui.fix.core.endpoint;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.*;
/**
* Created by @author yihui in 13:46 18/12/30.
*/
public class BasicHttpServer {
private static ExecutorService bootstrapExecutor = Executors.newSingleThreadExecutor();
private static ExecutorService taskExecutor;
private static final String PORT_NAME = "quick.fix.port";
static void startHttpServer() {
int nThreads = Runtime.getRuntime().availableProcessors();
taskExecutor =
new ThreadPoolExecutor(nThreads, nThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(100),
new ThreadPoolExecutor.DiscardPolicy());
int port = Integer.parseInt(System.getProperty(PORT_NAME, "9999"));
while (true) {
try {
ServerSocket serverSocket = new ServerSocket(port);
bootstrapExecutor.submit(new ServerThread(serverSocket));
System.out.println("FixEndpoint is : " + port);
break;
} catch (Exception e) {
try {
//重试
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
}
}
}
bootstrapExecutor.shutdown();
}
private static class ServerThread implements Runnable {
private ServerSocket serverSocket;
public ServerThread(ServerSocket s) throws IOException {
this.serverSocket = s;
}
@Override
public void run() {
while (true) {
try {
Socket socket = this.serverSocket.accept();
HttpTask eventTask = new HttpTask(socket);
taskExecutor.submit(eventTask);
} catch (Exception e) {
e.printStackTrace();
try {
TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
}
}
}
}
}
}
|
[
"bangzewu@126.com"
] |
bangzewu@126.com
|
839ec8ac295612857d19aa168295ce2ab47df53c
|
f26c4ce1736cbd8763a66563a8d7b77175a669f8
|
/src/main/java/com/lzf/code/babasport/service/ImgService.java
|
046ebd75a978a9b76eb9aa89a978f89bc643efea
|
[] |
no_license
|
15706058532/docker-maven-spring-boot-demo
|
a299cb2ab498ecfcd24b5b5e188a7f536fc76882
|
293a92b3245480d7ca53ce63e63b0f16cffdf103
|
refs/heads/master
| 2020-04-13T05:57:32.903433
| 2018-12-24T17:11:16
| 2018-12-24T17:11:16
| 163,007,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 175
|
java
|
package com.lzf.code.babasport.service;
/**
* 写点注释
* <br/>
* Created in 2018-12-22 20:08:15
* <br/>
*
* @author Li zhenfeng
*/
public interface ImgService {
}
|
[
"15706058532@163.com"
] |
15706058532@163.com
|
53bd5620e6795a160b146a716c31ee3e613ce06e
|
4019dea517d181c3b6b074bbf58c544160763c15
|
/connect-file-pulse-api/src/main/java/io/streamthoughts/kafka/connect/filepulse/source/StateListener.java
|
0b98d085634aa3fc96eba297d20a42f4551ac77a
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
imperio-wxm/kafka-connect-file-pulse
|
0001ad168a7630b4fffeeec7eed982a8ece794e0
|
cfcec16e5ad4c13c1bd2ef3d6063fb754dd3ab04
|
refs/heads/master
| 2021-02-15T07:40:35.484231
| 2020-01-24T11:52:35
| 2020-01-24T12:20:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,066
|
java
|
/*
* Copyright 2019 StreamThoughts.
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.streamthoughts.kafka.connect.filepulse.source;
interface StateListener {
/**
* This method is invoked when a file is scheduled by the task.
* @see FileRecordsPollingConsumer
*
* @param context the file context.
*/
void onScheduled(final FileContext context);
/**
* This method is invoked when a file can't be scheduled.
* @see FileRecordsPollingConsumer
*
* @param context the file context.
*/
void onInvalid(final FileContext context);
/**
* This method is invoked when a source file is starting to be read.
* @see FileRecordsPollingConsumer
*
* @param context the file context.
*/
void onStart(final FileContext context);
/**
* This method is invoked when a source file processing is completed.
* @see FileRecordsPollingConsumer
*
* @param context the file context.
*/
void onCompleted(final FileContext context);
/**
* This method is invoked when an error occurred while processing a source file.
* @see FileRecordsPollingConsumer
*
* @param context the file context.
*/
void onFailure(final FileContext context, final Throwable t);
}
|
[
"florian.hussonnois@gmail.com"
] |
florian.hussonnois@gmail.com
|
cb3fd7c1982b35fe6c413edb019359eefa6a246f
|
f562205ff2ee4c7be53599384c7728fe9654f291
|
/app/src/main/java/com/zhanghao/gankio/api/FirService.java
|
8bff7a65e09261b5fe9740f3c085e81cff0a2fb4
|
[] |
no_license
|
lh983758011/MyGank
|
6f004f4ac0808159e1880ac233e63553b04e4069
|
64e45a250d7c3d6268bfa487d26edcd9430891c9
|
refs/heads/master
| 2021-01-21T09:49:54.415854
| 2017-05-18T05:51:17
| 2017-05-18T05:51:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 484
|
java
|
package com.zhanghao.gankio.api;
import com.zhanghao.gankio.entity.AppInfo;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
/**
* Created by zhanghao on 2017/5/9.
*/
public interface FirService {
@GET("apps/latest/?api_token=")
Call<AppInfo> getAppBuildInfo();
@GET
@Streaming
Call<ResponseBody> downloadNewApk(@Url String url);
}
|
[
"281079145@qq.com"
] |
281079145@qq.com
|
e423d61666f88a4aad588c63405cf862dd506a3c
|
a464211147d0fd47d2be533a5f0ced0da88f75f9
|
/EvoSuiteTests/evosuite_3/evosuite-tests/org/mozilla/javascript/xml/XMLObject_ESTest_scaffolding.java
|
f26d66a003720ff149559a7ba2c8d346d2555748
|
[
"MIT"
] |
permissive
|
LASER-UMASS/Swami
|
63016a6eccf89e4e74ca0ab775e2ef2817b83330
|
5bdba2b06ccfad9d469f8122c2d39c45ef5b125f
|
refs/heads/master
| 2022-05-19T12:22:10.166574
| 2022-05-12T13:59:18
| 2022-05-12T13:59:18
| 170,765,693
| 11
| 5
|
NOASSERTION
| 2022-05-12T13:59:19
| 2019-02-14T22:16:01
|
HTML
|
UTF-8
|
Java
| false
| false
| 4,633
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Aug 02 04:09:04 GMT 2018
*/
package org.mozilla.javascript.xml;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class XMLObject_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.mozilla.javascript.xml.XMLObject";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(XMLObject_ESTest_scaffolding.class.getClassLoader() ,
"org.mozilla.javascript.EcmaError",
"org.mozilla.javascript.SlotMapContainer",
"org.mozilla.javascript.SymbolScriptable",
"org.mozilla.javascript.xml.XMLObject",
"org.mozilla.javascript.Symbol",
"org.mozilla.javascript.Callable",
"org.mozilla.javascript.RhinoException",
"org.mozilla.javascript.ExternalArrayData",
"org.mozilla.javascript.NativeObject",
"org.mozilla.javascript.IdFunctionCall",
"org.mozilla.javascript.IdFunctionObject",
"org.mozilla.javascript.Function",
"org.mozilla.javascript.SlotMap",
"org.mozilla.javascript.IdScriptableObject",
"org.mozilla.javascript.Context",
"org.mozilla.javascript.ConstProperties",
"org.mozilla.javascript.EvaluatorException",
"org.mozilla.javascript.JavaScriptException",
"org.mozilla.javascript.FunctionObject",
"org.mozilla.javascript.IdFunctionObjectES6",
"org.mozilla.javascript.ThreadSafeSlotMapContainer",
"org.mozilla.javascript.ScriptableObject$KeyComparator",
"org.mozilla.javascript.Scriptable",
"org.mozilla.javascript.ScriptableObject",
"org.mozilla.javascript.debug.DebuggableObject",
"org.mozilla.javascript.BaseFunction"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(XMLObject_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.mozilla.javascript.ScriptableObject$KeyComparator",
"org.mozilla.javascript.ScriptableObject",
"org.mozilla.javascript.IdScriptableObject",
"org.mozilla.javascript.xml.XMLObject",
"org.mozilla.javascript.UniqueTag",
"org.mozilla.javascript.Scriptable"
);
}
}
|
[
"mmotwani@cs.umass.edu"
] |
mmotwani@cs.umass.edu
|
ea43cb98e79afe976d3ec3bc2f9cf9a992d2d7a0
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/api/model/InternalNotification.java
|
5b08ade23d7f3011413c1d8533b5841c630c52c3
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,119
|
java
|
package com.zhihu.android.api.model;
import com.fasterxml.jackson.p518a.JsonProperty;
import com.zhihu.android.level.model.ActionsKt;
public class InternalNotification {
@JsonProperty(mo29184a = "data")
public Content data;
@JsonProperty(mo29184a = "today_show_residual")
public int todayRestCount;
public static class Content {
public static final int ANSWER = 4;
public static final int ARTICLE = 2;
public static final int COLLECTION = 1;
public static final int COLUMN = 3;
public static final String GROUP_A = "1";
public static final String GROUP_B = "2";
public static final String GROUP_NONE = "0";
public static final int QUESTION = 0;
public static final int ROUNDTABLE = 6;
public static final int TOPIC = 5;
@JsonProperty(mo29184a = "dp_group")
public String dpGroup;
@JsonProperty(mo29184a = "expire_at")
public long expireAt;
@JsonProperty(mo29184a = "hot_icon")
public String hotIcon;
@JsonProperty(mo29184a = "hot_icon_night")
public String hotIconNight;
@JsonProperty(mo29184a = "hot_text")
public String hotText;
@JsonProperty(mo29184a = "icon")
public String icon;
@JsonProperty(mo29184a = "id")
/* renamed from: id */
public long f40297id;
@JsonProperty(mo29184a = "is_dp")
public boolean isDp;
@JsonProperty(mo29184a = "message")
public String message;
@JsonProperty(mo29184a = "start_at")
public long startAt;
@JsonProperty(mo29184a = "tag")
public Tag tag;
@JsonProperty(mo29184a = ActionsKt.ACTION_CONTENT_TYPE)
public int targetType;
@JsonProperty(mo29184a = "url")
public String url;
}
public static class Tag {
@JsonProperty(mo29184a = "id")
/* renamed from: id */
public long f40298id;
@JsonProperty(mo29184a = "img_url")
public String imgUrl;
@JsonProperty(mo29184a = "info")
public String info;
}
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
0617f90dbb726339ecb631f32d79b1650410e7b3
|
d36967d15a03945a1fe784bc512abe562ff89c6a
|
/src/trace/ot/OTListEditRemoteCountIncremented.java
|
be55838644a5b9ccb56d7a58089fa1dc68b52861
|
[] |
no_license
|
pdewan/ColabTeaching
|
31f9739657b7a9764649f96e277432ca4e1e30e8
|
cb6e835cb2ce0e784de4d5abe9d7181862e36b45
|
refs/heads/master
| 2020-03-30T00:42:14.307357
| 2015-07-22T08:11:57
| 2015-07-22T08:11:57
| 23,260,341
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,214
|
java
|
package trace.ot;
import trace.echo.ListEditInfo;
import trace.echo.modular.OperationName;
public class OTListEditRemoteCountIncremented extends OTListEditInfo{
public OTListEditRemoteCountIncremented(String aMessage, String aLocatable,
ListEditInfo aListEdit, UserOTTimeStampInfo anOTTimeStamp,
Object aFinder) {
super(aMessage, aLocatable, aListEdit, anOTTimeStamp, aFinder);
}
public OTListEditRemoteCountIncremented(String aMessage,
OTListEditInfo aSuperClassInfo) {
super(aMessage, aSuperClassInfo);
}
public static OTListEditRemoteCountIncremented toTraceable(String aMessage) {
OTListEditInfo aSuperClassInfo = OTListEditInfo.toTraceable(aMessage);
return new OTListEditRemoteCountIncremented(aMessage,
aSuperClassInfo);
}
// public static String toString (String aLocatable, ListEditInfo aListEdit, UserOTTimeStampInfo anOTTimeStamp) {
// return "@" + aLocatable + UserOTTimeStampedListEditInfo.toString(aListEdit, anOTTimeStamp);
// }
public static OTListEditRemoteCountIncremented newCase(String aLocatable,
ListEditInfo aListEdit, UserOTTimeStampInfo anOTTimeStamp/*, String aSourceOrDestination*/,
Object aFinder) {
String aMessage = toString(aLocatable, aListEdit, anOTTimeStamp);
OTListEditRemoteCountIncremented retVal = new OTListEditRemoteCountIncremented(aMessage, aLocatable, aListEdit, anOTTimeStamp, aFinder);
retVal.announce();
return retVal;
}
public static OTListEditRemoteCountIncremented newCase(String aLocatable,
ListEditInfo aListEdit, OTTimeStampInfo anOTTimeStamp/*, String aSourceOrDestination*/,
String aUserName, /*boolean anInServer,*/
Object aFinder) {
UserOTTimeStampInfo userOTTimeStampInfo = new UserOTTimeStampInfo(aLocatable, aUserName, anOTTimeStamp, null);
return newCase(aLocatable, aListEdit, userOTTimeStampInfo, aFinder);
}
public static OTListEditRemoteCountIncremented newCase(String aLocatable,
OperationName aName, int anIndex, Object anElement,
int aLocalCount, int aRemoteCount,
String aUserName, /*boolean anInServer,*/
Object aFinder) {
ListEditInfo aListEditInfo = new ListEditInfo(aName, anIndex, null, anElement);
OTTimeStampInfo anOTTimeStampInfo = new OTTimeStampInfo(aLocalCount, aRemoteCount);
return newCase(aLocatable, aListEditInfo, anOTTimeStampInfo, aUserName, /*anInServer,*/ aFinder);
}
// public static UserOTTimeStampedListEditSent newCase(/*String aLocatable,*/
// ListEditInfo aListEdit, UserOTTimeStampInfo anOTTimeStamp, String aSourceOrDestination,
// Object aFinder) {
// String aMessage = toString(aListEdit, anOTTimeStamp);
// UserOTTimeStampedListEditSent retVal = new UserOTTimeStampedListEditSent(aMessage/*, aLocatable*/, aListEdit, anOTTimeStamp, aFinder);
// retVal.announce();
// return retVal;
// }
// public static UserOTTimeStampedListEditSent newCase(/*String aLocatable,*/
// UserOTTimeStampedListEditInfo otTimeStampedListEditInfo, String aSourceOrDestination,
// Object aFinder) {
// return newCase(/*aLocatable,*/ otTimeStampedListEditInfo.getListEdit(), otTimeStampedListEditInfo.getOTTimeStamp(), aSourceOrDestination, aFinder);
// }
}
|
[
"dewan@cs.unc.edu"
] |
dewan@cs.unc.edu
|
29c5ffba862f69fe74e6c35df3993f4f9db60d0b
|
5741045375dcbbafcf7288d65a11c44de2e56484
|
/reddit-decompilada/com/reddit/frontpage/presentation/listing/common/RedditModeratorLinkActions$onModerateLockComments$2.java
|
2cf3b6215071972d270a15cfcad418eb253fd017
|
[] |
no_license
|
miarevalo10/ReporteReddit
|
18dd19bcec46c42ff933bb330ba65280615c281c
|
a0db5538e85e9a081bf268cb1590f0eeb113ed77
|
refs/heads/master
| 2020-03-16T17:42:34.840154
| 2018-05-11T10:16:04
| 2018-05-11T10:16:04
| 132,843,706
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,905
|
java
|
package com.reddit.frontpage.presentation.listing.common;
import com.reddit.datalibrary.frontpage.requests.models.v2.Listable;
import com.reddit.frontpage.presentation.listing.model.LinkPresentationModel;
import kotlin.Metadata;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
@Metadata(bv = {1, 0, 2}, d1 = {"\u0000\f\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0000\u001a\u0002H\u0001\"\b\b\u0000\u0010\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u0002H\u0001H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"<anonymous>", "T", "Lcom/reddit/datalibrary/frontpage/requests/models/v2/Listable;", "it", "invoke", "(Lcom/reddit/datalibrary/frontpage/requests/models/v2/Listable;)Lcom/reddit/datalibrary/frontpage/requests/models/v2/Listable;"}, k = 3, mv = {1, 1, 9})
/* compiled from: RedditModeratorLinkActions.kt */
final class RedditModeratorLinkActions$onModerateLockComments$2 extends Lambda implements Function1<T, T> {
final /* synthetic */ boolean f36598a;
RedditModeratorLinkActions$onModerateLockComments$2(boolean z) {
this.f36598a = z;
super(1);
}
public final /* synthetic */ Object mo6492a(Object obj) {
Listable listable = (Listable) obj;
Intrinsics.m26847b(listable, "it");
return LinkPresentationModel.m34743a((LinkPresentationModel) listable, null, null, null, 0, null, 0, null, null, null, 0, null, null, null, null, false, null, false, 0, null, false, null, null, this.f36598a, false, null, false, null, null, null, false, null, null, false, null, null, null, null, null, null, false, null, false, null, null, 0, false, 0, null, false, 0, null, null, false, false, false, false, false, null, null, null, null, null, null, null, false, false, null, null, null, false, null, false, false, false, null, null, null, -4194305, -1, 8191, null);
}
}
|
[
"mi.arevalo10@uniandes.edu.co"
] |
mi.arevalo10@uniandes.edu.co
|
c7d0f04e188d09ae61ec43762970d42ff21c6440
|
4900b7d1344188aae12c12ee26559139988843b1
|
/src/servlet/ApproveServlet.java
|
3f3ae6414a9d1acfb971bdefddd43a99ab113b85
|
[] |
no_license
|
RoastEgg/HostelWorld
|
755f84c6344563e13c76d71ae5d711fd57ba950b
|
36b9dcf3e8bb6f4f218e60e024d91a3efe601d83
|
refs/heads/master
| 2021-01-21T20:43:18.019531
| 2017-12-10T14:26:55
| 2017-12-10T14:26:55
| 94,676,294
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,194
|
java
|
package servlet;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.AccommodationDao;
import dao.HostelDao;
import dao.ReserveDao;
import dao.RoomDao;
import daoImpl.AccommodationDaoImpl;
import daoImpl.HostelDaoImpl;
import daoImpl.ReserveDaoImpl;
import daoImpl.RoomDaoImpl;
import model.Accommodation;
import model.Hostel;
import model.Reserve;
import model.Room;
@WebServlet("/ApproveServlet")
public class ApproveServlet extends HttpServlet{
/**
*
*/
private static final long serialVersionUID = 1L;
public ReserveDao reserve = new ReserveDaoImpl();
public AccommodationDao accommodation = new AccommodationDaoImpl();
public HostelDao hostel = new HostelDaoImpl();
public RoomDao room = new RoomDaoImpl();
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
ServletContext context = request.getServletContext();
List<Reserve> reserveList = reserve.getForCEO();
List<Accommodation> accommodationList = accommodation.getForCEO();
List<Hostel> applyList = hostel.getForCEO();
List<Room> roomList = room.getForCEO();
request.getSession().setAttribute("CEOReserve", reserveList);
request.getSession().setAttribute("CEOAccommodation", accommodationList);
request.getSession().setAttribute("CEOHostelApply", applyList);
request.getSession().setAttribute("CEORoomApply", roomList);
context.getRequestDispatcher("/hostel/CEO.jsp").forward(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String type = request.getParameter("type");
if (type.equals("hostelApply")){
hostel.approve();
}
else{
room.approve();
}
request.getServletContext().getRequestDispatcher("/hostel/approveSuccess.jsp").forward(request, response);
}
}
|
[
"hzluhailong@163.com"
] |
hzluhailong@163.com
|
658845f936c2b19b25ede7a58fbdfc9ba3287428
|
fc6c869ee0228497e41bf357e2803713cdaed63e
|
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/appbrand/n/f.java
|
210416bf363405399996f2d24fb14b7c4b78c25d
|
[] |
no_license
|
hyb1234hi/reverse-wechat
|
cbd26658a667b0c498d2a26a403f93dbeb270b72
|
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
|
refs/heads/master
| 2020-09-26T10:12:47.484174
| 2017-11-16T06:54:20
| 2017-11-16T06:54:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,901
|
java
|
package com.tencent.mm.plugin.appbrand.n;
import com.tencent.gmtrace.GMTrace;
public final class f
{
/* Error */
public static <T> T a(Class<?> paramClass, String paramString, Object paramObject, Class<?>[] paramArrayOfClass, Object[] paramArrayOfObject, T paramT)
{
// Byte code:
// 0: ldc2_w 9
// 3: ldc 11
// 5: invokestatic 17 com/tencent/gmtrace/GMTrace:i (JI)V
// 8: aload_2
// 9: ifnonnull +13 -> 22
// 12: new 19 java/lang/IllegalArgumentException
// 15: dup
// 16: ldc 21
// 18: invokespecial 25 java/lang/IllegalArgumentException:<init> (Ljava/lang/String;)V
// 21: athrow
// 22: aload_2
// 23: invokevirtual 29 java/lang/Object:getClass ()Ljava/lang/Class;
// 26: astore 6
// 28: aconst_null
// 29: astore 7
// 31: aload 6
// 33: ifnull +70 -> 103
// 36: aload 6
// 38: aload_1
// 39: aload_3
// 40: invokevirtual 35 java/lang/Class:getDeclaredMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 43: astore 8
// 45: aload 6
// 47: invokevirtual 38 java/lang/Class:getSuperclass ()Ljava/lang/Class;
// 50: astore 6
// 52: aload 8
// 54: astore 7
// 56: goto -25 -> 31
// 59: astore 8
// 61: aload 7
// 63: astore 8
// 65: aload_0
// 66: aload 6
// 68: if_acmpne +12 -> 80
// 71: aload 6
// 73: aload_1
// 74: aload_3
// 75: invokevirtual 35 java/lang/Class:getDeclaredMethod (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
// 78: astore 8
// 80: aload 6
// 82: invokevirtual 38 java/lang/Class:getSuperclass ()Ljava/lang/Class;
// 85: astore 6
// 87: aload 8
// 89: astore 7
// 91: goto -60 -> 31
// 94: astore_0
// 95: aload 6
// 97: invokevirtual 38 java/lang/Class:getSuperclass ()Ljava/lang/Class;
// 100: pop
// 101: aload_0
// 102: athrow
// 103: aload 7
// 105: ifnonnull +14 -> 119
// 108: ldc2_w 9
// 111: ldc 11
// 113: invokestatic 41 com/tencent/gmtrace/GMTrace:o (JI)V
// 116: aload 5
// 118: areturn
// 119: aload 7
// 121: iconst_1
// 122: invokevirtual 47 java/lang/reflect/Method:setAccessible (Z)V
// 125: aload 7
// 127: aload_2
// 128: aload 4
// 130: invokevirtual 51 java/lang/reflect/Method:invoke (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
// 133: astore_0
// 134: ldc2_w 9
// 137: ldc 11
// 139: invokestatic 41 com/tencent/gmtrace/GMTrace:o (JI)V
// 142: aload_0
// 143: areturn
// 144: astore_0
// 145: ldc 53
// 147: aload_0
// 148: ldc 55
// 150: iconst_0
// 151: anewarray 4 java/lang/Object
// 154: invokestatic 61 com/tencent/mm/sdk/platformtools/w:printErrStackTrace (Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V
// 157: ldc2_w 9
// 160: ldc 11
// 162: invokestatic 41 com/tencent/gmtrace/GMTrace:o (JI)V
// 165: aload 5
// 167: areturn
// 168: astore 8
// 170: aload 7
// 172: astore 8
// 174: goto -94 -> 80
// Local variable table:
// start length slot name signature
// 0 177 0 paramClass Class<?>
// 0 177 1 paramString String
// 0 177 2 paramObject Object
// 0 177 3 paramArrayOfClass Class<?>[]
// 0 177 4 paramArrayOfObject Object[]
// 0 177 5 paramT T
// 26 70 6 localClass Class
// 29 142 7 localObject1 Object
// 43 10 8 localMethod java.lang.reflect.Method
// 59 1 8 localException1 Exception
// 63 25 8 localObject2 Object
// 168 1 8 localException2 Exception
// 172 1 8 localObject3 Object
// Exception table:
// from to target type
// 36 45 59 java/lang/Exception
// 36 45 94 finally
// 71 80 94 finally
// 119 134 144 java/lang/Exception
// 71 80 168 java/lang/Exception
}
public static <T> T a(String paramString, Object paramObject, Class<?>[] paramArrayOfClass, Object[] paramArrayOfObject, T paramT)
{
GMTrace.i(20015218688000L, 149125);
paramString = a(null, paramString, paramObject, paramArrayOfClass, paramArrayOfObject, paramT);
GMTrace.o(20015218688000L, 149125);
return paramString;
}
public static <T> T e(String paramString, Object paramObject, T paramT)
{
GMTrace.i(20015352905728L, 149126);
paramString = a(null, paramString, paramObject, null, null, paramT);
GMTrace.o(20015352905728L, 149126);
return paramString;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes2-dex2jar.jar!\com\tencent\mm\plugin\appbrand\n\f.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"robert0825@gmail.com"
] |
robert0825@gmail.com
|
f1a128d1428e190c4199efc24f7ecca78c767a6b
|
18b731ab437622d5936e531ece88c3dd0b2bb2ea
|
/pbtd-user/src/main/java/com/pbtd/playuser/component/ConstantBeanConfig.java
|
922afd204007d34acf87a1193533000059405838
|
[] |
no_license
|
harry0102/bai_project
|
b6c130e7235d220f2f0d4294a3f87b58f77cd265
|
674c6ddff7cf5dae514c69d2639d4b0245c0761f
|
refs/heads/master
| 2021-10-07T20:32:15.985439
| 2018-12-05T06:50:11
| 2018-12-05T06:50:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,266
|
java
|
package com.pbtd.playuser.component;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource(value = { "classpath:config/vodConstant.properties" })
public class ConstantBeanConfig {
@Value("${charset}")
public String charset;// 接口编码
@Value("${param}")
public String param;// 参数名称
@Value("${query_series_phone_url}")
public String querySeriesPhoneUrl;// 通过专辑ID查询接口url-手机
@Value("${query_series_tv_url}")
public String querySeriesTvUrl; // 通过专辑ID查询接口url-TV
@Value("${max_probability}")
public Integer maxProbability;// 转盘活动最大中奖概率
@Value("${total}")
public Integer total;// 点播收藏和播放记录最大查看条数
@Value("${flux_number}")
public Integer fluxNumber;// 点播收藏和播放记录最大查看条数
public static String LOCAL_URL;// 本项目URL
public static Long PLAY_TIME;//播放时长
@Value("${localhost_url}")
public void setLOCAL_URL(String picture_ip) {
LOCAL_URL = picture_ip;
}
@Value("${play_time}")
public void setPLAY_TIME(Long play_time) {
PLAY_TIME = play_time;
}
}
|
[
"750460470@qq.com"
] |
750460470@qq.com
|
9967fea4e6940f1020bc5d52195d558691bacf8c
|
354ed8b713c775382b1e2c4d91706eeb1671398b
|
/spring-beans/src/main/java/org/springframework/beans/TypeConverterSupport.java
|
d96e7d939a9501582b170a06ba04b52f0407664e
|
[] |
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
| 2,792
|
java
|
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConverterNotFoundException;
import java.lang.reflect.Field;
/**
* Base implementation of the {@link TypeConverter} interface, using a package-private delegate.
* Mainly serves as base class for {@link BeanWrapperImpl}.
*
* @author Juergen Hoeller
* @see SimpleTypeConverter
* @since 3.2
*/
public abstract class TypeConverterSupport extends PropertyEditorRegistrySupport implements TypeConverter {
TypeConverterDelegate typeConverterDelegate;
public <T> T convertIfNecessary(Object value, Class<T> requiredType) throws TypeMismatchException {
return doConvert(value, requiredType, null, null);
}
public <T> T convertIfNecessary(Object value, Class<T> requiredType, MethodParameter methodParam)
throws TypeMismatchException {
return doConvert(value, requiredType, methodParam, null);
}
public <T> T convertIfNecessary(Object value, Class<T> requiredType, Field field)
throws TypeMismatchException {
return doConvert(value, requiredType, null, field);
}
private <T> T doConvert(Object value, Class<T> requiredType, MethodParameter methodParam, Field field)
throws TypeMismatchException {
try {
if (field != null) {
return this.typeConverterDelegate.convertIfNecessary(value, requiredType, field);
} else {
return this.typeConverterDelegate.convertIfNecessary(value, requiredType, methodParam);
}
} catch (ConverterNotFoundException ex) {
throw new ConversionNotSupportedException(value, requiredType, ex);
} catch (ConversionException ex) {
throw new TypeMismatchException(value, requiredType, ex);
} catch (IllegalStateException ex) {
throw new ConversionNotSupportedException(value, requiredType, ex);
} catch (IllegalArgumentException ex) {
throw new TypeMismatchException(value, requiredType, ex);
}
}
}
|
[
"jessenpan@qq.com"
] |
jessenpan@qq.com
|
1933aaf607df94506341368d997c00ef90fb9401
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_4a1febf4cc7bbb5cfdbb7498661c1e995af7619f/WeechatPreferencesActivity/2_4a1febf4cc7bbb5cfdbb7498661c1e995af7619f_WeechatPreferencesActivity_s.java
|
f4f796c06bf12831f08d6b34d94d05dab17fd93e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,699
|
java
|
/*******************************************************************************
* Copyright 2012 Keith Johnson
*
* 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.ubergeek42.WeechatAndroid;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.PreferenceActivity;
public class WeechatPreferencesActivity extends PreferenceActivity implements
OnSharedPreferenceChangeListener {
private SharedPreferences sharedPreferences;
private EditTextPreference hostPref;
private EditTextPreference portPref;
private EditTextPreference textSizePref;
private EditTextPreference timestampformatPref;
private EditTextPreference passPref;
private EditTextPreference stunnelCert;
private EditTextPreference stunnelPass;
private EditTextPreference sshHostPref;
private EditTextPreference sshPortPref;
private EditTextPreference sshPassPref;
private EditTextPreference sshUserPref;
private ListPreference prefixPref;
private ListPreference connectionTypePref;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
sharedPreferences = getPreferenceScreen().getSharedPreferences();
hostPref = (EditTextPreference) getPreferenceScreen().findPreference("host");
portPref = (EditTextPreference) getPreferenceScreen().findPreference("port");
passPref = (EditTextPreference) getPreferenceScreen().findPreference("password");
textSizePref = (EditTextPreference) getPreferenceScreen().findPreference("text_size");
timestampformatPref = (EditTextPreference) getPreferenceScreen().findPreference(
"timestamp_format");
stunnelCert = (EditTextPreference) getPreferenceScreen().findPreference("stunnel_cert");
stunnelPass = (EditTextPreference) getPreferenceScreen().findPreference("stunnel_pass");
sshHostPref = (EditTextPreference) getPreferenceScreen().findPreference("ssh_host");
sshUserPref = (EditTextPreference) getPreferenceScreen().findPreference("ssh_user");
sshPortPref = (EditTextPreference) getPreferenceScreen().findPreference("ssh_port");
sshPassPref = (EditTextPreference) getPreferenceScreen().findPreference("ssh_pass");
prefixPref = (ListPreference) getPreferenceScreen().findPreference("prefix_align");
connectionTypePref = (ListPreference) getPreferenceScreen().findPreference(
"connection_type");
setTitle(R.string.preferences);
}
@Override
protected void onPause() {
super.onPause();
sharedPreferences.unregisterOnSharedPreferenceChangeListener(this);
}
@Override
protected void onResume() {
super.onResume();
sharedPreferences.registerOnSharedPreferenceChangeListener(this);
hostPref.setSummary(sharedPreferences.getString("host", ""));
portPref.setSummary(sharedPreferences.getString("port", "8001"));
textSizePref.setSummary(sharedPreferences.getString("text_size", "10"));
timestampformatPref.setSummary(sharedPreferences.getString("timestamp_format", "HH:mm:ss"));
stunnelCert.setSummary(sharedPreferences.getString("stunnel_cert", "Not Set"));
sshHostPref.setSummary(sharedPreferences.getString("ssh_host", ""));
sshUserPref.setSummary(sharedPreferences.getString("ssh_user", ""));
sshPortPref.setSummary(sharedPreferences.getString("ssh_port", "22"));
prefixPref.setSummary(prefixPref.getEntry());
connectionTypePref.setSummary(connectionTypePref.getEntry());
String tmp;
tmp = sharedPreferences.getString("password", null);
if (tmp == null || tmp.equals("")) {
passPref.setSummary("None Set");
} else {
passPref.setSummary("******");
}
tmp = sharedPreferences.getString("stunnel_pass", null);
if (tmp == null || tmp.equals("")) {
stunnelPass.setSummary("None Set");
} else {
stunnelPass.setSummary("******");
}
tmp = sharedPreferences.getString("ssh_pass", null);
if (tmp == null || tmp.equals("")) {
sshPassPref.setSummary("None Set");
} else {
sshPassPref.setSummary("******");
}
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.equals("host")) {
hostPref.setSummary(sharedPreferences.getString(key, ""));
} else if (key.equals("port")) {
portPref.setSummary(sharedPreferences.getString("port", "8001"));
} else if (key.equals("password")) {
String tmp = sharedPreferences.getString("password", null);
if (tmp == null || tmp.equals("")) {
passPref.setSummary("None Set");
} else {
passPref.setSummary("******");
}
} else if (key.equals("text_size")) {
textSizePref.setSummary(sharedPreferences.getString("text_size", "10"));
} else if (key.equals("timestamp_format")) {
timestampformatPref.setSummary(sharedPreferences.getString("timestamp_format",
"HH:mm:ss"));
} else if (key.equals("stunnel_cert")) {
stunnelCert.setSummary(sharedPreferences.getString("stunnel_cert",
"/sdcard/weechat/client.p12"));
} else if (key.equals("stunnel_pass")) {
String tmp = sharedPreferences.getString("stunnel_pass", null);
if (tmp == null || tmp.equals("")) {
stunnelPass.setSummary("None Set");
} else {
stunnelPass.setSummary("******");
}
} else if (key.equals("ssh_host")) {
sshHostPref.setSummary(sharedPreferences.getString(key, ""));
} else if (key.equals("ssh_user")) {
sshUserPref.setSummary(sharedPreferences.getString(key, ""));
} else if (key.equals("port")) {
sshPortPref.setSummary(sharedPreferences.getString(key, "22"));
} else if (key.equals("ssh_pass")) {
String tmp = sharedPreferences.getString("ssh_pass", null);
if (tmp == null || tmp.equals("")) {
sshPassPref.setSummary("None Set");
} else {
sshPassPref.setSummary("******");
}
} else if (key.equals("prefix_align")) {
prefixPref.setSummary(prefixPref.getEntry());
} else if (key.equals("connection_type")) {
connectionTypePref.setSummary(connectionTypePref.getEntry());
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5df1c755f28e120914bd874320b1d74899f42e66
|
cc452ff58bcc482cf16386a12c7ac7402d57a2c8
|
/src/main/java/com/lgren/rxsg/mapper/SysScWaitingQueueMapper.java
|
ab02f0b540f1345fc32a22d6745ae0a3dac2350a
|
[] |
no_license
|
lgren/rxsg
|
b895a5b25c751a6ca5e25c6b03ab2501eefbd2b9
|
6762c6fbb5b19ca927188834e9eb78a4a78fb84a
|
refs/heads/master
| 2022-06-24T14:39:01.900845
| 2019-06-13T07:09:52
| 2019-06-13T07:09:52
| 191,283,057
| 0
| 2
| null | 2022-06-17T02:13:32
| 2019-06-11T02:58:34
|
PLpgSQL
|
UTF-8
|
Java
| false
| false
| 303
|
java
|
package com.lgren.rxsg.mapper;
import com.lgren.rxsg.entity.SysScWaitingQueue;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Lgren
* @since 2019-05-24
*/
public interface SysScWaitingQueueMapper extends BaseMapper<SysScWaitingQueue> {
}
|
[
"625552409@qq.com"
] |
625552409@qq.com
|
d5c0e47fed5b3a71eb438aa426f7587e7eb7ab68
|
32364ab81af8bf4d7c0d4283ab3077bc70cba8b8
|
/src/test/java/spring_framework/head_02_test/spring_core_initcontext/xml/StubGreeterTarget.java
|
df27a6b1972111581eb6be1a5d06df3117c5b3bf
|
[] |
no_license
|
dimaSkalora/Spring_Easyjava_ru
|
77fc115bd1996d4b2b2f7e7e91488f3d42eff208
|
bbf9ee244df81174aca28c4dc8efa7e0cbd1b9be
|
refs/heads/master
| 2021-05-08T03:11:16.405255
| 2017-11-08T17:26:10
| 2017-11-08T17:26:10
| 108,232,637
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
package spring_framework.head_02_test.spring_core_initcontext.xml;
import spring_framework.head_02.spring_core_initcontext.xml.ru.easyjava.spring.greeter.GreeterTarget;
public class StubGreeterTarget implements GreeterTarget {
@Override
public String get() {
return "TEST";
}
}
|
[
"timon2@ukr.net"
] |
timon2@ukr.net
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.