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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a9b07228035cd2549d299686a3765b9cf9c2317a
|
749af49c4138221e82da02becc27c2e521e7a2aa
|
/src/main/java/gpms/model/BaseInfo.java
|
8c080755e255bd12952ee0235d1b9099418313ac
|
[] |
no_license
|
Milstein/GPMS-GlassFish-Jersey
|
d989137443ba22537e1801654d80b01aa0c19e94
|
a3f4f4f17752f15f4f784fbe5280c03f35174745
|
refs/heads/master
| 2022-07-13T16:24:36.502908
| 2016-03-07T20:46:27
| 2016-03-07T20:46:27
| 52,923,202
| 0
| 0
| null | 2022-06-28T14:20:21
| 2016-03-02T01:22:46
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,172
|
java
|
package gpms.model;
import java.io.Serializable;
import org.mongodb.morphia.annotations.Embedded;
import org.mongodb.morphia.annotations.Property;
import com.google.gson.annotations.Expose;
@Embedded
public class BaseInfo implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Expose
@Property("MTDC")
private boolean MTDC;
@Expose
@Property("TDC")
private boolean TDC;
@Expose
@Property("TC")
private boolean TC;
@Expose
@Property("other")
private boolean other;
@Expose
@Property("not applicable")
private boolean notApplicable;
public BaseInfo() {
}
public boolean isMTDC() {
return MTDC;
}
public void setMTDC(boolean mTDC) {
MTDC = mTDC;
}
public boolean isTDC() {
return TDC;
}
public void setTDC(boolean tDC) {
TDC = tDC;
}
public boolean isTC() {
return TC;
}
public void setTC(boolean tC) {
TC = tC;
}
public boolean isOther() {
return other;
}
public void setOther(boolean other) {
this.other = other;
}
public boolean isNotApplicable() {
return notApplicable;
}
public void setNotApplicable(boolean notApplicable) {
this.notApplicable = notApplicable;
}
@Override
public String toString() {
return "Base [MTDC=" + MTDC + ", TDC=" + TDC + ", TC=" + TC
+ ", other=" + other + ", notApplicable=" + notApplicable + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (MTDC ? 1231 : 1237);
result = prime * result + (TC ? 1231 : 1237);
result = prime * result + (TDC ? 1231 : 1237);
result = prime * result + (notApplicable ? 1231 : 1237);
result = prime * result + (other ? 1231 : 1237);
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
BaseInfo other = (BaseInfo) obj;
if (MTDC != other.MTDC)
return false;
if (TC != other.TC)
return false;
if (TDC != other.TDC)
return false;
if (notApplicable != other.notApplicable)
return false;
if (this.other != other.other)
return false;
return true;
}
}
|
[
"milsonmun@yahoo.com"
] |
milsonmun@yahoo.com
|
4600d4b0f8d16904e3c56ad611cc9972520586a7
|
6d2fe29219cbdd28b64a3cff54c3de3050d6c7be
|
/plc4j/drivers/open-protocol/src/main/generated/org/apache/plc4x/java/openprotocol/readwrite/ForcedOrder.java
|
f45986f5104fbfa04abdbc785bc4fae01052e1ad
|
[
"Apache-2.0",
"Unlicense"
] |
permissive
|
siyka-au/plc4x
|
ca5e7b02702c8e59844bf45ba595052fcda24ac8
|
44e4ede3b4f54370553549946639a3af2c956bd1
|
refs/heads/develop
| 2023-05-12T12:28:09.037476
| 2023-04-27T22:55:23
| 2023-04-27T22:55:23
| 179,656,431
| 4
| 3
|
Apache-2.0
| 2023-03-02T21:19:18
| 2019-04-05T09:43:27
|
Java
|
UTF-8
|
Java
| false
| false
| 1,583
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* 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.apache.plc4x.java.openprotocol.readwrite;
import java.util.HashMap;
import java.util.Map;
// Code generated by code-generation. DO NOT EDIT.
public enum ForcedOrder {
FreeOrder((short) 0),
ForcedOrder((short) 1),
FreeAndForced((short) 2);
private static final Map<Short, ForcedOrder> map;
static {
map = new HashMap<>();
for (ForcedOrder value : ForcedOrder.values()) {
map.put((short) value.getValue(), value);
}
}
private short value;
ForcedOrder(short value) {
this.value = value;
}
public short getValue() {
return value;
}
public static ForcedOrder enumForValue(short value) {
return map.get(value);
}
public static Boolean isDefined(short value) {
return map.containsKey(value);
}
}
|
[
"christofer.dutz@c-ware.de"
] |
christofer.dutz@c-ware.de
|
732b6ac692248afd29308c204590106ecf1390a8
|
988c9b6eeb4589e3fd412f34a4bf92a16704b5d6
|
/completed/uva/uva12459.java
|
ed45443b93f4d5cc48262c76ff5bae26df57f740
|
[] |
no_license
|
greenstripes4/USACO
|
3bf08c97767e457ace8f24c61117271028802693
|
24cd71c6d1cd168d76b27c2d6edd0c6abeeb7a83
|
refs/heads/master
| 2023-02-07T17:54:26.563040
| 2023-02-06T03:29:17
| 2023-02-06T03:29:17
| 192,225,457
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 929
|
java
|
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
//Scanner f = new Scanner(new File("uva.in"));
//Scanner f = new Scanner(System.in);
//BufferedReader f = new BufferedReader(new FileReader("uva.in"));
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
String input;
while(!(input = f.readLine()).equals("0")) {
int n = Integer.parseInt(input);
long a = 0;
long b = 1;
for(int i = 1; i <= n; i++) {
long temp = a+b;
a = b;
b = temp;
}
out.println(b);
}
f.close();
out.close();
}
}
|
[
"strongheart404@gmail.com"
] |
strongheart404@gmail.com
|
4f5eecbc44b71d9211926051660e6dba5b2557e8
|
ca09769a84ffa51fe794c0cb97abe6ade8842568
|
/leetcode/src/ABS.java
|
27a5e0fb580cc16cbae978710f54320d25ccff58
|
[] |
no_license
|
1119878190/learnnote
|
787c97e8517f706d57b073b2a7547a142a4efbfa
|
815488af219c1d05ad0924fb5f366df73f3b40e9
|
refs/heads/main
| 2023-04-18T08:57:40.165367
| 2021-04-19T12:09:26
| 2021-04-19T12:09:26
| 357,556,403
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 497
|
java
|
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
public class ABS {
public static void main(String[] args) {
HashMap map = new HashMap();
map.put(1,"1");
map.put(2,"2");
System.out.println(map);
int a = 4;
Integer b = new Integer(4);
System.out.println(a ==b);
ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
}
}
|
[
"1119878190@qq.com"
] |
1119878190@qq.com
|
f298cdb3810c03ffb6cdeb89b51f044a8bdba391
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a024/A024885.java
|
608de7212f0ab5627c7910c4d23108c7c17bbf98
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 544
|
java
|
package irvine.oeis.a024;
import irvine.oeis.HalfConvolutionSequence;
import irvine.oeis.SkipSequence;
import irvine.oeis.a000.A000045;
import irvine.oeis.a023.A023531;
/**
* A024885 <code>s(1)t(n) + s(2)t(n-1) + ... + s(k)t(n-k+1)</code>, where k <code>= [ n/2 ], s = A023531, t = (F(2), F(3), F(4), ...)</code>.
* @author Sean A. Irvine
*/
public class A024885 extends HalfConvolutionSequence {
/** Construct the sequence. */
public A024885() {
super(new A023531(), new SkipSequence(new A000045(), 1), false);
next();
}
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
32a4fbc823868552615cb63131c89d57906184b8
|
5595a28469b05145089cba6f7babe7a342c3407c
|
/user/src/main/java/org/tessell/widgets/StubView.java
|
1c148716ba7b98d9ebfe32bb15163b82f6b66498
|
[
"Apache-2.0"
] |
permissive
|
stephenh/tessell
|
c8078e92e0e8738a842e7edb51f7a88366458a28
|
27e03c18b5f271fcdb12984f9a7dfbc4a26b912f
|
refs/heads/master
| 2021-10-30T08:02:13.928182
| 2016-08-03T13:09:58
| 2016-08-03T13:09:58
| 766,240
| 18
| 11
|
NOASSERTION
| 2021-08-17T15:16:43
| 2010-07-09T16:23:28
|
Java
|
UTF-8
|
Java
| false
| false
| 353
|
java
|
package org.tessell.widgets;
/** Base class for generated views to extend. */
public abstract class StubView extends CompositeIsWidget {
@Override
public void ensureDebugId(final String id) {
onEnsureDebugId(id);
super.ensureDebugId(id);
}
// for subclasses to override
protected void onEnsureDebugId(String ensureDebugId) {
}
}
|
[
"stephen@exigencecorp.com"
] |
stephen@exigencecorp.com
|
d1f3ef05f34dc67138207ad252d0de2de94cf1cf
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/java-design-patterns/learning/6966/DataBusTest.java
|
a9081985c25d9f74106d6b71a6dcb4d072f39275
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,237
|
java
|
/**
* The MIT License
* Copyright (c) 2014 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.databus;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import static org.mockito.BDDMockito.then;
import static org.mockito.Mockito.never;
/**
* Tests for {@link DataBus}.
*
* @author Paul Campbell (pcampbell@kemitix.net)
*/
public class DataBusTest {
@Mock
private Member member;
@Mock
private DataType event;
@BeforeEach
public void setUp() {
MockitoAnnotations.initMocks(this);
}
@Test
public void publishedEventIsReceivedBySubscribedMember() {
//given
final DataBus dataBus = DataBus.getInstance();
dataBus.subscribe(member);
//when
dataBus.publish(event);
//then
then(member).should().accept(event);
}
@Test
public void publishedEventIsNotReceivedByMemberAfterUnsubscribing() {
//given
final DataBus dataBus = DataBus.getInstance();
dataBus.subscribe(member);
dataBus.unsubscribe(member);
//when
dataBus.publish(event);
//then
then(member).should(never()).accept(event);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
b9e810d7a75115a52a930c51a2d08d2dccbe19f3
|
92515688b4aafbc315f076833705cc8e112eef6e
|
/src/main/java/com/apress/prospring3/ch4/no12_inject_parameter/InjectSimpleConfig.java
|
68a63f8e659e7eaff1779471a449e18c46877471
|
[] |
no_license
|
rolendSunq/ProSpring3
|
f667e8b57f60ae0707a797f20d8f928eb37021a5
|
4ce82c760fdda823a4d86018966add3528e661f6
|
refs/heads/master
| 2021-07-03T18:30:11.833221
| 2019-10-06T13:53:09
| 2019-10-06T13:53:09
| 23,565,396
| 0
| 0
| null | 2021-06-07T16:52:17
| 2014-09-02T04:50:18
|
Java
|
UTF-8
|
Java
| false
| false
| 907
|
java
|
package com.apress.prospring3.ch4.no12_inject_parameter;
public class InjectSimpleConfig {
private String name = "Rolend Sunq";
private int age = 35;
private float height = 1.78f;
private boolean programmer = true;
private Long ageInSeconds = 1103760000L;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public float getHeight() {
return height;
}
public void setHeight(float height) {
this.height = height;
}
public boolean isProgrammer() {
return programmer;
}
public void setProgrammer(boolean programmer) {
this.programmer = programmer;
}
public Long getAgeInSeconds() {
return ageInSeconds;
}
public void setAgeInSeconds(Long ageInSeconds) {
this.ageInSeconds = ageInSeconds;
}
}
|
[
"sunq0011@gmail.com"
] |
sunq0011@gmail.com
|
bed1bf111a1fdb5553be7595d75b9b8f9871ac33
|
b71673707e418dcbf869d0e53ef76f7ec7651ce1
|
/entity-view/testsuite/src/test/java/com/blazebit/persistence/view/testsuite/collections/index/model/DocumentViewWithMappingIndexMultiset.java
|
f5d1818d9afc063b484715634cfbd89fc641b6f3
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Mobe91/blaze-persistence
|
bf92028028b241eb6a0a5f13dec323566f5ec9f8
|
8a4c867f07d6d31404d35e4db672b481fc8a2d59
|
refs/heads/master
| 2023-08-17T05:42:02.526696
| 2020-11-28T20:13:04
| 2020-11-28T20:13:04
| 83,560,399
| 0
| 0
|
NOASSERTION
| 2020-02-05T21:56:44
| 2017-03-01T13:59:01
|
Java
|
UTF-8
|
Java
| false
| false
| 2,745
|
java
|
/*
* Copyright 2014 - 2020 Blazebit.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.blazebit.persistence.view.testsuite.collections.index.model;
import com.blazebit.persistence.testsuite.entity.Document;
import com.blazebit.persistence.view.EntityView;
import com.blazebit.persistence.view.FetchStrategy;
import com.blazebit.persistence.view.Mapping;
import com.blazebit.persistence.view.MappingIndex;
import com.blazebit.persistence.view.MultiCollectionMapping;
import java.util.List;
import java.util.Map;
import java.util.SortedSet;
/**
*
* @author Christian Beikov
* @since 1.5.0
*/
@EntityView(Document.class)
public interface DocumentViewWithMappingIndexMultiset extends DocumentViewWithMappingIndex {
@Mapping(value = "versions", fetch = FetchStrategy.MULTISET)
@MappingIndex("idx - 1")
public List<VersionViewWithMappingIndex> getVersions();
@Mapping(value = "versions", fetch = FetchStrategy.MULTISET)
@MappingIndex("idx")
public Map<Integer, VersionViewWithMappingIndex> getVersionMap();
@Mapping(value = "versions", fetch = FetchStrategy.MULTISET)
@MappingIndex("this")
public Map<VersionKeyView, VersionViewWithMappingIndex> getVersionMap2();
@Mapping(value = "versions", fetch = FetchStrategy.MULTISET)
// Good job Datanucleus.. https://github.com/datanucleus/datanucleus-core/issues/356
@MappingIndex("idx - idx")
@MultiCollectionMapping(comparator = VersionViewWithMappingIndex.DefaultComparator.class)
public List<SortedSet<VersionViewWithMappingIndex>> getMultiVersions();
@Mapping(value = "versions", fetch = FetchStrategy.MULTISET)
// Good job Datanucleus.. https://github.com/datanucleus/datanucleus-core/issues/356
@MappingIndex("idx - idx")
@MultiCollectionMapping(comparator = VersionViewWithMappingIndex.DefaultComparator.class)
public Map<Integer, SortedSet<VersionViewWithMappingIndex>> getMultiVersionMap();
@Mapping(value = "versions", fetch = FetchStrategy.MULTISET)
@MappingIndex("this")
@MultiCollectionMapping(comparator = VersionViewWithMappingIndex.DefaultComparator.class)
public Map<VersionStaticKeyView, SortedSet<VersionViewWithMappingIndex>> getMultiVersionMap2();
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
4827f07fa7108604ba7ccac5e9919ad3462785f3
|
5168ef2911634e97356d85d6cc015734e3fc1aa6
|
/src/main/java/com/roamtech/uc/model/AreaCode.java
|
20e57553566138be1bb06af667cd394a11c7b7d7
|
[
"Apache-2.0"
] |
permissive
|
caibinglong1987/ucserver
|
5056eac12fdb2f13b50e2e4fabe5bd3e744fd450
|
68075a9e275bf26c17bf7a39305196803d572918
|
refs/heads/master
| 2021-01-22T07:42:41.211856
| 2017-05-27T05:48:03
| 2017-05-27T05:48:03
| 92,573,725
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,117
|
java
|
package com.roamtech.uc.model;
import java.io.Serializable;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.xml.bind.annotation.XmlRootElement;
import com.alibaba.fastjson.annotation.JSONField;
@Entity
@XmlRootElement
@Table(name = "areacode")
public class AreaCode implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@JSONField(name = "id")
@Column(name = "id")
private Long Id;
@Column(name = "areacode")
@JSONField(name = "areacode")
private String areacode;
@Column(name = "areaname")
@JSONField(name = "areaname")
private String areaname;
@Column(name = "nationalcode")
@JSONField(name = "nationalcode")
private String nationalcode;
@Column(name = "moneycode")
@JSONField(name = "moneycode")
private String moneycode;
@JSONField(name = "timediff")
@Column(name = "timediff")
private Long timediff;
@JSONField(name = "groupid")
@Column(name = "groupid")
private Long groupid;
public Long getId() {
return Id;
}
public void setId(Long id) {
Id = id;
}
public String getAreacode() {
return areacode;
}
public void setAreacode(String areacode) {
this.areacode = areacode;
}
public String getAreaname() {
return areaname;
}
public void setAreaname(String areaname) {
this.areaname = areaname;
}
public String getNationalcode() {
return nationalcode;
}
public void setNationalcode(String nationalcode) {
this.nationalcode = nationalcode;
}
public String getMoneycode() {
return moneycode;
}
public void setMoneycode(String moneycode) {
this.moneycode = moneycode;
}
public Long getTimediff() {
return timediff;
}
public void setTimediff(Long timediff) {
this.timediff = timediff;
}
public Long getGroupid() {
return groupid;
}
public void setGroupid(Long groupid) {
this.groupid = groupid;
}
}
|
[
"caibinglong1987@gmail.com"
] |
caibinglong1987@gmail.com
|
01429909204321247322e04b9643af846e5c36db
|
f1c58f7679be0df788c7ca08b8f8bc54bdce8dce
|
/RealTimeNews_tm/src/vo/MemberVO.java
|
c939616ce3cb5a09f921020862c3fe0ee1e6c539
|
[] |
no_license
|
GoodPineApple/MulcamJSPWorkspace
|
9aec654e494eedf7c62b4ee063b46b6af11644bd
|
ee304fa0bd030bdd34215c85bee2e22bf3eb660b
|
refs/heads/master
| 2021-01-13T10:19:22.379407
| 2017-04-24T05:40:59
| 2017-04-24T05:40:59
| 76,632,380
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,077
|
java
|
package vo;
public class MemberVO {
private String id;
private String password;
private String name;
private String email;
//////////////////////////////////////////////////////////
public MemberVO(){
}
public MemberVO(String id, String password, String name, String email) {
this.id = id;
this.password = password;
this.name = name;
this.email = email;
}
///////////////////////////////////////////////////////////
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
///////////////////////////////////////////////////////////
@Override
public String toString() {
return "MemberVO [id=" + id + ", password=" + password + ", name=" + name + ", email=" + email + "]";
}
}
|
[
"taemin3000@naver.com"
] |
taemin3000@naver.com
|
40210884e71fe4f22e6d0b659163afff52d1b9a2
|
b45683d3130a937cd0262c960e1155a327ef4872
|
/facebook/ios-core/src/main/java/org/robovm/pods/facebook/core/FBSDKIntegrityProcessingAdapter.java
|
b10af7ad5f8ae0af9eb85071dffb40b8978758d3
|
[] |
no_license
|
CoderBaron/robovm-robopods
|
33324ccb54dcbf54c3716c7ec6e049a330261df9
|
346437b7b90798e4c9671cad2bae62b7e07b88a2
|
refs/heads/master
| 2023-08-04T08:55:11.971573
| 2023-07-23T00:36:21
| 2023-07-23T00:36:21
| 66,114,160
| 0
| 0
| null | 2016-08-19T21:42:07
| 2016-08-19T21:42:07
| null |
UTF-8
|
Java
| false
| false
| 1,950
|
java
|
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* 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.robovm.pods.facebook.core;
/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.annotation.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
import org.robovm.apple.dispatch.*;
import org.robovm.apple.coregraphics.*;
import org.robovm.apple.uikit.*;
import org.robovm.apple.webkit.*;
import org.robovm.apple.coreanimation.*;
import org.robovm.apple.storekit.*;
import org.robovm.pods.facebook.corebasics.*;
/*</imports>*/
/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*//*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/FBSDKIntegrityProcessingAdapter/*</name>*/
extends /*<extends>*/NSObject/*</extends>*/
/*<implements>*/implements FBSDKIntegrityProcessing/*</implements>*/ {
/*<ptr>*/
/*</ptr>*/
/*<bind>*/
/*</bind>*/
/*<constants>*//*</constants>*/
/*<constructors>*//*</constructors>*/
/*<properties>*/
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
@NotImplemented("processIntegrity:")
public boolean processIntegrity(String parameter) { return false; }
/*</methods>*/
}
|
[
"demyan.kimitsa@gmail.com"
] |
demyan.kimitsa@gmail.com
|
50bb97596a9023b9caa5d8a0072f232a2a0bdb7b
|
16faa69e96f7d0630da8074d23f9ba7b5d1b7843
|
/persistence/src/main/java/com/ivan/pazar/persistence/service/impl/ReviewServiceImpl.java
|
aff00de68c5cc1d209b5654193f17fa396048b77
|
[] |
no_license
|
IvanBorislavovDimitrov/PazarBG
|
28bbf0e2c2315ec8a78e6fd92e25292c8a5b2e89
|
a584881001e5ab72fabbe7629009bce3cadaca1a
|
refs/heads/master
| 2022-02-06T22:02:13.366980
| 2019-06-29T12:12:49
| 2019-06-29T12:12:49
| 173,686,693
| 0
| 0
| null | 2022-01-21T23:24:19
| 2019-03-04T06:28:10
|
Java
|
UTF-8
|
Java
| false
| false
| 4,057
|
java
|
package com.ivan.pazar.persistence.service.impl;
import com.ivan.pazar.domain.model.entity.Advertisement;
import com.ivan.pazar.domain.model.entity.Review;
import com.ivan.pazar.domain.model.entity.User;
import com.ivan.pazar.persistence.constants.Messages;
import com.ivan.pazar.persistence.model.service.ReviewAddServiceModel;
import com.ivan.pazar.persistence.model.service.ReviewRestServiceModel;
import com.ivan.pazar.persistence.model.service.ReviewServiceModel;
import com.ivan.pazar.persistence.repository.ReviewRepository;
import com.ivan.pazar.persistence.service.service_api.AdvertisementServiceExtended;
import com.ivan.pazar.persistence.service.service_api.ReviewServiceExtended;
import com.ivan.pazar.persistence.service.service_api.UserServiceExtended;
import org.modelmapper.ModelMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.time.LocalDateTime;
import java.util.List;
import java.util.stream.Collectors;
@Service
@Transactional
public class ReviewServiceImpl implements ReviewServiceExtended {
private static final Logger LOGGER = LoggerFactory.getLogger(ReviewServiceImpl.class);
private final ReviewRepository reviewRepository;
private final AdvertisementServiceExtended advertisementService;
private final UserServiceExtended userService;
private final ModelMapper modelMapper;
@Autowired
public ReviewServiceImpl(ReviewRepository reviewRepository, AdvertisementServiceExtended advertisementService, UserServiceExtended userService, ModelMapper modelMapper) {
this.reviewRepository = reviewRepository;
this.advertisementService = advertisementService;
this.userService = userService;
this.modelMapper = modelMapper;
}
@Override
public ReviewServiceModel save(ReviewAddServiceModel reviewAddServiceModel) {
LOGGER.info(Messages.ADDING_REVIEW);
Review review = modelMapper.map(reviewAddServiceModel, Review.class);
review.setId(null);
User user = userService.getUserByUsername(reviewAddServiceModel.getUsername());
Advertisement advertisement = advertisementService.getAdvertisementById(reviewAddServiceModel.getAdvertisementId());
review.setAdvertisement(advertisement);
review.setUser(user);
review.setAddedOn(LocalDateTime.now());
return modelMapper.map(reviewRepository.save(review), ReviewServiceModel.class);
}
@Override
public List<ReviewRestServiceModel> getReviewsByAdvertisementId(String advertisementId) {
LOGGER.info(Messages.GETTING_REVIEWS_BY_ADVERTISEMENT_ID);
return reviewRepository.findAllByAdvertisementId(advertisementId).stream().map(review -> {
ReviewRestServiceModel reviewRestServiceModel = new ReviewRestServiceModel();
reviewRestServiceModel.setId(review.getId());
reviewRestServiceModel.setAddedOn(review.getAddedOn().toString());
reviewRestServiceModel.setText(review.getText());
reviewRestServiceModel.setUsername(review.getUser().getUsername());
return reviewRestServiceModel;
}).collect(Collectors.toList());
}
@Override
public void deleteById(String reviewId) {
reviewRepository.deleteById(reviewId);
}
@Override
public ReviewServiceModel findById(String id) {
LOGGER.info(Messages.FINDING_REVIEW_BY_ID);
return modelMapper.map(reviewRepository.findById(id).orElse(null), ReviewServiceModel.class);
}
@Override
public String update(ReviewServiceModel reviewServiceModel) {
LOGGER.info(Messages.UPDATING_REVIEW);
Review review = reviewRepository.findById(reviewServiceModel.getId()).orElse(null);
review.setText(reviewServiceModel.getText());
String advertId = review.getAdvertisement().getId();
reviewRepository.save(review);
return advertId;
}
}
|
[
"starstrucks1997@gmail.com"
] |
starstrucks1997@gmail.com
|
7a12ac3f6c4da1c7d8671155fd15afb9f1e81f77
|
858d66873ab6e459e82a8f090f29ad366dcf8f2b
|
/EAM2.0/tsrdp/src/main/java/com/tiansu/eam/modules/faultOrder/service/FaultSwitchService.java
|
6a4c1c60324514ea13bcddb726f712361c34a15e
|
[
"Apache-2.0"
] |
permissive
|
duanfuju/EAM2.0
|
286c2b5c0165190eb4184835af6ece0564e7b4c5
|
18d6c7561af1659039f5ec2259506d7c6d0c2ec1
|
refs/heads/master
| 2020-03-16T17:25:44.244183
| 2018-05-10T01:29:45
| 2018-05-10T01:29:45
| 132,831,854
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
package com.tiansu.eam.modules.faultOrder.service;
import com.thinkgem.jeesite.common.persistence.Page;
import com.tiansu.eam.common.service.CrudService;
import com.tiansu.eam.modules.faultOrder.dao.FaultSwitchDao;
import com.tiansu.eam.modules.faultOrder.entity.FaultSwitch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
/**
* @author wangjl
* @description 故障工单申请审批服务类
* @create 2017-08-21 8:40
*
**/
@Service
@Transactional(readOnly = true)
public class FaultSwitchService extends CrudService<FaultSwitchDao,FaultSwitch>{
@Autowired
FaultSwitchDao faultSwitchDao;
@Override
public Page setOrderBy(Page page, HttpServletRequest request){
page.setOrderBy(" a.id desc");
return page;
}
}
|
[
"913500680@qq.com"
] |
913500680@qq.com
|
9a72831c7723d92a469ecdb43e869ab0c43be113
|
e4aea93f2988e2cf1be4f96a39f6cc3328cbbd50
|
/src/com/flagleader/a/a/g.java
|
ed2dfcfa93de9c8c6fb697cf6317f0f739141f2c
|
[] |
no_license
|
lannerate/ruleBuilder
|
18116282ae55e9d56e9eb45d483520f90db4a1a6
|
b5d87495990aa1988adf026366e92f7cbb579b19
|
refs/heads/master
| 2016-09-05T09:13:43.879603
| 2013-11-10T08:32:58
| 2013-11-10T08:32:58
| 14,231,127
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,549
|
java
|
package com.flagleader.a.a;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
public final class g
implements h, Serializable
{
private transient Object[] a;
private transient int b;
public void a(int paramInt, Object paramObject)
{
c(this.b + 1);
System.arraycopy(this.a, paramInt, this.a, paramInt + 1, this.b - paramInt);
this.a[paramInt] = paramObject;
this.b += 1;
}
public void a()
{
this.b = 0;
}
private void c(int paramInt)
{
int i = this.a == null ? 0 : this.a.length;
if (paramInt > i)
{
Object[] arrayOfObject = this.a;
this.a = new Object[paramInt];
if (arrayOfObject != null)
System.arraycopy(arrayOfObject, 0, this.a, 0, this.b);
}
}
public Object a(int paramInt)
{
return this.a[paramInt];
}
private void a(ObjectInputStream paramObjectInputStream)
{
paramObjectInputStream.defaultReadObject();
this.b = paramObjectInputStream.readInt();
this.a = (this.b <= 0 ? null : new Object[this.b]);
for (int i = 0; i < this.b; i++)
this.a[i] = paramObjectInputStream.readObject();
}
public void b(int paramInt)
{
int i = this.b - paramInt - 1;
if (i > 0)
System.arraycopy(this.a, paramInt + 1, this.a, paramInt, i);
this.b -= 1;
this.a[this.b] = null;
}
public void b(int paramInt, Object paramObject)
{
this.a[paramInt] = paramObject;
}
public int b()
{
return this.b;
}
public void c()
{
if ((this.a != null) && (this.a.length > this.b))
if (this.b > 0)
{
int i = this.b;
Object[] arrayOfObject = this.a;
this.a = new Object[i];
if (arrayOfObject != null)
System.arraycopy(arrayOfObject, 0, this.a, 0, this.b);
}
else
{
this.a = null;
}
}
private void a(ObjectOutputStream paramObjectOutputStream)
{
paramObjectOutputStream.defaultWriteObject();
paramObjectOutputStream.writeInt(this.b);
for (int i = 0; i < this.b; i++)
paramObjectOutputStream.writeObject(this.a[i]);
}
public g()
{
this.a = null;
this.b = 0;
}
public g(int paramInt)
{
this.a = (paramInt <= 0 ? null : new Object[paramInt]);
this.b = 0;
}
}
/* Location: D:\Dev_tools\ruleEngine\rbuilder.jar
* Qualified Name: com.flagleader.a.a.g
* JD-Core Version: 0.6.0
*/
|
[
"zhanghuizaizheli@hotmail.com"
] |
zhanghuizaizheli@hotmail.com
|
32b89c17364c00fdba32ecd1be7dd59014494dca
|
5cb1a8ffe3ed009c85d534c5ac0b00d3fb447626
|
/subprojects/messaging/src/main/java/org/gradle/internal/remote/internal/hub/DefaultMethodArgsSerializer.java
|
5d4bb311529100293401c0c91567272da1afaeea
|
[
"BSD-3-Clause",
"LGPL-2.1-or-later",
"MIT",
"CPL-1.0",
"Apache-2.0",
"LGPL-2.1-only",
"LicenseRef-scancode-mit-old-style"
] |
permissive
|
Verdinjoshua26/gradle
|
f11184f20bf45456d8a903c6677cc29a0ac1117b
|
cfeeb71d1e3159f5d10856aef854344ba92c4a0f
|
refs/heads/master
| 2023-08-05T20:44:50.692054
| 2019-05-17T13:59:27
| 2019-05-17T13:59:30
| 187,253,049
| 2
| 0
|
Apache-2.0
| 2023-07-22T05:59:51
| 2019-05-17T17:00:44
|
Groovy
|
UTF-8
|
Java
| false
| false
| 3,325
|
java
|
/*
* Copyright 2016 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.gradle.internal.remote.internal.hub;
import org.gradle.internal.serialize.Decoder;
import org.gradle.internal.serialize.Encoder;
import org.gradle.internal.serialize.Serializer;
import org.gradle.internal.serialize.SerializerRegistry;
import java.util.List;
class DefaultMethodArgsSerializer implements MethodArgsSerializer {
private static final Object[] ZERO_ARGS = new Object[0];
private final List<SerializerRegistry> serializerRegistries;
private final MethodArgsSerializer defaultArgsSerializer;
public DefaultMethodArgsSerializer(List<SerializerRegistry> serializerRegistries, MethodArgsSerializer defaultArgsSerializer) {
this.serializerRegistries = serializerRegistries;
this.defaultArgsSerializer = defaultArgsSerializer;
}
@Override
public Serializer<Object[]> forTypes(Class<?>[] types) {
if (types.length == 0) {
return new EmptyArraySerializer();
}
SerializerRegistry selected = null;
for (SerializerRegistry serializerRegistry : serializerRegistries) {
if (serializerRegistry.canSerialize(types[0])) {
selected = serializerRegistry;
break;
}
}
if (selected == null) {
return defaultArgsSerializer.forTypes(types);
}
final Serializer<Object>[] serializers = new Serializer[types.length];
for (int i = 0; i < types.length; i++) {
Class<?> type = types[i];
serializers[i] = (Serializer<Object>) selected.build(type);
}
return new ArraySerializer(serializers);
}
private static class ArraySerializer implements Serializer<Object[]> {
private final Serializer<Object>[] serializers;
ArraySerializer(Serializer<Object>[] serializers) {
this.serializers = serializers;
}
@Override
public Object[] read(Decoder decoder) throws Exception {
Object[] result = new Object[serializers.length];
for (int i = 0; i < serializers.length; i++) {
result[i] = serializers[i].read(decoder);
}
return result;
}
@Override
public void write(Encoder encoder, Object[] value) throws Exception {
for (int i = 0; i < value.length; i++) {
serializers[i].write(encoder, value[i]);
}
}
}
private class EmptyArraySerializer implements Serializer<Object[]> {
@Override
public Object[] read(Decoder decoder) {
return ZERO_ARGS;
}
@Override
public void write(Encoder encoder, Object[] value) {
}
}
}
|
[
"adam@gradle.com"
] |
adam@gradle.com
|
d722b71b281e2ac329371888d66e4a2bf25be565
|
2b2fcb1902206ad0f207305b9268838504c3749b
|
/WakfuClientSources/srcx/class_1357_aMn.java
|
5419dad44f2d015ca418ded5996d01f4426127d8
|
[] |
no_license
|
shelsonjava/Synx
|
4fbcee964631f747efc9296477dee5a22826791a
|
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
|
refs/heads/master
| 2021-01-15T13:51:41.816571
| 2013-11-17T10:46:22
| 2013-11-17T10:46:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 400
|
java
|
public class aMn extends XP
{
private int eru;
public aMn(String paramString, long paramLong, int paramInt)
{
super(paramString, paramLong);
this.eru = paramInt;
}
public int bdA() {
return this.eru;
}
public String toString()
{
return "GuildStorageHistoryMoneyEntry{m_memberName='" + this.cIk + '\'' + ", m_date=" + this.bwF + ", m_amount=" + this.eru + '}';
}
}
|
[
"music_inme@hotmail.fr"
] |
music_inme@hotmail.fr
|
ecc162e342683d5c09a937b1b8ce358f96f95882
|
7af846ccf54082cd1832c282ccd3c98eae7ad69a
|
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_14/Foo44.java
|
5f167957986fea0368ddb4ba708950ccf40ca53a
|
[] |
no_license
|
Kadanza/TestModules
|
821f216be53897d7255b8997b426b359ef53971f
|
342b7b8930e9491251de972e45b16f85dcf91bd4
|
refs/heads/master
| 2020-03-25T08:13:09.316581
| 2018-08-08T10:47:25
| 2018-08-08T10:47:25
| 143,602,647
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package taxi.nicecode.com.ftmap.generated.package_14;
public class Foo44 {
public void foo0(){
new Foo43().foo5();
}
public void foo1(){
foo0();
}
public void foo2(){
foo1();
}
public void foo3(){
foo2();
}
public void foo4(){
foo3();
}
public void foo5(){
foo4();
}
}
|
[
"1"
] |
1
|
57f98fd39cc82e5f26635e8aa6f010c12d575c96
|
c94f888541c0c430331110818ed7f3d6b27b788a
|
/ldc/java/src/main/java/com/antgroup/antchain/openapi/ldc/models/AntvipDomain.java
|
b205113385b17558cd2d39dd7f0dff2a14ab6dfb
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
alipay/antchain-openapi-prod-sdk
|
48534eb78878bd708a0c05f2fe280ba9c41d09ad
|
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
|
refs/heads/master
| 2023-09-03T07:12:04.166131
| 2023-09-01T08:56:15
| 2023-09-01T08:56:15
| 275,521,177
| 9
| 10
|
MIT
| 2021-03-25T02:35:20
| 2020-06-28T06:22:14
|
PHP
|
UTF-8
|
Java
| false
| false
| 1,691
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.ldc.models;
import com.aliyun.tea.*;
public class AntvipDomain extends TeaModel {
// 应用名称
@NameInMap("application")
@Validation(required = true)
public String application;
// 部署单元cell名称
@NameInMap("cell")
@Validation(required = true)
public String cell;
// 健康检查端口,非必填项
@NameInMap("health_check_default_port")
public Long healthCheckDefaultPort;
// 健康检查类型,默认为TCP
@NameInMap("health_check_type")
public String healthCheckType;
public static AntvipDomain build(java.util.Map<String, ?> map) throws Exception {
AntvipDomain self = new AntvipDomain();
return TeaModel.build(map, self);
}
public AntvipDomain setApplication(String application) {
this.application = application;
return this;
}
public String getApplication() {
return this.application;
}
public AntvipDomain setCell(String cell) {
this.cell = cell;
return this;
}
public String getCell() {
return this.cell;
}
public AntvipDomain setHealthCheckDefaultPort(Long healthCheckDefaultPort) {
this.healthCheckDefaultPort = healthCheckDefaultPort;
return this;
}
public Long getHealthCheckDefaultPort() {
return this.healthCheckDefaultPort;
}
public AntvipDomain setHealthCheckType(String healthCheckType) {
this.healthCheckType = healthCheckType;
return this;
}
public String getHealthCheckType() {
return this.healthCheckType;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
0083b39711856cefb79e24f11eebe137db4db634
|
fe06f97c2cf33a8b4acb7cb324b79a6cb6bb9dac
|
/java/po/impl/EHU_EVERTER/ImphwbdatahPo.java
|
15349663a2cbe7298f990145b9f0d2e533ab27bb
|
[] |
no_license
|
HeimlichLin/TableSchema
|
3f67dae0b5b169ee3a1b34837ea9a2d34265f175
|
64b66a2968c3a169b75d70d9e5cf75fa3bb65354
|
refs/heads/master
| 2023-02-11T09:42:47.210289
| 2023-02-01T02:58:44
| 2023-02-01T02:58:44
| 196,526,843
| 0
| 0
| null | 2022-06-29T18:53:55
| 2019-07-12T07:03:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,091
|
java
|
package com.doc.common.po.impl;
public class ImphwbdatahPo implements IImphwbdatahPo {
public enum COLUMNS {
FORID("null"), //
FLIGHT("null"), //
AWB("null"), //
HWB("null"), //
PC("null"), //
CREATEDATE("null"), //
INCOME("null"), //
DELE("null"), //
FLIGHTDATE("null") //
;
private final String comment;
private COLUMNS(final String comment) {
this.comment = comment;
}
public String getComment() {
return this.comment;
}
}
private String forid;
private String flight;
private String awb;
private String hwb;
private BigDecimal pc;
private java.sql.Timestamp createdate;
private String income;
private String dele;
private String flightdate;
@Override
public String getForid() {
return this.forid;
}
@Override
public void setForid(final String forid) {
this.forid = forid;
}
@Override
public String getFlight() {
return this.flight;
}
@Override
public void setFlight(final String flight) {
this.flight = flight;
}
@Override
public String getAwb() {
return this.awb;
}
@Override
public void setAwb(final String awb) {
this.awb = awb;
}
@Override
public String getHwb() {
return this.hwb;
}
@Override
public void setHwb(final String hwb) {
this.hwb = hwb;
}
@Override
public BigDecimal getPc() {
return this.pc;
}
@Override
public void setPc(final BigDecimal pc) {
this.pc = pc;
}
@Override
public java.sql.Timestamp getCreatedate() {
return this.createdate;
}
@Override
public void setCreatedate(final java.sql.Timestamp createdate) {
this.createdate = createdate;
}
@Override
public String getIncome() {
return this.income;
}
@Override
public void setIncome(final String income) {
this.income = income;
}
@Override
public String getDele() {
return this.dele;
}
@Override
public void setDele(final String dele) {
this.dele = dele;
}
@Override
public String getFlightdate() {
return this.flightdate;
}
@Override
public void setFlightdate(final String flightdate) {
this.flightdate = flightdate;
}
}
|
[
"jerry.l@acer.com"
] |
jerry.l@acer.com
|
76210720eef8ed5ea6c7db4e465ca3e9db35e864
|
d1e677e9812596d5de1a33de1c8da4b27ee29c31
|
/src/main/java/com/taskconsole/util/DeDispatcherServlet.java
|
e96f7e4c2e8d398828c2a7c385b67fd2e765a23f
|
[] |
no_license
|
dengqz/taskconsole
|
77d0af14833269089dc51f67dbec72953837922f
|
318e8c637e8d594173c6bce3b235ea397f5df93f
|
refs/heads/master
| 2021-08-07T14:32:00.819805
| 2017-11-08T09:16:48
| 2017-11-08T09:16:48
| 106,487,126
| 0
| 0
| null | 2017-11-08T09:16:49
| 2017-10-11T00:47:29
|
Java
|
UTF-8
|
Java
| false
| false
| 672
|
java
|
package com.taskconsole.util;
import com.taobao.pamirs.schedule.ConsoleManager;
import org.springframework.context.ApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
/**
* 功能说明: <br>
* 系统版本: 1.0 <br>
* 开发人员: dengqz
* 开发时间: 2017/10/24<br>
* <br>
*/
public class DeDispatcherServlet extends DispatcherServlet {
public DeDispatcherServlet(){
super();
}
protected void onRefresh(ApplicationContext context) {
super.initStrategies(context);
try {
ConsoleManager.initial();
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"872114581@qq.com"
] |
872114581@qq.com
|
5493617d55c62d72d18b5960fbc0f7e3581ba9d3
|
4b60f40691aed433e1ca832e79bfc834380ddfed
|
/app/src/main/java/net/maker/commonframework/base/rx/binding/widget/AbsListViewScrollEvent.java
|
5f21b9eaff19c397884783807ff75b35098d4f49
|
[] |
no_license
|
HuangPugang/commonFrame
|
3a9ba656cbc8efbbc18c216bbf47e5950fd0790a
|
cbec29fcb327dabfc020407b9afc08bd71cddc80
|
refs/heads/master
| 2016-09-14T01:36:23.211102
| 2016-04-29T08:49:46
| 2016-04-29T08:49:46
| 57,370,537
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,364
|
java
|
package net.maker.commonframework.base.rx.binding.widget;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.widget.AbsListView;
import net.maker.commonframework.base.rx.binding.view.ViewEvent;
public final class AbsListViewScrollEvent extends ViewEvent<AbsListView> {
@CheckResult @NonNull
public static AbsListViewScrollEvent create(AbsListView listView, int scrollState,
int firstVisibleItem, int visibleItemCount, int totalItemCount) {
return new AbsListViewScrollEvent(listView, scrollState, firstVisibleItem, visibleItemCount,
totalItemCount);
}
private final int scrollState;
private final int firstVisibleItem;
private final int visibleItemCount;
private final int totalItemCount;
private AbsListViewScrollEvent(@NonNull AbsListView view, int scrollState, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
super(view);
this.scrollState = scrollState;
this.firstVisibleItem = firstVisibleItem;
this.visibleItemCount = visibleItemCount;
this.totalItemCount = totalItemCount;
}
public int scrollState() {
return scrollState;
}
public int firstVisibleItem() {
return firstVisibleItem;
}
public int visibleItemCount() {
return visibleItemCount;
}
public int totalItemCount() {
return totalItemCount;
}
@Override public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AbsListViewScrollEvent that = (AbsListViewScrollEvent) o;
if (scrollState != that.scrollState) return false;
if (firstVisibleItem != that.firstVisibleItem) return false;
if (visibleItemCount != that.visibleItemCount) return false;
return totalItemCount == that.totalItemCount;
}
@Override public int hashCode() {
int result = scrollState;
result = 31 * result + firstVisibleItem;
result = 31 * result + visibleItemCount;
result = 31 * result + totalItemCount;
return result;
}
@Override public String toString() {
return "AbsListViewScrollEvent{"
+ "scrollState="
+ scrollState
+ ", firstVisibleItem="
+ firstVisibleItem
+ ", visibleItemCount="
+ visibleItemCount
+ ", totalItemCount="
+ totalItemCount
+ '}';
}
}
|
[
"huangpg@59store.com"
] |
huangpg@59store.com
|
e427ad709edee5da00cb80f8bf6ca66d270105f6
|
ffb51aa15e6e8d2f259843c783e66af7c0a85ff8
|
/src/java/com/tsp/sct/bo/DatosPersonalizadosBO.java
|
9b188058bec3a1eef9f3b37d3425d5c7713f8763
|
[] |
no_license
|
Karmaqueda/SGFENS_BAFAR-1
|
c9c9b0ffad3ac948b2a76ffbbd5916c1a8751c51
|
666f858fc49abafe7612600ac0fd468c54c37bfe
|
refs/heads/master
| 2021-01-18T16:09:08.520888
| 2016-08-01T18:49:40
| 2016-08-01T18:49:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,037
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.tsp.sct.bo;
import com.tsp.sct.dao.dto.DatosPersonalizados;
import com.tsp.sct.dao.exceptions.DatosPersonalizadosDaoException;
import com.tsp.sct.dao.jdbc.DatosPersonalizadosDaoImpl;
import java.sql.Connection;
/**
*
* @author Leonardo
*/
public class DatosPersonalizadosBO {
private DatosPersonalizados datosPersonalizados = null;
public DatosPersonalizados getDatosPersonalizados() {
return datosPersonalizados;
}
public void setDatosPersonalizados(DatosPersonalizados datosPersonalizados) {
this.datosPersonalizados = datosPersonalizados;
}
private Connection conn = null;
public Connection getConn() {
return conn;
}
public void setConn(Connection conn) {
this.conn = conn;
}
public DatosPersonalizadosBO(){
}
public DatosPersonalizadosBO(Connection conn){
this.conn = conn;
}
public DatosPersonalizadosBO(int idDatosPersonalizados, Connection conn){
this.conn = conn;
try{
DatosPersonalizadosDaoImpl DatosPersonalizadosDaoImpl = new DatosPersonalizadosDaoImpl(this.conn);
this.datosPersonalizados = DatosPersonalizadosDaoImpl.findByPrimaryKey(idDatosPersonalizados);
}catch(Exception e){
e.printStackTrace();
}
}
public DatosPersonalizados findDatosPersonalizadosbyId(int idDatosPersonalizados) throws Exception{
DatosPersonalizados DatosPersonalizados = null;
try{
DatosPersonalizadosDaoImpl DatosPersonalizadosDaoImpl = new DatosPersonalizadosDaoImpl(this.conn);
DatosPersonalizados = DatosPersonalizadosDaoImpl.findByPrimaryKey(idDatosPersonalizados);
if (DatosPersonalizados==null){
throw new Exception("No se encontro ninguna DatosPersonalizados que corresponda con los parámetros específicados.");
}
if (DatosPersonalizados.getIdDatosPersonalizados()<=0){
throw new Exception("No se encontro ninguna DatosPersonalizados que corresponda con los parámetros específicados.");
}
}catch(Exception e){
throw new Exception("Ocurrió un error inesperado mientras se intentaba recuperar la información de la DatosPersonalizados del usuario. Error: " + e.getMessage());
}
return DatosPersonalizados;
}
/**
* Realiza una búsqueda por ID DatosPersonalizados en busca de
* coincidencias
* @param idDatosPersonalizados ID Del Usuario para filtrar, -1 para mostrar todos los registros
* @param idEmpresa ID de la Empresa a filtrar datosPersonalizadoss, -1 para evitar filtro
* @param minLimit Limite inferior de la paginación (Desde) 0 en caso de no existir limite inferior
* @param maxLimit Limite superior de la paginación (Hasta) 0 en caso de no existir limite superior
* @param filtroBusqueda Cadena con un filtro de búsqueda personalizado
* @return DTO DatosPersonalizados
*/
public DatosPersonalizados[] findDatosPersonalizados(int idDatosPersonalizados, int idEmpresa, int minLimit,int maxLimit, String filtroBusqueda) {
DatosPersonalizados[] datosPersonalizadosDto = new DatosPersonalizados[0];
DatosPersonalizadosDaoImpl datosPersonalizadosDao = new DatosPersonalizadosDaoImpl(this.conn);
try {
String sqlFiltro="";
if (idDatosPersonalizados>0){
sqlFiltro ="ID_DATOS_PERSONALIZADOS=" + idDatosPersonalizados + " AND ";
}else{
sqlFiltro ="ID_DATOS_PERSONALIZADOS>0 AND";
}
if (idEmpresa>0){
sqlFiltro += " ID_EMPRESA IN (SELECT ID_EMPRESA FROM EMPRESA WHERE ID_EMPRESA_PADRE = " + idEmpresa + " OR ID_EMPRESA= " + idEmpresa + ")";
}else{
sqlFiltro +=" ID_EMPRESA>0";
}
if (!filtroBusqueda.trim().equals("")){
sqlFiltro += filtroBusqueda;
}
if (minLimit<0)
minLimit=0;
String sqlLimit="";
if ((minLimit>0 && maxLimit>0) || (minLimit==0 && maxLimit>0))
sqlLimit = " LIMIT " + minLimit + "," + maxLimit;
datosPersonalizadosDto = datosPersonalizadosDao.findByDynamicWhere(
sqlFiltro
+ " ORDER BY VARIABLE ASC"
+ sqlLimit
, new Object[0]);
} catch (Exception ex) {
System.out.println("Error de consulta a Base de Datos: " + ex.toString());
ex.printStackTrace();
}
return datosPersonalizadosDto;
}
}
|
[
"ing.gloriapalmagonzalez@gmail.com"
] |
ing.gloriapalmagonzalez@gmail.com
|
1d80e586e84e73da106dc1e154805e5a2885ece5
|
bfad743bfe4c5624dd3feeed5bad49f831d74242
|
/src/main/java/com/thirdparty/front/security/UserNotActivatedException.java
|
948680529a3e100bb616aa7a97f31d3862faa57d
|
[] |
no_license
|
fduartej/thirdparty-dashboard
|
c8feb0cd6e81d66441ae2ffd1e9e5bc95abb2651
|
893a1831c3b77bc2ab478dc7970e5e322727edc6
|
refs/heads/master
| 2023-01-01T18:05:02.169280
| 2019-09-12T20:05:07
| 2019-09-12T20:05:07
| 208,136,895
| 1
| 0
| null | 2022-12-16T05:03:26
| 2019-09-12T20:04:55
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 516
|
java
|
package com.thirdparty.front.security;
import org.springframework.security.core.AuthenticationException;
/**
* This exception is thrown in case of a not activated user trying to authenticate.
*/
public class UserNotActivatedException extends AuthenticationException {
private static final long serialVersionUID = 1L;
public UserNotActivatedException(String message) {
super(message);
}
public UserNotActivatedException(String message, Throwable t) {
super(message, t);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
cee05517193421e8ccd0f55afbd3825c88d2e557
|
4f41000b4f35453a14ae16035fcf9c79385f872a
|
/src/main/java/com/helmet/application/mgr/AgencyInvoicesMarkAsPaidProcess.java
|
50a7ac8a166f3c5097e158e23004d295c5c639ac
|
[] |
no_license
|
InfomediaUK/testdb
|
4e229fc2121ad7e70d1f39d5a4b9e4ae5a237c40
|
1bf06309e5b0be07025d8c6b6d3675ae540e104e
|
refs/heads/master
| 2021-08-18T18:51:35.512500
| 2017-11-23T14:52:12
| 2017-11-23T14:52:12
| 103,923,546
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,454
|
java
|
package com.helmet.application.mgr;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.DynaValidatorForm;
import com.helmet.api.MgrService;
import com.helmet.api.ServiceFactory;
import com.helmet.application.mgr.abztract.MgrAction;
public class AgencyInvoicesMarkAsPaidProcess extends MgrAction {
protected transient XLogger logger = XLoggerFactory.getXLogger(getClass());
public ActionForward doExecute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
DynaValidatorForm dynaForm = (DynaValidatorForm)form;
logger.entry("In coming !!!");
String agencyInvoiceIdStrs = (String)dynaForm.get("agencyInvoiceIdStrs");
MgrService mgrService = ServiceFactory.getInstance().getMgrService();
int rowCount = mgrService.updateAgencyInvoicesMarkAsPaid(agencyInvoiceIdStrs, getManagerLoggedIn().getManagerId());
// need to clear form as now held in the session
logger.exit("Out going !!!");
return mapping.findForward("success");
}
}
|
[
"lyndon@infomediauk.net"
] |
lyndon@infomediauk.net
|
1de7ad2b9826e759a72ce17e4bf084715a2f419b
|
cbc3de4a61235b0547d1f8561051c45de78f1910
|
/src/protocolsupport/protocol/packet/middleimpl/clientbound/play/v_1_7_1_8/HeldSlot.java
|
3fe13826fe53a7650e93708d70c8a3c07d0e06d7
|
[] |
no_license
|
tancou/ProtocolSupportCustom
|
76f3e8733bf2b6d31261680cecbd6637501c5cb1
|
891fb5bce7cff8dfe8db3811a3de341e01b42572
|
refs/heads/master
| 2020-04-02T05:24:53.180960
| 2016-06-08T08:11:26
| 2016-06-08T08:11:26
| 60,656,205
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 799
|
java
|
package protocolsupport.protocol.packet.middleimpl.clientbound.play.v_1_7_1_8;
import protocolsupport.api.ProtocolVersion;
import protocolsupport.protocol.packet.ClientBoundPacket;
import protocolsupport.protocol.packet.middle.clientbound.play.MiddleHeldSlot;
import protocolsupport.protocol.packet.middleimpl.PacketData;
import protocolsupport.utils.recyclable.RecyclableCollection;
import protocolsupport.utils.recyclable.RecyclableSingletonList;
public class HeldSlot extends MiddleHeldSlot<RecyclableCollection<PacketData>> {
@Override
public RecyclableCollection<PacketData> toData(ProtocolVersion version) {
PacketData serializer = PacketData.create(ClientBoundPacket.PLAY_HELD_SLOT_ID, version);
serializer.writeByte(slot);
return RecyclableSingletonList.create(serializer);
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
aa725161abd9dc8692d65bb6a303c95608986379
|
14870176285721939a445840cb1e77a53bf885cc
|
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantStringOperation/afterChangeCase.java
|
50219c2e1a648e412c7a6b334d8a7102036f9a92
|
[
"Apache-2.0"
] |
permissive
|
fxsg20151212/intellij-community
|
40a25220f0f3302976fdfa8b740bc88ff5c01322
|
39bef905dc15531399d1453e737317c0232e636a
|
refs/heads/master
| 2023-08-03T07:09:41.800618
| 2021-09-18T06:28:33
| 2021-09-18T06:28:33
| 290,156,977
| 0
| 0
|
Apache-2.0
| 2020-08-25T08:20:06
| 2020-08-25T08:20:05
| null |
UTF-8
|
Java
| false
| false
| 4,485
|
java
|
// "Fix all 'Redundant String operation' problems in file" "true"
import java.util.Locale;
public class Main {
public static void main(String[] args) {
boolean value = args[0].equalsIgnoreCase("foo");
boolean value2 ="foo".equalsIgnoreCase(args[0]) ;
boolean value3 = args[0].toLowerCase().equalsIgnoreCase(args[0].toLowerCase());
boolean value1WithBrackets = (args[0]).equalsIgnoreCase(("foo"));
boolean value2WithBrackets = ("foo").equalsIgnoreCase((args[0]));
boolean value3WithBrackets = (args[0].toLowerCase()).equalsIgnoreCase((args[0].toLowerCase()));
boolean valueUpperCase1 = args[0].equalsIgnoreCase("FOO");
boolean valueUpperCase2 ="FOO".equalsIgnoreCase(args[0]) ;
boolean valueUpperCase3 = args[0].equalsIgnoreCase(args[0]);
boolean valueIgnoreCase = args[0].equalsIgnoreCase("foo");
boolean valueIgnoreCase2 ="foo".equalsIgnoreCase(args[0]) ;
boolean valueIgnoreCase3 = args[0].toLowerCase().equalsIgnoreCase(args[0].toLowerCase());
boolean valueIgnoreCaseUpperCase1 = args[0].equalsIgnoreCase("FOO");
boolean valueIgnoreCaseUpperCase2 ="FOO".equalsIgnoreCase(args[0]) ;
boolean valueIgnoreCaseUpperCase3 = args[0].equalsIgnoreCase(args[0]);
boolean nonChangeValue1 = args[0].toLowerCase(Locale.ROOT).equalsIgnoreCase("foo");
boolean nonChangeValue2 = args[0].toLowerCase(Locale.ENGLISH).equalsIgnoreCase("foo");
boolean nonChangeValue3 ="foo".equalsIgnoreCase(args[0].toUpperCase().toLowerCase(Locale.ENGLISH)) ;
boolean nonChangeValue4 = args[0].toLowerCase().toLowerCase(Locale.ENGLISH).equalsIgnoreCase(args[0].toLowerCase().toLowerCase());
boolean nonChangeValue5 = args[0].toLowerCase().toLowerCase().equalsIgnoreCase(args[0].toLowerCase().toLowerCase(Locale.ENGLISH));
boolean nonChangeValue6 = args[0].toLowerCase().toLowerCase().equalsIgnoreCase(args[0].toLowerCase().toUpperCase());
boolean nonChangeValue7 = args[0].toLowerCase(Locale.ROOT).equalsIgnoreCase("foo");
boolean nonChangeValue8 = args[0].toLowerCase(Locale.ENGLISH).equalsIgnoreCase("foo");
boolean nonChangeValue9 ="foo".equalsIgnoreCase(args[0].toUpperCase().toLowerCase(Locale.ENGLISH)) ;
boolean nonChangeValue10 = args[0].toLowerCase().toLowerCase(Locale.ENGLISH).equalsIgnoreCase(args[0].toLowerCase().toLowerCase());
boolean nonChangeValue11 = args[0].toLowerCase().toLowerCase().equalsIgnoreCase(args[0].toLowerCase().toLowerCase(Locale.ENGLISH));
boolean nonChangeValue12 = args[0].toLowerCase().toLowerCase().equalsIgnoreCase(args[0].toLowerCase().toUpperCase());
if(args[0].equalsIgnoreCase("foo")){}
if("foo".equalsIgnoreCase(args[0].toUpperCase())){}
if( args[0].toLowerCase().equalsIgnoreCase(args[0].toLowerCase())){}
if(!args[0].equalsIgnoreCase("foo")){}
if(!"foo".equalsIgnoreCase(args[0].toUpperCase())){}
if(! args[0].toLowerCase().equalsIgnoreCase(args[0].toLowerCase())){}
if(!!args[0].equalsIgnoreCase("foo")){}
if(!!"foo".equalsIgnoreCase(args[0].toUpperCase())){}
if(!! args[0].toLowerCase().equalsIgnoreCase(args[0].toLowerCase())){}
if(args[0].equalsIgnoreCase("FOO")){}
if("FOO".equalsIgnoreCase(args[0].toUpperCase())){}
if( args[0].toUpperCase().equalsIgnoreCase(args[0].toLowerCase())){}
if(args[0].equalsIgnoreCase("foo")){}
if("foo".equalsIgnoreCase(args[0].toUpperCase())){}
if( args[0].toLowerCase().equalsIgnoreCase(args[0].toLowerCase())){}
if(args[0].equalsIgnoreCase("FOO")){}
if("FOO".equalsIgnoreCase(args[0].toUpperCase())){}
if( args[0].toUpperCase().equalsIgnoreCase(args[0].toLowerCase())){}
/* five */
if(/* one */args/* two */[/* three */0/* four */]/* six */./* seven */equalsIgnoreCase(/* eight */"foo" /* nine */)){}
/* eight */
/* nine */
if(/* one */"foo"/* two */./* three */equalsIgnoreCase(/* four */args/* five */[/* six */0/* seven */]/* ten */)){}
/* twelve */
/* thirteen */
/* five */
if(/* one */args/* two */[/* three */0/* four */]/* six */./* seven */equalsIgnoreCase(/* eight */args/* nine */[/* ten */1/* eleven */]/* fourteen */)){}
/* five */
if(!/* one */args/* two */[/* three */0/* four */]/* six */./* seven */equalsIgnoreCase(/* eight */"foo" /* nine */)){}
if("HELLO".equals(args[0].toLowerCase())) {}
if("Hello".equals(args[0].toLowerCase())) {}
if("hello".equals(args[0].toUpperCase())) {}
if("Hello".equals(args[0].toUpperCase())) {}
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
50d8e8a2e598ca9bd482eacb5bb7e47046c7da0a
|
ee91b610c596a9fffdd1220f3352cdfd006f813a
|
/src/com/gmail/berndivader/mythicmobsext/astar/Tile.java
|
584bf5ee6421873dedabf64f83385c1b696f681c
|
[] |
no_license
|
GrandeMalum/MythicMobsExtension
|
e21b3eef2f9920501370147d96171596824fa13c
|
3cd11c08e72c512aea826dd100e358faf47dc719
|
refs/heads/master
| 2022-12-27T01:02:10.247815
| 2018-01-13T05:42:39
| 2018-01-13T05:42:39
| 117,574,627
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,237
|
java
|
package com.gmail.berndivader.mythicmobsext.astar;
import org.bukkit.Location;
public class Tile {
// as offset from starting point
private final short x, y, z;
private double g = -1, h = -1;
private Tile parent = null;
private final String uid;
public Tile(short x, short y, short z, Tile parent) {
this.x = x;
this.y = y;
this.z = z;
this.parent = parent;
StringBuilder b = new StringBuilder();
b.append(x);
b.append(y);
b.append(z);
uid = b.toString();
}
public boolean isInRange(int range){
return ((range - abs(x) >= 0) && (range - abs(y) >= 0) && (range - abs(z) >= 0));
}
public void setParent(Tile parent) {
this.parent = parent;
}
public Location getLocation(Location start) {
return new Location(start.getWorld(), start.getBlockX() + x, start.getBlockY() + y, start.getBlockZ() + z);
}
public Tile getParent() {
return this.parent;
}
public short getX() {
return x;
}
public int getX(Location i) {
return (i.getBlockX() + x);
}
public short getY() {
return y;
}
public int getY(Location i) {
return (i.getBlockY() + y);
}
public short getZ() {
return z;
}
public int getZ(Location i) {
return (i.getBlockZ() + z);
}
public String getUID() {
return this.uid;
}
public boolean equals(Tile t) {
return (t.getX() == x && t.getY() == y && t.getZ() == z);
}
public void calculateBoth(int sx, int sy, int sz, int ex, int ey, int ez, boolean update) {
this.calculateG(sx, sy, sz, update);
this.calculateH(sx, sy, sz, ex, ey, ez, update);
}
public void calculateH(int sx, int sy, int sz, int ex, int ey, int ez, boolean update) {
// only update if h hasn't been calculated or if forced
if ((!update && h == -1) || update) {
int hx = sx + x, hy = sy + y, hz = sz + z;
this.h = this.getEuclideanDistance(hx, hy, hz, ex, ey, ez);
}
}
// G = the movement cost to move from the starting point A to a given square
// on the grid, following the path generated to get there.
public void calculateG(int sx, int sy, int sz, boolean update) {
if ((!update && g == -1) || update) {
// only update if g hasn't been calculated or if forced
Tile currentParent = this.getParent(), currentTile = this;
int gCost = 0;
// follow path back to start
while ((currentParent = currentTile.getParent()) != null) {
int dx = currentTile.getX() - currentParent.getX(), dy = currentTile.getY() - currentParent.getY(), dz = currentTile.getZ() - currentParent.getZ();
dx = abs(dx);
dy = abs(dy);
dz = abs(dz);
if (dx == 1 && dy == 1 && dz == 1) {
gCost += 1.7;
} else if (((dx == 1 || dz == 1) && dy == 1) || ((dx == 1 || dz == 1) && dy == 0)) {
gCost += 1.4;
} else {
gCost += 1.0;
}
// move backwards a tile
currentTile = currentParent;
}
this.g = gCost;
}
}
public double getG() {
return g;
}
public double getH() {
return h;
}
public double getF() {
// f = h + g
return (h + g);
}
private double getEuclideanDistance(int sx, int sy, int sz, int ex, int ey, int ez) {
double dx = sx - ex, dy = sy - ey, dz = sz - ez;
return Math.sqrt((dx * dx) + (dy * dy) + (dz * dz));
}
private int abs(int i) {
return (i < 0 ? -i : i);
}
}
|
[
"kasermandel@gmail.com"
] |
kasermandel@gmail.com
|
2433aa781582cc73e2f4304b1722782576cad433
|
a78ba0d2452928c06455a0ef29cc3eca49a1e760
|
/src/bastion/blocks/AntiLight.java
|
0eda9a65f50d3b04d164d86bbced82c8e7ae454e
|
[
"MIT"
] |
permissive
|
TeamRecraft/ChaoticBastion
|
ce991f5357721b3748a36e08626d8c2e06795cee
|
44d39ac19a3c399eff4c642507319264952f9899
|
refs/heads/master
| 2021-01-17T07:52:03.943240
| 2014-04-21T04:07:19
| 2014-04-21T04:07:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,755
|
java
|
package bastion.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class AntiLight extends Block
{
public AntiLight(int id)
{
super(id, Material.air);
float f = 0.0F;
float f1 = 0.0F;
this.setBlockBounds(0.0F + f1, 0.0F + f, 0.0F + f1, 1.0F + f1, 1.0F + f, 1.0F + f1);
}
@Override
public int getLightOpacity (World world, int x, int y, int z)
{
return world.getBlockMetadata(x, y, z);
}
@Override
public boolean isAirBlock (World world, int x, int y, int z)
{
return true;
}
@Override
public boolean renderAsNormalBlock ()
{
return false;
}
@Override
public boolean isOpaqueCube ()
{
return false;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons (IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon("tinker:blank");
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
return null;
}
public boolean canCollideCheck (int par1, boolean par2)
{
return false;
}
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return false;
}
public void onBlockExploded (World world, int x, int y, int z, Explosion explosion)
{
}
}
|
[
"merdiwendiyo@gmail.com"
] |
merdiwendiyo@gmail.com
|
4564b16803db4062832877cca5ce777d5748a2c6
|
f97ebe912a73a253a42bb2af68316589e65b084f
|
/commons-gdx-artemis/src/test/java/com/gemserk/commons/artemis/systems/TagManagerTest.java
|
7210569a301b561f90cb73f7e9d0f73fc90f59c8
|
[] |
no_license
|
SauravSengupta/commons-gdx
|
94e5df544edf662d742688744642c266e10327a1
|
4dc1f1a1f458eed4871effbdbd3d29ba7a8c3308
|
refs/heads/master
| 2021-01-18T08:09:24.312892
| 2013-02-02T06:12:51
| 2013-02-02T06:12:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 830
|
java
|
package com.gemserk.commons.artemis.systems;
import static org.junit.Assert.assertThat;
import org.hamcrest.core.IsNull;
import org.hamcrest.core.IsSame;
import org.junit.Test;
import com.artemis.Entity;
import com.artemis.World;
public class TagManagerTest {
@Test
public void test() {
}
public void shouldGetComponent() {
String tag = "SuperUniqueEntity";
World world = new World();
Entity e = world.createEntity();
e.setTag(tag);
e.refresh();
world.setDelta(10);
world.loopStart();
Entity e1 = world.getTagManager().getEntity(tag);
assertThat(e1, IsNull.notNullValue());
assertThat(e1, IsSame.sameInstance(e));
world.deleteEntity(e);
world.setDelta(10);
world.loopStart();
Entity e2 = world.getTagManager().getEntity(tag);
assertThat(e2, IsNull.nullValue());
}
}
|
[
"ariel.coppes@gemserk.com"
] |
ariel.coppes@gemserk.com
|
462c1def8994ae9c5019c141366338591e02a867
|
de3a3b121bb58900134eec13c702509109015843
|
/src/main/java/com/xnjr/mall/api/impl/XN808217.java
|
3574de10e6698dbe34d50d455725d22290b2e066
|
[] |
no_license
|
yiwocao2017/cswstdmall
|
8d422afef6ba338fe5db34683c115b30c03336ff
|
ad2c10994e7d844429cd74131e903e7b326000e9
|
refs/heads/master
| 2022-06-27T13:59:26.488189
| 2019-07-01T06:30:05
| 2019-07-01T06:30:05
| 194,613,061
| 0
| 0
| null | 2022-06-17T02:17:53
| 2019-07-01T06:30:04
|
Java
|
UTF-8
|
Java
| false
| false
| 2,253
|
java
|
package com.xnjr.mall.api.impl;
import org.apache.commons.lang3.StringUtils;
import com.xnjr.mall.ao.IStoreAO;
import com.xnjr.mall.api.AProcessor;
import com.xnjr.mall.common.JsonUtil;
import com.xnjr.mall.core.StringValidater;
import com.xnjr.mall.domain.Store;
import com.xnjr.mall.dto.req.XN808217Req;
import com.xnjr.mall.enums.EStoreStatus;
import com.xnjr.mall.exception.BizException;
import com.xnjr.mall.exception.ParaException;
import com.xnjr.mall.spring.SpringContextHolder;
/**
* 分页查询店铺信息(front专用)
* @author: myb858
* @since: 2017年3月25日 下午6:11:34
* @history:
*/
public class XN808217 extends AProcessor {
private IStoreAO storeAO = SpringContextHolder.getBean(IStoreAO.class);
private XN808217Req req = null;
@Override
public Object doBusiness() throws BizException {
Store condition = new Store();
condition.setFromUser(req.getUserId());
condition.setName(req.getName());
condition.setLevel(req.getLevel());
condition.setType(req.getType());
condition.setStatus(EStoreStatus.ON_OPEN.getCode());
condition.setProvinceForQuery(req.getProvince());
condition.setCityForQuery(req.getCity());
condition.setAreaForQuery(req.getArea());
condition.setLatitude(req.getLatitude());
condition.setLongitude(req.getLongitude());
condition.setUiLocation(req.getUiLocation());
condition.setSystemCode(req.getSystemCode());
condition.setCompanyCode(req.getCompanyCode());
String orderColumn = req.getOrderColumn();
if (StringUtils.isBlank(orderColumn)) {
orderColumn = IStoreAO.DEFAULT_ORDER_COLUMN;
}
condition.setOrder(orderColumn, req.getOrderDir());
int start = StringValidater.toInteger(req.getStart());
int limit = StringValidater.toInteger(req.getLimit());
return storeAO.queryStorePageFront(start, limit, condition);
}
@Override
public void doCheck(String inputparams) throws ParaException {
req = JsonUtil.json2Bean(inputparams, XN808217Req.class);
StringValidater.validateBlank(req.getStart(), req.getLimit(),
req.getCompanyCode(), req.getSystemCode());
}
}
|
[
"admin@yiwocao.com"
] |
admin@yiwocao.com
|
9aea624b4ad3aed89e4706d55a79d86c7215725e
|
516fb367430d4c1393f4cd726242618eca862bda
|
/sources/com/facebook/accountkit/ui/ContentFragment.java
|
18ff63821fbc5bf98bff4a960c8ac4e2868d8464
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/Gaana2
|
75d6d6788e2dac9302cff206a093870e1602921d
|
8531673a5615bd9183c9a0466325d0270b8a8895
|
refs/heads/master
| 2020-07-22T15:46:54.149313
| 2019-06-19T16:11:11
| 2019-06-19T16:11:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 232
|
java
|
package com.facebook.accountkit.ui;
abstract class ContentFragment extends LoginFragment {
public abstract LoginFlowState getLoginFlowState();
public abstract boolean isKeyboardFragment();
ContentFragment() {
}
}
|
[
"master@master.com"
] |
master@master.com
|
6976ebd2350d3c0e9a344b93ffa9180a30f22ff1
|
fca29d54905a2edd7fd4db82500bba9c43701966
|
/DataStructures/StackAndQueueExercises/src/main/java/_03ArrayStack/Main.java
|
379c907822bbecfc3caec39af3cf1def8282d0b3
|
[
"MIT"
] |
permissive
|
yangra/SoftUni
|
4046bd28e445f6cef98d2ee31179ba22892e6589
|
2fe8ac059fe398f8bf229200c5406840f026fb88
|
refs/heads/master
| 2021-01-13T15:16:53.303291
| 2018-04-22T18:19:58
| 2018-04-22T18:19:58
| 78,928,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 537
|
java
|
package _03ArrayStack;
public class Main {
public static void main(String[] args) {
ArrayStack<Integer> stack = new ArrayStack<>();
for (int i = 0; i <28 ; i++) {
stack.push(i);
}
Object[] arr = stack.toArray();
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
System.out.println(stack.size());
System.out.println(stack.pop());
System.out.println(stack.pop());
System.out.println(stack.pop());
}
}
|
[
"brambazluk@gmail.com"
] |
brambazluk@gmail.com
|
9d214eb3f595b5ab7512d37f3b8caff46687ad9c
|
c81dd37adb032fb057d194b5383af7aa99f79c6a
|
/java/com/google/android/gms/actions/SearchIntents.java
|
caa8f94ee76494b1d3d7f05414c815335fbb674c
|
[] |
no_license
|
hongnam207/pi-network-source
|
1415a955e37fe58ca42098967f0b3307ab0dc785
|
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
|
refs/heads/main
| 2023-03-30T07:49:35.920796
| 2021-03-28T06:56:24
| 2021-03-28T06:56:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 333
|
java
|
package com.google.android.gms.actions;
/* compiled from: com.google.android.gms:play-services-basement@@17.1.1 */
public class SearchIntents {
public static final String ACTION_SEARCH = "com.google.android.gms.actions.SEARCH_ACTION";
public static final String EXTRA_QUERY = "query";
private SearchIntents() {
}
}
|
[
"nganht2@vng.com.vn"
] |
nganht2@vng.com.vn
|
e48de6ec813173629d3164b85edd5d7715c130b5
|
0f3ded27b1d40e6dbcc28113f5beb82cd106de01
|
/src/main/java/com/itmuma/Application.java
|
a669fa6c9c4e97a9ebbb1224211879cd9e30c1cb
|
[] |
no_license
|
S-CH123/springBoot
|
d447b06c2a6035c67af70dbd2e35969d9516ec6c
|
b3e47b0b323741ae6289b8766d0c3054b74434d9
|
refs/heads/master
| 2020-09-28T04:02:38.164817
| 2019-12-08T15:00:00
| 2019-12-08T15:00:00
| 226,682,248
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 383
|
java
|
package com.itmuma;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import tk.mybatis.spring.annotation.MapperScan;
@SpringBootApplication
@MapperScan("com.itmuma.mapper")
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class,args);
}
}
|
[
"root"
] |
root
|
605be286f63049719b71a6a027291fa684f6d24c
|
36a80ecec12da8bf43980768a920c28842d2763b
|
/src/main/java/com/tools20022/repository/datatype/Min6Max8Text.java
|
d15087dab07d2ff22c228dfe83f26a06185cb5ac
|
[] |
no_license
|
bukodi/test02
|
e9045f6f88d44a5833b1cf32b15a3d7b9a64aa83
|
30990a093e1239b4244c2a64191b6fe1eacf3b00
|
refs/heads/master
| 2021-05-08T03:22:32.792980
| 2017-10-24T23:00:52
| 2017-10-24T23:00:52
| 108,186,993
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 841
|
java
|
package com.tools20022.repository.datatype;
import com.tools20022.metamodel.MMText;
import java.util.concurrent.atomic.AtomicReference;
/**
* Specifies a character string with a minimum length of 6 characters, and a
* maximum length of 8 characters.
*/
public class Min6Max8Text {
final static private AtomicReference<MMText> mmObject_lazy = new AtomicReference<>();
final static public MMText mmObject() {
mmObject_lazy.compareAndSet(null, new MMText() {
{
dataDictionary_lazy = () -> com.tools20022.repository.GeneratedRepository.dataDict;
registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED;
name = "Min6Max8Text";
definition = "Specifies a character string with a minimum length of 6 characters, and a maximum length of 8 characters.";
}
});
return mmObject_lazy.get();
}
}
|
[
"bukodi@gmail.com"
] |
bukodi@gmail.com
|
9a25ef85fa1197f6a77e54e549841cf3243976f1
|
182ed9d0bc7ccb1ea8e635b1719553cfefbe40e8
|
/lottery_persist/src/main/java/com/lottery/dao/impl/LuckAwardRecordDaoImpl.java
|
c98fea5bf90406200aaef65422eeb2cde9a6df8b
|
[] |
no_license
|
portalCMS/lottery
|
7a1df8e4012f530baaa8935ffb8f55b07be6201f
|
551e4156c5f43a86c6784e65a184967b44969035
|
refs/heads/master
| 2020-04-17T03:38:10.340206
| 2019-01-18T02:51:25
| 2019-01-18T02:51:25
| 166,193,186
| 2
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 520
|
java
|
package com.lottery.dao.impl;
import java.util.List;
import org.hibernate.Session;
import org.springframework.stereotype.Component;
import com.lottery.bean.entity.CustomerActivity;
import com.lottery.bean.entity.LuckAwardRecord;
import com.lottery.dao.ILuckAwardRecordDao;
import com.lottery.persist.generice.GenericDAO;
@Component
public class LuckAwardRecordDaoImpl extends GenericDAO<LuckAwardRecord> implements ILuckAwardRecordDao {
public LuckAwardRecordDaoImpl() {
super(LuckAwardRecord.class);
}
}
|
[
"sunny@gmail.com"
] |
sunny@gmail.com
|
2315575379bbdf73864137fe8ee24643bd8bce37
|
5d4b044e55181493a4ad360c0047414ec8cce260
|
/quarkus-tutorials/basic-di/src/main/java/com/bolingcavalry/ResourceManagerController.java
|
98da7ad5fe26758a2d234846472f81c7dd88dfe8
|
[
"Apache-2.0"
] |
permissive
|
r4b3rt/blog_demos
|
1eecb78d828461517d6164232423000590baae89
|
3ddfe01352c789789e6ebf0958798b9b3d3c4145
|
refs/heads/master
| 2023-08-22T18:34:19.861300
| 2023-08-13T12:07:51
| 2023-08-13T12:07:51
| 253,158,377
| 0
| 0
|
Apache-2.0
| 2023-08-13T13:07:17
| 2020-04-05T04:54:20
|
Java
|
UTF-8
|
Java
| false
| false
| 480
|
java
|
package com.bolingcavalry;
import com.bolingcavalry.service.impl.ResourceManager;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/resourcemanager")
public class ResourceManagerController {
@Inject
ResourceManager resourceManager;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String get() {
resourceManager.open();
return "success";
}
}
|
[
"zq2599@gmail.com"
] |
zq2599@gmail.com
|
35a165dc62b050fe56e635d7c852625ff4b0cfb4
|
14d4fa5f2eb32853f72f791de4bf92f76022b9da
|
/SimpleSDK/src/org/bouncycastle/crypto/params/ECNamedDomainParameters.java
|
645f1805e5d3f39998167b4ba5e2fd81b7ac33f6
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"JSON",
"LicenseRef-scancode-warranty-disclaimer",
"EPL-1.0"
] |
permissive
|
SKT-ThingPlug2/device-sdk-javame
|
253ece8b8f41286256c27bae07a242dc551ff8c6
|
2a965a8d882b3a4e36753c7b81f152a9b56614d3
|
refs/heads/master
| 2021-05-02T12:52:01.394954
| 2018-03-09T08:22:25
| 2018-03-09T08:22:25
| 120,748,806
| 1
| 5
|
Apache-2.0
| 2018-03-23T06:16:34
| 2018-02-08T10:48:43
|
Java
|
UTF-8
|
Java
| false
| false
| 930
|
java
|
package org.bouncycastle.crypto.params;
import javax.math.BigInteger;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECPoint;
public class ECNamedDomainParameters
extends ECDomainParameters
{
private ASN1ObjectIdentifier name;
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECCurve curve, ECPoint G, BigInteger n)
{
this(name, curve, G, n, null, null);
}
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECCurve curve, ECPoint G, BigInteger n, BigInteger h)
{
this(name, curve, G, n, h, null);
}
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECCurve curve, ECPoint G, BigInteger n, BigInteger h, byte[] seed)
{
super(curve, G, n, h, seed);
this.name = name;
}
public ASN1ObjectIdentifier getName()
{
return name;
}
}
|
[
"lesmin@sk.com"
] |
lesmin@sk.com
|
e5b898887a4ecd28f8e277c774eed1e0bc33b8bb
|
12b17568e3b89820018ac1d2366c55d662355ccf
|
/original/phosphor-examples/src/main/java/edu/cmu/cs/mvelezce/TimerHelper.java
|
daeecf33e12de3b1c23c8abbdbbda3b1ff988024
|
[] |
no_license
|
miguelvelezmj25/performance-mapper-evaluation
|
0b086d60767250b9df7d89dfa70336b2e884af49
|
e8f42e1f9006826a79e65edae30d9aa906eb8a30
|
refs/heads/master
| 2023-08-18T04:36:38.878803
| 2021-10-20T13:47:54
| 2021-10-20T13:47:54
| 91,713,239
| 0
| 0
| null | 2021-01-15T15:33:51
| 2017-05-18T16:05:51
|
Java
|
UTF-8
|
Java
| false
| false
| 599
|
java
|
package edu.cmu.cs.mvelezce;
import java.util.HashMap;
import java.util.Map;
public class TimerHelper {
private static final Map<String, Integer> REGIONS_TO_TIME = new HashMap<>();
static void sleep(String region, int time) {
REGIONS_TO_TIME.put(region, time);
}
static void printExecutionTime() {
int time = 0;
for (Map.Entry<String, Integer> entry : REGIONS_TO_TIME.entrySet()) {
int regionTime = entry.getValue();
time += regionTime;
System.out.println(entry.getKey() + " -> " + regionTime);
}
System.out.println("Total time: " + time);
}
}
|
[
"miguelvelez@mijecu25.com"
] |
miguelvelez@mijecu25.com
|
c8aff0ec991fc21c5e15d1fa1e69e3c341887322
|
493a8065cf8ec4a4ccdf136170d505248ac03399
|
/net.sf.ictalive.EventMetamodel/src/net/sf/ictalive/EventModel/Fact/Disaster.java
|
b3bd84b33b050a8dfa9a0addcd3781d5937b02af
|
[] |
no_license
|
ignasi-gomez/aliveclipse
|
593611b2d471ee313650faeefbed591c17beaa50
|
9dd2353c886f60012b4ee4fe8b678d56972dff97
|
refs/heads/master
| 2021-01-14T09:08:24.839952
| 2014-10-09T14:21:01
| 2014-10-09T14:21:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,367
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package net.sf.ictalive.EventModel.Fact;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Disaster</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link net.sf.ictalive.EventModel.Fact.Disaster#getReason <em>Reason</em>}</li>
* </ul>
* </p>
*
* @see net.sf.ictalive.EventModel.Fact.FactPackage#getDisaster()
* @model
* @generated
*/
public interface Disaster extends Fact
{
/**
* Returns the value of the '<em><b>Reason</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Reason</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Reason</em>' reference.
* @see #setReason(EObject)
* @see net.sf.ictalive.EventModel.Fact.FactPackage#getDisaster_Reason()
* @model
* @generated
*/
EObject getReason();
/**
* Sets the value of the '{@link net.sf.ictalive.EventModel.Fact.Disaster#getReason <em>Reason</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Reason</em>' reference.
* @see #getReason()
* @generated
*/
void setReason(EObject value);
} // Disaster
|
[
"salvarez@lsi.upc.edu"
] |
salvarez@lsi.upc.edu
|
79a1fe9ef73c31921785e566e9c25a7d82c8f5a7
|
7099faaa76b4df9ad60ee7c878b34d4037ab5fd9
|
/baselib/src/main/java/com/example/tomasyb/baselib/widget/date/CalendarRowView.java
|
5cb3f34bd314f9c501a239e28fb87cc6dabf8ef5
|
[] |
no_license
|
loading103/CommonNanNing
|
655bb57de9dc945d08f665e48fee4e186b024928
|
0b4362ab67d4909e585b63f7c25e0a1b735b1214
|
refs/heads/main
| 2023-07-25T11:11:30.094251
| 2021-09-06T02:50:24
| 2021-09-06T02:50:24
| 403,457,236
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,413
|
java
|
// Copyright 2012 Square, Inc.
package com.example.tomasyb.baselib.widget.date;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import static android.view.View.MeasureSpec.AT_MOST;
import static android.view.View.MeasureSpec.EXACTLY;
import static android.view.View.MeasureSpec.makeMeasureSpec;
/** TableRow that draws a divider between each cell. To be used with {@link CalendarGridView}. */
public class CalendarRowView extends ViewGroup implements View.OnClickListener {
private boolean isHeaderRow;
private MonthView.Listener listener;
public CalendarRowView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void addView(View child, int index, LayoutParams params) {
child.setOnClickListener(this);
super.addView(child, index, params);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
long start = System.currentTimeMillis();
final int totalWidth = MeasureSpec.getSize(widthMeasureSpec);
int rowHeight = 0;
for (int c = 0, numChildren = getChildCount(); c < numChildren; c++) {
final View child = getChildAt(c);
// Calculate width cells, making sure to cover totalWidth.
int l = ((c + 0) * totalWidth) / 7;
int r = ((c + 1) * totalWidth) / 7;
int cellSize = r - l;
int cellWidthSpec = makeMeasureSpec(cellSize, EXACTLY);
int cellHeightSpec = isHeaderRow ? makeMeasureSpec(cellSize, AT_MOST) : cellWidthSpec;
child.measure(cellWidthSpec, cellHeightSpec);
// The row height is the height of the tallest cell.
if (child.getMeasuredHeight() > rowHeight) {
rowHeight = child.getMeasuredHeight();
}
}
final int widthWithPadding = totalWidth + getPaddingLeft() + getPaddingRight();
final int heightWithPadding = rowHeight + getPaddingTop() + getPaddingBottom();
setMeasuredDimension(widthWithPadding, heightWithPadding);
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
long start = System.currentTimeMillis();
int cellHeight = bottom - top;
int width = (right - left);
for (int c = 0, numChildren = getChildCount(); c < numChildren; c++) {
final View child = getChildAt(c);
int l = ((c + 0) * width) / 7;
int r = ((c + 1) * width) / 7;
child.layout(l, 0, r, cellHeight);
}
}
public void setIsHeaderRow(boolean isHeaderRow) {
this.isHeaderRow = isHeaderRow;
}
@Override
public void onClick(View v) {
// Header rows don't have a click listener
if (listener != null) {
listener.handleClick((MonthCellDescriptor) v.getTag(),v);
}
}
public void setListener(MonthView.Listener listener) {
this.listener = listener;
}
public void setDayViewAdapter(DayViewAdapter adapter) {
for (int i = 0; i < getChildCount(); i++) {
if (getChildAt(i) instanceof CalendarCellView) {
CalendarCellView cell = ((CalendarCellView) getChildAt(i));
cell.removeAllViews();
adapter.makeCellView(cell);
}
}
}
public void setCellBackground(int resId) {
for (int i = 0; i < getChildCount(); i++) {
getChildAt(i).setBackgroundResource(resId);
}
}
public void setCellTextColor(int resId) {
for (int i = 0; i < getChildCount(); i++) {
if (getChildAt(i) instanceof CalendarCellView) {
((CalendarCellView) getChildAt(i)).getDayOfMonthTextView().setTextColor(resId);
} else {
((TextView) getChildAt(i)).setTextColor(resId);
}
}
}
public void setCellTextColor(ColorStateList colors) {
for (int i = 0; i < getChildCount(); i++) {
if (getChildAt(i) instanceof CalendarCellView) {
((CalendarCellView) getChildAt(i)).getDayOfMonthTextView().setTextColor(colors);
} else {
((TextView) getChildAt(i)).setTextColor(colors);
}
}
}
public void setTypeface(Typeface typeface) {
for (int i = 0; i < getChildCount(); i++) {
if (getChildAt(i) instanceof CalendarCellView) {
((CalendarCellView) getChildAt(i)).getDayOfMonthTextView().setTypeface(typeface);
} else {
((TextView) getChildAt(i)).setTypeface(typeface);
}
}
}
}
|
[
"qiuql@daqsoft.com"
] |
qiuql@daqsoft.com
|
4b664e31273285dd2f029aca33e97f498e1f226f
|
42eb066f46694ae3c8fecc657e81c287d111b219
|
/dubbo-day18-seata-TCC-global/account/src/main/java/com/biao/mall/account/dubbo/AccountDubboServiceImpl.java
|
ce06de223bd71e9953e8eb0e2e7d6e32aa4d71f6
|
[] |
no_license
|
653-oss/dubbo-project
|
55820a97e33e7a66e8df4c50641d6a248c065de3
|
b6dbcbcc83d426e16a575bc5890b562edae1f9e0
|
refs/heads/master
| 2022-11-05T12:31:12.744750
| 2020-06-17T11:26:54
| 2020-06-17T11:26:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,918
|
java
|
package com.biao.mall.account.dubbo;
import com.biao.mall.account.service.AccountService;
import com.biao.mall.common.dto.AccountDTO;
import com.biao.mall.common.dubbo.AccountDubboService;
import com.biao.mall.common.response.ObjectResponse;
import io.seata.core.context.RootContext;
import io.seata.rm.tcc.api.BusinessActionContext;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Classname AccountDubboServiceImpl
* @Description TODO
* @Author xiexiaobiao
* @Date 2019-10-06 13:56
* @Version 1.0
**/
@Service(version = "1.0.0",protocol = "${dubbo.protocol.id}",
application = "${dubbo.application.id}",registry = "${dubbo.registry.id}",
timeout = 3000)
public class AccountDubboServiceImpl implements AccountDubboService {
@Autowired
private AccountService accountService;
@Override
public ObjectResponse decreaseAccount(AccountDTO accountDTO) {
System.out.println("全局事务id :" + RootContext.getXID());
BusinessActionContext businessActionContext = new BusinessActionContext();
//prepare 使用TCC
/**这里使用了本地业务service中取得ObjectResponse的模式,*/
if (accountService.prepare(businessActionContext,accountDTO)){
return (ObjectResponse<AccountDTO>) businessActionContext.getActionContext("responseObject");
}
return null;
}
@Override
public boolean prepare(BusinessActionContext actionContext, AccountDTO accountDTO) {
return accountService.prepare(actionContext,accountDTO);
}
@Override
public boolean accountCommit(BusinessActionContext actionContext) {
return accountService.commit(actionContext);
}
@Override
public boolean accountRollback(BusinessActionContext actionContext) {
return accountService.rollback(actionContext);
}
}
|
[
"kool.biao@qq.com"
] |
kool.biao@qq.com
|
0ea8970e0d18fe5b1e93d1f25c41b8b80ce03bac
|
605a0d40117703993e1aad556158362a003b324c
|
/src/main/java/com/megacrit/cardcrawl/relics/RingOfHypnosis.java
|
c90425be7348f9944801734de2f8d779efc4bc5b
|
[] |
no_license
|
Equal/Replay-the-Spire
|
c0ee5bbd72ef4712823b8c0f4f34ee1c4b64f3a5
|
c0ea0e61ef975c95b9b2c509b96c73c44a7cb1e1
|
refs/heads/master
| 2020-03-27T22:45:17.639700
| 2018-09-03T13:46:57
| 2018-09-03T13:46:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,348
|
java
|
package com.megacrit.cardcrawl.relics;
import com.megacrit.cardcrawl.dungeons.*;
import com.megacrit.cardcrawl.monsters.*;
import com.megacrit.cardcrawl.core.*;
import com.megacrit.cardcrawl.actions.*;
import com.megacrit.cardcrawl.actions.common.*;
import com.megacrit.cardcrawl.powers.*;
import java.util.*;
import tobyspowerhouse.powers.*;
public class RingOfHypnosis extends AbstractRelic
{
public static final String ID = "Ring of Hypnosis";
private static final int CONF = 5;
public RingOfHypnosis() {
super("Ring of Hypnosis", "cring_hypnosis.png", RelicTier.SPECIAL, LandingSound.FLAT);
}
@Override
public String getUpdatedDescription() {
return this.DESCRIPTIONS[0] + RingOfHypnosis.CONF + this.DESCRIPTIONS[1];
}
@Override
public void atBattleStart() {
this.flash();
for (final AbstractMonster mo : AbstractDungeon.getCurrRoom().monsters.monsters) {
//AbstractDungeon.actionManager.addToBottom(new RelicAboveCreatureAction(mo, this));
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(mo, AbstractDungeon.player, new TPH_ConfusionPower(mo, RingOfHypnosis.CONF, false), RingOfHypnosis.CONF, true));
}
}
@Override
public AbstractRelic makeCopy() {
return new RingOfHypnosis();
}
}
|
[
"tobiaskipps@gmail.com"
] |
tobiaskipps@gmail.com
|
bc7a7e05c29d7ef4546c3a19bdfb02cb093c19df
|
ef50e50e0b61db62d0476b5b7df3d5f5044a16a9
|
/game_theory/tower-breakers-again-1/java/pavel_zavodaev.java
|
b39d5008705aa0659e60c2c49b09bd7dcc788f19
|
[] |
no_license
|
saketrule/Research_Project-HackerRank_CheckStyle
|
09fd6ef3a067926c754af693b13566cc55fe16ae
|
4334bcbc4620fb94fd3d63034a320756e7233ded
|
refs/heads/master
| 2021-01-22T13:03:08.055929
| 2017-09-12T12:11:19
| 2017-09-12T12:11:19
| 102,361,527
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,657
|
java
|
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
static final int MAX_HEIGHT = 1_000_000;
static BitSet primes = new BitSet(MAX_HEIGHT + 1);
static {
primes.set(0, MAX_HEIGHT);
final int maxI = (int) Math.sqrt(MAX_HEIGHT);
for (int i = 2; i <= maxI; i++) {
if (primes.get(i)) {
int maxJ = MAX_HEIGHT / i;
for (int j = i; j <= maxJ; j++) {
primes.clear(i * j);
}
}
}
}
static int convert(int height) {
if (height == 1) {
return 0;
}
if (primes.get(height)) {
return 1;
}
int count = 0;
for (int i = 3; i <= height; i++) {
if (primes.get(i)) {
while (height % i == 0) {
count ++;
height /= i;
}
}
}
if (height > 1) {
count++;
}
return count;
}
static boolean check(int[] piles) {
int sum = 0;
for (int pile : piles) {
sum ^= convert(pile);
}
return sum != 0;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i = 0; i < t; i++) {
int n = sc.nextInt();
int[] piles = new int[n];
for (int j = 0; j < n; j++) {
piles[j] = sc.nextInt();
}
System.out.println(check(piles) ? "1" : "2");
}
}
}
|
[
"anonymoussaketjoshi@gmail.com"
] |
anonymoussaketjoshi@gmail.com
|
7149c825d1aee410cebdbfe36bedfa57db38c308
|
b9a298842daab2df42652526a2aa8eea46fdc43c
|
/src/main/java/com/zto/sxy/design/factorya/MailSendFactory.java
|
6c2a0df660e48929af17c933c56c794f0b4a5018
|
[] |
no_license
|
spilledyear/SJava
|
efca5acb1f8182b8db2696abf4e8cb3615981717
|
cf129a044e320e58d89e87958029b2f13a0bb838
|
refs/heads/master
| 2022-06-21T18:29:37.902556
| 2019-12-21T12:17:02
| 2019-12-21T12:17:02
| 149,408,865
| 0
| 0
| null | 2022-06-21T00:55:19
| 2018-09-19T07:19:15
|
HTML
|
UTF-8
|
Java
| false
| false
| 216
|
java
|
package com.zto.sxy.design.factorya;
/**
* Created by spilledyear on 2017/9/5.
*/
public class MailSendFactory implements Factory{
@Override
public ISend produce() {
return new MailSend();
}
}
|
[
"spilledyear@outlook.com"
] |
spilledyear@outlook.com
|
084db229fe729ca1e05290c8d64341bc828fe43d
|
711e906f2b6490ef1e4f1f58ca840fd14b857ce2
|
/androidx/mediarouter/app/OverlayListView.java
|
a5a06ecf339d0a716be764ef02ce1a79a0afdbd7
|
[] |
no_license
|
dovanduy/SystemUIGoogle
|
51a29b812000d1857145f429f983e93c02bff14c
|
cd41959ee1bd39a22d0d4e95dc40cefb72a75ec8
|
refs/heads/master
| 2022-07-09T01:48:40.088858
| 2020-05-16T16:01:21
| 2020-05-16T16:01:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,946
|
java
|
//
// Decompiled by Procyon v0.5.36
//
package androidx.mediarouter.app;
import android.view.animation.Interpolator;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import java.util.Iterator;
import android.graphics.Canvas;
import android.util.AttributeSet;
import java.util.ArrayList;
import android.content.Context;
import java.util.List;
import android.widget.ListView;
final class OverlayListView extends ListView
{
private final List<OverlayObject> mOverlayObjects;
public OverlayListView(final Context context) {
super(context);
this.mOverlayObjects = new ArrayList<OverlayObject>();
}
public OverlayListView(final Context context, final AttributeSet set) {
super(context, set);
this.mOverlayObjects = new ArrayList<OverlayObject>();
}
public OverlayListView(final Context context, final AttributeSet set, final int n) {
super(context, set, n);
this.mOverlayObjects = new ArrayList<OverlayObject>();
}
public void addOverlayObject(final OverlayObject overlayObject) {
this.mOverlayObjects.add(overlayObject);
}
public void onDraw(final Canvas canvas) {
super.onDraw(canvas);
if (this.mOverlayObjects.size() > 0) {
final Iterator<OverlayObject> iterator = this.mOverlayObjects.iterator();
while (iterator.hasNext()) {
final OverlayObject overlayObject = iterator.next();
final BitmapDrawable bitmapDrawable = overlayObject.getBitmapDrawable();
if (bitmapDrawable != null) {
bitmapDrawable.draw(canvas);
}
if (!overlayObject.update(this.getDrawingTime())) {
iterator.remove();
}
}
}
}
public void startAnimationAll() {
for (final OverlayObject overlayObject : this.mOverlayObjects) {
if (!overlayObject.isAnimationStarted()) {
overlayObject.startAnimation(this.getDrawingTime());
}
}
}
public void stopAnimationAll() {
final Iterator<OverlayObject> iterator = this.mOverlayObjects.iterator();
while (iterator.hasNext()) {
iterator.next().stopAnimation();
}
}
public static class OverlayObject
{
private BitmapDrawable mBitmap;
private float mCurrentAlpha;
private Rect mCurrentBounds;
private int mDeltaY;
private long mDuration;
private float mEndAlpha;
private Interpolator mInterpolator;
private boolean mIsAnimationEnded;
private boolean mIsAnimationStarted;
private OnAnimationEndListener mListener;
private float mStartAlpha;
private Rect mStartRect;
private long mStartTime;
public OverlayObject(BitmapDrawable mBitmap, Rect rect) {
this.mCurrentAlpha = 1.0f;
this.mStartAlpha = 1.0f;
this.mEndAlpha = 1.0f;
this.mBitmap = mBitmap;
this.mStartRect = rect;
rect = new Rect(rect);
this.mCurrentBounds = rect;
mBitmap = this.mBitmap;
if (mBitmap != null && rect != null) {
mBitmap.setAlpha((int)(this.mCurrentAlpha * 255.0f));
this.mBitmap.setBounds(this.mCurrentBounds);
}
}
public BitmapDrawable getBitmapDrawable() {
return this.mBitmap;
}
public boolean isAnimationStarted() {
return this.mIsAnimationStarted;
}
public OverlayObject setAlphaAnimation(final float mStartAlpha, final float mEndAlpha) {
this.mStartAlpha = mStartAlpha;
this.mEndAlpha = mEndAlpha;
return this;
}
public OverlayObject setAnimationEndListener(final OnAnimationEndListener mListener) {
this.mListener = mListener;
return this;
}
public OverlayObject setDuration(final long mDuration) {
this.mDuration = mDuration;
return this;
}
public OverlayObject setInterpolator(final Interpolator mInterpolator) {
this.mInterpolator = mInterpolator;
return this;
}
public OverlayObject setTranslateYAnimation(final int mDeltaY) {
this.mDeltaY = mDeltaY;
return this;
}
public void startAnimation(final long mStartTime) {
this.mStartTime = mStartTime;
this.mIsAnimationStarted = true;
}
public void stopAnimation() {
this.mIsAnimationStarted = true;
this.mIsAnimationEnded = true;
final OnAnimationEndListener mListener = this.mListener;
if (mListener != null) {
mListener.onAnimationEnd();
}
}
public boolean update(final long n) {
if (this.mIsAnimationEnded) {
return false;
}
final float min = Math.min(1.0f, (n - this.mStartTime) / (float)this.mDuration);
float n2 = 0.0f;
final float max = Math.max(0.0f, min);
if (this.mIsAnimationStarted) {
n2 = max;
}
final Interpolator mInterpolator = this.mInterpolator;
float interpolation;
if (mInterpolator == null) {
interpolation = n2;
}
else {
interpolation = mInterpolator.getInterpolation(n2);
}
final int n3 = (int)(this.mDeltaY * interpolation);
final Rect mCurrentBounds = this.mCurrentBounds;
final Rect mStartRect = this.mStartRect;
mCurrentBounds.top = mStartRect.top + n3;
mCurrentBounds.bottom = mStartRect.bottom + n3;
final float mStartAlpha = this.mStartAlpha;
final float mCurrentAlpha = mStartAlpha + (this.mEndAlpha - mStartAlpha) * interpolation;
this.mCurrentAlpha = mCurrentAlpha;
final BitmapDrawable mBitmap = this.mBitmap;
if (mBitmap != null && mCurrentBounds != null) {
mBitmap.setAlpha((int)(mCurrentAlpha * 255.0f));
this.mBitmap.setBounds(this.mCurrentBounds);
}
if (this.mIsAnimationStarted && n2 >= 1.0f) {
this.mIsAnimationEnded = true;
final OnAnimationEndListener mListener = this.mListener;
if (mListener != null) {
mListener.onAnimationEnd();
}
}
return this.mIsAnimationEnded ^ true;
}
public interface OnAnimationEndListener
{
void onAnimationEnd();
}
}
}
|
[
"ethan.halsall@gmail.com"
] |
ethan.halsall@gmail.com
|
5e1f779872ca780a427d8bada69d6242417fc52c
|
66e2f35b7b56865552616cf400e3a8f5928d12a2
|
/src/main/java/com/alipay/api/domain/ApplyCodeResponse.java
|
9d29363d065bc09c9bb17c20b3139081df5d0a88
|
[
"Apache-2.0"
] |
permissive
|
xiafaqi/alipay-sdk-java-all
|
18dc797400847c7ae9901566e910527f5495e497
|
606cdb8014faa3e9125de7f50cbb81b2db6ee6cc
|
refs/heads/master
| 2022-11-25T08:43:11.997961
| 2020-07-23T02:58:22
| 2020-07-23T02:58:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 854
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 申请S码的结果对象
*
* @author auto create
* @since 1.0, 2019-09-18 18:03:11
*/
public class ApplyCodeResponse extends AlipayObject {
private static final long serialVersionUID = 5637753467799717622L;
/**
* apply_code_results,申请S码的结果中的批量发码结果
*/
@ApiListField("apply_code_result")
@ApiField("apply_code_result")
private List<ApplyCodeResult> applyCodeResult;
public List<ApplyCodeResult> getApplyCodeResult() {
return this.applyCodeResult;
}
public void setApplyCodeResult(List<ApplyCodeResult> applyCodeResult) {
this.applyCodeResult = applyCodeResult;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d5bc494956d30aa73dba289151b361a01d3293e3
|
7b4fd58090aa7013137ba2734d7f256b812861e1
|
/src/Ellias/rm/com/tencent/tmassistantsdk/common/TMAssistantDownloadSDKTaskState.java
|
dc78f862fd047698e63d31fa9e7daf04463183cf
|
[] |
no_license
|
daihuabin/Ellias
|
e37798a6a2e63454f80de512319ece885b6a2237
|
fd010991a5677e6aa104b927b82fc3d6da801887
|
refs/heads/master
| 2023-03-16T21:12:33.908495
| 2020-02-10T15:42:22
| 2020-02-10T15:42:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 775
|
java
|
package com.tencent.tmassistantsdk.common;
public class TMAssistantDownloadSDKTaskState
{
public static final int ALREADY_INSTALLED = 0;
public static final int DownloadSDKTaskState_DELETE = 6;
public static final int DownloadSDKTaskState_DOWNLOADING = 2;
public static final int DownloadSDKTaskState_FAILED = 5;
public static final int DownloadSDKTaskState_PAUSED = 3;
public static final int DownloadSDKTaskState_SUCCEED = 4;
public static final int DownloadSDKTaskState_WAITING = 1;
public static final int LOWWER_VERSION_INSTALLED = 2;
public static final int UN_INSTALLED = 1;
}
/* Location: D:\rm_src\classes_dex2jar\
* Qualified Name: com.tencent.tmassistantsdk.common.TMAssistantDownloadSDKTaskState
* JD-Core Version: 0.6.0
*/
|
[
"sevarsti@sina.com"
] |
sevarsti@sina.com
|
4fa024e9d3300b40895e7a2de37169a5c46ab507
|
6e24091b801c8edb7cf502dac8ce444a26121be3
|
/smartupdate/src/main/java/com/lwy/smartupdate/Config.java
|
76449773aa7b41dff142f31bfc6b9f1f5e558cb3
|
[
"Apache-2.0"
] |
permissive
|
XiePengLearn/AppSmartUpdate
|
c5767e68af9211cb94d89fa0af686a37cbe9a978
|
4c829fd499bb5f22fbb851a08d0d4d0eef17652e
|
refs/heads/master
| 2020-07-03T12:03:07.367843
| 2019-08-12T09:28:28
| 2019-08-12T09:28:28
| 201,898,880
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,310
|
java
|
package com.lwy.smartupdate;
import android.content.Context;
import android.text.TextUtils;
import com.lwy.smartupdate.api.IHttpManager;
import com.lwy.smartupdate.api.OkhttpManager;
/**
* @author lwy 2018/9/2
* @version v1.0.0
* @name Config
* @description 存储配置
*/
public class Config {
private boolean isDebug;
private String updateDirPath;
private boolean isOnlyWifi;
private boolean isShowDialog;
private IHttpManager httpManager;
private Config(Builder builder) {
isDebug = builder.isDebug;
updateDirPath = builder.updateDirPath;
isOnlyWifi = builder.isOnlyWifi;
isShowDialog = builder.isShowDialog;
httpManager = builder.httpManager;
if (httpManager == null)
httpManager = new OkhttpManager();
}
public boolean isDebug() {
return isDebug;
}
public String getUpdateDirPath() {
return updateDirPath;
}
public boolean isOnlyWifi() {
return isOnlyWifi;
}
public boolean isShowDialog() {
return isShowDialog;
}
public IHttpManager getHttpManager() {
return httpManager;
}
public static class Builder {
private boolean isDebug;
private String updateDirPath;
private boolean isOnlyWifi;
private boolean isShowDialog = true;
private IHttpManager httpManager;
public Builder() {
}
public Builder isDebug(boolean debug) {
isDebug = debug;
return this;
}
public Builder updateDirPath(String dirPath) {
updateDirPath = dirPath;
return this;
}
public Builder isOnlyWifi(boolean flag) {
isOnlyWifi = flag;
return this;
}
public Builder isShowInternalDialog(boolean flag) {
isShowDialog = flag;
return this;
}
public Builder httpManager(IHttpManager httpManager) {
this.httpManager = httpManager;
return this;
}
public Config build(Context context) {
if (TextUtils.isEmpty(updateDirPath))
updateDirPath = context.getExternalFilesDir("update").getAbsolutePath() + "/";
return new Config(this);
}
}
}
|
[
"769783182@qq.com"
] |
769783182@qq.com
|
2f19ca1594cb756287ee86c430fb4ff8cf68f886
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/java-vertx/generated/src/main/java/org/openapitools/server/api/model/ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties.java
|
ec943b0e545c2b26f0befe5a8852c653a5b1e383
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 2,153
|
java
|
package org.openapitools.server.api.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.openapitools.server.api.model.ConfigNodePropertyInteger;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties {
private ConfigNodePropertyInteger numUserLimit = null;
public ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties () {
}
public ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties (ConfigNodePropertyInteger numUserLimit) {
this.numUserLimit = numUserLimit;
}
@JsonProperty("numUserLimit")
public ConfigNodePropertyInteger getNumUserLimit() {
return numUserLimit;
}
public void setNumUserLimit(ConfigNodePropertyInteger numUserLimit) {
this.numUserLimit = numUserLimit;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties comAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties = (ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties) o;
return Objects.equals(numUserLimit, comAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties.numUserLimit);
}
@Override
public int hashCode() {
return Objects.hash(numUserLimit);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComAdobeCqSocialCommonsCommentsListingImplSearchCommentSocialCProperties {\n");
sb.append(" numUserLimit: ").append(toIndentedString(numUserLimit)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
79cb41b906fbcb75b63b11637588abfa53fd251b
|
e8cd24201cbfadef0f267151ea5b8a90cc505766
|
/group24/75939388/learning2017/src/main/java/basic/dataStructure/stack/expr/TokenParser.java
|
4edb47c2c15379998a18aa478b46d66fdfe84efb
|
[] |
no_license
|
XMT-CN/coding2017-s1
|
30dd4ee886dd0a021498108353c20360148a6065
|
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
|
refs/heads/master
| 2021-01-21T21:38:42.199253
| 2017-06-25T07:44:21
| 2017-06-25T07:44:21
| 94,863,023
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
package basic.dataStructure.stack.expr;
import java.util.ArrayList;
import java.util.List;
public class TokenParser {
public static List<Token> parse(String expr) {
List<Token> tokens = new ArrayList<Token>();
int i = 0;
while (i < expr.length()) {
char c = expr.charAt(i);
if (isOperator(c)) {
Token t = new Token(Token.OPERATOR, String.valueOf(c));
tokens.add(t);
i++;
} else if (Character.isDigit(c)) {
int nextOperatorIndex = indexOfNextOperator(i, expr);
String value = expr.substring(i, nextOperatorIndex);
Token t = new Token(Token.NUMBER, value);
tokens.add(t);
i = nextOperatorIndex;
} else if (isLeftBracket(String.valueOf(c))) {
Token t = new Token(Token.LBRACKET, String.valueOf(c));
tokens.add(t);
i++;
} else if (isRightBracket(String.valueOf(c))) {
Token t = new Token(Token.RBRACKET, String.valueOf(c));
tokens.add(t);
i++;
} else {
System.out.println("char :[" + c + "] is not number or operator,ignore");
i++;
}
}
return tokens;
}
private static int indexOfNextOperator(int i, String expr) {
while (Character.isDigit(expr.charAt(i))) {
i++;
if (i == expr.length()) {
break;
}
}
return i;
}
private static boolean isOperator(char c) {
String sc = String.valueOf(c);
return Token.OPERATORS.contains(sc);
}
private static boolean isLeftBracket(String s) {
return s.equals("(");
}
private static boolean isRightBracket(String s) {
return s.equals(")");
}
}
|
[
"542194147@qq.com"
] |
542194147@qq.com
|
87a2ab28f2fefe8c445008cd00651ca7dbc185b4
|
acc82eb4d161af40b4d70a51b18c5e4604790d41
|
/src/main/java/org/lastaflute/di/util/tiger/Tuple3.java
|
e0b10b13087396e61cd7d475d1eb52d51cb1f168
|
[
"Apache-2.0"
] |
permissive
|
lastaflute/lasta-di
|
8f3735feabb55be7e76e361b185940961def158d
|
eb3f835bcb4cde21179e338ef47c6427135fd2ee
|
refs/heads/develop
| 2022-05-27T16:26:16.034639
| 2022-05-07T10:01:51
| 2022-05-07T10:01:51
| 34,904,614
| 8
| 6
|
Apache-2.0
| 2022-05-07T10:06:12
| 2015-05-01T13:42:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,813
|
java
|
/*
* Copyright 2015-2022 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.lastaflute.di.util.tiger;
/**
* @author modified by jflute (originated in Seasar)
* @since 2.4.18
* @param <T1>
* @param <T2>
* @param <T3>
*/
public class Tuple3<T1, T2, T3> {
protected T1 value1;
protected T2 value2;
protected T3 value3;
public static <T1, T2, T3> Tuple3<T1, T2, T3> tuple3(final T1 value1, final T2 value2, final T3 value3) {
return new Tuple3<T1, T2, T3>(value1, value2, value3);
}
public Tuple3() {
}
public Tuple3(final T1 value1, final T2 value2, final T3 value3) {
this.value1 = value1;
this.value2 = value2;
this.value3 = value3;
}
public T1 getValue1() {
return value1;
}
public void setValue1(final T1 value1) {
this.value1 = value1;
}
public T2 getValue2() {
return value2;
}
public void setValue2(final T2 value2) {
this.value2 = value2;
}
public T3 getValue3() {
return value3;
}
public void setValue3(final T3 value3) {
this.value3 = value3;
}
@Override
public String toString() {
return "{" + value1 + ", " + value2 + ", " + value3 + "}";
}
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
7ca47c730bb274fa1b11c7ef7ba1c6005fc0d9b0
|
01557aa7c6d947b5b04637c7480e05d72c737e91
|
/user-server/src/main/java/com/clf/cloud/userserver/utils/FileUtils.java
|
960ffc876086ea76d2a3a5eb678c0c818dfe19ea
|
[] |
no_license
|
kvenLin/miniwechat-backend
|
57e81914f2d2d6d7b3e0ec46a14c5310616b0770
|
9cf3211728790e179c04786f08d98f3aa65e1840
|
refs/heads/master
| 2022-07-24T05:11:17.499004
| 2020-05-24T07:13:47
| 2020-05-24T07:13:47
| 250,245,156
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,494
|
java
|
package com.clf.cloud.userserver.utils;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Decoder;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
public class FileUtils {
private static class BASE64DecodedMultipartFile implements MultipartFile {
private final byte[] imgContent;
private final String header;
private BASE64DecodedMultipartFile(byte[] imgContent, String header) {
this.imgContent = imgContent;
this.header = header.split(";")[0];
}
@Override
public String getName() {
// TODO - implementation depends on your requirements
return System.currentTimeMillis() + Math.random() + "." + header.split("/")[1];
}
@Override
public String getOriginalFilename() {
// TODO - implementation depends on your requirements
return System.currentTimeMillis() + (int)Math.random() * 10000 + "." + header.split("/")[1];
}
@Override
public String getContentType() {
// TODO - implementation depends on your requirements
return header.split(":")[1];
}
@Override
public boolean isEmpty() {
return imgContent == null || imgContent.length == 0;
}
@Override
public long getSize() {
return imgContent.length;
}
@Override
public byte[] getBytes() throws IOException {
return imgContent;
}
@Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(imgContent);
}
@Override
public void transferTo(File dest) throws IOException, IllegalStateException {
new FileOutputStream(dest).write(imgContent);
}
}
/**
* 根据url拿取file
*
* @param url
* @param suffix
* 文件后缀名
*/
public static File createFileByUrl(String url, String suffix) {
byte[] byteFile = getImageFromNetByUrl(url);
if (byteFile != null) {
File file = getFileFromBytes(byteFile, suffix);
return file;
} else {
return null;
}
}
/**
* 根据地址获得数据的字节流
*
* @param strUrl
* 网络连接地址
* @return
*/
private static byte[] getImageFromNetByUrl(String strUrl) {
try {
URL url = new URL(strUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setConnectTimeout(5 * 1000);
InputStream inStream = conn.getInputStream();// 通过输入流获取图片数据
byte[] btImg = readInputStream(inStream);// 得到图片的二进制数据
return btImg;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 从输入流中获取数据
*
* @param inStream
* 输入流
* @return
* @throws Exception
*/
private static byte[] readInputStream(InputStream inStream) throws Exception {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len = 0;
while ((len = inStream.read(buffer)) != -1) {
outStream.write(buffer, 0, len);
}
inStream.close();
return outStream.toByteArray();
}
// 创建临时文件
private static File getFileFromBytes(byte[] b, String suffix) {
BufferedOutputStream stream = null;
File file = null;
try {
file = File.createTempFile("pattern", "." + suffix);
System.out.println("临时文件位置:" + file.getCanonicalPath());
FileOutputStream fstream = new FileOutputStream(file);
stream = new BufferedOutputStream(fstream);
stream.write(b);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return file;
}
public static MultipartFile createImg(String url) {
try {
// File转换成MutipartFile
File file = FileUtils.createFileByUrl(url, "jpg");
FileInputStream inputStream = new FileInputStream(file);
MultipartFile multipartFile = new MockMultipartFile(file.getName(), inputStream);
return multipartFile;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
public static MultipartFile fileToMultipart(String filePath) {
try {
// File转换成MutipartFile
File file = new File(filePath);
FileInputStream inputStream = new FileInputStream(file);
MultipartFile multipartFile = new MockMultipartFile(file.getName(), "png", "image/png", inputStream);
return multipartFile;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
public static MultipartFile audioFileToMultipart(String filePath) {
try {
// File转换成MutipartFile
File file = new File(filePath);
FileInputStream inputStream = new FileInputStream(file);
MultipartFile multipartFile = new MockMultipartFile(file.getName(), inputStream);
return multipartFile;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
/**
* base64字符串转成MultipartFile格式
* @param base64
* @return
*/
public static MultipartFile base64ToMultipart(String base64) {
try {
String[] baseStrs = base64.split(",");
BASE64Decoder decoder = new BASE64Decoder();
byte[] b = new byte[0];
b = decoder.decodeBuffer(baseStrs[1]);
for(int i = 0; i < b.length; ++i) {
if (b[i] < 0) {
b[i] += 256;
}
}
return new BASE64DecodedMultipartFile(b, baseStrs[0]);
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
}
|
[
"1256233771@qq.com"
] |
1256233771@qq.com
|
acbae25ff9c73dfd7fc62413e524c99ac71f6b10
|
e534978c750d7b523f75bd795476a8ea28b908b2
|
/src/main/java/shadows/ancient/blocks/BlockNewTorch.java
|
6e173fbd57af3fee6b00aad4d2c4014a63040a4a
|
[] |
no_license
|
whichonespink44/Forgotten-Nature
|
278fe07be2671049f4c180641cf5bd2c2bad54ca
|
bf7e0125100bfaece4540b64c1a57df9185a9125
|
refs/heads/master
| 2021-01-21T16:44:27.682898
| 2017-05-16T14:53:06
| 2017-05-16T14:53:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,257
|
java
|
package shadows.nature.Blocks;
import java.util.Random;
import net.minecraft.block.BlockTorch;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockNewTorch extends BlockTorch {
@SideOnly(Side.CLIENT)
private IIcon torchIcon;
public BlockNewTorch() {
super();
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int par1, int par2) {
return this.torchIcon;
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister par1IconRegister) {
this.torchIcon = par1IconRegister.registerIcon("forgottennature:CrystalTorch");
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public int getRenderType() {
return 2;
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_,
Random p_149734_5_) {
}
@SideOnly(Side.CLIENT)
public String getItemNameIS(ItemStack i) {
switch (i.getItemDamage()) {
case 0:
return "Crystal Torch";
default:
return "";
}
}
}
|
[
"Bward7864@gmail.com"
] |
Bward7864@gmail.com
|
9b550c47781f3f84546cb313ef293c4e31e31048
|
9bac6b22d956192ba16d154fca68308c75052cbb
|
/icmsint-ejb/src/main/java/hk/judiciary/icmsint/model/sysinf/inf/gccid2j/FixedPenaltyCostsCodeV10CT.java
|
786c73e56303703bfebfcdfa46fe5b554932fa67
|
[] |
no_license
|
peterso05168/icmsint
|
9d4723781a6666cae8b72d42713467614699b66d
|
79461c4dc34c41b2533587ea3815d6275731a0a8
|
refs/heads/master
| 2020-06-25T07:32:54.932397
| 2017-07-13T10:54:56
| 2017-07-13T10:54:56
| 96,960,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,186
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.06.20 at 04:51:00 AM CST
//
package hk.judiciary.icmsint.model.sysinf.inf.gccid2j;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* fixed penalty costs code applied to the standard offence description
*
* <p>Java class for FixedPenaltyCostsCode.V1.0.CT complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="FixedPenaltyCostsCode.V1.0.CT">
* <simpleContent>
* <restriction base="<CCT>Code.CT">
* </restriction>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FixedPenaltyCostsCode.V1.0.CT")
public class FixedPenaltyCostsCodeV10CT
extends CodeCT
{
}
|
[
"chiu.cheukman@gmail.com"
] |
chiu.cheukman@gmail.com
|
e03c6a9eaad429ec78fef53d7d7d5dc66a6ff3c7
|
385d5f1a5210b08bf8d2861c27097c3490428869
|
/app/src/main/java/com/inlog/ecommerce/rangeslider/SephirothViewCompat.java
|
16d204e1a37cb0277f0c3f32a975bcec1f049940
|
[] |
no_license
|
MohammadFaizan007/EcommerceB
|
83a4bc4fba86e9cb9cdcc695ef1c9a3cc25b6136
|
a2d806cf65acf98a90f1517fa0931908cc9c2bd6
|
refs/heads/master
| 2023-07-12T11:54:44.779811
| 2021-08-16T09:34:33
| 2021-08-16T09:34:33
| 396,698,218
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 527
|
java
|
package com.inlog.ecommerce.rangeslider;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
/**
* Created by sephiroth on 2/9/17.
*/
class SephirothViewCompat {
static boolean isInScrollingContainer(final View view) {
ViewParent p = view.getParent();
while (p instanceof ViewGroup) {
if (((ViewGroup) p).shouldDelayChildPressedState()) {
return true;
}
p = p.getParent();
}
return false;
}
}
|
[
"faizanmohd106@gmail.com"
] |
faizanmohd106@gmail.com
|
bf24840202287d95676ba54e486291d4554692d7
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/protocal/protobuf/cog.java
|
8cd6ebcd9f0f33309e1fd5bcdcb117816dc2b857
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,127
|
java
|
package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import e.a.a.b;
import java.util.LinkedList;
public final class cog extends btd
{
public int wRe;
public int xlI;
public LinkedList<cod> xlJ;
public int xlK;
public cog()
{
AppMethodBeat.i(116820);
this.xlJ = new LinkedList();
AppMethodBeat.o(116820);
}
public final int op(int paramInt, Object[] paramArrayOfObject)
{
int i = 0;
AppMethodBeat.i(116821);
if (paramInt == 0)
{
paramArrayOfObject = (e.a.a.c.a)paramArrayOfObject[0];
if (this.BaseResponse == null)
{
paramArrayOfObject = new b("Not all required fields were included: BaseResponse");
AppMethodBeat.o(116821);
throw paramArrayOfObject;
}
if (this.BaseResponse != null)
{
paramArrayOfObject.iy(1, this.BaseResponse.computeSize());
this.BaseResponse.writeFields(paramArrayOfObject);
}
paramArrayOfObject.iz(2, this.xlI);
paramArrayOfObject.e(3, 8, this.xlJ);
paramArrayOfObject.iz(4, this.wRe);
paramArrayOfObject.iz(5, this.xlK);
AppMethodBeat.o(116821);
paramInt = i;
return paramInt;
}
if (paramInt == 1)
if (this.BaseResponse == null)
break label651;
label651: for (paramInt = e.a.a.a.ix(1, this.BaseResponse.computeSize()) + 0; ; paramInt = 0)
{
paramInt = paramInt + e.a.a.b.b.a.bs(2, this.xlI) + e.a.a.a.c(3, 8, this.xlJ) + e.a.a.b.b.a.bs(4, this.wRe) + e.a.a.b.b.a.bs(5, this.xlK);
AppMethodBeat.o(116821);
break;
if (paramInt == 2)
{
paramArrayOfObject = (byte[])paramArrayOfObject[0];
this.xlJ.clear();
paramArrayOfObject = new e.a.a.a.a(paramArrayOfObject, unknownTagHandler);
for (paramInt = btd.getNextFieldNumber(paramArrayOfObject); paramInt > 0; paramInt = btd.getNextFieldNumber(paramArrayOfObject))
if (!super.populateBuilderWithField(paramArrayOfObject, this, paramInt))
paramArrayOfObject.ems();
if (this.BaseResponse == null)
{
paramArrayOfObject = new b("Not all required fields were included: BaseResponse");
AppMethodBeat.o(116821);
throw paramArrayOfObject;
}
AppMethodBeat.o(116821);
paramInt = i;
break;
}
if (paramInt == 3)
{
Object localObject1 = (e.a.a.a.a)paramArrayOfObject[0];
cog localcog = (cog)paramArrayOfObject[1];
paramInt = ((Integer)paramArrayOfObject[2]).intValue();
int j;
Object localObject2;
boolean bool;
switch (paramInt)
{
default:
paramInt = -1;
AppMethodBeat.o(116821);
break;
case 1:
localObject1 = ((e.a.a.a.a)localObject1).Vh(paramInt);
j = ((LinkedList)localObject1).size();
for (paramInt = 0; paramInt < j; paramInt++)
{
localObject2 = (byte[])((LinkedList)localObject1).get(paramInt);
paramArrayOfObject = new BaseResponse();
localObject2 = new e.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = paramArrayOfObject.populateBuilderWithField((e.a.a.a.a)localObject2, paramArrayOfObject, btd.getNextFieldNumber((e.a.a.a.a)localObject2)));
localcog.BaseResponse = paramArrayOfObject;
}
AppMethodBeat.o(116821);
paramInt = i;
break;
case 2:
localcog.xlI = ((e.a.a.a.a)localObject1).BTU.vd();
AppMethodBeat.o(116821);
paramInt = i;
break;
case 3:
localObject1 = ((e.a.a.a.a)localObject1).Vh(paramInt);
j = ((LinkedList)localObject1).size();
for (paramInt = 0; paramInt < j; paramInt++)
{
localObject2 = (byte[])((LinkedList)localObject1).get(paramInt);
paramArrayOfObject = new cod();
localObject2 = new e.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = paramArrayOfObject.populateBuilderWithField((e.a.a.a.a)localObject2, paramArrayOfObject, btd.getNextFieldNumber((e.a.a.a.a)localObject2)));
localcog.xlJ.add(paramArrayOfObject);
}
AppMethodBeat.o(116821);
paramInt = i;
break;
case 4:
localcog.wRe = ((e.a.a.a.a)localObject1).BTU.vd();
AppMethodBeat.o(116821);
paramInt = i;
break;
case 5:
localcog.xlK = ((e.a.a.a.a)localObject1).BTU.vd();
AppMethodBeat.o(116821);
paramInt = i;
break;
}
}
paramInt = -1;
AppMethodBeat.o(116821);
break;
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.cog
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
fc110a4fba15f3c6240e9879bff8d69a33991d39
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/52/org/apache/commons/math/stat/Frequency_Frequency_60.java
|
0d95bfc456fc0b2b91debe03bfb76502b714f39f
|
[] |
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,082
|
java
|
org apach common math stat
maintain frequenc distribut
accept compar valu valu ad
compar ad add method
illeg argument except illegalargumentexcept
integ valu integ long distinguish type
code add addvalu long valueof add addvalu add addvalu code
effect similarli argument code count getcount code
valu convert code add addvalu code charact instanc
valu compar integr valu attempt
combin integr type char frequenc distribut fail
valu order natur order
code compar code suppli constructor
version
frequenc serializ
default constructor
frequenc
freq tabl freqtabl tree map treemap compar long
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
5e97fd55176720c675684bf7806dd8dc33a98a72
|
1d74b16cf5dfc3f9d6be3f66fde5f66bec255592
|
/language-hua/src/main/java/com/github/liuyehcf/framework/language/hua/core/bytecode/cp/_lrem.java
|
e22f6d383afed648860a8038f73bbc1f1c830ccd
|
[] |
no_license
|
liuyehcf/liuyehcf-framework
|
a00fc8e53c080a7cb7bfd9123bdbf6aba18d0170
|
b666e2c1d886879459d0d41e3d9f43c10b2ee523
|
refs/heads/master
| 2023-06-26T01:00:35.681403
| 2023-06-11T08:26:01
| 2023-06-11T08:26:01
| 135,094,124
| 11
| 2
| null | 2023-06-14T22:50:51
| 2018-05-28T01:10:18
|
Java
|
UTF-8
|
Java
| false
| false
| 742
|
java
|
package com.github.liuyehcf.framework.language.hua.core.bytecode.cp;
import com.github.liuyehcf.framework.language.hua.runtime.RuntimeContext;
/**
* long 求余
* < before → after >
* < value1, value2 → result >
*
* @author hechenfeng
* @date 2018/6/30
*/
public class _lrem extends Compute {
/**
* 唯一操作码
*/
public static final int OPERATOR_CODE = 0x71;
/**
* 操作数类型
*/
public static final Class<?>[] OPERATOR_CLASSES = new Class<?>[0];
@Override
public void operate(RuntimeContext context) {
long value2 = context.popLong();
long value1 = context.popLong();
context.push(value1 % value2);
context.increaseCodeOffset();
}
}
|
[
"1559500551@qq.com"
] |
1559500551@qq.com
|
518470f5b23dee5120fffc7ccbb5981361998cf0
|
280803dfc073141981c47f228edea67bbc1b2431
|
/app/src/main/java/com/siddiquinoor/restclient/activity/sub_activity/gps_sub/OsmGeoUpdateHandler.java
|
2aea951fc388e58344a33a5f1e9dcafdfc852e8d
|
[] |
no_license
|
nirzonpop192/GP-offline-UAT-10
|
5aee30fa4b03349a685f93bda51edd7c6d7ae12d
|
49e1bc9316c2d5093b812b394d929b2422f6922c
|
refs/heads/master
| 2021-01-21T06:53:25.616270
| 2017-02-27T09:49:00
| 2017-02-27T09:49:00
| 83,294,186
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,304
|
java
|
package com.siddiquinoor.restclient.activity.sub_activity.gps_sub;
import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.widget.Toast;
import com.siddiquinoor.restclient.activity.MapActivity;
import org.osmdroid.util.GeoPoint;
/**
* Created by Faisal on 6/21/2016.
*/
public class OsmGeoUpdateHandler implements LocationListener {
private MapActivity mMapActivity;
public OsmGeoUpdateHandler(MapActivity mMapActivity) {
this.mMapActivity = mMapActivity;
}
@Override
public void onLocationChanged(Location location) {
Toast.makeText(mMapActivity,
"latitude = " + location.getLatitude() * 1e6 + " longitude = " + location.getLongitude() * 1e6,
Toast.LENGTH_SHORT).show();
int latitude = (int) (location.getLatitude() * 1E6);
int longitude = (int) (location.getLongitude() * 1E6);
GeoPoint point = new GeoPoint(latitude, longitude);
// mMapActivity.updateCarPosition(point);
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onProviderDisabled(String provider) {
}
}
|
[
"nirzon192@gmail.com"
] |
nirzon192@gmail.com
|
bc9103c49a9a1bcfa918dcf4a1de8b97108738d6
|
97c20b376d1f56325a721e127ef79257ae9cc996
|
/DigitalClock/src/digitalclock/DigitalClockAboutBox.java
|
25700020d50ca484f18d0a55f540d56e9464287c
|
[] |
no_license
|
moderateepheezy/NetBeans-Project
|
9c230233445b409ce7ae9783e24b18b1753068bb
|
7b457edfc22dac720a9dc90dbaf9d0b2f8cc3388
|
refs/heads/master
| 2021-01-18T15:14:46.931731
| 2015-04-11T15:33:44
| 2015-04-11T15:33:44
| 33,781,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,464
|
java
|
/*
* DigitalClockAboutBox.java
*/
package digitalclock;
import org.jdesktop.application.Action;
public class DigitalClockAboutBox extends javax.swing.JDialog {
public DigitalClockAboutBox(java.awt.Frame parent) {
super(parent);
initComponents();
getRootPane().setDefaultButton(closeButton);
}
@Action public void closeAboutBox() {
dispose();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
closeButton = new javax.swing.JButton();
javax.swing.JLabel appTitleLabel = new javax.swing.JLabel();
javax.swing.JLabel versionLabel = new javax.swing.JLabel();
javax.swing.JLabel appVersionLabel = new javax.swing.JLabel();
javax.swing.JLabel vendorLabel = new javax.swing.JLabel();
javax.swing.JLabel appVendorLabel = new javax.swing.JLabel();
javax.swing.JLabel homepageLabel = new javax.swing.JLabel();
javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel();
javax.swing.JLabel appDescLabel = new javax.swing.JLabel();
javax.swing.JLabel imageLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(digitalclock.DigitalClockApp.class).getContext().getResourceMap(DigitalClockAboutBox.class);
setTitle(resourceMap.getString("title")); // NOI18N
setModal(true);
setName("aboutBox"); // NOI18N
setResizable(false);
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(digitalclock.DigitalClockApp.class).getContext().getActionMap(DigitalClockAboutBox.class, this);
closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
closeButton.setName("closeButton"); // NOI18N
appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4));
appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N
appTitleLabel.setName("appTitleLabel"); // NOI18N
versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD));
versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N
versionLabel.setName("versionLabel"); // NOI18N
appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N
appVersionLabel.setName("appVersionLabel"); // NOI18N
vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD));
vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N
vendorLabel.setName("vendorLabel"); // NOI18N
appVendorLabel.setText(resourceMap.getString("Application.vendor")); // NOI18N
appVendorLabel.setName("appVendorLabel"); // NOI18N
homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD));
homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N
homepageLabel.setName("homepageLabel"); // NOI18N
appHomepageLabel.setText(resourceMap.getString("Application.homepage")); // NOI18N
appHomepageLabel.setName("appHomepageLabel"); // NOI18N
appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N
appDescLabel.setName("appDescLabel"); // NOI18N
imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon")); // NOI18N
imageLabel.setName("imageLabel"); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(imageLabel)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(versionLabel)
.addComponent(vendorLabel)
.addComponent(homepageLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(appVersionLabel)
.addComponent(appVendorLabel)
.addComponent(appHomepageLabel)))
.addComponent(appTitleLabel, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(appDescLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)
.addComponent(closeButton))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(appTitleLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(appDescLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(versionLabel)
.addComponent(appVersionLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(vendorLabel)
.addComponent(appVendorLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(homepageLabel)
.addComponent(appHomepageLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
.addComponent(closeButton)
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton closeButton;
// End of variables declaration//GEN-END:variables
}
|
[
"moderateepheezy@gmail.com"
] |
moderateepheezy@gmail.com
|
691a4d893b3cf3075a45c564164eadfd4befbd01
|
23f694a1a46fac10c580f4efb55a0f2f2c862b1c
|
/latte-compiler/src/main/java/com/example/compiler/EntryVisitor.java
|
d61922ea1786981cb28d76a44f556cdae52fee83
|
[] |
no_license
|
zl1659403511/FestEC
|
1ed5d0208e2b7839d00a95e07a12c4fba14db15f
|
88c7e94e85214a1996af813018a77faebcdf4799
|
refs/heads/master
| 2021-01-01T17:28:57.664622
| 2017-11-06T09:39:05
| 2017-11-06T09:39:05
| 98,080,089
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,694
|
java
|
package com.example.compiler;
import javax.annotation.processing.Filer;
import javax.lang.model.util.SimpleAnnotationValueVisitor7;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import java.io.IOException;
import javax.annotation.processing.Filer;
import javax.lang.model.element.Modifier;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.SimpleAnnotationValueVisitor7;
/**
* Created by 傅令杰 on 2017/4/22
*/
final class EntryVisitor extends SimpleAnnotationValueVisitor7<Void, Void> {
private final Filer FILER;
private String mPackageName = null;
EntryVisitor(Filer FILER) {
this.FILER = FILER;
}
@Override
public Void visitString(String s, Void p) {
mPackageName = s;
return p;
}
@Override
public Void visitType(TypeMirror t, Void p) {
generateJavaCode(t);
return p;
}
private void generateJavaCode(TypeMirror typeMirror) {
final TypeSpec targetActivity =
TypeSpec.classBuilder("WXEntryActivity")
.addModifiers(Modifier.PUBLIC)
.addModifiers(Modifier.FINAL)
.superclass(TypeName.get(typeMirror))
.build();
final JavaFile javaFile = JavaFile.builder(mPackageName + ".wxapi", targetActivity)
.addFileComment("微信入口文件")
.build();
try {
javaFile.writeTo(FILER);
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"1659403511@qq.com"
] |
1659403511@qq.com
|
3278d3225d2f8acb0c47dffab5f320a62c378577
|
6f4764575e17202a27330e2f5b18d37d7b678bf4
|
/app/src/main/java/com/carsuper/coahr/mvp/model/myData/commodityOrder/NeedToRecieveModel.java
|
354359bc57bd2593ffb56a3084ade97fc9a9f034
|
[] |
no_license
|
LEEHOR/Carsuper
|
732efb1bf79ba69da9d1b4b2e98d1edd374dab92
|
4e48bf2b2c882f2427a241af5682a103b7103fee
|
refs/heads/master
| 2020-04-14T10:08:03.510404
| 2019-07-08T11:05:21
| 2019-07-08T11:05:21
| 154,423,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,325
|
java
|
package com.carsuper.coahr.mvp.model.myData.commodityOrder;
import com.carsuper.coahr.mvp.contract.myData.commodityOrder.NeedToRecieveContract;
import com.carsuper.coahr.mvp.model.base.BaseModel;
import com.carsuper.coahr.mvp.model.bean.CommodityOrderDetailBean;
import com.carsuper.coahr.mvp.model.bean.ResultBean;
import java.util.Map;
import javax.inject.Inject;
/**
* Author: hengzwd on 2018/8/10.
* Email:hengzwdhengzwd@qq.com
*/
public class NeedToRecieveModel extends BaseModel<NeedToRecieveContract.Presenter> implements NeedToRecieveContract.Model {
@Inject
public NeedToRecieveModel(){
super();
}
@Override
public void getCommodityOrderDetail(Map<String, String> map) {
mRxManager.add(createFlowable(new SimpleFlowableOnSubscribe<CommodityOrderDetailBean>(getApiservice().getCommodityOrderDetail(map.get("token"),map.get("order_id"))))
.subscribeWith(new SimpleDisposableSubscriber<CommodityOrderDetailBean>() {
@Override
public void _onNext(CommodityOrderDetailBean bean) {
if (getPresenter() != null) {
if (bean.getCode()==0) {
getPresenter().onGetCommodityOrderDetialSuccess(bean);
}else {
getPresenter().onGetCommodityOrderDetailFailure(bean.getMsg());
}
}
}
}));
}
@Override
public void ensureRecieve(Map<String, String> map) {
mRxManager.add(createFlowable(new SimpleFlowableOnSubscribe<ResultBean>(getApiservice().ensureRecieve(map.get("token"),map.get("order_id"))))
.subscribeWith(new SimpleDisposableSubscriber<ResultBean>() {
@Override
public void _onNext(ResultBean bean) {
if (getPresenter() != null) {
if (bean.getCode()==0) {
getPresenter().onEnsureRecieveSuccess(bean);
}else {
getPresenter().onEnsureRecieveFailure(bean.getMsg());
}
}
}
}));
}
}
|
[
"1622293788@qq.com"
] |
1622293788@qq.com
|
65735c7e539e53b5abbdb83d24746517a2ce5deb
|
bd908bbf17f7e173222aefa3a5b19d2aacc809df
|
/src/test/java/org/jboss/aerogear/connectivity/cdi/interceptor/SecurityInterceptorTest.java
|
cbbc288664c1e7cbf873234ab5b48388dfeead3b
|
[] |
no_license
|
kborchers/aerogear-unified-push-server
|
7d9ca83502c05e94989306083b15a37e90ddb221
|
2f401b5ade7b79325633d50d3c5f40499af43a6b
|
refs/heads/master
| 2020-12-25T12:07:58.511320
| 2013-06-20T09:47:24
| 2013-06-20T09:47:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,232
|
java
|
/**
* JBoss, Home of Professional Open Source
* Copyright Red Hat, Inc., and individual contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.aerogear.connectivity.cdi.interceptor;
import org.jboss.aerogear.security.authz.IdentityManagement;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import javax.interceptor.InvocationContext;
import java.lang.reflect.Method;
import java.util.HashSet;
import static junit.framework.Assert.assertNotNull;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class SecurityInterceptorTest {
@Mock
private InvocationContext invocationContext;
@Mock
private IdentityManagement identityManagement;
@InjectMocks
private SecurityInterceptor securityInterceptor;
private Method method;
private MobileAppEndpoint mobileAppEndpoint;
private HashSet<String> roles;
@Before
public void setUp() throws Exception {
securityInterceptor = new SecurityInterceptor();
MockitoAnnotations.initMocks(this);
mobileAppEndpoint = new MobileAppEndpoint();
roles = new HashSet<String>();
when(invocationContext.getTarget()).thenReturn(mobileAppEndpoint);
}
@Test
public void testAuthorizedRequestProtectedResource() throws Exception {
roles.add("admin");
method = mobileAppEndpoint.getClass().getMethod("registerMobileDevice");
when(invocationContext.getMethod()).thenReturn(method);
when(identityManagement.hasRoles(roles)).thenReturn(true);
securityInterceptor.invoke(invocationContext);
verify(invocationContext).proceed();
}
@Test(expected = RuntimeException.class)
public void testNonAuthorizedRequestProtectedResource() throws Exception {
roles.add("simple");
method = mobileAppEndpoint.getClass().getMethod("registerMobileDevice");
when(invocationContext.getMethod()).thenReturn(method);
when(identityManagement.hasRoles(roles)).thenReturn(false);
securityInterceptor.invoke(invocationContext);
}
@Test
public void testRequestNonProtectedResource() throws Exception {
method = mobileAppEndpoint.getClass().getMethod("retrieveMobileDevices");
when(invocationContext.getMethod()).thenReturn(method);
Object result = securityInterceptor.invoke(invocationContext);
verify(invocationContext).proceed();
}
//Stub
private class MobileAppEndpoint {
@Secure("admin")
public void registerMobileDevice() {}
public void retrieveMobileDevices() {}
}
}
|
[
"bruno@abstractj.org"
] |
bruno@abstractj.org
|
37656c5a5d638dfb4dac873a6c214d1796fc5044
|
1bbfeca83bac53d22b1110ca7f6c9a28bc46c22e
|
/ru-olymp-regional-2010/problems/triangle/triangle_sm_wrong_infinite_segment.java
|
d8bd4551714d44c146e3a7fabd3ede9b510d6a7c
|
[] |
no_license
|
stden/olymp
|
a633c1dfb1dd8d184a123d6da89f46163d5fad93
|
d85a4bb0b88797ec878b64db86ad8ec8854a63cd
|
refs/heads/master
| 2016-09-06T06:30:56.466755
| 2013-07-13T08:48:16
| 2013-07-13T08:48:16
| 5,158,472
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,710
|
java
|
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class triangle_sm_wrong_infinite_segment {
void solve() {
int n = nextInt();
assert 2 <= n && n <= 1000;
double l = 0;
double r = 10000;
double prev = nextDouble();
for (int it = 0; it < n - 1; it++) {
double cur = nextDouble();
assert 30 <= cur && cur <= 4000;
String outcome = nextToken();
assert outcome.equals("closer") || outcome.equals("further");
if (Math.abs(prev - cur) < 1e-6)
continue;
if (outcome.equals("closer")) {
if (cur > prev) {
l = Math.max(l, (cur + prev) / 2);
} else {
r = Math.min(r, (cur + prev) / 2);
}
} else {
if (cur < prev) {
l = Math.max(l, (cur + prev) / 2);
} else {
r = Math.min(r, (cur + prev) / 2);
}
}
prev = cur;
}
assert r >= l;
out.println(l + " " + r);
}
BufferedReader br;
PrintWriter out;
StringTokenizer st;
void run() {
try {
br = new BufferedReader(new FileReader("triangle.in"));
out = new PrintWriter(new FileWriter("triangle.out"));
solve();
out.close();
} catch (IOException e) {
e.printStackTrace();
System.exit(1);
}
}
String nextToken() {
try {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
} catch (Exception e) {
return "0";
}
}
int nextInt() {
return Integer.parseInt(nextToken());
}
double nextDouble() {
return Double.parseDouble(nextToken());
}
public static void main(String[] args) {
new triangle_sm_wrong_infinite_segment().run();
}
}
|
[
"super.denis@gmail.com"
] |
super.denis@gmail.com
|
7de22cc16333a3bbbf360385a28e22438822a10c
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.browser-base/sources/defpackage/C2183dR0.java
|
e9b6e9b6c4387234fe79daa1ad31744ff273fb2c
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 1,498
|
java
|
package defpackage;
import android.os.Build;
import android.widget.AutoCompleteTextView;
import java.lang.reflect.Method;
/* renamed from: dR0 reason: default package and case insensitive filesystem */
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public class C2183dR0 {
/* renamed from: a reason: collision with root package name */
public Method f9781a = null;
public Method b = null;
public Method c = null;
public C2183dR0() {
a();
try {
Method declaredMethod = AutoCompleteTextView.class.getDeclaredMethod("doBeforeTextChanged", new Class[0]);
this.f9781a = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException unused) {
}
try {
Method declaredMethod2 = AutoCompleteTextView.class.getDeclaredMethod("doAfterTextChanged", new Class[0]);
this.b = declaredMethod2;
declaredMethod2.setAccessible(true);
} catch (NoSuchMethodException unused2) {
}
try {
Method method = AutoCompleteTextView.class.getMethod("ensureImeVisible", Boolean.TYPE);
this.c = method;
method.setAccessible(true);
} catch (NoSuchMethodException unused3) {
}
}
public static void a() {
if (Build.VERSION.SDK_INT >= 29) {
throw new UnsupportedClassVersionError("This function can only be used for API Level < 29.");
}
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
8e798a7b5e45043b36534cbc33573ca79d4b11e5
|
32cd70512c7a661aeefee440586339211fbc9efd
|
/aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/transform/ResendConfirmationCodeResultJsonUnmarshaller.java
|
a107d6ca63249b3fa4f37d6ab94d5a09217d8ec6
|
[
"Apache-2.0"
] |
permissive
|
twigkit/aws-sdk-java
|
7409d949ce0b0fbd061e787a5b39a93db7247d3d
|
0b8dd8cf5e52ad7ae57acd2ce7a584fd83a998be
|
refs/heads/master
| 2020-04-03T16:40:16.625651
| 2018-05-04T12:05:14
| 2018-05-04T12:05:14
| 60,255,938
| 0
| 1
|
Apache-2.0
| 2018-05-04T12:48:26
| 2016-06-02T10:40:53
|
Java
|
UTF-8
|
Java
| false
| false
| 3,062
|
java
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights
* Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.cognitoidp.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import java.math.*;
import java.nio.ByteBuffer;
import com.amazonaws.services.cognitoidp.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* ResendConfirmationCodeResult JSON Unmarshaller
*/
public class ResendConfirmationCodeResultJsonUnmarshaller implements
Unmarshaller<ResendConfirmationCodeResult, JsonUnmarshallerContext> {
public ResendConfirmationCodeResult unmarshall(
JsonUnmarshallerContext context) throws Exception {
ResendConfirmationCodeResult resendConfirmationCodeResult = new ResendConfirmationCodeResult();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL)
return null;
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("CodeDeliveryDetails", targetDepth)) {
context.nextToken();
resendConfirmationCodeResult
.setCodeDeliveryDetails(CodeDeliveryDetailsTypeJsonUnmarshaller
.getInstance().unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null
|| context.getLastParsedParentElement().equals(
currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return resendConfirmationCodeResult;
}
private static ResendConfirmationCodeResultJsonUnmarshaller instance;
public static ResendConfirmationCodeResultJsonUnmarshaller getInstance() {
if (instance == null)
instance = new ResendConfirmationCodeResultJsonUnmarshaller();
return instance;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
e1800f459ef92c5ab8701de054eb70032ab81309
|
b9e76d42efa886982c6cfea37bbcb2b5fe556336
|
/edu.columbia.rdf.edb.ui/src/main/java/edu/columbia/rdf/edb/ui/network/SharedConnection.java
|
caab5d52ff1ea7bf684175de5e043e1af8b23bc4
|
[] |
no_license
|
antonybholmes/edb-ui
|
d8276fbf0093332b9b3c4ba830e454ba87808f69
|
82a29e3fde42c81ce8483102581c36fd2125e9d3
|
refs/heads/master
| 2023-06-24T19:52:52.733436
| 2021-07-24T21:59:01
| 2021-07-24T21:59:01
| 100,645,553
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 382
|
java
|
package edu.columbia.rdf.edb.ui.network;
import org.jebtk.core.pool.ObjectCreator;
import edu.columbia.rdf.edb.ui.Repository;
public class SharedConnection implements ObjectCreator<Repository> {
protected Repository mConnection;
public SharedConnection(Repository connection) {
mConnection = connection;
}
public Repository create() {
return mConnection;
}
}
|
[
"antony.b.holmes@gmail.com"
] |
antony.b.holmes@gmail.com
|
946f6abd9e726b41f24b455f5a7bd017dc7efc3f
|
cb91955a8a42f3084170c80f600ab98c17611201
|
/src/de/jungblut/math/ViterbiUtils.java
|
3bb62395bc1a9b5734d14bcd4c5e627d7a7a04ec
|
[
"Apache-2.0"
] |
permissive
|
EtashGuha/thomasjungblut-common
|
bb4c5279feb95e2127295b328b86d74d069b2bb8
|
26c694dfbf43259394f95a0e88b7114b1b89122a
|
refs/heads/master
| 2020-03-28T07:24:04.294149
| 2017-07-01T16:46:50
| 2017-07-01T16:46:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,240
|
java
|
package de.jungblut.math;
import java.util.Iterator;
import de.jungblut.math.DoubleVector.DoubleVectorElement;
import de.jungblut.math.dense.DenseDoubleMatrix;
import de.jungblut.math.dense.DenseDoubleVector;
/**
* Viterbi Utilities for forward backward passes and his famous decoding
* algorithm for hidden markov models.
*
* @author thomas.jungblut
*
*/
public final class ViterbiUtils {
private ViterbiUtils() {
throw new IllegalAccessError();
}
/**
* Do a decoding pass on the given HMM weights, the features to decode and how
* many classes to predict. The output will contain a vector that contains a 1
* at the index of the predicted label.
*
* @param weights the HMM weights.
* @param features the features to predict on.
* @param featuresPerState the matrix containing the feature vectors,
* precomputed for each possible state in classes. The layout is that
* the same feature was computed n-times, so class 0 first, class 1
* next and so on and this is layed out in rows (Feature 1 | class 0,
* Feature 1 | class 1 ...). Feature 0 is only contained once,
* because it only had class zero as previous class.
* @param classes how many classes? 2 if binary.
* @return a n x m matrix where n is the number of featurevectors and m is the
* number of classes (in binary prediction this is just 1, 0 and 1 are
* the predicted labels at index 0 then).
*/
public static DoubleMatrix decode(DoubleMatrix weights,
DoubleMatrix features, DoubleMatrix featuresPerState, int classes) {
final int m = features.getRowCount();
int[][] backpointers = new int[m][classes];
double[][] scores = new double[m][classes];
// define the starting label as 0.
int prevLabel = 0;
double[] localScores = computeScores(classes, features.getRowVector(0),
weights);
int position = 0;
for (int currLabel = 0; currLabel < localScores.length; currLabel++) {
backpointers[position][currLabel] = prevLabel;
scores[position][currLabel] = localScores[currLabel];
}
// for each position in data
for (position = 1; position < m; position++) {
int i = position * classes - 1;
// for each possible previous label
for (int j = 0; j < classes; j++) {
prevLabel = j;
localScores = computeScores(classes,
featuresPerState.getRowVector(i + j), weights);
for (int currLabel = 0; currLabel < localScores.length; currLabel++) {
double score = localScores[currLabel]
+ scores[position - 1][prevLabel];
if (prevLabel == 0 || score > scores[position][currLabel]) {
backpointers[position][currLabel] = prevLabel;
scores[position][currLabel] = score;
}
}
}
}
int bestLabel = 0;
double bestScore = scores[m - 1][bestLabel];
for (int label = 1; label < scores[m - 1].length; label++) {
if (scores[m - 1][label] > bestScore) {
bestLabel = label;
bestScore = scores[m - 1][label];
}
}
DoubleMatrix outcome = new DenseDoubleMatrix(features.getRowCount(),
classes == 2 ? 1 : classes);
// follow the backpointers
for (position = m - 1; position >= 0; position--) {
DenseDoubleVector vec = null;
if (classes != 2) {
vec = new DenseDoubleVector(classes);
vec.set(bestLabel, 1);
} else {
vec = new DenseDoubleVector(1);
vec.set(0, bestLabel);
}
outcome.setRowVector(position, vec);
bestLabel = backpointers[position][bestLabel];
}
return outcome;
}
// compute the scores for a featurevector and its weighs and the number of
// classes
static double[] computeScores(int classes, DoubleVector features,
DoubleMatrix weights) {
double[] scores = new double[classes];
Iterator<DoubleVectorElement> iterateNonZero = features.iterateNonZero();
while (iterateNonZero.hasNext()) {
DoubleVectorElement next = iterateNonZero.next();
for (int i = 0; i < scores.length; i++) {
scores[i] += weights.get(i, next.getIndex());
}
}
return scores;
}
}
|
[
"thomas.jungblut@gmail.com"
] |
thomas.jungblut@gmail.com
|
eff53af905209c419533d10178ffacf321498a7c
|
20d7a12575ffa0b3b3095a83a16f6c0b6a02e133
|
/src/main/java/cn/gtmap/estateplat/server/model/login/Status.java
|
3b9a428d829010e1c1c7becefe89f38564db8cb4
|
[] |
no_license
|
MrLiJun88/estateplat-service
|
937e52cb81951e411a0bc4c8317d93a3455227f8
|
0ba27a9251ce2cd712efe76f8cbe0b769b970cc9
|
refs/heads/master
| 2022-12-07T13:32:32.727808
| 2020-08-13T04:07:12
| 2020-08-13T04:07:12
| 287,170,568
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,526
|
java
|
/**
* Copyright 2019 bejson.com
*/
package cn.gtmap.estateplat.server.model.login;
import java.util.Date;
/**
* Auto-generated: 2019-04-17 17:33:23
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
public class Status {
private String ErrorCode;
private String DepartmentName;
private String Sex;
private String PersonID;
private String ParentDepID;
private String ResultType;
private String Symbol;
private String TopMainDepartmentID;
private String MainDepartmentID;
private String Birthday;
private String LogonName;
private String MobilePhone;
private String DepartmentID;
private String SerialNO;
private String ErrorMessage;
private String PersonName;
public void setErrorCode(String ErrorCode) {
this.ErrorCode = ErrorCode;
}
public String getErrorCode() {
return ErrorCode;
}
public void setDepartmentName(String DepartmentName) {
this.DepartmentName = DepartmentName;
}
public String getDepartmentName() {
return DepartmentName;
}
public void setSex(String Sex) {
this.Sex = Sex;
}
public String getSex() {
return Sex;
}
public void setPersonID(String PersonID) {
this.PersonID = PersonID;
}
public String getPersonID() {
return PersonID;
}
public void setParentDepID(String ParentDepID) {
this.ParentDepID = ParentDepID;
}
public String getParentDepID() {
return ParentDepID;
}
public void setResultType(String ResultType) {
this.ResultType = ResultType;
}
public String getResultType() {
return ResultType;
}
public void setSymbol(String Symbol) {
this.Symbol = Symbol;
}
public String getSymbol() {
return Symbol;
}
public void setTopMainDepartmentID(String TopMainDepartmentID) {
this.TopMainDepartmentID = TopMainDepartmentID;
}
public String getTopMainDepartmentID() {
return TopMainDepartmentID;
}
public void setMainDepartmentID(String MainDepartmentID) {
this.MainDepartmentID = MainDepartmentID;
}
public String getMainDepartmentID() {
return MainDepartmentID;
}
public void setBirthday(String Birthday) {
this.Birthday = Birthday;
}
public String getBirthday() {
return Birthday;
}
public void setLogonName(String LogonName) {
this.LogonName = LogonName;
}
public String getLogonName() {
return LogonName;
}
public void setMobilePhone(String MobilePhone) {
this.MobilePhone = MobilePhone;
}
public String getMobilePhone() {
return MobilePhone;
}
public void setDepartmentID(String DepartmentID) {
this.DepartmentID = DepartmentID;
}
public String getDepartmentID() {
return DepartmentID;
}
public void setSerialNO(String SerialNO) {
this.SerialNO = SerialNO;
}
public String getSerialNO() {
return SerialNO;
}
public void setErrorMessage(String ErrorMessage) {
this.ErrorMessage = ErrorMessage;
}
public String getErrorMessage() {
return ErrorMessage;
}
public void setPersonName(String PersonName) {
this.PersonName = PersonName;
}
public String getPersonName() {
return PersonName;
}
}
|
[
"1424146780@qq.com"
] |
1424146780@qq.com
|
5668ae419e4dbbf983addc6d71be159599019870
|
e5d1ca5d3bb724a2c4b7add53d7ae464fa775fba
|
/sleuthkit/bindings/java/src/org/sleuthkit/datamodel/ContentVisitor.java
|
dd23f01f55cc6426fd90b46410a7e59deb90b43f
|
[
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] |
permissive
|
myselfanuj/OpenDF
|
6a64d663d08f74fa5b01e08d581a0b1271d22cbf
|
47b16f364ffd137ed300c8448f98f9d494003849
|
refs/heads/master
| 2020-08-11T06:57:24.768256
| 2019-10-11T20:09:28
| 2019-10-11T20:09:28
| 214,513,339
| 0
| 0
|
Apache-2.0
| 2019-10-11T19:22:46
| 2019-10-11T19:22:46
| null |
UTF-8
|
Java
| false
| false
| 4,252
|
java
|
/*
* Sleuth Kit Data Model
*
* Copyright 2011 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sleuthkit.datamodel;
/**
* Interface for implementing a visitor pattern on all Content implementations.
* Visitor implements an algorithm on the content object. The algorithm is
* completely decoupled from the content object. The visitor pattern emulates
* double dispatch mechanism. It allows to act differently depending on the
* instance type, without need to test what the actual type is. E.g. it allows
* for processing a Content object hierarchy without using instanceof
* statements. Generic type parameter T is a return type from the visit methods.
*
* @param <T> return type of visit methods
*/
public interface ContentVisitor<T> {
/**
* Act on (visit) a Directory content object
*
* @param d the directory to visit / act on
* @return result of the visit
*/
T visit(Directory d);
/**
* Act on (visit) a File content object
*
* @param f File to visit / act on
* @return result of the visit
*/
T visit(File f);
/**
* Act on (visit) a FileSystem content object
*
* @param fs file system to visit / act on
* @return result of the visit
*/
T visit(FileSystem fs);
/**
* Act on (visit) an Image content object
*
* @param i image to visit / act on
* @return result of the visit
*/
T visit(Image i);
/**
* Act on (visit) a Volume content object
*
* @param v volume to visit / act on
* @return result of the visit
*/
T visit(Volume v);
/**
* Act on (visit) a VolumeSystem content object
*
* @param vs volume system to visit / act on
* @return result of the visit
*/
T visit(VolumeSystem vs);
/**
* Act on (visit) a LayoutFile content object
*
* @param lf layout file to visit / act on
* @return result of the visit
*/
T visit(LayoutFile lf);
/**
* Act on (visit) a LayoutDirectory content object
*
* @param ld layout dir to visit / act on
* @return result of the visit
*/
T visit(VirtualDirectory ld);
/**
* Act on (visit) a DerivedFile content object
*
* @param lf local file to visit / act on
* @return result of the visit
*/
T visit(DerivedFile lf);
/**
* Act on (visit) a LocalFile content object
*
* @param df derived file to visit / act on
* @return result of the visit
*/
T visit(LocalFile df);
/**
* The default content visitor - quickest method for implementing a custom
* visitor. Every visit method delegates to the defaultVisit method, the
* only required method to be implemented. Then, implement the specific
* visit methods for the objects on which the algorithm needs to act
* differently.
*
* @param <T> generic type, signifies the object type to be returned from
* visit()
*/
static abstract public class Default<T> implements ContentVisitor<T> {
protected abstract T defaultVisit(Content c);
@Override
public T visit(Directory d) {
return defaultVisit(d);
}
@Override
public T visit(File f) {
return defaultVisit(f);
}
@Override
public T visit(FileSystem fs) {
return defaultVisit(fs);
}
@Override
public T visit(Image i) {
return defaultVisit(i);
}
@Override
public T visit(Volume v) {
return defaultVisit(v);
}
@Override
public T visit(VolumeSystem vs) {
return defaultVisit(vs);
}
@Override
public T visit(LayoutFile lf) {
return defaultVisit(lf);
}
@Override
public T visit(VirtualDirectory ld) {
return defaultVisit(ld);
}
@Override
public T visit(DerivedFile df) {
return defaultVisit(df);
}
@Override
public T visit(LocalFile lf) {
return defaultVisit(lf);
}
}
}
|
[
"agentmilindu@gmail.com"
] |
agentmilindu@gmail.com
|
e7df11463446daad9ebf6d3edfb8746ea78093b2
|
93583f3ede1ad2c37fd4b424b638674030eb4645
|
/event-manager/src/main/java/com/josedab/eventmanager/config/locale/AngularCookieLocaleResolver.java
|
d17d4f2e73fe944c277e8aef60d06cc95262008c
|
[
"MIT"
] |
permissive
|
josedab/yeoman-jhipster-examples
|
f5432c4b4abc60ff1c84b89fe1f5468d91bce95a
|
2bcb56b16d40f3a00cf1b633f7b2e52ae682e82e
|
refs/heads/master
| 2021-01-10T09:20:48.212746
| 2016-04-29T06:37:41
| 2016-04-29T06:37:41
| 49,115,964
| 0
| 0
| null | 2016-01-11T08:04:50
| 2016-01-06T05:58:54
|
Java
|
UTF-8
|
Java
| false
| false
| 3,552
|
java
|
package com.josedab.eventmanager.config.locale;
import org.springframework.context.i18n.LocaleContext;
import org.springframework.context.i18n.TimeZoneAwareLocaleContext;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
import org.springframework.web.util.WebUtils;
import java.util.Locale;
import java.util.TimeZone;
import javax.servlet.http.*;
/**
* Angular cookie saved the locale with a double quote (%22en%22).
* So the default CookieLocaleResolver#StringUtils.parseLocaleString(localePart)
* is not able to parse the locale.
*
* This class will check if a double quote has been added, if so it will remove it.
*/
public class AngularCookieLocaleResolver extends CookieLocaleResolver {
@Override
public Locale resolveLocale(HttpServletRequest request) {
parseLocaleCookieIfNecessary(request);
return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME);
}
@Override
public LocaleContext resolveLocaleContext(final HttpServletRequest request) {
parseLocaleCookieIfNecessary(request);
return new TimeZoneAwareLocaleContext() {
@Override
public Locale getLocale() {
return (Locale) request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME);
}
@Override
public TimeZone getTimeZone() {
return (TimeZone) request.getAttribute(TIME_ZONE_REQUEST_ATTRIBUTE_NAME);
}
};
}
@Override
public void addCookie(HttpServletResponse response, String cookieValue) {
// Mandatory cookie modification for angular to support the locale switching on the server side.
cookieValue = "%22" + cookieValue + "%22";
super.addCookie(response, cookieValue);
}
private void parseLocaleCookieIfNecessary(HttpServletRequest request) {
if (request.getAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME) == null) {
// Retrieve and parse cookie value.
Cookie cookie = WebUtils.getCookie(request, getCookieName());
Locale locale = null;
TimeZone timeZone = null;
if (cookie != null) {
String value = cookie.getValue();
// Remove the double quote
value = StringUtils.replace(value, "%22", "");
String localePart = value;
String timeZonePart = null;
int spaceIndex = localePart.indexOf(' ');
if (spaceIndex != -1) {
localePart = value.substring(0, spaceIndex);
timeZonePart = value.substring(spaceIndex + 1);
}
locale = (!"-".equals(localePart) ? StringUtils.parseLocaleString(localePart.replace('-', '_')) : null);
if (timeZonePart != null) {
timeZone = StringUtils.parseTimeZoneString(timeZonePart);
}
if (logger.isTraceEnabled()) {
logger.trace("Parsed cookie value [" + cookie.getValue() + "] into locale '" + locale +
"'" + (timeZone != null ? " and time zone '" + timeZone.getID() + "'" : ""));
}
}
request.setAttribute(LOCALE_REQUEST_ATTRIBUTE_NAME,
(locale != null ? locale: determineDefaultLocale(request)));
request.setAttribute(TIME_ZONE_REQUEST_ATTRIBUTE_NAME,
(timeZone != null ? timeZone : determineDefaultTimeZone(request)));
}
}
}
|
[
"jose@brandwatch.com"
] |
jose@brandwatch.com
|
fab32f6ecac87c20fc6821bd2c485f8f3cc7a40e
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/129/955/CWE190_Integer_Overflow__int_listen_tcp_multiply_52b.java
|
3a2692dfe25c71cd63e3ca446754892235b2856b
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,367
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_listen_tcp_multiply_52b.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-52b.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: listen_tcp Read data using a listening tcp connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an overflow before multiplying data by 2
* BadSink : If data is positive, multiply by 2, which can cause an overflow
* Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package
*
* */
public class CWE190_Integer_Overflow__int_listen_tcp_multiply_52b
{
public void badSink(int data ) throws Throwable
{
(new CWE190_Integer_Overflow__int_listen_tcp_multiply_52c()).badSink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int data ) throws Throwable
{
(new CWE190_Integer_Overflow__int_listen_tcp_multiply_52c()).goodG2BSink(data );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(int data ) throws Throwable
{
(new CWE190_Integer_Overflow__int_listen_tcp_multiply_52c()).goodB2GSink(data );
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
cdca50bf0c2669be9648f55d099ab71eef3af0b1
|
91e72ef337a34eb7e547fa96d99fca5a4a6dc89e
|
/subjects/commons-codec/results/evosuite/1564489333/0011/evosuite-tests/org/apache/commons/codec/binary/Base32_ESTest.java
|
5ef30569ba9b1758a55a43059408b9d80696e2c9
|
[] |
no_license
|
STAMP-project/descartes-amplification-experiments
|
deda5e2f1a122b9d365f7c76b74fb2d99634aad4
|
a5709fd78bbe8b4a4ae590ec50704dbf7881e882
|
refs/heads/master
| 2021-06-27T04:13:17.035471
| 2020-10-14T08:17:05
| 2020-10-14T08:17:05
| 169,711,716
| 0
| 0
| null | 2020-10-14T08:17:07
| 2019-02-08T09:32:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,856
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Jul 30 12:34:22 GMT 2019
*/
package org.apache.commons.codec.binary;
import org.junit.Test;
import static org.junit.Assert.*;
import org.apache.commons.codec.binary.Base32;
import org.apache.commons.codec.binary.BaseNCodec;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
public class Base32_ESTest extends Base32_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
Base32 base32_0 = new Base32((byte)17);
boolean boolean0 = base32_0.isInAlphabet((byte)0);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
Base32 base32_0 = new Base32(false, (byte)44);
assertEquals(76, BaseNCodec.MIME_CHUNK_SIZE);
}
@Test(timeout = 4000)
public void test02() throws Throwable {
Base32 base32_0 = new Base32(false);
assertEquals(64, BaseNCodec.PEM_CHUNK_SIZE);
}
@Test(timeout = 4000)
public void test03() throws Throwable {
byte[] byteArray0 = new byte[3];
Base32 base32_0 = new Base32((-2302), byteArray0, true, (byte)25);
assertEquals(76, BaseNCodec.MIME_CHUNK_SIZE);
}
@Test(timeout = 4000)
public void test04() throws Throwable {
Base32 base32_0 = new Base32((-2055), (byte[]) null);
assertEquals(64, BaseNCodec.PEM_CHUNK_SIZE);
}
@Test(timeout = 4000)
public void test05() throws Throwable {
Base32 base32_0 = new Base32(910);
assertEquals(64, BaseNCodec.PEM_CHUNK_SIZE);
}
@Test(timeout = 4000)
public void test06() throws Throwable {
Base32 base32_0 = new Base32((byte)17);
boolean boolean0 = base32_0.isInAlphabet((byte)125);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test07() throws Throwable {
byte[] byteArray0 = new byte[7];
Base32 base32_0 = new Base32(0, byteArray0, false);
boolean boolean0 = base32_0.isInAlphabet((byte)7);
assertFalse(boolean0);
}
@Test(timeout = 4000)
public void test08() throws Throwable {
byte[] byteArray0 = new byte[7];
Base32 base32_0 = new Base32(0, byteArray0, false);
boolean boolean0 = base32_0.isInAlphabet((byte)54);
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test09() throws Throwable {
Base32 base32_0 = new Base32((byte)123);
assertEquals(76, BaseNCodec.MIME_CHUNK_SIZE);
}
@Test(timeout = 4000)
public void test10() throws Throwable {
Base32 base32_0 = new Base32();
boolean boolean0 = base32_0.isInAlphabet((byte) (-121));
assertFalse(boolean0);
}
}
|
[
"oscarlvp@gmail.com"
] |
oscarlvp@gmail.com
|
1f17cb2c64bd3f00a885b227aa9f3a7cc54643d7
|
39b208bc5aed7ff144035a7a2c19ad032d49651f
|
/icardea-caremanager-ws/src/main/java/org/hl7/v3/XActRelationshipPatientTransport.java
|
590cc2b48989dbffa6cdb6976dd3a5b551ef2a8b
|
[] |
no_license
|
coderunner4/icardea
|
8f28864aaa7993dd71ac100f43a54af0b146133a
|
de50d91b8ede37acc6aaf48eea62bdda47710c4f
|
refs/heads/master
| 2021-01-10T13:04:54.315708
| 2013-02-27T13:27:24
| 2013-02-27T13:27:24
| 46,989,557
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,114
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2010.08.03 at 01:53:59 PM EEST
//
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
/**
* <p>Java class for x_ActRelationshipPatientTransport.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="x_ActRelationshipPatientTransport">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="ARR"/>
* <enumeration value="DEP"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum XActRelationshipPatientTransport {
ARR,
DEP;
public String value() {
return name();
}
public static XActRelationshipPatientTransport fromValue(String v) {
return valueOf(v);
}
}
|
[
"yildiraykabak@gmail.com"
] |
yildiraykabak@gmail.com
|
ceeae725b2d8905131f65ddbb943193f10ba64f2
|
3927258e502590626dd18034000e7cad5bb46af6
|
/aws-java-sdk-support/src/main/java/com/amazonaws/services/support/model/transform/DescribeAttachmentRequestMarshaller.java
|
fb338707abee4897d7a45d85db64595a90db440d
|
[
"JSON",
"Apache-2.0"
] |
permissive
|
gauravbrills/aws-sdk-java
|
332f9cf1e357c3d889f753b348eb8d774a30f07c
|
09d91b14bfd6fbc81a04763d679e0f94377e9007
|
refs/heads/master
| 2021-01-21T18:15:06.060014
| 2016-06-11T18:12:40
| 2016-06-11T18:12:40
| 58,072,311
| 0
| 0
| null | 2016-05-04T17:52:28
| 2016-05-04T17:52:28
| null |
UTF-8
|
Java
| false
| false
| 3,053
|
java
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights
* Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.support.model.transform;
import java.io.ByteArrayInputStream;
import java.util.Collections;
import java.util.Map;
import java.util.List;
import java.util.regex.Pattern;
import com.amazonaws.AmazonClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.support.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.IdempotentUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;
/**
* DescribeAttachmentRequest Marshaller
*/
public class DescribeAttachmentRequestMarshaller
implements
Marshaller<Request<DescribeAttachmentRequest>, DescribeAttachmentRequest> {
public Request<DescribeAttachmentRequest> marshall(
DescribeAttachmentRequest describeAttachmentRequest) {
if (describeAttachmentRequest == null) {
throw new AmazonClientException(
"Invalid argument passed to marshall(...)");
}
Request<DescribeAttachmentRequest> request = new DefaultRequest<DescribeAttachmentRequest>(
describeAttachmentRequest, "AWSSupport");
request.addHeader("X-Amz-Target",
"AWSSupport_20130415.DescribeAttachment");
request.setHttpMethod(HttpMethodName.POST);
request.setResourcePath("");
try {
final StructuredJsonGenerator jsonGenerator = SdkJsonProtocolFactory
.createWriter(false, "1.1");
jsonGenerator.writeStartObject();
if (describeAttachmentRequest.getAttachmentId() != null) {
jsonGenerator.writeFieldName("attachmentId").writeValue(
describeAttachmentRequest.getAttachmentId());
}
jsonGenerator.writeEndObject();
byte[] content = jsonGenerator.getBytes();
request.setContent(new ByteArrayInputStream(content));
request.addHeader("Content-Length",
Integer.toString(content.length));
request.addHeader("Content-Type", jsonGenerator.getContentType());
} catch (Throwable t) {
throw new AmazonClientException(
"Unable to marshall request to JSON: " + t.getMessage(), t);
}
return request;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
be325259fa3e24ec137d08ebab031c6e5c6668b0
|
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
|
/bin/ext-accelerator/chinaacceleratorservices/src/de/hybris/platform/chinaaccelerator/services/jalo/cms/components/NavigationBarWithImageComponent.java
|
5fa064f9f0ea59737c30ba6b8de93698675519e3
|
[] |
no_license
|
lun130220/hybris
|
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
|
03c074ea76779f96f2db7efcdaa0b0538d1ce917
|
refs/heads/master
| 2021-05-14T01:48:42.351698
| 2018-01-07T07:21:53
| 2018-01-07T07:21:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,350
|
java
|
/*
*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*/
package de.hybris.platform.chinaaccelerator.services.jalo.cms.components;
import de.hybris.platform.jalo.Item;
import de.hybris.platform.jalo.JaloBusinessException;
import de.hybris.platform.jalo.SessionContext;
import de.hybris.platform.jalo.type.ComposedType;
import org.apache.log4j.Logger;
public class NavigationBarWithImageComponent extends GeneratedNavigationBarWithImageComponent
{
@SuppressWarnings("unused")
private final static Logger LOG = Logger.getLogger(NavigationBarWithImageComponent.class.getName());
@Override
protected Item createItem(final SessionContext ctx, final ComposedType type, final ItemAttributeMap allAttributes)
throws JaloBusinessException
{
// business code placed here will be executed before the item is created
// then create the item
final Item item = super.createItem(ctx, type, allAttributes);
// business code placed here will be executed after the item was created
// and return the item
return item;
}
}
|
[
"lun130220@gamil.com"
] |
lun130220@gamil.com
|
f589f9011b9c3adf00ca698f0314cd2796309ee2
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/123/760/CWE113_HTTP_Response_Splitting__console_readLine_setHeaderServlet_53b.java
|
32210c47753ec946ad5047e5854d0bf4910e0dd2
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,651
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__console_readLine_setHeaderServlet_53b.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-53b.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: console_readLine Read data from the console using readLine()
* GoodSource: A hardcoded string
* Sinks: setHeaderServlet
* GoodSink: URLEncode input
* BadSink : querystring to setHeader()
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
import javax.servlet.http.*;
public class CWE113_HTTP_Response_Splitting__console_readLine_setHeaderServlet_53b
{
public void badSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__console_readLine_setHeaderServlet_53c()).badSink(data , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__console_readLine_setHeaderServlet_53c()).goodG2BSink(data , request, response);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__console_readLine_setHeaderServlet_53c()).goodB2GSink(data , request, response);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
12d9e3ee8daa67e54dbf25d0cae6b3359712285d
|
fd3e4cc20a58c2a46892b3a38b96d5e2303266d8
|
/src/main/java/com/autonavi/tbt/ad.java
|
ca1a6abd53389899688f7f7634cf26875174709c
|
[] |
no_license
|
makewheels/AnalyzeBusDex
|
42ef50f575779b66bd659c096c57f94dca809050
|
3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a
|
refs/heads/master
| 2021-10-22T07:16:40.087139
| 2019-03-09T03:11:05
| 2019-03-09T03:11:05
| 173,123,231
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package com.autonavi.tbt;
import p054u.aly.bi_常量类;
/* compiled from: Util */
class ad {
ad() {
}
/* renamed from: a */
static String m4667a(String str) {
if (str == null) {
return null;
}
String b = C0624m.m4913b(str.getBytes());
return ((char) ((b.length() % 26) + 65)) + b;
}
/* renamed from: b */
static String m4668b(String str) {
if (str.length() < 2) {
return bi_常量类.f6358b_空串;
}
return C0624m.m4909a(str.substring(1));
}
}
|
[
"spring@qbserver.cn"
] |
spring@qbserver.cn
|
c75807a483ffd2123944ea6e422f03c34b9252df
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/ReactiveX--RxJava/4017e26b22b4905c241d1f3b13e9387bab5ccbd8/after/ObservableScalarXMap.java
|
9164474510f12fc7a30ecd2cebe11d16ea98af62
|
[] |
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
| 7,672
|
java
|
/**
* Copyright 2016 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package io.reactivex.internal.operators.observable;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import io.reactivex.*;
import io.reactivex.exceptions.Exceptions;
import io.reactivex.functions.Function;
import io.reactivex.internal.disposables.EmptyDisposable;
import io.reactivex.internal.functions.ObjectHelper;
import io.reactivex.internal.fuseable.QueueDisposable;
import io.reactivex.plugins.RxJavaPlugins;
/**
* Utility classes to work with scalar-sourced XMap operators (where X == { flat, concat, switch }).
*/
public enum ObservableScalarXMap {
;
/**
* Tries to subscribe to a possibly Callable source's mapped ObservableSource.
* @param <T> the input value type
* @param <R> the output value type
* @param source the source ObservableSource
* @param observer the subscriber
* @param mapper the function mapping a scalar value into an ObservableSource
* @return true if successful, false if the caller should continue with the regular path.
*/
@SuppressWarnings("unchecked")
public static <T, R> boolean tryScalarXMapSubscribe(ObservableSource<T> source,
Observer<? super R> observer,
Function<? super T, ? extends ObservableSource<? extends R>> mapper) {
if (source instanceof Callable) {
T t;
try {
t = ((Callable<T>)source).call();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(ex, observer);
return true;
}
if (t == null) {
EmptyDisposable.complete(observer);
return true;
}
ObservableSource<? extends R> r;
try {
r = ObjectHelper.requireNonNull(mapper.apply(t), "The mapper returned a null ObservableSource");
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(ex, observer);
return true;
}
if (r instanceof Callable) {
R u;
try {
u = ((Callable<R>)r).call();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(ex, observer);
return true;
}
if (u == null) {
EmptyDisposable.complete(observer);
return true;
}
observer.onSubscribe(new ScalarDisposable<R>(observer, u));
} else {
r.subscribe(observer);
}
return true;
}
return false;
}
/**
* Maps a scalar value into an Observable and emits its values.
*
* @param <T> the scalar value type
* @param <U> the output value type
* @param value the scalar value to map
* @param mapper the function that gets the scalar value and should return
* an ObservableSource that gets streamed
* @return the new Observable instance
*/
public static <T, U> Observable<U> scalarXMap(T value,
Function<? super T, ? extends ObservableSource<? extends U>> mapper) {
return RxJavaPlugins.onAssembly(new ScalarXMapObservable<T, U>(value, mapper));
}
/**
* Maps a scalar value to an ObservableSource and subscribes to it.
*
* @param <T> the scalar value type
* @param <R> the mapped ObservableSource's element type.
*/
static final class ScalarXMapObservable<T, R> extends Observable<R> {
final T value;
final Function<? super T, ? extends ObservableSource<? extends R>> mapper;
ScalarXMapObservable(T value,
Function<? super T, ? extends ObservableSource<? extends R>> mapper) {
this.value = value;
this.mapper = mapper;
}
@SuppressWarnings("unchecked")
@Override
public void subscribeActual(Observer<? super R> s) {
ObservableSource<? extends R> other;
try {
other = ObjectHelper.requireNonNull(mapper.apply(value), "The mapper returned a null ObservableSource");
} catch (Throwable e) {
EmptyDisposable.error(e, s);
return;
}
if (other instanceof Callable) {
R u;
try {
u = ((Callable<R>)other).call();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(ex, s);
return;
}
if (u == null) {
EmptyDisposable.complete(s);
return;
}
ScalarDisposable<R> sd = new ScalarDisposable<R>(s, u);
s.onSubscribe(sd);
sd.run();
} else {
other.subscribe(s);
}
}
}
/**
* Represents a Disposable that signals one onNext followed by an onComplete.
*
* @param <T> the value type
*/
public static final class ScalarDisposable<T>
extends AtomicInteger
implements QueueDisposable<T>, Runnable {
private static final long serialVersionUID = 3880992722410194083L;
final Observer<? super T> observer;
final T value;
static final int START = 0;
static final int ON_NEXT = 1;
static final int ON_COMPLETE = 2;
public ScalarDisposable(Observer<? super T> observer, T value) {
this.observer = observer;
this.value = value;
}
@Override
public boolean offer(T value) {
throw new UnsupportedOperationException("Should not be called!");
}
@Override
public boolean offer(T v1, T v2) {
throw new UnsupportedOperationException("Should not be called!");
}
@Override
public T poll() throws Exception {
if (get() == START) {
lazySet(ON_COMPLETE);
return value;
}
return null;
}
@Override
public boolean isEmpty() {
return get() != START;
}
@Override
public void clear() {
lazySet(ON_COMPLETE);
}
@Override
public void dispose() {
set(ON_COMPLETE);
}
@Override
public boolean isDisposed() {
return get() == ON_COMPLETE;
}
@Override
public int requestFusion(int mode) {
return mode & SYNC;
}
@Override
public void run() {
if (get() == START && compareAndSet(START, ON_NEXT)) {
observer.onNext(value);
if (get() == ON_NEXT) {
lazySet(ON_COMPLETE);
observer.onComplete();
}
}
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
a5fc3325963a3b1df338d87f2ee4ad32a616fab4
|
aa56c0682fb25859ff54ab638bf73e34cfbe820b
|
/Bomber/src/main2/server/MainBomberServer.java
|
4f2a1a7090bcd599f945b3b5efbc550a543ff50a
|
[
"MIT"
] |
permissive
|
G43riko/Java
|
11f7211abbc2bc74b46f33996c764f3cad88cc27
|
de5066a5fa360b4d242038ed9b9ec83bffa786d2
|
refs/heads/master
| 2020-06-02T14:05:08.814428
| 2016-01-24T17:17:49
| 2016-01-24T17:17:49
| 27,553,989
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 445
|
java
|
package main2.server;
import main2.server.core.CoreEngine;
public class MainBomberServer {
public static final int WIDTH = 600;
public static final int HEIGHT = 600;
public static final int FPS = 60;
public static final boolean FULLSCREEN = false;
public static final String TITLE = "Bomberman";
public static void main(String[] args) {
CoreEngine game = new CoreEngine(FPS,new Bomberman());
game.start();
}
}
|
[
"Gabriel@Gabriel-PC"
] |
Gabriel@Gabriel-PC
|
9ba8e5770bda493bf146db8bd978d6e3fbeccf51
|
b377c48997209a073a23b4e7079596a251c4052d
|
/Android App Samples Completely Learning/第10章/西洋棋伺服器/ServerAgent.java
|
1e0c734a2bc2647e7287d1f13251419ada710bad
|
[] |
no_license
|
bopopescu/Example-Codes-and-Learning-Tools
|
da14c567edb7a685dcde4b3473ca729217fe0f83
|
d5b2af4dc3fdcf63ba7dd8f9a5d394060b660d81
|
refs/heads/master
| 2021-05-28T03:24:24.776476
| 2014-09-11T15:10:11
| 2014-09-11T15:10:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,823
|
java
|
package com.bn.wlxq;
import java.io.*;
import java.net.*;
import static com.bn.wlxq.Server.*;
public class ServerAgent extends Thread
{
Socket sc;
DataInputStream din;
DataOutputStream dout;
boolean flag=true;
public ServerAgent(Socket sc,DataInputStream din,DataOutputStream dout)
{
this.sc=sc;
this.din=din;
this.dout=dout;
}
public void run()
{
while(flag)
{
try
{
String msg=din.readUTF();
System.out.println(msg);
if(msg.startsWith("<#MOVE#>"))
{
player1.dout.writeUTF(msg);
player2.dout.writeUTF(msg);
ServerAgent next=null;
if(currPlayer==player1)
{
next=player2;
}
else
{
next=player1;
}
next.dout.writeUTF("<#PERMISIION#>");
currPlayer=next;
}
else if(msg.startsWith("<#FINISH#>"))
{
player1.dout.writeUTF(msg);
player2.dout.writeUTF(msg);
player1.flag=false;
player2.flag=false;
player1.dout.close();
player1.din.close();
player1.sc.close();
player2.dout.close();
player2.din.close();
player2.sc.close();
Server.count=0;
player1=null;
player2=null;
currPlayer=null;
}
else if(msg.startsWith("<#EXIT#>"))
{
player1.dout.writeUTF(msg);
player2.dout.writeUTF(msg);
player1.flag=false;
player2.flag=false;
player1.dout.close();
player1.din.close();
player1.sc.close();
player2.dout.close();
player2.din.close();
player2.sc.close();
Server.count=0;
player1=null;
player2=null;
currPlayer=null;
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
}
|
[
"robin_lan2003@yahoo.com.tw"
] |
robin_lan2003@yahoo.com.tw
|
7e7cbbcb9ee7d7d48e64bc3728c69e05989b8c45
|
ab3eccd0be02fb3ad95b02d5b11687050a147bce
|
/apis/mapbox-gl/out/src/main/java/js/browser/NotificationPermissionCallback.java
|
3bee974ee01666388642b285af515be96c67da54
|
[] |
no_license
|
ibaca/typescript2java
|
263fd104a9792e7be2a20ab95b016ad694a054fe
|
0b71b8a3a4c43df1562881f0816509ca4dafbd7e
|
refs/heads/master
| 2021-04-27T10:43:14.101736
| 2018-02-23T11:37:16
| 2018-02-23T11:37:18
| 122,543,398
| 0
| 0
| null | 2018-02-22T22:33:30
| 2018-02-22T22:33:29
| null |
UTF-8
|
Java
| false
| false
| 431
|
java
|
package js.browser;
import jsinterop.annotations.JsFunction;
/**
* source type: NotificationPermissionCallback
* flags: Object (32768)
* declared in: tsd/browser/lib.es6.d.ts at pos 746116
* *** changed to class to reflect the possible DTO use of this type ***
*/
@JsFunction
public interface NotificationPermissionCallback{
/**
* tsd/browser/lib.es6.d.ts@746164
*/
void call(String permission);
}
|
[
"ignacio@bacamt.com"
] |
ignacio@bacamt.com
|
1b2484af51334f18011b6785f4fca25d68c6037f
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/com/google/android/instantapps/common/p217e/bg.java
|
d9863b335741d8ef5c0262c9b6fb1bfe4f99463b
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,588
|
java
|
package com.google.android.instantapps.common.p217e;
import com.google.android.gms.phenotype.C5550i;
import com.google.android.gms.phenotype.C5551j;
import com.google.android.gms.phenotype.C5560s;
import com.google.android.gms.phenotype.C5561t;
import com.google.android.gms.phenotype.C5562u;
import com.google.android.gms.phenotype.C5563v;
import com.google.android.instantapps.common.C5804k;
public final class bg {
public static final C5804k f29097a = new C5804k("SafePhenotypeFlag");
public final C5551j f29098b;
public bg(String str) {
this(new C5551j(str));
}
bg(C5551j c5551j) {
this.f29098b = c5551j;
}
public final bg m27118a(String str) {
C5551j c5551j = this.f29098b;
return new bg(new C5551j(c5551j.f28460a, c5551j.f28461b, c5551j.f28462c, str, c5551j.f28464e, c5551j.f28465f));
}
public final bf m27115a(String str, long j) {
return bg.m27112a(new C5560s(this.f29098b, str, Long.valueOf(j)), str, Long.valueOf(j));
}
public final bf m27117a(String str, boolean z) {
return bg.m27112a(new C5562u(this.f29098b, str, Boolean.valueOf(z)), str, Boolean.valueOf(z));
}
public final bf m27114a(String str, int i) {
return bg.m27112a(new C5561t(this.f29098b, str, Integer.valueOf(i)), str, Integer.valueOf(i));
}
public final bf m27116a(String str, String str2) {
return bg.m27112a(new C5563v(this.f29098b, str, str2), str, str2);
}
static bf m27112a(C5550i c5550i, String str, Object obj) {
return new bi(obj, c5550i, str);
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
1050a8ac40545548fe3bdbe5d81561ed21011eab
|
0b9927aded7ce8dc60e59b7c8791585e03bd03ac
|
/src/main/java/com/study/mapper/ZhRentContractMapper.java
|
6e322fcff89804f674a2e1676694dd9f5ee0dd2a
|
[] |
no_license
|
youthynf/family_service_platform
|
9ea31efee453c29db1416a1f132fd6e4b113f45b
|
4c8a9c3d138aa16666f9481431093360e1e57712
|
refs/heads/main
| 2023-04-01T12:20:51.087598
| 2021-04-04T07:23:12
| 2021-04-04T07:23:12
| 351,987,981
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 293
|
java
|
package com.study.mapper;
import com.study.bean.ZhRentContract;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 租赁合同 Mapper 接口
* </p>
*
* @author lian
* @since 2021-03-27
*/
public interface ZhRentContractMapper extends BaseMapper<ZhRentContract> {
}
|
[
"940436475@qq.com"
] |
940436475@qq.com
|
d17240c1fb83ef75c0425058856af8ac8d4b80e8
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_8f795d0f7b6fb077ce76a68cc2a547cd774a6d46/TranslatorComponent/17_8f795d0f7b6fb077ce76a68cc2a547cd774a6d46_TranslatorComponent_s.java
|
e20fb5b8937d543be15a390cc0d189c49fa0ee38
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,974
|
java
|
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*/
package org.teiid.rhq.plugin;
import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.deployers.spi.management.ManagementView;
import org.jboss.managed.api.ComponentType;
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedComponent;
import org.jboss.managed.api.ManagedProperty;
import org.jboss.metatype.api.types.MetaType;
import org.jboss.metatype.api.values.MetaValue;
import org.jboss.metatype.api.values.MetaValueFactory;
import org.jboss.profileservice.spi.NoSuchDeploymentException;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertyList;
import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.resource.CreateResourceStatus;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pluginapi.inventory.CreateResourceReport;
import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.teiid.rhq.comm.ConnectionConstants;
import org.teiid.rhq.plugin.util.PluginConstants;
import org.teiid.rhq.plugin.util.ProfileServiceUtil;
/**
* Component class for the MetaMatrix Host Controller process.
*
*/
public class TranslatorComponent extends Facet {
private final Log LOG = LogFactory.getLog(TranslatorComponent.class);
public static interface Config {
String COMPONENT_TYPE = "componentType";
String COMPONENT_SUBTYPE = "componentSubtype";
String COMPONENT_NAME = "componentName";
String TEMPLATE_NAME = "template-name";
String RESOURCE_NAME = "resourceName";
}
/*
* (non-Javadoc)
*
* @seeorg.teiid.rhq.plugin.Facet#start(org.rhq.core.pluginapi.inventory.
* ResourceContext)
*/
@Override
public void start(ResourceContext context) {
this.setComponentName(context.getPluginConfiguration().getSimpleValue(
"name", null));
this.resourceConfiguration=context.getPluginConfiguration();
super.start(context);
}
/**
* @see org.teiid.rhq.plugin.Facet#getComponentType()
* @since 1.0
*/
@Override
String getComponentType() {
return PluginConstants.ComponentType.Translator.NAME;
}
/**
* The plugin container will call this method when your resource component
* has been scheduled to collect some measurements now. It is within this
* method that you actually talk to the managed resource and collect the
* measurement data that is has emitted.
*
* @see MeasurementFacet#getValues(MeasurementReport, Set)
*/
public void getValues(MeasurementReport report,
Set<MeasurementScheduleRequest> requests) {
for (MeasurementScheduleRequest request : requests) {
String name = request.getName();
// TODO: based on the request information, you must collect the
// requested measurement(s)
// you can use the name of the measurement to determine what you
// actually need to collect
try {
Number value = new Integer(1); // dummy measurement value -
// this should come from the
// managed resource
report.addData(new MeasurementDataNumeric(request, value
.doubleValue()));
} catch (Exception e) {
LOG.error("Failed to obtain measurement [" + name //$NON-NLS-1$
+ "]. Cause: " + e); //$NON-NLS-1$
}
}
return;
}
protected void setOperationArguments(String name,
Configuration configuration, Map argumentMap) {
if (name
.equals(ConnectionConstants.ComponentType.Operation.GET_PROPERTIES)) {
String key = ConnectionConstants.IDENTIFIER;
argumentMap.put(key, getComponentIdentifier());
}
}
/* (non-Javadoc)
* @see org.teiid.rhq.plugin.Facet#loadResourceConfiguration()
*/
@Override
public Configuration loadResourceConfiguration() {
ManagedComponent translator = null;
try {
translator = ProfileServiceUtil
.getManagedComponent(new ComponentType(
PluginConstants.ComponentType.Translator.TYPE,
PluginConstants.ComponentType.Translator.SUBTYPE), this.name);
} catch (NamingException e) {
final String msg = "NamingException in loadResourceConfiguration(): " + e.getExplanation(); //$NON-NLS-1$
LOG.error(msg, e);
} catch (Exception e) {
final String msg = "Exception in loadResourceConfiguration(): " + e.getMessage(); //$NON-NLS-1$
LOG.error(msg, e);
}
String translatorName = ProfileServiceUtil.getSimpleValue(
translator, "name", String.class);
Configuration c = resourceConfiguration;
PropertyList list = new PropertyList("translatorList");
PropertyMap propMap = null;
c.put(list);
// First get translator specific properties
ManagedProperty translatorProps = translator
.getProperty("translator-property");
getTranslatorValues(translatorProps.getValue(), propMap, list);
// Now get common properties
c.put(new PropertySimple("name", translatorName));
c.put(new PropertySimple("execution-factory-class",
ProfileServiceUtil.getSimpleValue(translator,
"execution-factory-class", String.class)));
c.put(new PropertySimple("immutable", ProfileServiceUtil
.getSimpleValue(translator, "immutable", Boolean.class)));
c.put(new PropertySimple("xa-capable", ProfileServiceUtil
.getSimpleValue(translator, "xa-capable", Boolean.class)));
c.put(new PropertySimple("exception-on-max-rows",
ProfileServiceUtil.getSimpleValue(translator,
"exception-on-max-rows", Boolean.class)));
c.put(new PropertySimple("max-result-rows", ProfileServiceUtil
.getSimpleValue(translator, "max-result-rows",
Integer.class)));
c.put(new PropertySimple("template-name", ProfileServiceUtil
.getSimpleValue(translator, "template-name",
String.class)));
return c;
}
public static <T> void getTranslatorValues(MetaValue pValue,
PropertyMap map, PropertyList list) {
MetaType metaType = pValue.getMetaType();
Map<String, T> unwrappedvalue = null;
if (metaType.isComposite()) {
unwrappedvalue = (Map<String, T>) MetaValueFactory
.getInstance().unwrap(pValue);
for (String key : unwrappedvalue.keySet()) {
map = new PropertyMap("translator-properties");
map.put(new PropertySimple("name", key));
map.put(new PropertySimple("value", unwrappedvalue.get(key)));
map.put(new PropertySimple("description", "Custom property"));
list.add(map);
}
} else {
throw new IllegalStateException(pValue + " is not a Composite type");
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a33ee07c0b2479a63fffdae3d8622cfdc65e0a2d
|
6431fff08daae6ab179f356a26702cdbdd473237
|
/app/src/main/java/com/beini/bind/EventListenerManager.java
|
a272b5f61adb03403b8bd56d4c41d28075536267
|
[] |
no_license
|
hwhVm/FunBox
|
0d7d0c908705a5b1dd87f1450ae0661c85cfa727
|
5d46b769525ca5eb66252d31d891ac2872039030
|
refs/heads/master
| 2021-09-06T20:27:58.358071
| 2018-02-11T06:12:59
| 2018-02-11T06:12:59
| 81,513,200
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,408
|
java
|
package com.beini.bind;
import android.text.TextUtils;
import android.view.View;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
/**
* Created by beini on 2017/2/9.
*/
final class EventListenerManager {
private final static long QUICK_EVENT_TIME_SPAN = 300;
private final static HashSet<String> AVOID_QUICK_EVENT_SET = new HashSet<>(2);
static {
AVOID_QUICK_EVENT_SET.add("onClick");
AVOID_QUICK_EVENT_SET.add("onItemClick");
}
private EventListenerManager() {
}
/**
* k1: viewInjectInfo
* k2: interface Type
* value: listener
*/
private final static DoubleKeyValueMap<ViewInfo, Class<?>, Object>
listenerCache = new DoubleKeyValueMap<>();
public static void addEventMethod(
//根据页面或view holder生成的ViewFinder
ViewFinder finder,
//根据当前注解ID生成的ViewInfo
ViewInfo info,
//注解对象
Event event,
//页面或view holder对象
Object handler,
//当前注解方法
Method method) {
try {
View view = finder.findViewByInfo(info);
if (view != null) {
// 注解中定义的接口,比如Event注解默认的接口为View.OnClickListener
Class<?> listenerType = event.type();
// 默认为空,注解接口对应的Set方法,比如setOnClickListener方法
String listenerSetter = event.setter();
if (TextUtils.isEmpty(listenerSetter)) {
listenerSetter = "set" + listenerType.getSimpleName();
}
String methodName = event.method();
boolean addNewMethod = false;
/*
根据View的ID和当前的接口类型获取已经缓存的接口实例对象,
比如根据View.id和View.OnClickListener.class两个键获取这个View的OnClickListener对象
*/
Object listener = listenerCache.get(info, listenerType);
DynamicHandler dynamicHandler = null;
/*
如果接口实例对象不为空
获取接口对象对应的动态代理对象
如果动态代理对象的handler和当前handler相同
则为动态代理对象添加代理方法
*/
if (listener != null) {
dynamicHandler = (DynamicHandler) Proxy.getInvocationHandler(listener);
addNewMethod = handler.equals(dynamicHandler.getHandler());
if (addNewMethod) {
dynamicHandler.addMethod(methodName, method);
}
}
// 如果还没有注册此代理
if (!addNewMethod) {
dynamicHandler = new DynamicHandler(handler);
dynamicHandler.addMethod(methodName, method);
// 生成的代理对象实例,比如View.OnClickListener的实例对象
listener = Proxy.newProxyInstance(
listenerType.getClassLoader(),
new Class<?>[]{listenerType},
dynamicHandler);
listenerCache.put(info, listenerType, listener);
}
Method setEventListenerMethod = view.getClass().getMethod(listenerSetter, listenerType);
setEventListenerMethod.invoke(view, listener);
}
} catch (Throwable ex) {
// LogUtil.e(ex.getMessage(), ex);
}
}
public static class DynamicHandler implements InvocationHandler {
// 存放代理对象,比如Fragment或view holder
private WeakReference<Object> handlerRef;
// 存放代理方法
private final HashMap<String, Method> methodMap = new HashMap<String, Method>(1);
private static long lastClickTime = 0;
public DynamicHandler(Object handler) {
this.handlerRef = new WeakReference<Object>(handler);
}
public void addMethod(String name, Method method) {
methodMap.put(name, method);
}
public Object getHandler() {
return handlerRef.get();
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Object handler = handlerRef.get();
if (handler != null) {
String eventMethod = method.getName();
if ("toString".equals(eventMethod)) {
return DynamicHandler.class.getSimpleName();
}
method = methodMap.get(eventMethod);
if (method == null && methodMap.size() == 1) {
for (Map.Entry<String, Method> entry : methodMap.entrySet()) {
if (TextUtils.isEmpty(entry.getKey())) {
method = entry.getValue();
}
break;
}
}
if (method != null) {
if (AVOID_QUICK_EVENT_SET.contains(eventMethod)) {
long timeSpan = System.currentTimeMillis() - lastClickTime;
if (timeSpan < QUICK_EVENT_TIME_SPAN) {
// LogUtil.d("onClick cancelled: " + timeSpan);
return null;
}
lastClickTime = System.currentTimeMillis();
}
try {
return method.invoke(handler, args);
} catch (Throwable ex) {
throw new RuntimeException("invoke method error:" +
handler.getClass().getName() + "#" + method.getName(), ex);
}
} else {
// LogUtil.w("method not impl: " + eventMethod + "(" + handler.getClass().getSimpleName() + ")");
}
}
return null;
}
}
}
|
[
"874140704@qq.com"
] |
874140704@qq.com
|
82a9d83d16d87a91c96db64ed29029796f4053fd
|
43ea91f3ca050380e4c163129e92b771d7bf144a
|
/services/mpc/src/main/java/com/huaweicloud/sdk/mpc/v1/model/CreateAnimatedGraphicsTaskResponse.java
|
69f9710a7232b77e4f121a26dca6531aecb056ab
|
[
"Apache-2.0"
] |
permissive
|
wxgsdwl/huaweicloud-sdk-java-v3
|
660602ca08f32dc897d3770995b496a82a1cc72d
|
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
|
refs/heads/master
| 2023-02-27T14:20:54.774327
| 2021-02-07T11:48:35
| 2021-02-07T11:48:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,897
|
java
|
package com.huaweicloud.sdk.mpc.v1.model;
import com.huaweicloud.sdk.core.SdkResponse;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.mpc.v1.model.MetaData;
import com.huaweicloud.sdk.mpc.v1.model.ObsObjInfo;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Response Object
*/
public class CreateAnimatedGraphicsTaskResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="task_id")
private String taskId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="status")
private String status;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="create_time")
private String createTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="output")
private ObsObjInfo output = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="output_file_name")
private String outputFileName;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="description")
private String description;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="metadata")
private MetaData metadata = null;
public CreateAnimatedGraphicsTaskResponse withTaskId(String taskId) {
this.taskId = taskId;
return this;
}
/**
* 任务ID
* @return taskId
*/
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public CreateAnimatedGraphicsTaskResponse withStatus(String status) {
this.status = status;
return this;
}
/**
* 任务状态
* @return status
*/
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public CreateAnimatedGraphicsTaskResponse withCreateTime(String createTime) {
this.createTime = createTime;
return this;
}
/**
* 任务创建时间
* @return createTime
*/
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public CreateAnimatedGraphicsTaskResponse withOutput(ObsObjInfo output) {
this.output = output;
return this;
}
public CreateAnimatedGraphicsTaskResponse withOutput(Consumer<ObsObjInfo> outputSetter) {
if(this.output == null ){
this.output = new ObsObjInfo();
outputSetter.accept(this.output);
}
return this;
}
/**
* Get output
* @return output
*/
public ObsObjInfo getOutput() {
return output;
}
public void setOutput(ObsObjInfo output) {
this.output = output;
}
public CreateAnimatedGraphicsTaskResponse withOutputFileName(String outputFileName) {
this.outputFileName = outputFileName;
return this;
}
/**
* 解析文件名称
* @return outputFileName
*/
public String getOutputFileName() {
return outputFileName;
}
public void setOutputFileName(String outputFileName) {
this.outputFileName = outputFileName;
}
public CreateAnimatedGraphicsTaskResponse withDescription(String description) {
this.description = description;
return this;
}
/**
* 任务描述,如当任务异常时,此字段为异常的具体信息
* @return description
*/
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public CreateAnimatedGraphicsTaskResponse withMetadata(MetaData metadata) {
this.metadata = metadata;
return this;
}
public CreateAnimatedGraphicsTaskResponse withMetadata(Consumer<MetaData> metadataSetter) {
if(this.metadata == null ){
this.metadata = new MetaData();
metadataSetter.accept(this.metadata);
}
return this;
}
/**
* Get metadata
* @return metadata
*/
public MetaData getMetadata() {
return metadata;
}
public void setMetadata(MetaData metadata) {
this.metadata = metadata;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateAnimatedGraphicsTaskResponse createAnimatedGraphicsTaskResponse = (CreateAnimatedGraphicsTaskResponse) o;
return Objects.equals(this.taskId, createAnimatedGraphicsTaskResponse.taskId) &&
Objects.equals(this.status, createAnimatedGraphicsTaskResponse.status) &&
Objects.equals(this.createTime, createAnimatedGraphicsTaskResponse.createTime) &&
Objects.equals(this.output, createAnimatedGraphicsTaskResponse.output) &&
Objects.equals(this.outputFileName, createAnimatedGraphicsTaskResponse.outputFileName) &&
Objects.equals(this.description, createAnimatedGraphicsTaskResponse.description) &&
Objects.equals(this.metadata, createAnimatedGraphicsTaskResponse.metadata);
}
@Override
public int hashCode() {
return Objects.hash(taskId, status, createTime, output, outputFileName, description, metadata);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateAnimatedGraphicsTaskResponse {\n");
sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" createTime: ").append(toIndentedString(createTime)).append("\n");
sb.append(" output: ").append(toIndentedString(output)).append("\n");
sb.append(" outputFileName: ").append(toIndentedString(outputFileName)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
0dd887c4c39590238d95fee30487d83f4e8aa844
|
b48ff578886f5bd5aa9fc8ec71a917ea89d12cc5
|
/spcselling-entity/entity-user/src/main/java/com/spcs/entity/user/UserDetails.java
|
b8f494abd5b9b0e469a186c8fbd6bae9a112a66e
|
[] |
no_license
|
xinxiamu/ymu-special-selling
|
633795955a0326610600599d3475d80d977dc0b3
|
154349631cd57536e32d7c325aadcd16347ece00
|
refs/heads/master
| 2021-01-19T23:49:40.060726
| 2018-05-13T07:04:10
| 2018-05-13T07:04:10
| 89,035,643
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,971
|
java
|
package com.spcs.entity.user;
import com.spcs.entity.constants.UserSexType;
import javax.persistence.*;
import java.util.Date;
/**
* 用户详细信息表。
*/
@Entity
@Table(indexes = {
// 非唯一索引。
@Index(columnList = "age")
})
public class UserDetails extends BaseEntity {
private static final long serialVersionUID = -1384159351138305138L;
/**
* 用户真实姓名。
*/
@Column(length = 80)
private String realName;
/**
* 性别。
*/
@Column(length = 20, nullable = false)
@Enumerated(EnumType.STRING)
private UserSexType userSexType;
/**
* 年龄。
*/
@Column(length = 3)
private Integer age;
/**
* 出生时间。
*/
@Column
@Temporal(TemporalType.TIMESTAMP)
private Date bornTime;
/**
* 身份证号码。
*/
@Column(length = 100,unique = true)
private String idCardNum;
/**
* 常住地址。
*/
@Column(length = 150)
private String houseAddr;
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public UserSexType getUserSexType() {
return userSexType;
}
public void setUserSexType(UserSexType userSexType) {
this.userSexType = userSexType;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Date getBornTime() {
return bornTime;
}
public void setBornTime(Date bornTime) {
this.bornTime = bornTime;
}
public String getIdCardNum() {
return idCardNum;
}
public void setIdCardNum(String idCardNum) {
this.idCardNum = idCardNum;
}
public String getHouseAddr() {
return houseAddr;
}
public void setHouseAddr(String houseAddr) {
this.houseAddr = houseAddr;
}
}
|
[
"932852117@qq.com"
] |
932852117@qq.com
|
1c0412f7f2e307cc4efa8e4f1995caee1887631f
|
be7c20be8e396dfc15e6b3654e0e5ca04c5e0665
|
/platform-base/platform-common/src/main/java/com/alipay/api/request/AlipayOfflineMarketingVoucherUseRequest.java
|
bf6e60359bcbcdcf38694ae55cc4ccd535d50350
|
[] |
no_license
|
shuchongqj/duojifen
|
e465cce60ec07e060dc1859c2afc976f6a714db4
|
d8c0eb50b046024b55cb7d9b304f76b095051c99
|
refs/heads/master
| 2023-05-05T17:27:36.211808
| 2020-02-20T04:53:30
| 2020-02-20T04:53:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,093
|
java
|
package com.alipay.api.request;
import java.util.Map;
import com.alipay.api.AlipayObject;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayOfflineMarketingVoucherUseResponse;
/**
* ALIPAY API: alipay.offline.marketing.voucher.use request
*
* @author auto create
* @since 1.0, 2016-06-23 17:57:58
*/
public class AlipayOfflineMarketingVoucherUseRequest implements AlipayRequest<AlipayOfflineMarketingVoucherUseResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 口碑外部券使用接口
*/
private String bizContent;
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.offline.marketing.voucher.use";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipayOfflineMarketingVoucherUseResponse> getResponseClass() {
return AlipayOfflineMarketingVoucherUseResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"softopensell@outlook.com"
] |
softopensell@outlook.com
|
b06763c593c15703c6fd9c2a3bd6f0df0e550098
|
b8fb3a2971cdb41b7481ac29618821c741a48510
|
/src/View/ClockOutController.java
|
4dc1f75e27100c2940efea6cf903357c0fd27f57
|
[] |
no_license
|
oberlyr/VicsSubs
|
3f42a051d7e0c4facbc89942eb2e3909dda16071
|
e12bdc6b676e4623ab970824ca27594996d5cedf
|
refs/heads/dev
| 2021-07-09T06:13:58.501537
| 2021-01-25T16:39:27
| 2021-01-25T16:39:27
| 227,509,279
| 0
| 0
| null | 2021-01-25T16:39:27
| 2019-12-12T03:09:48
|
Java
|
UTF-8
|
Java
| false
| false
| 2,494
|
java
|
package View;
import Database.DBOperation;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.stage.Stage;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
public class ClockOutController
{
DBOperation db = new DBOperation();
private int employeeID;
@FXML
Button okButton;
@FXML
Label timeLabel;
@FXML
Label successText;
public ClockOutController() throws SQLException { }
@FXML
public void handleCloseButtonAction()
{
Stage stage = (Stage) okButton.getScene().getWindow();
stage.close();
}
public void onInit(int id) throws SQLException
{
employeeID = id;
logClockOut();
}
public static String getCurrentTime()
{
Date date = new Date();
String strDateFormat = "hh:mm:ss a";
DateFormat dateFormat = new SimpleDateFormat(strDateFormat);
return dateFormat.format(date);
}
public static String getCurrentDate()
{
Date date = new Date();
String strDateFormat = "MM/dd/yyyy";
DateFormat dateFormat = new SimpleDateFormat(strDateFormat);
String formattedDate= dateFormat.format(date);
return formattedDate;
}
public void logClockOut() throws SQLException
{
String currentDate = getCurrentDate();
String currentTime = getCurrentTime();
if(!db.isClockedIn(employeeID, currentDate))
{
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("You have not clocked in");
alert.setHeaderText("You have not clocked in today. Please go clock in and then try again.");
alert.showAndWait();
}
else if(db.isClockedOut(employeeID, currentDate))
{
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("You have already clocked out");
alert.setHeaderText("You have already been clocked out for the day.");
alert.showAndWait();
}
else
{
db.clockOut(employeeID, currentDate, currentTime);
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("Have a nice day!");
alert.setHeaderText("You have clocked out at " + currentTime + ".");
alert.showAndWait();
}
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
097459921046a569695853e003bd6a63548ff766
|
0db96d43aebadfc4aea0b6f26402bf389a84a1c8
|
/material.quiz/src/material/quiz/client/page/Page2.java
|
68421b6abcc113eb0e918e6b285b1744dbc02b17
|
[] |
no_license
|
michaelyah/GWTMaterialDesign
|
6f65b342874ea99ce08f38889711328c7b4c30b6
|
bf0c0f5d3306f8f2d0ef77ed902b8ffaff2c87d7
|
refs/heads/master
| 2020-12-11T04:16:40.847542
| 2015-10-26T18:04:46
| 2015-10-26T18:26:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 645
|
java
|
package material.quiz.client.page;
import gwt.material.design.client.ui.MaterialPanel;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
public class Page2 extends Composite {
private static Page2UiBinder uiBinder = GWT.create(Page2UiBinder.class);
interface Page2UiBinder extends UiBinder<Widget, Page2> {
}
@UiField MaterialPanel tablePanel;
public Page2() {
initWidget(uiBinder.createAndBindUi(this));
tablePanel.add(new MaterialDataGrid());
}
}
|
[
"kevzlou7979@gmail.com"
] |
kevzlou7979@gmail.com
|
1e5c6c48259730e7253e2314a4f4b18dbf1924cd
|
f66d1752c6cbd2731b55f7f8717615ad1b8df2bd
|
/Quartz/src/com/lanou/quartz/HelloJob.java
|
de0f56ad9c82649120f20fafa784f0760d1707ec
|
[] |
no_license
|
leizhaojiang/java1106-mater
|
6c98afa6c84b1187077da30e776323120b1f53c7
|
012582802f25bcd5fa3ba78bd51443701494134e
|
refs/heads/master
| 2022-12-06T11:49:13.698891
| 2020-07-02T01:06:50
| 2020-07-02T01:06:50
| 217,801,345
| 0
| 0
| null | 2022-11-24T10:01:28
| 2019-10-27T03:43:06
|
JavaScript
|
GB18030
|
Java
| false
| false
| 592
|
java
|
package com.lanou.quartz;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
public class HelloJob implements Job{
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String format = sdf.format(date);
System.out.println("当前时间:"+format);
/**--------具体业务逻辑---------*/
System.out.println("业务逻辑");
}
}
|
[
"leizhaojiang@163.com"
] |
leizhaojiang@163.com
|
cd0288cff0dbdf4c7a8db576d13af3535122a924
|
5432db20fcebaf2f05eec0293ebad3ab47c48e43
|
/src/main/java/com/zyzx/EasyX509TrustManager.java
|
e6fad29cabf80c7a6ecb50af55170168173203a2
|
[
"Apache-2.0"
] |
permissive
|
Lihuanghe/CustomizeDNSHttpClient
|
449f0bc81a8dd91cc3e788f1ff4a60d6d0524a45
|
0d5b1e85ba8520856a0d500c7c1e40343aff2780
|
refs/heads/master
| 2021-01-01T04:27:24.642186
| 2016-11-11T03:25:54
| 2016-11-11T03:25:54
| 57,357,466
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 469
|
java
|
package com.zyzx;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509TrustManager;
public class EasyX509TrustManager implements X509TrustManager {
public X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
X509Certificate[] certs, String authType) {
}
}
|
[
"jameslover121@163.com"
] |
jameslover121@163.com
|
24074970ab2666cacf73f7a031e29ac6800037ac
|
05e13c408bede78bb40cbaba237669064eddee10
|
/src/main/java/com/fedex/ws/ship/v26/AssociatedAccountNumberType.java
|
eabcbf8b5128e9df04a060fdc3976010d0ce5b4f
|
[] |
no_license
|
noboomu/shipping-carriers
|
f60ae167bd645368012df0817f0c0d54e8fff616
|
74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6
|
refs/heads/master
| 2023-05-07T08:54:31.217066
| 2021-06-02T23:48:11
| 2021-06-02T23:48:11
| 373,320,009
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,017
|
java
|
package com.fedex.ws.ship.v26;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for AssociatedAccountNumberType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <pre>
* <simpleType name="AssociatedAccountNumberType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="FEDEX_EXPRESS"/>
* <enumeration value="FEDEX_FREIGHT"/>
* <enumeration value="FEDEX_GROUND"/>
* <enumeration value="FEDEX_OFFICE"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "AssociatedAccountNumberType")
@XmlEnum
public enum AssociatedAccountNumberType {
FEDEX_EXPRESS,
FEDEX_FREIGHT,
FEDEX_GROUND,
FEDEX_OFFICE;
public String value() {
return name();
}
public static AssociatedAccountNumberType fromValue(String v) {
return valueOf(v);
}
}
|
[
"bauer.j@gmail.com"
] |
bauer.j@gmail.com
|
a428b1cfc5912cbad59c6fbaca79f1820846c768
|
32386cc93708c88e412d17ff34c77e84b60cfa8f
|
/src/main/java/io/github/pascalgrimaud/service/EntityWithServiceImplService.java
|
cb197263f12c67b0e1db2c4fcd782ebcfe456a32
|
[] |
no_license
|
pascalgrimaud/jhipster180901-react
|
8541f150c18d11342d2f9ce52fdb94188000f859
|
71067d687f944c0544e27293ea8fedb5c422e684
|
refs/heads/master
| 2020-03-27T19:25:07.923308
| 2018-09-01T10:04:34
| 2018-09-01T10:04:34
| 146,987,678
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 965
|
java
|
package io.github.pascalgrimaud.service;
import io.github.pascalgrimaud.domain.EntityWithServiceImpl;
import java.util.List;
import java.util.Optional;
/**
* Service Interface for managing EntityWithServiceImpl.
*/
public interface EntityWithServiceImplService {
/**
* Save a entityWithServiceImpl.
*
* @param entityWithServiceImpl the entity to save
* @return the persisted entity
*/
EntityWithServiceImpl save(EntityWithServiceImpl entityWithServiceImpl);
/**
* Get all the entityWithServiceImpls.
*
* @return the list of entities
*/
List<EntityWithServiceImpl> findAll();
/**
* Get the "id" entityWithServiceImpl.
*
* @param id the id of the entity
* @return the entity
*/
Optional<EntityWithServiceImpl> findOne(Long id);
/**
* Delete the "id" entityWithServiceImpl.
*
* @param id the id of the entity
*/
void delete(Long id);
}
|
[
"pascalgrimaud@gmail.com"
] |
pascalgrimaud@gmail.com
|
292e579e801d1601051992abf2c08f249c4cf92f
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/drjava_cluster/10004/tar_1.java
|
5fff2e9d5847411dee26bd5ab98e55d7edde9dfd
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,211
|
java
|
/*
* DynamicJava - Copyright (C) 1999-2001
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the
* following conditions:
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL DYADE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of Dyade shall not be
* used in advertising or otherwise to promote the sale, use or other
* dealings in this Software without prior written authorization from
* Dyade.
*
*/
package koala.dynamicjava.tree;
import java.util.*;
import koala.dynamicjava.tree.visitor.*;
/**
* This class represents the 'this' expression nodes of the syntax tree. It may
* be unqualified (just "this") or qualified ("foo.bar.this").
*
* @author Stephane Hillion
* @version 1.0 - 1999/04/24
*/
public class ThisExpression extends PrimaryExpression {
/**
* The className property name
*/
public final static String CLASS_NAME = "className";
/**
* The class that qualify that object
*/
private String className;
/**
* Initializes the expression
* @param ids the identifiers (tokens) that qualify this 'this'.
* Can be null.
* @exception IllegalArgumentException if ids is null or body is null
*/
public ThisExpression(List<IdentifierToken> ids, SourceInfo si) {
super(si);
if (ids == null) throw new IllegalArgumentException("ids == null");
className = TreeUtilities.listToName(ids);
}
public ThisExpression() {
this(new LinkedList<IdentifierToken>(), SourceInfo.NONE);
}
/**
* Returns the name of the class that qualify that object
*/
public String getClassName() {
return className;
}
/**
* Sets the name of the class that qualify that object
* @exception IllegalArgumentException if s is null or body is null
*/
public void setClassName(String s) {
if (s == null) throw new IllegalArgumentException("s == null");
firePropertyChange(CLASS_NAME, className, className = s);
}
/**
* Allows a visitor to traverse the tree
* @param visitor the visitor to accept
*/
public <T> T acceptVisitor(Visitor<T> visitor) {
return visitor.visit(this);
}
/**
* Implementation of toString for use in unit testing
*/
public String toString() {
return "("+getClass().getName()+": "+getClassName()+")";
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
e38656b80ad96f2615fb793504fb2986eb8974a9
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/serge-rider--dbeaver/e5c9be8650805bece3eaf6e230b632f2ce613036/after/DBPDataSourceContainer.java
|
3b8cab10d7ac6b2eca2d3c8f945922bda2ede2d1
|
[] |
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
| 5,794
|
java
|
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2016 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed 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 org.jkiss.dbeaver.model;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.connection.DBPClientHome;
import org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration;
import org.jkiss.dbeaver.model.connection.DBPDriver;
import org.jkiss.dbeaver.model.data.DBDPreferences;
import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
import org.jkiss.dbeaver.model.runtime.DBRProgressListener;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.model.struct.DBSObjectFilter;
import org.jkiss.dbeaver.model.virtual.DBVModel;
import java.util.Collection;
/**
* DBPDataSourceContainer
*/
public interface DBPDataSourceContainer extends DBSObject, DBDPreferences, DBPNamedObject2
{
/**
* Container unique ID
* @return id
*/
@NotNull
String getId();
/**
* Associated driver
* @return driver descriptor reference
*/
@NotNull
DBPDriver getDriver();
@NotNull
DBPPlatform getPlatform();
/**
* Connection configuration.
* @return connection details
*/
@NotNull
DBPConnectionConfiguration getConnectionConfiguration();
/**
* Actual connection configuration. Contains actual parameters used to connect to this datasource.
* Differs from getConnectionConfiguration() in case if tunnel or proxy was used.
* @return actual connection configuration.
*/
@NotNull
DBPConnectionConfiguration getActualConnectionConfiguration();
boolean isProvided();
boolean isShowSystemObjects();
boolean isShowUtilityObjects();
boolean isConnectionReadOnly();
boolean isDefaultAutoCommit();
void setDefaultAutoCommit(boolean autoCommit, DBCExecutionContext updateContext, boolean updateConnection, Runnable onFinish)
throws DBException;
@Nullable
DBPTransactionIsolation getActiveTransactionsIsolation();
@Nullable
Integer getDefaultTransactionsIsolation();
void setDefaultTransactionsIsolation(DBPTransactionIsolation isolationLevel)
throws DBException;
/**
* Search for object filter which corresponds specified object type and parent object.
* Search filter which match any super class or interface implemented by specified type.
* @param type object type
* @param parentObject parent object (in DBS objects hierarchy)
* @return object filter or null if not filter was set for specified type
*/
@Nullable
DBSObjectFilter getObjectFilter(Class<?> type, @Nullable DBSObject parentObject, boolean firstMatch);
void setObjectFilter(Class<?> type, DBSObject parentObject, DBSObjectFilter filter);
DBVModel getVirtualModel();
DBPClientHome getClientHome();
/**
* Checks this data source is connected.
* Do not check whether underlying connection is alive or not.
*/
boolean isConnected();
/**
* Initiate connection job.
*/
void initConnection(DBRProgressMonitor monitor, DBRProgressListener onFinish);
/**
* Connects to datasource.
* This is async method and returns immediately.
* Connection will be opened in separate job, so no progress monitor is required.
* @param monitor progress monitor
* @param initialize initialize datasource after connect (call DBPDataSource.initialize)
* @param reflect notify UI about connection state change
* @throws DBException on error
*/
boolean connect(DBRProgressMonitor monitor, boolean initialize, boolean reflect) throws DBException;
/**
* Disconnects from datasource.
* This is async method and returns immediately.
* Connection will be closed in separate job, so no progress monitor is required.
* @param monitor progress monitor
* @throws DBException on error
* @return true on disconnect, false if disconnect action was canceled
*/
boolean disconnect(DBRProgressMonitor monitor) throws DBException;
/**
* Reconnects datasource.
* @param monitor progress monitor
* @return true on reconnect, false if reconnect action was canceled
* @throws org.jkiss.dbeaver.DBException on any DB error
*/
boolean reconnect(DBRProgressMonitor monitor) throws DBException;
@Nullable
DBPDataSource getDataSource();
String getFolderPath();
void setFolderPath(String folderPath);
Collection<DBPDataSourceUser> getUsers();
void acquire(DBPDataSourceUser user);
void release(DBPDataSourceUser user);
void fireEvent(DBPEvent event);
/**
* Preference store associated with this datasource
* @return preference store
*/
@NotNull
DBPPreferenceStore getPreferenceStore();
@NotNull
DBPDataSourceRegistry getRegistry();
void persistConfiguration();
@NotNull
ISecurePreferences getSecurePreferences();
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
6eb2800d4ad6391cda4caf08e8ec7e019debf574
|
72003cab6711efe96e7080599376d758e065fc33
|
/PCLApp/JavaSource/com/citibank/ods/modules/product/player/functionality/valueobject/PlayerMovementDetailFncVO.java
|
3f992b7b53ee92c4568fe16d3b9fd2aaf91d0398
|
[] |
no_license
|
mv58799/PCLApp
|
39390b8ff5ccaf95c654f394e32ed03b7713e8ad
|
2f8772a60fee035104586bbbf2827567247459c4
|
refs/heads/master
| 2020-03-19T09:06:30.870074
| 2018-06-06T03:10:07
| 2018-06-06T03:10:07
| 136,260,531
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 362
|
java
|
package com.citibank.ods.modules.product.player.functionality.valueobject;
import com.citibank.ods.entity.pl.TplPlayerMovEntity;
/**
* @author atilio.l.araujo
*
*/
public class PlayerMovementDetailFncVO extends BasePlayerDetailFncVO
{
public PlayerMovementDetailFncVO()
{
m_baseTplPlayerEntity = new TplPlayerMovEntity();
}
}
|
[
"mv58799@LACBRA900W1153.lac.nsroot.net"
] |
mv58799@LACBRA900W1153.lac.nsroot.net
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.