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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d7bad6726460a0527b7e1f3f9c0feb97bbb0582
|
29b6a856a81a47ebab7bfdba7fe8a7b845123c9e
|
/dingtalk/java/src/main/java/com/aliyun/dingtalkhrm_1_0/models/SolutionTaskSaveRequest.java
|
3f0e396cfb598c86a51cbd9bf120078bbcc9b000
|
[
"Apache-2.0"
] |
permissive
|
aliyun/dingtalk-sdk
|
f2362b6963c4dbacd82a83eeebc223c21f143beb
|
586874df48466d968adf0441b3086a2841892935
|
refs/heads/master
| 2023-08-31T08:21:14.042410
| 2023-08-30T08:18:22
| 2023-08-30T08:18:22
| 290,671,707
| 22
| 9
| null | 2021-08-12T09:55:44
| 2020-08-27T04:05:39
|
PHP
|
UTF-8
|
Java
| false
| false
| 3,589
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkhrm_1_0.models;
import com.aliyun.tea.*;
public class SolutionTaskSaveRequest extends TeaModel {
@NameInMap("claimTime")
public Long claimTime;
@NameInMap("description")
public String description;
@NameInMap("finishTime")
public Long finishTime;
@NameInMap("outerId")
public String outerId;
@NameInMap("solutionInstanceId")
public String solutionInstanceId;
@NameInMap("startTime")
public Long startTime;
@NameInMap("status")
public String status;
@NameInMap("taskType")
public String taskType;
@NameInMap("templateOuterId")
public String templateOuterId;
@NameInMap("title")
public String title;
@NameInMap("userId")
public String userId;
@NameInMap("solutionType")
public String solutionType;
public static SolutionTaskSaveRequest build(java.util.Map<String, ?> map) throws Exception {
SolutionTaskSaveRequest self = new SolutionTaskSaveRequest();
return TeaModel.build(map, self);
}
public SolutionTaskSaveRequest setClaimTime(Long claimTime) {
this.claimTime = claimTime;
return this;
}
public Long getClaimTime() {
return this.claimTime;
}
public SolutionTaskSaveRequest setDescription(String description) {
this.description = description;
return this;
}
public String getDescription() {
return this.description;
}
public SolutionTaskSaveRequest setFinishTime(Long finishTime) {
this.finishTime = finishTime;
return this;
}
public Long getFinishTime() {
return this.finishTime;
}
public SolutionTaskSaveRequest setOuterId(String outerId) {
this.outerId = outerId;
return this;
}
public String getOuterId() {
return this.outerId;
}
public SolutionTaskSaveRequest setSolutionInstanceId(String solutionInstanceId) {
this.solutionInstanceId = solutionInstanceId;
return this;
}
public String getSolutionInstanceId() {
return this.solutionInstanceId;
}
public SolutionTaskSaveRequest setStartTime(Long startTime) {
this.startTime = startTime;
return this;
}
public Long getStartTime() {
return this.startTime;
}
public SolutionTaskSaveRequest setStatus(String status) {
this.status = status;
return this;
}
public String getStatus() {
return this.status;
}
public SolutionTaskSaveRequest setTaskType(String taskType) {
this.taskType = taskType;
return this;
}
public String getTaskType() {
return this.taskType;
}
public SolutionTaskSaveRequest setTemplateOuterId(String templateOuterId) {
this.templateOuterId = templateOuterId;
return this;
}
public String getTemplateOuterId() {
return this.templateOuterId;
}
public SolutionTaskSaveRequest setTitle(String title) {
this.title = title;
return this;
}
public String getTitle() {
return this.title;
}
public SolutionTaskSaveRequest setUserId(String userId) {
this.userId = userId;
return this;
}
public String getUserId() {
return this.userId;
}
public SolutionTaskSaveRequest setSolutionType(String solutionType) {
this.solutionType = solutionType;
return this;
}
public String getSolutionType() {
return this.solutionType;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
af005123b4370b12cccd6775b8b2675f63b4eb6f
|
5a2f372ab62f151e9c1cb29d16bd97dd2c97a1ee
|
/java/com/intel/daal/algorithms/linear_regression/quality_metric/SingleBetaInput.java
|
3c7259fc71e5af052ed0bb16df43f6a7a980e06b
|
[
"Intel",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"MIT",
"Zlib",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bazelhpc/oneDAL
|
30dd0d4d80a79a670f4ca684aad811707d859828
|
9fe1f6ec732875782edbe0b5b394d14ca292a5fc
|
refs/heads/master
| 2023-04-08T13:01:18.897716
| 2021-01-11T09:39:25
| 2021-01-11T09:39:25
| 328,962,926
| 1
| 0
|
Apache-2.0
| 2023-04-03T23:04:48
| 2021-01-12T11:18:48
| null |
UTF-8
|
Java
| false
| false
| 3,961
|
java
|
/* file: SingleBetaInput.java */
/*******************************************************************************
* Copyright 2014-2020 Intel Corporation
*
* 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.
*******************************************************************************/
/**
* @ingroup linear_regression_quality_metric_single_beta
* @{
*/
package com.intel.daal.algorithms.linear_regression.quality_metric;
import com.intel.daal.utils.*;
import com.intel.daal.data_management.data.Factory;
import com.intel.daal.data_management.data.NumericTable;
import com.intel.daal.services.DaalContext;
import com.intel.daal.algorithms.linear_regression.Model;
/**
* <a name="DAAL-CLASS-ALGORITHMS__LINEAR_REGRESSION__QUALITY_METRIC__SINGLEBETAINPUT"></a>
* @brief Class for the input objects of the algorithm
*/
public class SingleBetaInput extends com.intel.daal.algorithms.quality_metric.QualityMetricInput {
/** @private */
static {
LibUtils.loadLibrary();
}
public SingleBetaInput(DaalContext context, long cObject) {
super(context);
this.cObject = cObject;
}
/**
* Sets the input object for linear regression quality metric
* @param id Identifier of the input object
* @param val Value of the input object
*/
public void set(SingleBetaDataInputId id, NumericTable val) {
if (id != SingleBetaDataInputId.expectedResponses
&& id != SingleBetaDataInputId.predictedResponses) {
throw new IllegalArgumentException("id unsupported");
}
cSetInputTable(this.cObject, id.getValue(), val.getCObject());
}
/**
* Returns the input object for linear regression quality metric
* @param id Identifier of the input object
* @return Input object that corresponds to the given identifier
*/
public NumericTable get(SingleBetaDataInputId id) {
if (id == SingleBetaDataInputId.expectedResponses
|| id == SingleBetaDataInputId.predictedResponses) {
return (NumericTable)Factory.instance().createObject(getContext(), cGetInputTable(cObject, id.getValue()));
} else {
throw new IllegalArgumentException("id unsupported");
}
}
/**
* Sets an input object for linear regression quality metric
* @param id Identifier of the input object
* @param val Linear regression model
*/
public void set(SingleBetaModelInputId id, Model val) {
if (id != SingleBetaModelInputId.model) {
throw new IllegalArgumentException("Incorrect PredictionInputId");
}
cSetInputModel(this.cObject, id.getValue(), val.getCObject());
}
/**
* Returns an input object for linear regression quality metric
* @param id Identifier of the input object
* @return Linear regression model
*/
public Model get(SingleBetaModelInputId id) {
if (id != SingleBetaModelInputId.model) {
throw new IllegalArgumentException("id unsupported"); // error processing
}
return new Model(getContext(), cGetInputModel(cObject, id.getValue()));
}
private native void cSetInputTable(long inputAddr, int id, long ntAddr);
private native long cGetInputTable(long cInput, int id);
private native void cSetInputModel(long inputAddr, int id, long ntAddr);
private native long cGetInputModel(long cObject, int id);
}
/** @} */
|
[
"nikolay.a.petrov@intel.com"
] |
nikolay.a.petrov@intel.com
|
e2c2e14ed0b9222a5f1f9cf3fba667c64c10e0a7
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/123/622/CWE113_HTTP_Response_Splitting__connect_tcp_addHeaderServlet_75b.java
|
dff6db8f00cc320085ec6f3c22dec3d76a73d08c
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 6,547
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__connect_tcp_addHeaderServlet_75b.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-75b.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded string
* Sinks: addHeaderServlet
* GoodSink: URLEncode input
* BadSink : querystring to addHeader()
* Flow Variant: 75 Data flow: data passed in a serialized object from one method to another in different source files in the same package
*
* */
import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.util.logging.Level;
import javax.servlet.http.*;
import java.net.URLEncoder;
public class CWE113_HTTP_Response_Splitting__connect_tcp_addHeaderServlet_75b
{
public void badSink(byte[] dataSerialized , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* unserialize data */
ByteArrayInputStream streamByteArrayInput = null;
ObjectInputStream streamObjectInput = null;
try
{
streamByteArrayInput = new ByteArrayInputStream(dataSerialized);
streamObjectInput = new ObjectInputStream(streamByteArrayInput);
String data = (String)streamObjectInput.readObject();
/* POTENTIAL FLAW: Input from file not verified */
if (data != null)
{
response.addHeader("Location", "/author.jsp?lang=" + data);
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO);
}
catch (ClassNotFoundException exceptClassNotFound)
{
IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound);
}
finally
{
/* clean up stream reading objects */
try
{
if (streamObjectInput != null)
{
streamObjectInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO);
}
try
{
if (streamByteArrayInput != null)
{
streamByteArrayInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO);
}
}
}
/* goodG2B() - use GoodSource and BadSink */
public void goodG2BSink(byte[] dataSerialized , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* unserialize data */
ByteArrayInputStream streamByteArrayInput = null;
ObjectInputStream streamObjectInput = null;
try {
streamByteArrayInput = new ByteArrayInputStream(dataSerialized);
streamObjectInput = new ObjectInputStream(streamByteArrayInput);
String data = (String)streamObjectInput.readObject();
/* POTENTIAL FLAW: Input from file not verified */
if (data != null)
{
response.addHeader("Location", "/author.jsp?lang=" + data);
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO);
}
catch (ClassNotFoundException exceptClassNotFound)
{
IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound);
}
finally
{
/* clean up stream reading objects */
try
{
if (streamObjectInput != null)
{
streamObjectInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO);
}
try
{
if (streamByteArrayInput != null)
{
streamByteArrayInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO);
}
}
}
/* goodB2G() - use BadSource and GoodSink */
public void goodB2GSink(byte[] dataSerialized , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* unserialize data */
ByteArrayInputStream streamByteArrayInput = null;
ObjectInputStream streamObjectInput = null;
try
{
streamByteArrayInput = new ByteArrayInputStream(dataSerialized);
streamObjectInput = new ObjectInputStream(streamByteArrayInput);
String data = (String)streamObjectInput.readObject();
/* FIX: use URLEncoder.encode to hex-encode non-alphanumerics */
if (data != null)
{
data = URLEncoder.encode(data, "UTF-8");
response.addHeader("Location", "/author.jsp?lang=" + data);
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO);
}
catch (ClassNotFoundException exceptClassNotFound)
{
IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound);
}
finally
{
/* clean up stream reading objects */
try
{
if (streamObjectInput != null)
{
streamObjectInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO);
}
try
{
if (streamByteArrayInput != null)
{
streamByteArrayInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO);
}
}
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
6746f689fda77afc55e00b929d1655f8063cb808
|
a0728a167e1cb883255a34e055cac4ac60309f20
|
/docu/sdl/src/org/sosfo/sdl/cra/cmd/WR.java
|
415a9a712f0e6ac43eff105f7cb9fe58ac652f2b
|
[] |
no_license
|
jingug1004/pythonBasic
|
3d3c6c091830215c8be49cc6280b7467fd19dc76
|
554e3d1a9880b4f74872145dc4adaf0b099b0845
|
refs/heads/master
| 2023-03-06T06:24:05.671015
| 2022-03-09T08:16:58
| 2022-03-09T08:16:58
| 179,009,504
| 0
| 0
| null | 2023-03-03T13:09:01
| 2019-04-02T06:02:44
|
Java
|
UHC
|
Java
| false
| false
| 5,162
|
java
|
package org.sosfo.sdl.cra.cmd;
import org.sosfo.framework.exception.AppException;
import org.sosfo.framework.log.Log;
import org.sosfo.sdl.cra.gate.WRGATE;
/**
* WR : WPS Runner Totals , 단,연승 ( WIN, PLC )식 매출액(선수별)
*
* @author yunkidon@sosfo.or.kr
*
* <pre>
* ee the examples
*
* + SDL Header
* 'WR' < 2> Message code
* 'CRA - GWANGMYEONG ' <30> Meet name
* '0088' < 4> Perf number
* 'REAL' < 4> Type of Perf
* '01' < 2> Race number
* '0180' < 4> Message length
* ++ SDL Data
* 'WIN' [ 3] Pool
* 'O' [ 1] Pool Status; O:open; F:close
* '07' [ 2] Number of runner totals followed
* '0000022446' [10] Runner total 1; unit=100 Won; 22446=2,244,600 Won
* '0000022658' [..] ....
* '0000022083'
* '0000022872'
* '0000020043'
* '0000022434'
* '0000022403' [..] ....
* '00000000154939' [14] Pool total; unit=100 Won; 154939=15,493,900 Won
* 'PLC' [ 3] Pool
* 'O' [ 1] Pool Status; O:open; F:close
* '07' [ 2] Number of runner totals followed
* '0000025820' [10] Runner total 1; unit=100 Won;
* '0000026604' [..] ....
* '0000026183'
* '0000026433'
* '0000023658'
* '0000026896'
* '0000025756' [..] ....
* '00000000181350' [14] Pool total; unit=100 Won;
* ++ SDL Checksum
* '09203' < 5> Checksum
*
* * Message example - runner totals with betting on
* WRCRA - GWANGMYEONG 0088REAL010180WINO07000002244600000226580000022
* 083000002287200000200430000022434000002240300000000154939PLCO0700000258200000026
* 604000002618300000264330000023658000002689600000257560000000018135009203
*
* Message example - runner totals with betting on; runner 4 scratched
* WRCRA - GWANGMYEONG 0088REAL010180WINO07000002244600000226580000022
* 083..........00000200430000022434000002240300000000132067PLCO0700000258200000026
* 6040000026183..........0000023658000002689600000257560000000015491709121
*
* Message example - runner totals with betting off; runner 4 scratched
* WRCRA - GWANGMYEONG 0088REAL010180WINF07000002244600000226580000022
* 083..........00000200430000022434000002240300000000132067PLCF0700000258200000026
* 6040000026183..........0000023658000002689600000257560000000015491709103
*
* </pre>
*/
public class WR extends SDL {
public WR(String SDL) throws AppException {
super(SDL);
}
/*
* 공통정보를 파싱하고 각 타입별 세부 정보를 파싱한다.
* @see org.sosfo.sdl.cra.cmd.SDLCommand#doProcess()
*/
public boolean doProcess() throws AppException {
try {
WRGATE gate = new WRGATE(sdlTray);
return gate.insert(sdlTray);
} catch (AppException e) {
Log.error("ERROR", this, "at WR.doProcess() - " + e);
throw e;
} catch (Exception ex) {
Log.error("ERROR", this, "at WR.doProcess() - " + ex);
throw new AppException("", ex);
}
}
public static void main(String args[]) {
//String sdl = "WRCRA - GWANGMYEONG 0088REAL010180WINO07000002244600000226580000022083000002287200000200430000022434000002240300000000154939PLCO0700000258200000026604000002618300000264330000023658000002689600000257560000000018135009203";
//String sdl = "WRCHA 0088REAL010180WINO07000002244600000226580000022083000002287200000200430000022434000002240300000000154939PLCO0700000258200000026604000002618300000264330000023658000002689600000257560000000018135009203";
//String sdl = "WRBUS 0088REAL010180WINO07000002244600000226580000022083000002287200000200430000022434000002240300000000154939PLCO0700000258200000026604000002618300000264330000023658000002689600000257560000000018135009203";
//String sdl = "WRMRA 0088REAL010180WINO07000002222700000125730000020495000003726100000199020000019204000002304800000000147393PLCO0700000287650000025384000002938600000210980000019882000001950300000278650000000019098009203";
//String sdl = "WRMRA 0991REAL020180WINO07000000000200000000010000000121000000000100000001210000000121000000000100000000000368PLCO0700000000120000000114000000001100000000120000000014000000011100000000110000000000028508962";
String sdl ="WRMRA 0991TEST030080WINF06..............................0000000021000000002100000000210000000000006303920";
try {
WR wr = new WR(sdl);
wr.doProcess();
} catch (Exception e) {
Log.error("ERROR", "", e);
}
}
}
|
[
"jingug1004@gmail.com"
] |
jingug1004@gmail.com
|
d4c009f0ae9b6a43b5338511aec332a2e0db6afb
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_4edc6077d5a3b80f295427b78fc385ef267d632e/Font/9_4edc6077d5a3b80f295427b78fc385ef267d632e_Font_s.java
|
b74d86a3b1b65c33e56fec280aaad63ad97e1ea0
|
[] |
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,503
|
java
|
/*
* MicroEmulator
* Copyright (C) 2001-2005 Bartek Teodorczyk <barteo@barteo.net>
* Copyright (C) 2005 Andres Navarro
*
* 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 javax.microedition.lcdui;
import java.util.Hashtable;
import org.microemu.device.DeviceFactory;
public final class Font
{
public static final int STYLE_PLAIN = 0;
public static final int STYLE_BOLD = 1;
public static final int STYLE_ITALIC = 2;
public static final int STYLE_UNDERLINED = 4;
public static final int SIZE_SMALL = 8;
public static final int SIZE_MEDIUM = 0;
public static final int SIZE_LARGE = 16;
public static final int FACE_SYSTEM = 0;
public static final int FACE_MONOSPACE = 32;
public static final int FACE_PROPORTIONAL = 64;
public static final int FONT_STATIC_TEXT = 0;
public static final int FONT_INPUT_TEXT = 1;
private static final Font DEFAULT_FONT = new Font(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
private static Font []fontsBySpecifier = {DEFAULT_FONT, DEFAULT_FONT};
private static Hashtable fonts = new Hashtable();
private int face;
private int style;
private int size;
private Font(int face, int style, int size)
{
if ((face != FACE_SYSTEM) && (face != FACE_MONOSPACE) && (face != FACE_PROPORTIONAL)) {
throw new IllegalArgumentException();
}
if ((style != STYLE_PLAIN) && (style != STYLE_BOLD) && (style != STYLE_ITALIC) && (style != STYLE_UNDERLINED)) {
throw new IllegalArgumentException();
}
if ((size != SIZE_SMALL) && (size != SIZE_MEDIUM) && (size != SIZE_LARGE)) {
throw new IllegalArgumentException();
}
this.face = face;
this.style = style;
this.size = size;
}
public static Font getDefaultFont()
{
return DEFAULT_FONT;
}
public static Font getFont(int specifier) {
if (specifier != Font.FONT_INPUT_TEXT &&
specifier != Font.FONT_STATIC_TEXT)
throw new IllegalArgumentException("Bad specifier");
return fontsBySpecifier[specifier];
}
public static Font getFont(int face, int style, int size)
{
String key = face + "-" + style + "-" + size;
Font result = (Font) fonts.get(key);
if (result == null) {
result = new Font(face, style, size);
fonts.put(key, result);
}
return result;
}
public int getStyle()
{
return style;
}
public int getSize()
{
return size;
}
public int getFace()
{
return face;
}
public boolean isPlain()
{
if (style == STYLE_PLAIN) {
return true;
} else {
return false;
}
}
public boolean isBold()
{
if ((style & STYLE_BOLD) != 0) {
return true;
} else {
return false;
}
}
public boolean isItalic()
{
if ((style & STYLE_ITALIC) != 0) {
return true;
} else {
return false;
}
}
public boolean isUnderlined()
{
if ((style & STYLE_UNDERLINED) != 0) {
return true;
} else {
return false;
}
}
public int getHeight()
{
return DeviceFactory.getDevice().getFontManager().getHeight(this);
}
public int getBaselinePosition()
{
return DeviceFactory.getDevice().getFontManager().getBaselinePosition(this);
}
public int charWidth(char ch)
{
return DeviceFactory.getDevice().getFontManager().charWidth(this, ch);
}
public int charsWidth(char[] ch, int offset, int length)
{
return DeviceFactory.getDevice().getFontManager().charsWidth(this, ch, offset, length);
}
public int stringWidth(String str)
{
return DeviceFactory.getDevice().getFontManager().stringWidth(this, str);
}
public int substringWidth(String str, int offset, int len)
{
return stringWidth(str.substring(offset, offset + len));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
908ca114e09c13e1982dfa70259d4883b9eb30e2
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/124/205/CWE113_HTTP_Response_Splitting__getParameter_Servlet_addCookieServlet_54c.java
|
77950175c5db8991a8d9bda0f70e134552917255
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,682
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__getParameter_Servlet_addCookieServlet_54c.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-54c.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: getParameter_Servlet Read data from a querystring using getParameter()
* GoodSource: A hardcoded string
* Sinks: addCookieServlet
* GoodSink: URLEncode input
* BadSink : querystring to addCookie()
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
import javax.servlet.http.*;
public class CWE113_HTTP_Response_Splitting__getParameter_Servlet_addCookieServlet_54c
{
public void badSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__getParameter_Servlet_addCookieServlet_54d()).badSink(data , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__getParameter_Servlet_addCookieServlet_54d()).goodG2BSink(data , request, response);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__getParameter_Servlet_addCookieServlet_54d()).goodB2GSink(data , request, response);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
8404f0abac0c2b0172d7d6b76e43df57a41d0304
|
e5af5bce5ae99a4210205704d29c22dadc1fd03d
|
/src/main/java/org/drip/analytics/daycount/DateAdjustParams.java
|
8fd2e63587f71d625877c6dd33c7c7ad7db95adf
|
[
"Apache-2.0"
] |
permissive
|
idreamsfy/DRIP
|
7a5f969b1ca51f6cf957704ecb043d502c4c4bbc
|
f20cb7457efaadb7ff109fbcea0be0b9d9106230
|
refs/heads/master
| 2021-11-03T06:38:49.457972
| 2019-01-13T09:21:13
| 2019-01-13T09:21:13
| 100,677,021
| 0
| 0
|
Apache-2.0
| 2019-01-13T09:21:03
| 2017-08-18T05:43:52
|
Java
|
UTF-8
|
Java
| false
| false
| 3,943
|
java
|
package org.drip.analytics.daycount;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
/*!
* Copyright (C) 2017 Lakshmi Krishnamurthy
* Copyright (C) 2016 Lakshmi Krishnamurthy
* Copyright (C) 2015 Lakshmi Krishnamurthy
* Copyright (C) 2014 Lakshmi Krishnamurthy
* Copyright (C) 2013 Lakshmi Krishnamurthy
* Copyright (C) 2012 Lakshmi Krishnamurthy
* Copyright (C) 2011 Lakshmi Krishnamurthy
*
* This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
* libraries targeting analysts and developers
* https://lakshmidrip.github.io/DRIP/
*
* DRIP is composed of four main libraries:
*
* - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
* - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
* - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
* - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
*
* - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
* Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
* Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
* Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
* Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
*
* - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy
* Incorporator, Holdings Constraint, and Transaction Costs.
*
* - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
*
* - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
*
* 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.
*/
/**
* This class contains the parameters needed for adjusting dates. It exports the following functionality:
* - Accessor for holiday calendar and adjustment type
* - Serialization/De-serialization to and from Byte Arrays
*
* @author Lakshmi Krishnamurthy
*/
public class DateAdjustParams {
private int _iRollMode = 0;
private int _iNumDaysToRoll = -1;
private java.lang.String _strCalendar = "";
/**
* Create a DateAdjustParams instance from the roll mode and the calendar
*
* @param iRollMode Roll Mode
* @param iNumDaysToRoll Number of Days to Roll
* @param strCalendar Calendar
*/
public DateAdjustParams (
final int iRollMode,
final int iNumDaysToRoll,
final java.lang.String strCalendar)
{
_iRollMode = iRollMode;
_strCalendar = strCalendar;
_iNumDaysToRoll = iNumDaysToRoll;
}
/**
* Retrieve the Roll Mode
*
* @return The Roll Mode
*/
public int rollMode()
{
return _iRollMode;
}
/**
* Retrieve the Roll Holiday Calendar
*
* @return The Roll Holiday Calendar
*/
public java.lang.String calendar()
{
return _strCalendar;
}
/**
* Roll the given Date
*
* @param iDate date
*
* @return The Rolled Date
*
* @throws java.lang.Exception Thrown if the input day is invalid
*/
public int roll (
final int iDate)
throws java.lang.Exception
{
return org.drip.analytics.daycount.Convention.RollDate (iDate, _iRollMode, _strCalendar,
_iNumDaysToRoll);
}
}
|
[
"lakshmi@synergicdesign.com"
] |
lakshmi@synergicdesign.com
|
35896110e522e0275d9bb15659289774112df5ec
|
105ff2705396d603b30760cb6e393e2e80e30793
|
/swing/app-swing/src/main/java/com/asynclife/swing/common/SystemConst.java
|
15b4db4496fe36e08e17f3c9bc8364a552a232c6
|
[] |
no_license
|
clonegod/x01-lang-java
|
cfa878ccc0e86cace906d47b9c2a3085732fc835
|
640bdd04a47abf97189e761acd020f7d5a0f55e6
|
refs/heads/master
| 2020-03-13T15:00:36.761781
| 2018-06-06T16:03:32
| 2018-06-06T16:03:32
| 131,169,227
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 149
|
java
|
package com.asynclife.swing.common;
public class SystemConst {
public static final String LINE_SEPARATOR = System.getProperty("line.separator");
}
|
[
"asynclife@163.com"
] |
asynclife@163.com
|
5c1408a3a57d8a42f09dac7b8702d3aa31194411
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/yauaa/learning/551/UserAgentAnalysisMapper.java
|
ec82897e21a1bfb0496dc97bb95503fb40a37188
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,815
|
java
|
/*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2018 Niels Basjes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.basjes.parse.useragent.flink;
import nl.basjes.parse.useragent.annotate.UserAgentAnnotationAnalyzer;
import nl.basjes.parse.useragent.annotate.UserAgentAnnotationMapper;
import org.apache.flink.api.common.functions.RichMapFunction;
import org.apache.flink.configuration.Configuration;
import java.io.Serializable;
import static nl.basjes.parse.useragent.UserAgentAnalyzer.DEFAULT_PARSE_CACHE_SIZE;
public abstract class UserAgentAnalysisMapper<T> extends RichMapFunction<T, T>
implements UserAgentAnnotationMapper<T>, Serializable {
private transient UserAgentAnnotationAnalyzer<T> userAgentAnalyzer = null;
private int cacheSize;
public UserAgentAnalysisMapper() {
this.cacheSize = DEFAULT_PARSE_CACHE_SIZE;
}
public UserAgentAnalysisMapper(int cacheSize) {
this.cacheSize = cacheSize;
}
@Override
public void open(Configuration parameters) {
userAgentAnalyzer = new UserAgentAnnotationAnalyzer<>();
userAgentAnalyzer.setCacheSize(cacheSize);
userAgentAnalyzer.initialize(this);
}
@Override
public T map(T record) {
return userAgentAnalyzer.map(record);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
97c2f23a007d175adcc422edb8f8f1f8801b6369
|
c6c632c5d0f47a30cedddfeaa073b3419cfe31e5
|
/otp-business-capability-starter/src/test/java/com/lulobank/otp/starter/OtpAdapterMockTest.java
|
cb2e9042144757d19e5ee7edc3565235079386a1
|
[] |
no_license
|
juandevtoledo/otp
|
9c9171fec04c04c5cb93792b051c07f9d871bea7
|
366755f9091c3bc2ea5082cd14dd6eb64bcbc30b
|
refs/heads/main
| 2023-06-08T21:04:07.857210
| 2021-06-29T23:19:10
| 2021-06-29T23:19:10
| 381,520,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,779
|
java
|
package com.lulobank.otp.starter;
import com.lulobank.otp.starter.utils.AWSCognitoBearerTokenRequestPostProcessor;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringRunner.class)
@ImportAutoConfiguration(RefreshAutoConfiguration.class)
@ActiveProfiles(profiles = "dev")
public class OtpAdapterMockTest extends AbstractBaseIntegrationTest {
private static final String tenantAWSToken = "eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjUyMjMxIiwic3ViIjoic3ViamVjdCIsInNjb3BlIjoiaW50ZXJuYWxfYXBpL2ludGVybmFsX3RyYW5zYWN0aW9ucyIsImV4cCI6NDY4MzgwNTE0MX0.Ns9G1cQD5SuW0_7JICaOmHqJed2iYJ9IrtL-3r7AHFETs08b1iEjmsKrEnNhezPAnEqfholtxN_gYRbIrgYeOCvBGlNbUTmHnMsufUXyfGnRm1jRjwD4TuMpSeQLAYCmlxh4ewhB7Na4l_bZE7Kn2fdWgblVnpuB64IMYaVPYPHhqRdpm0PWflfg243M6-wAjNlEMeNGZbNm1qbTvSxjfZw9Rt8G1HwG80IG1JOGqesw_0TucvI5VseLUfTqxm5yV0xvvc_2c_8x7iiaSAAsOetHXDVyPsZv_d9D003d1d-jhJlI7ac4F8w7rrA7ng8LyPNzBUDC5EbQfDguYDglMg";
private static final String CONTENT_TYPE = "application/json";
private static final String SEND_OTP_BY_EMAIL_URL = "/generate/email/";
private static final String VERIFY_EMAIL_URL = "/verify/email/%s/token/%s";
private static final String OTP_NUMBER = "1111";
private static final String DESTINATION_EMAIL = "lulobanky24@yopmail.com";
@Override
public void init() {
}
@Test
public void shouldReturnOkGenerateOTPEmail() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post(SEND_OTP_BY_EMAIL_URL + DESTINATION_EMAIL).with(bearerTokenAWS())
.contentType(CONTENT_TYPE)).andExpect(status().isOk());
}
@Test
public void shouldReturnOkValidateOTPEmail() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get(String.format(VERIFY_EMAIL_URL,DESTINATION_EMAIL,OTP_NUMBER)).with(bearerTokenAWS())
.contentType(CONTENT_TYPE)).andExpect(status().isOk());
}
@Test
public void shouldReturnForbiddenValidateOTPEmail() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.get(String.format(VERIFY_EMAIL_URL,DESTINATION_EMAIL,"1234")).with(bearerTokenAWS())
.contentType(CONTENT_TYPE)).andExpect(status().isNotAcceptable());
}
private static AWSCognitoBearerTokenRequestPostProcessor bearerTokenAWS() {
return new AWSCognitoBearerTokenRequestPostProcessor(tenantAWSToken);
}
}
|
[
"juan.toledo@globant.com"
] |
juan.toledo@globant.com
|
9f97c573171272022f4c380f05f8f2c2fd362d88
|
9f3fb735b67bf2734c301cadf88f844a74b2f41c
|
/tensquare_base/src/test/java/Off/Solution23.java
|
00d4dbdcdef9df7b22e84fb093167565c3505f60
|
[] |
no_license
|
CXLYJ/tensquare_parent
|
a682ee3fddcac2a9b5983fcccefc4ffcf8f03bab
|
d8760820d5a66414b1df50362d86ab58a12479bb
|
refs/heads/master
| 2022-06-24T19:40:15.488773
| 2020-11-19T07:07:02
| 2020-11-19T07:07:02
| 180,058,563
| 2
| 3
| null | 2022-06-17T02:10:14
| 2019-04-08T02:57:53
|
Java
|
UTF-8
|
Java
| false
| false
| 2,173
|
java
|
package Off;
/**
* @author :lyj
* @email: : iclyj@iclyj.cn
* @date :2019/5/8 18:04
*
* 剑指offer-数组中重复的数字
*
* 此大法利用了哈希的特性,但不需要额外的存储空间。 因此时间复杂度为O(n),不需要额外空间!
*/
public class Solution23 {
/**
* 题目
*
* 链接:https://www.nowcoder.com/questionTerminal/623a5ac0ea5b4e5f95552655361ae0a8
来源:牛客网
在一个长度为n的数组里的所有数字都在0到n-1的范围内。 数组中某些数字是重复的,但不知道有几个数字是重复的。
也不知道每个数字重复几次。请找出数组中任意一个重复的数字。 例如,如果输入长度为7的数组{2,3,1,0,2,5,3},
那么对应的输出是第一个重复的数字2。
*/
/**
* 思路
*
* 把当前序列当成是一个下标和下标对应值是相同的数组;
遍历数组,判断当前位的值和下标是否相等: 2.1. 若相等,则遍历下一位;
2.2. 若不等,则将当前位置i上的元素和a[i]位置上的元素比较:若它们相等,则成功!若不等,则将它们两交换。
- - 换完之后a[i]位置上的值和它的下标是对应的,但i位置上的元素和下标并不一定对应;重复2.2的操作,
直到当前位置i的值也为i,将i向后移一位,再重复2.
*/
public boolean duplicate(int array[],int length,int [] duplication){
if (array == null)
return false;
//判断数组是否合法(每个数都在0到n-1之间)
for (int i = 0; i < length; i++){
if (array[i] < 0 || array[i] > length -1)
return false;
}
//key step
for (int i = 0; i < length; i++){
while (i != array[i]){
if (array[i] == array[array[i]]){
duplication[0] = array[i];
return true;
}
int temp = array[i];
array[i] = array[array[i]];
array[array[i]] = temp;
}
}
return false;
}
}
|
[
"1421805850@qq.com"
] |
1421805850@qq.com
|
5d89abf5f902aed055b6b6558cedb8085bd600df
|
9dc8429821a8e2801a8527881ea7721a48dee565
|
/malldemo/src/main/java/com/cskaoyan/malldemo/mapper/StorageMapper.java
|
7c3776db26484b5b2fa47142a0e0f75b9bd86082
|
[] |
no_license
|
EdvinXran/mall-1
|
8204b56977239984f06551912c9b3c280f643dd6
|
43ad4c3e8f8b825adda426f9c62bab2b09931f91
|
refs/heads/master
| 2020-05-26T22:08:27.599136
| 2019-05-24T01:32:42
| 2019-05-24T01:32:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 866
|
java
|
package com.cskaoyan.malldemo.mapper;
import com.cskaoyan.malldemo.bean.Storage;
import com.cskaoyan.malldemo.bean.StorageExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface StorageMapper {
long countByExample(StorageExample example);
int deleteByExample(StorageExample example);
int deleteByPrimaryKey(Integer id);
int insert(Storage record);
int insertSelective(Storage record);
List<Storage> selectByExample(StorageExample example);
Storage selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") Storage record, @Param("example") StorageExample example);
int updateByExample(@Param("record") Storage record, @Param("example") StorageExample example);
int updateByPrimaryKeySelective(Storage record);
int updateByPrimaryKey(Storage record);
}
|
[
"820861340@qq.com"
] |
820861340@qq.com
|
f9220aee5a457aa678545312bfbba8095e941dd0
|
1e2537962b6436e998e65579a6083bf69aba2476
|
/src/main/java/com/randioo/compare_collections_server/module/fight/component/flow/FlowGoldModeNoticeBet.java
|
550fb49e0924f3d30e49bf0afcd8f05c2ea204be
|
[] |
no_license
|
wcyfd/compare-collections-server
|
279b64f4de8250fcf705b5e5601ce9f0e2f93989
|
ce2e4785b7e59c05773211264b1f67990a894983
|
refs/heads/master
| 2021-08-23T14:37:39.581879
| 2017-12-05T07:58:11
| 2017-12-05T07:58:11
| 112,269,236
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,792
|
java
|
package com.randioo.compare_collections_server.module.fight.component.flow;
import com.randioo.compare_collections_server.cache.file.YiyaAutoBetConfigCache;
import com.randioo.compare_collections_server.entity.file.YiyaAutoBetConfig;
import com.randioo.compare_collections_server.entity.po.Game;
import com.randioo.compare_collections_server.entity.po.RoleGameInfo;
import com.randioo.compare_collections_server.module.fight.component.Flow;
import com.randioo.compare_collections_server.module.fight.component.broadcast.GameBroadcast;
import com.randioo.compare_collections_server.protocol.Fight.SCFightBetScore;
import com.randioo.compare_collections_server.protocol.ServerMessage.SC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author zsy
* @Description: 十点半金币场通知押注
* @create 2017-11-28 17:38
**/
@Component
public class FlowGoldModeNoticeBet implements Flow {
@Autowired
private GameBroadcast gameBroadcast;
@Override
public void execute(Game game, String[] params) {
YiyaAutoBetConfig betConfig = YiyaAutoBetConfigCache.getYiYaAutoBetMap().get(game.matchParameter);
//自动压的筹码
int bet = betConfig.autoBet;
for (RoleGameInfo roleGameInfo : game.getRoleIdMap().values()) {
if (roleGameInfo.seat == game.getZhuangSeat()) {
continue;
}
roleGameInfo.betScore = bet;
SCFightBetScore scFightCallScore = SCFightBetScore.newBuilder().setSeat(roleGameInfo.seat).setScore(bet)
.build();
SC scCallScore = SC.newBuilder().setSCFightBetScore(scFightCallScore).build();
gameBroadcast.broadcast(game, scCallScore);
}
}
}
|
[
"1101697681@qq.com"
] |
1101697681@qq.com
|
b6c09e83f407192c5ed25a6f872b6c87f5cb1e85
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel/afterDuplicateDefaultBranch.java
|
3485a370c7611d0946e5e7a802ce4bdd99c15c70
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 225
|
java
|
// "Remove switch branch 'default'" "true-preview"
class Main {
void test(Integer i) {
switch (i) {
case 1, 2, default:
System.out.println("A");
break;
}
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
3246fd94d95ec184924defbffd5b95d00696f477
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE470_Unsafe_Reflection/CWE470_Unsafe_Reflection__getCookies_Servlet_66a.java
|
4f8e62df4606e33512a7eec35c699901648b6543
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,648
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE470_Unsafe_Reflection__getCookies_Servlet_66a.java
Label Definition File: CWE470_Unsafe_Reflection.label.xml
Template File: sources-sink-66a.tmpl.java
*/
/*
* @description
* CWE: 470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: Set data to a hardcoded class name
* Sinks:
* BadSink : Instantiate class named in data
* Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package
*
* */
package testcases.CWE470_Unsafe_Reflection;
import testcasesupport.*;
import javax.servlet.http.*;
import javax.servlet.http.*;
public class CWE470_Unsafe_Reflection__getCookies_Servlet_66a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
data = ""; /* initialize data in case there are no cookies */
/* Read data from cookies */
{
Cookie cookieSources[] = request.getCookies();
if (cookieSources != null)
{
/* POTENTIAL FLAW: Read data from the first cookie value */
data = cookieSources[0].getValue();
}
}
String[] data_array = new String[5];
data_array[2] = data;
(new CWE470_Unsafe_Reflection__getCookies_Servlet_66b()).bad_sink(data_array , request, response );
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
/* FIX: Use a hardcoded class name */
data = "Testing.test";
String[] data_array = new String[5];
data_array[2] = data;
(new CWE470_Unsafe_Reflection__getCookies_Servlet_66b()).goodG2B_sink(data_array , request, response );
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
0898171f9e791cd05b5436b9b786cfe640ed30c5
|
6df5cc4ae7df246e06ad4b977d54ce175a59507d
|
/org.nasdanika.amur.diagram/src/org/nasdanika/amur/diagram/edit/parts/ErrorHandlerEditPart.java
|
35ccc3ae077225334fae6f09d238ffdced6c0695
|
[] |
no_license
|
Nasdanika/amur
|
dfcbb1fdf46cf2c91d9311b7586e609e4899b76f
|
a030ce2e5a737d7871b4b1918aa44502f1af4475
|
refs/heads/master
| 2020-06-03T22:09:46.828578
| 2014-07-22T01:45:52
| 2014-07-22T01:45:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,997
|
java
|
package org.nasdanika.amur.diagram.edit.parts;
import org.eclipse.draw2d.FlowLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.FlowLayoutEditPolicy;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.swt.graphics.Color;
import org.nasdanika.amur.diagram.edit.policies.ErrorHandlerItemSemanticEditPolicy;
import org.nasdanika.amur.diagram.part.AmurVisualIDRegistry;
/**
* @generated
*/
public class ErrorHandlerEditPart extends AmurShapeNodeEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 2005;
/**
* @generated
*/
protected IFigure contentPane;
/**
* @generated
*/
public ErrorHandlerEditPart(View view) {
super(view);
}
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
new ErrorHandlerItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
/**
* @generated
*/
protected LayoutEditPolicy createLayoutEditPolicy() {
FlowLayoutEditPolicy lep = new FlowLayoutEditPolicy() {
protected Command createAddCommand(EditPart child, EditPart after) {
return null;
}
protected Command createMoveChildCommand(EditPart child,
EditPart after) {
return null;
}
protected Command getCreateCommand(CreateRequest request) {
return null;
}
};
return lep;
}
/**
* @generated
*/
protected IFigure createNodeShape() {
return primaryShape = new ErrorHandlerFigure();
}
/**
* @generated
*/
public ErrorHandlerFigure getPrimaryShape() {
return (ErrorHandlerFigure) primaryShape;
}
/**
* @generated
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof ErrorHandlerNameEditPart) {
((ErrorHandlerNameEditPart) childEditPart)
.setLabel(getPrimaryShape()
.getFigureErrorHandlerNameFigure());
return true;
}
return false;
}
/**
* @generated
*/
protected boolean removeFixedChild(EditPart childEditPart) {
if (childEditPart instanceof ErrorHandlerNameEditPart) {
return true;
}
return false;
}
/**
* @generated
*/
protected void addChildVisual(EditPart childEditPart, int index) {
if (addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
}
/**
* @generated
*/
protected void removeChildVisual(EditPart childEditPart) {
if (removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
}
/**
* @generated
*/
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
return getContentPane();
}
/**
* @generated
*/
protected NodeFigure createNodePlate() {
DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
/**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated
*/
protected NodeFigure createNodeFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
figure.add(shape);
contentPane = setupContentPane(shape);
return figure;
}
/**
* Default implementation treats passed figure as content pane.
* Respects layout one may have set for generated figure.
* @param nodeShape instance of generated figure class
* @generated
*/
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(5);
nodeShape.setLayoutManager(layout);
}
return nodeShape; // use nodeShape itself as contentPane
}
/**
* @generated
*/
public IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
}
return super.getContentPane();
}
/**
* @generated
*/
protected void setForegroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
/**
* @generated
*/
protected void setBackgroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setBackgroundColor(color);
}
}
/**
* @generated
*/
protected void setLineWidth(int width) {
if (primaryShape instanceof Shape) {
((Shape) primaryShape).setLineWidth(width);
}
}
/**
* @generated
*/
protected void setLineType(int style) {
if (primaryShape instanceof Shape) {
((Shape) primaryShape).setLineStyle(style);
}
}
/**
* @generated
*/
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(AmurVisualIDRegistry
.getType(ErrorHandlerNameEditPart.VISUAL_ID));
}
/**
* @generated
*/
public class ErrorHandlerFigure extends RectangleFigure {
/**
* @generated
*/
private WrappingLabel fFigureErrorHandlerNameFigure;
/**
* @generated
*/
public ErrorHandlerFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
createContents();
}
/**
* @generated
*/
private void createContents() {
fFigureErrorHandlerNameFigure = new WrappingLabel();
fFigureErrorHandlerNameFigure.setText("<...>");
fFigureErrorHandlerNameFigure.setBorder(new MarginBorder(
getMapMode().DPtoLP(2), getMapMode().DPtoLP(2),
getMapMode().DPtoLP(2), getMapMode().DPtoLP(2)));
this.add(fFigureErrorHandlerNameFigure);
}
/**
* @generated
*/
public WrappingLabel getFigureErrorHandlerNameFigure() {
return fFigureErrorHandlerNameFigure;
}
}
}
|
[
"Pavel.Vlasov@nasdanika.org"
] |
Pavel.Vlasov@nasdanika.org
|
61d94aefdf41ac693926345850947a636d004331
|
3e58503aa6e2191864f4ce94ee5966751da81a9d
|
/jdkCodeAnalysis/java8/util/concurrent/atomic/AtomicReference.java
|
025982c6dd343473786c0a6e1b68e444bb2ff9ef
|
[] |
no_license
|
caoyang4/Java
|
394cb4f6f6a8f9326b809903d9fba3507e13a887
|
cbddf0f7767f8a5debb1a5275f56509c376928a0
|
refs/heads/master
| 2023-07-28T00:22:44.306694
| 2023-07-06T08:27:01
| 2023-07-06T08:27:01
| 99,577,228
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,614
|
java
|
package java.util.concurrent.atomic;
import java.util.function.UnaryOperator;
import java.util.function.BinaryOperator;
import sun.misc.Unsafe;
/**
* cas更新引用类型
*/
public class AtomicReference<V> implements java.io.Serializable {
private static final long serialVersionUID = -1848883965231344442L;
private static final Unsafe unsafe = Unsafe.getUnsafe();
private static final long valueOffset;
static {
try {
valueOffset = unsafe.objectFieldOffset(AtomicReference.class.getDeclaredField("value"));
} catch (Exception ex) { throw new Error(ex); }
}
private volatile V value;
public AtomicReference(V initialValue) {
value = initialValue;
}
public AtomicReference() {
}
public final V get() {
return value;
}
public final void set(V newValue) {
value = newValue;
}
public final void lazySet(V newValue) {
unsafe.putOrderedObject(this, valueOffset, newValue);
}
public final boolean compareAndSet(V expect, V update) {
return unsafe.compareAndSwapObject(this, valueOffset, expect, update);
}
public final boolean weakCompareAndSet(V expect, V update) {
return unsafe.compareAndSwapObject(this, valueOffset, expect, update);
}
@SuppressWarnings("unchecked")
public final V getAndSet(V newValue) {
return (V)unsafe.getAndSetObject(this, valueOffset, newValue);
}
// 自旋更新,直到成功
public final V getAndUpdate(UnaryOperator<V> updateFunction) {
V prev, next;
do {
prev = get();
next = updateFunction.apply(prev);
} while (!compareAndSet(prev, next));
return prev;
}
public final V updateAndGet(UnaryOperator<V> updateFunction) {
V prev, next;
do {
prev = get();
next = updateFunction.apply(prev);
} while (!compareAndSet(prev, next));
return next;
}
public final V getAndAccumulate(V x, BinaryOperator<V> accumulatorFunction) {
V prev, next;
do {
prev = get();
next = accumulatorFunction.apply(prev, x);
} while (!compareAndSet(prev, next));
return prev;
}
public final V accumulateAndGet(V x, BinaryOperator<V> accumulatorFunction) {
V prev, next;
do {
prev = get();
next = accumulatorFunction.apply(prev, x);
} while (!compareAndSet(prev, next));
return next;
}
public String toString() {
return String.valueOf(get());
}
}
|
[
"caoyang42@meituan.com"
] |
caoyang42@meituan.com
|
46cc43f39fab4a74763d54b9e5b90aaf7cbe8cd1
|
816a593c623eb8bf40cdbbae7c351d6b0410f954
|
/htmlunit-2.20-SNAPSHOT-src/htmlunit-2.20-SNAPSHOT/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/AudioProcessingEvent.java
|
6e281ea8f12b1e8c587e2dc73bad9278e52cc878
|
[
"Apache-2.0"
] |
permissive
|
SamGondelman/Compositor
|
f99ade1305ddfdbe98a5af7b944d99d97e22793e
|
24e0aa4ca1657c92367d2ac60593aee7d19fa57f
|
refs/heads/master
| 2021-01-20T12:24:22.485934
| 2017-02-21T09:09:24
| 2017-02-21T09:09:24
| 82,653,805
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,490
|
java
|
/*
* Copyright (c) 2002-2016 Gargoyle Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gargoylesoftware.htmlunit.javascript.host.event;
import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.CHROME;
import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.EDGE;
import static com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName.FF;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor;
import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser;
/**
* A JavaScript object for {@code AudioProcessingEvent}.
*
* @author Ahmed Ashour
*/
@JsxClass(browsers = { @WebBrowser(CHROME), @WebBrowser(FF), @WebBrowser(EDGE) })
public class AudioProcessingEvent extends Event {
/**
* Creates an instance.
*/
@JsxConstructor
public AudioProcessingEvent() {
}
}
|
[
"samuel_gondelman@brown.edu"
] |
samuel_gondelman@brown.edu
|
e58eb75cdd9e9e48ac4df0ff2337edd5a235ee1f
|
2fd5b629b78aba7d06ed94bd9c953bfd9251c547
|
/src/main/java/com/kasun/userapp/common/ServiceLogic.java
|
0cc117a1d34f90f251a39bc62821dea68a9a0429
|
[] |
no_license
|
kasunsk/inventory_management_system
|
b63de79e512668312bb2605b09d8b08c8eb2dd50
|
3340acffab5397b50d68c7bcc8835fa0ce16d0aa
|
refs/heads/master
| 2021-01-01T18:34:42.920799
| 2017-11-09T06:10:19
| 2017-11-09T06:10:19
| 26,594,677
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
package com.kasun.userapp.common;
import java.util.List;
public interface ServiceLogic<T, V> {
T invoke(V var1);
List<ServiceWarning> getWarnings();
}
|
[
"kasunsk@gmail.com"
] |
kasunsk@gmail.com
|
fb62c320a2e159578684c9bef64598909ef13a1a
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/NetcastVolumeParser.java
|
8d092b712f196fc5847ecdcde693f728afe14fd7
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,453
|
java
|
4
https://raw.githubusercontent.com/abdalmoniem/Movie-App/master/connectsdk/core/src/com/connectsdk/service/netcast/NetcastVolumeParser.java
/*
* NetcastVolumeParser
* Connect SDK
*
* Copyright (c) 2014 LG Electronics.
* Created by Hyun Kook Khang on 19 Jan 2014
*
* 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.connectsdk.service.netcast;
import org.json.JSONException;
import org.json.JSONObject;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
public class NetcastVolumeParser extends DefaultHandler {
public JSONObject volumeStatus;
public String value;
public static final String MUTE = "mute";
public static final String MIN_LEVEL = "minLevel";
public static final String MAX_LEVEL = "maxLevel";
public static final String LEVEL = "level";
public NetcastVolumeParser() {
volumeStatus = new JSONObject();
value = null;
}
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
try {
if (qName.equalsIgnoreCase(MUTE)) {
volumeStatus.put(MUTE, Boolean.parseBoolean(value));
}
else if (qName.equalsIgnoreCase(MIN_LEVEL)) {
volumeStatus.put(MIN_LEVEL, Integer.parseInt(value));
}
else if (qName.equalsIgnoreCase(MAX_LEVEL)) {
volumeStatus.put(MAX_LEVEL, Integer.parseInt(value));
}
else if (qName.equalsIgnoreCase(LEVEL)) {
volumeStatus.put(LEVEL, Integer.parseInt(value));
}
value = null;
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
value = new String(ch, start, length);
}
public JSONObject getVolumeStatus() {
return volumeStatus;
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
82f4959dcb53a41efa60bb3d29b0add57c28e0fa
|
7cab112a472df702c9b616c760b8940d50324550
|
/aionxemu-master/GameServer/src/gameserver/model/gameobjects/SurveyOption.java
|
75edd46e256dafe69fe7f72eb89e8f75e136dc93
|
[] |
no_license
|
luckychenheng/server_demo
|
86d31c939fd895c7576156b643ce89354e102209
|
97bdcb1f6cd614fd360cfed800c479fbdb695cd3
|
refs/heads/master
| 2020-05-15T02:59:07.396818
| 2019-05-09T10:30:47
| 2019-05-09T10:30:47
| 182,059,222
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,492
|
java
|
/**
* This file is part of Aion X Emu <aionxemu.com>
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
package gameserver.model.gameobjects;
/**
* @author ZeroSignal
*/
public class SurveyOption {
protected int surveyId;
protected int optionId;
protected String optionText;
protected int itemId;
protected int itemCount;
protected int playerCount;
public SurveyOption(int surveyId, int optionId, String optionText) {
init(surveyId, optionId, optionText, 0, 0);
}
public SurveyOption(int surveyId, int optionId, String optionText, int itemId, int itemCount) {
init(surveyId, optionId, optionText, itemId, itemCount);
}
protected void init(int surveyId, int optionId, String optionText, int itemId, int itemCount) {
this.surveyId = surveyId;
this.optionId = optionId;
this.optionText = optionText;
this.itemId = itemId;
this.itemCount = itemCount;
}
public int getSurveyId() {
return surveyId;
}
public int getOptionId() {
return optionId;
}
public String getOptionText() {
return optionText;
}
public int getItemId() {
return itemId;
}
public int getItemCount() {
return itemCount;
}
public int getPlayerCount() {
return playerCount;
}
public void setOptionId(int optionId) {
this.optionId = optionId;
}
public void setPlayerCount(int playerCount) {
this.playerCount = playerCount;
}
public String toString() {
String msg = "\n\toption_id: " + optionId +
"\n\toption_text: \"" + optionText + "\"\n";
if (itemId > 0)
msg += "\titemId: " + itemId + ", itemCount: " + itemCount + "\n";
return msg;
}
}
|
[
"seemac@seedeMacBook-Pro.local"
] |
seemac@seedeMacBook-Pro.local
|
b11fa79aece706f8176c09f6e90f9af152ae6b16
|
d3be5e614b8bf31972b9fcb535b79376b1dedb2c
|
/src/replit/Methods/FibonacciNumbers.java
|
7410d2b7f642b344ebe2823781e2cab1b7153f32
|
[] |
no_license
|
Gennadiy81/IdeaProjects
|
6388e29160d3c4cb138c88c75dfaf3098aac0116
|
498793fd43dc15297f0581f195dfcb44c81c8f40
|
refs/heads/master
| 2023-06-24T17:44:34.194982
| 2021-07-18T14:15:03
| 2021-07-18T14:15:03
| 372,008,218
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 683
|
java
|
package replit.Methods;
import java.util.*;
public class FibonacciNumbers {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
fib(num);
}
public static void fib(int num) {
//WRITE YOUR CODE HERE
int[] fib = {0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887};
for (int i = 0; i < fib.length; i++) {
if (num == fib[i]) {
System.out.println(fib[num]);
}
}
}
}
|
[
"ghena187@gmail.com"
] |
ghena187@gmail.com
|
4c1ca76973cf67fc91f905f22ecc3dd76cea05b4
|
d743888c3f214c9e7954db39b171dec346ead657
|
/Hibernate Code First Entity Relations - Exercise/football_database/src/main/java/entities/Competition.java
|
80ca59cef742955c4498c76d0a5624e845ec3441
|
[] |
no_license
|
GeorgeK95/DatabasesAdvanced
|
6683000266d922e7855cca4e55b246d8a97d0b49
|
cb2ed0fcaff163617460d860af70f2105471a7e1
|
refs/heads/master
| 2020-12-03T07:58:46.414568
| 2017-08-31T11:10:10
| 2017-08-31T11:10:10
| 95,643,423
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 750
|
java
|
package entities;
import javax.persistence.*;
/**
* Created by George-Lenovo on 7/22/2017.
*/
@Entity
public class Competition {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
@ManyToOne
@JoinColumn(name = "type_id", referencedColumnName = "id")
private CompetitionType type;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CompetitionType getType() {
return type;
}
public void setType(CompetitionType type) {
this.type = type;
}
}
|
[
"george_it@abv.bg"
] |
george_it@abv.bg
|
58d81e285dd19c16924d1c839e09d66e26d9f543
|
4da9097315831c8639a8491e881ec97fdf74c603
|
/src/StockIT-v2-release_source_from_JADX/sources/com/onesignal/BundleCompatBundle.java
|
f2544607e0ad56b01c85dccc53849ba611ce418b
|
[
"Apache-2.0"
] |
permissive
|
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
|
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
|
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
|
refs/heads/main
| 2023-08-11T06:17:05.659651
| 2021-10-01T08:48:06
| 2021-10-01T08:48:06
| 410,595,708
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,681
|
java
|
package com.onesignal;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
/* compiled from: BundleCompat */
class BundleCompatBundle implements BundleCompat<Bundle> {
private Bundle mBundle;
BundleCompatBundle() {
this.mBundle = new Bundle();
}
BundleCompatBundle(Bundle bundle) {
this.mBundle = bundle;
}
BundleCompatBundle(Intent intent) {
this.mBundle = intent.getExtras();
}
public void putString(String str, String str2) {
this.mBundle.putString(str, str2);
}
public void putInt(String str, Integer num) {
this.mBundle.putInt(str, num.intValue());
}
public void putLong(String str, Long l) {
this.mBundle.putLong(str, l.longValue());
}
public void putBoolean(String str, Boolean bool) {
this.mBundle.putBoolean(str, bool.booleanValue());
}
public String getString(String str) {
return this.mBundle.getString(str);
}
public Integer getInt(String str) {
return Integer.valueOf(this.mBundle.getInt(str));
}
public Long getLong(String str) {
return Long.valueOf(this.mBundle.getLong(str));
}
public boolean getBoolean(String str) {
return this.mBundle.getBoolean(str);
}
public boolean containsKey(String str) {
return this.mBundle.containsKey(str);
}
public Bundle getBundle() {
return this.mBundle;
}
public void setBundle(Parcelable parcelable) {
this.mBundle = (Bundle) parcelable;
}
public boolean getBoolean(String str, boolean z) {
return this.mBundle.getBoolean(str, z);
}
}
|
[
"57108396+atul-vyshnav@users.noreply.github.com"
] |
57108396+atul-vyshnav@users.noreply.github.com
|
b4da7a6caf55eb0184ab6744c25b66a6473f1f5b
|
7535e4314c17538c8c967ae55d79ff2459fe63b6
|
/src/main/java/com/faforever/client/events/EventServiceImpl.java
|
96bc3aee1ba5160d2040fb62d592974d831b0dc5
|
[
"MIT"
] |
permissive
|
nocaps/downlords-faf-client
|
8a80b076e29f60e7799e935c4de798a1f80387d5
|
4792395797d408e2a03b41bb8f121266332f04db
|
refs/heads/master
| 2021-01-15T21:39:34.211960
| 2016-02-03T19:54:43
| 2016-02-03T19:54:43
| 50,046,644
| 0
| 0
| null | 2016-01-20T17:21:07
| 2016-01-20T17:21:07
| null |
UTF-8
|
Java
| false
| false
| 981
|
java
|
package com.faforever.client.events;
import com.faforever.client.api.FafApiAccessor;
import com.faforever.client.api.PlayerEvent;
import com.faforever.client.player.PlayerService;
import javax.annotation.Resource;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors;
import static java.util.function.Function.identity;
public class EventServiceImpl implements EventService {
@Resource
FafApiAccessor fafApiAccessor;
@Resource
PlayerService playerService;
@Resource
ExecutorService executorService;
@Override
public CompletableFuture<Map<String, PlayerEvent>> getPlayerEvents(String username) {
int playerId = playerService.getPlayerForUsername(username).getId();
return CompletableFuture.supplyAsync(() -> fafApiAccessor.getPlayerEvents(playerId).stream()
.collect(Collectors.toMap(PlayerEvent::getEventId, identity())), executorService);
}
}
|
[
"michel.jung89@gmail.com"
] |
michel.jung89@gmail.com
|
694d3cd462a0018f3556a2bda481ad37f5898f3b
|
002140e0ea60a9fcfac9fc07f60bb3e9dc49ab67
|
/src/main/java/net/ibizsys/psrt/srv/common/demodel/userroledatas/dataquery/UserRoleDatasDefaultDQModel.java
|
dd22db44a194b54d314199a59838c49545e69e94
|
[] |
no_license
|
devibizsys/saibz5_all
|
ecacc91122920b8133c2cff3c2779c0ee0381211
|
87c44490511253b5b34cd778623f9b6a705cb97c
|
refs/heads/master
| 2021-01-01T16:15:17.146300
| 2017-07-20T07:52:21
| 2017-07-20T07:52:21
| 97,795,014
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
/**
* iBizSys 5.0 用户自定义代码
* http://www.ibizsys.net
*/
package net.ibizsys.psrt.srv.common.demodel.userroledatas.dataquery;
/**
* 实体数据查询 [DEFAULT]模型
*/
public class UserRoleDatasDefaultDQModel extends UserRoleDatasDefaultDQModelBase {
public UserRoleDatasDefaultDQModel() {
super();
}
}
|
[
"dev@ibizsys.net"
] |
dev@ibizsys.net
|
af6312bed86a37ed07d0b1f04e4933d168909fbc
|
1ce518b09521578e26e79a1beef350e7485ced8c
|
/source/app/src/main/java/ru/truba/touchgallery/R$integer.java
|
7062b15e4b839b5ee36865bab78bda8a7abbb5af
|
[] |
no_license
|
yash2710/AndroidStudioProjects
|
7180eb25e0f83d3f14db2713cd46cd89e927db20
|
e8ba4f5c00664f9084f6154f69f314c374551e51
|
refs/heads/master
| 2021-01-10T01:15:07.615329
| 2016-04-03T09:19:01
| 2016-04-03T09:19:01
| 55,338,306
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 325
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package ru.truba.touchgallery;
public final class
{
public static final int abc_max_action_buttons = 0x7f0c0000;
public ()
{
}
}
|
[
"13bce123@nirmauni.ac.in"
] |
13bce123@nirmauni.ac.in
|
cd55256ed369666d97eba880ae7e70b4e56c1954
|
49980b77004479c101787b0eb4b2a97ccbf45aae
|
/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java
|
0d33917d401c1ac366228c7753d0d47ca6b3318f
|
[
"Apache-2.0"
] |
permissive
|
guwenxiang/SpringBlade
|
44952947a49d42b221ba85733fe71817abdebbd9
|
6853d6e2040224ce70b7c69d04a6467a80ef0ce9
|
refs/heads/master
| 2021-09-08T05:53:36.045608
| 2021-09-07T11:35:51
| 2021-09-07T11:35:51
| 204,481,986
| 0
| 0
|
Apache-2.0
| 2019-08-26T13:30:24
| 2019-08-26T13:30:24
| null |
UTF-8
|
Java
| false
| false
| 3,920
|
java
|
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.springblade.develop.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.develop.entity.Datasource;
import org.springblade.develop.service.IDatasourceService;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
/**
* 数据源配置表 控制器
*
* @author Chill
*/
@RestController
@AllArgsConstructor
@RequestMapping("/datasource")
@Api(value = "数据源配置表", tags = "数据源配置表接口")
public class DatasourceController extends BladeController {
private IDatasourceService datasourceService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入datasource")
public R<Datasource> detail(Datasource datasource) {
Datasource detail = datasourceService.getOne(Condition.getQueryWrapper(datasource));
return R.data(detail);
}
/**
* 分页 数据源配置表
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入datasource")
public R<IPage<Datasource>> list(Datasource datasource, Query query) {
IPage<Datasource> pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource));
return R.data(pages);
}
/**
* 新增 数据源配置表
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入datasource")
public R save(@Valid @RequestBody Datasource datasource) {
return R.status(datasourceService.save(datasource));
}
/**
* 修改 数据源配置表
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入datasource")
public R update(@Valid @RequestBody Datasource datasource) {
return R.status(datasourceService.updateById(datasource));
}
/**
* 新增或修改 数据源配置表
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入datasource")
public R submit(@Valid @RequestBody Datasource datasource) {
datasource.setUrl(datasource.getUrl().replace("&", "&"));
return R.status(datasourceService.saveOrUpdate(datasource));
}
/**
* 删除 数据源配置表
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(datasourceService.deleteLogic(Func.toIntList(ids)));
}
/**
* 数据源列表
*/
@GetMapping("/select")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "下拉数据源", notes = "查询列表")
public R<List<Datasource>> select() {
List<Datasource> list = datasourceService.list();
return R.data(list);
}
}
|
[
"smallchill@163.com"
] |
smallchill@163.com
|
b7e9c82aeaf97b634e37a11ab0a2af2712bea714
|
f7fadc413cad92f03721742b9c5d94281c12ba02
|
/Java/classjava/prac/TCPClient.java
|
2ceaa31265d17094834c4bb007cf13236daf6adf
|
[] |
no_license
|
amitmca/EducationalMaterial
|
f7acc7f701b42fb5f2821e56bab4ce253532c3f7
|
088a1fe34a0bdd4b46ea5cc7f930d8d1a3f510d0
|
refs/heads/master
| 2021-06-06T18:20:39.774159
| 2019-11-30T15:52:07
| 2019-11-30T15:52:07
| 134,157,178
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 749
|
java
|
import java.net.*;
import java.io.*;
public class TCPClient
{
public static void main(String args[])throws IOException
{
Socket socket=null;
BufferedReader in=null;
PrintWriter out=null;
try
{
socket=new Socket("127.0.0.1",6000);
in=new BufferedReader(new InputStreamReader(socket.getInputStream()));
out=new PrintWriter(socket.getOutputStream(),true);
}
catch(Exception e)
{
System.out.println(e);
}
BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
String fromclient=new String();
while((fromclient=stdin.readLine()) !="-1")
{
out.println(fromclient);
System.out.println(in.readLine());
}
out.close();
in.close();
stdin.close();
socket.close();
}
}
|
[
"amitbaramatimca@gmail.com"
] |
amitbaramatimca@gmail.com
|
80712f7df7fa37d1052cfb0029f5557c169c3084
|
b66bdee811ed0eaea0b221fea851f59dd41e66ec
|
/src/com/paypal/android/sdk/eo.java
|
d7bf3b1ac401a2b476b3a7349c2715e342eedb8d
|
[] |
no_license
|
reverseengineeringer/com.grubhub.android
|
3006a82613df5f0183e28c5e599ae5119f99d8da
|
5f035a4c036c9793483d0f2350aec2997989f0bb
|
refs/heads/master
| 2021-01-10T05:08:31.437366
| 2016-03-19T20:41:23
| 2016-03-19T20:41:23
| 54,286,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 768
|
java
|
package com.paypal.android.sdk;
import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;
public final class eo
{
public LinearLayout a;
public TextView b;
private LinearLayout c;
public eo(Context paramContext)
{
c = new LinearLayout(paramContext);
c.setOrientation(0);
b = new TextView(paramContext);
b.setText("server");
b.setTextColor(-1);
b.setBackgroundColor(eb.e);
b.setGravity(17);
c.addView(b);
ec.a(b, "8dip", "8dip", "8dip", "8dip");
ec.a(b, -2, -2);
ec.b(b, null, "15dip", null, "15dip");
ec.a(b, 1, 1.0F);
a = c;
}
}
/* Location:
* Qualified Name: com.paypal.android.sdk.eo
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
96715c959346d1cda4016a8bc71a9cf3c3ae41d2
|
a7bc241054332089b6c77e521bd00338f4cc0226
|
/app/src/main/java/cn/cbsd/aliveandfacedetect/FaceActivity.java
|
0df9ae540e043c24c302666b3babb81dce0c052e
|
[] |
no_license
|
goalgate/AliveAndFaceDetect
|
3a9d9538c5a09d228ac2d46a5670a65680cd686f
|
51d50a92d342e0abfec352ebfe0050d67d8365fd
|
refs/heads/master
| 2021-01-03T19:24:14.435112
| 2020-12-29T01:56:33
| 2020-12-29T01:56:33
| 240,206,668
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,446
|
java
|
package cn.cbsd.aliveandfacedetect;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.util.Log;
import android.view.SurfaceView;
import android.view.TextureView;
import android.widget.ImageView;
import android.widget.TextView;
import com.blankj.utilcode.util.BrightnessUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.cbsd.mvphelper.mvplibrary.mvpforView.MVPBaseActivity;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.util.List;
import butterknife.BindView;
import cn.cbsd.FaceUitls.FaceVerifyFlow.MediaHelper;
import cn.cbsd.aliveandfacedetect.Func.Func_Camera.mvp.presenter.PhotoPresenter;
import cn.cbsd.aliveandfacedetect.Func.Func_Camera.mvp.view.IPhotoView;
import cn.cbsd.network.RetrofitGenerator;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import okhttp3.ResponseBody;
public class FaceActivity extends MVPBaseActivity implements IPhotoView {
PhotoPresenter pp = PhotoPresenter.getInstance();
private SensorManager sensorManager;
@BindView(R.id.FaceDetect_sView)
SurfaceView FaceDetect_sView;
@BindView(R.id.Showing_sView)
SurfaceView Showing_sView;
@BindView(R.id.texture_view)
TextureView textureView;
@BindView(R.id.image)
ImageView image;
@BindView(R.id.tv_light)
TextView tv_light;
@BindView(R.id.tv_back)
TextView tv_back;
String msg;
@Override
public int getLayoutId() {
return R.layout.activity_face;
}
@Override
public void initData(Bundle savedInstanceState) {
Bundle bundle = this.getIntent().getExtras();
msg = bundle.getString("result");
sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
Sensor sensor = sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT);
sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL);
pp.Init(Showing_sView, FaceDetect_sView, textureView);
ScreenBrightnessSet();
}
@Override
public int getOptionsMenuId() {
return 0;
}
@Override
public Object newP() {
return null;
}
@Override
protected void onResume() {
super.onResume();
pp.PhotoPresenterSetView(this);
}
@Override
protected void onPause() {
super.onPause();
pp.PhotoPresenterSetView(null);
}
@Override
protected void onDestroy() {
super.onDestroy();
pp.onActivityDestroy();
if (sensorManager != null) {
sensorManager.unregisterListener(listener);
}
BrightnessUtils.setWindowBrightness(getWindow(), OriginBrightness);
BrightnessUtils.setAutoBrightnessEnabled(isAutoBrightnessEnabled);
}
@Override
public void onCaremaText(String s) {
tv_back.setText(s);
}
@Override
public void onGetPhoto(Bitmap bmp) {
image.setImageBitmap(bmp);
}
@Override
public void onFaceGet(List<Bitmap> bitmapList) {
if(bitmapList ==null){
finish();
}
sendData(msg, bitmapList.get(0));
}
private SensorEventListener listener = new SensorEventListener() {
@Override
public void onSensorChanged(SensorEvent event) {
// values数组中第一个下标的值就是当前的光照强度
float value = event.values[0];
tv_light.setText("当前亮度为" + value + " lx");
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
};
boolean isAutoBrightnessEnabled;
int OriginBrightness;
private void ScreenBrightnessSet() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.System.canWrite(this)) {
Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_WRITE_SETTINGS);
intent.setData(Uri.parse("package:" + this.getPackageName()));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(intent);
} else {
if (!BrightnessUtils.isAutoBrightnessEnabled()) {
BrightnessUtils.setAutoBrightnessEnabled(true);
isAutoBrightnessEnabled = false;
} else {
isAutoBrightnessEnabled = true;
}
OriginBrightness = BrightnessUtils.getBrightness();
BrightnessUtils.setWindowBrightness(getWindow(), 255);
}
}
}
@Override
public void onBackPressed() {
pp.FaceStop();
finish();
}
private void sendData(String msg, Bitmap userBmp) {
Bitmap uploadBitmap = rotateBitmap(userBmp,270);
RetrofitGenerator.getConnectApi().faceCompare(msg, FileUtils.bitmapToBase64(uploadBitmap))
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<ResponseBody>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(ResponseBody responseBody) {
try {
JSONObject jsonObject = new JSONObject(responseBody.string().toString());
Intent resultIntent = new Intent();
Bundle bundle = new Bundle();
bundle.putString("result", jsonObject.getString("result"));
bundle.putString("value", jsonObject.getString("value"));
resultIntent.putExtras(bundle);
FaceActivity.this.setResult(RESULT_OK, resultIntent);
FaceActivity.this.finish();
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
private Bitmap rotateBitmap(Bitmap origin, float alpha) {
if (origin == null) {
return null;
}
int width = origin.getWidth();
int height = origin.getHeight();
Matrix matrix = new Matrix();
matrix.setRotate(alpha);
// 围绕原地进行旋转
Bitmap newBM = Bitmap.createBitmap(origin, 0, 0, width, height, matrix, false);
if (newBM.equals(origin)) {
return newBM;
}
origin.recycle();
return newBM;
}
}
|
[
"522508134@qq.com"
] |
522508134@qq.com
|
60bbd962abded461069e41df4b7a8fdb6cd096ba
|
21bcd1da03415fec0a4f3fa7287f250df1d14051
|
/sources/androidx/constraintlayout/widget/Barrier.java
|
ad19470baa73860ffa9ee6d332ed61bed09b866c
|
[] |
no_license
|
lestseeandtest/Delivery
|
9a5cc96bd6bd2316a535271ec9ca3865080c3ec8
|
bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc
|
refs/heads/master
| 2022-04-24T12:14:22.396398
| 2020-04-25T21:50:29
| 2020-04-25T21:50:29
| 258,875,870
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,391
|
java
|
package androidx.constraintlayout.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build.VERSION;
import android.util.AttributeSet;
import androidx.constraintlayout.solver.p014h.C0664b;
public class Barrier extends C0698a {
/* renamed from: U */
public static final int f2945U = 0;
/* renamed from: V */
public static final int f2946V = 2;
/* renamed from: W */
public static final int f2947W = 1;
/* renamed from: a0 */
public static final int f2948a0 = 3;
/* renamed from: b0 */
public static final int f2949b0 = 5;
/* renamed from: c0 */
public static final int f2950c0 = 6;
/* renamed from: R */
private int f2951R;
/* renamed from: S */
private int f2952S;
/* renamed from: T */
private C0664b f2953T;
public Barrier(Context context) {
super(context);
super.setVisibility(8);
}
/* access modifiers changed from: protected */
/* renamed from: a */
public void mo3791a(AttributeSet attributeSet) {
super.mo3791a(attributeSet);
this.f2953T = new C0664b();
if (attributeSet != null) {
TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, C0696R.styleable.ConstraintLayout_Layout);
int indexCount = obtainStyledAttributes.getIndexCount();
for (int i = 0; i < indexCount; i++) {
int index = obtainStyledAttributes.getIndex(i);
if (index == C0696R.styleable.ConstraintLayout_Layout_barrierDirection) {
setType(obtainStyledAttributes.getInt(index, 0));
} else if (index == C0696R.styleable.ConstraintLayout_Layout_barrierAllowsGoneWidgets) {
this.f2953T.mo3507c(obtainStyledAttributes.getBoolean(index, true));
}
}
}
this.f3117O = this.f2953T;
mo3838a();
}
/* renamed from: b */
public boolean mo3792b() {
return this.f2953T.mo3510s0();
}
public int getType() {
return this.f2951R;
}
public void setAllowsGoneWidget(boolean z) {
this.f2953T.mo3507c(z);
}
public void setType(int i) {
this.f2951R = i;
this.f2952S = i;
if (VERSION.SDK_INT < 17) {
int i2 = this.f2951R;
if (i2 == 5) {
this.f2952S = 0;
} else if (i2 == 6) {
this.f2952S = 1;
}
} else {
if (1 == getResources().getConfiguration().getLayoutDirection()) {
int i3 = this.f2951R;
if (i3 == 5) {
this.f2952S = 1;
} else if (i3 == 6) {
this.f2952S = 0;
}
} else {
int i4 = this.f2951R;
if (i4 == 5) {
this.f2952S = 0;
} else if (i4 == 6) {
this.f2952S = 1;
}
}
}
this.f2953T.mo3511z(this.f2952S);
}
public Barrier(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
super.setVisibility(8);
}
public Barrier(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
super.setVisibility(8);
}
}
|
[
"zsolimana@uaedomain.local"
] |
zsolimana@uaedomain.local
|
688adb3f0f57afb9f7b2e865a3690a22d7e5ce08
|
ef70f07c34292814c99a9f42c63efd76da32f9e3
|
/modules/activiti5-engine/src/main/java/org/activiti5/engine/impl/juel/AstParameters.java
|
c629b98a3f3046b27972da91e8f1c2c5550a2e22
|
[
"Apache-2.0"
] |
permissive
|
inventure/Activiti
|
e7f8d612296d5d24dda834f99e2b832f51a969fc
|
b8b429fef335937f0af2b12b05af319407b14bc8
|
refs/heads/release-next
| 2020-03-22T10:35:57.002356
| 2018-07-31T22:34:13
| 2018-07-31T22:34:13
| 139,913,870
| 0
| 1
|
Apache-2.0
| 2018-07-31T22:34:14
| 2018-07-06T00:26:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,676
|
java
|
/*
* Based on JUEL 2.2.1 code, 2006-2009 Odysseus Software GmbH
*
* 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.activiti5.engine.impl.juel;
import java.util.List;
import org.activiti5.engine.impl.javax.el.ELContext;
public class AstParameters extends AstRightValue {
private final List<AstNode> nodes;
public AstParameters(List<AstNode> nodes) {
this.nodes = nodes;
}
@Override
public Object[] eval(Bindings bindings, ELContext context) {
Object[] result = new Object[nodes.size()];
for (int i = 0; i < nodes.size(); i++) {
result[i] = nodes.get(i).eval(bindings, context);
}
return result;
}
@Override
public String toString() {
return "(...)";
}
@Override
public void appendStructure(StringBuilder builder, Bindings bindings) {
builder.append("(");
for (int i = 0; i < nodes.size(); i++) {
if (i > 0) {
builder.append(", ");
}
nodes.get(i).appendStructure(builder, bindings);
}
builder.append(")");
}
public int getCardinality() {
return nodes.size();
}
public AstNode getChild(int i) {
return nodes.get(i);
}
}
|
[
"joram.barrez@gmail.com"
] |
joram.barrez@gmail.com
|
dc4e1a99c23416c5126d0a4b4731bd4978ceb7fc
|
f3e5e1d95807d8a1d448a43a1e3da5b2c22fbe50
|
/src/main/java/edu/gdei/gdeiassistant/Repository/Mysql/GdeiAssistant/User/UserMapper.java
|
2ea33f33891654f71ce9ad0669a53b9234f34c45
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
github4n/GdeiAssistant
|
1127d173004b371b125e8c24ce95426fb879cac4
|
0ea407e2c8104eb2785c4419322e592c1011897c
|
refs/heads/master
| 2020-05-07T09:43:14.258723
| 2019-04-08T10:41:14
| 2019-04-08T10:41:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,912
|
java
|
package edu.gdei.gdeiassistant.Repository.Mysql.GdeiAssistant.User;
import edu.gdei.gdeiassistant.Pojo.Entity.User;
import org.apache.ibatis.annotations.*;
import java.util.List;
public interface UserMapper {
@Select("select * from user where username=#{username} limit 1")
@Results(id = "User", value = {
@Result(property = "username", column = "username"),
@Result(property = "password", column = "password"),
@Result(property = "state", column = "state"),
@Result(property = "group", column = "user_group")
})
public User selectUser(String username) throws Exception;
@Select("select count(username) from user where username like concat(concat('%',#{username}),'%')")
@ResultType(Integer.class)
public Integer selectDeletedUserCount(String username) throws Exception;
@Select("select * from user where state!=-1 order by username limit #{start},#{size}")
@ResultMap("User")
public List<User> selectUserList(@Param("start") int start, @Param("size") int size) throws Exception;
@Select("select * from user where state!=-1")
@ResultMap("User")
public List<User> selectAllUser() throws Exception;
@Select("select count(username) from user where state!=-1;")
@ResultType(Integer.class)
public Integer selectUserCount() throws Exception;
@Insert("insert into user (username,password,state,user_group) values (#{username},#{password},0,1)")
public void insertUser(User user) throws Exception;
@Update("update user set password=#{password},state=0 where username=#{username}")
public void updateUser(User user) throws Exception;
@Update("update user set username=#{resetname},password=null,keycode=null,number=null,state=-1 where username=#{username}")
public void closeUser(@Param("resetname") String resetname, @Param("username") String username) throws Exception;
}
|
[
"zwlddx0815@gmail.com"
] |
zwlddx0815@gmail.com
|
0e235efb32137fa00a02202af1e7023815a2506a
|
da5a2d2050ac529a19e14a8ea3f9f21714cc2b5d
|
/app/src/main/java/com/thewingitapp/thirdparties/wingitlib/WINGiTDataHolder.java
|
edf073313f27cc5b5edd3f98b29484160d12172e
|
[] |
no_license
|
F0rth/Izly
|
851bf22e53ea720fd03f03269d015efd7d8de5a4
|
89af45cedfc38e370a64c9fa341815070cdf49d6
|
refs/heads/master
| 2021-07-17T15:39:25.947444
| 2017-10-21T10:05:58
| 2017-10-21T10:05:58
| 108,004,099
| 1
| 1
| null | 2017-10-23T15:51:00
| 2017-10-23T15:51:00
| null |
UTF-8
|
Java
| false
| false
| 2,894
|
java
|
package com.thewingitapp.thirdparties.wingitlib;
import com.thewingitapp.thirdparties.wingitlib.exception.WGErrorCodeUnknowCountry;
import com.thewingitapp.thirdparties.wingitlib.exception.WGErrorCodeUnknownCategory;
import com.thewingitapp.thirdparties.wingitlib.exception.WGErrorCodeUnknownCity;
import com.thewingitapp.thirdparties.wingitlib.model.WGCategory;
import com.thewingitapp.thirdparties.wingitlib.model.WGCity;
import com.thewingitapp.thirdparties.wingitlib.model.WGCountry;
import com.thewingitapp.thirdparties.wingitlib.model.WGDownloadPage;
import java.util.ArrayList;
import java.util.List;
public final class WINGiTDataHolder {
private static List<WGCategory> mCategories = new ArrayList();
private static List<WGCity> mCities = new ArrayList();
private static List<WGCountry> mCountries = new ArrayList();
private static WGDownloadPage mDownloadPage;
public static List<WGCategory> getCategories() {
return mCategories;
}
public static WGCategory getCategory(Long l) throws WGErrorCodeUnknownCategory {
for (WGCategory wGCategory : mCategories) {
if (wGCategory.getCategoryId() == l) {
return wGCategory;
}
}
throw new WGErrorCodeUnknownCategory();
}
public static List<WGCity> getCities() {
return mCities;
}
public static WGCity getCity(int i) throws WGErrorCodeUnknownCity {
for (WGCity wGCity : mCities) {
if (wGCity.getCityId().intValue() == i) {
return wGCity;
}
}
throw new WGErrorCodeUnknownCity();
}
public static WGCity getCity(String str) throws WGErrorCodeUnknownCity {
for (WGCity wGCity : mCities) {
if (wGCity.getLocalizedName().equalsIgnoreCase(str)) {
return wGCity;
}
}
throw new WGErrorCodeUnknownCity();
}
public static List<WGCountry> getCountries() {
return mCountries;
}
public static WGCountry getCountry(String str) throws WGErrorCodeUnknowCountry {
for (WGCountry wGCountry : mCountries) {
if (wGCountry.getName().equalsIgnoreCase(str)) {
return wGCountry;
}
}
throw new WGErrorCodeUnknowCountry();
}
public static WGDownloadPage getDownloadPage() {
return mDownloadPage;
}
public static void setCategories(List<WGCategory> list) {
mCategories.clear();
mCategories.addAll(list);
}
public static void setCities(List<WGCity> list) {
mCities.clear();
mCities.addAll(list);
}
public static void setCountries(List<WGCountry> list) {
mCountries.clear();
mCountries.addAll(list);
}
public static void setDownloadPage(WGDownloadPage wGDownloadPage) {
mDownloadPage = wGDownloadPage;
}
}
|
[
"baptiste.robert@sigma.se"
] |
baptiste.robert@sigma.se
|
d57a3e3c8bbc8e0fd77d255079468d85e25a274e
|
d5644e529f2c067b6f3c3783e9782cf6df7c1611
|
/bitcamp-java/src/main/java/com/eomcs/basic/ex04/Exam71.java
|
5e9ecd2e3904701baf7ea985c6a6c68f25e4c103
|
[] |
no_license
|
JUNE-29/bitcamp-study
|
1806c5f392a41580268b62fbbf6d846d3d4d502b
|
d53b079f29bce74d2d67a31061b74fdc5972dcc0
|
refs/heads/master
| 2022-08-02T12:24:18.732053
| 2020-05-27T04:03:39
| 2020-05-27T04:03:39
| 225,501,857
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,702
|
java
|
package com.eomcs.basic.ex04;
// 변수의 종류
public class Exam71{
// 인스턴스 필드(=인스턴스 변수, instance variable)
// => new 명령을 실행할 때 준비되는 변수
int instanceVar;
// 클래스 필드(클래스변수,class variable) = 스태틱 필드(스태틱변수,static variable)
// => 클래스가 로딩 될 때 준비되는 변수
static int classVar;
public static void main(String[] args/*args = 로컬변수(파라미터)*/){
// 로컬 변수(local variable)
// => 메서드를 실행 할 때 준비되는 변수
// => 메서드 블록 안에 선언된 변수
// => 메서드 블록을 벗어나서 사용할 수 없다.
int local; // 로컬 변수
int local2;
classVar = 200; //ok!
//static이 안 붙은 인스턴스 변수를 사용할 수 없다.
//instanceVar = 300; // 컴파일 오류!
}
// 클래스 메서드 = 스태틱 메서드
static void m1() {
// 메서드 블록이 다르면 변수도 다르다.
// 그래서 같은 이름의 변수를 선언할 수 있다.
int local; // 로컬 변수
// 다른 메서드 블록에 있는 변수를 사용할 수 없다.
//local2 = 100; // 컴파일 오류!
//같은 static 멤버는 사용할 수 있다.
classVar = 100; //ok!
//instanceVar = 300; // 컴파일 오류!
}
// 인스턴스 메서드
void m2() {
int local; //ok! 다른 메서드에 선언된 로컬 변수를 사용할 수 없다.
classVar = 200; // static 멤버 사용 가능
instanceVar = 200; //ok! static이 안붙은 변수 사용 가능
}
}
|
[
"jiyuni529@gmail.com"
] |
jiyuni529@gmail.com
|
dcc744b0ca41b4fec88703c7a817191b82c503bf
|
6d54c69641e421d7a737950f6f7301b1fb0b9b12
|
/4.JavaCollections/src/com/javarush/task/task33/task3313/Solution.java
|
51507a7a05795a438dbb53142176e23d1e503455
|
[] |
no_license
|
MarvineGothic/JavaRushTasks
|
ab91358bbbce7934b2ed0d05bd62510be17747c9
|
ec77371bc91fe415ee06d949ed6ad9490d21b597
|
refs/heads/master
| 2021-08-05T20:51:23.112564
| 2021-07-27T18:24:19
| 2021-07-27T18:24:19
| 105,068,893
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 483
|
java
|
package com.javarush.task.task33.task3313;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
//Сериализация даты в JSON
public class Solution { // solved
public static void main(String[] args) throws JsonProcessingException {
Event event = new Event("event#1");
String result = new ObjectMapper().writeValueAsString(event);
System.out.println(result);
}
}
|
[
"seis@itu.dk"
] |
seis@itu.dk
|
c30fb019400faf5f20d4d22f28a89ab9393b1a86
|
2a244e252f7f839284c4e50fd7b0cc582baf7a97
|
/platform/platform-impl/src/com/intellij/ide/lightEdit/project/LightEditProjectFileIndex.java
|
c1f085bcfb3d744cb2f3d6c6a3c907ed2f55690b
|
[
"Apache-2.0"
] |
permissive
|
stachenov/intellij-community
|
530ee5f5f83171a15df7dd8dde3f3d8044466b29
|
68950e1769880f8e3398e3f87b93d74f34145e2c
|
refs/heads/master
| 2022-12-13T05:58:30.397225
| 2022-08-27T09:28:47
| 2022-08-27T10:43:20
| 130,372,062
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,739
|
java
|
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide.lightEdit.project;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.roots.ContentIterator;
import com.intellij.openapi.roots.OrderEntry;
import com.intellij.openapi.roots.ProjectFileIndex;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileFilter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
import java.util.Collections;
import java.util.List;
import java.util.Set;
class LightEditProjectFileIndex implements ProjectFileIndex {
@Nullable
@Override
public Module getModuleForFile(@NotNull VirtualFile file) {
return null;
}
@Nullable
@Override
public Module getModuleForFile(@NotNull VirtualFile file, boolean honorExclusion) {
return null;
}
@NotNull
@Override
public List<OrderEntry> getOrderEntriesForFile(@NotNull VirtualFile file) {
return Collections.emptyList();
}
@Nullable
@Override
public VirtualFile getClassRootForFile(@NotNull VirtualFile file) {
return null;
}
@Nullable
@Override
public VirtualFile getSourceRootForFile(@NotNull VirtualFile file) {
return null;
}
@Nullable
@Override
public VirtualFile getContentRootForFile(@NotNull VirtualFile file) {
return null;
}
@Nullable
@Override
public VirtualFile getContentRootForFile(@NotNull VirtualFile file, boolean honorExclusion) {
return null;
}
@Nullable
@Override
public String getPackageNameByDirectory(@NotNull VirtualFile dir) {
return null;
}
@Override
public boolean isLibraryClassFile(@NotNull VirtualFile file) {
return false;
}
@Override
public boolean isInSource(@NotNull VirtualFile fileOrDir) {
return false;
}
@Override
public boolean isInLibraryClasses(@NotNull VirtualFile fileOrDir) {
return false;
}
@Override
public boolean isInLibrary(@NotNull VirtualFile fileOrDir) {
return false;
}
@Override
public boolean isInLibrarySource(@NotNull VirtualFile fileOrDir) {
return false;
}
@Override
public boolean isIgnored(@NotNull VirtualFile file) {
return false;
}
@Override
public boolean isExcluded(@NotNull VirtualFile file) {
return false;
}
@Override
public boolean isUnderIgnored(@NotNull VirtualFile file) {
return false;
}
@Override
public boolean iterateContent(@NotNull ContentIterator processor) {
return true;
}
@Override
public boolean iterateContent(@NotNull ContentIterator processor, @Nullable VirtualFileFilter filter) {
return true;
}
@Override
public boolean iterateContentUnderDirectory(@NotNull VirtualFile dir, @NotNull ContentIterator processor) {
return true;
}
@Override
public boolean iterateContentUnderDirectory(@NotNull VirtualFile dir,
@NotNull ContentIterator processor,
@Nullable VirtualFileFilter customFilter) {
return true;
}
@Override
public boolean isInContent(@NotNull VirtualFile fileOrDir) {
return LightEditDirectoryIndex.getFileInfo().isInProject(fileOrDir);
}
@Override
public boolean isInSourceContent(@NotNull VirtualFile fileOrDir) {
return false;
}
@Override
public boolean isInTestSourceContent(@NotNull VirtualFile fileOrDir) {
return false;
}
@Override
public boolean isUnderSourceRootOfType(@NotNull VirtualFile fileOrDir, @NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes) {
return false;
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
6630c46a07e2397b6ec23f0e1cf8c9864ed8baa6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_461ed933aac19c7f0a052f2504e6ab39d599cfc2/AccountChest/6_461ed933aac19c7f0a052f2504e6ab39d599cfc2_AccountChest_s.java
|
b3f2ec9f9b9f43c3f9735716efcd9a00844aa39d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,944
|
java
|
package org.gestern.gringotts;
import static org.gestern.gringotts.Configuration.CONF;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Chest;
import org.bukkit.block.Sign;
import org.bukkit.inventory.DoubleChestInventory;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.gestern.gringotts.data.DAO;
/**
* Represents a storage unit for an account.
*
* @author jast
*
*/
public class AccountChest {
private final Logger log = Gringotts.G.getLogger();
private final DAO dao = Gringotts.G.dao;
/** Sign marking the chest as an account chest. */
public final Sign sign;
/** Account this chest belongs to. */
public final GringottsAccount account;
/**
* Create Account chest based on a sign marking its position and belonging to an account.
* @param sign
* @param account
*/
public AccountChest(Sign sign, GringottsAccount account) {
if (sign == null || account == null)
throw new IllegalArgumentException("null arguments to AccountChest() not allowed. args were: sign: " + sign + ", account: " + account);
this.sign = sign;
this.account = account;
}
/**
* The actual "chest" containing this account chest's stuff.
* @return
*/
private InventoryHolder chest() {
Block block = Util.chestBlock(sign);
return (InventoryHolder)block.getState();
}
/**
* Location of the storage block of this account chest.
* @return
*/
private Location chestLocation() {
Block block = Util.chestBlock(sign);
return block != null? block.getLocation() : null;
}
/**
* Get inventory of this account chest.
* @return inventory of this accountchest, if any. otherwise null.
*/
private Inventory inventory() {
InventoryHolder chest = chest();
return (chest != null)? chest.getInventory() : null;
}
/**
* Get account inventory of this account chest, which is based on the container inventory.
* @return
*/
private AccountInventory accountInventory() {
Inventory inv = inventory();
return inv!=null? new AccountInventory(inv) : null;
}
/**
* Test if this chest is valid, and if not, removes it from storage.
* @return true if valid, false if not and was removed from storage.
*/
private boolean updateValid() {
if (!valid()) {
log.info("Destroying orphaned vault: " + this);
destroy();
return false;
}
else return true;
}
/**
* Return balance of this chest.
* @return balance of this chest
*/
public long balance() {
if (!updateValid())
return 0;
AccountInventory inv = accountInventory();
if (inv==null) return 0;
return inv.balance();
}
/**
* Attempts to add given amount to this chest.
* If the amount is larger than available space, the space is filled and the actually
* added amount returned.
* @return amount actually added
*/
public long add(long value) {
if (!updateValid())
return 0;
AccountInventory inv = accountInventory();
if (inv==null) return 0;
return inv.add(value);
}
/**
* Attempts to remove given amount from this chest.
* If the amount is larger than available items, everything is removed and the number of
* removed items returned.
* @param value
* @return amount actually removed from this chest
*/
public long remove(long value) {
if (!updateValid())
return 0;
AccountInventory inv = accountInventory();
if (inv==null) return 0;
return inv.remove(value);
}
/**
* Checks whether this chest is currently a valid vault.
* It is consideren valid when the sign block contains [vault] on the first line,
* a name on the third line and has a chest below it.
*
* @return true if the chest can be considered a valid vault
*/
public boolean valid() {
// is it still a sign?
if ( ! Util.isSignBlock(sign.getBlock()) )
return false;
// TODO refactor: common definition of valid vault types
String[] lines = sign.getLines();
String line0 = lines[0].toLowerCase();
if ( ! line0.matches(CONF.vaultPattern))
return false;
if ( lines[2] == null || lines[2].length() == 0)
return false;
if (chest() == null) return false;
return true;
}
/**
* Triggered on destruction of physical chest or sign
* @return Blocks belonging to this account chest.
*/
public void destroy() {
dao.destroyAccountChest(this);
sign.getBlock().breakNaturally();
}
@Override
public String toString() {
Location loc = sign.getLocation();
return "[vault] "
+ loc.getBlockX() + ", "
+ loc.getBlockY() + ", "
+ loc.getBlockZ() + ", "
+ loc.getWorld();
}
/**
* Connected chests that comprise the inventory of this account chest.
* @return
*/
private Chest[] connectedChests() {
Inventory inv = inventory();
if (inv == null)
return new Chest[0];
if (inv instanceof DoubleChestInventory) {
DoubleChestInventory dinv = (DoubleChestInventory)inv;
Chest left = (Chest)(dinv.getLeftSide().getHolder());
Chest right = (Chest)(dinv.getRightSide().getHolder());
return new Chest[] {left, right};
} else {
InventoryHolder invHolder = inv.getHolder();
if (invHolder instanceof Chest)
return new Chest[] {(Chest)(inv.getHolder())};
}
return new Chest[0];
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + sign.getLocation().hashCode();
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AccountChest other = (AccountChest) obj;
return sign.getLocation().equals(other.sign.getLocation());
}
/**
* Determine whether the chest of another AccountChest would be connected to this chest.
* @param chest
* @return
*/
public boolean connected(AccountChest chest) {
// no valid account chest anymore -> no connection
if (! updateValid())
return false;
// no double chest -> no connection possible
if (! (inventory() instanceof DoubleChestInventory))
return false;
Location myLoc = chestLocation();
for (Chest c : chest.connectedChests())
if (c.getLocation().equals(myLoc))
return true;
return false;
}
public GringottsAccount getAccount() {
return account;
}
public static boolean validContainer(Material material) {
switch (material) {
case CHEST:
case DISPENSER:
case FURNACE:
return true;
default:
return false;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a04d2d8ef84ce5737fda3c727887068da56adb1f
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Spring/Spring12399.java
|
4fbd67b9b249cbb403bfd94fcd754d2a7ed8e10b
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,586
|
java
|
@Override
protected int writeTagContent(TagWriter tagWriter) throws JspException {
tagWriter.startTag("select");
writeDefaultAttributes(tagWriter);
if (isMultiple()) {
tagWriter.writeAttribute("multiple", "multiple");
}
tagWriter.writeOptionalAttributeValue("size", getDisplayString(evaluate("size", getSize())));
Object items = getItems();
if (items != null) {
// Items specified, but might still be empty...
if (items != EMPTY) {
Object itemsObject = evaluate("items", items);
if (itemsObject != null) {
final String selectName = getName();
String valueProperty = (getItemValue() != null ?
ObjectUtils.getDisplayString(evaluate("itemValue", getItemValue())) : null);
String labelProperty = (getItemLabel() != null ?
ObjectUtils.getDisplayString(evaluate("itemLabel", getItemLabel())) : null);
OptionWriter optionWriter =
new OptionWriter(itemsObject, getBindStatus(), valueProperty, labelProperty, isHtmlEscape()) {
@Override
protected String processOptionValue(String resolvedValue) {
return processFieldValue(selectName, resolvedValue, "option");
}
};
optionWriter.writeOptions(tagWriter);
}
}
tagWriter.endTag(true);
writeHiddenTagIfNecessary(tagWriter);
return SKIP_BODY;
}
else {
// Using nested <form:option/> tags, so just expose the value in the PageContext...
tagWriter.forceBlock();
this.tagWriter = tagWriter;
this.pageContext.setAttribute(LIST_VALUE_PAGE_ATTRIBUTE, getBindStatus());
return EVAL_BODY_INCLUDE;
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
b7150405f6dc83f2b489eb4070969370764b0d32
|
ffee96d08ef70627194dcb8b73a2fdabbe6aa4f9
|
/src/main/java/de/ropemc/api/wrapper/net/minecraft/entity/ai/EntityAIMoveTowardsRestriction.java
|
5599e4c7a7881c29ca62eb118e2ec108d1ca70f8
|
[
"MIT"
] |
permissive
|
RopeMC/RopeMC
|
0db2b4dd78a1842708de69e2455b7e0f60e9b9c9
|
b464fb9a67e410355a6a498f2d6a2d3b0d022b3d
|
refs/heads/master
| 2021-07-09T18:04:37.632199
| 2019-01-02T21:48:17
| 2019-01-02T21:48:17
| 103,042,886
| 11
| 1
|
MIT
| 2018-11-24T16:06:35
| 2017-09-10T16:07:39
|
Java
|
UTF-8
|
Java
| false
| false
| 317
|
java
|
package de.ropemc.api.wrapper.net.minecraft.entity.ai;
import de.ropemc.api.wrapper.WrappedClass;
@WrappedClass("net.minecraft.entity.ai.EntityAIMoveTowardsRestriction")
public interface EntityAIMoveTowardsRestriction {
boolean continueExecuting();
boolean shouldExecute();
void startExecuting();
}
|
[
"jan@bebendorf.eu"
] |
jan@bebendorf.eu
|
8f091f9b3bb7c76ad0f2566d902bfbca78946b05
|
cad04bb71f3afd50c4df3b2f321cd378d3ad8cb9
|
/OJ practices/LeetCode题目集/95. Unique Binary Search Trees II(medium).java
|
e907137d48d5c12917a74bdc73dbc84cacc6aaba
|
[] |
no_license
|
SourDumplings/CodeSolutions
|
9033de38005b1d90488e64ccbb99f91c7e7b71ec
|
5f9eca3fe5701a8fca234343fde31cfcba94cf27
|
refs/heads/master
| 2023-08-16T17:23:34.977471
| 2023-08-07T13:14:47
| 2023-08-07T13:14:47
| 110,331,879
| 10
| 8
| null | 2023-06-14T22:25:16
| 2017-11-11T08:59:11
|
C
|
UTF-8
|
Java
| false
| false
| 1,211
|
java
|
/*
* @Author: SourDumplings
* @Date: 2020-08-30 08:55:53
* @Link: https://github.com/SourDumplings/
* @Email: changzheng300@foxmail.com
* @Description: https://leetcode-cn.com/problems/unique-binary-search-trees-ii/
*/
class Solution
{
public List<TreeNode> generateTrees(int n)
{
if (n != 0)
{
return generateTrees(1, n);
}
else
{
return new ArrayList<>();
}
}
private List<TreeNode> generateTrees(int s, int l)
{
List<TreeNode> trees = new ArrayList<>();
if (s <= l)
{
for (int i = s; i <= l; i++)
{
List<TreeNode> leftTrees = generateTrees(s, i - 1);
List<TreeNode> rightTrees = generateTrees(i + 1, l);
for (TreeNode rightTree : rightTrees)
{
for (TreeNode leftTree : leftTrees)
{
TreeNode node = new TreeNode(i, leftTree, rightTree);
trees.add(node);
}
}
}
}
else
{
trees.add(null);
}
return trees;
}
}
|
[
"changzheng300@foxmail.com"
] |
changzheng300@foxmail.com
|
6e78a8891c7f94ba44adf02fb3caf37489b63201
|
ae18f62ab28314d0573939a36e72863452c7c2e9
|
/src/leetcode/editor/en/Leetcode0103BinaryTreeZigzagLevelOrderTraversal.java
|
5ecd93e45e66c9c9235e936cef86dc4fd698d8c1
|
[] |
no_license
|
Minussy/leetcode_practice
|
a79f0fb60228ed7f131debc47c832b31e9f17f80
|
9cac056738722ff464f7d52fb2371ae61deebcb9
|
refs/heads/master
| 2023-02-24T19:49:00.557829
| 2021-01-20T23:06:16
| 2021-01-20T23:06:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,055
|
java
|
//Given a binary tree, return the zigzag level order traversal of its nodes' val
//ues. (ie, from left to right, then right to left for the next level and alternat
//e between).
//
//
//For example:
//Given binary tree [3,9,20,null,null,15,7],
//
// 3
// / \
// 9 20
// / \
// 15 7
//
//
//
//return its zigzag level order traversal as:
//
//[
// [3],
// [20,9],
// [15,7]
//]
//
// Related Topics Stack Tree Breadth-first Search
// 👍 2245 👎 102
package leetcode.editor.en;
import leetcode.editor.TreeNode;
import java.util.*;
// 2020-07-26 12:01:45
// Zeshi Yang
public class Leetcode0103BinaryTreeZigzagLevelOrderTraversal{
// Java: binary-tree-zigzag-level-order-traversal
public static void main(String[] args) {
Solution sol = new Leetcode0103BinaryTreeZigzagLevelOrderTraversal().new Solution();
// TO TEST
System.out.println();
}
//leetcode submit region begin(Prohibit modification and deletion)
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val = val;
* this.left = left;
* this.right = right;
* }
* }
*/
// Solution 2: 设置flag isEven,然tempList.add还是tempList.addFirst
class Solution {
public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
List<List<Integer>> res = new ArrayList<>();
if(root == null) return res;
Queue<TreeNode> queue = new LinkedList<>();
queue.offer(root);
boolean isEven = false;
while(!queue.isEmpty()) {
LinkedList<Integer> tempList = new LinkedList<>();
int size = queue.size();
while (size --> 0) {
TreeNode cur = queue.poll();
if(!isEven){
tempList.add(cur.val);
}else {
tempList.addFirst(cur.val);
}
if (cur.left != null) queue.offer(cur.left);
if (cur.right != null) queue.offer(cur.right);
}
isEven = !isEven;
res.add(tempList);
}
return res;
}
}
//leetcode submit region end(Prohibit modification and deletion)
// Solution 1: 2个stack
class Solution1 {
public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
List<List<Integer>> result = new ArrayList<>();
if (root == null) {
return result;
}
Stack<TreeNode> stackOdd = new Stack<>(); // from left to right
Stack<TreeNode> stackEven = new Stack<>(); // from right to left
// boolean flagEven = true;
stackOdd.push(root); // odd level
List<Integer> list = new ArrayList<>();
// list.add(root.val);
// result.add(list);
TreeNode temp;
while (stackOdd.isEmpty() == false || stackEven.isEmpty() == false) {
list = new ArrayList<Integer>();
while (stackOdd.isEmpty() == false){
temp = stackOdd.pop();
list.add(temp.val);
if (temp.left != null) {
stackEven.push(temp.left);
}
if (temp.right != null) {
stackEven.push(temp.right);
}
}
if (list.isEmpty()== false) {
result.add(list);
}
list = new ArrayList<Integer>();
while (stackEven.isEmpty() == false){
temp = stackEven.pop();
list.add(temp.val);
if (temp.right != null) {
stackOdd.push(temp.right);
}
if (temp.left != null) {
stackOdd.push(temp.left);
}
}
if (list.isEmpty()== false) {
result.add(list);
}
}
return result;
}
}
// Solution 2: 设置flag isEven,然tempList.add还是tempList.addFirst
class Solution2 {
public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
List<List<Integer>> res = new ArrayList<>();
if(root == null) return res;
Queue<TreeNode> queue = new LinkedList<>();
queue.offer(root);
boolean isEven = false;
while(!queue.isEmpty()) {
LinkedList<Integer> tempList = new LinkedList<>();
int size = queue.size();
while (size --> 0) {
TreeNode cur = queue.poll();
if(!isEven){
tempList.add(cur.val);
}else {
tempList.addFirst(cur.val);
}
if (cur.left != null) queue.offer(cur.left);
if (cur.right != null) queue.offer(cur.right);
}
isEven = !isEven;
res.add(tempList);
}
return res;
}
}
}
|
[
"iyangzeshi@outlook.com"
] |
iyangzeshi@outlook.com
|
732a14dfbf2434a00db99ea308fafa726b137bb7
|
270e324e2b751508d38cdccb4964d27c07f42e22
|
/stoneworld-gateway-server/src/main/java/com/beijunyi/sw/resources/models/Animation.java
|
37e740adc71a65050e25f436b0dc33e3284dbedb
|
[] |
no_license
|
areswoo/stone-world
|
fe308e23c6fe1d0fe6ede23d4340c2e6fa369235
|
fb433c66a4bd76f7d75f16ab4c4ddf3121c0f69c
|
refs/heads/master
| 2022-05-04T15:08:52.466757
| 2015-05-26T17:46:42
| 2015-05-26T17:46:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,176
|
java
|
package com.beijunyi.sw.resources.models;
import java.util.ArrayList;
import java.util.List;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.KryoSerializable;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
public class Animation implements KryoSerializable {
private short duration;
private List<AnimationFrame> frames;
public int getDuration() {
return duration;
}
public void setDuration(short duration) {
this.duration = duration;
}
public List<AnimationFrame> getFrames() {
return frames;
}
public void setFrames(List<AnimationFrame> frames) {
this.frames = frames;
}
@Override
public void write(Kryo kryo, Output output) {
output.writeShort(duration);
output.writeByte(frames.size());
for(AnimationFrame frame : frames) {
kryo.writeObject(output, frame);
}
}
@Override
public void read(Kryo kryo, Input input) {
duration = input.readShort();
byte size = input.readByte();
frames = new ArrayList<>(size);
for(byte i = 0; i < size; i++) {
frames.add(kryo.readObject(input, AnimationFrame.class));
}
}
}
|
[
"beijunyi@gmail.com"
] |
beijunyi@gmail.com
|
d4aacd5f1690fdd1289b7393d64ad085aebeaa4d
|
c11000853905bc9ef61ca27ae916ffac8d82b8ec
|
/pub/assignment_testcases/a2/Je_3_Resolve_NonExistingSuperclass.java
|
a70c3898c7ed9c254d6110096f641510fdeaca7a
|
[] |
no_license
|
keriwarr/orangejoos
|
0244d381d691fd667bb58e49f6a9d6643b597176
|
de278321e8b72a92ea6b2ddb55e885caec71aaa5
|
refs/heads/master
| 2022-12-10T03:37:07.940721
| 2022-11-17T00:36:10
| 2022-11-17T00:36:10
| 116,432,363
| 0
| 1
| null | 2019-11-23T04:46:41
| 2018-01-05T22:18:39
|
Java
|
UTF-8
|
Java
| false
| false
| 396
|
java
|
// JOOS1:TYPE_LINKING,UNRESOLVED_TYPE
// JOOS2:TYPE_LINKING,UNRESOLVED_TYPE
// JAVAC:UNKNOWN
//
/**
* Typelinking:
* - Check that all types actually resolve to defined types in the
* program or the class library.
*/
public class Je_3_Resolve_NonExistingSuperclass extends foo {
public Je_3_Resolve_NonExistingSuperclass () {}
public static int test() {
return 123;
}
}
|
[
"joey@pereira.io"
] |
joey@pereira.io
|
495d05b38fc50ac1bfd6d9500574c3b0e5be56da
|
45f7ea0b105b173afb4b5e021245010abf3c6775
|
/src/main/java/com/betterprojectsfaster/jhipster/test/jhipster6java11/domain/Authority.java
|
5d598f211c48f06ac1c21c511205531019197922
|
[] |
no_license
|
ksilz/jhipster-6.0.1-java-11-test
|
f8f11dbbfc3fefb9af801965615a9d7ab4940ef6
|
67014d3f83654911ca0e52b715dde6f5142b0883
|
refs/heads/master
| 2020-05-25T22:14:47.143350
| 2019-05-22T10:04:56
| 2019-05-22T10:04:56
| 188,013,089
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,415
|
java
|
package com.betterprojectsfaster.jhipster.test.jhipster6java11.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Objects;
/**
* An authority (a security role) used by Spring Security.
*/
@Entity
@Table(name = "bpf_authority")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Authority implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull
@Size(max = 50)
@Id
@Column(length = 50)
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Authority)) {
return false;
}
return Objects.equals(name, ((Authority) o).name);
}
@Override
public int hashCode() {
return Objects.hashCode(name);
}
@Override
public String toString() {
return "Authority{" +
"name='" + name + '\'' +
"}";
}
}
|
[
"karsten.silz@outlook.com"
] |
karsten.silz@outlook.com
|
fd5470f940a6873a354825370ea3a5dd06576e90
|
74539d9e911ccfd18b0c13a526810be052eec77b
|
/src/com/amazonaws/services/autoscaling/model/transform/TerminateInstanceInAutoScalingGroupRequestMarshaller.java
|
2e7b4164e37c8a270dc73cec0761caf18e12bd88
|
[] |
no_license
|
dovikn/inegotiate-android
|
723f12a3ee7ef46b980ee465b36a6a154e5adf6f
|
cea5e088b01ae4487d83cd1a84e6d2df78761a6e
|
refs/heads/master
| 2021-01-12T02:14:41.503567
| 2017-01-10T04:20:15
| 2017-01-10T04:20:15
| 78,492,148
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,730
|
java
|
package com.amazonaws.services.autoscaling.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.DefaultRequest;
import com.amazonaws.Request;
import com.amazonaws.services.autoscaling.model.TerminateInstanceInAutoScalingGroupRequest;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.StringUtils;
public class TerminateInstanceInAutoScalingGroupRequestMarshaller implements Marshaller<Request<TerminateInstanceInAutoScalingGroupRequest>, TerminateInstanceInAutoScalingGroupRequest> {
public Request<TerminateInstanceInAutoScalingGroupRequest> marshall(TerminateInstanceInAutoScalingGroupRequest terminateInstanceInAutoScalingGroupRequest) {
if (terminateInstanceInAutoScalingGroupRequest == null) {
throw new AmazonClientException("Invalid argument passed to marshall(...)");
}
Request<TerminateInstanceInAutoScalingGroupRequest> defaultRequest = new DefaultRequest(terminateInstanceInAutoScalingGroupRequest, "AmazonAutoScaling");
defaultRequest.addParameter("Action", "TerminateInstanceInAutoScalingGroup");
defaultRequest.addParameter("Version", "2011-01-01");
if (terminateInstanceInAutoScalingGroupRequest.getInstanceId() != null) {
defaultRequest.addParameter("InstanceId", StringUtils.fromString(terminateInstanceInAutoScalingGroupRequest.getInstanceId()));
}
if (terminateInstanceInAutoScalingGroupRequest.isShouldDecrementDesiredCapacity() != null) {
defaultRequest.addParameter("ShouldDecrementDesiredCapacity", StringUtils.fromBoolean(terminateInstanceInAutoScalingGroupRequest.isShouldDecrementDesiredCapacity()));
}
return defaultRequest;
}
}
|
[
"dovik@dovik-macbookpro.roam.corp.google.com"
] |
dovik@dovik-macbookpro.roam.corp.google.com
|
568f353e7a7e8f7164036ae400bfa55fc04cfb51
|
851d7883e667b1883a327fe29e24c180ec63cb09
|
/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/algorithms/AbstractBaseAlgorithmBuilder.java
|
44121e8fe3a829b280dc8f64c9478fb2c7088713
|
[
"Apache-2.0"
] |
permissive
|
sri-desai/Cocoon
|
6772622f5e4b45339df25825cfc5bc50360b48a3
|
a513391476ea1d8c835df03187947bf0fde913c2
|
refs/heads/master
| 2021-07-10T22:46:35.108428
| 2017-10-06T03:36:02
| 2017-10-06T03:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,655
|
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.cocoon.forms.formmodel.algorithms;
import java.util.StringTokenizer;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.cocoon.components.LifecycleHelper;
import org.apache.cocoon.forms.formmodel.CalculatedFieldAlgorithm;
import org.apache.cocoon.forms.formmodel.CalculatedFieldAlgorithmBuilder;
import org.apache.cocoon.forms.util.DomHelper;
import org.w3c.dom.Element;
/**
* Abstract builder for {@link org.apache.cocoon.forms.formmodel.algorithms.AbstractBaseAlgorithm}
* subclasses.
*
* <p>
* This class parses the default triggers attribute, containing a comma separated list of widget paths
* as defined in {@link org.apache.cocoon.forms.util.WidgetFinder}. It also calls the LifecycleHelper
* so that algorithms gets their logger and context.
* </p>
* @version $Id$
*/
public abstract class AbstractBaseAlgorithmBuilder implements CalculatedFieldAlgorithmBuilder, LogEnabled, Contextualizable, Serviceable {
private Logger logger;
protected Context context;
private ServiceManager manager;
protected void setup(Element algorithmElement, AbstractBaseAlgorithm algorithm) throws Exception {
setupComponent(algorithm);
setupTriggers(algorithmElement, algorithm);
}
protected void setupTriggers(Element algorithmElement, AbstractBaseAlgorithm algorithm) throws Exception {
String fields = DomHelper.getAttribute(algorithmElement, "triggers", null);
if (fields != null) setupTriggers(fields, algorithm);
}
protected void setupTriggers(String fields, AbstractBaseAlgorithm algorithm) {
algorithm.clearTriggers();
StringTokenizer stok = new StringTokenizer(fields, ", ");
while (stok.hasMoreTokens()) {
String fname = stok.nextToken();
algorithm.addTrigger(fname);
}
}
public void enableLogging(Logger logger) {
this.logger = logger;
}
protected Logger getLogger() {
return this.logger;
}
public void contextualize(Context context) throws ContextException {
this.context = context;
}
public void service(ServiceManager manager) throws ServiceException {
this.manager = manager;
}
public void setupComponent(CalculatedFieldAlgorithm algorithm) throws Exception {
LifecycleHelper.setupComponent(algorithm, logger, context, manager, null);
}
}
|
[
"srinivas.desai491@gmail.com"
] |
srinivas.desai491@gmail.com
|
69fc6faa9091fd2bf428bd7b16a2191c38f558f1
|
38287b8e62016230551840c9d4c8fbd4e473f420
|
/app/src/main/java/com/hxqc/tinker/Log/MyLogImp.java
|
4f1ec45d32be3db2a12470b51e0b4ffb52229e2d
|
[] |
no_license
|
isliulin/Mall3
|
f950f87376b9573ee196b762eb1833d8b5c145d8
|
b27f73feb17e93cb6fd0d4991fd99c1037dd0427
|
refs/heads/master
| 2023-03-15T23:24:33.795603
| 2017-02-16T07:03:58
| 2017-02-16T07:03:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,029
|
java
|
/*
* Tencent is pleased to support the open source community by making Tinker available.
*
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hxqc.tinker.Log;
import android.util.Log;
import com.tencent.tinker.lib.util.TinkerLog;
/**
* Created by zhangshaowen on 16/6/3.
*/
public class MyLogImp implements TinkerLog.TinkerLogImp {
public static final int LEVEL_VERBOSE = 0;
public static final int LEVEL_DEBUG = 1;
public static final int LEVEL_INFO = 2;
public static final int LEVEL_WARNING = 3;
public static final int LEVEL_ERROR = 4;
public static final int LEVEL_NONE = 5;
private static final String TAG = "Tinker.MyLogImp";
private static int level = LEVEL_VERBOSE;
public static int getLogLevel() {
return level;
}
public static void setLevel(final int level) {
MyLogImp.level = level;
Log.w(TAG, "new log level: " + level);
}
@Override
public void v(String s, String s1, Object... objects) {
if (level <= LEVEL_VERBOSE) {
final String log = objects == null ? s1 : String.format(s1, objects);
Log.v(s, log);
}
}
@Override
public void i(String s, String s1, Object... objects) {
if (level <= LEVEL_INFO) {
final String log = objects == null ? s1 : String.format(s1, objects);
Log.i(s, log);
}
}
@Override
public void w(String s, String s1, Object... objects) {
if (level <= LEVEL_WARNING) {
final String log = objects == null ? s1 : String.format(s1, objects);
Log.w(s, log);
}
}
@Override
public void d(String s, String s1, Object... objects) {
if (level <= LEVEL_DEBUG) {
final String log = objects == null ? s1 : String.format(s1, objects);
Log.d(s, log);
}
}
@Override
public void e(String s, String s1, Object... objects) {
if (level <= LEVEL_ERROR) {
final String log = objects == null ? s1 : String.format(s1, objects);
Log.e(s, log);
}
}
@Override
public void printErrStackTrace(String s, Throwable throwable, String s1, Object... objects) {
String log = objects == null ? s1 : String.format(s1, objects);
if (log == null) {
log = "";
}
log = log + " " + Log.getStackTraceString(throwable);
Log.e(s, log);
}
}
|
[
"1239251224@qq.com"
] |
1239251224@qq.com
|
7a90ce40bab51724f69198d67c074ee507b01043
|
bf76adb6518f66e1633f08c47083d9afa6e3f007
|
/Y2017JC79PRO/src/Teacher/ADVANCED_TOPICs/JDBC_PROVIDERS/DEMOJDBC/Mod07/Module07.java
|
66e82a345fa2e82425b2642f21d218f809c677d1
|
[] |
no_license
|
dongbuihuu/Y2017JC79DB
|
0699e394fdd2e2f7dc06e915a42374e98b76ea00
|
36ba4d22a35bd2defa6b851a0de24e8547c4808d
|
refs/heads/master
| 2021-08-28T10:47:53.207455
| 2017-12-12T01:20:39
| 2017-12-12T01:20:39
| 105,788,617
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,027
|
java
|
package JAVACORE_TRAINING.ADVANCED_TOPICs.JDBC_PROVIDERS.DEMOJDBC.Mod07;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
public class Module07 {
public static void main(String[] args) {
// 1. Khai báo khởi tạo đối tượng
Connection objConnection;
// 2. Khai báo & khởi tạo đối tượng trong thư viện sqljdbc4.0.jar
SQLServerDataSource objDts = new SQLServerDataSource();
// 3. Thiết lập tham số cấu hình hệ thống
objDts.setServerName("127.0.0.1");
objDts.setUser("sa");
objDts.setPassword("nothing");
objDts.setDatabaseName("TICKETBOX_DB");
objDts.setPortNumber(1433);
// 3. Kiểm tra trạng thái kết nối tới CSDL
try {
objConnection = objDts.getConnection();
if (!objConnection.isClosed()) {
// 4. Khởi tạo CallableStatement thông qua Connections
CallableStatement objCmst;
ResultSet objRs;
//String sSQL = "Select EventName, Price, EventDay From Events";
objCmst = objConnection.prepareCall("{call SP_DANHSACHSUKIENDEMOCOTHAMSO(?,?)}");
objCmst.setInt("EVENTMONTH", 6);
objCmst.setInt("EVENTDAY", 11);
// 5. Ủy quyền thực thi truy vấn & nhận về tập bản ghi --> ResultSet
objRs = objCmst.executeQuery();
// 6. Duyệt & hiển thị ra bên ngoài
while(objRs.next()){
System.out.println("+ Event Name: "+ objRs.getString("EventName"));
System.out.println("+ Price: "+ objRs.getString(2));
System.out.println("+ Event Day: "+ objRs.getString("EventDay"));
System.out.println();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"silamy1927@gmail.com"
] |
silamy1927@gmail.com
|
bbbbe0154634ec44bb9531315e6c84c2e900e214
|
3e4ab592071e8d58fc6867eed9bee1424f89ca27
|
/EMWMatrix2/src/main/java/cc/emw/mobile/login/GuideActivity.java
|
eaf0e1b2d7477132f2db237e6e5fb9d7c727b877
|
[] |
no_license
|
Jeffery336699/EMWMatrix
|
8e7a2d7ff1866849e7669716bc2ddf75c2c52ba5
|
1a47328cf63fb3b10635de113003d95f23b8df2f
|
refs/heads/master
| 2020-04-13T17:39:37.665204
| 2019-01-09T05:59:26
| 2019-01-09T05:59:26
| 163,353,607
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,339
|
java
|
package cc.emw.mobile.login;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.SparseArray;
import android.view.View;
import com.nineoldandroids.view.ViewHelper;
import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import cc.emw.mobile.R;
import cc.emw.mobile.base.BaseActivity;
import cc.emw.mobile.login.fragment.GuideFragment;
/**
* 引导界面
*
* @author shaobo.zhuang
*/
@ContentView(R.layout.activity_guide)
public class GuideActivity extends BaseActivity {
private static final int NUM_PAGES = 4;
@ViewInject(R.id.pager)
private ViewPager mViewPager;
private PagerAdapter pagerAdapter;
private boolean isOpaque = true; //是否不透明
private SparseArray<GuideFragment> fragmentMap = new SparseArray<GuideFragment>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setSwipeBackEnable(false);
pagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(pagerAdapter);
mViewPager.setPageTransformer(true, new CrossfadePageTransformer());
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position,
float positionOffset, int positionOffsetPixels) {
if (position == NUM_PAGES - 2 && positionOffset > 0) {
if (isOpaque) {
mViewPager
.setBackgroundColor(Color.TRANSPARENT);
isOpaque = false;
}
} else {
if (!isOpaque) {
mViewPager.setBackgroundColor(getResources().getColor(R.color.guide_viewpager_bg));
isOpaque = true;
}
}
}
@Override
public void onPageSelected(int position) {
if (position == NUM_PAGES - 2) {
} else if (position < NUM_PAGES - 2) {
// skip.setVisibility(View.VISIBLE);
// next.setVisibility(View.VISIBLE);
// done.setVisibility(View.GONE);
} else if (position == NUM_PAGES - 1) {
endTutorial();
}
int id = 0;
switch (position) {
case 0:
id = R.layout.fragment_guide1;
break;
case 1:
id = R.layout.fragment_guide2;
break;
case 2:
id = R.layout.fragment_guide3;
break;
case 3:
id = R.layout.fragment_guide4;
break;
}
if (position != 4) {
fragmentMap.get(position).stopAnim(id);
fragmentMap.get(position).showAnim(id);
}
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mViewPager != null) {
mViewPager.clearOnPageChangeListeners();
}
}
private void endTutorial() {
overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
}
private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
public ScreenSlidePagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
GuideFragment tp = null;
switch (position) {
case 0:
tp = GuideFragment.newInstance(R.layout.fragment_guide1);
break;
case 1:
tp = GuideFragment.newInstance(R.layout.fragment_guide2);
break;
case 2:
tp = GuideFragment.newInstance(R.layout.fragment_guide3);
break;
case 3:
tp = GuideFragment.newInstance(R.layout.fragment_guide4);
break;
case 4:
tp = GuideFragment.newInstance(R.layout.fragment_guide5);
break;
}
fragmentMap.put(position, tp);
return tp;
}
@Override
public int getCount() {
return NUM_PAGES;
}
}
public class CrossfadePageTransformer implements ViewPager.PageTransformer {
@Override
public void transformPage(View page, float position) {
int pageWidth = page.getWidth();
View backgroundView = page.findViewById(R.id.welcome_fragment);
View welcomeImage01 = page.findViewById(R.id.welcome_01);
View welcomeImage02 = page.findViewById(R.id.welcome_02);
View welcomeImage03 = page.findViewById(R.id.welcome_03);
View welcomeImage04 = page.findViewById(R.id.welcome_04);
if (0 <= position && position < 1) {
ViewHelper.setTranslationX(page, pageWidth * -position);
}
if (-1 < position && position < 0) {
ViewHelper.setTranslationX(page, pageWidth * -position);
}
if (position <= -1.0f || position >= 1.0f) {
} else if (position == 0.0f) {
} else {
if (backgroundView != null) {
ViewHelper.setAlpha(backgroundView,
1.0f - Math.abs(position));
}
if (welcomeImage01 != null) {
ViewHelper.setTranslationX(welcomeImage01,
(float) (pageWidth / 2 * position));
ViewHelper.setAlpha(welcomeImage01,
1.0f - Math.abs(position));
}
if (welcomeImage02 != null) {
ViewHelper.setTranslationX(welcomeImage02,
(float) (pageWidth / 2 * position));
ViewHelper.setAlpha(welcomeImage02,
1.0f - Math.abs(position));
}
if (welcomeImage03 != null) {
ViewHelper.setTranslationX(welcomeImage03,
(float) (pageWidth / 2 * position));
ViewHelper.setAlpha(welcomeImage03,
1.0f - Math.abs(position));
}
if (welcomeImage04 != null) {
ViewHelper.setTranslationX(welcomeImage04,
(float) (pageWidth / 2 * position));
ViewHelper.setAlpha(welcomeImage04,
1.0f - Math.abs(position));
}
}
}
}
}
|
[
"912833721@qq.com"
] |
912833721@qq.com
|
ff49a9e477e84e7a86781fd33c875099d1659b03
|
111209d369157dbcca1d01056623c27f3cecc9d7
|
/CohesiveAppServer/CohesiveInterfacesLibrary/src/com/ibd/businessViews/ITeacherProfileSummary.java
|
dac703686a0789609a04adc6d5ad30dab049b255
|
[] |
no_license
|
IBD-Technologies/NewGenEducationApp
|
d3c1768316c091ade0bda050fdfc1dfe66aa5070
|
7e27094a635782ebd8c0a940b614485c52fe63d3
|
refs/heads/master
| 2021-05-19T11:30:04.032333
| 2020-06-12T17:35:22
| 2020-06-12T17:35:22
| 251,661,845
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 986
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ibd.businessViews;
import com.ibd.businessViews.BusinessEJBTemplate;
import com.ibd.cohesive.util.exceptions.BSProcessingException;
import com.ibd.cohesive.util.exceptions.BSValidationException;
import com.ibd.cohesive.util.exceptions.DBProcessingException;
import com.ibd.cohesive.util.exceptions.DBValidationException;
import com.ibd.cohesive.util.session.CohesiveSession;
import javax.json.JsonObject;
/**
*
* @author DELL
*/
public interface ITeacherProfileSummary extends BusinessEJBTemplate{
public String EJBprocessing(String request);
public JsonObject EJBprocessing(JsonObject p_request) ;
public JsonObject processing(JsonObject p_request,CohesiveSession session)throws BSProcessingException,BSValidationException,DBValidationException,DBProcessingException ;
}
|
[
"60004888+RajkumarIBD@users.noreply.github.com"
] |
60004888+RajkumarIBD@users.noreply.github.com
|
9903c42bd6f675850cb8c928bf50810a014e80c9
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/92/org/apache/commons/math/linear/MatrixUtils_createRowRealMatrix_179.java
|
ff426ee2a61525df2cbe40b9f0b1a5bfe0563ed8
|
[] |
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
| 923
|
java
|
org apach common math linear
collect method oper matric
version revis date
matrix util matrixutil
creat row link real matrix realmatrix data input
arrai
param row data rowdata input row data
row data rowdata length real matrix realmatrix
illeg argument except illegalargumentexcept code row data rowdata code empti
null pointer except nullpointerexcept code row data rowdata code
real matrix realmatrix creat row real matrix createrowrealmatrix row data rowdata
col ncol row data rowdata length
real matrix realmatrix creat real matrix createrealmatrix col ncol
col ncol
set entri setentri row data rowdata
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
d4f3f3573c008e6cdcc3eff69d14f74e36f786d9
|
d14142c282ab5b44663b6a642ce69cb995c04740
|
/widgets/src/main/java/org/jboss/ballroom/client/widgets/tables/pager/PagerResources.java
|
fe2c682e8afaaf1c1843a0452751d4d2c000a77d
|
[] |
no_license
|
hal/ballroom
|
de0ff6b1346581b47e1c10202a726f2c35ed05f2
|
cb32b627687e71e0f967d08448a4b537459bfcba
|
refs/heads/master
| 2021-07-03T01:06:28.076014
| 2018-11-27T14:40:19
| 2018-11-27T14:40:19
| 9,320,723
| 0
| 12
| null | 2020-10-13T04:57:25
| 2013-04-09T12:32:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,700
|
java
|
package org.jboss.ballroom.client.widgets.tables.pager;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.cellview.client.SimplePager;
/**
* @author Heiko Braun
* @date 1/30/12
*/
public interface PagerResources extends SimplePager.Resources {
/**
* The image used to skip ahead multiple pages.
*/
@Source("rr.png")
ImageResource simplePagerFastForward();
/**
* The disabled "fast forward" image.
*/
@Source("rr.png")
ImageResource simplePagerFastForwardDisabled();
/**
* The image used to go to the first page.
*/
@Source("ll.png")
ImageResource simplePagerFirstPage();
/**
* The disabled first page image.
*/
@Source("ll.png")
ImageResource simplePagerFirstPageDisabled();
/**
* The image used to go to the last page.
*/
@Source("rr.png")
ImageResource simplePagerLastPage();
/**
* The disabled last page image.
*/
@Source("rr.png")
ImageResource simplePagerLastPageDisabled();
/**
* The image used to go to the next page.
*/
@Source("r.png")
ImageResource simplePagerNextPage();
/**
* The disabled next page image.
*/
@Source("r.png")
ImageResource simplePagerNextPageDisabled();
/**
* The image used to go to the previous page.
*/
@Source("l.png")
ImageResource simplePagerPreviousPage();
/**
* The disabled previous page image.
*/
@Source("l.png")
ImageResource simplePagerPreviousPageDisabled();
/**
* The styles used in this widget.
*/
@Source("DefaultPager.css")
SimplePager.Style simplePagerStyle();
}
|
[
"ike.braun@googlemail.com"
] |
ike.braun@googlemail.com
|
638bc69476bacf8fabb19ab9c0531dca1c4b7c7d
|
a1e49f5edd122b211bace752b5fb1bd5c970696b
|
/projects/org.springframework.test/src/main/java/org/springframework/mock/web/portlet/MockEventResponse.java
|
1a00e8b2d553210243a359db1208fdb7f21968f0
|
[
"Apache-2.0"
] |
permissive
|
savster97/springframework-3.0.5
|
4f86467e2456e5e0652de9f846f0eaefc3214cfa
|
34cffc70e25233ed97e2ddd24265ea20f5f88957
|
refs/heads/master
| 2020-04-26T08:48:34.978350
| 2019-01-22T14:45:38
| 2019-01-22T14:45:38
| 173,434,995
| 0
| 0
|
Apache-2.0
| 2019-03-02T10:37:13
| 2019-03-02T10:37:12
| null |
UTF-8
|
Java
| false
| false
| 1,073
|
java
|
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.web.portlet;
import javax.portlet.EventRequest;
import javax.portlet.EventResponse;
/**
* Mock implementation of the {@link javax.portlet.EventResponse} interface.
*
* @author Juergen Hoeller
* @since 3.0
*/
public class MockEventResponse extends MockStateAwareResponse implements EventResponse {
public void setRenderParameters(EventRequest request) {
setRenderParameters(request.getParameterMap());
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
01ce273cc4a0c08497c818e43231265db924a8a3
|
24fae99a278e8022b3944908a4db05b3d3148551
|
/sources/com/google/android/gms/internal/firebase_database/zziz.java
|
677d2f39c77ed9ddf3e625d21687424638b18796
|
[] |
no_license
|
bigmanstan/FurniAR-college-Minor-project
|
53cad4bc90d65aadcb76613ba386306672cfd011
|
3ceba7e1fcaf5e847e3a72dd92712c308d484189
|
refs/heads/master
| 2020-05-26T03:04:18.538119
| 2019-05-26T12:33:47
| 2019-05-26T12:33:47
| 188,084,904
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,631
|
java
|
package com.google.android.gms.internal.firebase_database;
public final class zziz {
private static final zziz zzsg = new zziz(zzid.zzfc(), zzir.zzfv());
private static final zziz zzsh = new zziz(zzid.zzfd(), zzja.zzsi);
private final zzid zzog;
private final zzja zzrx;
public zziz(zzid zzid, zzja zzja) {
this.zzog = zzid;
this.zzrx = zzja;
}
public static zziz zzgc() {
return zzsg;
}
public static zziz zzgd() {
return zzsh;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj != null) {
if (getClass() == obj.getClass()) {
zziz zziz = (zziz) obj;
return this.zzog.equals(zziz.zzog) && this.zzrx.equals(zziz.zzrx);
}
}
return false;
}
public final int hashCode() {
return (this.zzog.hashCode() * 31) + this.zzrx.hashCode();
}
public final String toString() {
String valueOf = String.valueOf(this.zzog);
String valueOf2 = String.valueOf(this.zzrx);
StringBuilder stringBuilder = new StringBuilder((String.valueOf(valueOf).length() + 23) + String.valueOf(valueOf2).length());
stringBuilder.append("NamedNode{name=");
stringBuilder.append(valueOf);
stringBuilder.append(", node=");
stringBuilder.append(valueOf2);
stringBuilder.append('}');
return stringBuilder.toString();
}
public final zzja zzd() {
return this.zzrx;
}
public final zzid zzge() {
return this.zzog;
}
}
|
[
"theonlyrealemailid@gmail.com"
] |
theonlyrealemailid@gmail.com
|
37f38a8f3a099ebffb8cdef146e01095d9b479f9
|
47798511441d7b091a394986afd1f72e8f9ff7ab
|
/src/main/java/com/alipay/api/response/AlipayEcoEduCampusJobPublishResponse.java
|
bf5539f438fb6f725224ccb55e2be1d45b1aa75f
|
[
"Apache-2.0"
] |
permissive
|
yihukurama/alipay-sdk-java-all
|
c53d898371032ed5f296b679fd62335511e4a310
|
0bf19c486251505b559863998b41636d53c13d41
|
refs/heads/master
| 2022-07-01T09:33:14.557065
| 2020-05-07T11:20:51
| 2020-05-07T11:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,142
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.eco.edu.campus.job.publish response.
*
* @author auto create
* @since 1.0, 2019-06-27 14:00:41
*/
public class AlipayEcoEduCampusJobPublishResponse extends AlipayResponse {
private static final long serialVersionUID = 3151738753876437495L;
/**
* 备注问题,或者异常
*/
@ApiField("content")
private String content;
/**
* 消息描述
*/
@ApiField("description")
private String description;
/**
* 返回code编码;成功返回SUCCESS
*/
@ApiField("isv_code")
private String isvCode;
public void setContent(String content) {
this.content = content;
}
public String getContent( ) {
return this.content;
}
public void setDescription(String description) {
this.description = description;
}
public String getDescription( ) {
return this.description;
}
public void setIsvCode(String isvCode) {
this.isvCode = isvCode;
}
public String getIsvCode( ) {
return this.isvCode;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d46719ed83a000aa8fc4732507b393d2155197c0
|
19dc4b795d50f177a74438a0192af69c3849ac5e
|
/goshop-facade-order/src/main/java/org/goshop/order/pojo/GsIntegralGoodsorderWithBLOBs.java
|
f452ee7815094d829bdb4bc859ff8bdcfca54c40
|
[] |
no_license
|
spidermandl/stoneshop
|
6e2d469ce0fe05d66c3bb56e04f160b54dd63ebc
|
ecff96a61d8f2fc3b5cd279e7209da0ae07bc26d
|
refs/heads/master
| 2021-09-09T17:44:14.847907
| 2018-03-18T17:05:03
| 2018-03-18T17:05:03
| 111,582,391
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 693
|
java
|
package org.goshop.order.pojo;
public class GsIntegralGoodsorderWithBLOBs extends GsIntegralGoodsorder {
private String igoMsg;
private String igoPayMsg;
private String igoShipContent;
public String getIgoMsg() {
return igoMsg;
}
public void setIgoMsg(String igoMsg) {
this.igoMsg = igoMsg;
}
public String getIgoPayMsg() {
return igoPayMsg;
}
public void setIgoPayMsg(String igoPayMsg) {
this.igoPayMsg = igoPayMsg;
}
public String getIgoShipContent() {
return igoShipContent;
}
public void setIgoShipContent(String igoShipContent) {
this.igoShipContent = igoShipContent;
}
}
|
[
"Desmond@Desmonds-MacBook-Pro.local"
] |
Desmond@Desmonds-MacBook-Pro.local
|
12dc8e3e44739ba3ed30b4cd880f479320366821
|
54398137d79f73fa61536d95ad7cda4c134223bb
|
/phloc-json2/src/main/java/com/phloc/json2/parser/JsonNodeToDomainObject.java
|
fe621ce781039bef481a066d9b1bbf46a1352c79
|
[] |
no_license
|
phlocbg/phloc-json
|
0a89921c4125f0efe385ba5c209cffe3c6be032e
|
c5f75b0dbcfc4e6bd8e8e38c419478d8a836a18c
|
refs/heads/master
| 2023-04-04T00:41:06.809220
| 2023-03-19T07:58:26
| 2023-03-19T07:58:26
| 41,243,762
| 1
| 1
| null | 2023-03-19T07:53:13
| 2015-08-23T09:31:06
|
Java
|
UTF-8
|
Java
| false
| false
| 5,215
|
java
|
/**
* Copyright (C) 2006-2015 phloc systems
* http://www.phloc.com
* office[at]phloc[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.phloc.json2.parser;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.NotThreadSafe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.phloc.commons.annotations.Nonempty;
import com.phloc.commons.string.StringParser;
import com.phloc.json2.IJson;
import com.phloc.json2.convert.JsonConverter;
import com.phloc.json2.impl.JsonArray;
import com.phloc.json2.impl.JsonObject;
import com.phloc.json2.impl.JsonValue;
/**
* This class converts the jjtree node to a domain object. This is where the
* hard work happens.
*
* @author Philip Helger
*/
@NotThreadSafe
final class JsonNodeToDomainObject
{
private static final Logger s_aLogger = LoggerFactory.getLogger (JsonNodeToDomainObject.class);
/**
* Constructor
*/
public JsonNodeToDomainObject ()
{}
private void _expectNodeType (@Nonnull final JsonNode aNode, @Nonnull final int nExpected)
{
if (aNode.getNodeType () != nExpected)
throw new JsonHandlingException (aNode, "Expected a '" +
ParserJsonTreeConstants.jjtNodeName[nExpected] +
"' node but received a '" +
ParserJsonTreeConstants.jjtNodeName[aNode.getNodeType ()] +
"'");
}
private static void _throwUnexpectedChildrenCount (@Nonnull final JsonNode aNode, @Nonnull @Nonempty final String sMsg)
{
s_aLogger.error (sMsg);
for (int i = 0; i < aNode.jjtGetNumChildren (); ++i)
s_aLogger.error (" " + aNode.jjtGetChild (i));
throw new JsonHandlingException (aNode, sMsg);
}
public IJson _createValue (@Nonnull final JsonNode aNode)
{
_expectNodeType (aNode, ParserJsonTreeConstants.JJTVALUE);
final int nChildCount = aNode.jjtGetNumChildren ();
if (nChildCount != 1)
_throwUnexpectedChildrenCount (aNode, "Expected exactly 1 child but got " + nChildCount + " children!");
final JsonNode aChildNode = aNode.jjtGetChild (0);
switch (aChildNode.getNodeType ())
{
case ParserJsonTreeConstants.JJTJSTRING:
return JsonConverter.convertToJson (aChildNode.getText ());
case ParserJsonTreeConstants.JJTJNUMBERINTEGER:
return JsonValue.create (StringParser.parseBigInteger (aChildNode.getText ()));
case ParserJsonTreeConstants.JJTJNUMBERDECIMAL:
return JsonValue.create (StringParser.parseBigDecimal (aChildNode.getText ()));
case ParserJsonTreeConstants.JJTJOBJECT:
{
final int nObjectChildCount = aChildNode.jjtGetNumChildren ();
final JsonObject aObject = new JsonObject (nObjectChildCount);
for (int i = 0; i < nObjectChildCount; ++i)
{
final JsonNode aObjectChildNode = aChildNode.jjtGetChild (i);
_expectNodeType (aObjectChildNode, ParserJsonTreeConstants.JJTJOBJECTELEMENT);
final JsonNode aKeyNode = aObjectChildNode.jjtGetChild (0);
_expectNodeType (aKeyNode, ParserJsonTreeConstants.JJTJSTRING);
final JsonNode aValueNode = aObjectChildNode.jjtGetChild (1);
_expectNodeType (aValueNode, ParserJsonTreeConstants.JJTVALUE);
aObject.add (aKeyNode.getText (), _createValue (aValueNode));
}
return aObject;
}
case ParserJsonTreeConstants.JJTJARRAY:
{
final int nArrayChildCount = aChildNode.jjtGetNumChildren ();
final JsonArray aArray = new JsonArray (nArrayChildCount);
for (int i = 0; i < nArrayChildCount; ++i)
{
final JsonNode aArrayChildNode = aChildNode.jjtGetChild (i);
aArray.add (_createValue (aArrayChildNode));
}
return aArray;
}
case ParserJsonTreeConstants.JJTJTRUE:
return JsonValue.TRUE;
case ParserJsonTreeConstants.JJTJFALSE:
return JsonValue.FALSE;
case ParserJsonTreeConstants.JJTJNULL:
return JsonValue.NULL;
default:
throw new JsonHandlingException (aNode, "Unexpected value child: " + aChildNode.getNodeType ());
}
}
@Nonnull
public IJson createCascadingStyleSheetFromNode (@Nonnull final JsonNode aNode)
{
_expectNodeType (aNode, ParserJsonTreeConstants.JJTROOT);
final int nChildCount = aNode.jjtGetNumChildren ();
if (nChildCount != 1)
_throwUnexpectedChildrenCount (aNode, "Expected exactly 1 child but got " + nChildCount + " children!");
final JsonNode aChildNode = aNode.jjtGetChild (0);
return _createValue (aChildNode);
}
}
|
[
"bg@phloc.com"
] |
bg@phloc.com
|
7ec3832332732ee6650720c5f05cbd3fcab20ca1
|
6c1cebbde04102e9a1f214509f210ae3c511233d
|
/lnk-demo/src/main/java/io/lnk/demo/sync_multi_version_ploy/V2AuthService.java
|
d79fda9732a87cd7915e7c9e705879625e2aa7cc
|
[] |
no_license
|
twjitm/lnk
|
bdc6a90a127b267a4f1057a5b08b964b7c39a2c8
|
cf7221855e1c24df0810d999c7affc5cd93afd05
|
refs/heads/master
| 2020-12-02T06:34:09.109336
| 2017-07-11T03:22:26
| 2017-07-11T03:22:26
| 96,854,599
| 1
| 1
| null | 2017-07-11T05:35:00
| 2017-07-11T05:35:00
| null |
UTF-8
|
Java
| false
| false
| 1,265
|
java
|
package io.lnk.demo.sync_multi_version_ploy;
import io.lnk.api.annotation.LnkVersion;
import io.lnk.api.exception.AppBizException;
import io.lnk.demo.AuthRequest;
import io.lnk.demo.AuthResponse;
/**
* @author 刘飞 E-mail:liufei_it@126.com
*
* @version 1.0.0
* @since 2017年6月3日 下午10:10:43
*/
@LnkVersion("2.0.0")
public class V2AuthService implements AuthService {
@Override
public AuthResponse auth(AuthRequest request) throws AppBizException {
AuthResponse response = new AuthResponse();
response.setGateId("0312");
response.setGateRespCode("TXN.000");
response.setGateRespMsg("V2 : " + request);
response.setTxnId(request.getTxnId());
return response;
}
@Override
public AuthResponse auth_poly(AuthRequest request) throws AppBizException {
PolyAuthResponse response = new PolyAuthResponse();
response.setGateId("0104");
response.setGateRespCode("TXN.000");
response.setGateRespMsg("V2 : " + request);
response.setTxnId(request.getTxnId());
response.setPrincipalId("101");
response.setTxnType("00001");
response.setProductType("QP");
response.setIdType("01");
return response;
}
}
|
[
"liufei_it@126.com"
] |
liufei_it@126.com
|
1bd04a2e70f4c9997858356c18ce867a32938d65
|
8b2a1da80f7cf21697a3f3f1c536ea78eb1c7998
|
/family_service_platform/src/main/java/com/zxf/service/FySaleContractService.java
|
152f6e9881bc1e18d2c2fb0d2ab9513b2e921998
|
[] |
no_license
|
zhang6132326/reps4
|
b7a6053e23d1bac4afeb766ad15f745e0877eaf6
|
078616768ba8f8c1d37f186b76972c8546eea449
|
refs/heads/master
| 2023-02-03T11:59:29.903891
| 2020-12-19T12:53:14
| 2020-12-19T12:53:14
| 322,591,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 310
|
java
|
package com.zxf.service;
import com.zxf.bean.FySaleContract;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 销售合同; InnoDB free: 8192 kB 服务类
* </p>
*
* @author zxf
* @since 2020-09-19
*/
public interface FySaleContractService extends IService<FySaleContract> {
}
|
[
"6132326@qq.com"
] |
6132326@qq.com
|
8ccbb512900fe73d54090fa6af0d6dea972b5f25
|
1da0182f1cc52d0a501e81984c669cd8272e52b7
|
/main/java/net/aegistudio/reflect/method/ConditionedExecutor.java
|
4ddcd00ccf97eaf7f39f6c09949d73f22e2eb437
|
[
"MIT"
] |
permissive
|
aegistudio/MinecraftInjector
|
b7ae9ccae5d1bb6d745c5a51872cf0079a305e5e
|
a4850adc9739ed92733b680983f2c28d7032c877
|
refs/heads/master
| 2021-07-10T21:16:45.999158
| 2016-11-11T22:10:42
| 2016-11-11T22:10:42
| 58,113,162
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 477
|
java
|
package net.aegistudio.reflect.method;
import java.util.function.Predicate;
public class ConditionedExecutor extends AbstractExecutor {
public ConditionedExecutor(Invocable[] invocableList, Predicate<Invocable> matcher)
throws NoSuchMethodException, SecurityException {
super.invocable = null;
for(Invocable m : invocableList) {
if(matcher.test(m)) {
super.invocable = m;
break;
}
}
if(invocable == null) throw new NoSuchMethodException();
}
}
|
[
"1910567646@qq.com"
] |
1910567646@qq.com
|
8c4a34b102509618696d5c3a5f050f68a3c1844d
|
18cfb24c4914acd5747e533e88ce7f3a52eee036
|
/src/main/jdk8/org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java
|
05b7415a44a40c5a6ca17ee5c5510219ce7fa466
|
[] |
no_license
|
douguohai/jdk8-code
|
f0498e451ec9099e4208b7030904e1b4388af7c5
|
c8466ed96556bfd28cbb46e588d6497ff12415a0
|
refs/heads/master
| 2022-12-19T03:10:16.879386
| 2020-09-30T05:43:20
| 2020-09-30T05:43:20
| 273,399,965
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 514
|
java
|
package org.omg.PortableServer;
/**
* org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u91/6644/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Friday, April 1, 2016 12:59:25 AM PDT
*/
public interface REQUEST_PROCESSING_POLICY_ID
{
/**
* The value representing REQUEST_PROCESSING_POLICY_ID.
*/
public static final int value = (int)(22L);
}
|
[
"douguohai@163.com"
] |
douguohai@163.com
|
a0f5c8f7d7873a73548b74e251cbd70b19017169
|
a2ec86b844db3e833a48be60c559e7db99cedf2d
|
/Modulo 8/VisorSinSolucion/Visor/visorcore/src/main/java/com/hampcode/model/entity/Product.java
|
f6e54f88f693f1280251607882e998a6f7e6c96e
|
[] |
no_license
|
mayckolbryan/workSpaceJavaCeroWeb-continue
|
ed392a3bff51763c3969a8444de5a5bd0f86a61b
|
4d78d4ffe4693f570be86b24aeb35a4974a4d0c4
|
refs/heads/master
| 2022-09-28T19:31:49.116825
| 2019-05-30T16:53:51
| 2019-05-30T16:53:51
| 176,065,231
| 0
| 0
| null | 2022-09-08T01:00:04
| 2019-03-17T06:36:23
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,223
|
java
|
package com.hampcode.model.entity;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "products")
public class Product implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column(name = "name", length = 80, nullable = false)
private String name;
@Column(name = "price")
private double price;
@ManyToOne
@JoinColumn(name = "category_id", nullable = false)
private Category category;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
}
|
[
"mayckolbryan226@gmail.com"
] |
mayckolbryan226@gmail.com
|
6b89891c04eb0525d62b63bdd594777c9be573c5
|
14097bfec2b5b860dbe5db8c3c174922cf796582
|
/rultor-spi/src/main/java/com/rultor/spi/Spec.java
|
9e524a6640a7e34c55140e695c2fbedf3484aa4f
|
[
"BSD-2-Clause"
] |
permissive
|
anouarbadri/rultor
|
f4275c0fc5cb4248b8acd3e4182dd21bba7eb1c6
|
e7c6699d6fd8af676a62990085f2aaba440c8333
|
refs/heads/master
| 2021-01-15T23:07:15.930288
| 2013-09-25T22:02:47
| 2013-09-25T22:02:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,035
|
java
|
/**
* Copyright (c) 2009-2013, rultor.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. 3) Neither the name of the rultor.com 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 HOLDER 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 com.rultor.spi;
import com.jcabi.aspects.Immutable;
import com.jcabi.aspects.Loggable;
import javax.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* Unit specification.
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 1.0
*/
@Immutable
public interface Spec {
/**
* Convert it to a human readable form.
* @return The text
*/
@NotNull(message = "spec text is never NULL")
String asText();
/**
* Simple.
*/
@Immutable
@ToString
@EqualsAndHashCode(of = "text")
@Loggable(Loggable.DEBUG)
final class Simple implements Spec {
/**
* The text.
*/
private final transient String text;
/**
* Public ctor.
*/
public Simple() {
this("com.rultor.base.Empty()");
}
/**
* Public ctor.
* @param spec The text
*/
public Simple(@NotNull(message = "spec can't be NULL")
final String spec) {
this.text = spec;
}
/**
* {@inheritDoc}
*/
@Override
public String asText() {
return this.text;
}
}
/**
* Strict spec.
*/
@Immutable
@ToString
@EqualsAndHashCode(of = "spec")
@Loggable(Loggable.DEBUG)
final class Strict implements Spec {
/**
* Simple spec that passed all quality controls.
*/
private final transient Spec spec;
/**
* Public ctor.
* @param text The text
* @param repo Repo
* @param user User
* @param users Users
* @param work Work we're in
* @param type Type expected
* @throws SpecException If fails
* @checkstyle ParameterNumber (10 lines)
*/
public Strict(
@NotNull(message = "spec can't be NULL") final String text,
@NotNull(message = "repo can't be NULL") final Repo repo,
@NotNull(message = "user can't be NULL") final User user,
@NotNull(message = "users can't be NULL") final Users users,
@NotNull(message = "work can't be NULL") final Work work,
@NotNull(message = "type can't be NULL") final Class<?> type)
throws SpecException {
final Spec temp = new Spec.Simple(text);
final Variable<?> var = new Repo.Cached(repo, user, temp).get();
if (var.arguments().isEmpty()) {
final Object object = var.instantiate(
users, new Arguments(work, new Wallet.Empty())
);
try {
object.toString();
} catch (SecurityException ex) {
throw new SpecException(ex);
}
if (!type.isAssignableFrom(object.getClass())) {
throw new SpecException(
String.format(
"%s expected while %s provided",
type.getName(),
object.getClass().getName()
)
);
}
}
this.spec = new Spec.Simple(var.asText());
}
/**
* {@inheritDoc}
*/
@Override
public String asText() {
return this.spec.asText();
}
}
}
|
[
"yegor@tpc2.com"
] |
yegor@tpc2.com
|
02ccb5d0bdd3669493c3299db4bf99a5eafd51ec
|
8aedb5180764eb78c61699e6140064610d43cff6
|
/src/main/java/com/ek/guide/thread2/demo6/Test2.java
|
1a02703c9248f1e1f7f441d4502a72b7429cacaf
|
[] |
no_license
|
EvilKillerOrg/demo_java
|
e1e5848c61d1f8bc9f756b88943d6a5bd8707ccb
|
4ea90d5eaefc46f092747f15b513d49e8f552903
|
refs/heads/master
| 2021-09-07T17:18:08.397356
| 2018-02-26T18:38:15
| 2018-02-26T18:38:15
| 110,147,404
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,203
|
java
|
package com.ek.guide.thread2.demo6;
import java.util.Random;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* 读写锁
*
* @ClassName: Test2
* @Description: TODO
* @author: ek
* @date: 2018年1月21日 下午9:38:00
*/
public class Test2 {
public static void main(String[] args) {
Test2.Queue queue = new Test2().new Queue();
// 创建3个进程用来读
for (int i = 0; i < 3; i++) {
new Thread(new Runnable() {
@Override
public void run() {
while (true) {
queue.get();
}
}
}).start();
}
// 创建1个进行用来写
new Thread(new Runnable() {
@Override
public void run() {
while (true) {
queue.put(new Random().nextInt(10000));
}
}
}).start();
}
class Queue { // 读和写要互斥所以要放在同一个类里
private Object data = null; // 共享数据,只能有一个进程能写该数据,但可以有多个进程同时读该数据.
ReadWriteLock rwl = new ReentrantReadWriteLock(); // 读写锁
// 读资源的方法
public void get() {
rwl.readLock().lock(); // 读锁
try {
System.out.println(Thread.currentThread().getName() + " 开始读");
System.out.println(Thread.currentThread().getName() + " 读到: " + data);
Thread.sleep((long) Math.random() * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
rwl.readLock().unlock(); // 进程使用完了释放锁
}
}
// 写资源的方法
public void put(Object writeData) {
rwl.writeLock().lock();
try {
System.out.println(Thread.currentThread().getName() + " 开始写");
Thread.sleep((long) Math.random() * 1000);
this.data = writeData;
System.out.println(Thread.currentThread().getName() + " 写了: " + writeData);
} catch (InterruptedException e) {
e.printStackTrace();
}finally{
rwl.writeLock().unlock();
}
}
}
}
|
[
"whm029@126.com"
] |
whm029@126.com
|
05e79cadb6a073f6e7a4d462864f21a673a29f0e
|
07d5605350374bc7a17ac1c75b3f40b059d07945
|
/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_MtTable3.java
|
55269fe52f11692a157536167d31531658c8dc56
|
[
"Apache-2.0"
] |
permissive
|
wx930910/cayenne_refactoring
|
839521ac1245fd91183312b94b6004b2b6bb115e
|
b5356d80b9d6a8bb0f763bf4e748c4669f4b1a87
|
refs/heads/master
| 2023-01-30T04:49:52.767938
| 2020-12-15T07:17:25
| 2020-12-15T07:17:25
| 314,658,092
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,672
|
java
|
package org.apache.cayenne.testdo.mt.auto;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.List;
import org.apache.cayenne.BaseDataObject;
import org.apache.cayenne.exp.Property;
import org.apache.cayenne.testdo.mt.MtTable2;
/**
* Class _MtTable3 was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _MtTable3 extends BaseDataObject {
private static final long serialVersionUID = 1L;
public static final String TABLE3_ID_PK_COLUMN = "TABLE3_ID";
public static final Property<byte[]> BINARY_COLUMN = Property.create("binaryColumn", byte[].class);
public static final Property<String> CHAR_COLUMN = Property.create("charColumn", String.class);
public static final Property<Integer> INT_COLUMN = Property.create("intColumn", Integer.class);
public static final Property<List<MtTable2>> TABLE2ARRAY = Property.create("table2Array", List.class);
protected byte[] binaryColumn;
protected String charColumn;
protected Integer intColumn;
protected Object table2Array;
public void setBinaryColumn(byte[] binaryColumn) {
beforePropertyWrite("binaryColumn", this.binaryColumn, binaryColumn);
this.binaryColumn = binaryColumn;
}
public byte[] getBinaryColumn() {
beforePropertyRead("binaryColumn");
return this.binaryColumn;
}
public void setCharColumn(String charColumn) {
beforePropertyWrite("charColumn", this.charColumn, charColumn);
this.charColumn = charColumn;
}
public String getCharColumn() {
beforePropertyRead("charColumn");
return this.charColumn;
}
public void setIntColumn(Integer intColumn) {
beforePropertyWrite("intColumn", this.intColumn, intColumn);
this.intColumn = intColumn;
}
public Integer getIntColumn() {
beforePropertyRead("intColumn");
return this.intColumn;
}
public void addToTable2Array(MtTable2 obj) {
addToManyTarget("table2Array", obj, true);
}
public void removeFromTable2Array(MtTable2 obj) {
removeToManyTarget("table2Array", obj, true);
}
@SuppressWarnings("unchecked")
public List<MtTable2> getTable2Array() {
return (List<MtTable2>)readProperty("table2Array");
}
@Override
public Object readPropertyDirectly(String propName) {
if(propName == null) {
throw new IllegalArgumentException();
}
switch(propName) {
case "binaryColumn":
return this.binaryColumn;
case "charColumn":
return this.charColumn;
case "intColumn":
return this.intColumn;
case "table2Array":
return this.table2Array;
default:
return super.readPropertyDirectly(propName);
}
}
@Override
public void writePropertyDirectly(String propName, Object val) {
if(propName == null) {
throw new IllegalArgumentException();
}
switch (propName) {
case "binaryColumn":
this.binaryColumn = (byte[])val;
break;
case "charColumn":
this.charColumn = (String)val;
break;
case "intColumn":
this.intColumn = (Integer)val;
break;
case "table2Array":
this.table2Array = val;
break;
default:
super.writePropertyDirectly(propName, val);
}
}
private void writeObject(ObjectOutputStream out) throws IOException {
writeSerialized(out);
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
readSerialized(in);
}
@Override
protected void writeState(ObjectOutputStream out) throws IOException {
super.writeState(out);
out.writeObject(this.binaryColumn);
out.writeObject(this.charColumn);
out.writeObject(this.intColumn);
out.writeObject(this.table2Array);
}
@Override
protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
super.readState(in);
this.binaryColumn = (byte[])in.readObject();
this.charColumn = (String)in.readObject();
this.intColumn = (Integer)in.readObject();
this.table2Array = in.readObject();
}
}
|
[
"wx19930910@gmail.com"
] |
wx19930910@gmail.com
|
03fa5bb305866f880f7adb22f7f4669a138ca002
|
3529ecaa44a53172094ba13498097057c8972723
|
/Questiondir/646.maximum-length-of-pair-chain/646.maximum-length-of-pair-chain_110731119.java
|
b4e18bb385aa2c3c4477fbc62b871336a912c812
|
[] |
no_license
|
cczhong11/Leetcode-contest-code-downloader
|
0681f0f8c9e8edd5371fd8d0a1d37dcc368566b6
|
db64a67869aae4f0e55e78b65a7e04f5bc2e671c
|
refs/heads/master
| 2021-09-07T15:36:38.892742
| 2018-02-25T04:15:17
| 2018-02-25T04:15:17
| 118,612,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 454
|
java
|
public class Solution {
public int findLongestChain(int[][] pairs) {
if(pairs.length==0){
return 0;
}
Arrays.sort(pairs,(x,y)-> {return x[1]-y[1];});
int l = 1;
int[] now = pairs[0];
for(int i=1;i<pairs.length;i++){
if(pairs[i][0]>now[1]){
now = pairs[i];
l++;
}else{
}
}
return l;
}
}
|
[
"tczhong24@gmail.com"
] |
tczhong24@gmail.com
|
98100e1d771b921404ea713a9196ab2b7f2b0dfd
|
9ec8681f63272d08eb7be4f7d0b5d3f77eab2445
|
/src/main/java/org/bian/dto/SDPromotionalEventsRetrieveInputModelServiceDomainRetrieveActionRecordControlRecordPortfolioAnalysis.java
|
0e79bed7240e486a4aa01453f2cfaefea28c43c0
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-promotional-events-v2
|
e5027161c09a20397702a3cafaf38bc3c693436e
|
18796303aff48865f216f3a1dd38bdcd1cc5f960
|
refs/heads/master
| 2020-07-24T04:23:58.754449
| 2019-09-12T09:48:58
| 2019-09-12T09:48:58
| 207,800,749
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,173
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* SDPromotionalEventsRetrieveInputModelServiceDomainRetrieveActionRecordControlRecordPortfolioAnalysis
*/
public class SDPromotionalEventsRetrieveInputModelServiceDomainRetrieveActionRecordControlRecordPortfolioAnalysis {
private String controlRecordPortfolioAnalysisReference = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the control record portfolio analysis view maintained by the service center
* @return controlRecordPortfolioAnalysisReference
**/
public String getControlRecordPortfolioAnalysisReference() {
return controlRecordPortfolioAnalysisReference;
}
public void setControlRecordPortfolioAnalysisReference(String controlRecordPortfolioAnalysisReference) {
this.controlRecordPortfolioAnalysisReference = controlRecordPortfolioAnalysisReference;
}
}
|
[
"team1@bian.org"
] |
team1@bian.org
|
30ee180773e86e53f1adab8c38d0ddc850e7a957
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/45/org/apache/commons/math/analysis/FunctionUtils_collector_147.java
|
421e4867e59894b88a908e0863c625217912f5bd
|
[] |
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
| 628
|
java
|
org apach common math analysi
util manipul function object
version
function util functionutil
return multivari real function multivariaterealfunct defin pre code
combin combin combin initi initialvalu length
code pre
param combin combin function
param initi initialvalu initi
collector function
multivari real function multivariaterealfunct collector bivari real function bivariaterealfunct combin
initi initialvalu
collector combin ident initi initialvalu
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
0f4e268ab36a1b53495aa373cfe1b1c1559be7d1
|
632cf200926ba5daf4aae86a578391bb095028bf
|
/dev-interface-util/dev-weixin-util/src/main/java/cn/tomsnail/weixin/util/sucai/MediaOper.java
|
f15d3fd6d460ba1b51556b7526d2a4dc9ef04817
|
[
"Apache-2.0"
] |
permissive
|
magicgis/snail-dev
|
68ceef00f88a6a73e7b737984b17ef948af8a3f8
|
32bdb9ad2cd8957924d797eab9abe5717abf1246
|
refs/heads/master
| 2020-03-26T23:51:14.734791
| 2018-06-12T03:18:34
| 2018-06-12T03:18:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,178
|
java
|
package cn.tomsnail.weixin.util.sucai;
import java.io.File;
public interface MediaOper {
// 上传多媒体
String upload_media = "/media/upload?access_token=%s&type=%s";
// 下载多媒体
String get_media = "/media/get?access_token=%s&media_id=%s";
/**
* 上传多媒体文件
*
* <pre/>
* 上传的临时多媒体文件有格式和大小限制,如下:
* <li/>
* 图片(image): 1M,支持JPG格式
* <li/>
* 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式
* <li/>
* 视频(video):10MB,支持MP4格式
* <li/>
* 缩略图(thumb):64KB,支持JPG格式
*
* <pre/>
* 媒体文件在后台保存时间为3天,即3天后media_id失效。
*
* @param type
* 多媒体类型 {@link io.github.elkan1788.mpsdk4j.common.MediaType}
* @param media
* 多媒体文件
* @return 实体{@link Media}
*/
Media upMedia(String type, File media);
/**
* 下载多媒体文件
*
* @param mediaId
* 媒体文件ID
* @return {@link File}
*/
File dlMedia(String mediaId);
}
|
[
"449711478@qq.com"
] |
449711478@qq.com
|
5ba97644da12191531c73760fe9ccd9e2b4e7f88
|
d5515553d071bdca27d5d095776c0e58beeb4a9a
|
/src/net/sourceforge/plantuml/command/BlocLines.java
|
cb59e0f34b0a7c5e4e8a7bd7c26475ce055b5800
|
[] |
no_license
|
ccamel/plantuml
|
29dfda0414a3dbecc43696b63d4dadb821719489
|
3100d49b54ee8e98537051e071915e2060fe0b8e
|
refs/heads/master
| 2022-07-07T12:03:37.351931
| 2016-12-14T21:01:03
| 2016-12-14T21:01:03
| 77,067,872
| 1
| 0
| null | 2022-05-30T09:56:21
| 2016-12-21T16:26:58
|
Java
|
UTF-8
|
Java
| false
| false
| 6,827
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.command;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.cucadiagram.Display;
public class BlocLines implements Iterable<CharSequence> {
private List<CharSequence> lines;
@Override
public String toString() {
return lines.toString();
}
private BlocLines(List<? extends CharSequence> lines) {
this.lines = (List<CharSequence>) Collections.unmodifiableList(lines);
}
public Display toDisplay() {
return Display.create(lines);
}
public static BlocLines single(CharSequence single) {
return new BlocLines(Arrays.asList(single));
}
public static BlocLines getWithNewlines(CharSequence s) {
return new BlocLines(StringUtils.getWithNewlines(s));
}
public BlocLines() {
this(new ArrayList<CharSequence>());
}
public BlocLines add2(CharSequence s) {
final List<CharSequence> copy = new ArrayList<CharSequence>(lines);
copy.add(s);
return new BlocLines(copy);
}
public List<CharSequence> getLines() {
return lines;
}
public int size() {
return lines.size();
}
public CharSequence get499(int i) {
return lines.get(i);
}
public CharSequence getFirst499() {
return lines.get(0);
}
public CharSequence getLast499() {
return lines.get(lines.size() - 1);
}
public BlocLines cleanList2(MultilinesStrategy strategy) {
final List<CharSequence> copy = new ArrayList<CharSequence>(lines);
strategy.cleanList(copy);
return new BlocLines(copy);
}
public BlocLines trim(boolean removeEmptyLines) {
final List<CharSequence> copy = new ArrayList<CharSequence>(lines);
for (int i = 0; i < copy.size(); i++) {
final CharSequence s = copy.get(i);
copy.set(i, StringUtils.trin(s));
}
if (removeEmptyLines) {
for (final Iterator<CharSequence> it = copy.iterator(); it.hasNext();) {
if (it.next().length() == 0) {
it.remove();
}
}
}
return new BlocLines(copy);
}
public BlocLines removeEmptyColumns() {
if (firstColumnRemovable(lines) == false) {
return this;
}
final List<CharSequence> copy = new ArrayList<CharSequence>(lines);
do {
for (int i = 0; i < copy.size(); i++) {
final CharSequence s = copy.get(i);
if (s.length() > 0) {
copy.set(i, s.subSequence(1, s.length()));
}
}
} while (firstColumnRemovable(copy));
return new BlocLines(copy);
}
private static boolean firstColumnRemovable(List<CharSequence> data) {
boolean allEmpty = true;
for (CharSequence s : data) {
if (s.length() == 0) {
continue;
}
allEmpty = false;
final char c = s.charAt(0);
if (c != ' ' && c != '\t') {
return false;
}
}
return allEmpty == false;
}
public char getLastChar() {
final CharSequence s = lines.get(lines.size() - 1);
return s.charAt(s.length() - 1);
}
public BlocLines removeStartingAndEnding2(String data) {
if (lines.size() == 0) {
return this;
}
final List<CharSequence> copy = new ArrayList<CharSequence>(lines);
copy.set(0, data);
final int n = copy.size() - 1;
final CharSequence s = copy.get(n);
copy.set(n, s.subSequence(0, s.length() - 1));
return new BlocLines(copy);
}
public BlocLines concat2() {
final StringBuilder sb = new StringBuilder();
for (CharSequence line : lines) {
sb.append(line);
sb.append(StringUtils.hiddenNewLine());
}
return single(sb.substring(0, sb.length() - 1));
}
public BlocLines trimSmart(int referenceLine) {
if (lines.size() <= referenceLine) {
return this;
}
final List<CharSequence> copy = new ArrayList<CharSequence>(lines);
final int nbStartingSpace = nbStartingSpace(copy.get(referenceLine));
for (int i = referenceLine; i < copy.size(); i++) {
final CharSequence s = copy.get(i);
copy.set(i, removeStartingSpaces(s, nbStartingSpace));
}
return new BlocLines(copy);
}
private static int nbStartingSpace(CharSequence s) {
int nb = 0;
while (nb < s.length() && isSpaceOrTab(s.charAt(nb))) {
nb++;
}
return nb;
}
private static boolean isSpaceOrTab(char c) {
return c == ' ' || c == '\t';
}
private static CharSequence removeStartingSpaces(CharSequence arg, int nbStartingSpace) {
if (arg.length() == 0) {
return arg;
}
int i = 0;
while (i < nbStartingSpace && i < arg.length() && isSpaceOrTab(arg.charAt(i))) {
i++;
}
if (i == 0) {
return arg;
}
return arg.subSequence(i, arg.length());
}
public BlocLines subExtract(int start, int end) {
List<CharSequence> copy = new ArrayList<CharSequence>(lines);
copy = copy.subList(start, copy.size() - end);
return new BlocLines(copy);
}
public Iterator<CharSequence> iterator() {
return lines.iterator();
}
public BlocLines removeComments() {
final List<CharSequence> copy = new ArrayList<CharSequence>();
boolean inComment = false;
for (CharSequence cs : lines) {
if (inComment == false && MyPattern.mtches(cs, CommandMultilinesComment.COMMENT_SINGLE_LINE)) {
continue;
}
if (inComment == false && MyPattern.mtches(cs, CommandMultilinesComment.COMMENT_MULTILINE_START)) {
inComment = true;
continue;
}
if (inComment && MyPattern.mtches(cs, CommandMultilinesComment.COMMENT_MULTILINE_END)) {
inComment = false;
continue;
}
if (inComment == false) {
copy.add(cs);
}
}
return new BlocLines(copy);
}
public BlocLines removeInnerComments() {
final List<CharSequence> copy = new ArrayList<CharSequence>();
for (CharSequence cs : lines) {
copy.add(MyPattern.removeAll(cs, CommandMultilinesComment.INNER_COMMENT));
}
return new BlocLines(copy);
}
}
|
[
"plantuml@gmail.com"
] |
plantuml@gmail.com
|
c8806ab82cd322c58b37d218c269aa06da1a0595
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_55bc0c3dd1f3901d096140e8bee1de9b3475c980/CmisDocumentReaderService/2_55bc0c3dd1f3901d096140e8bee1de9b3475c980_CmisDocumentReaderService_s.java
|
493dc55721e30b01a0d93078014d083b3a13704a
|
[] |
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,257
|
java
|
/*
* Copyright (C) 2010 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.xcmis.spi.utils;
import org.exoplatform.container.component.ComponentPlugin;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.document.DocumentReader;
import org.exoplatform.services.document.DocumentReaderService;
import org.exoplatform.services.document.HandlerNotFoundException;
import org.exoplatform.services.document.impl.BaseDocumentReader;
import org.exoplatform.services.document.impl.HTMLDocumentReader;
import org.exoplatform.services.document.impl.MSExcelDocumentReader;
import org.exoplatform.services.document.impl.MSOutlookDocumentReader;
import org.exoplatform.services.document.impl.MSWordDocumentReader;
import org.exoplatform.services.document.impl.OpenOfficeDocumentReader;
import org.exoplatform.services.document.impl.PPTDocumentReader;
import org.exoplatform.services.document.impl.TextPlainDocumentReader;
import org.exoplatform.services.document.impl.XMLDocumentReader;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
/**
* Implementation of {@link DocumentReaderService} with predefined parsers.
*/
public class CmisDocumentReaderService implements DocumentReaderService
{
private static final Log LOG = ExoLogger.getLogger(CmisDocumentReaderService.class);
private Map<String, BaseDocumentReader> readers;
/**
* Instantiates a new cmis document reader sercice.
*/
public CmisDocumentReaderService()
{
this.readers = new HashMap<String, BaseDocumentReader>();
addDocumentReader(new CmisPDFDocumentReader());
addDocumentReader(new MSWordDocumentReader());
addDocumentReader(new MSExcelDocumentReader());
addDocumentReader(new MSOutlookDocumentReader());
addDocumentReader(new PPTDocumentReader());
addDocumentReader(new HTMLDocumentReader());
addDocumentReader(new XMLDocumentReader());
addDocumentReader(new OpenOfficeDocumentReader());
addDocumentReader(new TextPlainDocumentReader());
}
/**
* @see org.exoplatform.services.document.DocumentReaderService#getContentAsText(java.lang.String, java.io.InputStream)
*/
public String getContentAsText(String mimeType, InputStream is) throws Exception
{
BaseDocumentReader reader = readers.get(mimeType.toLowerCase());
if (reader != null)
{
return reader.getContentAsText(is);
}
throw new Exception("Cannot handle the document type: " + mimeType);
}
/**
* @see org.exoplatform.services.document.DocumentReaderService#getDocumentReader(java.lang.String)
*/
public DocumentReader getDocumentReader(String mimeType) throws HandlerNotFoundException
{
BaseDocumentReader reader = readers.get(mimeType.toLowerCase());
if (reader != null)
{
return reader;
}
else
{
throw new HandlerNotFoundException("No appropriate properties extractor for " + mimeType);
}
}
/**
* @param plugin ComponentPlugin
*/
public void addDocumentReader(ComponentPlugin plugin)
{
BaseDocumentReader reader = (BaseDocumentReader)plugin;
for (String mimeType : reader.getMimeTypes())
{
readers.put(mimeType.toLowerCase(), reader);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
9fa5dbd3200ddfd1023f151732b0fbf7b6f0367d
|
29ca3a848b86a4e3f8d337e19208951da27a9f20
|
/src/main/java/com/zhibo/trafficlight/data/TrafficLight.java
|
4f18b577c36d44dcb25ccde7bf9a7edfa86ad5c9
|
[] |
no_license
|
LinYing89/trafficlight
|
89c1877c258bacf33faee6a7da02ea0004c69f97
|
bb8a6bc16da6dd385303d56ff161957180edf357
|
refs/heads/master
| 2020-05-24T21:16:27.847762
| 2019-05-19T12:05:45
| 2019-05-19T12:05:45
| 187,471,422
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,011
|
java
|
package com.zhibo.trafficlight.data;
/**
* 信号灯
* @author 44489
* @version 2019年4月27日下午4:17:01
*/
public class TrafficLight {
//状态
private Integer state;
//电流
private Integer current;
//颜色
private LightEnum lightEnum;
//开关时间
private Integer switchingTime;
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Integer getCurrent() {
return current;
}
public void setCurrent(Integer current) {
this.current = current;
}
public LightEnum getLightEnum() {
return lightEnum;
}
public void setLightEnum(LightEnum lightEnum) {
this.lightEnum = lightEnum;
}
public Integer getSwitchingTime() {
return switchingTime;
}
public void setSwitchingTime(Integer switchingTime) {
this.switchingTime = switchingTime;
}
}
|
[
"444894216@qq.com"
] |
444894216@qq.com
|
a229f16ca206cf32a59d9d5de0a2633cd2f570a3
|
c36b3bacc4cf0d268d63d351b51a8a2517d571d1
|
/Core/src/com/rr/core/codec/binary/fastfix/msgdict/copy/int64/ULongMandReaderCopy.java
|
92c9da6afa4769dd457eecd947c68f2ac0d5e17b
|
[] |
no_license
|
renicl/alphaProject
|
e4ced0c8de85b933f8b3af1903577bd0143a9acf
|
1785ecc8c7d930fda2c60452504a141e417712b6
|
refs/heads/master
| 2021-05-15T09:02:55.542649
| 2017-12-03T16:32:05
| 2017-12-03T16:32:05
| 108,066,861
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,059
|
java
|
/*******************************************************************************
* Copyright (c) 2015 Low Latency Trading Limited : Author Richard Rose
* 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.rr.core.codec.binary.fastfix.msgdict.copy.int64;
import com.rr.core.codec.binary.fastfix.FastFixDecodeBuilder;
import com.rr.core.codec.binary.fastfix.PresenceMapReader;
import com.rr.core.codec.binary.fastfix.common.FieldUtils;
import com.rr.core.codec.binary.fastfix.common.FixFieldReader;
import com.rr.core.codec.binary.fastfix.common.LongFieldValWrapper;
import com.rr.core.codec.binary.fastfix.msgdict.copy.CopyFieldReader;
import com.rr.core.lang.Constants;
public final class ULongMandReaderCopy extends CopyFieldReader implements FixFieldReader<LongFieldValWrapper> {
private final long _init;
private long _previous;
public ULongMandReaderCopy( String name, int id, String init ) {
this( name, id, FieldUtils.parseLong(init) );
}
public ULongMandReaderCopy( String name, int id ) {
this( name, id, Constants.UNSET_LONG );
}
public ULongMandReaderCopy( String name, int id, long init ) {
super( name, id, false );
_init = init;
reset();
}
@Override
public void reset() {
_previous = _init;
}
/**
* write the field, note the code could easily be extracted and templated but then would get autoboxing and unable to optimise inlining
*
* @param encoder
* @param mapWriter
* @param _value
*/
public long read( final FastFixDecodeBuilder decoder, final PresenceMapReader mapReader ) {
final boolean present = mapReader.isNextFieldPresent();
if ( present ) {
final long value = decoder.decodeMandULong();
_previous = value;
return value;
}
if ( _previous != Constants.UNSET_LONG ) {
return _previous; // value not present, but have previous value to copy
}
throwMissingValueException();
return Constants.UNSET_LONG; // keep compiler happy as it cant see throw methods runtime exception
}
public long getInitValue() {
return _init;
}
@Override
public void read( FastFixDecodeBuilder decoder, PresenceMapReader mapReader, LongFieldValWrapper dest ) {
dest.setVal( read( decoder, mapReader ) );
}
}
|
[
"lucasrenick@lucass-mbp.fios-router.home"
] |
lucasrenick@lucass-mbp.fios-router.home
|
d5a20963d90656b6f61330f6c23c85e752beb6f6
|
6a2f63d971fd5ce988c10cdc2401aae3ba5e0fee
|
/net/minecraft/client/resources/data/IMetadataSerializer.java
|
9cb6efe8f356a7dae91ee0f56014211abcfad208
|
[
"MIT"
] |
permissive
|
MikeWuang/hawk-client
|
22d0d723b70826f74d91f0928384513a419592c1
|
7f62687c62709c595e2945d71678984ba1b832ea
|
refs/heads/main
| 2023-04-05T19:50:35.459096
| 2021-04-28T00:52:19
| 2021-04-28T00:52:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,968
|
java
|
package net.minecraft.client.resources.data;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumTypeAdapterFactory;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.IRegistry;
import net.minecraft.util.RegistrySimple;
public class IMetadataSerializer {
private Gson gson;
private final IRegistry metadataSectionSerializerRegistry = new RegistrySimple();
private final GsonBuilder gsonBuilder = new GsonBuilder();
private static final String __OBFID = "CL_00001101";
public void registerMetadataSectionType(IMetadataSectionSerializer var1, Class var2) {
this.metadataSectionSerializerRegistry.putObject(var1.getSectionName(), new IMetadataSerializer.Registration(this, var1, var2, (Object)null));
this.gsonBuilder.registerTypeAdapter(var2, var1);
this.gson = null;
}
private Gson getGson() {
if (this.gson == null) {
this.gson = this.gsonBuilder.create();
}
return this.gson;
}
public IMetadataSerializer() {
this.gsonBuilder.registerTypeHierarchyAdapter(IChatComponent.class, new IChatComponent.Serializer());
this.gsonBuilder.registerTypeHierarchyAdapter(ChatStyle.class, new ChatStyle.Serializer());
this.gsonBuilder.registerTypeAdapterFactory(new EnumTypeAdapterFactory());
}
public IMetadataSection parseMetadataSection(String var1, JsonObject var2) {
if (var1 == null) {
throw new IllegalArgumentException("Metadata section name cannot be null");
} else if (!var2.has(var1)) {
return null;
} else if (!var2.get(var1).isJsonObject()) {
throw new IllegalArgumentException(String.valueOf((new StringBuilder("Invalid metadata for '")).append(var1).append("' - expected object, found ").append(var2.get(var1))));
} else {
IMetadataSerializer.Registration var3 = (IMetadataSerializer.Registration)this.metadataSectionSerializerRegistry.getObject(var1);
if (var3 == null) {
throw new IllegalArgumentException(String.valueOf((new StringBuilder("Don't know how to handle metadata section '")).append(var1).append("'")));
} else {
return (IMetadataSection)this.getGson().fromJson(var2.getAsJsonObject(var1), var3.field_110500_b);
}
}
}
class Registration {
final Class field_110500_b;
final IMetadataSerializer this$0;
final IMetadataSectionSerializer field_110502_a;
private static final String __OBFID = "CL_00001103";
private Registration(IMetadataSerializer var1, IMetadataSectionSerializer var2, Class var3) {
this.this$0 = var1;
this.field_110502_a = var2;
this.field_110500_b = var3;
}
Registration(IMetadataSerializer var1, IMetadataSectionSerializer var2, Class var3, Object var4) {
this(var1, var2, var3);
}
}
}
|
[
"omadude420@gmail.com"
] |
omadude420@gmail.com
|
a416e24f57774e0581018cee37db6f835d03ca24
|
53a48fdc98b1c635552710245f5062e474066efd
|
/datagenerator/src/main/java/com/example/list/ItemList.java
|
7a021e5ac345c79b34c92116b5a9a940bf7e0bf5
|
[] |
no_license
|
kcwikizh/Akashi-Toolkit
|
0b373429706132c2b32b10dd569045dd86039993
|
ea5ac6517d626a9b07cc9a786df47a106a5a30fb
|
refs/heads/master
| 2020-12-11T03:24:25.228509
| 2018-05-18T11:09:37
| 2018-05-18T11:09:37
| 53,382,996
| 35
| 17
| null | 2018-02-27T02:16:45
| 2016-03-08T04:39:29
|
Java
|
UTF-8
|
Java
| false
| false
| 463
|
java
|
package com.example.list;
import com.example.model.Item;
import java.util.List;
/**
* Created by Rikka on 2016/4/16.
*/
public class ItemList {
public static Item findByName(String name, List<Item> list) {
for (Item item :
list) {
if (item.getName().getJa().equals(name)
|| item.getName().getZh_cn().equals(name)) {
return item;
}
}
return null;
}
}
|
[
"rikka@xing.moe"
] |
rikka@xing.moe
|
a86e0e648fa0f193106212c1db9d3051e758d626
|
2618ab1d0386bb3b9e121cde43380adbd8f8c509
|
/z_home/src/main/java/com/example/z_home/HomeItem/CircleList/CircleListView.java
|
7934e6da2fc3f96b854dd21ae1a6ef1484574603
|
[] |
no_license
|
zengwei123/ThreeEggs
|
d592159e86c3401462c2dea1f450fc2001603a67
|
2cf98d1cda25502848717cd2e426340ee207981d
|
refs/heads/master
| 2020-06-24T04:49:20.225713
| 2019-09-25T16:08:17
| 2019-09-25T16:08:17
| 198,852,558
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 510
|
java
|
package com.example.z_home.HomeItem.CircleList;
import android.support.design.widget.TabLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.z_base.BaseView;
/**
* Created by zengwei on 2019/9/8.
*/
public interface CircleListView extends BaseView{
TextView getInclude_Title_Text();
ImageView getInclude_Title_Close();
ImageView getCircleList_Search();
TabLayout getCircleList_TabLayout();
String getTitlec();
String getclassification();
}
|
[
"13085486819@163.com"
] |
13085486819@163.com
|
6a79ed98efb9778e0f26705b35cbbc56f65a58a1
|
bcf03d43318239f6242e53e0bdd3c4753c08fc79
|
/java/defpackage/hs$2$1.java
|
67851d00fe23cbfd857d88f52ad930f885034303
|
[] |
no_license
|
morristech/Candid
|
24699d45f9efb08787316154d05ad5e6a7a181a5
|
102dd9504cac407326b67ca7a36df8adf6a8b450
|
refs/heads/master
| 2021-01-22T21:07:12.067146
| 2016-12-22T18:40:30
| 2016-12-22T18:40:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 784
|
java
|
package defpackage;
import com.becandid.candid.models.NetworkData;
/* compiled from: MeHistoryFragment */
class hs$2$1 extends apj<NetworkData> {
final /* synthetic */ hs$2 a;
hs$2$1(hs$2 this$1) {
this.a = this$1;
}
public /* synthetic */ void onNext(Object obj) {
a((NetworkData) obj);
}
public void onCompleted() {
}
public void onError(Throwable e) {
}
public void a(NetworkData data) {
if (data == null || data.posts == null || data.posts.isEmpty()) {
this.a.a.c.a(null);
return;
}
this.a.a.c.b(data.posts);
if (data.next_page != 0) {
this.a.a.c.a(String.valueOf(data.next_page));
} else {
this.a.a.c.a(null);
}
}
}
|
[
"admin@timo.de.vc"
] |
admin@timo.de.vc
|
4c33757cb40f978feb90aff9bc4a5a1d0e5d5956
|
e7c3fc6b07dd3be4ebe5fc17f24c19dcb50c819b
|
/springboot-web-exam/src/main/java/com/test/exam/controller/HelloWebController.java
|
9b67d1a7246264444aaaceffb4049dcd927d8c70
|
[] |
no_license
|
Yinjiaju/Hello-World
|
8f5aa7e03ff501a8583105fd29770605f908d133
|
2baee845c1e4b0ceb094cb85d310915897142f8a
|
refs/heads/master
| 2022-07-15T04:44:55.625157
| 2021-04-20T09:47:26
| 2021-04-20T09:47:26
| 138,845,371
| 1
| 0
| null | 2022-06-29T18:11:36
| 2018-06-27T07:26:22
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 740
|
java
|
package com.test.exam.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @author yinjiaju
*
*/
@Controller
public class HelloWebController {
private final static Logger logger = LoggerFactory.getLogger(HelloWorldController.class);
@RequestMapping("/hello")
public String hello(ModelMap map) {
map.put("title", "你好");
return "index";
}
@RequestMapping("/hello1")
public String hello1(ModelMap map) {
map.put("title", "你好");
return "hello";
}
}
|
[
"Administrator@windows10.microdone.cn"
] |
Administrator@windows10.microdone.cn
|
8b91e9e078e2cda829ac68ee0b4597409e37a1ac
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithLambdas/applicationModule/src/main/java/applicationModulepackageJava7/Foo141.java
|
d028148aaf6ff93c8ea07e90d449f3c6cd9d7ee7
|
[] |
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
| 575
|
java
|
package applicationModulepackageJava7;
public class Foo141 {
public void foo0() {
final Runnable anything0 = () -> System.out.println("anything");
new applicationModulepackageJava7.Foo140().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
61197a533e290c0fca95f0ba7e95493b07fe4184
|
d7bdaadca23880af130724d2a5813d56c9148f1b
|
/TrNetCompilation/test-src/activitymigrationgeneratedfromdsltransoriginal/TrNetPat161InstancePublisher.java
|
b16975443632233f88908d2ba9cd6b8be0e67938
|
[] |
no_license
|
clagms/TrNet
|
14b957e4ba8b8fb81925ca9acf2e64bc805c12e1
|
5b14e0f0fb352b6f1bf6a684cc1d4aaa0104ab47
|
refs/heads/master
| 2021-01-01T03:41:58.483993
| 2016-04-26T14:20:22
| 2016-04-26T14:20:22
| 57,108,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 235
|
java
|
package activitymigrationgeneratedfromdsltransoriginal;
public interface TrNetPat161InstancePublisher{
public void registerListener(TrNetPat161InstanceListener listener);
public void notifyListeners(TrNetPat161Instance element);
}
|
[
"cla.gms@gmail.com"
] |
cla.gms@gmail.com
|
2c868d011928c43723c6137d5f3be4248c8230d1
|
454d0047936788909ac2b818d650eaafcac402bc
|
/net/minecraft/server/FontAllowedCharacters.java
|
6dffeed8d6abf82c06382462a4b2d0a5573c4342
|
[] |
no_license
|
Massacrer/mc-dev
|
6ddc2f6c9e3e1e1a449fb06eb642f0e7c813210e
|
5c511d8ae4bbf4fab38f4127a2b9e519c17c8ec7
|
refs/heads/master
| 2021-01-15T17:50:58.828066
| 2011-05-31T13:18:48
| 2011-05-31T13:20:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 905
|
java
|
package net.minecraft.server;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class FontAllowedCharacters {
public static final String a = a();
public static final char[] b = new char[] { '/', '\n', '\r', '\t', '\u0000', '\f', '`', '?', '*', '\\', '<', '>', '|', '\"', ':'};
public FontAllowedCharacters() {}
private static String a() {
String s = "";
try {
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(FontAllowedCharacters.class.getResourceAsStream("/font.txt"), "UTF-8"));
String s1 = "";
while ((s1 = bufferedreader.readLine()) != null) {
if (!s1.startsWith("#")) {
s = s + s1;
}
}
bufferedreader.close();
} catch (Exception exception) {
;
}
return s;
}
}
|
[
"erikbroes@grum.nl"
] |
erikbroes@grum.nl
|
3ebf76e4b79a58f55b96c937974f57286ade3f8c
|
18766de03adfcfd3a27d21e8e398de5cc8f3cc1c
|
/src/main/java/io/namjune/batch/job/processor/ProcessorConvertJobConfiguration.java
|
0b12704871fe06c274365db0b24556cdfd2d85a8
|
[] |
no_license
|
namjunemy/spring-batch-playground
|
7c5f70fee13a16a233ba0b885d48d670b2890c1a
|
3440618982e5d8d5ffb28b3fc252e97f410d995d
|
refs/heads/master
| 2020-11-25T14:36:34.534260
| 2020-02-10T13:39:16
| 2020-02-10T13:39:16
| 228,720,310
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,436
|
java
|
package io.namjune.batch.job.processor;
import io.namjune.batch.domain.Teacher;
import lombok.RequiredArgsConstructor;
import lombok.Value;
import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.JobScope;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.database.JpaPagingItemReader;
import org.springframework.batch.item.database.builder.JpaPagingItemReaderBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.persistence.EntityManagerFactory;
@Slf4j
@RequiredArgsConstructor
@Configuration
public class ProcessorConvertJobConfiguration {
public static final String JOB_NAME = "processorConvertBatch";
public static final String BEAN_PREFIX = JOB_NAME + "_";
private static final int chunkSize = 1000;
private final JobBuilderFactory jobBuilderFactory;
private final StepBuilderFactory stepBuilderFactory;
private final EntityManagerFactory emf;
@Bean(JOB_NAME)
public Job job() {
return jobBuilderFactory.get(JOB_NAME)
.preventRestart()
.start(step())
.build();
}
@Bean(BEAN_PREFIX + "step")
@JobScope
public Step step() {
return stepBuilderFactory.get(BEAN_PREFIX + "step")
.<Teacher, String>chunk(chunkSize)
.reader(reader())
.processor(processor())
.writer(writer())
.build();
}
@Bean
public JpaPagingItemReader<Teacher> reader() {
return new JpaPagingItemReaderBuilder<Teacher>()
.name(BEAN_PREFIX + "reader")
.entityManagerFactory(emf)
.pageSize(chunkSize)
.queryString("SELECT t FROM Teacher t")
.build();
}
@Bean
public ItemProcessor<Teacher, String> processor() {
return Teacher::getName;
}
private ItemWriter<String> writer() {
return items -> {
for (String item : items) {
log.info("Teacher Name={}", item);
}
};
}
}
|
[
"namjunemy@gmail.com"
] |
namjunemy@gmail.com
|
fb43d36e610c541bb94826cd4c725c368da1f053
|
087f0405ccf23cdf1a7404c1c45322aeffe8288c
|
/toptal_21_interviewQuestion/src/toptal_21_interviewQuestion/AbstractClazz.java
|
633e18cde416e059403e5cef205507fa99abf732
|
[] |
no_license
|
alamnr/Example-Code-from-Java2Novice_Toptal_JournalDev
|
863f995783ebabe8a6156800e6d468e8cc06510f
|
8fe8100bf3eb51a326f7571f9c317277062b1749
|
refs/heads/master
| 2020-03-26T19:46:21.984813
| 2018-08-23T14:39:11
| 2018-08-23T14:39:11
| 145,285,781
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,329
|
java
|
package toptal_21_interviewQuestion;
import java.net.InetAddress;
import java.net.UnknownHostException;
public abstract class AbstractClazz {
public AbstractClazz() {
System.out.println("Abstract clazz cons");
}
abstract void run();
public static class HostFinder implements Runnable{
@Override
public void run() {
// TODO Auto-generated method stub
try {
System.out.println(InetAddress.getByName("185.199.109.153").getHostName());
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public static void main(String[] args){
// blocking operation runs on separate Thread , in case of single thread (current thread) execution wait untill I/O complete
// which blocks remaining operation
Thread t = new Thread(new AbstractClazz.HostFinder() );
t.start();
/* try {
// The join() method waits for a thread to die.
t.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
*/
// remaining operation runs in current thread
System.out.println("main method");
AbstractClazz a = new AbstractClazz() {
@Override
void run() {
System.out.println("Run");
}
};
System.out.println(a.hashCode());
a.run();
}
}
|
[
"alamnr@gmail.com"
] |
alamnr@gmail.com
|
ee5215aefa1ffc17fcc0d8e355732da8274e15e9
|
24c02de80e92bb80519cc107f164809e55477746
|
/src/main/java/io/github/cdsl/cdc/bullwarz/magapp/web/rest/util/PaginationUtil.java
|
f3cae4d0f260ca4d09cf1c02503ef6ab88ffcf53
|
[] |
no_license
|
Cloud-Dragon-Studio/BullWarz
|
e31da442a796b4989b948a024ff4ac42dda42e68
|
c4f92d705ad4351dd692e6c4cb859b0564a139c5
|
refs/heads/master
| 2021-05-12T08:17:00.944576
| 2018-01-12T18:40:21
| 2018-01-12T18:40:21
| 117,274,949
| 0
| 0
| null | 2020-09-18T15:05:04
| 2018-01-12T18:30:19
|
Java
|
UTF-8
|
Java
| false
| false
| 1,757
|
java
|
package io.github.cdsl.cdc.bullwarz.magapp.web.rest.util;
import org.springframework.data.domain.Page;
import org.springframework.http.HttpHeaders;
import org.springframework.web.util.UriComponentsBuilder;
/**
* Utility class for handling pagination.
*
* <p>
* Pagination uses the same principles as the <a href="https://developer.github.com/v3/#pagination">GitHub API</a>,
* and follow <a href="http://tools.ietf.org/html/rfc5988">RFC 5988 (Link header)</a>.
*/
public final class PaginationUtil {
private PaginationUtil() {
}
public static HttpHeaders generatePaginationHttpHeaders(Page page, String baseUrl) {
HttpHeaders headers = new HttpHeaders();
headers.add("X-Total-Count", Long.toString(page.getTotalElements()));
String link = "";
if ((page.getNumber() + 1) < page.getTotalPages()) {
link = "<" + generateUri(baseUrl, page.getNumber() + 1, page.getSize()) + ">; rel=\"next\",";
}
// prev link
if ((page.getNumber()) > 0) {
link += "<" + generateUri(baseUrl, page.getNumber() - 1, page.getSize()) + ">; rel=\"prev\",";
}
// last and first link
int lastPage = 0;
if (page.getTotalPages() > 0) {
lastPage = page.getTotalPages() - 1;
}
link += "<" + generateUri(baseUrl, lastPage, page.getSize()) + ">; rel=\"last\",";
link += "<" + generateUri(baseUrl, 0, page.getSize()) + ">; rel=\"first\"";
headers.add(HttpHeaders.LINK, link);
return headers;
}
private static String generateUri(String baseUrl, int page, int size) {
return UriComponentsBuilder.fromUriString(baseUrl).queryParam("page", page).queryParam("size", size).toUriString();
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
6c2a2b27100c224db66c97c25018bdcdc11a589b
|
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
|
/src/test/java/com/magento/test/service/SalesOrderStatusStateServiceTest.java
|
bf6f83c1dd6dcd5c5e92d068516da527493b5e74
|
[] |
no_license
|
gmai2006/magentotest
|
819201760b720a90d55ef853be964651ace125ac
|
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
|
refs/heads/main
| 2023-09-03T05:14:27.788984
| 2021-10-17T06:25:09
| 2021-10-17T06:25:09
| 418,040,494
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,992
|
java
|
/**
* %% Copyright (C) 2021 DataScience 9 LLC %% 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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing permissions and
* limitations under the License. #L%
*
* <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or
* function or changes please update the templates then submit the template through our web
* interface.
*/
package com.magento.test.service;
import com.magento.test.entity.SalesOrderStatusState;
import com.magento.test.entity.SalesOrderStatusStateId;
import com.magento.test.utils.FileUtils;
import com.google.gson.JsonArray;
import com.google.gson.GsonBuilder;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Arrays;
import com.google.gson.Gson;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import com.magento.test.utils.ByteArrayToBase64TypeAdapter;
public class SalesOrderStatusStateServiceTest {
private static DefaultSalesOrderStatusStateService serviceMock;
private static SalesOrderStatusState[] records;
static Gson gson =
new GsonBuilder()
.registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter())
.setDateFormat("yyyy-MM-dd HH:mm:ss.S")
.create();
/** Run when the class is loaded. */
@BeforeClass
public static void setUp() {
serviceMock = mock(DefaultSalesOrderStatusStateService.class);
String inputFile = "SalesOrderStatusState.json";
try {
String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset());
records = gson.fromJson(json, SalesOrderStatusState[].class);
} catch (IOException ex) {
ex.printStackTrace();
}
final SalesOrderStatusStateId id =
new SalesOrderStatusStateId(records[0].getState(), records[0].getStatus());
when(serviceMock.find(id)).thenReturn(records[0]);
}
@Test
public void testFind_success() {
final SalesOrderStatusStateId id =
new SalesOrderStatusStateId(records[0].getState(), records[0].getStatus());
SalesOrderStatusState testResult = serviceMock.find(id);
org.junit.Assert.assertNotNull(testResult);
org.junit.Assert.assertTrue(
"expect equals isDefault ", records[0].getIsDefault() == testResult.getIsDefault());
org.junit.Assert.assertTrue(
"expect equals visibleOnFront ",
records[0].getVisibleOnFront() == testResult.getVisibleOnFront());
}
}
|
[
"gmai2006@gmail.com"
] |
gmai2006@gmail.com
|
5890eeee8777f99fc351c7787e45d920002d9df1
|
642057b61201fedcf895584175e47572bc6f53fd
|
/src/main/java/io/geekshop/entity/ProductOptionGroupJoinEntity.java
|
27fa4fa2ed1ef3cf19d1b50e726b2749c338fd17
|
[
"MIT"
] |
permissive
|
jjnnzb/geekshop
|
cd27eb6c42cbad3225f5c0582b0b25cfd944029e
|
1cbc352b78de89f3a1db9e9c730b82dff850ea93
|
refs/heads/main
| 2023-02-12T15:59:49.326677
| 2021-01-12T10:01:38
| 2021-01-12T10:01:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 467
|
java
|
/*
* Copyright (c) 2020 GeekXYZ.
* All rights reserved.
*/
package io.geekshop.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* Created on Nov, 2020 by @author bobo
*/
@TableName(value = "tb_product_option_group_join")
@Data
@EqualsAndHashCode(callSuper = true)
public class ProductOptionGroupJoinEntity extends BaseEntity {
private Long productId;
private Long optionGroupId;
}
|
[
"bobo@spring2go.com"
] |
bobo@spring2go.com
|
81b48e8b8b1be0b8159b6a12779f3288a2bb8ba8
|
30f66a61865458458947055888d17f53f102456d
|
/server/center/src/main/java/com/linlongyx/sanguo/webgame/proto/binary/struct/ResultPlayData.java
|
3cb2f8a22aa16329da24bf3355a5b1f0f51a4dea
|
[] |
no_license
|
NeverMoreShadowFiend/xxsg
|
0f833d963098b0d66aa1161ecefc7f6cc2fa9610
|
51b0b7620c450ab076d0e4dd362969ee0a2ecd97
|
refs/heads/master
| 2022-12-11T09:44:28.737852
| 2020-09-23T02:10:34
| 2020-09-23T02:10:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,933
|
java
|
/* */ package com.linlongyx.sanguo.webgame.proto.binary.struct;
/* */
/* */ import com.linlongyx.sanguo.webgame.proto.ProtocolUtil;
/* */ import io.netty.buffer.ByteBuf;
/* */ import java.io.Serializable;
/* */ import java.util.ArrayList;
/* */
/* */
/* */
/* */ public class ResultPlayData
/* */ implements Serializable
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ public byte targetGuid;
/* */ public byte targeAction;
/* */ public int hp;
/* 17 */ public ArrayList<Integer> atomData = new ArrayList<>();
/* */
/* */
/* */ public void serial(ByteBuf out) {
/* 21 */ ProtocolUtil.writeByte(out, this.targetGuid);
/* 22 */ ProtocolUtil.writeByte(out, this.targeAction);
/* 23 */ ProtocolUtil.writeInt(out, this.hp);
/* */
/* 25 */ int size_0 = this.atomData.size();
/* 26 */ ProtocolUtil.writeStrArraySize(out, size_0);
/* 27 */ for (int index_0 = 0; index_0 < size_0; index_0++) {
/* */
/* 29 */ int tmp_0 = ((Integer)this.atomData.get(index_0)).intValue();
/* 30 */ ProtocolUtil.writeInt(out, tmp_0);
/* */ }
/* */ }
/* */
/* */
/* */ public void unserial(ByteBuf in) {
/* 36 */ this.targetGuid = ProtocolUtil.readUTFBinByte(in);
/* 37 */ this.targeAction = ProtocolUtil.readUTFBinByte(in);
/* 38 */ this.hp = ProtocolUtil.readUTFBinInt(in);
/* */
/* 40 */ int size_0 = ProtocolUtil.readStrArraySize(in);
/* 41 */ for (int index_0 = 0; index_0 < size_0; index_0++) {
/* */
/* 43 */ int tmp_0 = ProtocolUtil.readUTFBinInt(in);
/* 44 */ this.atomData.add(Integer.valueOf(tmp_0));
/* */ }
/* */ }
/* */
/* */
/* */ public ResultPlayData clone() throws CloneNotSupportedException {
/* 50 */ ResultPlayData clone = (ResultPlayData)super.clone();
/* 51 */ int size_0 = this.atomData.size();
/* 52 */ for (int index_0 = 0; index_0 < size_0; index_0++) {
/* */
/* 54 */ int tmp_0 = ((Integer)this.atomData.get(index_0)).intValue();
/* 55 */ clone.atomData.add(Integer.valueOf(tmp_0));
/* */ }
/* 57 */ return clone;
/* */ }
/* */
/* */
/* */ public void reset() {
/* 62 */ this.targetGuid = 0;
/* 63 */ this.targeAction = 0;
/* 64 */ this.hp = 0;
/* 65 */ this.atomData.clear();
/* */ }
/* */
/* */
/* */ public String toString() {
/* 70 */ String retVal = "{\"targetGuid\":" + this.targetGuid + ",\"targeAction\":" + this.targeAction + ",\"hp\":" + this.hp + ",\"atomData\":" + this.atomData.toString() + "}";
/* 71 */ return retVal;
/* */ }
/* */ }
/* Location: D:\xxsg_52gmsy\center\target\classes\!\com\linlongyx\sanguo\webgame\proto\binary\struct\ResultPlayData.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"parasol_qian@qq.com"
] |
parasol_qian@qq.com
|
41d02b984d4133193049e52c84652d8177c6e321
|
45009e2e0a9514d33c2cb66be55c63fd9afb5c1c
|
/src/test/java/templating/LayoutTest.java
|
25ee9188e0937f8dfc8f92eca16787f761dbda68
|
[] |
no_license
|
CodeStory/code-story-planning
|
6f45d0405c94d7c9caf873972dc94acfa3e1dc7a
|
2febb630616989dc8b226e94ba7a0eadf8419abb
|
refs/heads/master
| 2020-05-24T12:48:40.227851
| 2013-03-27T22:17:04
| 2013-03-27T22:23:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package templating;
import org.junit.Test;
import static org.fest.assertions.Assertions.assertThat;
public class LayoutTest {
@Test
public void should_apply_layout() {
Layout layout = new Layout("header/[[body]]/footer");
String content = layout.apply("<body>Hello</body>");
assertThat(content).isEqualTo("header/<body>Hello</body>/footer");
}
}
|
[
"david@gageot.net"
] |
david@gageot.net
|
73d27eb04a2be896dfaa7f460eb7164b59aae77b
|
551d8fcaab0885486a2e50a3ed7dd0d0c0499049
|
/basex-tests/src/test/java/org/basex/test/qt3ts/op/OpAnyURILessThan.java
|
0069d4c176aca07274a91baa30a4cc5784d4db20
|
[
"BSD-3-Clause"
] |
permissive
|
litlfred/basex
|
4456768cd3592c2fc6627d11eb41c6bbd09fbd3a
|
4cb2dbcc03dc1c7a21989e8826b02dec555951db
|
refs/heads/master
| 2021-01-18T12:40:41.077881
| 2013-11-23T22:33:45
| 2013-11-23T22:33:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,995
|
java
|
package org.basex.test.qt3ts.op;
import org.basex.tests.bxapi.XQuery;
import org.basex.test.qt3ts.QT3TestSet;
/**
* Tests for the anyURI-less-than operator (not actually defined as such in F+O).
*
* @author BaseX Team 2005-12, BSD License
* @author Leo Woerteler
*/
@SuppressWarnings("all")
public class OpAnyURILessThan extends QT3TestSet {
/**
* Invoked 'lt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt1() {
final XQuery query = new XQuery(
"xs:anyURI(\"http://example.com/A\") lt xs:anyURI(\"http://example.com/B\")",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'lt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt2() {
final XQuery query = new XQuery(
"not(xs:anyURI(\"http://example.com/B\") lt xs:anyURI(\"http://example.com/A\"))",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'lt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt3() {
final XQuery query = new XQuery(
"xs:string(\"http://example.com/A\") lt xs:anyURI(\"http://example.com/B\")",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'lt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt4() {
final XQuery query = new XQuery(
"not(xs:anyURI(\"http://example.com/B\") lt xs:string(\"http://example.com/A\"))",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'gt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt5() {
final XQuery query = new XQuery(
"not(xs:anyURI(\"http://example.com/A\") gt xs:anyURI(\"http://example.com/B\"))",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'gt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt6() {
final XQuery query = new XQuery(
"not(xs:string(\"http://example.com/A\") gt xs:anyURI(\"http://example.com/B\"))",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'gt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt7() {
final XQuery query = new XQuery(
"xs:anyURI(\"http://example.com/B\") gt xs:anyURI(\"http://example.com/A\")",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
/**
* Invoked 'gt' on xs:anyURI values. .
*/
@org.junit.Test
public void k2AnyURILtGt8() {
final XQuery query = new XQuery(
"xs:anyURI(\"http://example.com/B\") gt xs:string(\"http://example.com/A\")",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
assertBoolean(true)
);
}
}
|
[
"leo@woerteler.de"
] |
leo@woerteler.de
|
5235a1bd85006c2741ff182ce12d8021357eb57a
|
380fc00286058f32e825738e642dfdec1dd98a5e
|
/taoZhuMa/src/main/java/com/ruiyu/taozhuma/model/ProductModel.java
|
dd9fc998b04c0600f21f42e081815ccd0132e2b5
|
[] |
no_license
|
huangbo877/TaoZhuMabase
|
b3af94d22c2d6e83fab77394ec011a93a5378286
|
b02b69e892253c8323ccfb364392ad536938108a
|
refs/heads/master
| 2021-01-10T10:12:07.400658
| 2016-02-25T06:19:24
| 2016-02-25T06:19:24
| 52,503,026
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,320
|
java
|
package com.ruiyu.taozhuma.model;
import java.io.Serializable;
import java.util.ArrayList;
/**
* 产品信息Model
*
* @author Toby
**/
@SuppressWarnings("serial")
public class ProductModel implements Serializable {
public int id;// 产品id
public String name;// 产品名称
public String video;// 视频链接
public String url;// 微淘链接
public String slates;// 月销量
public String inventory;// 库存量
public ArrayList<Attribute> attribute;// 产品详细属性
public String[] images;// 产品相册
public String imageName;// 产品缩略图
public String itemNum;// 产品型号
public int typeId;// 产品分类
public int productId;// 产品id
public String productNumber;// 购买数量
public String allPrice;// 当前购物车总价
public String price;// 商品价格
public Integer shopId;// 店铺id
public String productImage;// 商品图片
public Integer cartId;// 购物车ID
public String productName;// 商品名称
public Integer cid;// 购物车ID
// 1021
public String skuLinkId;// 产品skuid
public String skuValue;//
public String activityId;// 商品活动id
public String type;// 0-普通商品,1-秒杀商品,2-专题商品,3-活动商品
public class Attribute implements Serializable {
public String title;
public String value;
}
}
|
[
"黄博"
] |
黄博
|
87eb3c1737a25d9c2fb606e3b6a0fc41379119e1
|
c19435aface677d3de0958c7fa8b0aa7e3b759f3
|
/storage/db/src/main/java/org/artifactory/storage/db/event/dao/EventsDao.java
|
879885190cbfdd725e2e74eed30e190fd01c039c
|
[] |
no_license
|
apaqi/jfrog-artifactory-5.11.0
|
febc70674b4a7b90f37f2dfd126af36b90784c28
|
6a4204ed9ce9334d3eb7a8cb89c1d9dc72d709c1
|
refs/heads/master
| 2020-03-18T03:13:41.286825
| 2018-05-21T06:57:30
| 2018-05-21T06:57:30
| 134,229,368
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,472
|
java
|
/*
*
* Artifactory is a binaries repository manager.
* Copyright (C) 2016 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Artifactory 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Artifactory. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.artifactory.storage.db.event.dao;
import com.google.common.collect.Lists;
import org.artifactory.storage.db.event.entity.EventRecord;
import org.artifactory.storage.db.util.BaseDao;
import org.artifactory.storage.db.util.JdbcHelper;
import org.artifactory.storage.event.EventType;
import org.jfrog.storage.util.DbUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax.annotation.Nonnull;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
/**
* A data access object for the events table.
*
* @author Yossi Shaul
*/
@Repository
public class EventsDao extends BaseDao {
@Autowired
public EventsDao(JdbcHelper jdbcHelper) {
super(jdbcHelper);
}
public void create(EventRecord e) throws SQLException {
jdbcHelper.executeUpdate("INSERT INTO node_events " +
"(event_id, timestamp, event_type, path) VALUES(?, ?, ?, ?)",
e.getEventId(), e.getTimestamp(), e.getType().code(), e.getPath());
}
/**
* Loads all the events newer from the given timestamp
*
* @param timestamp Timestamp in millis
* @return Events newer than the given timestamp ordered by timestamp
*/
@Nonnull
public List<EventRecord> loadNewer(long timestamp, String repoKey) throws SQLException {
return loadEventsSince(timestamp, repoKey, false);
}
/**
* Loads all the events newer or same as the given timestamp
*
* @param timestamp Timestamp in millis
* @return Events newer than the given timestamp ordered by timestamp
*/
public List<EventRecord> loadNewerOrSame(long timestamp, String repoKey) throws SQLException {
return loadEventsSince(timestamp, repoKey, true);
}
@Nonnull
private List<EventRecord> loadEventsSince(long timestamp, String repoKey, boolean inclusive) throws SQLException {
ResultSet rs = null;
try {
String comparator = inclusive ? ">=" : ">"; // whether to include or not events with the same timestamp
List<EventRecord> entries = Lists.newArrayList();
rs = jdbcHelper.executeSelect("SELECT * FROM node_events " +
"WHERE timestamp " + comparator + " ? " +
"AND path like ? " +
"ORDER BY timestamp ASC, event_id ASC", timestamp, repoKey + "/%");
while (rs.next()) {
entries.add(eventFromResultSet(rs));
}
return entries;
} finally {
DbUtils.close(rs);
}
}
public long getEventsCount() throws SQLException {
return jdbcHelper.executeSelectCount("SELECT COUNT(*) FROM node_events");
}
public List<EventRecord> loadAll() throws SQLException {
ResultSet rs = null;
try {
List<EventRecord> entries = Lists.newArrayList();
rs = jdbcHelper.executeSelect("SELECT * FROM node_events ORDER BY timestamp ASC, event_id ASC");
while (rs.next()) {
entries.add(eventFromResultSet(rs));
}
return entries;
} finally {
DbUtils.close(rs);
}
}
/**
* Delete all events from the event log. Internal use only!
*/
public void deleteAll() throws SQLException {
jdbcHelper.executeUpdate("DELETE FROM node_events");
}
private EventRecord eventFromResultSet(ResultSet rs) throws SQLException {
return new EventRecord(rs.getLong("event_id"), rs.getLong("timestamp"),
EventType.fromCode(rs.getShort("event_type")), rs.getString("path"));
}
}
|
[
"wangpeixuan00@126.com"
] |
wangpeixuan00@126.com
|
be045d5e87a004a6bf1eeae52e648a788cf7ccc3
|
c4623aa95fb8cdd0ee1bc68962711c33af44604e
|
/src/com/yelp/android/ui/activities/mediagrid/ActivityBusinessMediaGrid.java
|
7fff7afac628706bccf3e4ffde137f1499b1f540
|
[] |
no_license
|
reverseengineeringer/com.yelp.android
|
48f7f2c830a3a1714112649a6a0a3110f7bdc2b1
|
b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8
|
refs/heads/master
| 2021-01-19T02:07:25.997811
| 2016-07-19T16:37:24
| 2016-07-19T16:37:24
| 38,555,675
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,642
|
java
|
package com.yelp.android.ui.activities.mediagrid;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.l;
import android.support.v4.app.o;
import android.view.Menu;
import android.view.MenuInflater;
import com.yelp.android.analytics.iris.EventIri;
import com.yelp.android.analytics.iris.IriSource;
import com.yelp.android.analytics.iris.ViewIri;
import com.yelp.android.analytics.iris.a;
import com.yelp.android.appdata.AppData;
import com.yelp.android.appdata.webrequests.ApiRequest;
import com.yelp.android.appdata.webrequests.ApiRequest.b;
import com.yelp.android.appdata.webrequests.BusinessMediaRequest;
import com.yelp.android.appdata.webrequests.MediaRequest;
import com.yelp.android.appdata.webrequests.YelpException;
import com.yelp.android.appdata.webrequests.af;
import com.yelp.android.serializable.Media;
import com.yelp.android.serializable.MediaCategory;
import com.yelp.android.serializable.MediaPayload;
import com.yelp.android.serializable.YelpBusiness;
import com.yelp.android.ui.activities.ActivityLogin;
import com.yelp.android.ui.activities.addphoto.PhotoTeaser;
import com.yelp.android.ui.activities.photoviewer.ActivityBusinessMediaViewer;
import com.yelp.android.ui.activities.support.YelpActivity;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
public class ActivityBusinessMediaGrid
extends YelpActivity
implements AbstractMediaGridFragment.a, TabbedMediaGridFragment.a
{
private TabbedMediaGridFragment a;
private MediaRequest b;
private af c;
private ArrayList<Media> d;
private String e;
private ApiRequest.b<List<YelpBusiness>> f = new ApiRequest.b()
{
public void a(ApiRequest<?, ?, ?> paramAnonymousApiRequest, List<YelpBusiness> paramAnonymousList)
{
disableLoading();
ActivityBusinessMediaGrid.a(ActivityBusinessMediaGrid.this, (YelpBusiness)paramAnonymousList.get(0), ActivityBusinessMediaGrid.a(ActivityBusinessMediaGrid.this), ActivityBusinessMediaGrid.b(ActivityBusinessMediaGrid.this));
}
public void onError(ApiRequest<?, ?, ?> paramAnonymousApiRequest, YelpException paramAnonymousYelpException)
{
disableLoading();
populateError(paramAnonymousYelpException);
}
};
public static Intent a(Context paramContext, YelpBusiness paramYelpBusiness, MediaRequest paramMediaRequest, int paramInt)
{
return a(paramContext, paramYelpBusiness, new ArrayList(), paramMediaRequest, paramInt);
}
public static Intent a(Context paramContext, YelpBusiness paramYelpBusiness, ArrayList<Media> paramArrayList, MediaRequest paramMediaRequest, int paramInt)
{
return a(paramContext, paramArrayList, paramMediaRequest, paramInt).putExtra("business", paramYelpBusiness);
}
public static Intent a(Context paramContext, String paramString, MediaRequest paramMediaRequest, int paramInt)
{
return a(paramContext, new ArrayList(), paramMediaRequest, paramInt).putExtra("business_id", paramString);
}
private static Intent a(Context paramContext, ArrayList<Media> paramArrayList, MediaRequest paramMediaRequest, int paramInt)
{
paramArrayList = new ArrayList(paramArrayList);
paramArrayList.subList(Math.min(paramArrayList.size(), 200), paramArrayList.size()).clear();
paramContext = new Intent(paramContext, ActivityBusinessMediaGrid.class);
paramContext.putExtra("media_request", paramMediaRequest);
paramContext.putExtra("title", paramInt);
paramContext.putExtra("media_list", paramArrayList);
return paramContext;
}
private void a(YelpBusiness paramYelpBusiness, MediaRequest paramMediaRequest, ArrayList<Media> paramArrayList)
{
a = ((TabbedMediaGridFragment)getSupportFragmentManager().a(2131689997));
if (a == null)
{
a = TabbedMediaGridFragment.a(paramYelpBusiness, paramMediaRequest, paramArrayList);
getSupportFragmentManager().a().b(2131689997, a).a();
}
}
public MediaRequest a(YelpBusiness paramYelpBusiness, MediaCategory paramMediaCategory, ApiRequest.b<MediaPayload> paramb)
{
return new BusinessMediaRequest(paramYelpBusiness.aD(), paramMediaCategory.e(), paramMediaCategory.b(), 20, paramb);
}
public void a(YelpBusiness paramYelpBusiness, ArrayList<Media> paramArrayList, MediaRequest paramMediaRequest, int paramInt1, int paramInt2)
{
startActivityFromFragment(a, ActivityBusinessMediaViewer.a(this, paramYelpBusiness, paramArrayList, paramMediaRequest, paramInt1, paramInt2), 1070);
}
public void a(YelpBusiness paramYelpBusiness, boolean paramBoolean)
{
if (paramBoolean) {
AppData.a(EventIri.BusinessMorePhotosAddPhoto);
}
for (;;)
{
startActivity(ActivityLogin.a(this, 2131165695, 2131166094, PhotoTeaser.a(this, paramYelpBusiness)));
return;
Map localMap = IriSource.PhotoGridCell.getMapWithParameter();
localMap.put("business_id", paramYelpBusiness.aD());
AppData.a(EventIri.BusinessAddPhoto, localMap);
}
}
public ViewIri getIri()
{
return ViewIri.BusinessPhotosGrid;
}
public Map<String, Object> getParametersForIri(a parama)
{
return Collections.singletonMap("id", e);
}
protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
paramBundle = getIntent();
setTitle(paramBundle.getIntExtra("title", 2131166349));
YelpBusiness localYelpBusiness = (YelpBusiness)paramBundle.getParcelableExtra("business");
String str = paramBundle.getStringExtra("business_id");
b = ((MediaRequest)paramBundle.getParcelableExtra("media_request"));
d = paramBundle.getParcelableArrayListExtra("media_list");
if (localYelpBusiness != null)
{
e = localYelpBusiness.aD();
a(localYelpBusiness, b, d);
return;
}
if (str != null)
{
e = str;
enableLoading();
c = new af(str, f);
c.f(new Void[0]);
return;
}
throw new IllegalStateException("We must be provided with a business or a bizId to create a media grid");
}
public boolean onCreateOptionsMenu(Menu paramMenu)
{
super.onCreateOptionsMenu(paramMenu);
getMenuInflater().inflate(2131755050, paramMenu);
return true;
}
protected void onPause()
{
super.onPause();
freezeRequest("business_info", c);
}
protected void onResume()
{
super.onResume();
c = ((af)thawRequest("business_info", c, f));
}
}
/* Location:
* Qualified Name: com.yelp.android.ui.activities.mediagrid.ActivityBusinessMediaGrid
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
a51fccd4ed2d8a68fc361def2d5978a6d0236f7b
|
6816f603e920677b6b1094270909efd68fb5f767
|
/Compilador R/Compilador R/src/CompiladorConstants.java
|
4fdd734297d5c44bc67b403edd92a8652747dc02
|
[] |
no_license
|
LuisEnriqueSosaHernandez/Automatas-Compilador
|
f7f4a147a2a6ff830c8019f2b3fc7bc14fb6f4bc
|
6a49b5f34b2d838d9ac250f1bb549454b55a6606
|
refs/heads/master
| 2021-01-25T01:03:29.035351
| 2018-03-04T21:38:13
| 2018-03-04T21:38:13
| 94,718,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,555
|
java
|
/* Generated By:JavaCC: Do not edit this line. CompiladorConstants.java */
/**
* Token literal values and constants.
* Generated by org.javacc.parser.OtherFilesGen#start()
*/
public interface CompiladorConstants {
/** End of File. */
int EOF = 0;
/** RegularExpression Id. */
int si = 5;
/** RegularExpression Id. */
int sino = 6;
/** RegularExpression Id. */
int elegir = 7;
/** RegularExpression Id. */
int caso = 8;
/** RegularExpression Id. */
int salir = 9;
/** RegularExpression Id. */
int falta = 10;
/** RegularExpression Id. */
int in = 11;
/** RegularExpression Id. */
int ent = 12;
/** RegularExpression Id. */
int flot = 13;
/** RegularExpression Id. */
int cad = 14;
/** RegularExpression Id. */
int bool = 15;
/** RegularExpression Id. */
int mode = 16;
/** RegularExpression Id. */
int ls = 17;
/** RegularExpression Id. */
int history = 18;
/** RegularExpression Id. */
int ayuda = 19;
/** RegularExpression Id. */
int help = 20;
/** RegularExpression Id. */
int print = 21;
/** RegularExpression Id. */
int rm = 22;
/** RegularExpression Id. */
int function = 23;
/** RegularExpression Id. */
int mientras = 24;
/** RegularExpression Id. */
int hasta = 25;
/** RegularExpression Id. */
int hacer = 26;
/** RegularExpression Id. */
int enojo = 27;
/** RegularExpression Id. */
int palito = 28;
/** RegularExpression Id. */
int grados = 29;
/** RegularExpression Id. */
int admira1 = 30;
/** RegularExpression Id. */
int admira2 = 31;
/** RegularExpression Id. */
int pesos = 32;
/** RegularExpression Id. */
int porciento = 33;
/** RegularExpression Id. */
int amperson = 34;
/** RegularExpression Id. */
int comilla1 = 35;
/** RegularExpression Id. */
int abrepregunta = 36;
/** RegularExpression Id. */
int comilla2 = 37;
/** RegularExpression Id. */
int comilla3 = 38;
/** RegularExpression Id. */
int dospuntosarriba = 39;
/** RegularExpression Id. */
int culebrita = 40;
/** RegularExpression Id. */
int guionbajo = 41;
/** RegularExpression Id. */
int abreparentesis = 42;
/** RegularExpression Id. */
int cierraparentesis = 43;
/** RegularExpression Id. */
int abrellave = 44;
/** RegularExpression Id. */
int cierrallave = 45;
/** RegularExpression Id. */
int abrecorchete = 46;
/** RegularExpression Id. */
int cierracorchete = 47;
/** RegularExpression Id. */
int comillas = 48;
/** RegularExpression Id. */
int gatito = 49;
/** RegularExpression Id. */
int puntocoma = 50;
/** RegularExpression Id. */
int punto = 51;
/** RegularExpression Id. */
int coma = 52;
/** RegularExpression Id. */
int dospuntos = 53;
/** RegularExpression Id. */
int suma = 54;
/** RegularExpression Id. */
int resta = 55;
/** RegularExpression Id. */
int multiplicar = 56;
/** RegularExpression Id. */
int dividir = 57;
/** RegularExpression Id. */
int modulo = 58;
/** RegularExpression Id. */
int modulodos = 59;
/** RegularExpression Id. */
int potencia = 60;
/** RegularExpression Id. */
int y = 61;
/** RegularExpression Id. */
int o = 62;
/** RegularExpression Id. */
int menor = 63;
/** RegularExpression Id. */
int mayor = 64;
/** RegularExpression Id. */
int menorigual = 65;
/** RegularExpression Id. */
int mayorigual = 66;
/** RegularExpression Id. */
int igual = 67;
/** RegularExpression Id. */
int diferente = 68;
/** RegularExpression Id. */
int asignacion = 69;
/** RegularExpression Id. */
int asignaciondos = 70;
/** RegularExpression Id. */
int aumento = 71;
/** RegularExpression Id. */
int decremento = 72;
/** RegularExpression Id. */
int num = 73;
/** RegularExpression Id. */
int flotante = 74;
/** RegularExpression Id. */
int booleano = 75;
/** RegularExpression Id. */
int nulo = 76;
/** RegularExpression Id. */
int unicodeMin = 77;
/** RegularExpression Id. */
int unicodeMay = 78;
/** RegularExpression Id. */
int unicodeSimb = 79;
/** RegularExpression Id. */
int cadena = 80;
/** RegularExpression Id. */
int comentario = 81;
/** RegularExpression Id. */
int ident = 82;
/** Lexical state. */
int DEFAULT = 0;
/** Literal token values. */
String[] tokenImage = {
"<EOF>",
"\"\\t\"",
"\"\\r\"",
"\" \"",
"\"\\n\"",
"<si>",
"<sino>",
"<elegir>",
"<caso>",
"<salir>",
"<falta>",
"<in>",
"<ent>",
"<flot>",
"<cad>",
"<bool>",
"<mode>",
"<ls>",
"<history>",
"\"?\"",
"<help>",
"<print>",
"<rm>",
"<function>",
"<mientras>",
"<hasta>",
"<hacer>",
"\"\\u00ac\"",
"\"|\"",
"\"\\u00b0\"",
"\"!\"",
"\"\\u00a1\"",
"\"$\"",
"\"%\"",
"\"&\"",
"\"\\\'\"",
"\"\\u00bf\"",
"\"\\u00b4\"",
"\"`\"",
"\"\\u00a8\"",
"\"~\"",
"\"_\"",
"\"(\"",
"\")\"",
"\"{\"",
"\"}\"",
"\"[\"",
"\"]\"",
"\"\\\"\"",
"\"#\"",
"\";\"",
"\".\"",
"\",\"",
"\":\"",
"\"+\"",
"\"-\"",
"\"*\"",
"\"/\"",
"\"%%\"",
"\"%/%\"",
"\"^\"",
"\"&&\"",
"\"||\"",
"\"<\"",
"\">\"",
"\"<=\"",
"\">=\"",
"\"==\"",
"\"!=\"",
"\"=\"",
"\"<-\"",
"\"++\"",
"\"--\"",
"<num>",
"<flotante>",
"<booleano>",
"\"null\"",
"<unicodeMin>",
"<unicodeMay>",
"<unicodeSimb>",
"<cadena>",
"<comentario>",
"<ident>",
};
}
|
[
"kiquesasuke@gmail.com"
] |
kiquesasuke@gmail.com
|
3c916a9740ca5fa54fbe097403f1af2456c8febf
|
cde01c2d50ccf0be51d31fb54fd865ef01c92ff1
|
/oficinaProgramacao/src/cap3/Janela2.java
|
a066245a48c12991ab85a7c0dcd8ef82df06c3ea
|
[] |
no_license
|
dvsilva/oficinaProgramacao
|
dd515ed5912661d552cffac2c69d56c0ec663343
|
3e32fe1535dbc72b91cc5e3b472000e38a02ff30
|
refs/heads/master
| 2021-01-11T15:08:21.766502
| 2017-01-28T17:02:17
| 2017-01-28T17:02:17
| 80,297,148
| 0
| 0
| null | null | null | null |
WINDOWS-1250
|
Java
| false
| false
| 773
|
java
|
package cap3;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class Janela2 extends JFrame {
private JPanel contentPane;
private JLabel rotulo1;
private JLabel rotulo2;
private JLabel rotulo3;
public Janela2() {
super("Exemplo 2 de Janela");
setBounds(100, 50, 270, 200);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
contentPane = new JPanel();
getContentPane().setLayout(null);
rotulo1 = new JLabel("LOGIN NO SISTEMA");
rotulo1.setBounds(80, 20, 120, 20);
add(rotulo1);
rotulo2 = new JLabel("Usuário:");
rotulo2.setBounds(20, 60, 100, 20);
add(rotulo2);
rotulo3 = new JLabel("Senha:");
rotulo3.setBounds(20, 90, 100, 20);
add(rotulo3);
}
}
|
[
"danyllo.dvs@gmail.com"
] |
danyllo.dvs@gmail.com
|
561ed369815ed14ac2b459e75796f55dd3802701
|
7a2b2ef412e7f51320d8543b831aad9dfd37760b
|
/resource-bundles-domain/src/main/java/de/alpharogroup/db/resource/bundles/mapper/LanguagesMapper.java
|
c4c552e7112220ed76f1a726a5631d7d96719e40
|
[
"MIT"
] |
permissive
|
lightblueseas/resource-bundles-data
|
22884fe8217456b7f920f736cce4d62c4703fb23
|
4ae10c478f6167d50e902ebe35176bb859f69fd7
|
refs/heads/develop
| 2023-03-19T04:25:11.698444
| 2019-09-14T13:54:24
| 2019-09-14T13:54:24
| 45,053,612
| 6
| 2
| null | 2017-07-11T15:17:09
| 2015-10-27T16:18:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,590
|
java
|
/**
* The MIT License
*
* Copyright (C) 2007 - 2015 Asterios Raptis
*
* 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 de.alpharogroup.db.resource.bundles.mapper;
import org.springframework.stereotype.Component;
import de.alpharogroup.db.entitymapper.AbstractEntityDOMapper;
import de.alpharogroup.db.resource.bundles.domain.Language;
import de.alpharogroup.db.resource.bundles.entities.Languages;
/**
* The class {@link LanguagesMapper}.
*/
@Component
public class LanguagesMapper extends AbstractEntityDOMapper<Languages, Language>
{
}
|
[
"asterios.raptis@gmx.net"
] |
asterios.raptis@gmx.net
|
26a393a1b573875d6f4b0815ede85d948e0ee2cb
|
6a95484a8989e92db07325c7acd77868cb0ac3bc
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201409/cm/AdGroupFeedReturnValue.java
|
51384befc2107b4319af64dcfd1006271eabb47e
|
[
"Apache-2.0"
] |
permissive
|
popovsh6/googleads-java-lib
|
776687dd86db0ce785b9d56555fe83571db9570a
|
d3cabb6fb0621c2920e3725a95622ea934117daf
|
refs/heads/master
| 2020-04-05T23:21:57.987610
| 2015-03-12T19:59:29
| 2015-03-12T19:59:29
| 33,672,406
| 1
| 0
| null | 2015-04-09T14:06:00
| 2015-04-09T14:06:00
| null |
UTF-8
|
Java
| false
| false
| 4,814
|
java
|
/**
* AdGroupFeedReturnValue.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201409.cm;
/**
* The result of a call to AdGroupFeedService#mutate.
*/
public class AdGroupFeedReturnValue extends com.google.api.ads.adwords.axis.v201409.cm.ListReturnValue implements java.io.Serializable {
/* The resulting AdGroupFeeds. */
private com.google.api.ads.adwords.axis.v201409.cm.AdGroupFeed[] value;
public AdGroupFeedReturnValue() {
}
public AdGroupFeedReturnValue(
java.lang.String listReturnValueType,
com.google.api.ads.adwords.axis.v201409.cm.AdGroupFeed[] value) {
super(
listReturnValueType);
this.value = value;
}
/**
* Gets the value value for this AdGroupFeedReturnValue.
*
* @return value * The resulting AdGroupFeeds.
*/
public com.google.api.ads.adwords.axis.v201409.cm.AdGroupFeed[] getValue() {
return value;
}
/**
* Sets the value value for this AdGroupFeedReturnValue.
*
* @param value * The resulting AdGroupFeeds.
*/
public void setValue(com.google.api.ads.adwords.axis.v201409.cm.AdGroupFeed[] value) {
this.value = value;
}
public com.google.api.ads.adwords.axis.v201409.cm.AdGroupFeed getValue(int i) {
return this.value[i];
}
public void setValue(int i, com.google.api.ads.adwords.axis.v201409.cm.AdGroupFeed _value) {
this.value[i] = _value;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof AdGroupFeedReturnValue)) return false;
AdGroupFeedReturnValue other = (AdGroupFeedReturnValue) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.value==null && other.getValue()==null) ||
(this.value!=null &&
java.util.Arrays.equals(this.value, other.getValue())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getValue() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(getValue());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(getValue(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(AdGroupFeedReturnValue.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201409", "AdGroupFeedReturnValue"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("value");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201409", "value"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201409", "AdGroupFeed"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setMaxOccursUnbounded(true);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
f685d4230bd26aac373e9efaa5433a4435487223
|
546ecd59d4e919d8c69a194b2199728ea8af1fce
|
/gameserver/src/com/aionemu/gameserver/dataholders/GatherableData.java
|
04c46acabdb4de84aef6c8fb09660adc2217533a
|
[] |
no_license
|
pandim/aion_unique
|
f56faa52b08d69ca1bc2f9721c77dc111dca2293
|
6b357703e331611e668229471e8409c4e4f7294f
|
refs/heads/master
| 2021-02-04T20:07:02.003416
| 2014-05-08T05:24:10
| 2014-05-08T05:24:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,080
|
java
|
/*
* This file is part of aion-unique <aion-unique.com>.
*
* aion-unique is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.dataholders;
import gnu.trove.TIntObjectHashMap;
import java.util.List;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.aionemu.gameserver.model.templates.GatherableTemplate;
/**
* @author ATracer
*/
@XmlRootElement(name = "gatherable_templates")
@XmlAccessorType(XmlAccessType.FIELD)
public class GatherableData
{
@XmlElement(name = "gatherable_template")
private List<GatherableTemplate> gatherables;
/** A map containing all npc templates */
private TIntObjectHashMap<GatherableTemplate> gatherableData = new TIntObjectHashMap<GatherableTemplate>();
void afterUnmarshal(Unmarshaller u, Object parent)
{
for(GatherableTemplate gatherable: gatherables)
{
gatherableData.put(gatherable.getTemplateId(), gatherable);
}
gatherables = null;
}
public int size()
{
return gatherableData.size();
}
/**
/**
* Returns an {@link GatherableTemplate} object with given id.
*
* @param id id of GatherableTemplate
*
* @return GatherableTemplate object containing data about Gatherable with that id.
*/
public GatherableTemplate getGatherableTemplate(int id)
{
return gatherableData.get(id);
}
}
|
[
"jingxin191314@foxmail.com"
] |
jingxin191314@foxmail.com
|
4bf946e4c8e98125a7cb0fd1c87e157ab3fdd703
|
3fc82d46e7401074525ef9e8096693e7c0da4b21
|
/app/src/main/java/com/alorma/github/sdk/services/gtignore/GitIgnoreService.java
|
5ef4ac6f605c92f56005e65ce3794c75e4bb931d
|
[
"MIT"
] |
permissive
|
PlexPt/Gitskarios
|
16946fe88f6853abdcc4f813841cdfb5b712cbc8
|
b3bf9bc0ba17a5f11c3afad666b13a44a9cc7286
|
refs/heads/develop
| 2022-03-10T15:08:55.521325
| 2016-08-01T18:49:43
| 2016-08-01T18:49:43
| 65,427,548
| 0
| 0
|
MIT
| 2019-05-13T12:07:21
| 2016-08-11T01:14:58
|
Java
|
UTF-8
|
Java
| false
| false
| 330
|
java
|
package com.alorma.github.sdk.services.gtignore;
import com.alorma.github.sdk.bean.dto.response.GitIgnoreTemplates;
import retrofit.http.GET;
import rx.Observable;
/**
* Created by Bernat on 28/09/2014.
*/
public interface GitIgnoreService {
//Sync
@GET("/gitignore/templates")
Observable<GitIgnoreTemplates> list();
}
|
[
"bernatbor15@gmail.com"
] |
bernatbor15@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.