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
fff28ddadf4109cbaa10dfa27113b33961ea6da6
f7c350e574951da8674d9246a29a11934687fd07
/bootique/src/main/java/io/bootique/config/jackson/JsonNodeConfigurationFactory.java
46977d9a378b4177eabc41184068dceab554e66d
[ "Apache-2.0" ]
permissive
ArsenalFanNanning/bootique
b8f2d6cd755fcbed83677568dd2f8e8505154e7d
d32524bfea1ecb90be163be4daf1a8739a3b5e5f
refs/heads/master
2020-03-19T07:20:20.299151
2018-05-29T14:29:52
2018-05-29T14:29:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,975
java
package io.bootique.config.jackson; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.TreeTraversingParser; import com.fasterxml.jackson.databind.type.TypeFactory; import io.bootique.config.ConfigurationFactory; import io.bootique.type.TypeRef; import java.io.IOException; /** * {@link ConfigurationFactory} based on Jackson {@link JsonNode} data * structure. The actual configuration can come from JSON, YAML, XML, etc. * * @since 0.17 */ public class JsonNodeConfigurationFactory implements ConfigurationFactory { private JsonNode rootNode; private ObjectMapper mapper; private TypeFactory typeFactory; public JsonNodeConfigurationFactory(JsonNode rootConfigNode, ObjectMapper objectMapper) { this.typeFactory = TypeFactory.defaultInstance(); this.mapper = objectMapper; this.rootNode = rootConfigNode; } @Override public <T> T config(Class<T> type, String prefix) { JsonNode child = findChild(prefix); try { return mapper.readValue(new TreeTraversingParser(child, mapper), type); } // TODO: implement better exception handling. See ConfigurationFactory // in Dropwizard for inspiration catch (IOException e) { throw new RuntimeException("Error creating config", e); } } @Override public <T> T config(TypeRef<? extends T> type, String prefix) { JsonNode child = findChild(prefix); JavaType jacksonType = typeFactory.constructType(type.getType()); try { return mapper.readValue(new TreeTraversingParser(child, mapper), jacksonType); } // TODO: implement better exception handling. See ConfigurationFactory // in Dropwizard for inspiration catch (IOException e) { throw new RuntimeException("Error creating config", e); } } protected JsonNode findChild(String path) { // assuming prefix is case-insensitive. This allows prefixes that are defined in the shell vars and nowhere // else... // TODO: this also makes YAML prefix case-insensitive, and the whole config more ambiguous, which is less than // ideal. Perhaps we can freeze prefix case for YAMLs by starting with a synthetic JsonNode based on the prefix // and then overlay CS config (YAML) only then - CI config (vars)? This will require deep refactoring. Also // we will need to know the type of the root JsonNode (String vs Object vs List, etc.) // or we just make it case-sensitive like the rest of the config... return CiPropertySegment .create(rootNode, path) .lastPathComponent().map(t -> t.getNode()) .orElse(new ObjectNode(null)); } }
[ "andrus@objectstyle.com" ]
andrus@objectstyle.com
b080ec39d7411861890ecbfbdac0e0b2d8364751
ad64a14fac1f0d740ccf74a59aba8d2b4e85298c
/linkwee-supermarket/src/main/java/com/linkwee/web/service/SmNewsService.java
02e4d6f793265c0d6a4ee3bf54149c61d004fa6c
[]
no_license
zhangjiayin/supermarket
f7715aa3fdd2bf202a29c8683bc9322b06429b63
6c37c7041b5e1e32152e80564e7ea4aff7128097
refs/heads/master
2020-06-10T16:57:09.556486
2018-10-30T07:03:15
2018-10-30T07:03:15
193,682,975
0
1
null
2019-06-25T10:03:03
2019-06-25T10:03:03
null
UTF-8
Java
false
false
1,427
java
package com.linkwee.web.service; import java.util.List; import com.linkwee.api.request.NewsPageListRequest; import com.linkwee.core.base.api.PaginatorResponse; import com.linkwee.core.datatable.DataTable; import com.linkwee.core.datatable.DataTableReturn; import com.linkwee.core.generic.GenericService; import com.linkwee.core.orm.paging.Page; import com.linkwee.web.model.SmNews; /** * * @描述: SmNewsService服务接口 * * @创建人: Mignet * * @创建时间:2016年07月27日 19:22:57 * * Copyright (c) 深圳领会科技有限公司-版权所有 */ public interface SmNewsService extends GenericService<SmNews,Long>{ /** * 查询SmNews列表,为data-tables封装 * @param dataTable * @return */ DataTableReturn selectByDatatables(DataTable dataTable); /** * 根据id查询资讯记录 * @param fid * @return */ public SmNews findNewsDtl(String fid); /** * 查询资讯翻页 * @param newsPageListRequest * @param page * @return */ PaginatorResponse<SmNews> queryNewsPageList(NewsPageListRequest newsPageListRequest, Page<SmNews> page); /** * 查询最新的资讯 * @param appType * @return */ SmNews queryNewest(Integer appType); /** * 首页置顶的热门资讯top2 * @param newsPageListRequest * @return */ List<SmNews> queryTop(NewsPageListRequest newsPageListRequest); }
[ "liqimoon@qq.com" ]
liqimoon@qq.com
7605f0ac487e2d215f788c7b610afe2df5648698
1b496b05fab9b9bcc6d7f9027d343058f8ef91a6
/src/main/java/com/qwit/amqp/ProtocolRequest.java
edb0ff637035601ddbe1fc0b6672249db14b7102
[]
no_license
romanm/treatment-plan2
9741f4e84224690f1c81b4f6bd67a477b34625f3
5a856881c2821ffbb684bbdaa34ab6799067ed4a
refs/heads/master
2021-01-25T04:58:02.466599
2014-03-23T18:40:47
2014-03-23T18:40:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
package com.qwit.amqp; import java.io.Serializable; public class ProtocolRequest implements Serializable { private static final long serialVersionUID = 1L; public ProtocolRequest(Integer idDoc) { setIdDoc(idDoc); } Integer idDoc; public Integer getIdDoc() { return idDoc; } public void setIdDoc(Integer idDoc) { this.idDoc = idDoc; } @Override public String toString() { return "idDoc=" + idDoc; } }
[ "roman.mishchenko@gmail.com" ]
roman.mishchenko@gmail.com
3bd9914688c94b5264c85ad7ed0a8dee9e02c79b
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/domain/AlipayDataDataserviceBillDownloadurlQueryModel.java
7740bff4fc42007a1fe2a72c683ba5c43e0c314d
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
1,309
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 无授权模式的查询对账单下载地址 * * @author auto create * @since 1.0, 2019-07-18 16:51:16 */ public class AlipayDataDataserviceBillDownloadurlQueryModel extends AlipayObject { private static final long serialVersionUID = 8396147338399618436L; /** * 账单时间:日账单格式为yyyy-MM-dd,最早可下载2016年1月1日开始的日账单;月账单格式为yyyy-MM,最早可下载2016年1月开始的月账单。 */ @ApiField("bill_date") private String billDate; /** * 账单类型,商户通过接口或商户经开放平台授权后其所属服务商通过接口可以获取以下账单类型:trade、signcustomer;trade指商户基于支付宝交易收单的业务账单;signcustomer是指基于商户支付宝余额收入及支出等资金变动的帐务账单。 */ @ApiField("bill_type") private String billType; public String getBillDate() { return this.billDate; } public void setBillDate(String billDate) { this.billDate = billDate; } public String getBillType() { return this.billType; } public void setBillType(String billType) { this.billType = billType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
108841a482faf90378ae03a2082937d9634abc5b
9122cf28169b2d053a26e5d5cefacda018fb95b9
/algorithm/dynamic-programming/src/main/java/com/wfs/dynamicprogramming/BooleanParenthesizationProblem.java
615f44415937cc27af66ba78cd8b149249643ad9
[]
no_license
siddhantaws/DataStructure-Algorithm
661f8ab75bcb2d5c68616b1e71a25e459b6a797a
cbd5398f24e075320eedcb7a83807954509e9467
refs/heads/master
2023-04-08T03:32:31.791195
2023-03-19T13:26:42
2023-03-19T13:26:42
88,467,251
1
1
null
2022-05-16T17:39:19
2017-04-17T04:13:41
Java
UTF-8
Java
false
false
131
java
package com.wfs.dynamicprogramming; /** * @author Siddhanta Kumar Pattnaik */ public class BooleanParenthesizationProblem { }
[ "siddhantaws@gmail.com" ]
siddhantaws@gmail.com
fb880a6beed1051eb7b6f104608256746e5fe80f
29b6a856a81a47ebab7bfdba7fe8a7b845123c9e
/dingtalk/java/src/main/java/com/aliyun/dingtalkorg_culture_1_0/models/QueryPointAutoIssueSettingResponseBody.java
42caaaefc245c73174115db57100060d6a9a4a9b
[ "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
2,532
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dingtalkorg_culture_1_0.models; import com.aliyun.tea.*; public class QueryPointAutoIssueSettingResponseBody extends TeaModel { @NameInMap("result") public QueryPointAutoIssueSettingResponseBodyResult result; @NameInMap("success") public Boolean success; public static QueryPointAutoIssueSettingResponseBody build(java.util.Map<String, ?> map) throws Exception { QueryPointAutoIssueSettingResponseBody self = new QueryPointAutoIssueSettingResponseBody(); return TeaModel.build(map, self); } public QueryPointAutoIssueSettingResponseBody setResult(QueryPointAutoIssueSettingResponseBodyResult result) { this.result = result; return this; } public QueryPointAutoIssueSettingResponseBodyResult getResult() { return this.result; } public QueryPointAutoIssueSettingResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } public static class QueryPointAutoIssueSettingResponseBodyResult extends TeaModel { @NameInMap("pointAutoNum") public Long pointAutoNum; @NameInMap("pointAutoState") public Boolean pointAutoState; @NameInMap("pointAutoTime") public Long pointAutoTime; public static QueryPointAutoIssueSettingResponseBodyResult build(java.util.Map<String, ?> map) throws Exception { QueryPointAutoIssueSettingResponseBodyResult self = new QueryPointAutoIssueSettingResponseBodyResult(); return TeaModel.build(map, self); } public QueryPointAutoIssueSettingResponseBodyResult setPointAutoNum(Long pointAutoNum) { this.pointAutoNum = pointAutoNum; return this; } public Long getPointAutoNum() { return this.pointAutoNum; } public QueryPointAutoIssueSettingResponseBodyResult setPointAutoState(Boolean pointAutoState) { this.pointAutoState = pointAutoState; return this; } public Boolean getPointAutoState() { return this.pointAutoState; } public QueryPointAutoIssueSettingResponseBodyResult setPointAutoTime(Long pointAutoTime) { this.pointAutoTime = pointAutoTime; return this; } public Long getPointAutoTime() { return this.pointAutoTime; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
77b9efd050488ed7b9fb14938322065bf3d85297
a33aac97878b2cb15677be26e308cbc46e2862d2
/data/libgdx/btSoftBodyFloatData_getMaterials.java
e896b756d1c229e9180d2891b97819d382e7021d
[]
no_license
GabeOchieng/ggnn.tensorflow
f5d7d0bca52258336fc12c9de6ae38223f28f786
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
refs/heads/master
2022-05-30T11:17:42.278048
2020-05-02T11:33:31
2020-05-02T11:33:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
223
java
public SWIGTYPE_p_p_SoftBodyMaterialData getMaterials() { long cPtr = SoftbodyJNI.btSoftBodyFloatData_materials_get(swigCPtr, this); return (cPtr == 0) ? null : new SWIGTYPE_p_p_SoftBodyMaterialData(cPtr, false); }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
a87df40c95dd5875fcb0d57998c81dd844db4bce
4ac51f07e5e4d5da395caa5cc8c3516923ef3012
/taverna-run-impl/src/test/java/uk/org/taverna/platform/run/impl/DummyWorkflowReport.java
b30b90bceb4ba15d2d8833b60990f39912d1ba2f
[]
no_license
taverna-incubator/incubator-taverna-engine
eb2b5d2c956982696e06b9404c6b94a2346417fe
1eca6315f88bfd19672114e3f3b574246a2994a5
refs/heads/master
2021-01-01T18:11:06.502122
2015-02-21T23:43:42
2015-02-21T23:43:42
28,545,860
0
1
null
2015-02-04T15:45:25
2014-12-27T20:40:19
Java
UTF-8
Java
false
false
6,017
java
package uk.org.taverna.platform.run.impl; import java.io.IOException; import java.nio.file.Path; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; import java.util.UUID; import org.junit.Before; import org.apache.taverna.robundle.Bundle; import org.apache.taverna.databundle.DataBundles; import uk.org.taverna.platform.report.ActivityReport; import uk.org.taverna.platform.report.Invocation; import uk.org.taverna.platform.report.ProcessorReport; import uk.org.taverna.platform.report.WorkflowReport; import org.apache.taverna.scufl2.api.common.Scufl2Tools; import org.apache.taverna.scufl2.api.container.WorkflowBundle; import org.apache.taverna.scufl2.api.core.Processor; import org.apache.taverna.scufl2.api.io.ReaderException; import org.apache.taverna.scufl2.api.io.WorkflowBundleIO; import org.apache.taverna.scufl2.api.profiles.ProcessorBinding; public class DummyWorkflowReport { private static TimeZone UTC = TimeZone.getTimeZone("UTC"); protected Bundle dataBundle; protected WorkflowReport wfReport; protected static final Scufl2Tools scufl2Tools = new Scufl2Tools(); protected static final WorkflowBundleIO workflowBundleIO = new WorkflowBundleIO(); protected WorkflowBundle wfBundle; @Before public void loadWf() throws ReaderException, IOException { wfBundle = workflowBundleIO.readBundle(getClass().getResource("/hello_anyone.wfbundle"), "application/vnd.taverna.scufl2.workflow-bundle"); } protected Date date(int year, int month, int date, int hourOfDay, int minute) { GregorianCalendar cal = new GregorianCalendar(UTC); cal.setTimeInMillis(0); cal.set(year, month-1, date, hourOfDay, minute); return cal.getTime(); } @Before public void dummyReport() throws Exception { wfReport = new WorkflowReport(wfBundle.getMainWorkflow()); dataBundle = DataBundles.createBundle(); wfReport.setDataBundle(dataBundle); wfReport.setCreatedDate(date(2013,1,2,13,37)); wfReport.setStartedDate(date(2013,1,2,14,50)); Invocation wfInvocation = new Invocation("wf0", null, wfReport); wfInvocation.setStartedDate(date(2013,1,2,14,51)); wfInvocation.setCompletedDate(date(2013,12,30,23,50)); wfReport.addInvocation(wfInvocation); Path name = DataBundles.getPort(DataBundles.getInputs(dataBundle), "name"); DataBundles.setStringValue(name, "John Doe"); wfInvocation.getInputs().put("name", name); Path greeting = DataBundles.getPort(DataBundles.getOutputs(dataBundle), "greeting"); DataBundles.setStringValue(greeting, "Hello, John Doe"); wfInvocation.getOutputs().put("greeting", greeting); Path helloValue = DataBundles.getIntermediate(dataBundle, UUID.randomUUID()); Path concatenateOutput = DataBundles.getIntermediate(dataBundle, UUID.randomUUID()); for (Processor p : wfBundle.getMainWorkflow().getProcessors()) { ProcessorReport processorReport = new ProcessorReport(p); processorReport.setJobsQueued(1); processorReport.setJobsStarted(5); processorReport.setJobsCompleted(3); processorReport.setJobsCompletedWithErrors(2); wfReport.addProcessorReport(processorReport); processorReport.setCreatedDate(date(2013,2,1,0,0)); processorReport.setStartedDate(date(2013,2,2,0,0)); processorReport.setPausedDate(date(2013,2,3,0,0)); processorReport.setResumedDate(date(2013,2,4,0,0)); processorReport.setPausedDate(date(2013,2,5,0,0)); processorReport.setResumedDate(date(2013,2,6,0,0)); Invocation pInvocation = new Invocation("proc-" + p.getName() + "0", wfInvocation, processorReport); pInvocation.setStartedDate(date(2013,2,2,11,0)); pInvocation.setCompletedDate(date(2013,2,2,13,0)); if (p.getName().equals("hello")) { pInvocation.getOutputs().put("value", helloValue); DataBundles.setStringValue(helloValue, "Hello, "); } else if (p.getName().equals("Concatenate_two_strings")) { pInvocation.getInputs().put("string1", helloValue); pInvocation.getInputs().put("string2", name); pInvocation.getOutputs().put("output", concatenateOutput); DataBundles.setStringValue(concatenateOutput, "Hello, John Doe"); } else { throw new Exception("Unexpected processor " + p); } processorReport.addInvocation(pInvocation); for (ProcessorBinding b : scufl2Tools.processorBindingsForProcessor(p, wfBundle.getMainProfile())) { ActivityReport activityReport = new ActivityReport(b.getBoundActivity()); processorReport.addActivityReport(activityReport); activityReport.setCreatedDate(date(2013,2,20,0,0)); activityReport.setStartedDate(date(2013,2,20,11,00)); activityReport.setCancelledDate(date(2013,2,21,11,30)); Invocation aInvocation = new Invocation("act-" + p.getName() + "0", pInvocation, activityReport); aInvocation.setStartedDate(date(2013,2,20,11,30)); // aInvocation.setCompletedDate(date(2013,2,20,12,0)); activityReport.addInvocation(aInvocation); aInvocation.getInputs().putAll(pInvocation.getInputs()); aInvocation.getOutputs().putAll(pInvocation.getOutputs()); } // processorReport.setFailedDate(date(2013,7,28,23,59)); // In the summer to check that daylight saving does not sneak in processorReport.setCompletedDate(date(2013,7,28,12,00)); } wfReport.setCompletedDate(date(2013,12,31,0,0)); } }
[ "stain@apache.org" ]
stain@apache.org
4db52c8b46bded643637fbd897273693e53be598
e5224618c59081af1062825d92d7fb1b87967151
/src/main/java/io/mycat/manager/response/ShowVersion.java
1f346428916cf8cb34da40f1260950eccd35ce49
[ "GPL-2.0-only" ]
permissive
lizhanke/Mycat-Server
5836c51089925ef92d69fde50b0f17f0846700cb
ea2e1469c9f84c42ecf1f916a7ad537cbfe2f012
refs/heads/master
2021-01-11T19:48:52.761511
2018-03-12T08:44:25
2018-09-06T14:03:20
49,316,066
0
0
Apache-2.0
2018-09-06T14:03:22
2016-01-09T07:57:01
Java
UTF-8
Java
false
false
2,928
java
/* * Copyright (c) 2013, OpenCloudDB/MyCAT and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software;Designed and Developed mainly by many Chinese * opensource volunteers. you can redistribute it and/or modify it under the * terms of the GNU General Public License version 2 only, as published by the * Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Any questions about this component can be directed to it's project Web address * https://code.google.com/p/opencloudb/. * */ package io.mycat.manager.response; import java.nio.ByteBuffer; import io.mycat.backend.mysql.PacketUtil; import io.mycat.config.Fields; import io.mycat.config.Versions; import io.mycat.manager.ManagerConnection; import io.mycat.net.mysql.EOFPacket; import io.mycat.net.mysql.FieldPacket; import io.mycat.net.mysql.ResultSetHeaderPacket; import io.mycat.net.mysql.RowDataPacket; /** * 查看CobarServer版本 * * @author mycat */ public final class ShowVersion { private static final int FIELD_COUNT = 1; private static final ResultSetHeaderPacket header = PacketUtil.getHeader(FIELD_COUNT); private static final FieldPacket[] fields = new FieldPacket[FIELD_COUNT]; private static final EOFPacket eof = new EOFPacket(); static { int i = 0; byte packetId = 0; header.packetId = ++packetId; fields[i] = PacketUtil.getField("VERSION", Fields.FIELD_TYPE_STRING); fields[i++].packetId = ++packetId; eof.packetId = ++packetId; } public static void execute(ManagerConnection c) { ByteBuffer buffer = c.allocate(); // write header buffer = header.write(buffer, c,true); // write fields for (FieldPacket field : fields) { buffer = field.write(buffer, c,true); } // write eof buffer = eof.write(buffer, c,true); // write rows byte packetId = eof.packetId; RowDataPacket row = new RowDataPacket(FIELD_COUNT); row.add(Versions.SERVER_VERSION); row.packetId = ++packetId; buffer = row.write(buffer, c,true); // write last eof EOFPacket lastEof = new EOFPacket(); lastEof.packetId = ++packetId; buffer = lastEof.write(buffer, c,true); // write buffer c.write(buffer); } }
[ "slzhk@163.com" ]
slzhk@163.com
ca2c24f44789970cd68bbe365642f20e4e52230e
21f2918feebee4afa31534f4714ef497911c8c79
/java-basic/app/src/main/java/com/eomcs/oop/ex09/c/Exam0220.java
9301096a59b721faceb32dbd8e6d4f7d23c6c3ca
[]
no_license
eomjinyoung/bitcamp-20210607
276aab07d6ab067e998328d7946f592816e28baa
2f07da3993e3b6582d9f50a60079ce93ed3c261f
refs/heads/main
2023-06-14T23:47:21.139807
2021-06-25T09:48:48
2021-06-25T09:48:48
374,601,444
1
1
null
null
null
null
UTF-8
Java
false
false
1,551
java
// 인터페이스 다중 구현과 메서드 중복 package com.eomcs.oop.ex09.c; public class Exam0220 { interface ProtocolA { void rule0(); void rule1(); } interface ProtocolB { void rule0(); void rule2(); } // 다중 인터페이스를 구현할 때 중복된 메서드가 있다면, // - 메서드 시그너처(이름, 파라미터, 리턴타입)만 같으면 // 다중 구현에 문제가 없다. // - 왜냐하면 구현 메서드가 인터페이스를 모두 만족시키기 때문이다. // class ProtocolImpl implements ProtocolA, ProtocolB { // ProtocolA 입장에서는 rule0() 규칙 준수! // ProtocolB 입장에서도 rule0() 규칙 준수! @Override public void rule0() {System.out.println("rule1()");} // ProtocolA 규칙 준수! @Override public void rule1() {System.out.println("rule1()");} // ProtocolB 규칙 준수! @Override public void rule2() {System.out.println("rule2()");} } void test() { ProtocolImpl obj = new ProtocolImpl(); // 1) 인터페이스 레퍼런스로 구현체의 주소 받기 ProtocolB b = obj; ProtocolA a = obj; // 2) 메서드 호출 // - 해당 인터페이스의 규칙에 따라서만 호출할 수 있다. b.rule2(); // OK // b.rule1(); // 컴파일 오류! System.out.println("-------------------------------"); a.rule1(); // OK! // a.rule2(); // 컴파일 오류! } public static void main(String[] args) { new Exam0220().test(); } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
2961930940f348c26bdbbfc9b1bc3ab1c37bc7a2
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project477/src/test/java/org/gradle/test/performance/largejavamultiproject/project477/p2386/Test47737.java
0f0ff1fbf5f966a269a6f9080832a86c187b4e87
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
package org.gradle.test.performance.largejavamultiproject.project477.p2386; import org.junit.Test; import static org.junit.Assert.*; public class Test47737 { Production47737 objectUnderTest = new Production47737(); @Test public void testProperty0() { Production47734 value = new Production47734(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production47735 value = new Production47735(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production47736 value = new Production47736(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
7ce4ea529830b3729d4aa9755acb658166517ff9
49b4cb79c910a17525b59d4b497a09fa28a9e3a8
/parserValidCheck/src/main/java/com/ke/css/cimp/fbl/fbl2/Rule_WEIGHT_CODE.java
678cde3a3c8162a963b8c72b814a1e9aa369afe1
[]
no_license
ganzijo/koreanair
a7d750b62cec2647bfb2bed4ca1bf8648d9a447d
e980fb11bc4b8defae62c9d88e5c70a659bef436
refs/heads/master
2021-04-26T22:04:17.478461
2018-03-06T05:59:32
2018-03-06T05:59:32
124,018,887
0
0
null
null
null
null
UTF-8
Java
false
false
2,220
java
package com.ke.css.cimp.fbl.fbl2; /* ----------------------------------------------------------------------------- * Rule_WEIGHT_CODE.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Fri Feb 23 16:06:09 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_WEIGHT_CODE extends Rule { public Rule_WEIGHT_CODE(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_WEIGHT_CODE parse(ParserContext context) { context.push("WEIGHT_CODE"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { Rule rule = Rule_Typ_Alpha.parse(context); if ((f1 = rule != null)) { a1.add(rule, context.index); c1++; } } parsed = c1 == 1; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_WEIGHT_CODE(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("WEIGHT_CODE", parsed); return (Rule_WEIGHT_CODE)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "wrjo@wrjo-PC" ]
wrjo@wrjo-PC
868ee534f51dec753e3ed19ec5fda90b5ecedafa
14e90976df71b50bb100cf7b0894036538e14207
/src/main/resources/archetype-resources/src/main/java/web/form/LoginForm.java
27b4b02ab28614fdb9fb2ae59dfa1d1d82f73665
[]
no_license
stickgoal/ssm-archetype
2d981e414a2b099d99e89b7a3d77c38187e84c5c
c31485a6d58317c4a281694d0d67ad4206790c93
refs/heads/master
2021-09-18T02:58:58.392042
2018-07-09T07:21:18
2018-07-09T07:21:18
103,370,813
4
0
null
null
null
null
UTF-8
Java
false
false
697
java
package ${package}.web.form; public class LoginForm { private String username; private String password; private String rememberMe; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getRememberMe() { return rememberMe; } public void setRememberMe(String rememberMe) { this.rememberMe = rememberMe; } @Override public String toString() { return "LoginForm [username=" + username + ", password=" + password + ", rememberMe=" + rememberMe + "]"; } }
[ "stick.goal@163.com" ]
stick.goal@163.com
e46c13e80b99abb4105a4efff7d6db0a15af2381
18cfb24c4914acd5747e533e88ce7f3a52eee036
/src/main/jdk8/java/beans/SimpleBeanInfo.java
88ecef25b54b4c64e4d775adbfc594ee5eb43b1b
[]
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
3,638
java
/* * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.beans; import java.awt.Image; import java.awt.Toolkit; import java.awt.image.ImageProducer; import java.net.URL; /** * This is a support class to make it easier for people to provide * BeanInfo classes. * <p> * It defaults to providing "noop" information, and can be selectively * overriden to provide more explicit information on chosen topics. * When the introspector sees the "noop" values, it will apply low * level introspection and design patterns to automatically analyze * the target bean. */ public class SimpleBeanInfo implements BeanInfo { /** * Deny knowledge about the class and customizer of the bean. * You can override this if you wish to provide explicit info. */ public BeanDescriptor getBeanDescriptor() { return null; } /** * Deny knowledge of properties. You can override this * if you wish to provide explicit property info. */ public PropertyDescriptor[] getPropertyDescriptors() { return null; } /** * Deny knowledge of a default property. You can override this * if you wish to define a default property for the bean. */ public int getDefaultPropertyIndex() { return -1; } /** * Deny knowledge of event sets. You can override this * if you wish to provide explicit event set info. */ public EventSetDescriptor[] getEventSetDescriptors() { return null; } /** * Deny knowledge of a default event. You can override this * if you wish to define a default event for the bean. */ public int getDefaultEventIndex() { return -1; } /** * Deny knowledge of methods. You can override this * if you wish to provide explicit method info. */ public MethodDescriptor[] getMethodDescriptors() { return null; } /** * Claim there are no other relevant BeanInfo objects. You * may override this if you want to (for example) return a * BeanInfo for a base class. */ public BeanInfo[] getAdditionalBeanInfo() { return null; } /** * Claim there are no icons available. You can override * this if you want to provide icons for your bean. */ public Image getIcon(int iconKind) { return null; } /** * This is a utility method to help in loading icon images. * It takes the name of a resource file associated with the * current object's class file and loads an image object * from that file. Typically images will be GIFs. * <p> * @param resourceName A pathname relative to the directory * holding the class file of the current class. For example, * "wombat.gif". * @return an image object. May be null if the load failed. */ public Image loadImage(final String resourceName) { try { final URL url = getClass().getResource(resourceName); if (url != null) { final ImageProducer ip = (ImageProducer) url.getContent(); if (ip != null) { return Toolkit.getDefaultToolkit().createImage(ip); } } } catch (final Exception ignored) { } return null; } }
[ "douguohai@163.com" ]
douguohai@163.com
bb95b15b1c1b0692341d2c4b84861cb319ac0bef
b97bc0706448623a59a7f11d07e4a151173b7378
/src/main/java/radian/web/servlets/aerocz/AeroczWasteSideView.java
72ffec90182747a6644e2aa9e66475c2e73bcef9
[]
no_license
zafrul-ust/tcmISDev
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
71418732e5465bb52a0079c7e7e7cec423a1d3ed
refs/heads/master
2022-12-21T15:46:19.801950
2020-02-07T21:22:50
2020-02-07T21:22:50
241,601,201
0
0
null
2022-12-13T19:29:34
2020-02-19T11:08:43
Java
UTF-8
Java
false
false
1,286
java
package radian.web.servlets.aerocz; import radian.tcmis.server7.share.helpers.*; import radian.tcmis.server7.client.aerocz.dbObjs.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class AeroczWasteSideView extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //System.out.println("\n\n============= aeroczwastesideview check"); AeroczTcmISDBModel db = null; try { db = new AeroczTcmISDBModel("Aerocz"); if (db == null){ PrintWriter out2 = new PrintWriter (response.getOutputStream()); out2.println("Starting DB"); out2.println("DB is null"); out2.close(); return; } WasteSideView obj = new WasteSideView((ServerResourceBundle) new AeroczServerResourceBundle(),db); obj.doPost(request,response); } catch (Exception e){ e.printStackTrace(); } finally { db.close(); } } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); } }
[ "julio.rivero@wescoair.com" ]
julio.rivero@wescoair.com
aa9d899a4df18f514100ab17ca9dcce6a03e2920
1204868f57bbd15757cd79c6838b31c903abd177
/camel-blueprint-salesforce-test-6.2/src/main/java/org/apache/camel/salesforce/dto/ProtocolEnum.java
1d4fa4526a7ebb7eaecd964d073513d1caa66c59
[]
no_license
shivamlakade95/fuse-examples-6.2
aedaeddcad6efcc8e4f85d550c9e2e174b25fb14
f7f9ac9630828dd4e488f80011dbc2e60a7e3e2c
refs/heads/master
2023-05-11T04:05:40.394046
2020-01-02T08:23:34
2020-01-02T08:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
/* * Salesforce DTO generated by camel-salesforce-maven-plugin * Generated on: Thu Sep 03 14:23:16 IST 2015 */ package org.apache.camel.salesforce.dto; import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonValue; /** * Salesforce Enumeration DTO for picklist Protocol */ public enum ProtocolEnum { // NoAuthentication NOAUTHENTICATION("NoAuthentication"), // Oauth OAUTH("Oauth"), // Password PASSWORD("Password"); final String value; private ProtocolEnum(String value) { this.value = value; } @JsonValue public String value() { return this.value; } @JsonCreator public static ProtocolEnum fromValue(String value) { for (ProtocolEnum e : ProtocolEnum.values()) { if (e.value.equals(value)) { return e; } } throw new IllegalArgumentException(value); } }
[ "shekhar.csp84@yahoo.co.in" ]
shekhar.csp84@yahoo.co.in
272ff850e272db2a0ddfa9e8fcd71582f2c08946
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--druid/6b7958dbfdeb8f28ee5cbe548939c8d928ab4649/before/MySqlInsertStatement.java
980a653df8d2c1805defeedb0a570af0914af589
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,545
java
/* * Copyright 1999-2011 Alibaba Group Holding Ltd. * * 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.alibaba.druid.sql.dialect.mysql.ast.statement; import java.util.ArrayList; import java.util.List; import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.statement.SQLInsertStatement; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor; import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlOutputVisitor; import com.alibaba.druid.sql.visitor.SQLASTVisitor; public class MySqlInsertStatement extends SQLInsertStatement { private static final long serialVersionUID = 1L; private boolean lowPriority = false; private boolean delayed = false; private boolean highPriority = false; private boolean ignore = false; private List<ValuesClause> valuesList = new ArrayList<ValuesClause>(); private final List<SQLExpr> duplicateKeyUpdate = new ArrayList<SQLExpr>(); public List<SQLExpr> getDuplicateKeyUpdate() { return duplicateKeyUpdate; } public ValuesClause getValues() { if (valuesList.size() == 0) { return null; } return valuesList.get(0); } public void setValues(ValuesClause values) { if (valuesList.size() == 0) { valuesList.add(values); } else { valuesList.set(0, values); } } public List<ValuesClause> getValuesList() { return valuesList; } public boolean isLowPriority() { return lowPriority; } public void setLowPriority(boolean lowPriority) { this.lowPriority = lowPriority; } public boolean isDelayed() { return delayed; } public void setDelayed(boolean delayed) { this.delayed = delayed; } public boolean isHighPriority() { return highPriority; } public void setHighPriority(boolean highPriority) { this.highPriority = highPriority; } public boolean isIgnore() { return ignore; } public void setIgnore(boolean ignore) { this.ignore = ignore; } @Override protected void accept0(SQLASTVisitor visitor) { if (visitor instanceof MySqlASTVisitor) { accept0((MySqlASTVisitor) visitor); } else { throw new IllegalArgumentException("not support visitor type : " + visitor.getClass().getName()); } } public void output(StringBuffer buf) { new MySqlOutputVisitor(buf).visit(this); } protected void accept0(MySqlASTVisitor visitor) { if (visitor.visit(this)) { this.acceptChild(visitor, getTableName()); this.acceptChild(visitor, getColumns()); this.acceptChild(visitor, getValuesList()); this.acceptChild(visitor, getQuery()); this.acceptChild(visitor, getDuplicateKeyUpdate()); } visitor.endVisit(this); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
01f064ad23187fb4c643e4cb0ba255402c952444
787c581eb439a2caa40ecffb20491c4414c21300
/nfctools-core/src/test/java/org/nfctools/mf/ul/UltralightTest.java
8d95b78191b05169b26451361ddd472f8d359412
[ "Apache-2.0" ]
permissive
skjolber/nfctools
72ba58988fa56643d399ef31e4af42d1e65e6207
85d09c3554e1940032ae74650a5286f07b29b7cf
refs/heads/master
2020-12-25T12:47:30.905523
2014-09-23T23:47:35
2014-09-23T23:47:35
3,867,032
1
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
/** * Copyright 2011-2012 Adrian Stabiszewski, as@nfctools.org * * 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.nfctools.mf.ul; import static org.junit.Assert.*; import org.junit.Test; import org.nfctools.mf.block.MfBlock; import org.nfctools.test.FileMfUlReader; import org.nfctools.test.MemoryMapUlReaderWriter; public class UltralightTest { @Test public void testIsBlank() throws Exception { MemoryMap memoryMap = FileMfUlReader.loadCardFromFile("mful_blank.txt"); MfUlReaderWriter readerWriter = new MemoryMapUlReaderWriter(memoryMap); MfBlock[] blocks = readerWriter.readBlock(0, 5); assertTrue(UltralightHandler.isBlank(blocks)); } @Test public void testIsFormatted() throws Exception { MemoryMap memoryMap = FileMfUlReader.loadCardFromFile("mfulc_formatted.txt"); MfUlReaderWriter readerWriter = new MemoryMapUlReaderWriter(memoryMap); MfBlock[] blocks = readerWriter.readBlock(0, 5); assertTrue(UltralightHandler.isFormatted(blocks)); } @Test public void itShouldExtractId() throws Exception { MfBlock[] blocks = new MfBlock[2]; blocks[0] = new DataBlock(new byte[] { 0, 1, 2, 3 }); blocks[1] = new DataBlock(new byte[] { 4, 5, 6, 7 }); byte[] id = UltralightHandler.extractId(blocks); assertArrayEquals(new byte[] { 0, 1, 2, 4, 5, 6, 7 }, id); } }
[ "as@grundid.de" ]
as@grundid.de
273685763b1b3cfa8812bdd5c4360cc51a8c3d14
a1ce173359cca8ba584df24a7041f52ff492b753
/src/test/java/org/tyaa/demo/java/jhipster/angular/web/rest/WithUnauthenticatedMockUser.java
4210cdca38e7e4408f33c46c9b69641a875b60e8
[]
no_license
YuriiTrofimenko/demo-jhipster-angular
359d8bb9912fd1e6c68306233f80a55a4502ce56
b413385e4fcee06a39917ed7bf5ed4bbcb5b6709
refs/heads/master
2023-03-27T02:18:39.842429
2021-03-15T19:59:28
2021-03-15T19:59:28
348,105,803
0
0
null
null
null
null
UTF-8
Java
false
false
1,007
java
package org.tyaa.demo.java.jhipster.angular.web.rest; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.test.context.support.WithSecurityContext; import org.springframework.security.test.context.support.WithSecurityContextFactory; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @WithSecurityContext(factory = WithUnauthenticatedMockUser.Factory.class) public @interface WithUnauthenticatedMockUser { class Factory implements WithSecurityContextFactory<WithUnauthenticatedMockUser> { @Override public SecurityContext createSecurityContext(WithUnauthenticatedMockUser annotation) { return SecurityContextHolder.createEmptyContext(); } } }
[ "tyaa@ukr.net" ]
tyaa@ukr.net
11997f9830bf2cc4a40c4985dca827f41a796a3a
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/ali/user/mobile/rpc/facade/MobileRegFacade.java
d244b0ada3b449c78fabb679812c7bed4c859005
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
844
java
package com.ali.user.mobile.rpc.facade; import com.ali.user.mobile.rpc.vo.mobilegw.GwCommonReq; import com.ali.user.mobile.rpc.vo.mobilegw.GwCommonRes; import com.ali.user.mobile.rpc.vo.mobilegw.SendSmsGwReq; import com.ali.user.mobile.rpc.vo.mobilegw.SmsGwRes; import com.ali.user.mobile.rpc.vo.mobilegw.register.RegMixRes; import com.ali.user.mobile.rpc.vo.mobilegw.register.SupplementReq; import com.alipay.inside.mobile.framework.service.annotation.OperationType; public interface MobileRegFacade { @OperationType("ali.user.gw.register.countryCodeProcesser") RegMixRes getCountyCode(GwCommonReq gwCommonReq); @OperationType("ali.user.gw.sms.sendSms") SmsGwRes sendSms(SendSmsGwReq sendSmsGwReq); @OperationType("ali.user.gw.register.completeProcesserV2") GwCommonRes supplementV2(SupplementReq supplementReq); }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
9d73a9e4020f1af648f893c24ec9caa7dbcceaac
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2008-03-28/seasar2-2.4.24/s2jdbc-gen/s2jdbc-gen-core/src/main/java/org/seasar/extension/jdbc/gen/generator/JavaFileGeneratorImpl.java
f7674eef8f50953df963582795cbd60bd78c9946
[]
no_license
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
4,945
java
/* * Copyright 2004-2008 the Seasar Foundation and the Others. * * 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.seasar.extension.jdbc.gen.generator; import java.io.File; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.Charset; import org.seasar.extension.jdbc.gen.JavaCode; import org.seasar.extension.jdbc.gen.JavaFileGenerator; import org.seasar.extension.jdbc.gen.util.CloseableUtil; import org.seasar.extension.jdbc.gen.util.ConfigurationUtil; import org.seasar.extension.jdbc.gen.util.TemplateUtil; import org.seasar.framework.log.Logger; import org.seasar.framework.util.FileOutputStreamUtil; import freemarker.template.Configuration; import freemarker.template.Template; /** * {@link JavaFileGenerator}の実装クラスです。 * * @author taedium */ public class JavaFileGeneratorImpl implements JavaFileGenerator { /** javaファイルの拡張子 */ protected static final String EXTENSION = ".java"; /** ロガー */ protected Logger logger = Logger.getLogger(JavaFileGeneratorImpl.class); /** FreeMarkerの設定 */ protected Configuration configuration; /** 基盤となるディレクトリ */ protected File baseDir; /** エンコーディング */ protected String encoding; /** * インスタンスを生成します。 * * @param configuration * FreeMarkerの設定 * @param baseDir * 基盤となるディレクトリ * @param encoding * エンコーディング */ public JavaFileGeneratorImpl(Configuration configuration, File baseDir, String encoding) { this.configuration = configuration; this.baseDir = baseDir; this.encoding = encoding; } public void generate(JavaCode javaCode) { generate(javaCode, false); } public void generate(JavaCode javaCode, boolean overwrite) { File javaFile = createJavaFile(javaCode); if (!overwrite && exists(javaFile)) { return; } File packageDir = createPackageDir(javaCode); makeDirsIfNecessary(packageDir); Writer writer = openWriter(javaFile); try { Template template = ConfigurationUtil.getTemplate(configuration, javaCode.getTemplateName()); TemplateUtil.process(template, javaCode, writer); logger.log("DS2JDBCGen0002", new Object[] { javaFile.getPath() }); } finally { CloseableUtil.close(writer); } } /** * Javaファイルを作成します。 * * @param javaCode * Javaコード * @return Javaファイル */ protected File createJavaFile(JavaCode javaCode) { String fileName = javaCode.getClassName().replace('.', File.separatorChar) + EXTENSION; return new File(baseDir, fileName); } /** * パッケージのディレクトリを作成します。 * * @param javaCode * Javaコード * @return パッケージのディレクトリ */ protected File createPackageDir(JavaCode javaCode) { String dirName = javaCode.getPackageName().replace('.', File.separatorChar); return new File(baseDir, dirName); } /** * ファイルが存在すれば{@code true}を返します。 * * @param file * ファイル * @return ファイルが存在すれば{@code true}、存在しなければ{@code false} */ protected boolean exists(File file) { return file.exists(); } /** * 必要であればディレクトリを作成します。 * * @param dir * ディレクトリ */ protected void makeDirsIfNecessary(File dir) { if (!dir.exists()) { dir.mkdirs(); } } /** * {@link Writer}を作成します。 * * @param file * Javaファイル * @return {@link Writer} */ protected Writer openWriter(File file) { return new OutputStreamWriter(FileOutputStreamUtil.create(file), Charset.forName(encoding)); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
bc91435d3d14f9d4da488ab695b824aa7f102317
2c73bc2c7a4427758ff98d7362f0aabcf808731e
/libs/ZUtilsExtWidget/src/com/kit/widget/expandablelistview/iphonetreeview/IphoneTreeViewAdapter.java
23591a72ae73f9d203f2c63d8f9dce10228ae6c0
[ "Apache-2.0" ]
permissive
MRTangwin8/BigApp_Discuz_Android
3349052a23e7775b26cc88398c9a989b5f3b5f10
6a9a66b66ca9387a70d11128b54f02745b1f4283
refs/heads/master
2020-04-04T09:28:15.558602
2018-11-02T05:45:36
2018-11-02T05:45:36
155,819,452
0
0
Apache-2.0
2018-11-02T05:43:41
2018-11-02T05:43:41
null
UTF-8
Java
false
false
4,532
java
package com.kit.widget.expandablelistview.iphonetreeview; import java.util.HashMap; import com.kit.widget.expandablelistview.iphonetreeview.IphoneTreeView.IphoneTreeHeaderAdapter; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; public class IphoneTreeViewAdapter extends BaseExpandableListAdapter implements IphoneTreeHeaderAdapter { // Sample data set. children[i] contains the children (String[]) for // groups[i]. private HashMap<Integer, Integer> groupStatusMap; private String[] groups = { "第一组", "第二组", "第三组", "第四组" }; private String[][] children = { { "Way", "Arnold", "Barry", "Chuck", "David", "Afghanistan", "Albania", "Belgium", "Lily", "Jim", "LiMing", "Jodan" }, { "Ace", "Bandit", "Cha-Cha", "Deuce", "Bahamas", "China", "Dominica", "Jim", "LiMing", "Jodan" }, { "Fluffy", "Snuggles", "Ecuador", "Ecuador", "Jim", "LiMing", "Jodan" }, { "Goldy", "Bubbles", "Iceland", "Iran", "Italy", "Jim", "LiMing", "Jodan" } }; public IphoneTreeViewAdapter() { // TODO Auto-generated constructor stub groupStatusMap = new HashMap<Integer, Integer>(); } public Object getChild(int groupPosition, int childPosition) { return children[groupPosition][childPosition]; } public long getChildId(int groupPosition, int childPosition) { return childPosition; } public int getChildrenCount(int groupPosition) { return children[groupPosition].length; } public Object getGroup(int groupPosition) { return groups[groupPosition]; } public int getGroupCount() { return groups.length; } public long getGroupId(int groupPosition) { return groupPosition; } public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } public boolean hasStableIds() { return true; } @Override public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { // TODO Auto-generated method stub // if (convertView == null) { // convertView = mInflater.inflate(R.layout.list_item_view, null); // } // TextView tv = (TextView) convertView // .findViewById(R.id.contact_list_item_name); // tv.setText(getChild(groupPosition, childPosition).toString()); // TextView state = (TextView) convertView // .findViewById(R.id.cpntact_list_item_state); // state.setText("爱生活...爱Android..."); return convertView; } @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { // TODO Auto-generated method stub // if (convertView == null) { // convertView = mInflater.inflate(R.layout.list_group_view, null); // } // TextView groupName = (TextView) convertView // .findViewById(R.id.group_name); // groupName.setText(groups[groupPosition]); // // ImageView indicator = (ImageView) convertView // .findViewById(R.id.group_indicator); // TextView onlineNum = (TextView) convertView // .findViewById(R.id.online_count); // onlineNum.setText(getChildrenCount(groupPosition) + "/" // + getChildrenCount(groupPosition)); // if (isExpanded) { // indicator.setImageResource(R.drawable.indicator_expanded); // } else { // indicator.setImageResource(R.drawable.indicator_unexpanded); // } return convertView; } @Override public int getTreeHeaderState(int groupPosition, int childPosition) { final int childCount = getChildrenCount(groupPosition); // if (childPosition == childCount - 1) { // return PINNED_HEADER_PUSHED_UP; // } else if (childPosition == -1 // && !iphoneTreeView.isGroupExpanded(groupPosition)) { // return PINNED_HEADER_GONE; // } else { // return PINNED_HEADER_VISIBLE; // } return PINNED_HEADER_VISIBLE; } @Override public void configureTreeHeader(View header, int groupPosition, int childPosition, int alpha) { // TODO Auto-generated method stub // ((TextView) header.findViewById(R.id.group_name)) // .setText(groups[groupPosition]); // ((TextView) header.findViewById(R.id.online_count)) // .setText(getChildrenCount(groupPosition) + "/" // + getChildrenCount(groupPosition)); } @Override public void onHeadViewClick(int groupPosition, int status) { // TODO Auto-generated method stub groupStatusMap.put(groupPosition, status); } @Override public int getHeadViewClickStatus(int groupPosition) { if (groupStatusMap.containsKey(groupPosition)) { return groupStatusMap.get(groupPosition); } else { return 0; } } }
[ "bigapp@yeah.net" ]
bigapp@yeah.net
5e21172cd524119019e1550b5a10782c8b131403
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/laravel/framework/src/Illuminate/Foundation/Console/file_ListenerMakeCommand_php.java
1e5ac8e92fe0bded856704fc4fcf11949c7a08f1
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,253
java
package com.project.convertedCode.includes.vendor.laravel.framework.src.Illuminate.Foundation.Console; import com.runtimeconverter.runtime.RuntimeStack; import com.runtimeconverter.runtime.interfaces.ContextConstants; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.IncludeEventException; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php */ public class file_ListenerMakeCommand_php implements RuntimeIncludable { public static final file_ListenerMakeCommand_php instance = new file_ListenerMakeCommand_php(); public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException { Scope1236 scope = new Scope1236(); stack.pushScope(scope); this.include(env, stack, scope); stack.popScope(); } public final void include(RuntimeEnv env, RuntimeStack stack, Scope1236 scope) throws IncludeEventException { // Namespace import was here // Namespace import was here // Namespace import was here // Conversion Note: class named ListenerMakeCommand was here in the source code env.addManualClassLoad("Illuminate\\Foundation\\Console\\ListenerMakeCommand"); } private static final ContextConstants runtimeConverterContextContantsInstance = new ContextConstants() .setDir("/vendor/laravel/framework/src/Illuminate/Foundation/Console") .setFile( "/vendor/laravel/framework/src/Illuminate/Foundation/Console/ListenerMakeCommand.php"); public ContextConstants getContextConstants() { return runtimeConverterContextContantsInstance; } private static class Scope1236 implements UpdateRuntimeScopeInterface { public void updateStack(RuntimeStack stack) {} public void updateScope(RuntimeStack stack) {} } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
7f3e03571e52f7e9a2ffde9e8648e01a37d758a6
92f10c41bad09bee05acbcb952095c31ba41c57b
/app/src/main/java/io/github/alula/ohmygod/MainActivity611.java
e400d1546ccecf69b0007c88e0e81b9cd3206271
[]
no_license
alula/10000-activities
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
f7e8de658c3684035e566788693726f250170d98
refs/heads/master
2022-07-30T05:54:54.783531
2022-01-29T19:53:04
2022-01-29T19:53:04
453,501,018
16
0
null
null
null
null
UTF-8
Java
false
false
338
java
package io.github.alula.ohmygod; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity611 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "6276139+alula@users.noreply.github.com" ]
6276139+alula@users.noreply.github.com
e446698f0c934fecdc25b704247e699061d72782
fd147c29b356572ac723c3b35a4a1e0b11f3f50c
/src/main/java/org/bian/dto/SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedService.java
edb9d0902ccf90b5d12f7b0fbbe0c75359215e1c
[ "Apache-2.0" ]
permissive
bianapis/sd-syndicated-loan-v3
ba5864fa2a5836922305d7b2da36573657879c00
0c2c843261773ad5c641ed1d88ac7fd8a44893ed
refs/heads/master
2022-12-19T07:26:15.130113
2020-09-29T09:54:25
2020-09-29T09:54:25
299,562,828
0
0
null
null
null
null
UTF-8
Java
false
false
1,753
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 org.bian.dto.SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedServiceSyndicatedLoanServiceRecord; import javax.validation.Valid; /** * SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedService */ public class SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedService { private String syndicatedLoanServiceReference = null; private SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedServiceSyndicatedLoanServiceRecord syndicatedLoanServiceRecord = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to a service offered by the service center * @return syndicatedLoanServiceReference **/ public String getSyndicatedLoanServiceReference() { return syndicatedLoanServiceReference; } public void setSyndicatedLoanServiceReference(String syndicatedLoanServiceReference) { this.syndicatedLoanServiceReference = syndicatedLoanServiceReference; } /** * Get syndicatedLoanServiceRecord * @return syndicatedLoanServiceRecord **/ public SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedServiceSyndicatedLoanServiceRecord getSyndicatedLoanServiceRecord() { return syndicatedLoanServiceRecord; } public void setSyndicatedLoanServiceRecord(SDSyndicatedLoanRetrieveOutputModelSyndicatedLoanOfferedServiceSyndicatedLoanServiceRecord syndicatedLoanServiceRecord) { this.syndicatedLoanServiceRecord = syndicatedLoanServiceRecord; } }
[ "spabandara@Virtusa.com" ]
spabandara@Virtusa.com
ad0f115992c5cb1e379181f99a6be603d80ffe94
1c5e8605c1a4821bc2a759da670add762d0a94a2
/src/dahua/fdc/contract/report/monthcontract/client/ReportUtils.java
a8a247f1a922c343db4aad0ffcdeffcc3eeeb129
[]
no_license
shxr/NJG
8195cfebfbda1e000c30081399c5fbafc61bb7be
1b60a4a7458da48991de4c2d04407c26ccf2f277
refs/heads/master
2020-12-24T06:51:18.392426
2016-04-25T03:09:27
2016-04-25T03:09:27
19,804,797
0
3
null
null
null
null
UTF-8
Java
false
false
1,105
java
package com.kingdee.eas.fdc.contract.report.monthcontract.client; import com.kingdee.bos.ctrl.kdf.table.KDTable; public class ReportUtils { public static void mergerTable(KDTable table,String coloum[],String mergeColoum[]){ int merger=0; for(int i=0;i<table.getRowCount();i++){ if(i>0){ boolean isMerge=true; for(int j=0;j<coloum.length;j++){ Object curRow=table.getRow(i).getCell(coloum[j]).getValue(); Object lastRow=table.getRow(i-1).getCell(coloum[j]).getValue(); if(getString(curRow).equals("")||getString(lastRow).equals("")||!getString(curRow).equals(getString(lastRow))){ isMerge=false; merger=i; } } if(isMerge){ for(int j=0;j<mergeColoum.length;j++){ table.getMergeManager().mergeBlock(merger, table.getColumnIndex(mergeColoum[j]), i, table.getColumnIndex(mergeColoum[j])); } } } } } private static String getString(Object value){ if(value==null) return ""; if(value!=null&&value.toString().trim().equals("")){ return ""; }else{ return value.toString(); } } }
[ "shxr_code@126.com" ]
shxr_code@126.com
45d92f99485d1a5a01e61c38fc6f3bc705d44bd4
54609d68b8ddef76a15d71738c559e39ce343587
/src/main/java/com/blog/myapp/service/mapper/ViewPermissionMapper.java
52eed7e9c4fdd25be1c30aa0f5b2dd934db543d5
[]
no_license
zero1527/jhipster-pro-blog
4d8faf8c4aee046d1a82660aafbe765a0568aaaf
b82d7b1be014fa6d74ac93de242c7a933457f248
refs/heads/main
2023-05-30T22:00:44.492326
2021-06-18T14:48:17
2021-06-18T14:48:17
378,181,428
0
0
null
null
null
null
UTF-8
Java
false
false
1,891
java
package com.blog.myapp.service.mapper; import com.blog.myapp.domain.*; import com.blog.myapp.service.dto.ViewPermissionDTO; import org.mapstruct.*; /** * Mapper for the entity {@link ViewPermission} and its DTO {@link ViewPermissionDTO}. */ @Mapper(componentModel = "spring", uses = { ApiPermissionMapper.class, AuthorityMapper.class, ViewPermissionSimpleMapper.class }) public interface ViewPermissionMapper extends EntityMapper<ViewPermissionDTO, ViewPermission> { @Mapping(source = "parent", target = "parent") ViewPermissionDTO toDto(ViewPermission viewPermission); @Named("MapperNoChildren") @Mapping(source = "parent", target = "parent") @Mapping(target = "children", ignore = true) ViewPermissionDTO toNoChildrenDto(ViewPermission viewPermission); @Mapping(target = "children", ignore = true) @Mapping(target = "removeChildren", ignore = true) // @Mapping(target = "removeApiPermissions", ignore = true) // @Mapping(target = "roles", ignore = true) // @Mapping(target = "removeRoles", ignore = true) ViewPermission toEntity(ViewPermissionDTO viewPermissionDTO); default ViewPermission fromId(Long id) { if (id == null) { return null; } ViewPermission viewPermission = new ViewPermission(); viewPermission.setId(id); return viewPermission; } @Named("text") @BeanMapping(ignoreByDefault = true) @Mapping(target = "id", source = "id") @Mapping(target = "text", source = "text") default ViewPermissionDTO toDtoText(ViewPermission viewPermission) { if (viewPermission == null) { return null; } ViewPermissionDTO viewPermissionDTO = new ViewPermissionDTO(); viewPermissionDTO.setId(viewPermission.getId()); viewPermissionDTO.setText(viewPermission.getText()); return viewPermissionDTO; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
83144d7067df787b9bae2437eaf80e40a17a5457
fe49bebdae362679d8ea913d97e7a031e5849a97
/bqerpejb/src/power/ejb/productiontec/relayProtection/PtJdbhCSylbwhFacade.java
4ce39d2180b2cf34070e155db6387ddc81c7de8b
[]
no_license
loveyeah/BQMIS
1f87fad2c032e2ace7e452f13e6fe03d8d09ce0d
a3f44db24be0fcaa3cf560f9d985a6ed2df0b46b
refs/heads/master
2020-04-11T05:21:26.632644
2018-03-08T02:13:18
2018-03-08T02:13:18
124,322,652
0
2
null
null
null
null
UTF-8
Java
false
false
3,659
java
package power.ejb.productiontec.relayProtection; import java.util.List; import java.util.logging.Level; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import power.ear.comm.CodeRepeatException; import power.ear.comm.ejb.PageObject; import power.ejb.comm.NativeSqlHelperRemote; import power.ejb.hr.LogUtil; @Stateless public class PtJdbhCSylbwhFacade implements PtJdbhCSylbwhFacadeRemote { @PersistenceContext private EntityManager entityManager; @EJB(beanName = "NativeSqlHelper") protected NativeSqlHelperRemote bll; public PtJdbhCSylbwh save(PtJdbhCSylbwh entity) throws CodeRepeatException { LogUtil.log("saving PtJdbhCSylbwh instance", Level.INFO, null); if(!this.checkSame(entity.getSylbName(), entity.getEnterpriseCode())) { entity.setSylbId(bll.getMaxId("PT_JDBH_C_SYLBWH", "sylb_id")); entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); return entity; } else { throw new CodeRepeatException("类别名称不能重复!"); } } public void deleteMulti(String ids) { String sql= "delete PT_JDBH_C_SYLBWH t\n" + "where t.sylb_id in ("+ids+")"; bll.exeNativeSQL(sql); String sqlRef= "delete PT_JDBH_C_LBYXMDY a\n" + "where a.sylb_id in ("+ids+")"; bll.exeNativeSQL(sqlRef); } public PtJdbhCSylbwh update(PtJdbhCSylbwh entity) throws CodeRepeatException { LogUtil.log("updating PtJdbhCSylbwh instance", Level.INFO, null); try { if(!this.checkSame(entity.getSylbName(), entity.getEnterpriseCode(), entity.getSylbId())) { PtJdbhCSylbwh result = entityManager.merge(entity); LogUtil.log("update successful", Level.INFO, null); return result; } else { throw new CodeRepeatException("类别名称不能重复!"); } } catch (RuntimeException re) { LogUtil.log("update failed", Level.SEVERE, re); throw re; } } public PtJdbhCSylbwh findById(Long id) { LogUtil.log("finding PtJdbhCSylbwh instance with id: " + id, Level.INFO, null); try { PtJdbhCSylbwh instance = entityManager .find(PtJdbhCSylbwh.class, id); return instance; } catch (RuntimeException re) { LogUtil.log("find failed", Level.SEVERE, re); throw re; } } private boolean checkSame(String sortName,String enterpriseCode,final Long ...id ) { String sql= "select count(1) from PT_JDBH_C_SYLBWH t\n" + "where t.sylb_name='"+sortName+"' and t.enterprise_code='"+enterpriseCode+"'"; if(id!=null&&id.length>0) { sql+="\n and t.sylb_id<>"+id[0]; } int count=Integer.parseInt(bll.getSingal(sql).toString()); if(count>0) return true; else return false; } @SuppressWarnings("unchecked") public PageObject findAll(String enterpriseCode,final int... rowStartIdxAndCount) { String sqlCount= "select count(*) from PT_JDBH_C_SYLBWH t\n" + "where t.enterprise_code='"+enterpriseCode+"'"; Long totalCount=Long.parseLong(bll.getSingal(sqlCount).toString()); if(totalCount>0) { PageObject obj=new PageObject(); obj.setTotalCount(totalCount); String sql= "select * from PT_JDBH_C_SYLBWH t\n" + "where t.enterprise_code='"+enterpriseCode+"' order by t.display_no asc"; List<PtJdbhCSylbwh> list=bll.queryByNativeSQL(sql, PtJdbhCSylbwh.class, rowStartIdxAndCount); obj.setList(list); return obj; } else { return null; } } }
[ "yexinhua@rtdata.cn" ]
yexinhua@rtdata.cn
e87655625331f69ae1aa700ce0575fca79c37f62
58f761b3268ebd29bb2ad60ddae91e318eaa1af0
/Source/jsword/jsword/src/main/java/org/crosswire/jsword/book/study/UserMsg.java
fd9ca738e6a293d1fe2ec5f860217cec87356a38
[]
no_license
farseerfc/angela-bible
a144b2e640b10e7e5f7e5920a29ce55e0c3ab0ae
556b0c4dcade6203e933a497a260fd1ab1cd3886
refs/heads/master
2016-08-05T07:30:45.482690
2011-01-01T16:34:44
2011-01-01T16:34:44
32,140,901
1
1
null
null
null
null
UTF-8
Java
false
false
2,253
java
/** * Distribution License: * JSword is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License, version 2.1 as published by * the Free Software Foundation. This program is distributed in the hope * that it will be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * The License is available on the internet at: * http://www.gnu.org/copyleft/lgpl.html * or by writing to: * Free Software Foundation, Inc. * 59 Temple Place - Suite 330 * Boston, MA 02111-1307, USA * * Copyright: 2005 * The copyright to this program is held by it's authors. * * ID: $Id: UserMsg.java 2014 2010-11-12 03:11:25Z dmsmith $ */ package org.crosswire.jsword.book.study; import org.crosswire.common.util.MsgBase; /** * Compile safe Msg resource settings. * * @see gnu.lgpl.License for license details.<br> * The copyright to this program is held by it's authors. * @author Joe Walker [joe at eireneh dot com] */ final class UserMsg extends MsgBase { /** * Get the internationalized text, but return key if key is unknown. * * @param key * @return the internationalized text */ public static String gettext(String key) { return msg.lookup(key); } /** * Get the internationalized text, but return key if key is unknown. * The text requires one parameter to be passed. * * @param key * @param param * @return the formatted, internationalized text */ public static String gettext(String key, Object param) { return msg.toString(key, param); } /** * Get the internationalized text, but return key if key is unknown. * The text requires one parameter to be passed. * * @param key * @param params * @return the formatted, internationalized text */ public static String gettext(String key, Object[] params) { return msg.toString(key, params); } private static MsgBase msg = new UserMsg(); }
[ "farseerfc@gmail.com@75712bf9-698a-4f0c-68d8-d99044246f15" ]
farseerfc@gmail.com@75712bf9-698a-4f0c-68d8-d99044246f15
98f6445aadd290fe245ccc32f09947932f8faeb6
e9b20028c6ec19e03173e920e702b3fbe93ee3b3
/ExampleProject/xalan-j_2_6_0/src/org/apache/xalan/xsltc/compiler/Text.java
573aa93e7964bd0354356f50e6e421f2a8c0a10c
[ "Apache-2.0", "W3C-19980720", "LicenseRef-scancode-public-domain", "W3C", "SAX-PD" ]
permissive
pysherlock/Antipatterns
65706a523b65a4158e10d6d32dd11cbc8168f8af
8e78bd49f4c89a3f0bae83bb1634ebcd69505b20
refs/heads/master
2021-01-01T06:10:35.179453
2015-04-30T13:12:16
2015-04-30T13:12:16
33,727,668
0
0
null
null
null
null
UTF-8
Java
false
false
7,292
java
/* * Copyright 2001-2004 The Apache Software Foundation. * * 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. */ /* * $Id: Text.java,v 1.17 2004/02/16 22:25:10 minchau Exp $ */ package org.apache.xalan.xsltc.compiler; import org.apache.bcel.generic.ConstantPoolGen; import org.apache.bcel.generic.GETSTATIC; import org.apache.bcel.generic.INVOKEINTERFACE; import org.apache.bcel.generic.InstructionList; import org.apache.bcel.generic.PUSH; import org.apache.xalan.xsltc.compiler.util.ClassGenerator; import org.apache.xalan.xsltc.compiler.util.MethodGenerator; import org.apache.xalan.xsltc.compiler.util.Util; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen */ final class Text extends Instruction { private String _text; private boolean _escaping = true; private boolean _ignore = false; private boolean _textElement = false; /** * Create a blank Text syntax tree node. */ public Text() { _textElement = true; } /** * Create text syntax tree node. * @param text is the text to put in the node. */ public Text(String text) { _text = text; } /** * Returns the text wrapped inside this node * @return The text wrapped inside this node */ protected String getText() { return _text; } /** * Set the text for this node. Appends the given text to any already * existing text (using string concatenation, so use only when needed). * @param text is the text to wrap inside this node. */ protected void setText(String text) { if (_text == null) _text = text; else _text = _text + text; } public void display(int indent) { indent(indent); Util.println("Text"); indent(indent + IndentIncrement); Util.println(_text); } public void parseContents(Parser parser) { final String str = getAttribute("disable-output-escaping"); if ((str != null) && (str.equals("yes"))) _escaping = false; parseChildren(parser); if (_text == null) { if (_textElement) { _text = EMPTYSTRING; } else { _ignore = true; } } else if (_textElement) { if (_text.length() == 0) _ignore = true; } else if (getParent() instanceof LiteralElement) { LiteralElement element = (LiteralElement)getParent(); String space = element.getAttribute("xml:space"); if ((space == null) || (!space.equals("preserve"))) if (_text.trim().length() == 0) _ignore = true; } else { if (_text.trim().length() == 0) _ignore = true; } } public void ignore() { _ignore = true; } public boolean isIgnore() { return _ignore; } public boolean isTextElement() { return _textElement; } protected boolean contextDependent() { return false; } public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); if (!_ignore) { // Turn off character escaping if so is wanted. final int esc = cpg.addInterfaceMethodref(OUTPUT_HANDLER, "setEscaping", "(Z)Z"); if (!_escaping) { il.append(methodGen.loadHandler()); il.append(new PUSH(cpg, false)); il.append(new INVOKEINTERFACE(esc, 2)); } il.append(methodGen.loadHandler()); // Call characters(String) or characters(char[],int,int), as // appropriate. if (!canLoadAsArrayOffsetLength()) { final int characters = cpg.addInterfaceMethodref(OUTPUT_HANDLER, "characters", "("+STRING_SIG+")V"); il.append(new PUSH(cpg, _text)); il.append(new INVOKEINTERFACE(characters, 2)); } else { final int characters = cpg.addInterfaceMethodref(OUTPUT_HANDLER, "characters", "([CII)V"); loadAsArrayOffsetLength(classGen, methodGen); il.append(new INVOKEINTERFACE(characters, 4)); } // Restore character escaping setting to whatever it was. // Note: setEscaping(bool) returns the original (old) value if (!_escaping) { il.append(methodGen.loadHandler()); il.append(SWAP); il.append(new INVOKEINTERFACE(esc, 2)); il.append(POP); } } translateContents(classGen, methodGen); } /** * Check whether this Text node can be stored in a char[] in the translet. * Calling this is precondition to calling loadAsArrayOffsetLength. * @see #loadAsArrayOffsetLength(ClassGenerator,MethodGenerator) * @return true if this Text node can be */ public boolean canLoadAsArrayOffsetLength() { // Magic number! 21845*3 == 65535. BCEL uses a DataOutputStream to // serialize class files. The Java run-time places a limit on the size // of String data written using a DataOutputStream - it cannot require // more than 64KB when represented as UTF-8. The number of bytes // required to represent a Java string as UTF-8 cannot be greater // than three times the number of char's in the string, hence the // check for 21845. return (_text.length() <= 21845); } /** * Generates code that loads the array that will contain the character * data represented by this Text node, followed by the offset of the * data from the start of the array, and then the length of the data. * * The pre-condition to calling this method is that * canLoadAsArrayOffsetLength() returns true. * @see #canLoadArrayOffsetLength() */ public void loadAsArrayOffsetLength(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); final XSLTC xsltc = classGen.getParser().getXSLTC(); // The XSLTC object keeps track of character data // that is to be stored in char arrays. final int offset = xsltc.addCharacterData(_text); final int length = _text.length(); String charDataFieldName = STATIC_CHAR_DATA_FIELD + (xsltc.getCharacterDataCount()-1); il.append(new GETSTATIC(cpg.addFieldref(xsltc.getClassName(), charDataFieldName, STATIC_CHAR_DATA_FIELD_SIG))); il.append(new PUSH(cpg, offset)); il.append(new PUSH(cpg, _text.length())); } }
[ "pu_yang@outlook.com" ]
pu_yang@outlook.com
05e338cc6fd310effa0dae809c557d1d1f55dcb1
c1649ec9e0b4eec94010dc9acd81d6d1cf44557d
/parentTest/src/main/java/com/main/learn/designModel/structuralModel/proxy/GamePlayerProxy.java
72478cd7d48ae669ec7167442de50ae70070d034
[]
no_license
loveofyou1/workLearning
e1325d36673cc5710dc0cb20b1f958423f8f2f6a
8329cec9bfb6fbe263e8fc9701b276429ff9d3ee
refs/heads/master
2022-11-20T20:44:09.782891
2020-12-07T01:19:38
2020-12-07T01:19:38
125,325,214
0
1
null
2022-11-16T12:35:01
2018-03-15T06:55:01
Java
UTF-8
Java
false
false
1,052
java
package com.main.learn.designModel.structuralModel.proxy; import com.main.learn.designModel.structuralModel.proxy.impl.GamePlayer; import com.main.learn.designModel.structuralModel.proxy.service.IGamePlayer; import com.main.learn.designModel.structuralModel.proxy.service.IProxy; public class GamePlayerProxy implements IGamePlayer, IProxy { private IGamePlayer iGamePlayer = null; public GamePlayerProxy(IGamePlayer gamePlayer) { iGamePlayer = gamePlayer; } public GamePlayerProxy(String name1) { try { iGamePlayer = new GamePlayer(name1); } catch (Exception e) { e.printStackTrace(); } } @Override public void login(String user, String password) { iGamePlayer.login(user, password); } @Override public void killBoss() { iGamePlayer.killBoss(); } @Override public void upgrade() { iGamePlayer.upgrade(); } @Override public void count() { System.out.println("count is five dollar"); } }
[ "sunlei19@jd.com" ]
sunlei19@jd.com
bfccd9ed438b3d7676fe9ec7f101f51a4e68cb70
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_333/Testnull_33235.java
3e387aaff64f1c57a63ed6b31cb9fa7ace2eef11
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_333; import static org.junit.Assert.*; public class Testnull_33235 { private final Productionnull_33235 production = new Productionnull_33235("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
295331caa197997dbd36be482f2842c24f326f8c
32bd505bfed24ad0ae0f88b9c754a608cc1da8a6
/grafikon-ls4/src/main/java/net/parostroj/timetable/model/ls/impl4/LSSerializer.java
4fcf6484198216ad1aeb4a186a4d0e88c99c22c6
[]
no_license
ranou712/grafikon
95741773bd55f93f88cf9434e47cfcb5b2627712
d2c86a8c7d547459ada470b59f70338958c1cb6d
refs/heads/master
2020-04-25T20:44:34.359331
2015-03-17T15:09:38
2015-03-17T15:09:38
33,311,917
0
0
null
null
null
null
UTF-8
Java
false
false
3,581
java
package net.parostroj.timetable.model.ls.impl4; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.UnsupportedEncodingException; import java.io.Writer; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; import javax.xml.transform.stream.StreamSource; import net.parostroj.timetable.model.ls.LSException; /** * LSSerializer for versions 4.x. * * @author jub */ public class LSSerializer { public static final boolean FORMATTED = true; private static JAXBContext context_i; private Marshaller marshaller; private Unmarshaller unmarshaller; private final boolean formatted; private synchronized static JAXBContext getContext() throws JAXBException { if (context_i == null) { context_i = JAXBContext.newInstance(new Class[]{ LSTrainDiagram.class, LSNet.class, LSRoute.class, LSTrainType.class, LSTrain.class, LSTrainsCycle.class, LSImage.class, LSTrainsData.class, LSEngineClass.class, LSPenaltyTable.class, LSTextItem.class, LSDiagramChangeSet.class, LSOutputTemplate.class, LSFreightNet.class, LSLocalization.class }); } return context_i; } public LSSerializer() throws LSException { this(FORMATTED); } public LSSerializer(boolean formatted) throws LSException { try { JAXBContext context = getContext(); marshaller = context.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, formatted); unmarshaller = context.createUnmarshaller(); this.formatted = formatted; } catch (JAXBException e) { throw new LSException("Cannot initialize JAXB context.", e); } } public <T> T load(InputStream in, Class<T> clazz) throws LSException { try { Reader reader = new NoCloseAllowedReader(new InputStreamReader(in, "utf-8")); return unmarshaller.unmarshal(new StreamSource(reader), clazz).getValue(); } catch (UnsupportedEncodingException e) { throw new LSException("Cannot save train diagram: Unsupported enconding.", e); } catch (JAXBException e) { throw new LSException("Cannot save train diagram: JAXB exception.", e); } } public Object load(InputStream in) throws LSException { try { Reader reader = new NoCloseAllowedReader(new InputStreamReader(in, "utf-8")); return unmarshaller.unmarshal(reader); } catch (UnsupportedEncodingException e) { throw new LSException("Cannot save train diagram: Unsupported enconding.", e); } catch (JAXBException e) { throw new LSException("Cannot save train diagram: JAXB exception.", e); } } public <T> void save(OutputStream out, T saved) throws LSException { Writer writer = null; try { writer = new OutputStreamWriter(out, "utf-8"); marshaller.marshal(saved, writer); } catch (UnsupportedEncodingException e) { throw new LSException("Cannot save train diagram: Unsupported enconding.", e); } catch (JAXBException e) { throw new LSException("Cannot save train diagram: JAXB exception.", e); } } public boolean isFormatted() { return formatted; } }
[ "jub@parostroj.net" ]
jub@parostroj.net
5ea9e0e42f0b0cf34e9ee716a7d020f5bedecfc3
d2b62ff1c6b197b0d4dc84fdf962d3916f8df868
/SceTris MyCourses/Iteration 3 (Integration Scheduler and Webapp)/svn tag iteration3/src/de/fu/weave/util/Array.java
12ddbe22ae6f9e0a07b03e0f4ab0980006d12909
[]
no_license
scravy/SceTris
51247efb21c5885c74dc44fe8e344ca8db79c963
29497641a2dafb7836a1e6d0d64ad411e79cdfaa
refs/heads/master
2021-01-25T06:36:38.365033
2012-11-01T13:55:30
2012-11-01T13:55:30
1,563,487
0
0
null
null
null
null
UTF-8
Java
false
false
718
java
/* Tupel.java / 2:44:23 PM * Part of SCORE myCourses * * Team Scetris: David Bialik, Julian Fleischer, * Hagen Mahnke, Konrad Reiche, André Zoufahl */ package de.fu.weave.util; /** * * @author Julian Fleischer * @since Iteration4 */ public class Array<A> { /** * * @param <A> * @param elements * @return * @since Iteration4 */ public static <A> A[] array(final A... elements) { return new Array<A>(elements).get(); } /** * */ private final A[] elements; /** * * @param elements * @since Iteration4 */ private Array(final A... elements) { this.elements = elements; } /** * * @return * @since Iteration4 */ private A[] get() { return elements; } }
[ "julian.fleischer@fu-berlin.de" ]
julian.fleischer@fu-berlin.de
32e190b868b59a513d33684355a2f102f338ff34
15448fc168098b8adc44c5905bd861adfd1832b7
/ejbca/modules/ejbca-ejb-cli/src/org/ejbca/ui/cli/EncryptPwdCommand.java
030d03656d1041f514a192aeb3e77b94802f161b
[]
no_license
gangware72/Ejbca-Sample
d9ff359d0c3a675ca7e487bb181f4cdb101c123b
821d126072f38225ae321ec45011a5d72750e97a
refs/heads/main
2023-07-19T22:35:36.414622
2021-08-19T23:17:28
2021-08-19T23:17:28
398,092,842
1
0
null
null
null
null
UTF-8
Java
false
false
3,638
java
/************************************************************************* * * * EJBCA Community: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.ejbca.ui.cli; import org.apache.log4j.Logger; import org.cesecore.util.CryptoProviderTools; import org.cesecore.util.StringTools; import org.ejbca.ui.cli.infrastructure.command.CommandResult; import org.ejbca.ui.cli.infrastructure.command.EjbcaCommandBase; import org.ejbca.ui.cli.infrastructure.parameter.Parameter; import org.ejbca.ui.cli.infrastructure.parameter.ParameterContainer; import org.ejbca.ui.cli.infrastructure.parameter.enums.MandatoryMode; import org.ejbca.ui.cli.infrastructure.parameter.enums.ParameterMode; import org.ejbca.ui.cli.infrastructure.parameter.enums.StandaloneMode; /** * Implements the password encryption mechanism * * @version $Id$ */ public class EncryptPwdCommand extends EjbcaCommandBase { private static final Logger log = Logger.getLogger(EncryptPwdCommand.class); private static final String ENCRYPT_KEY = "--key"; { registerParameter(new Parameter(ENCRYPT_KEY, "Input encryption key", MandatoryMode.OPTIONAL, StandaloneMode.FORBID, ParameterMode.FLAG, "Read a custom encryption key instead of using the default value from cesecore.properties.")); } @Override public String getMainCommand() { return "encryptpwd"; } @Override public String getCommandDescription() { return "Encrypts a password"; } @Override public String getFullHelpText() { return "Encrypts a password. This command takes no parameters, but will instead prompt for the password when run."; } @Override public CommandResult execute(ParameterContainer parameters) { final boolean readKey = parameters.get(ENCRYPT_KEY) != null; log.info("Please note that this encryption does not provide absolute security. " + "If 'password.encryption.key' property haven't been customized it doesn't provide more security than just preventing accidental viewing."); char[] encryptionKey = null; if (readKey) { log.info("Enter encryption key: "); encryptionKey = System.console().readPassword(); } log.info("Enter word to encrypt: "); String s = String.valueOf(System.console().readPassword()); CryptoProviderTools.installBCProvider(); log.info("Encrypting pwd (" + (readKey ? "with custom key" : "with default key") + ")"); final String enc; if (readKey) { enc = StringTools.pbeEncryptStringWithSha256Aes192(s, encryptionKey); } else { enc = StringTools.pbeEncryptStringWithSha256Aes192(s); } log.info(enc); return CommandResult.SUCCESS; } @Override protected Logger getLogger() { return log; } }
[ "edgar.gangware@cradlepoint.com" ]
edgar.gangware@cradlepoint.com
4e676dee8256caac16a457280f6a4611c813fe6b
b9c87800003dba73c504635bbe6204e17c76491e
/src/main/java/com/hsae/ims/repository/AttenceReportCountRepository.java
22d103769ddea1345b1a8596d7066a5907645309
[]
no_license
zhaoyang0501/ims
8cd064adf8b520c02c7c61b55908eead273c978b
86c47cdb00a7f5812b0f74e8dbd21014684a1859
refs/heads/master
2016-09-15T17:44:33.995712
2015-12-21T09:17:05
2015-12-21T09:21:14
37,315,929
0
0
null
null
null
null
UTF-8
Java
false
false
4,673
java
package com.hsae.ims.repository; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.PersistenceUnit; import javax.persistence.Query; import org.springframework.stereotype.Repository; @Repository public class AttenceReportCountRepository { @PersistenceUnit private EntityManagerFactory entityManagerFactory; /** * 部门加班工时统计 * type:* 1 平时 2 周末 3 假日 */ @SuppressWarnings("unchecked") public List<Object[]> findAttenceOvertimeStatics(String fromDate, String toDate, String type){ StringBuffer sb = new StringBuffer("SELECT d.id AS deptId,d.name AS deptName,hours FROM ims_system_deptment d "+ "LEFT JOIN (SELECT o.overtime_type,sum(o.check_hours) AS hours,o.overtime_date,u.dept "+ "FROM ims_system_user u INNER JOIN ims_attence_overtime o ON o.user = u.id "+ "WHERE o.overtime_date BETWEEN :fromDate AND :toDate AND o.overtime_type = :type "+ "GROUP BY u.dept)jb ON d.id = jb.dept WHERE d.id NOT IN ('1')ORDER BY d.id ASC"); EntityManager em = entityManagerFactory.createEntityManager(); Query query = null; query = em.createNativeQuery(sb.toString()); query.setParameter("fromDate", fromDate); query.setParameter("toDate", toDate); query.setParameter("type", type); List<Object[]> list = query.getResultList(); em.clear(); em.close(); return list; } /** * 部门请假工时统计 * type: 30调休假 40事假 80产假 100哺乳假 110陪产假 。 */ @SuppressWarnings("unchecked") public List<Object[]> findAttenceDayoffStatics(String fromDate, String toDate, String type){ StringBuffer sb = new StringBuffer("SELECT d.id,d.name AS deptName,hours FROM ims_system_deptment d "+ "LEFT JOIN (SELECT o.dayoff_type,sum(o.spend_hours) AS hours,o.dayoff_date,u.dept "+ "FROM ims_system_user u INNER JOIN ims_attence_dayoff o ON o.user = u.id "+ "WHERE o.dayoff_date BETWEEN :fromDate AND :toDate AND o.dayoff_type = :type "+ //1 调休 2 事假 3 产假 4 哺乳假 5 陪护假*/ "GROUP BY u.dept) jb ON d.id = jb.dept WHERE d.id NOT IN ('1')ORDER BY d.id ASC"); EntityManager em = entityManagerFactory.createEntityManager(); Query query = null; query = em.createNativeQuery(sb.toString()); query.setParameter("fromDate", fromDate); query.setParameter("toDate", toDate); query.setParameter("type", type); List<Object[]> list = query.getResultList(); em.clear(); em.close(); return list; } /** * 部门补签卡工时统计 */ @SuppressWarnings("unchecked") public List<Object[]> findAttenceAbsenteeStatics(String fromDate, String toDate){ StringBuffer sb = new StringBuffer("SELECT d.id AS deptId,d.name AS deptName,absenteeCount FROM ims_system_deptment d "+ "LEFT JOIN (SELECT COUNT(o.absentee_date) AS absenteeCount,o.absentee_date,u.dept FROM ims_system_user u "+ "INNER JOIN ims_attence_absentee o ON o.user = u.id WHERE o.absentee_date BETWEEN :fromDate AND :toDate "+ "GROUP BY u.dept) jb ON d.id = jb.dept WHERE d.id NOT IN ('1')ORDER BY d.id ASC"); EntityManager em = entityManagerFactory.createEntityManager(); Query query = null; query = em.createNativeQuery(sb.toString()); query.setParameter("fromDate", fromDate); query.setParameter("toDate", toDate); List<Object[]> list = query.getResultList(); em.clear(); em.close(); return list; } /** * 个人请假加班次数统计 */ @SuppressWarnings("unchecked") public List<Object[]> findAttenceUserCountState(String fromDate, String toDate, Long pmId){ String add = ""; if (!pmId.equals("") && pmId != null && pmId != 0){ add = "AND o.`user` ="+pmId; } StringBuffer sb = new StringBuffer("SELECT o.`user`,count(o.overtime_date) AS overtimeCount,count(d.dayoff_date) AS dayoffCount,count(o.check_hours),o.overtime_date "+ "FROM ims_attence_overtime o LEFT JOIN ims_attence_dayoff d ON o.`user` = d.`user` "+ "WHERE (o.overtime_date BETWEEN :fromDate AND :toDate OR d.dayoff_date BETWEEN :fromDate AND :toDate) "+add+ " GROUP BY o.`user` ORDER BY overtimeCount DESC LIMIT 0,6"); EntityManager em = entityManagerFactory.createEntityManager(); Query query = null; query = em.createNativeQuery(sb.toString()); query.setParameter("fromDate", fromDate); query.setParameter("toDate", toDate); List<Object[]> list = query.getResultList(); em.clear(); em.close(); return list; } }
[ "zhaoyang0501@126.com" ]
zhaoyang0501@126.com
a0bae19aa5daae56d1745fd2d122dc2fbeaa65fc
0d3642688fa36edb5a73666752c07cacca5b1995
/src/main/java/com/bogdan/HybernateDemo/Example5/FirstLevelCeaching/App.java
8227dfc0a0083db844558ca5168de0aa5c892c60
[]
no_license
Ceachi/Hibernate-Tutorial
024a52b9a3757625b042c4e0d0933751010db97a
479a2a01e46ca4cfb5df788c8c25d76f8bdf909d
refs/heads/master
2020-03-17T05:21:26.976706
2018-05-14T06:14:17
2018-05-14T06:14:17
133,313,159
0
0
null
null
null
null
UTF-8
Java
false
false
3,796
java
package com.bogdan.HybernateDemo.Example5.FirstLevelCeaching; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistry; import com.bogdan.HybernateDemo.Example1.Alien; /* TEORIE * * CLIENT --> SERVER (are un cach el) -----> BD * * cand vrei sa faci o interogare (select) pe o sesiune el se duce in BD. * ca sa nu faci interogarea aia de foarte multe ori, Hybernate, default * iti face un asa numit First Level Caching si iit pune in server interogarea respectiva( ca un fel de buffer), * astfel incat cand dai din nou acelasi query, el se uita mai intai in First Level caching sa verifice daca este acolo, * daca da, il ia pe acela, => o sa ai 1 singura interogare * * De retinut: fiecare sesiune are propria sa First Level Caching, deci daca ai mai multe sesiuni, * fiecare are propriul sau First Level Caching. * Daca ai mai multe sesiuni, mai exista un asa numit Second Level Caching, care este un cach sharuit intre sesiuni * * De exemplu First Level Cach: * obj = session1.get(query) * ------ * obj2 = session1.get(query) // acelasi query * * - in cazul asta ( fiind pe aceeiasi sesiune) * - prima interogare se uita in First L Cach, vede daca exista interogarea, daca nu exista * se duce in Second Level Cach, daca nici acolo nu exista, se duce in Bd, face interogarea si o pune in First Level cach * * - la a doua interogare, se uita in First Level Cach, vede interogarea si o executa. * * Rezultat = daca o sa dai, obj si obj2 sunt 2 obiecte separate, dar query-ul se executa 1 SINGURA DATA PE SESINE * * */ public class App { //IN ACEST EXEMPLU NE FOLOSIM DE CLASELE DIN PACHETUL EXEMPLU1 PENTRU SIMPLITATE public static void main(String[] args) { SessionFactory sessionFactory = null; Session session1 = null; Session session2 = null; Alien alien = null; Configuration con = new Configuration().configure().addAnnotatedClass(Alien.class); ServiceRegistry reg = new StandardServiceRegistryBuilder().applySettings(con.getProperties()).build(); sessionFactory = con.buildSessionFactory(reg); session1 = sessionFactory.openSession(); session1.beginTransaction(); alien = session1.get(Alien.class, 105); System.out.println(alien); alien = session1.get(Alien.class, 105); System.out.println(alien); /* * Rezultat: * Hibernate: select alien0_.aid as aid1_0_0_, alien0_.aname as aname2_0_0_, alien0_.alien_color as alien_co3_0_0_ from alien_table alien0_ where alien0_.aid=? Alien [aid=105, aname=R2D2, color=GREEN] Alien [aid=105, aname=R2D2, color=GREEN] se objerva ca s-a efectuat 1 singur query */ session1.getTransaction().commit(); session1.close(); // mai facem o sesiune session2 = sessionFactory.openSession(); session2.beginTransaction(); alien = session2.get(Alien.class, 105); System.out.println(alien); /* * Hibernate: select alien0_.aid as aid1_0_0_, alien0_.aname as aname2_0_0_, alien0_.alien_color as alien_co3_0_0_ from alien_table alien0_ where alien0_.aid=? Alien [aid=105, aname=R2D2, color=GREEN] Alien [aid=105, aname=R2D2, color=GREEN] Hibernate: select alien0_.aid as aid1_0_0_, alien0_.aname as aname2_0_0_, alien0_.alien_color as alien_co3_0_0_ from alien_table alien0_ where alien0_.aid=? Alien [aid=105, aname=R2D2, color=GREEN] * * Se observa ca interogarea s-a efectuat inca o data * */ session2.getTransaction().commit(); session2.close(); } }
[ "bogdan.ceachi@ibm.com" ]
bogdan.ceachi@ibm.com
f4fdd66ed9eafa600da203fd7348542737e34515
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator2061.java
79ff03d4e157eae2201bcd4d91f8b644bcbf796d
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator2061 { public int execute(int temperatureDifference2061, boolean boilerStatus2061) { //sync _bfpnGUbFEeqXnfGWlV2061, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
468290c1e5529a3424f7ac7cf4180d16c1bfa793
fcef9fb065efed921c26866896004b138d9d92cd
/neembuu-android/srcs/output_jar.src/twitter4j/StatusDeletionNotice.java
5f9e14d2f2817f298df1698d0f8c6327347a458c
[]
no_license
Neembuu/neembuunow
46e92148fbea68d31688a64452d9934e619cc1b2
b73c46465ab05c28ae6aa3f1e04a35a57d9b1d96
refs/heads/master
2016-09-05T10:02:01.613898
2014-07-10T18:30:28
2014-07-10T18:30:28
22,336,524
2
2
null
null
null
null
UTF-8
Java
false
false
416
java
package twitter4j; import java.io.Serializable; public abstract interface StatusDeletionNotice extends Comparable<StatusDeletionNotice>, Serializable { public abstract long getStatusId(); public abstract long getUserId(); } /* Location: F:\neembuu\Research\android_apps\output_jar.jar * Qualified Name: twitter4j.StatusDeletionNotice * JD-Core Version: 0.7.0.1 */
[ "pasdavide@gmail.com" ]
pasdavide@gmail.com
30397891d40444ca4bcac38b00dc33738c72a5b6
f8a07eb1e0ced852d6ff7acf87e895fd8d65d1e8
/src/main/java/com/tencentcloudapi/tiw/v20190919/models/SetWhiteboardPushCallbackKeyRequest.java
35b5dee4d0e2e3bd733123aeddb59874a854b212
[ "Apache-2.0" ]
permissive
xiuxiupanna/tencentcloud-sdk-java
2506c43a5b5f71224d8bba3cf35a679a4387402e
29d5de47f781d0fe4d20c0e4e35f42b28e2a88b7
refs/heads/master
2023-04-18T04:07:10.777701
2021-05-04T03:17:38
2021-05-04T03:17:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,147
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.tiw.v20190919.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class SetWhiteboardPushCallbackKeyRequest extends AbstractModel{ /** * 应用的SdkAppId */ @SerializedName("SdkAppId") @Expose private Long SdkAppId; /** * 设置白板推流回调鉴权密钥,最长64字符,如果传入空字符串,那么删除现有的鉴权回调密钥。回调鉴权方式请参考文档:https://cloud.tencent.com/document/product/1137/40257 */ @SerializedName("CallbackKey") @Expose private String CallbackKey; /** * Get 应用的SdkAppId * @return SdkAppId 应用的SdkAppId */ public Long getSdkAppId() { return this.SdkAppId; } /** * Set 应用的SdkAppId * @param SdkAppId 应用的SdkAppId */ public void setSdkAppId(Long SdkAppId) { this.SdkAppId = SdkAppId; } /** * Get 设置白板推流回调鉴权密钥,最长64字符,如果传入空字符串,那么删除现有的鉴权回调密钥。回调鉴权方式请参考文档:https://cloud.tencent.com/document/product/1137/40257 * @return CallbackKey 设置白板推流回调鉴权密钥,最长64字符,如果传入空字符串,那么删除现有的鉴权回调密钥。回调鉴权方式请参考文档:https://cloud.tencent.com/document/product/1137/40257 */ public String getCallbackKey() { return this.CallbackKey; } /** * Set 设置白板推流回调鉴权密钥,最长64字符,如果传入空字符串,那么删除现有的鉴权回调密钥。回调鉴权方式请参考文档:https://cloud.tencent.com/document/product/1137/40257 * @param CallbackKey 设置白板推流回调鉴权密钥,最长64字符,如果传入空字符串,那么删除现有的鉴权回调密钥。回调鉴权方式请参考文档:https://cloud.tencent.com/document/product/1137/40257 */ public void setCallbackKey(String CallbackKey) { this.CallbackKey = CallbackKey; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "SdkAppId", this.SdkAppId); this.setParamSimple(map, prefix + "CallbackKey", this.CallbackKey); } }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
0045a25c47850b16028d262b3c44e75c70c63f68
3699b45d47014fb71a9cd9d50159eb55bb637cb3
/src/generated/java/com/sphenon/basics/many/tplinst/Navigatable_IteratorItemIndex_Object_String__.java
d46dd64c878e1e7ecaeea55d340f0c5314487a15
[ "Apache-2.0" ]
permissive
616c/java-com.sphenon.components.basics.many
0d78a010db033e54a46d966123ed2d15f72a5af4
918e6e1e1f2ef4bdae32a8318671500ed20910bb
refs/heads/master
2020-03-22T05:45:56.259576
2018-07-06T16:19:40
2018-07-06T16:19:40
139,588,622
0
0
null
null
null
null
UTF-8
Java
false
false
1,255
java
// instantiated with javainst.pl from /workspace/sphenon/projects/components/basics/many/v0001/origin/source/java/com/sphenon/basics/many/templates/Navigatable.javatpl /**************************************************************************** Copyright 2001-2018 Sphenon 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. *****************************************************************************/ // please do not modify this file directly package com.sphenon.basics.many.tplinst; import com.sphenon.basics.context.*; import com.sphenon.basics.exception.*; import com.sphenon.basics.many.returncodes.*; public interface Navigatable_IteratorItemIndex_Object_String__ { public IteratorItemIndex_Object_String_ getNavigator (CallContext context); }
[ "adev@leue.net" ]
adev@leue.net
4e4225c661183830bbcbd8283d7feba2bc71e0b9
f6dfca64f44768ee4a7bae588b506d27a2c01d0a
/core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT409Field.java
cf798d5ad41e0f6e372dca9bfc006ce50418b1c3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
isghe/bc-java
d027fdd7f350b4c2dd69fea537cdfd2446399ee9
430c0b8d3ee24b4f8ffffcb51c41e060746ac378
refs/heads/master
2020-12-30T18:38:36.494989
2015-08-07T09:06:32
2015-08-07T09:06:32
40,734,778
1
0
null
2015-08-14T20:30:43
2015-08-14T20:30:43
null
UTF-8
Java
false
false
6,363
java
package org.bouncycastle.math.ec.custom.sec; import java.math.BigInteger; import org.bouncycastle.math.raw.Interleave; import org.bouncycastle.math.raw.Nat; import org.bouncycastle.math.raw.Nat448; public class SecT409Field { private static final long M25 = -1L >>> 39; private static final long M59 = -1L >>> 5; public static void add(long[] x, long[] y, long[] z) { z[0] = x[0] ^ y[0]; z[1] = x[1] ^ y[1]; z[2] = x[2] ^ y[2]; z[3] = x[3] ^ y[3]; z[4] = x[4] ^ y[4]; z[5] = x[5] ^ y[5]; z[6] = x[6] ^ y[6]; } public static void addExt(long[] xx, long[] yy, long[] zz) { for (int i = 0; i < 13; ++i) { zz[i] = xx[i] ^ yy[i]; } } public static void addOne(long[] x, long[] z) { z[0] = x[0] ^ 1L; z[1] = x[1]; z[2] = x[2]; z[3] = x[3]; z[4] = x[4]; z[5] = x[5]; z[6] = x[6]; } public static long[] fromBigInteger(BigInteger x) { long[] z = Nat448.fromBigInteger64(x); reduce39(z, 0); return z; } public static void multiply(long[] x, long[] y, long[] z) { long[] tt = Nat448.createExt64(); implMultiply(x, y, tt); reduce(tt, z); } public static void multiplyAddToExt(long[] x, long[] y, long[] zz) { long[] tt = Nat448.createExt64(); implMultiply(x, y, tt); addExt(zz, tt, zz); } public static void reduce(long[] xx, long[] z) { long x00 = xx[0], x01 = xx[1], x02 = xx[2], x03 = xx[3]; long x04 = xx[4], x05 = xx[5], x06 = xx[6], x07 = xx[7]; long u = xx[12]; x05 ^= (u << 39); x06 ^= (u >>> 25) ^ (u << 62); x07 ^= (u >>> 2); u = xx[11]; x04 ^= (u << 39); x05 ^= (u >>> 25) ^ (u << 62); x06 ^= (u >>> 2); u = xx[10]; x03 ^= (u << 39); x04 ^= (u >>> 25) ^ (u << 62); x05 ^= (u >>> 2); u = xx[9]; x02 ^= (u << 39); x03 ^= (u >>> 25) ^ (u << 62); x04 ^= (u >>> 2); u = xx[8]; x01 ^= (u << 39); x02 ^= (u >>> 25) ^ (u << 62); x03 ^= (u >>> 2); u = x07; x00 ^= (u << 39); x01 ^= (u >>> 25) ^ (u << 62); x02 ^= (u >>> 2); long t = x06 >>> 25; z[0] = x00 ^ t; z[1] = x01 ^ (t << 23); z[2] = x02; z[3] = x03; z[4] = x04; z[5] = x05; z[6] = x06 & M25; } public static void reduce39(long[] z, int zOff) { long z6 = z[zOff + 6], t = z6 >>> 25; z[zOff ] ^= t; z[zOff + 1] ^= (t << 23); z[zOff + 6] = z6 & M25; } public static void square(long[] x, long[] z) { long[] tt = Nat.create64(13); implSquare(x, tt); reduce(tt, z); } public static void squareAddToExt(long[] x, long[] zz) { long[] tt = Nat.create64(13); implSquare(x, tt); addExt(zz, tt, zz); } public static void squareN(long[] x, int n, long[] z) { // assert n > 0; long[] tt = Nat.create64(13); implSquare(x, tt); reduce(tt, z); while (--n > 0) { implSquare(z, tt); reduce(tt, z); } } protected static void implCompactExt(long[] zz) { long z00 = zz[ 0], z01 = zz[ 1], z02 = zz[ 2], z03 = zz[ 3], z04 = zz[ 4], z05 = zz[ 5], z06 = zz[ 6]; long z07 = zz[ 7], z08 = zz[ 8], z09 = zz[ 9], z10 = zz[10], z11 = zz[11], z12 = zz[12], z13 = zz[13]; zz[ 0] = z00 ^ (z01 << 59); zz[ 1] = (z01 >>> 5) ^ (z02 << 54); zz[ 2] = (z02 >>> 10) ^ (z03 << 49); zz[ 3] = (z03 >>> 15) ^ (z04 << 44); zz[ 4] = (z04 >>> 20) ^ (z05 << 39); zz[ 5] = (z05 >>> 25) ^ (z06 << 34); zz[ 6] = (z06 >>> 30) ^ (z07 << 29); zz[ 7] = (z07 >>> 35) ^ (z08 << 24); zz[ 8] = (z08 >>> 40) ^ (z09 << 19); zz[ 9] = (z09 >>> 45) ^ (z10 << 14); zz[10] = (z10 >>> 50) ^ (z11 << 9); zz[11] = (z11 >>> 55) ^ (z12 << 4) ^ (z13 << 63); zz[12] = (z12 >>> 60) ^ (z13 >>> 1); zz[13] = 0; } protected static void implExpand(long[] x, long[] z) { long x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6]; z[0] = x0 & M59; z[1] = ((x0 >>> 59) ^ (x1 << 5)) & M59; z[2] = ((x1 >>> 54) ^ (x2 << 10)) & M59; z[3] = ((x2 >>> 49) ^ (x3 << 15)) & M59; z[4] = ((x3 >>> 44) ^ (x4 << 20)) & M59; z[5] = ((x4 >>> 39) ^ (x5 << 25)) & M59; z[6] = ((x5 >>> 34) ^ (x6 << 30)); } protected static void implMultiply(long[] x, long[] y, long[] zz) { long[] a = new long[7], b = new long[7]; implExpand(x, a); implExpand(y, b); for (int i = 0; i < 7; ++i) { implMulwAcc(a, b[i], zz, i); } implCompactExt(zz); } protected static void implMulwAcc(long[] xs, long y, long[] z, int zOff) { // assert y >>> 59 == 0; long[] u = new long[8]; // u[0] = 0; u[1] = y; u[2] = u[1] << 1; u[3] = u[2] ^ y; u[4] = u[2] << 1; u[5] = u[4] ^ y; u[6] = u[3] << 1; u[7] = u[6] ^ y; for (int i = 0; i < 7; ++i) { long x = xs[i]; // assert x >>> 59 == 0; int j = (int)x; long g, h = 0, l = u[j & 7] ^ (u[(j >>> 3) & 7] << 3); int k = 54; do { j = (int)(x >>> k); g = u[j & 7] ^ u[(j >>> 3) & 7] << 3; l ^= (g << k); h ^= (g >>> -k); } while ((k -= 6) > 0); // assert h >>> 53 == 0; z[zOff + i ] ^= l & M59; z[zOff + i + 1] ^= (l >>> 59) ^ (h << 5); } } protected static void implSquare(long[] x, long[] zz) { for (int i = 0; i < 6; ++i) { Interleave.expand64To128(x[i], zz, i << 1); } zz[12] = Interleave.expand32to64((int)x[6]); } }
[ "peter.dettman@bouncycastle.org" ]
peter.dettman@bouncycastle.org
81333086e97225426fffda8cdc5dcf528b6621db
b33efbf02d32b0fb40b383ab370d7865a7ef3713
/day19_05_zongjie/src/com/zhou/web/LoginServlet.java
235ecabdd945ac8c80e3893befccd122fee1bed6
[]
no_license
supermaniszhou/study-java
33d496a4d0d7d37c729b471282d257d849f23844
a0357020768512596f59305539b49d060cd723d4
refs/heads/master
2022-11-25T16:00:35.931677
2020-09-16T06:28:04
2020-09-16T06:28:04
226,468,571
0
0
null
2022-11-15T23:53:26
2019-12-07T06:46:13
Java
UTF-8
Java
false
false
1,697
java
package com.zhou.web; import com.zhou.po.User; import com.zhou.service.UserService; import com.zhou.service.UserServiceImpl; import com.zhou.util.BeanFactoryUtil; import com.zhou.util.SecutityUtil; import javax.servlet.ServletException; import javax.servlet.http.*; import java.io.IOException; /** * 周刘成 2019-12-5 */ public class LoginServlet extends HttpServlet { // private UserService userService = BeanFactoryUtil.getBean(true, UserServiceImpl.class); private UserService userService = new UserServiceImpl(); @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doPost(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String username = req.getParameter("username"); String password = req.getParameter("password"); String h = SecutityUtil.Md5(password); User user = userService.findUser(username, h); if (null != user) { HttpSession session = req.getSession(); session.setAttribute("user", user); String remember = req.getParameter("remember"); if (remember != null) { Cookie cookie = new Cookie("loginInfo", SecutityUtil.encode(username) + "_" + SecutityUtil.Md5(password)); cookie.setMaxAge(Integer.MAX_VALUE); cookie.setPath(req.getContextPath()); resp.addCookie(cookie); } req.getRequestDispatcher("index.jsp").forward(req, resp); } else { resp.sendRedirect("login.jsp"); } } }
[ "741963634@qq.com" ]
741963634@qq.com
23b2bb67d70ccf15caa969b9bb7621294c80b4f0
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/serge-rider--dbeaver/14ccbfdbb68910ed9badbed7421e6980dc4defa8/after/StandardMetadataReader.java
76681ec1051edbdff6f9d01d2cc3d402771cf125
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,469
java
package org.jkiss.dbeaver.ext.generic.model.meta; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jkiss.dbeaver.ext.generic.GenericConstants; import org.jkiss.dbeaver.ext.generic.model.GenericStructContainer; import org.jkiss.dbeaver.ext.generic.model.GenericTable; import org.jkiss.dbeaver.model.impl.jdbc.JDBCConstants; import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils; import org.jkiss.utils.CommonUtils; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; /** * Standard metadata reader, uses column names from JDBC API spec */ public class StandardMetadataReader implements GenericMetadataReader { static final Log log = LogFactory.getLog(StandardMetadataReader.class); @Override public String fetchCatalogName(ResultSet dbResult) throws SQLException { String catalog = JDBCUtils.safeGetString(dbResult, JDBCConstants.TABLE_CAT); if (CommonUtils.isEmpty(catalog)) { // Some drivers uses TABLE_QUALIFIER instead of catalog catalog = JDBCUtils.safeGetStringTrimmed(dbResult, JDBCConstants.TABLE_QUALIFIER); } return catalog; } @Override public String fetchSchemaName(ResultSet dbResult, String catalog) throws SQLException { String schemaName = JDBCUtils.safeGetString(dbResult, JDBCConstants.TABLE_SCHEM); if (CommonUtils.isEmpty(schemaName)) { // some drivers uses TABLE_OWNER column instead of TABLE_SCHEM schemaName = JDBCUtils.safeGetString(dbResult, JDBCConstants.TABLE_OWNER); } return schemaName; } @Override public String fetchTableType(ResultSet dbResult) throws SQLException { return JDBCUtils.safeGetString(dbResult, JDBCConstants.TABLE_TYPE); } @Override public TableInfo fetchTable(ResultSet dbResult, GenericStructContainer container) throws SQLException { TableInfo tableInfo = new TableInfo(); tableInfo.tableName = JDBCUtils.safeGetStringTrimmed(dbResult, JDBCConstants.TABLE_NAME); tableInfo.tableType = JDBCUtils.safeGetStringTrimmed(dbResult, JDBCConstants.TABLE_TYPE); tableInfo.remarks = JDBCUtils.safeGetString(dbResult, JDBCConstants.REMARKS); if (!CommonUtils.isEmpty(tableInfo.tableName)) { tableInfo.systemTable = tableInfo.tableType != null && (tableInfo.tableType.toUpperCase().contains("SYSTEM") || tableInfo.tableName.contains("RDB$")); // [JDBC: Firebird] } return tableInfo; } @Override public TableColumnInfo fetchTableColumn(ResultSet dbResult, GenericTable table) throws SQLException { TableColumnInfo column = new TableColumnInfo(); column.columnName = JDBCUtils.safeGetStringTrimmed(dbResult, JDBCConstants.COLUMN_NAME); column.valueType = JDBCUtils.safeGetInt(dbResult, JDBCConstants.DATA_TYPE); column.sourceType = JDBCUtils.safeGetInt(dbResult, JDBCConstants.SOURCE_DATA_TYPE); column.typeName = JDBCUtils.safeGetStringTrimmed(dbResult, JDBCConstants.TYPE_NAME); column.columnSize = JDBCUtils.safeGetLong(dbResult, JDBCConstants.COLUMN_SIZE); column.isNotNull = JDBCUtils.safeGetInt(dbResult, JDBCConstants.NULLABLE) == DatabaseMetaData.columnNoNulls; column.scale = JDBCUtils.safeGetInt(dbResult, JDBCConstants.DECIMAL_DIGITS); column.precision = 0;//GenericUtils.safeGetInt(dbResult, JDBCConstants.COLUMN_); column.radix = JDBCUtils.safeGetInt(dbResult, JDBCConstants.NUM_PREC_RADIX); column.defaultValue = JDBCUtils.safeGetString(dbResult, JDBCConstants.COLUMN_DEF); column.remarks = JDBCUtils.safeGetString(dbResult, JDBCConstants.REMARKS); column.charLength = JDBCUtils.safeGetLong(dbResult, JDBCConstants.CHAR_OCTET_LENGTH); column.ordinalPos = JDBCUtils.safeGetInt(dbResult, JDBCConstants.ORDINAL_POSITION); column.autoIncrement = "YES".equals(JDBCUtils.safeGetStringTrimmed(dbResult, JDBCConstants.IS_AUTOINCREMENT)); // Check for identity modifier [DBSPEC: MS SQL] if (column.typeName.toUpperCase().endsWith(GenericConstants.TYPE_MODIFIER_IDENTITY)) { column.autoIncrement = true; column.typeName = column.typeName.substring(0, column.typeName.length() - GenericConstants.TYPE_MODIFIER_IDENTITY.length()); } return column; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
f8c3426784f8c46fa20d768f5047e49621e3ccdd
f21f0e2385bd9292659f5c98940ee2b53b699517
/Java/GameProgBlog-Article-UI/Source/com/gameprogblog/engine/ui/Tile.java
68e95ff229c67a514db5ec4bb84efec95bce568c
[]
no_license
ClickerMonkey/gameprogblog
31586d5af15f4dbe06f01ad77ebf7baec1488d4a
d8048f16660ed903cc03d198c338cfd80f264540
refs/heads/master
2021-06-06T22:48:12.023345
2018-05-20T06:32:24
2018-05-20T06:32:24
20,724,426
4
1
null
null
null
null
UTF-8
Java
false
false
657
java
package com.gameprogblog.engine.ui; public class Tile { public Image image; public int l, t, r, b; public Tile() { } public Tile(Image image) { set( image ); } public Tile(Image image, int l, int t, int r, int b) { set( image, l, t, r, b ); } public void set(Image image) { set( image, 0, 0, image.getWidth(), image.getHeight() ); } public void set(Image image, int l, int t, int r, int b) { this.image = image; this.l = l; this.t = t; this.r = r; this.b = b; } public int getWidth() { return (r - l); } public int getHeight() { return (b - t); } }
[ "pdiffenderfer@gmail.com" ]
pdiffenderfer@gmail.com
544064d79f9357a1ac21f942fbd1a68d91b021bb
5a97dd547bbe1f19a7f3fc467c138eb79a768f08
/app/src/main/java/np/com/surazgyawali/listme/models/Post.java
cbbd3162dd09d09a36ec5774c451d29343a5fd0d
[]
no_license
surazgyawali/Android-List-Me
a878552fc13d01dbb032b9167e65becf2529170c
8791760eb1d44916ceb1d78f82a6849894e48e36
refs/heads/master
2021-07-24T09:01:02.052282
2017-11-01T14:48:25
2017-11-01T14:48:25
108,666,020
1
0
null
null
null
null
UTF-8
Java
false
false
196
java
package np.com.surazgyawali.listme.models; /** * Created by root on 8/28/16. */ public class Post { public int userId; public int id; public String title; public String body; }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
bdb7815a344cecdf9b4496a55134b2ad88bb9b31
532170ddc5d4e120d3af5a31c38f559eeeb06eaf
/src/com/proteus/parser/p416/ext/PrefixedTypeContextExt.java
bd297bbe774f97ea90a764117225aa63665cf959
[]
no_license
sureshgl/cc_tool
ba4c6d2d86d801ae97f87d2273ba47d41dede405
38d7388e034cd287b140f2eaa0261f7e911680ce
refs/heads/master
2021-01-18T22:17:40.970467
2017-04-03T06:07:38
2017-04-03T06:07:38
87,043,162
0
0
null
null
null
null
UTF-8
Java
false
false
989
java
package com.proteus.parser.p416.ext; import org.antlr.v4.runtime.ParserRuleContext; import com.proteus.parser.p416.PopulateExtendedContextVisitor; import com.proteus.parser.p416.gen.p416Parser.PrefixedTypeContext; public class PrefixedTypeContextExt extends AbstractBaseExt{ public PrefixedTypeContextExt(PrefixedTypeContext ctx) { addToContexts(ctx); } @Override public ParserRuleContext getContext(){ return (PrefixedTypeContext)contexts.get(contexts.size()-1); } @Override public ParserRuleContext getContext(String str){ return new PopulateExtendedContextVisitor().visit(getPrimeParser(str).prefixedType()); } @Override public void setContext(ParserRuleContext ctx){ if(ctx != null){ if(ctx instanceof PrefixedTypeContext){ addToContexts((PrefixedTypeContext) ctx); } else { throw new ClassCastException(ctx.getClass().getSimpleName() + " cannot be cased to "+PrefixedTypeContext.class.getName()); } } else { addToContexts(null); } } }
[ "suresh.goduguluru@gmail.com" ]
suresh.goduguluru@gmail.com
f3a06518f800c62f2ce19eefdaf7e933db932166
d13e942b46aeb2c88b726aa438b987770eaba116
/Development of online data-driven monitoring methodologies and piloting analytical and monitoring tools by the State Audit Service of Ukraine/Risk Indicators/Back-End/elasticsearch-integration/src/main/java/com/datapath/elasticsearchintegration/constants/RiskedProcedure.java
d39a4f996916b432a9d60d1f12ec009d84d89e0b
[]
no_license
EBRD-ProzorroA7-RiskIndicators-SASU/Ukraine-Development-of-online-data-driven-monitoring-methodologies-and-piloting-analytical-tools
7f01956b454cfb8f2fa7821e713898068c3db81f
2a67c467c878e57f1ee81aef3b49f409bd8e2658
refs/heads/main
2023-06-18T23:18:28.367265
2021-07-13T18:22:10
2021-07-13T18:22:10
333,778,176
0
0
null
2021-01-28T14:09:57
2021-01-28T14:09:56
null
UTF-8
Java
false
false
408
java
package com.datapath.elasticsearchintegration.constants; public enum RiskedProcedure { WITH_RISK("withRisk"), WITHOUT_RISK("withoutRisk"), WITH_RISK_HAS_PRIORITY("withPriority"), WITH_RISK_NO_PRIORITY("withoutPriority"); private final String value; RiskedProcedure(String value) { this.value = value; } public String value() { return this.value; } }
[ "eduard.david9@gmail.com" ]
eduard.david9@gmail.com
359d27b7cef7c8e1806224ac9f54280c934b758b
b111b77f2729c030ce78096ea2273691b9b63749
/gradle-talks/talks/build-platform/src/demos/03-configuration-rule-parallel-tests/src/test/java/org/gradle/tests9/Test9_7.java
b9d71cc17d120b8af8aeebc41607ea6732ed3fa2
[]
no_license
WeilerWebServices/Gradle
a1a55bdb0dd39240787adf9241289e52f593ccc1
6ab6192439f891256a10d9b60f3073cab110b2be
refs/heads/master
2023-01-19T16:48:09.415529
2020-11-28T13:28:40
2020-11-28T13:28:40
256,249,773
1
0
null
null
null
null
UTF-8
Java
false
false
161
java
package org.gradle.tests9; import org.junit.Test; public class Test9_7 { @Test public void myTest() throws Exception { Thread.sleep(5); } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
2a7d58e5c8fb83a7d728ae7cbd109b5270227c53
f15889af407de46a94fd05f6226c66182c6085d0
/smartsis/src/test/java/com/oreon/smartsis/web/action/hostel/BedActionTest.java
d6a4e69ad2dd2c65b3eb0583a9aafa5318a0468a
[]
no_license
oreon/sfcode-full
231149f07c5b0b9b77982d26096fc88116759e5b
bea6dba23b7824de871d2b45d2a51036b88d4720
refs/heads/master
2021-01-10T06:03:27.674236
2015-04-27T10:23:10
2015-04-27T10:23:10
55,370,912
0
0
null
null
null
null
UTF-8
Java
false
false
497
java
package com.oreon.smartsis.web.action.hostel; import javax.persistence.EntityManager; import javax.persistence.Query; import org.jboss.seam.security.Identity; import org.testng.annotations.Test; import org.witchcraft.base.entity.*; import org.hibernate.annotations.Filter; import org.testng.annotations.BeforeClass; import org.witchcraft.seam.action.BaseAction; import com.oreon.smartsis.hostel.Bed; public class BedActionTest extends BedActionTestBase{ }
[ "singhj@38423737-2f20-0410-893e-9c0ab9ae497d" ]
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
5f1febf62657791e75fdd047d5b7dbe6de61fdea
99e9061c52e1550c6b01eb318f2f52228196d041
/src/main/java/org/example/A_T/A_2/T_005.java
0c46516b5b6c73b99587adb0a130e17c8f3eadfd
[]
no_license
Derek-yzh/dataStructure
3a98e83648a29363ae8ac48383932fd2981746d2
af9c4b8c8eb8c8fab2bb0602301e31f5d574c5e9
refs/heads/master
2023-04-03T11:18:55.633461
2021-01-20T09:17:04
2021-01-20T09:17:04
291,861,254
1
0
null
2021-01-20T09:12:20
2020-09-01T01:08:11
Java
UTF-8
Java
false
false
649
java
package org.example.A_T.A_2; /** * @Author: Derek * @DateTime: 2020/11/21 12:38 * @Description: 递归 (2) * 汉诺塔问题 */ public class T_005 { static int sum = 0; public static void main(String[] args) { fun(3,"左","右","中"); System.out.println(sum); } public static void fun(int N, String from, String to, String other){ if (N == 1){//base System.out.println(from +"-->"+ to); sum++; return; } fun(N - 1, from, other, to); System.out.println(from + "-->" + to); sum++; fun(N - 1, other, to, from); } }
[ "288153@supinfo.com" ]
288153@supinfo.com
b4659eb39c652898a98d8ea93729a6e73e5cbbdb
21bcd1da03415fec0a4f3fa7287f250df1d14051
/sources/com/facebook/imagepipeline/core/DiskStorageCacheFactory.java
72f1b73e0fdf15410f999c9b134ef647d86c5846
[]
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
1,790
java
package com.facebook.imagepipeline.core; import com.facebook.cache.disk.DiskCacheConfig; import com.facebook.cache.disk.DiskStorage; import com.facebook.cache.disk.DiskStorageCache; import com.facebook.cache.disk.DiskStorageCache.Params; import com.facebook.cache.disk.FileCache; import java.util.concurrent.Executor; import java.util.concurrent.Executors; public class DiskStorageCacheFactory implements FileCacheFactory { private DiskStorageFactory mDiskStorageFactory; public DiskStorageCacheFactory(DiskStorageFactory diskStorageFactory) { this.mDiskStorageFactory = diskStorageFactory; } public static DiskStorageCache buildDiskStorageCache(DiskCacheConfig diskCacheConfig, DiskStorage diskStorage) { return buildDiskStorageCache(diskCacheConfig, diskStorage, Executors.newSingleThreadExecutor()); } public FileCache get(DiskCacheConfig diskCacheConfig) { return buildDiskStorageCache(diskCacheConfig, this.mDiskStorageFactory.get(diskCacheConfig)); } public static DiskStorageCache buildDiskStorageCache(DiskCacheConfig diskCacheConfig, DiskStorage diskStorage, Executor executor) { Params params = new Params(diskCacheConfig.getMinimumSizeLimit(), diskCacheConfig.getLowDiskSpaceSizeLimit(), diskCacheConfig.getDefaultSizeLimit()); DiskStorage diskStorage2 = diskStorage; Params params2 = params; DiskStorageCache diskStorageCache = new DiskStorageCache(diskStorage2, diskCacheConfig.getEntryEvictionComparatorSupplier(), params2, diskCacheConfig.getCacheEventListener(), diskCacheConfig.getCacheErrorLogger(), diskCacheConfig.getDiskTrimmableRegistry(), diskCacheConfig.getContext(), executor, diskCacheConfig.getIndexPopulateAtStartupEnabled()); return diskStorageCache; } }
[ "zsolimana@uaedomain.local" ]
zsolimana@uaedomain.local
d3c93411c3bea16b2572046bc9d2a34be525d968
b07f31138d1964e2ef6d2b1a4685623e8d9ba756
/shop-core/com/enation/app/shop/component/ordercore/plugin/log/OrderDetailPayLogPlugin.java
d5cbec42ba9fb417cb4bb30be7619d4bee637611
[]
no_license
worgent/yiming-mall
364072c676ef6b9dc153344755c78981efc773ee
545aecf48eaa531dc2b1fb7c8cad77970e2e92a1
refs/heads/master
2021-06-24T14:18:29.320720
2017-09-11T14:04:47
2017-09-11T14:04:47
103,140,528
0
1
null
null
null
null
UTF-8
Java
false
false
2,455
java
package com.enation.app.shop.component.ordercore.plugin.log; import com.enation.app.shop.core.model.Order; import com.enation.app.shop.core.plugin.order.IOrderTabShowEvent; import com.enation.app.shop.core.plugin.order.IShowOrderDetailHtmlEvent; import com.enation.app.shop.core.service.IOrderReportManager; import com.enation.eop.processor.core.freemarker.FreeMarkerPaser; import com.enation.framework.context.webcontext.ThreadContextHolder; import com.enation.framework.plugin.AutoRegisterPlugin; import com.enation.framework.plugin.IAjaxExecuteEnable; import com.enation.framework.util.StringUtil; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Component; @Component public class OrderDetailPayLogPlugin extends AutoRegisterPlugin implements IOrderTabShowEvent, IShowOrderDetailHtmlEvent, IAjaxExecuteEnable { private IOrderReportManager orderReportManager; public boolean canBeExecute(Order order) { return true; } public String getTabName(Order order) { return "收退款记录"; } public String onShowOrderDetailHtml(Order order) { FreeMarkerPaser freeMarkerPaser = FreeMarkerPaser.getInstance(); freeMarkerPaser.setClz(getClass()); HttpServletRequest request = ThreadContextHolder.getHttpRequest(); int orderId = StringUtil.toInt(request.getParameter("orderid"), true); List payLogList = this.orderReportManager.listPayLogs(Integer.valueOf(orderId)); List refundList = this.orderReportManager.listRefundLogs(Integer.valueOf(orderId)); freeMarkerPaser.putData("payLogList", payLogList); freeMarkerPaser.putData("refundList", refundList); freeMarkerPaser.setPageName("paylog_list"); return freeMarkerPaser.proessPageContent(); } public String execute() { return null; } public int getOrder() { return 5; } public IOrderReportManager getOrderReportManager() { return this.orderReportManager; } public void setOrderReportManager(IOrderReportManager orderReportManager) { this.orderReportManager = orderReportManager; } } /* Location: C:\Users\worgen\Desktop\临时\javashop_b2b2c.war!\WEB-INF\lib\component-shop-core.jar!\com\enation\app\shop\component\ordercore\plugin\log\OrderDetailPayLogPlugin.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "418251346@qq.com" ]
418251346@qq.com
7bbd63ba07e92f4f2e5b7f39cbe81fe81a0dd3e8
cec0c2fa585c3f788fc8becf24365e56bce94368
/io/netty/handler/ssl/Java9SslEngine.java
b6589ecc83f0abe9941a3ffbe2a2546ebf2f32c9
[]
no_license
maksym-pasichnyk/Server-1.16.3-Remapped
358f3c4816cbf41e137947329389edf24e9c6910
4d992e2d9d4ada3ecf7cecc039c4aa0083bc461e
refs/heads/master
2022-12-15T08:54:21.236174
2020-09-19T16:13:43
2020-09-19T16:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,911
java
/* */ package io.netty.handler.ssl; /* */ /* */ import java.nio.ByteBuffer; /* */ import java.util.LinkedHashSet; /* */ import java.util.List; /* */ import java.util.function.BiFunction; /* */ import javax.net.ssl.SSLEngine; /* */ import javax.net.ssl.SSLEngineResult; /* */ import javax.net.ssl.SSLException; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ final class Java9SslEngine /* */ extends JdkSslEngine /* */ { /* */ private final JdkApplicationProtocolNegotiator.ProtocolSelectionListener selectionListener; /* */ private final AlpnSelector alpnSelector; /* */ /* */ private final class AlpnSelector /* */ implements BiFunction<SSLEngine, List<String>, String> /* */ { /* */ private final JdkApplicationProtocolNegotiator.ProtocolSelector selector; /* */ private boolean called; /* */ /* */ AlpnSelector(JdkApplicationProtocolNegotiator.ProtocolSelector selector) { /* 42 */ this.selector = selector; /* */ } /* */ /* */ /* */ public String apply(SSLEngine sslEngine, List<String> strings) { /* 47 */ assert !this.called; /* 48 */ this.called = true; /* */ /* */ try { /* 51 */ String selected = this.selector.select(strings); /* 52 */ return (selected == null) ? "" : selected; /* 53 */ } catch (Exception cause) { /* */ /* */ /* */ /* */ /* 58 */ return null; /* */ } /* */ } /* */ /* */ void checkUnsupported() { /* 63 */ if (this.called) { /* */ return; /* */ } /* */ /* */ /* */ /* */ /* 70 */ String protocol = Java9SslEngine.this.getApplicationProtocol(); /* 71 */ assert protocol != null; /* */ /* 73 */ if (protocol.isEmpty()) /* */ { /* 75 */ this.selector.unsupported(); /* */ } /* */ } /* */ } /* */ /* */ Java9SslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer) { /* 81 */ super(engine); /* 82 */ if (isServer) { /* 83 */ this.selectionListener = null; /* 84 */ this /* 85 */ .alpnSelector = new AlpnSelector(applicationNegotiator.protocolSelectorFactory().newSelector(this, new LinkedHashSet<String>(applicationNegotiator.protocols()))); /* 86 */ Java9SslUtils.setHandshakeApplicationProtocolSelector(engine, this.alpnSelector); /* */ } else { /* 88 */ this /* 89 */ .selectionListener = applicationNegotiator.protocolListenerFactory().newListener(this, applicationNegotiator.protocols()); /* 90 */ this.alpnSelector = null; /* 91 */ Java9SslUtils.setApplicationProtocols(engine, applicationNegotiator.protocols()); /* */ } /* */ } /* */ /* */ private SSLEngineResult verifyProtocolSelection(SSLEngineResult result) throws SSLException { /* 96 */ if (result.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.FINISHED) { /* 97 */ if (this.alpnSelector == null) { /* */ /* */ try { /* 100 */ String protocol = getApplicationProtocol(); /* 101 */ assert protocol != null; /* 102 */ if (protocol.isEmpty()) { /* */ /* */ /* */ /* */ /* 107 */ this.selectionListener.unsupported(); /* */ } else { /* 109 */ this.selectionListener.selected(protocol); /* */ } /* 111 */ } catch (Throwable e) { /* 112 */ throw SslUtils.toSSLHandshakeException(e); /* */ } /* */ } else { /* 115 */ assert this.selectionListener == null; /* 116 */ this.alpnSelector.checkUnsupported(); /* */ } /* */ } /* 119 */ return result; /* */ } /* */ /* */ /* */ public SSLEngineResult wrap(ByteBuffer src, ByteBuffer dst) throws SSLException { /* 124 */ return verifyProtocolSelection(super.wrap(src, dst)); /* */ } /* */ /* */ /* */ public SSLEngineResult wrap(ByteBuffer[] srcs, ByteBuffer dst) throws SSLException { /* 129 */ return verifyProtocolSelection(super.wrap(srcs, dst)); /* */ } /* */ /* */ /* */ public SSLEngineResult wrap(ByteBuffer[] srcs, int offset, int len, ByteBuffer dst) throws SSLException { /* 134 */ return verifyProtocolSelection(super.wrap(srcs, offset, len, dst)); /* */ } /* */ /* */ /* */ public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer dst) throws SSLException { /* 139 */ return verifyProtocolSelection(super.unwrap(src, dst)); /* */ } /* */ /* */ /* */ public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts) throws SSLException { /* 144 */ return verifyProtocolSelection(super.unwrap(src, dsts)); /* */ } /* */ /* */ /* */ public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dst, int offset, int len) throws SSLException { /* 149 */ return verifyProtocolSelection(super.unwrap(src, dst, offset, len)); /* */ } /* */ /* */ /* */ /* */ void setNegotiatedApplicationProtocol(String applicationProtocol) {} /* */ /* */ /* */ /* */ public String getNegotiatedApplicationProtocol() { /* 159 */ String protocol = getApplicationProtocol(); /* 160 */ if (protocol != null) { /* 161 */ return protocol.isEmpty() ? null : protocol; /* */ } /* 163 */ return protocol; /* */ } /* */ /* */ /* */ /* */ public String getApplicationProtocol() { /* 169 */ return Java9SslUtils.getApplicationProtocol(getWrappedEngine()); /* */ } /* */ /* */ public String getHandshakeApplicationProtocol() { /* 173 */ return Java9SslUtils.getHandshakeApplicationProtocol(getWrappedEngine()); /* */ } /* */ /* */ public void setHandshakeApplicationProtocolSelector(BiFunction<SSLEngine, List<String>, String> selector) { /* 177 */ Java9SslUtils.setHandshakeApplicationProtocolSelector(getWrappedEngine(), selector); /* */ } /* */ /* */ public BiFunction<SSLEngine, List<String>, String> getHandshakeApplicationProtocolSelector() { /* 181 */ return Java9SslUtils.getHandshakeApplicationProtocolSelector(getWrappedEngine()); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\io\netty\handler\ssl\Java9SslEngine.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
ca8838ba240fc1b110d00c73a3de09c81e9fb43a
e5b97b5a79ba5cd9fab9f88dd7d725792af58816
/ireport/src/it/businesslogic/ireport/gui/event/SheetPropertyValueChangedListener.java
62d4ee7e7acdaffe79fd30f73a4996462014095a
[]
no_license
boyranger/lmireport
fa2721bb31c85dea27d15d9a210ef47a788123ca
65244e644ca72fcab72d8e9f64c17004d5dbdf9f
refs/heads/master
2021-01-23T08:10:33.679305
2009-10-30T05:59:38
2009-10-30T05:59:38
33,232,678
0
0
null
null
null
null
UTF-8
Java
false
false
1,285
java
/* * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from JasperSoft, * the following license terms apply: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. * * This program is distributed WITHOUT ANY WARRANTY; and without the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt * or write to: * * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, * Boston, MA USA 02111-1307 * * * * * SheetPropertyValueChangedListener.java * * Created on 10 febbraio 2003, 2.09 * */ package it.businesslogic.ireport.gui.event; /** * * @author Administrator */ public interface SheetPropertyValueChangedListener extends java.util.EventListener { public void sheetPropertyValueChanged(SheetPropertyValueChangedEvent evt); }
[ "maodie007@163.com@b94ed7a6-887a-11de-8f56-7b2e0289298d" ]
maodie007@163.com@b94ed7a6-887a-11de-8f56-7b2e0289298d
53350e38a353c471426edff9685a6515a8a4c795
ad6434dc113e22e64f0709c95099babe6b2cc854
/src/UglyNumber/UglyNumber.java
5fc4187bb50a61c85502e2c9da9da2f23aab8b20
[]
no_license
shiyanch/Leetcode_Java
f8b7807fbbc0174d45127b65b7b48d836887983c
20df421f44b1907af6528578baf53efddfee48b1
refs/heads/master
2023-05-28T00:40:30.569992
2023-05-17T03:51:34
2023-05-17T03:51:34
48,945,641
9
2
null
null
null
null
UTF-8
Java
false
false
857
java
package UglyNumber; /** * 263. Ugly Number * Write a program to check whether a given number is an ugly number. * Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. * For example, 6, 8 are ugly while 14 is not ugly since it includes another prime factor 7. * Note that 1 is typically treated as an ugly number. */ public class UglyNumber { public boolean isUgly(int num) { if(num <= 0) return false; while(num%2 == 0) { num /= 2; } while(num%3 == 0) { num /= 3; } while(num%5 == 0) { num /= 5; } return(num == 1); } public boolean isUgly2(int num) { for(int i=2;i<6 && num > 0; i++) { while(num % i == 0) num /= i; } return (num == 1); } }
[ "shiyanch@gmail.com" ]
shiyanch@gmail.com
55df235bc30273e5f7c8bc065ef1effe3d6ca3d6
832c756923d48ace3f338b27ae9dc8327058d088
/src/contest/codejam/GCJ_2018_Round_2_A.java
9cf0482c3026b539b2ddaf47bb6d991f2f61e31d
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
luchy0120/competitive-programming
1331bd53698c4b05b57a31d90eecc31c167019bd
d0dfc8f3f3a74219ecf16520d6021de04a2bc9f6
refs/heads/master
2020-05-04T15:18:06.150736
2018-11-07T04:15:26
2018-11-07T04:15:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,486
java
package codejam; import java.io.*; import java.util.StringTokenizer; public class GCJ_2018_Round_2_A { static BufferedReader br; static PrintWriter out; static StringTokenizer st; static int T; public static void main (String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(new OutputStreamWriter(System.out)); // br = new BufferedReader(new FileReader("in.txt")); // out = new PrintWriter(new FileWriter("out.txt")); T = readInt(); outer : for (int t = 1; t <= T; t++) { int C = readInt(); int[] B = new int[C]; for (int i = 0; i < C; i++) { B[i] = readInt(); } if (B[0] == 0 || B[C - 1] == 0) { out.printf("Case #%d: IMPOSSIBLE\n", t); continue outer; } int maxRows = 1; int curr = 0; for (int i = 0; i < C; i++) { for (int j = curr; j < curr + B[i]; j++) { maxRows = Math.max(Math.abs(j - i) + 1, maxRows); } curr += B[i]; } char[][] grid = new char[maxRows][C]; for (int i = 0; i < maxRows; i++) { for (int j = 0; j < C; j++) { grid[i][j] = '.'; } } curr = 0; for (int i = 0; i < C; i++) { for (int j = curr; j < curr + B[i]; j++) { if (i < j) { for (int k = 0; k < j - i; k++) { grid[k][j - k] = '/'; } } else if (i > j) { for (int k = 0; k < i - j; k++) { grid[k][j + k] = '\\'; } } } curr += B[i]; } out.printf("Case #%d: %d\n", t, maxRows); for (int i = 0; i < maxRows; i++) { for (int j = 0; j < C; j++) { out.printf("%c", grid[i][j]); } out.println(); } } out.close(); } static String next () throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine().trim()); return st.nextToken(); } static long readLong () throws IOException { return Long.parseLong(next()); } static int readInt () throws IOException { return Integer.parseInt(next()); } static double readDouble () throws IOException { return Double.parseDouble(next()); } static char readCharacter () throws IOException { return next().charAt(0); } static String readLine () throws IOException { return br.readLine().trim(); } }
[ "jeffrey.xiao1998@gmail.com" ]
jeffrey.xiao1998@gmail.com
1635300edcd6e87d2447b24610712cfccbeaf6fb
588890253d6e6050d70a9f37016bbc606febb975
/src/main/java/by/kolbun/examples/SystemInfo.java
a88b2d518acea642442a302db43c576461ae5a56
[]
no_license
Rozenberg-jv/javafx01
55594be27503f892d2693e75d45291d780ab3573
e0b3c9d5581f42b0aa8f4059b982ceb0dbc1d587
refs/heads/master
2023-03-18T02:39:20.499726
2021-03-17T15:27:14
2021-03-17T15:27:14
348,757,418
0
0
null
null
null
null
UTF-8
Java
false
false
259
java
package by.kolbun.examples; public class SystemInfo { public static String javaVersion() { return System.getProperty("java.version"); } public static String javafxVersion() { return System.getProperty("javafx.version"); } }
[ "avangard.npaper@gmail.com" ]
avangard.npaper@gmail.com
87d34cc7171a4c30e5449ea1a56d9a46bfb6ff00
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/appbrand/appusage/C38125ad.java
2667f107cef54888b12fccefe9e07a6b3edefdc2
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
982
java
package com.tencent.p177mm.plugin.appbrand.appusage; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.kernel.C1720g; import com.tencent.p177mm.model.C1812ai; import com.tencent.p177mm.storage.C5128ac.C5127a; /* renamed from: com.tencent.mm.plugin.appbrand.appusage.ad */ public final class C38125ad extends C1812ai { public final void transfer(int i) { AppMethodBeat.m2504i(129715); if (mo5386kw(i)) { C1720g.m3536RP().mo5239Ry().set(C5127a.APPBRAND_PREDOWNLOAD_DONE_USAGE_USERNAME_DUPLICATE_BEFORE_BOOLEAN_SYNC, Boolean.FALSE); } AppMethodBeat.m2505o(129715); } /* renamed from: kw */ public final boolean mo5386kw(int i) { int i2 = 1; int i3 = i != 0 ? 1 : 0; if (i >= 637927936) { i2 = 0; } return i2 & i3; } public final String getTag() { return "MicroMsg.AppBrand.DuplicateUsageUsernameSetFlagDataTransfer"; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
a20ac43157c66b9a06ec3c2662841611642e272c
efc9e3c400100c1bdbca92033e488937fb750fda
/1.JavaSyntax/src/com/javarush/task/task07/task0711/Solution.java
ba045982c24be3761e6d9bb4e22d68b8ca08dc8e
[]
no_license
Nikbstar/JavaRushTasks
289ffea7798df2c1f22a0335f1e8760f66dac973
9b86b284a7f4390807a16e1474e2d58a2be79de0
refs/heads/master
2018-10-21T03:02:45.724753
2018-08-31T06:48:34
2018-08-31T06:48:34
118,357,131
0
0
null
null
null
null
UTF-8
Java
false
false
794
java
package com.javarush.task.task07.task0711; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; /* Удалить и вставить */ public class Solution { public static void main(String[] args) throws Exception { //напишите тут ваш код BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ArrayList<String> strings = new ArrayList<>(); for (int i = 0; i < 5; i++) { strings.add(reader.readLine()); } for (int i = 0; i < 13; i++) { strings.add(0, strings.get(strings.size() - 1)); strings.remove(strings.size() - 1); } for (String s : strings) { System.out.println(s); } } }
[ "nikbstar@gmail.com" ]
nikbstar@gmail.com
33944b920e570b5bf78c403687f0eb96d1852df1
73e7ce1009fb3538cf4d2b96a895c8ca63acb34b
/flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/UniqueConstraint.java
a60f0d2f831bed3e5d10db06b0b455c0e14ace65
[ "OFL-1.1", "MIT", "BSD-3-Clause", "ISC", "Apache-2.0" ]
permissive
yimeisun/flink
215567e4750db09538cbce7fc7e9461d6a9aaca5
d2bbc88806b2318e220437eaa4b2d2df9a0792f7
refs/heads/master
2021-07-08T22:17:06.095822
2021-03-23T08:30:12
2021-03-23T08:30:12
228,978,660
2
1
Apache-2.0
2019-12-19T05:02:02
2019-12-19T05:02:01
null
UTF-8
Java
false
false
3,686
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.catalog; import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.table.utils.EncodingUtils; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import static org.apache.flink.util.Preconditions.checkNotNull; /** * A unique key constraint. It can be declared also as a PRIMARY KEY. * * @see ConstraintType */ @PublicEvolving public final class UniqueConstraint extends AbstractConstraint { private final List<String> columns; private final ConstraintType type; /** Creates a non enforced {@link ConstraintType#PRIMARY_KEY} constraint. */ public static UniqueConstraint primaryKey(String name, List<String> columns) { return new UniqueConstraint(name, false, ConstraintType.PRIMARY_KEY, columns); } private UniqueConstraint( String name, boolean enforced, ConstraintType type, List<String> columns) { super(name, enforced); this.columns = checkNotNull(columns); this.type = checkNotNull(type); } /** List of column names for which the primary key was defined. */ public List<String> getColumns() { return columns; } @Override public ConstraintType getType() { return type; } /** * Returns constraint's summary. All constraints summary will be formatted as * * <pre> * CONSTRAINT [constraint-name] [constraint-type] ([constraint-definition]) * * E.g CONSTRAINT pk PRIMARY KEY (f0, f1) NOT ENFORCED * </pre> */ @Override public final String asSummaryString() { final String typeString; switch (getType()) { case PRIMARY_KEY: typeString = "PRIMARY KEY"; break; case UNIQUE_KEY: typeString = "UNIQUE"; break; default: throw new IllegalStateException("Unknown key type: " + getType()); } return String.format( "CONSTRAINT %s %s (%s)%s", EncodingUtils.escapeIdentifier(getName()), typeString, columns.stream() .map(EncodingUtils::escapeIdentifier) .collect(Collectors.joining(", ")), isEnforced() ? "" : " NOT ENFORCED"); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } UniqueConstraint that = (UniqueConstraint) o; return Objects.equals(columns, that.columns) && type == that.type; } @Override public int hashCode() { return Objects.hash(super.hashCode(), columns, type); } }
[ "twalthr@apache.org" ]
twalthr@apache.org
0de1bedf75fa202856739720e47a8d755dc5682f
2c8635672accf8301f9610205197065a596e91ba
/xlmall-api2.0/project_code/xlmall-api/src/main/java/com/whoiszxl/service/impl/CartServiceImpl.java
89108ac79662105bd716d89cd52c6608b70fb7a4
[]
no_license
poorhua/AYANAMI
be7a0893bbf0e1a72e6264b6a95bd637b84ff927
282f8c57646a1a401611efa4e9f24101c02e3395
refs/heads/master
2020-03-22T07:56:48.245454
2018-07-04T10:34:20
2018-07-04T10:34:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,349
java
package com.whoiszxl.service.impl; import java.math.BigDecimal; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.google.common.base.Splitter; import com.google.common.collect.Lists; import com.whoiszxl.common.Const; import com.whoiszxl.common.ResponseCode; import com.whoiszxl.common.ServerResponse; import com.whoiszxl.dao.CartMapper; import com.whoiszxl.dao.ProductMapper; import com.whoiszxl.entity.Cart; import com.whoiszxl.entity.Product; import com.whoiszxl.service.CartService; import com.whoiszxl.utils.BigDecimalUtil; import com.whoiszxl.utils.PropertiesUtil; import com.whoiszxl.vo.CartProductVo; import com.whoiszxl.vo.CartVo; /** * 购物车服务实现接口 * @author whoiszxl * */ @Service public class CartServiceImpl implements CartService { @Autowired private CartMapper cartMapper; @Autowired private ProductMapper productMapper; private static final Logger logger = LoggerFactory.getLogger(CartServiceImpl.class); public ServerResponse<CartVo> add(Integer userId, Integer productId, Integer count) { if(productId == null || count == null){ logger.error("参数错误"); return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc()); } //验证产品是否存在 Product product = productMapper.selectByPrimaryKey(productId); if(product == null) { return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),"添加购物车的产品不存在"); } Cart cart = cartMapper.selectCartByUserIdAndProductId(userId, productId); if (cart == null) { logger.info("进行购物车添加商品了"); // 这个产品不在当前用户的购物车内 Cart cartItem = new Cart(); cartItem.setQuantity(count); cartItem.setChecked(Const.Cart.CHECKED); cartItem.setProductId(productId); cartItem.setUserId(userId); int rowCount = cartMapper.insert(cartItem); if(rowCount > 0) { logger.info("购物车item添加成功"); } } else { // 产品已经在购物车里 cart.setQuantity(cart.getQuantity() + count); cartMapper.updateByPrimaryKeySelective(cart); logger.info("产品已经在购物车里直接加上数据"); } return this.list(userId); } public ServerResponse<CartVo> update(Integer userId, Integer productId, Integer count) { if(productId == null || count == null){ return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc()); } Cart cart = cartMapper.selectCartByUserIdAndProductId(userId, productId); if(cart != null) { cart.setQuantity(count); } cartMapper.updateByPrimaryKeySelective(cart); return this.list(userId); } public ServerResponse<CartVo> deleteProduct(Integer userId,String productIds){ List<String> productList = Splitter.on(",").splitToList(productIds); if(CollectionUtils.isEmpty(productList)){ return ServerResponse.createByErrorCodeMessage(ResponseCode.ILLEGAL_ARGUMENT.getCode(),ResponseCode.ILLEGAL_ARGUMENT.getDesc()); } cartMapper.deleteByUserIdProductIds(userId,productList); return this.list(userId); } public ServerResponse<CartVo> selectOrUnSelect (Integer userId,Integer productId,Integer checked){ cartMapper.checkedOrUncheckedProduct(userId,productId,checked); return this.list(userId); } public ServerResponse<Integer> getCartProductCount(Integer userId){ if(userId == null){ return ServerResponse.createBySuccess(0); } return ServerResponse.createBySuccess(cartMapper.selectCartProductCount(userId)); } public ServerResponse<CartVo> list (Integer userId){ CartVo cartVo = this.getCartVoLimit(userId); return ServerResponse.createBySuccess(cartVo); } private CartVo getCartVoLimit(Integer userId){ CartVo cartVo = new CartVo(); List<Cart> cartList = cartMapper.selectCartByUserId(userId); List<CartProductVo> cartProductVoList = Lists.newArrayList(); BigDecimal cartTotalPrice = new BigDecimal("0"); if(CollectionUtils.isNotEmpty(cartList)){ for(Cart cartItem : cartList){ CartProductVo cartProductVo = new CartProductVo(); cartProductVo.setId(cartItem.getId()); cartProductVo.setUserId(userId); cartProductVo.setProductId(cartItem.getProductId()); Product product = productMapper.selectByPrimaryKey(cartItem.getProductId()); if(product != null){ cartProductVo.setProductMainImage(product.getMainImage()); cartProductVo.setProductName(product.getName()); cartProductVo.setProductSubtitle(product.getSubtitle()); cartProductVo.setProductStatus(product.getStatus()); cartProductVo.setProductPrice(product.getPrice()); cartProductVo.setProductStock(product.getStock()); //判断库存 int buyLimitCount = 0; if(product.getStock() >= cartItem.getQuantity()){ //库存充足的时候 buyLimitCount = cartItem.getQuantity(); cartProductVo.setLimitQuantity(Const.Cart.LIMIT_NUM_SUCCESS); }else{ buyLimitCount = product.getStock(); cartProductVo.setLimitQuantity(Const.Cart.LIMIT_NUM_FAIL); //购物车中更新有效库存 Cart cartForQuantity = new Cart(); cartForQuantity.setId(cartItem.getId()); cartForQuantity.setQuantity(buyLimitCount); cartMapper.updateByPrimaryKeySelective(cartForQuantity); } cartProductVo.setQuantity(buyLimitCount); //计算总价 cartProductVo.setProductTotalPrice(BigDecimalUtil.mul(product.getPrice().doubleValue(),cartProductVo.getQuantity())); cartProductVo.setProductChecked(cartItem.getChecked()); } if(cartItem.getChecked() == Const.Cart.CHECKED){ //如果已经勾选,增加到整个的购物车总价中 cartTotalPrice = BigDecimalUtil.add(cartTotalPrice.doubleValue(),cartProductVo.getProductTotalPrice().doubleValue()); } cartProductVoList.add(cartProductVo); } } cartVo.setCartTotalPrice(cartTotalPrice); cartVo.setCartProductVoList(cartProductVoList); cartVo.setAllChecked(this.getAllCheckedStatus(userId)); cartVo.setImageHost(PropertiesUtil.getProperty("ftp.server.http.prefix")); return cartVo; } private boolean getAllCheckedStatus(Integer userId){ if(userId == null){ return false; } return cartMapper.selectCartProductCheckedStatusByUserId(userId) == 0; } }
[ "whoiszxl@gmail.com" ]
whoiszxl@gmail.com
cfbd8b6ef43a09909e30b9cf2769f45aedeefe8d
261a5a8cebef7144858cc3cba4fa60c03e92a2e0
/smallrye-reactive-messaging-kafka/src/main/java/io/smallrye/reactive/messaging/kafka/KafkaSink.java
b27fc7d855aaf2bbd27ae892db367d612c9db7a0
[ "Apache-2.0" ]
permissive
ppatierno/smallrye-reactive-messaging
146318bfd3a5cf13d22fec310a519524a39491b6
9ed61b5f2dbee95ec8bd7ac57ef94cb3eb3fd2dd
refs/heads/master
2020-05-01T06:48:02.013049
2019-03-19T15:14:10
2019-03-19T15:14:10
177,337,999
0
0
null
2019-03-23T20:41:20
2019-03-23T20:41:19
null
UTF-8
Java
false
false
3,896
java
package io.smallrye.reactive.messaging.kafka; import io.smallrye.reactive.messaging.spi.ConfigurationHelper; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.kafka.client.producer.KafkaWriteStream; import io.vertx.kafka.client.producer.RecordMetadata; import io.vertx.reactivex.core.Vertx; import org.apache.kafka.clients.producer.ProducerRecord; import org.eclipse.microprofile.reactive.messaging.Message; import org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams; import org.reactivestreams.Subscriber; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; class KafkaSink { private static final Logger LOGGER = LoggerFactory.getLogger(KafkaSink.class); private final KafkaWriteStream stream; private final int partition; private final Optional<Long> timestamp; private final String key; private final String topic; private final Subscriber<Message> subscriber; KafkaSink(Vertx vertx, Map<String, String> config) { stream = KafkaWriteStream.create(vertx.getDelegate(), new HashMap<>(config)); stream.exceptionHandler(t -> LOGGER.error("Unable to write to Kafka", t)); ConfigurationHelper conf = ConfigurationHelper.create(config); partition = conf.getAsInteger("partition", 0); timestamp = conf.getAsLong( "timestamp"); key = conf.get("key"); topic = conf.get("topic"); if (topic == null) { LOGGER.warn("No default topic configured, only sending messages with an explicit topic set"); } subscriber = ReactiveStreams.<Message>builder() .flatMapCompletionStage(message -> { ProducerRecord record; if (message instanceof KafkaMessage) { KafkaMessage km = ((KafkaMessage) message); if (this.topic == null && ((KafkaMessage) message).getTopic() == null) { LOGGER.error("Ignoring message - no topic set"); return CompletableFuture.completedFuture(null); } record = new ProducerRecord<>( km.getTopic() == null ? this.topic : km.getTopic(), km.getPartition() == null ? this.partition : km.getPartition(), km.getTimestamp() == null ? this.timestamp.orElse(null) : km.getTimestamp(), km.getKey() == null ? this.key : km.getKey(), km.getPayload(), km.getHeaders().unwrap() ); LOGGER.info("Sending message {} to Kafka topic '{}'", message, record.topic()); } else { if (this.topic == null) { LOGGER.error("Ignoring message - no topic set"); return CompletableFuture.completedFuture(null); } record = new ProducerRecord<>(topic, partition, timestamp.orElse(null), key, message.getPayload()); } CompletableFuture<RecordMetadata> future = new CompletableFuture<>(); Handler<AsyncResult<RecordMetadata>> handler = ar -> { if (ar.succeeded()) { LOGGER.info("Message {} sent successfully to Kafka topic {}", message, record.topic()); future.complete(ar.result()); } else { LOGGER.error("Message {} was not sent to Kafka topic {}", message, record.topic(), ar.cause()); future.completeExceptionally(ar.cause()); } }; LOGGER.debug("Using stream {} to write the record {}", stream, record); stream.write(record, handler); return future; }).ignore().build(); } static CompletionStage<Subscriber<? extends Message>> create(Vertx vertx, Map<String, String> config) { return CompletableFuture.completedFuture(new KafkaSink(vertx, config).subscriber); } Subscriber<Message> getSubscriber() { return subscriber; } }
[ "clement.escoffier@gmail.com" ]
clement.escoffier@gmail.com
c6098850e390f60583e87005b37c6debdd00de13
39511216bfad8ae7781e506ec395d08b07cadf08
/com/spiraltoys/cloudpets2/audio/WavAudio.java
518f1f16e2de1b9103d75a5f83c1d80fbd62a467
[]
no_license
jguion/cloudpets_java
a34366ba78402032891759eba60e58c8858d5e3c
60b88104275d95c6b080447a67a84741fb3dac0c
refs/heads/master
2021-03-27T18:55:41.745321
2017-05-24T17:03:47
2017-05-24T17:03:47
92,316,339
0
0
null
null
null
null
UTF-8
Java
false
false
1,557
java
package com.spiraltoys.cloudpets2.audio; import com.parse.ParseException; import java.io.Serializable; public class WavAudio implements Serializable { private int audioFormat; private int channelConfig; private int channelsNum; private short[] data; private int framesNum = -1; private int sampleRate; public short[] getData() { return this.data; } public int getSampleRate() { return this.sampleRate; } public int getChannelConfig() { return this.channelConfig; } public int getChannelsNum() { return this.channelsNum; } public int getAudioFormat() { return this.audioFormat; } public int getDataSizeBytes() { return this.data.length * 2; } public int getFramesNum() { if (this.framesNum < 0) { this.framesNum = this.data.length / this.channelsNum; } return this.framesNum; } public WavAudio(short[] inData, int inSampleRate, int inChannelConfig, int inAudioFormat) { this.data = inData; this.sampleRate = inSampleRate; this.channelConfig = inChannelConfig; this.audioFormat = inAudioFormat; this.channelsNum = 1; switch (this.channelConfig) { case 12: this.channelsNum = 2; return; case ParseException.EMAIL_MISSING /*204*/: case 1052: this.channelsNum = 4; return; default: return; } } }
[ "guionj@gmail.com" ]
guionj@gmail.com
c34892c5f8344820b9c19c24e90c2a43d83b3bb7
ed657210a17ce8fbe1be3f2a32263182987da177
/com.conx.logistics.kernel/com.conx.logistics.kernel.ui/kernel.ui.forms/domain/src/main/java/com/conx/logistics/kernel/ui/forms/domain/model/items/RadioButtonRepresentation.java
39f796204aa5247225e895760981672d6ec18041
[]
no_license
conxgit/conxlogistics-gerrit4
e6b3becee3561899cf283b1cbd88b737de6af0f4
24885e639432ab45082060ca66d0de45d80fdd82
refs/heads/master
2021-03-12T20:12:32.324680
2012-12-18T18:17:00
2012-12-18T18:17:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,362
java
/* * * * */ package com.conx.logistics.kernel.ui.forms.domain.model.items; import java.util.Map; import javax.persistence.Entity; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.Table; import com.conx.logistics.kernel.ui.forms.domain.model.FormItemRepresentation; import com.conx.logistics.kernel.ui.forms.shared.form.FormEncodingException; @Entity @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) @Table(name="uiRadioButtonRepresentation") public class RadioButtonRepresentation extends FormItemRepresentation { private String name; private String id; private String value; private Boolean selected = Boolean.FALSE; public RadioButtonRepresentation() { super("radioButton"); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public Boolean getSelected() { return selected; } public void setSelected(Boolean selected) { this.selected = selected; } @Override public Map<String, Object> getDataMap() { Map<String, Object> data = super.getDataMap(); data.put("name", this.name); data.put("id", this.id); data.put("value", this.value); data.put("selected", this.selected); return data; } @Override public void setDataMap(Map<String, Object> data) throws FormEncodingException { super.setDataMap(data); this.name = (String) data.get("name"); this.id = (String) data.get("id"); this.value = (String) data.get("value"); this.selected = (Boolean) data.get("selected"); } @Override public boolean equals(Object obj) { if (!super.equals(obj)) return false; if (!(obj instanceof RadioButtonRepresentation)) return false; RadioButtonRepresentation other = (RadioButtonRepresentation) obj; boolean equals = (this.name == null && other.name == null) || (this.name != null && this.name.equals(other.name)); if (!equals) return equals; equals = (this.id == null && other.id == null) || (this.id != null && this.id.equals(other.id)); if (!equals) return equals; equals = (this.value == null && other.value == null) || (this.value != null && this.value.equals(other.value)); if (!equals) return equals; equals = (this.selected == null && other.selected == null) || (this.selected != null && this.selected.equals(other.selected)); return equals; } @Override public int hashCode() { int result = super.hashCode(); int aux = this.name == null ? 0 : this.name.hashCode(); result = 37 * result + aux; aux = this.id == null ? 0 : this.id.hashCode(); result = 37 * result + aux; aux = this.value == null ? 0 : this.value.hashCode(); result = 37 * result + aux; aux = this.selected == null ? 0 : this.selected.hashCode(); result = 37 * result + aux; return result; } }
[ "mduduzi.keswa@bconv.com" ]
mduduzi.keswa@bconv.com
2fc6d0c42d9c9d78807ce9e4f650ff8a83f0583c
303fc5afce3df984edbc7e477f474fd7aee3b48e
/fuentes/ucumari-commons/src/main/java/com/wildc/ucumari/facility/model/FacilityGroupMemberPK.java
57d4b3976fdacf298519c9e114113391f7d67fed
[]
no_license
douit/erpventas
3624cbd55cb68b6d91677a493d6ef1e410392127
c53dc6648bd5a2effbff15e03315bab31e6db38b
refs/heads/master
2022-03-29T22:06:06.060059
2014-04-21T12:53:13
2014-04-21T12:53:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,267
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.wildc.ucumari.facility.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Embeddable; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Cristian */ @Embeddable public class FacilityGroupMemberPK implements Serializable { /** * */ private static final long serialVersionUID = -872132040724286354L; @Basic(optional = false) @Column(name = "FACILITY_ID") private String facilityId; @Basic(optional = false) @Column(name = "FACILITY_GROUP_ID") private String facilityGroupId; @Basic(optional = false) @Column(name = "FROM_DATE") @Temporal(TemporalType.TIMESTAMP) private Date fromDate; public FacilityGroupMemberPK() { } public FacilityGroupMemberPK(String facilityId, String facilityGroupId, Date fromDate) { this.facilityId = facilityId; this.facilityGroupId = facilityGroupId; this.fromDate = fromDate; } public String getFacilityId() { return facilityId; } public void setFacilityId(String facilityId) { this.facilityId = facilityId; } public String getFacilityGroupId() { return facilityGroupId; } public void setFacilityGroupId(String facilityGroupId) { this.facilityGroupId = facilityGroupId; } public Date getFromDate() { return fromDate; } public void setFromDate(Date fromDate) { this.fromDate = fromDate; } @Override public int hashCode() { int hash = 0; hash += (facilityId != null ? facilityId.hashCode() : 0); hash += (facilityGroupId != null ? facilityGroupId.hashCode() : 0); hash += (fromDate != null ? fromDate.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof FacilityGroupMemberPK)) { return false; } FacilityGroupMemberPK other = (FacilityGroupMemberPK) object; if ((this.facilityId == null && other.facilityId != null) || (this.facilityId != null && !this.facilityId.equals(other.facilityId))) { return false; } if ((this.facilityGroupId == null && other.facilityGroupId != null) || (this.facilityGroupId != null && !this.facilityGroupId.equals(other.facilityGroupId))) { return false; } if ((this.fromDate == null && other.fromDate != null) || (this.fromDate != null && !this.fromDate.equals(other.fromDate))) { return false; } return true; } @Override public String toString() { return "com.wildc.ucumari.client.modelo.FacilityGroupMemberPK[ facilityId=" + facilityId + ", facilityGroupId=" + facilityGroupId + ", fromDate=" + fromDate + " ]"; } }
[ "cmontes375@gmail.com" ]
cmontes375@gmail.com
d77b45ec186634ebd742bb99703ac4306623da8e
e25fa0638714be345000ea5eca3ef9e97a13d2c5
/pinyougouparent/pinyougou-solr-util/src/main/java/com/pinyougou/solrutil/SolrUtil.java
88297e82a24c2c95ea3971bb3174134002ec31d7
[]
no_license
CJ166858/git-test
f2b189bb62428d806f37730b2d9eba925c311166
4dc4581b743fcdd06717c38bb93678173c84e622
refs/heads/master
2021-08-08T16:51:42.472613
2020-05-15T16:35:56
2020-05-15T16:35:56
179,272,829
0
0
null
null
null
null
UTF-8
Java
false
false
1,629
java
package com.pinyougou.solrutil; import com.alibaba.fastjson.JSON; import com.pinyougou.mapper.TbItemMapper; import com.pinyougou.pojo.TbItem; import com.pinyougou.pojo.TbItemExample; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.data.solr.core.SolrTemplate; import org.springframework.stereotype.Component; import java.util.List; import java.util.Map; @Component public class SolrUtil { @Autowired private TbItemMapper itemMapper; @Autowired private SolrTemplate solrTemplate; public void importItemData(){ TbItemExample example=new TbItemExample(); TbItemExample.Criteria criteria = example.createCriteria(); criteria.andStatusEqualTo("1"); List<TbItem> itemList= itemMapper.selectByExample(example); System.out.println("----商品列表----"); for (TbItem item : itemList) { System.out.println(item.getId()+""+item.getTitle()+""+item.getPrice()); Map specMap = JSON.parseObject(item.getSpec(), Map.class); item.setSpecMap(specMap); } solrTemplate.saveBeans(itemList); solrTemplate.commit(); System.out.println("----结束----"); } public static void main(String[] args) { ApplicationContext context=new ClassPathXmlApplicationContext("classpath*:spring/applicationContext*.xml"); SolrUtil solrUtil=(SolrUtil) context.getBean("solrUtil"); solrUtil.importItemData(); } }
[ "zhangsan@itcast.cn" ]
zhangsan@itcast.cn
841080dcc06c5d2e9a938daced836c5342d61eb0
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0775_internal/src/java/module0775_internal/a/Foo2.java
283dc13ddcc7ce55c86685cdb6e2a75d30bc62c0
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,548
java
package module0775_internal.a; import java.awt.datatransfer.*; import java.beans.beancontext.*; import java.io.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.awt.datatransfer.DataFlavor * @see java.beans.beancontext.BeanContext * @see java.io.File */ @SuppressWarnings("all") public abstract class Foo2<M> extends module0775_internal.a.Foo0<M> implements module0775_internal.a.IFoo2<M> { java.rmi.Remote f0 = null; java.nio.file.FileStore f1 = null; java.sql.Array f2 = null; public M element; public static Foo2 instance; public static Foo2 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module0775_internal.a.Foo0.create(input); } public String getName() { return module0775_internal.a.Foo0.getInstance().getName(); } public void setName(String string) { module0775_internal.a.Foo0.getInstance().setName(getName()); return; } public M get() { return (M)module0775_internal.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (M)element; module0775_internal.a.Foo0.getInstance().set(this.element); } public M call() throws Exception { return (M)module0775_internal.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
da29111cbc875b37d2aa2395aa12a8b9ba2558fc
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/testing/957/OnlineIndexProxy.java
d9416ca7ff5c7b81b9bdc096b30c75a475388afd
[]
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
7,929
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.api.index; import java.io.File; import java.io.IOException; import org.neo4j.graphdb.ResourceIterator; import org.neo4j.internal.kernel.api.InternalIndexState; import org.neo4j.io.pagecache.IOLimiter; import org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException; import org.neo4j.kernel.api.index.IndexAccessor; import org.neo4j.kernel.api.index.IndexUpdater; import org.neo4j.kernel.api.index.NodePropertyAccessor; import org.neo4j.kernel.impl.api.index.updater.UpdateCountingIndexUpdater; import org.neo4j.storageengine.api.schema.CapableIndexDescriptor; import org.neo4j.storageengine.api.schema.IndexReader; import org.neo4j.storageengine.api.schema.PopulationProgress; import org.neo4j.values.storable.Value; public class OnlineIndexProxy implements IndexProxy { private final long indexId; private final CapableIndexDescriptor capableIndexDescriptor; final IndexAccessor accessor; private final IndexStoreView storeView; private final IndexCountsRemover indexCountsRemover; private boolean started; // About this flag: there are two online "modes", you might say... // - One is the pure starting of an already online index which was cleanly shut down and all that. // This scenario is simple and doesn't need this idempotency mode. // - The other is the creation or starting from an uncompleted population, where there will be a point // in the future where this index will flip from a populating index proxy to an online index proxy. // This is the problematic part. You see... we have been accidentally relying on the short-lived node // entity locks for this to work. The scenario where they have saved indexes from getting duplicate // nodes in them (one from populator and the other from a "normal" update is where a populator is nearing // its completion and wants to flip. Another thread is in the middle of applying a transaction which // in the end will feed an update to this index. Index updates are applied after store updates, so // the populator may see the created node and add it, index flips and then the updates comes in to the normal // online index and gets added again. The read lock here will have the populator wait for the transaction // to fully apply, e.g. also wait for the index update to reach the population job before adding that node // and flipping (the update mechanism in a populator is idempotent). // This strategy has changed slightly in 3.0 where transactions can be applied in whole batches // and index updates for the whole batch will be applied in the end. This is fine for everything except // the above scenario because the short-lived entity locks are per transaction, not per batch, and must // be so to not interfere with transactions creating constraints inside this batch. We do need to apply // index updates in batches because nowadays slave update pulling and application isn't special in any // way, it's simply applying transactions in batches and this needs to be very fast to not have instances // fall behind in a cluster. // So the sum of this is that during the session (until the next restart of the db) an index gets created // it will be in this forced idempotency mode where it applies additions idempotently, which may be // slightly more costly, but shouldn't make that big of a difference hopefully. private final boolean forcedIdempotentMode; OnlineIndexProxy( CapableIndexDescriptor capableIndexDescriptor, IndexAccessor accessor, IndexStoreView storeView, boolean forcedIdempotentMode ) { assert accessor != null; this.indexId = capableIndexDescriptor.getId(); this.capableIndexDescriptor = capableIndexDescriptor; this.accessor = accessor; this.storeView = storeView; this.forcedIdempotentMode = forcedIdempotentMode; this.indexCountsRemover = new IndexCountsRemover( storeView, indexId ); } @Override public void start() { started = true; } @Override public IndexUpdater newUpdater( final IndexUpdateMode mode ) { IndexUpdater actual = accessor.newUpdater( escalateModeIfNecessary( mode ) ); return started ? updateCountingUpdater( actual ) : actual; } private IndexUpdateMode escalateModeIfNecessary( IndexUpdateMode mode ) { if ( forcedIdempotentMode ) { // If this proxy is flagged with taking extra care about idempotency then escalate ONLINE to ONLINE_IDEMPOTENT. if ( mode != IndexUpdateMode.ONLINE ) { throw new IllegalArgumentException( "Unexpected mode " + mode + " given that " + this + " has been marked with forced idempotent mode. Expected mode " + IndexUpdateMode.ONLINE ); } return IndexUpdateMode.ONLINE_IDEMPOTENT; } return mode; } private IndexUpdater updateCountingUpdater( final IndexUpdater indexUpdater ) { return new UpdateCountingIndexUpdater( storeView, indexId, indexUpdater ); } @Override public void drop() { indexCountsRemover.remove(); accessor.drop(); } @Override public CapableIndexDescriptor getDescriptor() { return capableIndexDescriptor; } @Override public InternalIndexState getState() { return InternalIndexState.ONLINE; } @Override public void force( IOLimiter ioLimiter ) { accessor.force( ioLimiter ); } @Override public void refresh() { accessor.refresh(); } @Override public void close() throws IOException { accessor.close(); } @Override public IndexReader newReader() { return accessor.newReader(); } @Override public boolean awaitStoreScanCompleted() { return false; // the store scan is already completed } @Override public void activate() { // ok, already active } @Override public void validate() { // ok, it's online so it's valid } @Override public void validateBeforeCommit( Value[] tuple ) { accessor.validateBeforeCommit( tuple ); } @Override public IndexPopulationFailure getPopulationFailure() throws IllegalStateException { throw new IllegalStateException( this + " is ONLINE" ); } @Override public PopulationProgress getIndexPopulationProgress() { return PopulationProgress.DONE; } @Override public ResourceIterator<File> snapshotFiles() { return accessor.snapshotFiles(); } @Override public String toString() { return getClass().getSimpleName() + "[accessor:" + accessor + ", descriptor:" + capableIndexDescriptor + "]"; } @Override public void verifyDeferredConstraints( NodePropertyAccessor nodePropertyAccessor ) throws IndexEntryConflictException { accessor.verifyDeferredConstraints( nodePropertyAccessor ); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
e8b38d5cd3c6a3f2543dd9603f7765fc765093a8
5143dbcd52fe580950c92f777aaf8137a0ae8d1f
/wanbei-service/src/main/java/com/amateur/wanbei/service/service/invoker/common/WxMultipartFile.java
8c61211e446821872ab994145b2d245cb996b6b2
[]
no_license
amanic/fastBootWeixinDemo
cb0b30f5c04d3eaf4da1b54904b74856565e1a67
d1245e2dd22298c2373a0bf937e5c35a560f30a6
refs/heads/master
2020-03-23T00:57:20.976972
2018-07-13T21:19:25
2018-07-13T21:19:25
140,893,564
0
0
null
null
null
null
UTF-8
Java
false
false
7,305
java
/* * Copyright (c) 2016-2017, Guangshan (guangshan1992@qq.com) and the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.amateur.wanbei.service.service.invoker.common; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.tomcat.util.http.fileupload.FileItem; import org.apache.tomcat.util.http.fileupload.FileUploadException; import org.apache.tomcat.util.http.fileupload.disk.DiskFileItem; import org.springframework.util.StreamUtils; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartResolver; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Serializable; /** * FastBootWeixin WxMultipartFile * * @author Guangshan * @date 2017/08/23 22:31 * @since 0.1.2 */ public class WxMultipartFile implements MultipartFile, Serializable { protected static final Log logger = LogFactory.getLog(WxMultipartFile.class); private final FileItem fileItem; private final long size; private boolean preserveFilename = false; /** * Create an instance wrapping the given FileItem. * * @param fileItem the FileItem to wrap */ public WxMultipartFile(FileItem fileItem) { this.fileItem = fileItem; this.size = this.fileItem.getSize(); } /** * Return the underlying {@code org.apache.commons.fileupload.FileItem} * instance. There is hardly any need to access this. */ public final FileItem getFileItem() { return this.fileItem; } /** * Set whether to preserve the filename as sent by the client, not stripping off * path information in {@link WxMultipartFile#getOriginalFilename()}. * <p>Default is "false", stripping off path information that may prefix the * actual filename e.g. from Opera. Switch this to "true" for preserving the * client-specified filename as-is, including potential path separators. * * @see #getOriginalFilename() * @see CommonsMultipartResolver#setPreserveFilename(boolean) * @since 4.3.5 */ public void setPreserveFilename(boolean preserveFilename) { this.preserveFilename = preserveFilename; } @Override public String getName() { return this.fileItem.getFieldName(); } @Override public String getOriginalFilename() { String filename = this.fileItem.getName(); if (filename == null) { // Should never happen. return ""; } if (this.preserveFilename) { // Do not try to strip off a path... return filename; } // Check for Unix-style path int unixSep = filename.lastIndexOf("/"); // Check for Windows-style path int winSep = filename.lastIndexOf("\\"); // Cut off at latest possible point int pos = (winSep > unixSep ? winSep : unixSep); if (pos != -1) { // Any sort of path separator found... return filename.substring(pos + 1); } else { // A plain name return filename; } } @Override public String getContentType() { return this.fileItem.getContentType(); } @Override public boolean isEmpty() { return (this.size == 0); } @Override public long getSize() { return this.size; } @Override public byte[] getBytes() { if (!isAvailable()) { throw new IllegalStateException("File has been moved - cannot be read again"); } byte[] bytes = this.fileItem.get(); return (bytes != null ? bytes : new byte[0]); } @Override public InputStream getInputStream() throws IOException { if (!isAvailable()) { throw new IllegalStateException("File has been moved - cannot be read again"); } InputStream inputStream = this.fileItem.getInputStream(); return (inputStream != null ? inputStream : StreamUtils.emptyInput()); } @Override public void transferTo(File dest) throws IOException, IllegalStateException { if (!isAvailable()) { throw new IllegalStateException("File has already been moved - cannot be transferred again"); } if (dest.exists() && !dest.delete()) { throw new IOException( "Destination file [" + dest.getAbsolutePath() + "] already exists and could not be deleted"); } try { this.fileItem.write(dest); if (logger.isDebugEnabled()) { String action = "transferred"; if (!this.fileItem.isInMemory()) { action = (isAvailable() ? "copied" : "moved"); } logger.debug("Multipart file '" + getName() + "' with original filename [" + getOriginalFilename() + "], stored " + getStorageDescription() + ": " + action + " to [" + dest.getAbsolutePath() + "]"); } } catch (FileUploadException ex) { throw new IllegalStateException(ex.getMessage(), ex); } catch (IllegalStateException ex) { // Pass through when coming from FileItem directly throw ex; } catch (IOException ex) { // From I/O operations within FileItem.write throw ex; } catch (Exception ex) { throw new IOException("File transfer failed", ex); } } /** * Determine whether the multipart content is still available. * If a temporary file has been moved, the content is no longer available. */ protected boolean isAvailable() { // If in memory, it's available. if (this.fileItem.isInMemory()) { return true; } // Check actual existence of temporary file. if (this.fileItem instanceof DiskFileItem) { return ((DiskFileItem) this.fileItem).getStoreLocation().exists(); } // Check whether current file size is different than original one. return (this.fileItem.getSize() == this.size); } /** * Return a description for the storage location of the multipart content. * Tries to be as specific as possible: mentions the file location in case * of a temporary file. */ public String getStorageDescription() { if (this.fileItem.isInMemory()) { return "in memory"; } else if (this.fileItem instanceof DiskFileItem) { return "at [" + ((DiskFileItem) this.fileItem).getStoreLocation().getAbsolutePath() + "]"; } else { return "on disk"; } } }
[ "1642485710@qq.com" ]
1642485710@qq.com
b7c8cbd89348cb9a0048e7a2a07b5e49145cf667
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/p118pd/sdk/AbstractC9514Lill.java
4ad8bfbacc1f5ff984132430956f34f5fc43b50f
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package com.p118pd.sdk; import java.io.IOException; import java.math.BigInteger; /* renamed from: com.pd.sdk.丨Lill reason: invalid class name and case insensitive filesystem */ public interface AbstractC9514Lill { byte[] OooO00o(BigInteger bigInteger, BigInteger bigInteger2) throws IOException; BigInteger[] OooO00o(byte[] bArr) throws IOException; }
[ "593746220@qq.com" ]
593746220@qq.com
6cace341b204ebbbb7351d955bd7bdd976a6fdd3
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/an/b$9.java
c54cbf0b4024d67f37351c62b2bd090e685717bd
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package com.tencent.mm.an; import com.tencent.mm.g.a.js; import com.tencent.mm.sdk.b.a; import java.util.List; class b$9 implements Runnable { final /* synthetic */ List ebe; final /* synthetic */ boolean ebf = true; public b$9(List list) { this.ebe = list; } public final void run() { js jsVar = new js(); jsVar.bTw.action = 5; jsVar.bTw.bPa = this.ebe; jsVar.bTw.bTA = this.ebf; a.sFg.m(jsVar); } }
[ "707194831@qq.com" ]
707194831@qq.com
dd7d774c6be4d4ccffe397dddf67e78d2045616f
f734a18f8d05c709b0f5e1ed7d5c39fd45aed680
/views/src/main/java/demo/view/ViewDemo.java
0ea523bad8d6c51307ae04e9738ede5fdedac077
[ "Apache-2.0" ]
permissive
luketn/act-demo-apps
dffdc9c2ebfe3048e33f595c7c22aebca6f849ae
e1b753e3824df09a48d66258fadc08520e2ea6c2
refs/heads/master
2021-08-20T03:16:20.726854
2017-11-28T03:42:03
2017-11-28T03:42:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,145
java
package demo.view; import act.Act; import act.conf.AppConfig; import act.controller.Controller; import act.inject.param.NoBind; import act.view.beetl.BeetlView; import act.view.freemarker.FreeMarkerView; import act.view.mustache.MustacheView; import act.view.rythm.RythmView; import act.view.thymeleaf.ThymeleafView; import act.view.velocity.VelocityView; import org.osgl.$; import org.osgl.mvc.annotation.Before; import org.osgl.mvc.annotation.GetAction; import org.osgl.mvc.annotation.PostAction; import org.osgl.mvc.result.Result; @SuppressWarnings("unused") public class ViewDemo extends Controller.Util { @NoBind private String title = "ActFramework View Demo"; private String who = "ActFramework"; @Before public static void resetDefaultView(AppConfig config) { String templateId = RythmView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); } @GetAction("e500") public static String backendServerError() { // this will trigger a runtime error in the backend return Act.crypto().decrypt("bad-crypted-msg"); } @PostAction("/foo") public byte foo(byte b) { return b; } @GetAction({"", "rythm"}) public void rythm() { render(title, who); } @GetAction("rythm/error") public void rythmTemplateError() { } @GetAction("rythm/error/runtime") public void rythmTemplateRuntimeError() { } @GetAction("beetl") public void beetl() { render(title, who); } @GetAction("beetl/error") public void beetlTemplateError() { } @GetAction("beetl/error/runtime") public void beetlTemplateRuntimeError() { } @GetAction("velocity") public void velocity() { throw template(title, who); } @GetAction("velocity/error") public void velocityTemplateError() { } @GetAction("velocity/error/runtime") public void velocityTemplateRuntimeError() { Class<ViewDemo> demo = ViewDemo.class; template(demo); } @GetAction("freemarker") public Result freemarker() { return template(title, who); } @GetAction("freemarker/error") public void freemarkerTemplateError() { } @GetAction("freemarker/error/runtime") public void freemarkerTemplateRuntimeError() { ViewDemo demo = new ViewDemo(); template(demo); } @GetAction("mustache") public void mustache() { String appName = Act.app().name(); render(title, who, appName); } @GetAction("mustache/error") public void mustacheTemplateError() { } @GetAction("mustache/error/runtime") public void mustacheTemplateRuntimeError() { ViewDemo demo = new ViewDemo(); template(demo); } @GetAction("thymeleaf") public void thymeleaf() { render(title, who); } @GetAction("thymeleaf/error") public void thymeleafTemplateError() { } @GetAction("thymeleaf/error/runtime") public void thymeleafTemplateRuntimeError() { ViewDemo demo = new ViewDemo(); template(demo); } @GetAction("/api/v1/greeting/{who}") public String helloTo() { return "hello " + who; } @GetAction("rythm/inline") public void rythmInline(AppConfig config) { String templateId = RythmView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); render("Hello @who by @templateId", who, templateId); } @GetAction("beetl/inline") public void beetlInline(AppConfig config) { String templateId = BeetlView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); render("Hello ${who} by ${templateId}", who, templateId); } @GetAction("mustache/inline") public void mustacheInline(AppConfig config) { String templateId = MustacheView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); render("Hello {{who}} by {{templateId}}", who, templateId); } @GetAction("freemarker/inline") public void freemarkerInline(AppConfig config) { String templateId = FreeMarkerView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); render("Hello ${who} by ${templateId}", who, templateId); } @GetAction("thymeleaf/inline") public void thymeleafInline(AppConfig config) { String templateId = ThymeleafView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); render("<div>Hello <span data-th-text=\"${who}\"></span> by <span data-th-text=\"${templateId}\"></span></div>", who, templateId); } @GetAction("velocity/inline") public void velocityInline(AppConfig config) { String templateId = VelocityView.ID; $.setField("defView", config, Act.viewManager().view(templateId)); render("Hello $who by $templateId", who, templateId); } public static String rt() { return backendServerError(); } public static void main(String[] args) throws Exception { Act.start("View Demo"); } }
[ "greenlaw110@gmail.com" ]
greenlaw110@gmail.com
b2445adc0ac947aa61c748c1e4df4f99901857b8
04dc9583d9c5b9739e49d1c5eb4c492ee622587a
/SpringBootDataApp5-20190927T094300Z-001/SpringBootDataApp5/src/main/java/com/sai/repositories/BlogRepository.java
881d5e6fa8977840cb49ee18c597c3c59cfc375c
[]
no_license
satishyr/Sai-sir-SpringBoot
feb5c747749640d5d6238b36c9a46d2d4f88e008
9d8fc0b42bd0638545748f1a4cf6f98aa242a3be
refs/heads/master
2021-01-02T16:21:12.232502
2020-02-11T07:15:32
2020-02-11T07:15:32
239,699,241
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package com.sai.repositories; import org.springframework.data.repository.CrudRepository; import com.sai.entities.Blog; public interface BlogRepository extends CrudRepository<Blog,Integer>{ }
[ "y.satishkumar34@gmail.com" ]
y.satishkumar34@gmail.com
2548025c7db0f76040961c3898d95887d7be255e
6b4beeb4ec0efafe4a24099ee9d1dded5fb9e9d8
/common-oauth/src/main/java/com/lvxing/common/oauth/validate/ValidateCodeProcessorHolder.java
09d29a8e9d0ab8aada6a60ff942dfda3bbf526e0
[]
no_license
ag2010/cloud
0999f8f75585dac8bacc90035813ba179539bfe3
b1ea5fc12f9b4e0f451fcc7b717600c2a3488327
refs/heads/master
2023-03-19T02:13:20.080605
2021-03-12T09:13:58
2021-03-12T09:13:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,207
java
package com.lvxing.common.oauth.validate; import com.lvxing.common.oauth.exception.ValidateCodeException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Map; /** * 校验码处理器管理器 * @author lvxing * @since 2019/5/19 */ @Component public class ValidateCodeProcessorHolder { /** * 依赖搜索 * * Spring启动时,会查找容器中所有的ValidateCodeProcessor接口的实现,并把Bean的名字作为key,放到map中 */ @Autowired private Map<String, ValidateCodeProcessor> validateCodeProcessors; /** * @param type * @return */ public ValidateCodeProcessor findValidateCodeProcessor(ValidateCodeType type) { return findValidateCodeProcessor(type.toString().toLowerCase()); } /** * @param type * @return */ public ValidateCodeProcessor findValidateCodeProcessor(String type) { String name = type.toLowerCase() + ValidateCodeProcessor.class.getSimpleName(); ValidateCodeProcessor processor = validateCodeProcessors.get(name); if (processor == null) { throw new ValidateCodeException("验证码处理器" + name + "不存在"); } return processor; } }
[ "1003429737@qq.com" ]
1003429737@qq.com
25903b0c3bed8d1cbc989d4f146e8d785b53ee06
afd925268c0790889f3ac1271a6c5273874d205d
/dubbo-wusc/edu-facade-user/src/main/java/wusc/edu/facade/user/enums/UserStatusEnum.java
468247a5a2b1562449f84a53e5f223862e588063
[ "Apache-2.0" ]
permissive
T5750/maven-archetype-templates
ccbca2c22e3f335933362dd0df50438b69f96a10
32438ead6df9c9c128431467487f716a6042b782
refs/heads/master
2023-04-30T05:12:17.542191
2023-01-07T02:33:25
2023-01-07T02:33:25
87,774,083
17
22
Apache-2.0
2023-04-17T19:51:22
2017-04-10T06:22:54
JavaScript
UTF-8
Java
false
false
1,947
java
package wusc.edu.facade.user.enums; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * * @描述: 用户状态 . <br/> * @作者: WuShuicheng . * @创建时间: 2013-9-12,上午11:16:23 . * @版本: 1.0 . */ public enum UserStatusEnum { ACTIVE("激活", 100), INACTIVE("冻结", 101); /** 描述 */ private String desc; /** 枚举值 */ private int value; private UserStatusEnum(String desc, int value) { this.desc = desc; this.value = value; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public static UserStatusEnum getEnum(int value) { UserStatusEnum resultEnum = null; UserStatusEnum[] enumAry = UserStatusEnum.values(); for (int i = 0; i < enumAry.length; i++) { if (enumAry[i].getValue() == value) { resultEnum = enumAry[i]; break; } } return resultEnum; } public static Map<String, Map<String, Object>> toMap() { UserStatusEnum[] ary = UserStatusEnum.values(); Map<String, Map<String, Object>> enumMap = new HashMap<String, Map<String, Object>>(); for (int num = 0; num < ary.length; num++) { Map<String, Object> map = new HashMap<String, Object>(); String key = String.valueOf(getEnum(ary[num].getValue())); map.put("value", String.valueOf(ary[num].getValue())); map.put("desc", ary[num].getDesc()); enumMap.put(key, map); } return enumMap; } @SuppressWarnings({ "rawtypes", "unchecked" }) public static List toList() { UserStatusEnum[] ary = UserStatusEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { Map<String, String> map = new HashMap<String, String>(); map.put("value", String.valueOf(ary[i].getValue())); map.put("desc", ary[i].getDesc()); list.add(map); } return list; } }
[ "evangel_a@sina.com" ]
evangel_a@sina.com
e2db4607d57afb4789c4b6e0fa3172e77f0e8851
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Zookeeper/60_1.java
a145ec34481f812590c17d0dadc046c7fca47a6d
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
//,temp,LeaderElectionSupportTest.java,123,143,temp,LeaderElectionSupportTest.java,101,121 //,2 public class xxx { @Test public void testNodes20() throws IOException, InterruptedException, KeeperException { int testIterations = 20; final CountDownLatch latch = new CountDownLatch(testIterations); final AtomicInteger failureCounter = new AtomicInteger(); for (int i = 0; i < testIterations; i++) { runElectionSupportThread(latch, failureCounter); } Assert.assertEquals(0, failureCounter.get()); if (!latch.await(10, TimeUnit.SECONDS)) { logger .info( "Waited for all threads to start, but timed out. We had {} failures.", failureCounter); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
8024f50f0346de123a926d416c7b5c532498b95e
882a1a28c4ec993c1752c5d3c36642fdda3d8fad
/proxies/com/microsoft/bingads/v12/campaignmanagement/DeleteNegativeKeywordsFromEntitiesResponse.java
5526ff818a7c8932b4fed31d08a90bfc1ff683b8
[ "MIT" ]
permissive
BazaRoi/BingAds-Java-SDK
640545e3595ed4e80f5a1cd69bf23520754c4697
e30e5b73c01113d1c523304860180f24b37405c7
refs/heads/master
2020-07-26T08:11:14.446350
2019-09-10T03:25:30
2019-09-10T03:25:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,840
java
package com.microsoft.bingads.v12.campaignmanagement; 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 javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="NestedPartialErrors" type="{https://bingads.microsoft.com/CampaignManagement/v12}ArrayOfBatchErrorCollection" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "nestedPartialErrors" }) @XmlRootElement(name = "DeleteNegativeKeywordsFromEntitiesResponse") public class DeleteNegativeKeywordsFromEntitiesResponse { @XmlElement(name = "NestedPartialErrors", nillable = true) protected ArrayOfBatchErrorCollection nestedPartialErrors; /** * Gets the value of the nestedPartialErrors property. * * @return * possible object is * {@link ArrayOfBatchErrorCollection } * */ public ArrayOfBatchErrorCollection getNestedPartialErrors() { return nestedPartialErrors; } /** * Sets the value of the nestedPartialErrors property. * * @param value * allowed object is * {@link ArrayOfBatchErrorCollection } * */ public void setNestedPartialErrors(ArrayOfBatchErrorCollection value) { this.nestedPartialErrors = value; } }
[ "qitia@microsoft.com" ]
qitia@microsoft.com
1267dff9d73afb80b30f189fa1cb610fdfe356d1
223bb37709c01a21509df653f1453d5cc0badc57
/java-example-spring/src/main/java/com/goodsave/example/spring/jpatemplateb/Main.java
1dd4d535e6d4499c7fe7722889ea3a6f39db4638
[ "Apache-2.0" ]
permissive
goodsave/java-example
99fc57f18cac4fe4bcfda688158997ad86f71706
67802e8a202ac693b3e1a0042e01bf0fba943d26
refs/heads/master
2021-04-03T07:03:36.041482
2018-03-16T12:30:08
2018-03-16T12:30:08
124,855,220
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package com.goodsave.example.spring.jpatemplateb; import com.alibaba.fastjson.JSON; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * Main * Created by web on 2017/7/29. */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = com.goodsave.example.spring.jpatemplateb.AppConfig.class) public class Main { @Autowired private UserRepository userRepository; @Test public void test() { User user = userRepository.findUserByName("goodsave"); System.out.println("查询结果:"+ JSON.toJSONString(user)); } }
[ "goodsave@qq.com" ]
goodsave@qq.com
173cbbcc51243b9a2283a9cde803c7c57b072c31
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Math-10/org.apache.commons.math3.analysis.differentiation.DSCompiler/default/8/org/apache/commons/math3/analysis/differentiation/DSCompiler_ESTest_scaffolding.java
cc0ac51359902d28192896cc317933a8cd227e6c
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
6,366
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Jul 30 13:59:53 GMT 2021 */ package org.apache.commons.math3.analysis.differentiation; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class DSCompiler_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math3.analysis.differentiation.DSCompiler"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/experiment"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DSCompiler_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math3.exception.util.ExceptionContextProvider", "org.apache.commons.math3.util.MathArrays", "org.apache.commons.math3.exception.util.ArgUtils", "org.apache.commons.math3.exception.MathArithmeticException", "org.apache.commons.math3.exception.NumberIsTooSmallException", "org.apache.commons.math3.util.FastMath$ExpIntTable", "org.apache.commons.math3.util.FastMath$lnMant", "org.apache.commons.math3.exception.MathInternalError", "org.apache.commons.math3.exception.NotPositiveException", "org.apache.commons.math3.exception.MathIllegalStateException", "org.apache.commons.math3.analysis.differentiation.DSCompiler", "org.apache.commons.math3.util.FastMath$ExpFracTable", "org.apache.commons.math3.exception.NonMonotonicSequenceException", "org.apache.commons.math3.exception.MathIllegalArgumentException", "org.apache.commons.math3.util.FastMath$CodyWaite", "org.apache.commons.math3.exception.MathIllegalNumberException", "org.apache.commons.math3.exception.util.LocalizedFormats", "org.apache.commons.math3.util.FastMath", "org.apache.commons.math3.exception.DimensionMismatchException", "org.apache.commons.math3.exception.util.Localizable", "org.apache.commons.math3.exception.NumberIsTooLargeException", "org.apache.commons.math3.exception.NotStrictlyPositiveException", "org.apache.commons.math3.exception.util.ExceptionContext", "org.apache.commons.math3.exception.NullArgumentException", "org.apache.commons.math3.util.FastMathLiteralArrays" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(DSCompiler_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.math3.analysis.differentiation.DSCompiler", "org.apache.commons.math3.util.FastMath", "org.apache.commons.math3.util.FastMathLiteralArrays", "org.apache.commons.math3.util.FastMath$lnMant", "org.apache.commons.math3.util.FastMath$ExpIntTable", "org.apache.commons.math3.util.FastMath$ExpFracTable", "org.apache.commons.math3.util.Precision", "org.apache.commons.math3.exception.util.LocalizedFormats", "org.apache.commons.math3.util.ArithmeticUtils", "org.apache.commons.math3.exception.MathIllegalArgumentException", "org.apache.commons.math3.exception.MathIllegalNumberException", "org.apache.commons.math3.exception.DimensionMismatchException", "org.apache.commons.math3.exception.util.ExceptionContext", "org.apache.commons.math3.exception.util.ArgUtils", "org.apache.commons.math3.util.FastMath$CodyWaite", "org.apache.commons.math3.util.MathArrays", "org.apache.commons.math3.exception.NumberIsTooLargeException" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
705cd71e1b6b7a1d89f26bb8d1d6f242207b76f5
4bf733fa6bfb777308423612c6e36f250251222f
/Inspector/src/main/java/com/yilanpark/base/BaseActivity.java
679e2802002c4026284d05dd1aff52be5965a223
[]
no_license
xinnuo/Smart_Parking
e3576e785fff17a30a7a5bcb8a05d1078abe94cf
01a2c8179ec7d7ec97be1bd6699851b8f3dc0cf0
refs/heads/master
2021-10-23T22:23:31.178931
2019-03-20T13:38:27
2019-03-20T13:38:27
153,741,655
1
0
null
null
null
null
UTF-8
Java
false
false
7,912
java
package com.yilanpark.base; import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; import android.os.IBinder; import android.support.annotation.NonNull; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.StaggeredGridLayoutManager; import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.widget.*; import com.lzy.okgo.OkGo; import com.yilanpark.R; import com.yilanpark.utils.ActivityStack; import net.idik.lib.slimadapter.SlimAdapter; import net.idik.lib.slimadapter.SlimAdapterEx; public class BaseActivity extends AppCompatActivity implements TextWatcher, View.OnClickListener, RadioGroup.OnCheckedChangeListener, CompoundButton.OnCheckedChangeListener { private Toolbar toolbar; public TextView tvRight, tvTitle, btRight; public ImageView ivBack, ivRight; /** * 上下文context */ public Activity baseContext; /** * RecyclerView数据管理的LayoutManager */ public LinearLayoutManager linearLayoutManager; public GridLayoutManager gridLayoutManager; public StaggeredGridLayoutManager staggeredGridLayoutManager; /** * SlimAdapter的adapter */ public SlimAdapter mAdapter; public SlimAdapterEx mAdapterEx; /** * 分页加载页数 */ public int pageNum = 1; /** * 是否正在上拉加载中 */ public boolean isLoadingMore; public int mPosition; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setContentView(R.layout.activity_base); initToolbar(); baseContext = this; ActivityStack.Companion.getScreenManager().pushActivity(this); } public void setSuperContentView(int layoutId) { super.setContentView(layoutId); } // 沉浸状态栏 public void transparentStatusBar() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { WindowManager.LayoutParams localLayoutParams = getWindow().getAttributes(); localLayoutParams.flags = (WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | localLayoutParams.flags); } } // 沉浸状态栏,设置Toolbar是否可见 public void transparentStatusBar(boolean isToolbarVisible) { transparentStatusBar(); setToolbarVisibility(isToolbarVisible); } private void initToolbar() { toolbar = findViewById(R.id.toolbar); if (toolbar != null) { setSupportActionBar(toolbar); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); } } //初始化控件 public void init_title() { ivBack = findViewById(R.id.iv_nav_back); ivRight = findViewById(R.id.iv_nav_right); tvTitle = findViewById(R.id.tv_nav_title); tvRight = findViewById(R.id.tv_nav_right); btRight = findViewById(R.id.btn_nav_right); } //初始化控件,改变中间标题 public void init_title(String title) { init_title(); changeTitle(title); } //初始化控件,改变中间和右侧标题 public void init_title(String title, String name) { init_title(); changeTitle(title, name); } //改变中间标题 public void changeTitle(String title) { if (tvTitle == null) tvTitle = findViewById(R.id.tv_nav_title); assert tvTitle != null; tvTitle.setText(title); } //改变中间和右侧标题 public void changeTitle(String title, String name) { changeTitle(title); if (tvRight == null) tvRight = findViewById(R.id.tv_nav_right); if (name == null) { assert tvRight != null; tvRight.setVisibility(View.INVISIBLE); } else { assert tvRight != null; tvRight.setVisibility(View.VISIBLE); tvRight.setText(name); } } //设置Toolbar是否可见 public void setToolbarVisibility(boolean isVisible) { if (toolbar != null) toolbar.setVisibility(isVisible ? View.VISIBLE : View.GONE); findViewById(R.id.divider).setVisibility(isVisible ? View.VISIBLE : View.GONE); } @Override public void setContentView(int layoutId) { setContentView(View.inflate(this, layoutId, null)); } @Override public void setContentView(View view) { LinearLayout rootLayout = findViewById(R.id.content_layout); if (rootLayout == null) return; rootLayout.addView(view, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); initToolbar(); } //标题栏的返回按钮,onclick = "doClick" public void doClick(@NonNull View v) { switch (v.getId()) { case R.id.iv_nav_back: onBackPressed(); break; } } //网络数据请求方法 public void getData() { } public void getData(int pindex) { } public void getData(int pindex, boolean isLoading) { } //隐藏键盘 @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { // 获得当前得到焦点的View,一般情况下就是EditText(特殊情况就是轨迹求或者实体案件会移动焦点) View v = getCurrentFocus(); if (isShouldHideInput(v, ev)) { hideSoftInput(v.getWindowToken()); } } return super.dispatchTouchEvent(ev); } /** * 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘,因为当用户点击EditText时没必要隐藏 */ private boolean isShouldHideInput(View v, MotionEvent event) { if (v instanceof EditText) { int[] l = {0, 0}; v.getLocationInWindow(l); int left = l[0], top = l[1], bottom = top + v.getHeight(), right = left + v.getWidth(); return !(event.getX() > left && event.getX() < right && event.getY() > top && event.getY() < bottom); } // 如果焦点不是EditText则忽略,这个发生在视图刚绘制完,第一个焦点不在EditView上,和用户用轨迹球选择其他的焦点 return false; } /** * 多种隐藏软件盘方法的其中一种 */ private void hideSoftInput(IBinder token) { if (token != null) { InputMethodManager im = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (im == null) return; im.hideSoftInputFromWindow(token, InputMethodManager.HIDE_NOT_ALWAYS); } } @Override protected void onDestroy() { OkGo.getInstance().cancelTag(this); super.onDestroy(); } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable s) { } @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { } @Override public void onCheckedChanged(RadioGroup group, int checkedId) { } @Override public void onClick(View v) { } }
[ "416143467@qq.com" ]
416143467@qq.com
533b32951850bf0f91f9a9af3dae1fb3249fad03
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1107_public/src/java/module1107_public/a/Foo3.java
e404c8888e04613cb82359c6c9fddcf29b4d8433
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,601
java
package module1107_public.a; import javax.naming.directory.*; import javax.net.ssl.*; import javax.rmi.ssl.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.annotation.processing.Completion * @see javax.lang.model.AnnotatedConstruct * @see javax.management.Attribute */ @SuppressWarnings("all") public abstract class Foo3<X> extends module1107_public.a.Foo2<X> implements module1107_public.a.IFoo3<X> { javax.naming.directory.DirContext f0 = null; javax.net.ssl.ExtendedSSLSession f1 = null; javax.rmi.ssl.SslRMIClientSocketFactory f2 = null; public X element; public static Foo3 instance; public static Foo3 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1107_public.a.Foo2.create(input); } public String getName() { return module1107_public.a.Foo2.getInstance().getName(); } public void setName(String string) { module1107_public.a.Foo2.getInstance().setName(getName()); return; } public X get() { return (X)module1107_public.a.Foo2.getInstance().get(); } public void set(Object element) { this.element = (X)element; module1107_public.a.Foo2.getInstance().set(this.element); } public X call() throws Exception { return (X)module1107_public.a.Foo2.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
43ce3116c53025f2fe15f9464378a11dd5f05e8a
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/log4j/1.2/org/apache/log4j/varia/ReloadingPropertyConfigurator.java
cf22b5ae174771652f020593503eb5a04a9a3b95
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
454
java
package org.apache.log4j.varia; import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.spi.Configurator; import java.net.URL; import org.apache.log4j.spi.LoggerRepository; public class ReloadingPropertyConfigurator implements Configurator { PropertyConfigurator delegate = new PropertyConfigurator(); public ReloadingPropertyConfigurator() { } public void doConfigure(URL url, LoggerRepository repository) { } }
[ "hvdthong@github.com" ]
hvdthong@github.com
b6536342fb52024762eac516703221ed8765fbd7
6b7a49d25619b848aec99193ab07003a24a07761
/src/main/java/de/springSecurityDemo/security/JwtConfigurer.java
98d15d01f6bf867f1a9ed0602a8227d548a1372e
[]
no_license
AIRAT1/springSecurityDemo
8897dace2289409996aefdc03eb0d7df872fb026
2bbc1dada9212164e697ee3ef39646d9852f0190
refs/heads/master
2023-03-03T03:31:48.892203
2021-02-13T09:36:03
2021-02-13T09:36:03
336,069,720
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
package de.springSecurityDemo.security; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.config.annotation.SecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.web.DefaultSecurityFilterChain; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.stereotype.Component; @Component public class JwtConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> { private final JwtTokenFilter jwtTokenFilter; @Autowired public JwtConfigurer(JwtTokenFilter jwtTokenFilter) { this.jwtTokenFilter = jwtTokenFilter; } @Override public void configure(HttpSecurity httpSecurity) { httpSecurity.addFilterBefore(jwtTokenFilter, UsernamePasswordAuthenticationFilter.class); } }
[ "ayrat1@mail.ru" ]
ayrat1@mail.ru
321a0cd55989152f251a8fee38039648a7da031e
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/domain/KbOrderActivityModel.java
da552ace565fc59ec05387ba009c94b9274b8b9f
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
802
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 订单参加活动信息 * * @author auto create * @since 1.0, 2017-09-27 10:58:52 */ public class KbOrderActivityModel extends AlipayObject { private static final long serialVersionUID = 1236761977589844627L; /** * 活动ID */ @ApiField("activity_id") private String activityId; /** * 商品ID */ @ApiField("item_id") private String itemId; public String getActivityId() { return this.activityId; } public void setActivityId(String activityId) { this.activityId = activityId; } public String getItemId() { return this.itemId; } public void setItemId(String itemId) { this.itemId = itemId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8adec37ec1a94ac27d3fa8188ba41747e2c4e351
8d562fefacb4df2ab22a513111704ad1b8b730ea
/Imsi/src/h_inherit/Umma.java
3947c1d106a0e80caa187c952b90d6f5d1314c7a
[]
no_license
ILJ125/ilj125.github.com
b3d7f5fb05f878fa98ae57e6c2fae89ff219097c
16858ad0481b5f4c1d16aa316fbe424bc52cc185
refs/heads/master
2021-03-28T08:24:27.948538
2020-04-21T04:50:08
2020-04-21T04:50:08
247,852,387
0
0
null
2020-04-21T04:26:56
2020-03-17T01:30:15
Java
UTF-8
Java
false
false
266
java
package h_inherit; public class Umma { public Umma() { System.out.println("부모의 기본 생성자"); } public void gene() { System.out.println("부모는 부모다"); } public void job() { System.out.println("엄마는 대장"); } }
[ "Canon@DESKTOP-PL2F7PK" ]
Canon@DESKTOP-PL2F7PK
6918c066238446dbc60d5827d4267a2cc9f6f6dc
65f99eb163728bb0066876bc0009846e4ad1c4f4
/Phase1/Work_Stream_A/Code/DevCode/01-GN/INF/Model/src/com/beshara/csc/inf/business/dto/PersonDocAtchTypesDTO.java
4fb5ae01bc9540f95b3c4fe7a80096a24e031450
[]
no_license
omarEomar/CECS-GLV
3aedce788b0a50041b75ec3e81159d17be1ae435
b429c18de09f2ea08bb4d489a5458e1f28183f83
refs/heads/master
2021-05-02T12:13:27.298284
2018-03-06T10:11:10
2018-03-06T10:11:10
120,736,349
0
0
null
null
null
null
UTF-8
Java
false
false
904
java
package com.beshara.csc.inf.business.dto; import com.beshara.csc.inf.business.entity.PersonDocAtchTypesEntity; import com.beshara.csc.inf.business.entity.PersonDocAtchTypesEntityKey; public class PersonDocAtchTypesDTO extends InfDTO{ @SuppressWarnings("compatibility:-4485906751177687898") private static final long serialVersionUID = 1L; private String docAtcTypeName; public PersonDocAtchTypesDTO() { } public PersonDocAtchTypesDTO(PersonDocAtchTypesEntity ent) { setCode(new PersonDocAtchTypesEntityKey(ent.getDocAtcTypeCode())); } public PersonDocAtchTypesDTO(Long docAtcTypeCode) { setCode(new PersonDocAtchTypesEntityKey(docAtcTypeCode)); } public void setDocAtcTypeName(String docAtcTypeName) { this.docAtcTypeName = docAtcTypeName; } public String getDocAtcTypeName() { return docAtcTypeName; } }
[ "omarezzeldinomar@gmail.com" ]
omarezzeldinomar@gmail.com
18cad0a413a03134d47c1b877a3fcb39ff5d4788
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Chart-6/org.jfree.chart.util.ShapeList/BBC-F0-opt-80/19/org/jfree/chart/util/ShapeList_ESTest.java
c36e6eb1d219e03c2445532079581570147d8878
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
3,259
java
/* * This file was automatically generated by EvoSuite * Wed Oct 20 15:57:19 GMT 2021 */ package org.jfree.chart.util; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Shape; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.jfree.chart.util.ShapeList; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class ShapeList_ESTest extends ShapeList_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ShapeList shapeList0 = new ShapeList(); Dimension dimension0 = new Dimension(8, 0); Rectangle rectangle0 = new Rectangle(dimension0); shapeList0.setShape(0, rectangle0); shapeList0.getShape(0); assertEquals(1, shapeList0.size()); } @Test(timeout = 4000) public void test1() throws Throwable { ShapeList shapeList0 = new ShapeList(); // Undeclared exception! // try { shapeList0.setShape((-1109), (Shape) null); // fail("Expecting exception: IllegalArgumentException"); // } catch(IllegalArgumentException e) { // // // // Requires index >= 0. // // // verifyException("org.jfree.chart.util.AbstractObjectList", e); // } } @Test(timeout = 4000) public void test2() throws Throwable { ShapeList shapeList0 = new ShapeList(); shapeList0.set(0, ""); // Undeclared exception! // try { shapeList0.getShape(0); // fail("Expecting exception: ClassCastException"); // } catch(ClassCastException e) { // // // // java.lang.String cannot be cast to java.awt.Shape // // // verifyException("org.jfree.chart.util.ShapeList", e); // } } @Test(timeout = 4000) public void test3() throws Throwable { ShapeList shapeList0 = new ShapeList(); ShapeList shapeList1 = new ShapeList(); shapeList1.setShape(6175, (Shape) null); // Undeclared exception! shapeList1.equals(shapeList0); } @Test(timeout = 4000) public void test4() throws Throwable { ShapeList shapeList0 = new ShapeList(); boolean boolean0 = shapeList0.equals((Object) null); assertFalse(boolean0); } @Test(timeout = 4000) public void test5() throws Throwable { ShapeList shapeList0 = new ShapeList(); boolean boolean0 = shapeList0.equals(shapeList0); assertTrue(boolean0); } @Test(timeout = 4000) public void test6() throws Throwable { ShapeList shapeList0 = new ShapeList(); Shape shape0 = shapeList0.getShape(1); assertNull(shape0); } @Test(timeout = 4000) public void test7() throws Throwable { ShapeList shapeList0 = new ShapeList(); shapeList0.hashCode(); } @Test(timeout = 4000) public void test8() throws Throwable { ShapeList shapeList0 = new ShapeList(); Object object0 = shapeList0.clone(); assertTrue(object0.equals((Object)shapeList0)); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
896791ddbfd63bc3628b968e6cefe7fb85bf6cc8
262ded378ad859802e456d9d7dccc726531ccd01
/mysql-scenario/src/main/java/org/skywalking/apm/testcase/mysql/SQLExecutor.java
90aedc1aa24bd13315a0a0b6a2f1d97a91cc9136
[ "Apache-2.0" ]
permissive
zhang-xin-at-beijing/skywalking-autotest-scenarios
57c67ea5651b4ca627cf355d32c23068a14a3669
567b3333739a93aea3a01fd7717d75010ff2eef5
refs/heads/master
2021-08-31T18:25:55.230752
2017-12-22T10:39:18
2017-12-22T10:39:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,549
java
package org.skywalking.apm.testcase.mysql; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class SQLExecutor { private Connection connection; public SQLExecutor() throws SQLException { try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { // } connection = DriverManager.getConnection(MysqlConfig.getUrl(), MysqlConfig.getUserName(), MysqlConfig.getPassword()); } public void createTable(String sql) throws SQLException { PreparedStatement preparedStatement = connection.prepareStatement(sql); preparedStatement.execute(); preparedStatement.close(); } public void insertData(String sql, String id, String value) throws SQLException { CallableStatement preparedStatement = connection.prepareCall(sql); preparedStatement.setString(1, id); preparedStatement.setString(2, value); preparedStatement.execute(); preparedStatement.close(); } public void dropTable(String sql) throws SQLException { Statement preparedStatement = connection.createStatement(); preparedStatement.execute(sql); preparedStatement.close(); } public void closeConnection() throws SQLException { if (this.connection != null) { this.connection.close(); } } }
[ "nzt48.xin@gmail.com" ]
nzt48.xin@gmail.com
056075ccc76ce7b9e4d4d8e0552d220741371646
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_ff2d1dc34bd2da10ea8f71dceb50208564297d2e/PUSH/3_ff2d1dc34bd2da10ea8f71dceb50208564297d2e_PUSH_s.java
40387848dc0925e8fda0ff41d102803806436008
[]
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,654
java
/* * Copyright 2000-2004 The Apache Software Foundation * * 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.apache.bcel.generic; import org.apache.bcel.Constants; /** * Wrapper class for push operations, which are implemented either as BIPUSH, * LDC or xCONST_n instructions. * * @version $Id$ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> */ public final class PUSH implements CompoundInstruction, VariableLengthInstruction, InstructionConstants { private Instruction instruction; /** * This constructor also applies for values of type short, char, byte * * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, int value) { if((value >= -1) && (value <= 5)) // Use ICONST_n instruction = INSTRUCTIONS[Constants.ICONST_0 + value]; else if((value >= -128) && (value <= 127)) // Use BIPUSH instruction = new BIPUSH((byte)value); else if((value >= -32768) && (value <= 32767)) // Use SIPUSH instruction = new SIPUSH((short)value); else // If everything fails create a Constant pool entry instruction = new LDC(cp.addInteger(value)); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, boolean value) { instruction = INSTRUCTIONS[Constants.ICONST_0 + (value? 1 : 0)]; } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, float value) { if(value == 0.0) instruction = FCONST_0; else if(value == 1.0) instruction = FCONST_1; else if(value == 2.0) instruction = FCONST_2; else // Create a Constant pool entry instruction = new LDC(cp.addFloat(value)); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, long value) { if(value == 0) instruction = LCONST_0; else if(value == 1) instruction = LCONST_1; else // Create a Constant pool entry instruction = new LDC2_W(cp.addLong(value)); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, double value) { if(value == 0.0) instruction = DCONST_0; else if(value == 1.0) instruction = DCONST_1; else // Create a Constant pool entry instruction = new LDC2_W(cp.addDouble(value)); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, String value) { if(value == null) instruction = ACONST_NULL; else // Create a Constant pool entry instruction = new LDC(cp.addString(value)); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, Number value) { if((value instanceof Integer) || (value instanceof Short) || (value instanceof Byte)) instruction = new PUSH(cp, value.intValue()).instruction; else if(value instanceof Double) instruction = new PUSH(cp, value.doubleValue()).instruction; else if(value instanceof Float) instruction = new PUSH(cp, value.floatValue()).instruction; else if(value instanceof Long) instruction = new PUSH(cp, value.longValue()).instruction; else throw new ClassGenException("What's this: " + value); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, Character value) { this(cp, (int)value.charValue()); } /** * @param cp Constant pool * @param value to be pushed */ public PUSH(ConstantPoolGen cp, Boolean value) { this(cp, value.booleanValue()); } public final InstructionList getInstructionList() { return new InstructionList(instruction); } public final Instruction getInstruction() { return instruction; } /** * @return mnemonic for instruction */ public String toString() { return instruction.toString() + " (PUSH)"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
45d503a48731f8eeecd194139012aa9fb7c84fa9
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/CHART-4b-6-16-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/jfree/chart/ChartFactory_ESTest.java
7bdda032798c7d04eeb306a79475d63287bd5d32
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,301
java
/* * This file was automatically generated by EvoSuite * Tue Oct 26 10:08:12 UTC 2021 */ package org.jfree.chart; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.jfree.chart.ChartFactory; import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.xy.XYDataset; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ChartFactory_ESTest extends ChartFactory_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ChartFactory.getChartTheme(); String string0 = "XS#Q}{E,"; XYDataset xYDataset0 = mock(XYDataset.class, new ViolatedAssumptionAnswer()); doReturn(0).when(xYDataset0).getSeriesCount(); PlotOrientation plotOrientation0 = mock(PlotOrientation.class, new ViolatedAssumptionAnswer()); boolean boolean0 = false; // Undeclared exception! ChartFactory.createScatterPlot("XS#Q}{E,", "D]", "destination", xYDataset0, plotOrientation0, false, false, false); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
8bea8374642c1d7d142857b23f10f8a5df3640ea
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE23_Relative_Path_Traversal/CWE23_Relative_Path_Traversal__Environment_81_base.java
465a428c4a81d0ce5174da5eb5270bb677b27d19
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
772
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__Environment_81_base.java Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-81_base.tmpl.java */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: Environment Read data from an environment variable * GoodSource: A hardcoded string * Sinks: readFile * BadSink : no validation * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE23_Relative_Path_Traversal; import testcasesupport.*; import java.io.*; import javax.servlet.http.*; public abstract class CWE23_Relative_Path_Traversal__Environment_81_base { public abstract void action(String data ) throws Throwable; }
[ "you@example.com" ]
you@example.com
d885a4997447c3ab35595d91949a7a6ad3ce315d
511c0fdb941bde8072846ca880b6320f8b79d1fc
/Lapwing git/Lapwing/shoal-common/src/main/java/com/ishoal/common/domain/OrderReference.java
1f95adb12830c04e080432e4b3a4803336ce42f7
[]
no_license
cyberstormdotmu/seconds
a93089f79f7995a883e1c755817801fe63d0f0ac
fe332ed0ef33197e76e42b38465141b96960109f
refs/heads/master
2020-04-01T07:35:11.577920
2018-08-08T13:45:49
2018-08-08T13:45:49
152,995,126
0
0
null
2018-10-14T16:33:30
2018-10-14T16:33:30
null
UTF-8
Java
false
false
1,431
java
package com.ishoal.common.domain; import com.ishoal.common.util.OrderReferenceGenerator; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; public class OrderReference { public static final OrderReference EMPTY_ORDER_REFERENCE = new OrderReference(null); private final String reference; private OrderReference(String reference) { this.reference = reference; } public static OrderReference create() { return OrderReferenceGenerator.generate(); } public static OrderReference from(String reference) { if(reference == null) { return EMPTY_ORDER_REFERENCE; } return new OrderReference(reference); } public String asString() { return this.reference; } @Override public String toString() { return asString(); } @Override public int hashCode() { return new HashCodeBuilder().append(this.reference).hashCode(); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } OrderReference other = (OrderReference) obj; return new EqualsBuilder().append(this.reference, other.reference).isEquals(); } }
[ "bhawin12@gecg28.ac.in" ]
bhawin12@gecg28.ac.in
3d2de4223c7e81c35689a2b5d44f08ef2aab5819
32aab7169fbcd48ef14198785a2ae8bf0ca1bde4
/src/main/java/com/glaf/wechat/sdk/message/IMessage.java
f882f748a9f64c908adc29cf38cbd7b5fd0c3528
[]
no_license
jior/wechat
8d2583d3ff56d3c8e309d632b624f5a5253244a9
fc13a5241f664879ca43069ac6da647d970cdf0e
refs/heads/master
2021-01-18T20:12:36.569664
2015-04-12T14:54:23
2015-04-12T14:54:23
13,232,760
1
2
null
null
null
null
UTF-8
Java
false
false
3,616
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 com.glaf.wechat.sdk.message; /** * 全部常量定义 * */ public interface IMessage { // 接收的消息类型 public static final String MESSAGE_EVENT = "event"; public static final String MESSAGE_IMAGE = "image"; public static final String MESSAGE_LINK = "link"; public static final String MESSAGE_LOCATION = "location"; public static final String MESSAGE_TEXT = "text"; public static final String MESSAGE_VOICE = "voice"; public static final String MESSAGE_VIDEO = "video"; // 响应的消息类型 public static final String MESSAGE_RESPONSE_MUSIC = "music"; public static final String MESSAGE_RESPONSE_NEWS = "news"; public static final String MESSAGE_RESPONSE_TEXT = "text"; public static final String MESSAGE_RESPONSE_IMAGE = "image"; public static final String MESSAGE_RESPONSE_VOICE = "voice"; public static final String MESSAGE_RESPONSE_VIDEO = "video"; // 事件类型 public static final String EVENT_CLICK = "CLICK"; public static final String EVENT_SUBSCRIBE = "subscribe"; public static final String EVENT_UNSUBSCRIBE = "unsubscribe"; // 消息标签 public static final String TAG_ARTICLECOUNT = "ArticleCount"; public static final String TAG_ARTICLES = "Articles"; public static final String TAG_AUTHOR = "Author"; public static final String TAG_CONTENT = "Content"; public static final String TAG_CREATETIME = "CreateTime"; public static final String TAG_DESCRIPTION = "Description"; public static final String TAG_EVENT = "Event"; public static final String TAG_EVENTKEY = "EventKey"; public static final String TAG_FROMUSERNAME = "FromUserName"; public static final String TAG_FUNCFLAG = "FuncFlag"; public static final String TAG_HQMUSICURL = "HQMusicUrl"; public static final String TAG_ITEM = "item"; public static final String TAG_LABEL = "Label"; public static final String TAG_LATITUDE = "Location_X"; public static final String TAG_LONGITUDE = "Location_Y"; public static final String TAG_MSGID = "MsgId"; public static final String TAG_MSGTYPE = "MsgType"; public static final String TAG_MUSIC = "Music"; public static final String TAG_MUSICURL = "MusicUrl"; public static final String TAG_PICURL = "PicUrl"; public static final String TAG_SCALE = "Scale"; public static final String TAG_TITLE = "Title"; public static final String TAG_TOUSERNAME = "ToUserName"; public static final String TAG_URL = "Url"; public static final String TAG_XML = "xml"; public static final String TAG_IMAGE = "Image"; public static final String TAG_MEDIAID = "MediaId"; public static final String TAG_THUMBMEDIAID = "thumbMediaId"; public static final String TAG_FORMAT = "Format"; public static final String TAG_TICKET = "Ticket"; public static final String TAG_VOICE = "Voice"; public static final String TAG_VIDEO = "Video"; }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
d8f548766cdaf3574243f4ccf029e96b978d06c2
94b278c2b3de857bd47847f5a3c00fb9ac69fa19
/analyisis/src/main/java/com/hzvh/kv/key/DateDimension.java
1051b9455b2d97c5f412eb9af24d4bca19b16167
[ "Apache-2.0" ]
permissive
Hzvh/BigDataAnalysis
418903766e2a313685d9ee1fbc023ae91cae4366
6be9fedef655cce4966c7ca4416695d21695cd6f
refs/heads/main
2023-06-25T19:16:52.532519
2021-07-31T08:49:51
2021-07-31T08:49:51
391,301,085
1
1
null
null
null
null
UTF-8
Java
false
false
1,832
java
package com.hzvh.kv.key; import com.hzvh.kv.base.BaseDimension; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public class DateDimension extends BaseDimension { private String year; private String month; private String day; public DateDimension() { } public DateDimension(String year, String month, String day) { this.year = year; this.month = month; this.day = day; } public String getYear() { return year; } public void setYear(String year) { this.year = year; } public String getMonth() { return month; } public void setMonth(String month) { this.month = month; } public String getDay() { return day; } public void setDay(String day) { this.day = day; } @Override public String toString() { return year + "\t" + month + "\t" + day; } @Override public int compareTo(BaseDimension o) { DateDimension other = (DateDimension)o; //判断年是否相同 int result = this.year.compareTo(other.year); if (result == 0){ //判断月是否相同 result = this.month.compareTo(other.month); } if(result == 0){ //判断天是否相同 result = this.day.compareTo(other.day); } return result; } @Override public void write(DataOutput dataOutput) throws IOException { dataOutput.writeUTF(year); dataOutput.writeUTF(month); dataOutput.writeUTF(day); } @Override public void readFields(DataInput dataInput) throws IOException { this.year = dataInput.readUTF(); this.month = dataInput.readUTF(); this.day = dataInput.readUTF(); } }
[ "gogs@fake.local" ]
gogs@fake.local
5d0c859cc2254a208761adb9753cf706d0f0d01d
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes5.dex_source_from_JADX/com/facebook/graphql/deserializers/GraphQLEventViewActionLinkDeserializer.java
493685443b039612acd92852fbf6cf493d54233e
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
2,892
java
package com.facebook.graphql.deserializers; import com.facebook.flatbuffers.FlatBufferBuilder; import com.facebook.flatbuffers.MutableFlatBuffer; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.SerializerProvider; import java.nio.ByteBuffer; /* compiled from: parent_child_migration */ public class GraphQLEventViewActionLinkDeserializer { public static int m4839a(JsonParser jsonParser, FlatBufferBuilder flatBufferBuilder) { int[] iArr = new int[3]; while (jsonParser.c() != JsonToken.END_OBJECT) { String i = jsonParser.i(); jsonParser.c(); if (!(jsonParser.g() == JsonToken.VALUE_NULL || i == null)) { if (i.equals("event")) { iArr[0] = GraphQLEventDeserializer.m4792a(jsonParser, flatBufferBuilder); } else if (i.equals("title")) { iArr[1] = flatBufferBuilder.b(jsonParser.o()); } else if (i.equals("url")) { iArr[2] = flatBufferBuilder.b(jsonParser.o()); } else { jsonParser.f(); } } } flatBufferBuilder.c(3); flatBufferBuilder.b(0, iArr[0]); flatBufferBuilder.b(1, iArr[1]); flatBufferBuilder.b(2, iArr[2]); return flatBufferBuilder.d(); } public static MutableFlatBuffer m4840a(JsonParser jsonParser, short s) { FlatBufferBuilder flatBufferBuilder = new FlatBufferBuilder(128); int a = m4839a(jsonParser, flatBufferBuilder); if (1 != 0) { flatBufferBuilder.c(2); flatBufferBuilder.a(0, s, 0); flatBufferBuilder.b(1, a); a = flatBufferBuilder.d(); } flatBufferBuilder.d(a); ByteBuffer wrap = ByteBuffer.wrap(flatBufferBuilder.e()); wrap.position(0); MutableFlatBuffer mutableFlatBuffer = new MutableFlatBuffer(wrap, null, null, true, null); mutableFlatBuffer.a(4, Boolean.valueOf(true)); return mutableFlatBuffer; } public static void m4841a(MutableFlatBuffer mutableFlatBuffer, int i, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) { jsonGenerator.f(); int g = mutableFlatBuffer.g(i, 0); if (g != 0) { jsonGenerator.a("event"); GraphQLEventDeserializer.m4796b(mutableFlatBuffer, g, jsonGenerator, serializerProvider); } if (mutableFlatBuffer.g(i, 1) != 0) { jsonGenerator.a("title"); jsonGenerator.b(mutableFlatBuffer.c(i, 1)); } if (mutableFlatBuffer.g(i, 2) != 0) { jsonGenerator.a("url"); jsonGenerator.b(mutableFlatBuffer.c(i, 2)); } jsonGenerator.g(); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
dd11e906d450fdbb08b3751b5236b0fb052c1df9
ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd
/Talagram/org/telegram/customization/util/f.java
4440ab7b3b9515b600cdf2b55f5d0e4d14afe20a
[]
no_license
danielperez9430/Third-party-Telegram-Apps-Spy
dfe541290c8512ca366e401aedf5cc5bfcaa6c3e
f6fc0f9c677bd5d5cd3585790b033094c2f0226d
refs/heads/master
2020-04-11T23:26:06.025903
2018-12-18T10:07:20
2018-12-18T10:07:20
162,166,647
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
package org.telegram.customization.util; import java.util.ArrayList; import java.util.Iterator; public class f { public static ArrayList a; private static f b; static { f.a = new ArrayList(); f.b = null; } public f() { super(); } public ArrayList a() { return f.a; } public void a(String arg4) { Iterator v0 = f.a.iterator(); int v1; for(v1 = 0; v0.hasNext(); v1 = 1) { if(!v0.next().contentEquals(((CharSequence)arg4))) { continue; } } if(v1 != 0) { f.a.remove(arg4); } f.a.add(arg4); } public static f b() { if(f.b == null) { f.b = new f(); } return f.b; } }
[ "dpefe@hotmail.es" ]
dpefe@hotmail.es
50893344ba66210b0a5624a23476eef75b36ba0b
a3a06ca27ecad4b4674694387561d97d4920da47
/kie-wb-common-forms/kie-wb-common-forms-commons/kie-wb-common-forms-common-rendering/kie-wb-common-forms-common-rendering-client/src/test/java/org/kie/workbench/common/forms/common/rendering/client/widgets/decimalBox/DecimalBoxTest.java
e9f612be9c1087b2f12f96cba2f21cc0b415b528
[ "Apache-2.0" ]
permissive
danielzhe/kie-wb-common
71e777afc9c518c52f307f33230850bacfcb2013
e12a7deeb73befb765939e7185f95b2409715b41
refs/heads/main
2022-08-24T12:01:21.180766
2022-03-29T07:55:56
2022-03-29T07:55:56
136,397,477
1
0
Apache-2.0
2020-08-06T14:50:34
2018-06-06T23:43:53
Java
UTF-8
Java
false
false
7,030
java
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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.kie.workbench.common.forms.common.rendering.client.widgets.decimalBox; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.user.client.ui.Widget; import com.google.gwtmockito.GwtMock; import com.google.gwtmockito.GwtMockitoTestRunner; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.any; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @RunWith(GwtMockitoTestRunner.class) public class DecimalBoxTest { public static final String VALUE_NO_SEPARATOR = "10"; public static final String VALUE_WITH_SEPARATOR = "10.87"; public static final int ARROW_LEFT_KEYCODE = 37; public static final int ARROW_RIGHT_KEYCODE = 39; public static final int PERIOD_KEYCODE = 190; public static final Double TEST_VALUE_DOUBLE = 27.89d; public static final String TEST_VALUE_STRING = TEST_VALUE_DOUBLE.toString(); protected DecimalBoxView view; @GwtMock protected GwtEvent<?> event; @GwtMock protected Widget viewWidget; protected DecimalBox decimalBox; @Before public void setup() { view = mock(DecimalBoxView.class); when(view.asWidget()).thenReturn(viewWidget); decimalBox = new DecimalBox(view); verify(view).setPresenter(decimalBox); decimalBox.asWidget(); verify(view).asWidget(); } @Test public void testSetValueWithoutEvents() { decimalBox.setValue(TEST_VALUE_DOUBLE); verify(view).setValue(TEST_VALUE_STRING); } @Test public void testSetValueWithEvents() { decimalBox = spy(decimalBox); decimalBox.setValue(TEST_VALUE_DOUBLE, true); verify(view).setValue(TEST_VALUE_STRING); verify(decimalBox).notifyValueChange(TEST_VALUE_STRING); } @Test public void testSetNullValue() { decimalBox = spy(decimalBox); // Current DoubleBox Value is Null decimalBox.setValue(null, true); verify(decimalBox, times(0)).notifyValueChange(null); // Current DoubleBox Value is NOT Null when(view.getTextValue()).thenReturn(TEST_VALUE_STRING); decimalBox.setValue(null, true); verify(decimalBox).notifyValueChange(null); } @Test public void testKeyCodeLetter() { testKeyCode(KeyCodes.KEY_A, false, true); } @Test public void testKeyCodeSpace() { testKeyCode(KeyCodes.KEY_SPACE, false, true); } @Test public void testKeyCodeDigit() { testKeyCode(KeyCodes.KEY_ONE, false, false); } @Test public void testKeyCodeNumPadDigit() { testKeyCode(KeyCodes.KEY_NUM_ONE, false, false); } @Test public void testKeyCodeBackSpace() { testKeyCode(KeyCodes.KEY_BACKSPACE, false, false); } @Test public void testKeyCodeLeftArrow() { testKeyCode(ARROW_LEFT_KEYCODE, false, false); } @Test public void testKeyCodeRightArrow() { testKeyCode(ARROW_RIGHT_KEYCODE, false, false); } @Test public void testKeyCodeTab() { testKeyCode(KeyCodes.KEY_TAB, false, false); } @Test public void testKeyCodeShiftTab() { testKeyCode(KeyCodes.KEY_TAB, true, false); } @Test public void testDecimalSeparatorWhenNotPresent() { when(view.getTextValue()).thenReturn(VALUE_NO_SEPARATOR); testKeyCode(PERIOD_KEYCODE, false, false); testKeyCode(KeyCodes.KEY_NUM_PERIOD, false, false); } @Test public void testDecimalSeparatorWhenPresent() { when(view.getTextValue()).thenReturn(VALUE_WITH_SEPARATOR); testKeyCode(PERIOD_KEYCODE, false, true); testKeyCode(KeyCodes.KEY_NUM_PERIOD, false, true); } private void testKeyCode(int keyCode, boolean isShiftPressed, boolean expectInvalid) { boolean result = decimalBox.isInvalidKeyCode(keyCode, isShiftPressed); assertEquals(result, expectInvalid); } @Test public void testEvents() { ValueChangeHandler handler = mock(ValueChangeHandler.class); decimalBox.addValueChangeHandler(handler); verify(view, atLeast(1)).asWidget(); verify(viewWidget).addHandler(any(), any()); decimalBox.fireEvent(event); verify(view, atLeast(2)).asWidget(); verify(viewWidget).fireEvent(event); } @Test public void testEnableTrue() { testEnable(true); } @Test public void testEnableFalse() { testEnable(false); } private void testEnable(boolean enable) { decimalBox.setEnabled(enable); verify(view).setEnabled(enable); } @Test public void testSetPlaceholder() { String placeholder = "Random placeholder"; decimalBox.setPlaceholder(placeholder); verify(view).setPlaceholder(eq(placeholder)); } @Test public void testSetId() { String id = "field_id"; decimalBox.setId(id); verify(view).setId(eq(id)); } @Test public void testSetMaxLength() { int maxLength = 10; decimalBox.setMaxLength(maxLength); verify(view).setMaxLength(eq(maxLength)); } }
[ "manstis@users.noreply.github.com" ]
manstis@users.noreply.github.com
2562c935e5d5f87ffd0cf40fff888671a72ca832
1091a59e9a582a4d45b4bbce74188b3b561c6825
/kzscrm-service/src/main/java/com/hd/kzscrm/service/param/split/SplitCutInfoParam.java
ad5e8ebf72c97a7bfc5925ac6bcc350ec8ccbb22
[]
no_license
DongMing0103/RMc
d5782e2661a68e62737022d0d8ed55c0d190bb41
ead713f72c47ee2032ea05c7da6b7d842984ff4f
refs/heads/master
2021-06-26T21:57:40.750172
2017-09-15T09:53:11
2017-09-15T09:53:11
103,642,852
0
0
null
null
null
null
UTF-8
Java
false
false
6,454
java
package com.hd.kzscrm.service.param.split; import java.math.BigDecimal; import java.util.List; import com.hd.kzscrm.common.param.PageParam; public class SplitCutInfoParam extends PageParam { /** * 主键 */ private Long id; /** * 商家编号 */ private Long canteenId; /** * 商家用户编号 */ private Long canteenUserId; /** * 订单号 */ private String orderNo; /** * 用户编号 */ private Long userId; /** * 新建时间 */ private String createTime; /** * 商家金额 */ private BigDecimal realMoney; /** * 平台抽成金额 */ private BigDecimal cutMoney; /** * 抽成比例 */ private BigDecimal cutRatio; /** * 通道费 */ private BigDecimal channelMoney; /** * 抽成状态 */ private Integer cutStatus; /** * 抽成时间 */ private String cutTime; /** * 取消时间 */ private String cancelTime; /** * 退款订单号 */ private String refundOrderNo; /** * 删除,0.删除,1.存在 */ private Short delFlag; /** * 查询 开始时间 *@Description : TODO *@author : lcl *@time : 2017年3月6日 下午5:45:57 */ private String stratTimes; /** * 查询 结束时间 *@Description : TODO *@author : lcl *@time : 2017年3月6日 下午5:45:57 */ private String endTimes; /** * 输入框内容 *@Description : TODO *@author : lcl *@time : 2017年3月6日 下午20:48:57 */ private String inputContent; /** * 选择查询类型 */ private Integer leixing; /** * 商家编号 */ private List<Long> canteenIds; /** * 订单实际金额 */ private BigDecimal orderRealMoney; /** * 商家名称 */ private String canteenName; /** * 异常消息 */ private String errorMsg; /** * 支付方式 */ private Integer payModel; /** * 业务分账 0 为分账 1已分账 */ private Integer businessCutStatus; public Integer getBusinessCutStatus() { return businessCutStatus; } public void setBusinessCutStatus(Integer businessCutStatus) { this.businessCutStatus = businessCutStatus; } public Integer getPayModel() { return payModel; } public void setPayModel(Integer payModel) { this.payModel = payModel; } public String getErrorMsg() { return errorMsg; } public void setErrorMsg(String errorMsg) { this.errorMsg = errorMsg; } public String getCanteenName() { return canteenName; } public void setCanteenName(String canteenName) { this.canteenName = canteenName; } public void setOrderRealMoney(BigDecimal orderRealMoney) { this.orderRealMoney = orderRealMoney; } public BigDecimal getOrderRealMoney() { return orderRealMoney; } public String getStratTimes() { return stratTimes; } public void setStratTimes(String stratTimes) { this.stratTimes = stratTimes; } public String getEndTimes() { return endTimes; } public void setEndTimes(String endTimes) { this.endTimes = endTimes; } public String getInputContent() { return inputContent; } public void setInputContent(String inputContent) { this.inputContent = inputContent; } public Integer getLeixing() { return leixing; } public void setLeixing(Integer leixing) { this.leixing = leixing; } public List<Long> getCanteenIds() { return canteenIds; } public void setCanteenIds(List<Long> canteenIds) { this.canteenIds = canteenIds; } /** * 主键 */ public void setId(Long id) { this.id = id; } /** * @return 主键 */ public Long getId() { return this.id; } /** * 商家编号 */ public void setCanteenId(Long canteenId) { this.canteenId = canteenId; } /** * @return 商家编号 */ public Long getCanteenId() { return this.canteenId; } /** * 商家用户编号 */ public void setCanteenUserId(Long canteenUserId) { this.canteenUserId = canteenUserId; } /** * @return 商家用户编号 */ public Long getCanteenUserId() { return this.canteenUserId; } /** * 订单号 */ public void setOrderNo(String orderNo) { this.orderNo = orderNo; } /** * @return 订单号 */ public String getOrderNo() { return this.orderNo; } /** * 用户编号 */ public void setUserId(Long userId) { this.userId = userId; } /** * @return 用户编号 */ public Long getUserId() { return this.userId; } /** * 新建时间 */ public void setCreateTime(String createTime) { this.createTime = createTime; } /** * @return 新建时间 */ public String getCreateTime() { return this.createTime; } /** * 商家金额 */ public void setRealMoney(BigDecimal realMoney) { this.realMoney = realMoney; } /** * @return 商家金额 */ public BigDecimal getRealMoney() { return this.realMoney; } /** * 平台抽成金额 */ public void setCutMoney(BigDecimal cutMoney) { this.cutMoney = cutMoney; } /** * @return 平台抽成金额 */ public BigDecimal getCutMoney() { return this.cutMoney; } /** * 抽成比例 */ public void setCutRatio(BigDecimal cutRatio) { this.cutRatio = cutRatio; } /** * @return 抽成比例 */ public BigDecimal getCutRatio() { return this.cutRatio; } /** * 通道费 */ public void setChannelMoney(BigDecimal channelMoney) { this.channelMoney = channelMoney; } /** * @return 通道费 */ public BigDecimal getChannelMoney() { return this.channelMoney; } /** * 抽成状态 */ public void setCutStatus(Integer cutStatus) { this.cutStatus = cutStatus; } /** * @return 抽成状态 */ public Integer getCutStatus() { return this.cutStatus; } /** * 抽成时间 */ public void setCutTime(String cutTime) { this.cutTime = cutTime; } /** * @return 抽成时间 */ public String getCutTime() { return this.cutTime; } /** * 取消时间 */ public void setCancelTime(String cancelTime) { this.cancelTime = cancelTime; } /** * @return 取消时间 */ public String getCancelTime() { return this.cancelTime; } /** * 退款订单号 */ public void setRefundOrderNo(String refundOrderNo) { this.refundOrderNo = refundOrderNo; } /** * @return 退款订单号 */ public String getRefundOrderNo() { return this.refundOrderNo; } /** * 删除,0.删除,1.存在 */ public void setDelFlag(Short delFlag) { this.delFlag = delFlag; } /** * @return 删除,0.删除,1.存在 */ public Short getDelFlag() { return this.delFlag; } }
[ "316588010@qq.com" ]
316588010@qq.com
ccd5fe873bf310d849eabf51913f7cb36b94e0d5
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/io/reactivex/rxjava3/internal/operators/flowable/FlowableOnBackpressureError.java
e6a11f326ee44f685b466d6b114989a1cf852a6b
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
2,960
java
package io.reactivex.rxjava3.internal.operators.flowable; import io.reactivex.rxjava3.core.Flowable; import io.reactivex.rxjava3.core.FlowableSubscriber; import io.reactivex.rxjava3.exceptions.MissingBackpressureException; import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper; import io.reactivex.rxjava3.internal.util.BackpressureHelper; import io.reactivex.rxjava3.plugins.RxJavaPlugins; import java.util.concurrent.atomic.AtomicLong; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; public final class FlowableOnBackpressureError<T> extends s6.a.e.d.c.a.a<T, T> { public static final class a<T> extends AtomicLong implements FlowableSubscriber<T>, Subscription { private static final long serialVersionUID = -3176480756392482682L; public final Subscriber<? super T> a; public Subscription b; public boolean c; public a(Subscriber<? super T> subscriber) { this.a = subscriber; } @Override // org.reactivestreams.Subscription public void cancel() { this.b.cancel(); } @Override // org.reactivestreams.Subscriber public void onComplete() { if (!this.c) { this.c = true; this.a.onComplete(); } } @Override // org.reactivestreams.Subscriber public void onError(Throwable th) { if (this.c) { RxJavaPlugins.onError(th); return; } this.c = true; this.a.onError(th); } @Override // org.reactivestreams.Subscriber public void onNext(T t) { if (!this.c) { if (get() != 0) { this.a.onNext(t); BackpressureHelper.produced(this, 1); return; } this.b.cancel(); onError(new MissingBackpressureException("could not emit value due to lack of requests")); } } @Override // io.reactivex.rxjava3.core.FlowableSubscriber, org.reactivestreams.Subscriber public void onSubscribe(Subscription subscription) { if (SubscriptionHelper.validate(this.b, subscription)) { this.b = subscription; this.a.onSubscribe(this); subscription.request(Long.MAX_VALUE); } } @Override // org.reactivestreams.Subscription public void request(long j) { if (SubscriptionHelper.validate(j)) { BackpressureHelper.add(this, j); } } } public FlowableOnBackpressureError(Flowable<T> flowable) { super(flowable); } @Override // io.reactivex.rxjava3.core.Flowable public void subscribeActual(Subscriber<? super T> subscriber) { this.source.subscribe((FlowableSubscriber) new a(subscriber)); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com