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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c50147a03682ced7d4e82cf777e20cbd8072b9c
|
191abc67e89e2b9f20d2d20e8b089f95e3dda936
|
/ctrl/src/main/java/com/project/dto/LoginDTO.java
|
b34f1c255088ee60022954026212bc57a88cbc69
|
[] |
no_license
|
sherlockluv/springproject
|
8f1aca992ea50519acde0826bcc6bade3c255cb1
|
946e39de9353db65862280b9bd1f32639b5703eb
|
refs/heads/master
| 2020-03-23T13:55:01.262782
| 2018-07-20T01:29:08
| 2018-07-20T01:29:08
| 141,644,992
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 713
|
java
|
package com.project.dto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LoginDTO {
private static final Logger logger = LoggerFactory.getLogger(LoginDTO.class);
private String id;
private String pwd;
private boolean useCookie;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public boolean isUseCookie() {
return useCookie;
}
public void setUseCookie(boolean useCookie) {
this.useCookie = useCookie;
}
@Override
public String toString() {
return "LoginDTO [id=" + id + ", pwd=" + pwd + ", useCookie=" + useCookie + "]";
}
}
|
[
"KOITT@KOITT-PC"
] |
KOITT@KOITT-PC
|
431229e88a62824055fe5fcfcaf07f960e0e21b4
|
0e1477854329d5678eeb0261089f7533a31fa464
|
/CollectNewspaperKarel.java
|
9584b90d328f1e48309628248f7cb5b3e471f5f7
|
[] |
no_license
|
SpencerCornelia/karel
|
d90df5f7217debbaefac758997b4a6ceb5155ae5
|
14fd7402786ac130c52db315a2040d2d5a8b2527
|
refs/heads/master
| 2021-06-15T13:48:45.507866
| 2017-03-03T06:09:54
| 2017-03-03T06:09:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 870
|
java
|
/*
* File: CollectNewspaperKarel.java
* --------------------------------
* At present, the CollectNewspaperKarel subclass does nothing.
* Your job in the assignment is to add the necessary code to
* instruct Karel to walk to the door of its house, pick up the
* newspaper (represented by a beeper, of course), and then return
* to its initial position in the upper left corner of the house.
*/
import stanford.karel.*;
public class CollectNewspaperKarel extends SuperKarel {
// You fill in this part
private void moveToNewspaper() {
turnRight();
move();
turnLeft();
move();
move();
move();
pickBeeper();
turnAround();
}
private void pickUpNewspaper() {
if (beepersPresent()) {
pickBeeper();
}
turnAround();
}
private void returnHome() {
while(frontIsClear()) {
move();
}
turnRight();
move();
turnRight();
}
}
|
[
"s"
] |
s
|
dda715d8b671baccf48460990fffa28af6ff8b04
|
67ec60c810cdd63eab37d54056a56f8094026065
|
/app/src/com/d2cmall/buyer/api/PhoneCodeLoginApi.java
|
6d933971d91ee8bb8ff8d7ac96f4f2246a2e644b
|
[] |
no_license
|
sinbara0813/fashion
|
2e2ef73dd99c71f2bebe0fc984d449dc67d5c4c5
|
4127db4963b0633cc3ea806851441bc0e08e6345
|
refs/heads/master
| 2020-08-18T04:43:25.753009
| 2019-10-25T02:28:47
| 2019-10-25T02:28:47
| 215,748,112
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 700
|
java
|
package com.d2cmall.buyer.api;
import com.d2cmall.buyer.Constants;
public class PhoneCodeLoginApi extends BaseApi {
private String loginCode;
private String code;
private String nationCode;
private String app = "APP.Buyer.Android";
public void setLoginCode(String loginCode) {
this.loginCode = loginCode;
}
public void setCode(String code) {
this.code = code;
}
public void setNationCode(String nationCode) {
this.nationCode = nationCode;
}
@Override
protected String getPath() {
return Constants.PHONE_CODE_LOGIN_URL;
}
@Override
public Method requestMethod() {
return Method.POST;
}
}
|
[
"940258169@qq.com"
] |
940258169@qq.com
|
bce89dd6bb99326e2f4553040ce3f40c4fb27a3b
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/response/AlipayEcoMycarFuellingShopModifyResponse.java
|
884835f895e1e0bead38ba9af9e3e968e1aa36bc
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.eco.mycar.fuelling.shop.modify response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayEcoMycarFuellingShopModifyResponse extends AlipayResponse {
private static final long serialVersionUID = 2613243684755835913L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
fc9aa1d4367d922092460fb17dabd01d5846d246
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/13_jdbacl-org.databene.jdbacl.sql.parser.ANTLRNoCaseFileStream-0.5-8/org/databene/jdbacl/sql/parser/ANTLRNoCaseFileStream_ESTest_scaffolding.java
|
9f5cb04c6f45a55ef6b40a9d66348f9f680e7a84
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 558
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 16:01:57 GMT 2019
*/
package org.databene.jdbacl.sql.parser;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class ANTLRNoCaseFileStream_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
276a360b42de1d86660debceba43ca37f1bf160a
|
ebf452b9dca16542ccb3fa189968d8ff0014e210
|
/JavaTempProjects/swagger_with_springboot1x_tutorial/src/main/java/com/ap/swagger_with_springboot1x_tutorial/controller/Customer.java
|
2e907b1fb7fc28b9fe30f888aef3b1f04c69c835
|
[] |
no_license
|
AndrewPonyk/JavaRelated
|
462fe46dd9541744de28b7a4bae3ecf540ca69a9
|
79546fd7bd3e8a93110f85d51142e561617c27db
|
refs/heads/master
| 2023-03-11T04:35:43.264818
| 2023-02-25T14:14:39
| 2023-02-25T14:14:39
| 13,128,589
| 0
| 0
| null | 2023-02-25T14:04:58
| 2013-09-26T16:57:00
|
HTML
|
UTF-8
|
Java
| false
| false
| 702
|
java
|
package com.ap.swagger_with_springboot1x_tutorial.controller;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
public class Customer {
@NotNull(message = "First Name should not be null!!!!") // THIS is for SPRING
@ApiModelProperty(required = true) // THIS is for SWAGGER!
public String firstName;
public String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
|
[
"andrew9999@ukr.net"
] |
andrew9999@ukr.net
|
f1f0ec7c21b09b09f4fb029f26bd8c8cb5143dd1
|
cedd153ec158e139c574076338b809c4c3feca6b
|
/cluster/src/main/java/io/atomix/cluster/CoreConfig.java
|
d380322a300839a8ba05dfc37271ebbd681f3951
|
[
"Apache-2.0"
] |
permissive
|
singhkirpal/atomix
|
28ca56ccac3d8c863a490785666d972c0973982b
|
a3d8122dc9cec059849383f7515ccc2fc8daa71b
|
refs/heads/master
| 2020-03-09T13:32:05.950553
| 2018-04-08T07:28:03
| 2018-04-09T03:27:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,230
|
java
|
/*
* Copyright 2018-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.atomix.cluster;
import io.atomix.utils.Config;
import java.util.ArrayList;
import java.util.Collection;
/**
* Core configuration.
*/
public class CoreConfig implements Config {
private Collection<NodeConfig> nodes = new ArrayList<>();
/**
* Returns the core nodes.
*
* @return the core nodes
*/
public Collection<NodeConfig> getNodes() {
return nodes;
}
/**
* Sets the core nodes.
*
* @param nodes the core nodes
* @return the core configuration
*/
public CoreConfig setNodes(Collection<NodeConfig> nodes) {
this.nodes = nodes;
return this;
}
}
|
[
"jordan.halterman@gmail.com"
] |
jordan.halterman@gmail.com
|
0379b0fd9a14511de8e9bb6ec801d214e71b1f62
|
e682fa3667adce9277ecdedb40d4d01a785b3912
|
/internal/fischer/mangf/A120217.java
|
c41e83b3e6cb4b0f7d9e4c06a8a98071fd02b523
|
[
"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
| 406
|
java
|
package irvine.oeis.a120;
// Generated by gen_seq4.pl radd3 at 2023-06-21 16:34
import irvine.math.z.Z;
import irvine.oeis.base.RaddSequence;
/**
* A120217 Start with 100057 and repeatedly reverse the digits and add 2 to get the next term.
* @author Georg Fischer
*/
public class A120217 extends RaddSequence {
/** Construct the sequence. */
public A120217() {
super(1, 10, 100057, 2);
}
}
|
[
"dr.Georg.Fischer@gmail.com"
] |
dr.Georg.Fischer@gmail.com
|
874002ffd5e30d45bf1736a9f2535276b5808344
|
34182a13cd6291fc4657546e196c6447553b5eb0
|
/struts2/struts2-14/src/main/java/action/RegUserAction.java
|
4e0a305646895f04793b396d4de8faf391d8c2b7
|
[] |
no_license
|
786991884/sxnd-study
|
9bf3d417879680f94b012867ef71ba880a19e4fc
|
8c1f8e8823c077f095dc4be0c89522b6f0eb1457
|
refs/heads/master
| 2021-01-12T08:49:59.493518
| 2018-04-03T09:17:54
| 2018-04-03T09:17:54
| 76,701,131
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
package action;
import bean.User;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class RegUserAction extends ActionSupport {
private User user;
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public String execute() throws Exception {
ActionContext actionContext = ActionContext.getContext();
actionContext.put("loginUser", getUser());
return SUCCESS;
}
}
|
[
"786991884@qq.com"
] |
786991884@qq.com
|
0984a6e7c2a2fdacd2f08955ef0a56bd5821d192
|
06d25e014eaaec5efc7ec058565f28945f851d3e
|
/nfsdb-core/src/main/java/com/nfsdb/io/ImportedColumnMetadata.java
|
09f515b5bc4e00660216ba0217bafddc702412e8
|
[] |
no_license
|
gubanov/nfsdb
|
b8788c49e2b95c2b83fe698ad0f705dc991fde47
|
8d4010f04eb822d2b0ebc46ba3118b2b00f5c992
|
refs/heads/master
| 2021-01-15T16:46:45.775581
| 2015-09-06T21:29:56
| 2015-09-06T21:29:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,504
|
java
|
/*
* _ _ ___ ___ _ _
* | \| | __/ __| __| | |__
* | .` | _|\__ \/ _` | '_ \
* |_|\_|_| |___/\__,_|_.__/
*
* Copyright (c) 2014-2015. The NFSdb project and its contributors.
*
* 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.nfsdb.io;
import com.nfsdb.factory.configuration.ColumnMetadata;
public class ImportedColumnMetadata extends ColumnMetadata {
public int columnIndex;
public ImportedColumnType importedType;
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + columnIndex;
return 31 * result + importedType.hashCode();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ImportedColumnMetadata that = (ImportedColumnMetadata) o;
return columnIndex == that.columnIndex && importedType == that.importedType;
}
}
|
[
"bluestreak@gmail.com"
] |
bluestreak@gmail.com
|
cedcf408b5c9651823d354cbbef9b9a1acb5215d
|
da2c2a06f570c08bbef41bc44eb8cd4fc28aeda2
|
/04-data/src/main/java/allianz/spring/data/c_jpa_rest_repository/SpringRepositoryMain.java
|
68cd3d1a1d12aa0aa5a047787d8acb40271f185f
|
[] |
no_license
|
bcntec-learning/spring-2019
|
0c9a1cac01e00066d33b652904236ac6636cd3ed
|
49816603700941fb0c53b582575e98706266f6ed
|
refs/heads/master
| 2021-07-05T09:21:54.191057
| 2019-10-24T16:20:18
| 2019-10-24T16:20:18
| 192,481,536
| 0
| 1
| null | 2020-10-13T13:59:16
| 2019-06-18T06:43:36
|
Java
|
UTF-8
|
Java
| false
| false
| 1,218
|
java
|
package allianz.spring.data.c_jpa_rest_repository;
import allianz.spring.data.a_jpa_dao.UserDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ComponentScan;
import javax.persistence.EntityManager;
/*@RunWith(SpringRunner.class)
@Sql(scripts = "/projection-insert-data.sql")
@Sql(scripts = "/projection-clean-up-data.sql", executionPhase = AFTER_TEST_METHOD)
*/
@ComponentScan(value = {"allianz.spring.data.entities", "allianz.spring.data.a_jpa_dao"},
basePackageClasses = UserDAO.class)
@SpringBootApplication(scanBasePackageClasses = {SpringRepositoryMain.class},
exclude = {SecurityAutoConfiguration.class})
public class SpringRepositoryMain {
@Autowired
EntityManager entityManager;
@Autowired
UserRestRepository userRepository;
public static void main(String[] args) {
new SpringApplicationBuilder()
.sources(SpringRepositoryMain.class).run(args);
}
}
|
[
"fphilip@houseware.es"
] |
fphilip@houseware.es
|
ae7bdc92c7ba3010f6473ec5f18645fb7f482d12
|
2d03ba9a32b3064d40271ca4694fabb1725a54eb
|
/src/test/java/org/apache/songsy/mapper/RoleMapper.java
|
6b7ef137bd88b09f364f2fd121a984355b1d6934
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
songshuiyang/mybatis-3
|
bd45861fd20cf210a7afb77b36056feb3273b4ec
|
3ecdcc488440b6400455168d386ddb0038658346
|
refs/heads/master
| 2020-04-07T15:48:12.653901
| 2019-12-05T08:18:36
| 2019-12-05T08:18:36
| 158,501,528
| 0
| 0
| null | 2018-11-21T06:30:17
| 2018-11-21T06:30:16
| null |
UTF-8
|
Java
| false
| false
| 314
|
java
|
package org.apache.songsy.mapper;
import org.apache.songsy.entity.Role;
import org.apache.songsy.entity.User;
/**
* 用户
* @author songshuiyang
*/
public interface RoleMapper {
Role selectByPrimaryKey(Integer id);
int insertSelective(Role user);
int updateByPrimaryKeySelective(Role user);
}
|
[
"1459074711@qq.com"
] |
1459074711@qq.com
|
cba94859ca54819b647f9db42a6dec218b8a8c97
|
54f4ee565659ae0426b1fbf163f653096924d786
|
/src/test/java/mybatis_study/jdbc/MyBatisSqlSessionFactoryTest.java
|
b24d5e16d5de8552a42a0e22cc9f9e33c440f9a2
|
[] |
no_license
|
JamesAreuming/mybatis_study
|
015f4dd7338e9a1ffd62f8c9d544790c5318d0d1
|
212a7edd4a3dafd3564824070e3fdb53fec2dd6e
|
refs/heads/master
| 2021-05-18T08:04:35.590421
| 2020-04-07T02:43:40
| 2020-04-07T02:43:40
| 251,190,179
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 719
|
java
|
package mybatis_study.jdbc;
import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory;
import org.apache.ibatis.session.SqlSession;
import org.junit.Assert;
import org.junit.Test;
import mybatis_study.jdbc.MyBatisSqlSessionFactory;
public class MyBatisSqlSessionFactoryTest {
private static final Log log = LogFactory.getLog(MyBatisSqlSessionFactoryTest.class);
@Test
public void testOpenSession() {
log.debug(Thread.currentThread().getStackTrace()[1].getMethodName()+"()");
SqlSession session = MyBatisSqlSessionFactory.openSession(true);
log.debug("session " + session);
Assert.assertNotNull(session);
session.close(); // 반드시 close()
}
}
|
[
"hothihi5@gmail.com"
] |
hothihi5@gmail.com
|
fe838137f180aa8ade456a9db9dc4af7975013f7
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13616-7-3-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/mail/internal/thread/SendMailRunnable_ESTest_scaffolding.java
|
2e66110145dc0aa8c1f6e77a857e4dd9e05e9d7a
|
[] |
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
| 451
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 21:48:40 UTC 2020
*/
package org.xwiki.mail.internal.thread;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SendMailRunnable_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
ab7a60c6c67211e24d1cd6ec4eb2dd06c37ea826
|
9aa39744391dfd9926f04f3838299e11b12de185
|
/app/src/main/java/com/video/newqu/ui/presenter/UserEditPresenter.java
|
85a02f8e961a3843fa5fb8190be0523de304548f
|
[] |
no_license
|
djp0507/Video
|
c32a45ff3727883bb5f5b853e6d227c7b9e1be76
|
50c7c3fc784db1bc5c61f5b86d3224dd5cc2a9c0
|
refs/heads/master
| 2021-09-01T05:14:39.639940
| 2017-12-25T01:52:12
| 2017-12-25T01:52:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,530
|
java
|
package com.video.newqu.ui.presenter;
import android.content.Context;
import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
import com.kk.securityhttp.engin.HttpCoreEngin;
import com.kk.securityhttp.net.entry.UpFileInfo;
import com.video.newqu.base.RxPresenter;
import com.video.newqu.contants.NetContants;
import com.video.newqu.ui.contract.UserEditContract;
import com.video.newqu.util.ImageUtils;
import com.video.newqu.util.ToastUtils;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
/**
* TinyHung@outlook.com
* 2017/6/1 15:00
* 用户编辑资料上传
*/
public class UserEditPresenter extends RxPresenter<UserEditContract.View> implements UserEditContract.Presenter<UserEditContract.View> {
private static final String TAG = UserEditPresenter.class.getSimpleName();
private final Context context;
public UserEditPresenter(Context context){
this.context=context;
}
/**
* 提交用户基本信息
* @param userID
* @param nikeName
* @param sex
* @param desp
*/
@Override
public void onPostUserData(String userID, String nikeName, String sex, String desp) {
Map<String,String> params=new HashMap<>();
params.put("id",userID);
params.put("nickname",nikeName);
params.put("gender",sex);
params.put("signature",desp);
Subscription subscribe = HttpCoreEngin.get(context).rxpost(NetContants.BASE_HOST + "user_edit", String.class, params,true,true,true).observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<String>() {
@Override
public void call(String data) {
Log.d(TAG, "call: data="+data.toString());
if(!TextUtils.isEmpty(data)){
mView.showPostUserDataResult(data);
}else{
ToastUtils.shoCenterToast("更新失败");
}
}
});
addSubscrebe(subscribe);
}
/**
* 上传用户头像
* @param userID
* @param filePath
*/
@Override
public void onPostImagePhoto(String userID,String filePath) {
Map<String,String> params=new HashMap<>();
params.put("user_id",userID);
new CompressAsyncTask(params).execute(filePath);
}
/**
* 异步裁剪图片,并上传
*/
private class CompressAsyncTask extends AsyncTask<String,Void,String>{
private final Map<String, String> params;
public CompressAsyncTask(Map<String, String> params) {
this.params=params;
}
//异步裁剪
@Override
protected String doInBackground(String... params) {
return ImageUtils.changeFileSizeByLocalPath(params[0]);
}
@Override
protected void onPostExecute(String filePath) {
super.onPostExecute(filePath);
//上传文件
UpFileInfo upFileInfo = new UpFileInfo();
upFileInfo.file = new File(filePath);
upFileInfo.filename = upFileInfo.file.getName();
upFileInfo.name = upFileInfo.file.getName();
Subscription subscribe = HttpCoreEngin.get(context).rxuploadFile(NetContants.BASE_HOST + "user_logo",String.class, upFileInfo, params, true).subscribe(new Action1<String>() {
@Override
public void call(String data) {
mView.showPostImagePhotoResult(data);
}
});
addSubscrebe(subscribe);
// UploadUtil uploadUtil = UploadUtil.getInstance();
// String key = Md5.md5(Utils.getFileName(filePath));
// uploadUtil.uploadFile(filePath,key,NetContants.BASE_HOST + "user_logo",params);
// uploadUtil.setOnUploadProcessListener(new UploadUtil.OnUploadProcessListener() {
// @Override
// public void onUploadDone(int responseCode, String response) {
// if(responseCode==UploadUtil.UPLOAD_SUCCESS_CODE){
// Log.d(TAG, "onUploadDone: 上传成功");
// }
// }
//
// @Override
// public void onUploadProcess(int uploadSize) {
//
// }
//
// @Override
// public void initUpload(int fileSize) {
//
// }
// });
}
}
}
|
[
"584312311@qq.com"
] |
584312311@qq.com
|
8adb30004c7ef470536d7e9135c1f4dfd5ef6f05
|
963599f6f1f376ba94cbb504e8b324bcce5de7a3
|
/sources/p046io/reactivex/internal/operators/observable/ObservableFromArray.java
|
d638f41219419fc827efc48d2ff3167cf5807da1
|
[] |
no_license
|
NikiHard/cuddly-pancake
|
563718cb73fdc4b7b12c6233d9bf44f381dd6759
|
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
|
refs/heads/main
| 2023-04-09T06:58:04.403056
| 2021-04-20T00:45:08
| 2021-04-20T00:45:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,784
|
java
|
package p046io.reactivex.internal.operators.observable;
import p046io.reactivex.Observable;
import p046io.reactivex.Observer;
import p046io.reactivex.internal.functions.ObjectHelper;
import p046io.reactivex.internal.observers.BasicQueueDisposable;
/* renamed from: io.reactivex.internal.operators.observable.ObservableFromArray */
public final class ObservableFromArray<T> extends Observable<T> {
final T[] array;
public ObservableFromArray(T[] tArr) {
this.array = tArr;
}
public void subscribeActual(Observer<? super T> observer) {
FromArrayDisposable fromArrayDisposable = new FromArrayDisposable(observer, this.array);
observer.onSubscribe(fromArrayDisposable);
if (!fromArrayDisposable.fusionMode) {
fromArrayDisposable.run();
}
}
/* renamed from: io.reactivex.internal.operators.observable.ObservableFromArray$FromArrayDisposable */
static final class FromArrayDisposable<T> extends BasicQueueDisposable<T> {
final Observer<? super T> actual;
final T[] array;
volatile boolean disposed;
boolean fusionMode;
int index;
FromArrayDisposable(Observer<? super T> observer, T[] tArr) {
this.actual = observer;
this.array = tArr;
}
public int requestFusion(int i) {
if ((i & 1) == 0) {
return 0;
}
this.fusionMode = true;
return 1;
}
public T poll() {
int i = this.index;
T[] tArr = this.array;
if (i == tArr.length) {
return null;
}
this.index = i + 1;
return ObjectHelper.requireNonNull(tArr[i], "The array element is null");
}
public boolean isEmpty() {
return this.index == this.array.length;
}
public void clear() {
this.index = this.array.length;
}
public void dispose() {
this.disposed = true;
}
public boolean isDisposed() {
return this.disposed;
}
/* access modifiers changed from: package-private */
public void run() {
T[] tArr = this.array;
int length = tArr.length;
for (int i = 0; i < length && !isDisposed(); i++) {
T t = tArr[i];
if (t == null) {
Observer<? super T> observer = this.actual;
observer.onError(new NullPointerException("The " + i + "th element is null"));
return;
}
this.actual.onNext(t);
}
if (!isDisposed()) {
this.actual.onComplete();
}
}
}
}
|
[
"a.amirovv@mail.ru"
] |
a.amirovv@mail.ru
|
e6df57bb9828fc28f61379f32689ba3b314a0bad
|
3d4349c88a96505992277c56311e73243130c290
|
/Preparation/processed-dataset/god-class_4_1107/1.java
|
9b1d886a1315d4a8b8de9ec59416a5c384f485d3
|
[] |
no_license
|
D-a-r-e-k/Code-Smells-Detection
|
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
|
079a02e5037d909114613aedceba1d5dea81c65d
|
refs/heads/master
| 2020-05-20T00:03:08.191102
| 2019-05-15T11:51:51
| 2019-05-15T11:51:51
| 185,272,690
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 135
|
java
|
/**
* @return The texture with which this TextureImageInfo is associated.
*/
public Texture getTexture() {
return texture;
}
|
[
"dariusb@unifysquare.com"
] |
dariusb@unifysquare.com
|
249935724cdf4444e46cbc42c1de93a4d37fa2ef
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_5a0971a2fa971691d853dea1c87a4937e71c268c/InMemoryStorageEngine/14_5a0971a2fa971691d853dea1c87a4937e71c268c_InMemoryStorageEngine_t.java
|
1efe3971ae48fb29a5424fdd393157164e5e71f1
|
[] |
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
| 5,477
|
java
|
package com.marketsenti.storage;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.collect.AbstractIterator;
import com.marketsenti.storage.serializer.BytesSerializer;
/**
* Basic InMemory storage Engine implements {@link StorageEngine}<br>
* Does not persist data keep only in RAM and will get cleaned up at the end of JVM<br>
* useful for prototyping and testing.
*
* @author bbansal
*
*/
public class InMemoryStorageEngine implements StorageEngine
{
private final Map<String, Map<Object, List<Object>>> storageEngineMap;
private final Map<String, StoreSchema> storeSchemaMap;
public InMemoryStorageEngine()
{
// thread safe
storageEngineMap =
Collections.synchronizedMap(new HashMap<String, Map<Object, List<Object>>>());
storeSchemaMap = Collections.synchronizedMap(new HashMap<String, StoreSchema>());
}
@Override
public <K, V> StoreSchema createStore(String storename,
Class keyClass,
Class valueClass,
BytesSerializer<K> Keyserializer,
BytesSerializer<V> valueSerializer)
{
if (storageEngineMap.containsKey(storename))
{
throw new RuntimeException("store already exists:" + storename);
}
// create new thread-safe map for this store.
StoreSchema schema = new StoreSchema(keyClass, valueClass);
Map<Object, List<Object>> storeMap =
Collections.synchronizedMap(new HashMap<Object, List<Object>>());
storeSchemaMap.put(storename, schema);
storageEngineMap.put(storename, storeMap);
return schema;
}
synchronized public boolean dropStore(String storename)
{
if (!storageEngineMap.containsKey(storename))
{
throw new RuntimeException("store donot exists:" + storename);
}
storeSchemaMap.remove(storename);
storageEngineMap.remove(storename);
return true;
}
public StoreSchema getSchema(String storename)
{
return storeSchemaMap.get(storename);
}
public <K, V> void appendValue(String storename, K key, V value, long timestamp)
{
StoreSchema schema = this.getSchema(storename);
checkSchema(key, value, schema);
List<V> values = (List<V>) getStore(storename).get(key);
values.add(value);
}
private <K, V> void checkSchema(K key, V value, StoreSchema schema)
{
if (!schema.getKeySchema().equals(key.getClass()))
{
throw new RuntimeException("Mismatched key type expected:" + schema.getKeySchema()
+ " got:" + key.getClass());
}
if (value != null && !schema.getValueSchema().equals(value.getClass()))
{
throw new RuntimeException("Mismatched value type expected:"
+ schema.getValueSchema() + " got:" + value.getClass());
}
}
public <K, V> Iterator<StoreEntry<K, V>> getUpdatesSince(String storename,
long timestamp)
{
throw new RuntimeException("Not implemented yet.");
}
public <K, V> Iterator<V> getValues(String storename, K key)
{
return (Iterator<V>) getStore(storename).get(key).iterator();
}
public <K, V> void putValue(String storename, K key, Iterator<V> values, long timestamp)
{
StoreSchema schema = this.getSchema(storename);
V firstValue = (values.hasNext()) ? values.next() : null;
checkSchema(key, firstValue, schema);
List<Object> valuesList = new ArrayList<Object>();
valuesList.add(firstValue); // FIXME : any checks required
while (values.hasNext())
{
valuesList.add(values.next());
}
getStore(storename).put(key, valuesList);
}
public <K, V> void removeEntry(String storename, K key)
{
getStore(storename).remove(key);
}
public <K, V> Iterator<StoreEntry<K, V>> scanStore(final String storename)
{
return new AbstractIterator<StoreEntry<K, V>>()
{
final Iterator<Entry<Object, List<Object>>> storeEntriesIterator =
getStore(storename).entrySet()
.iterator();
K currentKey = null;
Iterator<V> currentValueIterator = null;
@SuppressWarnings("unchecked")
@Override
protected StoreEntry<K, V> computeNext()
{
if (!storeEntriesIterator.hasNext())
{
return endOfData();
}
// loop while we get a valid value
while (null == currentValueIterator || !currentValueIterator.hasNext())
{
Entry<Object, List<Object>> entry = storeEntriesIterator.next();
currentKey = (K) entry.getKey();
currentValueIterator = (Iterator<V>) entry.getValue().iterator();
}
return new StoreEntry<K, V>(currentKey, currentValueIterator.next());
}
};
}
private Map<Object, List<Object>> getStore(String storename)
{
return storageEngineMap.get(storename);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
667c48afbc747bb1d79816c59c8d81789afd8d27
|
5956d7bf50b1294c43ff82ee6507a9df315eb5ca
|
/mall-core/src/main/java/com/qinyuan15/mall/core/dao/CommodityPicture.java
|
726a930a716b7b60b61999af24b653fb89ab4f88
|
[] |
no_license
|
qinyuan/mall
|
d0b217d3b6b72e430d86da5f27e2ed60461a86a5
|
542966cdfae9b9f5331c901716b4e91b4ee6f4df
|
refs/heads/master
| 2021-01-16T20:58:48.439408
| 2015-08-01T12:08:37
| 2015-08-01T12:08:37
| 36,270,121
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 765
|
java
|
package com.qinyuan15.mall.core.dao;
import com.qinyuan15.utils.hibernate.PersistObject;
/**
* Class to record commodity picture information
* Created by qinyuan on 15-1-15.
*/
public class CommodityPicture extends PersistObject {
private Integer commodityId;
private String url;
private Boolean detail;
public Integer getCommodityId() {
return commodityId;
}
public String getUrl() {
return url;
}
public void setCommodityId(Integer commodityId) {
this.commodityId = commodityId;
}
public void setUrl(String url) {
this.url = url;
}
public Boolean getDetail() {
return detail;
}
public void setDetail(Boolean detail) {
this.detail = detail;
}
}
|
[
"qinyuan15@sina.com"
] |
qinyuan15@sina.com
|
c2f0be05e810ead6803df292bc31ba96c48c7222
|
2216e1002fd92c3cd4cd03bd36c8a2fd8da07ee6
|
/Spring4_0BasicsWithMaven/src/main/java/pack_10_ioc/pack_30_factory/pack_20_factory_pattern02/SavingsAcc.java
|
12330e3082cfd1f3b147097e1381192194422f35
|
[] |
no_license
|
shahriteshj/Projects
|
d95995ef2c6397c87cbebf79698d54a6cf8648d5
|
ec60cf9fcf28d8b34655ea5d539d3b7a78527312
|
refs/heads/master
| 2020-04-01T12:51:34.191126
| 2019-01-11T12:31:47
| 2019-01-11T12:31:47
| 153,227,106
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 380
|
java
|
package pack_10_ioc.pack_30_factory.pack_20_factory_pattern02;
public class SavingsAcc extends BankAcc {
public SavingsAcc(){
super();
}
public SavingsAcc(String accNm){
super(accNm);
}
public SavingsAcc(String accNm, float initialBalance){
super(accNm, initialBalance);
}
@Override
public String toString() {
return "From Savings:"+super.toString();
}
}
|
[
"43956811+shahriteshj@users.noreply.github.com"
] |
43956811+shahriteshj@users.noreply.github.com
|
46c307e39001ae7287cf0ddda0baa9ccfa0c5b62
|
aec790b2ae56cefa3c943a58386106f080d37c69
|
/JavaModule/src/main/java/com/example/BridgePattern/sample02/Image.java
|
08f267c36ebebf966056a99ff3948a01d146e1e5
|
[] |
no_license
|
supercoeus/LearnTechDemo
|
94bab285d0fcacc281faae0f57f9fa66d886e445
|
9ced9d014a178c1f0a6b78e57f5ebd4dcb173008
|
refs/heads/master
| 2021-01-19T03:47:44.483936
| 2016-09-09T10:07:15
| 2016-09-09T10:07:15
| 69,653,315
| 1
| 0
| null | 2016-09-30T09:25:39
| 2016-09-30T09:25:39
| null |
UTF-8
|
Java
| false
| false
| 412
|
java
|
package com.example.BridgePattern.sample02;
/**
* author: baiiu
* date: on 16/7/21 10:57
* description:
*/
public abstract class Image {
OS os;
public Image(OS os) {
this.os = os;
}
public void setOs(OS os) {
this.os = os;
}
public abstract Matrix parseFile(String filePath);
public void draw(String filePath) {
os.draw(parseFile(filePath));
}
}
|
[
"baiiu@foxmail.com"
] |
baiiu@foxmail.com
|
c4de8aebafef287b8bdab2db440c255be993b2ea
|
9a1bc8fff71b6eb32507a44d82b903ee1dc4338e
|
/src/main/java/softuni/exam/domain/dto/xml/TeamImportDto.java
|
8d8c9879e8b75b0c125602c7a13f4bbab70319a7
|
[] |
no_license
|
aarabadjieva/Footbal-Info
|
2f8ebf72a21bb17f9eb3afdbaaca780454407f5e
|
e3b872ed70c214d790c61f1b0787ef7336202f61
|
refs/heads/master
| 2022-05-29T07:34:08.597699
| 2020-04-06T13:49:03
| 2020-04-06T13:49:03
| 253,511,571
| 0
| 0
| null | 2022-05-20T21:31:17
| 2020-04-06T13:50:04
|
Java
|
UTF-8
|
Java
| false
| false
| 574
|
java
|
package softuni.exam.domain.dto.xml;
import com.google.gson.annotations.Expose;
import lombok.Getter;
import lombok.Setter;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@Getter
@Setter
@XmlRootElement(name = "team")
@XmlAccessorType(XmlAccessType.FIELD)
public class TeamImportDto {
@XmlElement
@Expose
private String name;
@XmlElement(name = "picture")
@Expose
private PictureImportDto picture;
}
|
[
"l.i.n@abv.bg"
] |
l.i.n@abv.bg
|
66a41e7683ca9a21ee82c5f816b8db51789ec86c
|
92e79f38a66d0875d2b611a6b518ecfcc167dc94
|
/app/src/main/java/eu/uk/ncl/pet5o/esper/epl/join/base/HistoricalIndexLookupStrategySorted.java
|
f80497456d76ab63c57d749d24c2613403e74ba3
|
[] |
no_license
|
PetoMichalak/EsperOn
|
f8f23d24db21269070e302c0a6c329312491388b
|
688012d2a92217f4b24bf072dac04ed8902a313d
|
refs/heads/master
| 2020-03-24T01:06:17.446804
| 2018-07-25T15:53:50
| 2018-07-25T15:53:50
| 142,322,329
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,469
|
java
|
/*
***************************************************************************************
* Copyright (C) 2006 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
***************************************************************************************
*/
package eu.uk.ncl.pet5o.esper.epl.join.base;
import eu.uk.ncl.pet5o.esper.client.EventBean;
import eu.uk.ncl.pet5o.esper.epl.expression.core.ExprEvaluatorContext;
import eu.uk.ncl.pet5o.esper.epl.join.exec.sorted.SortedAccessStrategy;
import eu.uk.ncl.pet5o.esper.epl.join.exec.sorted.SortedAccessStrategyFactory;
import eu.uk.ncl.pet5o.esper.epl.join.plan.QueryGraphValueEntryRange;
import eu.uk.ncl.pet5o.esper.epl.join.table.EventTable;
import eu.uk.ncl.pet5o.esper.epl.join.table.PropertySortedEventTable;
import java.util.Iterator;
import java.util.Set;
/**
* Index lookup strategy into a poll-based cache result.
*/
public class HistoricalIndexLookupStrategySorted implements HistoricalIndexLookupStrategy {
private final SortedAccessStrategy strategy;
public HistoricalIndexLookupStrategySorted(int lookupStream, QueryGraphValueEntryRange property) {
strategy = SortedAccessStrategyFactory.make(false, lookupStream, -1, property, null);
}
public Iterator<EventBean> lookup(EventBean lookupEvent, EventTable[] indexTable, ExprEvaluatorContext context) {
// The table may not be indexed as the cache may not actively cache, in which case indexing doesn't makes sense
if (indexTable[0] instanceof PropertySortedEventTable) {
PropertySortedEventTable index = (PropertySortedEventTable) indexTable[0];
Set<EventBean> events = strategy.lookup(lookupEvent, index, context);
if (events != null) {
return events.iterator();
}
return null;
}
return indexTable[0].iterator();
}
public String toQueryPlan() {
return this.getClass().getSimpleName() + " strategy: " + strategy.toQueryPlan();
}
}
|
[
"P.Michalak1@newcastle.ac.uk"
] |
P.Michalak1@newcastle.ac.uk
|
559b8c8fd0131a28f11e5c9220121e5a59fe2346
|
2ca2b810dc3ef6afb5d940268e1a6ea734a230c2
|
/auth/authentication-server/src/main/java/com/springboot/cloud/auth/authentication/rest/HttpServletRequestAuthWrapper.java
|
f6f7e2b4ff4199bc0fba6ec5a2b811e4be42e238
|
[
"Apache-2.0"
] |
permissive
|
devops-utils/spring-cloud-foundation
|
39ee152d904c85d269213fab977267b6a37e56c2
|
2284fc5dcc40882808241d7b455b5fe7789c0480
|
refs/heads/master
| 2022-11-22T16:23:15.953434
| 2020-07-30T17:14:38
| 2020-07-30T17:14:38
| 283,800,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 738
|
java
|
package com.springboot.cloud.auth.authentication.rest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
/**
* Created by peterzhang on 2018/5/26.
*/
public class HttpServletRequestAuthWrapper extends HttpServletRequestWrapper {
private String url;
private String method;
/**
* @param url
* @param method
*/
public HttpServletRequestAuthWrapper(HttpServletRequest request, String url, String method) {
super(request);
this.url = url;
this.method = method;
}
@Override
public String getMethod() {
return this.method;
}
@Override
public String getServletPath() {
return this.url;
}
}
|
[
"zhangchunsheng423@gmail.com"
] |
zhangchunsheng423@gmail.com
|
358b2be57e5cf9b042dcc6217d3b63c5e12e5c1a
|
1466c2347c4fd40405d97b8d1b67665c7a49ad47
|
/aliyun-java-sdk-push/src/main/java/com/aliyuncs/push/model/v20160801/QueryPushRecordsResponse.java
|
4c4c6c595178a2d971de2b22d85e06f936900a60
|
[
"Apache-2.0"
] |
permissive
|
limfriend/aliyun-openapi-java-sdk
|
4e0e7d04fe268789f1e0ee7b5507892f83269876
|
12d004883c6ad54456dbf6eb47c06a6d27b77977
|
refs/heads/master
| 2020-11-26T19:19:54.073101
| 2020-01-08T09:53:13
| 2020-01-08T09:53:13
| 229,182,502
| 0
| 0
|
NOASSERTION
| 2019-12-20T03:24:19
| 2019-12-20T03:24:18
| null |
UTF-8
|
Java
| false
| false
| 3,540
|
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.
*/
package com.aliyuncs.push.model.v20160801;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.push.transform.v20160801.QueryPushRecordsResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class QueryPushRecordsResponse extends AcsResponse {
private String requestId;
private String nextToken;
private Integer pageSize;
private List<PushInfo> pushInfos;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getNextToken() {
return this.nextToken;
}
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public List<PushInfo> getPushInfos() {
return this.pushInfos;
}
public void setPushInfos(List<PushInfo> pushInfos) {
this.pushInfos = pushInfos;
}
public static class PushInfo {
private Long appKey;
private Long messageId;
private String pushType;
private String deviceType;
private String target;
private String source;
private String pushTime;
private String title;
private String body;
private String status;
public Long getAppKey() {
return this.appKey;
}
public void setAppKey(Long appKey) {
this.appKey = appKey;
}
public Long getMessageId() {
return this.messageId;
}
public void setMessageId(Long messageId) {
this.messageId = messageId;
}
public String getPushType() {
return this.pushType;
}
public void setPushType(String pushType) {
this.pushType = pushType;
}
public String getDeviceType() {
return this.deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getTarget() {
return this.target;
}
public void setTarget(String target) {
this.target = target;
}
public String getSource() {
return this.source;
}
public void setSource(String source) {
this.source = source;
}
public String getPushTime() {
return this.pushTime;
}
public void setPushTime(String pushTime) {
this.pushTime = pushTime;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getBody() {
return this.body;
}
public void setBody(String body) {
this.body = body;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
}
@Override
public QueryPushRecordsResponse getInstance(UnmarshallerContext context) {
return QueryPushRecordsResponseUnmarshaller.unmarshall(this, context);
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
f6949efd66c93e1c7ed01eaf8e89fa075a9a0f6b
|
f490119b5f7eea314c3049fc212ff77dd29a1e67
|
/core/src/main/java/com/alibaba/alink/common/sql/builtin/agg/LastDistinctValueUdaf.java
|
b8d4876df04dac0824c0d9d33988edfd33a569bc
|
[
"Apache-2.0"
] |
permissive
|
lethetann/Alink
|
b4cb3ddab211baa77e3a93a9b099ddcde662b903
|
a483a8a25ecd136ad4e18709c17c5a242c7e76fa
|
refs/heads/master
| 2021-10-27T17:11:40.158889
| 2021-10-08T10:05:41
| 2021-10-08T10:05:41
| 229,357,943
| 0
| 0
|
Apache-2.0
| 2020-08-06T01:30:39
| 2019-12-21T00:55:32
|
Java
|
UTF-8
|
Java
| false
| false
| 5,631
|
java
|
package com.alibaba.alink.common.sql.builtin.agg;
import org.apache.flink.api.java.tuple.Tuple3;
import com.alibaba.alink.common.sql.builtin.agg.LastDistinctValueUdaf.LastDistinctSaveFirst;
import java.sql.Timestamp;
public class LastDistinctValueUdaf extends BaseUdaf<Object, LastDistinctSaveFirst> {
private double timeInterval = -1;
private final boolean considerNull;
public LastDistinctValueUdaf() {
this.considerNull = false;
}
public LastDistinctValueUdaf(boolean considerNull) {
this.considerNull = considerNull;
}
public LastDistinctValueUdaf(double timeInterval) {
this.timeInterval = timeInterval;
this.considerNull = false;
}
@Override
public Object getValue(LastDistinctSaveFirst accumulator) {
return accumulator.query();
}
@Override
public LastDistinctSaveFirst createAccumulator() {
if (timeInterval == -1) {
return new LastDistinctSaveFirst(-0.001, considerNull);//make sure inside data is -1.
}
return new LastDistinctSaveFirst(timeInterval, considerNull);
}
@Override
public void accumulate(LastDistinctSaveFirst acc, Object... values) {
if (values.length != 4) {
throw new RuntimeException();
}
Object key = values[0];
Object value = values[1];
Object eventTime = values[2];
acc.setTimeInterval(Double.parseDouble(values[3].toString()));
acc.addOne(key, value, eventTime);
acc.setLastKey(key);
acc.setLastTime(eventTime);
}
@Override
public void retract(LastDistinctSaveFirst acc, Object... values) {
}
@Override
public void resetAccumulator(LastDistinctSaveFirst acc) {
acc.save = null;
acc.setLastTime(null);
acc.setLastKey(null);
}
@Override
public void merge(LastDistinctSaveFirst acc, Iterable <LastDistinctSaveFirst> it) {
}
public static class LastDistinctSaveFirst extends LastDistinct {
Tuple3 <Object, Object, Object> save = null;
private Object lastKey;
private Object lastTime;
private final boolean considerNull;
public void setLastKey(Object lastKey) {
this.lastKey = lastKey;
}
public void setLastTime(Object lastTime) {
this.lastTime = lastTime;
}
public LastDistinctSaveFirst(double timeInterval, boolean considerNull) {
super(timeInterval * 1000);
this.considerNull = considerNull;
}
public void setTimeInterval(double timeInterval) {
if (timeInterval == -1) {
this.timeInterval = -1;
} else {
this.timeInterval = timeInterval * 1000;
}
}
@Override
public void addOne(Object key, Object value, Object eventTime) {
//when query, if current key is null, it can query; besides, it can ignore null value.
if (key == null && !this.considerNull) {
return;
}
if (save != null) {
super.addOne(save.f0, save.f1, save.f2);
}
save = Tuple3.of(key, value, eventTime);
}
public Object query() {
if (lastTime instanceof Timestamp) {
return query(lastKey, ((Timestamp) lastTime).getTime());
} else {
return query(lastKey, (long) lastTime);
}
}
}
public static class LastDistinct {
//key, value, time
Tuple3 <Object, Object, Double> firstObj;
Tuple3 <Object, Object, Double> secondObj;
public double timeInterval;//the metric is ms.
public LastDistinct(double timeInterval) {
this.timeInterval = timeInterval;
}
void addOne(Object key, Object value, double currentTime) {
Tuple3<Object, Object, Double> currentNode = Tuple3.of(key, value, currentTime);
if (firstObj == null) {
firstObj = currentNode;
} else if (secondObj == null) {
secondObj = currentNode;
} else {
if (secondObj.f0 != key || firstObj.f0 == key) {
firstObj = secondObj;
}
secondObj = currentNode;
}
}
Object query(Object key, double currentTime) {
if (secondObj != null) {
if (secondObj.f0 == key) {
if (!(firstObj.f0 == key) &&
(timeInterval == -1 || currentTime - firstObj.f2 <= timeInterval)) {
return firstObj.f1;
} else {
return null;
}
} else {
if (timeInterval == -1 || currentTime - secondObj.f2 <= timeInterval) {
return secondObj.f1;
} else {
return null;
}
}
} else {
if (firstObj != null &&
!(firstObj.f0 == key) &&
(timeInterval == -1 || currentTime - firstObj.f2 <= timeInterval)) {
return firstObj.f1;
} else {
return null;
}
}
}
public void addOne(Object key, Object value, Object currentTime) {
if (currentTime instanceof Timestamp) {
addOne(key, value, ((Timestamp) currentTime).getTime());
} else {
addOne(key, value, (long) currentTime);
}
}
public Object query(Object key, Object currentTime) {
if (currentTime instanceof Timestamp) {
return query(key, ((Timestamp) currentTime).getTime());
} else {
return query(key, (long) currentTime);
}
}
@Override
public boolean equals(Object o) {
if (!(o instanceof LastDistinct)) {
return false;
}
Tuple3 <Object, Object, Double> otherFirst = ((LastDistinct) o).firstObj;
Tuple3 <Object, Object, Double> otherSecond = ((LastDistinct) o).secondObj;
return AggUtil.judgeNull(firstObj, otherFirst, LastDistinct::judgeTuple) &&
AggUtil.judgeNull(secondObj, otherSecond, LastDistinct::judgeTuple);
}
private static boolean judgeTuple(Object a, Object b) {
Tuple3 <Object, Object, Double> ta = (Tuple3 <Object, Object, Double>) a;
Tuple3 <Object, Object, Double> tb = (Tuple3 <Object, Object, Double>) b;
return AggUtil.judgeNull(ta.f0, tb.f0, AggUtil::simpleJudgeEqual) &&
AggUtil.judgeNull(ta.f1, tb.f1, AggUtil::simpleJudgeEqual) &&
AggUtil.judgeNull(ta.f2, tb.f2, AggUtil::simpleJudgeEqual);
}
}
}
|
[
"shaomeng.wang.w@gmail.com"
] |
shaomeng.wang.w@gmail.com
|
cc0487d236bdf79879ea98f2b4ef706567e00c49
|
db2d7241afcb02a7de80503bf492fa02251f9018
|
/services/eip/src/main/java/com/huaweicloud/sdk/eip/v2/model/UpdatePrePaidBandwidthRequest.java
|
e7fff766ad1e1ba08ce96d5150aada6927f442a5
|
[
"Apache-2.0"
] |
permissive
|
yasuor/huaweicloud-sdk-java-v3
|
64359e3ab599144d1dc2df08fb15f8e404295be5
|
3407632f294cdd40a62d4f9167f9708d95464cb8
|
refs/heads/master
| 2022-11-23T23:38:12.977127
| 2020-07-30T08:46:12
| 2020-07-30T08:46:12
| 286,420,644
| 1
| 0
|
NOASSERTION
| 2020-08-10T08:35:22
| 2020-08-10T08:35:21
| null |
UTF-8
|
Java
| false
| false
| 3,093
|
java
|
package com.huaweicloud.sdk.eip.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.eip.v2.model.UpdatePrePaidBandwidthRequestBody;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class UpdatePrePaidBandwidthRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="bandwidth_id")
private String bandwidthId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="body")
private UpdatePrePaidBandwidthRequestBody body = null;
public UpdatePrePaidBandwidthRequest withBandwidthId(String bandwidthId) {
this.bandwidthId = bandwidthId;
return this;
}
/**
* Get bandwidthId
* @return bandwidthId
*/
public String getBandwidthId() {
return bandwidthId;
}
public void setBandwidthId(String bandwidthId) {
this.bandwidthId = bandwidthId;
}
public UpdatePrePaidBandwidthRequest withBody(UpdatePrePaidBandwidthRequestBody body) {
this.body = body;
return this;
}
public UpdatePrePaidBandwidthRequest withBody(Consumer<UpdatePrePaidBandwidthRequestBody> bodySetter) {
if(this.body == null ){
this.body = new UpdatePrePaidBandwidthRequestBody();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public UpdatePrePaidBandwidthRequestBody getBody() {
return body;
}
public void setBody(UpdatePrePaidBandwidthRequestBody body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UpdatePrePaidBandwidthRequest updatePrePaidBandwidthRequest = (UpdatePrePaidBandwidthRequest) o;
return Objects.equals(this.bandwidthId, updatePrePaidBandwidthRequest.bandwidthId) &&
Objects.equals(this.body, updatePrePaidBandwidthRequest.body);
}
@Override
public int hashCode() {
return Objects.hash(bandwidthId, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UpdatePrePaidBandwidthRequest {\n");
sb.append(" bandwidthId: ").append(toIndentedString(bandwidthId)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
91ca8f4a111129d3999a30023c59292acfb94a41
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2016/8/AlreadyConstrainedException.java
|
e815c74b8731df12a0e78448ccfa6e8f729f4b92
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 3,122
|
java
|
/*
* Copyright (c) 2002-2016 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.api.exceptions.schema;
import org.neo4j.kernel.api.TokenNameLookup;
import org.neo4j.kernel.api.constraints.NodePropertyConstraint;
import org.neo4j.kernel.api.constraints.PropertyConstraint;
import org.neo4j.kernel.api.exceptions.Status;
import static java.lang.String.format;
public class AlreadyConstrainedException extends SchemaKernelException
{
private static final String NO_CONTEXT_FORMAT = "Already constrained %s.";
private static final String ALREADY_CONSTRAINED_MESSAGE_PREFIX = "Constraint already exists: ";
private static final String INDEX_CONTEXT_FORMAT = "Label '%s' and property '%s' have a unique constraint defined on them, so an index is " +
"already created that matches this.";
private final PropertyConstraint constraint;
private final OperationContext context;
public AlreadyConstrainedException( PropertyConstraint constraint, OperationContext context, TokenNameLookup tokenNameLookup )
{
super( Status.Schema.ConstraintAlreadyExists, constructUserMessage( context, tokenNameLookup, constraint ) );
this.constraint = constraint;
this.context = context;
}
public PropertyConstraint constraint()
{
return constraint;
}
private static String constructUserMessage( OperationContext context, TokenNameLookup tokenNameLookup, PropertyConstraint constraint )
{
switch ( context )
{
case INDEX_CREATION:
// is is safe to cast here because we only support indexes on nodes atm
NodePropertyConstraint nodePropertyConstraint = (NodePropertyConstraint) constraint;
return messageWithLabelAndPropertyName( tokenNameLookup, INDEX_CONTEXT_FORMAT,
nodePropertyConstraint.label(), nodePropertyConstraint.propertyKey() );
case CONSTRAINT_CREATION:
return ALREADY_CONSTRAINED_MESSAGE_PREFIX + constraint.userDescription( tokenNameLookup );
default:
return format( NO_CONTEXT_FORMAT, constraint );
}
}
@Override
public String getUserMessage( TokenNameLookup tokenNameLookup )
{
return constructUserMessage( context, tokenNameLookup, constraint );
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
0538e48d2eb4f9a39b8a89a7f90b33873a97ab55
|
9e05e92e8b66f2f098709ca98f0a8a97d37f1ea9
|
/src/brute_force/BOJ_14503.java
|
0674abf70c77d44a4d567e3be03e8c513e286a7e
|
[] |
no_license
|
mankicho/baekjoon
|
0f85fdca8510eb90f8637790801c6bda6c1e9c52
|
4ac76c912bf6b9eb633d64349c35cec7a9ebbb8e
|
refs/heads/master
| 2023-08-14T05:17:38.234843
| 2021-10-05T13:40:06
| 2021-10-05T13:40:06
| 363,829,868
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,002
|
java
|
package brute_force;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
public class BOJ_14503 {
static int[][] dir = new int[][]{
{-1, 0}, {0, 1}, {1, 0}, {0, -1}
};
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int[] arr = Arrays.stream(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
int n = arr[0];
int m = arr[1];
int[] robot = Arrays.stream(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
int[][] map = new int[n][m];
int cnt = 0;
for (int i = 0; i < n; i++) {
map[i] = Arrays.stream(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
}
int row = robot[0];
int col = robot[1];
int direction = robot[2];
int answer = 0;
while (true) {
if (map[row][col] == 0) {
map[row][col] = -1;
}
boolean allClear = true;
for (int i = 1; i <= 4; i++) {
int[] d = dir[(direction + 4 - i) % 4];
int er = d[0] + row;
int ec = d[1] + col;
if (map[er][ec] == 0) {
row = er;
col = ec;
direction = (direction + 4 - i) % 4;
allClear = false;
break;
}
}
if (allClear) {
int[] d = dir[direction];
row -= d[0];
col -= d[1];
if (map[row][col] == 1) {
break;
}
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (map[i][j] == -1) {
answer++;
}
}
}
System.out.println(answer);
}
}
|
[
"skxz123@gmail.com"
] |
skxz123@gmail.com
|
1baf766f402e856685b7872bf3c0a562962e7262
|
93c56db47169ff189c01cf3cba628f4019df817c
|
/JavaRushTasks/1.JavaSyntax/src/com/javarush/task/task05/task0501/Cat.java
|
840a6e373772000ae5c39b94b1b5c80fd3873048
|
[] |
no_license
|
sah-lob/JavaRushTasks
|
69c063b8057391e1c28477980314a33d8b107886
|
f05345afd5693db23546ff2fadadebee00c57c96
|
refs/heads/master
| 2020-04-06T11:48:37.433206
| 2018-12-08T08:31:38
| 2018-12-08T08:31:38
| 157,427,997
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,086
|
java
|
package com.javarush.task.task05.task0501;
/*
Создание кота
*/
public class Cat {
String name;
int age;
int weight;
int strength;
public static void main(String[] args) {
String name;
}
}
/* Создание кота
Создать класс Cat. У кота должно быть имя (name, String), возраст (age, int), вес (weight, int), сила (strength, int).
Требования:
1. Программа не должна считывать данные с клавиатуры.
2. У класса Cat должна быть переменная name с типом String.
3. У класса Cat должна быть переменная age с типом int.
4. У класса Cat должна быть переменная weight с типом int.
5. У класса Cat должна быть переменная strength с типом int.
6. Всего в классе должно быть 4 переменных.
*/
|
[
"Sah-lob@ya.ru"
] |
Sah-lob@ya.ru
|
70f27cba2c3b30e989de8ad6f264d9339210b8c1
|
1db1bb8802b1a5f5d3800f3f45418c1ce45b35d0
|
/Double Dragon/src/ch07/ex02/case13/Cat.java
|
8fc5f3d48027dc64f75c2214eebc994f4ad4aa25
|
[] |
no_license
|
loon0214/Double_Dragon
|
14868fd4d1609c8eba0e4d43fc71dba218100962
|
6aaf560c6d41197ef37dcda8dfd509eae73dbd03
|
refs/heads/master
| 2023-03-01T11:21:12.637314
| 2021-02-09T00:07:48
| 2021-02-09T00:07:48
| 336,406,008
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 183
|
java
|
package ch07.ex02.case13;
public class Cat {
private String name;
public Cat(String name) {
this.name = name;
}
public void eat() {
System.out.println(name+" eat");
}
}
|
[
"valentine458@naver.com"
] |
valentine458@naver.com
|
3b4f08d9370e713eeb3e7b4c26477be38c8d51f5
|
ab6a9ac461332807be95b43e90149e39c87fcd24
|
/src/main/java/com/spring/entity/UserPropertyDO.java
|
b7058c8b47eb896f9e13d46ad3bc3b07f7d6bbae
|
[] |
no_license
|
cc7118/SSM-lifecat
|
50298a5354cd03dbdb19f665d6b4d022cf595e76
|
2a00d873bf4740dca7cfb432cfe701738b27a8bc
|
refs/heads/master
| 2020-03-25T21:13:19.348569
| 2018-08-08T03:16:40
| 2018-08-08T03:16:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,856
|
java
|
package com.spring.entity;
/**
* DO :user_property
*
* @auther ten
*/
public class UserPropertyDO {
private Integer userId;
private String propertyNickname;
private String propertySignature;
private String propertySex;
private String propertyEmail;
private String propertyLocation;
private String propertyBirthday;
private String propertyGmtCreate;
private String propertyGmtModified;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getPropertyNickname() {
return propertyNickname;
}
public void setPropertyNickname(String propertyNickname) {
this.propertyNickname = propertyNickname;
}
public String getPropertySignature() {
return propertySignature;
}
public void setPropertySignature(String propertySignature) {
this.propertySignature = propertySignature;
}
public String getPropertySex() {
return propertySex;
}
public void setPropertySex(String propertySex) {
this.propertySex = propertySex;
}
public String getPropertyEmail() {
return propertyEmail;
}
public void setPropertyEmail(String propertyEmail) {
this.propertyEmail = propertyEmail;
}
public String getPropertyLocation() {
return propertyLocation;
}
public void setPropertyLocation(String propertyLocation) {
this.propertyLocation = propertyLocation;
}
public String getPropertyBirthday() {
return propertyBirthday;
}
public void setPropertyBirthday(String propertyBirthday) {
this.propertyBirthday = propertyBirthday;
}
public String getPropertyGmtCreate() {
return propertyGmtCreate;
}
public void setPropertyGmtCreate(String propertyGmtCreate) {
this.propertyGmtCreate = propertyGmtCreate;
}
public String getPropertyGmtModified() {
return propertyGmtModified;
}
public void setPropertyGmtModified(String propertyGmtModified) {
this.propertyGmtModified = propertyGmtModified;
}
/**
* @return UserPropertyDO@1234{UserID:'',Nickname:'',Signature:'',Sex:'',Email:'',Location:'',Birthday :'',Create:'',Modified:''}
*/
@Override
public String toString() {
return "UserDO@" + userId
+ "{UserID:" + userId
+ ",Nickname:" + propertyNickname
+ ",Signature:" + propertySignature
+ ",Sex:" + propertySex
+ ",Email:" + propertyEmail
+ ",Location:" + propertyLocation
+ ",Birthday:" + propertyBirthday
+ ",Create:" + propertyGmtCreate
+ ",Modified:" + propertyGmtModified
+ "}";
}
}
|
[
"596823919@qq.com"
] |
596823919@qq.com
|
24f3075f1fad1c9de44d4cc278b8d6ba2bb28988
|
c036afc4ba9aeaaede13e4153a91718805de9ed6
|
/trunk/v1.0.0/src/com/youthor/bsp/core/urss/model/CoopArea.java
|
b5b64f12c4aad3d93f992963ca9077996f80e234
|
[] |
no_license
|
BGCX262/zz-bsp-svn-to-git
|
c5713cd23c2423013b7515ecbc95415785f34c45
|
1c64b407aff1fc6632c93944cada76160c0f1423
|
refs/heads/master
| 2021-01-10T21:31:27.458998
| 2015-08-23T06:57:00
| 2015-08-23T06:57:00
| 41,245,256
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,038
|
java
|
/**
*
*/
package com.youthor.bsp.core.urss.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class CoopArea implements Serializable{
private static final long serialVersionUID = -4039311984673532834L;
private String coopAreaId;
private String coopAreaName;
private String coopAreaImg;
private String isDynamic;
private String implInf;
private float orderShow;
private String coopAreaCode;
private List resourceList=new ArrayList();//拥有的资源
public String getCoopAreaId() {
return coopAreaId;
}
public void setCoopAreaId(String coopAreaId) {
this.coopAreaId = coopAreaId;
}
public String getCoopAreaImg() {
return coopAreaImg;
}
public void setCoopAreaImg(String coopAreaImg) {
this.coopAreaImg = coopAreaImg;
}
public String getCoopAreaName() {
return coopAreaName;
}
public void setCoopAreaName(String coopAreaName) {
this.coopAreaName = coopAreaName;
}
public String getImplInf() {
return implInf;
}
public void setImplInf(String implInf) {
this.implInf = implInf;
}
public String getIsDynamic() {
return isDynamic;
}
public void setIsDynamic(String isDynamic) {
this.isDynamic = isDynamic;
}
public float getOrderShow() {
return orderShow;
}
public void setOrderShow(float orderShow) {
this.orderShow = orderShow;
}
public List getResourceList() {
if(resourceList==null)
return new ArrayList();
return resourceList;
}
public void setResourceList(List resourceList) {
this.resourceList = resourceList;
}
public String getCoopAreaCode() {
return coopAreaCode;
}
public void setCoopAreaCode(String coopAreaCode) {
this.coopAreaCode = coopAreaCode;
}
}
|
[
"you@example.com"
] |
you@example.com
|
27a58b1b4c6510b67202599d8bdf20c573eb909a
|
f8dc94201562bc9a0db5bc126ab4ad46d1edde19
|
/doulin-service/src/main/java/com/doulin/service/impl/SysUserServiceImpl.java
|
5743cfdf1bdb975bb188a87e23a27cd51407ba88
|
[] |
no_license
|
15638836857/boot-doulin
|
1653c68f606eafdf36511ceb12540efc764cc6ad
|
c81eae312055f3b71b14496b7fe66925079b6e25
|
refs/heads/master
| 2023-05-12T13:57:51.454787
| 2021-05-19T11:54:27
| 2021-05-19T11:54:27
| 368,855,337
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,322
|
java
|
package com.doulin.service.impl;
import cn.hutool.core.util.PhoneUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.doulin.common.MyException;
import com.doulin.common.content.ErrorContent;
import com.doulin.common.content.SysContent;
import com.doulin.entity.SysUser;
import com.doulin.entity.SysUserRole;
import com.doulin.entity.vo.VQuery;
import com.doulin.mapper.SysUserMapper;
import com.doulin.service.SysUserRoleService;
import com.doulin.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
/**
* SysUserServiceImpl
*
* @Author malinging
* @Date 2021-04-09
**/
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private SysUserRoleService sysUserRoleService;
@Override
public IPage<SysUser> page(VQuery query) {
IPage<SysUser> page = new Page<>();
Integer pageNum = query.getPageNum();
Integer pageSize = query.getPageSize();
page.setCurrent(pageNum == null ? 1 : pageNum);
page.setSize(pageSize == null ? 10 : pageSize);
return sysUserMapper.findByQuery(page, query);
}
@Override
public SysUser getOneByLoginNo(String loginNo) {
return sysUserMapper.selectInfoByLoginNo(loginNo);
}
@Override
public void verificationSysUser(String oper,SysUser sysUser) throws MyException {
//判断是否符合条件
if(StrUtil.isEmpty(sysUser.getTelePhone()) || !PhoneUtil.isMobile(sysUser.getTelePhone())){
throw new MyException(SysContent.ERROR_MOBILE);
}else if(StrUtil.isEmpty(sysUser.getRealName())){
throw new MyException(ErrorContent.ERROR_REAL_NAME);
}else if(null==sysUser.getDeptId()){
throw new MyException(ErrorContent.ERROR_DEPT);
}
if(SysContent.OPER_ADD.equals(oper)){
if(null!=getOneByLoginNo(sysUser.getLoginNo())){
throw new MyException(SysContent.ERROR_SYS_USER_EXSIS);
}
}else if(SysContent.OPER_EDIT.equals(oper)){
if(null==sysUser.getId()){
throw new MyException(SysContent.ERROR_ID);
}else {
SysUser use=getOneByLoginNo(sysUser.getLoginNo());
if(!use.getId().equals(sysUser.getId())){
throw new MyException(SysContent.ERROR_USER);
}
}
}else if(SysContent.OPER_DELETE.equals(oper)){
if(null==sysUser.getId()){
throw new MyException(SysContent.ERROR_ID);
}
}else{
throw new MyException(SysContent.ERROR_OPER);
}
}
@Transactional(rollbackFor = MyException.class)
@Override
public boolean addAndUpdate(String oper, SysUser sysUser) throws MyException {
verificationSysUser(oper,sysUser);
boolean flag=false;
if(SysContent.OPER_ADD.equals(oper)){
if(save(sysUser)){
flag=true;
}
}else if(SysContent.OPER_EDIT.equals(oper)){
if(getInfoByUserId(sysUser.getId()).get(0).getLoginNo().equals(SysContent.SYS_ADMIN)){
throw new MyException(SysContent.ADMIN_ERROR);
}
if(updateById(sysUser)){
flag=true;
}
}
String roleIds=sysUser.getRoleId();
List<String> roles= Arrays.asList(roleIds.split(SysContent.EN_D));
Set<SysUserRole> urlist=new HashSet<>();
for (String rid : roles) {
SysUserRole sur=new SysUserRole();
sur.setRoleId(Integer.valueOf(rid));
sur.setUserId(sysUser.getId());
urlist.add(sur);
}
sysUserRoleService.remove(new QueryWrapper<SysUserRole>().eq(SysContent.USER_ID,sysUser.getId()));
sysUserRoleService.saveBatch(urlist);
return flag;
}
@Transactional(rollbackFor = MyException.class)
@Override
public boolean deleteByIds(List<Integer> ids,String userId) throws MyException {
try {
sysUserMapper.deleteByIds(ids,userId);
return true;
} catch (Exception e) {
throw new MyException(e.getMessage());
}
}
@Override
public IPage<SysUser> pageInfo(Map<String, Object> map) {
List<SysUser> datalist=sysUserMapper.selectPageData(map);
Integer count=sysUserMapper.selectPageToTal(map);
IPage<SysUser> page=new Page<>();
page.setTotal(Long.valueOf(count.toString()));
page.setCurrent(Long.valueOf(map.get(SysContent.PAGE).toString()));
page.setSize(Long.valueOf(map.get(SysContent.ROWS).toString()));
page.setRecords(datalist);
return page;
}
@Override
public List<SysUser> getInfoByUserId(Integer id) {
return sysUserMapper.selectInfoById(id);
}
}
|
[
"15638836857@163.com"
] |
15638836857@163.com
|
73987143b60a3633b2fb6a5446fd4d461c331a75
|
f20af063f99487a25b7c70134378c1b3201964bf
|
/appengine/src/main/java/com/dereekb/gae/server/storage/services/gcs/impl/GcsStorableFileRequestImpl.java
|
90021949e11b462c1596ba0d629efbe61eac0814
|
[] |
no_license
|
dereekb/appengine
|
d45ad5c81c77cf3fcca57af1aac91bc73106ccbb
|
d0869fca8925193d5a9adafd267987b3edbf2048
|
refs/heads/master
| 2022-12-19T22:59:13.980905
| 2020-01-26T20:10:15
| 2020-01-26T20:10:15
| 165,971,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,357
|
java
|
package com.dereekb.gae.server.storage.services.gcs.impl;
import com.dereekb.gae.server.storage.object.file.StorableFile;
import com.dereekb.gae.server.storage.services.gcs.object.request.GcsStorableFileRequest;
import com.google.appengine.tools.cloudstorage.GcsFileOptions;
import com.google.appengine.tools.cloudstorage.GcsFilename;
/**
* Wraps a {@link StorableFile} and defines a GCS Bucket to use and
* {@link GcsFileOptions} options.
*
* @author dereekb
*
*/
public class GcsStorableFileRequestImpl
implements GcsStorableFileRequest {
private String gcsBucket;
private StorableFile file;
public GcsStorableFileRequestImpl(String gcsBucket, StorableFile file) {
this.setGcsBucket(gcsBucket);
this.setFile(file);
}
public String getGcsBucket() {
return this.gcsBucket;
}
public void setGcsBucket(String gcsBucket) {
this.gcsBucket = gcsBucket;
}
public StorableFile getFile() {
return this.file;
}
public void setFile(StorableFile file) {
this.file = file;
}
// MARK: GcsStorableFile
@Override
public GcsFilename getGcsFilename() {
String path = this.file.getFilePath();
GcsFilename filename = new GcsFilename(this.gcsBucket, path);
return filename;
}
@Override
public String toString() {
return "GcsStorableFileRequestImpl [gcsBucket=" + this.gcsBucket + ", file=" + this.file + "]";
}
}
|
[
"dereekb@gmail.com"
] |
dereekb@gmail.com
|
8aacfcb3db85b5f4fd4829e715cfe570e8eb0bf6
|
1ac3bd7f79b1767a73c6f37964373ed350011086
|
/src/main/java/io/proleap/vb6/asg/metamodel/statement/doloop/DoLoop.java
|
a272552cdcf7ad28b08d6e4590842de61c3d663c
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
fossamagna/vb6parser
|
c7f1cb1a5d5a76520f76ab56b02ee3af99272372
|
6395d8c11d486b5da1e21e8d4dcd021ebd3a9df5
|
refs/heads/master
| 2023-04-06T10:57:17.341891
| 2017-09-19T08:51:40
| 2017-09-19T08:51:40
| 87,297,924
| 0
| 0
|
BSD-3-Clause
| 2023-04-04T00:16:49
| 2017-04-05T10:40:55
|
Java
|
UTF-8
|
Java
| false
| false
| 611
|
java
|
/*
* Copyright (C) 2017, Ulrich Wolffgang <u.wol@wwu.de>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-clause license. See the LICENSE file for details.
*/
package io.proleap.vb6.asg.metamodel.statement.doloop;
import io.proleap.vb6.VisualBasic6Parser.DoLoopStmtContext;
import io.proleap.vb6.asg.metamodel.statement.Statement;
/**
* Repeats a block of statements while a condition is True or until a condition
* becomes True.
*/
public interface DoLoop extends Statement {
@Override
DoLoopStmtContext getCtx();
}
|
[
"u.wol@wwu.de"
] |
u.wol@wwu.de
|
7de9d773c0aae79b7014f37170dddcfc7adffe3b
|
5513bb059cc3ccc2a429104078c3bc81268324ee
|
/lib-ec/src/main/java/com/skcodestack/fastec/ec/main/personal/profile/ProfileDelegate.java
|
c89eecc8d4b25712d18ebecf8f76660d51da1277
|
[] |
no_license
|
skcodestack/FastEc
|
e4ce72bc853960df845825614e64b08de650f82b
|
b037ccdcad0fe4fffaf42b51bc3adcb8434e629b
|
refs/heads/master
| 2020-03-26T20:51:59.959885
| 2018-08-20T02:45:09
| 2018-08-20T02:45:09
| 145,351,194
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
package com.skcodestack.fastec.ec.main.personal.profile;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.skcodestack.fastec.ec.R;
import com.skcodestack.fastec.ec.R2;
import com.skcodestack.fastec.ec.main.personal.adapter.ListAdapter;
import com.skcodestack.fastec.ec.main.personal.adapter.ListBean;
import com.skcodestack.fastec.ec.main.personal.adapter.ListItemType;
import com.skcodestack.stack.delegates.LemonDelegate;
import java.util.ArrayList;
import butterknife.BindView;
/**
* Email 1562363326@qq.com
* Github https://github.com/skcodestack
* Created by sk on 2018/7/19
* Version 1.0
* Description:
*/
public class ProfileDelegate extends LemonDelegate {
@BindView(R2.id.rv_user_profile)
RecyclerView mRecyclerView;
private ArrayList<ListBean> mList;
@Override
public Object getLayout() {
return R.layout.delegate_user_profile;
}
@Override
public void onBindView(@Nullable Bundle savedInstanceState, View rootView) {
ListBean image = new ListBean.Builder()
.setItemType(ListItemType.ITEM_TYPE_AVATAR)
.setId(1)
.setImageUrl("https://img4.duitang.com/uploads/item/201403/29/20140329104049_xBeLm.thumb.200_200_c.jpeg")
.build();
ListBean name = new ListBean.Builder()
.setItemType(ListItemType.ITEM_TYPE_ARROW)
.setId(2)
.setText("姓名")
.setValue("张聊聊")
.build();
ListBean birth = new ListBean.Builder()
.setItemType(ListItemType.ITEM_TYPE_ARROW)
.setId(3)
.setText("生日")
.setValue("1991-09-01")
.build();
mList = new ArrayList<>();
mList.add(image);
mList.add(name);
mList.add(birth);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());
mRecyclerView.setLayoutManager(layoutManager);
}
@Override
public void onLazyInitView(@Nullable Bundle savedInstanceState) {
super.onLazyInitView(savedInstanceState);
ListAdapter mAdapter = new ListAdapter(mList);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.addOnItemTouchListener(new UserPofileOnClickListener(this));
}
}
|
[
"sk@github.com"
] |
sk@github.com
|
44e22912e4317e71b5d9328321d5efb1f0eaa357
|
0f54133d7fafaff7499bf106e2b7582a7b331757
|
/app/src/main/java/com/sanleng/sl/fireemergency/mvp/ui/electricalfire/activity/RealDataItemActivity.java
|
11f185e3133c6157737a863bd3109459b49dee17
|
[] |
no_license
|
wendyJohn/FireEmergencys
|
962b2218073f21a0c0f05ddfe89460579f88a42e
|
87b44adcfdf0c52be7b2251ec56d8e71c8576648
|
refs/heads/master
| 2020-12-14T21:31:34.404146
| 2020-01-08T02:13:22
| 2020-01-08T02:13:22
| 234,874,596
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,401
|
java
|
package com.sanleng.sl.fireemergency.mvp.ui.electricalfire.activity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.bigkoo.svprogresshud.SVProgressHUD;
import com.sanleng.sl.fireemergency.R;
import com.sanleng.sl.fireemergency.mvp.base.BaseActivity;
import com.sanleng.sl.fireemergency.mvp.bean.ReadTimeItems;
import com.sanleng.sl.fireemergency.mvp.presenter.RealDataPresenter;
import com.sanleng.sl.fireemergency.mvp.presenter.contract.RealItemsContract;
import com.sanleng.sl.fireemergency.mvp.ui.electricalfire.adapter.RealDataItemAdapter;
import com.sanleng.sl.fireemergency.mvp.ui.login.activity.LoginActivity;
import com.sanleng.sl.fireemergency.mvp.util.PreferenceUtils;
import java.util.List;
import butterknife.ButterKnife;
/**
* 智能电气火灾实时数据
*
* @author Qiaoshi
*/
public class RealDataItemActivity extends BaseActivity implements OnClickListener, RealItemsContract {
private String devicename;
private RelativeLayout back;
private ListView dataitemlistviewa;
private ListView dataitemlistviewb;
private ListView dataitemlistviewc;
private ListView dataitemlistviewd;
private TextView e_name;
@SuppressLint("ResourceAsColor")
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
setContentView(R.layout.realdataitemactivity);
initView();
}
@Override
public int getLayoutId() {
return R.layout.realdataitemactivity;
}
@Override
protected void initToolbar() {
}
//初始化
@Override
protected void initView() {
ButterKnife.bind(this);
Intent intent = getIntent();
devicename= intent.getStringExtra("name");
e_name = findViewById(R.id.e_name);
e_name.setText(devicename);
back = findViewById(R.id.back);
back.setOnClickListener(this);
}
@Override
protected void initData() {
RealDataPresenter.getRealDataItem(RealDataItemActivity.this, getApplicationContext(), devicename);
}
@Override
public void onResume() {
handler.postDelayed(runnable, 10 * 3000);
super.onResume();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.back:
finish();
break;
default:
break;
}
}
private Runnable runnable = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
//要做的事情
RealDataPresenter.getRealDataItem(RealDataItemActivity.this, getApplicationContext(), devicename);
handler.postDelayed(this, 10 * 3000);//实现循环
}
};
private Handler handler = new Handler();
@Override
protected void onDestroy() {
handler.removeCallbacks(runnable);
super.onDestroy();
}
@Override
public void RealTimeDataFailed() {
new SVProgressHUD(RealDataItemActivity.this).showErrorWithStatus("数据请求失败");
}
@Override
public void RealItemSuccess(List<ReadTimeItems.PageBean.ListBean> list_temperature, List<ReadTimeItems.PageBean.ListBean> list_current, List<ReadTimeItems.PageBean.ListBean> list_residualcurrent, List<ReadTimeItems.PageBean.ListBean> list_voltage, String buildids, String floorids) {
dataitemlistviewa = findViewById(R.id.dataitemlistviewa);
dataitemlistviewb = findViewById(R.id.dataitemlistviewb);
dataitemlistviewc = findViewById(R.id.dataitemlistviewc);
dataitemlistviewd = findViewById(R.id.dataitemlistviewd);
RealDataItemAdapter realDataItemAdaptera = new RealDataItemAdapter(RealDataItemActivity.this, list_temperature);
dataitemlistviewa.setAdapter(realDataItemAdaptera);
RealDataItemAdapter realDataItemAdapterb = new RealDataItemAdapter(RealDataItemActivity.this, list_residualcurrent);
dataitemlistviewb.setAdapter(realDataItemAdapterb);
RealDataItemAdapter realDataItemAdapterc = new RealDataItemAdapter(RealDataItemActivity.this, list_current);
dataitemlistviewc.setAdapter(realDataItemAdapterc);
RealDataItemAdapter realDataItemAdapterd = new RealDataItemAdapter(RealDataItemActivity.this, list_voltage);
dataitemlistviewd.setAdapter(realDataItemAdapterd);
}
@Override
public void Timeout() {
// 清空sharepre中的用户名和密码
new SVProgressHUD(getApplicationContext()).showInfoWithStatus("登录超时,请重新登录");
new Handler().postDelayed(new Runnable() {
public void run() {
PreferenceUtils.setString(getApplicationContext(), "FireEmergency_usernames", "");
Intent loginOutIntent = new Intent(getApplicationContext(), LoginActivity.class);
loginOutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(loginOutIntent);
finish();
}
}, 2000);
}
}
|
[
"530913978@qq.com"
] |
530913978@qq.com
|
4e7fe6f49f0dcf373ab9efb08eaef3e1d70ea2f4
|
517583f82d4689edeccd3997ce0054ec9a727ded
|
/src/main/java/com/bergerkiller/mountiplex/reflection/util/FastConstructor.java
|
08dd3bc8298ed288276441526bf91ce9e16e3f6a
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
bergerhealer/Mountiplex
|
082cf92b3fb05f3bcec0408d178d980737ba0914
|
28ad8925416a762d6da35c6702e55f83d8bf4727
|
refs/heads/master
| 2023-04-08T03:07:40.921756
| 2023-04-03T17:23:32
| 2023-04-03T17:23:32
| 89,706,894
| 8
| 6
|
MIT
| 2023-02-22T09:25:26
| 2017-04-28T13:07:29
|
Java
|
UTF-8
|
Java
| false
| false
| 7,418
|
java
|
package com.bergerkiller.mountiplex.reflection.util;
import com.bergerkiller.mountiplex.reflection.declarations.ClassResolver;
import com.bergerkiller.mountiplex.reflection.declarations.ConstructorDeclaration;
import com.bergerkiller.mountiplex.reflection.declarations.ParameterDeclaration;
import com.bergerkiller.mountiplex.reflection.util.fast.Constructor;
import com.bergerkiller.mountiplex.reflection.util.fast.ReflectionConstructor;
public class FastConstructor<T> implements Constructor<T>, LazyInitializedObject, IgnoresRemapping {
private Constructor<T> constructor;
private ConstructorDeclaration constructorDec;
private String missingInfo = "!!UNKNOWN!!"; // stored info for when constructor is null
public FastConstructor() {
this.constructorDec = null;
this.constructor = new FastConstructorInitProxy();
}
public FastConstructor(java.lang.reflect.Constructor<?> constructor) {
this.constructorDec = new ConstructorDeclaration(ClassResolver.DEFAULT, constructor);
this.constructor = new FastConstructorInitProxy();
}
public final void init(java.lang.reflect.Constructor<?> constructor) {
this.constructorDec = new ConstructorDeclaration(ClassResolver.DEFAULT, constructor);
this.constructor = new FastConstructorInitProxy();
}
public final void init(ConstructorDeclaration constructorDeclaration) {
if (constructorDeclaration != null && constructorDeclaration.constructor == null) {
this.constructorDec = null;
this.constructor = new FastConstructorInitProxy();
} else {
this.constructorDec = constructorDeclaration;
this.constructor = new FastConstructorInitProxy();
}
}
/**
* Declares this constructor to be unavailable, providing a missing information String to later identify it
*
* @param missingInfo to print when trying to access it
*/
public final void initUnavailable(String missingInfo) {
this.constructorDec = null;
this.constructor = new FastConstructorInitProxy();
this.missingInfo = missingInfo;
}
/**
* Checks whether this fast constructor is initialized, and throws an exception if it is not.
*/
public final void checkInit() {
if (constructorDec == null) {
throw new UnsupportedOperationException("Constructor " + this.missingInfo + " is not available");
}
}
/**
* Checks whether this constructor is available
*
* @return True if the constructor is available
*/
public final boolean isAvailable() {
return this.constructorDec != null;
}
/**
* Gets the backing Java Reflection Constructor for this Fast Constructor. If this fast constructor
* is not initialized, this function returns <i>null</i>.
* To check whether this fast constructor is initialized, use {@link #isAvailable()}.
*
* @return constructor
*/
public final java.lang.reflect.Constructor<?> getConstructor() {
return this.constructorDec == null ? null : this.constructorDec.constructor;
}
/**
* Gets whether this Fast Constructor represents a class constructor exactly
*
* @param constructor to check
* @return True if it manages the same Constructor, False if not
*/
public final boolean isConstructor(java.lang.reflect.Constructor<?> constructor) {
return this.constructorDec != null && this.constructorDec.constructor != null && this.constructorDec.constructor.equals(constructor);
}
/**
* Gets the name of this constructor.
* Returns <i>"null"</i> if this fast constructor is not initialized.
*
* @return constructor name
*/
public final String getName() {
if (this.constructorDec == null) {
return "null";
} else {
StringBuilder name = new StringBuilder();
name.append("constr");
for (ParameterDeclaration param : this.constructorDec.parameters.parameters) {
name.append(param.name.real());
}
return name.toString();
}
}
@Override
public void forceInitialization() {
if (this.constructor instanceof FastConstructor.FastConstructorInitProxy) {
((FastConstructorInitProxy) this.constructor).init();
}
}
@Override
public T newInstanceVA(Object... args) {
return constructor.newInstanceVA(args);
}
@Override
public T newInstance() {
return constructor.newInstance();
}
@Override
public T newInstance(Object arg0) {
return constructor.newInstance(arg0);
}
@Override
public T newInstance(Object arg0, Object arg1) {
return constructor.newInstance(arg0, arg1);
}
@Override
public T newInstance(Object arg0, Object arg1, Object arg2) {
return constructor.newInstance(arg0, arg1, arg2);
}
@Override
public T newInstance(Object arg0, Object arg1, Object arg2, Object arg3) {
return constructor.newInstance(arg0, arg1, arg2, arg3);
}
@Override
public T newInstance(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
return constructor.newInstance(arg0, arg1, arg2, arg3, arg4);
}
// This object is used at the first call to initialize the constructor
private final class FastConstructorInitProxy implements Constructor<T> {
/**
* Initializes this constructor invoker. The method will be found through
* reflection and optimized accessors compiled. All of this is only performed once.
*
* All calls to invoke() in this class explicitly call init().
*
* @return the new invoker that should be used from now on
*/
private final Constructor<T> init() {
if (constructor == this) {
synchronized (FastConstructor.this) {
if (constructor == this) {
checkInit();
// Calls an existing member method
constructorDec.constructor.setAccessible(true);
constructor = ReflectionConstructor.create(constructorDec.constructor);
}
}
}
return constructor;
}
@Override
public T newInstanceVA(Object... args) {
return init().newInstanceVA(args);
}
@Override
public T newInstance() {
return init().newInstance();
}
@Override
public T newInstance(Object arg0) {
return init().newInstance(arg0);
}
@Override
public T newInstance(Object arg0, Object arg1) {
return init().newInstance(arg0, arg1);
}
@Override
public T newInstance(Object arg0, Object arg1, Object arg2) {
return init().newInstance(arg0, arg1, arg2);
}
@Override
public T newInstance(Object arg0, Object arg1, Object arg2, Object arg3) {
return init().newInstance(arg0, arg1, arg2, arg3);
}
@Override
public T newInstance(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
return init().newInstance(arg0, arg1, arg2, arg3, arg4);
}
}
}
|
[
"irmo.vandenberge@ziggo.nl"
] |
irmo.vandenberge@ziggo.nl
|
a65a071d8412e65abe8f3ffafff3f825f125f24f
|
ea03c0eff8dbdceaab3fc1c3c9e843fadf3018a2
|
/modules/integration/manual/src/test/interop/whitemesa/round2/util/Round2EchoStructClientUtil.java
|
a0361598894643bd6ae7bccd94086cbe9f0246da
|
[
"Apache-2.0"
] |
permissive
|
cranelab/axis1_3
|
28544dbcf3bf0c9bf59a59441ad8ef21143f70f0
|
1754374507dee9d1502478c454abc1d13bcf15b9
|
refs/heads/master
| 2022-12-28T05:17:18.894411
| 2020-04-22T17:50:05
| 2020-04-22T17:50:05
| 257,970,632
| 0
| 0
|
Apache-2.0
| 2020-10-13T21:25:37
| 2020-04-22T17:21:46
|
Java
|
UTF-8
|
Java
| false
| false
| 3,025
|
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 test.interop.whitemesa.round2.util;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import test.interop.whitemesa.SunClientUtil;
import test.interop.whitemesa.WhiteMesaConstants;
public class Round2EchoStructClientUtil implements SunClientUtil {
public SOAPEnvelope getEchoSoapEnvelope() {
SOAPFactory omfactory = OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope reqEnv = omfactory.getDefaultEnvelope();
reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema", "xsd");
reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
reqEnv.declareNamespace("http://soapinterop.org/", "tns");
reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance", "xsi");
OMElement operation =
omfactory.createOMElement("echoStruct", "http://soapinterop.org/", null);
reqEnv.getBody().addChild(operation);
operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/",
null);
OMElement part = omfactory.createOMElement("inputStruct", "", null);
part.addAttribute("xsi:type", "s:SOAPStruct", null);
OMElement value0 = omfactory.createOMElement("varString", "", null);
value0.addAttribute("xsi:type", "xsd:string", null);
value0.addChild(omfactory.createOMText(WhiteMesaConstants.ECHO_STRUCT_STRING));
OMElement value1 = omfactory.createOMElement("varInt", "", null);
value1.addAttribute("xsi:type", "xsd:int", null);
value1.addChild(omfactory.createOMText(WhiteMesaConstants.ECHO_STRUCT_INT));
OMElement value2 = omfactory.createOMElement("varFloat", "", null);
value2.addAttribute("xsi:type", "xsd:float", null);
value2.addChild(omfactory.createOMText(WhiteMesaConstants.ECHO_STRUCT_FLOAT));
part.addChild(value0);
part.addChild(value1);
part.addChild(value2);
operation.addChild(part);
return reqEnv;
}
}
|
[
"45187319+cranelab@users.noreply.github.com"
] |
45187319+cranelab@users.noreply.github.com
|
a84147c5d9a25f0268a93c443003fa86530854bb
|
a06f8f3febf07c815695ceb81123332cc8310690
|
/jsf2-primefaces-spring/src/main/generated-java/com/jaxio/web/domain/LegacyEditForm.java
|
39e18f4d3735cc5d1ad31e6f03da76b76bccaf40
|
[] |
no_license
|
archie-sh/generated-projects
|
6765d499359c7df54a86fe011457cea1efcb00b3
|
9b82e77f4c4b7e6bca495c20bc925f2c7c9170fa
|
refs/heads/master
| 2021-01-16T19:22:25.662374
| 2013-05-01T20:08:54
| 2013-05-01T20:08:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,007
|
java
|
/*
* (c) Copyright 2005-2013 JAXIO, http://www.jaxio.com
* Source code generated by Celerio, a Jaxio product
* Want to use Celerio within your company? email us at info@jaxio.com
* Follow us on twitter: @springfuse
* Template pack-jsf2-spring-conversation:src/main/java/domain/EditForm.e.vm.java
*/
package com.jaxio.web.domain;
import javax.inject.Inject;
import javax.inject.Named;
import com.jaxio.domain.Legacy;
import com.jaxio.domain.LegacyPk;
import com.jaxio.repository.LegacyRepository;
import com.jaxio.web.domain.support.GenericEditForm;
import com.jaxio.web.faces.ConversationContextScoped;
/**
* View Helper/Controller to edit {@link Legacy}.
*/
@Named
@ConversationContextScoped
public class LegacyEditForm extends GenericEditForm<Legacy, LegacyPk> {
@Inject
public LegacyEditForm(LegacyRepository legacyRepository) {
super(legacyRepository);
}
/**
* The entity to edit/view.
*/
public Legacy getLegacy() {
return getEntity();
}
}
|
[
"nromanetti@jaxio.com"
] |
nromanetti@jaxio.com
|
82fc5e2b8b0c3c527e6f0b420409db548b10df08
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a049/A049625Test.java
|
cf2e056a160326f1ad2f7c5127eb67b68ae2751b
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a049;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A049625Test extends AbstractSequenceTest {
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
b391ad34f856651f0846b0d9f33fe6d48198512e
|
999cd4a1015a0bb30c8af8890eb64366af32525b
|
/first/src/com/kita/first/mission/Mission6_7.java
|
4cc27c0707ba0c8712339586f7837df45b2ee71b
|
[] |
no_license
|
phantom-black/2020JavaSpring
|
5bd5c4be944b20fae79e5151259c422f652b0c72
|
79dbaec57c5b42df2107c21f266708574b295b25
|
refs/heads/master
| 2022-11-10T14:30:01.815401
| 2020-07-01T05:04:08
| 2020-07-01T05:04:08
| 272,581,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 439
|
java
|
package com.kita.first.mission;
public class Mission6_7 {
public static void main(String[] args) {
int star = 5;
for(int i=1; i<=star; i++) {
for(int z=star; z>0; z--) {
System.out.print(i<z ? " " : "*"); // (i<z ? " " : " *") 하면 피라미드 모양
/*
if(i<z) {
System.out.print("");
} else {
System.out.print("*");
}
*/
}
System.out.println();
}
}
}
|
[
"Administrator@DESKTOP-ISVFPRU"
] |
Administrator@DESKTOP-ISVFPRU
|
244e9210078c77b8c00baaf0319aaaa532f78d9f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_6f274d45b701c4dff291b6fafca33aada679a6f0/MongoDBOutputStream/9_6f274d45b701c4dff291b6fafca33aada679a6f0_MongoDBOutputStream_t.java
|
f9e9733d87c23497793a87f44b7e29583c7e0b30
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,896
|
java
|
/*******************************************************************************
* Copyright (c) 2011 Bryan Hunt & Ed Merks.
* 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:
* Bryan Hunt & Ed Merks - initial API and implementation
*******************************************************************************/
package org.eclipselabs.mongo.emf;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipselabs.emf.query.QueryFactory;
import org.eclipselabs.emf.query.Result;
import com.mongodb.DBCollection;
import com.mongodb.DBObject;
import com.mongodb.WriteConcern;
/**
* @author bhunt
*
*/
public class MongoDBOutputStream extends ByteArrayOutputStream implements URIConverter.Saveable
{
public MongoDBOutputStream(IConverterService converterService, DBCollection collection, URI uri, Map<?, ?> options, Map<Object, Object> response)
{
if (converterService == null)
throw new NullPointerException("The converter service must not be null");
if (collection == null)
throw new NullPointerException("The database collection must not be null");
this.converterService = converterService;
this.collection = collection;
this.uri = uri;
this.options = options;
this.response = response;
}
@Override
public void close() throws IOException
{
super.close();
// We need to set up the XMLResource.URIHandler so that proxy URIs are handled properly.
XMLResource.URIHandler uriHandler = (XMLResource.URIHandler) options.get(XMLResource.OPTION_URI_HANDLER);
if (uriHandler == null)
uriHandler = new org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl();
Object id = MongoDBURIHandlerImpl.getID(uri);
// If the id was not specified, we append a dummy id to the resource URI so that all of the
// relative proxies will be generated correctly.
if (id == null)
resource.setURI(resource.getURI().trimSegments(1).appendSegment("-1"));
uriHandler.setBaseURI(resource.getURI());
Boolean serializeOption = (Boolean) options.get(MongoDBURIHandlerImpl.OPTION_SERIALIZE_DEFAULT_ATTRIBUTE_VALUES);
boolean serializeDefaultAttributeValues = false;
if (serializeOption != null)
serializeDefaultAttributeValues = serializeOption;
builder = createBuilder(uriHandler, serializeDefaultAttributeValues);
if (resource.getContents().size() == 1)
saveSingleObject(id);
else
saveMultipleObjects();
}
@Override
public void saveResource(Resource resource)
{
this.resource = resource;
}
protected DBObjectBuilder createBuilder(XMLResource.URIHandler uriHandler, boolean serializeDefaultAttributeValues)
{
return new DBObjectBuilder(converterService, uriHandler, serializeDefaultAttributeValues);
}
private void saveMultipleObjects() throws IOException
{
EList<EObject> contents = resource.getContents();
ArrayList<DBObject> dbObjects = new ArrayList<DBObject>(contents.size());
long timeStamp = System.currentTimeMillis();
response.put(URIConverter.RESPONSE_TIME_STAMP_PROPERTY, timeStamp);
Boolean useIdAttributeAsPrimaryKey = (Boolean) options.get(MongoDBURIHandlerImpl.OPTION_USE_ID_ATTRIBUTE_AS_PRIMARY_KEY);
for (EObject eObject : contents)
{
DBObject dbObject = builder.buildDBObject(eObject);
dbObject.put(MongoDBURIHandlerImpl.TIME_STAMP_KEY, timeStamp);
if (useIdAttributeAsPrimaryKey != null && useIdAttributeAsPrimaryKey)
{
EAttribute idAttribute = eObject.eClass().getEIDAttribute();
if (idAttribute != null)
dbObject.put(MongoDBURIHandlerImpl.ID_KEY, eObject.eGet(idAttribute));
}
dbObjects.add(dbObject);
}
WriteConcern writeConcern = (WriteConcern) options.get(MongoDBURIHandlerImpl.OPTION_WRITE_CONCERN);
if (writeConcern == null)
collection.insert(dbObjects);
else
collection.insert(dbObjects, writeConcern);
URI baseURI = resource.getURI().trimSegments(1);
InternalEObject[] eObjects = contents.toArray(new InternalEObject[contents.size()]);
Result result = QueryFactory.eINSTANCE.createResult();
InternalEList<EObject> values = (InternalEList<EObject>) result.getValues();
for (int i = 0; i < dbObjects.size(); i++)
{
InternalEObject internalEObject = eObjects[i];
internalEObject.eSetProxyURI(baseURI.appendSegment(dbObjects.get(i).get(MongoDBURIHandlerImpl.ID_KEY).toString()).appendFragment("/"));
internalEObject.eAdapters().clear();
values.addUnique(internalEObject);
}
contents.clear();
contents.add(result);
}
private void saveSingleObject(Object id) throws IOException
{
// Build a MongoDB object from the EMF object.
EObject eObject = resource.getContents().get(0);
DBObject dbObject = builder.buildDBObject(eObject);
// The timestamp needs to be persisted with the object, and set in the response
long timeStamp = System.currentTimeMillis();
dbObject.put(MongoDBURIHandlerImpl.TIME_STAMP_KEY, timeStamp);
response.put(URIConverter.RESPONSE_TIME_STAMP_PROPERTY, timeStamp);
WriteConcern writeConcern = (WriteConcern) options.get(MongoDBURIHandlerImpl.OPTION_WRITE_CONCERN);
if (id == null)
{
// The id was not specified in the URI, so we can let MongoDB generate the id or use the value
// of the ID attribute
Boolean useIdAttributeAsPrimaryKey = (Boolean) options.get(MongoDBURIHandlerImpl.OPTION_USE_ID_ATTRIBUTE_AS_PRIMARY_KEY);
EAttribute idAttribute = eObject.eClass().getEIDAttribute();
boolean idSpecifiedByClient = useIdAttributeAsPrimaryKey != null && useIdAttributeAsPrimaryKey && idAttribute != null;
if (idSpecifiedByClient)
{
// Use the ID attribute value as the id
id = eObject.eGet(idAttribute);
dbObject.put(MongoDBURIHandlerImpl.ID_KEY, id);
}
if (writeConcern == null)
collection.insert(dbObject);
else
collection.insert(dbObject, writeConcern);
if (!idSpecifiedByClient)
{
// The id was not specified, so we are creating an object and letting MongoDB generate the id
id = dbObject.get(MongoDBURIHandlerImpl.ID_KEY);
}
// Modify the EMF Resource URI to include the id generated by MongoDB or specified in the ID attribute
// by removing the dummy id and appending the real id.
URI newURI = resource.getURI().trimSegments(1).appendSegment(id.toString());
// The EMF framework will do the actual modification of the Resource URI if the new URI is
// set in the response options.
response.put(URIConverter.RESPONSE_URI, newURI);
}
else
{
// The object id was specified, so we are either doing an update, or inserting a new
// object. If the object already exists, then it will be updated; otherwise it will
// be inserted.
dbObject.put(MongoDBURIHandlerImpl.ID_KEY, id);
if (writeConcern == null)
collection.save(dbObject);
else
collection.save(dbObject, writeConcern);
}
}
private IConverterService converterService;
private DBCollection collection;
private Map<?, ?> options;
private Resource resource;
private Map<Object, Object> response;
private URI uri;
private DBObjectBuilder builder;
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
97d8b999441edcab05a6601f368a01d7d5f56354
|
da205bce53df38da79e43aeb15ca7710ae0795c3
|
/src/main/java/com/medwin/landison/kms/reservationservice/OrderInfoPackage.java
|
18f70eafbfd37dbf04bfb31a841daaadfd5dc65f
|
[] |
no_license
|
medwinwang/landison
|
7c86624d6d2c61a24cfbcacec18260057e8430e4
|
c1aadc26547c2a1e05adc7f2d01366a80a87fe9a
|
refs/heads/master
| 2020-04-01T20:03:40.263160
| 2019-03-04T13:40:01
| 2019-03-04T13:40:01
| 153,586,357
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,221
|
java
|
package com.medwin.landison.kms.reservationservice;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>OrderInfoPackage complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="OrderInfoPackage">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Package" type="{http://www.shijinet.com.cn/kunlun/kws/1.1/}Package" minOccurs="0"/>
* <element name="DailyPackages" type="{http://www.shijinet.com.cn/kunlun/kws/1.1/}ArrayOfDailyPackage" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OrderInfoPackage", propOrder = {
"_package",
"dailyPackages"
})
public class OrderInfoPackage {
@XmlElement(name = "Package")
protected Package _package;
@XmlElement(name = "DailyPackages")
protected ArrayOfDailyPackage dailyPackages;
/**
* 获取package属性的值。
*
* @return
* possible object is
* {@link Package }
*
*/
public Package getPackage() {
return _package;
}
/**
* 设置package属性的值。
*
* @param value
* allowed object is
* {@link Package }
*
*/
public void setPackage(Package value) {
this._package = value;
}
/**
* 获取dailyPackages属性的值。
*
* @return
* possible object is
* {@link ArrayOfDailyPackage }
*
*/
public ArrayOfDailyPackage getDailyPackages() {
return dailyPackages;
}
/**
* 设置dailyPackages属性的值。
*
* @param value
* allowed object is
* {@link ArrayOfDailyPackage }
*
*/
public void setDailyPackages(ArrayOfDailyPackage value) {
this.dailyPackages = value;
}
}
|
[
"wm1990315@gmail.com"
] |
wm1990315@gmail.com
|
0682d3fb3df63f657de9c85ba6fe40b8026900e2
|
fce16a490975454672c345f9d3dd736c84d1a202
|
/src/main/java/me/iiaii/springdatajpaintro/entity/Member.java
|
75a77d2eb435b70968361f457c085af0728266f0
|
[] |
no_license
|
iiaii/spring-data-jpa-intro
|
dd54f03ae509044c533bead9a74e577b6e44d1b6
|
c4e22309b4094ea50498311d426f4152593a88ba
|
refs/heads/master
| 2023-04-15T10:24:36.852843
| 2021-05-01T13:52:07
| 2021-05-01T13:52:07
| 360,181,129
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 970
|
java
|
package me.iiaii.springdatajpaintro.entity;
import lombok.*;
import javax.persistence.*;
@Entity
@Getter @Setter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@ToString(of = {"id", "username", "age"})
public class Member extends BaseEntity {
@Id @GeneratedValue
@Column(name = "member_id")
private Long id;
private String username;
private int age;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "team_id")
private Team team;
public Member(String username) {
this.username = username;
}
public Member(String username, int age) {
this.username = username;
this.age = age;
}
public Member(String username, int age, Team team) {
this.username = username;
this.age = age;
this.team = team;
}
public void changeTeam(Team team) {
this.team.getMembers().remove(this);
this.team = team;
team.getMembers().add(this);
}
}
|
[
"jhun9409@naver.com"
] |
jhun9409@naver.com
|
68eacc02e2588c6692ee65f4c4958d2ef4d683d2
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/.gitignore/bin/ext-template/ycommercewebservicestest/testsrc/de/hybris/platform/ycommercewebservicestest/test/groovy/webservicetests/SSLIssuesIgnoringHttpClientFactory.java
|
1593529b4aa14f4f15a051f3da997a914c097b9a
|
[] |
no_license
|
automaticinfotech/HybrisProject
|
c22b13db7863e1e80ccc29774f43e5c32e41e519
|
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
|
refs/heads/master
| 2021-07-20T18:41:04.727081
| 2017-10-30T13:24:11
| 2017-10-30T13:24:11
| 108,957,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,537
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("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 SAP.
*
*
*/
package de.hybris.platform.ycommercewebservicestest.test.groovy.webservicetests;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.HttpClientBuilder;
public class SSLIssuesIgnoringHttpClientFactory
{
public static HttpClient createHttpClient()
{
try
{
final TrustManager[] trustAllCerts =
{ new DummyTrustManager() };
final SSLContext sslContext = SSLContext.getInstance("TLSv1");
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
final HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
httpClientBuilder.setSSLHostnameVerifier(new DummyHostnameVerifier());
httpClientBuilder.setSSLSocketFactory(new SSLConnectionSocketFactory(sslContext, new DummyHostnameVerifier()));
return httpClientBuilder.build();
}
catch (KeyManagementException | NoSuchAlgorithmException e)
{
throw new RuntimeException(e);
}
}
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
c728f171328468ceb6d6c83751767ea1d75732d6
|
4966c715768ac4038cf06ef30b95bb424eeb9d29
|
/src/main/java/uk/co/thomasc/steamkit/steam3/handlers/steamgameserver/callbacks/StatusReplyCallback.java
|
990bf579fff7b466f7c78593e3be965862d5c29a
|
[] |
no_license
|
Manevolent/SteamKit-Java
|
6fb1baa7649d9e285a65988570681a4930da3da1
|
5d68ba16793b9e8dbbc30eb28d28d24644c6d0a4
|
refs/heads/master
| 2020-06-11T14:11:12.305093
| 2016-12-06T01:48:10
| 2016-12-06T01:48:10
| 75,648,412
| 2
| 0
| null | 2016-12-05T17:12:41
| 2016-12-05T17:12:40
| null |
UTF-8
|
Java
| false
| false
| 618
|
java
|
package uk.co.thomasc.steamkit.steam3.handlers.steamgameserver.callbacks;
import lombok.Getter;
import uk.co.thomasc.steamkit.base.generated.SteammessagesClientserver.CMsgGSStatusReply;
import uk.co.thomasc.steamkit.steam3.steamclient.callbackmgr.CallbackMsg;
/**
* This callback is fired when the game server receives a status reply.
*/
public final class StatusReplyCallback extends CallbackMsg {
/**
* Gets a value indicating whether this game server is VAC secure.
*/
@Getter private final boolean isSecure;
public StatusReplyCallback(CMsgGSStatusReply reply) {
isSecure = reply.getIsSecure();
}
}
|
[
"webmaster@thomasc.co.uk"
] |
webmaster@thomasc.co.uk
|
0a44df398280fc819ff15e0e9ac764fb5abed3d5
|
1e425d8861c4016eb3e379c76f741ddb1d60ed8b
|
/android/support/v4/view/p017a/aq.java
|
1edc34c7c1d3657dcbba7ea4e4ade37d58fa8f50
|
[] |
no_license
|
jayarambaratam/Soroush
|
302ebd5b172e511354969120c89f4e82cdb297bf
|
21e6b9a1ab415262db1f97a9a6e02a8827e01184
|
refs/heads/master
| 2021-01-17T22:50:54.415189
| 2016-02-04T10:57:55
| 2016-02-04T10:57:55
| 52,431,208
| 2
| 1
| null | 2016-02-24T09:42:40
| 2016-02-24T09:42:40
| null |
UTF-8
|
Java
| false
| false
| 130
|
java
|
package android.support.v4.view.p017a;
/* renamed from: android.support.v4.view.a.aq */
class aq extends ao {
aq() {
}
}
|
[
"grayhat@kimo.com"
] |
grayhat@kimo.com
|
286216ba62af224d993d2b7d65242a77bb5c1cc5
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/google/android/gms/tagmanager/az$a.java
|
cc779e098e4d3e50f804ce09fb79107bc813d895
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 938
|
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.google.android.gms.tagmanager;
// Referenced classes of package com.google.android.gms.tagmanager:
// az
private static final class extends Enum
{
public static final Ys Yq;
public static final Ys Yr;
public static final Ys Ys;
private static final Ys Yt[];
public static valueOf(String s)
{
return ()Enum.valueOf(com/google/android/gms/tagmanager/az$a, s);
}
public static [] values()
{
return ([])Yt.clone();
}
static
{
Yq = new <init>("NONE", 0);
Yr = new <init>("URL", 1);
Ys = new <init>("BACKSLASH", 2);
Yt = (new Yt[] {
Yq, Yr, Ys
});
}
private (String s, int i)
{
super(s, i);
}
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
7f1430f9d0db825b08dbbc49ee52f9769f4fe256
|
c92dda5013ad28a090452ab70bfb8e888fa2a300
|
/src/Class348_Sub23_Sub2.java
|
a112e401fe95b91aa970f063007e58d68acd41ca
|
[] |
no_license
|
EvelusDevelopment/634-Deob
|
ee7cdd327ba3ef08dbdbbe76372846651d1ade73
|
ef3e1ddbafb06b5f4ac7376e6870384c526d549d
|
refs/heads/master
| 2021-01-19T07:03:39.850614
| 2012-02-21T06:43:11
| 2012-02-21T06:43:11
| 3,501,454
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,273
|
java
|
/* Class348_Sub23_Sub2 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
import jagtheora.ogg.OggPacket;
import jagtheora.ogg.OggStreamState;
import jagtheora.theora.DecoderContext;
import jagtheora.theora.Frame;
import jagtheora.theora.GranulePos;
import jagtheora.theora.SetupInfo;
import jagtheora.theora.TheoraComment;
import jagtheora.theora.TheoraInfo;
final class Class348_Sub23_Sub2 extends Class348_Sub23
{
private TheoraInfo aTheoraInfo9007;
private boolean aBoolean9008;
private int anInt9009;
private TheoraComment aTheoraComment9010;
static Class229 aClass229_9011 = new Class229();
static int anInt9012;
static int anInt9013;
private boolean aBoolean9014;
private double aDouble9015;
private boolean aBoolean9016;
static int anInt9017;
private long aLong9018;
private GranulePos aGranulePos9019;
private RasterToolkit aClass105_9020;
static int anInt9021;
static int anInt9022;
static double aDouble9023;
private Frame aFrame9024;
static int anInt9025;
static int anInt9026;
private int anInt9027;
private boolean aBoolean9028;
static ISAAC outgoingGameIsaac;
static int anInt9030;
static Class153 aClass153_9031;
private DecoderContext aDecoderContext9032;
static IndexLoader indexLoader10;
static OutgoingPacket outgoingPacket30 = new OutgoingPacket(30, 4);
private SetupInfo aSetupInfo9035 = new SetupInfo();
static Class187 aClass187_9036;
static int anInt9037;
static boolean aBoolean9038 = false;
static int anInt9039;
public static void method2974(int i) {
outgoingPacket30 = null;
if (i != 1)
aClass229_9011 = null;
indexLoader10 = null;
aClass229_9011 = null;
outgoingGameIsaac = null;
aClass153_9031 = null;
aClass187_9036 = null;
}
final RasterToolkit method2975(AbstractToolkit var_ha, int i) {
anInt9026++;
if (aFrame9024 == null)
return null;
if (!aBoolean9014 && aClass105_9020 != null)
return aClass105_9020;
aClass105_9020 = var_ha.method3711(aFrame9024.pixels, i, aFrame9024.a,
aFrame9024.a, aFrame9024.b, false);
aBoolean9014 = false;
return aClass105_9020;
}
Class348_Sub23_Sub2(OggStreamState oggstreamstate) {
super(oggstreamstate);
aTheoraInfo9007 = new TheoraInfo();
aTheoraComment9010 = new TheoraComment();
}
final void method2961(byte i) {
if (aFrame9024 != null)
aFrame9024.a();
anInt9021++;
if (aDecoderContext9032 != null) {
aDecoderContext9032.a();
aDecoderContext9032 = null;
}
if (i != 13)
method2979(115);
if (aGranulePos9019 != null) {
aGranulePos9019.a();
aGranulePos9019 = null;
}
aTheoraInfo9007.a();
aTheoraComment9010.a();
aSetupInfo9035.a();
}
final boolean method2976(int i) {
anInt9012++;
if (i != -1)
aTheoraInfo9007 = null;
return aBoolean9016;
}
final float method2977(int i) {
anInt9022++;
if (!aBoolean9016 || aTheoraInfo9007.b())
return 0.0F;
if (i != 0)
anInt9027 = -65;
return ((float) aTheoraInfo9007.fpsNumerator
/ (float) aTheoraInfo9007.fpsDenominator);
}
private final void method2978(int i, byte i_0_) {
anInt9030++;
anInt9009 = i;
if (aBoolean9016) {
if (anInt9009 > anInt9027)
anInt9009 = anInt9027;
if (anInt9009 < 0)
anInt9009 = 0;
aDecoderContext9032.setPostProcessingLevel(anInt9009);
}
if (i_0_ > -127)
aClass105_9020 = null;
}
final long method2979(int i) {
anInt9025++;
if (i != 30)
method2978(-126, (byte) -43);
return aLong9018;
}
final double method2980(byte i) {
anInt9013++;
if (i != 100)
method2974(102);
return aDouble9015;
}
final void method2964(byte i, OggPacket oggpacket) {
anInt9017++;
if (i < -91) {
if (aBoolean9016) {
aLong9018 = Class62.getCurrentTimeMillis();
int i_1_ = aDecoderContext9032.decodePacketIn(oggpacket,
aGranulePos9019);
if (i_1_ < 0)
throw new IllegalStateException(String.valueOf(i_1_));
aDecoderContext9032.granuleFrame(aGranulePos9019);
aDouble9015 = aDecoderContext9032.granuleTime(aGranulePos9019);
if (aBoolean9008) {
boolean bool = oggpacket.isKeyFrame() == 1;
if (bool)
aBoolean9008 = false;
else
return;
}
if (!aBoolean9028 || oggpacket.isKeyFrame() == 1) {
if ((aDecoderContext9032.decodeFrame(aFrame9024)
^ 0xffffffff)
!= -1)
throw new IllegalStateException(String.valueOf(i_1_));
aBoolean9014 = true;
}
} else {
int i_2_ = aSetupInfo9035.decodeHeader(aTheoraInfo9007,
aTheoraComment9010,
oggpacket);
if (i_2_ == 0) {
aBoolean9016 = true;
if (aTheoraInfo9007.frameWidth > 2048
|| aTheoraInfo9007.frameHeight > 1024)
throw new IllegalStateException();
aDecoderContext9032
= new DecoderContext(aTheoraInfo9007, aSetupInfo9035);
aGranulePos9019 = new GranulePos();
aFrame9024 = new Frame(aTheoraInfo9007.frameWidth,
aTheoraInfo9007.frameHeight);
anInt9027
= aDecoderContext9032.getMaxPostProcessingLevel();
method2978(anInt9009, (byte) -128);
} else if (i_2_ < 0)
throw new IllegalStateException(String.valueOf(i_2_));
}
}
}
}
|
[
"sinisoul@gmail.com"
] |
sinisoul@gmail.com
|
b3cc7e576888bd0df7bcdb8f2518a0ede6024b50
|
56d6fa60f900fb52362d4cce950fa81f949b7f9b
|
/aws-sdk-java/src/main/java/com/amazonaws/services/route53/model/DeleteHostedZoneRequest.java
|
28c55a7c4373859345c6e1a934441bdf321256c5
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
TarantulaTechnology/aws
|
5f9d3981646e193c89f1c3fa746ec3db30252913
|
8ce079f5628334f83786c152c76abd03f37281fe
|
refs/heads/master
| 2021-01-19T11:14:53.050332
| 2013-09-15T02:37:02
| 2013-09-15T02:37:02
| 12,839,311
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,912
|
java
|
/*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.route53.model;
import com.amazonaws.AmazonWebServiceRequest;
import java.io.Serializable;
/**
* Container for the parameters to the {@link com.amazonaws.services.route53.AmazonRoute53#deleteHostedZone(DeleteHostedZoneRequest) DeleteHostedZone operation}.
* <p>
* This action deletes a hosted zone. To delete a hosted zone, send a <code>DELETE</code> request to the <code>2012-12-12/hostedzone/hosted zone ID
* </code> resource.
* </p>
* <p>
* For more information about deleting a hosted zone, see <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DeleteHostedZone.html">
* Deleting a Hosted Zone </a> in the <i>Amazon Route 53 Developer Guide</i> .
* </p>
* <p>
* <b>IMPORTANT:</b> You can delete a hosted zone only if there are no resource record sets other than the default SOA record and NS resource record
* sets. If your hosted zone contains other resource record sets, you must delete them before you can delete your hosted zone. If you try to delete a
* hosted zone that contains other resource record sets, Route 53 will deny your request with a HostedZoneNotEmpty error. For information about deleting
* records from your hosted zone, see ChangeResourceRecordSets.
* </p>
*
* @see com.amazonaws.services.route53.AmazonRoute53#deleteHostedZone(DeleteHostedZoneRequest)
*/
public class DeleteHostedZoneRequest extends AmazonWebServiceRequest implements Serializable {
/**
* The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 32<br/>
*/
private String id;
/**
* Default constructor for a new DeleteHostedZoneRequest object. Callers should use the
* setter or fluent setter (with...) methods to initialize this object after creating it.
*/
public DeleteHostedZoneRequest() {}
/**
* Constructs a new DeleteHostedZoneRequest object.
* Callers should use the setter or fluent setter (with...) methods to
* initialize any additional object members.
*
* @param id The ID of the request. Include this ID in a call to
* <a>GetChange</a> to track when the change has propagated to all Route
* 53 DNS servers.
*/
public DeleteHostedZoneRequest(String id) {
setId(id);
}
/**
* The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 32<br/>
*
* @return The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
*/
public String getId() {
return id;
}
/**
* The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 32<br/>
*
* @param id The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
*/
public void setId(String id) {
this.id = id;
}
/**
* The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
* <p>
* Returns a reference to this object so that method calls can be chained together.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 32<br/>
*
* @param id The ID of the request. Include this ID in a call to <a>GetChange</a>
* to track when the change has propagated to all Route 53 DNS servers.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DeleteHostedZoneRequest withId(String id) {
this.id = id;
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getId() != null) sb.append("Id: " + getId() );
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof DeleteHostedZoneRequest == false) return false;
DeleteHostedZoneRequest other = (DeleteHostedZoneRequest)obj;
if (other.getId() == null ^ this.getId() == null) return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false) return false;
return true;
}
}
|
[
"TarantulaTechnology@users.noreply.github.com"
] |
TarantulaTechnology@users.noreply.github.com
|
f66e6b9e3af9433b39d6af04b3dcc7ed9f3661ba
|
210c66c696a399cce427e7681a6e7c2269fccc11
|
/app/src/main/java/com/zhjydy/view/zhview/ItemTabViewBase.java
|
ce5828f51f8d7a9398faee649b27348cf45450b4
|
[] |
no_license
|
henryliu1988/zjydy
|
e2d2c5e6e27118ddf03c6a379374623e477d4194
|
9a665cfa3fa707c0dde012c5dff78c4b7ff64c1f
|
refs/heads/master
| 2020-09-13T08:43:37.871726
| 2017-06-21T12:13:54
| 2017-06-21T12:13:54
| 67,607,730
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,606
|
java
|
package com.zhjydy.view.zhview;
/**
* Created by Administrator on 2016/10/1 0001.
*/
import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.flyco.tablayout.SlidingTabLayout;
import com.zhjydy.R;
import java.util.ArrayList;
import java.util.List;
public class ItemTabViewBase extends LinearLayout {
protected Context context;
protected SlidingTabLayout mTabLayout;
protected ViewPager mViewPager;
protected PagerAdapter mAdapter;
protected List<PagerItem> mPagerItems = new ArrayList<>();
public ItemTabViewBase(Context context) {
super(context);
this.context = context;
initView();
}
public ItemTabViewBase(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
initView();
}
public void initView() {
LayoutInflater.from(context).inflate(R.layout.item_tab_layout, this);
mTabLayout = (SlidingTabLayout) findViewById(R.id.tab_layout);
mViewPager = (ViewPager) findViewById(R.id.viewpager);
mPagerItems.clear();
}
public void setPagerItems(List<PagerItem> pagerItems) {
this.mPagerItems = pagerItems;
refreshView();
}
private void refreshView() {
mAdapter = new TabPagerAdapter(getContext(), mPagerItems);
mViewPager.setAdapter(mAdapter);
mTabLayout.setViewPager(mViewPager);
}
public View getTabView(String title) {
for (int i = 0; i < mPagerItems.size(); i++) {
PagerItem item = mPagerItems.get(i);
if (item != null && !TextUtils.isEmpty(title) && title.equals(item.getTitle())) {
return item.getView();
}
}
return null;
}
public static class PagerItem {
String title;
View view;
public PagerItem(String title, View view) {
this.title = title;
this.view = view;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public View getView() {
return view;
}
public void setView(View view) {
this.view = view;
}
}
static class TabPagerAdapter extends android.support.v4.view.PagerAdapter {
private List<PagerItem> items = new ArrayList();
private Context context;
private TabPagerAdapter(Context context, List<PagerItem> items) {
this.context = context;
this.items = items;
}
@Override
public int getCount() {
return items.size();
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
View v = items.get(position).getView();
container.addView(v);
return v;
}
@Override
public CharSequence getPageTitle(int position) {
return items.get(position).getTitle();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
((ViewPager) container).removeView((View) object);
}
}
}
|
[
"lytao123sc@126.com"
] |
lytao123sc@126.com
|
8305c3265a10286d60328ceae9a8e7d0b6e016ed
|
da0c355e7286771af9d34f2c20eb055bf3b900cc
|
/zlt-business/financial-service/src/main/java/com/central/finance/model/FinanceOrgVo.java
|
e56dca7a777937d89e646b4d611b7bc3ba176d4a
|
[] |
no_license
|
TaiJi-team/finance-service-platform
|
fb7771b40b5dec81eb76491b15e1c5d815956f07
|
c92a474030705e556168c1f7cb3c39d9282ffdbf
|
refs/heads/main
| 2023-01-11T13:19:51.359503
| 2020-11-13T07:24:20
| 2020-11-13T07:24:20
| 311,711,444
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package com.central.finance.model;
import lombok.Data;
@Data
public class FinanceOrgVo extends FinanceOrg {
private UserOrgLegpers userOrgLegpers;
private UserOrgOper userOrgOpers;
private FinanceOrgAttachment financeOrgAttachments;
private FinanceOrgOpenBank financeOrgOpenBanks;
private FinanceOrgStockh financeOrgStockhs;
private UserRelation userRelation;
}
|
[
"2491042435@qq.com"
] |
2491042435@qq.com
|
9af00a44a81ad1279d77b2f096819192c47fbbbf
|
9c0d7e84e99bea9d8e0db5ebc40b3de153198fa1
|
/DataProcessingDSLPart1/ASEProject-Metamodel.diagram/src/pipelineproject/diagram/edit/parts/SVMSVMRuntimeInfoCompartmentEditPart.java
|
35272c7e44e57e21b5c008bd71b1dc85e956d318
|
[] |
no_license
|
FrancescoPinto/DataProcessingDSL
|
ea36221638d15c69948abe3386bc73a7ae899e3f
|
eff66e28aa1e575f0817332c6281506582704d20
|
refs/heads/master
| 2022-04-24T09:59:55.097385
| 2020-04-20T18:57:30
| 2020-04-20T18:57:30
| 257,376,186
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,701
|
java
|
/*
*
*/
package pipelineproject.diagram.edit.parts;
import org.eclipse.draw2d.IFigure;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.tooling.runtime.edit.policies.reparent.CreationEditPolicyWithCustomReparent;
import pipelineproject.diagram.edit.policies.SVMSVMRuntimeInfoCompartmentCanonicalEditPolicy;
import pipelineproject.diagram.edit.policies.SVMSVMRuntimeInfoCompartmentItemSemanticEditPolicy;
import pipelineproject.diagram.part.Messages;
import pipelineproject.diagram.part.PipelineprojectVisualIDRegistry;
import pipelineproject.diagram.providers.PipelineprojectElementTypes;
/**
* @generated
*/
public class SVMSVMRuntimeInfoCompartmentEditPart extends ShapeCompartmentEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 7081;
/**
* @generated
*/
public SVMSVMRuntimeInfoCompartmentEditPart(View view) {
super(view);
}
/**
* @generated
*/
public String getCompartmentName() {
return Messages.SVMSVMRuntimeInfoCompartmentEditPart_title;
}
/**
* @generated
*/
public IFigure createFigure() {
ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
result.setTitleVisibility(false);
return result;
}
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SVMSVMRuntimeInfoCompartmentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE,
new CreationEditPolicyWithCustomReparent(PipelineprojectVisualIDRegistry.TYPED_INSTANCE));
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SVMSVMRuntimeInfoCompartmentCanonicalEditPolicy());
}
/**
* @generated
*/
protected void setRatio(Double ratio) {
if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
super.setRatio(ratio);
}
}
/**
* @generated
*/
public EditPart getTargetEditPart(Request request) {
if (request instanceof CreateViewAndElementRequest) {
CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor()
.getCreateElementRequestAdapter();
IElementType type = (IElementType) adapter.getAdapter(IElementType.class);
if (type == PipelineprojectElementTypes.RuntimeInfo_3036) {
return this;
}
return getParent().getTargetEditPart(request);
}
if (request instanceof CreateUnspecifiedTypeConnectionRequest) {
return getParent().getTargetEditPart(request);
}
return super.getTargetEditPart(request);
}
}
|
[
"francesco1.pinto@mail.polimi.it"
] |
francesco1.pinto@mail.polimi.it
|
ba17f958f78f9bde7ed713a9142bf6274b83fcbe
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module1439_public/tests/more/src/java/module1439_public_tests_more/a/Foo3.java
|
fe8e896274a10a5700470e9b1b8832d1983a5690
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,669
|
java
|
package module1439_public_tests_more.a;
import javax.rmi.ssl.*;
import java.awt.datatransfer.*;
import java.beans.beancontext.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.net.ssl.ExtendedSSLSession
* @see javax.rmi.ssl.SslRMIClientSocketFactory
* @see java.awt.datatransfer.DataFlavor
*/
@SuppressWarnings("all")
public abstract class Foo3<B> extends module1439_public_tests_more.a.Foo2<B> implements module1439_public_tests_more.a.IFoo3<B> {
java.beans.beancontext.BeanContext f0 = null;
java.io.File f1 = null;
java.rmi.Remote f2 = null;
public B element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1439_public_tests_more.a.Foo2.create(input);
}
public String getName() {
return module1439_public_tests_more.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module1439_public_tests_more.a.Foo2.getInstance().setName(getName());
return;
}
public B get() {
return (B)module1439_public_tests_more.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (B)element;
module1439_public_tests_more.a.Foo2.getInstance().set(this.element);
}
public B call() throws Exception {
return (B)module1439_public_tests_more.a.Foo2.getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
8e69d68481349bdce76f301302314f0da9bf1ec5
|
1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5
|
/codeChef/src/medium/unsolved/GameOnGrid.java
|
f1a2a19bb801aad47ce0c6088ea779c4aa294fc2
|
[
"MIT"
] |
permissive
|
sagarnikam123/learnNPractice
|
f0da3f8acf653e56c591353ab342765a6831698c
|
1b3b0cb2cff2f478006626a4c37a99102acbb628
|
refs/heads/master
| 2023-02-04T11:21:18.211654
| 2023-01-24T14:47:52
| 2023-01-24T14:47:52
| 61,184,927
| 2
| 1
|
MIT
| 2022-03-06T11:07:18
| 2016-06-15T06:57:19
|
Python
|
UTF-8
|
Java
| false
| false
| 129
|
java
|
/**
Game on a Grid
*/
package medium.unsolved;
public class GameOnGrid {
public static void main(String[] args) {
}
}
|
[
"sagarnikam123@gmail.com"
] |
sagarnikam123@gmail.com
|
e10c086c67a267a9ddee01b9d1e158653fb46701
|
d0bc9af44db2783cdfa44868769911d0ae4603e3
|
/src/test/java/com/example/wordbook/domain/word/service/word_studygroupwordbook/DeleteWordOfStudyGroupWordBookServiceTest.java
|
54728db8cd80d53c8ca6f331736069847172e796
|
[] |
no_license
|
lcy960729/wordbook-backend
|
794bc9a7645a6dfacba3ac7e573881ecdaa1ccba
|
339abbdff18a6a455828c4074b3c7eb3dabc92e1
|
refs/heads/master
| 2023-04-14T22:22:18.605153
| 2021-04-19T14:07:52
| 2021-04-19T14:07:52
| 322,284,882
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 992
|
java
|
package com.example.wordbook.domain.word.service.word_studygroupwordbook;
import com.example.wordbook.domain.study.entity.Study;
import com.example.wordbook.domain.word.controller.word_studygroupwordbook.WordOfStudyGroupWordBookControllerTest;
import com.example.wordbook.domain.word.dto.request.CreateWordDTO;
import com.example.wordbook.domain.word.dto.response.WordDetailDTO;
import com.example.wordbook.domain.word.entity.Word;
import com.example.wordbook.domain.word.service.studygroupwordbook.AddWordOfStudyGroupWordBookService;
import com.example.wordbook.domain.wordbook.entity.StudyGroupWordBook;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.BDDMockito.given;
public class DeleteWordOfStudyGroupWordBookServiceTest extends WordOfStudyGroupWordBookServiceTest {
}
|
[
"lcy960729@gmail.com"
] |
lcy960729@gmail.com
|
ef4fea04ddcf8bcc1fd419a9c045b805128f323a
|
79634ad85055b371c1d483834b92ca6d0fe89e40
|
/.history/src/main/java/fr/kevindvz/App_20201021162404.java
|
f415a92f30e668784edc239b5deabeae861ced43
|
[] |
no_license
|
KevinDvZ/kataDojo
|
d2d2189d4aed2a4a05099002e26de81c8d0bcd35
|
a635199f416f187a1fec8a8dd4a360c8e161a36f
|
refs/heads/main
| 2023-01-08T11:06:28.901320
| 2020-11-04T14:57:02
| 2020-11-04T14:57:02
| 310,032,025
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,388
|
java
|
package fr.kevindvz;
/**
* Hello world!
*/
public final class App {
// toujours mettre ses méthodes ici et pas dans le main
public static boolean leapYearTest(int anneeTestee) {
if (anneeTestee % 4 == 0) {
return true;
} else {
return false;
}
}
public static String fooBarQix(int chiffreTeste) {
String resultat = "";
if (chiffreTeste % 3 == 0) {
resultat = resultat + "Foo";
return resultat;
} else if (chiffreTeste % 5 == 0) {
resultat = resultat + "Bar";
return resultat;
} else if (chiffreTeste % 7 == 0) {
resultat = resultat + "Qix";
return resultat;
} else if (chiffreTeste == 5) {
resultat = resultat + "Bar";
return resultat;
} else if (chiffreTeste == 7) {
resultat = resultat + "Qix";
return resultat;
} else if (chiffreTeste == 3) {
resultat = resultat + "Foo";
return resultat;
return "Foo";
} else if (chiffreTeste == 0) {
resultat = resultat
return "*";
}
}
private App() {
}
/**
* Says hello to the world.
*
* @param args The arguments of the program.
*/
public static void main(String[] args) {
}
}
|
[
"kevin.deveza@gmail.com"
] |
kevin.deveza@gmail.com
|
18e064d29b1cea4eda4e488ead4f36ea8922a459
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_3af51eb6b7d60e4c18bdd28e1773a077aa3189eb/AnalyticsConstants/2_3af51eb6b7d60e4c18bdd28e1773a077aa3189eb_AnalyticsConstants_t.java
|
db8e8487067c01f4e6728624dd9995c1346929db
|
[] |
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
| 530
|
java
|
/**
*
*/
package analytics.constants;
/**
* @author vogias
*
*/
public class AnalyticsConstants {
public static String inputClass = "analytics.input.data";
public static String storageClass = "analytics.storage";
public static String mdstorePath = "analytics.mdstore.path";
public static String mdHandler = "analytics.mdstore.data.handler";
public static String elementValues = "analytics.element.values";
//public static String temporalMode = "temporal.analysis.mode";
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1b44ff67696302ad9143c5b1a979e54be3b811a9
|
1eb2896ba9f16a23988b368a09ef0a23778065ae
|
/app/src/org/odk/collect/android/logic/PropertyManager.java
|
7f3a17f6cdf32ae13bf203705114d59cdf74fda9
|
[] |
no_license
|
dcluna/commcare-odk
|
8604ad1ce0feb57326015251cd8887e3af23c0fa
|
2f703699fbc84205321dd0a5acba6a01f608db73
|
refs/heads/master
| 2020-12-25T10:09:58.540075
| 2015-08-03T20:39:19
| 2015-08-03T20:39:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,190
|
java
|
/*
* Copyright (C) 2009 University of Washington
*
* 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.odk.collect.android.logic;
import java.util.HashMap;
import java.util.Vector;
import org.javarosa.core.services.IPropertyManager;
import org.javarosa.core.services.properties.IPropertyRules;
import android.content.Context;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.Log;
/**
* Used to return device properties to JavaRosa
*
* @author Yaw Anokwa (yanokwa@gmail.com)
*/
public class PropertyManager implements IPropertyManager {
private String t = "PropertyManager";
private Context mContext;
private TelephonyManager mTelephonyManager;
private HashMap<String, String> mProperties;
private final static String DEVICE_ID_PROPERTY = "deviceid"; // imei
private final static String SUBSCRIBER_ID_PROPERTY = "subscriberid"; // imsi
private final static String SIM_SERIAL_PROPERTY = "simserial";
private final static String PHONE_NUMBER_PROPERTY = "phonenumber";
public String getName() {
return "Property Manager";
}
public PropertyManager(Context context) {
Log.i(t, "calling constructor");
mContext = context;
mProperties = new HashMap<String, String>();
mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
String deviceId = mTelephonyManager.getDeviceId();
if (deviceId != null && (deviceId.contains("*") || deviceId.contains("000000000000000"))) {
deviceId =
Settings.Secure
.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);
}
mProperties.put(DEVICE_ID_PROPERTY, deviceId);
mProperties.put(SUBSCRIBER_ID_PROPERTY, mTelephonyManager.getSubscriberId());
mProperties.put(SIM_SERIAL_PROPERTY, mTelephonyManager.getSimSerialNumber());
mProperties.put(PHONE_NUMBER_PROPERTY, mTelephonyManager.getLine1Number());
}
@Override
public Vector<String> getProperty(String propertyName) {
return null;
}
@Override
public String getSingularProperty(String propertyName) {
return mProperties.get(propertyName.toLowerCase());
}
@Override
public void setProperty(String propertyName, String propertyValue) {
}
@Override
public void setProperty(String propertyName, @SuppressWarnings("rawtypes") Vector propertyValue) {
}
@Override
public void addRules(IPropertyRules rules) {
}
@Override
public Vector<IPropertyRules> getRules() {
return null;
}
}
|
[
"wpride@dimagi.com"
] |
wpride@dimagi.com
|
f0cb91db1521d269bc07975579641247f8bf8865
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/91/150.java
|
db08570b6a5e30f39a5a2f7d6a3e2baf14d4356b
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 489
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
String s = new String(new char[101]);
String s1 = new String(new char[101]);
int i;
s = new Scanner(System.in).nextLine();
for (i = 0;;i++)
{
if (s.charAt(i + 1) != '\0')
{
(*(s1.Substring(i))) = (*(s.Substring(i))) + (*(s.Substring(1) + i));
}
else
{
(*(s1.Substring(i))) = (*(s.Substring(i))) + (*s);
*(s1.Substring(i) + 1) = '\0';
break;
}
}
System.out.printf("%s",s1);
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
3278148607afd737b526f6cf19e87ec361a81bbd
|
cab805ba2a109899f2ba1f55811ae4a8571891a3
|
/batch-chunk-processors/src/main/java/com/mynotes/spring/batch/MyStepWriter.java
|
3a7b14c0dd7e15db392f0aa2890cf5f218c0d481
|
[] |
no_license
|
dhananjay12/spring-batch
|
d84e5aeab1c153d3e735f843da13e66728497a99
|
8d53f19f4d6819de72b195accbb91e7a2e1520b4
|
refs/heads/master
| 2021-01-11T16:35:57.651940
| 2017-02-18T11:55:37
| 2017-02-18T11:55:37
| 80,119,021
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 398
|
java
|
package com.mynotes.spring.batch;
import java.util.List;
import org.springframework.batch.item.ItemWriter;
public class MyStepWriter implements ItemWriter<Customer> {
@Override
public void write(List<? extends Customer> items) throws Exception {
System.out.println("Writer chunk size: " + items.size());
for (Customer item : items) {
System.out.println("Writer::::::" + item);
}
}
}
|
[
"dhananjay1204@gmail.com"
] |
dhananjay1204@gmail.com
|
aa3279567ab630e7e46a7f88795f19a2a42b4120
|
f92ac816e01713a2dd63e9465abcd90d74e6959e
|
/src/com/zhiwei/credit/service/flow/ProcessFormService.java
|
fbd365222cf1cbbfeea73df916b04fb682635407
|
[] |
no_license
|
daichangya/zfzx_erp
|
9c2cfaa824d0efe99a44ea65cabfa70f5e90e1bf
|
756868d80485398c9a3a530dacf5e8b8a7e5df3a
|
refs/heads/master
| 2020-03-29T08:47:17.626002
| 2018-09-04T03:16:59
| 2018-09-04T03:19:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,283
|
java
|
package com.zhiwei.credit.service.flow;
/*
* 北京互融时代软件有限公司 OA办公管理系统 -- http://www.hurongtime.com
* Copyright (C) 2008-2011 zhiwei Software Company
*/
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.zhiwei.core.service.BaseService;
import com.zhiwei.core.web.paging.PagingBean;
import com.zhiwei.credit.model.flow.ProcessForm;
/**
* 流程表单服务类
* @author csx
*
*/
public interface ProcessFormService extends BaseService<ProcessForm>{
/**
* 取得某个流程实例的所有表单不包含无taskId
*/
public List<ProcessForm> getByRunIdTaskIdIsNotNull(Long runId);
/**
* 取得某个流程实例对象 无FormTskId有taskId;
*/
public ProcessForm getByRunIdFormTskIdIsNull(Long runId);
/**
* 取得某个流程实例的所有表单
* @param runId
* @return
*/
public List getByRunId(Long runId);
/**
* 根据权限号取得某个流程实例的所有表单
* @param runId
* @return
*/
public List getByRunId(Long runId,Long safeLevel);
/**
* 查找某个流程某个任务的表单数据
* @param runId
* @param activityName
* @return
*/
public ProcessForm getByRunIdActivityName(Long runId,String activityName);
/**
* 取得某一流程某一任务已经执行的次数,如某一任务被不断驳回,就会被执行多次。
* @return
*/
public Long getActvityExeTimes(Long runId,String activityName);
// /**
// * 构造最新的流程实例对应的所有字段及数据
// * @param runId
// * @return
// */
// public Map getVariables(Long runId);
/**
* 初始一个未持久化的历史
* @return
*/
public ProcessForm getInitProcessForm();
/**
* 取得某个任务其对应的流程表单信息(流程历史表单)
* @param taskId
* @return
*/
public ProcessForm getByTaskId(String taskId);
/**
* 按runId及TaskName取到某个ProcessForm,目前使用的目的是为了取到某个流程开始的历史表单信息
* @param runId
* @param taskName
* @return
*/
public ProcessForm getByRunIdTaskName(Long runId,String taskName);
/**
* 按用户id查询所有已完成的任务信息 add by lu 2011.12.12
* @param userId
* @param PagingBean pb
* @return
*/
public List<ProcessForm> getCompleteTaskByUserId(Long userId,PagingBean pb);
/**
* 按用户id,业务流程类型查询所有已完成的任务信息 add by lu 2012.03.02
* @param userId
* @param processName
* @param PagingBean pb
* @return
*/
public List<ProcessForm> getCompleteTaskByUserIdProcessName(Long userId,String processName,PagingBean pb);
/**
* 查找某个流程某个任务某个状态的执行人
* @param runId
* @param activityName
* @param status
* @return
*/
public List<String> getByRunIdActivityName(Long runId,String activityName,Short status);
/**
* 查询小贷常规、快速、展期流程(如果有)的意见与说明。add by lu 2012.04.24
* @param runIds
* @return
*/
public List getByRunIds(String runIds);
/**
* 根据权限号取得某个流程实例的所有表单(包括小贷展期流程)add by lu 2012.04.24
* @param runIds
* @param safeLevel
* @return
*/
public List getByRunId(String runIds,Long safeLevel);
/**
* 获取某个流程的某个会签节点的数量add by lu 2012.05.24
* @param runId
* @param activityName
* @return
*/
public List<ProcessForm> getListByRunIdActivityName(Long runId,String taskSequenceNodeKey,String taskId);
/**
* 根据fromTaskId获取某个流程的某个会签节点的相关信息。所有状态的记录。add by lu 2012.05.25
* @param fromTaskId
* @return
*/
public List<ProcessForm> getListByFromTaskId(String fromTaskId);
public ProcessForm getProcessFormByRunIdAndActivityName(Long runId,Long creatorId);
/**
* 通过投票信息获取该节点的意见与说明(ProcessForm对象)add by lu 2012.06.06 (此方法可以不需要,这是针对不少的旧数据的处理的方法。add by lu 2013.06.18)
* @param runId
* @param creatorId(该属性与processForm中的creatorId完全同步)
* @param fromTaskId
* @return
*/
public ProcessForm getByRunIdFromTaskIdCreatorId(Long runId,String fromTaskId,Long creatorId);
/**
* 通过投票信息获取是否存在未投票人员add by lu 2012.06.06
* @param runId
* @param fromTaskId
* @return
*/
public int getCountUnVoteUsers(Long runId,String fromTaskId);
/**
* 获取尚未执行完成的并列实例节点表单,未进行任何处理的记录。add by lisl 2012-06-09
* @param fromTaskId
* @return
*/
public List<ProcessForm> getByFromTaskId(String fromTaskId);
/**
* 根据runId和对应流程节点的key获取processForm对象 add by lu 2012-07-09
* @param runId
* @param flowNodeKey
* @return
*/
public ProcessForm getByRunIdFlowNodeKey(Long runId,String flowNodeKey);
/**
* 根据runId和获取意见与说明记录的ProcessForm对象(要过滤类似审保会的情况:根据对应的节点的key过滤。) add by lu 2012-07-11
* @param runId
* @param flowNodeKeys(not like所包含的key) 所有流程的要过滤的节点的key
* @return
*/
public List<ProcessForm> getCommentsByRunId(Long runId ,String flowNodeKeys);
/**
* 根据runId和获审保会所有记录 add by lu 2012-12-21
* @param runId
* @param flowNodeKey
* @return
*/
public List<ProcessForm> getSbhRecordsByRunIdFlowNodeKey(Long runId,String flowNodeKey);
/**
* 获取由上一个节点指派下一个会签节点的处理人员ID,如果打回的节点为会签节点的情况下使用。
* @param runId
* @param activityName
* @return
* add by lu 2013.06.18
*/
public String getCountersignUserIds(Long runId,String activityName);
public List<ProcessForm> listByRunId(Long projectId);
/**
* 获取全部的流程任务
* @param request
* @param pb
* @return
*/
public List<ProcessForm> allProcessTask(HttpServletRequest request,
PagingBean pb);
/**
* 获取全部的已经完成的流程任务
* @param request
* @param pb
* @return
*/
public List<ProcessForm> allCompleteProcessTask(HttpServletRequest request,PagingBean pb);
}
|
[
"364856477@qq.com"
] |
364856477@qq.com
|
d7b012662c1760b55044b3ad3efb27a4a1438b72
|
7d800d383f35b2edfa6cf66b536665116e179038
|
/doma/src/main/java/org/seasar/doma/internal/util/StringUtil.java
|
871b8e07753675abba8257beb45cfac060a897cd
|
[
"Apache-2.0"
] |
permissive
|
seasarorg/doma
|
0e8522ebdbed8d6c945c835bc1bbd2bd031534ea
|
385b00bf0d098bf3e37855565c14933e325b2f83
|
refs/heads/master
| 2022-07-07T09:50:27.260091
| 2020-11-21T00:37:36
| 2020-11-21T00:37:36
| 13,232,491
| 12
| 7
| null | 2022-01-21T23:19:46
| 2013-10-01T01:58:26
|
Java
|
UTF-8
|
Java
| false
| false
| 5,348
|
java
|
/*
* Copyright 2004-2010 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.doma.internal.util;
import java.nio.CharBuffer;
/**
* {@link String} のユーティリティクラスです。
*
* @author taedium
*
*/
public final class StringUtil {
/**
* 先頭の文字を大文字に変換します。
*
* @param text
* 文字列
* @return 変換された文字列。 ただし、{@code text} が {@code null} の場合は {@code null}、
* {@code text} が空文字の場合は空文字を返します。
*/
public static String capitalize(String text) {
if (isNullOrEmpty(text)) {
return text;
}
char chars[] = text.toCharArray();
chars[0] = Character.toUpperCase(chars[0]);
return new String(chars);
}
/**
* 先頭の文字を小文字に変換します。
*
* @param text
* 文字列
* @return 変換された文字列。 ただし、{@code text} が {@code null} の場合は {@code null}、
* {@code text} が空文字の場合は空文字を返します。
*/
public static String decapitalize(String text) {
if (isNullOrEmpty(text)) {
return text;
}
char chars[] = text.toCharArray();
chars[0] = Character.toLowerCase(chars[0]);
return new String(chars);
}
/**
* アンダースコア区切りの文字列をキャメルケースの文字列に変換します。
*
* @param text
* 文字列
* @return 変換された文字列。 ただし、{@code text} が {@code null} の場合は {@code null}、
* {@code text} が空文字の場合は空文字を返します。
*/
public static String fromSnakeCaseToCamelCase(String text) {
if (isNullOrEmpty(text)) {
return text;
}
String[] array = text.split("_");
if (array.length == 0) {
return "";
}
StringBuilder result = new StringBuilder();
result.append(array[0].toLowerCase());
for (int i = 1; i < array.length; i++) {
String s = capitalize(array[i].toLowerCase());
result.append(s);
}
return result.toString();
}
/**
* キャメルケースをアンダースコア区切りの大文字に変換します。
*
* @param text
* 文字列
* @return 変換された文字列。 ただし、{@code text} が {@code null} の場合は {@code null}、
* {@code text} が空文字の場合は空文字を返します。
*/
public static String fromCamelCaseToSnakeCase(String text) {
if (isNullOrEmpty(text)) {
return text;
}
StringBuilder result = new StringBuilder();
CharBuffer buf = CharBuffer.wrap(text);
while (buf.hasRemaining()) {
char c = buf.get();
result.append(Character.toLowerCase(c));
buf.mark();
if (buf.hasRemaining()) {
char c2 = buf.get();
if (Character.isLowerCase(c) && Character.isUpperCase(c2)) {
result.append("_");
}
buf.reset();
}
}
return result.toString();
}
/**
* 文字列が空白文字だけからなるかどうかを返します。
*
* @param text
* 文字列
* @return 文字列が空白文字のみを含む場合 {@code true}
*/
public static boolean isWhitespace(String text) {
if (isNullOrEmpty(text)) {
return false;
}
for (char ch : text.toCharArray()) {
if (!Character.isWhitespace(ch)) {
return false;
}
}
return true;
}
public static String trimWhitespace(String text) {
if (isNullOrEmpty(text)) {
return text;
}
char[] chars = text.toCharArray();
int start = 0;
int end = chars.length;
while ((start < end) && (Character.isWhitespace(chars[start]))) {
start++;
}
while ((start < end) && (Character.isWhitespace(chars[end - 1]))) {
end--;
}
if (start < end) {
return ((start > 0) || (end < chars.length)) ? new String(chars,
start, end - start) : text;
}
return "";
}
private static boolean isNullOrEmpty(String text) {
return text == null || text.isEmpty();
}
}
|
[
"toshihiro.nakamura@gmail.com"
] |
toshihiro.nakamura@gmail.com
|
d4b239c896ec81dccc31e248e8a92c93fc9ec921
|
da889968b2cc15fc27f974e30254c7103dc4c67e
|
/Optimization Algorithm_GUI/src/Algorithm_Carpool/CCPSO2_AB_2Si_ApproachII/E_Individual.java
|
a3712fee6399c6ba556e97f203ace6ea0dd49909
|
[] |
no_license
|
say88888/My_Project_thesis
|
fcd4d96b34de8627fa054146eb6164b7c3636344
|
04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4
|
refs/heads/master
| 2020-04-10T08:32:37.106239
| 2018-12-08T05:52:44
| 2018-12-08T05:52:44
| 160,908,221
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,279
|
java
|
package Algorithm_Carpool.CCPSO2_AB_2Si_ApproachII;
import java.util.Random;
public class E_Individual extends CCPSO2_AB_2Si_ApproachII{
static int defaultGeneLengthX =P ;
private double[]Ex=new double[defaultGeneLengthX];
private int[] binaryEx = new int[D];
private int[] EA = new int[defaultGeneLengthX];
private int[] Erid = new int[defaultGeneLengthX];
static int defaultGeneLengthY =2*P ;
private double[] Ey = new double[defaultGeneLengthY];
private int[] binaryEy = new int[P];
private int[] EB = new int[defaultGeneLengthY];
private int[] ESi = new int[defaultGeneLengthY];
// Cache
private double fitness = 0;
Random ran=new Random();
public void XglobalIndividual() {
defaultGeneLengthX =P ;
Ex=new double[defaultGeneLengthX];
binaryEx = new int[D];
binaryEy = new int[P];
EA = new int[defaultGeneLengthX];
Erid= new int[defaultGeneLengthX];
for (int i = 0; i <Exsize(); i++)
{
Ex[i]=PSO_Read_Write_txt.random_generate_or_read2(Execution_Mode) ;
if(Md.get(i).size()>0){
Erid[i]=(int) Math.round(((Md.get(i).size()-1)*(Ex[i]+Vmax))/(2*Vmax)+1);
}
else
{
Erid[i]=0;
}
}
}
public void YglobalIndividual() {
defaultGeneLengthY =2*P ;
Ey = new double[defaultGeneLengthY];
EB = new int[defaultGeneLengthY*2];
ESi = new int[defaultGeneLengthY];
Double[] si= new Double[defaultGeneLengthY];
for (int i = 0; i <Eysize(); i++)
{
Ey[i]=PSO_Read_Write_txt.random_generate_or_read2(Execution_Mode) ;
si[i]=Ey[i];
}
//Step2 If the value of passenger location d+ is less than the value of passenger location d-, swap the values of passenger location d+ and the value of passenger location d-.
for(int i=0;i<P;i++)
{
if(si[i]<si[i+P])
{
double temp;
temp=si[i];
si[i]=si[i+P];
si[i+P]=temp;
}
}
//Step3 If the value of passenger location d+ is less than the value of passenger location d-, swap the values of passenger location d+ and the value of passenger location d-.
int[] Si_p=new int[defaultGeneLengthY];
for(int i=0;i<P;i++) {
Si_p[i]=i+1;
Si_p[i+P]=-(i+1);
}
for(int i=0;i<defaultGeneLengthY-1;i++)
for(int j=0;j<defaultGeneLengthY-1;j++)
{
if(si[j]<si[j+1]){
double temp;
temp=si[j];
si[j]=si[j+1];
si[j+1]=temp;
int temp1;
temp1=Si_p[j];
Si_p[j]=Si_p[j+1];
Si_p[j+1]=temp1;
}
}
ESi=Si_p;
EB=Convert_Function.Get_B(EA,ESi);
}
/* Getters and setters */
// Use this if you want to create individuals with different gene lengths 如果你想創建具有不同基因的長度個體使用本
public static void setDefaultGeneLengthX(int length) {
defaultGeneLengthX = length;
}
public static void setDefaultGeneLengthY(int length) {
defaultGeneLengthY = length;
}
public double getEx(int index){
return Ex[index];
}
public double getEy(int index){
return Ey[index];
}
public void setEx(int index, int value) {
Ex[index] = value;
fitness = 0;
}
public void setEy(int index, int value) {
Ey[index] = value;
fitness = 0;
}
public int getbinaryEx(int index) {
return binaryEx[index];
}
public int getbinaryEy(int index) {
return binaryEy[index];
}
public void setbinaryEx(int index, int value) {
binaryEx[index] = value;
fitness = 0;
}
public void setbinaryEy(int index, int value) {
binaryEy[index] = value;
fitness = 0;
}
public int getErid(int index) {
return Erid[index];
}
public int getESi(int index) {
return ESi[index];
}
public void setErid(int index, int value) {
Erid[index] = value;
fitness = 0;
}
public void setESi(int index, int value) {
ESi[index] = value;
fitness = 0;
}
public int getEA(int index) {
return EA[index];
}
public int getEB(int index) {
return EB[index];
}
public void setEA(int index, int value) {
EA[index] = value;
fitness = 0;
}
public void setEB(int index, int value) {
EB[index] = value;
fitness = 0;
}
/* Public methods */
public int Exsize() {
return Ex.length;
}
public int Eysize() {
return Ey.length;
}
public int binaryExsize() {
return binaryEx.length;
}
public int binaryEysize() {
return binaryEy.length;
}
public int EAsize() {
return EA.length;
}
public int EBsize() {
return EB.length;
}
/* public double getFitness() {
if (fitness1 == 0) {
fitness1 = FitnessCalc.getFitness(this);
}
return fitness1;
} */
public double getFitness1() {
if (fitness == 0) {
fitness = FitnessCalc.getEFitness(this);
}
return fitness;
}
public void setfitness() {
fitness = 0;
}
// Cache
@Override
public String toString() {
String geneString = "";
for (int i = 0; i < Eysize(); i++) {
geneString += getEy(i);
}
geneString+=",";
for (int i = 0; i < Exsize(); i++) {
geneString += getEx(i);
}
return geneString;
}
}
|
[
"gtvsta99@gmail.com"
] |
gtvsta99@gmail.com
|
8c350acfd39c5ff5351b4e08c93c56253bc461dd
|
8363625524862d4ba53a8dca903466b1a21b519a
|
/src/main/java/net/simpleframework/mvc/PageParameter.java
|
f9c1a2f7eb8cb18758fceb74a7aa1d54b5ba1874
|
[] |
no_license
|
zhujinfei5151/simple-mvc-core
|
a0c132840aedcbc5d9dfac520086ffe485e689a1
|
cb0bf92acd18957b81a05d6c5ebdc4705eab905a
|
refs/heads/master
| 2020-12-03T05:16:43.304963
| 2015-06-18T12:25:36
| 2015-06-18T12:25:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,444
|
java
|
package net.simpleframework.mvc;
import static net.simpleframework.common.I18n.$m;
import java.util.LinkedHashSet;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.simpleframework.common.BeanUtils;
import net.simpleframework.common.StringUtils;
import net.simpleframework.common.coll.ArrayUtils;
import net.simpleframework.common.coll.KVMap;
import net.simpleframework.common.object.ObjectEx;
import net.simpleframework.ctx.script.IScriptEval;
import net.simpleframework.ctx.script.ScriptEvalFactory;
import net.simpleframework.mvc.component.AbstractComponentBean;
import net.simpleframework.mvc.component.AbstractComponentRegistry;
import net.simpleframework.mvc.component.ComponentException;
import net.simpleframework.mvc.component.ComponentParameter;
import net.simpleframework.mvc.component.ComponentUtils;
import net.simpleframework.mvc.component.IComponentHandler;
/**
* Licensed under the Apache License, Version 2.0
*
* @author 陈侃(cknet@126.com, 13910090885) https://github.com/simpleframework
* http://www.simpleframework.net
*/
public class PageParameter extends PageRequestResponse {
private IScriptEval scriptEval;
private final PageDocument pageDocument;
public PageParameter(final HttpServletRequest request, final HttpServletResponse response,
final PageDocument pageDocument) {
super(request, response);
this.pageDocument = pageDocument;
}
public PageDocument getPageDocument() {
return pageDocument;
}
public IPageResourceProvider getPageResourceProvider() {
return getPageDocument().getPageResourceProvider();
}
public IScriptEval getScriptEval() {
return scriptEval;
}
public IScriptEval createScriptEval() {
scriptEval = ScriptEvalFactory.createDefaultScriptEval(MVCUtils.createVariables(this));
return scriptEval;
}
public String getDocumentTitle() {
return getPageDocument().getTitle(this);
}
public Map<String, AbstractComponentBean> getComponentBeans() {
return getPageDocument().getComponentBeans(this);
}
public boolean hasComponentType(final Class<? extends AbstractComponentBean> beanClass) {
for (final AbstractComponentBean componentBean : getComponentBeans().values()) {
if (componentBean.getClass().equals(beanClass)) {
return true;
}
}
return false;
}
public void addComponentBean(final AbstractComponentBean componentBean) {
final String componentName = ComponentParameter.get(this, componentBean).getComponentName();
if (!StringUtils.hasText(componentName)) {
throw ComponentException.of($m("PageDocument.1"));
}
getComponentBeans().put(componentName, componentBean);
}
public void removeComponentBean(final AbstractComponentBean componentBean) {
final String componentName = ComponentParameter.get(this, componentBean).getComponentName();
if (StringUtils.hasText(componentName)) {
getComponentBeans().remove(componentName);
}
}
@SuppressWarnings("unchecked")
public <T extends AbstractComponentBean> T addComponentBean(final Map<String, Object> attriData,
final Class<T> componentClass) {
final T t = (T) AbstractComponentRegistry.getComponentRegistry(componentClass)
.createComponentBean(this, attriData);
addComponentBean(t);
return t;
}
public <T extends AbstractComponentBean> T addComponentBean(final String name,
final Class<T> componentClass) {
return addComponentBean(new KVMap().add("name", name), componentClass);
}
public <T extends AbstractComponentBean> T addComponentBean(final Class<T> beanClass,
final Class<? extends IComponentHandler> handlerClass) {
final T t = addComponentBean(handlerClass.getSimpleName(), beanClass);
t.setHandlerClass(handlerClass);
return t;
}
public AbstractComponentBean getComponentBeanByName(final String name) {
if (!StringUtils.hasText(name)) {
return null;
}
AbstractComponentBean componentBean = getComponentBeans().get(name);
if (componentBean == null) {
componentBean = (AbstractComponentBean) SessionCache.lget(ComponentUtils
.getComponentHashByName(getPageDocument(), name));
}
return componentBean;
}
public IPageHandler getPageHandler() {
return getPageDocument().getPageHandler(this);
}
public PageBean getPageBean() {
return getPageDocument().getPageBean();
}
public String getResourceHomePath(final Class<?> resourceClass) {
return getPageResourceProvider().getResourceHomePath(resourceClass);
}
public String getResourceHomePath() {
return getResourceHomePath(PageParameter.class);
}
public String getCssResourceHomePath(final Class<?> pageClass) {
return getPageResourceProvider().getCssResourceHomePath(this, pageClass);
}
public String getCssResourceHomePath() {
return getCssResourceHomePath(PageParameter.class);
}
public void addImportCSS(final String... importCSS) {
addImportCSS((Class<?>) null, importCSS);
}
public void addImportCSS(final Class<?> pageClass, final String... importCSS) {
if (importCSS == null || importCSS.length == 0) {
return;
}
final LinkedHashSet<String> l = new LinkedHashSet<String>();
final PageBean pageBean = getPageBean();
final String[] oImportCSS = pageBean.getImportCSS();
if (oImportCSS != null) {
l.addAll(ArrayUtils.asList(oImportCSS));
}
for (String css : importCSS) {
String prefix;
if (pageClass != null && !css.startsWith(prefix = getCssResourceHomePath(pageClass))) {
css = prefix + css;
}
l.add(css);
}
pageBean.setImportCSS(l.toArray(new String[l.size()]));
}
public void addImportJavascript(final String... importJavascript) {
addImportJavascript((Class<?>) null, importJavascript);
}
public void addImportJavascript(final Class<?> pageClass, final String... importJavascript) {
if (importJavascript == null || importJavascript.length == 0) {
return;
}
final LinkedHashSet<String> l = new LinkedHashSet<String>();
final PageBean pageBean = getPageBean();
final String[] oImportJavascript = pageBean.getImportJavascript();
if (oImportJavascript != null) {
l.addAll(ArrayUtils.asList(oImportJavascript));
}
for (String js : importJavascript) {
String prefix;
if (pageClass != null && !js.startsWith(prefix = getResourceHomePath(pageClass))) {
js = prefix + js;
}
l.add(js);
}
pageBean.setImportJavascript(l.toArray(new String[l.size()]));
}
public AbstractMVCPage getPage() {
return (AbstractMVCPage) ObjectEx.singleton(getPageDocument().getPageClass());
}
public String hashId() {
return getPageDocument().hashId();
}
public Object getBeanProperty(final String beanProperty) {
final IPageHandler pageHandle = getPageHandler();
if (pageHandle != null) {
return pageHandle.getBeanProperty(this, beanProperty);
} else {
return BeanUtils.getProperty(getPageBean(), beanProperty);
}
}
public static PageParameter get(final PageRequestResponse rRequest,
final PageDocument pageDocument) {
return get(rRequest.request, rRequest.response, pageDocument);
}
public static PageParameter get(final HttpServletRequest request,
final HttpServletResponse response, final PageDocument pageDocument) {
return new PageParameter(request, response, pageDocument);
}
}
|
[
"cknet@126.com"
] |
cknet@126.com
|
31b574b1dbd667ab60b68f8fbad28f45294bfcbb
|
0a79cdc8244f9ccd29551be8eb5f003b68c1692d
|
/src/main/java/com/neo/nbdapi/lib/enumeration/EM_CAN_START_STREAM.java
|
c6e5605db6643a374b6b97b6951df43f1bd6c81b
|
[] |
no_license
|
ductq1999/demo
|
c5cccd9bb0186c11f02577780eceb380ec9372e5
|
ce2cf41e24b0898d1174519ee3738eaf864cecea
|
refs/heads/master
| 2023-08-30T15:00:12.178379
| 2021-11-17T02:57:51
| 2021-11-17T02:57:51
| 426,143,002
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,519
|
java
|
package com.neo.nbdapi.lib.enumeration;
/**
* 拉流使能
*
* @author : 47040
* @since : Created in 2020/9/17 15:53
*/
public enum EM_CAN_START_STREAM {
/**
* 未知
*/
EM_CAN_START_STREAM_UNKNOWN(-1, "未知"),
/**
* 不拉流
*/
EM_CAN_START_STREAM_OFF(0, "不拉流"),
/**
* 拉流
*/
EM_CAN_START_STREAM_ON(1, "拉流");
private int value;
private String note;
EM_CAN_START_STREAM(int givenValue, String note) {
this.value = givenValue;
this.note = note;
}
public String getNote() {
return note;
}
public int getValue() {
return value;
}
public static String getNoteByValue(int givenValue) {
for (EM_CAN_START_STREAM enumType : EM_CAN_START_STREAM.values()) {
if (givenValue == enumType.getValue()) {
return enumType.getNote();
}
}
return null;
}
public static int getValueByNote(String givenNote) {
for (EM_CAN_START_STREAM enumType : EM_CAN_START_STREAM.values()) {
if (givenNote.equals(enumType.getNote())) {
return enumType.getValue();
}
}
return -1;
}
public static EM_CAN_START_STREAM getEnum(int value) {
for (EM_CAN_START_STREAM e : EM_CAN_START_STREAM.values()) {
if (e.getValue() == value)
return e;
}
return EM_CAN_START_STREAM.EM_CAN_START_STREAM_UNKNOWN;
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
fc1956c3940e775d832c173d7f6a6c5d209b0510
|
de7220d3ff5312b495b88ce633b60f9d4bf16c80
|
/src/main/java/sagex/phoenix/image/JavascriptBufferedTransform.java
|
ee793da6aa2061328bfbc5b0be33bb72e262bff8
|
[
"Apache-2.0"
] |
permissive
|
stuckless/sagetv-phoenix-core
|
29faa56ba3994a03f9c2f800f29308922580f9b4
|
64c6d37b053b3cc09d1c689cdf50b5c36cb04573
|
refs/heads/master
| 2022-11-26T20:20:17.085576
| 2022-11-09T18:24:46
| 2022-11-09T18:24:46
| 16,001,631
| 2
| 9
|
Apache-2.0
| 2022-11-09T18:24:47
| 2014-01-17T14:24:40
|
Java
|
UTF-8
|
Java
| false
| false
| 2,673
|
java
|
package sagex.phoenix.image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import javax.script.Bindings;
import javax.script.Invocable;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import org.apache.log4j.Logger;
import sagex.remote.json.JSONObject;
public class JavascriptBufferedTransform implements IBufferedTransform {
private static final Logger log = Logger.getLogger(JavascriptBufferedTransform.class);
public static interface JSBufferedTransform {
public BufferedImage transform(BufferedImage image, JSONObject args);
}
private File jsFile = null;
private long lastModified = 0;
private ScriptEngineManager manager = new ScriptEngineManager();
private ScriptEngine engine = manager.getEngineByName("JavaScript");
private JSONObject args = null;
public JavascriptBufferedTransform(File jsFile, JSONObject args) {
this.jsFile = jsFile;
this.args = args;
}
public String getId() {
return jsFile.getName().substring(0, jsFile.getName().indexOf("."));
}
public BufferedImage transform(BufferedImage image) {
if (jsFile.lastModified() > lastModified) {
lastModified = jsFile.lastModified();
Reader r = null;
try {
log.debug("Loading Javascript Transform: " + jsFile.getAbsolutePath());
r = new FileReader(jsFile);
Bindings b = engine.getBindings(ScriptContext.ENGINE_SCOPE);
b.put("util", this);
engine.eval(r);
} catch (Exception e) {
log.error("Failed to load the javascript transform! " + jsFile.getAbsolutePath(), e);
} finally {
if (r != null) {
try {
r.close();
} catch (IOException e) {
}
}
}
}
Invocable inv = (Invocable) engine;
JSBufferedTransform bt = inv.getInterface(JSBufferedTransform.class);
try {
return bt.transform(image, args);
} catch (Exception e) {
log.error("Failed while invoking javascript transform!", e);
throw new RuntimeException(e);
}
}
public BufferedImage newImage(int width, int height) {
return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
}
public BufferedImage loadImage(String img) throws IOException {
return ImageUtil.readImage(new File(img));
}
}
|
[
"sean.stuckless@gmail.com"
] |
sean.stuckless@gmail.com
|
1d752e5ab502d2f90c78b76c8ab07105074903b7
|
b10f0fb3a0c3bdedf61b2e3a96606facb96d89af
|
/src/main/java/netty/timeserver_3/TimeClient.java
|
d5dcf7d822b422ec65d951db914f52d92ae87a95
|
[] |
no_license
|
kaixuanlu1992/java_base
|
fee86ea4f133041d15bc85167c25d77693a95e6c
|
54b9479cbdd913ed37b31877752f5fe35511de34
|
refs/heads/master
| 2021-09-24T10:21:12.103213
| 2018-10-08T03:42:08
| 2018-10-08T03:42:08
| 122,468,828
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,501
|
java
|
package netty.timeserver_3;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
public class TimeClient {
public static void main(String[] args) {
int port=12134;
if (args!=null && args.length>0){
port=Integer.parseInt(args[0]);
}
new TimeClient().connect(port,"127.0.0.1");
}
private void connect(int port, String host) {
EventLoopGroup group=new NioEventLoopGroup();
try {
Bootstrap b=new Bootstrap();
b.group(group).channel(NioSocketChannel.class)
.option(ChannelOption.TCP_NODELAY,true)
.handler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
socketChannel.pipeline().addLast(new TimeClientHandler());
}
});
ChannelFuture f=b.connect(host,port).sync();
f.channel().closeFuture().sync();
} catch (InterruptedException e) {
e.printStackTrace();
}finally {
group.shutdownGracefully();
}
}
}
|
[
"kaixuanlu1992@163.com"
] |
kaixuanlu1992@163.com
|
17a8edc44dd4635a4912bf7ea167ee8e3831f540
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/17/org/jfree/chart/plot/XYPlot_setRangeZeroBaselinePaint_1933.java
|
0802855a2d19cff89a6fabf723bc06a6b6a49fc8
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 5,600
|
java
|
org jfree chart plot
gener plot data form pair plot
data link dataset xydataset
code plot xyplot code make link item render xyitemrender draw point
plot render chart type
produc
link org jfree chart chart factori chartfactori method
creat pre configur chart
plot xyplot plot axi plot valueaxisplot
set paint baselin plot rang axi
send link plot chang event plotchangeev regist listen
param paint paint code code permit
rang baselin paint getrangezerobaselinepaint
set rang baselin paint setrangezerobaselinepaint paint paint
paint
illeg argument except illegalargumentexcept null 'paint' argument
rang baselin paint rangezerobaselinepaint paint
notifi listen notifylisten plot chang event plotchangeev
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
b31ece36a6ff8d8c2d3a3e5a5217d16140b0d24b
|
778da6dbb2eb27ace541338d0051f44353c3f924
|
/src/main/java/com/espertech/esper/util/EventRepresentationUtil.java
|
c1e3f16fe48c47a06e2178c9861770349010a763
|
[] |
no_license
|
jiji87432/ThreadForEsperAndBenchmark
|
daf7188fb142f707f9160173d48c2754e1260ec7
|
fd2fc3579b3dd4efa18e079ce80d3aee98bf7314
|
refs/heads/master
| 2021-12-12T02:15:18.810190
| 2016-12-01T12:15:01
| 2016-12-01T12:15:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,292
|
java
|
/*
* *************************************************************************************
* Copyright (C) 2006-2015 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
* *************************************************************************************
*/
package com.espertech.esper.util;
import com.espertech.esper.client.Configuration;
import com.espertech.esper.client.ConfigurationInformation;
import com.espertech.esper.client.annotation.EventRepresentation;
import com.espertech.esper.epl.annotation.AnnotationUtil;
import com.espertech.esper.epl.spec.CreateSchemaDesc;
import java.lang.annotation.Annotation;
public class EventRepresentationUtil {
public static boolean isMap(Annotation[] annotations, ConfigurationInformation configs, CreateSchemaDesc.AssignedType assignedType) {
// assigned type has priority
if (assignedType == CreateSchemaDesc.AssignedType.OBJECTARRAY) {
return false;
}
if (assignedType == CreateSchemaDesc.AssignedType.MAP) {
return true;
}
if (assignedType == CreateSchemaDesc.AssignedType.VARIANT || assignedType != CreateSchemaDesc.AssignedType.NONE) {
throw new IllegalStateException("Not handled by event representation: " + assignedType);
}
// annotation has second priority
Annotation annotation = AnnotationUtil.findAnnotation(annotations, EventRepresentation.class);
if (annotation != null) {
EventRepresentation eventRepresentation = (EventRepresentation) annotation;
return !eventRepresentation.array();
}
// use engine-wide default
return configs.getEngineDefaults().getEventMeta().getDefaultEventRepresentation() == Configuration.EventRepresentation.MAP;
}
}
|
[
"qinjie2012@163.com"
] |
qinjie2012@163.com
|
8a84aad77daa139ca988a552e0aa7bb726c19532
|
549bf4abc47f0e7a51b4cafb624567f898bf4896
|
/com/shaded/fasterxml/jackson/databind/util/SimpleBeanPropertyDefinition.java
|
71ee42567e6786b5ef3e5f669c77a17dc006c04d
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
junpengwang/fire-source
|
154672546641304083460d5584cafa0692e9ecd0
|
5fe4885ba22628a4a0706c781db5efb54a25adaa
|
refs/heads/master
| 2020-12-24T18:13:54.821338
| 2016-05-19T06:00:03
| 2016-05-19T06:00:03
| 59,177,886
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,664
|
java
|
/* */ package com.shaded.fasterxml.jackson.databind.util;
/* */
/* */ import com.shaded.fasterxml.jackson.databind.AnnotationIntrospector;
/* */ import com.shaded.fasterxml.jackson.databind.PropertyName;
/* */ import com.shaded.fasterxml.jackson.databind.cfg.MapperConfig;
/* */ import com.shaded.fasterxml.jackson.databind.introspect.AnnotatedField;
/* */ import com.shaded.fasterxml.jackson.databind.introspect.AnnotatedMember;
/* */ import com.shaded.fasterxml.jackson.databind.introspect.AnnotatedMethod;
/* */ import com.shaded.fasterxml.jackson.databind.introspect.AnnotatedParameter;
/* */ import com.shaded.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class SimpleBeanPropertyDefinition
/* */ extends BeanPropertyDefinition
/* */ {
/* */ protected final AnnotationIntrospector _introspector;
/* */ protected final AnnotatedMember _member;
/* */ protected final String _name;
/* */
/* */ @Deprecated
/* */ public SimpleBeanPropertyDefinition(AnnotatedMember paramAnnotatedMember)
/* */ {
/* 39 */ this(paramAnnotatedMember, paramAnnotatedMember.getName(), null);
/* */ }
/* */
/* */
/* */
/* */ @Deprecated
/* */ public SimpleBeanPropertyDefinition(AnnotatedMember paramAnnotatedMember, String paramString)
/* */ {
/* 47 */ this(paramAnnotatedMember, paramString, null);
/* */ }
/* */
/* */ private SimpleBeanPropertyDefinition(AnnotatedMember paramAnnotatedMember, String paramString, AnnotationIntrospector paramAnnotationIntrospector)
/* */ {
/* 52 */ this._introspector = paramAnnotationIntrospector;
/* 53 */ this._member = paramAnnotatedMember;
/* 54 */ this._name = paramString;
/* */ }
/* */
/* */
/* */
/* */
/* */ public static SimpleBeanPropertyDefinition construct(MapperConfig<?> paramMapperConfig, AnnotatedMember paramAnnotatedMember)
/* */ {
/* 62 */ return new SimpleBeanPropertyDefinition(paramAnnotatedMember, paramAnnotatedMember.getName(), paramMapperConfig == null ? null : paramMapperConfig.getAnnotationIntrospector());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static SimpleBeanPropertyDefinition construct(MapperConfig<?> paramMapperConfig, AnnotatedMember paramAnnotatedMember, String paramString)
/* */ {
/* 71 */ return new SimpleBeanPropertyDefinition(paramAnnotatedMember, paramString, paramMapperConfig == null ? null : paramMapperConfig.getAnnotationIntrospector());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public SimpleBeanPropertyDefinition withName(String paramString)
/* */ {
/* 83 */ if (this._name.equals(paramString)) {
/* 84 */ return this;
/* */ }
/* 86 */ return new SimpleBeanPropertyDefinition(this._member, paramString, this._introspector);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String getName()
/* */ {
/* 96 */ return this._name;
/* */ }
/* */
/* 99 */ public String getInternalName() { return getName(); }
/* */
/* */ public PropertyName getWrapperName()
/* */ {
/* 103 */ return this._introspector == null ? null : this._introspector.findWrapperName(this._member);
/* */ }
/* */
/* */ public boolean isExplicitlyIncluded()
/* */ {
/* 108 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean hasGetter()
/* */ {
/* 118 */ return getGetter() != null;
/* */ }
/* */
/* */ public boolean hasSetter()
/* */ {
/* 123 */ return getSetter() != null;
/* */ }
/* */
/* */ public boolean hasField()
/* */ {
/* 128 */ return this._member instanceof AnnotatedField;
/* */ }
/* */
/* */ public boolean hasConstructorParameter()
/* */ {
/* 133 */ return this._member instanceof AnnotatedParameter;
/* */ }
/* */
/* */ public AnnotatedMethod getGetter()
/* */ {
/* 138 */ if (((this._member instanceof AnnotatedMethod)) && (((AnnotatedMethod)this._member).getParameterCount() == 0))
/* */ {
/* 140 */ return (AnnotatedMethod)this._member;
/* */ }
/* 142 */ return null;
/* */ }
/* */
/* */ public AnnotatedMethod getSetter()
/* */ {
/* 147 */ if (((this._member instanceof AnnotatedMethod)) && (((AnnotatedMethod)this._member).getParameterCount() == 1))
/* */ {
/* 149 */ return (AnnotatedMethod)this._member;
/* */ }
/* 151 */ return null;
/* */ }
/* */
/* */ public AnnotatedField getField()
/* */ {
/* 156 */ return (this._member instanceof AnnotatedField) ? (AnnotatedField)this._member : null;
/* */ }
/* */
/* */
/* */ public AnnotatedParameter getConstructorParameter()
/* */ {
/* 162 */ return (this._member instanceof AnnotatedParameter) ? (AnnotatedParameter)this._member : null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public AnnotatedMember getAccessor()
/* */ {
/* 173 */ Object localObject = getGetter();
/* 174 */ if (localObject == null) {
/* 175 */ localObject = getField();
/* */ }
/* 177 */ return (AnnotatedMember)localObject;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public AnnotatedMember getMutator()
/* */ {
/* 187 */ Object localObject = getConstructorParameter();
/* 188 */ if (localObject == null) {
/* 189 */ localObject = getSetter();
/* 190 */ if (localObject == null) {
/* 191 */ localObject = getField();
/* */ }
/* */ }
/* 194 */ return (AnnotatedMember)localObject;
/* */ }
/* */
/* */ public AnnotatedMember getPrimaryMember()
/* */ {
/* 199 */ return this._member;
/* */ }
/* */ }
/* Location: /Users/junpengwang/Documents/FireJar/firebase-client-android-2.3.1.jar!/com/shaded/fasterxml/jackson/databind/util/SimpleBeanPropertyDefinition.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"wangjunpeng@wilddog.com"
] |
wangjunpeng@wilddog.com
|
009ea2651a8b8394a3d917507f026ef3767db9ea
|
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
|
/MPS/app-business/src/main/java/com/pay/base/dao/enterprise/impl/EnterpriseContractDAOImpl.java
|
4a0b8a0020ee91664e946010f4f750bf047afe66
|
[] |
no_license
|
happyjianguo/pay-1
|
8631906be62707316f0ed3eb6b2337c90d213bc0
|
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
|
refs/heads/master
| 2020-07-27T19:51:54.958859
| 2016-12-19T07:34:24
| 2016-12-19T07:34:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,119
|
java
|
/*
* pay.com Inc.
* Copyright (c) 2006-2011 All Rights Reserved.
*/
package com.pay.base.dao.enterprise.impl;
import java.util.List;
import com.pay.base.dao.enterprise.EnterpriseContractDAO;
import com.pay.base.model.EnterpriseContract;
import com.pay.inf.dao.impl.BaseDAOImpl;
/**
*
* @author zhi.wang
* @version $Id: EnterpriseContractDAOImpl.java, v 0.1 2011-2-21 下午03:34:12
* zhi.wang Exp $
*/
public class EnterpriseContractDAOImpl extends BaseDAOImpl implements
EnterpriseContractDAO {
/**
* @param enterpriseContract
* @return
* @see com.pay.base.dao.enterprise.EnterpriseContractDAO#createContract(com.pay.base.model.EnterpriseContract)
*/
@Override
public Long createContract(EnterpriseContract enterpriseContract) {
return (Long) super.create(enterpriseContract);
}
public List<EnterpriseContract> getContractByMemberCode(Long memberCode) {
List<EnterpriseContract> contractEnterpriseList = super
.getSqlMapClientTemplate().queryForList(
getNamespace().concat("queryContractByMemberCode"),
memberCode);
;
return contractEnterpriseList;
}
}
|
[
"stanley.zou@hrocloud.com"
] |
stanley.zou@hrocloud.com
|
44b6331b000e0ff9911e3dfd33c5e3e6ef2ecf94
|
961016a614c6785e6fe8f6bfd7214676f0d91064
|
/Portlets/ProgateServiceBuilder-portlet/docroot/WEB-INF/service/larion/progate/cds/service/CdsPACompetenciesService.java
|
857a18ac1a56c2014e68543d2540f22858a55964
|
[] |
no_license
|
thaond/progate-lmis
|
f58c447c58c11217e2247c7ca3349a44ad7f3bbd
|
d143b7e7d56a22cc9ce6256ca6fb77a11459e6d6
|
refs/heads/master
| 2021-01-10T03:00:26.888869
| 2011-07-28T14:12:54
| 2011-07-28T14:12:54
| 44,992,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,663
|
java
|
/**
* Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
*
* 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 larion.progate.cds.service;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;
import com.liferay.portal.kernel.annotation.Isolation;
import com.liferay.portal.kernel.annotation.Transactional;
/**
* <a href="CdsPACompetenciesService.java.html"><b><i>View Source</i></b></a>
*
* @author Brian Wing Shun Chan
*
*/
@Transactional(isolation = Isolation.PORTAL, rollbackFor = {
PortalException.class, SystemException.class})
public interface CdsPACompetenciesService {
}
|
[
"tigerproand@gmail.com"
] |
tigerproand@gmail.com
|
6c6ce12c646ffc5b09bbc6c9c5999466ed49c598
|
1413e9392224af82d8d889986730a99e4f2e815d
|
/app/src/main/java/net/ajcloud/wansviewplus/main/device/ReplayTFFragment.java
|
d164191b12c5161e20967f2e9ca54009ef425a9b
|
[] |
no_license
|
skytylon/WansViewPlus
|
76ae6bf50447d0d214bd69d41b06a1970e0ee345
|
7a08400eb94d6f1e7a05207ac9c7365224dd9921
|
refs/heads/master
| 2022-04-24T16:13:04.222394
| 2018-07-21T06:06:52
| 2018-07-21T06:06:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 779
|
java
|
package net.ajcloud.wansviewplus.main.device;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.ajcloud.wansviewplus.R;
import net.ajcloud.wansviewplus.main.application.WVFragment;
/**
* Created by mamengchao on 2018/07/17.
* Function:
*/
public class ReplayTFFragment extends WVFragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_replay_tf, container, false);
}
public void onBack() {
mActivity.finish();
}
}
|
[
"mmc5634@outlook.com"
] |
mmc5634@outlook.com
|
91cb051c1addf56e048c02a6045717951c6b295a
|
dd8a57a138e8eeb71021471cf6f9dbdadd17ea99
|
/org.sheepy.lily.core.allocation/src/main/java/org/sheepy/lily/core/allocation/dependency/container/DependencyContainer.java
|
81ee0f0dda672407f81107e581833b409f3b5241
|
[] |
no_license
|
Ealrann/Lily-core
|
99c04e4a8caefe17f0be80df3112ed12fb00c22f
|
5525362b06faee05ed705797ee1f190d3731430a
|
refs/heads/master
| 2023-08-06T17:34:35.841397
| 2023-07-25T21:04:09
| 2023-07-25T21:04:09
| 148,759,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,148
|
java
|
package org.sheepy.lily.core.allocation.dependency.container;
import org.sheepy.lily.core.allocation.AllocationHandle;
import org.logoce.extender.api.IAdapter;
import org.logoce.extender.api.IAdapterHandle;
public final class DependencyContainer
{
private final IAdapterHandle<?> handle;
private final Runnable onDependencyUpdate;
private IAdapter extender;
public DependencyContainer(final IAdapterHandle<?> handle, final Runnable onDependencyUpdate)
{
this.handle = handle;
this.onDependencyUpdate = onDependencyUpdate;
extender = handle.getExtender();
handle.listenNoParam(onDependencyUpdate);
if (handle instanceof AllocationHandle<?> allocHandle) allocHandle.listenActivation(onDependencyUpdate);
}
public void update()
{
extender = handle.getExtender();
}
public void free()
{
if (handle instanceof AllocationHandle<?> allocHandle) allocHandle.sulkActivation(onDependencyUpdate);
handle.sulkNoParam(onDependencyUpdate);
}
public IAdapter get()
{
return extender;
}
public boolean isDirty()
{
return extender != handle.getExtender();
}
public IAdapterHandle<?> handle()
{
return handle;
}
}
|
[
"ealrann@gmail.com"
] |
ealrann@gmail.com
|
11839a587f5a0338a604a702c8670eeb84d6f8f7
|
9810488568a8b75c2d16edf50b4b57e8e5c7bebb
|
/EncogAdvanced/src/drosa/experimental/claudia/TestScalpingHourly.java
|
530e6077e966cfab6c38789d15b06b178197fa76
|
[] |
no_license
|
davidautentico/FxPredictor
|
392693e32724e9196d6ab33135b916515b4bc64d
|
36c1d413d472d4c1478668614df5d476fcb6c82e
|
refs/heads/master
| 2021-06-24T08:40:47.395190
| 2021-03-21T11:05:55
| 2021-03-21T11:05:55
| 195,585,127
| 0
| 0
| null | 2020-10-13T14:24:38
| 2019-07-06T21:37:34
|
Java
|
UTF-8
|
Java
| false
| false
| 6,854
|
java
|
package drosa.experimental.claudia;
import java.util.ArrayList;
import java.util.Calendar;
import drosa.DAO.DAO;
import drosa.data.DataProvider;
import drosa.experimental.PositionShort;
import drosa.finances.Quote;
import drosa.finances.QuoteShort;
import drosa.phil.TestLines;
import drosa.strategies.PositionStatus;
import drosa.strategies.auxiliar.PositionType;
import drosa.utils.PrintUtils;
import drosa.utils.TradingUtils;
public class TestScalpingHourly {
public static void testHourlyRetest(ArrayList<QuoteShort> data,
int begin,int end,
int h1,int h2,
int tp,int sl,
int bodyPips,int wickPips){
int wins = 0;
int losses = 0;
ArrayList<PositionShort> positions = new ArrayList<PositionShort>();
int lastHour = -1;
int actualOpen = -1;
int actualClose = -1;
int actualMax = -1;
int actualMin = -1;
int diffBody = 0;
int diffWick = 0;
int openNewTrade = 0;
Calendar cal = Calendar.getInstance();
for (int i=begin;i<=end;i++){
QuoteShort q = data.get(i);
QuoteShort.getCalendar(cal, q);
int h = cal.get(Calendar.HOUR_OF_DAY);
if (h!=lastHour){
openNewTrade = 0;
if (lastHour!=-1){
diffBody = actualClose-actualOpen;
boolean bull = true;
if (diffBody>=0){
diffWick = actualMax-actualClose;
bull = true;
}
else{
diffWick = actualClose-actualMin;
bull = false;
}
if (Math.abs(diffBody)>=bodyPips && diffWick>=wickPips && lastHour>=h1 && lastHour<=h2){
if (bull) openNewTrade = 1;
else openNewTrade = -1;
}
}
actualOpen = q.getOpen5();
actualMax = q.getHigh5();
actualMin = q.getLow5();
actualClose = q.getClose5();
lastHour= h;
}
int entry = -1;
int slValue = -1;
int tpValue = -1;
PositionType positionType = PositionType.NONE;
if (openNewTrade==1){
entry = q.getOpen5();
tpValue = entry+10*tp;
slValue = entry-10*sl;
positionType = PositionType.LONG;
}else if (openNewTrade==-1){
entry = q.getOpen5();
tpValue = entry-10*tp;
slValue = entry+10*sl;
positionType = PositionType.SHORT;
}
if (entry!=-1){
openNewTrade = 0;
PositionShort pos = new PositionShort();
pos.setEntry(entry);
pos.setSl(slValue);
pos.setTp(tpValue);
pos.getOpenCal().setTimeInMillis(cal.getTimeInMillis());
pos.setPositionStatus(PositionStatus.OPEN);
pos.setPositionType(positionType);
positions.add(pos);
//System.out.println(pos.toString2());
}
//updatePositions
int s = 0;
//if (positions.size()>0) System.out.println(q1.toString());
while (s<positions.size()){
PositionShort p = positions.get(s);
boolean removed = false;
if (p.getPositionStatus()==PositionStatus.OPEN){
boolean closed = false;
if (p.getPositionType()==PositionType.LONG){
if (q.getLow5()<=p.getSl()){
p.setPositionStatus(PositionStatus.CLOSE);
p.setWin(-1);
losses++;
closed = true;
}else if (q.getHigh5()>=p.getTp()){
p.setPositionStatus(PositionStatus.CLOSE);
p.setWin(1);
wins++;
closed = true;
}
}else if (p.getPositionType()==PositionType.SHORT){
if (q.getHigh5()>=p.getSl()){
p.setPositionStatus(PositionStatus.CLOSE);
p.setWin(-1);
losses++;
closed = true;
}else if (q.getLow5()<=p.getTp()){
p.setPositionStatus(PositionStatus.CLOSE);
p.setWin(1);
wins++;
closed = true;
}
}
if (closed){
//System.out.println(p.toString2());
positions.remove(s);//borramos y no avanzamos
removed = true;
}
}//open
if (!removed){
s++;
}
}//while
//actualizamos maximos y cierre
if (q.getHigh5()>=actualMax) actualMax = q.getHigh5();
if (q.getLow5()<=actualMin) actualMin = q.getLow5();
actualClose = q.getClose5();
}
int total = wins+losses;
double perWin = wins*100.0/total;
double pf = ((wins*tp*1.0)/(losses*sl));
double exp = (wins*tp-losses*sl)*1.0/total;
System.out.println(h1+" "+h2+" "+tp+" "+sl+" "+bodyPips+" "+wickPips
+" || "+total
+" "+PrintUtils.Print2dec(perWin, false, 2)
+" "+PrintUtils.Print2dec(pf, false, 2)
+" "+PrintUtils.Print2dec(exp, false, 2)
);
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String fileName ="1 Min_Bid_2010.12.31_2015.04.23.csv";
//String fileName ="1 Min_Bid_2011.12.31_2015.04.23.csv";
//String fileName ="1 Min_Bid_2012.12.31_2015.04.23.csv";
//String fileName ="1 Min_Bid_2013.12.31_2015.04.23.csv";
//String fileName ="1 Min_Bid_2014.12.31_2015.04.23.csv";
String fileNameP ="2013_08_29_2015_04_23.csv";
String pathEURUSD = "C:\\fxdata\\EURUSD_UTC_"+fileName;
String pathEURUSDp = "C:\\fxdata\\EURUSD5_pepper_"+fileNameP;
String pathGBPUSD = "C:\\fxdata\\GBPUSD_UTC_"+fileName;
String pathGBPUSDp = "C:\\fxdata\\GBPUSD1_pepper_"+fileNameP;
String pathAUDUSD = "C:\\fxdata\\AUDUSD_UTC_"+fileName;
String pathUSDJPY = "C:\\fxdata\\USDJPY_UTC_"+fileName;
String pathUSDJPYp = "C:\\fxdata\\USDJPY1_pepper_"+fileNameP;
ArrayList<String> paths = new ArrayList<String>();
paths.add(pathEURUSD);
paths.add(pathGBPUSD);
paths.add(pathAUDUSD);
paths.add(pathUSDJPY);
int limit = paths.size()-1;
int initial = 1;
limit = 1;
for (int i=initial;i<=limit;i++){
String path5m = paths.get(i);
String pairName = paths.get(i).split("\\\\")[2].substring(0, 6);
ArrayList<Quote> dataI = null;
ArrayList<Quote> dataS = null;
if (path5m.contains("pepper")){
dataI = DAO.retrieveData(path5m, DataProvider.PEPPERSTONE_FOREX);
dataS = dataI;
}else{
dataI = DAO.retrieveData(path5m, DataProvider.DUKASCOPY_FOREX);
dataS = TestLines.calculateCalendarAdjusted(dataI);
}
ArrayList<Quote> data5m = TradingUtils.cleanWeekendData(dataS);
ArrayList<QuoteShort> data5mS = QuoteShort.convertQuoteArraytoQuoteShort(data5m);
ArrayList<QuoteShort> data = null;
data = data5mS;
int begin = 0;
int end = data.size()-1;
for (int h1=0;h1<=23;h1++){
int h2 = h1+5;
//for (int sl=5;sl<=5;sl++){
//for (int tp=1*sl;tp<=1*sl;tp+=1*sl){
for (int tp=10;tp<=10;tp+=1){
for (int sl=10;sl<=10;sl++){
for (int bodyPips = 200;bodyPips<=200;bodyPips+=10){
for (int wickPips = 100;wickPips<=100;wickPips+=10){
TestScalpingHourly.testHourlyRetest(data, begin, end, h1, h2, tp, sl, bodyPips, wickPips);
}
}
}
}
}
}
}
}
|
[
"davidautentico@gmail.com"
] |
davidautentico@gmail.com
|
90db99cf587ae7d7c9acc282d895a4e7f2510d69
|
213f9d2dd5e9fb85b9e03b66b799074ffa96b7a8
|
/querydsl-codegen/src/test/java/com/mysema/query/codegen/QueryEmbeddable2Test.java
|
283dc0824690f40f75718951276698670ed2616b
|
[] |
no_license
|
wrungel/querydsl
|
01c3fef65a0dfaca5b9cb516eb5448be249c62f4
|
7987e4797c16fe031726a887ba1a79fc8167f806
|
refs/heads/master
| 2021-01-18T00:52:57.545369
| 2015-01-03T17:50:41
| 2015-01-03T17:50:41
| 11,688,642
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 661
|
java
|
package com.mysema.query.codegen;
import com.mysema.query.annotations.QueryEmbeddable;
import com.mysema.query.annotations.QueryEntity;
public class QueryEmbeddable2Test extends AbstractExporterTest {
@QueryEntity
public static class User {
Complex<String> complex;
}
@QueryEmbeddable
public static class Complex<T extends Comparable<T>> implements Comparable<Complex<T>> {
T a;
@Override
public int compareTo(Complex<T> arg0) {
return 0;
}
public boolean equals(Object o) {
return o == this;
}
}
}
|
[
"timo.westkamper@mysema.com"
] |
timo.westkamper@mysema.com
|
557147c369b2900bd26f772158a7a773f2ebe4ca
|
bfc7a4cda00a0b89d4b984c83976770b0523f7f5
|
/OA/JavaSource/com/icss/oa/useraddress/handler/CommonHandler.java
|
f70f916d37990b3e701ace433ccdd88aca33bcc5
|
[] |
no_license
|
liveqmock/oa
|
100c4a554c99cabe0c3f9af7a1ab5629dcb697a6
|
0dfbb239210d4187e46a933661a031dba2711459
|
refs/heads/master
| 2021-01-18T05:02:00.704337
| 2015-03-03T06:47:30
| 2015-03-03T06:47:30
| 35,557,095
| 0
| 1
| null | 2015-05-13T15:26:06
| 2015-05-13T15:26:06
| null |
GB18030
|
Java
| false
| false
| 2,920
|
java
|
/*
* Created on 2003-12-26
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.icss.oa.useraddress.handler;
import java.io.File;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.*;
import com.icss.oa.addressbook.dao.AddressbookFolderDAO;
import com.icss.oa.addressbook.dao.AddressbookManagerDAO;
import com.icss.oa.addressbook.vo.AddressbookFolderVO;
import com.icss.oa.addressbook.vo.AddressbookTreeVO;
import com.icss.oa.log.dao.LogAccessoryDAO;
import com.icss.oa.log.dao.LogMsgDAO;
import com.icss.oa.log.dao.LogReplyDAO;
import com.icss.oa.log.dao.LogSysDAO;
import com.icss.oa.log.vo.LogAccessoryVO;
import com.icss.oa.log.vo.LogMsgVO;
import com.icss.oa.log.vo.LogReplyVO;
import com.icss.oa.log.vo.LogSysTreeVO;
import com.icss.oa.log.vo.LogSysVO;
import com.icss.j2ee.dao.DAOException;
import com.icss.j2ee.dao.DAOFactory;
import com.icss.j2ee.services.DBConnectionLocator;
import com.icss.j2ee.services.DBConnectionLocatorException;
/**
* @author Administrator
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class CommonHandler {
public CommonHandler() {
}
/**
* 得到一个人的中文名称,根据此人的uuid
*
* @param personuuid
* @return
* @throws HandlerException
*/
public String getPerson_name(String personuuid) {
// System.out.println("eeee11111111111111111111111 "+personuuid);
Connection conn = null;
try {
conn = DBConnectionLocator.getInstance().getConnection(
com.icss.j2ee.util.Globals.DATASOURCEJNDI);
} catch (DBConnectionLocatorException e1) {
e1.printStackTrace();
}
String sql = " SELECT CNNAME AS cnname FROM SYS_PERSON WHERE PERSONUUID = '"
+ personuuid+"'";
// System.out.println("eeee22222222222222222222222222 "+sql);
Statement stmt = null;
ResultSet rs = null;
String cnname = "";
try {
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
if (rs != null) {
if (rs.next()) {
cnname = rs.getString("cnname");
// System.out.println("eeee3333333 "+cnname);
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
if (rs != null) {
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if(stmt!=null){
try {
stmt.close();
} catch (SQLException e2) {
e2.printStackTrace();
}
}
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
return cnname;
}
}
|
[
"peijn1026@gmail.com"
] |
peijn1026@gmail.com
|
fd0ee71da2e729de86c0bf4ef94a19005d80d530
|
f8dded68b9125a95e64745b3838c664b11ce7bbe
|
/cdm/src/main/java/ucar/util/prefs/PersistenceManager.java
|
3f52ef0e0ec6d746b56e34df27a58451b613c08d
|
[
"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,850
|
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 ucar.util.prefs;
public interface PersistenceManager {
public void addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener pcl);
public String get(String key, String def);
public void put(String key, String value);
public boolean getBoolean(String key, boolean def);
public void putBoolean(String key, boolean value);
public double getDouble(String key, double def);
public void putDouble(String key, double value);
public int getInt(String key, int def);
public void putInt(String key, int value);
public java.util.List getList(String key, java.util.List def);
public void putList(String key, java.util.List value);
public Object getObject(String key);
public void putObject(String key, Object value);
public long getLong(String key, long def);
public void putLong(String key, long value);
}
|
[
"melissa@glencoesoftware.com"
] |
melissa@glencoesoftware.com
|
4d0b3fab3e4785fe6dbafd82d0a10e64aef08417
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_c6cb51cff232bef014b44368250841c0eeedf718/VarInt/3_c6cb51cff232bef014b44368250841c0eeedf718_VarInt_t.java
|
a8a38491e48211c10cede9e1a770a0dbbb61c024
|
[] |
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,162
|
java
|
/*******************************************************************************
* Copyright (c) 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.ptp.proxy.util;
import java.nio.ByteBuffer;
/**
* Represent the specified integer value in varint format.
*
* The varint format is described at
* http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints Note
* that this function is not thread safe.
*
* @since 5.0
*/
public class VarInt {
private int fValue = 0;
private boolean fValid = false;
private ByteBuffer fBytes = null;
public VarInt(ByteBuffer buffer) {
while (buffer.hasRemaining()) {
byte b = buffer.get();
fValue <<= 7;
fValue &= (b & 0x7f);
if ((b & 0x80) == 0) {
fValid = true;
break;
}
}
}
public VarInt(int value) {
fValue = value;
fValid = true;
}
/**
* Get a byte buffer representation of this varint. Only valid if
* {@link #isValid()} is true.
*
* @return byte buffer representation of varint
*/
public ByteBuffer getBytes() {
if (fBytes == null && fValid) {
fBytes = ByteBuffer.allocate(5); // maximum size of varint enconding
int val = fValue;
while (val > 0) {
byte b = (byte) (val & 0x7f);
val >>= 7;
if (val > 0) {
b &= 0x80;
}
fBytes.put(b);
}
fBytes.rewind();
}
return fBytes;
}
/**
* Get the integer value of this varin. Only valid if {@link #isValid()} is
* true.
*
* @return integer value of varint
*/
public int getValue() {
return fValue;
}
/**
* Test if this varint is valid.
*
* @return true if the varint is valid, false otherwise
*/
public boolean isValid() {
return fValid;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ca41ec73c5788143c98ad5410f0e384a51166705
|
4458fe1a91a8480c67f9f6f43ac9e74946c70f6a
|
/src/main/java/com/asiainfo/activiti/config/ActivitiConfig.java
|
57ad5f7a8d1a579a3ece3dd86ec2346666e00368
|
[] |
no_license
|
zostudy/activiti
|
8e1e2ebe0900cd62c9d5a9c48cc0897b4fc811fd
|
9168b07b56d323b0d09cab1928a760b1e8688bb4
|
refs/heads/master
| 2020-04-03T08:51:10.073628
| 2018-10-30T02:57:57
| 2018-10-30T02:57:57
| 155,146,977
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,549
|
java
|
package com.asiainfo.activiti.config;
import javax.sql.DataSource;
import org.activiti.engine.DynamicBpmnService;
import org.activiti.engine.HistoryService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.ManagementService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration;
import org.activiti.engine.impl.history.HistoryLevel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ActivitiConfig {
@Autowired
private DataSource dataSource;
/**
* 流程引擎配置
*
* @return ProcessEngineConfiguration
*/
@Bean
public ProcessEngineConfiguration processEngineConfiguration() {
StandaloneProcessEngineConfiguration standaloneProcessEngineConfiguration = new StandaloneProcessEngineConfiguration();
// 数据源
standaloneProcessEngineConfiguration.setDataSource(dataSource);
// 数据库策略, false(默认), true(更新), create-drop(创建,关闭引擎时执行才执行drop), drop-create(先删除再创建)
standaloneProcessEngineConfiguration.setDatabaseSchemaUpdate("true");
// 历史数据, none(不存数据,效率最高), activity(实例,行为), audit(实例,行为,任务,属性)默认值, full
standaloneProcessEngineConfiguration.setHistoryLevel(HistoryLevel.FULL);
// 异步任务
// standaloneProcessEngineConfiguration.setAsyncExecutor(asyncExecutor);
// 邮件服务器
// standaloneProcessEngineConfiguration.setMailServers(mailServers);
// 事件日志
standaloneProcessEngineConfiguration.setEnableDatabaseEventLogging(true);
// 流程部署时是否自动生成流程图片
standaloneProcessEngineConfiguration.setCreateDiagramOnDeploy(true);
return standaloneProcessEngineConfiguration;
}
/**
* 流程引擎
*
* @param processEngineConfiguration 流程引擎配置
* @return ProcessEngine
*/
@Bean
public ProcessEngine processEngine(ProcessEngineConfiguration processEngineConfiguration) {
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
return processEngine;
}
/**
* 存储服务, 提供一系列管理流程定义和部署的 API
*
* @param processEngine 流程引擎
* @return RepositoryService
*/
@Bean
public RepositoryService repositoryService(ProcessEngine processEngine) {
return processEngine.getRepositoryService();
}
/**
* 运行时服务, 在流程运行时对流程实例进行管理与控制
*
* @param processEngine 流程引擎
* @return RuntimeService
*/
@Bean
public RuntimeService runtimeService(ProcessEngine processEngine) {
return processEngine.getRuntimeService();
}
/**
* 任务服务, 对流程任务进行管理, 例如: 任务提醒, 任务完成, 创建任务, 分派任务等
*
* @param processEngine 流程引擎
* @return TaskService
*/
@Bean
public TaskService taskService(ProcessEngine processEngine) {
return processEngine.getTaskService();
}
/**
* 角色服务, 提供对流程角色数据进行管理的 API, 这些角色数据包括用户组, 用户以及它们之间的关系
*
* @param processEngine 流程引擎
* @return IdentityService
*/
@Bean
public IdentityService identityService(ProcessEngine processEngine) {
return processEngine.getIdentityService();
}
/**
* 管理服务, 提供对流程引擎进行管理和维护的服务
*
* @param processEngine 流程引擎
* @return ManagementService
*/
@Bean
public ManagementService managementService(ProcessEngine processEngine) {
return processEngine.getManagementService();
}
/**
* 历史服务, 对流程的历史数据进行操作, 包括查询, 删除这些历史数据
*
* @param processEngine 流程引擎
* @return HistoryService
*/
@Bean
public HistoryService historyService(ProcessEngine processEngine) {
return processEngine.getHistoryService();
}
/**
* 使用该服务, 可以不需要重新部署流程模型, 就可以实现对流程模型的部分修改
*
* @param processEngine 流程引擎
* @return DynamicBpmnService
*/
@Bean
public DynamicBpmnService dynamicBpmnService(ProcessEngine processEngine) {
return processEngine.getDynamicBpmnService();
}
}
|
[
"wangrupeng@foxmail.com"
] |
wangrupeng@foxmail.com
|
94a0717fccb21a09d824a25b09a5dbe578cc98e9
|
b0b0c5512430c9ba47f193ddf7b9d9480d135ae5
|
/app/src/main/java/com/rackluxury/jaguar/reddit/multireddit/MultiRedditDao.java
|
76e08b3bd99af01a2b0781608169a3857a10205d
|
[] |
no_license
|
HarshAProgrammer/Jaguar
|
87562150625387f2c954d32f705e0b704f7e5866
|
24239c652384aaff06882d818961cf462a08e373
|
refs/heads/master
| 2023-08-17T07:42:29.291799
| 2021-09-13T16:42:56
| 2021-09-13T16:42:56
| 405,972,038
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,342
|
java
|
package com.rackluxury.jaguar.reddit.multireddit;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import java.util.List;
@Dao
public interface MultiRedditDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insert(MultiReddit MultiReddit);
@Query("SELECT * FROM multi_reddits WHERE username = :username ORDER BY name COLLATE NOCASE ASC")
LiveData<List<MultiReddit>> getAllMultiReddits(String username);
@Query("SELECT * FROM multi_reddits WHERE username = :username ORDER BY name COLLATE NOCASE ASC")
List<MultiReddit> getAllMultiRedditsList(String username);
@Query("SELECT * FROM multi_reddits WHERE username = :username AND is_favorite ORDER BY name COLLATE NOCASE ASC")
LiveData<List<MultiReddit>> getAllFavoriteMultiReddits(String username);
@Query("SELECT * FROM multi_reddits WHERE name = :name AND username = :username COLLATE NOCASE LIMIT 1")
MultiReddit getMultiReddit(String name, String username);
@Query("DELETE FROM multi_reddits WHERE name = :name AND username = :username")
void deleteMultiReddit(String name, String username);
@Query("DELETE FROM multi_reddits WHERE username = :username")
void deleteAllUserMultiReddits(String username);
}
|
[
"App.Lavishly@Gmail.com"
] |
App.Lavishly@Gmail.com
|
6f0c0513b5b1af40b6ebc7e08f1b57e9f9e43551
|
d167ceab8b4b594e7f769e2ce50e99aab4b81d05
|
/src/main/java/levelp/StackIsEmptyException.java
|
5d054a4441bd64b3083cea4a30010924b0e986d7
|
[] |
no_license
|
levelp/StackQueueDemo
|
c6b601f1fea8f1be483da7827419c33fa490f16c
|
0a30ffe43fdf8db6d97b0b4bf15d41e6d26f29db
|
refs/heads/master
| 2020-04-12T15:15:22.277072
| 2015-09-17T17:07:16
| 2016-12-15T20:12:16
| 42,669,761
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 259
|
java
|
package levelp;
/**
* Ошибка если стек пуст
* Exception
* RuntimeException
* Throwable
*/
public class StackIsEmptyException extends RuntimeException {
public StackIsEmptyException(String message) {
super(message);
}
}
|
[
"super.denis@gmail.com"
] |
super.denis@gmail.com
|
d2d5fba4a198741b270adbb01532f1faa9485c20
|
d9ea3ae7b2c4e9a586e61aed23e6e997eaa38687
|
/99.我的案例/Day38_Hibernate/Day08_Hibernate03/src/main/java/com/syc/hibernate/domain/Employee.java
|
42dec0fdb63155f2d05d84ac8a53f495c323f3bf
|
[] |
no_license
|
yuanhaocn/Fu-Zusheng-Java
|
6e5dcf9ef3d501102af7205bb81674f880352158
|
ab872bcfe36d985a651a5e12ecb6132ad4d2cb8e
|
refs/heads/master
| 2020-05-15T00:20:47.872967
| 2019-04-16T11:06:18
| 2019-04-16T11:06:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 715
|
java
|
package com.syc.hibernate.domain;
/**
* Employee与empl表相匹配. Employee类中的属性与empl表中的列相匹配. Employee类的每一个对象,对应着empl表的每一行.
*/
public class Employee {
private long id;
private String name;
private String job;
private double salery;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getJob() {
return job;
}
public void setJob(String job) {
this.job = job;
}
public double getSalery() {
return salery;
}
public void setSalery(double salery) {
this.salery = salery;
}
}
|
[
"fuzusheng@gmail.com"
] |
fuzusheng@gmail.com
|
945c3eda43c82b2562f8d0df4f40cfafb0b2655b
|
3b180a810b25d05c68f8460b509ac0f94306885c
|
/ezyfox-chat/ezyfox-chat-entry/src/main/java/com/tvd12/ezyfoxserver/chat/EzyChatEntryLoader.java
|
4dca00fc01538c46dc02f4f5b912230ef868a11b
|
[
"Apache-2.0"
] |
permissive
|
mediapastor/ezyfox-server-example
|
f858591d4f3622c31a8d4b607e30b9c6491161c7
|
f39852ed3de8937c77cd4a6be0e248ba228c2209
|
refs/heads/master
| 2020-03-30T07:00:13.172525
| 2018-08-14T10:49:59
| 2018-08-14T10:49:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 309
|
java
|
package com.tvd12.ezyfoxserver.chat;
import com.tvd12.ezyfoxserver.ext.EzyAbstractAppEntryLoader;
import com.tvd12.ezyfoxserver.ext.EzyAppEntry;
public class EzyChatEntryLoader extends EzyAbstractAppEntryLoader {
@Override
public EzyAppEntry load() throws Exception {
return new EzyChatEntry();
}
}
|
[
"itprono3@gmail.com"
] |
itprono3@gmail.com
|
a5cefbe6c4bbc9e39da4447f16b474dd0c8c3bef
|
e0d52bbf5d1b657afb07795bf456e8e680302980
|
/ModelibraWicket/src/org/modelibra/wicket/concept/EntityDisplayTableListView.java
|
c2b5b89f41ebdaa88b4ac9d5768d94670cf1f730
|
[
"Apache-2.0"
] |
permissive
|
youp911/modelibra
|
acc391da16ab6b14616cd7bda094506a05414b0f
|
00387bd9f1f82df3b7d844650e5a57d2060a2ec7
|
refs/heads/master
| 2021-01-25T09:59:19.388394
| 2011-11-24T21:46:26
| 2011-11-24T21:46:26
| 42,008,889
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,269
|
java
|
/*
* Modelibra
*
* 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.modelibra.wicket.concept;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wicket.Page;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.IPageLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.link.PageLink;
import org.apache.wicket.markup.html.list.ListItem;
import org.modelibra.IEntities;
import org.modelibra.IEntity;
import org.modelibra.DomainModel;
import org.modelibra.config.ConceptConfig;
import org.modelibra.config.NeighborConfig;
import org.modelibra.config.NeighborsConfig;
import org.modelibra.wicket.app.DomainApp;
import org.modelibra.wicket.container.NeighborNameLabelLinkListView;
import org.modelibra.wicket.util.LocalizedText;
import org.modelibra.wicket.util.NeighborNameLabelLinkPair;
import org.modelibra.wicket.view.View;
import org.modelibra.wicket.view.ViewModel;
/**
* Entity display table list view.
*
* @author Dzenan Ridjanovic
* @version 2007-11-28
*/
public class EntityDisplayTableListView extends
EntityPropertiesDisplayTableListView {
private static final long serialVersionUID = 102180L;
private static Log log = LogFactory
.getLog(EntityDisplayTableListView.class);
private ViewModel viewModel;
private View view;
private String modelCode;
/**
* Constructs an entity display table list view.
*
* @param viewModel
* view model
* @param view
* view
*/
public EntityDisplayTableListView(final ViewModel viewModel, final View view) {
super(viewModel, view);
this.viewModel = viewModel;
this.view = view;
modelCode = viewModel.getModel().getModelConfig().getCode();
}
/**
* Populates a list view line.
*
* @param item
* list item (line)
*/
protected void populateItem(ListItem item) {
super.populateItem(item);
IEntity entity = (IEntity) item.getModelObject();
final DomainApp app = (DomainApp) getApplication();
IEntities entities = viewModel.getEntities();
ConceptConfig conceptConfig = entity.getConceptConfig();
// Neighbor display links
List<NeighborNameLabelLinkPair> neighborNameLabelLinkPairs = new ArrayList<NeighborNameLabelLinkPair>();
NeighborsConfig neighborsConfig = conceptConfig.getNeighborsConfig();
for (IEntity neighborConfigEntity : neighborsConfig) {
NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
if (neighborConfig.getType().equals("child")) {
String neighborConcept = neighborConfig.getDestinationConcept();
ConceptConfig neighborConceptConfig = neighborConfig
.getConceptConfig().getModelConfig().getConceptConfig(
neighborConcept);
final String neighborDisplayType = neighborConceptConfig
.getDisplayType();
NeighborNameLabelLinkPair neighborNameLabelLinkPair = new NeighborNameLabelLinkPair();
String neighborName = LocalizedText.getNeighborName(this,
entity, neighborConfig);
Label neighborNameLabel = new Label("neighborName",
neighborName);
neighborNameLabelLinkPair
.setNeighborNameLabel(neighborNameLabel);
Link neighborLink;
DomainModel model = (DomainModel) viewModel.getModel();
IEntities neighborEntities = model.getModelMeta()
.getChildNeighbor(entity, neighborConfig.getCode());
final ViewModel neighborModel = new ViewModel();
neighborModel.copyPropertiesFrom(viewModel);
if (neighborModel.getLookupEntities() != null
&& neighborModel.getLookupEntities().getConceptConfig()
.getCode().equals(
neighborModel.getEntities()
.getConceptConfig().getCode())) {
neighborModel.setLookupEntities(neighborEntities);
} else {
ViewModel contextModel = new ViewModel();
contextModel.copyPropertiesFrom(viewModel);
contextModel.setEntity(entity);
contextModel.setEntities(entities);
neighborModel.setContextViewModel(contextModel);
}
neighborModel.setEntities(neighborEntities);
final View neighborView = new View();
neighborView.copyPropertiesFrom(view);
neighborLink = new PageLink("neighbor", new IPageLink() {
static final long serialVersionUID = 200471L;
WebPage neighborPage;
public Page getPage() {
if (neighborModel.getLookupEntities() != null
&& neighborModel.getLookupEntities()
.getConceptConfig().getCode().equals(
neighborModel.getEntities()
.getConceptConfig()
.getCode())) {
neighborPage = app.getViewMeta(modelCode)
.getLookupPage("EntityLookupTablePage",
neighborModel, neighborView);
} else if (neighborDisplayType.equals("table")) {
neighborPage = app.getViewMeta(modelCode).getPage(
"EntityDisplayTablePage", neighborModel,
neighborView);
} else if (neighborDisplayType.equals("list")) {
neighborPage = app.getViewMeta(modelCode).getPage(
"EntityDisplayListPage", neighborModel,
neighborView);
} else if (neighborDisplayType.equals("slide")) {
neighborPage = app.getViewMeta(modelCode).getPage(
"EntityDisplaySlidePage", neighborModel,
neighborView);
}
return neighborPage;
}
Class neighborPageClass;
public Class getPageIdentity() {
if (neighborDisplayType.equals("table")) {
neighborPageClass = app.getViewMeta(modelCode)
.getPageClass("EntityDisplayTablePage",
neighborModel, neighborView);
} else if (neighborDisplayType.equals("list")) {
neighborPageClass = app.getViewMeta(modelCode)
.getPageClass("EntityDisplayListPage",
neighborModel, neighborView);
} else if (neighborDisplayType.equals("slide")) {
neighborPageClass = app.getViewMeta(modelCode)
.getPageClass("EntityDisplaySlidePage",
neighborModel, neighborView);
}
return neighborPageClass;
}
});
if (!app.getAccessPoint().isNeighborDisplayAllowed(
getAppSession(), neighborConfig)) {
neighborLink.setVisible(false);
}
neighborNameLabelLinkPair.setNeighborLink(neighborLink);
neighborNameLabelLinkPairs.add(neighborNameLabelLinkPair);
} // end if child
} // end for
item.add(new NeighborNameLabelLinkListView("neighborNameLinkListView",
neighborNameLabelLinkPairs));
}
}
|
[
"dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d"
] |
dzenanr@c25eb2fc-9753-11de-83f8-39e71e4dc75d
|
820485aea191faac27bc641aa4355ed1035252d3
|
3cd75211c29d1a4f7e35d23beb68349f903c7067
|
/java/.svn/pristine/82/820485aea191faac27bc641aa4355ed1035252d3.svn-base
|
3c072cbbcb856d091d82472729c1d259f84cbdb2
|
[] |
no_license
|
aszkj/MyProject
|
24f6e5f8febbebf2260fd6f1572921ecec03f643
|
26d4ea640a7ed8d13c900749988ce2ee0ef9cefb
|
refs/heads/master
| 2021-01-20T12:28:00.083434
| 2017-05-06T21:38:07
| 2017-05-06T21:38:07
| 90,360,785
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 982
|
package com.yilidi.o2o.appparam.buyer.user;
import com.yilidi.o2o.appparam.AppBaseParam;
import com.yilidi.o2o.common.annotation.Field;
import com.yilidi.o2o.core.paramvalidate.build.Param;
import com.yilidi.o2o.core.utils.ParamValidateUtils;
/**
* <p>Company:Yilidi</p>
* <p>Title:评论晒图参数</p>
* @author xiasl
* @date 2017年2月9日
*/
public class SaleProductEvaluationImageParam extends AppBaseParam {
private static final long serialVersionUID = 1L;
@Field("评价图片URL")
private String imageUrl;
public void validateParams() {
Param imageUrlValidate = new Param.Builder(getFieldName("imageUrl"), Param.ParamType.STR_NORMAL.getType(), imageUrl,
true).build();
ParamValidateUtils.validateParams(imageUrlValidate);
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
}
|
[
"mm@mmdeMac-mini.local"
] |
mm@mmdeMac-mini.local
|
|
50d150276c8833f78a87e92c428b0a81e1385e5d
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project5/src/test/java/org/gradle/test/performance5_3/Test5_225.java
|
6358e6fdf27f9fdd97cd2af3c32773e8d91612ca
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
package org.gradle.test.performance5_3;
import static org.junit.Assert.*;
public class Test5_225 {
private final Production5_225 production = new Production5_225("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
6a5adb5eaa72815e6ff57f1bfe98275649e8189b
|
72f2ca80eee3562473f287fbc2a701776528cf2b
|
/business-delegate/src/main/java/com/iluwatar/business/delegate/EjbService.java
|
bd03db45dbf51f681e24a35a810baf15efe4de0c
|
[
"MIT"
] |
permissive
|
JalalSordo/java-design-patterns
|
79d8dd1d1401d5a58e9d7c77ca67a8fe9837d8fe
|
6176f134c4b1d4e58d85089f80c21e6715dc2025
|
refs/heads/master
| 2022-12-03T14:07:24.813797
| 2015-09-11T19:56:11
| 2015-09-11T19:56:11
| 42,330,452
| 0
| 1
|
MIT
| 2022-11-24T06:23:32
| 2015-09-11T20:24:50
|
Java
|
UTF-8
|
Java
| false
| false
| 240
|
java
|
package com.iluwatar.business.delegate;
/**
*
* Service EJB implementation
*
*/
public class EjbService implements BusinessService {
@Override
public void doProcessing() {
System.out.println("EjbService is now processing");
}
}
|
[
"iluwatar@gmail.com"
] |
iluwatar@gmail.com
|
8003a1296195b4beeb68eae7a90c29ed44205523
|
4530f4bcef44a828a55b58f156de8d383d9fe8e7
|
/src/main/java/com/redscarf/admin/common/persistence/dialect/HSQLDialect.java
|
b543fbd68ece022897aec9a8f16374f744495ff6
|
[] |
no_license
|
leej0hn/admin-t
|
46961c33483db3c805963f918f86667db7bc9052
|
1d3acf0f19117f9fe5dd59a86687e4c6761d07d2
|
refs/heads/master
| 2020-03-31T21:33:20.914068
| 2018-10-12T04:17:19
| 2018-10-12T04:17:19
| 152,584,942
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,525
|
java
|
package com.redscarf.admin.common.persistence.dialect;
/**
* Dialect for HSQLDB
*
* @version 1.0 2010-10-10 下午12:31
* @since JDK 1.5
*/
public class HSQLDialect implements Dialect {
@Override
public boolean supportsLimit() {
return true;
}
@Override
public String getLimitString(String sql, int offset, int limit) {
return getLimitString(sql, offset, Integer.toString(offset),
Integer.toString(limit));
}
/**
* 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
* <pre>
* 如mysql
* dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
* select * from user limit :offset,:limit
* </pre>
*
* @param sql 实际SQL语句
* @param offset 分页开始纪录条数
* @param offsetPlaceholder 分页开始纪录条数-占位符号
* @param limitPlaceholder 分页纪录条数占位符号
* @return 包含占位符的分页sql
*/
public String getLimitString(String sql, int offset, String offsetPlaceholder, String limitPlaceholder) {
boolean hasOffset = offset > 0;
return
new StringBuffer(sql.length() + 10)
.append(sql)
.insert(sql.toLowerCase().indexOf("select") + 6, hasOffset ? " limit " + offsetPlaceholder + " " + limitPlaceholder : " top " + limitPlaceholder)
.toString();
}
}
|
[
"lidx@communet.io"
] |
lidx@communet.io
|
c7a4e846b2728caaafb2720e01cd33717eb47dcc
|
d148e8ac8cfc81b02b46bd85051ff1fedbc290da
|
/core/src/main/java/org/web3j/codegen/TuplesGenerator.java
|
ff1ca2a4dd61c5cdf03f41d4b37828a4b10d8429
|
[
"Apache-2.0"
] |
permissive
|
guoyu07/web3j
|
570a801a796b224a1b8ed5ec33d6f3309f9148a6
|
f04247a3b5f711da95340b9acc6115095e1e184e
|
refs/heads/master
| 2021-01-25T10:39:29.403905
| 2017-09-14T19:32:37
| 2017-09-14T19:32:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,132
|
java
|
package org.web3j.codegen;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.lang.model.element.Modifier;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeSpec;
import com.squareup.javapoet.TypeVariableName;
import org.web3j.utils.Strings;
/**
* A class for generating arbitrary sized tuples.
*/
public class TuplesGenerator extends Generator {
static final int LIMIT = 20;
static final String PACKAGE_NAME = "org.web3j.utils.tuples.generated";
static final String CLASS_NAME = "Tuple";
private static final String RESULT = "result";
private static final String VALUE = "value";
public static void main(String[] args) throws IOException {
TuplesGenerator tuplesGenerator = new TuplesGenerator();
if (args.length == 1) {
tuplesGenerator.generate(args[0]);
} else {
tuplesGenerator.generate(System.getProperty("user.dir") + "/core/src/main/java/");
}
}
private void generate(String destinationDir) throws IOException {
for (int i = 1; i <= LIMIT; i++) {
TypeSpec typeSpec = createTuple(i);
write(PACKAGE_NAME, typeSpec, destinationDir);
}
}
private TypeSpec createTuple(int size) {
String className = CLASS_NAME + size;
TypeSpec.Builder typeSpecBuilder = TypeSpec.classBuilder(className);
MethodSpec.Builder constructorBuilder = MethodSpec.constructorBuilder()
.addModifiers(Modifier.PUBLIC);
List<MethodSpec> methodSpecs = new ArrayList<>(size);
for (int i = 1; i <= size; i++) {
String value = VALUE + i;
TypeVariableName typeVariableName = TypeVariableName.get("T" + i);
typeSpecBuilder.addTypeVariable(typeVariableName)
.addField(typeVariableName, value, Modifier.PRIVATE, Modifier.FINAL);
constructorBuilder.addParameter(typeVariableName, value)
.addStatement("this.$N = $N", value, value);
MethodSpec getterSpec = MethodSpec.methodBuilder(
"get" + Strings.capitaliseFirstLetter(value))
.addModifiers(Modifier.PUBLIC)
.returns(typeVariableName)
.addStatement("return $N", value)
.build();
methodSpecs.add(getterSpec);
}
MethodSpec constructorSpec = constructorBuilder.build();
MethodSpec equalsSpec = generateEqualsSpec(className, size);
MethodSpec hashCodeSpec = generateHashCodeSpec(size);
MethodSpec toStringSpec = generateToStringSpec(size);
return typeSpecBuilder
.addJavadoc(buildWarning(TuplesGenerator.class))
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addMethod(constructorSpec)
.addMethods(methodSpecs)
.addMethod(equalsSpec)
.addMethod(hashCodeSpec)
.addMethod(toStringSpec)
.build();
}
private MethodSpec generateEqualsSpec(String className, int size) {
MethodSpec.Builder equalsSpecBuilder = MethodSpec.methodBuilder("equals")
.addAnnotation(Override.class)
.addModifiers(Modifier.PUBLIC)
.addParameter(Object.class, "o")
.returns(boolean.class)
.beginControlFlow("if (this == o)")
.addStatement("return true")
.endControlFlow()
.beginControlFlow("if (o == null || getClass() != o.getClass())")
.addStatement("return false")
.endControlFlow();
String typeParams = Strings.repeat('?', size).replaceAll("\\?", "?, ");
typeParams = typeParams.substring(0, typeParams.length() - 2);
String wildcardClassName = className + "<" + typeParams + ">";
String name = "tuple" + size;
equalsSpecBuilder
.addStatement("$L $L = ($L) o", wildcardClassName, name, wildcardClassName);
for (int i = 1; i < size; i++) {
String value = VALUE + i;
equalsSpecBuilder.beginControlFlow(
"if ($L != null ? !$L.equals($L.$L) : $L.$L != null)",
value, value, name, value, name, value)
.addStatement("return false")
.endControlFlow();
}
String lastValue = VALUE + size;
equalsSpecBuilder
.addStatement("return $L != null ? $L.equals($L.$L) : $L.$L == null",
lastValue, lastValue, name, lastValue, name, lastValue);
return equalsSpecBuilder.build();
}
private MethodSpec generateHashCodeSpec(int size) {
MethodSpec.Builder hashCodeSpec = MethodSpec.methodBuilder("hashCode")
.addAnnotation(Override.class)
.addModifiers(Modifier.PUBLIC)
.returns(int.class)
.addStatement("int $L = $L.hashCode()", RESULT, VALUE + 1);
for (int i = 2; i <= size; i++) {
String value = "value" + i;
hashCodeSpec.addStatement(
"$L = 31 * $L + ($L != null ? $L.hashCode() : 0)",
RESULT, RESULT, value, value);
}
hashCodeSpec.addStatement("return $L", RESULT);
return hashCodeSpec.build();
}
private MethodSpec generateToStringSpec(int size) {
String toString = "return \"" + CLASS_NAME + size + "{\" +\n";
String firstValue = VALUE + 1;
toString += "\"" + firstValue + "=\"" + " + " + firstValue + " +\n";
for (int i = 2; i <= size; i++) {
String value = VALUE + i;
toString += "\", " + value + "=\"" + " + " + value + " +\n";
}
toString += "\"}\"";
return MethodSpec.methodBuilder("toString")
.addAnnotation(Override.class)
.addModifiers(Modifier.PUBLIC)
.returns(String.class)
.addStatement(toString)
.build();
}
}
|
[
"conor10@gmail.com"
] |
conor10@gmail.com
|
6886bbc38f511f4d75a066c4e641950aa0b8b8f4
|
6b9ed6079161596039354a92f2d623edd74ab19d
|
/yestonConsole-dao/src/main/java/com/mrbt/cache/RedisDao.java
|
fc061c7c4cb1b7c647e0f10eba4d779a8d869255
|
[] |
no_license
|
daiedaie/yestonConsole
|
985eafc00618e314ef4e6e7a19fb7369c404a335
|
1ab3782431f3d9de383b39ca9a55b75feeee338a
|
refs/heads/master
| 2020-05-01T09:52:41.348604
| 2018-06-15T02:50:18
| 2018-06-15T02:50:18
| 177,409,836
| 3
| 0
| null | 2019-03-24T12:10:58
| 2019-03-24T12:10:58
| null |
UTF-8
|
Java
| false
| false
| 4,335
|
java
|
package com.mrbt.cache;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
* rediscache对外接口 应用程序一致通过此接口调用缓存 此接口对应的缓存实现类为单例类
*/
public interface RedisDao {
boolean expire(String key, Date dt);
/** --------------------->>pojo+string操作<<--------------------- */
boolean set(String key, Object obj); // 添加和更新为同一接口,redis中含key为更新,不含为添加
Object get(String key);
Object incr(String key);
/** --------------------->>list操作<<--------------------- */
boolean setList(String key, List<Object> list);
List<Object> getList(String key);
Long getListSize(String key); // list长度
List<Object> getListByRange(String key, int start, int end); // 按范围索引
boolean setByIndex(String key, long index, Object value); // 按索引赋值
Object getByIndex(String key, long index); // 按索引取值
boolean deleteByIndex(String key, long index, Object value); // 按索引删除(list里数据可重复,所以需要给值)
/** --------------------->>set操作 <<--------------------- */
boolean addSet(String key, Set<Object> set);
Set<Object> getSet(String key);
Long getSetSize(String key);
boolean deleteElement(String key, Object value);
boolean isMemBer(String key, Object value);
/** --------------------->>hashMap操作 <<--------------------- */
boolean putAll(String key, Map<Object, Object> map);
boolean put(String hkey, Object mapKey, Object value);
boolean hincrbyLong(String hkey, Object mapKey, long value);
Map<Object, Object> getMap(String key);
/** --------------------->>zset操作(暂未实现)<<--------------------- */
Object getHashByHGET(String key, String setKey);
boolean setHashByHSET(String key, String setKey, Object obj);
/** --------------------->>sort操作(暂未实现)<<--------------------- */
/**
* 添加到有序队列
*
* @param key
* @param score
* @param member
* @param isDelete
* 是否删除原score分值
* @return
*/
boolean ZAdd(String key, double score, Object member);
/**
* 做排名
*
* @param key
* @param start
* @param end
* @return
*/
List<Object> ZRANGE(String key, long start, long end);
/**
* 按分数倒叙排名
*
* @param key
* @param start
* @param end
* @return
*/
List<Object> ZREVRANGE(String key, long start, long end);
/**
* 根据对象,获取排名
*
* @param key
* 关键字
* @param member
* 对象内容
* @param start_offset
* 开始位置的偏移量
* @param end_offset
* 结束位置的偏移量
* @return
*/
List<Object> ZRANGE_BY_ZRANK(String key, Object member, long start_offset, long end_offset);
/**
* 根据对象获取倒叙排名
*
* @param key
* @param member
* @param start_offset
* @param end_offset
* @return
*/
List<Object> Z_REV_RANGE_BY_ZRANK(String key, Object member, long start_offset, long end_offset);
/**
* 获取对象的排名
*
* @param key
* @param member
* @return
*/
Long ZRANK(String key, Object member);
/**
* 获取对象的倒叙排名
*
* @param key
* @param member
* @return
*/
Long ZREVRANK(final String key, final Object member);
/**
* 按照分数删除有序集合中的数据
*
* @param key
* @param min
* @param max
* @return
*/
boolean ZREMRANGEBYSCORE(String key, long min, long max);
/**
* 正序,根据分数查找对象
*
* @param key
* @return
*/
List<Object> ZRANGEBYSCORE(String key, long min, long max);
/**
* 倒序,根据分数查找对象
*
* @param key
* @return
*/
List<Object> ZREVRANGEBYSCORE(final String key, final long min, final long max);
/** --------------------->>通用操作 <<--------------------- */
// 删除
boolean delete(String key);
// 主键是否存在
boolean hasKey(String key);
// 清空缓存
boolean clear();
public Set findKeys(String pattern);
public boolean expire(String key, long timeout, TimeUnit timeUinit);
public void refreshKeyValueList(String key, List<Object> list);
public boolean setList(String key, Object object);
public Object getListObject(String key);
}
|
[
"252544983@qq.com"
] |
252544983@qq.com
|
5cbf1d3d51d0c8860c492939bb347ca947ce115d
|
7ce370b237e933871e9d1c24aabe674e8e26659b
|
/project/giving-batch/src/generated/com/virginmoneygiving/paymentmanagement/service/messages/SaveTransitionalRlfResponse.java
|
20d790711255f999f90ec925ec54c6906ece8316
|
[] |
no_license
|
ankurmitujjain/virginmoney
|
16c21fb7ba03b70f8fab02f6543e6531c275cfab
|
2355ea70b25ac00c212f8968f072365a53ef0cbc
|
refs/heads/master
| 2020-12-31T04:42:42.191330
| 2009-09-18T06:40:02
| 2009-09-18T06:40:02
| 57,319,348
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,727
|
java
|
package com.virginmoneygiving.paymentmanagement.service.messages;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="transitionalRlf" type="{http://www.virginmoneygiving.com/type/payment-management/}ServiceEntity"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"transitionalRlf"
})
@XmlRootElement(name = "saveTransitionalRlfResponse")
public class SaveTransitionalRlfResponse {
@XmlElement(required = true)
protected ServiceEntity transitionalRlf;
/**
* Gets the value of the transitionalRlf property.
*
* @return
* possible object is
* {@link ServiceEntity }
*
*/
public ServiceEntity getTransitionalRlf() {
return transitionalRlf;
}
/**
* Sets the value of the transitionalRlf property.
*
* @param value
* allowed object is
* {@link ServiceEntity }
*
*/
public void setTransitionalRlf(ServiceEntity value) {
this.transitionalRlf = value;
}
}
|
[
"ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47"
] |
ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47
|
eff4c41d9371f324b0d8ab6b4c48b290dc1d3c0c
|
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
|
/FantastleX/src/com/puttysoftware/fantastlex/maze/objects/WhiteHouse.java
|
0fb9cf6d594833799ce57b911dac90b6f9aee253
|
[
"Unlicense"
] |
permissive
|
retropipes/older-java-games
|
777574e222f30a1dffe7936ed08c8bfeb23a21ba
|
786b0c165d800c49ab9977a34ec17286797c4589
|
refs/heads/master
| 2023-04-12T14:28:25.525259
| 2021-05-15T13:03:54
| 2021-05-15T13:03:54
| 235,693,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,451
|
java
|
/* FantastleX: A Maze/RPG Hybrid Game
Copyright (C) 2008-2010 Eric Ahnell
Any questions should be directed to the author via email at: FantastleX@worldwizard.net
*/
package com.puttysoftware.fantastlex.maze.objects;
import com.puttysoftware.fantastlex.Application;
import com.puttysoftware.fantastlex.FantastleX;
import com.puttysoftware.fantastlex.maze.abc.AbstractTeleportTo;
import com.puttysoftware.fantastlex.maze.utilities.ColorConstants;
import com.puttysoftware.fantastlex.maze.utilities.MazeObjectInventory;
import com.puttysoftware.fantastlex.resourcemanagers.SoundConstants;
import com.puttysoftware.fantastlex.resourcemanagers.SoundManager;
public class WhiteHouse extends AbstractTeleportTo {
// Constructors
public WhiteHouse() {
super(ColorConstants.COLOR_WHITE);
}
// Scriptability
@Override
public void postMoveAction(final boolean ie, final int dirX, final int dirY,
final MazeObjectInventory inv) {
final Application app = FantastleX.getApplication();
SoundManager.playSound(SoundConstants.SOUND_UP);
app.getGameManager().goToLevel(this.getDestinationLevel());
}
@Override
public String getName() {
return "White House";
}
@Override
public String getPluralName() {
return "White Houses";
}
@Override
public String getDescription() {
return "White Houses send you inside when walked on.";
}
}
|
[
"eric.ahnell@puttysoftware.com"
] |
eric.ahnell@puttysoftware.com
|
c394d9d77073a91576c3ecfd9ffdbe59c4b42e33
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/27/org/apache/commons/lang3/builder/HashCodeBuilder_append_807.java
|
a6c07ceb2f78e75fb146455dd4d4174e4e62c08d
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,470
|
java
|
org apach common lang3 builder
assist implement link object hash code hashcod method
enabl good code hash code hashcod code method built rule laid
book href http java sun doc book effect index html effect java joshua bloch write
good code hash code hashcod code method difficult aim simplifi process
approach append data field current total multipli
multipli relev
data type ad current hash code hashcod multipli
append integ creat hashcod
relev field object includ code hash code hashcod code method deriv field
exclud gener field code equal code method code hash code hashcod code
method
write code
pre
person
string
ag
smoker
hash code hashcod
pick hard code randomli chosen odd number
ideal
hash code builder hashcodebuild
append
append ag
append smoker
hash code tohashcod
pre
requir superclass code hash code hashcod code ad link append super appendsup
altern method reflect determin field test field
method code reflect hash code reflectionhashcod code code access object accessibleobject set access setaccess code
chang visibl field fail secur manag permiss
set correctli slower test explicitli
typic invoc method
pre
hash code hashcod
hash code builder hashcodebuild reflect hash code reflectionhashcod
pre
author apach softwar foundat
author gari gregori
author pete gieser
version
hash code builder hashcodebuild builder integ
append code hash code hashcod code code code
param
add code hash code hashcod code
hash code builder hashcodebuild append
total itot total itot constant iconst
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
23034583f4bed49465b14e2a58fb81067f0c8284
|
d5f7c036c7bf22b236bc3c0312a45d276018014b
|
/src/main/java/com/platform/service/ClientService.java
|
f2153f185e3a84c358c1a474cf9e75fa443d2d23
|
[] |
no_license
|
abddibani/testplatform
|
d3962e56fa619e17229ee0ed4a36adb1cfa9a288
|
65913834dd86daf0b2edc80859b865980461ea66
|
refs/heads/main
| 2023-07-05T10:07:03.831338
| 2021-08-04T19:27:15
| 2021-08-04T19:27:15
| 392,803,481
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,790
|
java
|
package com.platform.service;
import com.platform.domain.Client;
import com.platform.repository.ClientRepository;
import com.platform.service.dto.ClientDTO;
import com.platform.service.mapper.ClientMapper;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
/**
* Service Implementation for managing {@link Client}.
*/
@Service
public class ClientService {
private final Logger log = LoggerFactory.getLogger(ClientService.class);
private final ClientRepository clientRepository;
private final ClientMapper clientMapper;
public ClientService(ClientRepository clientRepository, ClientMapper clientMapper) {
this.clientRepository = clientRepository;
this.clientMapper = clientMapper;
}
/**
* Save a client.
*
* @param clientDTO the entity to save.
* @return the persisted entity.
*/
public ClientDTO save(ClientDTO clientDTO) {
log.debug("Request to save Client : {}", clientDTO);
Client client = clientMapper.toEntity(clientDTO);
client = clientRepository.save(client);
return clientMapper.toDto(client);
}
/**
* Partially update a client.
*
* @param clientDTO the entity to update partially.
* @return the persisted entity.
*/
public Optional<ClientDTO> partialUpdate(ClientDTO clientDTO) {
log.debug("Request to partially update Client : {}", clientDTO);
return clientRepository
.findById(clientDTO.getId())
.map(
existingClient -> {
clientMapper.partialUpdate(existingClient, clientDTO);
return existingClient;
}
)
.map(clientRepository::save)
.map(clientMapper::toDto);
}
/**
* Get all the clients.
*
* @return the list of entities.
*/
public List<ClientDTO> findAll() {
log.debug("Request to get all Clients");
return clientRepository.findAll().stream().map(clientMapper::toDto).collect(Collectors.toCollection(LinkedList::new));
}
/**
* Get one client by id.
*
* @param id the id of the entity.
* @return the entity.
*/
public Optional<ClientDTO> findOne(String id) {
log.debug("Request to get Client : {}", id);
return clientRepository.findById(id).map(clientMapper::toDto);
}
/**
* Delete the client by id.
*
* @param id the id of the entity.
*/
public void delete(String id) {
log.debug("Request to delete Client : {}", id);
clientRepository.deleteById(id);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
71f4804c0147e4a7bdfbbe3fde7f3c7564777c42
|
305b993e55ac72d7fd75710893b1a1c54308c7a2
|
/SalesService/src/main/java/com/sales/service/InquireWeixinTokenListService.java
|
be8dee06de0bbdc3390ec5cf599dcbedaa11b71b
|
[] |
no_license
|
nelsonYang/Sales
|
146737c317ea827fc9b5c2377d1dd0cc50a0cfef
|
ab5b45e61f66d4ff397f004a98f7b28979d20fb3
|
refs/heads/master
| 2016-09-06T01:52:31.600479
| 2014-08-17T12:19:06
| 2014-08-17T12:19:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,695
|
java
|
package com.sales.service;
import com.framework.annotation.Field;
import com.framework.annotation.ServiceConfig;
import com.framework.context.ApplicationContext;
import com.framework.entity.condition.Condition;
import com.framework.entity.dao.EntityDao;
import com.framework.enumeration.CryptEnum;
import com.framework.enumeration.FieldTypeEnum;
import com.framework.enumeration.LoginEnum;
import com.framework.enumeration.ParameterWrapperTypeEnum;
import com.framework.enumeration.ResponseTypeEnum;
import com.framework.enumeration.TerminalTypeEnum;
import com.framework.exception.RollBackException;
import com.framework.service.api.Service;
import com.frameworkLog.factory.LogFactory;
import com.sales.entity.EntityNames;
import com.sales.entity.WeixinToken;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
/**
*
* @author nelson
*/
@ServiceConfig(
act = ActionNames.inquireWeixinTokenList,
importantParameters = {"session", "encryptType"},
requestEncrypt = CryptEnum.AES,
parametersWrapperType = ParameterWrapperTypeEnum.SIMPLE_MAP,
responseEncrypt = CryptEnum.AES,
responseType = ResponseTypeEnum.ENTITY_LIST_JSON,
terminalType = TerminalTypeEnum.WEB,
requireLogin = LoginEnum.REQUIRE,
returnParameters = {"tokenId","appId","appSecret","accessToken","expireTime","companyId","weixinNO","weixinEmail","weixinDevAPI","validateToken"},
description = "查询WeixinToken配置",
validateParameters = {
@Field(fieldName = "session", fieldType = FieldTypeEnum.CHAR1024, description = "session信息"),
@Field(fieldName = "encryptType", fieldType = FieldTypeEnum.TYINT, description = "加密类型")
})
public class InquireWeixinTokenListService implements Service {
private Logger logger = LogFactory.getInstance().getLogger(InquireWeixinTokenListService.class);
public void execute() {
ApplicationContext applicationContext = ApplicationContext.CTX;
Map<String, String> parameters = applicationContext.getSimpleMapParameters();
logger.debug("parameters={}", parameters);
EntityDao<WeixinToken> entityDAO = applicationContext.getEntityDAO(EntityNames.weixinToken);
List<Condition> conditionList = new ArrayList<Condition>(0);
List<WeixinToken> entityList = entityDAO.inquireByCondition(conditionList);
if (entityList != null) {
applicationContext.setEntityList(entityList);
applicationContext.success();
} else {
throw new RollBackException("操作失败");
}
}
}
|
[
"nelson@nelson-Ideapad-Z460.(none)"
] |
nelson@nelson-Ideapad-Z460.(none)
|
b757220c1213c5b4d17371c1cfc900f3bdc300c9
|
342878f884bbeec25a9dae6be3c9b2dd84a95b04
|
/src/main/java/de/gedoplan/showcase/health/ReadinessCheck.java
|
fe2d0a94bb23cd801b0a3e37ee04575331c25093
|
[] |
no_license
|
GEDOPLAN/microprofile-demo
|
7d43797ddcaf89f8bb640d0aabaf80f9b4dfba78
|
1893aad6e9917f2ba61886a445c18ff38127199d
|
refs/heads/develop
| 2022-12-21T05:05:46.380618
| 2022-12-14T10:22:56
| 2022-12-14T10:22:56
| 203,173,771
| 0
| 1
| null | 2022-07-06T11:06:22
| 2019-08-19T13:00:55
|
Java
|
UTF-8
|
Java
| false
| false
| 699
|
java
|
package de.gedoplan.showcase.health;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Readiness;
@Readiness
@ApplicationScoped
public class ReadinessCheck implements HealthCheck {
@Inject
SimulatedReadinessService simulatedReadinessService;
@Override
public HealthCheckResponse call() {
return HealthCheckResponse
.named("SimulatedReadiness")
.status(this.simulatedReadinessService.isReady())
.withData("freeMemory", Runtime.getRuntime().freeMemory())
.build();
}
}
|
[
"dirk.weil@gedoplan.de"
] |
dirk.weil@gedoplan.de
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.