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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8805a8568ebf758709d489fff71ecf885631ccd
|
d96f6e8ac41dee90937b2ebc9dcb1ea17a365654
|
/datatypes-src/org/w3/www/_2001/_04/xmlenc/descriptors/CipherDataDescriptor.java
|
f5ca1b729149e2aff35ef0af2a27cd47d73d80e7
|
[
"Apache-2.0",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
pihvi/laverca
|
72c7dd46cf313d25ba26ff5c6fed92a827a44ad6
|
bff80bd21a9c0d30b83dea4e9757baba8269a9af
|
refs/heads/master
| 2020-11-26T09:33:33.524058
| 2011-06-23T10:59:51
| 2011-06-23T10:59:51
| 1,940,987
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,535
|
java
|
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
* Schema.
* $Id$
*/
package org.w3.www._2001._04.xmlenc.descriptors;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
import org.w3.www._2001._04.xmlenc.CipherData;
/**
* Class CipherDataDescriptor.
*
* @version $Revision$ $Date$
*/
public class CipherDataDescriptor extends org.w3.www._2001._04.xmlenc.descriptors.CipherDataTypeDescriptor {
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
* Field _elementDefinition.
*/
private boolean _elementDefinition;
/**
* Field _nsPrefix.
*/
private java.lang.String _nsPrefix;
/**
* Field _nsURI.
*/
private java.lang.String _nsURI;
/**
* Field _xmlName.
*/
private java.lang.String _xmlName;
/**
* Field _identity.
*/
private org.exolab.castor.xml.XMLFieldDescriptor _identity;
//----------------/
//- Constructors -/
//----------------/
public CipherDataDescriptor() {
super();
setExtendsWithoutFlatten(new org.w3.www._2001._04.xmlenc.descriptors.CipherDataTypeDescriptor());
_nsURI = "http://www.w3.org/2001/04/xmlenc#";
_xmlName = "CipherData";
_elementDefinition = true;
}
//-----------/
//- Methods -/
//-----------/
/**
* Method getAccessMode.
*
* @return the access mode specified for this class.
*/
@Override()
public org.exolab.castor.mapping.AccessMode getAccessMode(
) {
return null;
}
/**
* Method getIdentity.
*
* @return the identity field, null if this class has no
* identity.
*/
@Override()
public org.exolab.castor.mapping.FieldDescriptor getIdentity(
) {
if (_identity == null) {
return super.getIdentity();
}
return _identity;
}
/**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/
@Override()
public java.lang.Class getJavaClass(
) {
return org.w3.www._2001._04.xmlenc.CipherData.class;
}
/**
* Method getNameSpacePrefix.
*
* @return the namespace prefix to use when marshaling as XML.
*/
@Override()
public java.lang.String getNameSpacePrefix(
) {
return _nsPrefix;
}
/**
* Method getNameSpaceURI.
*
* @return the namespace URI used when marshaling and
* unmarshaling as XML.
*/
@Override()
public java.lang.String getNameSpaceURI(
) {
return _nsURI;
}
/**
* Method getValidator.
*
* @return a specific validator for the class described by this
* ClassDescriptor.
*/
@Override()
public org.exolab.castor.xml.TypeValidator getValidator(
) {
return this;
}
/**
* Method getXMLName.
*
* @return the XML Name for the Class being described.
*/
@Override()
public java.lang.String getXMLName(
) {
return _xmlName;
}
/**
* Method isElementDefinition.
*
* @return true if XML schema definition of this Class is that
* of a global
* element or element with anonymous type definition.
*/
public boolean isElementDefinition(
) {
return _elementDefinition;
}
}
|
[
"mikaeljl@8882375b-f798-4923-9e66-ffa807b0447f"
] |
mikaeljl@8882375b-f798-4923-9e66-ffa807b0447f
|
5d21b392255dea264fd6d2a48f2496abb8153fd0
|
d41035a16e5df37dfe88e5f40cb08b427746b5f1
|
/com/sun/corba/se/PortableActivationIDL/ServerManagerHolder.java
|
93f863e5e59467be6ac18d83150dd32775b760f4
|
[] |
no_license
|
XJ2017/JavaSource
|
8b3ac45d087b146b7738177bd99a6c65c481bdb8
|
fbe4f5c5ff76942380390356cc644ad1e72f99db
|
refs/heads/master
| 2021-01-19T03:35:17.235001
| 2016-06-16T12:56:49
| 2016-06-16T12:56:49
| 60,250,989
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,333
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/ServerManagerHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from d:/re/puppet/workspace/8-2-build-windows-amd64-cygwin/jdk8u73/6086/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Friday, January 29, 2016 5:40:18 PM PST
*/
/** Interface used to combine the Activator and Locator when both are
* implemented together in the same process, as is currently the case
* for our implementation.
*/
public final class ServerManagerHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.PortableActivationIDL.ServerManager value = null;
public ServerManagerHolder ()
{
}
public ServerManagerHolder (com.sun.corba.se.PortableActivationIDL.ServerManager initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.PortableActivationIDL.ServerManagerHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.PortableActivationIDL.ServerManagerHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.PortableActivationIDL.ServerManagerHelper.type ();
}
}
|
[
"504283451@qq.com"
] |
504283451@qq.com
|
1eae4a04b6c80a33505158a19cd0e307ffb2faea
|
e1af7696101f8f9eb12c0791c211e27b4310ecbc
|
/MCP/temp/src/minecraft/net/minecraft/world/GameType.java
|
61980a02a8aa9e5744459b966578410293d1c63e
|
[] |
no_license
|
VinmaniaTV/Mania-Client
|
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
|
7a12b8bad1a8199151b3f913581775f50cc4c39c
|
refs/heads/main
| 2023-02-12T10:31:29.076263
| 2021-01-13T02:29:35
| 2021-01-13T02:29:35
| 329,156,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,524
|
java
|
package net.minecraft.world;
import net.minecraft.entity.player.PlayerCapabilities;
public enum GameType {
NOT_SET(-1, "", ""),
SURVIVAL(0, "survival", "s"),
CREATIVE(1, "creative", "c"),
ADVENTURE(2, "adventure", "a"),
SPECTATOR(3, "spectator", "sp");
int field_77154_e;
String field_77151_f;
String field_185330_h;
private GameType(int p_i46718_3_, String p_i46718_4_, String p_i46718_5_) {
this.field_77154_e = p_i46718_3_;
this.field_77151_f = p_i46718_4_;
this.field_185330_h = p_i46718_5_;
}
public int func_77148_a() {
return this.field_77154_e;
}
public String func_77149_b() {
return this.field_77151_f;
}
public void func_77147_a(PlayerCapabilities p_77147_1_) {
if (this == CREATIVE) {
p_77147_1_.field_75101_c = true;
p_77147_1_.field_75098_d = true;
p_77147_1_.field_75102_a = true;
} else if (this == SPECTATOR) {
p_77147_1_.field_75101_c = true;
p_77147_1_.field_75098_d = false;
p_77147_1_.field_75102_a = true;
p_77147_1_.field_75100_b = true;
} else {
p_77147_1_.field_75101_c = false;
p_77147_1_.field_75098_d = false;
p_77147_1_.field_75102_a = false;
p_77147_1_.field_75100_b = false;
}
p_77147_1_.field_75099_e = !this.func_82752_c();
}
public boolean func_82752_c() {
return this == ADVENTURE || this == SPECTATOR;
}
public boolean func_77145_d() {
return this == CREATIVE;
}
public boolean func_77144_e() {
return this == SURVIVAL || this == ADVENTURE;
}
public static GameType func_77146_a(int p_77146_0_) {
return func_185329_a(p_77146_0_, SURVIVAL);
}
public static GameType func_185329_a(int p_185329_0_, GameType p_185329_1_) {
for(GameType gametype : values()) {
if (gametype.field_77154_e == p_185329_0_) {
return gametype;
}
}
return p_185329_1_;
}
public static GameType func_77142_a(String p_77142_0_) {
return func_185328_a(p_77142_0_, SURVIVAL);
}
public static GameType func_185328_a(String p_185328_0_, GameType p_185328_1_) {
for(GameType gametype : values()) {
if (gametype.field_77151_f.equals(p_185328_0_) || gametype.field_185330_h.equals(p_185328_0_)) {
return gametype;
}
}
return p_185328_1_;
}
}
|
[
"vinmaniamc@gmail.com"
] |
vinmaniamc@gmail.com
|
572350f7c0fc84056eff701cb34b3189c4702da5
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/23/org/apache/commons/lang3/mutable/MutableLong_toLong_218.java
|
13e4bbed166b46304b4f7a8e126e2eb3f9d577f4
|
[] |
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
| 514
|
java
|
org apach common lang3 mutabl
mutabl code code wrapper
long
author apach softwar foundat
version
mutabl long mutablelong number compar mutabl long mutablelong mutabl number
mutabl instanc long
long instanc mutabl
long long tolong
long valueof longvalu
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
25541ae6a33ed9f027814659be03c9bb63be394b
|
fbf95d693ad5beddfb6ded0be170a9e810a10677
|
/core-services/egov-common-masters/src/main/java/org/egov/commons/model/BusinessCategoryCriteria.java
|
d69dec69779fba3f641cabc4ccf472103b4d4cd4
|
[
"MIT",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
egovernments/DIGIT-OSS
|
330cc364af1b9b66db8914104f64a0aba666426f
|
bf02a2c7eb783bf9fdf4b173faa37f402e05e96e
|
refs/heads/master
| 2023-08-15T21:26:39.992558
| 2023-08-08T10:14:31
| 2023-08-08T10:14:31
| 353,807,330
| 25
| 91
|
MIT
| 2023-09-10T13:23:31
| 2021-04-01T19:35:55
|
Java
|
UTF-8
|
Java
| false
| false
| 514
|
java
|
package org.egov.commons.model;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
@Setter
public class BusinessCategoryCriteria {
private String businessCategoryName;
private Boolean active;
private Long id;
private String tenantId;
private String sortBy;
private String sortOrder;
}
|
[
"36623418+nithindv@users.noreply.github.com"
] |
36623418+nithindv@users.noreply.github.com
|
8c041a66507c7ca50d0721f1a1f6094f60c26765
|
107b0089c6e4567747a8704020145be2feab1418
|
/app/src/main/java/com/zhl/huiqu/main/team/bean/SearBase.java
|
49c33468164ef41bad72045e0b05422e47bbad47
|
[] |
no_license
|
cd031116/ShopBright
|
d49dc2d84bed843fec01fbc8f4de8f4a27171752
|
a411739a11777050e06683c44880281aaedea128
|
refs/heads/master
| 2020-12-30T10:24:27.925594
| 2017-12-28T08:53:10
| 2017-12-28T08:53:10
| 98,967,044
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 377
|
java
|
package com.zhl.huiqu.main.team.bean;
import com.zhl.huiqu.base.BaseInfo;
import java.util.List;
/**
* Created by Administrator on 2017/10/24.
*/
public class SearBase extends BaseInfo{
private List<SearchInfo> body;
public List<SearchInfo> getBody() {
return body;
}
public void setBody(List<SearchInfo> body) {
this.body = body;
}
}
|
[
"mm1314520"
] |
mm1314520
|
e48af7d5f8b93bfcd04bc62f14cb6a6949bf76f5
|
eb36ddb1e9c25d2a35d1fc94abaa6ef0f8fa6f7b
|
/src/main/java/POGOProtos/Rpc/WithSuperEffectiveChargeMoveProtoOrBuilder.java
|
85a319230e14ad52369ac0958deea2896cf205aa
|
[
"BSD-3-Clause"
] |
permissive
|
pokemongo-dev-contrib/pogoprotos-java
|
bbc941b238c051fd1430d364fae108604b13eebd
|
af129776faf08bfbfc69b32e19e8293bff2e8991
|
refs/heads/master
| 2021-06-10T15:45:44.441267
| 2021-02-04T21:46:16
| 2021-02-04T21:46:16
| 83,863,204
| 6
| 1
|
NOASSERTION
| 2020-10-17T20:10:32
| 2017-03-04T03:51:45
|
Java
|
UTF-8
|
Java
| false
| true
| 331
|
java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: POGOProtos.Rpc.proto
package POGOProtos.Rpc;
public interface WithSuperEffectiveChargeMoveProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:POGOProtos.Rpc.WithSuperEffectiveChargeMoveProto)
com.google.protobuf.MessageOrBuilder {
}
|
[
"msntchat@hotmail.fr"
] |
msntchat@hotmail.fr
|
c0702353b004d732541bf5b3ade22d4ed49ee490
|
538414f61a305cf84e00cbd0f2c154e4fa99ccb7
|
/src-gen/org/openbravo/model/ad/module/Ad_module_sql.java
|
20fa575cca4f24798b70ff3acd1b516b9f02a740
|
[] |
no_license
|
q3neeko/openz
|
4024d007ef2f1094faad8a8c17db8147e689d0f3
|
050ae0ba7b54ba9276a2fa85ecf5b2ec33954859
|
refs/heads/master
| 2020-03-29T21:44:56.783387
| 2018-09-26T14:34:00
| 2018-09-26T14:34:00
| 150,385,120
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,180
|
java
|
/*
*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.0 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not use this
* file except in compliance with the License. You may obtain a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SL
* All portions are Copyright (C) 2008-2009 Openbravo SL
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
*/
package org.openbravo.model.ad.module;
import org.openbravo.base.structure.BaseOBObject;
import org.openbravo.base.structure.ClientEnabled;
import org.openbravo.model.ad.access.User;
import org.openbravo.model.ad.system.Client;
import org.openbravo.model.common.enterprise.Organization;
import java.lang.Boolean;
import java.lang.Long;
import java.lang.String;
import java.util.Date;
/**
* Entity class for entity ad_module_sql (stored in table ad_module_sql).
*
* NOTE: This class should not be instantiated directly. To instantiate this
* class the {@link org.openbravo.base.provider.OBProvider} should be used.
*/
public class Ad_module_sql extends BaseOBObject implements ClientEnabled {
private static final long serialVersionUID = 1L;
public static final String TABLE_NAME = "ad_module_sql";
public static final String ENTITY_NAME = "ad_module_sql";
public static final String PROPERTY_ID = "id";
public static final String PROPERTY_MODULE = "module";
public static final String PROPERTY_CLIENT = "client";
public static final String PROPERTY_ORG = "org";
public static final String PROPERTY_ISACTIVE = "isactive";
public static final String PROPERTY_CREATED = "created";
public static final String PROPERTY_CREATEDBY = "createdBy";
public static final String PROPERTY_UPDATED = "updated";
public static final String PROPERTY_UPDATEDBY = "updatedBy";
public static final String PROPERTY_ISPRESRIPT = "ispresript";
public static final String PROPERTY_STATEMENT = "statement";
public static final String PROPERTY_LINE = "line";
public static final String PROPERTY_VERSION = "version";
public Ad_module_sql() {
setDefaultValue(PROPERTY_ISACTIVE, true);
setDefaultValue(PROPERTY_ISPRESRIPT, true);
}
@Override
public String getEntityName() {
return ENTITY_NAME;
}
public String getId() {
return (String) get(PROPERTY_ID);
}
public void setId(String id) {
set(PROPERTY_ID, id);
}
public Module getModule() {
return (Module) get(PROPERTY_MODULE);
}
public void setModule(Module module) {
set(PROPERTY_MODULE, module);
}
public Client getClient() {
return (Client) get(PROPERTY_CLIENT);
}
public void setClient(Client client) {
set(PROPERTY_CLIENT, client);
}
public Organization getOrg() {
return (Organization) get(PROPERTY_ORG);
}
public void setOrg(Organization org) {
set(PROPERTY_ORG, org);
}
public Boolean isActive() {
return (Boolean) get(PROPERTY_ISACTIVE);
}
public void setActive(Boolean isactive) {
set(PROPERTY_ISACTIVE, isactive);
}
public Date getCreated() {
return (Date) get(PROPERTY_CREATED);
}
public void setCreated(Date created) {
set(PROPERTY_CREATED, created);
}
public User getCreatedBy() {
return (User) get(PROPERTY_CREATEDBY);
}
public void setCreatedBy(User createdBy) {
set(PROPERTY_CREATEDBY, createdBy);
}
public Date getUpdated() {
return (Date) get(PROPERTY_UPDATED);
}
public void setUpdated(Date updated) {
set(PROPERTY_UPDATED, updated);
}
public User getUpdatedBy() {
return (User) get(PROPERTY_UPDATEDBY);
}
public void setUpdatedBy(User updatedBy) {
set(PROPERTY_UPDATEDBY, updatedBy);
}
public Boolean isPresript() {
return (Boolean) get(PROPERTY_ISPRESRIPT);
}
public void setPresript(Boolean ispresript) {
set(PROPERTY_ISPRESRIPT, ispresript);
}
public String getStatement() {
return (String) get(PROPERTY_STATEMENT);
}
public void setStatement(String statement) {
set(PROPERTY_STATEMENT, statement);
}
public Long getLine() {
return (Long) get(PROPERTY_LINE);
}
public void setLine(Long line) {
set(PROPERTY_LINE, line);
}
public String getVersion() {
return (String) get(PROPERTY_VERSION);
}
public void setVersion(String version) {
set(PROPERTY_VERSION, version);
}
}
|
[
"neeko@gmx.de"
] |
neeko@gmx.de
|
1f59661c81d1abbc108976038541e1fa4a4e0c58
|
3d64c0bea178ec47a8948bd3368353d45f525301
|
/src/main/java/com/share/charge/mybatis/generator/model/OmsOrder.java
|
233d67b59f01365187f186db1228f42959c75630
|
[] |
no_license
|
Alisurice/mvc-project-seed
|
8e92fba87080b1f1beb92a74933c7f49ef0cffae
|
5e2998fc19f3348d575801740df6f894727336c7
|
refs/heads/master
| 2023-06-12T18:31:31.578107
| 2021-06-12T08:07:51
| 2021-06-12T08:07:51
| 375,361,900
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,928
|
java
|
package com.share.charge.mybatis.generator.model;
public class OmsOrder {
private Integer id;
private Integer guestId;
private Integer chargeId;
private Integer borrowCabinetId;
private Integer returnCabinetId;
private Long borrowTimeSeconds;
private Long returnTimeSeconds;
private Double mBill;
private Double mPrepayment;
private Double mBalance;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getGuestId() {
return guestId;
}
public void setGuestId(Integer guestId) {
this.guestId = guestId;
}
public Integer getChargeId() {
return chargeId;
}
public void setChargeId(Integer chargeId) {
this.chargeId = chargeId;
}
public Integer getBorrowCabinetId() {
return borrowCabinetId;
}
public void setBorrowCabinetId(Integer borrowCabinetId) {
this.borrowCabinetId = borrowCabinetId;
}
public Integer getReturnCabinetId() {
return returnCabinetId;
}
public void setReturnCabinetId(Integer returnCabinetId) {
this.returnCabinetId = returnCabinetId;
}
public Long getBorrowTimeSeconds() {
return borrowTimeSeconds;
}
public void setBorrowTimeSeconds(Long borrowTimeSeconds) {
this.borrowTimeSeconds = borrowTimeSeconds;
}
public Long getReturnTimeSeconds() {
return returnTimeSeconds;
}
public void setReturnTimeSeconds(Long returnTimeSeconds) {
this.returnTimeSeconds = returnTimeSeconds;
}
public Double getmBill() {
return mBill;
}
public void setmBill(Double mBill) {
this.mBill = mBill;
}
public Double getmPrepayment() {
return mPrepayment;
}
public void setmPrepayment(Double mPrepayment) {
this.mPrepayment = mPrepayment;
}
public Double getmBalance() {
return mBalance;
}
public void setmBalance(Double mBalance) {
this.mBalance = mBalance;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", guestId=").append(guestId);
sb.append(", chargeId=").append(chargeId);
sb.append(", borrowCabinetId=").append(borrowCabinetId);
sb.append(", returnCabinetId=").append(returnCabinetId);
sb.append(", borrowTimeSeconds=").append(borrowTimeSeconds);
sb.append(", returnTimeSeconds=").append(returnTimeSeconds);
sb.append(", mBill=").append(mBill);
sb.append(", mPrepayment=").append(mPrepayment);
sb.append(", mBalance=").append(mBalance);
sb.append("]");
return sb.toString();
}
}
|
[
"test"
] |
test
|
00a60aff1731eaf00d71255ee2e09d1c4a3213d8
|
124df74bce796598d224c4380c60c8e95756f761
|
/ohd.hseb.sshp/src/ohd/hseb/sshp/Activator.java
|
426d3e086663b87bbf3a85430863be430e698d87
|
[] |
no_license
|
Mapoet/AWIPS-Test
|
19059bbd401573950995c8cc442ddd45588e6c9f
|
43c5a7cc360b3cbec2ae94cb58594fe247253621
|
refs/heads/master
| 2020-04-17T03:35:57.762513
| 2017-02-06T17:17:58
| 2017-02-06T17:17:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
package ohd.hseb.sshp;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "ohd.hseb.sshp";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
|
[
"joshua.t.love@saic.com"
] |
joshua.t.love@saic.com
|
5a1441746f510a7af391085789b50ac05572e6df
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12798-39-19-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/doc/XWikiDocument_ESTest_scaffolding.java
|
e4a3c10bf54c6f70fa9a728e96a44f8c14daf8a5
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 435
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 22:24:07 UTC 2020
*/
package com.xpn.xwiki.doc;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiDocument_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
8cf4ccafdc6d3c4f1778e5c7f3bb9e71b4a9f93f
|
5e84211d697899a3f42b3f1e8ba73861f44eb71a
|
/src/main/java/com/bluebottle/racehorse/service/HorseServiceImpl.java
|
f980298e53e529485927143a1a4b6d92e9708c91
|
[] |
no_license
|
maulong305/race_horse_new
|
82f6ca7b9b123bea049f1aa9ccbbf6eea3705487
|
efb0f5a35f006241561e424d87b7b18ea77386fa
|
refs/heads/master
| 2023-04-21T18:00:59.469726
| 2021-05-06T04:23:12
| 2021-05-06T04:23:12
| 357,399,764
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,999
|
java
|
package com.bluebottle.racehorse.service;
import com.bluebottle.racehorse.dto.horse.HorseResponse;
import com.bluebottle.racehorse.dto.horse.UpdateHorseRequest;
import com.bluebottle.racehorse.model.Horse;
import com.bluebottle.racehorse.repository.HorseRepository;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class HorseServiceImpl implements HorseService{
@Autowired
HorseRepository horseRepository;
@Override
public Iterable<Horse> findAll(Pageable pageable) {
return horseRepository.findAllByOrderByName(pageable);
}
@Override
public Horse findById(Long id) {
return horseRepository.findById(id).orElse(null);
}
@Override
public Boolean remove(Long id) {
horseRepository.deleteById(id);
return true;
}
@Override
public Horse save(Horse horse) {
return horseRepository.save(horse);
}
@Override
public HorseResponse update(UpdateHorseRequest updateHorseRequest) {
Horse horse = horseRepository.findById(updateHorseRequest.getId()).orElse(null);
if (horse == null) {
return null;
} else {
BeanUtils.copyProperties(updateHorseRequest, horse);
horseRepository.save(horse);
return new HorseResponse(horse);
}
}
@Override
public Iterable<Horse> findAllByTrainer(Long id) {
return horseRepository.findAllByTrainerId(id);
}
@Override
public List<Horse> findAllByTrainerAndName(Long id, String name, Pageable pageable) {
return horseRepository.findAllByTrainerIdAndName(id, name, pageable);
}
@Override
public List<Horse> findAllByFoaled(Long id, String year, Pageable pageable) {
return horseRepository.findAllByFoaled(id, year, pageable);
}
}
|
[
"maulong305@gmail.com"
] |
maulong305@gmail.com
|
dc23ce8c1cf59fa143f781f8f1b15365b248e52e
|
e5a3b0a88097e40b844000fb06e8fac3c8da453e
|
/src/main/java/org/neo4j/ogm/benchmark/entityscan/entities/SimpleEntity616.java
|
c1ab5beee01e85b4069c4f1931453808ac55bdda
|
[] |
no_license
|
nmervaillie/neo4j-ogm-jmh-performance-benchmark
|
473fba908aec8df71b397b65170f15ee2189210b
|
d85281080e0495143da4f3bd98199ff40f094612
|
refs/heads/master
| 2020-12-30T14:44:23.214665
| 2017-10-06T07:50:15
| 2017-10-06T07:50:15
| 91,077,827
| 0
| 1
| null | 2017-10-06T07:50:16
| 2017-05-12T09:59:17
|
Java
|
UTF-8
|
Java
| false
| false
| 940
|
java
|
package org.neo4j.ogm.benchmark.entityscan.entities;
import java.util.List;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
/**
* Template for single entity
*
* Run src/main/resouces.copy.sh to create copies in sources directory.
*
* @author Frantisek Hartman
*/
@NodeEntity
public class SimpleEntity616 {
Long id;
String name;
@Relationship(type = "REL")
List<SimpleEntity616> entities;
public SimpleEntity616() {
}
public SimpleEntity616(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<SimpleEntity616> getEntities() {
return entities;
}
public void setEntities(List<SimpleEntity616> entities) {
this.entities = entities;
}
}
|
[
"frant.hartm@gmail.com"
] |
frant.hartm@gmail.com
|
407d993ac03198c8d8c1414e0ea4c0f676016066
|
a076c5e6f9aa8b7875af0c9c03ea89bd464b016d
|
/src/class24_Abstract/Parent1.java
|
1427635e3ef6e426dd2169e2661fd9052e9a71f2
|
[] |
no_license
|
Guljemal1994/JavaBasics
|
c0f91189ad7b4735774e3eb1c4d99e2764ee23f6
|
4439131cef289031e9140b8e219fa048b000656d
|
refs/heads/master
| 2021-04-04T02:51:06.751747
| 2020-05-17T23:21:07
| 2020-05-17T23:21:07
| 248,418,906
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 319
|
java
|
package class24_Abstract;
public abstract class Parent1 {
public void m1(){
System.out.println("Parent class providing implementation");
}
public abstract void m2();
}
class Child1 extends Parent1{
@Override
public void m2() {
System.out.println("Child class providing implementation");
}
}
|
[
"konulkuly@gmail.com"
] |
konulkuly@gmail.com
|
67547fc6c9ab0073b481a27a605167a7fa6796ee
|
7bb3e77181bce2fd222ae3d1b87431b10f2b3461
|
/clevercloud/sources/org/clever/Common/smack/sasl/SASLPlainMechanism.java
|
cc6a43fe73c7a0a840956f9bf63ee3a63819c6fc
|
[] |
no_license
|
apanarello/cleverNew
|
457abbced532d5635b68e3b58ed4924e6e035cbd
|
e9cb034c2c821742d2a9bd8d5956b44c06fb341f
|
refs/heads/master
| 2021-01-25T10:29:29.894358
| 2015-02-25T12:00:52
| 2015-02-25T12:00:52
| 22,683,614
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,026
|
java
|
/**
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.clever.Common.smack.sasl;
import org.clever.Common.smack.SASLAuthentication;
/**
* Implementation of the SASL PLAIN mechanism
*
* @author Jay Kline
*/
public class SASLPlainMechanism extends SASLMechanism {
public SASLPlainMechanism(SASLAuthentication saslAuthentication) {
super(saslAuthentication);
}
protected String getName() {
return "PLAIN";
}
}
|
[
"apanarello@apanarello.(none)"
] |
apanarello@apanarello.(none)
|
4bd78b391e0e24366418a7d99da0c370f30c59f5
|
ea4da81a69a300624a46fce9e64904391c37267c
|
/src/main/java/com/alipay/api/domain/AlipaySocialForestTreeQueryModel.java
|
ee62da3fcfd44501a698881b8f64dcdeb559045f
|
[
"Apache-2.0"
] |
permissive
|
shiwei1024/alipay-sdk-java-all
|
741cc3cb8cf757292b657ce05958ff9ad8ecf582
|
d6a051fd47836c719a756607e6f84fee2b26ecb4
|
refs/heads/master
| 2022-12-29T18:46:53.195585
| 2020-10-09T06:34:30
| 2020-10-09T06:34:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,110
|
java
|
package com.alipay.api.domain;
import java.util.Date;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 用户种植树统计信息查询
*
* @author auto create
* @since 1.0, 2020-09-28 10:21:11
*/
public class AlipaySocialForestTreeQueryModel extends AlipayObject {
private static final long serialVersionUID = 1276964678697669547L;
/**
* 种树截止时间
*/
@ApiField("end_date")
private Date endDate;
/**
* 种树开始时间
*/
@ApiField("start_date")
private Date startDate;
/**
* 蚂蚁统一会员ID。目前该参数服务端没有用
*/
@ApiField("user_id")
private String userId;
public Date getEndDate() {
return this.endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Date getStartDate() {
return this.startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
04480b85b0895d3310e09f316d8602f241f09937
|
52f6f72c7574c7b2c0f1f93d40127ab3fbddf483
|
/gmall-sms/src/main/java/cn/leolam10/gmall/sms/service/impl/HomeRecommendProductServiceImpl.java
|
cf8dceb6b7cf60f769d010c4663f8729346c7a73
|
[] |
no_license
|
LeoLam10/gmall
|
b457436d50e37e2a7cd54e9feda28f19f4098e9a
|
c8051fbd720cc1c66f973227afe7dab18f393a1a
|
refs/heads/master
| 2023-03-11T17:08:50.765302
| 2021-03-02T14:32:33
| 2021-03-02T14:32:33
| 281,711,065
| 0
| 0
| null | 2020-07-31T15:14:57
| 2020-07-22T15:13:48
|
Java
|
UTF-8
|
Java
| false
| false
| 620
|
java
|
package cn.leolam10.gmall.sms.service.impl;
import cn.leolam10.gmall.sms.entity.HomeRecommendProduct;
import cn.leolam10.gmall.sms.mapper.HomeRecommendProductMapper;
import cn.leolam10.gmall.sms.service.HomeRecommendProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 人气推荐商品表 服务实现类
* </p>
*
* @author Leo
* @since 2020-08-16
*/
@Service
public class HomeRecommendProductServiceImpl extends ServiceImpl<HomeRecommendProductMapper, HomeRecommendProduct> implements HomeRecommendProductService {
}
|
[
"LeoLam101010@gmail.com"
] |
LeoLam101010@gmail.com
|
4d623f8c8a7aa948b1d64647fc0f7f8339995fb7
|
5ca37c9faccc82d9d0b83ecd1dac176d8cfa7261
|
/app/src/main/java/com/fotile/x1i/adapter/recipe/TypeBIngredientsListViewAdapter.java
|
33a40b0b46e2749f74c6ee122fde8c1d2976504d
|
[] |
no_license
|
yhx810971230/x1.i
|
9c04a80a57fa7148e74d28b22917800db203ff70
|
775531627a54c21f768c616a6ac708e25c98200f
|
refs/heads/master
| 2022-04-23T00:37:31.330912
| 2020-04-17T09:47:12
| 2020-04-17T09:47:12
| 256,391,924
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,240
|
java
|
package com.fotile.x1i.adapter.recipe;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.fotile.recipe.bean.recipe.BIngredient;
import com.fotile.x1i.R;
import com.fotile.x1i.viewholder.RecipeMaterialListViewHolder;
import java.util.List;
/**
* Created by hoperun on 17-12-27.
*/
public class TypeBIngredientsListViewAdapter extends BaseAdapter {
private Context context;
private List<BIngredient> list;
public TypeBIngredientsListViewAdapter(Context context, List<BIngredient> list) {
this.list = list;
this.context = context;
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
RecipeMaterialListViewHolder holder;
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.item_material, parent, false);
holder = new RecipeMaterialListViewHolder();
holder.tvName = (TextView) convertView.findViewById(R.id.tv_material_name);
holder.tvQuantity = (TextView) convertView.findViewById(R.id.tv_material_quantity);
holder.dotLine=(View) convertView.findViewById(R.id.dot_line) ;
holder.dotLine.setLayerType(View.LAYER_TYPE_SOFTWARE,null);
holder.tvQuantity.setSelected(true);
convertView.setTag(holder);
} else {
holder = (RecipeMaterialListViewHolder) convertView.getTag();
}
BIngredient bIngredient = list.get(position);
String materialName = bIngredient.getName();
String materialQuantity = bIngredient.getUnit();
holder.tvName.setText(materialName);
holder.tvQuantity.setText(materialQuantity);
return convertView;
}
@Override
public void notifyDataSetChanged() {
super.notifyDataSetChanged();
}
}
|
[
"810971230@qq.com"
] |
810971230@qq.com
|
9ec37abbb0ec9fd5984b5c6937663fa21dfac5a4
|
04403f16adb8fb34bddc91ce98f545e0fb0e982b
|
/unsagamod/hinasch/mods/unlsaga/misc/debuff/state/StateRandomThrow.java
|
61a470fec357ebf73a3dbb0a5ad7cd056903103d
|
[] |
no_license
|
damofujiki/minecraftmod
|
9afde5759f98c42d9d8f7a245d59e7661aebc61c
|
9970b384ffba39fb7dfb3ab3492fc8c7ce9785a8
|
refs/heads/master
| 2021-01-15T13:11:16.071722
| 2014-04-08T16:38:46
| 2014-04-08T16:38:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,219
|
java
|
package hinasch.mods.unlsaga.misc.debuff.state;
import hinasch.mods.unlsaga.entity.projectile.EntityBoulderNew;
import hinasch.mods.unlsaga.entity.projectile.EntitySolutionLiquid;
import hinasch.mods.unlsaga.misc.debuff.Debuff;
import hinasch.mods.unlsaga.misc.debuff.Debuffs;
import hinasch.mods.unlsaga.misc.debuff.livingdebuff.LivingDebuff;
import hinasch.mods.unlsaga.misc.debuff.livingdebuff.LivingState;
import hinasch.mods.unlsaga.misc.debuff.livingdebuff.LivingStateRandomThrow;
import hinasch.mods.unlsagamagic.misc.spell.Spells;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
public class StateRandomThrow extends State{
protected String soundStr;
protected int interval;
public StateRandomThrow(int num, String nameEn) {
super(num, nameEn);
this.soundStr = "";
this.interval = 1;
// TODO 自動生成されたコンストラクター・スタブ
}
@Override
public LivingDebuff init(String[] strs){
Debuff debuff = Debuffs.getDebuff(Integer.valueOf(strs[0]));
int remain = Integer.valueOf(strs[1]);
int shoottick = 0;
int amp = 0;
if(strs.length>2){
shoottick = Integer.valueOf(strs[2]);
amp = Integer.valueOf(strs[3]);
}
return new LivingStateRandomThrow(debuff,remain,shoottick,amp);
}
public Entity getThrowingEntity(LivingState parent,EntityLivingBase thrower,double dx,double dy,double dz){
if(this==Debuffs.stoneShower){
EntityBoulderNew var8 = new EntityBoulderNew(thrower.worldObj, thrower, 1.0F * 2.0F);
var8.setLocationAndAngles(var8.posX+dx, var8.posY+dy, var8.posZ+dz, var8.rotationYaw, var8.rotationPitch);
var8.setDamage(Spells.stoneShower.hurtHP+parent.getModifierAttackBuff(thrower));
return var8;
}
if(this==Debuffs.thunderCrap){
EntitySolutionLiquid liquid = new EntitySolutionLiquid(thrower.worldObj,thrower);
liquid.setThunderCrap();
return liquid;
}
return null;
}
public String getSoundString(){
return this.soundStr;
}
public StateRandomThrow setSoundString(String par1){
this.soundStr = par1;
return this;
}
public int getInterval(){
return this.interval;
}
public StateRandomThrow setInterval(int par1){
this.interval = par1;
return this;
}
}
|
[
"ahoahomen@gmail.com"
] |
ahoahomen@gmail.com
|
556a052fb0258b781a112315951e0d0658ab398d
|
a1b1ae65e0c5a4404c4951d2492c085bd80037fc
|
/src/org/androidpn/server/xmpp/handler/PresenceUpdateHandler.java
|
b0140a4395739c6a04f5398c62967b9392437626
|
[
"Apache-2.0"
] |
permissive
|
devallever/androidpn-server-bin-tomcat
|
1a87ee604ce03e8c542f9bdce39fdb8e6c6c2f4e
|
6f62e401699a0c23383761ed7d37e3fb083bd66d
|
refs/heads/master
| 2020-03-25T05:19:45.260929
| 2018-08-09T13:17:41
| 2018-08-09T13:17:41
| 143,441,119
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,718
|
java
|
/*
* Copyright (C) 2010 Moduad Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.androidpn.server.xmpp.handler;
import java.util.List;
import org.androidpn.server.model.Notification;
import org.androidpn.server.service.NotificationService;
import org.androidpn.server.service.ServiceLocator;
import org.androidpn.server.xmpp.push.NotificationManager;
import org.androidpn.server.xmpp.router.PacketDeliverer;
import org.androidpn.server.xmpp.session.ClientSession;
import org.androidpn.server.xmpp.session.Session;
import org.androidpn.server.xmpp.session.SessionManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xmpp.packet.JID;
import org.xmpp.packet.Packet;
import org.xmpp.packet.PacketError;
import org.xmpp.packet.Presence;
/**
* This class is to handle the presence protocol.
*
* @author Sehwan Noh (devnoh@gmail.com)
*/
public class PresenceUpdateHandler {
protected final Log log = LogFactory.getLog(getClass());
protected SessionManager sessionManager;
private NotificationManager notificationManager;
private NotificationService notificationService;
/**
* Constructor.
*/
public PresenceUpdateHandler() {
sessionManager = SessionManager.getInstance();
notificationService = ServiceLocator.getNotificationService();
notificationManager = new NotificationManager();
}
/**
* Processes the presence packet.
*
* @param packet the packet
*/
public void process(Packet packet) {
ClientSession session = sessionManager.getSession(packet.getFrom());
try {
Presence presence = (Presence) packet;
Presence.Type type = presence.getType();
if (type == null) { // null == available
if (session != null
&& session.getStatus() == Session.STATUS_CLOSED) {
log.warn("Rejected available presence: " + presence + " - "
+ session);
return;
}
if (session != null) {
session.setPresence(presence);
if (!session.isInitialized()) {
// initSession(session);
session.setInitialized(true);
}
}
List<Notification> notifications = notificationService.findNotificationsByUsername(session.getUsername());
if (notifications != null && notifications.size() > 0) {
for (Notification notification : notifications) {
String apiKey = notification.getApiKey();
String title = notification.getTitle();
String message = notification.getTitle();
String uri = notification.getUri();
String imageUrl = notification.getImageUrl();
notificationManager.sendNotifcationToUser(apiKey, session.getUsername(), title, message, uri, imageUrl, false);
notificationService.deleteNotification(notification);
}
}
} else if (Presence.Type.unavailable == type) {
if (session != null) {
session.setPresence(presence);
}
} else {
presence = presence.createCopy();
if (session != null) {
presence.setFrom(new JID(null, session.getServerName(),
null, true));
presence.setTo(session.getAddress());
} else {
JID sender = presence.getFrom();
presence.setFrom(presence.getTo());
presence.setTo(sender);
}
presence.setError(PacketError.Condition.bad_request);
PacketDeliverer.deliver(presence);
}
} catch (Exception e) {
log.error("Internal server error. Triggered by packet: " + packet,
e);
}
}
}
|
[
"devallever@163.com"
] |
devallever@163.com
|
277f489c49de68fe28d22fae46b49921fda09a2d
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/ttpic/util/ByteUtil.java
|
19dcafc10b5cfa0866ef730b012770bc80631f51
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 917
|
java
|
package com.tencent.ttpic.util;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
public class ByteUtil {
public static byte[] mBytes = new byte[4];
public static int readInt() {
AppMethodBeat.m2504i(83825);
ByteBuffer wrap = ByteBuffer.wrap(mBytes);
wrap.order(ByteOrder.nativeOrder());
int i = wrap.getInt();
AppMethodBeat.m2505o(83825);
return i;
}
public static byte[] getByteBuffer() {
return mBytes;
}
public static int readInt(byte[] bArr) {
AppMethodBeat.m2504i(83826);
if (bArr == null) {
AppMethodBeat.m2505o(83826);
return 0;
}
ByteBuffer wrap = ByteBuffer.wrap(bArr);
wrap.order(ByteOrder.nativeOrder());
int i = wrap.getInt();
AppMethodBeat.m2505o(83826);
return i;
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
4662fde89dc9fdf02442067fa96b7080c2e27e14
|
ed45cc34046d8bcfd1179c00d4b5625d6bbc818d
|
/src/com/bergerkiller/bukkit/mw/MyWorlds.java
|
c15b198d21e72fef962788aa70296fc343452591
|
[] |
no_license
|
drtshock/MyWorlds
|
71ad277e4116b1d4e8b2750daecfe2accc768eba
|
d2ee733ec8e62d392d498fd550b2937abe3743e5
|
refs/heads/master
| 2021-01-16T23:15:27.244710
| 2012-12-13T17:32:16
| 2012-12-13T17:32:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,760
|
java
|
package com.bergerkiller.bukkit.mw;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import com.bergerkiller.bukkit.common.config.FileConfiguration;
import com.bergerkiller.bukkit.common.utils.WorldUtil;
import com.bergerkiller.bukkit.common.Common;
import com.bergerkiller.bukkit.common.PluginBase;
public class MyWorlds extends PluginBase {
public static int teleportInterval;
public static boolean useWaterTeleport;
public static int timeLockInterval;
public static boolean useWorldEnterPermissions;
public static boolean usePortalEnterPermissions;
public static boolean useWorldBuildPermissions;
public static boolean useWorldUsePermissions;
public static boolean useWorldChatPermissions;
public static boolean allowPortalNameOverride;
public static boolean useWorldOperators;
public static boolean onlyObsidianPortals = false;
public static boolean isSpoutEnabled = false;
public static boolean onlyPlayerTeleportation = true;
public static boolean useWorldInventories;
public static boolean calculateWorldSize;
private static String mainWorld;
public static boolean forceMainWorldSpawn;
public static boolean alwaysInstantPortal;
public static boolean allowPersonalPortals;
public static MyWorlds plugin;
@Override
public int getMinimumLibVersion() {
return Common.VERSION;
}
public String root() {
return getDataFolder() + File.separator;
}
@Override
public void updateDependency(Plugin plugin, String pluginName, boolean enabled) {
if (pluginName.equals("Spout")) {
isSpoutEnabled = enabled;
}
}
@Override
public void enable() {
plugin = this;
// Event registering
this.register(MWListener.class);
this.register(MWPermissionListener.class);
this.register("tpp", "world");
FileConfiguration config = new FileConfiguration(this);
config.load();
config.setHeader("This is the configuration of MyWorlds");
config.addHeader("For more information, you can visit the following websites:");
config.addHeader("http://dev.bukkit.org/server-mods/my-worlds/");
config.addHeader("http://forums.bukkit.org/threads/myworlds.31718");
config.addHeader("http://wiki.bukkit.org/MyWorlds-Plugin");
config.setHeader("teleportInterval", "\nThe interval in miliseconds a player has to wait before being teleported again");
teleportInterval = config.get("teleportInterval", 2000);
config.setHeader("useWaterTeleport", "\nWhether water stream portals are allowed");
useWaterTeleport = config.get("useWaterTeleport", true);
config.setHeader("timeLockInterval", "\nThe tick interval at which time is kept locked");
timeLockInterval = config.get("timeLockInterval", 20);
config.setHeader("useWorldInventories", "\nWhether or not world inventories are being separated using the settings");
useWorldInventories = config.get("useWorldInventories", false);
useWorldEnterPermissions = config.get("useWorldEnterPermissions", false);
usePortalEnterPermissions = config.get("usePortalEnterPermissions", false);
useWorldBuildPermissions = config.get("useWorldBuildPermissions", false);
useWorldUsePermissions = config.get("useWorldUsePermissions", false);
useWorldChatPermissions = config.get("useWorldChatPermissions", false);
config.setHeader("onlyPlayerTeleportation", "\nWhether only players are allowed to teleport through portals");
onlyPlayerTeleportation = config.get("onlyPlayerTeleportation", true);
config.setHeader("allowPortalNameOverride", "\nWhether portals can be replaced by other portals with the same name on the same world");
allowPortalNameOverride = config.get("allowPortalNameOverride", true);
config.setHeader("useWorldOperators", "\nWhether each world has it's own operator list");
useWorldOperators = config.get("useWorldOperators", false);
config.setHeader("onlyObsidianPortals", "\nWhether only portal blocks surrounded by obsidian can teleport players");
onlyObsidianPortals = config.get("onlyObsidianPortals", false);
config.setHeader("calculateWorldSize", "\nWhether the world info command will calculate the world size on disk");
config.addHeader("calculateWorldSize", "If this process takes too long, disable it to prevent possible server freezes");
calculateWorldSize = config.get("calculateWorldSize", true);
config.setHeader("mainWorld", "\nThe main world in which new players spawn");
config.addHeader("mainWorld", "If left empty, the main world defined in the server.properties is used");
mainWorld = config.get("mainWorld", "");
config.setHeader("forceMainWorldSpawn", "\nWhether all players respawn on the main world at all times");
forceMainWorldSpawn = config.get("forceMainWorldSpawn", false);
config.setHeader("alwaysInstantPortal", "\nWhether survival players instantly teleport when entering a nether portal");
alwaysInstantPortal = config.get("alwaysInstantPortal", true);
config.setHeader("allowPersonalPortals", "\nWhether individually placed nether/end portals create their own destination portal");
config.addHeader("allowPersonalPortals", "False: Players are teleported to the spawn point of the world");
config.addHeader("allowPersonalPortals", "True: Players are teleported to their own portal on the other world");
allowPersonalPortals = config.get("allowPersonalPortals", true);
config.save();
// World configurations have to be loaded first
WorldConfig.init();
// Portals
Portal.init(this.getDataFile("portals.txt"));
// World inventories
WorldInventory.load();
PlayerData.init();
// init chunk loader
LoadChunksTask.init();
}
@Override
public void disable() {
// Portals
Portal.deinit(this.getDataFile("portals.txt"));
// World inventories
WorldInventory.save();
// World configurations have to be cleared last
WorldConfig.deinit();
// Abort chunk loader
LoadChunksTask.deinit();
plugin = null;
}
@Override
public boolean command(CommandSender sender, String cmdLabel, String[] args) {
com.bergerkiller.bukkit.mw.commands.Command.execute(sender, cmdLabel, args);
return true;
}
@Override
public void localization() {
this.loadLocales(Localization.class);
}
@Override
public void permissions() {
this.loadPermissions(Permission.class);
}
/**
* Gets the main world
*
* @return Main world
*/
public static World getMainWorld() {
if (!mainWorld.isEmpty()) {
World world = Bukkit.getWorld(mainWorld);
if (world != null) {
return world;
}
}
return WorldUtil.getWorlds().iterator().next();
}
}
|
[
"bergerkiller@gmail.com"
] |
bergerkiller@gmail.com
|
0bcfa14184143889a772ef73bafb44b2c08fe721
|
d4896a7eb2ee39cca5734585a28ca79bd6cc78da
|
/sources/com/google/android/exoplayer2/source/IcyDataSource.java
|
37a25c7221d9ad7e353278884811ca7a9fdfb6be
|
[] |
no_license
|
zadweb/zadedu.apk
|
a235ad005829e6e34ac525cbb3aeca3164cf88be
|
8f89db0590333929897217631b162e39cb2fe51d
|
refs/heads/master
| 2023-08-13T03:03:37.015952
| 2021-10-12T21:22:59
| 2021-10-12T21:22:59
| 416,498,604
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,325
|
java
|
package com.google.android.exoplayer2.source;
import android.net.Uri;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.upstream.TransferListener;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.ParsableByteArray;
import java.io.IOException;
import java.util.List;
import java.util.Map;
final class IcyDataSource implements DataSource {
private int bytesUntilMetadata;
private final Listener listener;
private final int metadataIntervalBytes;
private final byte[] metadataLengthByteHolder;
private final DataSource upstream;
public interface Listener {
void onIcyMetadata(ParsableByteArray parsableByteArray);
}
public IcyDataSource(DataSource dataSource, int i, Listener listener2) {
Assertions.checkArgument(i > 0);
this.upstream = dataSource;
this.metadataIntervalBytes = i;
this.listener = listener2;
this.metadataLengthByteHolder = new byte[1];
this.bytesUntilMetadata = i;
}
@Override // com.google.android.exoplayer2.upstream.DataSource
public void addTransferListener(TransferListener transferListener) {
this.upstream.addTransferListener(transferListener);
}
@Override // com.google.android.exoplayer2.upstream.DataSource
public long open(DataSpec dataSpec) throws IOException {
throw new UnsupportedOperationException();
}
@Override // com.google.android.exoplayer2.upstream.DataSource
public int read(byte[] bArr, int i, int i2) throws IOException {
if (this.bytesUntilMetadata == 0) {
if (!readMetadata()) {
return -1;
}
this.bytesUntilMetadata = this.metadataIntervalBytes;
}
int read = this.upstream.read(bArr, i, Math.min(this.bytesUntilMetadata, i2));
if (read != -1) {
this.bytesUntilMetadata -= read;
}
return read;
}
@Override // com.google.android.exoplayer2.upstream.DataSource
public Uri getUri() {
return this.upstream.getUri();
}
@Override // com.google.android.exoplayer2.upstream.DataSource
public Map<String, List<String>> getResponseHeaders() {
return this.upstream.getResponseHeaders();
}
@Override // com.google.android.exoplayer2.upstream.DataSource
public void close() throws IOException {
throw new UnsupportedOperationException();
}
private boolean readMetadata() throws IOException {
if (this.upstream.read(this.metadataLengthByteHolder, 0, 1) == -1) {
return false;
}
int i = (this.metadataLengthByteHolder[0] & 255) << 4;
if (i == 0) {
return true;
}
byte[] bArr = new byte[i];
int i2 = i;
int i3 = 0;
while (i2 > 0) {
int read = this.upstream.read(bArr, i3, i2);
if (read == -1) {
return false;
}
i3 += read;
i2 -= read;
}
while (i > 0 && bArr[i - 1] == 0) {
i--;
}
if (i > 0) {
this.listener.onIcyMetadata(new ParsableByteArray(bArr, i));
}
return true;
}
}
|
[
"midoekid@gmail.com"
] |
midoekid@gmail.com
|
79054650de67a9450b4a4d81b2943e37b4eff217
|
2e5a0808dc68d74b53d4bddc26d63c301a2dd7ad
|
/bc-web/src/main/java/cn/bc/web/servlet/URLEncodeServlet.java
|
9509354ccef20f6d0bbc34c9b33e65461931a0a0
|
[] |
no_license
|
bcsoft/bc-framework
|
64ab6902e85a6b1082925cc7c5b48391fa693e8c
|
50d8dc96f5602608c66f434a36eeb9f9398ecf11
|
refs/heads/master
| 2023-05-10T16:22:07.931356
| 2023-05-05T07:20:43
| 2023-05-05T07:20:43
| 1,870,998
| 12
| 15
| null | 2023-04-14T18:20:29
| 2011-06-09T14:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,303
|
java
|
package cn.bc.web.servlet;
import cn.bc.core.util.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
/**
* 通过URL传中文参数时的编码配置初始化Servlet
*
* @author dragon
*/
public class URLEncodeServlet extends HttpServlet {
private static final long serialVersionUID = 0L;
private static Log logger = LogFactory.getLog(URLEncodeServlet.class);
public void init(ServletConfig servletConfig) throws ServletException {
boolean isEncodeToCN = "true".equalsIgnoreCase(servletConfig
.getInitParameter("encodeToCN"));
String fromEncode = servletConfig.getInitParameter("fromEncode");
String toEncode = servletConfig.getInitParameter("toEncode");
StringUtils.encodeToCN = isEncodeToCN;
if (fromEncode != null && fromEncode.length() > 0)
StringUtils.fromEncode = fromEncode;
if (toEncode != null && toEncode.length() > 0)
StringUtils.toEncode = toEncode;
String msg = "StringUtils.encodeToCN = " + isEncodeToCN;
msg += "; fromEncode = " + StringUtils.fromEncode + "; toEncode = "
+ StringUtils.toEncode;
logger.fatal(msg);
super.init(servletConfig);
}
}
|
[
"rongjihuang@gmail.com"
] |
rongjihuang@gmail.com
|
a8ac8d0e0a17fe9514d3bf490683df44160d0b38
|
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
|
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/nikic/php_parser/lib/PhpParser/Node/Expr/BinaryOp/file_Mod_php.java
|
482d54970a3c2bede6b67098295e82769d3f2d5f
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
RuntimeConverter/RuntimeConverterLaravelJava
|
657b4c73085b4e34fe4404a53277e056cf9094ba
|
7ae848744fbcd993122347ffac853925ea4ea3b9
|
refs/heads/master
| 2020-04-12T17:22:30.345589
| 2018-12-22T10:32:34
| 2018-12-22T10:32:34
| 162,642,356
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,030
|
java
|
package com.project.convertedCode.includes.vendor.nikic.php_parser.lib.PhpParser.Node.Expr.BinaryOp;
import com.runtimeconverter.runtime.RuntimeStack;
import com.runtimeconverter.runtime.interfaces.ContextConstants;
import com.runtimeconverter.runtime.includes.RuntimeIncludable;
import com.runtimeconverter.runtime.includes.IncludeEventException;
import com.runtimeconverter.runtime.classes.RuntimeClassBase;
import com.runtimeconverter.runtime.RuntimeEnv;
import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface;
import com.runtimeconverter.runtime.arrays.ZPair;
/*
Converted with The Runtime Converter (runtimeconverter.com)
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php
*/
public class file_Mod_php implements RuntimeIncludable {
public static final file_Mod_php instance = new file_Mod_php();
public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException {
Scope2087 scope = new Scope2087();
stack.pushScope(scope);
this.include(env, stack, scope);
stack.popScope();
}
public final void include(RuntimeEnv env, RuntimeStack stack, Scope2087 scope)
throws IncludeEventException {
// Namespace import was here
// Conversion Note: class named Mod was here in the source code
env.addManualClassLoad("PhpParser\\Node\\Expr\\BinaryOp\\Mod");
}
private static final ContextConstants runtimeConverterContextContantsInstance =
new ContextConstants()
.setDir("/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp")
.setFile("/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php");
public ContextConstants getContextConstants() {
return runtimeConverterContextContantsInstance;
}
private static class Scope2087 implements UpdateRuntimeScopeInterface {
public void updateStack(RuntimeStack stack) {}
public void updateScope(RuntimeStack stack) {}
}
}
|
[
"git@runtimeconverter.com"
] |
git@runtimeconverter.com
|
37e3d17c7d152cb3c2a794bc5f7e539c2ae5bf01
|
18ce8560e23614aa27a9b54fb3930482cb9b5329
|
/gremlin-server/src/main/java/com/tinkerpop/gremlin/server/op/standard/StandardOps.java
|
28933f0a129eb8a7d7e4c8f0d6fcb34651218b64
|
[
"Apache-2.0"
] |
permissive
|
mindis/tinkerpop3
|
40d1bf8d1c8f8ff379898635adc9b4c81c0f282a
|
5c7a5a69dc8db32924913e8bfe451c90c891fe48
|
refs/heads/master
| 2021-01-18T05:29:37.149674
| 2014-09-19T16:58:52
| 2014-09-19T16:58:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,675
|
java
|
package com.tinkerpop.gremlin.server.op.standard;
import com.codahale.metrics.Timer;
import com.tinkerpop.gremlin.driver.Tokens;
import com.tinkerpop.gremlin.driver.message.RequestMessage;
import com.tinkerpop.gremlin.driver.message.ResponseMessage;
import com.tinkerpop.gremlin.driver.message.ResponseStatusCode;
import com.tinkerpop.gremlin.process.Traversal;
import com.tinkerpop.gremlin.process.util.SingleIterator;
import com.tinkerpop.gremlin.server.Context;
import com.tinkerpop.gremlin.server.GremlinServer;
import com.tinkerpop.gremlin.server.op.OpProcessorException;
import com.tinkerpop.gremlin.server.util.MetricManager;
import com.tinkerpop.gremlin.structure.Graph;
import com.tinkerpop.gremlin.util.Serializer;
import com.tinkerpop.gremlin.util.function.SFunction;
import io.netty.channel.ChannelHandlerContext;
import org.apache.commons.collections.iterators.ArrayIterator;
import org.javatuples.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;
import static com.codahale.metrics.MetricRegistry.name;
/**
* Operations to be used by the {@link StandardOpProcessor}.
*
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
final class StandardOps {
private static final Logger logger = LoggerFactory.getLogger(StandardOps.class);
private static final Timer evalOpTimer = MetricManager.INSTANCE.getTimer(name(GremlinServer.class, "op", "eval"));
private static final Timer traverseOpTimer = MetricManager.INSTANCE.getTimer(name(GremlinServer.class, "op", "traverse"));
public static void evalOp(final Context context) throws OpProcessorException {
final Timer.Context timerContext = evalOpTimer.time();
final ChannelHandlerContext ctx = context.getChannelHandlerContext();
final RequestMessage msg = context.getRequestMessage();
final String script = (String) msg.getArgs().get(Tokens.ARGS_GREMLIN);
final Optional<String> language = Optional.ofNullable((String) msg.getArgs().get(Tokens.ARGS_LANGUAGE));
final Map<String, Object> bindings = Optional.ofNullable((Map<String, Object>) msg.getArgs().get(Tokens.ARGS_BINDINGS)).orElse(new HashMap<>());
final CompletableFuture<Object> future = context.getGremlinExecutor().eval(script, language, bindings);
future.handle((v, t) -> timerContext.stop());
future.thenAccept(o -> ctx.write(Pair.with(msg, convertToIterator(o))));
future.exceptionally(se -> {
logger.warn(String.format("Exception processing a script on request [%s].", msg), se);
ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION).statusMessage(se.getMessage()).create());
return null;
});
}
public static void traverseOp(final Context context) throws OpProcessorException {
final Timer.Context timerContext = traverseOpTimer.time();
final ChannelHandlerContext ctx = context.getChannelHandlerContext();
final RequestMessage msg = context.getRequestMessage();
final Map<String, Object> args = msg.getArgs();
final Map<String, Object> bindings = Optional.ofNullable((Map<String, Object>) args.get(Tokens.ARGS_BINDINGS)).orElse(new HashMap<>());
final SFunction<Graph, Traversal> traversal;
try {
// deserialize the traversal and shove it into the bindings so that it can be executed within the
// scriptengine. the scriptengine acts as a sandbox within which to execute the traversal.
traversal = (SFunction<Graph, Traversal>) Serializer.deserializeObject((byte[]) args.get(Tokens.ARGS_GREMLIN));
bindings.put("____trvrslScrpt", traversal);
} catch (Exception ex) {
logger.warn(String.format("Exception processing a traversal on request [%s].", msg), ex);
ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TRAVERSAL_EVALUATION).statusMessage(ex.getMessage()).create());
return;
}
// todo: different errors for traversal evaluation versus deserialization??
final String script = String.format("____trvrslScrpt.apply(%s)", args.get(Tokens.ARGS_GRAPH_NAME));
final CompletableFuture<Object> future = context.getGremlinExecutor().eval(script, bindings);
future.handle((v, t) -> timerContext.stop());
future.thenAccept(o -> ctx.write(Pair.with(msg, convertToIterator(o))));
future.exceptionally(se -> {
logger.warn(String.format("Exception processing a traversal on request [%s].", msg), se);
ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_TRAVERSAL_EVALUATION).statusMessage(se.getMessage()).create());
return null;
});
}
private static Iterator convertToIterator(final Object o) {
final Iterator itty;
if (o instanceof Iterable)
itty = ((Iterable) o).iterator();
else if (o instanceof Iterator)
itty = (Iterator) o;
else if (o instanceof Object[])
itty = new ArrayIterator(o);
else if (o instanceof Stream)
itty = ((Stream) o).iterator();
else if (o instanceof Map)
itty = ((Map) o).entrySet().iterator();
else if (o instanceof Throwable)
itty = new SingleIterator<Object>(((Throwable) o).getMessage());
else
itty = new SingleIterator<>(o);
return itty;
}
}
|
[
"spmva@genoprime.com"
] |
spmva@genoprime.com
|
e86e5019d5c065dc229853076f99545439c6834b
|
62d7001e9991e8d8cfa08612a02b5a96cb867248
|
/reveno-test-model/src/main/java/org/reveno/atp/acceptance/model/immutable/ImmutableOrder.java
|
52ae56ae3d52a8ce1d233e06f6fdd41f5f8d5e74
|
[
"Apache-2.0"
] |
permissive
|
ulwfcyvi791837060/reveno
|
b12610fd45e162b0c7fd2d76d6722f23cb72388f
|
ecbf6ebcbf2966e989fe5cd50b76c4efa23758aa
|
refs/heads/master
| 2020-08-28T08:43:55.851427
| 2019-10-27T14:49:51
| 2019-10-27T14:49:51
| 217,652,488
| 0
| 0
|
Apache-2.0
| 2019-10-26T03:50:14
| 2019-10-26T03:50:14
| null |
UTF-8
|
Java
| false
| false
| 2,201
|
java
|
package org.reveno.atp.acceptance.model.immutable;
import org.reveno.atp.acceptance.model.Order;
import java.util.Optional;
public class ImmutableOrder implements Order {
public static final OrderFactory FACTORY = new OrderFactory() {
@Override
public Order create(long id, long accId, Optional<Long> positionId,
String symbol, long price, long size, long time, OrderStatus status,
OrderType type) {
return new ImmutableOrder(id, accId, positionId, symbol, price, size, time, status, type);
}
};
private final long id;
private final long accountId;
private final Long positionId;
private final String symbol;
private final long price;
private final long size;
private final long time;
private final OrderStatus status;
private final OrderType type;
public ImmutableOrder(long id, long accId, Optional<Long> positionId, String symbol,
long price, long size, long time, OrderStatus status, OrderType type) {
this.id = id;
this.accountId = accId;
this.positionId = positionId.orElse(null);
this.symbol = symbol;
this.price = price;
this.size = size;
this.time = time;
this.status = status;
this.type = type;
}
public long id() {
return id;
}
public long accountId() {
return accountId;
}
public Optional<Long> positionId() {
return Optional.ofNullable(positionId);
}
public String symbol() {
return symbol;
}
public long price() {
return price;
}
public long size() {
return size;
}
public long time() {
return time;
}
public OrderStatus orderStatus() {
return status;
}
public OrderType orderType() {
return type;
}
public ImmutableOrder update(OrderStatus status) {
return new ImmutableOrder(this.id, this.accountId, this.positionId(), this.symbol, this.price, this.size, this.time, status, this.type);
}
@Override
public boolean isImmutable() {
return true;
}
}
|
[
"art.dm.ser@gmail.com"
] |
art.dm.ser@gmail.com
|
30c16d4c05252ee9fe0d02b063ac71adfe09ddc3
|
ce64b85caaa9ba8412ef395b2467db21bff2b964
|
/thaumcraft/codechicken/lib/render/uv/UVTransformation.java
|
2d38aaf887de73d8d4e2c5df37ab7317ca599cc0
|
[] |
no_license
|
mem0rz/Thaumcraft-6
|
a9e03cdb36edbb0f4fc1b152accb5c1083b6f22a
|
eab3b4be1e3bd160936b46aac3e5898dec818902
|
refs/heads/master
| 2022-03-08T10:09:24.709603
| 2019-10-27T00:40:15
| 2019-10-27T00:40:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,398
|
java
|
/* */ package thaumcraft.codechicken.lib.render.uv;
/* */
/* */ import thaumcraft.codechicken.lib.render.CCRenderState;
/* */ import thaumcraft.codechicken.lib.vec.ITransformation;
/* */
/* */
/* */ public abstract class UVTransformation
/* */ extends ITransformation<UV, UVTransformation>
/* */ implements CCRenderState.IVertexOperation
/* */ {
/* 11 */ public static final int operationIndex = CCRenderState.registerOperation();
/* */
/* */
/* 14 */ public UVTransformation at(UV point) { return new UVTransformationList(new UVTransformation[] { new UVTranslation(-point.u, -point.v), this, new UVTranslation(point.u, point.v) }); }
/* */
/* */
/* */
/* 18 */ public UVTransformationList with(UVTransformation t) { return new UVTransformationList(new UVTransformation[] { this, t }); }
/* */
/* */
/* */
/* */
/* 23 */ public boolean load() { return !isRedundant(); }
/* */
/* */
/* */
/* */
/* 28 */ public void operate() { apply(CCRenderState.vert.uv); }
/* */
/* */
/* */
/* */
/* 33 */ public int operationID() { return operationIndex; }
/* */ }
/* Location: D:\工程开发\Cracked\Thaumcraft-1.12.2-6.1.BETA26.jar!\thaumcraft\codechicken\lib\rende\\uv\UVTransformation.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/
|
[
"3293876954@qq.com"
] |
3293876954@qq.com
|
23045029bf316b9d03cb43e61add42a3edb5e20d
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/fc/acct/dm/FC_ACCT_8010_MDM.java
|
cda431d52f90edfebaf9424b5830866736e57fe8
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 3,439
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.fc.acct.dm;
import java.sql.*;
import oracle.jdbc.driver.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.fc.acct.ds.*;
import chosun.ciis.fc.acct.rec.*;
/**
*
*/
public class FC_ACCT_8010_MDM extends somo.framework.db.BaseDM implements java.io.Serializable{
public String cmpy_cd;
public FC_ACCT_8010_MDM(){}
public FC_ACCT_8010_MDM(String cmpy_cd){
this.cmpy_cd = cmpy_cd;
}
public void setCmpy_cd(String cmpy_cd){
this.cmpy_cd = cmpy_cd;
}
public String getCmpy_cd(){
return this.cmpy_cd;
}
public String getSQL(){
return "{ call MISFNC.SP_FC_ACCT_8010_M(? ,? ,? ,?) }";
}
public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{
FC_ACCT_8010_MDM dm = (FC_ACCT_8010_MDM)bdm;
cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.registerOutParameter(2, Types.VARCHAR);
cstmt.setString(3, dm.cmpy_cd);
cstmt.registerOutParameter(4, OracleTypes.CURSOR);
}
public BaseDataSet createDataSetObject(){
return new chosun.ciis.fc.acct.ds.FC_ACCT_8010_MDataSet();
}
public void print(){
System.out.println("SQL = " + this.getSQL());
System.out.println("cmpy_cd = [" + getCmpy_cd() + "]");
}
}
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오.
String cmpy_cd = req.getParameter("cmpy_cd");
if( cmpy_cd == null){
System.out.println(this.toString+" : cmpy_cd is null" );
}else{
System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd );
}
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리시 사용하십시오.
String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd"));
----------------------------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------------------------
Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오.
String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd")));
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DM 파일의 변수를 설정시 사용하십시오.
dm.setCmpy_cd(cmpy_cd);
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Tue Jun 23 09:42:53 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
13121bdd8d1b6aeed2656ba2d3397df137b67195
|
2f3eb93193953e4227cee0a3e3cb5f188b583abc
|
/citrus-admin-web/src/main/java/com/consol/citrus/admin/service/command/maven/MavenArchetypeCommand.java
|
1424036e3cd1fcfbf6cd9e555ed2149b1068256e
|
[
"Apache-2.0"
] |
permissive
|
gucce/citrus-admin
|
81d283b73f4aeebd4a6d26b4de151f8fd362ba41
|
ce913e7f37862484786b415081f6f08569c80be8
|
refs/heads/master
| 2021-06-21T13:06:02.730945
| 2017-07-17T08:53:52
| 2017-07-17T08:53:52
| 97,950,525
| 0
| 0
| null | 2017-07-21T13:32:43
| 2017-07-21T13:32:43
| null |
UTF-8
|
Java
| false
| false
| 2,623
|
java
|
/*
* Copyright 2006-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.consol.citrus.admin.service.command.maven;
import com.consol.citrus.admin.model.build.maven.MavenBuildConfiguration;
import com.consol.citrus.admin.model.maven.Archetype;
import com.consol.citrus.admin.process.listener.ProcessListener;
import org.springframework.util.StringUtils;
import java.io.File;
/**
* @author Christoph Deppisch
*/
public class MavenArchetypeCommand extends MavenCommand {
private static final String GENERATE = "archetype:generate ";
/**
* Constructor for executing a command.
*
* @param workingDirectory
* @param buildConfiguration
* @param shellListeners
*/
public MavenArchetypeCommand(File workingDirectory, MavenBuildConfiguration buildConfiguration, ProcessListener... shellListeners) {
super(workingDirectory, buildConfiguration, shellListeners);
}
/**
* Use test command for single test group.
* @param archetype
* @return
*/
public MavenArchetypeCommand generate(Archetype archetype) {
StringBuilder commandBuilder = new StringBuilder();
commandBuilder.append(GENERATE);
commandBuilder.append("-B ");
commandBuilder.append(String.format("-DarchetypeGroupId=%s ", archetype.getArchetypeGroupId()));
commandBuilder.append(String.format("-DarchetypeArtifactId=%s ", archetype.getArchetypeArtifactId()));
commandBuilder.append(String.format("-DarchetypeVersion=%s ", archetype.getArchetypeVersion()));
commandBuilder.append(String.format("-DgroupId=%s ", archetype.getGroupId()));
commandBuilder.append(String.format("-DartifactId=%s ", archetype.getArtifactId()));
commandBuilder.append(String.format("-Dversion=%s ", archetype.getVersion()));
commandBuilder.append(String.format("-Dpackage=%s ", StringUtils.hasText(archetype.getPackageName()) ? archetype.getPackageName() : archetype.getGroupId()));
lifecycleCommand += commandBuilder.toString();
return this;
}
}
|
[
"deppisch@consol.de"
] |
deppisch@consol.de
|
a212b2b30a576a8b870ddad97ad4971bdb6aae17
|
f0397daab2782944f01d49de38849d8ebce754cc
|
/OLink-kernel/OLink-bpm/src/main/java/com/olink/tools/SMSEmayClient.java
|
64275bee9e8970f0d08645f18724561ecc5023fa
|
[] |
no_license
|
jameszgw/account-kernel
|
2687949a94cb1c79d62ae5fd8bbeb15dc1368ed8
|
ef6f7d2cfea0592abc4a8cac6ca875392fddc851
|
refs/heads/master
| 2023-05-14T12:30:07.501608
| 2018-05-04T03:18:40
| 2018-05-04T03:18:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,229
|
java
|
package com.olink.tools;
import cn.emay.sdk.client.api.Client;
import OLink.bpm.core.shortmessage.submission.ejb.SubmitMessageVO;
/***
* 亿美软通短信平台
*
* @author Lin Rui
*/
public class SMSEmayClient {
private int iResult = 0;
/**
* 供应商账号、密码、下行对象
*
* @param acc
* @param pwd
* @param vo
* @return
*/
public int SMSSend(String acc, String pwd, SubmitMessageVO vo) {
try {
Client myClient = new Client(acc, pwd);
int myReg = myClient.registEx(pwd);
int iRet = myClient.sendSMS(new String[]{vo.getReceiver()}, vo.getTitle() + ":" + vo.getContent(), 3);
iResult = iRet;
return iRet;
} catch (Exception e) {
iResult = -1;
e.printStackTrace();
}
return iResult;
}
/**
* @param acc
* @param pwd
* @param recv
* @param strTitle
* @param strContent
* @return
*/
public int SMSSend(String acc, String pwd, String recv, String strTitle, String strContent) {
try {
Client myClient = new Client(acc, pwd);
int myReg = myClient.registEx(pwd);
int iRet = myClient.sendSMS(new String[]{recv}, strTitle + ":" + strContent, 3);
iResult = iRet;
return iRet;
} catch (Exception e) {
iResult = -1;
e.printStackTrace();
}
return iResult;
}
/***
* 获取系统剩余短信条数
*
* @param acc
* @param pwd
* @return
*/
public String getSystemLeftSMSNumber(String acc, String pwd) {
try {
Client myClient = new Client(acc, pwd);
int myReg = myClient.registEx(pwd);
double dBalance = myClient.getBalance();
double perMoney = myClient.getEachFee();
double dNumber = dBalance / perMoney;
System.out.println("短信发送结果:剩余短信-" + dNumber + "条;" + "当前单价:" + perMoney);
return Integer.toString((int) dNumber);
} catch (Exception e) {
e.printStackTrace();
}
return "0";
}
}
|
[
"391289241@qq.com"
] |
391289241@qq.com
|
42eab31f157d1b87d34f24b0ebf7ced9cef91754
|
d00d3b49369e697901375e68fa060d76b61f10ee
|
/src/main/java/me/hao0/wechat/model/material/PermMaterial.java
|
4398f5f777769ee56eb57362ea1a63ded795d8f0
|
[
"MIT"
] |
permissive
|
ihaolin/wechat
|
99a1f45e2f30b8df2cf8d7ad22a6ad5e3373b558
|
57867a063a4fcb54fd3772443a5ab2bc2a09ff9e
|
refs/heads/master
| 2020-04-07T00:03:09.357985
| 2019-05-01T03:57:26
| 2019-05-01T03:57:26
| 45,775,575
| 219
| 102
|
MIT
| 2019-04-26T05:24:34
| 2015-11-08T10:16:11
|
Java
|
UTF-8
|
Java
| false
| false
| 933
|
java
|
package me.hao0.wechat.model.material;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
/**
* 上传永久素材后的返回对象
* Author: haolin
* Author: haolin
* Email: haolin.h0@gmail.com
* Date: 13/11/15
*/
public class PermMaterial implements Serializable {
private static final long serialVersionUID = 4907386605074554874L;
@JsonProperty("media_id")
private String mediaId;
private String url;
public String getMediaId() {
return mediaId;
}
public void setMediaId(String mediaId) {
this.mediaId = mediaId;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public String toString() {
return "PermMaterial{" +
"mediaId='" + mediaId + '\'' +
", url='" + url + '\'' +
'}';
}
}
|
[
"haolin.h0@gmail.com"
] |
haolin.h0@gmail.com
|
94f301166c94dfb1cefedaeefa7b6a6517d9620c
|
eeb2b46508ef2e61b1b27196261681fbeac14eff
|
/functional-reactive/src/main/java/org/rapidpm/frp/model/serial/Tripel.java
|
b41a23ad704de553b3d5c91b1d3358ec72d1817e
|
[
"Apache-2.0"
] |
permissive
|
dve/functional-reactive-lib
|
b44b3f21076bd2a87cc1ba5eb2bf5bda022affe8
|
d08a2c7b58a3364a7c0c7689fc9e5d889c95e8c9
|
refs/heads/master
| 2021-08-31T06:08:40.191862
| 2017-11-22T16:15:19
| 2017-11-22T16:15:19
| 114,368,779
| 0
| 0
| null | 2017-12-15T12:33:26
| 2017-12-15T12:33:26
| null |
UTF-8
|
Java
| false
| false
| 2,082
|
java
|
package org.rapidpm.frp.model.serial;
import java.io.Serializable;
/**
* Copyright (C) 2010 RapidPM
* 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.
* <p>
* Created by RapidPM - Team on 10.12.16.
*/
public class Tripel<T1 extends Serializable, T2 extends Serializable, T3 extends Serializable> {
private T1 t1;
private T2 t2;
private T3 t3;
public Tripel(final T1 t1, final T2 t2, final T3 t3) {
this.t1 = t1;
this.t2 = t2;
this.t3 = t3;
}
public T3 getT3() {
return t3;
}
public T1 getT1() {
return t1;
}
public T2 getT2() {
return t2;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (! (o instanceof Tripel)) return false;
Tripel<?, ?, ?> tripel = (Tripel<?, ?, ?>) o;
if (t1 != null ? ! t1.equals(tripel.t1) : tripel.t1 != null) return false;
if (t2 != null ? ! t2.equals(tripel.t2) : tripel.t2 != null) return false;
return t3 != null ? t3.equals(tripel.t3) : tripel.t3 == null;
}
@Override
public int hashCode() {
int result = t1 != null ? t1.hashCode() : 0;
result = 31 * result + (t2 != null ? t2.hashCode() : 0);
result = 31 * result + (t3 != null ? t3.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Tripel{" +
"t1=" + t1 +
", t2=" + t2 +
", t3=" + t3 +
'}';
}
public static <T1 extends Serializable, T2 extends Serializable, T3 extends Serializable> Tripel<T1, T2, T3> next(final T1 t1, final T2 t2, final T3 t3) {
return new Tripel<>(t1, t2, t3);
}
}
|
[
"sven.ruppert@gmail.com"
] |
sven.ruppert@gmail.com
|
c61289f1b861a7074e56c44e0d36d3db8adbc533
|
c69d0e6106c67e9daacd165e9c42d7669aa1e8ee
|
/src/main/java/com/cybertekReservationApp/utilities/ExcelUtil.java
|
cc0924f37da42d75373eba6afe8c12a5ead714d4
|
[] |
no_license
|
bayrambinbir/CybertekSchoolReservationApp
|
bacbba0ca00740dcc01904de209000598abf48b2
|
0234107f0b5798ffcb212631c82fd7d128fa1e6b
|
refs/heads/master
| 2020-03-27T02:07:09.274105
| 2018-08-29T19:18:08
| 2018-08-29T19:18:08
| 145,768,124
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,204
|
java
|
package com.cybertekReservationApp.utilities;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
/*
* This is a utility for reading from writing to excel files.
* it ONLY works with xlsx files.
*/
public class ExcelUtil {
private XSSFSheet workSheet;
private XSSFWorkbook workBook;
private String path;
public ExcelUtil(String path, String sheetName) {
this.path = path;
try {
// Open the Excel file
FileInputStream ExcelFile = new FileInputStream(path);
// Access the required test data sheet
workBook = new XSSFWorkbook(ExcelFile);
workSheet = workBook.getSheet(sheetName);
} catch (Exception e) {
e.printStackTrace();
}
}
public String getCellData(int rowNum, int colNum) {
XSSFCell cell;
try {
cell = workSheet.getRow(rowNum).getCell(colNum);
String cellData = cell.toString();
return cellData;
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
public String[][] getDataArray() {
String[][] data = new String[rowCount()][columnCount()];
for (int i = 0; i <rowCount(); i++) {
for (int j = 0; j < columnCount(); j++) {
String value = getCellData(i, j);
data[i][j] = value;
}
}
return data;
}
public List<Map<String, String>> getDataList() {
// get all columns
List<String> columns = getColumnsNames();
// this will be returned
List<Map<String, String>> data = new ArrayList<>();
for (int i = 1; i < rowCount(); i++) {
// get each row
Row row = workSheet.getRow(i);
// create map of the row using the column and value
// column map key, cell value --> map bvalue
Map<String, String> rowMap = new HashMap<String, String>();
for (Cell cell : row) {
int columnIndex = cell.getColumnIndex();
rowMap.put(columns.get(columnIndex), cell.toString());
}
data.add(rowMap);
}
return data;
}
public List<String> getColumnsNames() {
List<String> columns = new ArrayList<>();
for (Cell cell : workSheet.getRow(0)) {
columns.add(cell.toString());
}
return columns;
}
public void setCellData(String value, int rowNum, int colNum) {
XSSFCell cell;
XSSFRow row;
try {
row = workSheet.getRow(rowNum);
cell = row.getCell(colNum);
if (cell == null) {
cell = row.createCell(colNum);
cell.setCellValue(value);
} else {
cell.setCellValue(value);
}
FileOutputStream fileOut = new FileOutputStream(path);
workBook.write(fileOut);
fileOut.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public void setCellData(String value, String columnName, int row) {
int column = getColumnsNames().indexOf(columnName);
setCellData(value, row, column);
}
public int columnCount() {
return workSheet.getRow(0).getLastCellNum();
}
public int rowCount() {
return workSheet.getPhysicalNumberOfRows();
}
}
|
[
"email@email.com"
] |
email@email.com
|
0135974edf4edd78a0f4ec488a4f455311a012ab
|
d5f09c7b0e954cd20dd613af600afd91b039c48a
|
/sources/androidx/databinding/ObservableBoolean.java
|
a248edca3cbb955ced4d3802259ac60cc9c14875
|
[] |
no_license
|
t0HiiBwn/CoolapkRelease
|
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
|
a6a2b03e32cde0e5163016e0078391271a8d33ab
|
refs/heads/main
| 2022-07-29T23:28:35.867734
| 2021-03-26T11:41:18
| 2021-03-26T11:41:18
| 345,290,891
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,592
|
java
|
package androidx.databinding;
import android.os.Parcel;
import android.os.Parcelable;
import java.io.Serializable;
public class ObservableBoolean extends BaseObservableField implements Parcelable, Serializable {
public static final Parcelable.Creator<ObservableBoolean> CREATOR = new Parcelable.Creator<ObservableBoolean>() {
/* class androidx.databinding.ObservableBoolean.AnonymousClass1 */
@Override // android.os.Parcelable.Creator
public ObservableBoolean createFromParcel(Parcel parcel) {
boolean z = true;
if (parcel.readInt() != 1) {
z = false;
}
return new ObservableBoolean(z);
}
@Override // android.os.Parcelable.Creator
public ObservableBoolean[] newArray(int i) {
return new ObservableBoolean[i];
}
};
static final long serialVersionUID = 1;
private boolean mValue;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public ObservableBoolean(boolean z) {
this.mValue = z;
}
public ObservableBoolean() {
}
public ObservableBoolean(Observable... observableArr) {
super(observableArr);
}
public boolean get() {
return this.mValue;
}
public void set(boolean z) {
if (z != this.mValue) {
this.mValue = z;
notifyChange();
}
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.mValue ? 1 : 0);
}
}
|
[
"test@gmail.com"
] |
test@gmail.com
|
ff40927a049a98616b6d912acb77e51c2663b82d
|
d4506724ba8a4f2ae64b999d9e6631c7a149b45c
|
/src/main/java/yd/swig/SWIGTYPE_p_f_p__GIOChannel__GIOFlags.java
|
d35076c4e858d942539176d47aa93fbba3042d2a
|
[] |
no_license
|
ydaniels/frida-java
|
6dc70b327ae8e8a6d808a0969e861225dcc0192b
|
cf3c198b2a4b7c7a3a186359b5c8c768deacb285
|
refs/heads/master
| 2022-12-08T21:28:27.176045
| 2019-10-24T09:51:44
| 2019-10-24T09:51:44
| 214,268,850
| 2
| 1
| null | 2022-11-25T19:46:38
| 2019-10-10T19:30:26
|
Java
|
UTF-8
|
Java
| false
| false
| 817
|
java
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package yd.swig;
public class SWIGTYPE_p_f_p__GIOChannel__GIOFlags {
private transient long swigCPtr;
protected SWIGTYPE_p_f_p__GIOChannel__GIOFlags(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_f_p__GIOChannel__GIOFlags() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_f_p__GIOChannel__GIOFlags obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
|
[
"yomi@erpsoftapp.com"
] |
yomi@erpsoftapp.com
|
89e890c713b87b8df2bb73bc963a631744f4459c
|
2bf7d14c0be6044ea2a41b4d43900ec4fe12ee32
|
/app/src/main/java/com/example/administrator/bt_buoi14_altp/QuesTion.java
|
0701793513e0ae415e8673652534cff8eb1a6920
|
[] |
no_license
|
thinhkaku/ailatrieuphu
|
0eba3338408de83f24565d600758c39940290a38
|
68d663bb69bbf3ad90ab65c88f7ed47c6f9cfabd
|
refs/heads/master
| 2021-04-03T08:40:59.287769
| 2018-03-12T12:40:01
| 2018-03-12T12:40:01
| 124,886,704
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,702
|
java
|
package com.example.administrator.bt_buoi14_altp;
import java.io.Serializable;
/**
* Created by Administrator on 9/22/2017.
*/
public class QuesTion implements Serializable {
private int id;
private String question;
private String caseA, caseB, caseC, caseD;
private int trueCase;
public QuesTion() {
}
public QuesTion(int id, String question, String caseA, String caseB, String caseC, String caseD, int trueCase) {
this.id = id;
this.question = question;
this.caseA = caseA;
this.caseB = caseB;
this.caseC = caseC;
this.caseD = caseD;
this.trueCase = trueCase;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getCaseA() {
return caseA;
}
public void setCaseA(String caseA) {
this.caseA = caseA;
}
public String getCaseB() {
return caseB;
}
public void setCaseB(String caseB) {
this.caseB = caseB;
}
public String getCaseC() {
return caseC;
}
public void setCaseC(String caseC) {
this.caseC = caseC;
}
public String getCaseD() {
return caseD;
}
public void setCaseD(String caseD) {
this.caseD = caseD;
}
public int getTrueCase() {
return trueCase;
}
public void setTrueCase(int trueCase) {
this.trueCase = trueCase;
}
}
|
[
"you@example.com"
] |
you@example.com
|
4fa0d4999f963ef4c8410d0e1aea43835dcccaf7
|
6ee92ecc85ba29f13769329bc5a90acea6ef594f
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/levelonecategory/CandidateLevelOneCategory.java
|
7f7a5f152bfe665869885dd9a39291356af04669
|
[] |
no_license
|
doublechaintech/scm-biz-suite
|
b82628bdf182630bca20ce50277c41f4a60e7a08
|
52db94d58b9bd52230a948e4692525ac78b047c7
|
refs/heads/master
| 2023-08-16T12:16:26.133012
| 2023-05-26T03:20:08
| 2023-05-26T03:20:08
| 162,171,043
| 1,387
| 500
| null | 2023-07-08T00:08:42
| 2018-12-17T18:07:12
|
Java
|
UTF-8
|
Java
| false
| false
| 204
|
java
|
package com.doublechaintech.retailscm.levelonecategory;
import com.doublechaintech.retailscm.BaseCandidateEntity;
public class CandidateLevelOneCategory extends BaseCandidateEntity<LevelOneCategory> {}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
ff2320349038bf9ebb3c78bc77e37b2444ead8da
|
9c65284a0069cf6d0e3bf19919fc229fd74789ba
|
/gt_front_server/src/main/java/com/gt/service/front/FrontBankInfoServiceImpl.java
|
620a9e25154566504549fb15fc15845389ad0490
|
[] |
no_license
|
moguli/powex
|
95aa2699b6fbf92aef6ab7b5203864148af29467
|
56348db54db9456234010e5a20f9f8a09d234c64
|
refs/heads/master
| 2022-12-28T03:52:59.442332
| 2019-09-08T10:04:25
| 2019-09-08T10:04:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 704
|
java
|
package com.gt.service.front;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gt.Enum.SystemBankInfoEnum;
import com.gt.dao.SystembankinfoDAO;
import com.gt.entity.Systembankinfo;
@Service("frontBankInfoService")
public class FrontBankInfoServiceImpl implements FrontBankInfoService{
@Autowired
private SystembankinfoDAO systembankinfoDAO ;
public List<Systembankinfo> findAllSystemBankInfo(){
return this.systembankinfoDAO.findByProperty("fstatus", SystemBankInfoEnum.NORMAL_VALUE) ;
}
public Systembankinfo findSystembankinfoById(int id){
return this.systembankinfoDAO.findById(id) ;
}
}
|
[
"185428479@qq.com"
] |
185428479@qq.com
|
6d3eb2972c71df653cc98a5bfb9416dd5d29d91d
|
d8bc39755eeb470b031205d7f96fb834e44af1ad
|
/src/main/java/com/_7aske/grain/exception/json/JsonDeserializationException.java
|
ee2792100ad963efeed0f5874b09d2f668ce03a8
|
[] |
no_license
|
tzivadinovic/grain
|
39e24a1d3958adefe5319987b08f2ca0a5fe36b3
|
ab3c504ef145f7e2b68ea0fbee762a2ee61e4825
|
refs/heads/master
| 2023-07-18T06:00:38.861801
| 2021-09-05T22:25:57
| 2021-09-05T22:25:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 322
|
java
|
package com._7aske.grain.exception.json;
import com._7aske.grain.exception.http.HttpException;
import static com._7aske.grain.http.HttpStatus.BAD_REQUEST;
public class JsonDeserializationException extends HttpException {
public JsonDeserializationException(String message) {
super(message, BAD_REQUEST, null);
}
}
|
[
"ntasic7@gmail.com"
] |
ntasic7@gmail.com
|
20b80c5c6eb6ff4b0c8ca35adbfddefc04d8cce8
|
1ed626a8b0bb99860e759ac613da0f57b59fcf45
|
/plugins/android/eeui/src/main/java/app/eeui/framework/extend/integration/zxing/client/result/VINParsedResult.java
|
a12cae077ef4941f8f03d2b393a56d4052ef7d6f
|
[
"MIT"
] |
permissive
|
iquejay/eeui-template
|
c407eae90aab67d9edb482395dc1fe28ebc9efc8
|
c819666efcdc85e57e6f59b74bd15becf9b64c21
|
refs/heads/master
| 2020-09-08T10:23:04.819923
| 2019-11-13T15:35:32
| 2019-11-13T15:35:32
| 221,107,208
| 0
| 0
|
MIT
| 2020-06-25T16:19:27
| 2019-11-12T01:55:03
|
C++
|
UTF-8
|
Java
| false
| false
| 3,189
|
java
|
/*
* Copyright 2014 ZXing 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 app.eeui.framework.extend.integration.zxing.client.result;
/**
* Represents a parsed result that encodes a Vehicle Identification Number (VIN).
*/
public final class VINParsedResult extends ParsedResult {
private final String vin;
private final String worldManufacturerID;
private final String vehicleDescriptorSection;
private final String vehicleIdentifierSection;
private final String countryCode;
private final String vehicleAttributes;
private final int modelYear;
private final char plantCode;
private final String sequentialNumber;
public VINParsedResult(String vin,
String worldManufacturerID,
String vehicleDescriptorSection,
String vehicleIdentifierSection,
String countryCode,
String vehicleAttributes,
int modelYear,
char plantCode,
String sequentialNumber) {
super(ParsedResultType.VIN);
this.vin = vin;
this.worldManufacturerID = worldManufacturerID;
this.vehicleDescriptorSection = vehicleDescriptorSection;
this.vehicleIdentifierSection = vehicleIdentifierSection;
this.countryCode = countryCode;
this.vehicleAttributes = vehicleAttributes;
this.modelYear = modelYear;
this.plantCode = plantCode;
this.sequentialNumber = sequentialNumber;
}
public String getVIN() {
return vin;
}
public String getWorldManufacturerID() {
return worldManufacturerID;
}
public String getVehicleDescriptorSection() {
return vehicleDescriptorSection;
}
public String getVehicleIdentifierSection() {
return vehicleIdentifierSection;
}
public String getCountryCode() {
return countryCode;
}
public String getVehicleAttributes() {
return vehicleAttributes;
}
public int getModelYear() {
return modelYear;
}
public char getPlantCode() {
return plantCode;
}
public String getSequentialNumber() {
return sequentialNumber;
}
@Override
public String getDisplayResult() {
StringBuilder result = new StringBuilder(50);
result.append(worldManufacturerID).append(' ');
result.append(vehicleDescriptorSection).append(' ');
result.append(vehicleIdentifierSection).append('\n');
if (countryCode != null) {
result.append(countryCode).append(' ');
}
result.append(modelYear).append(' ');
result.append(plantCode).append(' ');
result.append(sequentialNumber).append('\n');
return result.toString();
}
}
|
[
"aipaw@live.cn"
] |
aipaw@live.cn
|
2b8dd2bc1c3ec1d4e595c885dc686092b7f9183d
|
11d3f9c012168c859094cf0b4d3a018c263e8d53
|
/org/haldean/swing/ComponentImager.java
|
9288d42a6b8a871e499d7c6d461c67c71603c94a
|
[] |
no_license
|
adeelateeque/SimpleGraph
|
04fa26c9b150ab8bf8a501dee813aca731e2ffda
|
8e34f0e33e1c270b55316759fe68c3922171a8a3
|
refs/heads/master
| 2021-01-16T20:44:24.528254
| 2010-08-09T04:49:51
| 2010-08-09T04:49:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 936
|
java
|
package org.haldean.swing;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JComponent;
public class ComponentImager {
public static BufferedImage componentToImage(Component component) {
Dimension componentSize = component.getSize();
BufferedImage image = new BufferedImage((int) componentSize.getWidth(),
(int) componentSize.getHeight(),
BufferedImage.TYPE_INT_RGB);
component.paint(image.createGraphics());
return image;
}
public static void componentToImageFile(Component component, String filePath) throws IOException {
BufferedImage componentImage = componentToImage(component);
ImageIO.write(componentImage, "png", new File(filePath));
}
}
|
[
"will.h.brown@gmail.com"
] |
will.h.brown@gmail.com
|
565a9540e38753fb298ede85f1499e528cf22036
|
0091c7ad92ca14a1f598a5ded80a43da25b41082
|
/parkingos_android_pc/src/com/zld/bean/CurrentHistoryOrder.java
|
e8b47e5f3cd8b005cbaf86b1c3302e22661ad394
|
[] |
no_license
|
dlzdy/ParkingOS_local
|
51f9ab839162ab8d9bbf3fc28acf9345645f9708
|
485ecf823390a933249a80a5c0c84b6d8177845e
|
refs/heads/master
| 2020-03-25T10:58:13.822994
| 2018-11-21T05:36:50
| 2018-11-21T05:36:50
| 143,713,467
| 0
| 1
| null | 2018-08-06T10:32:54
| 2018-08-06T10:32:54
| null |
UTF-8
|
Java
| false
| false
| 801
|
java
|
package com.zld.bean;
import java.io.Serializable;
import java.util.ArrayList;
@SuppressWarnings("serial")
public class CurrentHistoryOrder implements Serializable{
private String count;
private String price;
private ArrayList<HistoryOrder> info;
public CurrentHistoryOrder() {
super();
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public ArrayList<HistoryOrder> getInfo() {
return info;
}
public void setInfo(ArrayList<HistoryOrder> info) {
this.info = info;
}
@Override
public String toString() {
return "CurrentHistoryOrder [count=" + count + ", price=" + price
+ ", info=" + info + "]";
}
}
|
[
"you@example.com"
] |
you@example.com
|
0bbbf136d30add8aec166fe0727d89c1fe167076
|
3bb056958709def9dd5594dadae7bb45729ed0b8
|
/springboot-demo/src/main/java/cn/cjf/springboot/swagger2/SwaggerConfig.java
|
398faccc4e7325f6dfde5f3b2fb8d292d0af75d7
|
[] |
no_license
|
c19t043/study-demo
|
e0691cda091eb14224ac9bb3fe4e3c0177a60457
|
bda26327832414965447a3b41a7be6fe917bafb3
|
refs/heads/master
| 2020-04-01T19:43:44.349811
| 2019-05-22T00:06:22
| 2019-05-22T00:06:22
| 153,569,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,505
|
java
|
package cn.cjf.springboot.swagger2;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
@ConditionalOnProperty(prefix = "swagger",value = {"enable"},havingValue = "true")
public class SwaggerConfig {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("cn.cjf.springboot"))
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("testAPI")
.description("test的API")
.termsOfServiceUrl("。。。。。。。。。")
.contact(new Contact("chenjunfan","test.html","176158750@qq.com"))
.version("1.0")
.build();
}
}
|
[
"176158750@qq.com"
] |
176158750@qq.com
|
2b8bc98c6ad3388beab3e5804e4e53e41f3c4a6e
|
6cd64504c63b0186e10e7c8b0eebe7bb1ed708e2
|
/boot-planb/service/src/main/java/cn/com/jcgroup/service/domain/PbBusinessTripFlow.java
|
fd1f22504e7aa201efa20b0ffaa8592a750a6d40
|
[] |
no_license
|
scq355/spring-boot
|
cb9925ea12b8033e4c3489124613eeaecd0018a5
|
1d746305e68def1c2a3e15ff69720bb06f13bb28
|
refs/heads/master
| 2023-07-08T03:19:26.830992
| 2020-08-04T06:34:54
| 2020-08-04T06:34:54
| 166,948,881
| 0
| 0
| null | 2023-09-13T21:58:59
| 2019-01-22T07:33:34
|
Java
|
UTF-8
|
Java
| false
| false
| 3,350
|
java
|
package cn.com.jcgroup.service.domain;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "pb_business_trip_flow")
public class PbBusinessTripFlow {
@Id
@SequenceGenerator(name = "businessTripFlowId", sequenceName = "seq_business_pay_for_id", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "businessTripFlowId")
private int id;
private String startTime;
private String endTime;
private String tripReceive;
@Column(columnDefinition = "number(19, 0)", nullable = true)
private Integer personNum;
@Column(columnDefinition = "number(19, 0)", nullable = true)
private Integer fee;
private String department;
private String city;
@Column(length = 1024)
private String reason;
@Column(columnDefinition = "number(19, 0)", nullable = true)
private Integer totalDays;
private String workPlan;
private String gustDepartment;
private Date createTime;
private Date updateTime;
private String rateOfKey;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getTripReceive() {
return tripReceive;
}
public void setTripReceive(String tripReceive) {
this.tripReceive = tripReceive;
}
public Integer getPersonNum() {
return personNum;
}
public void setPersonNum(Integer personNum) {
this.personNum = personNum;
}
public Integer getFee() {
return fee;
}
public void setFee(Integer fee) {
this.fee = fee;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public Integer getTotalDays() {
return totalDays;
}
public void setTotalDays(Integer totalDays) {
this.totalDays = totalDays;
}
public String getWorkPlan() {
return workPlan;
}
public void setWorkPlan(String workPlan) {
this.workPlan = workPlan;
}
public String getGustDepartment() {
return gustDepartment;
}
public void setGustDepartment(String gustDepartment) {
this.gustDepartment = gustDepartment;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRateOfKey() {
return rateOfKey;
}
public void setRateOfKey(String rateOfKey) {
this.rateOfKey = rateOfKey;
}
}
|
[
"1637517653@qq.com"
] |
1637517653@qq.com
|
47f93fa74454535925fcc1bd35d7e2358cc333c9
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/sun/nio/ch/OptionKey.java
|
af308931958d12a49eb6fc6f92d464095487d95c
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 612
|
java
|
/* */ package sun.nio.ch;
/* */
/* */ class OptionKey
/* */ {
/* */ private int level;
/* */ private int name;
/* */
/* */ OptionKey(int paramInt1, int paramInt2)
/* */ {
/* 37 */ this.level = paramInt1;
/* 38 */ this.name = paramInt2;
/* */ }
/* */
/* */ int level() {
/* 42 */ return this.level;
/* */ }
/* */
/* */ int name() {
/* 46 */ return this.name;
/* */ }
/* */ }
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: sun.nio.ch.OptionKey
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
d0eac8585b9e89e604fd49eaef17438368ea5c19
|
aaa17f8233980b699ef5dae6010c01232cb9fce9
|
/Java/1329.SortMatrixDiagonally/Solution.java
|
c6bd9266967e962d1dd4fcde8a30f730033b7e89
|
[] |
no_license
|
mud2man/LeetCode
|
6aa329a66c4785ecfe550b52b04b5fededdfb814
|
7f97f9fc0ff1d57d35b67d9d240ac990d66ac5aa
|
refs/heads/master
| 2021-12-12T01:40:43.208616
| 2021-11-21T06:12:13
| 2021-11-21T06:12:13
| 63,312,728
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,623
|
java
|
/* Sort: Time:O(n^2logn), Space:O(n), where n is max(mat.length, mat[0].length)
* 1. Retrieve each diagnoals
* 2. Sort them and reassign them to mat
*/
import java.util.*; // Stack
public class Solution {
public int[][] diagonalSort(int[][] mat) {
for(int y = mat.length - 1; y >= 0; --y){
int length = Math.min(mat.length - y, mat[0].length);
List<Integer> diagnoal = new ArrayList<>();
for(int x = 0; x < length; ++x){
diagnoal.add(mat[y + x][x]);
}
Collections.sort(diagnoal);
for(int x = 0; x < length; ++x){
mat[y + x][x] = diagnoal.get(x);
}
}
for(int x = 1; x < mat[0].length; ++x){
int length = Math.min(mat[0].length - x, mat.length);
List<Integer> diagnoal = new ArrayList<>();
for(int y = 0; y < length; ++y){
diagnoal.add(mat[y][x + y]);
}
Collections.sort(diagnoal);
for(int y = 0; y < length; ++y){
mat[y][x + y] = diagnoal.get(y);
}
}
return mat;
}
public static void main(String[] args){
Solution sol = new Solution();
int[][] mat = {{3, 3, 1, 1}, {2, 2, 1, 2}, {1, 1, 1, 2}};
System.out.println("before:");
for(int[] row: mat){
System.out.println(Arrays.toString(row));
}
mat = sol.diagonalSort(mat);
System.out.println("after:");
for(int[] row: mat){
System.out.println(Arrays.toString(row));
}
}
}
|
[
"chih-hung.lu@columbia.edu"
] |
chih-hung.lu@columbia.edu
|
4cce17aa7f74ce05c155080fb14c07422d2b2d40
|
b327a374de29f80d9b2b3841db73f3a6a30e5f0d
|
/out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files/dot/junit/opcodes/move_result_object/Main_testVFE7.java
|
a3ff03d86a14334c461121c2418d2da5e12e2cfa
|
[] |
no_license
|
nikoltu/aosp
|
6409c386ed6d94c15d985dd5be2c522fefea6267
|
f99d40c9d13bda30231fb1ac03258b6b6267c496
|
refs/heads/master
| 2021-01-22T09:26:24.152070
| 2011-09-27T15:10:30
| 2011-09-27T15:10:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
//autogenerated by util.build.BuildDalvikSuite, do not change
package dot.junit.opcodes.move_result_object;
import dot.junit.opcodes.move_result_object.d.*;
import dot.junit.*;
public class Main_testVFE7 extends DxAbstractMain {
public static void main(String[] args) throws Exception {
try {
Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_9");
fail("expected a verification exception");
} catch (Throwable t) {
DxUtil.checkVerifyException(t);
}
}
}
|
[
"fred.faust@gmail.com"
] |
fred.faust@gmail.com
|
d22c765671ada6fb6b6878961d6f83935749bcdb
|
93345152ebaab4096d9bf18b80abe84d81548955
|
/ph-math/src/test/java/com/helger/numbercruncher/program6_2/LinearRegressionDemo.java
|
3f644f7091106a2a71e774e7beaf12da129a21f6
|
[
"Apache-2.0"
] |
permissive
|
jdrew1303/ph-math
|
ffdb5b192eb437b79988c38e88829828fa48ce5c
|
77b0ed356f209b348a73218d3d222ccec6d4aca0
|
refs/heads/master
| 2023-08-25T10:51:17.383708
| 2021-10-30T19:33:43
| 2021-10-30T19:33:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,329
|
java
|
/*
* Copyright (C) 2014-2021 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.numbercruncher.program6_2;
import java.awt.Frame;
import com.helger.numbercruncher.graphutils.AbstractDemoFrame;
/**
* PROGRAM 6-2d: Linear Regression (Interactive Standalone Demo) Interactively
* demonstrate linear regression.
*/
public final class LinearRegressionDemo extends AbstractDemoFrame
{
private static final String TITLE = "Linear Regression Demo";
/**
* Constructor.
*/
private LinearRegressionDemo ()
{
super (TITLE, new LinearRegressionPanel ());
}
/**
* Main.
*/
public static void main (final String args[])
{
final Frame frame = new LinearRegressionDemo ();
frame.setVisible (true);
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
295f90844e8374579fc5b795fc674d8564a8470f
|
e3d0f7f75e4356413d05ba78e14c484f8555b2b5
|
/azure-resourcemanager-hybrid/src/main/java/com/azure/resourcemanager/hybrid/iothub/models/EndpointHealthData.java
|
9707971ea90a0c4f8322843426354d995fd72fa6
|
[
"MIT"
] |
permissive
|
weidongxu-microsoft/azure-stack-java-samples
|
1df227502c367f128916f121ccc0f5bc77b045e5
|
afdfd0ed220f2f8a603c6fa5e16311a7842eb31c
|
refs/heads/main
| 2023-04-04T12:24:07.405360
| 2021-04-07T08:06:00
| 2021-04-07T08:06:00
| 337,593,216
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,720
|
java
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.hybrid.iothub.models;
import com.azure.resourcemanager.hybrid.iothub.fluent.models.EndpointHealthDataInner;
/** An immutable client-side representation of EndpointHealthData. */
public interface EndpointHealthData {
/**
* Gets the endpointId property: Id of the endpoint.
*
* @return the endpointId value.
*/
String endpointId();
/**
* Gets the healthStatus property: Health statuses have following meanings. The 'healthy' status shows that the
* endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting
* messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint
* will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead'
* status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial
* period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that
* the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected
* from this endpoint.
*
* @return the healthStatus value.
*/
EndpointHealthStatus healthStatus();
/**
* Gets the inner com.azure.resourcemanager.azurestack.iothub.fluent.models.EndpointHealthDataInner object.
*
* @return the inner object.
*/
EndpointHealthDataInner innerModel();
}
|
[
"weidxu@microsoft.com"
] |
weidxu@microsoft.com
|
5d657b2fda840562a2046877968111a6cf7c7013
|
611b2f6227b7c3b4b380a4a410f357c371a05339
|
/src/main/java/cn/xports/qd2/credit/MyCreditActivity$initView$2.java
|
231967139b3b2d6da5bb34cc8f62bfed660cd321
|
[] |
no_license
|
obaby/bjqd
|
76f35fcb9bbfa4841646a8888c9277ad66b171dd
|
97c56f77380835e306ea12401f17fb688ca1373f
|
refs/heads/master
| 2022-12-04T21:33:17.239023
| 2020-08-25T10:53:15
| 2020-08-25T10:53:15
| 290,186,830
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,012
|
java
|
package cn.xports.qd2.credit;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import kotlin.Metadata;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "onClick"}, k = 3, mv = {1, 1, 15})
/* compiled from: MyCreditActivity.kt */
final class MyCreditActivity$initView$2 implements View.OnClickListener {
final /* synthetic */ MyCreditActivity this$0;
MyCreditActivity$initView$2(MyCreditActivity myCreditActivity) {
this.this$0 = myCreditActivity;
}
public final void onClick(View view) {
MyCreditActivity myCreditActivity = this.this$0;
myCreditActivity.startActivity(new Intent(myCreditActivity, CreditStoreActivity.class).putExtras(new Bundle()));
}
}
|
[
"obaby.lh@gmail.com"
] |
obaby.lh@gmail.com
|
e7bedd38d8b242ace9cca790cd10b51858ee7789
|
643ab004f98842a83cf1999ed30dd7df7a4ada60
|
/sparke-module-special/src/main/java/cn/sparke/special/modules/v1/paper/bean/SpecialExplainBean.java
|
c5b4065418b6b322949e4d2dfffbde14c1d0d49e
|
[] |
no_license
|
JohnVeZh/spark-english-api-release-1.0.x
|
162130b1cedd90e09318077dc98a587fd03bccf3
|
f1659ffa072e6a79baa62b7636cbe1a17631ed26
|
refs/heads/master
| 2020-03-21T07:16:09.505836
| 2018-06-22T07:44:45
| 2018-06-22T07:44:45
| 138,270,184
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,669
|
java
|
package cn.sparke.special.modules.v1.paper.bean;
import cn.sparke.core.common.bean.BaseEntity;
/**
* Created by Administrator on 2017/7/14.
*/
public class SpecialExplainBean extends BaseEntity {
//标题
private String title;
//类型:1、自有内容、2外部链接、3、资讯、4、图书、5、网课
private Integer contentType;
//内容Id
private String contentId;
//内容:type=1_时有效
private String content;
//访问次数
private Integer visitNum;
//试卷id
private String paperId;
// 外部链接地址:type = 2时有效
private String url;
public void setTitle(String title){
this.title=title;
}
public String getTitle(){
return this.title;
}
public void setContentType(Integer contentType){
this.contentType=contentType;
}
public Integer getContentType(){
return this.contentType;
}
public void setContentId(String contentId){
this.contentId=contentId;
}
public String getContentId(){
return this.contentId;
}
public void setContent(String content){
this.content=content;
}
public String getContent(){
return this.content;
}
public void setVisitNum(Integer visitNum){
this.visitNum=visitNum;
}
public Integer getVisitNum(){
return this.visitNum;
}
public void setPaperId(String paperId){
this.paperId=paperId;
}
public String getPaperId(){
return this.paperId;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
|
[
"530225288@qq.com"
] |
530225288@qq.com
|
197402f5443f8c120a7696e3a3ff285fcfe01daa
|
4eef062b3250e0f183e97dcd483dff61b8ca2dc2
|
/play-services-iid/src/main/java/com/google/android/gms/iid/MessengerCompat.java
|
5e397e515d688b95680664e41674a96ac0343014
|
[
"Apache-2.0"
] |
permissive
|
microg/GmsCore
|
010709157ee3411322175dc10cabe21c709c8330
|
ecfc7c74a4946e07213acc5248d37d5f0af1f9dd
|
refs/heads/master
| 2023-09-02T08:11:50.506686
| 2023-08-30T12:52:39
| 2023-08-30T12:59:20
| 19,082,715
| 3,400
| 365
|
Apache-2.0
| 2023-09-13T08:01:11
| 2014-04-23T19:28:47
|
Java
|
UTF-8
|
Java
| false
| false
| 3,123
|
java
|
/*
* Copyright (C) 2013-2017 microG Project Team
*
* 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.google.android.gms.iid;
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import static android.os.Build.VERSION.SDK_INT;
public class MessengerCompat implements Parcelable {
private Messenger messenger;
private IMessengerCompat messengerCompat;
public MessengerCompat(IBinder binder) {
if (SDK_INT >= 21) {
messenger = new Messenger(binder);
} else {
messengerCompat = IMessengerCompat.Stub.asInterface(binder);
}
}
public MessengerCompat(Handler handler) {
if (SDK_INT >= 21) {
messenger = new Messenger(handler);
} else {
messengerCompat = new IMessengerCompatImpl(handler);
}
}
@Override
public int describeContents() {
return 0;
}
@Override
public boolean equals(Object o) {
return o instanceof MessengerCompat && ((MessengerCompat) o).getBinder().equals(getBinder());
}
public IBinder getBinder() {
return messenger != null ? messenger.getBinder() : messengerCompat.asBinder();
}
@Override
public int hashCode() {
return getBinder().hashCode();
}
public void send(Message message) throws RemoteException {
if (messenger != null) messenger.send(message);
else messengerCompat.send(message);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeStrongBinder(getBinder());
}
public static final Creator<MessengerCompat> CREATOR = new Creator<MessengerCompat>() {
@Override
public MessengerCompat createFromParcel(Parcel source) {
IBinder binder = source.readStrongBinder();
return binder != null ? new MessengerCompat(binder) : null;
}
@Override
public MessengerCompat[] newArray(int size) {
return new MessengerCompat[size];
}
};
private static class IMessengerCompatImpl extends IMessengerCompat.Stub {
private final Handler handler;
public IMessengerCompatImpl(Handler handler) {
this.handler = handler;
}
@Override
public void send(Message message) throws RemoteException {
message.arg2 = Binder.getCallingUid();
handler.dispatchMessage(message);
}
}
}
|
[
"git@larma.de"
] |
git@larma.de
|
4e70bac3671592f4290212e450c454f8d245603d
|
5b7df13cfa9e37d52c3ff2275371331e049c56b8
|
/src/goryachev/common/util/Progress.java
|
3ed9b62978787e21f28d4ee7bbd0ff618f3a29b6
|
[
"Apache-2.0"
] |
permissive
|
andy-goryachev/FindFiles
|
ffb4e973bf10e58d699c003388c341162188467d
|
2be3b6ab9600bd27678c80f002dbef750ddefca1
|
refs/heads/master
| 2021-01-19T13:42:51.615049
| 2018-06-03T19:53:49
| 2018-06-03T19:53:49
| 88,105,560
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,272
|
java
|
// Copyright © 2013-2018 Andy Goryachev <andy@goryachev.com>
package goryachev.common.util;
public class Progress
{
public static final Progress UNKNOWN = new Progress(0.0);
public static final Progress DONE = new Progress(1.0);
//
private double progress;
public Progress(double progress)
{
this.progress = progress;
}
public Progress(int count, int total)
{
this.progress = (total == 0 ? 0.0 : count/(double)total);
}
public Progress(long count, long total)
{
this.progress = (total == 0 ? 0.0 : count/(double)total);
}
public double getProgress()
{
return progress;
}
public boolean equals(Object x)
{
if(x == this)
{
return true;
}
else if(x instanceof Progress)
{
return progress == ((Progress)x).progress;
}
else
{
return false;
}
}
public int hashCode()
{
int h = FH.hash(0, Progress.class);
return FH.hash(h, progress);
}
public String getPercentString()
{
return getPercentString(2);
}
public String getPercentString(int significantDigits)
{
return CKit.getPercentString(progress, significantDigits);
}
public String toString()
{
return "Progress:" + progress;
}
}
|
[
"andy@goryachev.com"
] |
andy@goryachev.com
|
2300e57f7eb686bd944f2b14e92c509d46db24f9
|
dd90264bbfb79700d1d32effc207b555c29f3bcf
|
/task/dream_util/src/main/java/org/dream/utils/jms/JmsContainer.java
|
14a064926fd70c67c6cbb2a2b668484c3ab2767b
|
[] |
no_license
|
tomzhang/other_workplace
|
8cead3feda7e9f067412da8252d83da56a000b51
|
9b5beaf4ed3586e6037bd84968c6a407a8635e16
|
refs/heads/master
| 2020-04-22T22:18:23.913665
| 2019-01-26T03:36:19
| 2019-01-26T03:36:19
| 170,703,419
| 1
| 0
| null | 2019-02-14T14:23:21
| 2019-02-14T14:23:20
| null |
UTF-8
|
Java
| false
| false
| 4,060
|
java
|
package org.dream.utils.jms;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.Session;
import javax.jms.TextMessage;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.jms.listener.DefaultMessageListenerContainer;
import io.netty.util.internal.MessagePassingQueue.Consumer;
/**
* spring 提供的messageContainer需要为每个queue都配置一次,且对于初级程序员来讲,对其内部的确认管理,并发控制很难去管控。
* 本类是对messageContainer的上层封装
*
* @author boyce
*
*
*
*
* <bean id="jmsContainer" class="com.luckin.stock.jms.JmsContainer" >
* <property name="connectionFactory" ref="connectionFactory"/>
* <property name="msgListeners"> <map> <entry key-ref="queue1"
* value-ref="lisnter1" /> <entry key-ref="queue2" value-ref=
* "lisnter2"/> </map> </property> </bean>
*
*/
public class JmsContainer implements BeanFactoryAware, InitializingBean {
private Logger logger = LoggerFactory.getLogger(getClass());
BeanFactory factory;
ConnectionFactory connectionFactory;
Map<Destination, Listener> msgListeners = new HashMap<Destination, Listener>();
public void setMsgListeners(Map<Destination, Listener> msgListeners) {
this.msgListeners = msgListeners;
}
public void setConnectionFactory(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
}
private class MsgListener implements MessageListener {
Listener listener;
Destination dest;
public MsgListener(Destination dest, Listener listener) {
this.listener = listener;
this.dest = dest;
}
@Override
public void onMessage(Message message) {
logger.debug("message {} arrived from destination {}!", message, dest);
String json;
try {
json = ((TextMessage) message).getText();
listener.onMessage(json);
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
}
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
this.factory = beanFactory;
}
@Override
public void afterPropertiesSet() throws Exception {
// 配置上下文加载好之后,加载jms消息侦听容器
for (Iterator iterator = msgListeners.keySet().iterator(); iterator.hasNext();) {
Destination dest = (Destination) iterator.next();
BeanDefinitionBuilder builder = BeanDefinitionBuilder
.genericBeanDefinition(DefaultMessageListenerContainer.class);
builder.setLazyInit(false);
builder.addPropertyValue("connectionFactory", connectionFactory);
builder.addPropertyValue("destination", dest);
// builder.addPropertyValue("sessionAcknowledgeMode",
// Session.CLIENT_ACKNOWLEDGE);
Listener listener=msgListeners.get(dest);
Consumser consumer=listener.getClass().getAnnotation(Consumser.class);
int worker=consumer==null||consumer.value()<1?1:consumer.value();
builder.addPropertyValue("messageListener", new MsgListener(dest, listener));
builder.addPropertyValue("maxConcurrentConsumers", worker);
builder.addPropertyValue("concurrentConsumers", worker);
DefaultListableBeanFactory fac = (DefaultListableBeanFactory) factory;
String beanName = "consumer-" + dest.toString();
fac.registerBeanDefinition(beanName, builder.getRawBeanDefinition());
fac.getBean(beanName);
logger.info("init a message listener {} for destination {}", listener.getClass(), dest);
}
}
}
|
[
"Pj879227577"
] |
Pj879227577
|
6db27cab974f16d4e78743c62fc67fa63b9e47e9
|
6552244c7ef44150ea74cef7ec801d5a9f7171e9
|
/app/src/main/java/com/google/android/gms/wearable/internal/zzao.java
|
4dee74342ae2f5da4c5d5ce50db07071c22ea20a
|
[] |
no_license
|
amithbm/cbskeep
|
c9469156efd307fb474d817760a0b426af8f7c5c
|
a800f00ab617cba49d1a1bea1f0282c0cde525e7
|
refs/heads/master
| 2016-09-06T12:42:33.824977
| 2015-08-24T15:33:50
| 2015-08-24T15:33:50
| 41,311,235
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,671
|
java
|
package com.google.android.gms.wearable.internal;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zza.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
public class zzao
implements Parcelable.Creator<GetFdForAssetResponse>
{
static void zza(GetFdForAssetResponse paramGetFdForAssetResponse, Parcel paramParcel, int paramInt)
{
int i = zzb.zzcR(paramParcel);
zzb.zzc(paramParcel, 1, versionCode);
zzb.zzc(paramParcel, 2, statusCode);
zzb.zza(paramParcel, 3, zzbIe, paramInt, false);
zzb.zzJ(paramParcel, i);
}
public GetFdForAssetResponse zznB(Parcel paramParcel)
{
int j = 0;
int k = zza.zzcQ(paramParcel);
ParcelFileDescriptor localParcelFileDescriptor = null;
int i = 0;
while (paramParcel.dataPosition() < k)
{
int m = zza.zzcP(paramParcel);
switch (zza.zzeS(m))
{
default:
zza.zzb(paramParcel, m);
break;
case 1:
i = zza.zzg(paramParcel, m);
break;
case 2:
j = zza.zzg(paramParcel, m);
break;
case 3:
localParcelFileDescriptor = (ParcelFileDescriptor)zza.zza(paramParcel, m, ParcelFileDescriptor.CREATOR);
}
}
if (paramParcel.dataPosition() != k)
throw new zza.zza("Overread allowed size end=" + k, paramParcel);
return new GetFdForAssetResponse(i, j, localParcelFileDescriptor);
}
public GetFdForAssetResponse[] zzrG(int paramInt)
{
return new GetFdForAssetResponse[paramInt];
}
}
|
[
"amithbm@gmail.com"
] |
amithbm@gmail.com
|
c43c2e9ef50c5ca686ca5ac9f9ceca02fd934300
|
c1164a96d40338a3f4c20c96cf1b8699c733b022
|
/form-service/src/main/java/com/spring/cloud/form/domain/FormDefinition.java
|
917c8391e2189421b50c04241082b550fec54f47
|
[] |
no_license
|
chendingying/spring-cloud-workflow
|
6c554dbc8b27e62198803352e7758dcca2628bc6
|
f94970c9cadff8d2b047a679f242edf8e155c677
|
refs/heads/master
| 2020-03-29T08:52:48.662101
| 2018-10-13T07:58:31
| 2018-10-13T07:58:31
| 149,730,861
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,055
|
java
|
package com.spring.cloud.form.domain;
import com.spring.cloud.common.domain.BaseEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the pw_fo_definition database table.
*
*/
@Entity
@Table(name = "pw_fo_definition", catalog = "liansen_form")
@NamedQuery(name = "FormDefinition.findAll", query = "SELECT f FROM FormDefinition f")
public class FormDefinition extends BaseEntity {
private static final long serialVersionUID = 1L;
private String category;
private Integer deploySourceId;
private String key;
private String name;
private byte suspensionState;
private int tableId;
private int version;
private String remark;
public FormDefinition() {
}
@Column(name = "category_")
public String getCategory() {
return this.category;
}
public void setCategory(String category) {
this.category = category;
}
@Column(name = "deploy_source_id_")
public Integer getDeploySourceId() {
return this.deploySourceId;
}
public void setDeploySourceId(Integer deploySourceId) {
this.deploySourceId = deploySourceId;
}
@Column(name = "key_")
public String getKey() {
return this.key;
}
public void setKey(String key) {
this.key = key;
}
@Column(name = "name_")
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "suspension_state_")
public byte getSuspensionState() {
return this.suspensionState;
}
public void setSuspensionState(byte suspensionState) {
this.suspensionState = suspensionState;
}
@Column(name = "table_id_")
public int getTableId() {
return this.tableId;
}
public void setTableId(int tableId) {
this.tableId = tableId;
}
public int getVersion() {
return this.version;
}
public void setVersion(int version) {
this.version = version;
}
@Column(name = "remark_")
public String getRemark() { return remark; }
public void setRemark(String remark) { this.remark = remark; }
}
|
[
"chen@dingying.com"
] |
chen@dingying.com
|
92afb1ca7da9508a73418ae863dfe2ac5725b281
|
8ddb02f927921e40097811a9d152f0eb07894f1b
|
/greetgo.depinject.gen/test_src/kz/greetgo/depinject/gen/test_beans005/sub_beans_1/Bean1.java
|
ecc73823f8fa5d5c7d9e027a175a3c2bbff72129
|
[] |
no_license
|
yuliashefer/greetgo.depinject
|
f6f4c2b21edd61e5c78794850ce60c4a071f8ce4
|
62af4755e4dc8348d8257b7a0d7674805acf511d
|
refs/heads/master
| 2021-04-29T19:24:06.990896
| 2018-02-16T10:15:05
| 2018-02-16T10:15:05
| 121,713,422
| 0
| 0
| null | 2018-02-16T04:06:08
| 2018-02-16T04:06:08
| null |
UTF-8
|
Java
| false
| false
| 133
|
java
|
package kz.greetgo.depinject.gen.test_beans005.sub_beans_1;
import kz.greetgo.depinject.core.Bean;
@Bean
public interface Bean1 {}
|
[
"ekolpakov@greet-go.com"
] |
ekolpakov@greet-go.com
|
ece46f4cdb8f37bfa2c9640b0cd3f8e283e1ca56
|
4b70f4c41da46621fcbdf0eb0c8926aa6ee63f57
|
/integration-tests/src/test/java/org/trimou/tests/gson/resolver/BasicJsonElementResolverTest.java
|
9fc7a3404056665eea46cb8c7c5cc0fcabaa2c65
|
[] |
no_license
|
phongwingstech/trimou
|
285706196cc416b9ea2af5676cdb294c9fc2bc07
|
ebd3ae43810a6b6fcf0d06865c3de0c7ddd27d6d
|
refs/heads/master
| 2020-12-28T23:51:15.378984
| 2014-09-12T08:32:30
| 2014-09-12T08:32:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,314
|
java
|
package org.trimou.tests.gson.resolver;
import static org.junit.Assert.assertEquals;
import static org.trimou.tests.IntegrationTestUtils.createTestArchiveBase;
import static org.trimou.tests.IntegrationTestUtils.getResolver;
import java.io.StringReader;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.trimou.Mustache;
import org.trimou.engine.MustacheEngineBuilder;
import com.google.gson.JsonParser;
/**
*
* @author Martin Kouba
*/
@RunWith(Arquillian.class)
public class BasicJsonElementResolverTest {
@Deployment
public static WebArchive createTestArchive() {
return createTestArchiveBase().addAsLibraries(
getResolver().artifact("org.trimou:trimou-extension-gson")
.resolveAsFiles());
}
@Test
public void testInterpolation() {
Mustache mustache = MustacheEngineBuilder.newBuilder().build()
.compileMustache("json_element_resolver_test", "{{foo.name}}");
assertEquals("Jachym",
mustache.render(new JsonParser().parse(new StringReader(
"{ \"foo\": { \"name\": \"Jachym\"}}"))));
}
}
|
[
"mkouba@redhat.com"
] |
mkouba@redhat.com
|
4497f3a74f8b4da011cbd4b5135910f6d38c1c89
|
d0c4364fe35d4cebc9787bfd52e1a9a40fa8b8c1
|
/paypal/src/com/ebay/api/ItemCategoryType.java
|
c93079dbedc6763cb06b77bd1064ab95b1a578b5
|
[] |
no_license
|
vamshivushakola/Asian-Paints-Everything
|
6f92b153474b1c5416821846867319bb1719e845
|
2a7147537aebf5b58ed94902ba6fbc72595c7134
|
refs/heads/master
| 2021-01-20T20:52:21.611576
| 2016-07-16T18:21:01
| 2016-07-16T18:21:01
| 63,496,094
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,250
|
java
|
package com.ebay.api;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ItemCategoryType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ItemCategoryType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
* <enumeration value="Physical"/>
* <enumeration value="Digital"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ItemCategoryType")
@XmlEnum
public enum ItemCategoryType {
/**
* Physical
*
*/
@XmlEnumValue("Physical")
PHYSICAL("Physical"),
/**
* Digital
*
*/
@XmlEnumValue("Digital")
DIGITAL("Digital");
private final String value;
ItemCategoryType(String v) {
value = v;
}
public String value() {
return value;
}
public static ItemCategoryType fromValue(String v) {
for (ItemCategoryType c: ItemCategoryType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"vamshi.vshk@gmail.com"
] |
vamshi.vshk@gmail.com
|
d60265bf7055aea0ec242a5c76f47fc124910c2a
|
4d745c6ba7ded0a4d6fe1acacd72fef1c51b382a
|
/tea-manager/src/main/java/com/zhenhappy/ems/manager/dto/QueryHistoryInfoRequest.java
|
f401ec8e175630d24ecde6f01b4efe42fff74a00
|
[] |
no_license
|
wangxdxicec/teaFair
|
e0baf0b2d616b8f33cd06622933f004abc9f9d82
|
f1b83ff9fd36750291e4b7b1d969e2daa182fa88
|
refs/heads/master
| 2021-01-23T06:26:29.557360
| 2017-06-01T07:22:23
| 2017-06-01T07:22:23
| 93,023,783
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,875
|
java
|
package com.zhenhappy.ems.manager.dto;
/**
* Created by wangxd on 2016-05-24.
*/
public class QueryHistoryInfoRequest extends EasyuiRequest {
private Integer id;
private String booth_number; //展位号
private String company_zh; //公司中文名
private String company_en; //公司英文名
private String telphone; //电话
private String fax; //传真
private String email; //邮箱
private String website; //网址
private String address_zh; //中文地址
private String address_en; //英文地址
private String zipcode; //邮编
private String product_type; //产品分类
private String main_product_zh;//主营产品_中文
private String main_product_en;//主营产品_英文
private String company_profile;//公司简介
private String invoice_head; //发票抬头
private String local_tax; //地税编号
private String joiner_name; //参展人员名单
private String joiner_telphone;//参展人员电话
private String joiner_email; //参展人员邮箱
private String fair_year; //展会时间
private String field_back1; //备用字段1
private String field_back2; //备用字段2
private String field_back3; //备用字段3
private String field_back4; //备用字段4
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getBooth_number() {
return booth_number;
}
public void setBooth_number(String booth_number) {
this.booth_number = booth_number;
}
public String getCompany_zh() {
return company_zh;
}
public void setCompany_zh(String company_zh) {
this.company_zh = company_zh;
}
public String getCompany_en() {
return company_en;
}
public void setCompany_en(String company_en) {
this.company_en = company_en;
}
public String getTelphone() {
return telphone;
}
public void setTelphone(String telphone) {
this.telphone = telphone;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
public String getAddress_zh() {
return address_zh;
}
public void setAddress_zh(String address_zh) {
this.address_zh = address_zh;
}
public String getAddress_en() {
return address_en;
}
public void setAddress_en(String address_en) {
this.address_en = address_en;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getProduct_type() {
return product_type;
}
public void setProduct_type(String product_type) {
this.product_type = product_type;
}
public String getMain_product_zh() {
return main_product_zh;
}
public void setMain_product_zh(String main_product_zh) {
this.main_product_zh = main_product_zh;
}
public String getMain_product_en() {
return main_product_en;
}
public void setMain_product_en(String main_product_en) {
this.main_product_en = main_product_en;
}
public String getCompany_profile() {
return company_profile;
}
public void setCompany_profile(String company_profile) {
this.company_profile = company_profile;
}
public String getInvoice_head() {
return invoice_head;
}
public void setInvoice_head(String invoice_head) {
this.invoice_head = invoice_head;
}
public String getLocal_tax() {
return local_tax;
}
public void setLocal_tax(String local_tax) {
this.local_tax = local_tax;
}
public String getJoiner_name() {
return joiner_name;
}
public void setJoiner_name(String joiner_name) {
this.joiner_name = joiner_name;
}
public String getJoiner_telphone() {
return joiner_telphone;
}
public void setJoiner_telphone(String joiner_telphone) {
this.joiner_telphone = joiner_telphone;
}
public String getJoiner_email() {
return joiner_email;
}
public void setJoiner_email(String joiner_email) {
this.joiner_email = joiner_email;
}
public String getFair_year() {
return fair_year;
}
public void setFair_year(String fair_year) {
this.fair_year = fair_year;
}
public String getField_back1() {
return field_back1;
}
public void setField_back1(String field_back1) {
this.field_back1 = field_back1;
}
public String getField_back2() {
return field_back2;
}
public void setField_back2(String field_back2) {
this.field_back2 = field_back2;
}
public String getField_back3() {
return field_back3;
}
public void setField_back3(String field_back3) {
this.field_back3 = field_back3;
}
public String getField_back4() {
return field_back4;
}
public void setField_back4(String field_back4) {
this.field_back4 = field_back4;
}
}
|
[
"wangxd@xicec.com"
] |
wangxd@xicec.com
|
9161df52bb625f1b4e3a96abaefb4f9e2e9e1891
|
618a7de9703de391555e3824866e26635eeb2ec9
|
/fork/src-origin/main/java/org/jboss/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java
|
8c10eb8fc45713f6a52085b77de3a92c404dcbf0
|
[] |
no_license
|
emmartins/jboss-openjdk-corba
|
0f9275caefed49e8db9f35313b43d3099d5d99b8
|
c4f4bd180167111bf5aa4bff30636b2366990571
|
refs/heads/master
| 2021-01-10T22:07:38.865914
| 2012-12-20T14:36:04
| 2012-12-20T14:36:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,802
|
java
|
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.jboss.com.sun.corba.se.impl.interceptors;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.LocalObject;
import org.jboss.com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import org.jboss.com.sun.corba.se.spi.logging.CORBALogDomains;
import org.jboss.com.sun.corba.se.impl.corba.AnyImpl;
import org.jboss.com.sun.corba.se.impl.encoding.EncapsInputStream;
import org.jboss.com.sun.corba.se.impl.encoding.EncapsOutputStream;
import org.jboss.com.sun.corba.se.impl.logging.ORBUtilSystemException;
import org.omg.IOP.Codec;
import org.omg.IOP.CodecPackage.FormatMismatch;
import org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
import org.omg.IOP.CodecPackage.TypeMismatch;
/**
* CDREncapsCodec is an implementation of Codec, as described
* in orbos/99-12-02, that supports CDR encapsulation version 1.0, 1.1, and
* 1.2.
*/
public final class CDREncapsCodec
extends org.omg.CORBA.LocalObject
implements Codec
{
// The ORB that created the factory this codec was created from
private ORB orb;
ORBUtilSystemException wrapper;
// The GIOP version we are encoding for
private GIOPVersion giopVersion;
/*
*******************************************************************
* NOTE: CDREncapsCodec must remain immutable! This is so that we
* can pre-create CDREncapsCodecs for each version of GIOP in
* CodecFactoryImpl.
*******************************************************************/
/**
* Creates a new codec implementation. Uses the given ORB to create
* CDRInputStreams when necessary.
*
* @param orb The ORB to use to create a CDRInputStream or CDROutputStream
* @param major The major version of GIOP we are encoding for
* @param minor The minor version of GIOP we are encoding for
*/
public CDREncapsCodec( ORB orb, int major, int minor ) {
this.orb = orb;
wrapper = ORBUtilSystemException.get(
(org.jboss.com.sun.corba.se.spi.orb.ORB)orb, CORBALogDomains.RPC_PROTOCOL ) ;
giopVersion = GIOPVersion.getInstance( (byte)major, (byte)minor );
}
/**
* Convert the given any into a CDR encapsulated octet sequence
*/
public byte[] encode( Any data )
throws InvalidTypeForEncoding
{
if ( data == null )
throw wrapper.nullParam() ;
return encodeImpl( data, true );
}
/**
* Decode the given octet sequence into an any based on a CDR
* encapsulated octet sequence.
*/
public Any decode ( byte[] data )
throws FormatMismatch
{
if( data == null )
throw wrapper.nullParam() ;
return decodeImpl( data, null );
}
/**
* Convert the given any into a CDR encapsulated octet sequence. Only
* the data is stored. The type code is not.
*/
public byte[] encode_value( Any data )
throws InvalidTypeForEncoding
{
if( data == null )
throw wrapper.nullParam() ;
return encodeImpl( data, false );
}
/**
* Decode the given octet sequence into an any based on a CDR
* encapsulated octet sequence. The type code is expected not to appear
* in the octet sequence, and the given type code is used instead.
*/
public Any decode_value( byte[] data, TypeCode tc )
throws FormatMismatch, TypeMismatch
{
if( data == null )
throw wrapper.nullParam() ;
if( tc == null )
throw wrapper.nullParam() ;
return decodeImpl( data, tc );
}
/**
* Convert the given any into a CDR encapsulated octet sequence.
* If sendTypeCode is true, the type code is sent with the message, as in
* a standard encapsulation. If it is false, only the data is sent.
* Either way, the endian type is sent as the first part of the message.
*/
private byte[] encodeImpl( Any data, boolean sendTypeCode )
throws InvalidTypeForEncoding
{
if( data == null )
throw wrapper.nullParam() ;
// _REVISIT_ Note that InvalidTypeForEncoding is never thrown in
// the body of this method. This is due to the fact that CDR*Stream
// will never throw an exception if the encoding is invalid. To
// fix this, the CDROutputStream must know the version of GIOP it
// is encoding for and it must check to ensure that, for example,
// wstring cannot be encoded in GIOP 1.0.
//
// As part of the GIOP 1.2 work, the CDRInput and OutputStream will
// be versioned. This can be handled once this work is complete.
// Create output stream with default endianness.
EncapsOutputStream cdrOut = new EncapsOutputStream(
(org.jboss.com.sun.corba.se.spi.orb.ORB)orb, giopVersion );
// This is an encapsulation, so put out the endian:
cdrOut.putEndian();
// Sometimes encode type code:
if( sendTypeCode ) {
cdrOut.write_TypeCode( data.type() );
}
// Encode value and return.
data.write_value( cdrOut );
return cdrOut.toByteArray();
}
/**
* Decode the given octet sequence into an any based on a CDR
* encapsulated octet sequence. If the type code is null, it is
* expected to appear in the octet sequence. Otherwise, the given
* type code is used.
*/
private Any decodeImpl( byte[] data, TypeCode tc )
throws FormatMismatch
{
if( data == null )
throw wrapper.nullParam() ;
AnyImpl any = null; // return value
// _REVISIT_ Currently there is no way for us to distinguish between
// a FormatMismatch and a TypeMismatch because we cannot get this
// information from the CDRInputStream. If a RuntimeException occurs,
// it is turned into a FormatMismatch exception.
try {
EncapsInputStream cdrIn = new EncapsInputStream( orb, data,
data.length, giopVersion );
cdrIn.consumeEndian();
// If type code not specified, read it from octet stream:
if( tc == null ) {
tc = cdrIn.read_TypeCode();
}
// Create a new Any object:
any = new AnyImpl( (org.jboss.com.sun.corba.se.spi.orb.ORB)orb );
any.read_value( cdrIn, tc );
}
catch( RuntimeException e ) {
// See above note.
throw new FormatMismatch();
}
return any;
}
}
|
[
"emartins@redhat.com"
] |
emartins@redhat.com
|
09038ea9e6521efe25cfcf4b9920eaf6fe67f2e5
|
fb2f4c274c5b7cbc30d557e1990e909979d2460c
|
/XingBoTV/CommonXingbo/src/main/java/com/xingbobase/extra/sticky/DistinctMultiHashMap.java
|
f61d6ac9fe4e6036054e91350ae2cab2f798a2fa
|
[] |
no_license
|
liqiangwaini/shenniaozixun
|
717b2bb4859662bb5189a9e1bc7d249e57bc4dad
|
853308e65f1de904f7dc77bcc1623346f46dc5fc
|
refs/heads/master
| 2021-01-18T16:49:09.124161
| 2017-08-25T08:29:16
| 2017-08-25T08:29:16
| 100,468,569
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,658
|
java
|
package com.xingbobase.extra.sticky;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* a hash map can maintain an one-to-many relationship which the value only belongs to one “one” part
* and the map also support getKey by value quickly
*
* @author lsjwzh
*/
class DistinctMultiHashMap<TKey,TItemValue> {
private IDMapper<TKey, TItemValue> mIDMapper;
interface IDMapper<TKey,TItemValue>{
public Object keyToKeyId(TKey key);
public TKey keyIdToKey(Object keyId);
public Object valueToValueId(TItemValue value);
public TItemValue valueIdToValue(Object valueId);
}
LinkedHashMap<Object,List<TItemValue>> mKeyToValuesMap = new LinkedHashMap<Object, List<TItemValue>>();
LinkedHashMap<Object,TKey> mValueToKeyIndexer = new LinkedHashMap<Object, TKey>();
DistinctMultiHashMap(){
this(new IDMapper<TKey, TItemValue>() {
@Override
public Object keyToKeyId(TKey key) {
return key;
}
@Override
public TKey keyIdToKey(Object keyId) {
return (TKey) keyId;
}
@Override
public Object valueToValueId(TItemValue value) {
return value;
}
@Override
public TItemValue valueIdToValue(Object valueId) {
return (TItemValue) valueId;
}
});
}
DistinctMultiHashMap(IDMapper<TKey, TItemValue> idMapper){
mIDMapper = idMapper;
}
public List<TItemValue> get(TKey key){
//todo immutable
return mKeyToValuesMap.get(mIDMapper.keyToKeyId(key));
}
public TKey getKey(TItemValue value){
return mValueToKeyIndexer.get(mIDMapper.valueToValueId(value));
}
public void add(TKey key,TItemValue value){
Object keyId = mIDMapper.keyToKeyId(key);
if(mKeyToValuesMap.get(keyId)==null){
mKeyToValuesMap.put(keyId,new ArrayList<TItemValue>());
}
//remove old relationship
TKey keyForValue = getKey(value);
if(keyForValue !=null){
mKeyToValuesMap.get(mIDMapper.keyToKeyId(keyForValue)).remove(value);
}
mValueToKeyIndexer.put(mIDMapper.valueToValueId(value), key);
if(!containsValue(mKeyToValuesMap.get(mIDMapper.keyToKeyId(key)),value)) {
mKeyToValuesMap.get(mIDMapper.keyToKeyId(key)).add(value);
}
}
public void removeKey(TKey key){
if(mKeyToValuesMap.get(mIDMapper.keyToKeyId(key))!=null){
for (TItemValue value : mKeyToValuesMap.get(mIDMapper.keyToKeyId(key))){
mValueToKeyIndexer.remove(mIDMapper.valueToValueId(value));
}
mKeyToValuesMap.remove(mIDMapper.keyToKeyId(key));
}
}
public void removeValue(TItemValue value){
if(getKey(value)!=null){
List<TItemValue> itemValues = mKeyToValuesMap.get(mIDMapper.keyToKeyId(getKey(value)));
if(itemValues!=null){
itemValues.remove(value);
}
}
mValueToKeyIndexer.remove(mIDMapper.valueToValueId(value));
}
public void clear(){
mValueToKeyIndexer.clear();
mKeyToValuesMap.clear();
}
public void clearValues(){
for (Map.Entry<Object,List<TItemValue>> entry:entrySet()){
if(entry.getValue()!=null){
entry.getValue().clear();
}
}
mValueToKeyIndexer.clear();
}
public Set<Map.Entry<Object,List<TItemValue>>> entrySet(){
return mKeyToValuesMap.entrySet();
}
public Set<Map.Entry<Object,TKey>> reverseEntrySet(){
return mValueToKeyIndexer.entrySet();
}
public int size(){
return mKeyToValuesMap.size();
}
public int valuesSize(){
return mValueToKeyIndexer.size();
}
protected boolean containsValue(List<TItemValue> list,TItemValue value){
for (TItemValue itemValue :list){
if(mIDMapper.valueToValueId(itemValue).equals(mIDMapper.valueToValueId(value))){
return true;
}
}
return false;
}
/**
* @param position
* @return
*/
public TItemValue getValueByPosition(int position){
Object[] vauleIdArray = mValueToKeyIndexer.keySet().toArray();
if(position>vauleIdArray.length){
throw new IndexOutOfBoundsException();
}
Object valueId = vauleIdArray[position];
return mIDMapper.valueIdToValue(valueId);
}
}
|
[
"550163812@qq.com"
] |
550163812@qq.com
|
d6a7b791edbe1b38acb6676ece045f4950f2b918
|
9a2f590dba8f82689cdbb4b9f9e12aaea168ea32
|
/src/main/java/io/github/scrapery/gateway/config/LoggingConfiguration.java
|
a5c7cde0dce6bf0476f42b2d1eff7403aaf80a63
|
[
"Apache-2.0"
] |
permissive
|
scrapery/scraper-gateway
|
6e1de8a2aab900b1e854150d146ad11c7b66a2c5
|
6718084079411db1fd4879b31f2edd4eefd4854b
|
refs/heads/master
| 2020-03-22T15:11:41.349082
| 2018-07-10T14:36:23
| 2018-07-10T14:36:23
| 140,234,730
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,881
|
java
|
package io.github.scrapery.gateway.config;
import java.net.InetSocketAddress;
import java.util.Iterator;
import io.github.simlife.config.SimlifeProperties;
import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.boolex.OnMarkerEvaluator;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.LoggerContextListener;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.filter.EvaluatorFilter;
import ch.qos.logback.core.spi.ContextAwareBase;
import ch.qos.logback.core.spi.FilterReply;
import net.logstash.logback.appender.LogstashTcpSocketAppender;
import net.logstash.logback.encoder.LogstashEncoder;
import net.logstash.logback.stacktrace.ShortenedThrowableConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
@Configuration
@RefreshScope
public class LoggingConfiguration {
private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH";
private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH";
private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class);
private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
private final String appName;
private final String serverPort;
private final String version;
private final SimlifeProperties simLifeProperties;
public LoggingConfiguration(@Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort,
@Value("${info.project.version:}") String version, SimlifeProperties simLifeProperties) {
this.appName = appName;
this.serverPort = serverPort;
this.version = version;
this.simLifeProperties = simLifeProperties;
if (simLifeProperties.getLogging().getLogstash().isEnabled()) {
addLogstashAppender(context);
addContextListener(context);
}
if (simLifeProperties.getMetrics().getLogs().isEnabled()) {
setMetricsMarkerLogbackFilter(context);
}
}
private void addContextListener(LoggerContext context) {
LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener();
loggerContextListener.setContext(context);
context.addListener(loggerContextListener);
}
private void addLogstashAppender(LoggerContext context) {
log.info("Initializing Logstash logging");
LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender();
logstashAppender.setName(LOGSTASH_APPENDER_NAME);
logstashAppender.setContext(context);
String optionalFields = "";
String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"," +
optionalFields + "\"version\":\"" + version + "\"}";
// More documentation is available at: https://github.com/logstash/logstash-logback-encoder
LogstashEncoder logstashEncoder = new LogstashEncoder();
// Set the Logstash appender config from Simlife properties
logstashEncoder.setCustomFields(customFields);
// Set the Logstash appender config from Simlife properties
logstashAppender.addDestinations(new InetSocketAddress(simLifeProperties.getLogging().getLogstash().getHost(), simLifeProperties.getLogging().getLogstash().getPort()));
ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter();
throwableConverter.setRootCauseFirst(true);
logstashEncoder.setThrowableConverter(throwableConverter);
logstashEncoder.setCustomFields(customFields);
logstashAppender.setEncoder(logstashEncoder);
logstashAppender.start();
// Wrap the appender in an Async appender for performance
AsyncAppender asyncLogstashAppender = new AsyncAppender();
asyncLogstashAppender.setContext(context);
asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME);
asyncLogstashAppender.setQueueSize(simLifeProperties.getLogging().getLogstash().getQueueSize());
asyncLogstashAppender.addAppender(logstashAppender);
asyncLogstashAppender.start();
context.getLogger("ROOT").addAppender(asyncLogstashAppender);
}
// Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender
private void setMetricsMarkerLogbackFilter(LoggerContext context) {
log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME);
OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator();
onMarkerMetricsEvaluator.setContext(context);
onMarkerMetricsEvaluator.addMarker("metrics");
onMarkerMetricsEvaluator.start();
EvaluatorFilter<ILoggingEvent> metricsFilter = new EvaluatorFilter<>();
metricsFilter.setContext(context);
metricsFilter.setEvaluator(onMarkerMetricsEvaluator);
metricsFilter.setOnMatch(FilterReply.DENY);
metricsFilter.start();
for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) {
for (Iterator<Appender<ILoggingEvent>> it = logger.iteratorForAppenders(); it.hasNext();) {
Appender<ILoggingEvent> appender = it.next();
if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) {
log.debug("Filter metrics logs from the {} appender", appender.getName());
appender.setContext(context);
appender.addFilter(metricsFilter);
appender.start();
}
}
}
}
/**
* Logback configuration is achieved by configuration file and API.
* When configuration file change is detected, the configuration is reset.
* This listener ensures that the programmatic configuration is also re-applied after reset.
*/
class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener {
@Override
public boolean isResetResistant() {
return true;
}
@Override
public void onStart(LoggerContext context) {
addLogstashAppender(context);
}
@Override
public void onReset(LoggerContext context) {
addLogstashAppender(context);
}
@Override
public void onStop(LoggerContext context) {
// Nothing to do.
}
@Override
public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) {
// Nothing to do.
}
}
}
|
[
"hungnguyendang@Hungs-MacBook-Pro.local"
] |
hungnguyendang@Hungs-MacBook-Pro.local
|
eda55533339980ed7ee980f9f7662cddc072218b
|
7c87a85b35e47d4640283d12c40986e7b8a78e6f
|
/moneyfeed-pay/moneyfeed-pay-web/src/main/java/com/newhope/moneyfeed/pay/web/exception/RestResponseEntityExceptionHandler.java
|
74167079303087255f0dc409cbac7c79a428a331
|
[] |
no_license
|
newbigTech/moneyfeed
|
191b0bd4c98b49fa6be759ed16817b96c6e853b3
|
2bd8bdd10ddfde3f324060f7b762ec3ed6e25667
|
refs/heads/master
| 2020-04-24T13:05:44.308618
| 2019-01-15T07:59:03
| 2019-01-15T07:59:03
| 171,975,920
| 0
| 3
| null | 2019-02-22T01:53:12
| 2019-02-22T01:53:12
| null |
UTF-8
|
Java
| false
| false
| 4,525
|
java
|
package com.newhope.moneyfeed.pay.web.exception;
import com.newhope.moneyfeed.api.enums.ResultCode;
import com.newhope.moneyfeed.api.exception.BizException;
import com.newhope.moneyfeed.api.vo.base.BaseResponse;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindException;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.util.Set;
import java.util.stream.Collectors;
/**
* 统一异常处理
*
* @author zhangyanyan
* @date 2018/1/3
*/
@ControllerAdvice(annotations = RestController.class)
public class RestResponseEntityExceptionHandler extends ResponseEntityExceptionHandler {
private final Logger logger = LoggerFactory.getLogger(RestResponseEntityExceptionHandler.class);
@ExceptionHandler(value = BizException.class)
protected ResponseEntity<Object> handleExceptions(Exception ex) {
logger.error("[Rest Exception]", ex);
if (ex instanceof BizException) {
return handleBizException((BizException) ex);
} else {
return new ResponseEntity<Object>(BaseResponse.systemError(), new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
/**
* @Validated 方法参数校验异常处理
*/
@ExceptionHandler({ConstraintViolationException.class})
private ResponseEntity<Object> handleConstraintViolationException(ConstraintViolationException ex) {
Set<ConstraintViolation<?>> violations = ex.getConstraintViolations();
String msg = violations.stream().map(ConstraintViolation::getMessage).collect(Collectors.joining(","));
return new ResponseEntity<Object>(BaseResponse.fail(ResultCode.PARAM_ERROR.getCode(), msg), new HttpHeaders(), HttpStatus.OK);
}
private ResponseEntity<Object> handleBizException(BizException ex) {
return new ResponseEntity<Object>(BaseResponse.fail(ex.getCode(), ex.getMessage()), new HttpHeaders(), HttpStatus.OK);
}
@ExceptionHandler
protected ResponseEntity<Object> handleOtherExceptions(Exception ex) {
logger.error("[Rest Exception]", ex);
return new ResponseEntity<Object>(BaseResponse.systemError(), new HttpHeaders(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@Override
protected ResponseEntity<Object> handleBindException(BindException ex, HttpHeaders headers, HttpStatus status, WebRequest request) {
logger.error("[Rest Exception]", ex);
BindingResult bindingResult = ex.getBindingResult();
String resultMessage = StringUtils.defaultString(bindingResult.getFieldError().getDefaultMessage(), ResultCode.PARAM_ERROR.getDesc());
return new ResponseEntity<Object>(BaseResponse.fail(ResultCode.PARAM_ERROR.getCode(), resultMessage), new HttpHeaders(), HttpStatus.OK);
}
@Override
protected ResponseEntity<Object> handleMissingServletRequestParameter(MissingServletRequestParameterException ex, HttpHeaders headers, HttpStatus status, WebRequest request) {
logger.error("[Rest Exception]", ex);
return new ResponseEntity<Object>(BaseResponse.fail(ResultCode.PARAM_ERROR.getCode(), ex.getMessage()), new HttpHeaders(), HttpStatus.OK);
}
@Override
protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request) {
logger.error("[Rest Exception]", ex);
BindingResult bindingResult = ex.getBindingResult();
String resultMessage = StringUtils.defaultString(bindingResult.getFieldError().getDefaultMessage(), ResultCode.PARAM_ERROR.getDesc());
return new ResponseEntity<Object>(BaseResponse.fail(ResultCode.PARAM_ERROR.getCode(), resultMessage), new HttpHeaders(), HttpStatus.OK);
}
}
|
[
"505235893@qq.com"
] |
505235893@qq.com
|
b972c5f68092b933ee317cbfa8f0266f9fee2674
|
5b6fbbeaec2ad1aa0806f684201d1d37f0bec66e
|
/src/main/java/com/smt/jbpm/module/execution/task/button/OptionButton.java
|
24221286bfcae33dac15ea4bfe9e21f29b4e86cd
|
[] |
no_license
|
DougLei/smt-jbpm
|
35a5965dd1fc3e29e035a76ca513eb813c5e1c07
|
940a931d5ed476d2e537ab2a6277c86ad7b210ba
|
refs/heads/master
| 2023-05-09T16:03:01.005295
| 2021-06-03T06:49:21
| 2021-06-03T06:49:21
| 365,315,372
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package com.smt.jbpm.module.execution.task.button;
/**
*
* @author DougLei
*/
public class OptionButton {
private String type; // 按钮类型
private String name; // 按钮名称
public OptionButton(String type, String name) {
this.type = type;
this.name = name;
}
public String getType() {
return type;
}
public String getName() {
return name;
}
}
|
[
"953034206@qq.com"
] |
953034206@qq.com
|
9dd165c40641a0c5c75d8c847c1c2af9f9c9493e
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava16/Foo529.java
|
bf2ee01b9631c5b3cbf74a3b038fc484db8c9a86
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package applicationModulepackageJava16;
public class Foo529 {
public void foo0() {
new applicationModulepackageJava16.Foo528().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
78b47608fea17cd2aca3ede20f81b8ff84fa188d
|
bc453e3285abc1db891ff4ee47571cfaa750b49d
|
/src/wangyiran/organizing/data/replace/type/code/with/subclass/refactor/Employee.java
|
92512961647cccafc1931f6af2e96b0e7cc89c93
|
[] |
no_license
|
wangyiran125/refactor
|
908123ef219b26bced29cdaec09b494c13f63317
|
240c068b0dfa89d82d137fd38ae07e8cb9280251
|
refs/heads/master
| 2021-01-01T20:17:48.459653
| 2015-05-25T05:16:46
| 2015-05-25T05:16:46
| 35,585,504
| 0
| 0
| null | null | null | null |
ISO-8859-9
|
Java
| false
| false
| 1,298
|
java
|
package wangyiran.organizing.data.replace.type.code.with.subclass.refactor;
/**
* Created by wyr on 2015/5/19.
*/
public class Employee {
private int _type;
static final int ENGINEER = 0;
static final int SALESMAN = 1;
static final int MANAGER = 2;
public Employee(int _type) {
this._type = _type;
}
public Employee() {
super();
}
// Because the employee¡¯s constructor uses a type code as a parameter, I need to
// replace it with a factory method:
public int getType() {
return _type;
}
/* Of course this is the kind of switch statement I would prefer to avoid. But there
is only one, and it is only used at creation.
Naturally once you have created the subclasses you should use Push Down
Method (328) and Push Down Field (329) on any methods and fields that are
relevant only for particular types of employee.*/
static Employee create(int type){
switch (type){
case ENGINEER:
return new Engineer();
case SALESMAN:
return new Salseman();
case MANAGER:
return new Manager();
default:
throw new IllegalArgumentException("incorrect type code value");
}
}
}
|
[
"wangyiran125@icloud.com"
] |
wangyiran125@icloud.com
|
cda45cf54b471b6f2f64f02653c9bdf86b6a4ddb
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/response/AlipaySecurityProdAfsrcWhitehatinfoQueryResponse.java
|
ca5a157a0298ecb6d234d6d1870e12f350b5445c
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.domain.WhitehatInfo;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.security.prod.afsrc.whitehatinfo.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipaySecurityProdAfsrcWhitehatinfoQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 3785728841447545884L;
/**
* 白帽子信息
*/
@ApiField("data")
private WhitehatInfo data;
public void setData(WhitehatInfo data) {
this.data = data;
}
public WhitehatInfo getData( ) {
return this.data;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
100af03a006c45b3332f9f8c8a519940773e4e78
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_57e39c54de74c65ef6a5f6123e544c6ba955d4dd/Entity/35_57e39c54de74c65ef6a5f6123e544c6ba955d4dd_Entity_s.java
|
e0ed66d4ebb1d4fe9db476c8449e37a8bffabe4c
|
[] |
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,164
|
java
|
package uk.co.homletmoo.hm001;
import java.util.Iterator;
import java.util.Random;
import java.util.Vector;
public class Entity {
private float x, y, z;
private Vector<Renderable> graphics;
private Random rand;
private int speed;
public Entity(float x, float y, float z, Renderable graphic)
{
this.x = x;
this.y = y;
this.z = z;
graphics = new Vector<Renderable>();
this.graphics.add(graphic);
rand = new Random();
speed = rand.nextInt(110) + 5;
}
public void update(int delta, Input input)
{
if(input.mouseLeft)
z -= speed;
else if(input.mouseRight)
z += speed;
if(z < 0)
{
z = Attr.SIZE;
x = rand.nextFloat() * Attr.SIZE;
y = rand.nextFloat() * Attr.SIZE;
}else if(z > Attr.SIZE)
{
z = 0;
x = rand.nextFloat() * Attr.SIZE;
y = rand.nextFloat() * Attr.SIZE;
}
}
public void sendRenderables(Vector<Renderable> stack)
{
Iterator<Renderable> i = graphics.iterator();
while(i.hasNext())
{
Renderable r = i.next();
r.x = r.offsetX + x;
r.y = r.offsetY + y;
r.z = r.offsetZ + z;
}
stack.addAll(graphics);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1afa0b8d684d99906d9a657bcc874f9cecdfc139
|
4de575ab391548cf0b125f737e271ab98cd18b14
|
/src/main/java/biweekly/property/TimezoneId.java
|
41eefbbe0fcd62f6564df6e48f2476091eccd53c
|
[
"BSD-2-Clause",
"BSD-2-Clause-Views"
] |
permissive
|
mcantrell/biweekly
|
fe0a0d58a93fa1977496b7c73dc3f910f626d88a
|
8009144ebffa696b25fc038115df554127099f46
|
refs/heads/master
| 2021-01-18T16:31:03.639153
| 2015-12-31T01:59:43
| 2015-12-31T01:59:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,945
|
java
|
package biweekly.property;
import biweekly.component.VTimezone;
/*
Copyright (c) 2013-2015, Michael Angstadt
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* Defines a unique identifier for a {@link VTimezone} component. The identifier
* must be unique within the scope of the iCalendar object.
* @author Michael Angstadt
* @see <a href="http://tools.ietf.org/html/rfc5545#page-102">RFC 5545
* p.102-3</a>
* @see <a href="http://tools.ietf.org/html/rfc2445#page-97">RFC 2445 p.97-8</a>
*/
public class TimezoneId extends TextProperty {
/**
* Creates a timezone identifier property.
* @param timezone the timezone identifier
*/
public TimezoneId(String timezone) {
super(timezone);
}
}
|
[
"mike.angstadt@gmail.com"
] |
mike.angstadt@gmail.com
|
e030c2270ce7ccafe8ce4b56142e7ad77e2a3779
|
edeb76ba44692dff2f180119703c239f4585d066
|
/extRasterTools-SE/src-test-ui/org/gvsig/rastertools/enhanced/graphics/panels/EnhancedGraphic.java
|
79ad5cee1a9e7fe3a33985a7998a85bf26f79407
|
[] |
no_license
|
CafeGIS/gvSIG2_0
|
f3e52bdbb98090fd44549bd8d6c75b645d36f624
|
81376f304645d040ee34e98d57b4f745e0293d05
|
refs/heads/master
| 2020-04-04T19:33:47.082008
| 2012-09-13T03:55:33
| 2012-09-13T03:55:33
| 5,685,448
| 2
| 1
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 7,449
|
java
|
/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
*
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
*/
package org.gvsig.rastertools.enhanced.graphics.panels;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.JTextField;
import org.gvsig.raster.beans.canvas.DrawableElement;
import org.gvsig.raster.beans.canvas.GCanvas;
import org.gvsig.raster.beans.canvas.layers.Border;
import org.gvsig.raster.beans.canvas.layers.GraphicHistogram;
import org.gvsig.raster.beans.canvas.layers.functions.BaseFunction;
import org.gvsig.raster.beans.canvas.layers.functions.StraightLine;
/**
* Gráfico con los elementos para la modificación de un histograma.
*
* 14-oct-2007
* @author Nacho Brodin (nachobrodin@gmail.com)
*/
public class EnhancedGraphic extends JPanel {
private static final long serialVersionUID = 5431466034535083594L;
private JComboBox lineType = null;
private JComboBox graphicType = null;
private JComboBox histogramBand = null;
private JSlider slider = null;
private JTextField minValue = null;
private JTextField maxValue = null;
private GCanvas canvas = null;
private JPanel north = null;
private JPanel south = null;
private BaseFunction dElement = null;
private double[] histogramR = new double[]{0, 0, 3, 4, 5, 8, 7, 18, 45, 36, 21, 36, 12, 23, 23, 40, 17, 10, 5, 1, 0, 0, 0};
private double[] histogramG = new double[]{8, 7, 18, 45, 36, 21, 36, 12, 23, 23, 40, 17, 16, 15, 13, 10, 5, 6, 7, 0, 2, 1};
private double[] histogramB = new double[]{0, 0, 3, 4, 5, 8, 7, 18, 45, 36, 21, 36, 12, 23, 23, 40, 17, 10, 5, 1, 0, 0, 0};
private int min = 0, max = 255;
/**
* Constructor. Se asignan los histogramas correspondientes a las bandas
* R, G y B
* @param hR Histograma de la banda R
* @param hG Histograma de la banda G
* @param hB Histograma de la banda B
*/
public EnhancedGraphic(double[] hR, double[] hG, double[] hB, int min, int max) {
this.histogramR = hR;
this.histogramG = hG;
this.histogramB = hB;
this.min = min;
this.max = max;
init();
}
/**
* Constructor para pruebas. Se toman los valores por defecto de los histogramas
*/
public EnhancedGraphic() {
init();
}
/**
* Añade un elemento dibujable a la lista
* @param line Elemento dibujable
* @param name Nombre del elemento
*/
public void addDrawableElement(DrawableElement line, String name) {
getLineType().addItem(name);
}
private void init() {
createDrawableElements();
EnhancedGraphicListener listener = new EnhancedGraphicListener(this);
this.setLayout(new BorderLayout());
this.add(getNorthPanel(), BorderLayout.NORTH);
this.add(getCanvas(), BorderLayout.CENTER);
this.add(getSouthPanel(), BorderLayout.SOUTH);
}
/**
* Crea la lista de objetos dibujables y la guarda en un array
*/
private void createDrawableElements() {
dElement = new StraightLine(Color.YELLOW);
getLineType().addItem("Lineal");
}
/**
* Obtiene el panel con los combos de selección de gráfico y bandas
* @return JPanel
*/
public JPanel getNorthPanel() {
if(north == null) {
north = new JPanel();
north.setLayout(new BorderLayout());
JPanel combos = new JPanel();
combos.setLayout(new GridBagLayout());
combos.add(getLineType());
combos.add(getHistogramBand());
combos.add(getGraphicType());
north.add(combos, BorderLayout.NORTH);
north.add(getSlider(), BorderLayout.CENTER);
}
return north;
}
/**
* Obtiene el panel con las entradas de texto para los valores
* máximo y mínimo
* @return JPanel
*/
public JPanel getSouthPanel() {
if(south == null) {
south = new JPanel();
south.setLayout(new GridBagLayout());
GridBagConstraints gb = new GridBagConstraints();
gb.weightx = 1;
gb.anchor = GridBagConstraints.WEST;
south.add(getMinValue(), gb);
gb.anchor = GridBagConstraints.EAST;
south.add(getMaxValue(), gb);
}
return south;
}
/**
* Obtiene el lienzo donde se dibujan las gráficas
* @return GCanvas
*/
public GCanvas getCanvas() {
if(canvas == null) {
GraphicHistogram gHistR = new GraphicHistogram(histogramR, Color.RED);
gHistR.setType(GraphicHistogram.TYPE_LINE);
canvas = new GCanvas(Color.BLACK);
canvas.addDrawableElement(new Border(Color.WHITE));
canvas.addDrawableElement(gHistR);
canvas.addDrawableElement(dElement);
}
return canvas;
}
/**
* Obtiene el combo con la banda seleccionada
* @return JComboBox
*/
public JComboBox getHistogramBand() {
if(histogramBand == null) {
histogramBand = new JComboBox();
histogramBand.addItem("R");
histogramBand.addItem("G");
histogramBand.addItem("B");
}
return histogramBand;
}
/**
* Obtiene el JComboBox que selecciona el tipo de línea
* @return JComboBox
*/
public JComboBox getLineType() {
if(lineType == null) {
lineType = new JComboBox();
}
return lineType;
}
/**
* Obtiene el JComboBox que selecciona el tipo de gráfico
* @return JComboBox
*/
public JComboBox getGraphicType() {
if(graphicType == null) {
graphicType = new JComboBox();
graphicType.addItem("Line");
graphicType.addItem("Fill");
}
return graphicType;
}
/**
* Obtiene el campo de texto con el valor máximo
* @return JTextField
*/
public JTextField getMaxValue() {
if(maxValue == null) {
maxValue = new JTextField(String.valueOf(max));
maxValue.setPreferredSize(new Dimension(34, 20));
}
return maxValue;
}
/**
* Obtiene el campo de texto con el valor mínimo
* @return JTextField
*/
public JTextField getMinValue() {
if(minValue == null) {
minValue = new JTextField(String.valueOf(min));
minValue.setPreferredSize(new Dimension(34, 20));
}
return minValue;
}
/**
* Obtiene el slider
* @return JSlider
*/
public JSlider getSlider() {
if(slider == null) {
slider = new JSlider();
}
return slider;
}
/**
* Obtiene el histograma correspondiente a una banda de color
* @param value Banda de la cual se quiere obtener el histograma
* @return histograma
*/
public double[] getHistogram(String value) {
if(value.equals("R"))
return histogramR;
if(value.equals("G"))
return histogramG;
if(value.equals("B"))
return histogramB;
return null;
}
}
|
[
"tranquangtruonghinh@gmail.com"
] |
tranquangtruonghinh@gmail.com
|
ee9c53a1ab548b564530a1675fdaa0ea02c4e88a
|
5182c102b4e427c8d67a0fd54f06d703033f2580
|
/springproject/src/main/java/com/allianz/spring/boot/customer/ICustomerRepo.java
|
905b7891b643068f92d60063a58726a0cb80707d
|
[] |
no_license
|
osmanyoy/yesil
|
2cb7da59350cd018509e3471b7d081eb12e3b06f
|
d7718de6331f71035f647e0e097475b20a5f19f7
|
refs/heads/master
| 2020-03-21T15:08:04.609712
| 2019-01-09T11:50:13
| 2019-01-09T11:50:13
| 138,696,188
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 178
|
java
|
package com.allianz.spring.boot.customer;
import org.springframework.data.repository.CrudRepository;
public interface ICustomerRepo extends CrudRepository<Customer, Long> {
}
|
[
"osman.yaycioglu@gmail.com"
] |
osman.yaycioglu@gmail.com
|
804c37dbf643e127baaa920afc9bd4850c488503
|
882e77219bce59ae57cbad7e9606507b34eebfcf
|
/mi2s_10_miui12/src/main/java/com/android/server/am/ActivityManagerDebugConfig.java
|
d192a6ea49a261f30c05606fe75ee5ab188cfd1b
|
[] |
no_license
|
CrackerCat/XiaomiFramework
|
17a12c1752296fa1a52f61b83ecf165f328f4523
|
0b7952df317dac02ebd1feea7507afb789cef2e3
|
refs/heads/master
| 2022-06-12T03:30:33.285593
| 2020-05-06T11:30:54
| 2020-05-06T11:30:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,427
|
java
|
package com.android.server.am;
class ActivityManagerDebugConfig {
static final boolean APPEND_CATEGORY_NAME = false;
static final boolean DEBUG_ALL = false;
static final boolean DEBUG_ANR = false;
static final boolean DEBUG_BACKGROUND_CHECK = false;
static final boolean DEBUG_BACKUP = false;
static final boolean DEBUG_BROADCAST = false;
static final boolean DEBUG_BROADCAST_BACKGROUND = false;
static final boolean DEBUG_BROADCAST_DEFERRAL = false;
static final boolean DEBUG_BROADCAST_LIGHT = false;
static final boolean DEBUG_COMPACTION = false;
static final boolean DEBUG_FOREGROUND_SERVICE = false;
static final boolean DEBUG_LRU = false;
static final boolean DEBUG_MU = false;
static final boolean DEBUG_NETWORK = false;
static final boolean DEBUG_OOM_ADJ = false;
static final boolean DEBUG_OOM_ADJ_REASON = false;
static final boolean DEBUG_PERMISSIONS_REVIEW = false;
static final boolean DEBUG_POWER = false;
static final boolean DEBUG_POWER_QUICK = false;
static final boolean DEBUG_PROCESSES = false;
static final boolean DEBUG_PROCESS_KILL = true;
static final boolean DEBUG_PROCESS_OBSERVERS = false;
static final boolean DEBUG_PROVIDER = false;
static final boolean DEBUG_PSS = false;
static final boolean DEBUG_SERVICE = false;
static final boolean DEBUG_SERVICE_EXECUTING = false;
static final boolean DEBUG_UID_OBSERVERS = false;
static final boolean DEBUG_USAGE_STATS = false;
static final boolean DEBUG_WHITELISTS = false;
static final String POSTFIX_BACKUP = "";
static final String POSTFIX_BROADCAST = "";
static final String POSTFIX_CLEANUP = "";
static final String POSTFIX_LRU = "";
static final String POSTFIX_MU = "_MU";
static final String POSTFIX_NETWORK = "_Network";
static final String POSTFIX_OOM_ADJ = "";
static final String POSTFIX_POWER = "";
static final String POSTFIX_PROCESSES = "";
static final String POSTFIX_PROCESS_OBSERVERS = "";
static final String POSTFIX_PROVIDER = "";
static final String POSTFIX_PSS = "";
static final String POSTFIX_SERVICE = "";
static final String POSTFIX_SERVICE_EXECUTING = "";
static final String POSTFIX_UID_OBSERVERS = "";
static final String TAG_AM = "ActivityManager";
static final boolean TAG_WITH_CLASS_NAME = false;
ActivityManagerDebugConfig() {
}
}
|
[
"sanbo.xyz@gmail.com"
] |
sanbo.xyz@gmail.com
|
d802ebcc1c6f566a4328af221118771dccfc1f75
|
267e5246e77cdd66122a22bd51865aaabef0f858
|
/src/org/seqcode/gseutils/graphs/RandomDirectedGraph.java
|
e1bff6842b42550ecd233359b851a218fcf15838
|
[
"MIT"
] |
permissive
|
seqcode/seqcode-core
|
12cdf8d8fcd74ff31cb3ca07bbd1e1f24f39648b
|
b080986fce910c32a44915ac8f7edd40c83b5e56
|
refs/heads/master
| 2023-06-09T01:58:30.432696
| 2023-05-25T17:38:40
| 2023-05-25T17:38:40
| 60,567,823
| 6
| 4
|
MIT
| 2023-05-25T17:38:42
| 2016-06-06T23:40:12
|
Java
|
UTF-8
|
Java
| false
| false
| 916
|
java
|
/*
* Author: tdanford
* Date: Nov 20, 2008
*/
package org.seqcode.gseutils.graphs;
import java.util.*;
/**
* Erdos-Renyi random graph! Directed, in particular.
*
* @author tdanford
*
*/
public class RandomDirectedGraph extends DirectedGraph {
private Random rand;
private String[] vertices;
public RandomDirectedGraph(int n, double p) {
rand = new Random();
vertices= new String[n];
for(int i = 0; i < vertices.length; i++) {
String name = String.format("%d", i);
addVertex(name);
vertices[i] = name;
}
for(int i = 0; i < vertices.length; i++) {
for(int j = 0; j < vertices.length; j++) {
if(i != j) {
double pedge = rand.nextDouble();
if(pedge <= p) {
addEdge(vertices[i], vertices[j]);
}
}
}
}
}
public String chooseVertex() {
return vertices[rand.nextInt(vertices.length)];
}
}
|
[
"mahony@psu.edu"
] |
mahony@psu.edu
|
e631f50899b75c44cf19c7d8fbf1e960e524a5b5
|
f39ac05cfb54335c2da4910d8809214d9318108a
|
/sz-auth/src/main/java/cn/gov/suzhou/auth/config/WebSecurityConfig.java
|
93b30e942d685f71a541bd881c6b3d90589f7c86
|
[
"MIT"
] |
permissive
|
DJaren/smart-compound
|
8c72c2f480836e7775285641f8f33002c4e225c0
|
5a0cd0d80ed5a613f4f91ffdc83c9cdea2886c5f
|
refs/heads/master
| 2022-12-02T16:17:29.880468
| 2020-08-07T07:23:08
| 2020-08-07T07:23:08
| 286,360,799
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,957
|
java
|
package cn.gov.suzhou.auth.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
/**
* Security 安全认证相关配置
* Oauth2依赖于Security 默认情况下WebSecurityConfig执行比ResourceServerConfig优先
*
* @author ruoyi
*/
@Order(99)
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter
{
@Autowired
private UserDetailsService userDetailsService;
@Bean
public PasswordEncoder passwordEncoder()
{
return new BCryptPasswordEncoder();
}
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception
{
return super.authenticationManagerBean();
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception
{
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
}
@Override
protected void configure(HttpSecurity http) throws Exception
{
http
.authorizeRequests()
.antMatchers(
"/actuator/**",
"/oauth/*",
"/token/**").permitAll()
.anyRequest().authenticated()
.and().csrf().disable();
}
}
|
[
"email"
] |
email
|
5e93bfc58bee01cffdd6d3443af4c7dacdff3843
|
c1ae5fd52f2bddb16eef64201421d6a13be4c738
|
/SigmaSI final1/src/org/ucla/sigma/controlador/ctrlWinEditServicio.java
|
70da37181d4d99920bfd8bfe9c12f3ce5acb290a
|
[] |
no_license
|
albertdug/SIGMAJava
|
1ecbdf14c24d6d672976b8e3d825679d0bafc72d
|
03d6727283a10789902ffe68e7e8eab70442edfb
|
refs/heads/master
| 2016-09-05T19:33:43.373250
| 2015-07-16T02:11:11
| 2015-07-16T02:11:11
| 39,170,294
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,749
|
java
|
/**
*
*/
package org.ucla.sigma.controlador;
import java.util.ArrayList;
import java.util.List;
import org.ucla.sigma.componentszk.MensajeEmergente;
import org.ucla.sigma.componentszk.MensajeListener;
import org.ucla.sigma.modelo.Servicio;
import org.ucla.sigma.modelo.TipoServicio;
import org.ucla.sigma.servicio.ServicioServicio;
import org.ucla.sigma.servicio.ServicioTipoServicio;
import org.zkoss.spring.SpringUtil;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Button;
import org.zkoss.zul.Listbox;
import org.zkoss.zul.Textbox;
import org.zkoss.zul.Window;
/**
* @author promo49
*
*/
public class ctrlWinEditServicio extends GenericForwardComposer {
private Window winEditServicio;
private Button btnCancelar;
private Button btnGuardar;
private Listbox listTipoServicio;
private Textbox txtDescripcion;
private Textbox txtNombre;
// ----------------------------------------------------------------------------------------------------
private ServicioServicio servicioServicio;
private ServicioTipoServicio servicioTipoServicio;
private ctrlWinServicio ctrlWinServicio;
private int indexTipoServicio = -1;
// ----------------------------------------------------------------------------------------------------
private List<TipoServicio> tipoServicios = new ArrayList<TipoServicio>();
private Servicio servicio;
// ----------------------------------------------------------------------------------------------------
public Window getWinEditServicio() {
return winEditServicio;
}
public void setWinEditServicio(Window winEditServicio) {
this.winEditServicio = winEditServicio;
}
public Button getBtnCancelar() {
return btnCancelar;
}
public void setBtnCancelar(Button btnCancelar) {
this.btnCancelar = btnCancelar;
}
public Button getBtnGuardar() {
return btnGuardar;
}
public void setBtnGuardar(Button btnGuardar) {
this.btnGuardar = btnGuardar;
}
public Listbox getListTipoServicio() {
return listTipoServicio;
}
public void setListTipoServicio(Listbox listTipoServicio) {
this.listTipoServicio = listTipoServicio;
}
public Textbox getTxtDescripcion() {
return txtDescripcion;
}
public void setTxtDescripcion(Textbox txtDescripcion) {
this.txtDescripcion = txtDescripcion;
}
public Textbox getTxtNombre() {
return txtNombre;
}
public void setTxtNombre(Textbox txtNombre) {
this.txtNombre = txtNombre;
}
public ServicioServicio getServicioServicio() {
return servicioServicio;
}
public void setServicioServicio(ServicioServicio servicioServicio) {
this.servicioServicio = servicioServicio;
}
public ServicioTipoServicio getServicioTipoServicio() {
return servicioTipoServicio;
}
public void setServicioTipoServicio(ServicioTipoServicio servicioTipoServicio) {
this.servicioTipoServicio = servicioTipoServicio;
}
public ctrlWinServicio getCtrlWinServicio() {
return ctrlWinServicio;
}
public void setCtrlWinServicio(ctrlWinServicio ctrlWinServicio) {
this.ctrlWinServicio = ctrlWinServicio;
}
public int getIndexTipoServicio() {
return indexTipoServicio;
}
public void setIndexTipoServicio(int indexTipoServicio) {
this.indexTipoServicio = indexTipoServicio;
}
public List<TipoServicio> getTipoServicios() {
return tipoServicios;
}
public void setTipoServicios(List<TipoServicio> tipoServicios) {
this.tipoServicios = tipoServicios;
}
public Servicio getServicio() {
return servicio;
}
public void setServicio(Servicio servicio) {
this.servicio = servicio;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
winEditServicio.setAttribute(comp.getId() + "ctrl", this);
servicioServicio = (ServicioServicio) SpringUtil.getBean("beanServicioServicio");
servicioTipoServicio = (ServicioTipoServicio) SpringUtil
.getBean("beanServicioTipoServicio");
servicio = new Servicio();
tipoServicios = servicioTipoServicio.buscarTodos();
ctrlWinServicio = (ctrlWinServicio) arg.get("ctrlWinServicio");
if (!(arg.get("objeto") == null)) {
servicio = (Servicio) arg.get("objeto");
indexTipoServicio = tipoServicios.indexOf(servicio.getTipoServicio());
}
}
public void onClick$btnCancelar() {
ctrlWinServicio.apagarBotones();
this.winEditServicio.detach();
}
public void onClick$btnGuardar() {
if (txtNombre.getValue().trim().equalsIgnoreCase("")) {
MensajeEmergente.mostrar("NOEMPTY", "\nNombre",
new MensajeListener() {
@Override
public void alDestruir() {
txtNombre.setFocus(true);
}
});
} else if (listTipoServicio.getSelectedIndex() < 0) {
MensajeEmergente.mostrar("NOEMPTY", "\nTipo Servicio",
new MensajeListener() {
@Override
public void alDestruir() {
listTipoServicio.setFocus(true);
}
});
} else {
Servicio servicioTemp = servicioServicio.buscarUno(servicio.getNombre());
if (servicioTemp != null) {
servicio.setId(servicioTemp.getId());
}
servicio.setTipoServicio((TipoServicio) listTipoServicio.getSelectedItem().getValue());
try {
servicioServicio.guardarServicio(servicio);
MensajeEmergente.mostrar("REGINSERT", new MensajeListener() {
@Override
public void alAceptar() {
ctrlWinServicio.recargar();
ctrlWinServicio.apagarBotones();
winEditServicio.detach();
}
});
} catch (Exception e) {
MensajeEmergente.mostrar("ERRDB");
e.printStackTrace();
}
}
}
public void onClose$winEditServicio() {
ctrlWinServicio.apagarBotones();
this.winEditServicio.detach();
}
public void onAfterRender$listTipoServicio() {
listTipoServicio.setSelectedIndex(indexTipoServicio);
}
}
|
[
"albertrdg@gmail.com"
] |
albertrdg@gmail.com
|
afc4416df3cc164a4c733a6f8502e85288fa49ba
|
7d28d457ababf1b982f32a66a8896b764efba1e8
|
/platform-pojo-bl/src/test/java/ua/com/fielden/platform/entity/CorrectEntityWithDynamicEntityKey.java
|
64c775513cc5a8eac147d491a0599cee94b4603f
|
[
"MIT"
] |
permissive
|
fieldenms/tg
|
f742f332343f29387e0cb7a667f6cf163d06d101
|
f145a85a05582b7f26cc52d531de9835f12a5e2d
|
refs/heads/develop
| 2023-08-31T16:10:16.475974
| 2023-08-30T08:23:18
| 2023-08-30T08:23:18
| 20,488,386
| 17
| 9
|
MIT
| 2023-09-14T17:07:35
| 2014-06-04T15:09:44
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 982
|
java
|
/**
*
*/
package ua.com.fielden.platform.entity;
import ua.com.fielden.platform.entity.annotation.CompositeKeyMember;
import ua.com.fielden.platform.entity.annotation.IsProperty;
import ua.com.fielden.platform.entity.annotation.KeyType;
import ua.com.fielden.platform.entity.annotation.Observable;
@KeyType(DynamicEntityKey.class)
public class CorrectEntityWithDynamicEntityKey extends AbstractEntity<DynamicEntityKey> {
private static final long serialVersionUID = 1L;
@IsProperty
@CompositeKeyMember(1)
protected Long property1;
@IsProperty
@CompositeKeyMember(2)
protected Long property2;
public Long getProperty1() {
return property1;
}
@Observable
public void setProperty1(final Long property1) {
this.property1 = property1;
}
public Long getProperty2() {
return property2;
}
@Observable
public void setProperty2(final Long property2) {
this.property2 = property2;
}
}
|
[
"oles.hodych@gmail.com"
] |
oles.hodych@gmail.com
|
8188d62923609fe1405ebec281ef4999e57756d3
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_45214.java
|
d91c2b20ac426c6730f2f9c22c5e307128165c42
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 211
|
java
|
private static List<String> getValues(final Map<String,Iterable<String>> headers,final String key){
if (headers.containsKey(key)) {
return (List<String>)headers.get(key);
}
return new ArrayList<>();
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
2f14327520c5d8975821eaf086b760e533b3dd5c
|
dfcf12d0015a2bd1e8da5ebfd9add6585aee6414
|
/substance-extras/src/main/java/org/pushingpixels/substance/extras/api/skinpack/StreetlightsSkin.java
|
6da5d1fd500d660b38565b5c17227b72544a24c2
|
[
"BSD-3-Clause"
] |
permissive
|
https-ultronhouse-com/radiance
|
1176a6222ee3e765af599cb5e00eaefcee95f61f
|
0f4851821b311de7a92244565685817c46069f74
|
refs/heads/master
| 2020-06-25T20:05:09.965232
| 2019-07-21T14:29:46
| 2019-07-21T14:29:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,946
|
java
|
/*
* Copyright (c) 2005-2019 Radiance 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 the copyright holder 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.substance.extras.api.skinpack;
import org.pushingpixels.substance.api.*;
import org.pushingpixels.substance.api.SubstanceSlices.*;
import org.pushingpixels.substance.api.colorscheme.*;
import org.pushingpixels.substance.api.painter.border.GlassBorderPainter;
import org.pushingpixels.substance.api.painter.decoration.ArcDecorationPainter;
import org.pushingpixels.substance.api.painter.fill.GlassFillPainter;
import org.pushingpixels.substance.api.painter.highlight.ClassicHighlightPainter;
import org.pushingpixels.substance.api.shaper.ClassicButtonShaper;
import org.pushingpixels.substance.extras.api.watermarkpack.SubstanceMetalWallWatermark;
import java.awt.*;
/**
* <code>Streelights</code> skin. This class is part of officially supported
* API.
*
* @author Kirill Grouchnikov
*/
public class StreetlightsSkin extends SubstanceSkin {
/**
* Display name for <code>this</code> skin.
*/
public static final String NAME = "Streetlights";
/**
* Creates a new <code>Streetlights</code> skin.
*/
public StreetlightsSkin() {
SubstanceColorScheme activeScheme = new SunsetColorScheme().saturate(0.4);
// dark green theme by shifting charcoal
SubstanceColorScheme deepGreenScheme = new CharcoalColorScheme().hueShift(0.35);
// default theme is ebony blended with the dark green
SubstanceColorScheme defaultScheme =
new EbonyColorScheme().blendWith(deepGreenScheme, 0.85);
// disabled theme is shaded dark green
SubstanceColorScheme disabledScheme = deepGreenScheme.shade(0.4);
// default scheme bundle
SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
activeScheme, defaultScheme, disabledScheme);
// use charcoal for borders on active states
defaultSchemeBundle.registerColorScheme(new CharcoalColorScheme(),
ColorSchemeAssociationKind.BORDER, ComponentState
.getActiveStates());
// and 60% alpha on disabled controls
defaultSchemeBundle.registerColorScheme(disabledScheme, 0.6f,
ComponentState.DISABLED_UNSELECTED,
ComponentState.DISABLED_SELECTED);
this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
DecorationAreaType.NONE);
// mark title panes and headers as decoration areas
this.registerAsDecorationArea(defaultScheme,
DecorationAreaType.PRIMARY_TITLE_PANE,
DecorationAreaType.SECONDARY_TITLE_PANE,
DecorationAreaType.HEADER);
// set dark green as watermark scheme
this.watermarkScheme = new BottleGreenColorScheme().shiftBackground(
new Color(0, 50, 0), 0.7);
this.setTabFadeStart(1.0);
this.setTabFadeEnd(1.0);
// additional skin settings
this.buttonShaper = new ClassicButtonShaper();
this.watermark = new SubstanceMetalWallWatermark();
this.borderPainter = new GlassBorderPainter();
this.highlightPainter = new ClassicHighlightPainter();
this.fillPainter = new GlassFillPainter();
this.decorationPainter = new ArcDecorationPainter();
}
@Override
public String getDisplayName() {
return NAME;
}
}
|
[
"kirill.grouchnikov@gmail.com"
] |
kirill.grouchnikov@gmail.com
|
2cbea4db036ce0229fd620ef8548b6ba49e2cdcc
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/28/28_f40ca1958aae3d10c75c77a13b2e39057841acdb/QuartzTimerClusterJobTest/28_f40ca1958aae3d10c75c77a13b2e39057841acdb_QuartzTimerClusterJobTest_t.java
|
19f6a1f5052bc00776cd6d9728c3ecc6689eac55
|
[] |
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,468
|
java
|
package org.springside.examples.showcase.schedule;
import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springside.modules.test.category.UnStable;
import org.springside.modules.test.log.Log4jMockAppender;
import org.springside.modules.test.spring.SpringTransactionalTestCase;
import org.springside.modules.utils.Threads;
/**
* Quartz可集群Timer Job测试.
*
* @author calvin
*/
@Category(UnStable.class)
@DirtiesContext
@ContextConfiguration(locations = { "/applicationContext.xml", "/schedule/applicationContext-quartz-timer-cluster.xml" })
@TransactionConfiguration(transactionManager = "defaultTransactionManager")
public class QuartzTimerClusterJobTest extends SpringTransactionalTestCase {
@Test
public void scheduleJob() throws Exception {
//加载测试用logger appender
Log4jMockAppender appender = new Log4jMockAppender();
appender.addToLogger(QuartzClusterableJob.class);
//等待任务延时启动
Threads.sleep(3000);
//验证任务已执行
assertEquals(1, appender.getLogsCount());
assertEquals("There are 6 user in database, printed by quartz cluster job on node default.",
appender.getFirstMessage());
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
45fae4ac027f3c975585af5422e49a693a32f4bd
|
3e0a4ac41eeb78f19d86a4d84c84751702af1d09
|
/designpattern/src/main/java/com/example/responsibilitychain/chain/Responsibility2.java
|
fead6d9968ea2d1b600f0909cc85370446b69336
|
[] |
no_license
|
feifeixiaoshizi/javaproject
|
9ba95a62599196f1408722d8d76d9b2a24a36367
|
887b8d450c80cfedfa927fa13e10ca7bf792a599
|
refs/heads/master
| 2021-04-28T20:43:59.452356
| 2020-02-03T00:48:27
| 2020-02-03T00:48:27
| 121,932,950
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package com.example.responsibilitychain.chain;
import com.example.responsibilitychain.chain.IResponsibility;
/**
* Created by Administrator on 2017/12/20 0020.
*/
public class Responsibility2 extends IResponsibility {
@Override
public void handle(String str) {
System.out.println("i am a r2!");
if(successor!=null){
successor.handle(str);
}
}
}
|
[
"18713027427@163.com"
] |
18713027427@163.com
|
9bf5e1c02f44614844383ba0b5cc627bd2914b53
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipsejdt_cluster/64620/src_1.java
|
8fb60aeb72daa27605448dddbc3446e30fcd9805
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,540
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.compiler.ast;
import org.eclipse.jdt.internal.compiler.ASTVisitor;
import org.eclipse.jdt.internal.compiler.impl.*;
import org.eclipse.jdt.internal.compiler.codegen.*;
import org.eclipse.jdt.internal.compiler.flow.*;
import org.eclipse.jdt.internal.compiler.lookup.*;
public class DoStatement extends Statement {
public Expression condition;
public Statement action;
private Label breakLabel, continueLabel;
// for local variables table attributes
int mergedInitStateIndex = -1;
public DoStatement(Expression condition, Statement action, int s, int e) {
this.sourceStart = s;
this.sourceEnd = e;
this.condition = condition;
this.action = action;
// remember useful empty statement
if (action instanceof EmptyStatement) action.bits |= IsUsefulEmptyStatement;
}
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
breakLabel = new Label();
continueLabel = new Label();
LoopingFlowContext loopingContext =
new LoopingFlowContext(
flowContext,
this,
breakLabel,
continueLabel,
currentScope);
Constant cst = condition.constant;
boolean isConditionTrue = cst != NotAConstant && cst.booleanValue() == true;
cst = condition.optimizedBooleanConstant();
boolean isConditionOptimizedTrue = cst != NotAConstant && cst.booleanValue() == true;
boolean isConditionOptimizedFalse = cst != NotAConstant && cst.booleanValue() == false;
int previousMode = flowInfo.reachMode();
FlowInfo actionInfo = flowInfo.copy().unconditionalInits().discardNullRelatedInitializations();
if ((action != null) && !action.isEmptyBlock()) {
actionInfo = action.analyseCode(currentScope, loopingContext, actionInfo);
// code generation can be optimized when no need to continue in the loop
if (!actionInfo.isReachable() && !loopingContext.initsOnContinue.isReachable()) {
continueLabel = null;
}
}
/* Reset reach mode, to address following scenario.
* final blank;
* do { if (true) break; else blank = 0; } while(false);
* blank = 1; // may be initialized already
*/
actionInfo.setReachMode(previousMode);
actionInfo =
condition.analyseCode(
currentScope,
loopingContext,
(action == null
? actionInfo
: (actionInfo.mergedWith(loopingContext.initsOnContinue))));
if (!isConditionOptimizedFalse && continueLabel != null) {
loopingContext.complainOnDeferredChecks(currentScope, actionInfo);
}
// end of loop
FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
loopingContext.initsOnBreak,
isConditionOptimizedTrue,
actionInfo.initsWhenFalse().addInitializationsFrom(flowInfo), // recover null inits from before condition analysis
false, // never consider opt false case for DO loop, since break can always occur (47776)
!isConditionTrue /*do{}while(true); unreachable(); */);
mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
return mergedInfo;
}
/**
* Do statement code generation
*
*/
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachable) == 0) {
return;
}
int pc = codeStream.position;
// labels management
Label actionLabel = new Label(codeStream);
actionLabel.place();
breakLabel.initialize(codeStream);
if (continueLabel != null) {
continueLabel.initialize(codeStream);
}
// generate action
if (action != null) {
action.generateCode(currentScope, codeStream);
}
// generate condition
if (continueLabel != null) {
continueLabel.place();
condition.generateOptimizedBoolean(
currentScope,
codeStream,
actionLabel,
null,
true);
}
breakLabel.place();
// May loose some local variable initializations : affecting the local variable attributes
if (mergedInitStateIndex != -1) {
codeStream.removeNotDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
codeStream.addDefinitelyAssignedVariables(currentScope, mergedInitStateIndex);
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output).append("do"); //$NON-NLS-1$
if (action == null)
output.append(" ;\n"); //$NON-NLS-1$
else {
output.append('\n');
action.printStatement(indent + 1, output).append('\n');
}
output.append("while ("); //$NON-NLS-1$
return condition.printExpression(0, output).append(");"); //$NON-NLS-1$
}
public void resolve(BlockScope scope) {
TypeBinding type = condition.resolveTypeExpecting(scope, BooleanBinding);
condition.computeConversion(scope, type, type);
if (action != null)
action.resolve(scope);
}
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (action != null) {
action.traverse(visitor, scope);
}
condition.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
864ebb62adcddfc8693d39d0d5a79040a8ee6227
|
2c0da6f10a8789bdad22f65c912e3eb7b2a0a1e2
|
/camel-spring-salesforce/src/main/java/org/apache/camel/salesforce/dto/QueryRecordsBusinessProcess.java
|
5d6dcaabf598b278ed2ffe00ed0345f01b80a843
|
[] |
no_license
|
xiwu/gss.samples
|
9fe35e4c2c673a09463da72378936ce46c558211
|
d5dc2c0a91c0435c183038fc9384b461ede92772
|
refs/heads/master
| 2023-05-13T04:21:24.468623
| 2023-04-28T09:34:13
| 2023-04-28T09:34:13
| 42,858,630
| 1
| 0
| null | 2022-12-23T09:15:35
| 2015-09-21T10:05:59
|
Java
|
UTF-8
|
Java
| false
| false
| 712
|
java
|
/*
* Salesforce Query DTO generated by camel-salesforce-maven-plugin
* Generated on: Mon Aug 15 13:54:43 CST 2016
*/
package org.apache.camel.salesforce.dto;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase;
import java.util.List;
/**
* Salesforce QueryRecords DTO for type BusinessProcess
*/
public class QueryRecordsBusinessProcess extends AbstractQueryRecordsBase {
@XStreamImplicit
private List<BusinessProcess> records;
public List<BusinessProcess> getRecords() {
return records;
}
public void setRecords(List<BusinessProcess> records) {
this.records = records;
}
}
|
[
"vicky.wuxiaohui@gmail.com"
] |
vicky.wuxiaohui@gmail.com
|
321fca1057a67b3390af7ea69fcf2999326d0995
|
3d13b5c95b0a2da98f9e86a637aa42fa5e485cb7
|
/06适配器模式/adaptorpattern/src/main/java/cn/codenest/App.java
|
7614e4834061581372c0e834c08dd52efd7646dc
|
[] |
no_license
|
HymanLiuTS/DesignPatternTS
|
1bcd5d155a65ad9eea59107d41b886d839393004
|
ef49d844c7d38fc51dbba59ce89fe88bd2189d10
|
refs/heads/master
| 2021-07-10T13:21:09.636660
| 2021-02-23T10:48:07
| 2021-02-23T10:48:07
| 229,541,645
| 2
| 0
| null | 2020-10-13T20:59:08
| 2019-12-22T08:53:45
|
Java
|
UTF-8
|
Java
| false
| false
| 793
|
java
|
package cn.codenest;
import java.util.ArrayList;
import java.util.Vector;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
Duck duck=new MallardDuck();
duck.quack();
duck.fly();
Turkey turky=new WildTurkey();
TurkeyAdapter adapter=new TurkeyAdapter(turky);
adapter.quack();
adapter.fly();
ArrayList list=new ArrayList();
list.add(1);
list.add(3);
list.add(7);
list.add(9);
list.add(12);
Vector v=new Vector();
v.add(1);
v.add(3);
v.add(5);
EnumerationIterator it=new EnumerationIterator(v.elements());
while ((it.hasNext())){
System.out.println(it.next());
}
}
}
|
[
"879651072@qq.com"
] |
879651072@qq.com
|
ea32a232418b37860c7b85ed71958fb0815300e3
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/er/src/main/java/com/huaweicloud/sdk/er/v3/model/ShowAttachmentRequest.java
|
d508d77c4caa1294582066f6f1627c8142018581
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,351
|
java
|
package com.huaweicloud.sdk.er.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* Request Object
*/
public class ShowAttachmentRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "er_id")
private String erId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "attachment_id")
private String attachmentId;
public ShowAttachmentRequest withErId(String erId) {
this.erId = erId;
return this;
}
/**
* 企业路由器实例ID
* @return erId
*/
public String getErId() {
return erId;
}
public void setErId(String erId) {
this.erId = erId;
}
public ShowAttachmentRequest withAttachmentId(String attachmentId) {
this.attachmentId = attachmentId;
return this;
}
/**
* 连接ID
* @return attachmentId
*/
public String getAttachmentId() {
return attachmentId;
}
public void setAttachmentId(String attachmentId) {
this.attachmentId = attachmentId;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ShowAttachmentRequest that = (ShowAttachmentRequest) obj;
return Objects.equals(this.erId, that.erId) && Objects.equals(this.attachmentId, that.attachmentId);
}
@Override
public int hashCode() {
return Objects.hash(erId, attachmentId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowAttachmentRequest {\n");
sb.append(" erId: ").append(toIndentedString(erId)).append("\n");
sb.append(" attachmentId: ").append(toIndentedString(attachmentId)).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
|
e805ac4db9dafd6ef2a1d1aed09216d29a369f30
|
872775d142e9269681d331844ce0d0892ef4ebce
|
/src/com/hm/structure/BinaryTreeNode.java
|
14f9951d554cec3c8e95593d4fff026478e2f952
|
[] |
no_license
|
humanheima/JavaBase
|
b756274931b21040ca80a74ac00dc7a20ff7b92b
|
dba8fc5940f16795a0c2bad34d639f5e5713c8f6
|
refs/heads/master
| 2023-06-08T20:02:31.280986
| 2023-05-25T10:04:40
| 2023-05-25T10:04:40
| 88,835,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 968
|
java
|
package com.hm.structure;
/**
* 二叉树节点
*/
public class BinaryTreeNode {
public int value;
public BinaryTreeNode left;
public BinaryTreeNode right;
public BinaryTreeNode(int value) {
this.value = value;
}
public BinaryTreeNode(int value, BinaryTreeNode left, BinaryTreeNode right) {
this.value = value;
this.left = left;
this.right = right;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public BinaryTreeNode getLeft() {
return left;
}
public void setLeft(BinaryTreeNode left) {
this.left = left;
}
public BinaryTreeNode getRight() {
return right;
}
public void setRight(BinaryTreeNode right) {
this.right = right;
}
public BinaryTreeNode() {
}
@Override
public String toString() {
return "value:" + value;
}
}
|
[
"humanheima@gmail.com"
] |
humanheima@gmail.com
|
de712aa3a0eb8840edb64d5750aacb96e03a9aeb
|
7ef841751c77207651aebf81273fcc972396c836
|
/dstream/src/main/java/com/loki/dstream/stubs/SampleClass7471.java
|
4174fb1799760cfc05b486dc2d8a5f0435d87f5e
|
[] |
no_license
|
SergiiGrechukha/ModuleApp
|
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
|
00e22d51c8f7100e171217bcc61f440f94ab9c52
|
refs/heads/master
| 2022-05-07T13:27:37.704233
| 2019-11-22T07:11:19
| 2019-11-22T07:11:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 274
|
java
|
package com.loki.dstream.stubs;
public class SampleClass7471 {
private SampleClass7472 sampleClass;
public SampleClass7471(){
sampleClass = new SampleClass7472();
}
public String getClassName() {
return sampleClass.getClassName();
}
}
|
[
"sergey.grechukha@gmail.com"
] |
sergey.grechukha@gmail.com
|
8040a8bc916ba471ae16b3748bfdb99e5ddc73b1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_89386b75829aaa22b8d752fc25ada117f713cfe8/HtmlTag/3_89386b75829aaa22b8d752fc25ada117f713cfe8_HtmlTag_s.java
|
d2bb6e457523c6ee705115e905ba92c1d74a2221
|
[] |
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
| 4,380
|
java
|
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2004 Oliver Burn
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks.javadoc;
/**
* Used to keep track of a tag and the text that follows it.
*
* @author Chris Stillwell
*/
class HtmlTag
{
/** The maximum length of text to display with this tag. */
private static final int MAX_TEXT_LEN = 60;
/** The HTML tag name. */
private final String mId;
/** The line number in the source file where this tag was found. */
private final int mLineNo;
/** The position within the line where this tag was found. */
private final int mPosition;
/** The comment line of text where this tag appears. */
private final String mText;
/** if this tag is self-closed. */
private final boolean mClosedTag;
/** if the tag is inomplete. */
private final boolean mIncomplete;
/**
* Construct the HtmlTag.
* @param aId the HTML tag name.
* @param aLineNo the source line number of this tag.
* @param aPosition the position within the text of this tag.
* @param aClosedTag if this tag is self-closed (XHTML style)
* @param aIncomplete is the tag is incomplete.
* @param aText the line of comment text for this tag.
*/
HtmlTag(String aId, int aLineNo, int aPosition, boolean aClosedTag,
boolean aIncomplete, String aText)
{
mId = (!"".equals(aId) && aId.charAt(0) == '/')
? aId.substring(1) : aId;
mLineNo = aLineNo;
mPosition = aPosition;
mText = aText;
mClosedTag = aClosedTag;
mIncomplete = aIncomplete;
}
/**
* Returns the id (name) of this tag.
* @return a String id.
*/
public String getId()
{
return mId;
}
/**
* Indicates if this tag is a close (end) tag.
* @return <code>true</code> is this is a close tag.
*/
public boolean isCloseTag()
{
return (mText.charAt(mPosition + 1) == '/');
}
/**
* Indicates if this tag is a self-closed XHTML style.
* @return <code>true</code> is this is a self-closed tag.
*/
public boolean isClosedTag()
{
return mClosedTag;
}
/**
* Indicates if this tag is incomplete (has no close >).
* @return <code>true</code> if the tag is incomplete.
*/
public boolean isIncompleteTag()
{
return mIncomplete;
}
/**
* Returns the source line number where this tag was found.
* Used for displaying a Checkstyle error.
* @return an int line number.
*/
public int getLineno()
{
return mLineNo;
}
/**
* Returns the position with in the comment line where this tag
* was found. Used for displaying a Checkstyle error.
* @return an int relative to zero.
*/
public int getPosition()
{
return mPosition;
}
/**
* Returns this HTML tag and trailing text.
* Used for displaying a Checkstyle error.
* @return the String text of this tag.
*/
public String toString()
{
final int startOfText = mPosition;
final int endOfText =
Math.min(startOfText + HtmlTag.MAX_TEXT_LEN, mText.length());
return mText.substring(startOfText, endOfText);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5c1da15581c1278c7111c2f5ced3ac5137c40e3b
|
07107949341afb2c0f7b7fbce09c00143aa92346
|
/src/main/java/com/github/tommyettinger/way/SmoothableGraphPath.java
|
c0ce81fef26449bb04bb452f7509ea75f9f99514
|
[
"Apache-2.0"
] |
permissive
|
tommyettinger/way
|
fb890a85950d2a9b853f3415261c876649911add
|
ac489425a6374a7ba2c6b6776af82f8427a4c87c
|
refs/heads/master
| 2020-12-07T11:31:11.952374
| 2020-01-10T02:43:12
| 2020-01-10T02:43:12
| 232,712,633
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,719
|
java
|
/*******************************************************************************
* Copyright 2014 See AUTHORS file.
*
* 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.github.tommyettinger.way;
import com.badlogic.gdx.math.Vector;
/** A path that can be smoothed by a {@link PathSmoother}.
*
* @param <N> Type of node
* @param <V> Type of vector, either 2D or 3D, implementing the {@link Vector} interface
*
* @author davebaol */
public interface SmoothableGraphPath<N, V extends Vector<V>> extends GraphPath<N> {
/** Returns the position of the node at the given index.
* @param index the index of the node you want to know the position */
V getNodePosition (int index);
/** Swaps the specified nodes of this path.
* @param index1 index of the first node to swap
* @param index2 index of the second node to swap */
void swapNodes (int index1, int index2);
/** Reduces the size of this path to the specified length (number of nodes). If the path is already smaller than the specified
* length, no action is taken.
* @param newLength the new length */
void truncatePath (int newLength);
}
|
[
"tommy.ettinger@gmail.com"
] |
tommy.ettinger@gmail.com
|
a516f6fbee8ab3a25a60228207183870850a72c4
|
b52fa223f54b51cc271e1cbfc4c28aa76e734718
|
/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/ResourceManagerAddress.java
|
d549f7bc47b2042e883c4d1f5e701f03f47289ee
|
[
"ISC",
"Apache-2.0",
"BSD-3-Clause",
"OFL-1.1"
] |
permissive
|
itharavi/flink
|
1d0b7e711df93d3a13eae42da71a08dc45aaf71f
|
f0f9343a35ff21017e2406614b34a9b1f2712330
|
refs/heads/master
| 2023-08-03T02:53:12.278756
| 2020-01-08T05:58:54
| 2020-01-10T15:51:31
| 233,090,272
| 3
| 1
|
Apache-2.0
| 2023-07-23T02:28:35
| 2020-01-10T16:47:58
| null |
UTF-8
|
Java
| false
| false
| 2,065
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.jobmaster;
import org.apache.flink.runtime.resourcemanager.ResourceManagerId;
import javax.annotation.Nonnull;
import java.util.Objects;
/**
* Current address and fencing token of the leading ResourceManager.
*/
public class ResourceManagerAddress {
@Nonnull
private final String address;
@Nonnull
private final ResourceManagerId resourceManagerId;
public ResourceManagerAddress(@Nonnull String address, @Nonnull ResourceManagerId resourceManagerId) {
this.address = address;
this.resourceManagerId = resourceManagerId;
}
@Nonnull
public String getAddress() {
return address;
}
@Nonnull
public ResourceManagerId getResourceManagerId() {
return resourceManagerId;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ResourceManagerAddress that = (ResourceManagerAddress) obj;
return Objects.equals(address, that.address) &&
Objects.equals(resourceManagerId, that.resourceManagerId);
}
@Override
public int hashCode() {
return Objects.hash(address, resourceManagerId);
}
@Override
public String toString() {
return address + '(' + resourceManagerId + ')';
}
}
|
[
"trohrmann@apache.org"
] |
trohrmann@apache.org
|
086efc855726fd5b437f773fd92bc1f1535adf1c
|
a33aac97878b2cb15677be26e308cbc46e2862d2
|
/data/libgdx/btCollisionDispatcher_getNearCallback.java
|
ea611b7d647155034003a7389f1ef634a65017e2
|
[] |
no_license
|
GabeOchieng/ggnn.tensorflow
|
f5d7d0bca52258336fc12c9de6ae38223f28f786
|
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
|
refs/heads/master
| 2022-05-30T11:17:42.278048
| 2020-05-02T11:33:31
| 2020-05-02T11:33:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
public SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void getNearCallback() {
long cPtr = CollisionJNI.btCollisionDispatcher_getNearCallback(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void(cPtr, false);
}
|
[
"bdqnghi@gmail.com"
] |
bdqnghi@gmail.com
|
4b04f2ec8695d35516a13712f6f5604956f380b4
|
13ea5b27a70bf601f5794b4a6cbf804e9ecdf56e
|
/field-backend/src/main/java/com/roberto/field/dto/Boundary.java
|
d208246cce545d1dc66ecf08ab485ffcd55fc70b
|
[] |
no_license
|
rrocharoberto/fields-data
|
ec20b0ddf99c0fbadea700d9cca1fb1578781e56
|
a858792469e9e952df35bc8e5d8e2d7be4934d9f
|
refs/heads/master
| 2022-12-22T08:31:27.721363
| 2020-09-24T12:17:47
| 2020-09-24T12:17:47
| 296,634,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 654
|
java
|
package com.roberto.field.dto;
public class Boundary {
private String id;
private String created;
private String updated;
private GeoData geoJson;
public Boundary() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getUpdated() {
return updated;
}
public void setUpdated(String updated) {
this.updated = updated;
}
public GeoData getGeoJson() {
return geoJson;
}
public void setGeoJson(GeoData geoJson) {
this.geoJson = geoJson;
}
}
|
[
"rrocha.roberto@gmail.com"
] |
rrocha.roberto@gmail.com
|
b7fea09b075fd54f0fd4efd249f54135857eaa3c
|
14b5966545f573d4643001cc115efbb3cc907baa
|
/src/main/java/net/catchpole/B9/codec/transcoder/FieldInterceptor.java
|
830a3d1be47dbf7b31c42ed7a0ba4ed44f0c0bb9
|
[
"Apache-2.0"
] |
permissive
|
slipperyseal/B9
|
a105cbc412c6a076ceb63432e2cfef40bad59ab2
|
5cf3fdceb6f623fb83a1b4b770d43a0bebba0644
|
refs/heads/slippery
| 2023-03-03T16:27:40.344044
| 2023-02-26T01:31:52
| 2023-02-26T01:31:52
| 42,109,699
| 5
| 2
|
Apache-2.0
| 2020-11-06T07:11:43
| 2015-09-08T12:04:25
|
Java
|
UTF-8
|
Java
| false
| false
| 130
|
java
|
package net.catchpole.B9.codec.transcoder;
public interface FieldInterceptor<V> {
V intercept(V currentValue, V newValue);
}
|
[
"christian@catchpole.net"
] |
christian@catchpole.net
|
b0996850a6226e8a6a999cbd4abcebd3e094bad9
|
f1878d38426d5d6460c0d2455ea91063a101b28d
|
/zuul-service/src/main/java/com/igp/zuulservice/swagger/config/ApiDocsEndpointsConfiguration.java
|
942abc87b9d0fad75a01bec9291f4373453c7add
|
[] |
no_license
|
OllieJonas/InteractableProject
|
9034c274386f8de75034224f48cf714d63094a99
|
0bf438536770acb9244d4c1d4f3c10bb35dfe76a
|
refs/heads/master
| 2022-12-28T16:58:13.016031
| 2020-10-10T15:27:07
| 2020-10-10T15:27:07
| 301,884,137
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 615
|
java
|
package com.igp.zuulservice.swagger.config;
import lombok.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.util.List;
import java.util.Map;
@Data
@NoArgsConstructor
@Configuration
@ConfigurationProperties(prefix = "api-docs")
public class ApiDocsEndpointsConfiguration {
private List<Map<String, Endpoint>> endPoints;
@Data
@NoArgsConstructor
public static class Endpoint {
private String gatewayPrefix;
private String serviceUrl;
private String servicePath;
}
}
|
[
"olliejonas@gmail.com"
] |
olliejonas@gmail.com
|
517ed29e8d48e16b040c30bf4930ca8af529d453
|
b7b870158ac741a303b854876f73173b3c984730
|
/2.JavaCore/src/com/codegym/task/task19/task1908/Solution.java
|
9c921fe46135ef9aee6ac8a49dcc67a21e34e9ed
|
[] |
no_license
|
KrisTovski/CodeGym
|
b788c65b0ec2cc71c7a75dfd39b4221b571090e4
|
74be0793b2b1f8e9e7dc576e2cb5d25da505417a
|
refs/heads/master
| 2021-12-13T01:22:09.284904
| 2021-11-28T19:23:57
| 2021-11-28T19:23:57
| 246,921,433
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 903
|
java
|
package com.codegym.task.task19.task1908;
/*
Picking out numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String firstFileName = reader.readLine();
String secondFileName = reader.readLine();
reader.close();
BufferedReader reader1 = new BufferedReader(new FileReader(firstFileName));
BufferedWriter writer = new BufferedWriter(new FileWriter(secondFileName));
while (reader1.ready()){
String s = reader1.readLine();
String[] splitted = s.split("\\s"); // spaces
for(String str : splitted){
if(str.matches("[0-9]+"))
writer.write(str + " ");
}
}
reader1.close();
writer.close();
}
}
|
[
"kfilak@onet.eu"
] |
kfilak@onet.eu
|
246d8db57a40e6b54ebddc48c5436c3b23c31670
|
13e9cdb563193872fa81305896e05e02ac7a1b9d
|
/maven_webapp/src/main/java/servlet/TestServlet.java
|
cfecde5a344a5daa005386d0faa4e26724b82495
|
[] |
no_license
|
xiaoxiaobai2/learnJava_JavaWeb
|
7836172bae180fa84f420f4d888b84aaf0cde9cb
|
fa7440d408da7ad2c9ba2199b3d8c3b620500219
|
refs/heads/master
| 2022-12-21T19:59:16.518359
| 2019-12-04T08:05:26
| 2019-12-04T08:05:26
| 225,811,637
| 0
| 0
| null | 2022-12-16T01:27:24
| 2019-12-04T08:00:42
|
TSQL
|
UTF-8
|
Java
| false
| false
| 637
|
java
|
package servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class TestServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.getRequestDispatcher("/hello.jsp").forward(request,response);
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
}
}
|
[
"778998010@qq.com"
] |
778998010@qq.com
|
9b67e0e785199f84baf9a1a43e7e122986da8e07
|
e1fe2e9a19d1723355a0a094051da26749ef13e0
|
/core/src/test/java/com/vladmihalcea/book/hpjp/spring/transaction/hibernate/config/MonitoringHibernateTransactionManager.java
|
ebbd9234aa6e06317799764ea4029a5784246677
|
[
"Apache-2.0"
] |
permissive
|
PravatKumarPradhan/high-performance-java-persistence
|
65631e786fe4edd9a227cd5e37121cbea79c828f
|
1da9bff6990e724be440330e313b1052dfc237be
|
refs/heads/master
| 2023-04-07T23:20:43.661743
| 2023-03-24T13:42:08
| 2023-03-24T13:42:08
| 270,320,363
| 0
| 0
|
Apache-2.0
| 2020-06-07T13:49:41
| 2020-06-07T13:49:41
| null |
UTF-8
|
Java
| false
| false
| 1,863
|
java
|
package com.vladmihalcea.book.hpjp.spring.transaction.hibernate.config;
import com.vladmihalcea.book.hpjp.util.StackTraceUtils;
import org.hibernate.BaseSessionEventListener;
import org.hibernate.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.orm.hibernate5.HibernateTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import java.util.concurrent.atomic.LongAdder;
public class MonitoringHibernateTransactionManager extends HibernateTransactionManager {
protected final Logger LOGGER = LoggerFactory.getLogger(getClass());
private static ThreadLocal<LongAdder> statementCounterHolder = new ThreadLocal<>();
@Override
protected void doBegin(Object transaction, TransactionDefinition definition) {
super.doBegin(transaction, definition);
Session session = getSessionFactory().getCurrentSession();
final LongAdder statementCounter = new LongAdder();
statementCounterHolder.set(statementCounter);
session.addEventListeners(new BaseSessionEventListener() {
@Override
public void jdbcPrepareStatementStart() {
statementCounter.increment();
}
});
}
@Override
protected void doCleanupAfterCompletion(Object transaction) {
LongAdder statementCounter = statementCounterHolder.get();
if (statementCounter.intValue() == 0) {
LOGGER.warn(
"Current transactional method {} didn't execute any SQL statement",
StackTraceUtils.stackTracePath(
StackTraceUtils.stackTraceElements(
"com.vladmihalcea"
)
)
);
}
statementCounterHolder.remove();
super.doCleanupAfterCompletion(transaction);
}
}
|
[
"mihalcea.vlad@gmail.com"
] |
mihalcea.vlad@gmail.com
|
332ff37f4a145091be042a35672464f58ddc0329
|
36847e4c0f29daf6e30d3514c1b659d73c34d792
|
/core/day3-session1/src/com/day3/session1/doubts/Cal.java
|
cabaadb1dcfde3052f3a04a3f176427ff9a12bb9
|
[] |
no_license
|
rishabhsharma0303/ymsli_code_july21
|
ff55ff20735f9923fb236ffc04e9823540c30f59
|
9a93f709400c71a0342d31de1db4b295457f7a53
|
refs/heads/master
| 2023-07-03T18:37:51.144781
| 2021-07-31T14:13:41
| 2021-07-31T14:13:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 422
|
java
|
package com.day3.session1.doubts;
public class Cal {
public int add(int a, int b) {
return a+b;
}
// new syntex: variable arg method ..
public int add(int ...a) {
//a= ref to the array
int total=0;
for(int temp: a) {
total+=temp;
}
return total;
}
// public int add(int a[]) {
// //a= ref to the array
// int total=0;
// for(int temp: a) {
// total+=temp;
// }
// return total;
// }
}
|
[
"rgupta.mtech@gmail.com"
] |
rgupta.mtech@gmail.com
|
7c1be2212d69d80bb96974fdd89c5c384971f719
|
0c59def408d2b1afee575b96b7bf63b6d8cce4c3
|
/methanol-testutils/src/main/java/com/github/mizosoft/methanol/testutils/adapter/DecoderVerifier.java
|
5ecbddc7dcd58c42c91c4f6e41e227e090c81a89
|
[
"MIT"
] |
permissive
|
raupachz/methanol
|
8cb99401536cf53c9b5a0dffc140238a501a5260
|
23a95f660adffef51e7616385ecd94eb8c4fd6ba
|
refs/heads/master
| 2023-08-15T05:43:44.035817
| 2021-05-31T17:50:18
| 2021-05-31T17:50:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,149
|
java
|
/*
* Copyright (c) 2021 Moataz Abdelnasser
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.github.mizosoft.methanol.testutils.adapter;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import com.github.mizosoft.methanol.BodyAdapter.Decoder;
import com.github.mizosoft.methanol.MediaType;
import com.github.mizosoft.methanol.TypeRef;
import java.net.http.HttpResponse.BodySubscriber;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.SubmissionPublisher;
import java.util.function.Supplier;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.api.ObjectAssert;
import org.assertj.core.api.ThrowableAssertAlternative;
import org.checkerframework.checker.nullness.qual.Nullable;
/** A small DSL for testing {@link Decoder} implementations. */
public final class DecoderVerifier extends BodyAdapterVerifier<Decoder, DecoderVerifier> {
public DecoderVerifier(Decoder decoder) {
super(decoder);
}
@Override
DecoderVerifier self() {
return this;
}
public <T> BodyConversionStep<T> converting(TypeRef<T> type) {
return new BodyConversionStep<>(adapter, type);
}
public <T> BodyConversionStep<T> converting(Class<T> type) {
return converting(TypeRef.from(type));
}
public static final class BodyConversionStep<T> {
private final Decoder decoder;
private final TypeRef<T> type;
private final @Nullable MediaType mediaType;
BodyConversionStep(Decoder decoder, TypeRef<T> type) {
this(decoder, type, null);
}
BodyConversionStep(Decoder decoder, TypeRef<T> type, @Nullable MediaType mediaType) {
this.decoder = decoder;
this.type = type;
this.mediaType = mediaType;
}
public BodyConversionStep<T> withMediaType(String mediaType) {
return withMediaType(MediaType.parse(mediaType));
}
public BodyConversionStep<T> withMediaType(MediaType mediaType) {
return new BodyConversionStep<>(decoder, type, mediaType);
}
public ThrowableAssertAlternative<UnsupportedOperationException> isNotSupported() {
assertThatExceptionOfType(UnsupportedOperationException.class)
.isThrownBy(() -> decoder.toObject(type, mediaType));
return assertThatExceptionOfType(UnsupportedOperationException.class)
.isThrownBy(() -> decoder.toDeferredObject(type, mediaType));
}
public BodySubscriberVerifier<T> withBody(String body) {
return withBody(body, UTF_8);
}
public BodySubscriberVerifier<T> withBody(String body, Charset charset) {
return withBody(charset.encode(body));
}
public BodySubscriberVerifier<T> withBody(ByteBuffer body) {
var subscriber = decoder.toObject(type, mediaType);
publisherBody(subscriber, body);
return new BodySubscriberVerifier<>(subscriber);
}
public BodySubscriberVerifier<T> withFailure(Throwable error) {
var subscriber = decoder.toObject(type, mediaType);
publisherError(subscriber, error);
return new BodySubscriberVerifier<>(subscriber);
}
public SupplierVerifier<T> withDeferredBody(String body) {
return withDeferredBody(body, UTF_8);
}
public SupplierVerifier<T> withDeferredBody(String body, Charset charset) {
return withDeferredBody(charset.encode(body));
}
public SupplierVerifier<T> withDeferredBody(ByteBuffer body) {
var subscriber = decoder.toDeferredObject(type, mediaType);
publisherBody(subscriber, body);
return verifySupplier(subscriber);
}
public SupplierVerifier<T> withDeferredFailure(Throwable error) {
var subscriber = decoder.toDeferredObject(type, mediaType);
publisherError(subscriber, error);
return verifySupplier(subscriber);
}
private SupplierVerifier<T> verifySupplier(BodySubscriber<Supplier<T>> subscriber) {
var bodyFuture = subscriber.getBody();
assertThat(bodyFuture).isCompleted().isNotCancelled();
return new SupplierVerifier<>(bodyFuture.toCompletableFuture().join());
}
private static void publisherBody(BodySubscriber<?> subscriber, ByteBuffer buffer) {
try (var publisher = new SubmissionPublisher<List<ByteBuffer>>()) {
publisher.subscribe(subscriber);
publisher.submit(List.of(buffer));
}
}
private static void publisherError(BodySubscriber<?> subscriber, Throwable error) {
try (var publisher = new SubmissionPublisher<List<ByteBuffer>>()) {
publisher.subscribe(subscriber);
publisher.closeExceptionally(error);
}
}
}
public static final class BodySubscriberVerifier<T> {
private final BodySubscriber<T> subscriber;
public BodySubscriberVerifier(BodySubscriber<T> subscriber) {
this.subscriber = subscriber;
}
public ObjectAssert<T> completedBody() {
return assertThat(subscriber.getBody()).isCompleted().succeedsWithin(Duration.ZERO);
}
public ObjectAssert<T> succeedsWith(T obj) {
return assertThat(subscriber.getBody()).succeedsWithin(Duration.ofSeconds(20)).isEqualTo(obj);
}
public ThrowableAssertAlternative<?> failsWith(Class<? extends Throwable> type) {
return assertThat(subscriber.getBody())
.failsWithin(Duration.ofSeconds(20))
.withThrowableOfType(ExecutionException.class)
.havingCause()
.isInstanceOf(type);
}
}
public static final class SupplierVerifier<T> {
private final Supplier<T> supplier;
SupplierVerifier(Supplier<T> supplier) {
this.supplier = supplier;
}
public AbstractObjectAssert<?, T> succeedsWith(T obj) {
return assertThat(supplier.get()).isEqualTo(obj);
}
public ThrowableAssertAlternative<? extends Throwable> failsWith(
Class<? extends Throwable> type) {
return assertThatExceptionOfType(type).isThrownBy(supplier::get);
}
}
}
|
[
"moataz.nasser20@gmail.com"
] |
moataz.nasser20@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.