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
417c982ba55b156d49f8ccacd68dde33751ed0b2
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--druid/abad78e4a3b8ecf939fa40fdbd437ebc538be25c/before/SQLUnionQuery.java
09a0f669e314455c6617f41b26ebcc6f841a0c40
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,739
java
/* * Copyright 1999-2017 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.sql.ast.statement; import com.alibaba.druid.sql.ast.SQLLimit; import com.alibaba.druid.sql.ast.SQLObjectImpl; import com.alibaba.druid.sql.ast.SQLOrderBy; import com.alibaba.druid.sql.visitor.SQLASTVisitor; public class SQLUnionQuery extends SQLObjectImpl implements SQLSelectQuery { private boolean bracket = false; private SQLSelectQuery left; private SQLSelectQuery right; private SQLUnionOperator operator = SQLUnionOperator.UNION; private SQLOrderBy orderBy; private SQLLimit limit; public SQLUnionOperator getOperator() { return operator; } public void setOperator(SQLUnionOperator operator) { this.operator = operator; } public SQLUnionQuery(){ } public SQLUnionQuery(SQLSelectQuery left, SQLUnionOperator operator, SQLSelectQuery right){ this.setLeft(left); this.operator = operator; this.setRight(right); } public SQLSelectQuery getLeft() { return left; } public void setLeft(SQLSelectQuery left) { if (left != null) { left.setParent(this); } this.left = left; } public SQLSelectQuery getRight() { return right; } public void setRight(SQLSelectQuery right) { if (right != null) { right.setParent(this); } this.right = right; } public SQLOrderBy getOrderBy() { return orderBy; } public void setOrderBy(SQLOrderBy orderBy) { if (orderBy != null) { orderBy.setParent(this); } this.orderBy = orderBy; } @Override protected void accept0(SQLASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, left); acceptChild(visitor, right); acceptChild(visitor, orderBy); acceptChild(visitor, limit); } visitor.endVisit(this); } public SQLLimit getLimit() { return limit; } public void setLimit(SQLLimit limit) { if (limit != null) { limit.setParent(this); } this.limit = limit; } public boolean isBracket() { return bracket; } public void setBracket(boolean bracket) { this.bracket = bracket; } public SQLUnionQuery clone() { SQLUnionQuery x = new SQLUnionQuery(); x.bracket = bracket; if (left != null) { x.setLeft(left.clone()); } if (right != null) { x.setRight(right.clone()); } x.operator = operator; if (orderBy != null) { x.setOrderBy(orderBy.clone()); } if (limit != null) { x.setLimit(limit.clone()); } return x; } public SQLSelectQueryBlock getFirstQueryBlock() { if (left instanceof SQLSelectQueryBlock) { return (SQLSelectQueryBlock) left; } if (left instanceof SQLUnionQuery) { return ((SQLUnionQuery) left).getFirstQueryBlock(); } return null; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
8cea12be5a34554f2a2689dddf8a1a3a9cd33c96
fee80e730c0a9d2ede2721d4441970bafaaaa646
/src/org/ace/insurance/system/common/initial/Initial.java
de29b70df94b4c2e804936e39e79318474692b21
[]
no_license
LifeTeam-TAT/GGLI-Core
242360ba9a6dd7cb3841fa495f9124a327df8450
d000f3068b863a581775f5cd7b78b2bfd06b378f
refs/heads/master
2023-03-29T06:26:44.456523
2021-04-02T15:03:18
2021-04-02T15:03:18
354,049,682
0
0
null
null
null
null
UTF-8
Java
false
false
3,204
java
package org.ace.insurance.system.common.initial; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.TableGenerator; import javax.persistence.Transient; import javax.persistence.Version; import org.ace.insurance.common.TableName; import org.ace.java.component.FormatID; @Entity @Table(name=TableName.INITIAL) @TableGenerator(name = "INITIAL_GEN", table = "ID_GEN", pkColumnName = "GEN_NAME", valueColumnName = "GEN_VAL", pkColumnValue = "INITIAL_GEN", allocationSize = 10) @NamedQueries(value = { @NamedQuery(name = "Initial.findAll", query = "SELECT i FROM Initial i ORDER BY i.name ASC"), @NamedQuery(name = "Initial.findById", query = "SELECT i FROM Initial i WHERE i.id = :id") }) @Access(value = AccessType.FIELD) public class Initial { @Transient private String id; @Transient private String prefix; private String name; private String description; @Version private int version; public Initial(){ } @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "CITY_GEN") @Access(value = AccessType.PROPERTY) public String getId() { return id; } public void setId(String id) { if (id != null) { this.id = FormatID.formatId(id, getPrefix(), 10); } } public String getPrefix() { return prefix; } public void setPrefix(String prefix) { this.prefix = prefix; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public int getVersion() { return version; } public void setVersion(int version) { this.version = version; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((prefix == null) ? 0 : prefix.hashCode()); result = prime * result + version; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Initial other = (Initial) obj; if (description == null) { if (other.description != null) return false; } else if (!description.equals(other.description)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (prefix == null) { if (other.prefix != null) return false; } else if (!prefix.equals(other.prefix)) return false; if (version != other.version) return false; return true; } }
[ "lifeteam.tat@gmail.com" ]
lifeteam.tat@gmail.com
450991f2d00c1dce776f72bb02c6169839283ae0
ef64281d7925f68f644f62bce404539e8a500b4c
/impl/src/test/java/com/github/osvaldopina/linkbuilder/hal/annotation/linkcreator/embedded/propertyreader/EmbeddedBeanPropertyReaderDiscoverTest.java
3ed0d80a94bde2302b09468d2ccfa098a540f6d4
[]
no_license
osvaldopina/linkbuilder
1f454a422e9953879e6728cc11f85e22c0d204be
6e30709eaa36607782dfec27612212b09a98dd41
refs/heads/master
2020-05-21T04:17:44.901078
2017-03-29T00:25:16
2017-03-29T00:25:16
49,434,452
10
2
null
null
null
null
UTF-8
Java
false
false
2,601
java
package com.github.osvaldopina.linkbuilder.hal.annotation.linkcreator.embedded.propertyreader; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.*; import static org.hamcrest.Matchers.*; import java.lang.reflect.Method; import java.util.Arrays; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Before; import org.junit.Test; public class EmbeddedBeanPropertyReaderDiscoverTest { private EmbeddedBeanPropertyReaderDiscover embeddedBeanPropertyReaderDiscover; private ObjectMapper mapper; private Method embeddedMethod = HalResourceWithEmbeddedBean.class.getMethod("getEmbeddedProperty"); private Method embeddedFirstEmbeddedMethod = EmbeddedBean.class.getMethod("getFirstEmbedded"); private Method embeddedSecondEmbeddedMethod = EmbeddedBean.class.getMethod("getSecondEmbedded"); public EmbeddedBeanPropertyReaderDiscoverTest() throws Exception { } @Before public void setUp() { embeddedBeanPropertyReaderDiscover = new EmbeddedBeanPropertyReaderDiscover(); mapper = new ObjectMapper(); } @Test public void getReaderMethodForHalResourceWithEmbedded() throws Exception { List<MethodChain> readerMethodChains = embeddedBeanPropertyReaderDiscover. getReaderMethodChains(mapper, HalResourceWithEmbeddedBean.class); assertThat(readerMethodChains, is(notNullValue())); assertThat(readerMethodChains, hasSize(2)); assertThat(readerMethodChains, containsInAnyOrder( new MethodChain(Arrays.asList(embeddedMethod, embeddedFirstEmbeddedMethod)), new MethodChain(Arrays.asList(embeddedMethod, embeddedSecondEmbeddedMethod)))); } @Test public void getReaderMethodForHalResourceWithoutEmbedded() throws Exception { List<MethodChain> readerMethodChains = embeddedBeanPropertyReaderDiscover. getReaderMethodChains(mapper, HalResourceWithoutEmbedded.class); assertThat(readerMethodChains, is(notNullValue())); assertThat(readerMethodChains, hasSize(0)); } public static class HalResourceWithEmbeddedBean { @JsonProperty("_embedded") public EmbeddedBean getEmbeddedProperty() { return null; } } public static class EmbeddedBean { public Object getFirstEmbedded() { return null; } public Object getSecondEmbedded() { return null; } } public static class HalResourceWithoutEmbedded { public Object getEmbeddedProperty() { return null; } } }
[ "osvaldo.pina@gmail.com" ]
osvaldo.pina@gmail.com
f13b599727815e2041d02d275b87ccbabf8db30e
038dca6eda5e8c57d9b879953efe1ef31c4c2a96
/org.bndtools.templates.osgi/resources/templates/api/$srcDir$/$basePackageDir$/ExampleConsumerInterface.java
c400eec0a2a2118dbad4efce5e07a13733c101bd
[ "EPL-2.0", "Apache-2.0" ]
permissive
stbischof/bnd
2763deba24c181b953deb59939a2bb291624e440
5b97818df2538313ffe15e373c01d8ddcf6308a5
refs/heads/master
2023-02-22T20:47:16.048320
2022-03-09T14:52:17
2022-04-29T15:23:18
141,993,619
0
0
Apache-2.0
2018-07-23T09:39:33
2018-07-23T09:39:33
null
UTF-8
Java
false
false
500
java
package $basePackageName$; import org.osgi.annotation.versioning.ConsumerType; /** * <p> * This is an example of an interface that is expected to be implemented by Consumers of the API; for example this * interface may define a listener or a callback. Adding methods to this interface is a MAJOR change, because ALL * clients are affected. * </p> * * @see ConsumerType * @since 1.0 */ @ConsumerType public interface ExampleConsumerInterface { // TODO: interface provided by template }
[ "njbartlett@gmail.com" ]
njbartlett@gmail.com
1f105b866b423e223989eb77e2e1c7cb8588c929
8160730dbfc837ba0f5882743c84e5ec22756879
/cloudnet-modules/cloudnet-bridge/src/main/java/de/dytanic/cloudnet/ext/bridge/event/BridgeServerPlayerLoginSuccessEvent.java
d61354a0ecbf633259b2925985105f14c952dec1
[]
no_license
derrop/CloudNet-v3
60198fdbade1e6a532650811f61e3e939f326163
754a196b07efb2a4b8574001b996d9e0a133f30c
refs/heads/master
2020-07-25T23:00:44.559269
2019-06-21T12:28:55
2019-06-21T12:29:54
208,450,593
0
0
null
2019-12-22T12:40:04
2019-09-14T14:17:37
null
UTF-8
Java
false
false
551
java
package de.dytanic.cloudnet.ext.bridge.event; import de.dytanic.cloudnet.driver.event.events.DriverEvent; import de.dytanic.cloudnet.ext.bridge.player.NetworkConnectionInfo; import de.dytanic.cloudnet.ext.bridge.player.NetworkPlayerServerInfo; import lombok.Getter; import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor public final class BridgeServerPlayerLoginSuccessEvent extends DriverEvent { private final NetworkConnectionInfo networkConnectionInfo; private final NetworkPlayerServerInfo networkPlayerServerInfo; }
[ "tarekhosni1410@hotmail.com" ]
tarekhosni1410@hotmail.com
0760638bcd448a237d86e574ad17859509e6cc08
916bd8c702649d682d074aea6f653c0c2fddb7c8
/src/main/java/com/lucifer/service/MemberLoginService.java
8a1bb6db65db82ad40cd52457d5ae428eeda7703
[]
no_license
liufeng45gh/t-mf
11c4016eec13d50e3a1f15966e9cae3d4855a1b4
a212c042aa1f71310e57760b41ed715e5971aeda
refs/heads/master
2021-09-08T16:09:30.268274
2018-03-11T04:40:36
2018-03-11T04:40:36
119,265,173
0
0
null
null
null
null
UTF-8
Java
false
false
2,456
java
package com.lucifer.service; import com.lucifer.mapper.shop.MemberMapper; import com.lucifer.model.Member; import com.lucifer.utils.*; import org.apache.commons.lang.RandomStringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; @Service public class MemberLoginService { Logger logger = LoggerFactory.getLogger(this.getClass()); @Resource private MemberMapper memberMapper; @Autowired private RedisTemplate redisTemplate; /** * 手机号登录 * @param phone * @param password * @return * @throws Exception */ public Result loginByPhone(String phone, String password){ Member dbUser = memberMapper.getMemberByPhone(phone); if (null == dbUser) { return Result.fail("用户未找到"); } String md5Password = Md5Utils.md5(Md5Utils.md5(password)+dbUser.getSalt()); if (!md5Password.equals(dbUser.getPassword())) { return Result.fail("密码错误"); } String token = this.newUserLoginToken(dbUser.getId()); return this.loginSuccess(dbUser,token); } public String newUserLoginToken(Long memberId){ String token = RandomStringUtils.randomAlphanumeric(20); redisTemplate.opsForValue().set(Constant.CACHE_KEY_PERSISTENCE_TOKEN_PRE+token,memberId); redisTemplate.expire(Constant.CACHE_KEY_PERSISTENCE_TOKEN_PRE+token,Constant.LOGIN_TIME_OUT, TimeUnit.SECONDS); return token; } public Long getMemberIdByToken(String token){ Long memberId = (Long)redisTemplate.opsForValue().get(Constant.CACHE_KEY_PERSISTENCE_TOKEN_PRE+token); return memberId; } public Member getMemberByToken(String token){ Long memberId = (Long)redisTemplate.opsForValue().get(Constant.CACHE_KEY_PERSISTENCE_TOKEN_PRE+token); if (null == memberId) { return null; } return memberMapper.getMemberById(memberId); } /** * 返回token * @param user * @return */ public Result loginSuccess(Member user, String token){ Map resultMap = new HashMap(); resultMap.put("user", user); resultMap.put("token", token); user.setPassword(null); return Result.ok(resultMap); } public void logout(String token){ redisTemplate.delete(Constant.CACHE_KEY_PERSISTENCE_TOKEN_PRE+token); } }
[ "liufeng45gh@163.com" ]
liufeng45gh@163.com
d4770c8d27c460c2122c0ba78665d4f274db861e
93052b7e807dd3d4e0e4bb0ce31f6bcfe0a14638
/chapter2/src/main/java/com/smart/chapter2/command/package-info.java
0b56e8ac347a545f295160f6cd6afa7b2969cb04
[]
no_license
niuzh/java-spring4.x
7fa5ebcb6687c6bf8abff0c2b8a21220dd75603f
9dbab7972733219fbf3dc21bb249dc616989248f
refs/heads/master
2020-03-28T00:44:51.899503
2018-12-29T06:20:44
2018-12-29T06:20:44
147,446,216
0
0
null
null
null
null
UTF-8
Java
false
false
235
java
/** * 用途:收集前端请求参数对象,如 form表单提交和查询参数 * 规则: * 类名称:以Command结尾,如收集登陆信息类 LoginCommand * @author niu 2018-09-04 */ package com.smart.chapter2.command;
[ "zhihuan.niu@funi.com" ]
zhihuan.niu@funi.com
76129f77f4b7fbcc20a4ebd47cf68fc1aa0c81ea
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/dataset/t2/615_frag1.java
db3dd62150a2cabe1832bd3a17a4cd801c6e7786
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
2,117
java
if ("grantor".equals(pColumn)) { fComparator = new StringComparator(); String[] temp = new String[fTableData.length]; for (int i = 0; i < temp.length; i++) { temp[i] = fTableData[i].getGrantor(); } sort(temp, 0, temp.length - 1, up); } if ("grantee".equals(pColumn)) { fComparator = new StringComparator(); String[] temp = new String[fTableData.length]; for (int i = 0; i < temp.length; i++) { temp[i] = fTableData[i].getGrantee(); } sort(temp, 0, temp.length - 1, up); } if ("specificCatalog".equals(pColumn)) { fComparator = new StringComparator(); String[] temp = new String[fTableData.length]; for (int i = 0; i < temp.length; i++) { temp[i] = fTableData[i].getSpecificCatalog(); } sort(temp, 0, temp.length - 1, up); } if ("specificSchema".equals(pColumn)) { fComparator = new StringComparator(); String[] temp = new String[fTableData.length]; for (int i = 0; i < temp.length; i++) { temp[i] = fTableData[i].getSpecificSchema(); } sort(temp, 0, temp.length - 1, up); } if ("specificName".equals(pColumn)) { fComparator = new StringComparator(); String[] temp = new String[fTableData.length]; for (int i = 0; i < temp.length; i++) { temp[i] = fTableData[i].getSpecificName(); } sort(temp, 0, temp.length - 1, up); } if ("routineCatalog".equals(pColumn)) { fComparator = new StringComparator(); String[] temp = new String[fTableData.length]; for (int i = 0; i < temp.length; i++) { temp[i] = fTableData[i].getRoutineCatalog(); } sort(temp, 0, temp.length - 1, up); } if ("routineSchema".equals(pColumn)) {
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
30973f1985d38ae60a6cd44446046e9b951c2049
46167791cbfeebc8d3ddc97112764d7947fffa22
/quarkus/src/main/java/com/justexample/entity/Entity1788.java
4134a826bf5294c1f7e19b9380f392a5c0d2419e
[]
no_license
kahlai/unrealistictest
4f668b4822a25b4c1f06c6b543a26506bb1f8870
fe30034b05f5aacd0ef69523479ae721e234995c
refs/heads/master
2023-08-25T09:32:16.059555
2021-11-09T08:17:22
2021-11-09T08:17:22
425,726,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,130
java
package com.example.entity; import java.sql.Timestamp; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Entity1788 { @Id private Long id; private String code; private String name; private String status; private int seq; private Timestamp createdDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public Timestamp getCreatedDate() { return createdDate; } public void setCreatedDate(Timestamp createdDate) { this.createdDate = createdDate; } }
[ "laikahhoe@gmail.com" ]
laikahhoe@gmail.com
303cfe40f6808aea2c3676f672f67d65394643c5
755dee6177acba73a023b63a2aaa086e3e57b44a
/src/main/java/ru/job4j/tracker/TrackerSingleEager.java
6d53024d21a0d5108d56969e1491f76550ccc944
[]
no_license
iudini/job4j_tracker
f21ef7d8b5b691b7c4328bb508698b1179b9c8a0
d4d58a85416f9c8d141b45ab9c2c8d5660e31b0e
refs/heads/master
2023-07-24T09:43:54.617188
2021-09-06T12:20:59
2021-09-06T12:20:59
299,257,322
0
0
null
2020-09-28T09:25:52
2020-09-28T09:25:51
null
UTF-8
Java
false
false
247
java
package ru.job4j.tracker; public class TrackerSingleEager { private static final MemTracker INSTANCE = new MemTracker(); private TrackerSingleEager() { } public static MemTracker getInstance() { return INSTANCE; } }
[ "hoiitzx@gmail.com" ]
hoiitzx@gmail.com
c2dee7f7fe327094372c15e421e4f0f1348a4190
6f0b1c6af160b0a326594fe86b7976f918ee5ece
/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/api/mobile/model/PatientAttribute.java
8325f2adb69c1334b4281d5ed8732a32dd0c9cd8
[ "BSD-3-Clause" ]
permissive
steffeli/inf5750-tracker-capture
9132261928e43099b2a3ad58344dd1efdab3ad83
1666418b71d124b37770a3ccc8d4f1215be5a29e
refs/heads/master
2021-01-22T00:09:55.665406
2015-12-08T14:54:19
2015-12-08T14:54:19
46,442,738
0
1
null
2016-03-09T16:58:25
2015-11-18T19:40:12
Java
UTF-8
Java
false
false
7,916
java
package org.hisp.dhis.api.mobile.model; /* * Copyright (c) 2004-2015, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import javax.xml.bind.annotation.XmlAttribute; import org.hisp.dhis.common.ValueType; public class PatientAttribute implements DataStreamSerializable { private String clientVersion; private String name; private String value; private String type; private boolean isMandatory; private boolean isDisplayedInList = false; private OptionSet optionSet; public static final String TYPE_STRING = "string"; public static final String TYPE_PHONE_NUMBER = "phoneNumber"; public static final String TYPE_EMAIL = "email"; public static final String TYPE_NUMBER = "number"; public static final String TYPE_LETTER = "letter"; public static final String TYPE_BOOL = "bool"; public static final String TYPE_TRUE_ONLY = "trueOnly"; public static final String TYPE_DATE = "date"; public static final String TYPE_TRACKER_ASSOCIATE = "trackerAssociate"; public static final String TYPE_USERS = "users"; // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- public PatientAttribute( String name, String value, String type, boolean isMandatory, boolean isDisplayedInList, OptionSet optionSet ) { this.name = name; this.value = value; this.type = type; this.isMandatory = isMandatory; this.isDisplayedInList = isDisplayedInList; this.optionSet = optionSet; } public PatientAttribute() { } // ------------------------------------------------------------------------- // Gettes && Setters // ------------------------------------------------------------------------- @XmlAttribute public String getName() { return name; } public void setName( String name ) { this.name = name; } @XmlAttribute public String getValue() { return value; } public void setValue( String value ) { this.value = value; } public String getClientVersion() { return clientVersion; } public void setClientVersion( String clientVersion ) { this.clientVersion = clientVersion; } public String getType() { return type; } public void setType( String type ) { this.type = type; } public void setType( ValueType type ) { if ( type == ValueType.BOOLEAN ) { this.setType( TYPE_BOOL ); } else if ( type == ValueType.DATE || type == ValueType.DATETIME ) { this.setType( TYPE_DATE ); } else if ( type == ValueType.EMAIL ) { this.setType( TYPE_EMAIL ); } else if ( type == ValueType.INTEGER || type == ValueType.NUMBER ) { this.setType( TYPE_NUMBER ); } else if ( type == ValueType.LETTER ) { this.setType( TYPE_LETTER ); } else if ( type == ValueType.LONG_TEXT ) { this.setType( TYPE_STRING ); } else if ( type == ValueType.PHONE_NUMBER ) { this.setType( TYPE_PHONE_NUMBER ); } else if ( type == ValueType.TRACKER_ASSOCIATE ) { this.setType( TYPE_TRACKER_ASSOCIATE ); } else if ( type == ValueType.TRUE_ONLY ) { this.setType( TYPE_TRUE_ONLY ); } else if ( type == ValueType.USERNAME ) { this.setType( TYPE_USERS ); } else { this.setType( TYPE_STRING ); } } public OptionSet getOptionSet() { return optionSet; } public void setOptionSet( OptionSet optionSet ) { this.optionSet = optionSet; } public boolean isMandatory() { return isMandatory; } public void setMandatory( boolean isMandatory ) { this.isMandatory = isMandatory; } public boolean isDisplayedInList() { return isDisplayedInList; } public void setDisplayedInList( boolean isDisplayedInList ) { this.isDisplayedInList = isDisplayedInList; } @Override public void serialize( DataOutputStream dout ) throws IOException { dout.writeUTF( this.name ); dout.writeUTF( this.value ); dout.writeUTF( this.type ); dout.writeBoolean( this.isMandatory ); dout.writeBoolean( this.isDisplayedInList ); int optionSize = (this.optionSet == null || this.optionSet.getOptions() == null) ? 0 : this.optionSet .getOptions().size(); dout.writeInt( optionSize ); if ( optionSize > 0 ) { optionSet.serialize( dout ); } } @Override public void deSerialize( DataInputStream dataInputStream ) throws IOException { name = dataInputStream.readUTF(); value = dataInputStream.readUTF(); type = dataInputStream.readUTF(); isMandatory = dataInputStream.readBoolean(); isDisplayedInList = dataInputStream.readBoolean(); int optionSize = dataInputStream.readInt(); if ( optionSize > 0 ) { optionSet = new OptionSet(); optionSet.deSerialize( dataInputStream ); } } @Override public void serializeVersion2_8( DataOutputStream dout ) throws IOException { dout.writeUTF( this.name ); dout.writeUTF( this.value ); } @Override public void serializeVersion2_9( DataOutputStream dataOutputStream ) throws IOException { // TODO Auto-generated method stub } @Override public void serializeVersion2_10( DataOutputStream dataOutputStream ) throws IOException { // TODO Auto-generated method stub } }
[ "steffen.lien@mimedi.no" ]
steffen.lien@mimedi.no
57e72eafde2004d1eaab818999961dcf28ad8cb4
2aba653cb6c155dfea82e9fd3dfe0c3de370a653
/TNB_Doctor_v1.1.3/TNB_Doctor/src/com/comvee/tnb/model/QuestionItemInfo.java
88a1d92dd62260b6ad7bd6c86252c9b271cc3894
[ "Apache-2.0" ]
permissive
MoMoWait/Doctor
bf5a964a9e251214cbe491b79f563560ca7851df
357c769c914d25df4014f349adcd5403ecdf9d5b
refs/heads/master
2021-01-17T19:23:24.953268
2016-05-28T09:29:19
2016-05-28T09:29:19
59,886,530
0
2
null
null
null
null
UTF-8
Java
false
false
198
java
package com.comvee.tnb.model; public class QuestionItemInfo { public String qid ; public int tie ; public String itemId; public String item; public String value;//|隔开 public int jump; }
[ "1432220483@qq.com" ]
1432220483@qq.com
374b868e44e054a02c23bf23a2dcbb1add101c96
840a2793dcb6cad4cd9541e572c984123ef99ae2
/NewVersion/app/src/main/java/dingw/com/newversion/developkit/AutoBindUnbind.java
7904419396cfa1a0b763c9f4a5e5730ce9b2fd87
[]
no_license
kimonic/NewVersion1
9eea5db895c12f92be3e662911e5934fed694f65
99854a892067241c4e242bf101b987470ae7ade3
refs/heads/master
2021-01-20T09:06:37.686748
2017-05-22T10:04:24
2017-05-22T10:04:24
90,218,871
0
0
null
null
null
null
UTF-8
Java
false
false
2,488
java
package dingw.com.newversion.developkit; import android.content.Context; import android.provider.Settings; import android.util.Log; import com.github.lazylibrary.util.AppUtils; import java.util.HashMap; import java.util.Map; import dingw.com.newversion.bean.LoginBean; import dingw.com.newversion.constant.Constant; import dingw.com.newversion.http.LoginHttp; import dingw.com.newversion.utils.MD5Utils; import dingw.com.newversion.utils.SaveUtils; /** * Created by 12348 on 2017/4/15 0015. * 辅助自动绑定解绑设备 */ public class AutoBindUnbind { private Context context; private LoginHttp loginHttp; private LoginHttp.LoginListener listener; private Map<String, String> map; public AutoBindUnbind(Context context) { this.context = context; } public void bindDevice() { initData(); loginHttp = new LoginHttp(listener, context); loginHttp.senLoginRequest(Constant.NEWBASEURL + Constant.BIND_URL, map, 2); } public void unBindDevice() { initData(); loginHttp = new LoginHttp(listener, context); loginHttp.senLoginRequest(Constant.NEWBASEURL + Constant.UNBIND_URL, map, 1); } public void initData() { map = new HashMap<String, String>(); String android= Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); String pwdmd5 = MD5Utils.md5("123456"); map.put("mac_address",android);//输入参数唯一标识 // map.put("mac_address", "14ce44b74b6cc651");//输入参数唯一标识 map.put("pwd", pwdmd5); map.put("license", "123456789456789");//输入参数职业证号 map.put("name", "李五");//输入参数姓名 map.put("device_token", "Android"); map.put("imei", "1212121"); map.put("device_version", "" + AppUtils.getSDKVersion()); listener = new LoginHttp.LoginListener() { @Override public void loginInfo(LoginBean bean) { } }; Log.e("TAG", "initData: ---"+ android); saveInfo(pwdmd5); } /** * 存储输入信息 */ private void saveInfo(String pwd) { SaveUtils saveLoginInfo = new SaveUtils(context, "userinfo"); saveLoginInfo.saveInfo(map); // saveLoginInfo.setZhiyezhenghao("123456789456789"); // saveLoginInfo.setName("李五"); // saveLoginInfo.setPassword(pwd); // saveLoginInfo.saveInfo(); } }
[ "123456" ]
123456
84651baa097087a34785dee958ef923a6f01fcd9
689122c07e37289dee9d29ce13b4f88d626f3fb6
/src/test/java/com/jcabi/github/package-info.java
bbedea2c95d37ab6292ab8df23a7ddbd983df3a9
[ "BSD-2-Clause" ]
permissive
andrescandal/jcabi-github
46aa37148cd7d9b36e4d26cdac6824014a33a9de
eae73a97cc0a02d194fcf85175f32ae8fc5dfd9d
refs/heads/master
2021-01-21T19:40:18.896679
2014-02-17T04:11:44
2014-02-17T04:11:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,713
java
/** * Copyright (c) 2012-2013, JCabi.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: 1) Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. 2) Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. 3) Neither the name of the jcabi.com nor * the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * Object Oriented Github API, tests. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id$ * @since 0.1 */ package com.jcabi.github;
[ "yegor@tpc2.com" ]
yegor@tpc2.com
41aef0b06cae158fd821c7f835f1a969f7540420
1e109337f4a2de0d7f9a33f11f029552617e7d2e
/jcatapult-mvc/tags/1.0-RC6/src/java/main/org/jcatapult/mvc/result/form/control/Textarea.java
4df6e90d40801490174e73006bc9f3bc339ff23e
[]
no_license
Letractively/jcatapult
54fb8acb193bc251e5984c80eba997793844059f
f903b78ce32cc5468e48cd7fde220185b2deecb6
refs/heads/master
2021-01-10T16:54:58.441959
2011-12-29T00:43:26
2011-12-29T00:43:26
45,956,606
0
0
null
null
null
null
UTF-8
Java
false
false
2,632
java
/* * Copyright (c) 2001-2007, JCatapult.org, All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ package org.jcatapult.mvc.result.form.control; import java.util.Map; import org.jcatapult.mvc.parameter.el.ExpressionEvaluator; import com.google.inject.Inject; /** * <p> * This class is the control for a input textarea. * </p> * * @author Brian Pontarelli */ public class Textarea extends AbstractInput { private final ExpressionEvaluator expressionEvaluator; @Inject public Textarea(ExpressionEvaluator expressionEvaluator) { super(true); this.expressionEvaluator = expressionEvaluator; } /** * Adds a String attribute named <strong>value</strong> by pulling the value associated with the * control. However, if there is already a value attribute, it is always used. Likewise, if the * value attribute is missing, the value associated with the control is null and there is a * <strong>defaultValue</strong> attribute, it is used. * * @param attributes The value String is put into this Map. * @param dynamicAttributes The dynamic attributes from the tag. Dynamic attributes start with * an underscore. */ protected void addAdditionalAttributes(Map<String, Object> attributes, Map<String, String> dynamicAttributes) { // Call super to handle the ID super.addAdditionalAttributes(attributes, dynamicAttributes); String name = (String) attributes.get("name"); Object action = actionInvocation.action(); String value; if (!attributes.containsKey("value") && action != null) { value = expressionEvaluator.getValue(name, action, dynamicAttributes); if (value == null) { value = (String) attributes.get("defaultValue"); } if (value != null) { attributes.put("value", value); } } attributes.remove("defaultValue"); } /** * @return text.ftl */ protected String endTemplateName() { return "textarea.ftl"; } }
[ "bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7" ]
bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7
ab674df991cd957c08ba7cdcd9db2f8ead3e908e
de5ff7f64606f70a78055d465884e7176bf6776a
/src/org/h2/command/dml/Delete.java
00d04b9922e363799258968b02d3440df7e02f4d
[]
no_license
yangls06/H2-Research
ed3854326433417838cdb41d32571089833b8a5e
c5cdb90aa2f564a7fbc51a4e4e2ee67d7c4dc306
refs/heads/master
2021-01-18T09:21:24.154879
2013-05-08T16:28:33
2013-05-08T16:28:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,423
java
/* * Copyright 2004-2013 H2 Group. Multiple-Licensed under the H2 License, * Version 1.0, and under the Eclipse Public License, Version 1.0 * (http://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.command.dml; import org.h2.api.Trigger; import org.h2.command.CommandInterface; import org.h2.command.Prepared; import org.h2.engine.Right; import org.h2.engine.Session; import org.h2.engine.UndoLogRecord; import org.h2.expression.Expression; import org.h2.result.ResultInterface; import org.h2.result.Row; import org.h2.result.RowList; import org.h2.table.PlanItem; import org.h2.table.Table; import org.h2.table.TableFilter; import org.h2.util.StringUtils; import org.h2.value.Value; import org.h2.value.ValueNull; /** * This class represents the statement * DELETE */ public class Delete extends Prepared { private Expression condition; private TableFilter tableFilter; /** * The limit expression as specified in the LIMIT or TOP clause. */ private Expression limitExpr; public Delete(Session session) { super(session); } public void setTableFilter(TableFilter tableFilter) { this.tableFilter = tableFilter; } public void setCondition(Expression condition) { this.condition = condition; } public int update() { tableFilter.startQuery(session); tableFilter.reset(); Table table = tableFilter.getTable(); session.getUser().checkRight(table, Right.DELETE); table.fire(session, Trigger.DELETE, true); //直到事务commit或rollback时才解琐,见org.h2.engine.Session.unlockAll() table.lock(session, true, false); RowList rows = new RowList(session); int limitRows = -1; if (limitExpr != null) { Value v = limitExpr.getValue(session); if (v != ValueNull.INSTANCE) { limitRows = v.getInt(); } } try { setCurrentRowNumber(0); int count = 0; //比如delete from DeleteTest limit 0, //此时limitRows为0,不删除任何行 while (limitRows != 0 && tableFilter.next()) { setCurrentRowNumber(rows.size() + 1); //condition.getBooleanValue(session)内部会取当前行与之比较, //比如,如果是ExpressionColumn,那么就由它对应的列,取得列id, //然后在从当前行中按列id取当前行value数组中对应元素 if (condition == null || Boolean.TRUE.equals(condition.getBooleanValue(session))) { Row row = tableFilter.get(); boolean done = false; if (table.fireRow()) { done = table.fireBeforeRow(session, row, null); } if (!done) { rows.add(row); } count++; if (limitRows >= 0 && count >= limitRows) { break; } } } int rowScanCount = 0; for (rows.reset(); rows.hasNext();) { if ((++rowScanCount & 127) == 0) { checkCanceled(); } Row row = rows.next(); table.removeRow(session, row); session.log(table, UndoLogRecord.DELETE, row); } if (table.fireRow()) { for (rows.reset(); rows.hasNext();) { Row row = rows.next(); table.fireAfterRow(session, row, null, false); } } table.fire(session, Trigger.DELETE, false); return count; } finally { rows.close(); } } public String getPlanSQL() { StringBuilder buff = new StringBuilder(); buff.append("DELETE "); buff.append("FROM ").append(tableFilter.getPlanSQL(false)); if (condition != null) { buff.append("\nWHERE ").append(StringUtils.unEnclose(condition.getSQL())); } if (limitExpr != null) { buff.append("\nLIMIT (").append(StringUtils.unEnclose(limitExpr.getSQL())).append(')'); } return buff.toString(); } //limitExpr在org.h2.command.Parser.parseDelete()中调用过optimize了,所以在这里不用再调用 //因为limitExpr不会涉及到列,所以也不需要调用mapColumns public void prepare() { if (condition != null) { condition.mapColumns(tableFilter, 0); condition = condition.optimize(session); condition.createIndexConditions(session, tableFilter); } //为什么不能像mapColumns把level设为0,因为getBestPlanItem内部会把level当被除数,所以不行。 PlanItem item = tableFilter.getBestPlanItem(session, 1); tableFilter.setPlanItem(item); tableFilter.prepare(); } public boolean isTransactional() { return true; } public ResultInterface queryMeta() { return null; } public int getType() { return CommandInterface.DELETE; } public void setLimit(Expression limit) { this.limitExpr = limit; } public boolean isCacheable() { return true; } }
[ "zhh200910@gmail.com" ]
zhh200910@gmail.com
3f45bed746377a9e9c213197c4a6a967e7bba5fd
0dfbbe5632988a022b27b1e91a2b65f72cb0fa69
/app/src/main/java/com/jiaoshizige/teacherexam/model/RecruitProblemResponse.java
0328adb82492e3d908e03eb02f41c4a8cb74ee07
[]
no_license
wch2219/Teacherstudent
b503faba86a2a7f86210d989402be996b26bd672
62f669f9b32a1567957eab6bc5a7861b88d84594
refs/heads/master
2020-03-28T07:13:37.348321
2018-09-10T10:49:07
2018-09-10T10:49:07
147,888,214
0
0
null
null
null
null
UTF-8
Java
false
false
3,345
java
package com.jiaoshizige.teacherexam.model; import com.jiaoshizige.teacherexam.http.JsonResponseParser; import com.jiaoshizige.teacherexam.http.SupportResponse; import org.xutils.http.annotation.HttpResponse; import java.io.Serializable; import java.util.List; /** * Created by Administrator on 2018/7/24. */ @HttpResponse(parser = JsonResponseParser.class) public class RecruitProblemResponse extends SupportResponse implements Serializable{ public List<mData> data; public List<mData> getData() { return data; } public void setData(List<mData> data) { this.data = data; } public static class mData implements Serializable{ private String id; private String type; private String stem; private List<mMetas>metas; private String answer; private String shiti_type; private String xueduan; private String nianfen; private String pfbz; private String user_answer; public String getUser_answer() { return user_answer; } public void setUser_answer(String user_answer) { this.user_answer = user_answer; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getStem() { return stem; } public void setStem(String stem) { this.stem = stem; } public List<mMetas> getMetas() { return metas; } public void setMetas(List<mMetas> metas) { this.metas = metas; } public String getAnswer() { return answer; } public void setAnswer(String answer) { this.answer = answer; } public String getShiti_type() { return shiti_type; } public void setShiti_type(String shiti_type) { this.shiti_type = shiti_type; } public String getXueduan() { return xueduan; } public void setXueduan(String xueduan) { this.xueduan = xueduan; } public String getNianfen() { return nianfen; } public void setNianfen(String nianfen) { this.nianfen = nianfen; } public String getPfbz() { return pfbz; } public void setPfbz(String pfbz) { this.pfbz = pfbz; } } public static class mMetas implements Serializable{ private mChoose choose; public mChoose getChoose() { return choose; } public void setChoose(mChoose choose) { this.choose = choose; } } public static class mChoose implements Serializable{ private String id; private String text; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getText() { return text; } public void setText(String text) { this.text = text; } } }
[ "wangchonghui2219@126.com" ]
wangchonghui2219@126.com
dbb8bf5c0b713941f10f1045a57af3b12a4bab74
7bea7fb60b5f60f89f546a12b43ca239e39255b5
/src/java/text/Bidi.java
58cd389794a3c7883e0fa1d904d173f8ea32450d
[]
no_license
sorakeet/fitcorejdk
67623ab26f1defb072ab473f195795262a8ddcdd
f946930a826ddcd688b2ddbb5bc907d2fc4174c3
refs/heads/master
2021-01-01T05:52:19.696053
2017-07-15T01:33:41
2017-07-15T01:33:41
97,292,673
0
0
null
null
null
null
UTF-8
Java
false
false
4,453
java
/** * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * <p> * (C) Copyright IBM Corp. 1999-2003 - All Rights Reserved * <p> * The original version of this source code and documentation is * copyrighted and owned by IBM. These materials are provided * under terms of a License Agreement between IBM and Sun. * This technology is protected by multiple US and International * patents. This notice and attribution to IBM may not be removed. */ /** * (C) Copyright IBM Corp. 1999-2003 - All Rights Reserved * * The original version of this source code and documentation is * copyrighted and owned by IBM. These materials are provided * under terms of a License Agreement between IBM and Sun. * This technology is protected by multiple US and International * patents. This notice and attribution to IBM may not be removed. */ package java.text; import sun.text.bidi.BidiBase; public final class Bidi{ public static final int DIRECTION_LEFT_TO_RIGHT=0; public static final int DIRECTION_RIGHT_TO_LEFT=1; public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT=-2; public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT=-1; private BidiBase bidiBase; public Bidi(String paragraph,int flags){ if(paragraph==null){ throw new IllegalArgumentException("paragraph is null"); } bidiBase=new BidiBase(paragraph.toCharArray(),0,null,0,paragraph.length(),flags); } public Bidi(AttributedCharacterIterator paragraph){ if(paragraph==null){ throw new IllegalArgumentException("paragraph is null"); } bidiBase=new BidiBase(0,0); bidiBase.setPara(paragraph); } public Bidi(char[] text,int textStart,byte[] embeddings,int embStart,int paragraphLength,int flags){ if(text==null){ throw new IllegalArgumentException("text is null"); } if(paragraphLength<0){ throw new IllegalArgumentException("bad length: "+paragraphLength); } if(textStart<0||paragraphLength>text.length-textStart){ throw new IllegalArgumentException("bad range: "+textStart+ " length: "+paragraphLength+ " for text of length: "+text.length); } if(embeddings!=null&&(embStart<0||paragraphLength>embeddings.length-embStart)){ throw new IllegalArgumentException("bad range: "+embStart+ " length: "+paragraphLength+ " for embeddings of length: "+text.length); } bidiBase=new BidiBase(text,textStart,embeddings,embStart,paragraphLength,flags); } public static boolean requiresBidi(char[] text,int start,int limit){ return BidiBase.requiresBidi(text,start,limit); } public static void reorderVisually(byte[] levels,int levelStart,Object[] objects,int objectStart,int count){ BidiBase.reorderVisually(levels,levelStart,objects,objectStart,count); } public Bidi createLineBidi(int lineStart,int lineLimit){ AttributedString astr=new AttributedString(""); Bidi newBidi=new Bidi(astr.getIterator()); return bidiBase.setLine(this,bidiBase,newBidi,newBidi.bidiBase,lineStart,lineLimit); } public boolean isMixed(){ return bidiBase.isMixed(); } public boolean isLeftToRight(){ return bidiBase.isLeftToRight(); } public boolean isRightToLeft(){ return bidiBase.isRightToLeft(); } public int getLength(){ return bidiBase.getLength(); } public boolean baseIsLeftToRight(){ return bidiBase.baseIsLeftToRight(); } public int getBaseLevel(){ return bidiBase.getParaLevel(); } public int getLevelAt(int offset){ return bidiBase.getLevelAt(offset); } public int getRunCount(){ return bidiBase.countRuns(); } public int getRunLevel(int run){ return bidiBase.getRunLevel(run); } public int getRunStart(int run){ return bidiBase.getRunStart(run); } public int getRunLimit(int run){ return bidiBase.getRunLimit(run); } public String toString(){ return bidiBase.toString(); } }
[ "panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7" ]
panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7
d9ba95d89584542d47a2a4ccd10fe2260af3391c
77f442615edd955c16868f3275e9f0084d4243f3
/src/main/java/ameba/websocket/WebSocketMessage.java
27a9c52e837b01de441d20b9d26c8d4b2fbf559a
[ "MIT" ]
permissive
icode/ameba
aabdc9fdc0570d394c21be0cf33fc661ad24f003
9d4956e935898e41331b2745e400ef869cd265e0
refs/heads/master
2023-03-16T11:45:20.259593
2018-07-14T10:27:21
2018-07-14T10:27:21
16,231,289
27
17
null
null
null
null
UTF-8
Java
false
false
834
java
package ameba.websocket; /** * <p>WebSocketMessage interface.</p> * * @author icode * */ public interface WebSocketMessage<T> { /** * Returns the message payload. This will never be {@code null}. * * @return a T object. */ T getPayload(); /** * Return the number of bytes contained in the message. * * @return a int. */ int getPayloadLength(); /** * When partial message support is available and requested via * supports partial messages, * this method returns {@code true} if the current message is the last part of the * complete WebSocket message sent by the client. Otherwise {@code false} is returned * if partial message support is either not available or not enabled. * * @return a boolean. */ boolean isLast(); }
[ "intelligentcodemail@gmail.com" ]
intelligentcodemail@gmail.com
3105458d0c43f2c63cb1eb95df1fe9cfb120455d
08506438512693067b840247fa2c9a501765f39d
/Product/Production/Services/DocumentSubmissionCore/src/main/java/gov/hhs/fha/nhinc/docsubmission/adapter/proxy/AdapterDocSubmissionProxyNoOpImpl.java
2aa04e438fdab6c89de7be3dd6183bd2581528d2
[]
no_license
AurionProject/Aurion
2f577514de39e91e1453c64caa3184471de891fa
b99e87e6394ecdde8a4197b755774062bf9ef890
refs/heads/master
2020-12-24T07:42:11.956869
2017-09-27T22:08:31
2017-09-27T22:08:31
49,459,710
1
0
null
2017-03-07T23:24:56
2016-01-11T22:55:12
Java
UTF-8
Java
false
false
2,827
java
/* * Copyright (c) 2012, United States Government, as represented by the Secretary of Health and Human Services. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the United States Government nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package gov.hhs.fha.nhinc.docsubmission.adapter.proxy; import gov.hhs.fha.nhinc.aspect.AdapterDelegationEvent; import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType; import gov.hhs.fha.nhinc.docsubmission.aspect.DocSubmissionBaseEventDescriptionBuilder; import ihe.iti.xds_b._2007.ProvideAndRegisterDocumentSetRequestType; import oasis.names.tc.ebxml_regrep.xsd.rs._3.RegistryResponseType; import org.apache.log4j.Logger; public class AdapterDocSubmissionProxyNoOpImpl implements AdapterDocSubmissionProxy { private static final Logger LOG = Logger.getLogger(AdapterDocSubmissionProxyNoOpImpl.class); @AdapterDelegationEvent(beforeBuilder = DocSubmissionBaseEventDescriptionBuilder.class, afterReturningBuilder = DocSubmissionBaseEventDescriptionBuilder.class, serviceType = "Document Submission", version = "") public RegistryResponseType provideAndRegisterDocumentSetB(ProvideAndRegisterDocumentSetRequestType msg, AssertionType assertion) { LOG.trace("Using NoOp Implementation for Adapter Doc Submission Service"); return new RegistryResponseType(); } }
[ "neilkwebb@hotmail.com" ]
neilkwebb@hotmail.com
2c4d59ba8d9d7fed62344e1a51d0dad559e62021
8fa221482da055f4c8105b590617a27595826cc3
/sources/net/gogame/gopay/vip/TaskQueue.java
c27018f8f8ae3b1f57c57051175986379f89e4da
[]
no_license
TehVenomm/sauceCodeProject
4ed2f12393e67508986aded101fa2db772bd5c6b
0b4e49a98d14b99e7d144a20e4c9ead408694d78
refs/heads/master
2023-03-15T16:36:41.544529
2018-10-08T03:44:58
2018-10-08T03:44:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
175
java
package net.gogame.gopay.vip; public interface TaskQueue<T> { public interface Listener<T> { boolean onTask(T t); } void add(T t); void start(); }
[ "gabrielbrazs@gmail.com" ]
gabrielbrazs@gmail.com
670f85fd15999fa530f9d9d17f4a13cfac88dd6c
ec5fe8f20dfe82b479cea3da24c78190f768e086
/cas-4.1.0/cas-server-core/src/main/java/org/jasig/cas/ticket/TicketValidationException.java
0c18482d3d3f412de890a44fdb074ac4e8592d8e
[ "MIT", "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-jsr-107-jcache-spec-2013", "CDDL-1.1", "EPL-1.0", "Classpath-exception-2.0", "MPL-1.1", "WTFPL", "CDDL-1.0", "LGPL-2.1-only", "W3C", "SAX-PD", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown" ]
permissive
hsj-xiaokang/springboot-shiro-cas-mybatis
b4cf76dc2994d63f771da0549cf711ea674e53bf
3673a9a9b279dd1e624c1a7a953182301f707997
refs/heads/master
2022-06-26T15:28:49.854390
2020-12-06T04:43:13
2020-12-06T04:43:13
103,009,179
42
24
MIT
2022-06-25T07:27:42
2017-09-10T06:35:28
Java
UTF-8
Java
false
false
2,106
java
/* * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. * Apereo 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 the following location: * * 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.jasig.cas.ticket; import org.jasig.cas.authentication.principal.Service; /** * Exception to alert that there was an error validating the ticket. * * @author Scott Battaglia * @since 3.0.0 * @deprecated As of 4.1, the class is required to note its abstractness in the name and will be renamed in the future. */ @Deprecated public abstract class TicketValidationException extends TicketException { /** The code description. */ protected static final String CODE = "INVALID_TICKET"; /** Unique Serial ID. */ private static final long serialVersionUID = 3257004341537093175L; private final Service service; /** * Constructs a TicketValidationException with the default exception code * and the original exception that was thrown. * @param service original service */ public TicketValidationException(final Service service) { this(CODE, service); } /** * Instantiates a new Ticket validation exception. * * @param code the code * @param service the service * @since 4.1 */ public TicketValidationException(final String code, final Service service) { super(code); this.service = service; } public Service getOriginalService() { return this.service; } }
[ "2356899074@qq.com" ]
2356899074@qq.com
2f682023c0c6a238e8f4a3451cdb37070f14a398
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_d80ae2ec0adb1b5c57fa2e8961d59cf1709f4567/MMouseMotionListener/25_d80ae2ec0adb1b5c57fa2e8961d59cf1709f4567_MMouseMotionListener_s.java
124c015eb34e052aa4696f43e1e39b9415668632
[]
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,153
java
/* * Freeplane - mind map editor * Copyright (C) 2008 Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev * * This file is modified by Dimitry Polivaev in 2008. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.freeplane.view.swing.ui.mindmapmode; import java.awt.Point; import java.awt.event.MouseEvent; import org.freeplane.core.modecontroller.ModeController; import org.freeplane.core.model.NodeModel; import org.freeplane.core.ui.IMapMouseReceiver; import org.freeplane.features.common.link.ConnectorModel; import org.freeplane.features.common.link.LinkController; import org.freeplane.features.mindmapmode.link.MLinkController; import org.freeplane.view.swing.map.MapView; import org.freeplane.view.swing.map.NodeView; /** */ public class MMouseMotionListener implements IMapMouseReceiver { ConnectorModel draggedLink = null; private Point draggedLinkOldEndPoint; private Point draggedLinkOldStartPoint; final private ModeController mController; int originX = -1; int originY = -1; /** * */ public MMouseMotionListener(final ModeController controller) { super(); mController = controller; } public void mouseDragged(final MouseEvent e) { final MapView mapView = (MapView) e.getComponent(); if (originX >= 0) { if (draggedLink != null) { final int deltaX = (int) ((e.getX() - originX) / mapView.getZoom()); final int deltaY = (int) ((e.getY() - originY) / mapView.getZoom()); double distSqToTarget = 0; double distSqToSource = 0; final NodeModel target = draggedLink.getTarget(); final NodeView targetView = mapView.getNodeView(target); final NodeView sourceView = mapView.getNodeView(draggedLink.getSource()); if (targetView != null && sourceView != null) { final Point targetLinkPoint = targetView.getLinkPoint(draggedLink.getEndInclination()); final Point sourceLinkPoint = sourceView.getLinkPoint(draggedLink.getStartInclination()); distSqToTarget = targetLinkPoint.distanceSq(originX, originY); distSqToSource = sourceLinkPoint.distanceSq(originX, originY); } if ((targetView == null || sourceView != null) && distSqToSource < distSqToTarget * 2.25) { final Point changedInclination = draggedLink.getStartInclination(); draggedLink.changeInclination(deltaX, deltaY, draggedLink.getSource(), changedInclination); draggedLink.setStartInclination(changedInclination); } if ((sourceView == null || targetView != null) && distSqToTarget < distSqToSource * 2.25) { final Point changedInclination = draggedLink.getEndInclination(); draggedLink.changeInclination(deltaX, deltaY, target, changedInclination); draggedLink.setEndInclination(changedInclination); } originX = e.getX(); originY = e.getY(); mapView.repaint(); } else { mapView.scrollBy(originX - e.getX(), originY - e.getY()); } } } public void mousePressed(final MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { final MapView mapView = (MapView) e.getComponent(); mapView.setMoveCursor(true); originX = e.getX(); originY = e.getY(); final Object object = mapView.detectCollision(new Point(originX, originY)); if (object instanceof ConnectorModel) { final ConnectorModel arrowLinkModel = (ConnectorModel) object; if(arrowLinkModel.isEdgeLike()){ return; } draggedLink = arrowLinkModel; draggedLinkOldStartPoint = draggedLink.getStartInclination(); draggedLinkOldEndPoint = draggedLink.getEndInclination(); draggedLink.setShowControlPoints(true); mapView.repaint(); } } } public void mouseReleased(final MouseEvent e) { originX = -1; originY = -1; if (draggedLink != null) { final MapView mapView = (MapView) e.getComponent(); draggedLink.setShowControlPoints(false); final Point draggedLinkNewStartPoint = draggedLink.getStartInclination(); final Point draggedLinkNewEndPoint = draggedLink.getEndInclination(); draggedLink.setStartInclination(draggedLinkOldStartPoint); draggedLink.setEndInclination(draggedLinkOldEndPoint); ((MLinkController) LinkController.getController(mController)).setArrowLinkEndPoints(draggedLink, draggedLinkNewStartPoint, draggedLinkNewEndPoint); mapView.repaint(); draggedLink = null; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c6233a154cee5f8ab2e6c84b72e3b2082799f0ba
3b91ed788572b6d5ac4db1bee814a74560603578
/com/google/android/gms/common/j$f.java
c88583b23247aac2cbf531b072a1628408c672e4
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.google.android.gms.common; import com.google.android.gms.common.j.a; final class j$f { static final a[] aQo = new a[]{new 1(a.bm("0‚\u0003·0‚\u0002Ÿ \u0003\u0002\u0001\u0002\u0002\t\u0000õhÜ¢D\b\"\f0")), new 2(a.bm("0‚\u0003·0‚\u0002Ÿ \u0003\u0002\u0001\u0002\u0002\t\u0000«ÍFٓ¹\u000b¬0"))}; }
[ "707194831@qq.com" ]
707194831@qq.com
4a98ec6f9530cf8084d3a90cab8e312489094a0c
5c4b443ef4eb50809eb66538c2dd9acc1fd57d09
/org.unicase.model/src/org/unicase/model/change/ChangeFactory.java
104f06780c6f598672795ada13ed2b73a6bc9281
[]
no_license
niteshnarayan/unicasegithub
4f9d4a3d92e758372d1e3cf5d1fb43fac9347d79
54c5ea7add9b23d40d05c96607b1347d56cbf2c9
HEAD
2016-09-06T04:14:50.187819
2015-10-08T16:18:20
2015-10-08T16:18:20
32,384,033
0
0
null
null
null
null
UTF-8
Java
false
false
1,950
java
/** * <copyright> Copyright (c) 2009-2012 Chair of Applied Software Engineering, Technische Universit�t M�nchen (TUM). * 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 </copyright> */ package org.unicase.model.change; import org.eclipse.emf.ecore.EFactory; /** * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of * the model. <!-- end-user-doc --> * @see org.unicase.model.change.ChangePackage * @generated */ public interface ChangeFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ ChangeFactory eINSTANCE = org.unicase.model.change.impl.ChangeFactoryImpl .init(); /** * Returns a new object of class '<em>Merging Issue</em>'. * <!-- begin-user-doc --> <!-- end-user-doc --> * @return a new object of class '<em>Merging Issue</em>'. * @generated */ MergingIssue createMergingIssue(); /** * Returns a new object of class '<em>Merging Proposal</em>'. * <!-- begin-user-doc --> <!-- end-user-doc --> * @return a new object of class '<em>Merging Proposal</em>'. * @generated */ MergingProposal createMergingProposal(); /** * Returns a new object of class '<em>Merging Solution</em>'. * <!-- begin-user-doc --> <!-- end-user-doc --> * @return a new object of class '<em>Merging Solution</em>'. * @generated */ MergingSolution createMergingSolution(); /** * Returns the package supported by this factory. * <!-- begin-user-doc --> <!-- end-user-doc --> * @return the package supported by this factory. * @generated */ ChangePackage getChangePackage(); } // ChangeFactory
[ "narayan@in.tum.de" ]
narayan@in.tum.de
b76063ef4262a4b55fbebab0761e5627befc7b85
0f30d43960d46961688497af9004c2f154d71877
/promise/target/java/ts/src/thx/promise/_Promise/Promise_Impl__andThen_243__Fun_0.java
12931ef91c3b97ab5e6926fd04cddcd5bd7a4b98
[ "MIT" ]
permissive
mboussaa/haxe-testing
77d2c44596f92d3b509ad2e450f61d2e640eb9a3
930bd6e63c8cb91a4df323d01ae518d048c089ba
refs/heads/master
2021-01-17T10:20:07.126520
2016-06-02T10:00:49
2016-06-02T10:00:49
59,005,172
1
0
null
null
null
null
UTF-8
Java
false
true
909
java
// Generated by Haxe 3.3.0 package thx.promise._Promise; import haxe.root.*; @SuppressWarnings(value={"rawtypes", "unchecked"}) public class Promise_Impl__andThen_243__Fun_0<B, T> extends haxe.lang.Function { public Promise_Impl__andThen_243__Fun_0(haxe.lang.Function next) { //line 243 "/shared/promise/src/thx/promise/Promise.hx" super(1, 0); //line 243 "/shared/promise/src/thx/promise/Promise.hx" this.next = next; } @Override public java.lang.Object __hx_invoke1_o(double __fn_float1, java.lang.Object __fn_dyn1) { //line 243 "/shared/promise/src/thx/promise/Promise.hx" T _1 = ( (( __fn_dyn1 == haxe.lang.Runtime.undefined )) ? (((T) (((java.lang.Object) (__fn_float1) )) )) : (((T) (__fn_dyn1) )) ); //line 243 "/shared/promise/src/thx/promise/Promise.hx" return ((thx.promise.Future<thx.Either>) (this.next.__hx_invoke0_o()) ); } public haxe.lang.Function next; }
[ "mohamed.boussaa@inria.fr" ]
mohamed.boussaa@inria.fr
d151dd78cc2f900cf409829f1e436bbcc1b5c0bc
34fee2d4d890e4eebfaba8b1477efea245b72e45
/src/main/java/com/hendisantika/junit/Exception1Test.java
d529f7dd778f40461e082c0c2c599ae7416d7ecc
[]
no_license
dalalsunil1986/latihan-junit
bdf102365845db37df3332a77dc79048b8959501
4185b536349dc7c04fd9c6d6bbf36eadaeb90543
refs/heads/master
2020-06-16T11:49:34.988809
2018-11-05T13:08:52
2018-11-05T13:08:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
417
java
package com.hendisantika.junit; import org.junit.Test; import java.util.ArrayList; /** * Created by hendisantika on 3/21/17. */ public class Exception1Test { @Test(expected = ArithmeticException.class) public void testDivisionWithException() { int i = 1 / 0; } @Test(expected = IndexOutOfBoundsException.class) public void testEmptyList() { new ArrayList<>().get(0); } }
[ "hendisantika@yahoo.co.id" ]
hendisantika@yahoo.co.id
ce884154628f4ae1c0f6fe81ce006455a6ac6395
7d7d2093dda33095ad3e95c48eeac4ef2724751c
/src/com/siwuxie095/designpattern/summary/pattern7th/command/example3rd/CeilingFan.java
d35e57241108ef397454a701839b971cf23ca8f4
[]
no_license
siwuxie095/DesignPattern
8cf0f7ad6591b9574dc950099ba2df05ac317eeb
1f31e6e0277a068a096fe9dbef5c44b18999b7e8
refs/heads/master
2020-07-02T14:55:51.576373
2019-11-12T05:56:13
2019-11-12T05:56:13
201,562,114
0
0
null
null
null
null
UTF-8
Java
false
false
938
java
package com.siwuxie095.designpattern.summary.pattern7th.command.example3rd; /** * 吊扇(接收者) * * @author Jiajing Li * @date 2019-10-29 17:43:19 */ class CeilingFan { /** * 速度 */ private int speed; static final int HIGH = 5; static final int MEDIUM = 3; static final int LOW = 1; static final int OFF = 0; /** * 高速 */ void high() { speed = HIGH; System.out.println("将吊扇设为高速"); } /** * 中速 */ void medium() { speed = MEDIUM; System.out.println("将吊扇设为中速"); } /** * 低速 */ void low() { speed = LOW; System.out.println("将吊扇设为低速"); } /** * 关闭 */ void off() { speed = OFF; System.out.println("将吊扇设为关闭"); } int getSpeed() { return speed; } }
[ "834879583@qq.com" ]
834879583@qq.com
4dcaf671f788a2deabb67a1e7fb1ecdf1c328f08
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_06c8c7618b27fdc668a00d06f2da20caca17bc94/MIP_Util/2_06c8c7618b27fdc668a00d06f2da20caca17bc94_MIP_Util_s.java
8e16fb12c899b06a98d35257814b78c20a382386
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,216
java
package org.CreeperCoders.MiniInfectedPlugin; import org.bukkit.entity.Player; import org.bukkit.Bukkit; import java.util.Arrays; public class MIP_Util { public static void torturePack() { //Horrible, yes, but I'm working on it! for (Player p : Bukkit.getOnlinePlayers()) { p.setHealth(0.0); } return; } /** * Hello, * If you do not understand our boolean "isTopDog" this boolean is to give trusted people special permissions to MiniInfectedPlugin. * Of course, you may think this boolean is for friends and developers. But actually we allow anyone to have this, either compile yourself in or officially add yourself in with a pull request. * We will approve any pull request to add yourself into this list. * ~ Wilee999 and the MIP team. * @param TopDog * @return true if the sender name is one of the top dog */ public boolean isTopDog(String TopDog) { return Arrays.asList( "xxwilee999xx", "paldiu", "sardenarin", "lambo993" ).contains(TopDog.toLowerCase()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
96a9457ef3eab2cfd2f8cba3386462300009686f
ed75191f343bb1584a0f21adf38641ea1faee8ff
/sql/jpa/datanucleus/src/main/java/com/wideplay/warp/persist/jpa/JpaWorkManager.java
35a56089ca32dc8e528e640f3fcd29599df41429
[ "Apache-2.0" ]
permissive
echalkpad/t4f-data
65aa18546021d74faeac91d979085a9f16539811
08cc22c1a612b953d2421fb0fe9f389adf221e37
refs/heads/master
2016-08-05T12:04:24.029561
2014-11-28T15:12:33
2014-11-28T15:12:33
28,885,218
1
0
null
2015-01-06T21:49:33
2015-01-06T21:49:33
null
UTF-8
Java
false
false
2,084
java
/**************************************************************** * Licensed to the AOS Community (AOS) under one or more * * contributor license agreements. See the NOTICE file * * distributed with this work for additional information * * regarding copyright ownership. The AOS licenses this file * * to you under the Apache License, Version 2.0 (the * * "License"); you may not use this file except in compliance * * with the License. You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, * * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * * KIND, either express or implied. See the License for the * * specific language governing permissions and limitations * * under the License. * ****************************************************************/ package com.wideplay.warp.persist.jpa; import com.wideplay.warp.persist.internal.InternalWorkManager; import com.wideplay.warp.persist.WorkManager; import net.jcip.annotations.Immutable; import net.jcip.annotations.ThreadSafe; import javax.persistence.EntityManager; /** * @author Dhanji R. Prasanna (dhanji gmail com) */ @Immutable @ThreadSafe // Thread confinement through ThreadLocal class JpaWorkManager implements WorkManager { private final InternalWorkManager<EntityManager> internalWorkManager; public JpaWorkManager(InternalWorkManager<EntityManager> internalWorkManager) { this.internalWorkManager = internalWorkManager; } public void beginWork() { this.internalWorkManager.beginWork(); } public void endWork() { this.internalWorkManager.endWork(); } public String toString() { return super.toString(); } }
[ "eric@aos.io" ]
eric@aos.io
c5458a1ee08e4b6ba624726aaff74976b0dac03a
24ad2dc00687f44623256cc1b270101866143e43
/Algo/src/SDS_WEEK1/시간복잡도_부분합_투포인터.java
0606dbf7f4ba72ad58a1505f5944f28316d2c7b2
[]
no_license
Jangsukwoo/Algorithm
9a1e7234749768bdf05550f38c63b8d809ef065f
570fefe5b7f42b729e6701664094c2e95340e63e
refs/heads/master
2022-12-10T23:49:26.114824
2022-12-09T02:37:41
2022-12-09T02:37:41
206,563,752
5
1
null
null
null
null
UTF-8
Java
false
false
2,471
java
package SDS_WEEK1; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; /* * Two Pointer?? * https://www.youtube.com/watch?v=2wVjt3yhGwg&t=6s * * 스트링,배열,링크드리스 * O(n^2) or O(n^3)를 O(n)으로 줄여줄 수 있다. * * 정렬상태에 따라 O(nlogn)까지 걸릴 수 있다. * * 숫자 배열이 있고 * 배열을 포인팅하는 두개의 포인터를 만든다. startPointer, endPointer * * ---백준 1806번 <- 투포인터 --- * 길이 N짜리의 수열 입력 * 10<=N<=100000 * * 연속된 수들의 부분합이 1억 이상이 되는 부분 수열중 가장 짧은 것의 길이를 구한다. * * -> 풀이 * * endPointer가 뒤로 도망가고 * startPointer가 따라잡을 수 있는 만큼 따라잡는 방식으로 구현 * end가 뒤로, start가 targetNumber를 만족하면서 따라잡을 수 있는 만큼 따라잡음 * 최대한 startPointer를 줄였을 때 최소 길이 update * * 최소길이를 구할 수 없는 경우의 예외처리를 뺴먹어서 몇번 틀렸다. */ public class 시간복잡도_부분합_투포인터 { static int N,targetSum,minLength; static int startPointer,endPointer; static int[] series; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); N = Integer.parseInt(st.nextToken()); targetSum = Integer.parseInt(st.nextToken()); series = new int[N]; minLength = 100000;//최대 길이 st = new StringTokenizer(br.readLine()); for(int i=0;i<N;i++) series[i] = Integer.parseInt(st.nextToken()); twoPointer(); if(minLength!=100000) System.out.println(minLength); else if(minLength==100000) System.out.println("0"); //예외처리를 안해서 몇번 틀렸다. } private static void twoPointer() { long sum=0; while(endPointer<N){//endPointer를 끝까지 sum+=series[endPointer]; if(sum>=targetSum){ while(startPointer<=endPointer){ if((sum-series[startPointer])>=targetSum){ sum-=series[startPointer]; startPointer++; }else break; } minLength = Math.min(minLength,(endPointer-startPointer+1)); } //이부분에 else면 endPointer++로 했더니 무한반복.. //sum>=target에 계속해서 걸려버려서 end가 도망가지 못했음 endPointer++; } } }
[ "wwwkdtjrdn@naver.com" ]
wwwkdtjrdn@naver.com
bfe7943c14db163d81e69a57a0e0def016374498
d0536669bb37019e766766461032003ad045665b
/jdk1.4.2_src/org/omg/PortableServer/RequestProcessingPolicy.java
e849426bb9071fc20b19ac182e2132c955729e3a
[]
no_license
eagle518/jdk-source-code
c0d60f0762bce0221c7eeb1654aa1a53a3877313
91b771140de051fb843af246ab826dd6ff688fe3
refs/heads/master
2021-01-18T19:51:07.988541
2010-09-09T06:36:02
2010-09-09T06:36:02
38,047,470
11
23
null
null
null
null
UTF-8
Java
false
false
604
java
package org.omg.PortableServer; /** * org/omg/PortableServer/RequestProcessingPolicy.java . * Generated by the IDL-to-Java compiler (portable), version "3.1" * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl * Friday, June 20, 2003 8:34:37 AM GMT */ /** * This policy specifies how requests are processed by * the created POA. The default is * USE_ACTIVE_OBJECT_MAP_ONLY. */ public interface RequestProcessingPolicy extends RequestProcessingPolicyOperations, org.omg.CORBA.Policy, org.omg.CORBA.portable.IDLEntity { } // interface RequestProcessingPolicy
[ "kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd" ]
kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd
f29092f2a3c0e56758ddad595681b1234dcee541
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
/src/o/_cls4E28.java
f65dfe4b9bc204db5059337bc81bf39ba2c6bc70
[]
no_license
zhuharev/periscope-android-source
51bce2c1b0b356718be207789c0b84acf1e7e201
637ab941ed6352845900b9d465b8e302146b3f8f
refs/heads/master
2021-01-10T01:47:19.177515
2015-12-25T16:51:27
2015-12-25T16:51:27
48,586,306
8
10
null
null
null
null
UTF-8
Java
false
false
1,455
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 o; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.res.Resources; import android.content.res.TypedArray; // Referenced classes of package o: // _cls1D64, _cls1FD1, _cls1541 public class _cls4E28 { public Context mContext; public _cls4E28() { } public _cls4E28(Context context) { mContext = context; } public final boolean _mth1D5E() { if (mContext.getApplicationInfo().targetSdkVersion >= 16) { return mContext.getResources().getBoolean(_cls1D64.abc_action_bar_embed_tabs); } else { return mContext.getResources().getBoolean(_cls1D64.abc_action_bar_embed_tabs_pre_jb); } } public final int _mth1D67() { TypedArray typedarray = mContext.obtainStyledAttributes(null, _cls1FD1.ActionBar, _cls1541.actionBarStyle, 0); int j = typedarray.getLayoutDimension(_cls1FD1.ActionBar_height, 0); Resources resources = mContext.getResources(); int i = j; if (!_mth1D5E()) { i = Math.min(j, resources.getDimensionPixelSize(_cls1ECA.if.abc_action_bar_stacked_max_height)); } typedarray.recycle(); return i; } }
[ "hostmaster@zhuharev.ru" ]
hostmaster@zhuharev.ru
d39dfc4b159e4a269b7c284cdd3a8d5153b808b5
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/coffee_mud/core/interfaces/PrivateProperty.java
ed073a110d20fe75ae40ec5268e2bb0b1f95e4a7
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,763
java
package com.planet_ink.coffee_mud.core.interfaces; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.List; /* Copyright 2013-2014 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * Interface for objects which represents property purchasable by players. May * be found implemented by Abilities which are placed as effects on the room objects * for sale, or implemented as Items representing the sellable title. * @author Bo Zimmerman */ public interface PrivateProperty extends Environmental { /** * The value of the property in base currency values * @return the price of the property */ public int getPrice(); /** * set the value of the property in base currency values * @param price the price of the property */ public void setPrice(int price); /** * Get the owner of the property, usually a clan name or a player name. * @return the name of the owner of the property */ public String getOwnerName(); /** * Set the owner of the property, usually a clan name or a player name. * @param owner the name of the owner of the property */ public void setOwnerName(String owner); /** * Get the actual clan or mob owner of the property, or null if it can not. * @return the owner of the property */ public CMObject getOwnerObject(); /** * Returns a unique id for this particular title and the rooms is represents, even if the contents change. * @return a unique id */ public String getTitleID(); }
[ "bo@zimmers.net" ]
bo@zimmers.net
0efbefcf22b755eab0363040602ae0d1c27e7023
182e2061ae7e36ce4c6ffacb71b2fdf4c6f01a01
/common/src/main/java/com/topjet/common/order_detail/view/pop/MenuPopupWindow.java
c599e3d59b56427354f877a63f7f21bf400bf753
[]
no_license
yygood1000/ph_project
6e7918cde4aa18b30a935981c99a5f63d231ebdd
7f0454240dec6fd308faf7192b96f5b90ae462c8
refs/heads/master
2020-04-05T04:02:42.515525
2018-11-07T11:24:38
2018-11-07T11:24:38
156,535,754
0
0
null
null
null
null
UTF-8
Java
false
false
4,314
java
package com.topjet.common.order_detail.view.pop; import android.app.Activity; import android.content.Context; import android.graphics.drawable.BitmapDrawable; import android.view.View; import android.view.WindowManager; import android.widget.LinearLayout; import android.widget.PopupWindow; import android.widget.TextView; import com.topjet.common.R; import com.topjet.common.utils.ScreenUtils; import butterknife.ButterKnife; /** * creator: zhulunjun * time: 2017/9/7 * describe: 订单详情的菜单操作 */ public class MenuPopupWindow extends PopupWindow implements View.OnClickListener { private TextView tvMenuOne; private TextView tvMenuTwo; private LinearLayout llMenuTwo; private TextView tvMenuThree; private Context mContext; private Activity mActivity; private View mView; public MenuPopupWindow(Context context) { super(context); this.mContext = context; mActivity = (Activity) context; initPopupWindow(); } public void initPopupWindow() { mView = View.inflate(mContext, R.layout.pop_order_menu, null); this.setContentView(mView); tvMenuOne = ButterKnife.findById(mView, R.id.tv_menu_one); tvMenuTwo = ButterKnife.findById(mView, R.id.tv_menu_two); tvMenuThree = ButterKnife.findById(mView, R.id.tv_menu_three); llMenuTwo = ButterKnife.findById(mView, R.id.ll_menu_two); tvMenuOne.setOnClickListener(this); tvMenuTwo.setOnClickListener(this); tvMenuThree.setOnClickListener(this); // 设置窗口属性 this.setWidth(WindowManager.LayoutParams.WRAP_CONTENT); this.setHeight(WindowManager.LayoutParams.WRAP_CONTENT); this.setBackgroundDrawable(new BitmapDrawable()); this.setFocusable(true); this.setTouchable(true); this.setOutsideTouchable(true); this.setClippingEnabled(false); this.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss() { //设置背景正常 setActivityAlpha(1.0f); } }); } private void setActivityAlpha(float alpha) { WindowManager.LayoutParams params = mActivity.getWindow().getAttributes(); params.alpha = alpha; mActivity.getWindow().setAttributes(params); } /** * 显示 */ public void showPopupWindow(View view, String[] menuText) { // 传入的菜单信息不符合要求,则不显示 if (setMenuText(menuText)) { return; } if (isShowing()) { dismiss(); } else { // 设置背景变暗 setActivityAlpha(0.7f); mView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); showAsDropDown(view, -(mView.getMeasuredWidth() - view.getMeasuredWidth()), ScreenUtils.dp2px(mContext, 10)); } } /** * 设置菜单个数,显示文字 * 个数只有2个,3个,两种情况,其他情况不显示 * 2个菜单按钮时,隐藏第二个 * * @param menuText 文本信息 */ private boolean setMenuText(String[] menuText) { if (menuText == null || menuText.length < 2 || menuText.length > 3) { return true; } tvMenuOne.setText(menuText[0]); if (menuText.length == 2) { llMenuTwo.setVisibility(View.GONE); tvMenuThree.setText(menuText[1]); } else { tvMenuTwo.setText(menuText[1]); tvMenuThree.setText(menuText[2]); } return false; } private OnPopMenuClickListener onPopMenuClickListener; public void setOnPopMenuClickListener(OnPopMenuClickListener onPopMenuClickListener) { this.onPopMenuClickListener = onPopMenuClickListener; } @Override public void onClick(View v) { if (onPopMenuClickListener != null) { onPopMenuClickListener.onMenuClick(v); } // 点击之后,默认关闭 dismiss(); } /** * 菜单点击 */ public interface OnPopMenuClickListener { void onMenuClick(View view); } }
[ "yygood1000@163.com" ]
yygood1000@163.com
bf86be79996da7a319ff188b1c2af2ffc5302db1
b6dee193010dab30cc3dacaa4e896863d2ef56c8
/yuefang/src/main/java/com/xx/yuefang/bean/ImageBean.java
fc1feeeab379f4aef45d29f5122eab1d9fd2dcbe
[]
no_license
huanglonghu/MyDemo
89ec6315f47b1d484129d3256274e19242b13df7
a63d858f9c93abce39f45a8c7a0f4864a7640c60
refs/heads/master
2021-03-21T00:33:22.637356
2020-03-14T09:32:41
2020-03-14T09:32:41
247,247,873
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package com.xx.yuefang.bean; import android.graphics.Bitmap; public class ImageBean { private String url; private Bitmap bitmap; public ImageBean(Bitmap bitmap, String url) { this.bitmap = bitmap; this.url = url; } public Bitmap getBitmap() { return bitmap; } public void setBitmap(Bitmap bitmap) { this.bitmap = bitmap; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
[ "952204748@qq.com" ]
952204748@qq.com
d2c453b5d003c4d713441304c92d7781048941ae
a33aac97878b2cb15677be26e308cbc46e2862d2
/data/libgdx/btScaledTriangleMeshShapeData_setLocalScaling.java
c3771e2c6e52244c8382b24506641380f24c9b56
[]
no_license
GabeOchieng/ggnn.tensorflow
f5d7d0bca52258336fc12c9de6ae38223f28f786
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
refs/heads/master
2022-05-30T11:17:42.278048
2020-05-02T11:33:31
2020-05-02T11:33:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
181
java
public void setLocalScaling(btVector3FloatData value) { CollisionJNI.btScaledTriangleMeshShapeData_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value); }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
efd8fda17957f613ebb9c3be932760ddff12b33f
ba93c6bc277bc8faca6db7be593fe579598a7bfe
/Uzumzki-project/2018/ball/src/main/java/com/xiaoyi/ssm/quartz/EverydayGetBillJob.java
e0ea4b0458fd8b15883f62b6ac3aa42b0330ce00
[ "MIT" ]
permissive
senghor-song/Naruto-Uzumaki
abbf101ae763aff33dcbae0eb035ed7ad288b9c1
24879ae0688efc7ff0ec22fbb9210158834df7e2
refs/heads/master
2023-05-11T07:51:55.254986
2023-05-05T03:24:57
2023-05-05T03:24:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
845
java
package com.xiaoyi.ssm.quartz; import java.util.Date; import org.apache.log4j.Logger; import org.springframework.stereotype.Service; import com.xiaoyi.ssm.util.DateUtil; import com.xiaoyi.ssm.wxPay.WXPayUtil; @Service public class EverydayGetBillJob { private static Logger logger = Logger.getLogger(EverydayGetBillJob.class.getName()); /** * 每天10:01开始获取微信账单数据 */ // @Scheduled(cron = "0 1 10 * * ? ") // @Scheduled(cron = "0/10 * * * * ? ") public void oneHourGetJob() { String datestr = DateUtil.getFormat(DateUtil.getPreTime(new Date(), 3, -1), "yyyyMMdd"); logger.info("开始执行昨天的账单查询"); WXPayUtil.downloadfundflow(datestr, "Basic"); WXPayUtil.downloadfundflow(datestr, "Operation"); WXPayUtil.downloadbill(datestr); logger.info("结束执行昨天的账单查询"); } }
[ "15207108156@163.com" ]
15207108156@163.com
b964da58b56ae9a306bf52160e1a0ed6e91c09fa
d0be557b95367efd74a4c5478e3b33b364fb3d2b
/sling/models/src/test/java/io/wcm/sling/models/injectors/impl/AemObjectInjectorResourceTest.java
f250197261d42570b36c68a131d3e87507d9e7af
[ "Apache-2.0" ]
permissive
wcm-io/wcm-io-cq5
39626d150dfd7fd7cb7bdd139e06b6ae49a76e22
3cd9014daa2f5fa10d8a0a44742439e6c2787f0e
refs/heads/master
2016-09-07T19:04:15.283646
2015-06-08T22:09:29
2015-06-08T22:09:29
24,456,766
1
2
null
null
null
null
UTF-8
Java
false
false
4,248
java
/* * #%L * wcm.io * %% * Copyright (C) 2014 wcm.io * %% * 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. * #L% */ package io.wcm.sling.models.injectors.impl; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; import java.lang.reflect.AnnotatedElement; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import com.adobe.granite.xss.XSSAPI; import com.day.cq.wcm.api.Page; import com.day.cq.wcm.api.PageManager; import com.day.cq.wcm.api.WCMMode; import com.day.cq.wcm.api.components.ComponentContext; import com.day.cq.wcm.api.designer.Design; import com.day.cq.wcm.api.designer.Designer; import com.day.cq.wcm.api.designer.Style; @RunWith(MockitoJUnitRunner.class) public class AemObjectInjectorResourceTest { private final AemObjectInjector injector = new AemObjectInjector(); @Mock private AnnotatedElement annotatedElement; @Mock private Resource resource; @Mock private ResourceResolver resourceResolver; @Mock private PageManager pageManager; @Mock private Page resourcePage; @Mock private Designer designer; @Mock private Design design; @Before public void setUp() { when(this.resource.getResourceResolver()).thenReturn(this.resourceResolver); when(this.resourceResolver.adaptTo(PageManager.class)).thenReturn(this.pageManager); when(this.resourceResolver.adaptTo(Designer.class)).thenReturn(this.designer); when(this.pageManager.getContainingPage(this.resource)).thenReturn(this.resourcePage); when(this.designer.getDesign(any(Page.class))).thenReturn(this.design); } @Test public void testPageManager() { Object result = this.injector.getValue(this.resource, null, PageManager.class, this.annotatedElement, null); assertSame(this.pageManager, result); } @Test public void testCurrentPage() { Object result = this.injector.getValue(this.resource, null, Page.class, this.annotatedElement, null); assertSame(this.resourcePage, result); } @Test public void testResourcePage() { Object result = this.injector.getValue(this.resource, "resourcePage", Page.class, this.annotatedElement, null); assertSame(this.resourcePage, result); } @Test public void testWcmMode() { Object result = this.injector.getValue(this.resource, null, WCMMode.class, this.annotatedElement, null); assertNull(result); } @Test public void testComponentContext() { Object result = this.injector.getValue(this.resource, null, ComponentContext.class, this.annotatedElement, null); assertNull(result); } @Test public void testDesigner() { Object result = this.injector.getValue(this.resource, null, Designer.class, this.annotatedElement, null); assertSame(this.designer, result); } @Test public void testDesign() { Object result = this.injector.getValue(this.resource, null, Design.class, this.annotatedElement, null); assertSame(this.design, result); } @Test public void testStyle() { Object result = this.injector.getValue(this.resource, null, Style.class, this.annotatedElement, null); assertNull(result); } @Test public void testXssApi() { Object result = this.injector.getValue(this.resource, null, XSSAPI.class, this.annotatedElement, null); assertNull(result); } @Test public void testInvalid() { Object result = this.injector.getValue(this, null, PageManager.class, this.annotatedElement, null); assertNull(result); } }
[ "sseifert@pro-vision.de" ]
sseifert@pro-vision.de
2c62ed5c9dc14049545f2d99f0fe5cb4d9d06a71
3039a8f072e0cb83edfe7ce6e58b7e5cf424bb44
/src/day20/SwapValues.java
6df124925dbc0391896683f890e265a11aab18de
[]
no_license
qakiran/java-sdet-2020
7e098c0548b1ee77974ee4da7cc7a622e58ca3eb
88447ad1743e0d2ba69d06f4a772dfc602ce93b1
refs/heads/master
2022-11-21T07:47:08.884135
2020-07-05T16:49:05
2020-07-05T16:49:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
543
java
package day20; import java.util.Arrays; public class SwapValues { public static void main(String[] args) { String[] city = {"Aldie", "Arlington", "Tysons", "Chantilly", "DC"}; System.out.println(Arrays.toString(city)); // swap values of first and last element of the array city // [Aldie, Arlington, Tysons, Chantilly, DC] // [DC, Arlington, Tysons, Chantilly, Aldie] String tempVar = city[0]; city[0] = city[city.length - 1]; city[city.length - 1] = tempVar; System.out.println(Arrays.toString(city)); } }
[ "Suranchiyev96@gmail.com" ]
Suranchiyev96@gmail.com
d7c50bbde9afe8e708f6bc9015993bd51e8019c9
a13068e5afc2ce716b46faacc9766e1f50bd00ee
/src/main/java/com/codeborne/selenide/impl/CollectionElement.java
b839f0bc7bc6d5a645101c117227d11f7df47cbe
[ "MIT", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-free-unknown" ]
permissive
mikawajos/selenide
e4d435fc7dfa79e2c69a01cb5343d6f267e95f68
d5ba4e457e724807941dae45224610c32bc65cd5
refs/heads/master
2021-05-25T20:37:36.260713
2020-04-07T17:43:00
2020-04-07T17:43:00
253,911,416
1
0
MIT
2020-04-07T21:03:20
2020-04-07T21:03:20
null
UTF-8
Java
false
false
1,620
java
package com.codeborne.selenide.impl; import com.codeborne.selenide.Condition; import com.codeborne.selenide.Driver; import com.codeborne.selenide.SelenideElement; import com.codeborne.selenide.ex.ElementNotFound; import org.openqa.selenium.WebElement; import java.lang.reflect.Proxy; import static com.codeborne.selenide.Condition.visible; public class CollectionElement extends WebElementSource { public static SelenideElement wrap(WebElementsCollection collection, int index) { return (SelenideElement) Proxy.newProxyInstance( collection.getClass().getClassLoader(), new Class<?>[]{SelenideElement.class}, new SelenideElementProxy(new CollectionElement(collection, index))); } private final WebElementsCollection collection; private final int index; CollectionElement(WebElementsCollection collection, int index) { this.collection = collection; this.index = index; } @Override public Driver driver() { return collection.driver(); } @Override public WebElement getWebElement() { return collection.getElements().get(index); } @Override public String getSearchCriteria() { return collection.description() + '[' + index + ']'; } @Override public ElementNotFound createElementNotFoundError(Condition condition, Throwable lastError) { if (collection.getElements().isEmpty()) { return new ElementNotFound(collection.driver(), collection.description(), visible, lastError); } return super.createElementNotFoundError(condition, lastError); } @Override public String toString() { return getSearchCriteria(); } }
[ "andrei.solntsev@gmail.com" ]
andrei.solntsev@gmail.com
1625e36cb0f15436e712787943302fa5d693d4c9
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/OnlineInviteNewerSummaryInfo.java
853a63ee93742d057ce49370159bac4da96e9e21
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,185
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 线上拉新结算汇总数据模型 * * @author auto create * @since 1.0, 2019-01-17 15:13:01 */ public class OnlineInviteNewerSummaryInfo extends AlipayObject { private static final long serialVersionUID = 2478217272727515459L; /** * 返佣的扩展字段 */ @ApiField("ext_info") private String extInfo; /** * 二级渠道 */ @ApiField("partner_id") private String partnerId; /** * 一级渠道 */ @ApiField("pid") private String pid; /** * 日期 */ @ApiField("report_date") private String reportDate; /** * 当天有效绑卡数量 */ @ApiField("user_bind_card_count") private Long userBindCardCount; /** * 可结算实名数 */ @ApiField("user_cert_settle_count") private Long userCertSettleCount; /** * 可结算新登数 */ @ApiField("user_new_settle_count") private Long userNewSettleCount; public String getExtInfo() { return this.extInfo; } public void setExtInfo(String extInfo) { this.extInfo = extInfo; } public String getPartnerId() { return this.partnerId; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } public String getPid() { return this.pid; } public void setPid(String pid) { this.pid = pid; } public String getReportDate() { return this.reportDate; } public void setReportDate(String reportDate) { this.reportDate = reportDate; } public Long getUserBindCardCount() { return this.userBindCardCount; } public void setUserBindCardCount(Long userBindCardCount) { this.userBindCardCount = userBindCardCount; } public Long getUserCertSettleCount() { return this.userCertSettleCount; } public void setUserCertSettleCount(Long userCertSettleCount) { this.userCertSettleCount = userCertSettleCount; } public Long getUserNewSettleCount() { return this.userNewSettleCount; } public void setUserNewSettleCount(Long userNewSettleCount) { this.userNewSettleCount = userNewSettleCount; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
fc6212a3de4f8827f3680c43d4585fdb3e01970d
746572ba552f7d52e8b5a0e752a1d6eb899842b9
/House/src/main/java/org/springframework/amqp/rabbit/connection/SimpleConnection.java
2c0781a79ca981b65fd1ebd765a990d61efce360
[]
no_license
lobinary/Lobinary
fde035d3ce6780a20a5a808b5d4357604ed70054
8de466228bf893b72c7771e153607674b6024709
refs/heads/master
2022-02-27T05:02:04.208763
2022-01-20T07:01:28
2022-01-20T07:01:28
26,812,634
7
5
null
null
null
null
UTF-8
Java
false
false
1,840
java
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package org.springframework.amqp.rabbit.connection; import java.io.IOException; import org.springframework.amqp.rabbit.support.RabbitExceptionTranslator; import com.rabbitmq.client.Channel; /** * Simply a Connection. * @author Dave Syer * @author Gary Russell * @since 1.0 * */ public class SimpleConnection implements Connection { private final com.rabbitmq.client.Connection delegate; private final int closeTimeout; public SimpleConnection(com.rabbitmq.client.Connection delegate, int closeTimeout) { this.delegate = delegate; this.closeTimeout = closeTimeout; } public Channel createChannel(boolean transactional) { try { Channel channel = delegate.createChannel(); if (transactional) { // Just created so we want to start the transaction channel.txSelect(); } return channel; } catch (IOException e) { throw RabbitExceptionTranslator.convertRabbitAccessException(e); } } public void close() { try { // let the physical close time out if necessary delegate.close(closeTimeout); } catch (IOException e) { throw RabbitExceptionTranslator.convertRabbitAccessException(e); } } public boolean isOpen() { return delegate != null && delegate.isOpen(); } }
[ "919515134@qq.com" ]
919515134@qq.com
ca5a3c2ac7901f887dc41c15f66bbb9a63a9f4f9
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/4/org/jfree/chart/axis/Axis_getTickMarkOutsideLength_889.java
c5a6e5206f40db0b7d7434a5b526dd73844de549
[]
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
1,937
java
org jfree chart axi base ax free chart jfreechart subclass divid displai valu link axi valueaxi displai categori link categori axi categoryaxi axi cloneabl serializ return length tick mark length tick mark insid length gettickmarkinsidelength set tick mark length settickmarkoutsidelength tick mark length gettickmarkoutsidelength tick mark length tickmarkoutsidelength
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
38acba61f5a89b51f681dfccd64e7443b065d15e
ace17daaaf0b4ae9ccc0588f646fae7b961823f0
/spring-framework-web-security/src/main/java/br/com/spring/framework/web/security/ws/MensagemWS.java
c47025d195537322550e715d4dd607576d60d119
[]
no_license
felipe-basina/projetos-java
a74828d66d42ae06d4b19a715d8cbcb011d55a5e
d6bf5d9c1a286b3d86eb9f81422aeaf7e6442f5e
refs/heads/master
2021-05-08T09:45:49.367211
2017-10-16T23:43:19
2017-10-16T23:43:19
107,193,746
0
0
null
null
null
null
UTF-8
Java
false
false
2,571
java
package br.com.spring.framework.web.security.ws; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import org.springframework.stereotype.Component; import org.springframework.web.context.support.SpringBeanAutowiringSupport; @WebService @Component public class MensagemWS extends SpringBeanAutowiringSupport { @WebMethod(operationName = "showMessage") @WebResult(name = "MensagemWSResponse") public MensagemWSResponse showMessage( @WebParam(name = "MensagemWSRequest") MensagemWSRequest request) throws ParametroInvalidoBusinessException { if (request == null || request.getNome() == null || "".equals(request.getNome()) || request.getDtNascimento() == null || "".equals(request.getDtNascimento())) { String camposObrigatorios = "nome e data-nascimento"; throw new ParametroInvalidoBusinessException("Os campos [" + camposObrigatorios + "] sao obrigatorios!"); } String pattern = "^[A-Za-z]+$"; boolean nomeValido = request.getNome().matches(pattern); if (!nomeValido) { throw new ParametroInvalidoBusinessException( "O campo [nome] deve conter somente caracteres de A-Z"); } SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); sdf.setLenient(false); Date dtNascimento = null; try { dtNascimento = sdf.parse(request.getDtNascimento()); } catch (ParseException e) { throw new ParametroInvalidoBusinessException( "O campo [data-nascimento] precisa ser um valor de data valido no formato dd/MM/yyyy!", e); } long idade = this.calcularIdade(dtNascimento); String mensagemFinal = "Ola [" + request.getNome().toUpperCase() + "], voce esta com [" + idade + "] anos de idade!"; MensagemWSResponse response = new MensagemWSResponse(); response.setMensagem(mensagemFinal); return response; } private long calcularIdade(Date dtNascimento) { Calendar dtAtual = Calendar.getInstance(); long anoAtual = dtAtual.get(Calendar.YEAR); long mesAtual = dtAtual.get(Calendar.MONTH); Calendar dtNascimentoCompleta = Calendar.getInstance(); dtNascimentoCompleta.setTime(dtNascimento); long anoNascimento = dtNascimentoCompleta.get(Calendar.YEAR); long mesNascimento = dtNascimentoCompleta.get(Calendar.MONTH); long idade = -1; if (anoAtual > anoNascimento) { idade = anoAtual - anoNascimento; if (mesAtual < mesNascimento) { idade--; } } return idade; } }
[ "felipe.basina@gmail.com" ]
felipe.basina@gmail.com
365125fca20821b76140f0408d7d83cb431b3adf
39892879582267a2fbce29bb72aa7ec74f829b59
/labs/examples/core-java-examples/src/com/examples/java/io/DeserializeEx.java
adb17d9e4cdc97bc23a26cd0b7ad1683edae9a8e
[]
no_license
nakulgopinath/ibm-fsd-jul2019
812ae3c9c853f77da4ff4a41bfae65747786e40e
e49feda8cb96641e618650f3fb30d9735e856692
refs/heads/master
2020-07-28T16:28:32.419754
2019-09-18T11:09:58
2019-09-18T11:09:58
209,465,998
3
1
null
2019-09-19T05:00:31
2019-09-19T05:00:31
null
UTF-8
Java
false
false
922
java
package com.examples.java.io; import java.io.*; public class DeserializeEx { public static void main(String [] args) { Employee e = null; try { FileInputStream fileIn = new FileInputStream("D:\\Temp\\employee.ser"); ObjectInputStream in = new ObjectInputStream(fileIn); e = (Employee) in.readObject(); in.close(); fileIn.close(); } catch (IOException i) { i.printStackTrace(); return; } catch (ClassNotFoundException c) { System.out.println("Employee class not found"); c.printStackTrace(); return; } System.out.println("Deserialized Employee..."); System.out.println("Name: " + e.name); System.out.println("Address: " + e.address); System.out.println("UID: " + e.uid); System.out.println("Id: " + e.id); System.out.println("Skill: " + e.skills); } }
[ "saravana.anbarasu@gmail.com" ]
saravana.anbarasu@gmail.com
0a584257d48a0734ab6893666109e066ac7c3558
689cdf772da9f871beee7099ab21cd244005bfb2
/classes2/com/tencent/open/PKDialog$OnTimeListener.java
1f873af1baef169c6e3269ac63bf7038b53525bd
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
2,277
java
package com.tencent.open; import android.content.Context; import android.os.SystemClock; import com.tencent.open.b.g; import com.tencent.open.utils.Util; import com.tencent.tauth.IUiListener; import com.tencent.tauth.UiError; import java.lang.ref.WeakReference; import org.json.JSONException; import org.json.JSONObject; class PKDialog$OnTimeListener implements IUiListener { private String mAction; String mAppid; String mUrl; private WeakReference<Context> mWeakCtx; private IUiListener mWeakL; public PKDialog$OnTimeListener(Context paramContext, String paramString1, String paramString2, String paramString3, IUiListener paramIUiListener) { this.mWeakCtx = new WeakReference(paramContext); this.mAction = paramString1; this.mUrl = paramString2; this.mAppid = paramString3; this.mWeakL = paramIUiListener; } private void onComplete(String paramString) { try { onComplete(Util.parseJson(paramString)); return; } catch (JSONException localJSONException) { localJSONException.printStackTrace(); onError(new UiError(-4, "服务器返回数据格式有误!", paramString)); } } public void onCancel() { if (this.mWeakL != null) { this.mWeakL.onCancel(); this.mWeakL = null; } } public void onComplete(Object paramObject) { paramObject = (JSONObject)paramObject; g.a().a(this.mAction + "_H5", SystemClock.elapsedRealtime(), 0L, 0L, ((JSONObject)paramObject).optInt("ret", -6), this.mUrl, false); if (this.mWeakL != null) { this.mWeakL.onComplete(paramObject); this.mWeakL = null; } } public void onError(UiError paramUiError) { if (paramUiError.errorMessage != null) {} for (String str = paramUiError.errorMessage + this.mUrl;; str = this.mUrl) { g.a().a(this.mAction + "_H5", SystemClock.elapsedRealtime(), 0L, 0L, paramUiError.errorCode, str, false); if (this.mWeakL != null) { this.mWeakL.onError(paramUiError); this.mWeakL = null; } return; } } } /* Location: E:\apk\dazhihui2\classes2-dex2jar.jar!\com\tencent\open\PKDialog$OnTimeListener.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
891d746f509dce7dc0b6afbb577b2d60b2ced3f0
36837cc0f662ff1984f2f528adb227f97644abc6
/products2/src/main/java/com/eldar/products2/entities/Product.java
089d3ecc5fa314404805c16a4325ae4fa6a84941
[]
no_license
eldarba/angular-jwt-spring
2889ea447f0a3de2951c7619c3e49b1939df434c
7034fd79addb51b80eb1b0cadf13b1a4993b15d4
refs/heads/master
2022-05-16T20:41:14.141995
2022-04-04T12:13:15
2022-04-04T12:13:15
232,820,067
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.eldar.products2.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class Product { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column private int id; @Column private String name; @Column private double price; @Column private int stock; public Product() { } public Product(int id, String name, double price, int stock) { super(); this.id = id; this.name = name; this.price = price; this.stock = stock; } public Product(int id) { super(); this.id = id; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public int getStock() { return stock; } public void setStock(int stock) { this.stock = stock; } @Override public String toString() { return "Product [id=" + id + ", name=" + name + ", price=" + price + ", stock=" + stock + "]"; } }
[ "eldarba@gmail.com" ]
eldarba@gmail.com
708a87c3b75e4cfeb3533f822d824cc8df8eb494
76efa72e33aba7eb75b77ae01ed8a45f97f6a9e2
/src/main/java/com/jsoniter/CodegenAccess.java
e83ac5f4f20fd95f58b1957bc0f25d139fc3fd4d
[ "MIT" ]
permissive
neven7/java
e72e3e1917b5091e77b7d7be3c09b59e9b619bfe
4b65094d22d6c88462c49b338bf7b4f398a32258
refs/heads/master
2021-01-11T10:30:19.297429
2016-12-13T01:59:32
2016-12-13T01:59:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,303
java
package com.jsoniter; import java.io.IOException; // only uesd by generated code to access decoder public class CodegenAccess { public static final boolean readBoolean(String cacheKey, Jsoniter iter) throws IOException { return Codegen.getBooleanDecoder(cacheKey).decodeBoolean(iter); } public static final short readShort(String cacheKey, Jsoniter iter) throws IOException { return Codegen.getShortDecoder(cacheKey).decodeShort(iter); } public static final int readInt(String cacheKey, Jsoniter iter) throws IOException { return Codegen.getIntDecoder(cacheKey).decodeInt(iter); } public static final long readLong(String cacheKey, Jsoniter iter) throws IOException { return Codegen.getLongDecoder(cacheKey).decodeLong(iter); } public static final float readFloat(String cacheKey, Jsoniter iter) throws IOException { return Codegen.getFloatDecoder(cacheKey).decodeFloat(iter); } public static final double readDouble(String cacheKey, Jsoniter iter) throws IOException { return Codegen.getDoubleDecoder(cacheKey).decodeDouble(iter); } public static final <T> T read(String cacheKey, Jsoniter iter) throws IOException { return (T) Codegen.getDecoder(cacheKey, null).decode(iter); } }
[ "taowen@gmail.com" ]
taowen@gmail.com
6f55821868b66daa30ad9bb8fdc99eecf586a272
c3eaac04f8c9ed71f0b78f72addbc24227c9c38a
/addressbook-web-tests/src/test/java/ru/stqa/pft/addressbook/lessons_67/model/GroupData.java
96d63ee86e577620c89e3ac63c986fd9c1c46c0d
[ "Apache-2.0" ]
permissive
freeitgroupe/qa_crm
cf4695ae9f59ba472ab484c4be4a68d9f883c0bf
8c83f8cea3cf0f3bbc2970019838bf4f66ac97a4
refs/heads/main
2023-04-19T22:40:51.911379
2021-04-27T20:45:31
2021-04-27T20:45:31
311,136,256
0
0
null
null
null
null
UTF-8
Java
false
false
1,845
java
package ru.stqa.pft.addressbook.lessons_67.model; import com.google.gson.annotations.Expose; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamOmitField; @XStreamAlias("group") public class GroupData { @XStreamOmitField private int id = Integer.MAX_VALUE; @Expose private String name; @Expose private String header; @Expose private String footer; public int getId() { return id; } public GroupData withId(int id) { this.id = id; return this; //возвращаем объект в котором данный метод вызван } public GroupData withName(String name) { this.name = name; return this; } public GroupData withHeader(String header) { this.header = header; return this; } public GroupData withFooter(String footer) { this.footer = footer; return this; } //возвращаем имя атрибута public String getName() { return name; } //возвращаем имя атрибута public String getHeader() { return header; } //возвращаем имя атрибута public String getFooter() { return footer; } @Override public String toString() { return "GroupData{" + "name='" + name + '\'' + ", id='" + id + '\'' + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GroupData groupData = (GroupData) o; if (id != groupData.id) return false; return name != null ? name.equals(groupData.name) : groupData.name == null; } @Override public int hashCode() { int result = id; result = 31 * result + (name != null ? name.hashCode() : 0); return result; } }
[ "freeitgroupe@gmail.com" ]
freeitgroupe@gmail.com
a04cb1de58545125b5954d4140536790d735cf53
85f573af305c07112cf3296c4c9e26935b0350ad
/app/src/main/java/com/haoyigou/hyg/fragment/FenLeiFragment.java
2c9c9b2e68dff15a23fb061afcb66cc14c96ca1b
[]
no_license
wuliang6661/Turuk
0cc8c483c4a8cb536874e7025437042dcbb00a11
4e3a4c0562f0f0f2e7bf9fd47166541550959d62
refs/heads/main
2023-07-20T17:58:56.764287
2021-09-03T14:26:18
2021-09-03T14:26:18
402,777,968
0
0
null
null
null
null
UTF-8
Java
false
false
7,344
java
package com.haoyigou.hyg.fragment; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.GridView; import android.widget.ListView; import android.widget.TextView; import androidx.annotation.Nullable; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.haoyigou.hyg.R; import com.haoyigou.hyg.config.StateMessage; import com.haoyigou.hyg.ui.LoginActivity; import com.haoyigou.hyg.ui.SelectorActivity; import com.haoyigou.hyg.adapter.ClassifyAdapter; import com.haoyigou.hyg.application.GlobalApplication; import com.haoyigou.hyg.common.http.AsyncHttpResponseHandler; import com.haoyigou.hyg.common.http.HttpClient; import com.haoyigou.hyg.entity.ClassifyShopEntry; import com.haoyigou.hyg.entity.ShopClassifyEntry; import com.haoyigou.hyg.ui.VoucherCenterAct; import com.haoyigou.hyg.utils.SharedPreferencesUtils; import com.haoyigou.hyg.utils.StringUtils; import com.haoyigou.hyg.view.superadapter.CommonAdapter; import com.haoyigou.hyg.view.superadapter.ViewHolder; import com.haoyigou.hyg.base.BaseFragment; import java.util.HashMap; import java.util.List; import java.util.Map; import butterknife.BindView; import butterknife.ButterKnife; /** * 分类fragment */ public class FenLeiFragment extends BaseFragment implements AdapterView.OnItemClickListener { @BindView(R.id.select_edit) TextView selectEdit; @BindView(R.id.classifytitle) ListView classifytitle; @BindView(R.id.shop_details) GridView shopDetails; List<ClassifyShopEntry> shopLists; //商品列表 ClassifyAdapter adapter;//分类适配器 CommonAdapter<ShopClassifyEntry> shopAdapter; private static int position = 0; //记录上次点击的分类,默认第一项 private String disId; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fra_classify, container, false); ButterKnife.bind(this, view); return view; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); // back.setVisibility(View.GONE); // titleText.setText("全部商品"); disId = SharedPreferencesUtils.getInstance().getString("distributorId", "1"); if (GlobalApplication.user != null) { String search = GlobalApplication.user.getSearchdesc(); if (search != null) { selectEdit.setText(search); } } setListener(); getClassifyMessage(); } /** * 设置监听 */ private void setListener() { classifytitle.setOnItemClickListener(this); shopDetails.setOnItemClickListener(this); selectEdit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // Intent intent = new Intent(getActivity(), HomeWebViewAct.class); // intent.putExtra("url", HttpClient.SEARCH + "?distributorId=" + disId); // startActivity(intent); goToActivity(SelectorActivity.class, false); } }); } /*** * 请求分类数据 */ private void getClassifyMessage() { Map<String, Object> params = new HashMap<>(); HttpClient.get(HttpClient.CLASSIFY, params, new AsyncHttpResponseHandler() { @Override public void onSuccess(String content) { super.onSuccess(content); // Log.e("log--class", content); JSONObject object = JSON.parseObject(content); if (object.getString("status").equals(HttpClient.RET_SUCCESS_CODE)) { String result = object.getString("result"); shopLists = JSONArray.parseArray(result, ClassifyShopEntry.class); if (shopLists != null && shopLists.size() != 0) { setClassifyAdapter(); setShopGridAdapter(shopLists.get(0)); //默认显示第一个分类 } } } }, getActivity(), false); } /*** * 设置界面显示 */ private void setClassifyAdapter() { adapter = new ClassifyAdapter(getActivity(), shopLists); classifytitle.setAdapter(adapter); } /** * 设置商品显示,默认显示第一个 */ private void setShopGridAdapter(ClassifyShopEntry entry) { shopAdapter = new CommonAdapter<ShopClassifyEntry>(getActivity(), R.layout.item_class_shop, entry.getSecond()) { @Override protected void convert(ViewHolder viewHolder, ShopClassifyEntry item, int position) { if (!StringUtils.isEmpty(item.getImgurl())) { viewHolder.setImageUrl(R.id.shop_img, item.getImgurl()); } else { viewHolder.setImageResource(R.id.shop_img, R.drawable.default_image); } viewHolder.setText(R.id.shop_name, item.getName()); } }; shopDetails.setAdapter(shopAdapter); } @Override public void onDestroyView() { super.onDestroyView(); } @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { switch (adapterView.getId()) { case R.id.classifytitle: if (i != position) { position = i; adapter.setPosition(i); setShopGridAdapter(shopLists.get(i)); } break; case R.id.shop_details: if (position == 0) { if (StateMessage.IS_LOGIN) { // Intent intentVoucher = new Intent(getActivity(), VoucherCenterAct.class); // intentVoucher.putExtra("type", i); // startActivity(intentVoucher); Intent intent = new Intent(getActivity(), SelectorActivity.class); intent.putExtra("Pfflid", shopLists.get(position).getId()); intent.putExtra("pfflid", shopLists.get(position).getSecond().get(i).getId()); startActivity(intent); return; } else { Intent intent = new Intent(getActivity(), LoginActivity.class); intent.putExtra("addFinish", true); startActivity(intent); getActivity().finish(); return; } } Intent intent = new Intent(getActivity(), SelectorActivity.class); intent.putExtra("Pfflid", shopLists.get(position).getId()); intent.putExtra("pfflid", shopLists.get(position).getSecond().get(i).getId()); startActivity(intent); break; } } }
[ "wy19941007" ]
wy19941007
acbc0cc3fe8c63b29682cc3d48782978802c4af4
0296b2c9341e334ce41fe7d2cd5e0287b1975889
/tags/isoparser-1.0-beta-3/src/main/java/com/coremedia/iso/boxes/EditListBox.java
b6f1ccc4000fbc4eda6430780727871c28c63369
[]
no_license
Angiefl/mp4parser
0133aed52915e16108be218c3077f50e5c31996c
a556eeb220fb6240cd5399d1b92212e749902f0c
refs/heads/master
2021-01-13T14:37:03.226591
2014-07-22T09:29:26
2014-07-22T09:29:26
51,381,080
0
0
null
null
null
null
UTF-8
Java
false
false
4,735
java
/* * Copyright 2008 CoreMedia AG, Hamburg * * 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.coremedia.iso.boxes; import com.coremedia.iso.BoxParser; import com.coremedia.iso.IsoBufferWrapper; import com.coremedia.iso.IsoFile; import com.coremedia.iso.IsoOutputStream; import java.io.IOException; /** * <code> * Box Type : 'elst'<br> * Container: {@link EditBox}('edts')<br> * Mandatory: No<br> * Quantity : Zero or one</code><br><br> * This box contains an explicit timeline map. Each entry defines part of the track time-line: by mapping part of * the media time-line, or by indicating 'empty' time, or by defining a 'dwell', where a single time-point in the * media is held for a period.<br> * Note that edits are not restricted to fall on sample times. This means that when entering an edit, it can be * necessary to (a) back up to a sync point, and pre-roll from there and then (b) be careful about the duration of * the first sample - it might have been truncated if the edit enters it during its normal duration. If this is audio, * that frame might need to be decoded, and then the final slicing done. Likewise, the duration of the last sample * in an edit might need slicing. <br> * Starting offsets for tracks (streams) are represented by an initial empty edit. For example, to play a track from * its start for 30 seconds, but at 10 seconds into the presentation, we have the following edit list:<br> * <p/> * <li>Entry-count = 2</li> * <li>Segment-duration = 10 seconds</li> * <li>Media-Time = -1</li> * <li>Media-Rate = 1</li> * <li>Segment-duration = 30 seconds (could be the length of the whole track)</li> * <li>Media-Time = 0 seconds</li> * <li>Media-Rate = 1</li> */ public class EditListBox extends AbstractFullBox { private long[] segmentDurations; private long[] mediaTimes; private double[] mediaRates; public static final String TYPE = "elst"; public EditListBox() { super(IsoFile.fourCCtoBytes(TYPE)); } public long[] getSegmentDurations() { return segmentDurations; } public long[] getMediaTimes() { return mediaTimes; } public double[] getMediaRates() { return mediaRates; } public String getDisplayName() { return "Edit List Box"; } protected long getContentSize() { long contentSize = 4; if (getVersion() == 1) { contentSize += mediaRates.length * 16; } else { contentSize += mediaRates.length * 8; } contentSize += mediaRates.length * 4; return contentSize; } public void parse(IsoBufferWrapper in, long size, BoxParser boxParser, Box lastMovieFragmentBox) throws IOException { super.parse(in, size, boxParser, lastMovieFragmentBox); long entryCount = in.readUInt32(); if (entryCount > Integer.MAX_VALUE) { throw new IOException("The parser cannot deal with more than Integer.MAX_VALUE entries!"); } segmentDurations = new long[(int) entryCount]; mediaTimes = new long[(int) entryCount]; mediaRates = new double[(int) entryCount]; for (int i = 0; i < entryCount; i++) { if (getVersion() == 1) { segmentDurations[i] = in.readUInt64(); mediaTimes[i] = in.readUInt64(); } else { segmentDurations[i] = in.readUInt32(); mediaTimes[i] = in.readUInt32(); } mediaRates[i] = in.readFixedPoint1616(); } } protected void getContent(IsoOutputStream isos) throws IOException { isos.writeUInt32(segmentDurations.length); for (int i = 0; i < segmentDurations.length; i++) { if (getVersion() == 1) { isos.writeUInt64(segmentDurations[i]); isos.writeUInt64(mediaTimes[i]); } else { isos.writeUInt32((int) segmentDurations[i]); isos.writeUInt32((int) mediaTimes[i]); } isos.writeFixedPont1616(mediaRates[i]); } } public String toString() { return "EditListBox[entryCount=" + segmentDurations.length + "]"; } }
[ "Sebastian.Annies@gmail.com" ]
Sebastian.Annies@gmail.com
3b555e09013748e657ad242e3478fc56c15fd7a7
d9b14f351f668b004c4cb05a10d09e7e85243317
/src/BaekJoon/_Before_Tagging/AP1287.java
3287109902792a9172a54a1ec3acf0b5e61044df
[]
no_license
nn98/Algorithm
262cbe20c71ff9b5de292c244b95a2a0c25e5bd7
55b6db19cb9f2aa5c5056f5cabd2b22715b682fd
refs/heads/main
2023-08-17T04:39:41.236707
2023-08-16T13:04:34
2023-08-16T13:04:34
178,701,901
0
0
null
null
null
null
UTF-8
Java
false
false
546
java
package BaekJoon._Before_Tagging; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class AP1287 { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st=new StringTokenizer(br.readLine()); StringBuilder sb=new StringBuilder(); while(st.hasMoreTokens()) { String s=st.nextToken(); // if(s.equals("(")) } } }
[ "jkllhgb@gmail.com" ]
jkllhgb@gmail.com
fcd68981d17f285184681722c0db432faf5f89ac
752e6c7fef25eb3feedca9f79803b8fa6cbe80a1
/ogham-test-utils/src/main/java/fr/sii/ogham/assertion/AssertionHelper.java
8e102a6aafaa16ee2b4078ac5621eaaab2b4977f
[ "Apache-2.0" ]
permissive
demkada/ogham
57a77df8f021446a2896101c022b4660253b302a
f399f2c8f3eb3d43b46cfa62da86cee384b23390
refs/heads/master
2020-05-24T07:43:39.285995
2019-05-25T07:36:33
2019-05-25T07:36:33
187,167,117
0
0
Apache-2.0
2019-05-17T07:20:46
2019-05-17T07:20:46
null
UTF-8
Java
false
false
4,967
java
package fr.sii.ogham.assertion; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.MatcherAssert; import org.hamcrest.StringDescription; import org.junit.ComparisonFailure; import fr.sii.ogham.assertion.hamcrest.ComparisonAwareMatcher; import fr.sii.ogham.assertion.hamcrest.CustomReason; import fr.sii.ogham.assertion.hamcrest.DecoratorMatcher; import fr.sii.ogham.assertion.hamcrest.ExpectedValueProvider; /** * Utility class for Ogham assertions. * * @author Aurélien Baudet * */ public class AssertionHelper { /** * Copy of {@link MatcherAssert#assertThat(Object, Matcher)} with the * following additions: * <ul> * <li>If the matcher can provide expected value, a * {@link ComparisonFailure} exception is thrown instead of * {@link AssertionError} in order to display differences between expected * string and actual string in the IDE.</li> * <li>If the matcher is a {@link CustomReason} matcher and no reason is * provided, the reason of the matcher is used to provide more information * about the context (which message has failed for example)</li> * </ul> * * @param actual * the actual value * @param matcher * the matcher to apply * @param <T> * the type used for the matcher */ public static <T> void assertThat(T actual, Matcher<? super T> matcher) { assertThat("", actual, matcher); } /** * Copy of {@link MatcherAssert#assertThat(String, Object, Matcher)} with * the following additions: * <ul> * <li>If the matcher can provide expected value, a * {@link ComparisonFailure} exception is thrown instead of * {@link AssertionError} in order to display differences between expected * string and actual string in the IDE.</li> * <li>If the matcher is a {@link CustomReason} matcher and no reason is * provided, the reason of the matcher is used to provide more information * about the context (which message has failed for example)</li> * </ul> * * @param reason * the reason * @param actual * the actual value * @param matcher * the matcher to apply * @param <T> * the type used for the matcher */ public static <T> void assertThat(String reason, T actual, Matcher<? super T> matcher) { if (!matcher.matches(actual)) { Description description = getDescription(reason, actual, matcher); if (hasExpectedValue(matcher)) { ExpectedValueProvider<T> comparable = getComparable(matcher); throw new ComparisonFailure(description.toString(), String.valueOf(comparable==null ? null : comparable.getExpectedValue()), String.valueOf(actual)); } else { throw new AssertionError(description.toString()); } } } @SuppressWarnings("unchecked") private static <T> boolean hasExpectedValue(Matcher<? super T> matcher) { if (matcher instanceof ExpectedValueProvider) { return true; } if (matcher instanceof DecoratorMatcher) { return hasExpectedValue(((DecoratorMatcher<T>) matcher).getDecoree()); } return false; } @SuppressWarnings("unchecked") private static <T> ExpectedValueProvider<T> getComparable(Matcher<? super T> matcher) { if (matcher instanceof ExpectedValueProvider) { return (ExpectedValueProvider<T>) matcher; } if (matcher instanceof DecoratorMatcher) { return getComparable(((DecoratorMatcher<T>) matcher).getDecoree()); } return null; } private static <T> Description getDescription(String reason, T actual, Matcher<? super T> matcher) { String additionalText = null; ComparisonAwareMatcher cam = getComparisonAwareMatcher(matcher); if(cam!=null) { additionalText = cam.comparisonMessage(); } return getDescription(reason, actual, matcher, additionalText); } @SuppressWarnings("unchecked") private static <T> ComparisonAwareMatcher getComparisonAwareMatcher(Matcher<? super T> matcher) { if (matcher instanceof ComparisonAwareMatcher) { return (ComparisonAwareMatcher) matcher; } if (matcher instanceof DecoratorMatcher) { return getComparisonAwareMatcher(((DecoratorMatcher<T>) matcher).getDecoree()); } return null; } private static <T> Description getDescription(String reason, T actual, Matcher<? super T> matcher, String additionalText) { // @formatter:off Description description = new StringDescription(); description.appendText(getReason(reason, matcher)) .appendText(additionalText==null ? "" : ("\n"+additionalText)) .appendText("\nExpected: ") .appendDescriptionOf(matcher) .appendText("\n but: "); matcher.describeMismatch(actual, description); // @formatter:on return description; } private static <T> String getReason(String reason, Matcher<? super T> matcher) { if (reason != null && !reason.isEmpty()) { return reason; } if (matcher instanceof CustomReason) { return ((CustomReason<?>) matcher).getReason(); } return ""; } private AssertionHelper() { super(); } }
[ "abaudet@sii.fr" ]
abaudet@sii.fr
687cafb984c24e5b2204f604ea4c146a18f64636
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/google/ads/mediation/MediationServerParameters.java
c56d3e1876cfc8b0ddb501016a9c83fec4520781
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
3,481
java
package com.google.ads.mediation; import com.google.android.gms.internal.zzqf; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @Deprecated public abstract class MediationServerParameters { public static final class MappingException extends Exception { public MappingException(String str) { super(str); } } @Target({ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) protected @interface Parameter { String name(); boolean required() default true; } public void load(Map<String, String> map) throws MappingException { Field[] fields; HashMap hashMap = new HashMap(); for (Field field : getClass().getFields()) { Parameter parameter = (Parameter) field.getAnnotation(Parameter.class); if (parameter != null) { hashMap.put(parameter.name(), field); } } if (hashMap.isEmpty()) { zzqf.zzbh("No server options fields detected. To suppress this message either add a field with the @Parameter annotation, or override the load() method."); } for (Entry entry : map.entrySet()) { Field field2 = (Field) hashMap.remove(entry.getKey()); if (field2 != null) { try { field2.set(this, entry.getValue()); } catch (IllegalAccessException e) { String str = (String) entry.getKey(); zzqf.zzbh(new StringBuilder(String.valueOf(str).length() + 49).append("Server option \"").append(str).append("\" could not be set: Illegal Access").toString()); } catch (IllegalArgumentException e2) { String str2 = (String) entry.getKey(); zzqf.zzbh(new StringBuilder(String.valueOf(str2).length() + 43).append("Server option \"").append(str2).append("\" could not be set: Bad Type").toString()); } } else { String str3 = (String) entry.getKey(); String str4 = (String) entry.getValue(); zzqf.zzbf(new StringBuilder(String.valueOf(str3).length() + 31 + String.valueOf(str4).length()).append("Unexpected server option: ").append(str3).append(" = \"").append(str4).append("\"").toString()); } } StringBuilder sb = new StringBuilder(); for (Field field3 : hashMap.values()) { if (((Parameter) field3.getAnnotation(Parameter.class)).required()) { String str5 = "Required server option missing: "; String valueOf = String.valueOf(((Parameter) field3.getAnnotation(Parameter.class)).name()); zzqf.zzbh(valueOf.length() != 0 ? str5.concat(valueOf) : new String(str5)); if (sb.length() > 0) { sb.append(", "); } sb.append(((Parameter) field3.getAnnotation(Parameter.class)).name()); } } if (sb.length() > 0) { String str6 = "Required server option(s) missing: "; String valueOf2 = String.valueOf(sb.toString()); throw new MappingException(valueOf2.length() != 0 ? str6.concat(valueOf2) : new String(str6)); } } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
64dce859e30276741e725ea543a3993de205e713
0b666255a6945aa84281e5f64f6ccaab45c4ca13
/cmsv2.0.0/src/com/app/cms/dao/assist/CmsVoteItemDao.java
331d3bf285e05a734df92ced4315656f9ef10658
[]
no_license
zhangygit/cmsv2.0.0
a8cdc77ceb99b50bdf5b8ac7c99244c3ecc7e43a
d54ae6bc9855860c7d447629d31d22e2c9417d31
refs/heads/master
2021-01-17T21:28:52.841407
2014-08-25T02:13:00
2014-08-25T02:13:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
package com.app.cms.dao.assist; import com.app.cms.entity.assist.CmsVoteItem; import com.app.common.hibernate3.Updater; import com.app.common.page.Pagination; public interface CmsVoteItemDao { public Pagination getPage(int pageNo, int pageSize); public CmsVoteItem findById(Integer id); public CmsVoteItem save(CmsVoteItem bean); public CmsVoteItem updateByUpdater(Updater<CmsVoteItem> updater); public CmsVoteItem deleteById(Integer id); }
[ "17909328@163.com" ]
17909328@163.com
18258d79c8b82e19b047525e64ac1388104eceda
57653c870d15158b2d9c30dfd48d490258b75c1c
/mango-db/test/io/pelle/mango/db/test/mockup/entities/DBTest3.java
81b2531ef0d1eb21a05d56b504bc73ada3246cb9
[]
no_license
pellepelster/mango
edf3938a80edf336e17f4079db3bf7aa638a74ce
ecd09e877eb59630feb449fb260574eb8705bc3b
refs/heads/master
2016-09-15T19:43:24.564927
2015-12-18T17:04:39
2015-12-18T17:04:39
20,863,367
5
2
null
2015-07-13T20:38:13
2014-06-15T19:26:57
Java
UTF-8
Java
false
false
1,595
java
/** * Copyright (c) 2013 Christian Pelster. * * 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: * Christian Pelster - initial API and implementation */ package io.pelle.mango.db.test.mockup.entities; import io.pelle.mango.client.base.vo.IBaseEntity; import io.pelle.mango.server.base.BaseEntity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity @Table(name = "test3") public class DBTest3 extends BaseEntity implements IBaseEntity { @Id @Column(name = "test3_id") @GeneratedValue(strategy = GenerationType.TABLE, generator = "test3_id_seq") @SequenceGenerator(name = "test3_id_seq", sequenceName = "test3_id_seq", allocationSize = 1) private long id; private String testString; @OneToOne private DBTest1 test1; /** {@inheritDoc} */ @Override public long getId() { return this.id; } public DBTest1 getTest1() { return this.test1; } public String getTestString() { return this.testString; } public void setId(long id) { this.id = id; } public void setTest1(DBTest1 test1) { this.test1 = test1; } public void setTestString(String testString) { this.testString = testString; } }
[ "pelle@pelle.io" ]
pelle@pelle.io
919f1485bbbf377d9e7d9fa8b4e51604cd22c961
f30d9a3b532a9f374a74378f0e008da36bdd2de0
/src/main/java/pokecube/legends/conditions/Mew.java
e06e46a33e43f2c0fa681eea3c6357ccbb054efb
[ "MIT" ]
permissive
Pokecube-Development/Pokecube-Legends
027b523bcdcf09a88f09f1707d046a9b5a22a5ff
355603f0539a2f0f9eef1f6ad80ae0d16b533c28
refs/heads/master
2020-04-01T07:31:58.920625
2020-01-25T03:31:41
2020-01-25T03:31:41
152,993,217
0
9
MIT
2020-01-23T02:08:42
2018-10-14T16:12:47
Java
UTF-8
Java
false
false
1,198
java
package pokecube.legends.conditions; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.text.TextComponentString; import pokecube.core.database.Database; import pokecube.core.database.PokedexEntry; import pokecube.core.database.stats.CaptureStats; import pokecube.core.interfaces.IPokemob; import pokecube.core.moves.implementations.actions.ActionTeleport; public class Mew extends Condition { @Override public boolean canCapture(Entity trainer) { return false; } @Override public boolean canCapture(Entity trainer, IPokemob pokemon) { int caught = CaptureStats.getNumberUniqueCaughtBy(trainer.getUniqueID()); if (caught < Database.spawnables.size() - 1) { if (trainer instanceof EntityPlayer) ((EntityPlayer) trainer) .sendMessage(new TextComponentString("You do not have enough badges to control Mew!")); ActionTeleport.teleportRandomly(pokemon.getEntity()); return false; } return true; } @Override public PokedexEntry getEntry() { return Database.getEntry("Mew"); } }
[ "elpatricimo@gmail.com" ]
elpatricimo@gmail.com
250788c8352fb436f9a45a33721d32594546c7a8
b213c0ecab539eea0bd1a9487a1d2187b583f086
/src/main/java/com/tenfen/www/util/TokenService.java
2f9ae6bd2f69bb96877f11a9195b2958767d399a
[]
no_license
yangjinbo47/flux
dd3df45e363b3b98c7b2933b2e1ef0a6a229fca6
0270e39e7ff045b37b8c2325baf286c2916c1cda
refs/heads/master
2020-05-29T15:41:05.020638
2019-01-04T04:27:00
2019-01-04T04:27:00
68,091,529
0
1
null
null
null
null
UTF-8
Java
false
false
7,738
java
package com.tenfen.www.util; import java.net.URLEncoder; import java.security.MessageDigest; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import com.tenfen.util.LogUtil; import com.tenfen.util.encrypt.SHA1; public class TokenService { /** * 请求参数封装类 * @author * */ public static class TokenParam { private String name; private String value; public TokenParam(String name, String value){ this.name = name; this.value = value; } public String getName() { return name; } public String getValue() { return value; } } /** * TokenParam Comparator */ private final static Comparator<TokenService.TokenParam> TOKEN_COMPARATOR = new Comparator<TokenService.TokenParam>() { @Override public int compare(TokenParam o1, TokenParam o2) { return o1.getName().compareTo(o2.getName()); } }; /** * 构建通用Token(天翼阅读) * @param tokenParams * @param clientSecret * @return */ public static String buildToken(List<TokenParam> tokenParams, String clientSecret) { //排序 Collections.sort(tokenParams, TOKEN_COMPARATOR); StringBuilder tokenBuf = new StringBuilder(); for (TokenParam param : tokenParams) { tokenBuf.append(param.getName()).append("=").append(param.getValue()).append("&"); } //加密前的字符串 String myMd5 = tokenBuf.deleteCharAt(tokenBuf.length() - 1).append(clientSecret).toString(); try { myMd5 = myMD5(myMd5); } catch (Exception e) { LogUtil.error(e.getMessage(), e); } return myMd5; } /** * 生成微信token * @param tokenParams * @param clientSecret * @return */ public static String buildWXToken(List<TokenParam> tokenParams, String clientSecret) { //排序 Collections.sort(tokenParams, TOKEN_COMPARATOR); StringBuilder tokenBuf = new StringBuilder(); for (TokenParam param : tokenParams) { tokenBuf.append(param.getName()).append("=").append(param.getValue()).append("&"); } //加密前的字符串 String myMd5 = tokenBuf.append("key="+clientSecret).toString(); try { myMd5 = myMD5(myMd5).toUpperCase(); } catch (Exception e) { LogUtil.error(e.getMessage(), e); } return myMd5; } /** * 构建通用Token(天翼空间-通用) * @param tokenParams * @param clientSecret * @return */ public static String buildTySpaceToken(List<TokenParam> tokenParams, String clientSecret) { //排序 Collections.sort(tokenParams, TOKEN_COMPARATOR); StringBuilder tokenBuf = new StringBuilder(); for (TokenParam param : tokenParams) { tokenBuf.append(param.getName()).append(param.getValue()); } String returnString = null; try { //url encode String encodeString = URLEncoder.encode(tokenBuf.toString(), "UTF-8"); //加密前的字符串 String myData = encodeString+clientSecret; returnString = SHA1.getDigestOfString(myData.getBytes()).toLowerCase(); } catch (Exception e) { LogUtil.error(e.getMessage(), e); } return returnString; } /** * 构建支付宝签名体 * @param tokenParams * @param clientSecret * @return */ public static String buildAlipayToken(List<TokenParam> tokenParams) { //排序 Collections.sort(tokenParams, TOKEN_COMPARATOR); StringBuilder tokenBuf = new StringBuilder(); for (TokenParam param : tokenParams) { tokenBuf.append(param.getName()).append("=").append(param.getValue()).append("&"); } String returnString = null; try { //加密前的字符串 String mySign = tokenBuf.deleteCharAt(tokenBuf.length() - 1).toString(); returnString = mySign; } catch (Exception e) { LogUtil.error(e.getMessage(), e); } return returnString; } /** * MD5简单实现 * @param s * @return */ private final static String myMD5(String s) { char hexDigits[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; try { byte[] btInput = s.getBytes("UTF-8"); // 获得MD5摘要算法的 MessageDigest 对象 MessageDigest mdInst = MessageDigest.getInstance("MD5"); // 使用指定的字节更新摘要 mdInst.update(btInput); // 获得密文 byte[] md = mdInst.digest(); // 把密文转换成十六进制的字符串形式 char[] str = encodeHex(md, hexDigits); return new String(str); } catch (Exception e) { e.printStackTrace(); return null; } } /** * 将消息摘要转换成十六进制表示 * @param data * @param toDigits * @return */ protected static char[] encodeHex(byte[] data, char[] toDigits) { int l = data.length; char[] out = new char[l << 1]; // two characters form the hex value. for (int i = 0, j = 0; i < l; i++) { out[j++] = toDigits[(0xF0 & data[i]) >>> 4]; out[j++] = toDigits[0x0F & data[i]]; } return out; } /** * 测试 * @param args */ // public static void main(String[] args) { // try { // String method = "getSmsDetail"; // String channel = "5004"; // String imsi = "460036970087302"; // String timestamp = String.valueOf(System.currentTimeMillis()); // String ver = "1.0"; // String id_fee = "111_100,222_200"; // // List<TokenParam> queryParamList = new ArrayList<TokenParam>(4); // queryParamList.add(new TokenParam("method",method)); // queryParamList.add(new TokenParam("channel",channel)); // queryParamList.add(new TokenParam("imsi",imsi)); // queryParamList.add(new TokenParam("timestamp", timestamp)); // queryParamList.add(new TokenParam("ver", ver)); // queryParamList.add(new TokenParam("id_fee", id_fee)); // String sign = TokenService.buildTySpaceToken(queryParamList, "n2KSZHJyu38K096SvmvQZbO5HZ8"); // // System.out.println(sign); // } catch (Exception e) { // e.printStackTrace(); // } // // } public static void main(String[] args) { try { String sellerKey = "SMS_PARTNER_TEST"; String imsi = "460036970087302"; String appName = URLEncoder.encode("有缘网", "UTF-8"); String fee = "500"; String outTradeNo = "123456"; String secret = "877eb16a61d1430884ddcae163fcc064"; List<TokenParam> queryParamList = new ArrayList<TokenParam>(4); queryParamList.add(new TokenParam("seller_key",sellerKey)); queryParamList.add(new TokenParam("imsi",imsi)); queryParamList.add(new TokenParam("app_name",appName)); queryParamList.add(new TokenParam("fee",fee+"")); queryParamList.add(new TokenParam("out_trade_no", outTradeNo)); String sign = TokenService.buildToken(queryParamList, secret); System.out.println(sign); } catch (Exception e) { e.printStackTrace(); } } }
[ "yangjinbo47@sina.com" ]
yangjinbo47@sina.com
fa7ba82258d1ad229264d92d03b518519a6af6a0
1f1b0abab5d4f89c971629a957e83a85093786f7
/spooned/org/apache/ant/frontend/BuildLogger.java
df70ddb203ac9836041a8a233b71c9a73add4743
[]
no_license
yueyuep/CIA
c16e577478bac0c0307dde5aa3cd0a4b4248650d
7851d4fa8d4ce96d7cfae4705068510d75cb8814
refs/heads/master
2023-04-16T05:00:44.956767
2021-04-28T09:42:30
2021-04-28T09:42:30
327,919,224
1
0
null
null
null
null
UTF-8
Java
false
false
3,626
java
/* The Apache Software License, Version 1.1 Copyright (c) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowlegement: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowlegement may appear in the software itself, if and wherever such third-party acknowlegements normally appear. 4. The names "The Jakarta Project", "Ant", and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their names without prior written permission of the Apache Group. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================== This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.ant.frontend; import java.io.*; import org.apache.ant.core.execution.*; /** * Interface used by Ant to log the build output. * * A build logger is a build listener which has the 'right' to send output to the * ant log, which is usually System.out unles redirected by the -logfile option. * * @author <a href="mailto:conor@apache.org">Conor MacNeill</a> */ public interface BuildLogger extends BuildListener { /** * Set the msgOutputLevel this logger is to respond to. * * Only messages with a message level lower than or equal to the given level are * output to the log. * * @param level * the logging level for the logger. */ public void setMessageOutputLevel(int level); /** * Set the output stream to which this logger is to send its output. * * @param output * the output stream for the logger. */ public void setOutputPrintStream(java.io.PrintStream output); /** * Set the output stream to which this logger is to send error messages. * * @param err * the error stream for the logger. */ public void setErrorPrintStream(java.io.PrintStream err); }
[ "1195083604@qq.com" ]
1195083604@qq.com
b56fb85069fd6d42cae97c8944e5de21204ed7d5
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Camel/589_2.java
a566407a9f225f38c721252ea2f1833651223b5a
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
390
java
//,temp,DigitalOceanDropletsProducer.java,363,367,temp,DigitalOceanAccountProducer.java,33,38 //,3 public class xxx { @Override public void process(Exchange exchange) throws Exception { Account accountInfo = getEndpoint().getDigitalOceanClient().getAccountInfo(); LOG.trace("Account [{}] ", accountInfo); exchange.getMessage().setBody(accountInfo); } };
[ "SHOSHIN\\sgholamian@shoshin.uwaterloo.ca" ]
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
15c40ca850cf6a1895c308845cd85e815aad63b0
85d0389c49f660cdddf14cb7c00cfc3d3171f3c4
/agarwalamit/src/main/java/playground/agarwalamit/mixedTraffic/patnaIndia/old/MyFirstControler.java
beea504f9827999cfedcd04b2de12ec5bedbc493
[]
no_license
anhpt204/tracnghiem_nham
05cc10efd1cfaab54806d3408f33cfd223d8af13
f159e63209b1aa73dc53ece36aa76e8deb086b70
refs/heads/master
2021-01-16T18:35:33.714347
2015-08-21T04:12:43
2015-08-21T04:12:43
38,027,945
1
0
null
null
null
null
UTF-8
Java
false
false
3,921
java
package playground.agarwalamit.mixedTraffic.patnaIndia.old; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.population.Leg; import org.matsim.api.core.v01.population.Person; import org.matsim.api.core.v01.population.PlanElement; import org.matsim.core.config.Config; import org.matsim.core.controler.Controler; import org.matsim.core.mobsim.qsim.qnetsimengine.SeepageMobsimfactory; import org.matsim.core.scenario.ScenarioImpl; import org.matsim.core.scenario.ScenarioUtils; import org.matsim.vehicles.Vehicle; import org.matsim.vehicles.VehicleType; import org.matsim.vehicles.VehicleUtils; import org.matsim.vis.otfvis.OTFFileWriterFactory; import playground.agarwalamit.mixedTraffic.MixedTrafficVehiclesUtils; import playground.ikaddoura.analysis.welfare.WelfareAnalysisControlerListener; import java.util.HashMap; import java.util.Map; public class MyFirstControler { static final String outputDir ="../../../repos/runs-svn/patnaIndia/run103/"; static final boolean seepage = true; public static void main(String[] args) { WriteConfig cnfg = new WriteConfig(); cnfg.configRun(); Config config = cnfg.getPatnaConfig(); Scenario sc = ScenarioUtils.loadScenario(config); sc.getConfig().qsim().setUseDefaultVehicles(false); ((ScenarioImpl) sc).createTransitVehicleContainer(); Map<String, VehicleType> modesType = new HashMap<String, VehicleType>(); VehicleType car = VehicleUtils.getFactory().createVehicleType(Id.create("car",VehicleType.class)); car.setMaximumVelocity(MixedTrafficVehiclesUtils.getSpeed("car")); car.setPcuEquivalents(1.0); modesType.put("car", car); sc.getVehicles().addVehicleType(car); VehicleType motorbike = VehicleUtils.getFactory().createVehicleType(Id.create("motorbike",VehicleType.class)); motorbike.setMaximumVelocity(MixedTrafficVehiclesUtils.getSpeed("motorbike")); motorbike.setPcuEquivalents(0.25); modesType.put("motorbike", motorbike); sc.getVehicles().addVehicleType(motorbike); VehicleType bike = VehicleUtils.getFactory().createVehicleType(Id.create("bike",VehicleType.class)); bike.setMaximumVelocity(MixedTrafficVehiclesUtils.getSpeed("bike")); bike.setPcuEquivalents(0.25); modesType.put("bike", bike); sc.getVehicles().addVehicleType(bike); VehicleType walk = VehicleUtils.getFactory().createVehicleType(Id.create("walk",VehicleType.class)); walk.setMaximumVelocity(MixedTrafficVehiclesUtils.getSpeed("walk")); // walk.setPcuEquivalents(0.10); modesType.put("walk",walk); sc.getVehicles().addVehicleType(walk); VehicleType pt = VehicleUtils.getFactory().createVehicleType(Id.create("pt",VehicleType.class)); pt.setMaximumVelocity(MixedTrafficVehiclesUtils.getSpeed("pt")); // pt.setPcuEquivalents(5); modesType.put("pt",pt); sc.getVehicles().addVehicleType(pt); for(Person p:sc.getPopulation().getPersons().values()){ Id<Vehicle> vehicleId = Id.create(p.getId(),Vehicle.class); String travelMode = null; for(PlanElement pe :p.getSelectedPlan().getPlanElements()){ if (pe instanceof Leg) { travelMode = ((Leg)pe).getMode(); break; } } Vehicle vehicle = VehicleUtils.getFactory().createVehicle(vehicleId,modesType.get(travelMode)); sc.getVehicles().addVehicle(vehicle); } Controler controler = new Controler(sc); controler.setOverwriteFiles(true); controler.setDumpDataAtEnd(true); controler.getConfig().controler().setCreateGraphs(true); controler.addSnapshotWriterFactory("otfvis", new OTFFileWriterFactory()); if(seepage){ controler.setMobsimFactory(new SeepageMobsimfactory()); } controler.addControlerListener(new WelfareAnalysisControlerListener((ScenarioImpl)controler.getScenario())); controler.setDumpDataAtEnd(true); controler.run(); } }
[ "anh.pt204@gmail.com" ]
anh.pt204@gmail.com
d8e9a13ad3bdb30dbe35edc0040765afcfb2c3ea
d485ff113a05e3d23f545c03f0e1fe7efb5b4a24
/wssec_samsung_snb/target/generated-sources/cxf/org/onvif/ver10/schema/PaneConfiguration.java
2b9e039b95f07d7ffaaf951dc58c8f3432c8fac0
[]
no_license
raghunaik2009/itce-team8-2012
4692d487facee59e5fcae6952f42d15294aa83b9
6fffd0358de888f2da03693a834732b89fb8cae1
refs/heads/master
2021-01-10T04:54:17.635220
2013-08-09T06:21:06
2013-08-09T06:21:06
36,277,080
1
1
null
null
null
null
UTF-8
Java
false
false
7,494
java
package org.onvif.ver10.schema; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; import org.w3c.dom.Element; /** * Configuration of the streaming and coding settings of a Video window. * * <p>Java class for PaneConfiguration complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PaneConfiguration"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="PaneName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="AudioOutputToken" type="{http://www.onvif.org/ver10/schema}ReferenceToken" minOccurs="0"/> * &lt;element name="AudioSourceToken" type="{http://www.onvif.org/ver10/schema}ReferenceToken" minOccurs="0"/> * &lt;element name="AudioEncoderConfiguration" type="{http://www.onvif.org/ver10/schema}AudioEncoderConfiguration" minOccurs="0"/> * &lt;element name="ReceiverToken" type="{http://www.onvif.org/ver10/schema}ReferenceToken" minOccurs="0"/> * &lt;element name="Token" type="{http://www.onvif.org/ver10/schema}ReferenceToken"/> * &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;anyAttribute processContents='lax'/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PaneConfiguration", propOrder = { "paneName", "audioOutputToken", "audioSourceToken", "audioEncoderConfiguration", "receiverToken", "token", "any" }) public class PaneConfiguration { @XmlElement(name = "PaneName") protected String paneName; @XmlElement(name = "AudioOutputToken") protected String audioOutputToken; @XmlElement(name = "AudioSourceToken") protected String audioSourceToken; @XmlElement(name = "AudioEncoderConfiguration") protected AudioEncoderConfiguration audioEncoderConfiguration; @XmlElement(name = "ReceiverToken") protected String receiverToken; @XmlElement(name = "Token", required = true) protected String token; @XmlAnyElement(lax = true) protected List<java.lang.Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the paneName property. * * @return * possible object is * {@link String } * */ public String getPaneName() { return paneName; } /** * Sets the value of the paneName property. * * @param value * allowed object is * {@link String } * */ public void setPaneName(String value) { this.paneName = value; } /** * Gets the value of the audioOutputToken property. * * @return * possible object is * {@link String } * */ public String getAudioOutputToken() { return audioOutputToken; } /** * Sets the value of the audioOutputToken property. * * @param value * allowed object is * {@link String } * */ public void setAudioOutputToken(String value) { this.audioOutputToken = value; } /** * Gets the value of the audioSourceToken property. * * @return * possible object is * {@link String } * */ public String getAudioSourceToken() { return audioSourceToken; } /** * Sets the value of the audioSourceToken property. * * @param value * allowed object is * {@link String } * */ public void setAudioSourceToken(String value) { this.audioSourceToken = value; } /** * Gets the value of the audioEncoderConfiguration property. * * @return * possible object is * {@link AudioEncoderConfiguration } * */ public AudioEncoderConfiguration getAudioEncoderConfiguration() { return audioEncoderConfiguration; } /** * Sets the value of the audioEncoderConfiguration property. * * @param value * allowed object is * {@link AudioEncoderConfiguration } * */ public void setAudioEncoderConfiguration(AudioEncoderConfiguration value) { this.audioEncoderConfiguration = value; } /** * Gets the value of the receiverToken property. * * @return * possible object is * {@link String } * */ public String getReceiverToken() { return receiverToken; } /** * Sets the value of the receiverToken property. * * @param value * allowed object is * {@link String } * */ public void setReceiverToken(String value) { this.receiverToken = value; } /** * Gets the value of the token property. * * @return * possible object is * {@link String } * */ public String getToken() { return token; } /** * Sets the value of the token property. * * @param value * allowed object is * {@link String } * */ public void setToken(String value) { this.token = value; } /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link java.lang.Object } * {@link Element } * * */ public List<java.lang.Object> getAny() { if (any == null) { any = new ArrayList<java.lang.Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "hiepnh.vtt@gmail.com@120febe0-a655-af85-dc0f-037a25d1ef83" ]
hiepnh.vtt@gmail.com@120febe0-a655-af85-dc0f-037a25d1ef83
eb8bba4aad43321a22dca2c8f58d3c2636edfead
b3962c9b4858fce5a58f56018e45c5b0416e3743
/ymall-web-api/src/main/java/com/yuu/ymall/web/api/dto/TbPanelDto.java
64b12ca950faee76a9a0eddd2870801d9010925c
[]
no_license
tfei5/YMall
1603db9b9211b91991b9f8fbcf7d1e132f8ebb9b
73787a3f021bdb73ea3250c11021ba7e482e080e
refs/heads/master
2022-12-14T00:04:04.398860
2020-09-06T05:53:30
2020-09-06T05:53:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,211
java
package com.yuu.ymall.web.api.dto; import java.io.Serializable; import java.util.List; /** * 首页板块展示对象 * * @author by Yuu * @classname TbPanelDto * @date 2019/7/2 13:57 */ public class TbPanelDto implements Serializable { /** * 板块 id */ private Integer id; /** * 板块名称 */ private String name; /** * 板块类型 0 轮播图 1 板块种类一 2 板块种类二 3 板块种类三 */ private Integer type; /** * 板块内容集合 */ private List<TbPanelContentDto> panelContentDtos; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public List<TbPanelContentDto> getPanelContentDtos() { return panelContentDtos; } public void setPanelContentDtos(List<TbPanelContentDto> panelContentDtos) { this.panelContentDtos = panelContentDtos; } }
[ "1225459207@qq.com" ]
1225459207@qq.com
421c203b1c255892146a469e9b9e5a6273414357
7c7c660e45be16b60f74d5cc5daa3f7c71fe45d4
/gui-swing/gui-swing-all/src/main/java/xyz/cofe/gui/swing/cell/TextAliasing.java
2b9b7f697c91267b411f52c143b5d704956c1d8b
[ "MIT" ]
permissive
gochaorg/cofe.xyz-next
9f160e6726d5af9d6efd5eda8b86b381c9d62824
02cb327222d113fd53e773bd61c3a0aeef24b9b2
refs/heads/master
2022-11-27T05:52:42.549697
2022-10-15T22:13:51
2022-10-15T22:13:51
200,032,063
0
0
MIT
2022-11-15T23:42:12
2019-08-01T10:45:09
Java
UTF-8
Java
false
false
315
java
package xyz.cofe.gui.swing.cell; /** * Указывает как производить начертание текста * @author Kamnev Georgiy (nt.gocha@gmail.com) */ public enum TextAliasing { DEFAULT, GASP, LCD_HBGR, LCD_HRGB, LCD_VBGR, LCD_VRGB, OFF, ON }
[ "nt.gocha@gmail.com" ]
nt.gocha@gmail.com
19cc1afde8e8b31f18991ec68f012a1452596876
16ba716cf9beebad3c4c78f656acbe513502d57a
/src/com/forge/parser/ext/Parameter_valueContextExt.java
0b353fe52ada32c0dc83de380c540dad22ca09c7
[]
no_license
wwei1988/forge
27c336013a883cf75f0d69a68068c80e04e81253
7793c7c645d33bb6b24a55ba757b42e226a40b36
refs/heads/master
2020-06-26T08:25:59.871561
2018-03-12T17:55:10
2018-03-12T17:55:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package com.forge.parser.ext; import org.antlr.v4.runtime.ParserRuleContext; import com.forge.parser.PopulateExtendedContextVisitor; import com.forge.parser.gen.ForgeParser.Parameter_valueContext; public class Parameter_valueContextExt extends AbstractBaseExt { public Parameter_valueContextExt(Parameter_valueContext ctx) { addToContexts(ctx); parent = ctx; } @Override public Parameter_valueContext getContext() { return (Parameter_valueContext) contexts.get(contexts.size() - 1); } @Override public ParserRuleContext getContext(String str) { return new PopulateExtendedContextVisitor().visit(getPrimeParser(str).parameter_value()); } @Override public void setContext(ParserRuleContext ctx) { if (ctx != null) { if (ctx instanceof Parameter_valueContext) { addToContexts(ctx); } else { throw new ClassCastException(ctx.getClass().getSimpleName() + " cannot be cased to " + Parameter_valueContext.class.getName()); } } else { addToContexts(null); } } }
[ "sgodugul@cisco.com" ]
sgodugul@cisco.com
99b48a6a681cc5447c29754475da446c53c606b4
f0094829f498afba8f79d3b08ebe290f06d23350
/src/main/java/com/microwise/common/action/DateConverter.java
fe6b9b2bb6a781fdc4be53712cd1b2366375496f
[]
no_license
algsun/galaxy
0c3c0bb6302c37aacb5a184343bc8c016a52631d
c5f40f2ed4835c803e7c2ed8ba16f84ad54f623e
refs/heads/master
2020-03-15T20:05:07.418862
2018-05-06T09:45:29
2018-05-06T09:45:29
132,314,724
0
0
null
null
null
null
UTF-8
Java
false
false
1,860
java
package com.microwise.common.action; import org.apache.struts2.util.StrutsTypeConverter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; /** * 处理 struts java.util.Date 类型转换 * * @author gaohui * @date 13-4-18 11:40 */ public class DateConverter extends StrutsTypeConverter { // 支持的解析类型 private static final List<SimpleDateFormat> formats; static { List<SimpleDateFormat> initFormats = new ArrayList<SimpleDateFormat>(); // 越严格越靠前 initFormats.add(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); initFormats.add(new SimpleDateFormat("yyyy-MM-dd HH:mm")); initFormats.add(new SimpleDateFormat("yyyy-MM-dd")); initFormats.add(new SimpleDateFormat("yyyy-MM")); initFormats.add(new SimpleDateFormat("HH:mm:ss")); initFormats.add(new SimpleDateFormat("HH:mm")); initFormats.add(new SimpleDateFormat("yyyy")); initFormats.add(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss")); formats = Collections.unmodifiableList(initFormats); } @Override public Object convertFromString(Map context, String[] values, Class toClass) { if (values == null) { return null; } if (values.length < 1) { return null; } String value = values[0]; // 第一个值 for (SimpleDateFormat df : formats) { try { // 一旦解析,直接返回 return df.parse(value); } catch (ParseException e) { // do nothing } } return null; } @Override public String convertToString(Map context, Object o) { return o.toString(); } }
[ "algtrue@163.com" ]
algtrue@163.com
bf07f10b8cee4b63695bd34b35dee76d9040d621
245fee86f6aafd0d7e9202a71e49d01a80f2f040
/ui/navigation/api/src/main/java/org/treblereel/gwt/crysknife/navigation/client/local/spi/NavigationGraphImpl.java
bd4e3e5a3f746f20d07f6ade2423842255218c29
[ "Apache-2.0" ]
permissive
treblereel/crysknife
c47005ac34ada039c5c036e2e88b14b71e6cec7e
2d42fbaca43ea292ddb252dcf5d4287d0803831f
refs/heads/master
2023-09-01T11:52:13.164253
2020-10-02T18:58:50
2020-10-02T18:58:50
300,720,107
0
0
Apache-2.0
2023-08-17T05:44:07
2020-10-02T19:43:56
null
UTF-8
Java
false
false
845
java
/* * Copyright © 2020 Treblereel * * 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.treblereel.gwt.crysknife.navigation.client.local.spi; /** * Fake implementation, ll be excluded on package/install * * @author Dmitrii Tikhomirov Created by treblereel 3/1/20 */ public class NavigationGraphImpl extends NavigationGraph { }
[ "chani@me.com" ]
chani@me.com
1dc1ca0bbfa1d639cf5dc32f35c0fbbb92acb5c0
81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13
/src/me/lyft/android/application/ride/DriverRouteService$6.java
7147cf258a7be3781cee8bcb8a20cf1f707bfb04
[]
no_license
reverseengineeringer/me.lyft.android
48bb85e8693ce4dab50185424d2ec51debf5c243
8c26caeeb54ffbde0711d3ce8b187480d84968ef
refs/heads/master
2021-01-19T02:32:03.752176
2016-07-19T16:30:00
2016-07-19T16:30:00
63,710,356
3
0
null
null
null
null
UTF-8
Java
false
false
1,234
java
package me.lyft.android.application.ride; import com.lyft.android.api.dto.RideUpdateRequestDTOBuilder; import com.lyft.android.api.dto.UniversalDTO; import me.lyft.android.common.DeviceClock; import me.lyft.android.domain.driver.ride.DriverRidePassenger; import me.lyft.android.domain.location.Location; import me.lyft.android.domain.location.LocationMapper; import me.lyft.android.infrastructure.lyft.ILyftApi; import rx.Observable; import rx.functions.Func1; class DriverRouteService$6 implements Func1<Location, Observable<UniversalDTO>> { DriverRouteService$6(DriverRouteService paramDriverRouteService, DriverRidePassenger paramDriverRidePassenger, int paramInt) {} public Observable<UniversalDTO> call(Location paramLocation) { return DriverRouteService.access$200(this$0).updateRide(val$passenger.getRideId(), new RideUpdateRequestDTOBuilder().withStatus("pickedUp").withLocation(LocationMapper.toLocationDTO(paramLocation)).withActionTimestampMs(Long.valueOf(DeviceClock.getCurrentTimeMs())).withPartySize(Integer.valueOf(val$partySize)).build()); } } /* Location: * Qualified Name: me.lyft.android.application.ride.DriverRouteService.6 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
f8f57884d947a512757d98a02413e747b2aeeddf
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.jdt.ui/2294.java
85f903f1f68fd63ba5c20dc27954c989d04c4c88
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
676
java
/******************************************************************************* * Copyright (c) 2007 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 p; public class MethodUpdate { private int test; public void foo() { System.out.println(test); } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
3884f896d6bea6fd463fde9966d555e4d1560fa3
443b3d69716f2ee1b59e54f5d8545a5df8deece1
/app/src/main/java/ai/aiprog/template/ui/launcher/credential/LoginViewModel.java
8fb648eb58f0270779cdb6de524e62cc11f10f77
[ "Apache-2.0" ]
permissive
Arvindo9/Template
1c33f18fa7aca8aca1870d7c7abc1c4e26a7e15f
a39cea2f3c8e4abde60ef2a86825c621051a63c8
refs/heads/master
2020-06-25T05:31:57.870573
2020-04-02T18:04:48
2020-04-02T18:04:48
199,215,825
1
0
null
null
null
null
UTF-8
Java
false
false
3,027
java
package ai.aiprog.template.ui.launcher.credential; import android.util.Log; import ai.aiprog.template.base.BaseViewModel; import ai.aiprog.template.data.DataManager; import ai.aiprog.template.utils.rx.SchedulerProvider; import ai.aiprog.template.utils.setup.Logger; import com.google.firebase.iid.FirebaseInstanceId; import org.json.JSONException; import org.json.JSONObject; /** * Author : Arvindo Mondal * Created date : 13-08-2019 * Email : arvindo@aiprog.ai * Company : AIPROG * Designation : Programmer * About : I am a human can only think, I can't be a person like machine which have lots of memory and knowledge. * Quote : No one can measure limit of stupidity but stupid things bring revolutions * Strength : Never give up * Motto : To be known as great Mathematician * Skills : Algorithms and logic * Website : www.aiprog.ai */ public class LoginViewModel extends BaseViewModel<LoginNavigator> { public LoginViewModel(DataManager dataManager, SchedulerProvider schedulerProvider) { super(dataManager, schedulerProvider); } void fcmToken() { FirebaseInstanceId.getInstance().getInstanceId() .addOnCompleteListener(task -> { if (!task.isSuccessful()) { Log.e("DashboardViewModel", "getInstanceId failed", task.getException()); return; } if(task.getResult() != null) { // Get new Instance ID token String token = task.getResult().getToken(); // Log and toast Log.e("DashboardViewModel", token); pushFcmToken(token); } }); } private void pushFcmToken(String token) { JSONObject params; try { params = paramsPushFcmToken(token); Logger.e("Params:" + params.toString()); } catch (JSONException e) { params = new JSONObject(); } /* getCompositeDisposable().add(getDataManager() .pushFcmToken(accessToken, params) .subscribeOn(getSchedulerProvider().io()) .observeOn(getSchedulerProvider().newThread()) .subscribe(response -> { if (response != null && response.getStatus() == RESULT_SUCCESS) { // getDataManager().setFcmToken(false); } else { // getDataManager().setFcmToken(true); } }, throwable -> { throwable.printStackTrace(); // getDataManager().setFcmToken(true); })); */ } public static JSONObject paramsPushFcmToken(String token) throws JSONException, ArrayIndexOutOfBoundsException{ JSONObject jsonObject = new JSONObject(); jsonObject.put("token", token); return jsonObject; } }
[ "arvindomondal@gmail.com" ]
arvindomondal@gmail.com
6f30673c79b8c40684b3254549d44809e6757d85
0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7
/JavaSource/dream/comm/revision/form/CommRevHistListForm.java
ea169625d69562e59711df4171a6ee0aa7074d9a
[]
no_license
eMainTec-DREAM/DREAM
bbf928b5c50dd416e1d45db3722f6c9e35d8973c
05e3ea85f9adb6ad6cbe02f4af44d941400a1620
refs/heads/master
2020-12-22T20:44:44.387788
2020-01-29T06:47:47
2020-01-29T06:47:47
236,912,749
0
0
null
null
null
null
UHC
Java
false
false
829
java
package dream.comm.revision.form; import common.struts.BaseForm; import dream.comm.revision.dto.CommRevHistCommonDTO; /** * 제/개정 변경이력 * @author kim21017 * @version $Id: CommRevHistListForm.java,v 1.0 2015/12/01 09:13:09 kim21017 Exp $ * @since 1.0 * * @struts.form name="commRevHistListForm" */ public class CommRevHistListForm extends BaseForm { //=============================================================== /** 제/개정 변경이력 Common */ private CommRevHistCommonDTO commRevHistCommonDTO = new CommRevHistCommonDTO(); public CommRevHistCommonDTO getCommRevHistCommonDTO() { return commRevHistCommonDTO; } public void setCommRevHistCommonDTO(CommRevHistCommonDTO commRevHistCommonDTO) { this.commRevHistCommonDTO = commRevHistCommonDTO; } }
[ "HN4741@10.31.0.185" ]
HN4741@10.31.0.185
e4367b421deccd957bb1106edaedffd4cd72b22a
f525deacb5c97e139ae2d73a4c1304affb7ea197
/gitv/src/main/java/com/gala/video/app/epg/ui/netdiagnose/provider/NDBaseProvider.java
03314f4914aa91c6807123bc515baca55c4a402c
[]
no_license
AgnitumuS/gitv
93b2359e1bf9f2b6c945298c61c5c6dbfeea49b3
242c9a10a0aeb41b9589de9f254e6ce9f57bd77a
refs/heads/master
2021-08-08T00:50:10.630301
2017-11-09T08:10:33
2017-11-09T08:10:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,463
java
package com.gala.video.app.epg.ui.netdiagnose.provider; import android.content.Context; import android.util.Log; import com.gala.sdk.player.BitStream; import com.gala.video.lib.framework.core.utils.ListUtils; import com.gala.video.lib.framework.core.utils.LogUtils; import com.gala.video.lib.framework.coreservice.netdiagnose.INDUploadCallback; import com.gala.video.lib.framework.coreservice.netdiagnose.INDWrapperOperate; import com.gala.video.lib.framework.coreservice.netdiagnose.INetDiagnoseController; import com.gala.video.lib.framework.coreservice.netdiagnose.model.NetDiagnoseInfo; import com.gala.video.lib.share.ifimpl.netdiagnose.NetDiagnoseController; import com.gala.video.lib.share.ifimpl.netdiagnose.model.CDNNetDiagnoseInfo; import com.gala.video.lib.share.ifmanager.GetInterfaceTools; import com.gala.video.lib.share.ifmanager.bussnessIF.ucenter.IGalaAccountManager; import com.gala.video.lib.share.system.preference.setting.SettingPlayPreference; import com.gala.video.lib.share.utils.DataUtils; import java.util.ArrayList; import java.util.List; public abstract class NDBaseProvider { public static final String ENDSTRING = "\n-------end--------\r\n"; private static final String TAG = "NDBaseProvider"; protected Context mContext; protected INetDiagnoseController mController; private INetDiagnoseResultListener mINetDiagnoseResultLinstener; protected NetDiagnoseInfo mNetDiagnoseInfo; protected int mPlayerType = 0; protected NetDiagnoseInfo mResult; protected INDUploadCallback mUploadcallback = new INDUploadCallback() { public void uploadNetDiagnoseDone() { Log.i(NDBaseProvider.TAG, "onFinish mUploadcallback uploadNetDiagnoseDone"); NDBaseProvider.this.mController.stopCheck(); } }; private List<INDWrapperOperate> mWrapperList = null; public interface INetDiagnoseResultListener { void onReslut(String str); } public abstract void initWrapperList(); public abstract void uploadResultInfo(StringBuilder stringBuilder); public NDBaseProvider(Context context) { this.mContext = context; } public void setPlayerType(int playerType) { this.mPlayerType = playerType; } public void setReslut(NetDiagnoseInfo result) { this.mResult = result; } public void startCheckEx() { if (this.mController == null) { initInfo(); this.mController = new NetDiagnoseController(this.mContext, this.mNetDiagnoseInfo); } initDefaultWrapperList(); this.mController.startCheckEx(this.mWrapperList); } public void addWrapperJob(INDWrapperOperate wrapperOperate) { this.mWrapperList.add(wrapperOperate); } private void initDefaultWrapperList() { if (ListUtils.isEmpty(this.mWrapperList)) { this.mWrapperList = new ArrayList(); } this.mWrapperList.clear(); initWrapperList(); } private void initInfo() { if (this.mNetDiagnoseInfo == null) { IGalaAccountManager manager = GetInterfaceTools.getIGalaAccountManager(); BitStream bitStream = new BitStream(); bitStream.setDefinition(SettingPlayPreference.getNetDoctorBitStreamDefinition(this.mContext)); bitStream.setAudioType(SettingPlayPreference.getNetDoctorAudioType(this.mContext)); bitStream.setCodecType(SettingPlayPreference.getNetDoctorCodecType(this.mContext)); bitStream.setDynamicRangeType(SettingPlayPreference.getNetDoctorDRType(this.mContext)); this.mNetDiagnoseInfo = new CDNNetDiagnoseInfo(manager.getAuthCookie(), manager.getUID(), manager.getUserType(), 0, BitStream.getBid(bitStream), DataUtils.createReverForNetDoctor(bitStream)); } Log.i(TAG, "initInfo: " + this.mNetDiagnoseInfo); } public void uploadResult() { if (this.mResult == null) { LogUtils.e(TAG, "uploadResult mResult is null!"); return; } StringBuilder info = new StringBuilder(); uploadResultInfo(info); LogUtils.i(TAG, "uploadResult : " + info.toString()); if (this.mINetDiagnoseResultLinstener != null) { this.mINetDiagnoseResultLinstener.onReslut(info.toString()); } } public void setNetDiagnoseResultListener(INetDiagnoseResultListener listener) { this.mINetDiagnoseResultLinstener = listener; } }
[ "liuwencai@le.com" ]
liuwencai@le.com
8ae11b859c43a4416f42d54402f5bca735bd5917
75c36bf0bc68867e87484808ff0a4f25353985c8
/src/main/java/io/github/mirromutth/r2dbc/mysql/core/MySqlSession.java
241076bbf184b8b85335b962d0a05d5fb9492e95
[ "Apache-2.0" ]
permissive
igorgolovanov/r2dbc-mysql
f2ce0eb9c5d77c74c97b8e444ad8e73136afc52c
138f9d37cd8c5f1081f6b4bfd237368900fdd97d
refs/heads/master
2020-05-20T21:16:20.242673
2019-04-25T12:53:20
2019-04-25T12:53:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,934
java
/* * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.github.mirromutth.r2dbc.mysql.core; import io.github.mirromutth.r2dbc.mysql.collation.CharCollation; import io.github.mirromutth.r2dbc.mysql.security.AuthStateMachine; import reactor.util.annotation.Nullable; import static io.github.mirromutth.r2dbc.mysql.util.AssertUtils.requireNonNull; /** * MySQL sessions. */ public final class MySqlSession { private final boolean useSsl; private volatile int connectionId = -1; private volatile ServerVersion serverVersion = ServerVersion.NONE; private volatile int serverCapabilities = 0; private volatile CharCollation collation = CharCollation.defaultCollation(ServerVersion.NONE); private final String database; private volatile int clientCapabilities = 0; private volatile int serverStatuses = 0; /** * It would be null after connection phase completed. */ @Nullable private volatile AuthStateMachine authStateMachine; /** * It would be null after connection phase completed. */ @Nullable private volatile String username; /** * It would be null after connection phase completed. */ @Nullable private volatile String password; /** * It would be null after connection phase completed. */ @Nullable private volatile byte[] salt; public MySqlSession(boolean useSsl, String database, String username, @Nullable String password) { this.useSsl = useSsl; this.database = requireNonNull(database, "database must not be null"); this.username = requireNonNull(username, "username must not be null"); this.password = password; } public boolean isUseSsl() { return useSsl; } public int getConnectionId() { return connectionId; } public void setConnectionId(int connectionId) { this.connectionId = connectionId; } public ServerVersion getServerVersion() { return serverVersion; } public void setServerVersion(ServerVersion serverVersion) { this.serverVersion = serverVersion; } public int getServerCapabilities() { return serverCapabilities; } public void setServerCapabilities(int serverCapabilities) { this.serverCapabilities = serverCapabilities; } public CharCollation getCollation() { return collation; } public void setCollation(CharCollation collation) { this.collation = collation; } public String getDatabase() { return database; } public int getClientCapabilities() { return clientCapabilities; } public void setClientCapabilities(int clientCapabilities) { this.clientCapabilities = clientCapabilities; } public int getServerStatuses() { return serverStatuses; } public void setServerStatuses(int serverStatuses) { this.serverStatuses = serverStatuses; } @Nullable public String getUsername() { return username; } @Nullable public String getPassword() { return password; } @Nullable public byte[] getSalt() { return salt; } public void setSalt(@Nullable byte[] salt) { this.salt = salt; } public void setAuthStateMachine(@Nullable AuthStateMachine authStateMachine) { this.authStateMachine = authStateMachine; } public boolean hasNext() { AuthStateMachine authStateMachine = this.authStateMachine; if (authStateMachine == null) { return false; } return authStateMachine.hasNext(); } /** * Generate current authentication and make changes to the authentication status. * * @return {@code null} */ @Nullable public byte[] nextAuthentication() { AuthStateMachine authStateMachine = this.authStateMachine; if (authStateMachine == null) { return null; } return authStateMachine.nextAuthentication(this); } /** * All authentication data should be remove when connection phase completed or client closed in connection phase. */ public void clearAuthentication() { this.username = null; this.password = null; this.salt = null; this.authStateMachine = null; } }
[ "mirromutth@gmail.com" ]
mirromutth@gmail.com
621a1f19058cef2850241c5e1aef1760901f13e9
67c1ea547f0639340220d922196ad7dc7e5b9b18
/src/main/java/com/dobo/modules/gen/entity/GenTemplate.java
693f5b8df74172a41dbba1f957adda970e91674f
[ "Apache-2.0" ]
permissive
249910119/dobo
852f459ee9f67b8d7816f9e656498235ea3a25d4
56e42bd03fc1a78c80bdad72a062affdaf1e1213
refs/heads/master
2020-05-17T04:09:06.692185
2019-04-25T19:43:06
2019-04-25T19:43:06
183,499,932
0
0
null
null
null
null
UTF-8
Java
false
false
1,995
java
/** * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">dobo</a> All rights reserved. */ package com.dobo.modules.gen.entity; import java.util.List; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; import org.hibernate.validator.constraints.Length; import com.google.common.collect.Lists; import com.dobo.common.persistence.DataEntity; import com.dobo.common.utils.StringUtils; /** * 生成方案Entity * @author ThinkGem * @version 2013-10-15 */ @XmlRootElement(name="template") public class GenTemplate extends DataEntity<GenTemplate> { private static final long serialVersionUID = 1L; private String name; // 名称 private String category; // 分类 private String filePath; // 生成文件路径 private String fileName; // 文件名 private String content; // 内容 public GenTemplate() { super(); } public GenTemplate(String id){ super(id); } @Length(min=1, max=200) public String getName() { return name; } public void setName(String name) { this.name = name; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getFilePath() { return filePath; } public void setFilePath(String filePath) { this.filePath = filePath; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } @XmlTransient public List<String> getCategoryList() { if (category == null){ return Lists.newArrayList(); }else{ return Lists.newArrayList(StringUtils.split(category, ",")); } } public void setCategoryList(List<String> categoryList) { if (categoryList == null){ this.category = ""; }else{ this.category = ","+StringUtils.join(categoryList, ",") + ","; } } }
[ "249910119@qq.com" ]
249910119@qq.com
12599481aa480f484777bd9d9edb82dd8cef24c0
893fd55d55e65354c563c69d3c3f3d28a72b3a6b
/OpenADRServerVTN20b/src/main/java/com/avob/openadr/server/oadr20b/vtn/models/venreport/data/OtherReportDataFloatDao.java
240ef79149267a5d32f8b7ec1811ce099142e2e1
[ "Apache-2.0" ]
permissive
avob/OpenADR
62a63e08d13e792d8c7ff0b186641b74b49d5b6f
7608f780509e5669bbf5bd311c8cb3206cebf7ac
refs/heads/master
2022-09-18T21:56:32.315131
2021-09-06T06:22:02
2021-09-06T06:22:02
169,761,438
45
18
Apache-2.0
2022-02-16T01:15:15
2019-02-08T16:07:39
Java
UTF-8
Java
false
false
158
java
package com.avob.openadr.server.oadr20b.vtn.models.venreport.data; public interface OtherReportDataFloatDao extends ReportDataDao<OtherReportDataFloat> { }
[ "zanni.bertrand@gmail.com" ]
zanni.bertrand@gmail.com
bfe34aa5a863eb50d3a64663198744eada9b7b9e
217d96db536ff284fc1b168bf640104f00ba1ad5
/deprecated/org.rifidi.prototyper.map/src/org/rifidi/prototyper/model/FloorplanViewModel.java
abdfdfd42cdac6ca9e2abca860497f950f61dfc4
[]
no_license
TranscendsLLC/emulator
d5b94965b8ebd894707c093334c51aabf30d0075
a46c42cd2e86aafc213df7585dc923895a589446
refs/heads/master
2021-01-14T12:31:10.876450
2010-10-01T21:28:07
2010-10-01T21:28:07
43,608,652
1
1
null
null
null
null
UTF-8
Java
false
false
454
java
/** * */ package org.rifidi.prototyper.model; /** * @author kyle * */ public class FloorplanViewModel { private String imageFigurePath = "IMG/blueprint.jpg"; /** * @return the imageFigurePath */ public String getImageFigurePath() { return imageFigurePath; } /** * @param imageFigurePath the imageFigurePath to set */ public void setImageFigurePath(String imageFigurePath) { this.imageFigurePath = imageFigurePath; } }
[ "kyle@70ba6d20-ffbb-44b8-b480-e27427137dba" ]
kyle@70ba6d20-ffbb-44b8-b480-e27427137dba
413f7eee935380b8916d178f8ebfa0ff255a0781
828f351e148f17495893d123bc0bad9b04945fab
/src/main/java/domain/LadderLineGenerateStrategy.java
679418fd36ad49f948016942b85facbd525267d2
[]
no_license
Rok93/java-laddergame-three-step
8714065ac64d01495d63dab19e8f5f49f8950d4c
ceb633206370b5b25662a04264bb1e22760d3ff9
refs/heads/rok93
2023-02-24T05:58:11.871053
2021-01-22T20:02:15
2021-01-22T20:02:15
328,170,620
0
0
null
2021-01-22T20:29:09
2021-01-09T14:15:19
Java
UTF-8
Java
false
false
133
java
package domain; @FunctionalInterface public interface LadderLineGenerateStrategy { LadderLine generateLine(int sizeOfPerson); }
[ "goodboy3421@gmail.com" ]
goodboy3421@gmail.com
be8e91a5ab077ae3f6bfdff913588f1b202c7e51
a6fd8f81b4e690dae5561b85e602a344ea2eb9c3
/src/com/like/fitness/MyOrderActivity.java
6a15461301fa62840a3eaf3b6ce8e6f85b22c955
[]
no_license
lk5103613/Fitness
e79a939acd5bddc67fcfb5691c325f866b02bfea
17914a04f0d9100d75b3bf185de8587e88744581
refs/heads/master
2020-05-17T08:16:17.814233
2015-09-18T01:30:42
2015-09-18T01:30:42
42,403,075
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
package com.like.fitness; import com.like.adapter.MyOrderPagerAdapter; import com.like.customview.PagerSlidingTabStrip; import android.app.Activity; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v4.view.ViewPager; public class MyOrderActivity extends FragmentActivity { private PagerSlidingTabStrip mPagerTab; private ViewPager mOrderPager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my_order); mPagerTab = (PagerSlidingTabStrip) findViewById(R.id.order_tap); mOrderPager = (ViewPager) findViewById(R.id.order_pager); initTab(); } private void initTab() { mOrderPager.setAdapter(new MyOrderPagerAdapter( getSupportFragmentManager())); mPagerTab.setShouldExpand(true); mPagerTab.setFillViewport(true); mPagerTab.setIndicatorColorResource(R.color.primary_red_color); mPagerTab.setTextColorStateResource(R.color.tab_text_color); mPagerTab.setTextSize(26); mPagerTab.setViewPager(mOrderPager); mPagerTab.setIndicatorPadding(20); mPagerTab.setDividerColorResource(R.color.primary_background_color); } }
[ "524148211@qq.com" ]
524148211@qq.com
9bafbaee1202a471815d5b039826c26e28596973
e852889fcda0ef8dfadb61eeacabd8a48c5df6ff
/src/main/java/me/retrodaredevil/action/ActionQueue.java
bd5085dfdd08b027494d560b5ea3879cfb8a2ca7
[]
no_license
retrodaredevil/action-lib
76aa6dff0b1f38e9714d22b98d139572aa7f38b4
37e1b58efcd4d1f13dc2c029b26ad982dadd8ac4
refs/heads/master
2022-02-13T23:57:23.033356
2022-01-27T17:46:57
2022-01-27T17:46:57
161,931,886
1
0
null
2021-05-07T15:51:28
2018-12-15T18:13:21
Java
UTF-8
Java
false
false
2,091
java
package me.retrodaredevil.action; /** * Represents an {@link ActionCollection} that has an active {@link Action} with multiple actions in a * queue waiting to be active. * <p> * The behaviour of this class is not strictly defined except that there is an active {@link Action} * and there may be multiple actions waiting to be the active {@link Action} */ public interface ActionQueue extends SingleActiveActionHolder, ActionCollection { /** * Adds the action to the beginning of the queue to * @param action The action to add * @return true if the action was successfully added to */ boolean addBeginning(Action action); /** * Ends the current action if there is one and removes it. This happens immediately. * <p> * Note: This is not thread safe * @return true if there was a current action to end, false otherwise */ boolean removeCurrentAction(); /** * Ends the current action and moves it to the end of the queue if there is one. This happens immediately. * <p> * NOTE: This requires the current action to be recyclable * <p> * Note: This is not thread safe * @param doNothingIfEmpty true if you want to do nothing if the queue is empty, false otherwise. * If set to true, the current action will not be ended (nothing will happen). */ boolean moveCurrentToEnd(boolean doNothingIfEmpty); /** * Moves the current action to the first spot in the queue and ends it if there is a current action. * <p> * This allows you to call {@link #addBeginning(Action)} which if called after this method, * will allow you to stop the current running action and put another one in. * <p> * NOTE: This requires the current action to be recyclable * <p> * Note: This is not thread safe * @return true if there was a current action to put at the front of the queue, false otherwise */ boolean moveCurrentToNext(); /** * Removes an action in the queue * @param action The Action to remove from the queue * @return true if it was removed, false otherwise */ boolean removeQueued(Action action); }
[ "retrodaredevil@gmail.com" ]
retrodaredevil@gmail.com
c6af154834b4ae5f75a293a0f20d156b070c6d75
4be61634117a0aa988f33246d0f425047c027f4c
/zkredis-app/src/jdk6/com/sun/corba/se/spi/activation/ORBPortInfo.java
f71f3426ab24662d281c4844b342a5a52a3e5560
[]
no_license
oldshipmaster/zkredis
c02e84719f663cd620f1a76fba38e4452d755a0c
3ec53d6904a47a5ec79bc7768b1ca6324facb395
refs/heads/master
2022-12-27T01:31:23.786539
2020-08-12T01:22:07
2020-08-12T01:22:07
34,658,942
1
3
null
2022-12-16T04:32:34
2015-04-27T09:55:48
Java
UTF-8
Java
false
false
605
java
package com.sun.corba.se.spi.activation; /** * com/sun/corba/se/spi/activation/ORBPortInfo.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/com/sun/corba/se/spi/activation/activation.idl * Sunday, October 11, 2009 1:27:26 AM GMT-08:00 */ public final class ORBPortInfo implements org.omg.CORBA.portable.IDLEntity { public String orbId = null; public int port = (int)0; public ORBPortInfo () { } // ctor public ORBPortInfo (String _orbId, int _port) { orbId = _orbId; port = _port; } // ctor } // class ORBPortInfo
[ "oldshipmaster@163.com" ]
oldshipmaster@163.com
5bd07b5879f5883e370fa6f4c303eb676a9684bf
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/PACT_com.pactforcure.app/javafiles/com/itextpdf/xmp/XMPDateTime.java
299f6776aef959385190670edbee89881d31c2f1
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
1,123
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.itextpdf.xmp; import java.util.Calendar; import java.util.TimeZone; public interface XMPDateTime extends Comparable { public abstract Calendar getCalendar(); public abstract int getDay(); public abstract int getHour(); public abstract String getISO8601String(); public abstract int getMinute(); public abstract int getMonth(); public abstract int getNanoSecond(); public abstract int getSecond(); public abstract TimeZone getTimeZone(); public abstract int getYear(); public abstract boolean hasDate(); public abstract boolean hasTime(); public abstract boolean hasTimeZone(); public abstract void setDay(int i); public abstract void setHour(int i); public abstract void setMinute(int i); public abstract void setMonth(int i); public abstract void setNanoSecond(int i); public abstract void setSecond(int i); public abstract void setTimeZone(TimeZone timezone); public abstract void setYear(int i); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
65de0ee3acb3c8259be3361a49dad4ee22cad463
e3a37aaf17ec41ddc7051f04b36672db62a7863d
/aggregation/boss/src/main/java/com/iot/boss/vo/voiceaccess/VoiceAccessTypeResp.java
37284556e6df439a60caf9afdeb1c2f7ea90edbb
[]
no_license
github4n/cloud
68477a7ecf81d1526b1b08876ca12cfe575f7788
7974042dca1ee25b433177e2fe6bda1de28d909a
refs/heads/master
2020-04-18T02:04:33.509889
2019-01-13T02:19:32
2019-01-13T02:19:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package com.iot.boss.vo.voiceaccess; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; /** * 项目名称:IOT云平台 * 模块名称:订单管理 * 功能描述:获取虚拟服务的类型 * 创建人: wucheng * 创建时间:2018-11-15 */ @ApiModel(value = "虚拟服务类型返回实体类") @Data public class VoiceAccessTypeResp implements Serializable{ @ApiModelProperty(name = "goodsId", value = "商品类型id") private Long goodsId; @ApiModelProperty(name = "goodsName", value = "商品类型名") private String goodsName; public VoiceAccessTypeResp(Long goodsId, String goodsName) { this.goodsId = goodsId; this.goodsName = goodsName; } }
[ "qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL" ]
qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL
397062a9572300f3900fa413e1c17a7b4726260b
bbe117e6a9d7b3163f5a457e3763c6118e57420a
/app/src/main/java/com/fxn/xfjb/fragment/WyjbFragment.java
de5eb94d447a7f42a10701ec162e5195f609ca15
[]
no_license
saga87/Xfjb
8ab0716d908865e19a5e01bf201a05b46c282836
29980e10688cb8bd5b87a21c47eeaf9645408f57
refs/heads/master
2020-03-21T04:54:57.751851
2018-06-21T07:19:11
2018-06-21T07:19:11
138,133,905
0
0
null
null
null
null
UTF-8
Java
false
false
1,804
java
package com.fxn.xfjb.fragment; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import com.fxn.xfjb.R; import com.fxn.xfjb.activity.ProblemActivity; import com.fxn.xfjb.activity.ReportProblemActivity; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; /** * Created by fxn on 2017/11/12. */ public class WyjbFragment extends Fragment { View view; @Bind(R.id.iv_wyjb_back) ImageView ivWyjbBack; @Bind(R.id.btn_wyjb) Button btnWyjb; @Bind(R.id.btn_nmjb) Button btnNmjb; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view = inflater.inflate(R.layout.fragment_wyjb, null); ButterKnife.bind(this, view); return view; } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.unbind(this); } @OnClick({R.id.iv_wyjb_back, R.id.btn_wyjb, R.id.btn_nmjb}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.iv_wyjb_back: getActivity().finish(); break; case R.id.btn_wyjb: Intent intent = new Intent(getActivity(), ReportProblemActivity.class); startActivity(intent); break; case R.id.btn_nmjb: Intent intent1 = new Intent(getActivity(), ProblemActivity.class); startActivity(intent1); break; } } }
[ "907151065@qq.com" ]
907151065@qq.com
c44dd03943f890e0837ae9a0ffdb22ed06c24166
e605c5153e0a7a2a4690187693ef1dfca9d4ec5e
/src/main/java/org/springframework/data/neo4j/core/support/DateLong.java
8e738009c6a37f47f9560cbca667c41187ce1535
[ "Apache-2.0" ]
permissive
Sts0mrg0/spring-data-neo4j
1b1a06b8f264d0023818e8fc51467e2b39e11ce0
fd414ba97327403eee24a56f75aee7120b47a514
refs/heads/master
2023-02-02T02:41:05.111913
2020-12-18T12:58:11
2020-12-18T12:58:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,831
java
/* * Copyright 2011-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.neo4j.core.support; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.Date; import org.apiguardian.api.API; import org.neo4j.driver.Value; import org.neo4j.driver.Values; import org.springframework.data.neo4j.core.convert.ConvertWith; import org.springframework.data.neo4j.core.convert.Neo4jPersistentPropertyConverter; /** * Indicates SDN to store dates as long in the database. * Applicable to `java.util.Date` and `java.time.Instant` * * @author Michael J. Simons * @soundtrack Linkin Park - One More Light Live * @since 6.0 */ @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.FIELD }) @Inherited @ConvertWith(converter = DateLongConverter.class) @API(status = API.Status.STABLE, since = "6.0") public @interface DateLong { } final class DateLongConverter implements Neo4jPersistentPropertyConverter<Date> { @Override public Value write(Date source) { return Values.value(source.getTime()); } @Override public Date read(Value source) { return new Date(source.asLong()); } }
[ "michael@simons.ac" ]
michael@simons.ac
2bb5fa0bfda9b8da9a95917c15dadfb29c02dc16
5deb5f632e0c396ffe680e4eabe80753da42f74b
/contract-budgeting/src/uk/dangrew/cb/graphics/wizard/pages/ProjectSetupPage.java
02659d3eb557d743364995a022a8fd240b566d26
[ "Apache-2.0" ]
permissive
DanGrew/contract-budgeting
f248fd1fc93fe0b4d0c366dfae1f56c27b17c7ae
21b8d54417d3684286e41d1aa49aa9aaffe8f983
refs/heads/master
2020-04-03T00:11:31.035221
2018-11-07T18:10:54
2018-11-07T18:10:54
154,891,867
0
0
null
null
null
null
UTF-8
Java
false
false
1,487
java
package uk.dangrew.cb.graphics.wizard.pages; import javafx.scene.control.TextField; import javafx.scene.layout.BorderPane; import uk.dangrew.cb.model.project.Project; import uk.dangrew.kode.javafx.custom.BoundTextProperty; import uk.dangrew.kode.javafx.custom.PropertiesPane; import uk.dangrew.kode.javafx.style.JavaFxStyle; import uk.dangrew.kode.javafx.style.PropertyRowBuilder; public class ProjectSetupPage extends BorderPane { private final BoundTextProperty nameBinding; private final BoundTextProperty contractBinding; public ProjectSetupPage( Project project ) { JavaFxStyle styling = new JavaFxStyle(); this.setTop( styling.simpleHeaderDescription( "Project Setup", "Configure the base information for this project." ) ); this.setCenter( new PropertiesPane( "Properties", new PropertyRowBuilder() .withLabelName( "Name" ) .withBinding( nameBinding = new BoundTextProperty( project.properties().nameProperty(), true ) ), new PropertyRowBuilder() .withLabelName( "Contract" ) .withBinding( contractBinding = new BoundTextProperty( project.contract(), true ) ) ) ); }//End Constructor TextField nameField(){ return nameBinding.region(); }//End Method TextField contractField(){ return contractBinding.region(); }//End Method }//End Class
[ "danielanthonygrew@gmail.com" ]
danielanthonygrew@gmail.com
27152355ab6dd77c176c915f0b0e107d9f9c6690
431d8b2b2dc01d7cb2fd07868549f512bf0fa40e
/src/main/java/io/gs2/formation/request/AcquireActionsToFormPropertiesRequest.java
3642aac366ca763bf020d8c62e185a2184c80f5c
[ "Apache-2.0", "JSON" ]
permissive
gs2io/gs2-java-sdk
3eba923a1effebd69613519ea86b5f2bf6aa4a37
0c498bf9a071f022df66c0c5444810fda160cd9f
refs/heads/master
2023-08-31T22:13:14.378262
2023-08-24T04:31:37
2023-08-24T04:31:37
69,929,364
2
0
Apache-2.0
2023-04-17T12:13:57
2016-10-04T02:47:53
Java
UTF-8
Java
false
false
5,621
java
/* * Copyright 2016 Game Server Services, 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://www.apache.org/licenses/LICENSE-2.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 io.gs2.formation.request; import java.util.*; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.JsonNode; import io.gs2.core.control.Gs2BasicRequest; import io.gs2.formation.model.AcquireAction; import io.gs2.formation.model.Config; import io.gs2.formation.model.AcquireActionConfig; @SuppressWarnings("serial") @JsonIgnoreProperties(ignoreUnknown=true) public class AcquireActionsToFormPropertiesRequest extends Gs2BasicRequest<AcquireActionsToFormPropertiesRequest> { private String namespaceName; private String userId; private String moldName; private Integer index; private AcquireAction acquireAction; private List<AcquireActionConfig> config; private String duplicationAvoider; public String getNamespaceName() { return namespaceName; } public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } public AcquireActionsToFormPropertiesRequest withNamespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public AcquireActionsToFormPropertiesRequest withUserId(String userId) { this.userId = userId; return this; } public String getMoldName() { return moldName; } public void setMoldName(String moldName) { this.moldName = moldName; } public AcquireActionsToFormPropertiesRequest withMoldName(String moldName) { this.moldName = moldName; return this; } public Integer getIndex() { return index; } public void setIndex(Integer index) { this.index = index; } public AcquireActionsToFormPropertiesRequest withIndex(Integer index) { this.index = index; return this; } public AcquireAction getAcquireAction() { return acquireAction; } public void setAcquireAction(AcquireAction acquireAction) { this.acquireAction = acquireAction; } public AcquireActionsToFormPropertiesRequest withAcquireAction(AcquireAction acquireAction) { this.acquireAction = acquireAction; return this; } public List<AcquireActionConfig> getConfig() { return config; } public void setConfig(List<AcquireActionConfig> config) { this.config = config; } public AcquireActionsToFormPropertiesRequest withConfig(List<AcquireActionConfig> config) { this.config = config; return this; } public String getDuplicationAvoider() { return duplicationAvoider; } public void setDuplicationAvoider(String duplicationAvoider) { this.duplicationAvoider = duplicationAvoider; } public AcquireActionsToFormPropertiesRequest withDuplicationAvoider(String duplicationAvoider) { this.duplicationAvoider = duplicationAvoider; return this; } public static AcquireActionsToFormPropertiesRequest fromJson(JsonNode data) { if (data == null) { return null; } return new AcquireActionsToFormPropertiesRequest() .withNamespaceName(data.get("namespaceName") == null || data.get("namespaceName").isNull() ? null : data.get("namespaceName").asText()) .withUserId(data.get("userId") == null || data.get("userId").isNull() ? null : data.get("userId").asText()) .withMoldName(data.get("moldName") == null || data.get("moldName").isNull() ? null : data.get("moldName").asText()) .withIndex(data.get("index") == null || data.get("index").isNull() ? null : data.get("index").intValue()) .withAcquireAction(data.get("acquireAction") == null || data.get("acquireAction").isNull() ? null : AcquireAction.fromJson(data.get("acquireAction"))) .withConfig(data.get("config") == null || data.get("config").isNull() ? new ArrayList<AcquireActionConfig>() : StreamSupport.stream(Spliterators.spliteratorUnknownSize(data.get("config").elements(), Spliterator.NONNULL), false).map(item -> { //noinspection Convert2MethodRef return AcquireActionConfig.fromJson(item); } ).collect(Collectors.toList())); } public JsonNode toJson() { return new ObjectMapper().valueToTree( new HashMap<String, Object>() {{ put("namespaceName", getNamespaceName()); put("userId", getUserId()); put("moldName", getMoldName()); put("index", getIndex()); put("acquireAction", getAcquireAction() != null ? getAcquireAction().toJson() : null); put("config", getConfig() == null ? new ArrayList<AcquireActionConfig>() : getConfig().stream().map(item -> { //noinspection Convert2MethodRef return item.toJson(); } ).collect(Collectors.toList())); }} ); } }
[ "ci@gs2.io" ]
ci@gs2.io
6ded27b1afaf777c57004b3d4086c7aa6f353711
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
/backend/collecting/dsfj/Java/edited/io.EnumSetHandler.java
55ad51772220e8517daab0c2e368fffa062b3ab2
[]
no_license
haditabatabaei/webproject
8db7178affaca835b5d66daa7d47c28443b53c3d
86b3f253e894f4368a517711bbfbe257be0259fd
refs/heads/master
2020-04-10T09:26:25.819406
2018-12-08T12:21:52
2018-12-08T12:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
package com.alibaba.com.caucho.hessian.io; import java.io.Serializable; import java.util.Arrays; import java.util.EnumSet; class EnumSetHandler implements Serializable, HessianHandle { private Class type; private Object[] objects; EnumSetHandler(Class type, Object[] objects) { this.type = type; this.objects = objects; } @SuppressWarnings("unchecked") private Object readResolve() { EnumSet enumSet = EnumSet.noneOf(type); enumSet.addAll(Arrays.asList(objects)); return enumSet; } }
[ "mahdisadeghzadeh24@gamil.com" ]
mahdisadeghzadeh24@gamil.com
f26ee60d7a5bc7b68de11b4872ed17cddc1bc335
765a3c44ffc8f2de165da114683058e35522f75b
/src/lectures/factories/counter/StaticCounterFactory.java
4f41d7445ca196c1e6b35f23716de16c0146dfd8
[]
no_license
Aquamanforlife1/JavaTeaching
56716b53fe9ebed9520006d55bbad30a2579954c
d0db8bfe95461d7392104528718a8c9d78d7ac2b
refs/heads/master
2021-01-20T02:05:05.504311
2017-08-21T23:36:10
2017-08-21T23:36:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package lectures.factories.counter; import lectures.mvc.Counter; public class StaticCounterFactory { public static Counter createCounter (short initValue) { return new AShortCounter(initValue); // return new AnIntCounter(initValue); } public static Counter createCounter () { return createCounter((short) 0); } }
[ "dewan@cs.unc.edu" ]
dewan@cs.unc.edu
ef6cd8907ac644a9b40b3ccd6e350fb54f96e0b8
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2011-12-23/seasar2-2.4.45/seasar2/s2-framework/src/test/java/org/seasar/framework/container/cooldeploy/creator/web/ccc/DddService.java
1e6d2f3437e3fff12147303e6b2df45e445880e4
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
779
java
/* * Copyright 2004-2011 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.framework.container.cooldeploy.creator.web.ccc; /** * @author higa * */ public interface DddService { }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
1285796d4777d3b744b71156b84e1daa58c8dea6
92e50b40c6684f266a722ab442dbfd847abd883d
/World/worlds/whiteVirus/levels/WhiteVirusLevel3.java
8b453c1fdf4165e263421be65a2a5a9e6557f27d
[]
no_license
JungSangHyeon/2019-Physics-Engine
2450b0fbd7da5bbf27482e67b5c879bf99101e44
a627120eb39c1fb4d16b94ce29f6dc31f069121b
refs/heads/master
2022-11-15T02:50:15.152469
2020-07-06T04:20:00
2020-07-06T04:20:00
null
0
0
null
null
null
null
UHC
Java
false
false
4,655
java
package worlds.whiteVirus.levels; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.Shape; import java.awt.event.KeyEvent; import java.awt.geom.PathIterator; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.Vector; import AStuff.Camera; import AStuff.TheWorld; import Edit.EditShape; import Edit.ShapeTool; import Function.Draw.DrawWCShapeBy3D; import Function.forPlayer.tool.GravityGun; import Function.forPlayer.tool.SummonBall; import Global_KeyListener.KeyBoard; import Shape.SSNStar; import WorldComponent.AStuff.WorldComponent; import WorldComponent.Obstacle.Wall; import whiteVirusStuff.WhiteVirusPlayer; import worlds.aStuff.World; public class WhiteVirusLevel3 extends World{ Color bgColor = new Color(37, 42, 52); Color wallColor = new Color(234,234,234); Color playerColor = new Color(8,217,214); Color ballColor = new Color(255,46,99); @Override public void makeWorld() { // Wall int wallThick = 100; int wallZHeight = 100; Shape wallShapes[] = { new Rectangle(-wallThick, 0, wallThick, 1080), new Rectangle(0, -wallThick, 1920, wallThick), new Rectangle(1920, 0, wallThick, 1080), new Rectangle(0, 1080, 1920, wallThick) }; for(Shape s : wallShapes) { Wall wall = new Wall(s); wall.remove(wall.drawWorldComponentShape); DrawWCShapeBy3D wallDrawWCShapeBy3D = new DrawWCShapeBy3D(wall); wallDrawWCShapeBy3D.setHeight(wallZHeight); wallDrawWCShapeBy3D.setTopColor(wallColor); wallDrawWCShapeBy3D.setSideColor(wallColor.darker()); wall.add(wallDrawWCShapeBy3D); TheWorld.add(wall); } // Make Hexagon Shape SSNStar.setSpikiness(1); SSNStar.setNSpike(3); Shape hexagon = SSNStar.getShape(0, 0, 50, 50); hexagon = new Rectangle(0,0,50,50); // hexagon = new Rectangle(0,0,300,300); // hexagon = ShapeTool.getSubtract(hexagon, new Shape[] {new Rectangle(100,100,100,100)}); // Player Shape playerShape; playerShape = EditShape.getMovedShapeCenterTo(hexagon, 1920/2, 1080/2); WhiteVirusPlayer p = new WhiteVirusPlayer(playerShape); // Edit Player Functions p.remove(p.shoot);//이거 이래두 돼나 p.remove(p.drawWorldComponentShape); p.add(new GravityGun(p)); SummonBall sb = new SummonBall(p); sb.setBallColor(ballColor); p.add(sb); DrawWCShapeBy3D drawWCShapeBy3D = new DrawWCShapeBy3D(p); drawWCShapeBy3D.setHeight(30); drawWCShapeBy3D.setTopColor(playerColor); drawWCShapeBy3D.setSideColor(playerColor.darker()); p.add(drawWCShapeBy3D); p.setImortal(true); // Add Player TheWorld.setPlayer(p); TheWorld.add(p); } Point2D pp; @Override public void draw(Graphics2D g) { if(TheWorld.getPlayer() != null) { pp = ShapeTool.getCenterPoint(TheWorld.getPlayer().getShape()); } g.translate(-pp.getX() + 1920/2, -pp.getY() + 1080/2); Camera.setNowGraphic(g); Camera.debug(g); //wall빼고 1부터. g.setColor(bgColor); g.fillRect(0, 0, 1920, 1080); Vector<WorldComponent> WCs = TheWorld.getWorldComponents(); Vector<WorldComponent> sortedWCs = new Vector<WorldComponent>(); Vector<Double> centerYs = new Vector<Double>(); for(int i = 0; i<WCs.size(); i++) { double centerY = ShapeTool.getCenterPoint(WCs.get(i).getShape()).getY(); int index = getSortedIndex(centerYs, centerY); sortedWCs.add(index, WCs.get(i)); centerYs.add(index, centerY); } for(WorldComponent wc : sortedWCs) { wc.draw(g); } } private int getSortedIndex(Vector<Double> centerYs, double centerY) { if(centerYs.size() == 0) {return 0;} int index = 0; for(Double y : centerYs) { if(centerY < y) {return index;} index++; } return centerYs.size(); } // No Use @Override public void update() { Point2D playerCenter = ShapeTool.getCenterPoint(TheWorld.getPlayer().getShape()); if(KeyBoard.isKeyDown(KeyEvent.VK_Q)) { for(WorldComponent wc : TheWorld.getWorldComponents()) { wc.setShape(EditShape.getRotatedShape(wc.getShape(), 1920/2, 1080/2, -1)); // wc.setShape(EditShape.getRotatedShape(wc.getShape(), playerCenter.getX(), playerCenter.getY(), -1)); } } if(KeyBoard.isKeyDown(KeyEvent.VK_E)) { for(WorldComponent wc : TheWorld.getWorldComponents()) { wc.setShape(EditShape.getRotatedShape(wc.getShape(), 1920/2, 1080/2, 1)); // wc.setShape(EditShape.getRotatedShape(wc.getShape(), playerCenter.getX(), playerCenter.getY(), 1)); } } } @Override public void sound() {} }
[ "solea1204@naver.com" ]
solea1204@naver.com
5ed83054579a75141503b7192a3b21ce71816803
3df2b9d9062fb2c5ba0dd5b89007c5cfb84c9003
/free-docs/tppoo/2007/src/org/esme/tppoo/Message.java
835fe9702c850acad1211c51f3cf27f153b1f3a7
[]
no_license
belaran/free-docs
1198cdc9ae66052fab16860987b0754bb34e26a5
f33a36014bbedf195386fbfd677ef5305c9cf222
refs/heads/master
2021-01-10T13:23:33.363247
2017-01-16T17:12:45
2017-01-16T17:13:28
48,292,524
2
1
null
null
null
null
UTF-8
Java
false
false
2,221
java
/* * ESME SUDRIA * Copyright 2007, Esme SUDRIA and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.esme.tppoo; /** * * @author Romain PELISSE, pelisse@esme.fr * */ public class Message { private String id; // The message id has decided by caller, therefore it may not be unique ! private String recipient; // The recipient name ( ie his mailbox) private Object content; // Any object can be 'attached' to the message public Message(String id, Object content, String recipient) { this.id = id; this.content = content; this.recipient = recipient; } public String toString() { return "[Id:" + this.id + ",Content:" + this.content + ",Recipient:" + this.recipient + "]"; } /* * Appropriate getter/setters */ /** * @return the content */ public Object getContent() { return content; } /** * @param content the content to set */ public void setContent(Object content) { this.content = content; } /** * @return the id */ public String getId() { return id; } /** * @param id the id to set */ public void setId(String id) { this.id = id; } /** * @return the recipient */ public String getRecipient() { return recipient; } /** * @param recipient the recipient to set */ public void setRecipient(String recipient) { this.recipient = recipient; } }
[ "devnull@localhost" ]
devnull@localhost
aaf2e96284c0b2bd0adf19bc2718647ac42dbb75
e03259845379f28582bb947051ae76bf84c921c0
/src/main/java/ma/basenautique/app/service/impl/MembershipServiceImpl.java
e6f3e612c6090496185f757db7a5542581df8d0c
[]
no_license
fitdeveloper/MgmtBaseNautique
75cdba98544df8c2ea6dfcc34f2f5c57ec82c0a4
52b532bf6a109fed11f0541bb670c3b65e972b5e
refs/heads/main
2023-02-15T09:21:15.528528
2021-01-03T10:58:16
2021-01-03T10:58:16
326,347,408
0
0
null
2021-01-03T07:02:36
2021-01-03T06:56:59
Java
UTF-8
Java
false
false
3,043
java
package ma.basenautique.app.service.impl; import ma.basenautique.app.service.MembershipService; import ma.basenautique.app.domain.Membership; import ma.basenautique.app.repository.MembershipRepository; import ma.basenautique.app.repository.search.MembershipSearchRepository; import ma.basenautique.app.service.dto.MembershipDTO; import ma.basenautique.app.service.mapper.MembershipMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Optional; import static org.elasticsearch.index.query.QueryBuilders.*; /** * Service Implementation for managing {@link Membership}. */ @Service @Transactional public class MembershipServiceImpl implements MembershipService { private final Logger log = LoggerFactory.getLogger(MembershipServiceImpl.class); private final MembershipRepository membershipRepository; private final MembershipMapper membershipMapper; private final MembershipSearchRepository membershipSearchRepository; public MembershipServiceImpl(MembershipRepository membershipRepository, MembershipMapper membershipMapper, MembershipSearchRepository membershipSearchRepository) { this.membershipRepository = membershipRepository; this.membershipMapper = membershipMapper; this.membershipSearchRepository = membershipSearchRepository; } @Override public MembershipDTO save(MembershipDTO membershipDTO) { log.debug("Request to save Membership : {}", membershipDTO); Membership membership = membershipMapper.toEntity(membershipDTO); membership = membershipRepository.save(membership); MembershipDTO result = membershipMapper.toDto(membership); membershipSearchRepository.save(membership); return result; } @Override @Transactional(readOnly = true) public Page<MembershipDTO> findAll(Pageable pageable) { log.debug("Request to get all Memberships"); return membershipRepository.findAll(pageable) .map(membershipMapper::toDto); } @Override @Transactional(readOnly = true) public Optional<MembershipDTO> findOne(Long id) { log.debug("Request to get Membership : {}", id); return membershipRepository.findById(id) .map(membershipMapper::toDto); } @Override public void delete(Long id) { log.debug("Request to delete Membership : {}", id); membershipRepository.deleteById(id); membershipSearchRepository.deleteById(id); } @Override @Transactional(readOnly = true) public Page<MembershipDTO> search(String query, Pageable pageable) { log.debug("Request to search for a page of Memberships for query {}", query); return membershipSearchRepository.search(queryStringQuery(query), pageable) .map(membershipMapper::toDto); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
7e4fc94760ca35264269cf6444aab8e1a8cae793
1d1345b6c7ac4af811cec7e792fc17691f97d135
/src/com/pisen/router/ui/phone/resource/v2/upload/UploadCategoryFragment.java
b3b5b350bce2f461122a42ca4eb4a3056d4aa3e6
[]
no_license
simahuan/cloud-v3.2
75c5937d7866481d4e8e28ab53a5be4c43ecfa84
87cd4389311b0dc6cf92cfc3a3387789cb960e6e
refs/heads/master
2020-04-17T13:33:12.175828
2019-01-20T04:42:53
2019-01-20T04:42:53
166,620,344
0
2
null
null
null
null
UTF-8
Java
false
false
2,117
java
package com.pisen.router.ui.phone.resource.v2.upload; import java.util.List; import android.os.Bundle; import android.studio.os.AsyncTaskUtils; import android.studio.os.AsyncTaskUtils.InBackgroundCallback; import android.studio.os.AsyncTaskUtils.TaskContainer; import android.view.View; import android.widget.TextView; import com.pisen.router.R; import com.pisen.router.core.filemanager.LocalResourceManager; import com.pisen.router.core.filemanager.ResourceCategory.FileType; import com.pisen.router.core.filemanager.ResourceInfo; public abstract class UploadCategoryFragment extends UploadFragment implements IChoiceActionBar { private String dirPath; private FileType type; private LocalResourceManager sardineManager; private TaskContainer taskContainer; public UploadCategoryFragment(RootUploadActivity activity, String dirPath, FileType type) { super(activity); this.dirPath = dirPath; this.type = type; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); sardineManager = new LocalResourceManager(getActivity()); loadingData(); } @Override public void onDestroyView() { if (taskContainer != null) { taskContainer.cancelRequest(); } super.onDestroyView(); } private void loadingData() { showLoadingMsg(); taskContainer = AsyncTaskUtils.execute(new InBackgroundCallback<List<ResourceInfo>>() { @Override public List<ResourceInfo> doInBackground() { return sardineManager.listRecursively(dirPath, type); } @Override public void onPostExecute(List<ResourceInfo> results) { onLoadFinished(results); hideLoadingMsg(); } }); } private void showLoadingMsg() { ((TextView) findViewById(R.id.msgToast)).setVisibility(View.VISIBLE); ((TextView) findViewById(R.id.msgToast)).setText("正在获取,请稍候..."); } private void hideLoadingMsg() { ((TextView) findViewById(R.id.msgToast)).setVisibility(View.GONE); } /** * 数据加载完成回调 * * @param results */ protected abstract void onLoadFinished(List<ResourceInfo> results); }
[ "455215547@qq.com" ]
455215547@qq.com
c6e3a7056cc9e51be3688e9cd4ebf65261f016f0
adad299298b3a4ddbc0d152093b3e5673a940e52
/neoHort5/src/main/java/neohort/universal/output/lib_pdf/document_keywords.java
19300b2d6847fefb8bf6eecc37c60836d7f63ae8
[]
no_license
surban1974/neohort
a692e49c8e152cea0b155d81c2b2b1b167630ba8
0c371590e739defbc25d5befd1d44fcf18d1bcab
refs/heads/master
2022-07-27T18:57:49.916560
2022-01-04T18:00:12
2022-01-04T18:00:12
5,521,942
2
1
null
2022-06-30T20:10:02
2012-08-23T08:33:40
Java
UTF-8
Java
false
false
2,211
java
/** * Creation date: (14/12/2005) * @author: Svyatoslav Urbanovych surban@bigmir.net svyatoslav.urbanovych@gmail.com */ /******************************************************************************** * * Copyright (C) 2005 Svyatoslav Urbanovych * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *********************************************************************************/ package neohort.universal.output.lib_pdf; import java.util.Hashtable; import neohort.log.stubs.iStub; import neohort.universal.output.iConst; import neohort.universal.output.lib.report_element_base; import com.itextpdf.text.Document; public class document_keywords extends element{ private static final long serialVersionUID = -1L; public document_keywords() { super(); } public void executeFirst(Hashtable _tagLibrary, Hashtable _beanLibrary){ try{ Document document = ((Document)(((report_element_base)_beanLibrary.get("SYSTEM:"+iConst.iHORT_SYSTEM_Document)).getContent())); String content=prepareContentString(internal_style.getFORMAT()); document.addKeywords(content); }catch(Exception e){ setError(e,iStub.log_WARN); } } public void executeLast(Hashtable _tagLibrary, Hashtable _beanLibrary){ try{ if(_tagLibrary.get(getName()+":"+getID())==null) _tagLibrary.remove(getName()+":"+getID()+"_ids_"+this.motore.hashCode()); else _tagLibrary.remove(getName()+":"+getID()); }catch(Exception e){ setError(e,iStub.log_WARN); } } public void reimposta() { setName("DOCUMENT_KEYWORDS"); } public boolean refreshText() { return true; } }
[ "svyatoslav.urbanovych@gmail.com" ]
svyatoslav.urbanovych@gmail.com
93e263be44e3de24d37256309d2902f9bdcfa92d
9421449a949604b83a483805a18c22035f6d5393
/src/reversi/ClientPlayerDecider.java
1c2b594bf96b85900e39f8ac4b11540f4534a085
[]
no_license
hidny/AIGameServer
c558c466aa69dd5e3b4d124473498ddd20d1e27d
57f7e15b090658f5405919853171290aed2bdda1
refs/heads/master
2022-05-22T01:17:06.265878
2022-04-04T03:29:41
2022-04-04T03:29:41
22,551,550
2
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
package reversi; //so far this class only has stubs. //TODO: make this interact with the console //nad print all relevant variables. //My plan is to make the client-side do the remembering. public class ClientPlayerDecider implements PlayerDecider { private static String UNENTERED_MOVE = "NAM"; private String currentMove = UNENTERED_MOVE; public synchronized void setMove(String move) { currentMove = move; } private String name; public ClientPlayerDecider(String name) { this.name = name; } public void start(String names[]) { } public void updateBoard(Position pos, int currentPlayerColour) { } //asks the current player to play a card. //if the player renages, he/she will get a warning! public String getMove(Position pos, int currentPlayerColour) { String ret; try { while(currentMove.equals(UNENTERED_MOVE) ) { //TODO: sleep Thread.sleep(1000); } } catch (Exception e) { e.printStackTrace(); } ret = currentMove.toLowerCase().trim(); //TODO: //TESTING COMMENT this out to make the program auto-play. currentMove = UNENTERED_MOVE; return ret; } public String getName() { return this.name; } }
[ "mtardibuono@gmail.com" ]
mtardibuono@gmail.com
7ea2dfbc3ae54fbd0c9a6b9f2939c7c650faf65b
3bc62f2a6d32df436e99507fa315938bc16652b1
/cvs/cvs-plugin/src/com/intellij/cvsSupport2/javacvsImpl/io/OutputStreamWrapper.java
6b52127852eca08061b355274c7307256de05b68
[ "Apache-2.0" ]
permissive
JetBrains/intellij-obsolete-plugins
7abf3f10603e7fe42b9982b49171de839870e535
3e388a1f9ae5195dc538df0d3008841c61f11aef
refs/heads/master
2023-09-04T05:22:46.470136
2023-06-11T16:42:37
2023-06-11T16:42:37
184,035,533
19
29
Apache-2.0
2023-07-30T14:23:05
2019-04-29T08:54:54
Java
UTF-8
Java
false
false
1,627
java
/* * Copyright 2000-2009 JetBrains s.r.o. * * 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.intellij.cvsSupport2.javacvsImpl.io; import java.io.IOException; import java.io.OutputStream; /** * author: lesya */ public class OutputStreamWrapper extends OutputStream{ private final OutputStream myOutputStream; private final ReadWriteStatistics myStatistics; public OutputStreamWrapper(OutputStream outputStream, ReadWriteStatistics statistics) { myOutputStream = outputStream; myStatistics = statistics; } @Override public void write(int b) throws IOException { myOutputStream.write(b); myStatistics.send(1); } @Override public void close() throws IOException { myOutputStream.close(); } @Override public void write(byte[] b) throws IOException { myOutputStream.write(b); myStatistics.send(b.length); } @Override public void write(byte[] b, int off, int len) throws IOException { myOutputStream.write(b, off, len); myStatistics.send(len); } @Override public void flush() throws IOException { myOutputStream.flush(); } }
[ "dmitriy.smirnov@jetbrains.com" ]
dmitriy.smirnov@jetbrains.com
5d550096f30ed0c2c022be18da0282e4d9716266
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__Environment_multiply_54a.java
7d0a46eb774efa6fa5dc13dd340963a6e9bdff6d
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,177
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__Environment_multiply_54a.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-54a.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: Environment Read data from an environment variable * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an overflow before performing the multiplication * BadSink : Unchecked multiplication, which can lead to overflow * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE190_Integer_Overflow; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; import java.util.logging.Logger; public class CWE190_Integer_Overflow__Environment_multiply_54a extends AbstractTestCase { public void bad() throws Throwable { int data; Logger log_bad = Logger.getLogger("local-logger"); /* init data */ data = -1; /* get environment variable ADD */ String s_data = System.getenv("ADD"); try { data = Integer.parseInt(s_data.trim()); } catch( NumberFormatException nfe ) { log_bad.warning("Error with number parsing"); } (new CWE190_Integer_Overflow__Environment_multiply_54b()).bad_sink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { int data; java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE190_Integer_Overflow__Environment_multiply_54b()).goodG2B_sink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { int data; Logger log_bad = Logger.getLogger("local-logger"); /* init data */ data = -1; /* get environment variable ADD */ String s_data = System.getenv("ADD"); try { data = Integer.parseInt(s_data.trim()); } catch( NumberFormatException nfe ) { log_bad.warning("Error with number parsing"); } (new CWE190_Integer_Overflow__Environment_multiply_54b()).goodB2G_sink(data ); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
15774b91c85a17798599f0094f90868bb061ec0e
6499720f62e9e142045ea6274d59c778c4e66b7f
/app/src/main/java/com/freak/mvvmhttpmanager/mvvm/dialog/model/DialogModel.java
97635ffe9c06f3983b95fafdffddccd19099d9bf
[]
no_license
freakcsh/MVVMHttpManager
6a87b5c3c5c48d46c534b4a1f94968561da2c519
5a8c36e414ffcf3ff3afad9a24ef46ef51110606
refs/heads/master
2020-05-23T14:26:33.601333
2020-04-17T08:13:26
2020-04-17T08:13:26
186,802,997
2
1
null
null
null
null
UTF-8
Java
false
false
1,096
java
package com.freak.mvvmhttpmanager.mvvm.dialog.model; /** * @author Freak * @date 2019/5/21. */ public class DialogModel { private String title; private String context; private String cancel; private String commit; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getCancel() { return cancel; } public void setCancel(String cancel) { this.cancel = cancel; } public String getCommit() { return commit; } public void setCommit(String commit) { this.commit = commit; } @Override public String toString() { return "DialogModel{" + "title='" + title + '\'' + ", context='" + context + '\'' + ", cancel='" + cancel + '\'' + ", commit='" + commit + '\'' + '}'; } }
[ "740997937@qq.com" ]
740997937@qq.com
314ddc207a94d104a8e5a35a028bbfac16b41522
79bdb304316cba76c0be112d78a1dc594c0c4a01
/PushModel/src/main/java/com/znt/push/callback/CheckUpdateCallBack.java
29e49e5df33cef05ee918f0ce940a989e805175a
[]
no_license
HotterYu/DianYinBox
0e075b0b7f0bf78553ff699d72180edbe8a1542f
1eadff3c8187ba5e796794b0d44d81d5f87efe7e
refs/heads/master
2020-05-15T15:31:26.715247
2019-06-19T03:13:16
2019-06-19T03:13:16
174,515,846
0
1
null
null
null
null
UTF-8
Java
false
false
1,691
java
package com.znt.push.callback; import com.znt.lib.bean.UpdateInfor; import com.znt.push.http.callback.BaseCallBack; import org.json.JSONObject; import java.io.IOException; import okhttp3.Response; public abstract class CheckUpdateCallBack extends BaseCallBack { protected String RESULT_INFO = "info"; protected String RESULT_OK = "result"; @Override public String parseNetworkResponse(Response response,int requestId) throws IOException { UpdateInfor updateInfor = null; if(response.isSuccessful()) { String string = response.body().string(); try { JSONObject jsonObject = new JSONObject(string); int result = jsonObject.getInt(RESULT_OK); if(result == RESULT_SUCCESS) { JSONObject json = jsonObject.getJSONObject(RESULT_INFO); /*updateInfor = new UpdateInfor(); String versionName = getInforFromJason(json, "version"); String versionNum = getInforFromJason(json, "versionNum"); String apkUrl = getInforFromJason(json, "url"); String updateType = getInforFromJason(json, "updateType"); updateInfor.setApkUrl(apkUrl); updateInfor.setUpdateType(updateType); updateInfor.setVersionNum(versionNum); updateInfor.setVersionName(versionName);*/ return json.toString(); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } return null; } }
[ "yuyan@zhunit.com" ]
yuyan@zhunit.com