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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fc730a167cd4c0f5f3c14f9719976745f3719539
|
f8dded68b9125a95e64745b3838c664b11ce7bbe
|
/cdm/src/main/java/thredds/catalog2/xml/writer/stax/AbstractElementWriterFactory.java
|
ff08b84b93e243546ca81d8ad5a3484039eb00cb
|
[
"NetCDF"
] |
permissive
|
melissalinkert/netcdf
|
8d01f27f377b0b6639ac47bfc891e1b92e5b3bd1
|
18482c15fce43a4b378dacdc9177ec600280c903
|
refs/heads/master
| 2016-09-09T19:25:59.885325
| 2012-02-07T01:44:35
| 2012-02-07T01:44:35
| 3,373,307
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,126
|
java
|
/*
* Copyright 1998-2009 University Corporation for Atmospheric Research/Unidata
*
* Portions of this software were developed by the Unidata Program at the
* University Corporation for Atmospheric Research.
*
* Access and use of this software shall impose the following obligations
* and understandings on the user. The user is granted the right, without
* any fee or cost, to use, copy, modify, alter, enhance and distribute
* this software, and any derivative works thereof, and its supporting
* documentation for any purpose whatsoever, provided that this entire
* notice appears in all copies of the software, derivative works and
* supporting documentation. Further, UCAR requests that the user credit
* UCAR/Unidata in any publications that result from the use of this
* software or in any product that includes this software. The names UCAR
* and/or Unidata, however, may not be used in any advertising or publicity
* to endorse or promote any products or commercial entity unless specific
* written permission is obtained from UCAR/Unidata. The user also
* understands that UCAR/Unidata is not obligated to provide the user with
* any support, consulting, training or assistance of any kind with regard
* to the use, operation and performance of this software nor to provide
* the user with any updates, revisions, new versions or "bug fixes."
*
* THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package thredds.catalog2.xml.writer.stax;
/**
* _more_
*
* @author edavis
* @since 4.0
*/
public interface AbstractElementWriterFactory {}
|
[
"melissa@glencoesoftware.com"
] |
melissa@glencoesoftware.com
|
0dfc3b3c1c2427768078aff3b2a1be6d9e442062
|
623958071fb670bc06462630c2dcfd8d2a94213c
|
/src/main/java/com/github/fge/jsonschema/syntax/checkers/draftv4/RequiredSyntaxChecker.java
|
99d2f866266b1bd765d6f2ae78d57b9bc8d693b0
|
[] |
no_license
|
ransomw/json-schema-core
|
b0552a5ce503ff991d03214dc86d6ea0e85e3987
|
57bcf34bf4dc28f141876633f70b6dd4eb9b8f58
|
refs/heads/master
| 2021-01-11T10:03:12.315498
| 2013-08-02T08:20:53
| 2013-08-02T08:20:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,276
|
java
|
/*
* Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser 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
* Lesser 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 com.github.fge.jsonschema.syntax.checkers.draftv4;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.fge.jackson.JsonNumEquals;
import com.github.fge.jackson.NodeType;
import com.github.fge.jackson.jsonpointer.JsonPointer;
import com.github.fge.jsonschema.exceptions.ProcessingException;
import com.github.fge.jsonschema.report.ProcessingReport;
import com.github.fge.jsonschema.syntax.checkers.AbstractSyntaxChecker;
import com.github.fge.jsonschema.syntax.checkers.SyntaxChecker;
import com.github.fge.jsonschema.tree.SchemaTree;
import com.github.fge.msgsimple.bundle.MessageBundle;
import com.google.common.base.Equivalence;
import com.google.common.collect.Sets;
import java.util.Collection;
import java.util.EnumSet;
import java.util.Set;
/**
* Syntax checker for draft v4's {@code required} keyword
*/
public final class RequiredSyntaxChecker
extends AbstractSyntaxChecker
{
private static final Equivalence<JsonNode> EQUIVALENCE
= JsonNumEquals.getInstance();
private static final SyntaxChecker INSTANCE = new RequiredSyntaxChecker();
public static SyntaxChecker getInstance()
{
return INSTANCE;
}
private RequiredSyntaxChecker()
{
super("required", NodeType.ARRAY);
}
@Override
protected void checkValue(final Collection<JsonPointer> pointers,
final MessageBundle bundle, final ProcessingReport report,
final SchemaTree tree)
throws ProcessingException
{
final JsonNode node = getNode(tree);
final int size = node.size();
if (size == 0) {
report.error(newMsg(tree, bundle, "common.array.empty"));
return;
}
final Set<Equivalence.Wrapper<JsonNode>> set = Sets.newHashSet();
boolean uniqueElements = true;
JsonNode element;
NodeType type;
for (int index = 0; index < size; index++) {
element = node.get(index);
uniqueElements = set.add(EQUIVALENCE.wrap(element));
type = NodeType.getNodeType(element);
if (type != NodeType.STRING)
report.error(newMsg(tree, bundle,
"common.array.element.incorrectType")
.putArgument("index", index)
.putArgument("expected", EnumSet.of(NodeType.STRING))
.putArgument("found", type)
);
}
if (!uniqueElements)
report.error(newMsg(tree, bundle, "common.array.duplicateElements"));
}
}
|
[
"fgaliegue@gmail.com"
] |
fgaliegue@gmail.com
|
f92ca1e66c84266d52ba829ccdaf7d33c5af37f0
|
039ac39dfd7649a053a3c8e17fb80ba8c8d777bc
|
/Test_2020_12_07/src/Main.java
|
0f540ea249feb36f7aa8e1d03c76921ba1c47f7f
|
[] |
no_license
|
Zshuangshuang/Java-
|
de0af437415dea34281cb817f16f77d5fffe5d5d
|
1b64588029712fcd4c42f1efd0cdfaef7a2ffe29
|
refs/heads/master
| 2023-01-30T20:46:23.017152
| 2020-12-15T10:48:41
| 2020-12-15T10:48:41
| 310,260,170
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 770
|
java
|
import java.util.Scanner;
/**
* Created with IntelliJ IDEA.
* Description:
* User: 14342
* Date: 2020-12-07
* Time: 21:13
**/
public class Main {
public static String getSequeOddNum(int m){
String ret = "";
int start = 0;
if (m%2 != 0){
start = m*m - 2*(m/2);
}else {
start = m*m - 2*(m/2)+1;
}
ret += start;
for (int i = 1; i < m; i++) {
ret += "+"+(start+i*2);
}
return ret;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while(scanner.hasNext()){
int n = scanner.nextInt();
String ret = getSequeOddNum(n);
System.out.println(ret);
}
}
}
|
[
"1434278632@qq.com"
] |
1434278632@qq.com
|
69149f6073b747da7534e1de339e359a42f821ad
|
ee5f1b8175c96ec6148eca059da2d7e524b90763
|
/java/src/main/java/com/wkodate/atcoder/abc029/b/Main.java
|
a5654b11fe241ff5a4f581cd6c2c661f2bd96bd5
|
[] |
no_license
|
wkodate/atcoder
|
15e6e3aedcfa8ae0faf9534be87707cdb407faa5
|
c10c421858b4169735ca4c50f6b7bc43ac0464b3
|
refs/heads/master
| 2022-04-26T20:53:54.737536
| 2022-04-04T13:17:21
| 2022-04-04T13:17:32
| 241,840,372
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
package com.wkodate.atcoder.abc029.b;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] s = new String[12];
int count = 0;
for (int i = 0; i < 12; i++) {
s[i] = sc.next();
}
for (int i = 0; i < 12; i++) {
if (s[i].contains("r")) {
count++;
}
}
System.out.println(count);
}
}
|
[
"hbwandeow@gmail.com"
] |
hbwandeow@gmail.com
|
acbc9104e0de921daa9566beed2082e21fcdc812
|
ed75191f343bb1584a0f21adf38641ea1faee8ff
|
/pubsub/camel/src/main/java/aos/camel/bean/InvokeWithProcessorRoute.java
|
a017caf39ab53b4027d143397d01c73b5b8db334
|
[
"Apache-2.0"
] |
permissive
|
echalkpad/t4f-data
|
65aa18546021d74faeac91d979085a9f16539811
|
08cc22c1a612b953d2421fb0fe9f389adf221e37
|
refs/heads/master
| 2016-08-05T12:04:24.029561
| 2014-11-28T15:12:33
| 2014-11-28T15:12:33
| 28,885,218
| 1
| 0
| null | 2015-01-06T21:49:33
| 2015-01-06T21:49:33
| null |
UTF-8
|
Java
| false
| false
| 2,230
|
java
|
/****************************************************************
* Licensed to the AOS Community (AOS) under one or more *
* contributor license agreements. See the NOTICE file *
* distributed with this work for additional information *
* regarding copyright ownership. The AOS 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 aos.camel.bean;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
/**
* Using a Processor in the route to invoke HelloBean.
*/
public class InvokeWithProcessorRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("direct:hello").process(new Processor() {
public void process(Exchange exchange) throws Exception {
// extract the name parameter from the Camel message which we
// want to use
// when invoking the bean
String name = exchange.getIn().getBody(String.class);
// now create an instance of the bean
HelloBean hello = new HelloBean();
// and invoke it with the name parameter
String answer = hello.hello(name);
// store the reply from the bean on the OUT message
exchange.getOut().setBody(answer);
}
});
}
}
|
[
"eric@aos.io"
] |
eric@aos.io
|
0e207e8d93a52a290889c7e84c8e28f1f4d869fb
|
4e9cc5d6eb8ec75e717404c7d65ab07e8f749c83
|
/sdk-hook/src/main/java/com/dingtalk/api/response/OapiOrgpaasOrgInfoGetResponse.java
|
286a06bb2e7c9293f25491d1f59174e10a8bd497
|
[] |
no_license
|
cvdnn/ZtoneNetwork
|
38878e5d21a17d6fe69a107cfc901d310418e230
|
2b985cc83eb56d690ec3b7964301aeb4fda7b817
|
refs/heads/master
| 2023-05-03T16:41:01.132198
| 2021-05-19T07:35:58
| 2021-05-19T07:35:58
| 92,125,735
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,059
|
java
|
package com.dingtalk.api.response;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoObject;
import com.taobao.api.TaobaoResponse;
/**
* TOP DingTalk-API: dingtalk.oapi.orgpaas.org.info.get response.
*
* @author top auto create
* @since 1.0, null
*/
public class OapiOrgpaasOrgInfoGetResponse extends TaobaoResponse {
private static final long serialVersionUID = 2876553787123257989L;
/**
* 错误码 -1 系统异常 40035 参数错误
*/
@ApiField("errcode")
private Long errcode;
/**
* 错误信息
*/
@ApiField("errmsg")
private String errmsg;
/**
* 组织信息
*/
@ApiField("result")
private GetOrgInfoResp result;
/**
* 接口是否调用成功
*/
@ApiField("success")
private Boolean success;
public void setErrcode(Long errcode) {
this.errcode = errcode;
}
public Long getErrcode( ) {
return this.errcode;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public String getErrmsg( ) {
return this.errmsg;
}
public void setResult(GetOrgInfoResp result) {
this.result = result;
}
public GetOrgInfoResp getResult( ) {
return this.result;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Boolean getSuccess( ) {
return this.success;
}
public boolean isSuccess() {
return getErrcode() == null || getErrcode().equals(0L);
}
/**
* 组织信息
*
* @author top auto create
* @since 1.0, null
*/
public static class GetOrgInfoResp extends TaobaoObject {
private static final long serialVersionUID = 4681896598346158981L;
/**
* 组织附件信息
*/
@ApiField("extension")
private String extension;
/**
* 组织名
*/
@ApiField("org_name")
private String orgName;
public String getExtension() {
return this.extension;
}
public void setExtension(String extension) {
this.extension = extension;
}
public String getOrgName() {
return this.orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
}
}
|
[
"cvvdnn@gmail.com"
] |
cvvdnn@gmail.com
|
c4570a83e5ff2eb904d35e94114d5f840b9ee506
|
d1ea5077c83cb2e93fe69e3d19a2e26efe894a0e
|
/src/main/java/com/rograndec/feijiayun/chain/business/report/retail/service/SaleFlowReportParentService.java
|
d62f303478175ef837c446162ef8ee84527e8ba2
|
[] |
no_license
|
Catfeeds/rog-backend
|
e89da5a3bf184e4636169e7492a97dfd0deef2a1
|
109670cfec6cbe326b751e93e49811f07045e531
|
refs/heads/master
| 2020-04-05T17:36:50.097728
| 2018-10-22T16:23:55
| 2018-10-22T16:23:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,166
|
java
|
package com.rograndec.feijiayun.chain.business.report.retail.service;
import java.io.OutputStream;
import java.util.List;
import com.rograndec.feijiayun.chain.business.report.retail.vo.SaleFlowListDateQueryParentVO;
import com.rograndec.feijiayun.chain.business.report.retail.vo.SaleFlowListDateResultBranchVO;
import com.rograndec.feijiayun.chain.business.report.retail.vo.SaleFlowListDtlQueryBranchVO;
import com.rograndec.feijiayun.chain.business.report.retail.vo.SaleFlowListDtlResultBranchVO;
import com.rograndec.feijiayun.chain.business.report.retail.vo.SaleFlowListSumQueryBranchVO;
import com.rograndec.feijiayun.chain.business.report.retail.vo.SaleFlowListSumResultBranchVO;
import com.rograndec.feijiayun.chain.common.Page;
import com.rograndec.feijiayun.chain.common.vo.UserVO;
public interface SaleFlowReportParentService {
@SuppressWarnings("rawtypes")
Page selectSaleFlowPageByDateForParent(SaleFlowListDateQueryParentVO vo,
UserVO loginUser);
List<SaleFlowListDateResultBranchVO> selectSaleFlowListByDateForParent(
SaleFlowListDateQueryParentVO vo, UserVO loginUser);
void exportExcelSaleFlowListByDateForParent(OutputStream output,
List<SaleFlowListDateResultBranchVO> resultBranchVOList,
UserVO loginUser);
@SuppressWarnings("rawtypes")
Page selectSaleFlowPageBySumForParent(SaleFlowListSumQueryBranchVO vo,
UserVO loginUser);
List<SaleFlowListSumResultBranchVO> selectSaleFlowListBySumForParent(
SaleFlowListSumQueryBranchVO vo, UserVO loginUser);
void exportExcelSaleFlowListBySumForParent(OutputStream output,
List<SaleFlowListSumResultBranchVO> resultBranchVOList,
UserVO loginUser, SaleFlowListSumQueryBranchVO vo);
@SuppressWarnings("rawtypes")
Page selectSaleFlowPageByDtlForParent(SaleFlowListDtlQueryBranchVO vo,
UserVO loginUser);
List<SaleFlowListDtlResultBranchVO> selectSaleFlowListByDtlForBranch(
SaleFlowListDtlQueryBranchVO vo, UserVO loginUser);
void exportExcelSaleFlowListByDtlForBranch(OutputStream output,
List<SaleFlowListDtlResultBranchVO> resultBranchVOList,
UserVO loginUser, SaleFlowListDtlQueryBranchVO vo);
}
|
[
"ruifeng.jia@rograndec.com"
] |
ruifeng.jia@rograndec.com
|
0f1f09cfc5f0666d1ccb6dc0099fd0c688ae8f61
|
80a6b8d1efa66efbb94f0df684eedb81a5cc552c
|
/assertj-core/src/test/java/org/assertj/core/api/atomic/integerarray/AtomicIntegerArrayAssert_contains_Test.java
|
c3034fa0f8005a83da9adbdd87c38cbc5da2c7ed
|
[
"Apache-2.0"
] |
permissive
|
AlHasan89/System_Re-engineering
|
43f232e90f65adc940af3bfa2b4d584d25ce076c
|
b80e6d372d038fd246f946e41590e07afddfc6d7
|
refs/heads/master
| 2020-03-27T05:08:26.156072
| 2019-01-06T17:54:59
| 2019-01-06T17:54:59
| 145,996,692
| 0
| 1
|
Apache-2.0
| 2019-01-06T17:55:00
| 2018-08-24T13:43:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,222
|
java
|
/**
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2012-2017 the original author or authors.
*/
package org.assertj.core.api.atomic.integerarray;
import static org.assertj.core.test.IntArrays.arrayOf;
import static org.mockito.Mockito.verify;
import org.assertj.core.api.AtomicIntegerArrayAssert;
import org.assertj.core.api.AtomicIntegerArrayAssertBaseTest;
public class AtomicIntegerArrayAssert_contains_Test extends AtomicIntegerArrayAssertBaseTest {
@Override
protected AtomicIntegerArrayAssert invoke_api_method() {
return assertions.contains(6, 8);
}
@Override
protected void verify_internal_effects() {
verify(arrays).assertContains(info(), internalArray(), arrayOf(6, 8));
}
}
|
[
"nw91@le.ac.uk"
] |
nw91@le.ac.uk
|
51f31af783c0c7d187dfc20e406f560308a55dfa
|
dfe90aacb96e2bba82b89bb476b973fcdce458a9
|
/src/main/java/com/extra/controller/UserController.java
|
f1568772c1e3fce11373901372beb6cf929384d6
|
[] |
no_license
|
CNHTT/Spring-SSM
|
ec7ec42e77fc938e359026dfdd6e35e4754d63a8
|
5b1016bee8c0aacd1f42b1ff6847947f1e0a1b60
|
refs/heads/master
| 2020-12-02T10:08:36.189490
| 2017-07-09T15:46:33
| 2017-07-09T15:46:33
| 96,693,494
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 907
|
java
|
package com.extra.controller;
import com.extra.model.User;
import com.extra.service.UserService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* Created by Zhangxq on 2016/7/15.
*/
@Controller
@RequestMapping("/user")
public class UserController {
private Logger log = Logger.getLogger(UserController.class);
@Resource
private UserService userService;
@RequestMapping("/showUser")
public String showUser(HttpServletRequest request, Model model){
log.info("查询所有用户信息");
List<User> userList = userService.getAllUser();
model.addAttribute("userList",userList);
return "jsp/showUser";
}
}
|
[
"cnhttt@163.com"
] |
cnhttt@163.com
|
42b4a18aa9c6fd78c56e211f3594ae8f1909859e
|
159525581d8e7f9d26e378fe8fdcac1c2b5df398
|
/tajo-core/src/main/java/org/apache/tajo/util/ClassUtil.java
|
f59ec3f6b949fc555ba5250c085cf87de85fc973
|
[
"BSD-3-Clause",
"Apache-2.0",
"PostgreSQL",
"MIT"
] |
permissive
|
mvhlong/tajo
|
defcceb455fb632f66ceafec41ed1a9f02b1b14e
|
f531495c24e0f1899d7822bc6b463148d27d0068
|
refs/heads/master
| 2020-12-07T15:15:36.219328
| 2014-10-12T05:23:41
| 2014-10-12T05:23:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,213
|
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.tajo.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.File;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
public abstract class ClassUtil {
private static final Log LOG = LogFactory.getLog(ClassUtil.class);
public static Set<Class> findClasses(Class type, String packageFilter) {
Set<Class> classSet = new HashSet<Class>();
String classpath = System.getProperty("java.class.path");
String[] paths = classpath.split(System.getProperty("path.separator"));
for (String path : paths) {
File file = new File(path);
if (file.exists()) {
findClasses(classSet, file, file, true, type, packageFilter);
}
}
return classSet;
}
private static void findClasses(Set<Class> matchedClassSet, File root, File file, boolean includeJars, Class type,
String packageFilter) {
if (file.isDirectory()) {
for (File child : file.listFiles()) {
findClasses(matchedClassSet, root, child, includeJars, type, packageFilter);
}
} else {
if (file.getName().toLowerCase().endsWith(".jar") && includeJars) {
JarFile jar = null;
try {
jar = new JarFile(file);
} catch (Exception ex) {
LOG.error(ex.getMessage(), ex);
return;
}
Enumeration<JarEntry> entries = jar.entries();
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
String name = entry.getName();
int extIndex = name.lastIndexOf(".class");
if (extIndex > 0) {
String qualifiedClassName = name.substring(0, extIndex).replace("/", ".");
if (qualifiedClassName.indexOf(packageFilter) >= 0 && !isTestClass(qualifiedClassName)) {
try {
Class clazz = Class.forName(qualifiedClassName);
if (!clazz.isInterface() && isMatch(type, clazz)) {
matchedClassSet.add(clazz);
}
} catch (ClassNotFoundException e) {
LOG.error(e.getMessage(), e);
}
}
}
}
} else if (file.getName().toLowerCase().endsWith(".class")) {
String qualifiedClassName = createClassName(root, file);
if (qualifiedClassName.indexOf(packageFilter) >= 0 && !isTestClass(qualifiedClassName)) {
try {
Class clazz = Class.forName(qualifiedClassName);
if (!clazz.isInterface() && isMatch(type, clazz)) {
matchedClassSet.add(clazz);
}
} catch (ClassNotFoundException e) {
LOG.error(e.getMessage(), e);
}
}
}
}
}
private static boolean isTestClass(String qualifiedClassName) {
String className = getSimpleClassName(qualifiedClassName);
if(className == null) {
return false;
}
return className.startsWith("Test");
}
private static boolean isMatch(Class targetClass, Class loadedClass) {
if (targetClass.equals(loadedClass)) {
return true;
}
Class[] classInterfaces = loadedClass.getInterfaces();
if (classInterfaces != null) {
for (Class eachInterfaceClass : classInterfaces) {
if (eachInterfaceClass.equals(targetClass)) {
return true;
}
if (isMatch(targetClass, eachInterfaceClass)) {
return true;
}
}
}
Class superClass = loadedClass.getSuperclass();
if (superClass != null) {
if (isMatch(targetClass, superClass)) {
return true;
}
}
return false;
}
private static String getSimpleClassName(String qualifiedClassName) {
String[] tokens = qualifiedClassName.split("\\.");
if (tokens.length == 0) {
return qualifiedClassName;
}
return tokens[tokens.length - 1];
}
private static String createClassName(File root, File file) {
StringBuffer sb = new StringBuffer();
String fileName = file.getName();
sb.append(fileName.substring(0, fileName.lastIndexOf(".class")));
file = file.getParentFile();
while (file != null && !file.equals(root)) {
sb.insert(0, '.').insert(0, file.getName());
file = file.getParentFile();
}
return sb.toString();
}
}
|
[
"hyunsik@apache.org"
] |
hyunsik@apache.org
|
4306d91fb9c0a8339d8b4a51da63b7d0037a574b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_94c26f94a23bce04e3995ad7fc8371f743814b4c/ConfigurationDigester/19_94c26f94a23bce04e3995ad7fc8371f743814b4c_ConfigurationDigester_t.java
|
08e44f6d0338749824e51b8b628d025410a4d3a1
|
[] |
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
| 8,178
|
java
|
/*
* $Log: ConfigurationDigester.java,v $
* Revision 1.12 2006-01-05 13:52:49 europe\L190409
* improved error-handling
*
* Revision 1.11 2005/07/05 10:54:29 Gerrit van Brakel <gerrit.van.brakel@ibissource.org>
* created 'include' facility
*
* Revision 1.10 2005/06/13 12:47:15 Gerrit van Brakel <gerrit.van.brakel@ibissource.org>
* rework to prepare for 'include'-feature
*
* Revision 1.9 2005/02/24 10:48:00 Gerrit van Brakel <gerrit.van.brakel@ibissource.org>
* added display of error message at reinitialize
*
* Revision 1.8 2004/10/14 15:32:30 Gerrit van Brakel <gerrit.van.brakel@ibissource.org>
* improved logging
*
* Revision 1.7 2004/06/16 13:04:28 Johan Verrips <johan.verrips@ibissource.org>
* improved the ClassPathEntityResolver functionality in combination with
* resolving variables
*
* Revision 1.6 2004/06/16 06:57:00 Johan Verrips <johan.verrips@ibissource.org>
* Added the ClassPathEntityResolver to resolve entities within the classpath
*
* Revision 1.5 2004/03/30 07:30:05 Gerrit van Brakel <gerrit.van.brakel@ibissource.org>
* updated javadoc
*
* Revision 1.4 2004/03/26 10:42:50 Johan Verrips <johan.verrips@ibissource.org>
* added @version tag in javadoc
*
*/
package nl.nn.adapterframework.configuration;
import nl.nn.adapterframework.util.StringResolver;
import nl.nn.adapterframework.util.AppConstants;
import org.xml.sax.InputSource;
import nl.nn.adapterframework.util.ClassUtils;
import nl.nn.adapterframework.util.Misc;
import nl.nn.adapterframework.util.Variant;
import nl.nn.adapterframework.util.XmlUtils;
import org.apache.commons.digester.Digester;
import org.apache.commons.digester.xmlrules.FromXmlRuleSet;
import org.apache.log4j.Logger;
import org.apache.commons.lang.SystemUtils;
import nl.nn.adapterframework.util.ClassPathEntityResolver;
import java.net.URL;
/**
* The configurationDigester reads the configuration.xml and the digester rules
* in XML format and factors a Configuration.
*
* Default JNDI properties may be specified on the commandline, e.g. <br/>
* <p>
* -Djava.naming.factory.initial=org.exolab.jms.jndi.mipc.IpcJndiInitialContextFactory<br/>
* -Djava.naming.provider.url=tcp://localhost:3035/<br/>
* </p>
* <p>Since 4.0.1, the configuration.xml is first resolved using the {@link nl.nn.adapterframework.util.StringResolver resolver},
* with tries to resolve ${variable} with the {@link nl.nn.adapterframework.util.AppConstants AppConstants}, so that
* both the values from the property files as the environment setting are available.<p>
* <p>Since 4.1.1 the configuration.xml is parsed with a entityresolver that uses the classpath, which
* means that you may specify entities that will be resolved during parsing.
* </p>
* Example:
* <code><pre>
* <?xml version="1.0"?>
<!DOCTYPE IOS-Adaptering
[
<!ENTITY Y04 SYSTEM "./ConfigurationY04.xml">
]>
<IOS-Adaptering configurationName="AdapterFramework (v4.0) configuratie voor GIJuice">
&Y04;
</IOS-Adaptering>
</pre></code>
* @version Id
* @author Johan Verrips
* @see Configuration
*/
public class ConfigurationDigester {
public static final String version = "$RCSfile: ConfigurationDigester.java,v $ $Revision: 1.12 $ $Date: 2006-01-05 13:52:49 $";
protected static Logger log = Logger.getLogger(ConfigurationDigester.class);
private static final String CONFIGURATION_FILE_DEFAULT = "Configuration.xml";
private static final String DIGESTER_RULES_DEFAULT = "digester-rules.xml";
private String configurationFile=null;
private String digesterRulesFile=DIGESTER_RULES_DEFAULT;
public static void main(String args[]) {
String configuration_file = CONFIGURATION_FILE_DEFAULT;
String digester_rules_file = DIGESTER_RULES_DEFAULT;
Configuration config = null;
ConfigurationDigester cd = new ConfigurationDigester();
if (args.length>=1)
configuration_file = args[0];
if (args.length>=2)
digester_rules_file = args[1];
try {
config = cd.unmarshalConfiguration(digester_rules_file, configuration_file);
} catch (ConfigurationException e) {
System.out.println(e.getMessage());
}
if (null == config) {
System.out.println("Errors occured during configuration");
return;
} else {
System.out.println(" Object List:");
if (null!=config)
config.listObjects();
System.out.println("------------------------------------------");
System.out.println(" start adapters");
}
if (null!=config)config.startAdapters();
}
public static void digestConfiguration(Object stackTop, URL digesterRulesURL, URL configurationFileURL) throws ConfigurationException {
if (digesterRulesURL==null) {
digesterRulesURL = ClassUtils.getResourceURL(stackTop, DIGESTER_RULES_DEFAULT);
}
Digester digester = new Digester();
digester.setUseContextClassLoader(true);
// set the entity resolver to load entity references from the classpath
digester.setEntityResolver(new ClassPathEntityResolver());
// push config on the stack
digester.push(stackTop);
try {
// digester-rules.xml bevat de rules voor het digesten
FromXmlRuleSet ruleSet = new FromXmlRuleSet(digesterRulesURL);
digester.addRuleSet(ruleSet);
// ensure that lines are seperated, usefulls when a parsing error occurs
String lineSeperator=SystemUtils.LINE_SEPARATOR;
if (null==lineSeperator) lineSeperator="\n";
String configString=Misc.resourceToString(configurationFileURL, lineSeperator, false);
configString=XmlUtils.identityTransform(configString);
log.debug(configString);
//Resolve any variables
String resolvedConfig=StringResolver.substVars(configString, AppConstants.getInstance());
Variant var=new Variant(resolvedConfig);
InputSource is=var.asXmlInputSource();
digester.parse(is);
} catch (Throwable t) {
// wrap exception to be sure it gets rendered via the IbisException-renderer
ConfigurationException e = new ConfigurationException("error during unmarshalling configuration from file ["+configurationFileURL +
"] with digester-rules-file ["+digesterRulesURL+"]", t);
log.error(e);
throw (e);
}
}
public void include(Object stackTop) throws ConfigurationException {
URL configuration = ClassUtils.getResourceURL(this, getConfiguration());
if (configuration == null) {
throw new ConfigurationException("cannot find resource ["+getConfiguration()+"] to include");
}
URL digesterRules = ClassUtils.getResourceURL(this, getDigesterRules());
if (digesterRules == null) {
throw new ConfigurationException("cannot find resource ["+getDigesterRules()+"] use as digesterrules to include");
}
digestConfiguration(stackTop, digesterRules, configuration);
}
public Configuration unmarshalConfiguration() throws ConfigurationException
{
return unmarshalConfiguration(getDigesterRules(), getConfiguration());
}
public Configuration unmarshalConfiguration(String digesterRulesFile, String configurationFile) throws ConfigurationException
{
return unmarshalConfiguration(ClassUtils.getResourceURL(this, digesterRulesFile), ClassUtils.getResourceURL(this, configurationFile));
}
public Configuration unmarshalConfiguration(URL digesterRulesURL, URL configurationFileURL) throws ConfigurationException{
Configuration config = new Configuration(digesterRulesURL, configurationFileURL);
digestConfiguration(config,digesterRulesURL,configurationFileURL);
log.info("************** Configuration completed **************");
return config;
}
public String getConfiguration() {
return configurationFile;
}
public String getDigesterRules() {
return digesterRulesFile;
}
public void setConfiguration(String string) {
configurationFile = string;
}
public void setDigesterRules(String string) {
digesterRulesFile = string;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a66d5fe351e3662249b0e4052490baa31b3973f5
|
ca783e611cde5c6393bfd011c19681b3b33fac91
|
/src/main/java/udemy/spring/training/HelloSpringApp.java
|
cc6a3940cd87ea09e1a7f72ee5c531fefa1a57ee
|
[] |
no_license
|
GreegAV/udemyspringtraining
|
d13b1b04da39cbd12a9fa26c9fe80ed12e7161fe
|
4b573314b0723031b7de2177545bbadf892f5589
|
refs/heads/master
| 2020-05-05T04:14:06.869611
| 2019-04-11T09:14:12
| 2019-04-11T09:14:12
| 179,703,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 521
|
java
|
package udemy.spring.training;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class HelloSpringApp {
public static void main(String[] args) {
ClassPathXmlApplicationContext context =
new ClassPathXmlApplicationContext("applicationContext.xml");
Coach theCoach = context.getBean("myCoach", Coach.class);
System.out.println(theCoach.getDailyWorkout());
System.out.println(theCoach.getDailyFortune());
context.close();
}
}
|
[
"greegav@gmail.com"
] |
greegav@gmail.com
|
66b1f3aa0e0b69417c92bea5d1d50169f8f09807
|
43943422b0859d25eb40d0e7a1f60adf3cbfaf4c
|
/src/main/java/org/scijava/command/UnimplementedCommand.java
|
b68c6e49d01f679c56c686f400aadd5798a7821f
|
[
"BSD-2-Clause"
] |
permissive
|
4Quant/scijava-common
|
3120e44eccae9635356e2b15a0d7bdde45654cb5
|
fe4999b7405da7a79a86e438beb420de13a99f45
|
refs/heads/master
| 2020-12-07T06:30:04.492623
| 2015-01-21T14:49:52
| 2015-01-21T14:49:52
| 24,934,309
| 0
| 0
| null | 2015-01-21T14:49:04
| 2014-10-08T09:46:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,959
|
java
|
/*
* #%L
* SciJava Common shared library for SciJava software.
* %%
* Copyright (C) 2009 - 2014 Board of Regents of the University of
* Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck
* Institute of Molecular Cell Biology and Genetics.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package org.scijava.command;
/**
* A command that is not yet implemented. It exists so that stub commands can
* override it trivially, and act as markers of future functionality.
*
* @author Curtis Rueden
*/
public abstract class UnimplementedCommand extends ContextCommand {
@Override
public void run() {
cancel("This command is not yet implemented.");
}
}
|
[
"ctrueden@wisc.edu"
] |
ctrueden@wisc.edu
|
fa9d125ec9c9cc799d34e6ba350fef9329f4df56
|
10378c580b62125a184f74f595d2c37be90a5769
|
/com/github/steveice10/netty/handler/codec/http2/Http2SettingsFrame.java
|
19a470b561c51468db46b0e54f127a174713a47b
|
[] |
no_license
|
ClientPlayground/Melon-Client
|
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
|
afc9b11493e15745b78dec1c2b62bb9e01573c3d
|
refs/heads/beta-v2
| 2023-04-05T20:17:00.521159
| 2021-03-14T19:13:31
| 2021-03-14T19:13:31
| 347,509,882
| 33
| 19
| null | 2021-03-14T19:13:32
| 2021-03-14T00:27:40
| null |
UTF-8
|
Java
| false
| false
| 165
|
java
|
package com.github.steveice10.netty.handler.codec.http2;
public interface Http2SettingsFrame extends Http2Frame {
Http2Settings settings();
String name();
}
|
[
"Hot-Tutorials@users.noreply.github.com"
] |
Hot-Tutorials@users.noreply.github.com
|
ccc015af14b8a67faadf1834b9574afb1de39344
|
5e3cfc138ca45746cbd8ed1fc8eccaa59cd0840b
|
/Homeless/Android/Homeless_com.positivelymade.homeless_source_from_JADX/com/google/android/gms/p028c/et.java
|
682274b8a7d0c241f789fd1834b1fb344579a742
|
[] |
no_license
|
ycourteau/PedagogiqueProjets
|
18011979f797bacd5f6b87bd6e6866ebc83752f9
|
7704cf3e431f34b408f874d908132af9aa498c7b
|
refs/heads/master
| 2021-06-27T21:30:17.028954
| 2019-05-08T17:26:29
| 2019-05-08T17:26:29
| 110,717,560
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.google.android.gms.p028c;
import com.google.android.gms.ads.purchase.C0694b;
import com.google.android.gms.p028c.eo.C0925a;
@fn
public final class et extends C0925a {
private final C0694b f2921a;
public et(C0694b c0694b) {
this.f2921a = c0694b;
}
public void mo717a(en enVar) {
this.f2921a.m3107a(new ew(enVar));
}
}
|
[
"ycourteau@collegeshawinigan.qc.ca"
] |
ycourteau@collegeshawinigan.qc.ca
|
aad0a44c1afad4ffb383644c128840d353b78cf9
|
6e5e86448bd7670c475560e2e02e39d274462d4e
|
/inheritance/src/com/training/model/Student.java
|
d17c8462b02959c3c5ae6bc4bcd04d48015ac775
|
[] |
no_license
|
vatsanTraining/training_aug_2021
|
391e0fc3641a87a6bd8d9657c8e11d6fa82f4021
|
00ccb80714d5712141faba947beff054a23e7758
|
refs/heads/master
| 2023-08-13T01:26:46.560504
| 2021-08-23T06:55:52
| 2021-08-23T06:55:52
| 394,156,370
| 6
| 14
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 919
|
java
|
package com.training.model;
public class Student {
private int rollNumber;
private String studentName;
private double markScored;
private String grade;
public Student() {
super();
}
public Student(int rollNumber, String studentName, double markScored) {
super();
this.rollNumber = rollNumber;
this.studentName = studentName;
this.markScored = markScored;
}
public int getRollNumber() {
return rollNumber;
}
public void setRollNumber(int rollNumber) {
this.rollNumber = rollNumber;
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
public double getMarkScored() {
return markScored;
}
public void setMarkScored(double markScored) {
this.markScored = markScored;
}
public String toString() {
return this.studentName +"," +this.rollNumber+"," +this.markScored;
}
}
|
[
"vatsank@gmail.com"
] |
vatsank@gmail.com
|
a850f4d305847c2e3739bcf4b651851a1c7c0eff
|
100e8431193de9cf1bc04a64157b57223fef9a57
|
/src/main/java/org/jboss/cdi/showcase/customers/CustomerDatabase.java
|
28ce4ff7b8b89ab9eb2201d5732837fd370e3ea4
|
[] |
no_license
|
pmuir/cdi-showcase
|
ee7960b63ab294357084f104f4b269fab5437787
|
9255d4e5dcf1f93fac0610479d3b69999e29713a
|
refs/heads/master
| 2021-01-19T11:16:23.959203
| 2014-08-21T10:31:21
| 2014-08-21T10:31:21
| 23,182,382
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 599
|
java
|
package org.jboss.cdi.showcase.customers;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.inject.Qualifier;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Qualifier
@Target({ TYPE, METHOD, PARAMETER, FIELD })
@Retention(RUNTIME)
@Documented
public @interface CustomerDatabase {
}
|
[
"pmuir@bleepbleep.org.uk"
] |
pmuir@bleepbleep.org.uk
|
5b0793d86f96fd3b972675f0c88628eea72f4cba
|
b761ee9c0940728545884c7e5f46afcd06b928ff
|
/data-exchange-center-ommp/src/main/java/data/exchange/center/ommp/service/user/HelloService.java
|
4396e22fb8d11b022dcaaba794446358f27779ed
|
[] |
no_license
|
fendaq/data-exchange-center
|
a55b04335966905b7a26e94bac344d2a4380d301
|
57c112d37c75ea40ac6c2465c6a7e9c5626f1be7
|
refs/heads/master
| 2020-06-22T16:21:12.555502
| 2018-11-08T08:49:08
| 2018-11-08T08:49:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 199
|
java
|
package data.exchange.center.ommp.service.user;
/**
* @Author: HanLong
* @Date: Create in 2018/3/16 20:50
* @Description:
*/
public interface HelloService {
String greeting(String name);
}
|
[
"yuguang wen"
] |
yuguang wen
|
ea93e3e7b43d06e424dc92c0e27c59c915e6f7d6
|
8bf67e3dde92e88447c607f9a1a2665778918e7d
|
/cloud-biz-core/src/main/java/com/qweib/cloud/biz/system/service/common/impl/BillSnapshotServiceImpl.java
|
c9da4e701c12856d2cd26084958dce44625bf1b5
|
[] |
no_license
|
yeshenggen532432/test02
|
1f87235ba8822bd460f7c997dd977c3e68371898
|
52279089299a010f99c60bc6656476d68f19050f
|
refs/heads/master
| 2022-12-11T01:38:24.097948
| 2020-09-07T06:36:51
| 2020-09-07T06:36:51
| 293,404,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,546
|
java
|
package com.qweib.cloud.biz.system.service.common.impl;
import com.qweib.cloud.biz.system.service.common.BillSnapshotService;
import com.qweib.cloud.biz.system.service.common.dto.snapshot.BillSnapshotDTO;
import com.qweib.cloud.biz.system.service.common.dto.snapshot.BillSnapshotDetailDTO;
import com.qweib.cloud.core.domain.common.BillSnapshot;
import com.qweib.cloud.repository.common.BillSnapshotRepository;
import com.qweib.commons.Identities;
import com.qweib.commons.StringUtils;
import com.qweib.commons.exceptions.NotFoundException;
import com.qweib.commons.mapper.BeanMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: jimmy.lin
* @time: 2019/10/18 16:19
* @description:
*/
@Service
public class BillSnapshotServiceImpl implements BillSnapshotService {
@Autowired
private BillSnapshotRepository snapshotRepository;
@Override
public void clear(String database, Integer userId, long timeBefore) {
snapshotRepository.removeSnapshotBefore(database, userId, timeBefore);
}
@Override
public String save(String database, BillSnapshotDTO snapshot) {
BillSnapshot entity = BeanMapper.map(snapshot, BillSnapshot.class);
long now = System.currentTimeMillis();
entity.setUpdateTime(now);
if (StringUtils.isNotBlank(entity.getId())) {
snapshotRepository.update(database, entity);
} else {
entity.setCreateTime(now);
entity.setId(Identities.uuid());
snapshotRepository.save(database, entity);
}
return entity.getId();
}
@Override
public List<BillSnapshotDTO> list(String database, Integer userId, String billType, Integer billId) {
return snapshotRepository.list(database, userId, billType, billId)
.stream()
.map(entity -> BeanMapper.map(entity, BillSnapshotDTO.class)).collect(Collectors.toList());
}
@Override
public BillSnapshotDetailDTO get(String database, Integer userId, String id) {
BillSnapshot snapshot = snapshotRepository.get(database, userId, id);
if (snapshot == null) {
throw new NotFoundException();
}
return BeanMapper.map(snapshot, BillSnapshotDetailDTO.class);
}
@Override
public Integer remove(String database, Integer userId, String id) {
return snapshotRepository.removeById(database, userId, id);
}
}
|
[
"1617683532@qq.com"
] |
1617683532@qq.com
|
ef764df78610d76fe900529058a3869f73636431
|
749d929b6a4450c5182e8a39ac1a9ebe58a3d313
|
/src/main/java/com/baidu/unbiz/dsp/archtype/config/AppConfig.java
|
42176e93687d8ec4defdb60a16dec5c773f6f5f4
|
[
"Apache-2.0"
] |
permissive
|
slamke/spring4-project-archetype
|
14a0086983562ef572ccfa8a1ee7606a8a57acbc
|
6dfbb78cfdc46ad9007488f3fe06f8de3ed51e39
|
refs/heads/master
| 2021-01-22T16:00:21.481610
| 2016-07-12T05:59:25
| 2016-07-12T05:59:25
| 65,186,023
| 1
| 0
| null | 2016-08-08T08:16:44
| 2016-08-08T08:16:44
| null |
UTF-8
|
Java
| false
| false
| 1,082
|
java
|
package com.baidu.unbiz.dsp.archtype.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@Configuration
//@ImportResource("classpath:applicationContext.xml")
public class AppConfig {
@Value("${jdbc.url}")
private String url;
@Value("${jdbc.username}")
private String username;
@Value("${jdbc.password}")
private String password;
//
// @Bean
// public DataSource dataSource() {
// return new DriverManagerDataSource(url, username, password);
// }
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
|
[
"notyetfish@hotmail.com"
] |
notyetfish@hotmail.com
|
f7ceeffa37a4448b9ef63674a2693ba439741d52
|
bbe7eae301fd2289fad3b62b97a68162c6f71e41
|
/SpringMvc/src/main/java/com/mnt/erp/service/CostCenterServiceImpl.java
|
47cd604a8018fa2c4b6e9a2b8103b63a30cd9b0d
|
[] |
no_license
|
venkateshpavuluri/organization
|
a083e7d283f5f49f49fbd7c3738c888a95159d9e
|
0bd0ce4eae6abc6aea7f174f7fbc8b224feada00
|
refs/heads/master
| 2021-01-19T20:18:36.911359
| 2014-06-14T10:55:54
| 2014-06-14T10:55:54
| 20,830,205
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,652
|
java
|
package com.mnt.erp.service;
import java.util.List;
import com.mnt.erp.dao.CostCenterDao;
public class CostCenterServiceImpl implements CostCenterService{
public CostCenterDao costCenterDao;
public String msg;
List<Object[]> objects;
/* getter methhods of CostCenterDao */
public CostCenterDao getcostCenterDao() {
return costCenterDao;
}
public String getMsg() {
return msg;
}
/* setter methhods of CostCenterDao */
public void setcostCenterDao(CostCenterDao costCenterDao) {
this.costCenterDao = costCenterDao;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String saveCostCenter(Object object,String userId,String userName){
try{
msg=costCenterDao.saveCostCenter(object,userId,userName);
}
catch(Exception e){
e.printStackTrace();
}
return msg;
}
public List<Object[]> searchCostCenter(int id){
// TODO Auto-generated method stub
List<Object[]> list=null;
try
{
list=costCenterDao.searchCostCenter(id);
}
catch(Exception e)
{
e.printStackTrace();
}
return list;
}
public List<Object[]> editCostCenterWithId(int id){
List<Object[]> list=null;
try
{
list=costCenterDao.editCostCenterWithId(id);
}
catch(Exception e)
{
e.printStackTrace();
}
return list;
}
@Override
public String updateCostCenter(Object object) {
try
{
msg=costCenterDao.updateCostCenter(object);
}
catch(Exception e)
{
e.printStackTrace();
}
return msg;
}
@Override
public String costCenterDelete(int id) {
// TODO Auto-generated method stub
String msg=null;
try
{
msg=costCenterDao.costCenterDelete(id);
}
catch(Exception e)
{
e.printStackTrace();
}
return msg;
}
public int costCenterDuplicate(String CostCenter){
// TODO Auto-generated method stub
int list1=0;
try
{
list1=costCenterDao.costCenterDuplicate(CostCenter);
}
catch(Exception e)
{
e.printStackTrace();
}
return list1;
}
public int costCenterEditDuplicate(String CostCenter,int id){
int list1=0;
try
{
list1=costCenterDao.costCenterEditDuplicate(CostCenter, id);
}
catch(Exception e)
{
e.printStackTrace();
}
return list1;
}
@Override
public List<Object[]> basicSearchCostCenter(String label,
String operator, String searchName) {
try {
objects = costCenterDao.basicSearchCostCenter(label, operator, searchName);
} catch (Exception e) {
e.printStackTrace();
}
// TODO Auto-generated method stub
return objects;
}
}
|
[
"pavuluri.venki@gmail.com"
] |
pavuluri.venki@gmail.com
|
9c25252a38bea34bb2fb40f79e692ea6a383e3e1
|
31a8861a391903739f7065725615eb38d2add5f2
|
/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/IntermediateCatchTimerEvent.java
|
1e4bf56e048fa4c7a4cc98fa6932a581c8ba23d3
|
[] |
no_license
|
achrafelkari/jbpm4community
|
8b6cda20bfcf1a3dc290ac7d3088b5fe25a64aa3
|
68218dbcfaca0de06226c7b5437d6c54516893a9
|
refs/heads/master
| 2020-05-17T22:19:19.883824
| 2010-07-21T03:20:35
| 2010-07-21T03:20:35
| 34,602,056
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,044
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.bpmn.flownodes;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;
import org.jbpm.pvm.internal.model.ExecutionImpl;
/**
*
* @author Joram Barrez
*/
public class IntermediateCatchTimerEvent extends BpmnActivity implements EventListener, BpmnEvent {
private static final long serialVersionUID = 1L;
public void execute(ActivityExecution execution) {
execute((ExecutionImpl) execution);
}
public void execute(ExecutionImpl execution) {
execution.waitForSignal(); // Timer will automatically be created due to a TimerDefinition attached to the activity
}
/**
* Called when an intermediate timer fires.
* The given execution should be continued.
*/
public void notify(EventListenerExecution execution) throws Exception {
ExecutionImpl executionImpl = (ExecutionImpl) execution;
proceed(executionImpl, findOutgoingSequenceFlow(executionImpl, CONDITIONS_CHECKED));
}
}
|
[
"lingosurf168@gmail.com@4176473f-49b9-eb0f-29b8-c11706d975a3"
] |
lingosurf168@gmail.com@4176473f-49b9-eb0f-29b8-c11706d975a3
|
e5adb141dbb1ebe2679b5eab6866d9d7ff9cd005
|
806f76edfe3b16b437be3eb81639d1a7b1ced0de
|
/src/com/google/zxing/client/android/C3814k.java
|
f736f866d1ea43a829873a63dd0a5276576c81c5
|
[] |
no_license
|
magic-coder/huawei-wear-re
|
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
|
935ad32f5348c3d8c8d294ed55a5a2830987da73
|
refs/heads/master
| 2021-04-15T18:30:54.036851
| 2018-03-22T07:16:50
| 2018-03-22T07:16:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 691
|
java
|
package com.google.zxing.client.android;
import android.os.Handler;
import android.os.Message;
import java.lang.ref.WeakReference;
/* compiled from: CaptureActivity */
class C3814k extends Handler {
private WeakReference<CaptureActivity> f14819a;
public C3814k(CaptureActivity captureActivity) {
this.f14819a = new WeakReference(captureActivity);
}
public void handleMessage(Message message) {
super.handleMessage(message);
CaptureActivity captureActivity = (CaptureActivity) this.f14819a.get();
if (captureActivity != null && !captureActivity.isFinishing() && message.what == 1) {
captureActivity.m18951o();
}
}
}
|
[
"lebedev1537@gmail.com"
] |
lebedev1537@gmail.com
|
71011a3a31dafbdd91092bca28dd64d9c65150e5
|
29227577f1b07a9fcada5d38d6c57cded3515cb2
|
/src/main/java/cct/tools/ui/FontSelectorDialog.java
|
e28dc1a9c2f6c223d83edb6c618e32137f66a769
|
[
"Apache-2.0"
] |
permissive
|
SciGaP/seagrid-rich-client
|
ad11edd2691c0ac1863591e106cb5f4f19d6d633
|
b7114b3bb4bb3796e8f9ab3b49e5bd08f9fc005e
|
refs/heads/master
| 2023-06-23T16:33:10.356706
| 2022-06-16T02:27:46
| 2022-06-16T02:27:46
| 45,587,225
| 1
| 8
|
Apache-2.0
| 2023-06-14T22:43:06
| 2015-11-05T04:19:15
|
Java
|
UTF-8
|
Java
| false
| false
| 5,104
|
java
|
/* ***** BEGIN LICENSE BLOCK *****
Version: Apache 2.0/GPL 3.0/LGPL 3.0
CCT - Computational Chemistry Tools
Jamberoo - Java Molecules Editor
Copyright 2008-2015 Dr. Vladislav Vasilyev
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.
Contributor(s):
Dr. Vladislav Vasilyev <vvv900@gmail.com> (original author)
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the Apache 2.0, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the Apache 2.0, the GPL or the LGPL.
***** END LICENSE BLOCK *****/
package cct.tools.ui;
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: ANU</p>
*
* @author Dr. V. Vasilyev
* @version 1.0
*/
public class FontSelectorDialog
extends JDialog implements ActionListener {
JPanel panel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
FontSelectorPanel fontSelectorPanel1 = new FontSelectorPanel();
JPanel jPanel1 = new JPanel();
JButton cancelButton = new JButton();
JButton okButton = new JButton();
boolean okPressed = false;
public FontSelectorDialog(Frame owner, String title, boolean modal) {
super(owner, title, modal);
try {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
jbInit();
pack();
}
catch (Exception exception) {
exception.printStackTrace();
}
}
public boolean isOKPressed() {
return okPressed;
}
public FontSelectorDialog() {
this(new Frame(), "FontSelectorDialog", false);
}
private void jbInit() throws Exception {
panel1.setLayout(borderLayout1);
cancelButton.setToolTipText("");
cancelButton.setText("Cancel");
cancelButton.addActionListener(this);
okButton.setToolTipText("");
okButton.setText("OK");
okButton.addActionListener(this);
this.setDefaultCloseOperation(javax.swing.WindowConstants.
DO_NOTHING_ON_CLOSE);
getContentPane().add(panel1);
panel1.add(fontSelectorPanel1, BorderLayout.CENTER);
panel1.add(jPanel1, BorderLayout.SOUTH);
jPanel1.add(okButton);
jPanel1.add(cancelButton);
}
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == okButton) {
okPressed = true;
setVisible(false);
}
else if (e.getSource() == cancelButton) {
okPressed = false;
setVisible(false);
}
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception exception) {
exception.printStackTrace();
}
FontSelectorDialog frame = new FontSelectorDialog(new Frame(),
"Select Font", false);
frame.validate();
/*
frame.hideButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
}
);
*/
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame.setVisible(true);
}
});
}
public String getFontName() {
return fontSelectorPanel1.fontComboBox.getSelectedItem().toString();
}
public int getFontSize() {
return fontSelectorPanel1.getFontSize();
}
public int getFontStyle() {
return fontSelectorPanel1.getFontStyle();
}
}
|
[
"supun.nakandala@gmail.com"
] |
supun.nakandala@gmail.com
|
22147257ad152f377950bbc72b28f5af07bc18ce
|
2610e3bccddf5a695cf58adc28f56e1858b94c3c
|
/microservice-loverent-oss-common-v1/src/main/java/org/gz/oss/common/utils/FastJsonUtil.java
|
710fcba985f9b09d76255ebc8b9b89e422ef96a4
|
[] |
no_license
|
song121382/aizuji
|
812958c3020e37c052d913cfdd3807b1a55b2115
|
5ec44cf60945d6ff017434d5f321c0bcf3f111f1
|
refs/heads/master
| 2020-04-08T07:34:00.885177
| 2018-07-17T08:37:26
| 2018-07-17T08:37:26
| 159,143,253
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,553
|
java
|
package org.gz.oss.common.utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
@SuppressWarnings("all")
public class FastJsonUtil {
private static final Logger logger = LoggerFactory
.getLogger(FastJsonUtil.class);
public static final <T> List<T> getList(String jsontext, String list_str,
Class<T> clazz) {
JSONObject jsonobj = JSON.parseObject(jsontext);
if (jsonobj == null) {
return null;
}
Object obj = jsonobj.get(list_str);
if (obj == null) {
return null;
}
// if(obj instanceof JSONObject){}
if (obj instanceof JSONArray) {
JSONArray jsonarr = (JSONArray) obj;
List<T> list = new ArrayList<T>();
for (int i = 0; i < jsonarr.size(); i++) {
list.add(jsonarr.getObject(i, clazz));
}
return list;
}
return null;
}
/**
* @param <T>
* -> DepartmentBean
* @param jsontext
* -> {"department":{"id":"1","name":"生产部"},"password":"admin",
* "username":"admin"}
* @param obj_str
* -> department
* @param clazz
* -> DepartmentBean
* @return -> T
*/
public static final <T> T getObject(String jsontext, String obj_str,
Class<T> clazz) {
JSONObject jsonobj = JSON.parseObject(jsontext);
if (jsonobj == null) {
return null;
}
Object obj = jsonobj.get(obj_str);
if (obj == null) {
return null;
}
if (obj instanceof JSONObject) {
return jsonobj.getObject(obj_str, clazz);
} else {
logger.info(obj.getClass()+"");
}
return null;
}
/**
* @param <T>
* @param jsontext
* ->{"department":{"id":"1","name":"生产部"},"password":"admin",
* "username":"admin"}
* @param clazz
* -> UserBean.class
* @return -> UserBean
*/
// 注:传入任意的jsontext,返回的T都不会为null,只是T的属性为null
public static final <T> T getObject(String jsontext, Class<T> clazz) {
T t = null;
try {
t = JSON.parseObject(jsontext, clazz);
} catch (Exception e) {
logger.error("json字符串转换失败!" + jsontext, e);
}
return t;
}
public static final String toJSONString(Object object, boolean prettyFormat) {
return JSON.toJSONString(object, prettyFormat);
}
/**
* @Description: json字符串转成为List
* @author: GuXiYang
* @date: 2017/05/08 10:25:00
* @param jsonStr
* json字符串
* @param clazz
* class名称
* @return
*/
public static <T> List<T> getList(String jsonStr, Class<T> clazz) {
List<T> list = new ArrayList<T>();
try {
list = JSON.parseArray(jsonStr, clazz);
} catch (Exception e) {
logger.error("json字符串转List失败!" + jsonStr, e);
}
return list;
}
/**
*
* @Description: json字符串转换成list<Map>
* @author: GuXiYang
* @date: 2017/05/08 10:27:16
* @param jsonString
* json字符串
* @return
*/
public static List<Map<String, Object>> listKeyMaps(String jsonString) {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
try {
list = JSON.parseObject(jsonString,
new TypeReference<List<Map<String, Object>>>() {
});
} catch (Exception e) {
logger.error("json字符串转map失败", e);
}
return list;
}
/**
* @Description: json字符串转换为Map
* @author: GuXiYang
* @date: 2017/05/08 10:32:33
* @param jsonStr
* json字符串
* @return
*/
public static Map<String, Object> json2Map(String jsonStr) {
try {
return JSON.parseObject(jsonStr, Map.class);
} catch (Exception e) {
logger.error("json字符串转换失败!" + jsonStr, e);
}
return null;
}
// public static void main(String[] args) {
// Map<String,Object> dataMap = new HashMap<String,Object>();
// dataMap.put("tag", "data");
// dataMap.put("hospitalName", "宜都市妇幼保健院");
// dataMap.put("name", "欧阳夏凡");
// dataMap.put("gender", "女");
// dataMap.put("age", "28");
// dataMap.put("code", "420502042");
// dataMap.put("examineDoc", "杨林");
// dataMap.put("examineDate", "2016-05-10");
// dataMap.put("verifyDoc", "王菲");
// String jsonString=JSON.toJSONString(dataMap);
// System.out.println(jsonString);
// Map object = getObject(jsonString,Map.class);
// System.out.println(object.get("age"));
// }
}
|
[
"daiqw713@outlook.com"
] |
daiqw713@outlook.com
|
e0641901b0de726aecab4ed442e30c74caf5d9ce
|
c6b40ab2d5b49881cd3aa6f9922fd5b45b731cc1
|
/src/main/java/kr/nzzi/msa/mqtest1/rabbitmq/RabbitMqExceptionHandler.java
|
4df886d8c5b899ada96c064b069bd60c615b34b8
|
[] |
no_license
|
cholnh/mqtest
|
334159206545654bcd2031a1dbdc4d7f3ed9b3df
|
3d0a7b250f7ba42837a8ce34eb8d2b645fb8796e
|
refs/heads/master
| 2023-06-21T13:44:17.251681
| 2021-07-29T09:31:58
| 2021-07-29T09:31:58
| 389,489,755
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 701
|
java
|
package kr.nzzi.msa.mqtest1.rabbitmq;
import java.nio.charset.StandardCharsets;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer;
@Slf4j
public class RabbitMqExceptionHandler extends RejectAndDontRequeueRecoverer {
@Override
public void recover(Message message, Throwable cause) {
final byte[] body = message.getBody();
final String msg = new String(body, StandardCharsets.UTF_8);
log.error("===================");
log.debug(msg);
log.warn("Retries exhausted for message " + message, cause);
log.error("===================");
}
}
|
[
"cholnh1@naver.com"
] |
cholnh1@naver.com
|
85e31e1b36f653204ecc09b89daaa08b3cb3d795
|
f387d4ee4ff04787f755bbf514409ab863de00ca
|
/supersign-interface/src/main/java/com/tigerjoys/shark/supersign/inter/contract/impl/UdidAddLogContractImpl.java
|
4009af9063ca95166fd4ee07ab73d88175a0b30e
|
[] |
no_license
|
xiaoxiao1986/super-sign
|
ee8e66be8a423d16fc1cb74e2afdd575b55451cb
|
aff12692cc5cc7bc4d73e7c690fa8f11504ffd03
|
refs/heads/master
| 2023-04-05T13:17:25.920011
| 2021-04-09T09:37:59
| 2021-04-09T09:37:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,208
|
java
|
package com.tigerjoys.shark.supersign.inter.contract.impl;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.tigerjoys.nbs.common.utils.Tools;
import com.tigerjoys.nbs.mybatis.core.contract.AbstractBaseContract;
import com.tigerjoys.nbs.mybatis.core.page.PageModel;
import com.tigerjoys.nbs.mybatis.core.sql.Restrictions;
import com.tigerjoys.shark.supersign.inter.contract.IUdidAddLogContract;
import com.tigerjoys.shark.supersign.inter.entity.UdidAddLogEntity;
import com.tigerjoys.shark.supersign.inter.mapper.UdidAddLogMapper;
/**
* 数据库中 UDID更新日志[t_udid_add_log]表 接口实现类
* @Date 2020-03-26 15:39:15
*
*/
@Repository
public class UdidAddLogContractImpl extends AbstractBaseContract<UdidAddLogEntity , UdidAddLogMapper> implements IUdidAddLogContract {
@Override
public UdidAddLogEntity findByUdidAndAppId(String udid, long appId) throws Exception {
PageModel pageModel = PageModel.getLimitModel(0, 1);
pageModel.addQuery(Restrictions.eq("udid", udid));
pageModel.addQuery(Restrictions.eq("app_id", appId));
List<UdidAddLogEntity> list = mapper.load(pageModel);
return Tools.isNotNull(list) ? list.get(0) : null;
}
}
|
[
"172577882@qq.com"
] |
172577882@qq.com
|
092d0263a47496136cc42203d28f6beb80e23c9d
|
6416d6debb04e0941fbd08fca7220032a8485b9e
|
/src/main/java/io/github/viscent/mtia/ch9/FileBatchUploader.java
|
743274538dd6d2f8351417de8635c11ba958ee9f
|
[] |
no_license
|
certainTao/jmtia
|
2490fb3c97066a707b24541a91ab7d2ddefd9949
|
9abea0e34e5af8090cba7271f899e48f0ede4c24
|
refs/heads/master
| 2023-03-16T04:18:22.724206
| 2017-08-23T06:41:59
| 2017-08-23T06:41:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,554
|
java
|
/*
授权声明:
本源码系《Java多线程编程实战指南(核心篇)》一书(ISBN:978-7-121-31065-2,以下称之为“原书”)的配套源码,
欲了解本代码的更多细节,请参考原书。
本代码仅为原书的配套说明之用,并不附带任何承诺(如质量保证和收益)。
以任何形式将本代码之部分或者全部用于营利性用途需经版权人书面同意。
将本代码之部分或者全部用于非营利性用途需要在代码中保留本声明。
任何对本代码的修改需在代码中以注释的形式注明修改人、修改时间以及修改内容。
本代码可以从以下网址下载:
https://github.com/Viscent/javamtia
http://www.broadview.com.cn/31065
*/
package io.github.viscent.mtia.ch9;
import io.github.viscent.mtia.util.Debug;
import io.github.viscent.mtia.util.Tools;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPClientConfig;
import org.apache.commons.net.ftp.FTPReply;
import java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.security.NoSuchAlgorithmException;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
public class FileBatchUploader implements Closeable {
private final String ftpServer;
private final String userName;
private final String password;
private final String targetRemoteDir;
private final FTPClient ftp = new FTPClient();
private final CompletionService<File> completionService;
private final ExecutorService es;
private final ExecutorService dispatcher;
public FileBatchUploader(String ftpServer, String userName, String password,
String targetRemoteDir) {
this.ftpServer = ftpServer;
this.userName = userName;
this.password = password;
this.targetRemoteDir = targetRemoteDir;
// 使用单工作者线程的线程池
this.es = Executors.newSingleThreadExecutor();
this.dispatcher = Executors.newSingleThreadExecutor();
this.completionService = new ExecutorCompletionService<File>(es);
}
private static File moveToSuccessDir(File file) {
File targetFile = null;
try {
targetFile = moveFile(file, Paths.get(file.getParent(), "..", "backup", "success"));
} catch (IOException e) {
e.printStackTrace();
}
return targetFile;
}
private static File moveToDeadDir(File file) {
File targetFile = null;
try {
targetFile = moveFile(file, Paths.get(file.getParent(), "..", "backup", "dead"));
} catch (IOException e) {
e.printStackTrace();
}
return targetFile;
}
private static File moveFile(File srcFile, Path destPath) throws IOException {
Path sourcePath = Paths.get(srcFile.getAbsolutePath());
if (!Files.exists(destPath)) {
Files.createDirectories(destPath);
}
Path destFile = destPath.resolve(srcFile.getName());
Files.move(sourcePath, destFile,
StandardCopyOption.REPLACE_EXISTING);
return destFile.toFile();
}
public void uploadFiles(final Set<File> files) {
dispatcher.submit(new Runnable() {
@Override
public void run() {
try {
doUploadFiles(files);
} catch (InterruptedException ignored) {
}
}
});
}
private void doUploadFiles(Set<File> files) throws InterruptedException {
// 批量提交文件上传任务
for (final File file : files) {
completionService.submit(new UploadTask(file));
}
Future<File> future;
File md5File;
File uploadedFile;
Set<File> md5Files = new HashSet<File>();
for (File file : files) {
try {
future = completionService.take();
uploadedFile = future.get();
// 将上传成功的文件移动到备份目录,并为其生成相应的MD5文件
md5File = generateMD5(moveToSuccessDir(uploadedFile));
md5Files.add(md5File);
} catch (ExecutionException | IOException | NoSuchAlgorithmException e) {
e.printStackTrace();
moveToDeadDir(file);
}
}
for (File file : md5Files) {
// 上传相应的MD5文件
completionService.submit(new UploadTask(file));
}
// 检查md5文件的上传结果
int successUploaded = md5Files.size();
for (int i = 0; i < successUploaded; i++) {
future = completionService.take();
try {
uploadedFile = future.get();
md5Files.remove(uploadedFile);
} catch (ExecutionException e) {
e.printStackTrace();
}
}
// 将剩余(即未上传成功)的md5文件移动到相应备份目录
for (File file : md5Files) {
moveToDeadDir(file);
}
}
private File generateMD5(File file) throws IOException, NoSuchAlgorithmException {
String md5 = Tools.md5sum(file);
File md5File = new File(file.getAbsolutePath() + ".md5");
Files.write(Paths.get(md5File.getAbsolutePath()), md5.getBytes("UTF-8"));
return md5File;
}
// 初始化FTP客户端
public void init() throws Exception {
FTPClientConfig config = new FTPClientConfig();
ftp.configure(config);
int reply;
ftp.connect(ftpServer);
Debug.info("FTP Reply:%s", ftp.getReplyString());
reply = ftp.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
throw new Exception("FTP server refused connection.");
}
boolean isOK = ftp.login(userName, password);
if (isOK) {
Debug.info("FTP Reply:%s", ftp.getReplyString());
} else {
throw new Exception("Failed to login." + ftp.getReplyString());
}
reply = ftp.cwd(targetRemoteDir);
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
throw new Exception("Failed to change working directory.reply:"
+ reply);
} else {
Debug.info("FTP Reply:%s", ftp.getReplyString());
}
ftp.setFileType(FTP.ASCII_FILE_TYPE);
}
// 将指定的文件上传至FTP服务器
protected void upload(File file) throws Exception {
boolean isOK;
try (InputStream dataIn = new BufferedInputStream(new FileInputStream(file))) {
isOK = ftp.storeFile(file.getName(), dataIn);
}
if (!isOK) {
throw new IOException("Failed to upload " + file + ",reply:" + ","
+ ftp.getReplyString());
}
}
@Override
public void close() throws IOException {
dispatcher.shutdown();
try {
es.awaitTermination(60, TimeUnit.SECONDS);
} catch (InterruptedException ignored) {
}
es.shutdown();
try {
es.awaitTermination(60, TimeUnit.SECONDS);
} catch (InterruptedException ignored) {
}
Tools.silentClose(new Closeable() {
@Override
public void close() throws IOException {
if (ftp.isConnected()) {
ftp.disconnect();
}
}
});
}
class UploadTask implements Callable<File> {
private final File file;
public UploadTask(File file) {
this.file = file;
}
@Override
public File call() throws Exception {
Debug.info("uploading %s", file.getCanonicalPath());
// 上传指定的文件
upload(file);
return file;
}
}
}
|
[
"mosoft521@gmail.com"
] |
mosoft521@gmail.com
|
41e111bde30f26a22f522c4342b6ad2306ed1ecc
|
aeb30a11e37adcd6b28cc10a5cb47d9478ee6a6e
|
/test/org/springframework/aop/target/CommonsPoolTargetSourceTests.java
|
0c9f6e5bf8c899a9ebe7ce26d2e114f3862db394
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
FanZhoukai/spring1.1.1
|
cf89459812d97070f870560109b66e16b6d44ed9
|
214897f5a731a47ffc30996099afb9e1866ddc82
|
refs/heads/master
| 2020-04-27T20:32:14.456644
| 2019-05-03T10:24:24
| 2019-05-03T10:24:24
| 174,661,624
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,967
|
java
|
/*
* Copyright 2002-2004 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.target;
import junit.framework.TestCase;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.interceptor.SideEffectBean;
import org.springframework.beans.Person;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.util.SerializationTestUtils;
/**
* Tests for pooling invoker interceptor
* TODO need to make these tests stronger: it's hard to
* make too many assumptions about a pool
* @author Rod Johnson
*/
public class CommonsPoolTargetSourceTests extends TestCase {
/** Initial count value set in bean factory XML */
private static final int INITIAL_COUNT = 10;
private XmlBeanFactory beanFactory;
protected void setUp() throws Exception {
this.beanFactory = new XmlBeanFactory(new ClassPathResource("commonsPoolTests.xml", getClass()));
}
/**
* We must simulate container shutdown, which should clear threads.
*/
protected void tearDown() {
// Will call pool.close()
this.beanFactory.destroySingletons();
}
private void testFunctionality(String name) {
SideEffectBean pooled = (SideEffectBean) beanFactory.getBean(name);
assertEquals(INITIAL_COUNT, pooled.getCount() );
pooled.doWork();
assertEquals(INITIAL_COUNT + 1, pooled.getCount() );
pooled = (SideEffectBean) beanFactory.getBean(name);
// Just check that it works--we can't make assumptions
// about the count
pooled.doWork();
//assertEquals(INITIAL_COUNT + 1, apartment.getCount() );
}
public void testFunctionality() {
testFunctionality("pooled");
}
public void testFunctionalityWithNoInterceptors() {
testFunctionality("pooledNoInterceptors");
}
public void testConfigMixin() {
SideEffectBean pooled = (SideEffectBean) beanFactory.getBean("pooledWithMixin");
assertEquals(INITIAL_COUNT, pooled.getCount() );
PoolingConfig conf = (PoolingConfig) beanFactory.getBean("pooledWithMixin");
// TODO one invocation from setup
//assertEquals(1, conf.getInvocations());
pooled.doWork();
// assertEquals("No objects active", 0, conf.getActive());
assertEquals("Correct target source", 25, conf.getMaxSize());
// assertTrue("Some free", conf.getFree() > 0);
//assertEquals(2, conf.getInvocations());
assertEquals(25, conf.getMaxSize());
}
public void testTargetSourceSerializableWithoutConfigMixin() throws Exception {
CommonsPoolTargetSource cpts = (CommonsPoolTargetSource) beanFactory.getBean("personPoolTargetSource");
SingletonTargetSource serialized = (SingletonTargetSource) SerializationTestUtils.serializeAndDeserialize(cpts);
assertTrue(serialized.getTarget() instanceof Person);
}
public void testProxySerializableWithoutConfigMixin() throws Exception {
Person pooled = (Person) beanFactory.getBean("pooledPerson");
//System.out.println(((Advised) pooled).toProxyConfigString());
assertTrue(((Advised) pooled).getTargetSource() instanceof CommonsPoolTargetSource);
//((Advised) pooled).setTargetSource(new SingletonTargetSource(new SerializablePerson()));
Person serialized = (Person) SerializationTestUtils.serializeAndDeserialize(pooled);
assertTrue(((Advised) serialized).getTargetSource() instanceof SingletonTargetSource);
serialized.setAge(25);
assertEquals(25, serialized.getAge());
}
}
|
[
"fanzhoukai@163.com"
] |
fanzhoukai@163.com
|
8eb275ac16f058b35acab6cf1ad4f0182660e967
|
baffbfd03d87a347bc9b7a76eb9c28a1e4714698
|
/src/main/java/com/jwebmp/examples/demos/homepage/display/contactus/GoToContactUsScreenEvent.java
|
de51b6aa5dc91fcf5c9ffaa1d590c3e845a39967
|
[] |
no_license
|
Russ19/JWebMPHomePage
|
909c6ae4472b094029b192113f18b75cc9efa907
|
7d735946074903a185f3a596977745ea9a5e311c
|
refs/heads/master
| 2020-03-17T10:24:12.901333
| 2018-05-12T21:34:00
| 2018-05-12T21:34:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 954
|
java
|
package com.jwebmp.examples.demos.homepage.display.contactus;
import com.jwebmp.base.ComponentHierarchyBase;
import com.jwebmp.base.ajax.AjaxCall;
import com.jwebmp.base.ajax.AjaxResponse;
import com.jwebmp.plugins.bootstrap4.cards.BSCardEvents;
import za.co.mmagon.guiceinjection.GuiceContext;
import com.jwebmp.base.ComponentHierarchyBase;
import com.jwebmp.base.ajax.AjaxCall;
import com.jwebmp.base.ajax.AjaxResponse;
import com.jwebmp.events.click.ClickAdapter;
import com.jwebmp.plugins.bootstrap4.cards.BSCardEvents;
public class GoToContactUsScreenEvent
extends ClickAdapter
implements BSCardEvents
{
public GoToContactUsScreenEvent()
{
this(null);
}
public GoToContactUsScreenEvent(ComponentHierarchyBase component)
{
super(component);
setID("GoToContactUsScreenEvent");
}
@Override
public void onClick(AjaxCall call, AjaxResponse response)
{
response.addComponent(GuiceContext.getInstance(ContactUsScreen.class));
}
}
|
[
"ged_marc@hotmail.com"
] |
ged_marc@hotmail.com
|
d1bdda2c21de8db0e9d30f58c2ff29323fa66cc0
|
5a1d6752ef215efaddf6b55e1bb88c0575d3d7cd
|
/uilegacy/component/domain/src/main/java/org/flowframe/ui/component/domain/form/PhysicalAttributeConfirmActualsFieldSetFieldComponent.java
|
09d5dd751f597b10762ab2af134e4fe2abfd6165
|
[] |
no_license
|
mduduzik/flowframe
|
5849eddfed53a82e65f6d1e815db0ba2cc85e263
|
71245bf70688a08cf91a6b105fd8aae62cdab2ab
|
refs/heads/master
| 2021-01-20T05:49:44.876366
| 2013-08-05T02:11:54
| 2013-08-05T02:11:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,989
|
java
|
package org.flowframe.ui.component.domain.form;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import org.flowframe.ds.domain.DataSourceField;
import org.flowframe.ui.component.domain.AbstractFieldComponent;
@Entity
public class PhysicalAttributeConfirmActualsFieldSetFieldComponent extends AbstractFieldComponent implements Serializable {
private static final long serialVersionUID = -6947507271706691279L;
@OneToOne
private PhysicalAttributeConfirmActualsFieldSetComponent fieldSet;
@OneToOne
private DataSourceField expectedDataSourceField;
@OneToOne
private DataSourceField expectedUnitDataSourceField;
@OneToOne
private DataSourceField actualDataSourceField;
@OneToOne
private DataSourceField actualUnitDataSourceField;
private int ordinal;
public PhysicalAttributeConfirmActualsFieldSetFieldComponent() {
super("fieldSetField");
this.ordinal = -1;
}
public PhysicalAttributeConfirmActualsFieldSetFieldComponent(int ordinal) {
super("fieldSetField");
this.ordinal = ordinal;
}
public PhysicalAttributeConfirmActualsFieldSetFieldComponent(int ordinal, DataSourceField expectedDataSourceField, DataSourceField expectedUnitDataSourceField, DataSourceField actualDataSourceField, DataSourceField actualUnitDataSourceField) {
this(ordinal);
this.expectedDataSourceField = expectedDataSourceField;
this.expectedUnitDataSourceField = expectedUnitDataSourceField;
this.actualDataSourceField = actualDataSourceField;
this.actualUnitDataSourceField = actualUnitDataSourceField;
}
public PhysicalAttributeConfirmActualsFieldSetComponent getFieldSet() {
return fieldSet;
}
public void setFieldSet(PhysicalAttributeConfirmActualsFieldSetComponent fieldSet) {
this.fieldSet = fieldSet;
}
public DataSourceField getExpectedDataSourceField() {
return expectedDataSourceField;
}
public void setExpectedDataSourceField(DataSourceField dsField) {
this.expectedDataSourceField = dsField;
}
public DataSourceField getActualDataSourceField() {
return actualDataSourceField;
}
public void setActualDataSourceField(DataSourceField dsField) {
this.actualDataSourceField = dsField;
}
public int getOrdinal() {
return ordinal;
}
public void setOrdinal(int ordinal) {
this.ordinal = ordinal;
}
public boolean isRequired() {
if (this.expectedDataSourceField != null) {
return this.expectedDataSourceField.getRequired();
}
return false;
}
public DataSourceField getExpectedUnitDataSourceField() {
return expectedUnitDataSourceField;
}
public void setExpectedUnitDataSourceField(DataSourceField expectedUnitDataSourceField) {
this.expectedUnitDataSourceField = expectedUnitDataSourceField;
}
public DataSourceField getActualUnitDataSourceField() {
return actualUnitDataSourceField;
}
public void setActualUnitDataSourceField(DataSourceField actualUnitDataSourceField) {
this.actualUnitDataSourceField = actualUnitDataSourceField;
}
}
|
[
"mduduzi.keswa@bconv.com"
] |
mduduzi.keswa@bconv.com
|
7578a6db6eef740c20c3c5c5c35a5d20209660f4
|
09df86a2c70219363e0c9735aef4e55d2fc05724
|
/src/com/company/target/collections/ch10/PrintSynonymsMain.java
|
62aea4578834202f2fe6f6c577b7e12ba730783a
|
[] |
no_license
|
zuoyebushiwo/my
|
25782006453f50931225eac89872b18ff558b2f8
|
5b07e385d89a0d74dfb608ff81d846266f80d9d4
|
refs/heads/master
| 2016-09-16T17:01:34.191135
| 2016-03-15T06:16:34
| 2016-03-15T06:16:34
| 28,036,684
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 236
|
java
|
package com.company.target.collections.ch10;
public class PrintSynonymsMain {
public static void main (String[] args) {
PrintSynonyms synonyms = new PrintSynonyms();
} // method main
} // PrintSynonymsMain
|
[
"957168943@qq.com"
] |
957168943@qq.com
|
9486d8ebaa67f5d59878e09ec3e08d1e5ba57fcb
|
b796403692acd9cd1dcae90ee41c37ef4bc56f44
|
/CobolPorterParser/src/main/java/tr/com/vbt/natural/parser/loops/ElementRepeatWhile.java
|
49b6b1469133b4c8c25cc048398b353118132850
|
[] |
no_license
|
latift/PorterEngine
|
7626bae05f41ef4e7828e13f2a55bf77349e1bb3
|
c78a12f1cb2e72c90b1b22d6f50f71456d0c4345
|
refs/heads/master
| 2023-09-02T05:16:24.793958
| 2021-09-29T12:02:52
| 2021-09-29T12:02:52
| 95,788,676
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,851
|
java
|
package tr.com.vbt.natural.parser.loops;
import java.util.ArrayList;
import java.util.List;
import tr.com.vbt.cobol.parser.AbstractCommand;
import tr.com.vbt.cobol.parser.AbstractMultipleLinesCommand;
import tr.com.vbt.lexer.ReservedNaturalKeywords;
import tr.com.vbt.token.AbstractToken;
//PERFORM paraX Y TIMES --> for (int i=0; i<Y;i++){paraX();}
//Parameters: ParagraghName, RunCount
public class ElementRepeatWhile extends AbstractMultipleLinesCommand{
private List<AbstractToken> conditionList=new ArrayList<AbstractToken>();
public ElementRepeatWhile(AbstractToken baseToken,
List<AbstractToken> tokenListesi, AbstractCommand parent) {
super("ElementRepeatWhile","GENERAL.*.REPEAT_WHILE");
}
public ElementRepeatWhile(String elementName,String detailedCobolName) {
super(elementName, detailedCobolName);
}
@Override
public String exportContents() {
StringBuilder sb=new StringBuilder();
sb.append(" "+ReservedNaturalKeywords.REPEAT_WHILE +"=\"");
for (AbstractToken data : conditionList) {
sb.append(" "+ data.getDeger());
}
if(this.endingCommand!=null){
sb.append(" Ender:"+this.endingCommand.toString() +" ");
}
sb.append("\"\n");
return sb.toString();
}
@Override
public boolean generateDetailedCobolName() {
// TODO Auto-generated method stub
return false;
}
@Override
public String exportCommands() {
StringBuilder sb=new StringBuilder();
sb.append(" "+ReservedNaturalKeywords.REPEAT_UNTIL +"=\"");
for (AbstractToken data : conditionList) {
sb.append(" "+ data.getDeger());
}
sb.append(" Ender:"+ this.endingCommand);
sb.append("\"\n");
return sb.toString();
}
public List<AbstractToken> getConditionList() {
return conditionList;
}
public void setConditionList(List<AbstractToken> conditionList) {
this.conditionList = conditionList;
}
}
|
[
"latiftopcu@gmail.com"
] |
latiftopcu@gmail.com
|
530a3088974c6ca79684e79730595ad9a90d3719
|
d38afb4d31e0574dd2086fc84e5d664aecc77f5c
|
/com/planet_ink/coffee_mud/Abilities/Skills/Skill_Write.java
|
230b1149c1192d047751d327ea02c3f9bbeaf12e
|
[
"Apache-2.0"
] |
permissive
|
Dboykey/CoffeeMud
|
c4775fc6ec9e910ff7ff8523c04567a580a9529e
|
844704805d3de26a16b83bd07552d6ae82391208
|
refs/heads/master
| 2022-04-16T07:07:22.004847
| 2020-04-06T17:55:33
| 2020-04-06T17:55:33
| 255,074,559
| 0
| 1
|
Apache-2.0
| 2020-04-12T12:10:07
| 2020-04-12T12:10:06
| null |
UTF-8
|
Java
| false
| false
| 4,651
|
java
|
package com.planet_ink.coffee_mud.Abilities.Skills;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2020 Bo Zimmerman
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.
*/
public class Skill_Write extends StdSkill
{
@Override
public String ID()
{
return "Skill_Write";
}
private final static String localizedName = CMLib.lang().L("Write");
@Override
public String name()
{
return localizedName;
}
@Override
protected int canAffectCode()
{
return 0;
}
@Override
protected int canTargetCode()
{
return Ability.CAN_ITEMS;
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_INDIFFERENT;
}
private static final String[] triggerStrings = I(new String[] { "WRITE", "WR" });
@Override
public String[] triggerStrings()
{
return triggerStrings;
}
@Override
public int classificationCode()
{
return Ability.ACODE_SKILL | Ability.DOMAIN_CALLIGRAPHY;
}
@Override
public int overrideMana()
{
return 0;
}
@Override
protected boolean ignoreCompounding()
{
return true;
}
@Override
public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel)
{
if(mob.charStats().getStat(CharStats.STAT_INTELLIGENCE)<5)
{
mob.tell(L("You are too stupid to actually write anything."));
return false;
}
if(commands.size()<1)
{
mob.tell(L("What would you like to write on?"));
return false;
}
Item target=mob.fetchItem(null,Wearable.FILTER_UNWORNONLY,commands.get(0));
if(target==null)
{
target=mob.location().findItem(null,commands.get(0));
if((target!=null)&&(CMLib.flags().isGettable(target)))
{
mob.tell(L("You don't have that."));
return false;
}
}
if((target==null)||(!CMLib.flags().canBeSeenBy(target,mob)))
{
mob.tell(L("You don't see '@x1' here.",(commands.get(0))));
return false;
}
final Item item=target;
if(((item.material()!=RawMaterial.RESOURCE_PAPER)
&&(item.material()!=RawMaterial.RESOURCE_SILK)
&&(item.material()!=RawMaterial.RESOURCE_HIDE)
&&(item.material()!=RawMaterial.RESOURCE_HEMP))
||(!item.isReadable()))
{
mob.tell(L("You can't write on that."));
return false;
}
if(item instanceof com.planet_ink.coffee_mud.Items.interfaces.RoomMap)
{
mob.tell(L("You can't write on a map."));
return false;
}
if(item instanceof Scroll)
{
mob.tell(L("You can't write on a scroll."));
return false;
}
if(CMParms.combine(commands,1).toUpperCase().startsWith("FILE="))
{
mob.tell(L("You can't write that."));
return false;
}
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
final CMMsg msg=CMClass.getMsg(mob,target,this,CMMsg.MSG_WRITE,L("<S-NAME> write(s) on <T-NAMESELF>."),CMMsg.MSG_WRITE,CMParms.combine(commands,1),CMMsg.MSG_WRITE,L("<S-NAME> write(s) on <T-NAMESELF>."));
if(mob.location().okMessage(mob,msg))
mob.location().send(mob,msg);
}
else
mob.location().show(mob,target,CMMsg.MSG_OK_VISUAL,L("<S-NAME> attempt(s) to write on <T-NAMESELF>, but mess(es) up."));
return success;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
5b9ed8e55cf6159c6a843a988b39a55720a2ab46
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/MATH-4b-1-19-Single_Objective_GGA-IntegrationSingleObjective-/org/apache/commons/math3/geometry/euclidean/threed/Line_ESTest.java
|
977f4c89b3b338c088f466e7d5f9b16accdaf535
|
[
"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,412
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon May 18 01:34:28 UTC 2020
*/
package org.apache.commons.math3.geometry.euclidean.threed;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math3.geometry.Vector;
import org.apache.commons.math3.geometry.euclidean.oned.Vector1D;
import org.apache.commons.math3.geometry.euclidean.threed.Euclidean3D;
import org.apache.commons.math3.geometry.euclidean.threed.Line;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Line_ESTest extends Line_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Vector3D vector3D0 = Vector3D.NaN;
Line line0 = new Line(vector3D0, vector3D0);
Vector3D vector3D1 = line0.pointAt(1.0E-10);
Vector1D vector1D0 = line0.toSubSpace(vector3D1);
line0.pointAt(1.0E-10);
Vector3D vector3D2 = line0.getDirection();
Vector3D vector3D3 = line0.toSpace(vector1D0);
Line line1 = new Line(vector3D3, vector3D2);
line0.intersection(line1);
// Undeclared exception!
line0.toSubSpace((Vector<Euclidean3D>) null);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d0d1dab3b86fd9f4d20de542292f647dfe94bea1
|
11564fab35d9337f2f7142d870854f1de0847bf3
|
/src/me/daddychurchill/CityWorld/Plats/Nature/MountainTentLot.java
|
56ca5b3f588e85bc369c0070f4f416381dac9704
|
[] |
no_license
|
peter-lawrey/CityWorld
|
ecc3e21ccbc5ede4a78d345a1464fb14e34dcbfe
|
5dbab901f5195a91e08a539ffb643cd256eb2421
|
refs/heads/master
| 2021-01-15T23:35:14.873004
| 2016-01-29T20:19:18
| 2016-01-29T20:19:18
| 50,149,004
| 0
| 0
| null | 2016-01-22T01:28:18
| 2016-01-22T01:28:18
| null |
UTF-8
|
Java
| false
| false
| 1,394
|
java
|
package me.daddychurchill.CityWorld.Plats.Nature;
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
import me.daddychurchill.CityWorld.CityWorldGenerator;
import me.daddychurchill.CityWorld.Context.DataContext;
import me.daddychurchill.CityWorld.Plats.PlatLot;
import me.daddychurchill.CityWorld.Support.InitialBlocks;
import me.daddychurchill.CityWorld.Support.PlatMap;
import me.daddychurchill.CityWorld.Support.RealBlocks;
public class MountainTentLot extends MountainFlatLot {
public MountainTentLot(PlatMap platmap, int chunkX, int chunkZ) {
super(platmap, chunkX, chunkZ);
}
@Override
public PlatLot newLike(PlatMap platmap, int chunkX, int chunkZ) {
return new MountainTentLot(platmap, chunkX, chunkZ);
}
@Override
protected void generateActualChunk(CityWorldGenerator generator,
PlatMap platmap, InitialBlocks chunk, BiomeGrid biomes,
DataContext context, int platX, int platZ) {
generateSmoothedLot(generator, chunk, context);
}
@Override
protected void generateActualBlocks(CityWorldGenerator generator, PlatMap platmap, RealBlocks chunk, DataContext context, int platX, int platZ) {
reportLocation(generator, "Campground", chunk);
// place snow
generateSurface(generator, chunk, false);
// now make a tent
generator.structureProvider.generateCampground(generator, chunk, context, chunkOdds,
blockYs.averageHeight + 1);
}
}
|
[
"eddie@virtualchurchill.com"
] |
eddie@virtualchurchill.com
|
3d08170b3be50464b57733e977f6447699f55f49
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_cfafd52234527259ad78a7cdfa5478251b0be699/AllTests/5_cfafd52234527259ad78a7cdfa5478251b0be699_AllTests_s.java
|
2213a2779e763750281d233b0e56bc6bd168f2e0
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,282
|
java
|
/*******************************************************************************
* Copyright (c) 2004 - 2006 University Of British Columbia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* University Of British Columbia - initial API and implementation
*******************************************************************************/
package org.eclipse.mylar.tests;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.mylar.bugzilla.tests.AllBugzillaTests;
import org.eclipse.mylar.context.core.MylarStatusHandler;
import org.eclipse.mylar.core.core.tests.AllCoreTests;
import org.eclipse.mylar.ide.tests.AllIdeTests;
import org.eclipse.mylar.java.tests.AllJavaTests;
import org.eclipse.mylar.monitor.reports.tests.AllMonitorReportTests;
import org.eclipse.mylar.monitor.tests.AllMonitorTests;
import org.eclipse.mylar.resources.MylarResourcesPlugin;
import org.eclipse.mylar.tasks.tests.AllTaskListTests;
import org.eclipse.mylar.tests.integration.AllIntegrationTests;
import org.eclipse.mylar.tests.misc.AllMiscTests;
import org.eclipse.mylar.tests.xml.AllXmlTests;
/**
* @author Mik Kersten
*/
public class AllTests {
public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests");
MylarStatusHandler.setStatusNotifier(new TestingStatusNotifier());
MylarResourcesPlugin.getDefault().setResourceMonitoringEnabled(false);
// TODO: the order of these tests might still matter, but shouldn't
// $JUnit-BEGIN$
suite.addTest(AllMonitorReportTests.suite());
suite.addTest(AllMonitorTests.suite());
suite.addTest(AllIntegrationTests.suite());
suite.addTest(AllCoreTests.suite());
suite.addTest(AllIdeTests.suite());
suite.addTest(AllJavaTests.suite());
suite.addTest(AllTaskListTests.suite());
suite.addTest(AllXmlTests.suite());
suite.addTest(AllBugzillaTests.suite());
suite.addTest(AllMiscTests.suite());
// suite.addTest(AllJiraTests.suite());
// $JUnit-END$
return suite;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
2ae99ad40ce669a146cf9e5b0d9f9cd0d5e8c085
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes5.dex_source_from_JADX/com/facebook/graphql/model/GraphQLFriendsLocationsFeedUnit__JsonHelper.java
|
813fb2e351fc54cfd008b84c1b619b3d265ef45e
|
[] |
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
| 143
|
java
|
package com.facebook.graphql.model;
/* compiled from: has_boosted_posts */
public final class GraphQLFriendsLocationsFeedUnit__JsonHelper {
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
9243843edb1fc38bda28622e4fb38744c16bccd1
|
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
|
/bin/ext-commerce/basecommerce/testsrc/de/hybris/platform/externaltax/ProductTaxCodeServiceTest.java
|
6963b14f5e9da7f8c9998892559b0ba15b1e42cb
|
[] |
no_license
|
lun130220/hybris
|
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
|
03c074ea76779f96f2db7efcdaa0b0538d1ce917
|
refs/heads/master
| 2021-05-14T01:48:42.351698
| 2018-01-07T07:21:53
| 2018-01-07T07:21:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,226
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.externaltax;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import de.hybris.bootstrap.annotations.IntegrationTest;
import de.hybris.platform.basecommerce.model.externaltax.ProductTaxCodeModel;
import de.hybris.platform.servicelayer.ServicelayerBaseTest;
import de.hybris.platform.servicelayer.model.ModelService;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import org.junit.Before;
import org.junit.Test;
/**
* Black box test for {@link ProductTaxCodeService}.
*/
@IntegrationTest
public class ProductTaxCodeServiceTest extends ServicelayerBaseTest
{
@Resource
ProductTaxCodeService productTaxCodeService;
@Resource
ModelService modelService;
private final static String[][] TEST_DATA =
{
{ "P-01", "C-A", "TC-01" },
{ "P-01", "C-B", "TC-02" },
{ "P-01", "C-C", "TC-03" },
{ "P-02", "C-A", "TC-01" },
{ "P-02", "C-C", "TC-04" },
{ "P-03", "C-A", "TC-05" },
{ "P-03", "C-B", "TC-02" } };
@Before
public void setUp()
{
for (final String[] record : TEST_DATA)
{
final ProductTaxCodeModel taxCode = modelService.create(ProductTaxCodeModel.class);
taxCode.setProductCode(record[0]);
taxCode.setTaxArea(record[1]);
taxCode.setTaxCode(record[2]);
}
modelService.saveAll();
}
@Test
public void testDirectLookups()
{
assertNull(productTaxCodeService.lookupTaxCode("foo", "bar"));
assertNull(productTaxCodeService.lookupTaxCode("P-01", "foo"));
assertNull(productTaxCodeService.lookupTaxCode("foo", "C-A"));
// test existing values direct lookup
for (final String[] record : TEST_DATA)
{
final String productCode = record[0];
final String countryCode = record[1];
final String taxCode = record[2];
assertEquals(taxCode, productTaxCodeService.lookupTaxCode(productCode, countryCode));
}
// test existing values bulk lookup
for (final Map.Entry<String, Map<String, String>> e : createBulkLookupMap().entrySet())
{
final String countryCode = e.getKey();
final Collection<String> productCodes = e.getValue().keySet();
final Map<String, String> expectedResult = e.getValue();
assertEquals(expectedResult, productTaxCodeService.lookupTaxCodes(productCodes, countryCode));
}
// test no-result bulk lookup
assertEquals(Collections.EMPTY_MAP,
productTaxCodeService.lookupTaxCodes(Arrays.asList(TEST_DATA[0][0], TEST_DATA[1][0], TEST_DATA[2][0]), "foo"));
// test empty bulk lookup
assertEquals(Collections.EMPTY_MAP, productTaxCodeService.lookupTaxCodes(Collections.EMPTY_LIST, "foo"));
}
@Test
public void testModelLookup()
{
assertNull(productTaxCodeService.getTaxCodeForProductAndArea("foo", "bar"));
assertNull(productTaxCodeService.getTaxCodeForProductAndArea("P-01", "foo"));
assertNull(productTaxCodeService.getTaxCodeForProductAndArea("foo", "C-A"));
// test existing values direct lookup
for (final String[] record : TEST_DATA)
{
final String productCode = record[0];
final String countryCode = record[1];
final String taxCode = record[2];
final ProductTaxCodeModel model = productTaxCodeService.getTaxCodeForProductAndArea(productCode, countryCode);
assertNotNull(model);
assertEquals(productCode, model.getProductCode());
assertEquals(countryCode, model.getTaxArea());
assertEquals(taxCode, model.getTaxCode());
}
assertEquals(Collections.EMPTY_LIST, productTaxCodeService.getTaxCodesForProduct("foo"));
final Map<String, String> dataForProduct = new HashMap<String, String>();
dataForProduct.put(TEST_DATA[0][1], TEST_DATA[0][2]);
dataForProduct.put(TEST_DATA[1][1], TEST_DATA[1][2]);
dataForProduct.put(TEST_DATA[2][1], TEST_DATA[2][2]);
assertEquals(dataForProduct, getCountryCodeMap(productTaxCodeService.getTaxCodesForProduct(TEST_DATA[0][0])));
}
Map<String, String> getCountryCodeMap(final Collection<ProductTaxCodeModel> taxCodes)
{
final Map<String, String> data = new HashMap<String, String>();
for (final ProductTaxCodeModel m : taxCodes)
{
data.put(m.getTaxArea(), m.getTaxCode());
}
return data;
}
private Map<String, Map<String, String>> createBulkLookupMap()
{
final Map<String, Map<String, String>> bulkLookupData = new HashMap<String, Map<String, String>>();
for (final String[] record : TEST_DATA)
{
final String productCode = record[0];
final String countryCode = record[1];
final String taxCode = record[2];
Map<String, String> countryMap = bulkLookupData.get(countryCode);
if (countryMap == null)
{
countryMap = new HashMap<String, String>();
bulkLookupData.put(countryCode, countryMap);
}
countryMap.put(productCode, taxCode);
}
return bulkLookupData;
}
}
|
[
"lun130220@gamil.com"
] |
lun130220@gamil.com
|
54fe7b999e7718ed90e063020ab76c5a872f7c85
|
baee3ef7cc98badf8a87e9f74ddd1a6d70b096b0
|
/.ahmed-aly/src/WarmUPLvl1nro3/SummingDigits.java
|
cad827242d7fa87f4174e630b232c9379981b6b4
|
[] |
no_license
|
groverinho/Java
|
eb4863737888d552ac313e23f0e7e2fd2dc45aa7
|
0b0c612eb03cf27b8310448bcf72da4565be0af6
|
refs/heads/master
| 2021-12-25T11:32:46.222179
| 2021-09-10T22:48:14
| 2021-09-10T22:48:14
| 47,481,887
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 548
|
java
|
package WarmUPLvl1nro3;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class SummingDigits {
public static void main(String[] args) throws NumberFormatException, IOException
{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int aux;
int n=0;
while (true)
{
n = Integer.parseInt(in.readLine());
if (n == 0)
break;
else if(n%9==0)
aux=9;
else
aux=n%9;
System.out.println(aux);
}
}
}
|
[
"grover_ariel@hotmail.com"
] |
grover_ariel@hotmail.com
|
685d1d718ad31ef04470ea71245fd1eca45402af
|
5588afd239d2aca09149c38cbb7f93b848e1bcdd
|
/entity-view/testsuite/src/test/java/com/blazebit/persistence/view/testsuite/proxy/model/UpdatableEmbeddableTestEntityView.java
|
92c364ae070c1a13452043bcc65157acdfd03ecd
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
philippEder/blaze-persistence
|
c16b07ab006d0810a6529b962588b316a958580f
|
16c2d9f85b09cb6adbc3e68e74ea2758f984c8d0
|
refs/heads/master
| 2020-12-20T00:41:33.178315
| 2020-01-20T06:02:27
| 2020-01-20T12:04:13
| 235,902,203
| 0
| 0
| null | 2020-01-23T22:50:04
| 2020-01-23T22:50:03
| null |
UTF-8
|
Java
| false
| false
| 3,460
|
java
|
/*
* Copyright 2014 - 2020 Blazebit.
*
* 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.blazebit.persistence.view.testsuite.proxy.model;
import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntity;
import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntityEmbeddable;
import com.blazebit.persistence.view.CreatableEntityView;
import com.blazebit.persistence.view.EntityView;
import com.blazebit.persistence.view.EntityViewManager;
import com.blazebit.persistence.view.Mapping;
import com.blazebit.persistence.view.PostCreate;
import com.blazebit.persistence.view.UpdatableEntityView;
import com.blazebit.persistence.view.testsuite.basic.model.IntIdEntityView;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
*
* @author Christian Beikov
* @since 1.2.0
*/
@CreatableEntityView
@UpdatableEntityView
@EntityView(EmbeddableTestEntity.class)
public abstract class UpdatableEmbeddableTestEntityView extends EmbeddableTestEntityView {
@PostCreate
void postCreate(EntityViewManager evm) {
getEmbeddable().getElementCollection().put("test", evm.create(UpdatableNameObjectView.class));
}
public abstract EmbeddableTestEntityEmbeddableView getEmbeddable();
public abstract void setEmbeddable(EmbeddableTestEntityEmbeddableView embeddable);
@Mapping("embeddable")
public abstract ReadOnlyEmbeddableTestEntityEmbeddableView getMyEmbeddable();
public abstract List<NameObjectView> getElementCollection4();
@EntityView(EmbeddableTestEntityEmbeddable.class)
public static interface ReadOnlyEmbeddableTestEntityEmbeddableView {
public EmbeddableTestEntityView getManyToOne();
public Set<EmbeddableTestEntityView> getOneToMany();
public Map<String, ? extends NameObjectView> getElementCollection();
public Map<String, IntIdEntityView> getManyToMany();
public EmbeddableTestEntityNestedEmbeddableView getNestedEmbeddable();
}
@UpdatableEntityView
@EntityView(EmbeddableTestEntityEmbeddable.class)
public static interface EmbeddableTestEntityEmbeddableView extends ReadOnlyEmbeddableTestEntityEmbeddableView {
public EmbeddableTestEntityView getManyToOne();
public void setManyToOne(EmbeddableTestEntityView manyToOne);
public Set<EmbeddableTestEntityView> getOneToMany();
public void setOneToMany(Set<EmbeddableTestEntityView> oneToMany);
public Map<String, UpdatableNameObjectView> getElementCollection();
public void setElementCollection(Map<String, UpdatableNameObjectView> elementCollection);
public Map<String, IntIdEntityView> getManyToMany();
public void setManyToMany(Map<String, IntIdEntityView> manyToMany);
public UpdatableEmbeddableTestEntityNestedEmbeddableView getNestedEmbeddable();
public void setNestedEmbeddable(UpdatableEmbeddableTestEntityNestedEmbeddableView nestedEmbeddable);
}
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
732f9de320ffc2534ed9fb57f273ad40c65c2784
|
7db218ca0666c8cd6f39ada8b43ec09b0841d911
|
/lab7-four/src/main/java/br/edu/univas/si7/lab7/model/SimpleHintService.java
|
0ffc160e5ba1ce663b255a2662aa0be885953cf2
|
[] |
no_license
|
univas/2020-topicos_avancados
|
881fd2291682509a364d7295417b43939a693aa4
|
44d56d33d6d88dfb02f6792e5ac305fa2d5ec478
|
refs/heads/master
| 2022-12-24T18:34:24.613283
| 2021-05-14T13:08:40
| 2021-05-14T13:08:40
| 240,385,777
| 0
| 0
| null | 2022-12-16T15:38:34
| 2020-02-13T23:08:57
|
Java
|
UTF-8
|
Java
| false
| false
| 154
|
java
|
package br.edu.univas.si7.lab7.model;
public class SimpleHintService implements HintService {
public String getHint() {
return "Study hard!!!";
}
}
|
[
"rrocha.roberto@gmail.com"
] |
rrocha.roberto@gmail.com
|
93ee4345df61e7fd77b94233ce66929e289eac85
|
a1b80a8b99dc9dda23690382a27043fa7c38ee04
|
/src/main/java/de/fraunhofer/iais/eis/GeoPoint.java
|
70763d8b1ef50e3fa2e903866684f29b41151619
|
[] |
no_license
|
ashokkumarta/infomodel
|
35cbf78847f835f9cc16fa37949ef8bd81a16078
|
475c1d8c081024e439763e9044785ade427831a9
|
refs/heads/main
| 2023-06-24T14:21:10.937026
| 2021-07-17T09:17:54
| 2021-07-17T09:17:54
| 386,892,021
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,382
|
java
|
package de.fraunhofer.iais.eis;
import de.fraunhofer.iais.eis.util.*;
import de.fraunhofer.iais.eis.*;
import javax.xml.datatype.XMLGregorianCalendar;
import java.lang.String;
import java.math.BigInteger;
import java.net.URL;
import java.net.URI;
import java.util.*;
import javax.validation.constraints.*;
import java.util.Arrays;
import java.io.Serializable;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.*;
/**
"GeoPoint"@en
"A location identified by geo coordinates."@en*/
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, property="@type")
@JsonSubTypes({
@JsonSubTypes.Type(value = GeoPointImpl.class),})
public interface GeoPoint extends Location {
// standard methods
@JsonProperty("@id")
@javax.validation.constraints.NotNull URI getId();
java.util.List<TypedLiteral> getLabel();
java.util.List<TypedLiteral> getComment();
String toRdf();
// getter and setter for generic property map
public java.util.Map<String,Object> getProperties();
public void setProperty(String property, Object value);
// accessor methods as derived from information model
/**
"latitude"@en
"Latitude of a GeoPoint (decimal degrees)."@en
*/
@NotNull
@JsonProperty("ids:latitude")
float getLatitude();
/**
"longitude"@en
"Longitude of a GeoPoint (decimal degrees)."@en
*/
@NotNull
@JsonProperty("ids:longitude")
float getLongitude();
}
|
[
"ashokkumar.ta@gmail.com"
] |
ashokkumar.ta@gmail.com
|
3948c51603e93cbc391f36026c64ffd07619584e
|
92ede9112af9e51a3f77b7cb2ed330f1c7ca7b16
|
/src/main/java/simple/BreakLabel.java
|
89605d77fcf919ce728064a1f7fd2ce808d7c7e2
|
[] |
no_license
|
chenyichao-github/second
|
ec50633ffe0f5f3738b5b5de561ff7c4c78541e0
|
06af576dc93ae7767af591c02ce33422f0da8f29
|
refs/heads/master
| 2023-02-06T00:43:47.256173
| 2020-12-24T09:25:26
| 2020-12-24T09:25:26
| 321,060,594
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 352
|
java
|
package simple;
public class BreakLabel {
public static void main(String[] args) {
outer:
for (var i = 0; i < 5; i++) {
for (var j = 0; j < 3; j++) {
System.out.println("i的值为:" + i + " j的值为:" + j);
if (j == 1)
break outer;
}
}
}
}
|
[
"264181908@qq.com"
] |
264181908@qq.com
|
48785c1313b7c7e4fe01ae10008bf91547a2ee3e
|
e682fa3667adce9277ecdedb40d4d01a785b3912
|
/internal/fischer/mangf/A118149.java
|
c840b3adfa9c0f5ec26da82a29bcdf18be418a66
|
[
"Apache-2.0"
] |
permissive
|
gfis/joeis-lite
|
859158cb8fc3608febf39ba71ab5e72360b32cb4
|
7185a0b62d54735dc3d43d8fb5be677734f99101
|
refs/heads/master
| 2023-08-31T00:23:51.216295
| 2023-08-29T21:11:31
| 2023-08-29T21:11:31
| 179,938,034
| 4
| 1
|
Apache-2.0
| 2022-06-25T22:47:19
| 2019-04-07T08:35:01
|
Roff
|
UTF-8
|
Java
| false
| false
| 398
|
java
|
package irvine.oeis.a118;
// Generated by gen_seq4.pl radd3 at 2023-06-21 16:34
import irvine.math.z.Z;
import irvine.oeis.base.RaddSequence;
/**
* A118149 Start with 1 and repeatedly reverse the digits and add 52 to get the next term.
* @author Georg Fischer
*/
public class A118149 extends RaddSequence {
/** Construct the sequence. */
public A118149() {
super(1, 10, 1, 52);
}
}
|
[
"dr.Georg.Fischer@gmail.com"
] |
dr.Georg.Fischer@gmail.com
|
9185f8ef73a429a40dae20479f553968d3d910c9
|
c5923ae6261c91540f1fa560074c851c89b161ca
|
/cloud_system/system/src/main/java/com/cxc/system/config/Mybatis.java
|
df95c750fc94576aaa0465349fdf49031f0c027e
|
[] |
no_license
|
soldiers1989/wusc-cloud
|
cec06862e556748e200b68005249c7c39f7fcd15
|
297a922b630925de465bb38e49d742706f7cc3b4
|
refs/heads/master
| 2020-03-29T01:37:41.090904
| 2017-12-05T02:53:46
| 2017-12-05T02:53:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,260
|
java
|
package com.cxc.system.config;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.mapper.MapperFactoryBean;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import javax.sql.DataSource;
import java.io.IOException;
@Configuration
@MapperScan(value="com.cxc.system.mapper", factoryBean=MapperFactoryBean.class)
@EnableAutoConfiguration
public class Mybatis {
@Bean(name="sqlSessionFactory")
public SqlSessionFactoryBean sqlSessionFactoryBean(DataSource dataSource) throws IOException {
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
sqlSessionFactoryBean.setDataSource(dataSource);
sqlSessionFactoryBean.setConfigLocation(new ClassPathResource("mybatis-config.xml"));
sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath*:mybatis/*Mapper.xml"));
return sqlSessionFactoryBean;
}
}
|
[
"1033429246@qq.com"
] |
1033429246@qq.com
|
b84e03c907d9b7d255cb96cca7195169009924ac
|
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
|
/src/com/inponsel/android/v2/PlaystoreKategoriKomen$9$1.java
|
fabce3e8bae5a21ad98fe56b1da3ba6d897a31e7
|
[] |
no_license
|
alexivaner/GadgetX-Android-App
|
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
|
26c5866be12da7b89447814c05708636483bf366
|
refs/heads/master
| 2022-06-01T09:04:32.347786
| 2020-04-30T17:43:17
| 2020-04-30T17:43:17
| 260,275,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,674
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.inponsel.android.v2;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import com.inponsel.android.utils.Log;
import com.squareup.picasso.Callback;
import java.util.ArrayList;
// Referenced classes of package com.inponsel.android.v2:
// PlaystoreKategoriKomen, ImagePagerActivity
class val.img_media
implements android.view.iKomen._cls9._cls1
{
final tActivity this$1;
private final String val$img_media;
public void onClick(View view)
{
view = new ArrayList();
Object obj = val$img_media;
obj = ((String) (obj)).substring(((String) (obj)).lastIndexOf("=") + 1);
Log.e("img_real", ((String) (obj)));
view.add(((String) (obj)).toString().trim());
view = (String[])view.toArray(new String[view.size()]);
obj = new Intent(getApplicationContext(), com/inponsel/android/v2/ImagePagerActivity);
((Intent) (obj)).putExtra("imgUrl", view);
((Intent) (obj)).putExtra("pos", 0);
startActivity(((Intent) (obj)));
}
l.img_media()
{
this$1 = final_img_media1;
val$img_media = String.this;
super();
}
// Unreferenced inner class com/inponsel/android/v2/PlaystoreKategoriKomen$9
/* anonymous class */
class PlaystoreKategoriKomen._cls9
implements Callback
{
final PlaystoreKategoriKomen this$0;
private final ImageView val$imgKomentar;
private final String val$img_media;
private final RelativeLayout val$ll_img_komen;
private final ProgressBar val$progressbar_imgkomen;
public void onError()
{
Log.e("ll_img_komen", "onError");
progressbar_imgkomen.setVisibility(8);
}
public void onSuccess()
{
Log.e("ll_img_komen", "onSuccess");
progressbar_imgkomen.setVisibility(8);
imgKomentar.setVisibility(0);
ll_img_komen.setClickable(false);
imgKomentar.setOnClickListener(img_media. new PlaystoreKategoriKomen._cls9._cls1());
}
{
this$0 = final_playstorekategorikomen;
progressbar_imgkomen = progressbar;
imgKomentar = imageview;
ll_img_komen = relativelayout;
img_media = String.this;
super();
}
}
}
|
[
"hutomoivan@gmail.com"
] |
hutomoivan@gmail.com
|
1b216e48a881fc76027b3556ec6177cd270e92ec
|
52f64eb80a8e9c2dffaeb5b9aa61c00b9ff201fc
|
/src/main/java/urn/ietf/params/xml/ns/yang/nfvo/mano/types/rev150423/HttpMethod.java
|
b8b615a1e509ae2a75f2a87d1ff9233bd39cbfbd
|
[
"Apache-2.0"
] |
permissive
|
ctranoris/eu.5ginFIRE.riftioyangschema2java
|
a96576ec37510833aca0942326e36ec97ce7408c
|
46a0fe252fc72551dc52f1e23b115907fceb49fe
|
refs/heads/master
| 2021-01-19T17:38:25.342146
| 2018-03-01T16:29:11
| 2018-03-01T16:29:11
| 101,077,357
| 0
| 1
|
Apache-2.0
| 2018-03-01T16:29:11
| 2017-08-22T15:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,464
|
java
|
package urn.ietf.params.xml.ns.yang.nfvo.mano.types.rev150423;
public enum HttpMethod {
POST(0, "POST"),
PUT(1, "PUT"),
GET(2, "GET"),
DELETE(3, "DELETE"),
OPTIONS(4, "OPTIONS"),
PATCH(5, "PATCH")
;
private static final java.util.Map<java.lang.Integer, HttpMethod> VALUE_MAP;
static {
final com.google.common.collect.ImmutableMap.Builder<java.lang.Integer, HttpMethod> b = com.google.common.collect.ImmutableMap.builder();
for (HttpMethod enumItem : HttpMethod.values()) {
b.put(enumItem.value, enumItem);
}
VALUE_MAP = b.build();
}
private final java.lang.String name;
private final int value;
private HttpMethod(int value, java.lang.String name) {
this.value = value;
this.name = name;
}
/**
* Returns the name of the enumeration item as it is specified in the input yang.
*
* @return the name of the enumeration item as it is specified in the input yang
*/
public java.lang.String getName() {
return name;
}
/**
* @return integer value
*/
public int getIntValue() {
return value;
}
/**
* @param valueArg integer value
* @return corresponding HttpMethod item
*/
public static HttpMethod forValue(int valueArg) {
return VALUE_MAP.get(valueArg);
}
}
|
[
"tranoris@gmail.com"
] |
tranoris@gmail.com
|
5999723f9f1ce42027f488aca025e235cb8cec32
|
22acd46729d139034dcfd9ad9a8e5be66afe59b2
|
/src/main/java/com/nilo/wms/web/flux/ConfirmASNDataController.java
|
ceab0f4d015c82457eea7a5db2c13f1dfc3c88ab
|
[] |
no_license
|
biubiubiu255/nilo-wms-i
|
3b6b5ec77ceab37843583add7fd91ac55b65261d
|
b1952fae9a1ba0151662f926b20e905db1d24e38
|
refs/heads/master
| 2020-03-18T20:43:22.734928
| 2018-05-29T02:48:04
| 2018-05-29T02:48:04
| 135,234,067
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,866
|
java
|
/**
* KILIMALL.com Inc.
* Copyright (c) 2015-2016 All Rights Reserved.
*/
package com.nilo.wms.web.flux;
import com.nilo.wms.common.util.XmlUtil;
import com.nilo.wms.dto.inbound.InboundHeader;
import com.nilo.wms.dto.inbound.InboundItem;
import com.nilo.wms.service.InboundService;
import com.nilo.wms.web.BaseController;
import com.nilo.wms.web.model.NotifyOrder;
import com.nilo.wms.web.model.NotifyOrderItem;
import com.nilo.wms.web.model.WMSOrderNotify;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
@Controller
public class ConfirmASNDataController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private InboundService inboundService;
@RequestMapping(value = "/confirmASNData.html", method = {RequestMethod.POST}, produces = "text/html;charset=UTF-8")
@ResponseBody
public String confirmASNData(String data) {
data = URLDecoder.decode(data);
if (logger.isDebugEnabled()) {
logger.debug("Request confirmASNData.html -data:{}", data);
}
data = removeXmlDataElement(data, "xmldata");
inboundService.confirmASN(buildASNInfo(data));
return xmlSuccessReturn();
}
@RequestMapping(value = "/confirmTRASNData.html", method = {RequestMethod.POST}, produces = "text/html;charset=UTF-8")
@ResponseBody
public String confirmTRASNData(String data) {
data = URLDecoder.decode(data);
if (logger.isDebugEnabled()) {
logger.debug("Request confirmTRASNData.html -data:{}", data);
}
data = removeXmlDataElement(data, "xmldata");
inboundService.confirmASN(buildASNInfo(data));
return xmlSuccessReturn();
}
private List<InboundHeader> buildASNInfo(String data) {
WMSOrderNotify notify = XmlUtil.XMLToBean(data, WMSOrderNotify.class);
List<InboundHeader> list = new ArrayList<>();
for (NotifyOrder n : notify.getList()) {
InboundHeader asn = new InboundHeader();
asn.setReferenceNo(n.getOrderNo());
List<InboundItem> itemList = new ArrayList<>();
for (NotifyOrderItem i : n.getItem()) {
InboundItem item = new InboundItem();
item.setSku(i.getSku());
item.setQty(i.getQty());
itemList.add(item);
}
asn.setItemList(itemList);
list.add(asn);
}
return list;
}
}
|
[
"111"
] |
111
|
4a84f21c06f17f244b14e8c8c1593026393c6e9f
|
478106dd8b16402cc17cc39b8d65f6cd4e445042
|
/l2junity-gameserver/src/main/java/org/l2junity/gameserver/network/client/send/JoinParty.java
|
c8af2ba13126dad6658c3088e3020ef6a106c6d6
|
[] |
no_license
|
czekay22/L2JUnderGround
|
9f014cf87ddc10d7db97a2810cc5e49d74e26cdf
|
1597b28eab6ec4babbf333c11f6abbc1518b6393
|
refs/heads/master
| 2020-12-30T16:58:50.979574
| 2018-09-28T13:38:02
| 2018-09-28T13:38:02
| 91,043,466
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,242
|
java
|
/*
* Copyright (C) 2004-2015 L2J Unity
*
* This file is part of L2J Unity.
*
* L2J Unity 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.
*
* L2J Unity 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.l2junity.gameserver.network.client.send;
import org.l2junity.gameserver.network.client.OutgoingPackets;
import org.l2junity.network.PacketWriter;
public final class JoinParty implements IClientOutgoingPacket
{
private final int _response;
public JoinParty(int response)
{
_response = response;
}
@Override
public boolean write(PacketWriter packet)
{
OutgoingPackets.JOIN_PARTY.writeId(packet);
packet.writeD(_response);
packet.writeD(0x00); // TODO: Find me!
return true;
}
}
|
[
"unafraid89@gmail.com"
] |
unafraid89@gmail.com
|
6a757d2f1070283d276b424cd7af122423971dcd
|
cffd4e2afaede5fcf0ff647b4e55a00493e711ed
|
/IJ_Mobile/src/net/imglib2/labeling/NativeImgLabeling.java
|
49c0bd3d504124caaf16fb1fb491dd4201e9a19d
|
[] |
no_license
|
donaldlee2008/FURI_Code
|
f3d96d2037768f3e2b7cd4b3547db96e08fa6e44
|
5e1261c9bffb1ef49a60b4e8e2de6cf811df0dea
|
refs/heads/master
| 2021-01-13T12:38:07.839866
| 2013-04-25T17:18:34
| 2013-04-25T17:18:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,252
|
java
|
package net.imglib2.labeling;
/*
* #%L
* ImgLib2: a general-purpose, multidimensional image processing library.
* %%
* Copyright (C) 2009 - 2012 Stephan Preibisch, Stephan Saalfeld, Tobias
* Pietzsch, Albert Cardona, Barry DeZonia, Curtis Rueden, Lee Kamentsky, Larry
* Lindsey, Johannes Schindelin, Christian Dietz, Grant Harris, Jean-Yves
* Tinevez, Steffen Jaensch, Mark Longair, Nick Perry, and Jan Funke.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of any organization.
* #L%
*/
import java.util.Iterator;
import net.imglib2.Cursor;
import net.imglib2.Interval;
import net.imglib2.IterableRealInterval;
import net.imglib2.RandomAccess;
import net.imglib2.converter.Converter;
import net.imglib2.converter.read.ConvertedCursor;
import net.imglib2.converter.read.ConvertedRandomAccess;
import net.imglib2.img.Img;
import net.imglib2.type.numeric.IntegerType;
/**
* A labeling backed by a native image that takes a labeling type backed by an
* int array.
*
* @param <T>
* the type of labels assigned to pixels
*
* @author Lee Kamentsky, Christian Dietz, Martin Horn
*/
public class NativeImgLabeling< T extends Comparable< T >, I extends IntegerType< I >> extends AbstractNativeLabeling< T >
{
protected final long[] generation;
protected final Img< I > img;
public NativeImgLabeling( final Img< I > img )
{
super( dimensions( img ), new DefaultROIStrategyFactory< T >(), new LabelingMapping< T >( img.firstElement().createVariable() ) );
this.img = img;
this.generation = new long[ 1 ];
}
private static long[] dimensions( final Interval i )
{
final long[] dims = new long[ i.numDimensions() ];
i.dimensions( dims );
return dims;
}
/**
* Create a labeling backed by a native image with custom strategy and image
* factory
*
* @param dim
* - dimensions of the labeling
* @param strategyFactory
* - the strategy factory that drives iteration and statistics
* @param imgFactory
* - the image factory to generate the native image
*/
public NativeImgLabeling( final LabelingROIStrategyFactory< T > strategyFactory, final Img< I > img )
{
super( dimensions( img ), strategyFactory, new LabelingMapping< T >( img.firstElement().createVariable() ) );
this.img = img;
this.generation = new long[ 1 ];
}
@Override
public RandomAccess< LabelingType< T >> randomAccess()
{
final RandomAccess< I > rndAccess = img.randomAccess();
return new ConvertedRandomAccess< I, LabelingType< T >>( rndAccess, new LabelingTypeConverter(), new LabelingType< T >( rndAccess.get(), mapping, generation ) );
}
/*
* (non-Javadoc)
*
* @see
* net.imglib2.labeling.AbstractNativeLabeling#setLinkedType(net.imglib2
* .labeling.LabelingType)
*/
@Override
public Cursor< LabelingType< T >> cursor()
{
Cursor< I > c = img.cursor();
return new ConvertedCursor< I, LabelingType< T >>( c, new LabelingTypeConverter(), new LabelingType< T >( c.get(), mapping, generation ) );
}
@Override
public Cursor< LabelingType< T >> localizingCursor()
{
Cursor< I > c = img.localizingCursor();
return new ConvertedCursor< I, LabelingType< T >>( c, new LabelingTypeConverter(), new LabelingType< T >( c.get(), mapping, generation ) );
}
public Img< I > getStorageImg()
{
return img;
}
@Override
public Labeling< T > copy()
{
final NativeImgLabeling< T, I > result = new NativeImgLabeling< T, I >( img.factory().create( img, img.firstElement().createVariable() ) );
final Cursor< LabelingType< T >> srcCursor = cursor();
final Cursor< LabelingType< T >> resCursor = result.cursor();
while ( srcCursor.hasNext() )
{
srcCursor.fwd();
resCursor.fwd();
resCursor.get().set( srcCursor.get() );
}
return result;
}
@Override
public boolean equalIterationOrder( final IterableRealInterval< ? > f )
{
return false;
}
@Override
public LabelingType< T > firstElement()
{
return cursor().next();
}
@Override
public Iterator< LabelingType< T >> iterator()
{
return cursor();
}
@Override
public RandomAccess< LabelingType< T >> randomAccess( final Interval interval )
{
return randomAccess();
}
@Override
public Object iterationOrder()
{
return img.iterationOrder();
}
@Override
public < LL extends Comparable< LL >> LabelingFactory< LL > factory()
{
return new LabelingFactory< LL >()
{
@Override
public Labeling< LL > create( final long[] dim )
{
return new NativeImgLabeling< LL, I >( img.factory().create( dim, img.firstElement().createVariable() ) );
}
};
}
// Empty converter
private class LabelingTypeConverter implements Converter< I, LabelingType< T >>
{
@Override
public void convert( I input, LabelingType< T > output )
{
// Nothing to do here
}
}
}
|
[
"msteptoe@EN4085206.fulton.ad.asu.edu"
] |
msteptoe@EN4085206.fulton.ad.asu.edu
|
ec90b8980ca623cf2679b641a29997fd2dbc44c5
|
ea87e7258602e16675cec3e29dd8bb102d7f90f8
|
/fest-swing/src/test/java/org/fest/swing/driver/JInternalFrameDriver_close_Test.java
|
6e04ea4723f7d8e6f7207f4d2672af6afdb284cf
|
[
"Apache-2.0"
] |
permissive
|
codehaus/fest
|
501714cb0e6f44aa1b567df57e4f9f6586311862
|
a91c0c0585c2928e255913f1825d65fa03399bc6
|
refs/heads/master
| 2023-07-20T01:30:54.762720
| 2010-09-02T00:56:33
| 2010-09-02T00:56:33
| 36,525,844
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,395
|
java
|
/*
* Created on Feb 24, 2008
*
* 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.
*
* Copyright @2008-2010 the original author or authors.
*/
package org.fest.swing.driver;
import static org.fest.assertions.Assertions.assertThat;
import static org.fest.swing.edt.GuiActionRunner.execute;
import static org.fest.swing.test.core.CommonAssertions.failWhenExpectingException;
import javax.swing.JInternalFrame;
import org.fest.swing.annotation.RunsInEDT;
import org.fest.swing.edt.*;
import org.junit.Test;
/**
* Tests for <code>{@link JInternalFrameDriver#close(javax.swing.JInternalFrame)}</code>.
*
* @author Alex Ruiz
* @author Yvonne Wang
*/
public class JInternalFrameDriver_close_Test extends JInternalFrameDriver_TestCase {
@Test
public void should_close_JInternalFrame() {
showWindow();
driver.close(internalFrame);
assertThat(isClosed(internalFrame)).isTrue();
}
@RunsInEDT
private static boolean isClosed(final JInternalFrame internalFrame) {
return execute(new GuiQuery<Boolean>() {
@Override protected Boolean executeInEDT() {
return internalFrame.isClosed();
}
});
}
@Test
public void should_throw_error_if_JInternalFrame_is_not_closable() {
makeNotCloseable();
showWindow();
try {
driver.close(internalFrame);
failWhenExpectingException();
} catch (IllegalStateException e) {
assertThat(e.getMessage()).contains("The JInternalFrame <")
.contains("> is not closable");
}
}
@RunsInEDT
private void makeNotCloseable() {
setClosable(internalFrame, false);
robot.waitForIdle();
}
@RunsInEDT
private static void setClosable(final JInternalFrame internalFrame, final boolean closeable) {
execute(new GuiTask() {
@Override protected void executeInEDT() {
internalFrame.setClosable(closeable);
}
});
}
}
|
[
"alexruiz@0e018e5f-c563-0410-a877-f7675914c6cc"
] |
alexruiz@0e018e5f-c563-0410-a877-f7675914c6cc
|
01e847f50760418770fe2e2935d566e10832d0e0
|
ebc27101c70c4ccd418df22d5d6b86987ae5ad42
|
/smartmining/src/main/java/com/seater/smartmining/service/impl/ProjectDiggingReportByPlaceServiceImpl.java
|
e1bc6f38c4da3feb24ccba2b7c3af7908637adc8
|
[] |
no_license
|
KanadeSong/webserver
|
f555210a443c8023bfca3fe7cb49f372a3779801
|
b464c21d5eb33108573a2319ffd982473a489752
|
refs/heads/master
| 2022-03-31T03:07:10.023485
| 2019-12-31T09:59:55
| 2019-12-31T09:59:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,277
|
java
|
package com.seater.smartmining.service.impl;
import com.seater.smartmining.dao.ProjectDiggingReportByPlaceDaoI;
import com.seater.smartmining.entity.ProjectDiggingReportByPlace;
import com.seater.smartmining.service.ProjectDiggingReportByPlaceServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import javax.persistence.criteria.CriteriaBuilder;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Description:
* @Author yueyuzhe
* @Email 87167070@qq.com
* @Date 2019/8/19 0019 11:27
*/
@Service
public class ProjectDiggingReportByPlaceServiceImpl implements ProjectDiggingReportByPlaceServiceI {
@Autowired
private ProjectDiggingReportByPlaceDaoI projectDiggingReportByPlaceDaoI;
@Override
public ProjectDiggingReportByPlace get(Long id) throws IOException {
return projectDiggingReportByPlaceDaoI.get(id);
}
@Override
public ProjectDiggingReportByPlace save(ProjectDiggingReportByPlace log) throws IOException {
return projectDiggingReportByPlaceDaoI.save(log);
}
@Override
public void delete(Long id) {
projectDiggingReportByPlaceDaoI.delete(id);
}
@Override
public void delete(List<Long> ids) {
projectDiggingReportByPlaceDaoI.delete(ids);
}
@Override
public Page<ProjectDiggingReportByPlace> query() {
return projectDiggingReportByPlaceDaoI.query();
}
@Override
public Page<ProjectDiggingReportByPlace> query(Specification<ProjectDiggingReportByPlace> spec) {
return projectDiggingReportByPlaceDaoI.query(spec);
}
@Override
public Page<ProjectDiggingReportByPlace> query(Pageable pageable) {
return projectDiggingReportByPlaceDaoI.query(pageable);
}
@Override
public Page<ProjectDiggingReportByPlace> query(Specification<ProjectDiggingReportByPlace> spec, Pageable pageable) {
return projectDiggingReportByPlaceDaoI.query(spec, pageable);
}
@Override
public List<ProjectDiggingReportByPlace> getAll() {
return projectDiggingReportByPlaceDaoI.getAll();
}
@Override
public void batchSave(List<ProjectDiggingReportByPlace> placeList) {
projectDiggingReportByPlaceDaoI.batchSave(placeList);
}
@Override
public void deleteByProjectIdAndAndDateIdentification(Long projectId, Date date) {
projectDiggingReportByPlaceDaoI.deleteByProjectIdAndAndDateIdentification(projectId, date);
}
@Override
public List<ProjectDiggingReportByPlace> getAllByProjectIdAndDateIdentification(Long projectId, Date startTime, Date endTime) {
return projectDiggingReportByPlaceDaoI.getAllByProjectIdAndDateIdentification(projectId, startTime, endTime);
}
@Override
public List<ProjectDiggingReportByPlace> getAllByProjectIdAndDateIdentification(Long projectId, Date startTime, Date endTime, String machineCode) {
return projectDiggingReportByPlaceDaoI.getAllByProjectIdAndDateIdentification(projectId, startTime, endTime, machineCode);
}
}
|
[
"545430154@qq.com"
] |
545430154@qq.com
|
654eac704904f41bdb8d11dce6fee72f5b04c90a
|
27c6c3eb61577b6dfecf78e9ffa86e23b7a9de35
|
/scm-server/src/main/java/com/jet/scm/web/common/service/CacheService.java
|
871dac50f26f51ea5f61a736135148a84193476d
|
[] |
no_license
|
123qweqwe123/scm
|
39f7b0cb309e79c8fb8237be8310934efa09eecd
|
9b17a9f0ba4bd949ee2b5e829d7bf06eb4b37597
|
refs/heads/master
| 2020-03-08T13:17:34.277260
| 2018-04-05T03:28:51
| 2018-04-05T03:28:51
| 128,154,265
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 172
|
java
|
package com.jet.scm.web.common.service;
/**
* Description:
* <pre>
* </pre>
* Author: huangrupeng
* Create: 17/5/24 下午2:43
*/
public interface CacheService {
}
|
[
"1074673969@qq.com"
] |
1074673969@qq.com
|
61ad3a3d83597390dad7ef2bbdfdd37ae45c1d27
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_c0a1753d208b292e7bfe9437e8fdf9f039564b35/MORayCountyParserTest/10_c0a1753d208b292e7bfe9437e8fdf9f039564b35_MORayCountyParserTest_s.java
|
4099bfe090282c17cd3f2f68e536a1c055bb04f2
|
[] |
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
| 6,036
|
java
|
package net.anei.cadpage.parsers.MO;
import net.anei.cadpage.parsers.BaseParserTest;
import org.junit.Test;
public class MORayCountyParserTest extends BaseParserTest {
public MORayCountyParserTest() {
setParser(new MORayCountyParser(), "RAY COUNTY", "MO");
}
@Test
public void testParser1() {
doTest("T1",
"RCAD WHFD FALLS 514 ARAPAHOE DR HOMESTEAD VILLAGE CrossStreets: CHEROKEE DR 0.05 mi W HIGHWAY Y 0.16 mi E Description: BETTY JAMES 85 YO FEMALE\nFAL",
"SRC:RCAD WHFD",
"CALL:FALLS",
"ADDR:514 ARAPAHOE DR",
"CITY:HOMESTEAD VILLAGE",
"INFO:BETTY JAMES 85 YO FEMALE FAL",
"X:CHEROKEE DR 0.05 mi W HIGHWAY Y 0.16 mi E");
doTest("T2",
"LFD EMS 31004 NOTTINGHAM LN Description: CrossStreets: SILVEY RD 6443.06 mi NW SILVEY RD 6443.06 mi NW",
"SRC:LFD",
"CALL:EMS",
"ADDR:31004 NOTTINGHAM LN",
"X:SILVEY RD 6443.06 mi NW SILVEY RD 6443.06 mi NW");
doTest("T3",
"WHFD RCAD FALLS 33408 W 160TH ST RAY COUNTY Description: 91 yof\nfell from standing position\nconsious and breathing\ncomplaining of l hip pain\nup in",
"SRC:WHFD RCAD",
"CALL:FALLS",
"ADDR:33408 W 160TH ST",
"INFO:91 yof fell from standing position consious and breathing complaining of l hip pain up in");
doTest("T4",
"WHFD RCAD RCSO DEATH 32534 MAGNOLIA LN RAY COUNTY Description: 61 yo female\n",
"SRC:WHFD RCAD",
"UNIT:RCSO",
"CALL:DEATH",
"ADDR:32534 MAGNOLIA LN",
"INFO:61 yo female");
doTest("T5",
"WHFD RCAD TRAUMATIC INJURIES (SPECIFIC) 2062 E RIDGE DR RAY COUNTY Description: 15 YO MALE\nBICYLCE ACCIDENT\nFELL FROM BIKE\nCONSCIOUS\nBREATHING\nNO S",
"SRC:WHFD RCAD",
"CALL:TRAUMATIC INJURIES (SPECIFIC)",
"ADDR:2062 E RIDGE DR",
"INFO:15 YO MALE BICYLCE ACCIDENT FELL FROM BIKE CONSCIOUS BREATHING NO S");
doTest("T6",
"WHFD RCAD M43 800 ABDOMINAL PAIN 12595 ORRICK RD RAY COUNTY Description: 28 YOLD FEMALE \nCONS AND BREATH \nSEVERE STOMACH PAIN LOWER ABDOMEN \nLUPUS",
"SRC:WHFD RCAD",
"UNIT:M43 800",
"CALL:ABDOMINAL PAIN",
"ADDR:12595 ORRICK RD",
"INFO:28 YOLD FEMALE CONS AND BREATH SEVERE STOMACH PAIN LOWER ABDOMEN LUPUS");
}
@Test
public void testParser2() {
doTest("T1",
"LMED1 LSQ1 L602 SICK PERSON (SPECIFIC DIAGNOSIS) 215 E 5TH ST 3A LAWSON Description: 123254415\nPT IS PATRICIA BIDDIX\nHIGH BP\n67 YO FEMALE\nBURNING SE",
"UNIT:LMED1 LSQ1 L602",
"CALL:SICK PERSON (SPECIFIC DIAGNOSIS)",
"ADDR:215 E 5TH ST 3A",
"CITY:LAWSON",
"INFO:123254415 PT IS PATRICIA BIDDIX HIGH BP 67 YO FEMALE BURNING SE");
doTest("T2",
"LMED1 HEART PROBLEM / AICD 618 SHEPHERD LN Description: 17 YO Rapid Heart rate\n\n",
"UNIT:LMED1",
"CALL:HEART PROBLEM/AICD",
"ADDR:618 SHEPHERD LN",
"INFO:17 YO Rapid Heart rate");
doTest("T3",
"LMED1 LSQ1 L602 SICK PERSON (SPECIFIC DIAGNOSIS) 316 KINGS DR LAWSON Description: 90 yof\nill since for in morning\nhigh sugar\nbreathing difficulty\nu",
"UNIT:LMED1 LSQ1 L602",
"CALL:SICK PERSON (SPECIFIC DIAGNOSIS)",
"ADDR:316 KINGS DR",
"CITY:LAWSON",
"INFO:90 yof ill since for in morning high sugar breathing difficulty u");
doTest("T4",
"LMED1 LSQ1 L602 SEIZURE 34030 W 204TH ST RAY COUNTY Description: camp wilderness retreat\n13/f\nbreathing\ncons\nseizing at this time\n1st seizure for a",
"UNIT:LMED1 LSQ1 L602",
"CALL:SEIZURE",
"ADDR:34030 W 204TH ST",
"INFO:camp wilderness retreat 13/f breathing cons seizing at this time 1st seizure for a");
doTest("T5",
"LMED1 LSQ1 L602 LACERATION 202 E MOSS ST LAWSON Description: puncture wound in l foot\n42 yof\nconsious and breathing\nnausea CrossStreets: S DONIPHAN",
"UNIT:LMED1 LSQ1 L602",
"CALL:LACERATION",
"ADDR:202 E MOSS ST",
"CITY:LAWSON",
"INFO:puncture wound in l foot 42 yof consious and breathing nausea",
"X:S DONIPHAN");
}
@Test
public void testParser3() {
doTest("T1",
"800 WHP1 WHT2 WHSQ1 LP4 LP1 LT1 OT2 RFD RCAD WHFD WHR1 FIRE STRUCTURE 11783 SIEGEL CEMETERY RD RAY COUNTY Description: EXCELSIOR SPRINGS\nOUTSIDE CI",
"SRC:RFD RCAD WHFD",
"UNIT:800 WHP1 WHT2 WHSQ1 LP4 LP1 LT1 OT2 WHR1",
"CALL:FIRE STRUCTURE",
"ADDR:11783 SIEGEL CEMETERY RD",
"INFO:EXCELSIOR SPRINGS OUTSIDE CI");
doTest("T2",
"800 WHB1 WHT2 WHFD WHR1 FIRE NATURAL COVER OR BRUSH 33637 HIGHWAY U RAY COUNTY Description: SMALL BRUSH FIRE THAT IS NEXT TO A CROP FIELD\nRP IS STA",
"SRC:WHFD",
"UNIT:800 WHB1 WHT2 WHR1",
"CALL:FIRE NATURAL COVER OR BRUSH",
"ADDR:33637 HIGHWAY U",
"INFO:SMALL BRUSH FIRE THAT IS NEXT TO A CROP FIELD RP IS STA");
doTest("T3",
"WHP1 800 WHFD WHR1 FIRE ALARM 34684 HIGHWAY 10 RAY COUNTY Description: gen fire alarm. covers all zones\n\nkeyholder ron rouse 816-864-4434",
"SRC:WHFD",
"UNIT:WHP1 800 WHR1",
"CALL:FIRE ALARM",
"ADDR:34684 HIGHWAY 10",
"INFO:gen fire alarm. covers all zones keyholder ron rouse 816-864-4434");
}
public void testParser4() {
doBadTest("107 N RAYMORE ST WOOD HEIGHTS WHFD RCAD RCSO 800 M42 WHR1 678 Clear: 22:48:39 Available: 23:34:02");
doBadTest("15595 BLACKBERRY TRAIL WHFD 800 LFD 802 LT1 LP1 WHP1 Dispatch: 5/24/2011 23:15:33 Enroute: 23:15:35 OnScene: 23:23:58");
doBadTest("15141 W COUNTY LINE RD RAY COUNTY WHFD RCAD 671A 675A 800 M44 WHR1 Clear: 22:20:51 Available: 23:05:20");
}
public static void main(String[] args) {
new MORayCountyParserTest().generateTests("T1");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
6bb10079b0f50ec3be67d9ffb3085ff5de0e1e85
|
3192b7a984ed59da652221d11bc2bdfaa1aede00
|
/code/src/main/java/com/cmcu/common/util/MyFormNo.java
|
4ebc46471bb16bfa3d5c71c0ed325fa0901abbd0
|
[] |
no_license
|
shanghaif/-wz-
|
e6f5eca1511f6d68c0cd6eb3c0f118e340d9ff50
|
c7d6e8a000fbc4b6d8fed44cd5ffe483be45440c
|
refs/heads/main
| 2023-06-08T22:35:30.125549
| 2021-04-30T07:03:21
| 2021-04-30T07:03:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.cmcu.common.util;
import java.text.DecimalFormat;
public class MyFormNo {
public static String getFormNo(String key,int id){
String stringToday = MyDateUtil.getStringToday1();
DecimalFormat mFormat = new DecimalFormat("000");
String format = mFormat.format(id);
return stringToday+key+format;
}
}
|
[
"1129913541@qq.com"
] |
1129913541@qq.com
|
53110c5270f781d73011678d99e948afd8e4c8ba
|
97bfca9c15c070dd0f1560b26cd7d296f65aa660
|
/BusinessLayer/src/main/java/it/prisma/businesslayer/bizlib/rest/apiclients/iaas/openstack/ComputeOpenstackAPIClient.java
|
86899d4a1f5f8c02bb6db05d38d9ddc0968ca063
|
[
"Apache-2.0"
] |
permissive
|
pon-prisma/PrismaDemo
|
f0b9c6d4cff3f1a011d2880263f3831174771dcd
|
0ea106c07b257628bc4ed5ad45b473c1d99407c7
|
refs/heads/master
| 2016-09-06T15:37:22.099913
| 2015-07-06T15:28:10
| 2015-07-06T15:28:10
| 35,619,420
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,308
|
java
|
package it.prisma.businesslayer.bizlib.rest.apiclients.iaas.openstack;
import it.prisma.domain.dsl.iaas.openstack.Error;
import it.prisma.domain.dsl.iaas.openstack.ErrorWrapperCompute;
import it.prisma.domain.dsl.iaas.openstack.compute.request.OSStartRequest;
import it.prisma.domain.dsl.iaas.openstack.compute.request.OSStopRequest;
import it.prisma.domain.dsl.iaas.openstack.compute.request.OpenstackCreateKeyPairRequest;
import it.prisma.domain.dsl.iaas.openstack.compute.response.OpenstackCreateKeyPairResponse;
import it.prisma.domain.dsl.iaas.openstack.compute.response.listKey.OpenstackStackListPairResponse;
import it.prisma.utils.web.ws.rest.apiencoding.MappingException;
import it.prisma.utils.web.ws.rest.apiencoding.NoMappingModelFoundException;
import it.prisma.utils.web.ws.rest.apiencoding.ServerErrorResponseException;
import it.prisma.utils.web.ws.rest.apiencoding.decode.BaseRestResponseResult;
import it.prisma.utils.web.ws.rest.restclient.RestClientFactory;
import it.prisma.utils.web.ws.rest.restclient.RestClientHelper;
import it.prisma.utils.web.ws.rest.restclient.exceptions.RestClientException;
import java.io.IOException;
import java.util.Map;
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.MultivaluedMap;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
/**
* <b>NOTE</b>: This component doesn't match Openstack default error wrapper! It
* uses {@link ErrorWrapperCompute}
*
*
* @author Reply
*
*/
public class ComputeOpenstackAPIClient extends AbstractOpenstackAPIClient {
/**
*
* @param baseURL
* @param restClientFactory
* @param openstackServiceVersion
*/
protected ComputeOpenstackAPIClient(String baseURL,
RestClientFactory restClientFactory, String openstackServiceVersion) {
super(baseURL, restClientFactory, openstackServiceVersion);
}
public ComputeOpenstackAPIClient(String baseURL,
RestClientFactory restClientFactory,
String openstackServiceVersion, String tokenID) {
super(baseURL, restClientFactory, openstackServiceVersion, tokenID);
}
@Override
protected <RespType> void handleErrorResult(BaseRestResponseResult result)
throws OpenstackAPIErrorException {
// Gets the last error in the map (there should be only one error by default)
Error error = null;
for (Map.Entry<String, Error> e : ((ErrorWrapperCompute) result
.getResult()).getAdditionalProperties().entrySet()) {
error = e.getValue();
error.setTitle(e.getKey());
}
throw new OpenstackAPIErrorException("API_ERROR", null,
result.getOriginalRestMessage(), error);
}
public OpenstackCreateKeyPairResponse createKeyPair(
OpenstackCreateKeyPairRequest request,
MultivaluedMap<String, Object> headerMap)
throws JsonParseException, JsonMappingException, IOException,
RestClientException, NoMappingModelFoundException,
MappingException, ServerErrorResponseException,
OpenstackAPIErrorException {
String URL = baseWSUrl + "/" + getServiceVersion() + "os-keypairs";
MultivaluedMap<String, Object> headers = getAuthenticationHeaders(tokenID);
if (headerMap != null)
headers.putAll(headerMap);
GenericEntity<String> ge = new RestClientHelper.JsonEntityBuilder()
.build(request);
OpenstackRestResponseDecoder<OpenstackCreateKeyPairResponse> decoder = new OpenstackRestResponseDecoder<OpenstackCreateKeyPairResponse>(
new OpenstackComputeRRDStrategy<OpenstackCreateKeyPairResponse>(
OpenstackCreateKeyPairResponse.class));
BaseRestResponseResult result = restClient.postRequest(URL, headers,
ge, RestClientHelper.JsonEntityBuilder.MEDIA_TYPE, decoder,
null);
return handleResult(result);
}
public OpenstackStackListPairResponse listKeypair()
throws RestClientException, NoMappingModelFoundException,
MappingException, ServerErrorResponseException,
OpenstackAPIErrorException {
String url = baseWSUrl + "/" + getServiceVersion() + "os-keypairs";
MultivaluedMap<String, Object> headers = getAuthenticationHeaders(this.tokenID);
BaseRestResponseResult result = restClient.getRequest(url,headers,
new OpenstackRestResponseDecoder<OpenstackStackListPairResponse>(
OpenstackStackListPairResponse.class),null);
return handleResult(result);
}
public void stopServer(String vmId, MultivaluedMap<String, Object> headerMap)
throws JsonParseException, JsonMappingException, IOException,
RestClientException, NoMappingModelFoundException,
MappingException, ServerErrorResponseException,
OpenstackAPIErrorException {
String URL = baseWSUrl + "/" + getServiceVersion() + "servers/" + vmId + "/action";
MultivaluedMap<String, Object> headers = getAuthenticationHeaders(tokenID);
if (headerMap != null)
headers.putAll(headerMap);
OSStopRequest osStop = new OSStopRequest();
osStop.setOsStop("1");
GenericEntity<String> ge = new RestClientHelper.JsonEntityBuilder()
.build(osStop);
OpenstackRestResponseDecoder<Object> decoder = new OpenstackRestResponseDecoder<Object>(
new OpenstackComputeRRDStrategy<Object>(Object.class));
BaseRestResponseResult result = restClient.postRequest(URL, headers,
ge, RestClientHelper.JsonEntityBuilder.MEDIA_TYPE, decoder,
null);
handleResult(result);
}
public void startServer(String vmId, MultivaluedMap<String, Object> headerMap)
throws JsonParseException, JsonMappingException, IOException,
RestClientException, NoMappingModelFoundException,
MappingException, ServerErrorResponseException,
OpenstackAPIErrorException {
String URL = baseWSUrl + "/" + getServiceVersion() + "servers/" + vmId + "/action";
MultivaluedMap<String, Object> headers = getAuthenticationHeaders(tokenID);
if (headerMap != null)
headers.putAll(headerMap);
OSStartRequest osStart = new OSStartRequest();
osStart.setOsStart("1");
GenericEntity<String> ge = new RestClientHelper.JsonEntityBuilder()
.build(osStart);
OpenstackRestResponseDecoder<Object> decoder = new OpenstackRestResponseDecoder<Object>(
new OpenstackComputeRRDStrategy<Object>(Object.class));
BaseRestResponseResult result = restClient.postRequest(URL, headers,
ge, RestClientHelper.JsonEntityBuilder.MEDIA_TYPE, decoder,
null);
handleResult(result);
}
}
|
[
"pon.prisma@gmail.com"
] |
pon.prisma@gmail.com
|
958e439decb5a027fbc2fedbe2e6a0ba440c6d1e
|
fb1813d35443bcec5211f932a73f709fb9888c87
|
/src/main/java/com/wondertek/baiying/task/schedule/ITaskService.java
|
d464634b0be5403edb6478c20838b6910565af78
|
[] |
no_license
|
zbcstudy/study-portal
|
21c1891a91417369a607f5f6f76cf1b87bf29b29
|
9c45e166db7483fe5603a05fb269ab5d9dc113c8
|
refs/heads/master
| 2022-12-21T21:18:58.082046
| 2021-04-15T10:22:06
| 2021-04-15T10:22:06
| 142,856,237
| 0
| 0
| null | 2022-12-13T19:29:01
| 2018-07-30T09:44:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,434
|
java
|
package com.wondertek.baiying.task.schedule;
import com.wondertek.baiying.task.schedule.entity.ScheduleTask;
import java.util.List;
import java.util.Map;
public interface ITaskService {
/**
* 获取所有表达式
* @return
*/
public Map<String, String> getAllCron();
/**
* 获取任务列表
* @return
*/
public List<ScheduleTask> getAllTask();
/**
* 根据任务ID获取一个任务
* @param taskId
* @return
*/
public ScheduleTask getTaskById(String taskId);
/**
* 新建一个任务
* @param task
* @return
*/
ScheduleTask addTask(ScheduleTask task);
/**
* 新建一个任务
*
* @param taskName 任务名称
* @param taskClassName 任务class名称
* @param triggerName 触发器名称
* @param cron cron表达式
* @return
*/
ScheduleTask addTask(String taskName, String taskClassName, String triggerName, String cron);
/**
* 新建一个定时任务
* @param taskName 任务名称
* @param taskGroupName 任务组名
* @param taskClassName 任务类名
* @param triggerGroupName 触发器组名
* @param triggerName 触发器方法名
* @param cron cron表达式
* @return
* @throws Exception
*/
ScheduleTask addTask(String taskName, String taskGroupName, String taskClassName, String triggerGroupName, String
triggerName, String cron) throws Exception;
/**
* 修改一个任务的触发时间
* @param taskId
* @param cron
* @return
*/
ScheduleTask modifyTaskCron(String taskId, String cron);
/**
* 移除一个任务
* @param taskId
* @return
*/
ScheduleTask removeTask(String taskId);
/**
* 重启任务
* @param taskId
* @return
*/
ScheduleTask restartTask(String taskId);
/**
* 暂停任务
* @param taskId
* @return
*/
ScheduleTask pauseTask(String taskId);
/**
* 禁用任务
* @param taskId
* @return
*/
ScheduleTask disableTask(String taskId);
/**
* 关闭定时任务
* @param taskId
* @return
*/
ScheduleTask shutdownTask(String taskId);
/**
* 启动所有定时任务
*/
void startAllTask();
/**
* 关闭所有定时任务
*/
void shutDownAllTask();
}
|
[
"1434756304@qq.com"
] |
1434756304@qq.com
|
5f873207c061f21e26724b7dd46d7c8c904e7f45
|
bd950f14035a226cc9605cf3e1396b622b6c63ef
|
/byte-buddy-dep/src/test/java/net/bytebuddy/dynamic/loading/ClassLoadingStrategyForBootstrapInjectionTest.java
|
3f14f21cbb3543acf261eb01fa924a6a77b395dc
|
[
"Apache-2.0"
] |
permissive
|
RobAustin/byte-buddy
|
452cf3c94b37188998f1962de1201da1894f6fdf
|
7d1ed498fe1b08219863d9472119bd2af10bee1b
|
refs/heads/master
| 2021-01-15T11:44:18.980906
| 2015-04-01T09:02:15
| 2015-04-01T09:02:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,909
|
java
|
package net.bytebuddy.dynamic.loading;
import net.bytebuddy.ByteBuddy;
import net.bytebuddy.agent.ByteBuddyAgent;
import net.bytebuddy.dynamic.DynamicType;
import net.bytebuddy.instrumentation.type.TypeDescription;
import net.bytebuddy.test.utility.ObjectPropertyAssertion;
import net.bytebuddy.test.utility.ToolsJarRule;
import net.bytebuddy.utility.RandomString;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Collections;
import java.util.Map;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
public class ClassLoadingStrategyForBootstrapInjectionTest {
private static final String FOO = "foo", BAR = "bar";
private File file;
@Before
public void setUp() throws Exception {
file = File.createTempFile(FOO, BAR);
assertThat(file.delete(), is(true));
file = new File(file.getParentFile(), RandomString.make());
assertThat(file.mkdir(), is(true));
}
@Test
@ToolsJarRule.Enforce
public void testBootstrapInjection() throws Exception {
ClassLoadingStrategy bootstrapStrategy = new ClassLoadingStrategy.ForBootstrapInjection(ByteBuddyAgent.installOnOpenJDK(), file);
String name = FOO + RandomString.make();
DynamicType dynamicType = new ByteBuddy().subclass(Object.class).name(name).make();
Map<TypeDescription, Class<?>> loaded = bootstrapStrategy.load(null, Collections.singletonMap(dynamicType.getTypeDescription(), dynamicType.getBytes()));
assertThat(loaded.size(), is(1));
assertThat(loaded.get(dynamicType.getTypeDescription()).getName(), is(name));
assertThat(loaded.get(dynamicType.getTypeDescription()).getClassLoader(), nullValue(ClassLoader.class));
}
@Test
@ToolsJarRule.Enforce
public void testClassLoaderInjection() throws Exception {
ClassLoadingStrategy bootstrapStrategy = new ClassLoadingStrategy.ForBootstrapInjection(ByteBuddyAgent.installOnOpenJDK(), file);
String name = BAR + RandomString.make();
ClassLoader classLoader = new URLClassLoader(new URL[0], null);
DynamicType dynamicType = new ByteBuddy().subclass(Object.class).name(name).make();
Map<TypeDescription, Class<?>> loaded = bootstrapStrategy.load(classLoader, Collections.singletonMap(dynamicType.getTypeDescription(), dynamicType.getBytes()));
assertThat(loaded.size(), is(1));
assertThat(loaded.get(dynamicType.getTypeDescription()).getName(), is(name));
assertThat(loaded.get(dynamicType.getTypeDescription()).getClassLoader(), is(classLoader));
}
@Test
public void testObjectProperties() throws Exception {
ObjectPropertyAssertion.of(ClassLoadingStrategy.ForBootstrapInjection.class).apply();
}
}
|
[
"rafael.wth@web.de"
] |
rafael.wth@web.de
|
601a987f6c6fe164e18e944b11901296a0d3fcb5
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/Alluxio--alluxio/659b0bf25df3ebe4c73162aad7fea2d6bead0715/before/RawColumn.java
|
ef08ce6a5f323e49421ec1c420753917ab65cca8
|
[] |
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
| 636
|
java
|
package tachyon.client;
public class RawColumn {
private final TachyonClient TACHYON_CLIENT;
private final RawTable RAW_TABLE;
private final int COLUMN_INDEX;
public RawColumn(TachyonClient tachyonClient, RawTable rawTable, int columnIndex) {
TACHYON_CLIENT = tachyonClient;
RAW_TABLE = rawTable;
COLUMN_INDEX = columnIndex;
}
public boolean createPartition(int pId) {
return TACHYON_CLIENT.createFile(RAW_TABLE.getPath() + "/" + COLUMN_INDEX + "/" + pId) > 0;
}
public TachyonFile getPartition(int pId) {
return TACHYON_CLIENT.getFile(RAW_TABLE.getPath() + "/" + COLUMN_INDEX + "/" + pId);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
af210d8c1f723547b49e1f8c7ff1f94c262428f4
|
87f420a0e7b23aefe65623ceeaa0021fb0c40c56
|
/ruoyi-vue-pro-master/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/mq/consumer/dept/DeptRefreshConsumer.java
|
981244d9095bab081d7bc5117efbbc91a70171d4
|
[
"MIT"
] |
permissive
|
xioxu-web/xioxu-web
|
0361a292b675d8209578d99451598bf4a56f9b08
|
7fe3f9539e3679e1de9f5f614f3f9b7f41a28491
|
refs/heads/master
| 2023-05-05T01:59:43.228816
| 2023-04-28T07:44:58
| 2023-04-28T07:44:58
| 367,005,744
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 822
|
java
|
package cn.iocoder.yudao.module.system.mq.consumer.dept;
import cn.iocoder.yudao.framework.mq.core.pubsub.AbstractChannelMessageListener;
import cn.iocoder.yudao.module.system.mq.message.dept.DeptRefreshMessage;
import cn.iocoder.yudao.module.system.service.dept.DeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* 针对 {@link DeptRefreshMessage} 的消费者
*
* @author 芋道源码
*/
@Component
@Slf4j
public class DeptRefreshConsumer extends AbstractChannelMessageListener<DeptRefreshMessage> {
@Resource
private DeptService deptService;
@Override
public void onMessage(DeptRefreshMessage message) {
log.info("[onMessage][收到 Dept 刷新消息]");
deptService.initLocalCache();
}
}
|
[
"xb01049438@alibaba-inc.com"
] |
xb01049438@alibaba-inc.com
|
0e9691ee5c5c83036f446e6815ec000e5012b8d6
|
b586edb405061836d407b0255352370944cdd09c
|
/java5/src/test/java/com/evolutionnext/javaee/java5/GenericsMethodTest.java
|
6011baed97171f3247fcc53e3f20dba8f16a0aa9
|
[] |
no_license
|
dhinojosa/javaeebootcamp
|
722b414d6314f375561886601758cd0475339886
|
91fdda040d668f5ca67004458c7d2cf3aa6d9c19
|
refs/heads/master
| 2020-04-26T22:49:32.698278
| 2012-09-11T04:39:23
| 2012-09-11T04:39:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 576
|
java
|
package com.evolutionnext.javaee.java5;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.fest.assertions.Assertions.assertThat;
public class GenericsMethodTest {
@Test
public void testTypeChecking() {
GenericMethod genericMethod = new GenericMethod();
List<Integer> integers = new ArrayList<Integer>();
integers.add(12);
integers.add(15);
integers.add(19);
//genericClass.<String>genericMethod(integers);
genericMethod.method(integers); //type inference
}
}
|
[
"dhinojosa@evolutionnext.com"
] |
dhinojosa@evolutionnext.com
|
b13fe68aa9a4942203131b1e219dbc9d7bf4e9be
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/servicemesh-20200111/src/main/java/com/aliyun/servicemesh20200111/models/AddClusterIntoServiceMeshResponseBody.java
|
d782922e476363fe92180f057cabc57a65ccafac
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.servicemesh20200111.models;
import com.aliyun.tea.*;
public class AddClusterIntoServiceMeshResponseBody extends TeaModel {
@NameInMap("Code")
public String code;
@NameInMap("Message")
public String message;
@NameInMap("RequestId")
public String requestId;
public static AddClusterIntoServiceMeshResponseBody build(java.util.Map<String, ?> map) throws Exception {
AddClusterIntoServiceMeshResponseBody self = new AddClusterIntoServiceMeshResponseBody();
return TeaModel.build(map, self);
}
public AddClusterIntoServiceMeshResponseBody setCode(String code) {
this.code = code;
return this;
}
public String getCode() {
return this.code;
}
public AddClusterIntoServiceMeshResponseBody setMessage(String message) {
this.message = message;
return this;
}
public String getMessage() {
return this.message;
}
public AddClusterIntoServiceMeshResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
78b2efbdadf68f80e488d9f62997642f3ee73bcd
|
ca85b4da3635bcbea482196e5445bd47c9ef956f
|
/iexhub/src/main/java/PDQSupplier/org/hl7/v3/IncidentalServiceDeliveryLocationRoleType.java
|
d0798548faec76efabb6ab461e6ef74dc6fbf968
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bhits/iexhub-generated
|
c89a3a9bd127140f56898d503bc0c924d0398798
|
e53080ae15f0c57c8111a54d562101d578d6c777
|
refs/heads/master
| 2021-01-09T05:59:38.023779
| 2017-02-01T13:30:19
| 2017-02-01T13:30:19
| 80,863,998
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,998
|
java
|
/*******************************************************************************
* Copyright (c) 2015, 2016 Substance Abuse and Mental Health Services Administration (SAMHSA)
*
* 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.
*
* Contributors:
* Eversolve, LLC - initial IExHub implementation for Health Information Exchange (HIE) integration
* Anthony Sute, Ioana Singureanu
*******************************************************************************/
package PDQSupplier.org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for IncidentalServiceDeliveryLocationRoleType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="IncidentalServiceDeliveryLocationRoleType">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="COMM"/>
* <enumeration value="PTRES"/>
* <enumeration value="ACC"/>
* <enumeration value="SCHOOL"/>
* <enumeration value="WORK"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "IncidentalServiceDeliveryLocationRoleType")
@XmlEnum
public enum IncidentalServiceDeliveryLocationRoleType {
COMM,
PTRES,
ACC,
SCHOOL,
WORK;
public String value() {
return name();
}
public static IncidentalServiceDeliveryLocationRoleType fromValue(String v) {
return valueOf(v);
}
}
|
[
"michael.hadjiosif@feisystems.com"
] |
michael.hadjiosif@feisystems.com
|
e30058ce1ca80ec15e97306aa25e031717421110
|
de75c58f6513c0f78921e5a0879a523c5d528d9c
|
/build.properties/src/com/framedobjects/dashwell/db/ExcelConnectionTest.java
|
af62594fbad75d9e8239cff3016bd6f3555da43f
|
[] |
no_license
|
Prinz2109/mobiledatanow
|
679af56e1809736ee283439db9b74cfa25512ab0
|
a792a11b228a85a476c16127aac2a98fdc500cd1
|
refs/heads/master
| 2021-01-17T13:20:11.589335
| 2009-02-04T04:49:30
| 2009-02-04T04:49:30
| 33,274,021
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 759
|
java
|
package com.framedobjects.dashwell.db;
import java.sql.Connection;
import java.sql.DriverManager;
/**
* @author Jens Richnow
*
*/
public class ExcelConnectionTest implements DbConnectionTest {
/* (non-Javadoc)
* @see com.framedobjects.bliss.db.DbConnectionTest#test(com.framedobjects.bliss.biz.DbConnection)
*/
public String test(DbConnection dbConn) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = dbConn.getUrl() ;//+ ":" + dbConn.getSchema();
Connection conn = DriverManager.getConnection(url, dbConn.getUsername(), dbConn.getPassword());
System.err.println(">> " + conn.getCatalog());
conn.close();
} catch (Exception e) {
return e.getMessage();
}
return null;
}
}
|
[
"nick.mobiledatanow@95061b60-9fd8-11dd-a887-7ffe1a420f8d"
] |
nick.mobiledatanow@95061b60-9fd8-11dd-a887-7ffe1a420f8d
|
d7928ed8cc953dd6fe2a25312b44a60f6b9d69aa
|
406757a1fd3624bdc64c97a905bfa6d31f48293f
|
/calibration-gui/src/main/java/gov/llnl/gnem/apps/coda/calibration/gui/converters/param/MdacPsFileLoader.java
|
61e98526f947cabb49bd070448d1f49628095080
|
[
"Apache-2.0"
] |
permissive
|
LLNL/coda-calibration-tool
|
67e349f9c0653b5ab0804cc8a90e77c1817394a1
|
f86cdc694ca7cc6a34b965321d5c87684afb9cf4
|
refs/heads/master
| 2023-08-30T05:03:58.686698
| 2023-08-23T20:44:10
| 2023-08-23T20:44:10
| 114,670,393
| 18
| 1
|
Apache-2.0
| 2023-02-20T10:09:05
| 2017-12-18T17:42:33
|
Java
|
UTF-8
|
Java
| false
| false
| 4,828
|
java
|
/*
* Copyright (c) 2018, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory
* CODE-743439.
* All rights reserved.
* This file is part of CCT. For details, see https://github.com/LLNL/coda-calibration-tool.
*
* Licensed under the Apache License, Version 2.0 (the “Licensee”); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the license.
*
* This work was performed under the auspices of the U.S. Department of Energy
* by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
*/
package gov.llnl.gnem.apps.coda.calibration.gui.converters.param;
import java.io.File;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.PathMatcher;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.StringTokenizer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.stereotype.Service;
import gov.llnl.gnem.apps.coda.calibration.gui.converters.api.FileToParameterConverter;
import gov.llnl.gnem.apps.coda.calibration.model.domain.MdacParametersPS;
import gov.llnl.gnem.apps.coda.common.model.messaging.Result;
import gov.llnl.gnem.apps.coda.common.model.util.LightweightIllegalStateException;
import reactor.core.publisher.Flux;
@Service
public class MdacPsFileLoader implements FileToParameterConverter<MdacParametersPS> {
final PathMatcher filter = FileSystems.getDefault().getPathMatcher("regex:(?i).*ps.*\\.(txt|dat)");
@Override
public Flux<Result<MdacParametersPS>> convertFile(File file) {
if (file != null && file.exists() && file.isFile() && filter.matches(file.toPath())) {
return Flux.fromIterable(convert(file));
}
return Flux.empty();
}
@Override
public Flux<Result<MdacParametersPS>> convertFiles(List<File> files) {
return Flux.fromIterable(files).flatMap(this::convertFile);
}
public List<Result<MdacParametersPS>> convert(File file) {
if (file == null) {
return Collections.singletonList(exceptionalResult(new LightweightIllegalStateException(String.format("Error parsing (%s): file does not exist or is unreadable. %s",
"NULL",
"File reference is null"))));
}
try (Stream<String> lines = Files.lines(file.toPath())) {
return lines.parallel().filter(l -> !l.isEmpty()).map(line -> {
MdacParametersPS param = new MdacParametersPS();
StringTokenizer tokenizer = new StringTokenizer(line);
param.setPhase(tokenizer.nextToken().trim());
param.setQ0(Double.parseDouble(tokenizer.nextToken().trim()));
param.setDelQ0(Double.parseDouble(tokenizer.nextToken().trim()));
param.setGamma0(Double.parseDouble(tokenizer.nextToken().trim()));
param.setDelGamma0(Double.parseDouble(tokenizer.nextToken().trim()));
param.setU0(Double.parseDouble(tokenizer.nextToken().trim()));
param.setEta(Double.parseDouble(tokenizer.nextToken().trim()));
param.setDelEta(Double.parseDouble(tokenizer.nextToken().trim()));
param.setDistCrit(Double.parseDouble(tokenizer.nextToken().trim()));
param.setSnr(Double.parseDouble(tokenizer.nextToken().trim()));
return new Result<>(true, param);
}).filter(Objects::nonNull).collect(Collectors.toList());
} catch (IOException e) {
return Collections.singletonList(exceptionalResult(new LightweightIllegalStateException(String.format("Error parsing (%s): %s", file.getName(), e.getMessage()), e)));
}
}
private Result<MdacParametersPS> exceptionalResult(Exception error) {
List<Exception> exceptions = new ArrayList<>();
exceptions.add(error);
return exceptionalResult(exceptions);
}
private Result<MdacParametersPS> exceptionalResult(List<Exception> errors) {
return new Result<>(false, errors, null);
}
@Override
public PathMatcher getMatchingPattern() {
return filter;
}
}
|
[
"barno1@llnl.gov"
] |
barno1@llnl.gov
|
4d1979b7d13b9e3ade2ea29f1fa5cea2eebe2956
|
8fe059e620dd80e4625f596216eb255f82b90693
|
/canvas/Common/src/main/java/com/imooc/canvas/common/MyBatisUtils.java
|
dbdff9b251d5dfabfc3a1c7e1f7567561ad7d46f
|
[] |
no_license
|
huhufan/java_history
|
b37bda423cf71572ab9acd9b7b85feacf9a00e3d
|
e2a3ebad44f4de65dc8abe62e731628c2856fe97
|
refs/heads/master
| 2022-12-21T13:15:04.380118
| 2019-11-09T06:38:13
| 2019-11-09T06:38:13
| 220,601,427
| 0
| 0
| null | 2022-12-16T01:04:07
| 2019-11-09T06:27:52
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
package com.imooc.canvas.common;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import java.io.IOException;
import java.io.Reader;
/**
* MyBatis工具类
*/
public class MyBatisUtils {
private static SqlSessionFactory sqlSessionFactory;
private static Reader reader;
static {
try {
String resource = "config.xml";
//获取resource目录下的config.xml文件
reader = Resources.getResourceAsReader(resource);
//创建sqlSessionFactory工程对象
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader) ;
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 返回sqlSession对象
* @return SqlSession
*/
public static SqlSession getSession() {
return sqlSessionFactory.openSession();
}
public static void main(String[] args) {
MyBatisUtils.getSession();
}
}
|
[
"18846799354@163.com"
] |
18846799354@163.com
|
8f2fa5306a4ef9281b5e7060449248d8fb4a09f6
|
682bfd40c3cc651a6196e8e368696e930370a618
|
/library/data/src/main/java/ekol/model/IsoNamePair.java
|
28ab5390c4e33cdec83f03dd5a0358b82cb3b8e2
|
[] |
no_license
|
seerdaryilmazz/OOB
|
3b27b67ce1cbf3f411f7c672d0bed0d71bc9b127
|
199f0c18b82d04569d26a08a1a4cd8ee8c7ba42d
|
refs/heads/master
| 2022-12-30T09:23:25.061974
| 2020-10-09T13:14:39
| 2020-10-09T13:14:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,335
|
java
|
package ekol.model;
import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.*;
import com.fasterxml.jackson.annotation.*;
import lombok.*;
/**
* location-service'teki Country referanslarını tutmak amacıyla yapıldı.
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class IsoNamePair implements Serializable {
private String iso;
private String name;
public static IsoNamePair with(String iso, String name){
return new IsoNamePair(iso, name);
}
@JsonIgnore
public boolean isValid() {
return StringUtils.isNotBlank(getIso()) && StringUtils.isNotBlank(getName());
}
@Override
public int hashCode() {
return new HashCodeBuilder(7, 23).
append(getIso()).
append(getName()).
toHashCode();
}
@Override
public boolean equals(Object object) {
if (!(object instanceof IsoNamePair))
return false;
if (object == this)
return true;
IsoNamePair pair = IsoNamePair.class.cast(object);
return new EqualsBuilder().
append(getIso(), pair.getIso()).
append(getName(), pair.getName()).
isEquals();
}
}
|
[
"dogukan.sahinturk@ekol.com"
] |
dogukan.sahinturk@ekol.com
|
6f940266563b38ea8f63b900325ced4219ece644
|
460b595bd0e52446db466e9a09292ed7082b2a9b
|
/src/main/java/com/lambdasys/quarkusdemo/exceptionsmappers/ErrorResponse.java
|
d24c5837b0f830b9e448fbf2ce0aa721e00934cb
|
[] |
no_license
|
leoluzh/quarkusdemo
|
72607e770b1fbf10f97b98c3ce6b173f91438593
|
45b953089d0ab58b7d0ad34a0a7a5ebeef004a3c
|
refs/heads/master
| 2022-11-19T22:37:26.176192
| 2020-07-27T14:45:33
| 2020-07-27T14:45:33
| 282,732,032
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 462
|
java
|
package com.lambdasys.quarkusdemo.exceptionsmappers;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@SuppressWarnings("serial")
public class ErrorResponse implements Serializable {
private String errorMessage;
private String errorCode;
private String documentationLink;
}
|
[
"leonardo.l.fernandes@gmail.com"
] |
leonardo.l.fernandes@gmail.com
|
e8d634e570a5df42a7b68ede48e85bcfb0112e0e
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-2-12-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/wiki/XWikiWikiModel_ESTest_scaffolding.java
|
9985c1c44ee8a9938f69d7b8f32a6cfb02a95c31
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 452
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 02:51:18 UTC 2020
*/
package org.xwiki.rendering.internal.wiki;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiWikiModel_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
f60c962fd4ee96b1a1b532603bad9ff092f748ba
|
7bd07d0c22ff0ef7daf23b4ffd3644530c618ce4
|
/src/main/java/com/financetracker/model/PlannedPayment.java
|
882a0e5dbf6dff03b04238d45765ac61bc4d63ea
|
[] |
no_license
|
BlagoyNikolov/FinanceTracker
|
e1f8f78ebc029502926782b047b75077a88298ea
|
0f1f489bb882900956b5e01298163f9169933002
|
refs/heads/master
| 2021-09-15T09:27:02.797802
| 2018-05-29T21:08:30
| 2018-05-29T21:08:30
| 109,755,026
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,519
|
java
|
package com.financetracker.model;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty;
@Entity
@Table(name = "planned_payments", uniqueConstraints = @UniqueConstraint(columnNames = {"planned_payment_id"}))
public class PlannedPayment {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "planned_payment_id")
private long plannedPaymentId;
@NotNull
@Size(min = 2, max = 45)
@NotEmpty
@Column(name = "name")
private String name;
@Column(name = "type")
@Enumerated(EnumType.STRING)
private PaymentType paymentType;
@Column(name = "from_date")
private LocalDateTime fromDate;
@NotNull
@Min(1)
@Max((long) 999999999.9999)
@Column(name = "amount")
private BigDecimal amount;
@Size(min = 2, max = 45)
@Column(name = "description")
private String description;
@ManyToOne(cascade = CascadeType.MERGE, targetEntity = Account.class)
@JoinColumn(name = "account_id", referencedColumnName = "account_id")
private Account account;
@ManyToOne(cascade = CascadeType.MERGE, targetEntity = Category.class)
@JoinColumn(name = "category_id", referencedColumnName = "category_id")
private Category category;
private String categoryName;
public PlannedPayment() {
}
public PlannedPayment(String name, PaymentType paymentType, LocalDateTime fromDate, BigDecimal amount,
String description, Account account, Category category) {
this.name = name;
this.paymentType = paymentType;
this.fromDate = fromDate;
this.amount = amount;
this.description = description;
this.account = account;
this.category = category;
}
public long getPlannedPaymentId() {
return plannedPaymentId;
}
public void setPlannedPaymentId(long plannedPaymentId) {
this.plannedPaymentId = plannedPaymentId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name.trim();
}
public PaymentType getPaymentType() {
return paymentType;
}
public LocalDateTime getFromDate() {
return fromDate;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Account getAccount() {
return account;
}
public Category getCategory() {
return category;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
}
|
[
"nikolovblagoy@gmail.com"
] |
nikolovblagoy@gmail.com
|
4a866af76fc319551250e50e3bc9a2bcc798a42d
|
d24de9be4c3993d9dc726e9a3c74d9662c470226
|
/reverse/Rocketbank_All_3.12.4_source_from_JADX/sources/ru/rocketbank/r2d2/root/chat/ChatFragment$initClicks$3.java
|
b86046eeb0eba84ded6311183ef9475617a491ca
|
[] |
no_license
|
MEJIOMAH17/rocketbank-api
|
b18808ee4a2fdddd8b3045cd16655b0d82e0b13b
|
fc4eb0cbb4a8f52277fdb09a3b26b4cceef6ff79
|
refs/heads/master
| 2022-07-17T20:24:29.721131
| 2019-07-26T18:55:21
| 2019-07-26T18:55:21
| 198,698,231
| 4
| 0
| null | 2022-06-20T22:43:15
| 2019-07-24T19:31:49
|
Smali
|
UTF-8
|
Java
| false
| false
| 728
|
java
|
package ru.rocketbank.r2d2.root.chat;
import android.support.v7.widget.RecyclerView.RecyclerListener;
import android.support.v7.widget.RecyclerView.ViewHolder;
import kotlin.TypeCastException;
/* compiled from: ChatFragment.kt */
final class ChatFragment$initClicks$3 implements RecyclerListener {
public static final ChatFragment$initClicks$3 INSTANCE = new ChatFragment$initClicks$3();
ChatFragment$initClicks$3() {
}
public final void onViewRecycled(ViewHolder viewHolder) {
if (viewHolder == null) {
throw new TypeCastException("null cannot be cast to non-null type ru.rocketbank.r2d2.root.chat.MessageViewHolder");
}
((MessageViewHolder) viewHolder).clear();
}
}
|
[
"mekosichkin.ru"
] |
mekosichkin.ru
|
9e32132f3c34c4632563a566c13c2a5a7f11f902
|
e736aaa7ee1acee42dbde3d99a24059427e8b097
|
/src/main/java/com/xnx3/wangmarket/admin/pluginManage/SitePluginBean.java
|
d686446a464d9cfefbdb947d508652d99d7c71e6
|
[
"Apache-2.0"
] |
permissive
|
github4n/wangmarket
|
cde38f5b47467210f8adc5d50559c4b6eb0c4f12
|
a736b281792e95eddc874cfde958d15c1c3a9d07
|
refs/heads/master
| 2020-04-03T18:26:15.219533
| 2018-10-27T10:45:05
| 2018-10-27T10:45:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,267
|
java
|
package com.xnx3.wangmarket.admin.pluginManage;
import com.xnx3.wangmarket.admin.pluginManage.anno.PluginRegister;
/**
* 网站管理后台插件的管理Bean
* @author Administrator
*
*/
public class SitePluginBean {
public Class c; //注册类的class
// public String className; //Class的名字,如 com.xnx3.wangmarket.admin.pluginManage.SitePluginBean, 会根据此创建对象。
public String id; //该插件的唯一标识。如自定义表单插件,唯一标识便是 formManage 。注意不能与其他插件重名
//作为网站管理后台左侧 功能插件 菜单下的子菜单所显示的入口,入口菜单超链接所显示的标题及超链接所连接的页面
public String menuTitle; // 如:表单反馈
public String menuHref; // 如:站外的绝对路径,或站内的相对路径 ../../column/popupListForTemplate.do
public boolean applyToCMS = false; //是否适用于CMS类型网站管理后台, true:是
public boolean applyToPC = false; //是否适用于PC类型网站管理后台, true:是
public boolean applyToWAP = false; //是否适用于WAP类型网站管理后台, true:是
public boolean applyToAgency = false; //是否适用于代理后台, true:是
public boolean applyToSuperAdmin = false; //是否适用于总管理后台, true:是
/**
* 将增加注解 PluginRegister 的 class 注册类传入,获取其 SitePluginBean 信息
* @param c
*/
public SitePluginBean(Class c) {
this.c = c;
PluginRegister an = (PluginRegister) c.getAnnotation(PluginRegister.class);
if(an != null){
this.id = an.id();
this.menuTitle = an.menuTitle();
this.menuHref = an.menuHref();
this.applyToCMS = an.applyToCMS();
this.applyToPC = an.applyToPC();
this.applyToWAP = an.applyToWAP();
this.applyToAgency = an.applyToAgency();
this.applyToSuperAdmin = an.applyToSuperAdmin();
}
}
public Class getC() {
return c;
}
public void setC(Class c) {
this.c = c;
}
public String getMenuTitle() {
return menuTitle;
}
public void setMenuTitle(String menuTitle) {
this.menuTitle = menuTitle;
}
public String getMenuHref() {
return menuHref;
}
public void setMenuHref(String menuHref) {
this.menuHref = menuHref;
}
public boolean isApplyToCMS() {
return applyToCMS;
}
public void setApplyToCMS(boolean applyToCMS) {
this.applyToCMS = applyToCMS;
}
public boolean isApplyToPC() {
return applyToPC;
}
public void setApplyToPC(boolean applyToPC) {
this.applyToPC = applyToPC;
}
public boolean isApplyToWAP() {
return applyToWAP;
}
public void setApplyToWAP(boolean applyToWAP) {
this.applyToWAP = applyToWAP;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public boolean isApplyToAgency() {
return applyToAgency;
}
public boolean isApplyToSuperAdmin() {
return applyToSuperAdmin;
}
@Override
public String toString() {
return "SitePluginBean [c=" + c + ", id=" + id + ", menuTitle="
+ menuTitle + ", menuHref=" + menuHref + ", applyToCMS="
+ applyToCMS + ", applyToPC=" + applyToPC + ", applyToWAP="
+ applyToWAP + ", applyToAgency=" + applyToAgency
+ ", applyToSuperAdmin=" + applyToSuperAdmin + "]";
}
}
|
[
"mail@xnx3.com"
] |
mail@xnx3.com
|
ecca5df268ab4031fb1e9121c6317ecd7d9c2707
|
dc41ef318c2b30b977f0d2ed7a0af5ddf31eaf99
|
/joker-pcj/src/main/java/cs/bilkent/joker/pcj/PCJJokerWrapper.java
|
95f300855c0afc84b61ebe7a56d85bcd1ac8f4a4
|
[] |
no_license
|
serkan-ozal/joker
|
67cf0e498f68e8a31c1aea4f79bce6066dca15b6
|
99df637a4fa645819a24c281fbe87d33d92dfbe8
|
refs/heads/master
| 2020-12-03T07:54:20.793391
| 2017-06-22T20:50:07
| 2017-06-22T20:50:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,019
|
java
|
package cs.bilkent.joker.pcj;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.pcj.PCJ;
import org.pcj.StartPoint;
import org.pcj.Storage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import cs.bilkent.joker.Joker;
import cs.bilkent.joker.engine.migration.MigrationService;
import cs.bilkent.joker.utils.Pair;
import static java.util.concurrent.TimeUnit.SECONDS;
public class PCJJokerWrapper extends Storage implements StartPoint, MigrationService
{
private static final Logger LOGGER = LoggerFactory.getLogger( PCJJokerWrapper.class );
@Override
public void main () throws Throwable
{
final Pair<Integer, Integer> jokerId = getJokerId();
LOGGER.info( "Starting {} of joker: {}", PCJJokerWrapper.class.getSimpleName(), jokerId );
final String jokerInstanceFactoryClassName = System.getProperty( PCJMain.PCJ_JOKER_FACTORY_SYS_PARAM );
final Class<PCJJokerInstanceFactory> jokerFactoryClazz = (Class<PCJJokerInstanceFactory>) Class.forName(
jokerInstanceFactoryClassName );
final PCJJokerInstanceFactory jokerFactory = jokerFactoryClazz.newInstance();
final Joker joker = jokerFactory.createJokerInstance( jokerId, this );
sleepUninterruptibly( 30, SECONDS );
try
{
joker.shutdown().get( 30, TimeUnit.SECONDS );
}
catch ( InterruptedException e )
{
LOGGER.error( "Shutdown failed", e );
Thread.currentThread().interrupt();
}
catch ( ExecutionException | TimeoutException e )
{
LOGGER.error( "Shutdown failed", e );
}
LOGGER.info( "Joker {} is completed.", jokerId );
}
private Pair<Integer, Integer> getJokerId ()
{
return Pair.of( PCJ.getPhysicalNodeId(), PCJ.myId() );
}
}
|
[
"ebkahveci@gmail.com"
] |
ebkahveci@gmail.com
|
6d120835833732be77b601356d6140ae485e4f35
|
51d05106ddd3494f0b6098cc97653ffac4896b70
|
/lib/src/main/java/com/serotonin/bacnet4j/npdu/uart/UARTOutputStream.java
|
ac68e408195c919feb4524741338caccdbdd0ef4
|
[] |
no_license
|
cyf120209/motor
|
f6ed18d334abba370f5794d20a0328f0f56188de
|
c3f2a0c83439e5447c77bb0966744654d849d899
|
refs/heads/master
| 2021-09-22T14:33:26.528610
| 2018-08-30T08:26:46
| 2018-08-30T08:26:46
| 103,228,108
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,582
|
java
|
package com.serotonin.bacnet4j.npdu.uart;
import com.pi4j.io.spi.SpiDevice;
import java.io.IOException;
import java.io.OutputStream;
public class UARTOutputStream extends OutputStream{
// SPI device
public SpiDevice spi_0 = null;
public UARTInputStream inputStream = null;
public UARTOutputStream(SpiDevice spi, UARTInputStream inputStream) {
this.spi_0 = spi;
this.inputStream=inputStream;
}
public byte[] write(byte address, byte value) throws IOException {
byte start = (byte) (address << 3);
// create a data buffer and initialize a conversion request payload
byte data[] = new byte[]{
start, // first byte, start bit
value // third byte transmitted....don't care
};
// send conversion request to ADC chip via SPI channel
byte[] result = spi_0.write(data);
return result;
}
public void writeConfig(byte address, byte value) throws IOException {
byte start = (byte) (address << 3);
// create a data buffer and initialize a conversion request payload
byte data[] = new byte[]{
start, // first byte, start bit
value // third byte transmitted....don't care
};
// send conversion request to ADC chip via SPI channel
spi_0.write(data);
}
/**
*
* @return 如果为true, 说明发送寄存器内部有数据
* 如果为flase, 说明发送寄存器内部没数据
* @throws IOException
*/
private boolean readTHR() throws IOException {
boolean b = (byte) (read(Reg.LSR) & UART.THR_EMPTY_1) != UART.THR_EMPTY_1;
// System.out.println("------------"+b);
return b;
}
@Override
public void write(int b) throws IOException {
inputStream.setInputThread(false);
spi_0.write((byte) b);
inputStream.setInputThread(true);
}
public void write(byte[] value) throws IOException {
int sent = 0;
int size= 30;
//关闭接收
inputStream.setInputThread(false);
while (sent < value.length) {
boolean sentStatue = false;
//读取发送寄存器状态,如果忙,读取发送寄存器剩余空间,若大于设定值(size),就发送size个字节
while (readTHR() && !sentStatue){
if (read(Reg.TXLVL) > size){
sentStatue = true;
}
//中断
// if ((read(Reg.IIR)&0x02) != 0x02) {
// size = 10;
// }
}
if (value.length - sent > size) {
byte[] tmp = new byte[size+1];
tmp[0]=0;
System.arraycopy(value, sent, tmp, 1, size);
// send conversion request to ADC chip via SPI channel
writeBuffer(tmp);
sent+=size;
} else {
byte[] tmp = new byte[value.length-sent+1];
tmp[0]=0;
System.arraycopy(value, sent, tmp, 1, value.length-sent);
// send conversion request to ADC chip via SPI channel
writeBuffer(tmp);
sent=value.length;
}
}
//数据发送完,打开接收
inputStream.setInputThread(true);
}
private void writeBuffer(byte[] tmp) throws IOException {
// try {
// long last_nano = System.nanoTime();
spi_0.write(tmp);
// long nano = System.nanoTime();
// System.out.println(String.format("nano-last_nano_output % 10d",(nano-last_nano)));
// Thread.sleep(1);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
}
public byte read(byte address) throws IOException {
byte start = (byte) (0b10000000 | (address << 3));
// create a data buffer and initialize a conversion request payload
byte data[] = new byte[]{
start, // first byte, start bit
(byte) 0b11111111 // third byte transmitted....don't care
};
// send conversion request to ADC chip via SPI channel
byte[] result = spi_0.write(data);
return result[1];
}
@Override
public void flush() throws IOException {
super.flush();
}
}
|
[
"2445940439@qq.com"
] |
2445940439@qq.com
|
472595255ff58ae0cfb4f969a9318b17e3309264
|
ab8a34e5b821dde7b09abe37c838de046846484e
|
/twilio/sample-code-master/trunking/v1/trunk/create-default/create-default.7.x.java
|
c113278f2cb8e2d31b14ef8c1df02ed8a1b4837b
|
[] |
no_license
|
sekharfly/twilio
|
492b599fff62618437c87e05a6c201d6de94527a
|
a2847e4c79f9fbf5c53f25c8224deb11048fe94b
|
refs/heads/master
| 2020-03-29T08:39:00.079997
| 2018-09-21T07:20:24
| 2018-09-21T07:20:24
| 149,721,431
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 561
|
java
|
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.trunking.v1.Trunk;
public class Example {
// Find your Account Sid and Token at twilio.com/console
public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
public static final String AUTH_TOKEN = "your_auth_token";
public static void main(String[] args) {
Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
Trunk trunk = Trunk.creator().create();
System.out.println(trunk.getSid());
}
}
|
[
"sekharfly@gmail.com"
] |
sekharfly@gmail.com
|
f5d534a01021cf95e87f21e2b3bfde5c90b6cd51
|
2ded1865eeee0f5bb09e59c2bc2dd368b5009718
|
/org.datasphere.mdm.core/src/main/java/org/datasphere/mdm/core/service/impl/job/JobSchedulingComponent.java
|
dd6657ecacd8970c73acbb656b7d32a513d5f310
|
[] |
no_license
|
datasphere-oss/datasphere-mdm
|
4d0fcabaafc1acd05b0955e8bee4e695e9e8fd50
|
971079f105cf92951df658a187d34e88044ef5d4
|
refs/heads/main
| 2023-08-20T20:58:41.403280
| 2021-10-17T07:23:20
| 2021-10-17T07:23:20
| 417,416,422
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,677
|
java
|
package org.datasphere.mdm.core.service.impl.job;
import java.util.Objects;
import org.datasphere.mdm.core.context.JobDefinitionSchedulingContext;
import org.datasphere.mdm.core.service.job.JobCommonParameters;
import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.JobKey;
import org.quartz.SchedulerException;
import org.quartz.TriggerBuilder;
import org.quartz.TriggerKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.stereotype.Component;
/**
* @author Mikhail Mikhailov on Jul 5, 2021
*/
@Component
public class JobSchedulingComponent {
/**
* The logger.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(JobSchedulingComponent.class);
/**
* Local quartz group.
*/
private static final String QUARTZ_GROUP = "quartz-batch";
/**
* Quartz scheduler (cannot be accessed directly).
*/
@Autowired
private SchedulerFactoryBean schedulerFactoryBean;
/**
* Constructor.
*/
public JobSchedulingComponent() {
super();
}
/**
* Schedule unidata job.
*
* @param jobId Unidata job id.
* @param cronExpression Cron expression.
*/
public void schedule(JobDefinitionSchedulingContext ctx) {
try {
Objects.requireNonNull(ctx.getJobDefinitionId(), "Job definition id must not be null.");
JobBuilder jobBuilder = JobBuilder
.newJob(JobLauncherDetail.class)
.withIdentity(jobKey(ctx.getJobDefinitionId()))
.usingJobData("jobId", String.valueOf(ctx.getJobDefinitionId()));
if (Objects.nonNull(ctx.getParentJobExecutionId())) {
jobBuilder.usingJobData(JobCommonParameters.PARAM_PARENT_JOB_EXECUTION_ID, String.valueOf(ctx.getParentJobExecutionId()));
}
JobDetail jobDetail = jobBuilder.build();
CronTrigger trigger = TriggerBuilder.newTrigger()
.withIdentity(triggerKey(ctx.getJobDefinitionId()))
.withSchedule(CronScheduleBuilder.cronSchedule(ctx.getCronExpression()))
.build();
schedulerFactoryBean.getScheduler().scheduleJob(jobDetail, trigger);
LOGGER.info("Schedule job in quartz [jobId={}, triggerKey={}]", ctx.getJobDefinitionId(), trigger.getKey());
} catch (SchedulerException e) {
LOGGER.error("Failed to schedule quartz job: [{}]", ctx.getJobDefinitionId(), e);
}
}
/**
* @param jobId
*/
public void unschedule(JobDefinitionSchedulingContext ctx) {
try {
Objects.requireNonNull(ctx.getJobDefinitionId(), "Job definition id must not be null.");
TriggerKey key = triggerKey(ctx.getJobDefinitionId());
if (schedulerFactoryBean.getScheduler().checkExists(key)) {
schedulerFactoryBean.getScheduler().unscheduleJob(key);
LOGGER.info("Unschedule job in quartz [jobId={}, triggerKey={}]", ctx.getJobDefinitionId(), key);
}
} catch (SchedulerException e) {
LOGGER.error("Failed to unschedule job: " + ctx.getJobDefinitionId(), e);
}
}
private JobKey jobKey(Long jobId) {
return JobKey.jobKey("job-" + jobId, QUARTZ_GROUP);
}
private TriggerKey triggerKey(Long jobId) {
return TriggerKey.triggerKey("trigger-" + jobId, QUARTZ_GROUP);
}
}
|
[
"theseusyang@gmail.com"
] |
theseusyang@gmail.com
|
38d94c6d1711f6865626fc66d35e598a68c4ee0e
|
03513b58b6b98a89bba6223bd41626db147af254
|
/src/l1j/server/GameSystem/NpcTradeShop/ShopItem.java
|
77e5dc2bd0b38393bbd8815cc2099d791ad8b305
|
[] |
no_license
|
damageDown/ChoLong_KOR_Gamja_0805
|
9ea1ab6e3967fc95e546e163e8bd77f211696ad0
|
43261d5dde31b41a9852d19bfb3e09e7463793e6
|
refs/heads/master
| 2021-01-11T07:07:58.571241
| 2016-10-31T10:52:22
| 2016-10-31T10:52:22
| 72,427,743
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,268
|
java
|
package l1j.server.GameSystem.NpcTradeShop;
public class ShopItem {
public ShopItem() {
}
private int _npcid;
public int getNpcId() {
return _npcid;
}
public void setNpcId(int i) {
_npcid = i;
}
private int _x;
public int getX() {
return _x;
}
public void setX(int i) {
_x = i;
}
private int _y;
public int getY() {
return _y;
}
public void setY(int i) {
_y = i;
}
private short _mapid;
public short getMapId() {
return _mapid;
}
public void setMapId(short i) {
_mapid = i;
}
private byte _heading;
public byte getHeading() {
return _heading;
}
public void setHeading(byte i) {
_heading = i;
}
private String _title;
public String getTitle() {
return _title;
}
public void setTitle(String s) {
_title = s;
}
private int _price;
public int getPrice() {
return _price;
}
public void setPrice(int i) {
_price = i;
}
private int _itemId;
public int getItemId() {
return _itemId;
}
public void setItemId(int i) {
_itemId = i;
}
private int _enchant;
public int getEnchant() {
return _enchant;
}
public void setEnchant(int i) {
_enchant = i;
}
private String _msg;
public String getMsg() {
return _msg;
}
public void setMsg(String s) {
_msg = s;
}
}
|
[
"noorygo@gmail.com"
] |
noorygo@gmail.com
|
12a1db27b0143776289593c857637dfeba2b0599
|
39bef83f3a903f49344b907870feb10a3302e6e4
|
/Android Studio Projects/bf.io.openshop/src/bf/io/openshop/ux/dialogs/RestartDialogFragment$2.java
|
5e74f037eaeee40851b5f18556d87f1acadbb3e5
|
[] |
no_license
|
Killaker/Android
|
456acf38bc79030aff7610f5b7f5c1334a49f334
|
52a1a709a80778ec11b42dfe9dc1a4e755593812
|
refs/heads/master
| 2021-08-19T06:20:26.551947
| 2017-11-24T22:27:19
| 2017-11-24T22:27:19
| 111,960,738
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 258
|
java
|
package bf.io.openshop.ux.dialogs;
import android.content.*;
class RestartDialogFragment$2 implements DialogInterface$OnClickListener {
public void onClick(final DialogInterface dialogInterface, final int n) {
dialogInterface.dismiss();
}
}
|
[
"ema1986ct@gmail.com"
] |
ema1986ct@gmail.com
|
c42423ce43fafd2fbe0d33c19807557d3527278d
|
6ffae9d9fc04edb1c1d8fe39d2e6f0c01e39e443
|
/EIUM/src/main/java/com/myspring/eium/hm/hm_p0040/controller/HM_P0040ControllerImpl.java
|
0018d51c87fe6f44b1f6c9926071312d69f7372f
|
[] |
no_license
|
rexypark/Spring
|
8b5c3e1bb49164762e3f71d5112b35e19c5bb734
|
dd2a19b280742c1d0e718acb1a75ed7265c0c2c1
|
refs/heads/master
| 2022-12-23T09:59:21.396716
| 2020-02-27T10:13:35
| 2020-02-27T10:13:35
| 239,946,239
| 0
| 0
| null | 2022-12-16T09:43:37
| 2020-02-12T06:52:19
|
Java
|
UTF-8
|
Java
| false
| false
| 6,727
|
java
|
package com.myspring.eium.hm.hm_p0040.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.myspring.eium.hm.hm_p0040.service.HM_P0040Service;
import com.myspring.eium.hm.hm_p0040.vo.HM_P0040VO;
import com.myspring.eium.login.vo.LoginVO;
@Controller
public class HM_P0040ControllerImpl implements HM_P0040Controller{
private static final Logger logger = LoggerFactory.getLogger(HM_P0040ControllerImpl.class);
@Autowired
HM_P0040Service hM_P0040Service;
@Autowired
HM_P0040VO hM_P0040VO;
@Override
@RequestMapping(value = "hm/p0040/searchInit.do", method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView tabInit(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
ModelAndView mav = new ModelAndView("hm/hm_p0040/p0040_tab");
return mav;
}
@Override
@RequestMapping(value = "hm/p0040/searchInit2.do", method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView EduInit(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
ModelAndView mav = new ModelAndView("hm/hm_p0040/p0040_home1");
return mav;
}
@Override
@RequestMapping(value = "hm/p0040/searchInit3.do", method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView EdutargetInit(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
ModelAndView mav = new ModelAndView("hm/hm_p0040/p0040_home2");
return mav;
}
@Override
@RequestMapping(value = "hm/p0040/siteSearch_p01.do", method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView siteSearch_p01(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
ModelAndView mav = new ModelAndView("hm/hm_p0040/siteSearch_p01");
return mav;
}
@Override
@RequestMapping(value = "hm/p0040/departmentSearch_p02.do", method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView departmentSearch_p01(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
ModelAndView mav = new ModelAndView("hm/hm_p0040/departmentSearch_p02");
return mav;
}
@Override
@RequestMapping(value = "/hm/p0040/searchList.do", method = { RequestMethod.GET, RequestMethod.POST })
@ResponseBody
public Map searchList(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
Map<String, Object> searchMap = new HashMap<String, Object>(); // 검색조건
Map<String, Object> resultMap = new HashMap<String, Object>(); // 조회결과
HttpSession session = request.getSession();
LoginVO loginvo = new LoginVO();
loginvo = (LoginVO)session.getAttribute("login");
Map<String, Object> accessMap = new HashMap<String, Object>();
ArrayList<String> accessRange = new ArrayList<String>();
accessRange = (ArrayList<String>) session.getAttribute("access_range");
accessMap = (Map<String, Object>) session.getAttribute("accessnum");
int n = (Integer) accessMap.get("M021");
System.out.println(accessRange.get(n));
System.out.println("사원코드"+loginvo.getEmployee_code());
System.out.println("부서코드"+loginvo.getDepartment_code());
searchMap.put("access_range", accessRange.get(n));
searchMap.put("Semployee_code",loginvo.getEmployee_code());
searchMap.put("Sdepartment_code", loginvo.getDepartment_code());
searchMap.put("date", request.getParameter("date"));
searchMap.put("date2", request.getParameter("date2"));
searchMap.put("site", request.getParameter("site"));
searchMap.put("department", request.getParameter("department"));
List<HM_P0040VO> data = hM_P0040Service.searchList(searchMap);
resultMap.put("Data", data);
return resultMap;
}
@Override
@RequestMapping(value = "/hm/p0040/searchEmployee.do", method = { RequestMethod.GET, RequestMethod.POST })
@ResponseBody
public Map searchEmployee(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
Map<String, Object> searchMap = new HashMap<String, Object>(); // 검색조건
Map<String, Object> resultMap = new HashMap<String, Object>(); // 조회결과
searchMap.put("param", request.getParameter("param"));
List<HM_P0040VO> data = hM_P0040Service.searchEmployee(searchMap);
resultMap.put("Data", data);
return resultMap;
}
@Override
@RequestMapping(value = "/hm/p0040/searchTraining.do", method = { RequestMethod.GET, RequestMethod.POST })
@ResponseBody
public Map searchTraining(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
Map<String, Object> searchMap = new HashMap<String, Object>(); // 검색조건
Map<String, Object> resultMap = new HashMap<String, Object>(); // 조회결과
searchMap.put("date", request.getParameter("date"));
searchMap.put("date2", request.getParameter("date2"));
searchMap.put("site", request.getParameter("site"));
searchMap.put("department", request.getParameter("department"));
List<HM_P0040VO> data = hM_P0040Service.searchTraining(searchMap);
resultMap.put("Data", data);
return resultMap;
}
@Override
@RequestMapping(value = "/hm/p0040/searchEmployeeList.do", method = { RequestMethod.GET, RequestMethod.POST })
@ResponseBody
public Map searchEmployeeList(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("utf-8");
Map<String, Object> searchMap = new HashMap<String, Object>(); // 검색조건
Map<String, Object> resultMap = new HashMap<String, Object>(); // 조회결과
searchMap.put("param", request.getParameter("param"));
List<HM_P0040VO> data = hM_P0040Service.searchEmployeeList(searchMap);
resultMap.put("Data", data);
return resultMap;
}
}
|
[
"hotboa3091@naver.com"
] |
hotboa3091@naver.com
|
fbf38fa8edb5267ac3e9093e2727357ac02c4231
|
c4478e86a553c6e704ed240717c0768a05ac304c
|
/wyd_app/app/src/main/java/com/vtech/app/moudle/main/MainContract.java
|
d1b5926cbd19f9351c32e6ae139b4f1bfab12d7a
|
[] |
no_license
|
sengeiou/Iot_Program
|
6e3d38de3107947e2ed35e3b3deb8ec32904e76e
|
dffc4b83c3750fd3099cfe2b528acdf07ce6c80c
|
refs/heads/master
| 2022-11-19T15:13:52.401690
| 2020-07-17T17:35:09
| 2020-07-17T17:35:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package com.vtech.app.moudle.main;
import android.support.v4.app.Fragment;
import com.vtech.app.data.bean.WeatherBean;
import com.vtech.app.moudle.BasePresenter;
import com.vtech.app.moudle.BaseView;
public interface MainContract {
interface View extends BaseView<Presenter> {
void updateWeather(WeatherBean bean);
}
interface Presenter extends BasePresenter {
void getWeather(Fragment fragment);
void setSafeBroadcast(int status);
}
}
|
[
"1102743539@qq.com"
] |
1102743539@qq.com
|
c0d0538e404901d751555a7c10807c18083f9f43
|
d5f09c7b0e954cd20dd613af600afd91b039c48a
|
/sources/com/coolapk/market/view/goodsList/AddToGoodsListDialogFragment.java
|
1754343fab75d0d88d685a4425eccd60a2548e81
|
[] |
no_license
|
t0HiiBwn/CoolapkRelease
|
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
|
a6a2b03e32cde0e5163016e0078391271a8d33ab
|
refs/heads/main
| 2022-07-29T23:28:35.867734
| 2021-03-26T11:41:18
| 2021-03-26T11:41:18
| 345,290,891
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,794
|
java
|
package com.coolapk.market.view.goodsList;
import android.app.Dialog;
import android.os.Bundle;
import com.coolapk.market.databinding.AddGoodsItemDialogBinding;
import com.coolapk.market.view.base.BaseDialogFragment;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u0000 \t2\u00020\u0001:\u0001\tB\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\bH\u0016R\u000e\u0010\u0003\u001a\u00020\u0004X.¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/coolapk/market/view/goodsList/AddToGoodsListDialogFragment;", "Lcom/coolapk/market/view/base/BaseDialogFragment;", "()V", "binding", "Lcom/coolapk/market/databinding/AddGoodsItemDialogBinding;", "onCreateDialog", "Landroid/app/Dialog;", "savedInstanceState", "Landroid/os/Bundle;", "Companion", "presentation_coolapkAppRelease"}, k = 1, mv = {1, 4, 2})
/* compiled from: AddToGoodsListDialogFragment.kt */
public final class AddToGoodsListDialogFragment extends BaseDialogFragment {
public static final Companion Companion = new Companion(null);
private AddGoodsItemDialogBinding binding;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0006\u0010\u0003\u001a\u00020\u0004¨\u0006\u0005"}, d2 = {"Lcom/coolapk/market/view/goodsList/AddToGoodsListDialogFragment$Companion;", "", "()V", "newInstance", "Lcom/coolapk/market/view/goodsList/AddToGoodsListDialogFragment;", "presentation_coolapkAppRelease"}, k = 1, mv = {1, 4, 2})
/* compiled from: AddToGoodsListDialogFragment.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final AddToGoodsListDialogFragment newInstance() {
Bundle bundle = new Bundle();
AddToGoodsListDialogFragment addToGoodsListDialogFragment = new AddToGoodsListDialogFragment();
addToGoodsListDialogFragment.setArguments(bundle);
return addToGoodsListDialogFragment;
}
}
@Override // androidx.fragment.app.DialogFragment
public Dialog onCreateDialog(Bundle bundle) {
Dialog onCreateDialog = super.onCreateDialog(bundle);
Intrinsics.checkNotNullExpressionValue(onCreateDialog, "super.onCreateDialog(savedInstanceState)");
return onCreateDialog;
}
}
|
[
"test@gmail.com"
] |
test@gmail.com
|
61a89a79037266b9c042a7bf94c1bb279ad3ffe7
|
10186b7d128e5e61f6baf491e0947db76b0dadbc
|
/org/apache/http/cookie/CookieOrigin.java
|
aefdfda328ddebd329e838d6d051ada7c40be88e
|
[
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
MewX/contendo-viewer-v1.6.3
|
7aa1021e8290378315a480ede6640fd1ef5fdfd7
|
69fba3cea4f9a43e48f43148774cfa61b388e7de
|
refs/heads/main
| 2022-07-30T04:51:40.637912
| 2021-03-28T05:06:26
| 2021-03-28T05:06:26
| 351,630,911
| 2
| 0
|
Apache-2.0
| 2021-10-12T22:24:53
| 2021-03-26T01:53:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,456
|
java
|
/* */ package org.apache.http.cookie;
/* */
/* */ import java.util.Locale;
/* */ import org.apache.http.annotation.Contract;
/* */ import org.apache.http.annotation.ThreadingBehavior;
/* */ import org.apache.http.util.Args;
/* */ import org.apache.http.util.TextUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Contract(threading = ThreadingBehavior.IMMUTABLE)
/* */ public final class CookieOrigin
/* */ {
/* */ private final String host;
/* */ private final int port;
/* */ private final String path;
/* */ private final boolean secure;
/* */
/* */ public CookieOrigin(String host, int port, String path, boolean secure) {
/* 52 */ Args.notBlank(host, "Host");
/* 53 */ Args.notNegative(port, "Port");
/* 54 */ Args.notNull(path, "Path");
/* 55 */ this.host = host.toLowerCase(Locale.ROOT);
/* 56 */ this.port = port;
/* 57 */ if (!TextUtils.isBlank(path)) {
/* 58 */ this.path = path;
/* */ } else {
/* 60 */ this.path = "/";
/* */ }
/* 62 */ this.secure = secure;
/* */ }
/* */
/* */ public String getHost() {
/* 66 */ return this.host;
/* */ }
/* */
/* */ public String getPath() {
/* 70 */ return this.path;
/* */ }
/* */
/* */ public int getPort() {
/* 74 */ return this.port;
/* */ }
/* */
/* */ public boolean isSecure() {
/* 78 */ return this.secure;
/* */ }
/* */
/* */
/* */ public String toString() {
/* 83 */ StringBuilder buffer = new StringBuilder();
/* 84 */ buffer.append('[');
/* 85 */ if (this.secure) {
/* 86 */ buffer.append("(secure)");
/* */ }
/* 88 */ buffer.append(this.host);
/* 89 */ buffer.append(':');
/* 90 */ buffer.append(Integer.toString(this.port));
/* 91 */ buffer.append(this.path);
/* 92 */ buffer.append(']');
/* 93 */ return buffer.toString();
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/http/cookie/CookieOrigin.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"xiayuanzhong+gpg2020@gmail.com"
] |
xiayuanzhong+gpg2020@gmail.com
|
2235237fb8a701187d169b819b4a65791357cfea
|
863acb02a064a0fc66811688a67ce3511f1b81af
|
/sources/com/mopub/volley/VolleyLog.java
|
2cc0ce3e29de2d89bdaac9b14ef48ec6783a3baa
|
[
"MIT"
] |
permissive
|
Game-Designing/Custom-Football-Game
|
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
|
47283462b2066ad5c53b3c901182e7ae62a34fc8
|
refs/heads/master
| 2020-08-04T00:02:04.876780
| 2019-10-06T06:55:08
| 2019-10-06T06:55:08
| 211,914,568
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,140
|
java
|
package com.mopub.volley;
import android.os.SystemClock;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public class VolleyLog {
public static boolean DEBUG = Log.isLoggable(TAG, 2);
public static String TAG = "Volley";
/* renamed from: a */
private static final String f36461a = VolleyLog.class.getName();
/* renamed from: com.mopub.volley.VolleyLog$a */
static class C11684a {
public static final boolean ENABLED = VolleyLog.DEBUG;
/* renamed from: a */
private final List<C11685a> f36462a = new ArrayList();
/* renamed from: b */
private boolean f36463b = false;
/* renamed from: com.mopub.volley.VolleyLog$a$a */
private static class C11685a {
public final String name;
public final long thread;
public final long time;
public C11685a(String name2, long thread2, long time2) {
this.name = name2;
this.thread = thread2;
this.time = time2;
}
}
C11684a() {
}
public synchronized void add(String name, long threadId) {
if (!this.f36463b) {
List<C11685a> list = this.f36462a;
C11685a aVar = new C11685a(name, threadId, SystemClock.elapsedRealtime());
list.add(aVar);
} else {
throw new IllegalStateException("Marker added to finished log");
}
}
public synchronized void finish(String header) {
synchronized (this) {
this.f36463b = true;
long duration = m38607a();
if (duration > 0) {
long prevTime = ((C11685a) this.f36462a.get(0)).time;
VolleyLog.m38603d("(%-4d ms) %s", Long.valueOf(duration), header);
for (C11685a marker : this.f36462a) {
long thisTime = marker.time;
VolleyLog.m38603d("(+%-4d) [%2d] %s", Long.valueOf(thisTime - prevTime), Long.valueOf(marker.thread), marker.name);
prevTime = thisTime;
}
}
}
}
/* access modifiers changed from: protected */
public void finalize() throws Throwable {
if (!this.f36463b) {
finish("Request on the loose");
VolleyLog.m38604e("Marker log finalized without finish() - uncaught exit point for request", new Object[0]);
}
}
/* renamed from: a */
private long m38607a() {
if (this.f36462a.size() == 0) {
return 0;
}
long first = ((C11685a) this.f36462a.get(0)).time;
List<C11685a> list = this.f36462a;
return ((C11685a) list.get(list.size() - 1)).time - first;
}
}
public static void setTag(String tag) {
m38603d("Changing log tag to %s", tag);
TAG = tag;
DEBUG = Log.isLoggable(TAG, 2);
}
/* renamed from: v */
public static void m38606v(String format, Object... args) {
if (DEBUG) {
Log.v(TAG, m38602a(format, args));
}
}
/* renamed from: d */
public static void m38603d(String format, Object... args) {
Log.d(TAG, m38602a(format, args));
}
/* renamed from: e */
public static void m38604e(String format, Object... args) {
Log.e(TAG, m38602a(format, args));
}
/* renamed from: e */
public static void m38605e(Throwable tr, String format, Object... args) {
Log.e(TAG, m38602a(format, args), tr);
}
public static void wtf(String format, Object... args) {
Log.wtf(TAG, m38602a(format, args));
}
public static void wtf(Throwable tr, String format, Object... args) {
Log.wtf(TAG, m38602a(format, args), tr);
}
/* renamed from: a */
private static String m38602a(String format, Object... args) {
String msg = args == null ? format : String.format(Locale.US, format, args);
StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace();
String caller = "<unknown>";
int i = 2;
while (true) {
if (i >= trace.length) {
break;
} else if (!trace[i].getClassName().equals(f36461a)) {
String callingClass = trace[i].getClassName();
String callingClass2 = callingClass.substring(callingClass.lastIndexOf(46) + 1);
String callingClass3 = callingClass2.substring(callingClass2.lastIndexOf(36) + 1);
StringBuilder sb = new StringBuilder();
sb.append(callingClass3);
sb.append(".");
sb.append(trace[i].getMethodName());
caller = sb.toString();
break;
} else {
i++;
}
}
return String.format(Locale.US, "[%d] %s: %s", new Object[]{Long.valueOf(Thread.currentThread().getId()), caller, msg});
}
}
|
[
"tusharchoudhary0003@gmail.com"
] |
tusharchoudhary0003@gmail.com
|
75a07a3c91f33f4a33012c43f8dddd33b1ce5b71
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_2b2d635810f5975bfc61eeb117f049570d8274f3/JoinTest/8_2b2d635810f5975bfc61eeb117f049570d8274f3_JoinTest_s.java
|
b8fa6ff9e4f4eb2d9a41ebd95d77b44bdcaafb42
|
[] |
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
| 6,892
|
java
|
/**
* Copyright (C) FuseSource, Inc.
* http://fusesource.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fusesource.fabric.itests.paxexam;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import org.apache.curator.framework.CuratorFramework;
import org.apache.karaf.admin.AdminService;
import org.fusesource.fabric.api.Container;
import org.fusesource.fabric.api.FabricService;
import org.fusesource.fabric.itests.paxexam.support.FabricTestSupport;
import org.fusesource.fabric.itests.paxexam.support.Provision;
import org.fusesource.tooling.testing.pax.exam.karaf.ServiceLocator;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.MavenUtils;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.ExamReactorStrategy;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
import org.ops4j.pax.exam.options.DefaultCompositeOption;
import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.editConfigurationFilePut;
@RunWith(JUnit4TestRunner.class)
@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
public class JoinTest extends FabricTestSupport {
private static final String WAIT_FOR_JOIN_SERVICE = "wait-for-service org.fusesource.fabric.boot.commands.service.Join";
@After
public void tearDown() throws InterruptedException {
}
@Test
public void testJoin() throws Exception {
System.err.println(executeCommand("fabric:create -n"));
FabricService fabricService = getFabricService();
AdminService adminService = ServiceLocator.getOsgiService(AdminService.class);
String version = System.getProperty("fabric.version");
System.err.println(executeCommand("admin:create --featureURL mvn:org.fusesource.fabric/fuse-fabric/" + version + "/xml/features --feature fabric-boot-commands child1"));
try {
System.err.println(executeCommand("admin:start child1"));
Thread.sleep(DEFAULT_TIMEOUT);
System.err.println(executeCommand("admin:list"));
String joinCommand = "fabric:join -f --zookeeper-password "+ fabricService.getZookeeperPassword() +" " + fabricService.getZookeeperUrl();
System.err.println(executeCommand("ssh -l karaf -P karaf -p " + adminService.getInstance("child1").getSshPort() + " localhost " + WAIT_FOR_JOIN_SERVICE));
System.err.println(executeCommand("ssh -l karaf -P karaf -p " + adminService.getInstance("child1").getSshPort() + " localhost " + joinCommand));
Provision.containersExist(Arrays.asList("child1"), PROVISION_TIMEOUT);
Container child1 = fabricService.getContainer("child1");
waitForProvisionSuccess(child1, PROVISION_TIMEOUT, TimeUnit.MILLISECONDS);
System.err.println(executeCommand("fabric:container-list"));
} finally {
System.err.println(executeCommand("admin:stop child1"));
}
}
/**
* This is a test for FABRIC-353.
*
* @throws Exception
*/
@Test
public void testJoinAndAddToEnsemble() throws Exception {
System.err.println(executeCommand("fabric:create -n"));
FabricService fabricService = getFabricService();
AdminService adminService = ServiceLocator.getOsgiService(AdminService.class);
String version = System.getProperty("fabric.version");
System.err.println(executeCommand("admin:create --featureURL mvn:org.fusesource.fabric/fuse-fabric/" + version + "/xml/features --feature fabric-boot-commands child1"));
System.err.println(executeCommand("admin:create --featureURL mvn:org.fusesource.fabric/fuse-fabric/" + version + "/xml/features --feature fabric-boot-commands child2"));
try {
System.err.println(executeCommand("admin:start child1"));
System.err.println(executeCommand("admin:start child2"));
Thread.sleep(DEFAULT_TIMEOUT);
System.err.println(executeCommand("admin:list"));
String joinCommand = "fabric:join -f --zookeeper-password "+ fabricService.getZookeeperPassword() +" " + fabricService.getZookeeperUrl();
System.err.println(executeCommand("ssh -l karaf -P karaf -p " + adminService.getInstance("child1").getSshPort() + " localhost " + WAIT_FOR_JOIN_SERVICE));
System.err.println(executeCommand("ssh -l karaf -P karaf -p " + adminService.getInstance("child1").getSshPort() + " localhost " + joinCommand));
System.err.println(executeCommand("ssh -l karaf -P karaf -p " + adminService.getInstance("child2").getSshPort() + " localhost " + WAIT_FOR_JOIN_SERVICE));
System.err.println(executeCommand("ssh -l karaf -P karaf -p " + adminService.getInstance("child2").getSshPort() + " localhost " + joinCommand));
Provision.containersExist(Arrays.asList("child1", "child2"), PROVISION_TIMEOUT);
Container child1 = fabricService.getContainer("child1");
Container child2 = fabricService.getContainer("child2");
waitForProvisionSuccess(child1, PROVISION_TIMEOUT, TimeUnit.MILLISECONDS);
waitForProvisionSuccess(child2, PROVISION_TIMEOUT, TimeUnit.MILLISECONDS);
System.err.println(executeCommand("fabric:ensemble-add --force child1 child2"));
Thread.sleep(5000);
getCurator().getZookeeperClient().blockUntilConnectedOrTimedOut();
System.err.println(executeCommand("fabric:container-list"));
System.err.println(executeCommand("fabric:ensemble-remove --force child1 child2"));
Thread.sleep(5000);
getCurator().getZookeeperClient().blockUntilConnectedOrTimedOut();
System.err.println(executeCommand("fabric:container-list"));
} finally {
System.err.println(executeCommand("admin:stop child1"));
System.err.println(executeCommand("admin:stop child2"));
}
}
@Configuration
public Option[] config() {
return new Option[]{
new DefaultCompositeOption(fabricDistributionConfiguration()),
//debugConfiguration("5005", false),
editConfigurationFilePut("etc/system.properties", "karaf.name", "myroot"),
editConfigurationFilePut("etc/system.properties", "fabric.version", MavenUtils.getArtifactVersion("org.fusesource.fabric", "fuse-fabric"))
};
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f28261fa6ee8a1a2af15a3f5f889c8fadc7d0289
|
b9bbf346eddd7707178d282a377ac7d68b1b3454
|
/redisson/src/main/java/org/redisson/rx/RedissonSetCacheRx.java
|
d5ba58e5e3037e6c58b194ee2b4b8649f30c7f98
|
[
"Apache-2.0"
] |
permissive
|
a100q100/redisson
|
9d355516a4d43285356b24e7011973b64730c1d7
|
9b30cf008882f9c3a00efd6ec7971ac734609a28
|
refs/heads/master
| 2020-04-05T07:38:11.513734
| 2018-11-08T08:42:23
| 2018-11-08T08:42:23
| 156,683,160
| 1
| 0
|
Apache-2.0
| 2018-11-08T09:35:42
| 2018-11-08T09:35:42
| null |
UTF-8
|
Java
| false
| false
| 1,746
|
java
|
/**
* Copyright 2018 Nikita Koksharov
*
* 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.redisson.rx;
import org.reactivestreams.Publisher;
import org.redisson.ScanIterator;
import org.redisson.api.RFuture;
import org.redisson.api.RSetCache;
import org.redisson.client.RedisClient;
import org.redisson.client.protocol.decoder.ListScanResult;
/**
*
* @author Nikita Koksharov
*
* @param <V> value
*/
public class RedissonSetCacheRx<V> {
private final RSetCache<V> instance;
public RedissonSetCacheRx(RSetCache<V> instance) {
this.instance = instance;
}
public Publisher<V> iterator() {
return new SetRxIterator<V>() {
@Override
protected RFuture<ListScanResult<Object>> scanIterator(RedisClient client, long nextIterPos) {
return ((ScanIterator)instance).scanIteratorAsync(instance.getName(), client, nextIterPos, null, 10);
}
}.create();
}
public Publisher<Boolean> addAll(Publisher<? extends V> c) {
return new PublisherAdder<V>() {
@Override
public RFuture<Boolean> add(Object o) {
return instance.addAsync((V)o);
}
}.addAll(c);
}
}
|
[
"abracham.mitchell@gmail.com"
] |
abracham.mitchell@gmail.com
|
ece0525cd1e2c7cc5f3311e52e169a64c9a985d6
|
704a82a7804859b241c4725539e92d785629cff8
|
/app/src/main/java/toong/vn/androidobserverpattern/observerble/Observable.java
|
d113b32b3ba6ed5e054b3658c97a2a5d932e2a7a
|
[] |
no_license
|
PhanVanLinh/AndroidObserverPattern
|
06c28603348f0773773003404fa0ecf8c8991055
|
95878287fee3015ff4a18aaf7199bf3acabce8f6
|
refs/heads/master
| 2021-09-10T05:11:52.163022
| 2018-03-21T02:44:04
| 2018-03-21T03:10:32
| 126,113,272
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package toong.vn.androidobserverpattern.observerble;
import toong.vn.androidobserverpattern.observer.Observer;
public interface Observable {
void registerObserver(Observer o);
void removeObserver(Observer o);
void notifyObservers(); // phương thức này được gọi để thông báo cho tất cả các observer một khi trạng thái của Observable được thay đổi.
}
|
[
"phanvanlinh.94vn@gmail.com"
] |
phanvanlinh.94vn@gmail.com
|
7c3c27155dee7368bcb5b48a5c4c3291e81b587c
|
7ce60ae831a4afcefe30b149ad5aa2a01c61280d
|
/Test Data/Comp401F17/Assignment9/Test0, Student(tstudent0)/Submission attachment(s)/Assignment9Final/Assignment9Final/src/grail/commandBeans/PassCommand.java
|
b36ae6b2271ef5b59335f996c2a518c5708d376c
|
[] |
no_license
|
pdewan/Comp401AllChecks
|
ed967cb535f1bf8c6d7777b7ca53bd6e810e5ba1
|
86d995defcdde2766329a6db37fdb7a54c70da4a
|
refs/heads/master
| 2023-06-26T13:01:27.009697
| 2023-06-12T06:05:01
| 2023-06-12T06:05:01
| 66,742,312
| 0
| 0
| null | 2022-06-30T14:43:42
| 2016-08-28T00:49:37
|
Java
|
UTF-8
|
Java
| false
| false
| 513
|
java
|
package grail.commandBeans;
import grail.tokenBeans.WordToken;
import util.annotations.EditablePropertyNames;
import util.annotations.PropertyNames;
import util.annotations.StructurePattern;
import util.annotations.StructurePatternNames;
import util.annotations.Tags;
@Tags({"Pass"})
@StructurePattern(StructurePatternNames.BEAN_PATTERN)
@PropertyNames({"Input", "Value"})
@EditablePropertyNames({"Input"})
public class PassCommand extends WordToken {
public PassCommand(String input) {
super(input);
}
}
|
[
"avitkus7@gmail.com"
] |
avitkus7@gmail.com
|
738d0ced3f78bee8e7d9ca787e6718f8f1445f19
|
ec01cfd2218d326b11c01cb01fcb2dc03d9527cf
|
/src/cargo/market/action/OrderCartAction.java
|
ce566cb896bee366f15bd57cf7c214864bd15277
|
[] |
no_license
|
cargo-storage/Team2
|
9092f96ac3e75f6ec840c09e0edbb851965ad7a4
|
aeeaa298cccdc6321bf20a22b4005cebea20dec6
|
refs/heads/master
| 2020-06-05T13:08:56.061872
| 2019-08-09T05:31:26
| 2019-08-09T05:31:26
| 192,447,012
| 0
| 3
| null | 2019-08-09T04:51:27
| 2019-06-18T01:59:37
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,422
|
java
|
package cargo.market.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import cargo.common.action.Action;
import cargo.common.action.ActionForward;
import cargo.market.DAO.MarketDAO;
import cargo.market.DTO.Cart;
import cargo.market.DTO.CartDTO;
public class OrderCartAction implements Action {
@Override
public ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("UTF-8");
String email = request.getParameter("email");
MarketDAO mdao = new MarketDAO();
String order_id;
HttpSession session = request.getSession();
Cart cart = (Cart) session.getAttribute("cart");
List<CartDTO> clist = cart.getItemList();
if(request.getParameter("id")==""){// 카트전체주문
System.out.println("전체주문");
order_id = mdao.insertMOrder(email, clist);
}else{// 부분주문 아이디값 있음!
System.out.println("선택주문");
String id = request.getParameter("id");
String[] idArray = id.split(",");
order_id = mdao.insertMOrder(email, clist, idArray);
}
ActionForward forward = new ActionForward();
forward.setPath("../mk/confirmOrder.do");
request.setAttribute("order_id", order_id);
return forward;
}
}
|
[
"ITWILL@DESKTOP-BFHD141"
] |
ITWILL@DESKTOP-BFHD141
|
8ea2b5c630ad181921a80913196e53f2f09a2af1
|
46167791cbfeebc8d3ddc97112764d7947fffa22
|
/quarkus/src/main/java/com/justexample/repository/Entity0485Repository.java
|
037de15d600a7fd29824aa193fb6376cab7c732e
|
[] |
no_license
|
kahlai/unrealistictest
|
4f668b4822a25b4c1f06c6b543a26506bb1f8870
|
fe30034b05f5aacd0ef69523479ae721e234995c
|
refs/heads/master
| 2023-08-25T09:32:16.059555
| 2021-11-09T08:17:22
| 2021-11-09T08:17:22
| 425,726,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 244
|
java
|
package com.example.repository;
import java.util.List;
import com.example.entity.Entity0485;
import org.springframework.data.jpa.repository.JpaRepository;
public interface Entity0485Repository extends JpaRepository<Entity0485,Long>{
}
|
[
"laikahhoe@gmail.com"
] |
laikahhoe@gmail.com
|
527735ea5886fbcc6e61ae5376d495aac5c3df98
|
56ba6b4df181285a58fc05d585ca68455750d0ec
|
/cards/src/main/java/org/rnd/jmagic/cards/PlatedGeopede.java
|
68d1ec88edaa63b2eaf5a3fab2dfaba79c4e572b
|
[] |
no_license
|
ranjan-rk/jmagic
|
a5454f92afba9c24b494231915ce750734564239
|
4c1f6f93081de64cba7db7bd87f843fa8914a2a0
|
refs/heads/master
| 2021-01-18T06:30:38.871143
| 2013-07-22T19:50:51
| 2013-07-22T19:50:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 591
|
java
|
package org.rnd.jmagic.cards;
import org.rnd.jmagic.engine.*;
@Name("Plated Geopede")
@Types({Type.CREATURE})
@SubTypes({SubType.INSECT})
@ManaCost("1R")
@Printings({@Printings.Printed(ex = Expansion.ZENDIKAR, r = Rarity.COMMON)})
@ColorIdentity({Color.RED})
public final class PlatedGeopede extends Card
{
public PlatedGeopede(GameState state)
{
super(state);
this.setPower(1);
this.setToughness(1);
this.addAbility(new org.rnd.jmagic.abilities.keywords.FirstStrike(state));
this.addAbility(new org.rnd.jmagic.abilities.LandfallForPump(state, this.getName(), +2, +2));
}
}
|
[
"robyter@gmail"
] |
robyter@gmail
|
96e3952bb2db176128e7bc18036890f5d0c16284
|
a2f07a3cbf878da5535ab5cb93d9306ad42ad607
|
/service/catalog-service/src/main/java/com/meiduimall/service/catalog/mapper/SysitemItemRecommendMapper.java
|
e89b78bf43fcb5c2396cc9b3ab7ea17b6b9022d4
|
[] |
no_license
|
neaos/mall
|
60af0022101b158049cddaf8ea00c66aa7288abc
|
07982826af767ef6fbfebc13d67dfba4dfc5ccc7
|
refs/heads/master
| 2021-07-02T10:33:46.117180
| 2017-09-21T14:31:26
| 2017-09-21T14:31:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 534
|
java
|
package com.meiduimall.service.catalog.mapper;
import com.meiduimall.service.catalog.entity.SysitemItemRecommend;
public interface SysitemItemRecommendMapper {
int deleteByPrimaryKey(Integer id);
int insert(SysitemItemRecommend record);
int insertSelective(SysitemItemRecommend record);
SysitemItemRecommend selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysitemItemRecommend record);
int updateByPrimaryKeyWithBLOBs(SysitemItemRecommend record);
int updateByPrimaryKey(SysitemItemRecommend record);
}
|
[
"326800567@qq.com"
] |
326800567@qq.com
|
cbe1ddd54070d10c89a7f7dc187bc37916f36952
|
732182a102a07211f7c1106a1b8f409323e607e0
|
/gsd/externs/cfg/lottery/LotteryTextureDetail.java
|
f3340d683b2e469bcd8451b7a490ddc0aa8f434d
|
[] |
no_license
|
BanyLee/QYZ_Server
|
a67df7e7b4ec021d0aaa41cfc7f3bd8c7f1af3da
|
0eeb0eb70e9e9a1a06306ba4f08267af142957de
|
refs/heads/master
| 2021-09-13T22:32:27.563172
| 2018-05-05T09:20:55
| 2018-05-05T09:20:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 670
|
java
|
package cfg.lottery;
public final class LotteryTextureDetail extends cfg.CfgObject {
public final static int TYPEID = -1440138382;
final public int getTypeId() { return TYPEID; }
public final boolean showdesc;
public final String desc;
public final int freetype;
public final int type;
public final boolean iscooldown;
public final boolean isdaylimit;
public final boolean canuseitem;
public LotteryTextureDetail(cfg.DataStream fs) {
this.showdesc = fs.getBool();
this.desc = fs.getString();
this.freetype = fs.getInt();
this.type = fs.getInt();
this.iscooldown = fs.getBool();
this.isdaylimit = fs.getBool();
this.canuseitem = fs.getBool();
}
}
|
[
"hadowhadow@gmail.com"
] |
hadowhadow@gmail.com
|
2faeccc0144a0c6a1a48c31c6fdcaec894415232
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/x/src/main/java/org.wp.x/ui/stats/SparseBooleanArrayParcelable.java
|
2bd33f93c71faa4883a68b788746ef14cbae5a34
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 1,815
|
java
|
package org.wp.x.ui.stats;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseBooleanArray;
public class SparseBooleanArrayParcelable extends SparseBooleanArray implements Parcelable {
public static Parcelable.Creator<SparseBooleanArrayParcelable> CREATOR = new Parcelable.Creator<SparseBooleanArrayParcelable>() {
@Override
public SparseBooleanArrayParcelable createFromParcel(Parcel source) {
SparseBooleanArrayParcelable read = new SparseBooleanArrayParcelable();
int size = source.readInt();
int[] keys = new int[size];
boolean[] values = new boolean[size];
source.readIntArray(keys);
source.readBooleanArray(values);
for (int i = 0; i < size; i++) {
read.put(keys[i], values[i]);
}
return read;
}
@Override
public SparseBooleanArrayParcelable[] newArray(int size) {
return new SparseBooleanArrayParcelable[size];
}
};
public SparseBooleanArrayParcelable() {
}
public SparseBooleanArrayParcelable(SparseBooleanArray sparseBooleanArray) {
for (int i = 0; i < sparseBooleanArray.size(); i++) {
this.put(sparseBooleanArray.keyAt(i), sparseBooleanArray.valueAt(i));
}
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
int[] keys = new int[size()];
boolean[] values = new boolean[size()];
for (int i = 0; i < size(); i++) {
keys[i] = keyAt(i);
values[i] = valueAt(i);
}
dest.writeInt(size());
dest.writeIntArray(keys);
dest.writeBooleanArray(values);
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e34aa95e9ad4296644f3f9ced541b22e6e3e8dab
|
0175a417f4b12b80cc79edbcd5b7a83621ee97e5
|
/flexodesktop/model/flexofoundation/src/main/java/org/openflexo/foundation/action/ActionMenu.java
|
6908e024ab0efefd805e927595b019411b7555d1
|
[] |
no_license
|
agilebirds/openflexo
|
c1ea42996887a4a171e81ddbd55c7c1e857cbad0
|
0250fc1061e7ae86c9d51a6f385878df915db20b
|
refs/heads/master
| 2022-08-06T05:42:04.617144
| 2013-05-24T13:15:58
| 2013-05-24T13:15:58
| 2,372,131
| 11
| 6
| null | 2022-07-06T19:59:55
| 2011-09-12T15:44:45
|
Java
|
UTF-8
|
Java
| false
| false
| 2,028
|
java
|
/*
* (c) Copyright 2010-2011 AgileBirds
*
* This file is part of OpenFlexo.
*
* OpenFlexo 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.
*
* OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.openflexo.foundation.action;
import javax.swing.Icon;
import org.openflexo.localization.FlexoLocalization;
public class ActionMenu {
private ActionGroup _actionGroup;
private String _actionMenuName;
private Icon _smallIcon;
protected ActionMenu(String actionMenuName) {
super();
_actionMenuName = actionMenuName;
}
protected ActionMenu(String actionMenuName, Icon icon) {
this(actionMenuName);
setSmallIcon(icon);
}
public ActionMenu(String actionMenuName, ActionGroup actionGroup) {
this(actionMenuName);
setActionGroup(actionGroup);
}
protected ActionMenu(String actionMenuName, ActionGroup actionGroup, Icon icon) {
this(actionMenuName, actionGroup);
setSmallIcon(icon);
}
public String getUnlocalizedName() {
return _actionMenuName;
}
public String getLocalizedName() {
return FlexoLocalization.localizedForKey(_actionMenuName);
}
public String getLocalizedDescription() {
return FlexoLocalization.localizedForKey(_actionMenuName + "_description");
}
public Icon getSmallIcon() {
return _smallIcon;
}
public void setSmallIcon(Icon smallIcon) {
_smallIcon = smallIcon;
}
public ActionGroup getActionGroup() {
return _actionGroup;
}
public void setActionGroup(ActionGroup actionGroup) {
_actionGroup = actionGroup;
}
}
|
[
"guillaume.polet@gmail.com"
] |
guillaume.polet@gmail.com
|
278104cbc63a0681200c2d13e64b70fd6f4a73ce
|
03f48863c46734d45c327813050d42df295fc1e6
|
/src/org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHolder.java
|
aad507200f1e6a86744b744154e32f3876bc635b
|
[] |
no_license
|
LYDongD/jdk1.8
|
121b06216bc15958d9587d95ac02041ffae7ba3a
|
fffffb32ec62ea303a8915f62794b81220f1ba91
|
refs/heads/master
| 2020-03-30T03:18:28.551172
| 2019-10-27T15:00:46
| 2019-10-27T15:00:46
| 150,681,460
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,304
|
java
|
package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /HUDSON3/workspace/8-2-build-macosx-x86_64/jdk8u73/6086/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Friday, January 29, 2016 3:03:46 PM PST
*/
/** Sequence of object reference templates is used for reporting state
* changes that do not occur on the adapter manager.
*/
public final class ObjectReferenceTemplateSeqHolder implements org.omg.CORBA.portable.Streamable
{
public org.omg.PortableInterceptor.ObjectReferenceTemplate value[] = null;
public ObjectReferenceTemplateSeqHolder ()
{
}
public ObjectReferenceTemplateSeqHolder (org.omg.PortableInterceptor.ObjectReferenceTemplate[] initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return org.omg.PortableInterceptor.ObjectReferenceTemplateSeqHelper.type ();
}
}
|
[
"554050334@qq.com"
] |
554050334@qq.com
|
5e3db16578df7853cfce1427694f4fa0fec075ee
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes2.dex_source_from_JADX/com/facebook/directinstall/util/C0887x6977ead8.java
|
dad671660d876f10934fc117a68c099f133332a9
|
[] |
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
| 401
|
java
|
package com.facebook.directinstall.util;
import com.facebook.directinstall.util.DirectInstallApplicationUtilsGraphQLModels.GetNativeAppDetailsAppStoreApplicationGraphQLModel;
import javax.annotation.Nullable;
/* compiled from: google_app_measurement_enable */
public interface C0887x6977ead8 extends C0888xfe11ab0e {
@Nullable
GetNativeAppDetailsAppStoreApplicationGraphQLModel mo3238m();
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
ac94013290e130e384bd3ac795861f9e1ae396c4
|
a589ba1c533c9aa17332c522007788e9d2b795c7
|
/mard-frontend/src/main/java/com/nsw/most/p06/model/SendMessage06.java
|
9dda0c3d649d228d296c5072b85d544309273c18
|
[] |
no_license
|
tandaica0612/MARDJAVA
|
b241aa9e1000feb81c25533d73336960f2e286da
|
f709dc5f02ecc82474bad09ca25f8110860d57bb
|
refs/heads/master
| 2023-03-22T15:36:58.721471
| 2020-10-17T06:32:07
| 2020-10-17T06:32:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,183
|
java
|
package com.nsw.most.p06.model;
import com.nsw.mt.p61.model.BaseMessage;
import java.util.Date;
public class SendMessage06 extends BaseMessage {
private String reason;// Content của lý do
private Date delayDateTo;// Hạn mới
private String getXmlNotSend;// Trả về bản tin để ký, không gửi đi
private String signedXml;
private String fiSoGp;
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public Date getDelayDateTo() {
return delayDateTo;
}
public void setDelayDateTo(Date delayDateTo) {
this.delayDateTo = delayDateTo;
}
public String getGetXmlNotSend() {
return getXmlNotSend;
}
public void setGetXmlNotSend(String getXmlNotSend) {
this.getXmlNotSend = getXmlNotSend;
}
public String getSignedXml() {
return signedXml;
}
public void setSignedXml(String signedXml) {
this.signedXml = signedXml;
}
public String getFiSoGp() {
return fiSoGp;
}
public void setFiSoGp(String fiSoGp) {
this.fiSoGp = fiSoGp;
}
}
|
[
"phongpv2@vnpt.vn"
] |
phongpv2@vnpt.vn
|
bd5a6fca0cdb29871777c66fceae38e2adb67331
|
ef6f8e323e8ca091ea268c9b07509f356fe63ad1
|
/app/src/main/java/ys/app/petproject/activity/TicketMangeActivity.java
|
e9d349f0957879511d0dfd57b8cf181bdd51800e
|
[] |
no_license
|
kyrieLiu/sunmi_pos
|
47a38988ef848ac1a20d0aab1c931a4ca7bdd6e8
|
458380faaac68434df12edaac41ebb2d3adb926c
|
refs/heads/master
| 2020-03-26T13:27:43.183092
| 2018-08-16T05:26:36
| 2018-08-16T05:26:36
| 144,940,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 896
|
java
|
package ys.app.petproject.activity;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import ys.app.petproject.BaseActivity;
import ys.app.petproject.R;
import ys.app.petproject.databinding.TicketManageBinding;
import ys.app.petproject.viewmodel.TicketManageViewModel;
public class TicketMangeActivity extends BaseActivity {
private TicketManageBinding mBinding;
private TicketManageViewModel mViewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBinding = DataBindingUtil.setContentView(this,R.layout.activity_ticket_mange);
setBackVisiable();
setTitle("小票管理");
mViewModel = new TicketManageViewModel(this,mBinding);
mBinding.setViewModel(mViewModel);
setBgWhiteStatusBar();
}
}
|
[
"652992429@qq.com"
] |
652992429@qq.com
|
74049e787c0db0b26c8036b92eaa836ac0de8eb3
|
80ff474779ac5bbb61811e02ec826be07400a4d1
|
/src/main/java/il/ac/bgu/cs/bp/bpjs/execution/listeners/BProgramRunnerListenerAdapter.java
|
2b5e90ecfc8842e486774580763afe838ed16b13
|
[
"MIT"
] |
permissive
|
acepace/BPjs
|
2cba1e882a3edb1ecec568544509a24263b4d83b
|
1e57cf51f5228f3cbc6e3839a6cc165c02d6f3db
|
refs/heads/develop
| 2021-04-05T23:45:41.628992
| 2018-04-10T10:01:24
| 2018-04-10T10:01:24
| 124,888,914
| 0
| 0
|
MIT
| 2018-05-12T07:11:55
| 2018-03-12T12:54:12
|
Java
|
UTF-8
|
Java
| false
| false
| 2,312
|
java
|
/*
* The MIT License
*
* Copyright 2017 BGU.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package il.ac.bgu.cs.bp.bpjs.execution.listeners;
import il.ac.bgu.cs.bp.bpjs.model.BProgram;
import il.ac.bgu.cs.bp.bpjs.model.BThreadSyncSnapshot;
import il.ac.bgu.cs.bp.bpjs.model.BEvent;
import il.ac.bgu.cs.bp.bpjs.model.FailedAssertion;
/**
* A {@link BProgramRunnerListener} with all methods defaultly implemented. Use when
* you only need to override some methods.
*
* @author michael
*/
public abstract class BProgramRunnerListenerAdapter implements BProgramRunnerListener {
@Override
public void starting(BProgram bprog) {}
@Override
public void started(BProgram bp) {}
@Override
public void superstepDone(BProgram bp) {}
@Override
public void ended(BProgram bp) {}
@Override
public void assertionFailed(BProgram bp, FailedAssertion theFailedAssertion) {}
@Override
public void bthreadAdded(BProgram bp, BThreadSyncSnapshot theBThread) {}
@Override
public void bthreadRemoved(BProgram bp, BThreadSyncSnapshot theBThread) {}
@Override
public void bthreadDone(BProgram bp, BThreadSyncSnapshot theBThread) {}
@Override
public void eventSelected(BProgram bp, BEvent theEvent) {}
}
|
[
"mich.barsinai@gmail.com"
] |
mich.barsinai@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.