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
56ff7c74fc3f448a9ec990b65aff2f52dd0af35f
fc4b3853e5e88bafc65223c7ef563990285104e5
/src/main/java/com/iwilley/b1ec2/api/domain/PurchaseReceiptLine.java
ff58902e1a0af6e437eec489be7b2990e74c9d16
[]
no_license
myege/oms
003c79a994a75cc48ca294a426b197c0ae4a4262
8343507ebf99cfa524f38a5ac7a5d7588ae8c5cd
refs/heads/master
2023-09-03T15:22:15.463536
2021-09-18T09:23:08
2021-09-18T09:23:08
407,808,363
0
0
null
null
null
null
UTF-8
Java
false
false
729
java
package com.iwilley.b1ec2.api.domain; public class PurchaseReceiptLine extends B1EC2Object { private static final long serialVersionUID = 895457757675322378L; public int lineNum; public int quantity; public String serialNumbers; public int getLineNum() { return this.lineNum; } public void setLineNum(int lineNum) { this.lineNum = lineNum; } public int getQuantity() { return this.quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public String getSerialNumbers() { return this.serialNumbers; } public void setSerialNumbers(String serialNumbers) { this.serialNumbers = serialNumbers; } }
[ "myoperatwmsoms@outlook.com" ]
myoperatwmsoms@outlook.com
d3d5e8b7d691ce2e27716ba10cc3ef37e10e45d4
169f4b4cb60dc918bf0d8b8db1a7efdf5d4ebc23
/java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/generics/GenericClass.java
a1ce33bf2744abbac5ec5a1998b58838fc82f8ab
[ "Apache-2.0" ]
permissive
PyJava1984/elasticsearch-java
387d2212cc0784c06d1a8af0d284f4ee2b1cf9b4
5c7c24d9dd33de37e00ca183b32ec5cb17ea8b17
refs/heads/main
2023-08-28T17:35:38.220152
2021-10-18T19:21:23
2021-10-18T19:21:23
419,573,301
1
0
null
null
null
null
UTF-8
Java
false
false
4,279
java
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package co.elastic.clients.elasticsearch.experiments.generics; import co.elastic.clients.base.Endpoint; import co.elastic.clients.base.SimpleEndpoint; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.json.DelegatingDeserializer; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.JsonpSerializer; import co.elastic.clients.json.JsonpUtils; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.util.function.Supplier; public class GenericClass<GenParam> implements JsonpSerializable { // Serializers for generic parameters private final JsonpSerializer<GenParam> genParamSerializer; // Properties private final GenParam genParam; protected GenericClass(Builder<GenParam> builder) { this.genParamSerializer = builder.genParamSerializer; this.genParam = builder.genParam; } public GenParam genParam() { return this.genParam; } @Override public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); generator.writeKey("genParam"); JsonpUtils.serialize(genParam, generator, genParamSerializer, mapper); generator.writeEnd(); } public static class Builder<GenParam> implements ObjectBuilder<GenericClass<GenParam>> { private GenParam genParam; private JsonpSerializer<GenParam> genParamSerializer; /** * Sets the JSON serializer for {@link GenParam} values. If not set, the client will try to find a suitable * serializer in the {@link JsonpMapper} and will fail if none is found. */ // Internal generic parameters always call this method to avoid runtime lookup public Builder<GenParam> genParamSerializer(JsonpSerializer<GenParam> value) { this.genParamSerializer = value; return this; } public Builder<GenParam> genParam(GenParam value) { this.genParam = value; return this; } @Override public GenericClass<GenParam> build() { return null; } } public static <GenParam> JsonpDeserializer<GenericClass<GenParam>> parser( // A deserializer for each generic parameter JsonpDeserializer<GenParam> getParamDeserializer ) { return ObjectBuilderDeserializer.createForObject( (Supplier<Builder<GenParam>>) Builder::new, (op) -> GenericClass.setupParser(op, getParamDeserializer) ); } private static <GenParam> void setupParser(DelegatingDeserializer<Builder<GenParam>> op, JsonpDeserializer<GenParam> deserializer) { op.add(Builder::genParam, deserializer, "genParam"); } public static <GenParam> Endpoint<Boolean, GenericClass<GenParam>, ErrorResponse> endpoint( JsonpDeserializer<GenParam> genParamDeserializer ) { return new SimpleEndpoint<>( // Request method request -> "GET", // Request path request -> "/genclass", // Request parameters SimpleEndpoint.emptyMap(), SimpleEndpoint.emptyMap(), true, GenericClass.parser(genParamDeserializer) ); } }
[ "sylvain@elastic.co" ]
sylvain@elastic.co
41afe5b9806a39ef727fa23064d73a5014de3bc8
cca779777654540ab071e288adde6dd5d03d00d8
/payment/src/main/java/com/example/payment/entity/primary/ChannelMerchant.java
a7cb2f40474173e8d9df0f048c4f1e06746e031f
[]
no_license
onecpay/imagination_ali
d34593656cec0ddbfc0f4a6984a022fb19fcd4f7
3e08a08f3c176e6274f2f88586a2e5d2cd2aec37
refs/heads/master
2021-08-28T07:31:36.020069
2020-05-19T16:48:30
2020-05-19T16:48:30
224,594,948
0
2
null
2021-08-13T15:34:59
2019-11-28T07:31:13
Java
UTF-8
Java
false
false
1,936
java
package com.example.payment.entity.primary; import com.example.payment.enums.ProductEnum; import com.example.payment.enums.StatusEnum; import lombok.Data; import org.springframework.data.annotation.Version; import javax.persistence.*; import java.io.Serializable; import java.util.Date; /** * 在线订单实体 * 通道商户信息。 * * @author ONEC */ @Data @Entity @Table(name = "t_channel_merchant") public class ChannelMerchant implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) @Column(name = "id", unique = true) private Long id; @Column(name = "version") @Version private Integer version; /** * 通道编号id */ @Column(name = "channel_id", length = 25) private String channelId; /** * 产品编号 */ @Column(name = "product", length = 25) private ProductEnum product; /** * 平台商户 */ @Column(name = "merchant_id", length = 25) private Integer merchantId; /** * 平台商户 */ @Column(name = "channel_merchant_no", length = 25) private String channelMerchantNo; /** * 验签key */ @Column(name = "sign_key") private String signKey; /** * 加密key */ @Column(name = "encrypt_key") private String encryptKey; /** * 代理扩展key */ @Column(name = "ext_key") private String extKey; /** * 创建时间 */ @Column(name = "create_date") private Date createDate; /** * 创建时间 */ @Column(name = "update_date") private Date updateDate; /** * 通道状态 */ @Column(name = "status") private StatusEnum status; /** * 银行名称 */ @Column(name = "creator", length = 64) private String creator; /** * 产品备注 */ @Column(name = "remark", length = 78) private String remark; }
[ "2650020302@qq.com" ]
2650020302@qq.com
a7e9e51ccc6d085a42ace196fdc044ff645ddc9b
47074239415381aefe6286ab11049bd27b5de2eb
/3. Automatically Generated Test Data/JHD.Bridge/Bridge_DecoratorFigure_Figure_43.java
821504258f62d3aec642c64bf0316e5088ccbcf0
[ "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Megre/Dataset4SparT-ETA
c9c3611b143a0d1b1d5180603c5684313686921a
6165ed6ffb63c9c74522ca77e5d4edde7369376c
refs/heads/master
2021-06-25T22:37:13.843086
2021-04-03T16:37:36
2021-04-03T16:37:36
225,321,687
6
0
null
null
null
null
UTF-8
Java
false
false
424
java
package test.auto; public class Bridge_DecoratorFigure_Figure_43 { public static void main(String[] args) throws java.lang.Exception { CH.ifa.draw.framework.Figure implementor = new CH.ifa.draw.contrib.DiamondFigure(new java.awt.Point(), new java.awt.Point()); CH.ifa.draw.standard.DecoratorFigure abstraction = new CH.ifa.draw.samples.javadraw.AnimationDecorator(implementor); abstraction.containsPoint(1, 1); } }
[ "renhao.x@seu.edu.cn" ]
renhao.x@seu.edu.cn
cc91fe36e4a5607bad2a1c7984836921787064a6
f8295d5ff8626723fe83f81356aea62d9d0bdf88
/search/src/main/java/com/danbro/search/service/SearchService.java
9b79a8d3d25be0d99159ccbd2d5805ef90ef87f3
[]
no_license
Danbro007/guli-mall
2c790ade5bd4dcb12aea40077ea8af9d70ac9ee4
f10e7bb9a83945e89c8ef7fdb08c4f8d28bec072
refs/heads/main
2023-03-31T11:54:42.150553
2021-04-05T13:31:07
2021-04-05T13:31:07
332,977,101
0
0
null
null
null
null
UTF-8
Java
false
false
758
java
package com.danbro.search.service; import java.util.List; import com.danbro.search.controller.esModel.ProductSkuInfoEsModel; import com.danbro.search.controller.vo.SearchParamVo; import com.danbro.search.controller.vo.SearchResponseVo; import org.springframework.context.ApplicationContext; import javax.servlet.http.HttpServletRequest; public interface SearchService { /** * 把商品批量加入到ES里 * * @param productAttrEsModels 商品数据 */ void productBatchOnSale(List<ProductSkuInfoEsModel> productAttrEsModels); /** * 商品的查询检索 * * @param searchParamVo 查询条件 * @return */ SearchResponseVo search(SearchParamVo searchParamVo, HttpServletRequest request); }
[ "710170342@qq.com" ]
710170342@qq.com
729f9c20305c3dcf7aefa89897807d7d6a92b4da
96988401013e4e2727a9a42c646d17b95d41bd74
/spring-demo/spring-security/src/main/java/com/janloong/springsecurity/redis/localsync/ResubmitLock.java
0c55b399cf0533cddc2aaae0a3d85ad2e562d742
[]
no_license
Janloong-Doo/SpringCloud
b06acc2c68d456c5ed6137f95248ac133dbf45eb
86f461276b99af20b15b418a377f7f57a89f8693
refs/heads/master
2022-06-24T14:42:49.808410
2021-04-06T08:01:57
2021-04-06T08:01:57
129,986,185
6
4
null
2022-06-21T03:51:18
2018-04-18T01:34:13
Java
UTF-8
Java
false
false
2,694
java
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : Copyright (c) 2019 All Rights Reserved. : ProjectName: SpringCloud : FileName: ResubmitLock.java : Author: janloongdoo@gmail.com : Date: 2019/7/30 上午11:06 : LastModify: 2019/7/30 上午11:06 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ package com.janloong.springsecurity.redis.localsync; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * 重复提交锁,锁是在本地使用并发map进行了上锁处理,可以改为redis使用redis锁进行操作 * * @author <a href ="mailto: janloongdoo@gmail.com">Janloong</a> * @date 2019-07-30 11:06 */ @Slf4j public class ResubmitLock { private static final ConcurrentHashMap<String, Object> LOCK_CACHE = new ConcurrentHashMap<>(200); private static final ScheduledThreadPoolExecutor EXECUTOR = new ScheduledThreadPoolExecutor(5, new ThreadPoolExecutor.DiscardPolicy()); // private static final Cache<String, Object> CACHES = CacheBuilder.newBuilder() // 最大缓存 100 个 // .maximumSize(1000) // 设置写缓存后 5 秒钟过期 // .expireAfterWrite(5, TimeUnit.SECONDS) // .build(); public ResubmitLock() { } /** * 静态内部类 单例模式 * * @return */ private static class SingletonInstance { private static final ResubmitLock INSTANCE = new ResubmitLock(); } public static ResubmitLock getInstance() { return SingletonInstance.INSTANCE; } public static String handleKey(String param) { return DigestUtils.md5Hex(param == null ? "" : param); } /** * 加锁 putIfAbsent 是原子操作保证线程安全 * * @param key 对应的key * @param value * @return */ public boolean lock(final String key, Object value) { return Objects.isNull(LOCK_CACHE.putIfAbsent(key, value)); } /** * 延时释放锁 用以控制短时间内的重复提交 * * @param lock 是否需要解锁 * @param key 对应的key * @param delaySeconds 延时时间 */ public void unLock(final boolean lock, final String key, final int delaySeconds) { if (lock) { EXECUTOR.schedule(() -> { LOCK_CACHE.remove(key); }, delaySeconds, TimeUnit.SECONDS); } } }
[ "807110586@qq.com" ]
807110586@qq.com
b7f8f2b0e476815bbd37f35c69b1e6343946fa66
25346f238005b26857afb2a635c325ffa24a95d7
/编码文档/sapimptool/src/main/java/com/eray/pbs/vo/RevisonSpentTotalBackSAP.java
080d7e9214aa67a06fc3afced971d45933a644f2
[]
no_license
xyd104449/amems
93491ff8fcf1d0650a9af764fa1fa38d7a25572a
74a0ef8dc31d27ee5d1a0e91ff4d74af47b08778
refs/heads/master
2021-09-15T03:21:15.399980
2018-05-25T03:15:58
2018-05-25T03:15:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
817
java
package com.eray.pbs.vo; /** * 回传至sap的数据 * * @author ganqing 2016.7.13 * */ public class RevisonSpentTotalBackSAP { private String spentMonth; // 统计的月份 private String rid; // 工包编号 private String total; // 总工时 public RevisonSpentTotalBackSAP() { } public RevisonSpentTotalBackSAP(String spentMonth, String rid, String total) { this.spentMonth = spentMonth; this.rid = rid; this.total = total; } public String getSpentMonth() { return spentMonth; } public void setSpentMonth(String spentMonth) { this.spentMonth = spentMonth; } public String getRid() { return rid; } public void setRid(String rid) { this.rid = rid; } public String getTotal() { return total; } public void setTotal(String total) { this.total = total; } }
[ "903654879@qq.com" ]
903654879@qq.com
c80ac7d3a4ec80b7000102c6b6d4a327e0d65d30
e14e25c5b4c7c1ffcb4b8af588d811a1ca8791ec
/src/rlgs4/FileIndex.java
16efe161b068f83284d514b8e287f780db5b8ba0
[]
no_license
BurningBright/algorithms-fourth-edition
6ecd434ebc42449f5f05da1e6d6a94ef64eaab57
46ad5a29154b8094a2cd169308b9922131a74587
refs/heads/master
2021-01-24T07:13:27.408150
2021-01-08T02:42:30
2021-01-08T02:42:30
55,818,397
0
0
null
null
null
null
UTF-8
Java
false
false
1,964
java
package rlgs4; import stdlib.*; /************************************************************************* * Compilation: javac FileIndex.java * Execution: java FileIndex file1.txt file2.txt file3.txt ... * Dependencies: ST.java SET.java In.java StdIn.java StdOut.java * Data files: http://algs4.cs.princeton.edu/35applications/ex1.txt * http://algs4.cs.princeton.edu/35applications/ex2.txt * http://algs4.cs.princeton.edu/35applications/ex3.txt * http://algs4.cs.princeton.edu/35applications/ex4.txt * * % java FileIndex ex*.txt * age * ex3.txt * ex4.txt * best * ex1.txt * was * ex1.txt * ex2.txt * ex3.txt * ex4.txt * * % java FileIndex *.txt * * % java FileIndex *.java * *************************************************************************/ import java.io.File; public class FileIndex { public static void main(String[] args) { // key = word, value = set of files containing that word ST<String, SET<File>> st = new ST<String, SET<File>>(); // create inverted index of all files StdOut.println("Indexing files"); for (String filename : args) { StdOut.println(" " + filename); File file = new File(filename); In in = new In(file); while (!in.isEmpty()) { String word = in.readString(); if (!st.contains(word)) st.put(word, new SET<File>()); SET<File> set = st.get(word); set.add(file); } } // read queries from standard input, one per line while (!StdIn.isEmpty()) { String query = StdIn.readString(); if (st.contains(query)) { SET<File> set = st.get(query); for (File file : set) { StdOut.println(" " + file.getName()); } } } } }
[ "lcg51271@gmail.com" ]
lcg51271@gmail.com
b63caa945039cd62d688f2fe604a50ac7735c8f1
4bc52eb34bae6bf8b28432e13375b50309259742
/bitcamp-java-project/src29/main/java/bitcamp/java106/pms/dao/TeamDao.java
116e31b8c4618ab0959cb2e4cabe01a17339c62f
[]
no_license
pparksuuu/bitcamp2
aca790e5a24bd1fda769f81132765e44ac502506
330a5ab34a79c9915c6c644a07518c4ee656f55e
refs/heads/master
2020-03-17T12:48:10.698745
2018-08-24T08:03:43
2018-08-24T08:03:43
133,603,763
2
6
null
null
null
null
UTF-8
Java
false
false
2,373
java
package bitcamp.java106.pms.dao; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.Iterator; import bitcamp.java106.pms.annotation.Component; import bitcamp.java106.pms.domain.Team; @Component public class TeamDao extends AbstractDao<Team> { public TeamDao() throws Exception { load(); } public void load() throws Exception { try ( ObjectInputStream in = new ObjectInputStream( new BufferedInputStream( new FileInputStream("data/team.data"))); ) { while (true) { try { this.insert((Team) in.readObject()); } catch (Exception e) { // 데이터를 모두 읽었거나 파일 형식에 문제가 있다면, //e.printStackTrace(); break; // 반복문을 나간다. } } } } public void save() throws Exception { try ( ObjectOutputStream out = new ObjectOutputStream( new BufferedOutputStream( new FileOutputStream("data/team.data"))); ) { Iterator<Team> teams = this.list(); while (teams.hasNext()) { out.writeObject(teams.next()); } } } public int indexOf(Object key) { String name = (String) key; for (int i = 0; i < collection.size(); i++) { if (name.equalsIgnoreCase(collection.get(i).getName())) { return i; } } return -1; } } //ver 24 - File I/O 적용 //ver 23 - @Component 애노테이션을 붙인다. //ver 22 - 추상 클래스 AbstractDao를 상속 받는다. //ver 19 - 우리 만든 ArrayList 대신 java.util.LinkedList를 사용하여 목록을 다룬다. //ver 18 - ArrayList 클래스를 적용하여 객체(의 주소) 목록을 관리한다. //ver 16 - 인스턴스 변수를 직접 사용하는 대신 겟터, 셋터 사용. //ver 14 - TeamController로부터 데이터 관리 기능을 분리하여 TeamDao 생성.
[ "supr2000@gmail.com" ]
supr2000@gmail.com
4d92a2201b989d883ab11a078970a14852d0ca0e
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/domain/AlipayFincoreComplianceRcservcenterRcdisposalQueryModel.java
aff3dc1a7f29a856bb9af30cdd1b60a83ff2c965
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-java-all
df461d00ead2be06d834c37ab1befa110736b5ab
8cd1750da98ce62dbc931ed437f6101684fbb66a
refs/heads/master
2023-08-27T03:59:06.566567
2023-08-22T14:54:57
2023-08-22T14:54:57
132,569,986
470
207
Apache-2.0
2022-12-25T07:37:40
2018-05-08T07:19:22
Java
UTF-8
Java
false
false
852
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 合规服务处置平台当面付商户处罚状态查询接口 * * @author auto create * @since 1.0, 2022-12-27 21:02:51 */ public class AlipayFincoreComplianceRcservcenterRcdisposalQueryModel extends AlipayObject { private static final long serialVersionUID = 6696514781164419445L; /** * 需求code */ @ApiField("demand_code") private String demandCode; /** * 主体id */ @ApiField("entity_id") private String entityId; public String getDemandCode() { return this.demandCode; } public void setDemandCode(String demandCode) { this.demandCode = demandCode; } public String getEntityId() { return this.entityId; } public void setEntityId(String entityId) { this.entityId = entityId; } }
[ "auto-publish" ]
auto-publish
917ab4dcef328297d115b1c43bf41a429b6b174f
675dfd9eb7c7c6a0434a37f352421165229a7ec1
/TestJUnit/src/com/junit/exception/test/TestRunner.java
fc42f9c7d2a1ba3332ef61b11e56d42f4b11c6cc
[]
no_license
Skillnet-test/junittest
e9ea8e01425743272583f21303ab484b4bc06caf
4b641826540d1e666ada2ad518061fd47ba7896b
refs/heads/master
2020-03-29T05:07:21.394391
2018-09-20T07:15:45
2018-09-20T07:15:45
149,567,518
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
package com.junit.exception.test; import org.junit.runner.JUnitCore; import org.junit.runner.Result; import org.junit.runner.JUnitCore; import org.junit.runner.Result; import org.junit.runner.notification.Failure; public class TestRunner { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Result result = JUnitCore.runClasses(TestJunit.class); for (Failure failure : result.getFailures()) { System.out.println(failure.toString()); } System.out.println(result.wasSuccessful()); } }
[ "saptarshi.mukhaty@skillnetinc.com" ]
saptarshi.mukhaty@skillnetinc.com
872b83eb39d9d0d8b01fd8a9b1bae39985519b64
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/p081b/p082a/p083a/C25391c.java
c03bb12af51040b05e4c05cedbf950b6ed8a52d7
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
956
java
package com.p081b.p082a.p083a; import android.os.Handler; import com.p081b.p082a.p083a.C8482d.C8483a; /* renamed from: com.b.a.a.c */ abstract class C25391c extends C8482d { private boolean bCL; /* renamed from: vW */ public abstract void mo18576vW(); /* renamed from: vX */ public abstract void mo18577vX(); C25391c() { } /* Access modifiers changed, original: declared_synchronized */ /* renamed from: a */ public synchronized void mo18559a(Handler handler, C8483a c8483a) { this.bCL = false; super.mo18559a(handler, c8483a); } /* Access modifiers changed, original: final|declared_synchronized */ /* renamed from: aV */ public final synchronized void mo42418aV(boolean z) { if ((this.bCL ^ z) != 0) { this.bCL = z; if (this.bCL) { mo18576vW(); } else { mo18577vX(); } } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
1577c4d4e4835f4c3ed676503ccc969ac2ab158a
38f9f692165c4c92f92a8ecc393da72543f7da6f
/app/src/main/java/com/afollestad/neuronsample/App.java
3067abd745b6ed02921b7f655fa8c61172c93b10
[]
no_license
kafier/neuron
f836f8b72a44138cdd151eedcabad5b1b52df4e2
fcddce879f9387c6a03c2ba3db2e69263b91ffe7
refs/heads/master
2021-01-15T08:04:34.791577
2015-04-21T23:37:17
2015-04-21T23:37:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package com.afollestad.neuronsample; import android.app.Application; import com.afollestad.neuron.Neuron; /** * @author Aidan Follestad (afollestad) */ public class App extends Application { public final static int PORT = 45421; @Override public void onTerminate() { super.onTerminate(); Neuron.endAll(); } }
[ "drummer.aidan@gmail.com" ]
drummer.aidan@gmail.com
ce6888071bfd6040e218488c0d384bc332dc2cab
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
/src/main/java/com/microsoft/graph/requests/generated/IBaseWorkbookPivotTableRefreshRequestBuilder.java
231e062891fe69c96fd3d4d789aa198eeeaca6cd
[ "MIT" ]
permissive
rgrebski/msgraph-sdk-java
e595e17db01c44b9c39d74d26cd925b0b0dfe863
759d5a81eb5eeda12d3ed1223deeafd108d7b818
refs/heads/master
2020-03-20T19:41:06.630857
2018-03-16T17:31:43
2018-03-16T17:31:43
137,648,798
0
0
null
2018-06-17T11:07:06
2018-06-17T11:07:05
null
UTF-8
Java
false
false
1,613
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.requests.generated; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.models.extensions.*; import com.microsoft.graph.models.generated.*; import com.microsoft.graph.http.*; import com.microsoft.graph.requests.extensions.*; import com.microsoft.graph.requests.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.EnumSet; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The interface for the Base Workbook Pivot Table Refresh Request Builder. */ public interface IBaseWorkbookPivotTableRefreshRequestBuilder extends IRequestBuilder { /** * Creates the IWorkbookPivotTableRefreshRequest * * @return the IWorkbookPivotTableRefreshRequest instance */ IWorkbookPivotTableRefreshRequest buildRequest(); /** * Creates the IWorkbookPivotTableRefreshRequest with specific options instead of the existing options * * @param requestOptions the options for the request * @return the IWorkbookPivotTableRefreshRequest instance */ IWorkbookPivotTableRefreshRequest buildRequest(final java.util.List<? extends Option> requestOptions); }
[ "caitbal@microsoft.com" ]
caitbal@microsoft.com
11cababb9518121578fa01f8eeafef1ae591ed87
a35798f4c5d95f802dbca22be9397c83600615f2
/org.eclipse.stem/modelgen/org.eclipse.stem.model.ctdl/src-gen/org/eclipse/stem/model/ctdl/ctdl/Evaluation.java
b0374d09466258487c73b1f9f56f93d4de6cff03
[]
no_license
c0mpiler/org.eclipse.stem
08b612b85e83a0af6d4fe5a631fa0342ade43e6e
43c94724d33ad5b1b73b022b98f9fa38e68091d3
refs/heads/master
2023-03-26T22:45:08.946445
2021-03-04T01:14:34
2021-03-04T01:16:19
342,024,142
0
0
null
null
null
null
UTF-8
Java
false
false
1,481
java
/** */ package org.eclipse.stem.model.ctdl.ctdl; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Evaluation</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.eclipse.stem.model.ctdl.ctdl.Evaluation#getExpression <em>Expression</em>}</li> * </ul> * </p> * * @see org.eclipse.stem.model.ctdl.ctdl.CtdlPackage#getEvaluation() * @model * @generated */ public interface Evaluation extends ReturnStatement { /** * Returns the value of the '<em><b>Expression</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Expression</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Expression</em>' containment reference. * @see #setExpression(Expression) * @see org.eclipse.stem.model.ctdl.ctdl.CtdlPackage#getEvaluation_Expression() * @model containment="true" * @generated */ Expression getExpression(); /** * Sets the value of the '{@link org.eclipse.stem.model.ctdl.ctdl.Evaluation#getExpression <em>Expression</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Expression</em>' containment reference. * @see #getExpression() * @generated */ void setExpression(Expression value); } // Evaluation
[ "c0mpiler@outlook.com" ]
c0mpiler@outlook.com
a696c5ac51fe01fb57512b38fbd5aa21b6a8b661
ba74038a0d3a24d93e6dbd1f166530f8cb1dd641
/teamclock/src/legacy/com/fivesticks/time/ebay/ItemShippingStatsBuilder.java
8b4f7b3a5d7abcf624fa37d61e853c21006e68fc
[]
no_license
ReidCarlberg/teamclock
63ce1058c62c0a00d63a429bac275c4888ada79a
4ac078610be86cf0902a73b1ba2a697f9dcf4e3c
refs/heads/master
2016-09-05T23:46:28.600606
2009-09-18T07:25:37
2009-09-18T07:25:37
32,190,901
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
/* * Created on May 12, 2005 by Reid */ package com.fivesticks.time.ebay; import java.util.Collection; import java.util.Iterator; /** * @author Reid */ public class ItemShippingStatsBuilder { public static ItemShippingStats build(Collection target) { ItemShippingStats ret = new ItemShippingStats(); if (target != null) { for (Iterator iterator = target.iterator(); iterator.hasNext();) { ItemShipping element = (ItemShipping) iterator.next(); ret.incrementCount(); ret.acrueWeight(element.getWeight()); ret.acrueHandling(element.getHandlingCharge()); ret.acrueShipping(element.getShippingCost()); } } return ret; } }
[ "reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662" ]
reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662
b119f61b33b96ee2582fe6e0a3cf3cd3d2665e64
b12218b44655c734ef72edbfbd157a774c5754ad
/aplanmis/src/main/java/com/augurit/MetaInitSpringBoot.java
11736f46435180725746bcaecae038119ede23f0
[]
no_license
laughing1990/aplan-fork
590a0ebf520e75d1430d5ed862979f6757a6a9e8
df27f74c7421982639169cb45a814c9723d9ead9
refs/heads/master
2021-05-21T16:27:32.373425
2019-12-19T09:26:31
2019-12-19T09:26:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
963
java
package com.augurit; import com.augurit.agcloud.meta.sc.db.service.MetaDbConnService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; /** * <spring boot初始化> * meta元数据连接自动校正 * * @author gaokang * @version 1.0 */ @Component @Order(2) // 通过order值的大小来决定启动的顺序 public class MetaInitSpringBoot implements CommandLineRunner { private Logger log = LoggerFactory.getLogger(MetaInitSpringBoot.class); @Autowired private MetaDbConnService metaDbConnService; @Override public void run(String... args) throws Exception { log.info("springboot所有bean初始化完成!进行元数据初始化..."); metaDbConnService.metaConnAutoInitCorrection(); } }
[ "xiongyb@augurit.com" ]
xiongyb@augurit.com
5ea351f959509860887a20b348ca0150e70b93b3
bbcd1ca59601057feaca183ef534028853d9300e
/lwh-gl/gl-product/src/main/java/com/lwhtarena/glmall/product/entity/SpuInfoDescEntity.java
9672ffbe9c5f2683b3f6cfc70535ef8a2614533f
[]
no_license
hkkkkq/cloud
214f95e1c0a07af99339219119b7200ff6b8056f
ee21c997ed02ec69ff5b97c78851894c5c25301b
refs/heads/master
2023-01-01T05:03:44.237792
2020-10-22T16:32:56
2020-10-22T16:32:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
package com.lwhtarena.glmall.product.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; import lombok.Data; /** * spu信息介绍 * * @author liwh * @email lwhtarena@gmail.com * @date 2020-07-25 11:16:44 */ @Data @TableName("pms_spu_info_desc") public class SpuInfoDescEntity implements Serializable { private static final long serialVersionUID = 1L; /** * 商品id */ @TableId(type = IdType.INPUT) private Long spuId; /** * 商品介绍 */ private String decript; }
[ "lwhtarena@163.com" ]
lwhtarena@163.com
c428ab873e431c6ac7f4ff7fd3236426d10c28b3
c7e000e5c6549e095a8ffd032d33e0ca449c7ffd
/bin/platform/bootstrap/gensrc/de/hybris/platform/cockpit/model/DynamicWidgetPreferencesModel.java
fdb2a304c635a0cab5829946c763d3d6e6fcf0d7
[]
no_license
J3ys/million
e80ff953e228e4bc43a1108a1c117ddf11cc4644
a97974b68b4adaf820f9024aa5181de635c60b4f
refs/heads/master
2021-03-09T22:59:35.115273
2015-05-19T02:47:29
2015-05-19T02:47:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,336
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 2015/05/18 13:25:55 --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2011 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.cockpit.model; import de.hybris.platform.cockpit.model.WidgetParameterModel; import de.hybris.platform.cockpit.model.WidgetPreferencesModel; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import java.util.Collection; /** * Generated model class for type DynamicWidgetPreferences first defined at extension cockpit. */ @SuppressWarnings("all") public class DynamicWidgetPreferencesModel extends WidgetPreferencesModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "DynamicWidgetPreferences"; /** <i>Generated constant</i> - Attribute key of <code>DynamicWidgetPreferences.parameters</code> attribute defined at extension <code>cockpit</code>. */ public static final String PARAMETERS = "parameters"; /** <i>Generated variable</i> - Variable of <code>DynamicWidgetPreferences.parameters</code> attribute defined at extension <code>cockpit</code>. */ private Collection<WidgetParameterModel> _parameters; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public DynamicWidgetPreferencesModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public DynamicWidgetPreferencesModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> */ @Deprecated public DynamicWidgetPreferencesModel(final ItemModel _owner) { super(); setOwner(_owner); } /** * <i>Generated method</i> - Getter of the <code>DynamicWidgetPreferences.parameters</code> attribute defined at extension <code>cockpit</code>. * Consider using FlexibleSearchService::searchRelation for pagination support of large result sets. * @return the parameters */ public Collection<WidgetParameterModel> getParameters() { if (this._parameters!=null) { return _parameters; } return _parameters = getPersistenceContext().getValue(PARAMETERS, _parameters); } /** * <i>Generated method</i> - Setter of <code>DynamicWidgetPreferences.parameters</code> attribute defined at extension <code>cockpit</code>. * * @param value the parameters */ public void setParameters(final Collection<WidgetParameterModel> value) { _parameters = getPersistenceContext().setValue(PARAMETERS, value); } }
[ "yanagisawa@gotandadenshi.jp" ]
yanagisawa@gotandadenshi.jp
4e56ce8212082511786c9d9725adbae92f6d92d8
44fc7c2940e5b03eb04bcd10a97670c894b2a6e5
/src/main/java/com/solr/bigdata/authentication/TestSolrJAuthentication.java
18727b028da58a198348d330a070a3c27102655f
[]
no_license
jackandyao/solr-extend
866337b75ca6ea56520d4ca3e1dc2c018b8f6c0c
964c1735d6cad9e399b8e193551599433475bb13
refs/heads/master
2022-11-24T00:04:50.049251
2018-03-03T10:33:31
2018-03-03T10:33:31
123,682,198
0
0
null
null
null
null
UTF-8
Java
false
false
3,758
java
package com.solr.bigdata.authentication; import org.apache.http.client.HttpClient; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.impl.CloudSolrClient; import org.apache.solr.client.solrj.impl.HttpClientUtil; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.params.ModifiableSolrParams; /** * Created by Lanxiaowei * Solr开启了安全认证之后,SolrJ访问Solr Server的示例代码 */ public class TestSolrJAuthentication { /*** Zookeeper集群节点,多个使用逗号分割*/ private static final String ZK_HOST = "linux.yida01.com:2181,linux.yida02.com:2181,linux.yida03.com:2181"; /**Client访问Solr Server的帐号*/ private static final String USER_NAME = "solr"; /**Client访问Solr Server的密码*/ private static final String PASS_WORD = "SolrRocks"; /**默认访问的Collection名称*/ private static final String DEFAULT_COLLECTION = "joinTest"; public static void main(String[] args) throws Exception { ModifiableSolrParams params = new ModifiableSolrParams(); params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 500); params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 50); params.set(HttpClientUtil.PROP_FOLLOW_REDIRECTS, false); HttpClient httpClient = HttpClientUtil.createClient(params); httpClient = new InsecureHttpClient(httpClient, USER_NAME, PASS_WORD); SolrClient client = createCloudSolrClient(ZK_HOST,DEFAULT_COLLECTION,httpClient); SolrInputDocument doc = new SolrInputDocument(); doc.addField("id","100"); doc.addField("user_name","Bruce Lee"); doc.addField("age","33"); client.add(doc); //设置为硬提交 client.commit(true,true,false); SolrQuery solrQuery = new SolrQuery("*:*"); solrQuery.setRows(0); solrQuery.set("collection","joinTest"); QueryResponse resp = client.query(solrQuery); SolrDocumentList hits = resp.getResults(); System.out.println("Collection total hit:" + hits.getNumFound()); //显式指定在shard1这个分片上执行查询 solrQuery.set("shards", "shard1"); resp = client.query(solrQuery); hits = resp.getResults(); System.out.println("shard1 total hit:" + hits.getNumFound()); client.close(); } public static CloudSolrClient createCloudSolrClient(String zkHost, String defaultCollection,HttpClient httpClient) { //是否只将索引文档更新请求发送给Shard Leader boolean onlySendToLeader = true; //指定索引文档属于哪个Collection //String defaultCollection = "books"; //Zookeeper客户端连接Zookeeper集群的超时时间,默认值10000,单位:毫秒 int zkClientTimeout = 30000; //Zookeeper Server端等待客户端成功连接的最大超时时间,默认值10000,单位:毫秒 int zkConnectTimeout = 30000; CloudSolrClient client = new CloudSolrClient(zkHost, onlySendToLeader,httpClient); client.setDefaultCollection(defaultCollection); client.setZkClientTimeout(zkClientTimeout); client.setZkConnectTimeout(zkConnectTimeout); //设置是否并行更新索引文档 client.setParallelUpdates(true); //显式设置索引文档的UniqueKey域,默认值就是id client.setIdField("id"); //设置Collection缓存的存活时间,默认值为1,单位:分钟 client.setCollectionCacheTTl(2); return client; } }
[ "786648643@qq.com" ]
786648643@qq.com
c2ed62b381367097a1f57657bb95b20296eb8da5
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/ss/sls/camp/rec/SS_L_CAMP_EXTN_INITCURCAMPCDRecord.java
8b2612162bba5f7c314a06e078804e73dae1561a
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
1,535
java
/*************************************************************************************************** * 파일명 : SP_SS_L_CAMP_EXTN_INIT.java * 기능 : 캠페인확장 * 작성일자 : 2005/05/26 * 작성자 : 이혁 **************************************************************************************************/ package chosun.ciis.ss.sls.camp.rec; import java.sql.*; import chosun.ciis.ss.sls.camp.dm.*; import chosun.ciis.ss.sls.camp.ds.*; /** * 캠페인확장 */ public class SS_L_CAMP_EXTN_INITCURCAMPCDRecord extends java.lang.Object implements java.io.Serializable{ public String cicodeval; public String cicdnm; public String ciymgbcd; public String cicdgb; public String cicdynm; public SS_L_CAMP_EXTN_INITCURCAMPCDRecord(){} public void setCicodeval(String cicodeval){ this.cicodeval = cicodeval; } public void setCicdnm(String cicdnm){ this.cicdnm = cicdnm; } public void setCiymgbcd(String ciymgbcd){ this.ciymgbcd = ciymgbcd; } public void setCicdgb(String cicdgb){ this.cicdgb = cicdgb; } public void setCicdynm(String cicdynm){ this.cicdynm = cicdynm; } public String getCicodeval(){ return this.cicodeval; } public String getCicdnm(){ return this.cicdnm; } public String getCiymgbcd(){ return this.ciymgbcd; } public String getCicdgb(){ return this.cicdgb; } public String getCicdynm(){ return this.cicdynm; } } /* 작성시간 : Fri May 27 15:53:51 KST 2005 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
fcf2f0f65f8ec4e32b1be661105a54d2ff754fe0
37bcc0c62c11290207704a02dbd20649c6eec525
/videorecorder/src/main/java/com/tencent/liteav/demo/videorecord/view/MusicListView.java
a6b352055ab7dd79cb3c384bd7d51c4d111f3cd0
[]
no_license
2803404074/dabang-app
228f5877e73f1a2c84a89d4c30e5951764f0c255
debe43a239e88b608dc5cbe4f74c76e14d1547a6
refs/heads/master
2020-08-05T16:40:12.139213
2020-01-10T09:07:44
2020-01-10T09:07:44
212,614,587
0
0
null
null
null
null
UTF-8
Java
false
false
3,243
java
package com.tencent.liteav.demo.videorecord.view; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.tencent.liteav.demo.videorecord.R; import com.tencent.liteav.demo.videorecord.mybottom.MediaEntity; import java.util.List; /** * Created by Link on 2016/9/12. */ public class MusicListView extends ListView { List<MediaEntity> mData = null; public void setData(List<MediaEntity> data){ mData = data; } private BaseAdapter adapter; public BaseAdapter getAdapter(){ return adapter; } public MusicListView(Context context){ super(context); init(context); } public MusicListView(Context context, AttributeSet attrs){ super(context,attrs); init(context); } private void init(Context context){ this.setChoiceMode(CHOICE_MODE_SINGLE); } public void setupList(LayoutInflater inflater, List<MediaEntity> data){ mData = data; // SimpleAdapter adapter = new SimpleAdapter(mContext,getData(),R.layout.audio_ctrl_music_item, // new String[]{"name","duration"}, // new int[]{R.id.xml_music_item_name,R.id.xml_music_item_duration}); adapter = new MusicListAdapter(inflater, data); setAdapter(adapter); } @Override public int getCount() { return mData.size(); } static public class ViewHolder{ ImageView selected; TextView name; TextView duration; } } class MusicListAdapter extends BaseAdapter{ private Context mContext; List<MediaEntity> mData = null; private LayoutInflater mInflater; MusicListAdapter(LayoutInflater inflater, List<MediaEntity> list){ mInflater = inflater; mData = list; } @Override public int getCount() { return mData.size(); } @Override public Object getItem(int position) { return mData.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { MusicListView.ViewHolder holder; if (convertView == null){ convertView = mInflater.inflate(R.layout.audio_ctrl_music_item,null); holder = new MusicListView.ViewHolder(); holder.name = (TextView) convertView.findViewById(R.id.xml_music_item_name); holder.duration = (TextView) convertView.findViewById(R.id.xml_music_item_duration); holder.selected = (ImageView) convertView.findViewById(R.id.music_item_selected); convertView.setTag(holder); } else{ holder = (MusicListView.ViewHolder)convertView.getTag(); } holder.name.setText(mData.get(position).title); holder.duration.setText(mData.get(position).durationStr); holder.selected.setVisibility(mData.get(position).state == 1 ? View.VISIBLE : View.GONE); return convertView; } }
[ "2803404074@qq.com" ]
2803404074@qq.com
f3d64e18e829c85f2134dd83d4c5ce0b95e35d8b
c0a8907b021a3de46b29d399ff9483c322176417
/mall-admin/src/main/java/com/zscat/mallplus/admin/pms/controller/PmsProductUserCollectController.java
1139c1e0ef6d58c5c1cf797d59772e89a419cc01
[]
no_license
1041469131/mall_new
a8d1cc93eca433fed540ca3da604fdb473aeda2e
b8a9cb4e263c92b7638313265650d2ee81dd3075
refs/heads/master
2022-11-13T01:08:58.540896
2020-07-03T10:24:21
2020-07-03T10:24:21
265,473,304
0
0
null
2020-05-20T06:35:35
2020-05-20T06:35:35
null
UTF-8
Java
false
false
4,883
java
package com.zscat.mallplus.admin.pms.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zscat.mallplus.manage.service.pms.IPmsProductService; import com.zscat.mallplus.manage.service.pms.IPmsProductUserCollectService; import com.zscat.mallplus.manage.utils.UserUtils; import com.zscat.mallplus.mbg.annotation.IgnoreAuth; import com.zscat.mallplus.mbg.annotation.SysLog; import com.zscat.mallplus.mbg.pms.entity.PmsProductUserCollect; import com.zscat.mallplus.mbg.pms.vo.PmsProductQueryParam; import com.zscat.mallplus.mbg.pms.vo.PmsProductVo; import com.zscat.mallplus.mbg.utils.CommonResult; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; /** * @author xiang.li create date 2020/5/28 description */ @Slf4j @RestController @Api(tags = "PmsProductUserCollectController", description = "单品收藏管理") @RequestMapping("/pms/PmsProductUserCollect") public class PmsProductUserCollectController { @Autowired private IPmsProductService pmsProductService; @Autowired private IPmsProductUserCollectService pmsProductUserCollectService; @SysLog(MODULE = "pms", REMARK = "根据条件查询收藏商品信息列表") @ApiOperation("根据条件查询收藏商品信息列表") @RequestMapping(value = "/listPmsProductByPage",method= RequestMethod.POST) public CommonResult<Page<PmsProductVo>> listPmsProductByPage(@ApiParam("产品信息的扩展类") @RequestBody PmsProductQueryParam queryParam) { queryParam.setDeleteStatus(0); Page<PmsProductVo> pmsProductList = pmsProductService.listPmsProductCollectByPage(queryParam); return new CommonResult().success(pmsProductList); } @SysLog(MODULE = "pms", REMARK = "收藏商品") @ApiOperation("收藏商品") @RequestMapping(value = "/add/{productId}",method= RequestMethod.POST) public CommonResult add(@ApiParam("产品Id") @PathVariable Long productId) { Long matcherUserId = UserUtils.getCurrentMember().getId(); PmsProductUserCollect pmsProductUserCollect = pmsProductUserCollectService.getOne( new QueryWrapper<PmsProductUserCollect>().lambda().eq(PmsProductUserCollect::getProductId, productId) .eq(PmsProductUserCollect::getMatchUserId, matcherUserId)); if(pmsProductUserCollect==null) { pmsProductUserCollect=new PmsProductUserCollect(); pmsProductUserCollect.setMatchUserId(matcherUserId); pmsProductUserCollect.setProductId(productId); pmsProductUserCollectService.save(pmsProductUserCollect); } return new CommonResult().success(); } @SysLog(MODULE = "pms", REMARK = "收藏商品ids") @ApiOperation("收藏商品Ids") @RequestMapping(value = "/list/getIds",method= RequestMethod.POST) public CommonResult getIds() { Long matcherUserId = UserUtils.getCurrentMember().getId(); Set<Long> ids = pmsProductUserCollectService.list( new QueryWrapper<PmsProductUserCollect>().lambda().eq(PmsProductUserCollect::getMatchUserId, matcherUserId)).stream() .map(PmsProductUserCollect::getProductId).collect( Collectors.toSet()); return new CommonResult().success(ids); } @SysLog(MODULE = "pms", REMARK = "取消收藏商品") @ApiOperation("取消收藏商品") @RequestMapping(value = "/delete/{productId}",method= RequestMethod.POST) public CommonResult delete(@ApiParam("产品Id") @PathVariable Long productId) { Long matcherUserId = UserUtils.getCurrentMember().getId(); pmsProductUserCollectService.remove( new QueryWrapper<PmsProductUserCollect>().lambda().eq(PmsProductUserCollect::getProductId, productId) .eq(PmsProductUserCollect::getMatchUserId, matcherUserId)); return new CommonResult().success(); } @SysLog(MODULE = "pms", REMARK = "根据条件查询喜欢商品信息列表") @ApiOperation("根据条件喜欢商品信息列表") @RequestMapping(value = "/listLikePmsProductByPage",method= RequestMethod.POST) public CommonResult<Page<PmsProductVo>> listLikePmsProductByPage(@ApiParam("产品信息的扩展类") @RequestBody PmsProductQueryParam queryParam) { queryParam.setDeleteStatus(0); Page<PmsProductVo> pmsProductList = pmsProductService.listPmsProductCollectByPage(queryParam); return new CommonResult().success(pmsProductList); } }
[ "123456" ]
123456
bbebf943af89856debcfcd100ed9a3a044b7febc
67e735ab2b0f3190968aa248e80a7b3a570f1101
/Spring/14_BankAppWithJavaConfiguration/src/main/java/com/bankapp/model/service/AccountServiceImpl.java
0138918fddc3b9611cb37aeec49fb132807700d0
[]
no_license
DivyaMaddipudi/HCL_Training
7ed68a19552310093895e12deacf0f019b07b49c
c7a6bd9fbac7f3398e7d68e8dce5f72ed13d14ec
refs/heads/master
2023-01-28T18:33:04.969333
2020-12-08T18:05:32
2020-12-08T18:05:32
304,354,730
0
1
null
null
null
null
UTF-8
Java
false
false
3,954
java
package com.bankapp.model.service; import java.util.Arrays; import java.util.List; import javax.transaction.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bankapp.model.dao.Account; import com.bankapp.model.dao.AccountDao; import com.bankapp.model.dao.TransactionEntry; import com.bankapp.model.dao.TransactionEntryDao; import com.bankapp.model.dao.TxType; import com.bankapp.model.service.aspects.Loggable; @Service("accountService") @Transactional public class AccountServiceImpl implements AccountService{ private AccountDao accountDao; public TransactionEntryDao transactionEntryDao; private TransactionEntryService transactionEntryService; @Autowired public AccountServiceImpl(AccountDao accountDao, TransactionEntryDao transactionEntryDao, TransactionEntryService transactionEntryService) { this.accountDao = accountDao; this.transactionEntryDao = transactionEntryDao; this.transactionEntryService = transactionEntryService; } @Override public List<Account> getAllAccounts() { return accountDao.getAllAccounts(); } @Loggable @Override public void deposit(int accountId, double amount) { Account account = accountDao.getAccountById(accountId); account.setBalance(account.getBalance() + amount); accountDao.updateAccount(account); account.setTransactionEntry(transactionEntryDao.getTransactionsById(accountId)); TransactionEntry entry = new TransactionEntry("Deposited to " + accountId , amount, TxType.DEPOSIT); account.getTransactionEntry().add(entry); accountDao.updateAccount(account); // transactionEntryService.addTransaction("deposit to " + accountId , amount, TxType.DEPOSIT); // account.setTransactionEntry(Arrays.asList(transactionEntryDao.addTransaction("deposit to " + accountId , amount, TxType.WITHDRAW))); } @Loggable @Override public void withdraw(int accountId, double amount) { Account account = accountDao.getAccountById(accountId); account.setBalance(account.getBalance() - amount); accountDao.updateAccount(account); TransactionEntry entry = new TransactionEntry("Withdraw from " + accountId , amount, TxType.WITHDRAW); account.getTransactionEntry().add(entry); accountDao.updateAccount(account); } @Loggable @Override public void transfer(int fromAccountId, int toAccountId, double amount) { Account fromAccount = accountDao.getAccountById(fromAccountId); Account toAccount = accountDao.getAccountById(toAccountId); fromAccount.setBalance(fromAccount.getBalance() - amount); toAccount.setBalance(toAccount.getBalance() + amount); accountDao.updateAccount(fromAccount); accountDao.updateAccount(toAccount); TransactionEntry entryFrom = new TransactionEntry("Transferred from account " + fromAccountId + " to account " + toAccountId , amount, TxType.TRANSFER); TransactionEntry entryTo = new TransactionEntry("Credited to your account with account number " + toAccountId + " from account number " + fromAccountId , amount, TxType.TRANSFER); fromAccount.getTransactionEntry().add(entryFrom); toAccount.getTransactionEntry().add(entryTo); accountDao.updateAccount(fromAccount); accountDao.updateAccount(toAccount); } @Override public Account updateAccount(Account account) { Account accountToBeUpdated = accountDao.getAccountById(account.getAccountId()); accountToBeUpdated.setEmail(account.getEmail()); accountToBeUpdated.setPhone(account.getPhone()); accountToBeUpdated.setAddress(account.getAddress()); accountDao.updateAccount(accountToBeUpdated); return accountToBeUpdated; } @Override public Account deleteAccount(int accountId) { return accountDao.deleteAccount(accountId); } @Override public Account getAccountById(int accountId) { return accountDao.getAccountById(accountId); } @Override public Account addAccount(Account account) { return accountDao.addAccount(account); } }
[ "divya.maddipudi1@gmail.com" ]
divya.maddipudi1@gmail.com
3775fafa1f9d448553e7620315154262fa7cef3b
5173401b07057d0a873500f9b2fdc791c107652a
/SiaSoft/src/pt/inescporto/siasoft/asq/ejb/dao/ScopeDao.java
f78353fd00cc7c93ccda6f06ced201ed49822d69
[]
no_license
pedrocleto/Java
3d273f08414f9f4135855900840ca01cae64988e
b144bd57bd8c55b2b24452284b72754a518dd9e3
refs/heads/master
2021-01-01T16:31:29.972484
2013-08-10T09:49:34
2013-08-10T09:49:34
12,018,789
1
0
null
null
null
null
ISO-8859-1
Java
false
false
642
java
package pt.inescporto.siasoft.asq.ejb.dao; import pt.inescporto.template.elements.TplString; import pt.inescporto.template.elements.TmplKeyTypes; /** * <p>Title: SIASoft</p> * * <p>Description: Gestão do Ambiente</p> * * <p>Copyright: Copyright (c) 2005</p> * * <p>Company: INESC Porto</p> * * @author jap * @version 0.1 */ public class ScopeDao implements java.io.Serializable { public TplString scopeId = new TplString(0, "scopeId", 20, TmplKeyTypes.PKKEY, true); public TplString scopeDescription = new TplString(1, "scopeDescription", 200, TmplKeyTypes.NOKEY, true); public ScopeDao() { } }
[ "pedrovsky@gmail.com" ]
pedrovsky@gmail.com
25665bf2515efc7d27c42d53260eb5bfab2c1e95
d17429c19ae58c1c0d3801b98fce262deee892c2
/nucleus-core/src/main/java/io/github/nucleuspowered/nucleus/core/scaffold/listener/ListenerReloadableWrapper.java
c40a7896299dce61feee1ee5dfe2db75dc4cac83
[ "Apache-2.0", "MIT" ]
permissive
NucleusPowered/Nucleus
c13f95457c96c2d60547f20f1f6437b7baac5260
3f40e122dc4090da2d58aa290694093607a5c5d1
refs/heads/v3
2022-11-10T07:51:24.418899
2022-11-02T22:29:05
2022-11-02T22:29:05
52,825,114
192
151
MIT
2022-08-18T19:28:15
2016-02-29T21:12:30
Java
UTF-8
Java
false
false
1,051
java
/* * This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file * at the root of this project for more details. */ package io.github.nucleuspowered.nucleus.core.scaffold.listener; import io.github.nucleuspowered.nucleus.core.services.INucleusServiceCollection; import io.github.nucleuspowered.nucleus.core.services.interfaces.IReloadableService; import org.spongepowered.api.Sponge; public class ListenerReloadableWrapper implements IReloadableService.Reloadable { private final ListenerBase.Conditional listenerBase; public ListenerReloadableWrapper(final ListenerBase.Conditional listenerBase) { this.listenerBase = listenerBase; } @Override public void onReload(final INucleusServiceCollection serviceCollection) { Sponge.eventManager().unregisterListeners(this.listenerBase); if (this.listenerBase.shouldEnable(serviceCollection)) { Sponge.eventManager().registerListeners(serviceCollection.pluginContainer(), this.listenerBase); } } }
[ "git@drnaylor.co.uk" ]
git@drnaylor.co.uk
7667fe933e723486a6095fc1b83edcaf28f3ae9a
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/is/dep/rec/IS_DEP_4000_MPARTLISTRecord.java
98279a1343f98160193c6f1259c83c3a42483de9
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
1,445
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.is.dep.rec; import java.sql.*; import chosun.ciis.is.dep.dm.*; import chosun.ciis.is.dep.ds.*; /** * */ public class IS_DEP_4000_MPARTLISTRecord extends java.lang.Object implements java.io.Serializable{ public String dept_cd; public String dept_nm; public String supr_dept_cd; public IS_DEP_4000_MPARTLISTRecord(){} public void setDept_cd(String dept_cd){ this.dept_cd = dept_cd; } public void setDept_nm(String dept_nm){ this.dept_nm = dept_nm; } public void setSupr_dept_cd(String supr_dept_cd){ this.supr_dept_cd = supr_dept_cd; } public String getDept_cd(){ return this.dept_cd; } public String getDept_nm(){ return this.dept_nm; } public String getSupr_dept_cd(){ return this.supr_dept_cd; } } /* 작성시간 : Tue Jun 12 14:51:19 KST 2012 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
c58136f2f52e315273a97b7fcfdc450ed9f75dde
1c5fd654b46d3fb018032dc11aa17552b64b191c
/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandlerTests.java
a14110f0d317ccf64534880c03a450d72df19199
[ "Apache-2.0" ]
permissive
yangfancoming/spring-boot-build
6ce9b97b105e401a4016ae4b75964ef93beeb9f1
3d4b8cbb8fea3e68617490609a68ded8f034bc67
refs/heads/master
2023-01-07T11:10:28.181679
2021-06-21T11:46:46
2021-06-21T11:46:46
193,871,877
0
0
Apache-2.0
2022-12-27T14:52:46
2019-06-26T09:19:40
Java
UTF-8
Java
false
false
7,493
java
package org.springframework.boot.context.properties.bind.validation; import java.util.ArrayList; import java.util.List; import java.util.Set; import javax.validation.Valid; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.springframework.boot.context.properties.bind.BindException; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationProperty; import org.springframework.boot.context.properties.source.ConfigurationPropertyName; import org.springframework.boot.context.properties.source.ConfigurationPropertySource; import org.springframework.boot.context.properties.source.MockConfigurationPropertySource; import org.springframework.boot.origin.Origin; import org.springframework.validation.FieldError; import org.springframework.validation.ObjectError; import org.springframework.validation.annotation.Validated; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.instanceOf; /** * Tests for {@link ValidationBindHandler}. * * @author Phillip Webb * @author Madhura Bhave */ public class ValidationBindHandlerTests { @Rule public ExpectedException thrown = ExpectedException.none(); private List<ConfigurationPropertySource> sources = new ArrayList<>(); private ValidationBindHandler handler; private Binder binder; @Before public void setup() { this.binder = new Binder(this.sources); LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean(); validator.afterPropertiesSet(); this.handler = new ValidationBindHandler(validator); } @Test public void bindShouldBindWithoutHandler() { this.sources.add(new MockConfigurationPropertySource("foo.age", 4)); ExampleValidatedBean bean = this.binder .bind("foo", Bindable.of(ExampleValidatedBean.class)).get(); assertThat(bean.getAge()).isEqualTo(4); } @Test public void bindShouldFailWithHandler() { this.sources.add(new MockConfigurationPropertySource("foo.age", 4)); this.thrown.expect(BindException.class); this.thrown.expectCause(instanceOf(BindValidationException.class)); this.binder.bind("foo", Bindable.of(ExampleValidatedBean.class), this.handler); } @Test public void bindShouldValidateNestedProperties() { this.sources.add(new MockConfigurationPropertySource("foo.nested.age", 4)); this.thrown.expect(BindException.class); this.thrown.expectCause(instanceOf(BindValidationException.class)); this.binder.bind("foo", Bindable.of(ExampleValidatedWithNestedBean.class), this.handler); } @Test public void bindShouldFailWithAccessToOrigin() { this.sources.add(new MockConfigurationPropertySource("foo.age", 4, "file")); BindValidationException cause = bindAndExpectValidationError( () -> this.binder.bind(ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedBean.class), this.handler)); ObjectError objectError = cause.getValidationErrors().getAllErrors().get(0); assertThat(Origin.from(objectError).toString()).isEqualTo("file"); } @Test public void bindShouldFailWithAccessToBoundProperties() { MockConfigurationPropertySource source = new MockConfigurationPropertySource(); source.put("foo.nested.name", "baz"); source.put("foo.nested.age", "4"); source.put("faf.bar", "baz"); this.sources.add(source); BindValidationException cause = bindAndExpectValidationError( () -> this.binder.bind(ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedWithNestedBean.class), this.handler)); Set<ConfigurationProperty> boundProperties = cause.getValidationErrors() .getBoundProperties(); assertThat(boundProperties).extracting((p) -> p.getName().toString()) .contains("foo.nested.age", "foo.nested.name"); } @Test public void bindShouldFailWithAccessToName() { this.sources.add(new MockConfigurationPropertySource("foo.nested.age", "4")); BindValidationException cause = bindAndExpectValidationError( () -> this.binder.bind(ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedWithNestedBean.class), this.handler)); assertThat(cause.getValidationErrors().getName().toString()).isEqualTo("foo"); assertThat(cause.getMessage()).contains("nested.age"); } @Test public void bindShouldFailIfExistingValueIsInvalid() { ExampleValidatedBean existingValue = new ExampleValidatedBean(); BindValidationException cause = bindAndExpectValidationError( () -> this.binder.bind(ConfigurationPropertyName.of("foo"), Bindable .of(ExampleValidatedBean.class).withExistingValue(existingValue), this.handler)); FieldError fieldError = (FieldError) cause.getValidationErrors().getAllErrors() .get(0); assertThat(fieldError.getField()).isEqualTo("age"); } @Test public void bindShouldValidateWithoutAnnotation() { ExampleNonValidatedBean existingValue = new ExampleNonValidatedBean(); bindAndExpectValidationError( () -> this.binder.bind(ConfigurationPropertyName.of("foo"), Bindable.of(ExampleNonValidatedBean.class) .withExistingValue(existingValue), this.handler)); } @Test public void bindShouldNotValidateDepthGreaterThanZero() { // gh-12227 MockConfigurationPropertySource source = new MockConfigurationPropertySource(); source.put("foo.bar", "baz"); this.sources.add(source); ExampleValidatedBeanWithGetterException existingValue = new ExampleValidatedBeanWithGetterException(); this.binder.bind(ConfigurationPropertyName.of("foo"), Bindable.of(ExampleValidatedBeanWithGetterException.class) .withExistingValue(existingValue), this.handler); } private BindValidationException bindAndExpectValidationError(Runnable action) { try { action.run(); } catch (BindException ex) { BindValidationException cause = (BindValidationException) ex.getCause(); return cause; } throw new IllegalStateException("Did not throw"); } public static class ExampleNonValidatedBean { @Min(5) private int age; public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } } @Validated public static class ExampleValidatedBean { @Min(5) private int age; public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } } @Validated public static class ExampleValidatedWithNestedBean { @Valid private ExampleNested nested = new ExampleNested(); public ExampleNested getNested() { return this.nested; } public void setNested(ExampleNested nested) { this.nested = nested; } } public static class ExampleNested { private String name; @Min(5) private int age; @NotNull private String address; public String getName() { return this.name; } public void setName(String name) { this.name = name; } public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } public String getAddress() { return this.address; } public void setAddress(String address) { this.address = address; } } @Validated public static class ExampleValidatedBeanWithGetterException { public int getAge() { throw new RuntimeException(); } } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
7207666748415f62d10dc405939aa227b6760d41
ed7e894616655307bead55f9133ca5259fb88e2c
/src/test/java/nl/jqno/equalsverifier/integration/extended_contract/NullFieldsTest.java
04dc36f09c0418d53757cfbfe04a0a495727c6c3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ikumar3/equalsverifier
51136c24bb1a15f8f527938e14d0c32fe899d489
cedf5f95e660937b0f216390cbb621d0792eedf0
refs/heads/master
2021-01-15T10:25:36.074398
2015-09-24T21:20:06
2015-09-24T21:20:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,699
java
/* * Copyright 2009-2010, 2013-2014 Jan Ouwens * * 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 nl.jqno.equalsverifier.integration.extended_contract; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; import nl.jqno.equalsverifier.testhelpers.IntegrationTestBase; import nl.jqno.equalsverifier.testhelpers.types.Color; import org.junit.Test; import static nl.jqno.equalsverifier.testhelpers.Util.defaultEquals; import static nl.jqno.equalsverifier.testhelpers.Util.defaultHashCode; @SuppressWarnings("unused") // because of the use of defaultEquals and defaultHashCode public class NullFieldsTest extends IntegrationTestBase { private static final String NON_NULLITY = "Non-nullity"; private static final String EQUALS = "equals throws NullPointerException"; private static final String HASHCODE = "hashCode throws NullPointerException"; private static final String ON_FIELD = "on field"; @Test public void fail_whenEqualsThrowsNpeOnThissField() { expectFailureWithCause(NullPointerException.class, NON_NULLITY, EQUALS, ON_FIELD, "color"); EqualsVerifier.forClass(EqualsThrowsNpeOnThis.class) .verify(); } @Test public void fail_whenEqualsThrowsNpeOnOthersField() { expectFailureWithCause(NullPointerException.class, NON_NULLITY, EQUALS, ON_FIELD, "color"); EqualsVerifier.forClass(EqualsThrowsNpeOnOther.class) .verify(); } @Test public void fail_whenHashCodeThrowsNpe() { expectFailureWithCause(NullPointerException.class, NON_NULLITY, HASHCODE, ON_FIELD, "color"); EqualsVerifier.forClass(HashCodeThrowsNpe.class) .verify(); } @Test public void succeed_whenEqualsThrowsNpeOnThissField_givenExamples() { EqualsThrowsNpeOnThis blue = new EqualsThrowsNpeOnThis(Color.BLUE); EqualsThrowsNpeOnThis yellow = new EqualsThrowsNpeOnThis(Color.YELLOW); EqualsVerifier.forExamples(blue, yellow) .suppress(Warning.NULL_FIELDS) .verify(); } @Test public void succeed_whenEqualsThrowsNpeOnThissField_givenWarningIsSuppressed() { EqualsVerifier.forClass(EqualsThrowsNpeOnThis.class) .suppress(Warning.NULL_FIELDS) .verify(); } @Test public void succeed_whenEqualsTestFieldWhichThrowsNpe() { EqualsVerifier.forClass(CheckedDeepNullA.class) .verify(); } @Test public void succeed_whenEqualsThrowsNpeOnFieldWhichAlsoThrowsNpe_givenWarningIsSuppressed() { EqualsVerifier.forClass(DeepNullA.class) .suppress(Warning.NULL_FIELDS) .verify(); } @Test public void succeed_whenDoingASanityCheckOnTheFieldUsedInThePreviousTests_givenWarningIsSuppressed() { EqualsVerifier.forClass(DeepNullB.class) .suppress(Warning.NULL_FIELDS) .verify(); } @Test public void succeed_whenConstantFieldIsNull() { EqualsVerifier.forClass(ConstantFieldIsNull.class) .verify(); } static final class EqualsThrowsNpeOnThis { private final Color color; public EqualsThrowsNpeOnThis(Color color) { this.color = color; } @Override public boolean equals(Object obj) { if (!(obj instanceof EqualsThrowsNpeOnThis)) { return false; } EqualsThrowsNpeOnThis p = (EqualsThrowsNpeOnThis)obj; return color.equals(p.color); } @Override public int hashCode() { return defaultHashCode(this); } } static final class EqualsThrowsNpeOnOther { private final Color color; public EqualsThrowsNpeOnOther(Color color) { this.color = color; } @Override public boolean equals(Object obj) { if (!(obj instanceof EqualsThrowsNpeOnOther)) { return false; } EqualsThrowsNpeOnOther p = (EqualsThrowsNpeOnOther)obj; return p.color.equals(color); } @Override public int hashCode() { return defaultHashCode(this); } } static final class HashCodeThrowsNpe { private final Color color; public HashCodeThrowsNpe(Color color) { this.color = color; } @Override public boolean equals(Object obj) { return defaultEquals(this, obj); } @Override public int hashCode() { return color.hashCode(); } @Override public String toString() { //Object.toString calls hashCode() return ""; } } static final class CheckedDeepNullA { private final DeepNullB b; public CheckedDeepNullA(DeepNullB b) { this.b = b; } @Override public boolean equals(Object obj) { return defaultEquals(this, obj); } @Override public int hashCode() { return defaultHashCode(this); } } static final class DeepNullA { private final DeepNullB b; public DeepNullA(DeepNullB b) { if (b == null) { throw new NullPointerException("b"); } this.b = b; } @Override public boolean equals(Object obj) { return defaultEquals(this, obj); } @Override public int hashCode() { return defaultHashCode(this); } } static final class DeepNullB { private final Object o; public DeepNullB(Object o) { if (o == null) { throw new NullPointerException("o"); } this.o = o; } @Override public boolean equals(Object obj) { return defaultEquals(this, obj); } @Override public int hashCode() { return defaultHashCode(this); } } static final class ConstantFieldIsNull { private static final String NULL_CONSTANT = null; private final Object o; public ConstantFieldIsNull(Object o) { this.o = o; } @Override public boolean equals(Object obj) { return defaultEquals(this, obj); } @Override public int hashCode() { return defaultHashCode(this); } } }
[ "jan.ouwens@gmail.com" ]
jan.ouwens@gmail.com
a4fdcaffc867ea11eafab0569d46fd47f7d01b8d
964601fff9212bec9117c59006745e124b49e1e3
/matos-annotations/src/main/java/com/francetelecom/rd/stubs/annotation/ArgsRules.java
f73e77b2b9ff0b1674ac2e6f7beb4c4b8c778c1e
[ "Apache-2.0" ]
permissive
vadosnaprimer/matos-profiles
bf8300b04bef13596f655d001fc8b72315916693
fb27c246911437070052197aa3ef91f9aaac6fc3
refs/heads/master
2020-05-23T07:48:46.135878
2016-04-05T13:14:42
2016-04-05T13:14:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,145
java
package com.francetelecom.rd.stubs.annotation; /* * #%L * Matos * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2008 - 2014 Orange SA * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Several ArgsRule on the same component. * @author Pierre Cregut * */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) public @interface ArgsRules { /** * The rules. * @return */ public ArgsRule [] value(); }
[ "pierre.cregut@orange.com" ]
pierre.cregut@orange.com
fecfbdc50625e7a9717f1aa96338b8b60d471911
e9d98aa0d0f9e684db84fae1069a657d679e3a64
/05.Spring/Ex08-01-Board/src/main/java/com/study/spring13/command/BCommand.java
c0c5dc4ce44f3a2c072113fd21f0d7ad0dab91ca
[]
no_license
jbisne/Web
d6190b2a26abd82d8b06d3e8543fedb243a522b1
425d795bbb38622dd394e912a17562828d060fb6
refs/heads/master
2022-12-23T21:53:17.202096
2019-06-08T20:26:34
2019-06-08T20:26:34
172,474,634
0
0
null
2022-12-16T02:41:48
2019-02-25T09:25:41
JavaScript
UTF-8
Java
false
false
313
java
package com.study.spring13.command; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import org.springframework.ui.Model; import com.study.spring13.dao.BDao; import com.study.spring13.dto.BDto; public interface BCommand { void execute(HttpServletRequest request , Model model); }
[ "jisun7894@gmail.com" ]
jisun7894@gmail.com
70c5c7c209150d670d83ed93ef46005a0eefc0c3
5d2236dfee487a63e83479d60106c40fb58f3a36
/2015-jfokus/jfokus/src/test/java/demo/web/HomeControllerIntegrationTest.java
978db6c19dbbaa6b7af142e5da07fcc15f4531dc
[]
no_license
mishin/presos
98c6c8f9b701c13789379aa2f90f61f47baa9af4
602ca5b9490274b650c65f86c4b35e4d5834e961
refs/heads/master
2021-01-15T18:51:39.683458
2015-02-02T16:10:42
2015-02-02T16:10:42
60,700,359
1
0
null
2016-06-08T13:34:54
2016-06-08T13:34:54
null
UTF-8
Java
false
false
952
java
package demo.web; import demo.DemoApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.boot.test.TestRestTemplate; import org.springframework.boot.test.WebIntegrationTest; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static org.hamcrest.core.Is.*; import static org.junit.Assert.*; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = DemoApplication.class) @WebIntegrationTest(randomPort = true) public class HomeControllerIntegrationTest { @Value("${local.server.port}") private int port; @Test public void runAndTestHome() { String url = "http://localhost:" + port + "/"; String body = new TestRestTemplate("hero", "hero").getForObject(url, String.class); assertThat(body, is("Hello Jfokus")); } }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
0c6fa0477c8e22d3ad19681d2afdc15b7d84afc5
18ecbf7653c8d762fe343fa26d6c44408620c7ea
/c-bbs/src/main/java/com/redmoon/forum/plugin/entrance/MasterEntrance.java
c984d0d573e6923749f54f4da2543db9d8024808
[]
no_license
cloudwebsoft/ywoa
7ef667de489006a71f697f962a0bac2aa1eec57d
9aee0a5a206e8f5448ba70e14ec429470ba524d7
refs/heads/oa_git6.0
2022-07-28T21:17:06.523669
2021-07-15T00:16:12
2021-07-15T00:16:12
181,577,992
33
10
null
2021-06-15T13:44:46
2019-04-15T23:07:47
Java
UTF-8
Java
false
false
1,900
java
package com.redmoon.forum.plugin.entrance; import com.redmoon.forum.plugin.base.IPluginEntrance; import com.redmoon.forum.Privilege; import javax.servlet.http.HttpServletRequest; import cn.js.fan.util.ErrMsgException; import com.redmoon.forum.BoardEntranceDb; import cn.js.fan.web.SkinUtil; public class MasterEntrance implements IPluginEntrance { public static String CODE = "master"; public MasterEntrance() { } public boolean canEnter(HttpServletRequest request, String boardCode) throws ErrMsgException{ Privilege pvg = new Privilege(); if (pvg.isMasterLogin(request)) // 这样从后台登录的就可以进入 return true; // 验证用户 if (!pvg.isUserLogin(request)) { throw new ErrMsgException(SkinUtil.LoadString(request,"res.forum.plugin.entrance","err_entrance"));//对不起,只有版主才能进入! } if (pvg.isMasterLogin(request)) return true; else { // 查询用户是否为管理员 // MasterDb md = new MasterDb(); // md = md.getMasterDb(pvg.getUser(request)); // if (!md.isLoaded()) { // } throw new ErrMsgException("对不起,只有论坛管理员才能进入"); } } public boolean isPluginBoard(String boardCode) { BoardEntranceDb be = new BoardEntranceDb(); be = be.getBoardEntranceDb(boardCode, CODE); if (be.isLoaded()) return true; else return false; } public boolean canAddReply(HttpServletRequest request, String boardCode, long rootid) { return true; } public boolean canAddNew(HttpServletRequest request, String boardCode) { return true; } public boolean canVote(HttpServletRequest request, String boardCode) throws ErrMsgException { return true; } }
[ "bestfeng@163.com" ]
bestfeng@163.com
d9c78bfdd52379321d9070243801dba0e96ab437
6d29d4b533fec734e898ea422db3b80a10947784
/plugins/org.fusesource.ide.deployment/src/org/fusesource/ide/deployment/maven/ProjectDropTarget.java
1d8e4adf8189c9ddc5d795534d8db5a6caebd052
[]
no_license
rcernich/fuseide
fb86c8a873a738dbe51cb0abb56604240dc2519a
4cbbefdb73deb09c099b6b29434c21f37d575a6e
refs/heads/master
2020-12-25T12:17:12.790499
2013-01-08T00:01:36
2013-01-08T00:01:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package org.fusesource.ide.deployment.maven; import org.apache.maven.model.Model; import org.eclipse.core.resources.IProject; public interface ProjectDropTarget { /** * Handles dropping the project which may have a maven model associated with it */ public void dropProject(IProject project, Model mavenModel); }
[ "james.strachan@gmail.com" ]
james.strachan@gmail.com
723f9235e05a4808dc81d2d56628beaf78c5d79f
a57d8bf94ca13ae05837412cf2ab2fe19dd7d3f6
/src/day15_Scanner/Scanner_PersonalInfo.java
53239421846a36fed29790fb1bdfa676216f1451
[]
no_license
SerdarAnnakurdov/myAllFilesCybertek
1bdeb3feba7664f6346bf3a4f62ae825a54ccbe9
61260280d14d841cf02e1df8981c0f602ea0dd73
refs/heads/master
2023-02-23T09:57:30.270111
2021-02-01T21:31:33
2021-02-01T21:31:33
333,541,067
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package day15_Scanner; import java.util.Scanner; public class Scanner_PersonalInfo { public static void main(String[] args) { Scanner info = new Scanner(System.in); System.out.println("Please enter your age: "); byte age = info.nextByte(); System.out.println("Please enter your favorite number"); long favNum = info.nextLong(); System.out.println("Are you student ? Enter true of false"); boolean isStudents = info.nextBoolean(); System.out.println("Age"+age); System.out.println("Favorite number: "+favNum); System.out.println("Is a student: "+isStudents); if(isStudents){ System.out.println("You are student"); }else{ System.out.println("Oh okay, you aren't a student"); } } }
[ "serjonchik@gmail.com" ]
serjonchik@gmail.com
6196b3fdcf36ee8039a17e9f3c6972bc8760356d
69c597b1afda7c448b1470d29c3f05936b350561
/YiBo/src/net/dev123/yibo/service/task/QueryResponseCountTask.java
22a1badcd73ebc5de2a1fec1401aa8eeda98a5b8
[]
no_license
dawndiy/YiBo
c7fc89cc0992f1f8c4a4ac790961e49b486e9966
ad9e1c43c006e29f3a5a562c6e3ce7222332ee54
refs/heads/master
2021-01-18T13:14:15.775845
2013-03-02T14:19:13
2013-03-02T14:19:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,562
java
package net.dev123.yibo.service.task; import net.dev123.commons.ServiceProvider; import net.dev123.exception.ExceptionCode; import net.dev123.exception.LibException; import net.dev123.mblog.MicroBlog; import net.dev123.mblog.entity.ResponseCount; import net.dev123.yibo.MicroBlogActivity; import net.dev123.yibo.R; import net.dev123.yibo.YiBoApplication; import net.dev123.yibo.common.CompatibilityUtil; import net.dev123.yibo.common.Constants; import net.dev123.yibo.common.GlobalResource; import net.dev123.yibo.common.GlobalVars; import net.dev123.yibo.common.NetType; import net.dev123.yibo.common.ResourceBook; import android.app.Activity; import android.content.Context; import android.os.AsyncTask; import android.util.Log; import android.widget.TextView; public class QueryResponseCountTask extends AsyncTask<Void, Void, ResponseCount> { private static final String LOG_TAG = "QueryStatusCount"; private Context context; private MicroBlog microBlog = null; private String resultMsg = null; //更新列表的转发和评论 net.dev123.mblog.entity.Status status; TextView tvResponse; public QueryResponseCountTask(Context context, net.dev123.mblog.entity.Status status) { this.context = context; this.status = status; YiBoApplication yibo = (YiBoApplication)((Activity)context).getApplication(); microBlog = GlobalVars.getMicroBlog(yibo.getCurrentAccount()); } public QueryResponseCountTask(Context context, net.dev123.mblog.entity.Status status, TextView tvResponse) { this.context = context; this.status = status; this.tvResponse = tvResponse; YiBoApplication yibo = (YiBoApplication)((Activity)context).getApplication(); microBlog = GlobalVars.getMicroBlog(yibo.getCurrentAccount()); } @Override protected void onPreExecute() { super.onPreExecute(); if (GlobalVars.NET_TYPE == NetType.NONE) { resultMsg = ResourceBook.getStatusCodeValue(ExceptionCode.NET_UNCONNECTED, context); cancel(true); onPostExecute(null); } if (context instanceof MicroBlogActivity) { int retweetCount = (status.getRetweetCount() == null ? 0 : status.getRetweetCount()); int commentCount = (status.getCommentCount() == null ? 0 : status.getCommentCount()); fillClickableResponseCount(retweetCount, commentCount); } else { if (CompatibilityUtil.isSdk1_5()) { if (Constants.DEBUG) Log.v(LOG_TAG, "sdk1.5"); cancel(true); } } } @Override protected ResponseCount doInBackground(Void... params) { if (microBlog == null || status == null) { return null; } if (status.getServiceProvider() == ServiceProvider.Twitter) { //Twitter不支持Count接口 return null; } ResponseCount count = null; try { count = microBlog.getResponseCount(status); } catch (LibException e) { if (Constants.DEBUG) Log.e(LOG_TAG, resultMsg, e); if (e.getExceptionCode() != ExceptionCode.UNSUPPORTED_API) { resultMsg = ResourceBook.getStatusCodeValue(e.getExceptionCode(), context); } } return count; } @Override protected void onPostExecute(ResponseCount result) { super.onPreExecute(); if (result != null) { status.setRetweetCount(result.getRetweetCount()); status.setCommentCount(result.getCommentsCount()); String responseFormat = GlobalResource.getStatusResponseFormat(context); if (context instanceof MicroBlogActivity) { fillClickableResponseCount(result.getRetweetCount(), result.getCommentsCount()); } else if (tvResponse != null) { String responseText = String.format( responseFormat, result.getRetweetCount(), result.getCommentsCount()); tvResponse.setText(responseText); } } else { if (tvResponse == null && resultMsg != null) { //Toast.makeText(context, resultMsg, Toast.LENGTH_SHORT).show(); } } } private void fillClickableResponseCount(int retweetCount, int commentCount) { TextView tvRetweetCount = (TextView)((Activity)context).findViewById(R.id.tvRetweetCount); TextView tvCommentCount = (TextView)((Activity)context).findViewById(R.id.tvCommentCount); String retweetCountText = context.getString( R.string.label_blog_retweet_count, retweetCount); String commentCountText = context.getString( R.string.label_blog_comment_count, commentCount); tvRetweetCount.setText(retweetCountText); tvCommentCount.setText(commentCountText); } }
[ "cattong@cattong-THINK" ]
cattong@cattong-THINK
797ee47cc5261a680b271fef709cf0a2beb92c2c
7b0521dfb4ec76ee1632b614f32ee532f4626ea2
/src/main/java/alcoholmod/Mathioks/NPC/EntityChuninSpawn.java
a19f2fb40128ca6b3da330a1a77d3f3bb48388c9
[]
no_license
M9wo/NarutoUnderworld
6c5be180ab3a00b4664fd74f6305e7a1b50fe9fc
948065d8d43b0020443c0020775991b91f01dd50
refs/heads/master
2023-06-29T09:27:24.629868
2021-07-27T03:18:08
2021-07-27T03:18:08
389,832,397
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
package alcoholmod.Mathioks.NPC; import alcoholmod.Mathioks.AlcoholMod; import cpw.mods.fml.common.registry.EntityRegistry; import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.biome.BiomeGenBase; public class EntityChuninSpawn { public static void mainRegistry() { registerEntity(); } public static void registerEntity() { createEntity(EntityChunin.class, "EntityChuninModel Mob", 328965, 11207941); } public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) { int randomId = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId); EntityRegistry.registerModEntity(entityClass, entityName, randomId, AlcoholMod.modInstance, 64, 1, true); EntityRegistry.addSpawn(entityClass, 0, 0, 0, EnumCreatureType.monster, new BiomeGenBase[] { BiomeGenBase.taigaHills }); createEgg(randomId, solidColor, spotColor); } private static void createEgg(int randomid, int solidColor, int spotColor) { EntityList.entityEggs.put(Integer.valueOf(randomid), new EntityList.EntityEggInfo(randomid, solidColor, spotColor)); } }
[ "mrkrank2023@gmail.com" ]
mrkrank2023@gmail.com
33dbfdc4ac29d2046ec563e2a8e5d0d167e1dea3
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/26/org/jfree/chart/axis/NumberAxis_refreshTicks_1144.java
5f46767b109a39266c5d9301017b694dac98998b
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,334
java
org jfree chart axi axi displai numer data axi set automat determin rang fit data ensur rang includ statistician prefer set code auto rang includ autorangeincludeszero code flag code code code number axi numberaxi code mechan automat select tick unit current axi rang mechan adapt code suggest laurenc vanhelsuw number axi numberaxi axi valueaxi cloneabl serializ calcul posit tick label axi store result tick label list readi draw param graphic devic param state axi state param data area dataarea area plot drawn param edg locat axi list tick list refresh tick refreshtick graphics2 graphics2d axi state axisst state rectangle2 rectangle2d data area dataarea rectangl edg rectangleedg edg list result java util arrai list arraylist rectangl edg rectangleedg top bottom istoporbottom edg result refresh tick horizont refreshtickshorizont data area dataarea edg rectangl edg rectangleedg left isleftorright edg result refresh tick vertic refreshticksvert data area dataarea edg result
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
7cb3270bba133305c2c8375369d98a55d8d86415
449a9f9e11d140d83872bc42285f1924d403fbf1
/src/main/java/com/iqmsoft/boot/struts/service/ServiceFacade.java
5d140b1c53a8c3f9e741ab1d79b9d1042594dc0a
[]
no_license
Murugar/SpringBootStruts2
df2b4c9429236eb3d1ea5c8d76afa66a04e28967
0025403239260f4b0921bf2b7186063138c04b15
refs/heads/master
2018-10-22T07:48:33.433103
2018-07-21T02:28:35
2018-07-21T02:28:35
104,071,096
0
0
null
null
null
null
UTF-8
Java
false
false
198
java
package com.iqmsoft.boot.struts.service; import java.util.List; import com.iqmsoft.boot.struts.model.User; public interface ServiceFacade { void putUsers(); List<User> retrieveUsers(); }
[ "davanon2014@gmail.com" ]
davanon2014@gmail.com
8da9e15da0e529e980acb6d2372541a41b137b34
78066223c642a052b53981d19f63d830c9d8f322
/app/src/main/java/com/retrofit/kit/data/remote/service/RemoteObserverService.java
6939ceb37149fb90e60c580576e1417fb3e0b164
[]
no_license
rohityadavnotes/RetrofitKit
7fc6a9e75731e6a5e27fa5fd9c13d47a64bf4f25
85fdb6bfa0eb7973fd6b1268e16e4692165c689b
refs/heads/master
2023-05-26T04:33:57.004861
2021-05-17T05:14:46
2021-05-17T05:14:46
368,063,051
0
0
null
null
null
null
UTF-8
Java
false
false
3,057
java
package com.retrofit.kit.data.remote.service; import com.retrofit.kit.data.remote.RemoteResponse; import com.retrofit.kit.data.remote.util.RemoteConfiguration; import com.retrofit.kit.model.Data; import com.retrofit.kit.model.Employee; import com.retrofit.kit.model.EmployeeList; import com.retrofit.kit.model.Page; import java.util.Map; import io.reactivex.Observable; import okhttp3.MultipartBody; import okhttp3.RequestBody; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.Response; import retrofit2.http.Field; import retrofit2.http.FieldMap; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.Multipart; import retrofit2.http.POST; import retrofit2.http.Part; import retrofit2.http.Url; public interface RemoteObserverService { @GET(RemoteConfiguration.EMPLOYEE) Observable<Response<RemoteResponse<Employee>>> getEmployee(); @GET(RemoteConfiguration.EMPLOYEE_LIST) Observable<Response<RemoteResponse<EmployeeList>>> getEmployeeList(); /** * Post request with dynamic url and map * * @param url URL path * @param requestMap request parameters * @return * * Map<String, String> paramMap = new HashMap<>(); * * paramMap.put("key", "00d91e8e0cca2b76f515926a36db68f5"); * paramMap.put("phone", "13594347817"); * paramMap.put("password", "123456"); * * postMap(url, paramMap) */ @FormUrlEncoded @POST Call<ResponseBody> postMap(@Url String url, @FieldMap Map<String, String> requestMap); @Multipart @POST(RemoteConfiguration.SIGN_UP) Observable<Response<RemoteResponse<Data>>> signUp( @Part MultipartBody.Part profilePic, @Part("firstName") RequestBody firstName, @Part("lastName") RequestBody lastName, @Part("gender") RequestBody gender, @Part("countryCode") RequestBody countryCode, @Part("phoneNumber") RequestBody phoneNumber, @Part("email") RequestBody email, @Part("password") RequestBody password, @Part("fcmToken") RequestBody fcmToken); @FormUrlEncoded @POST(RemoteConfiguration.SIGN_IN) Observable<Response<RemoteResponse<Data>>> signIn( @Field("email") String email, @Field("password") String password, @Field("fcmToken") String fcmToken); @FormUrlEncoded @POST(RemoteConfiguration.SOCIAL_SIGN_IN) Observable<Response<RemoteResponse<Data>>> socialSignIn( @Field("provider") String provider, @Field("socialId") String socialId, @Field("picture") String picture, @Field("firstName") String firstName, @Field("lastName") String lastName, @Field("email") String email, @Field("fcmToken") String fcmToken); @FormUrlEncoded @POST(RemoteConfiguration.GET_USERS) Observable<Response<RemoteResponse<Page>>> getPage( @Field("apiKey") String key, @Field("pageNumber") String pageNumber); }
[ "rohitnotes24@gmail.com" ]
rohitnotes24@gmail.com
aeea277b9ac2a9b47949664850471cf0e2421715
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a020/A020767Test.java
01da10ad107302e20b5871eab4fc2b108f530f41
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a020; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A020767Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
51b4f083c478efc8fa7c93ceb8ad07915dfd4c4c
51d3f4ad9c394df68833f99e0dbd4dce363a56c0
/src/test/java/Airline/domain/testTicket.java
7f619e1489563e193a90b985cc504a1ca589a4cd
[]
no_license
JakoetTH/OpenshiftDeployment
569a25440f1bb6e8e42599110952851994ca4cf0
3f03215a32d80acbc76a1b77a64e7179d86aa15f
refs/heads/master
2021-01-16T01:01:26.186729
2015-09-18T18:15:26
2015-09-18T18:15:26
42,738,657
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
package Airline.domain; import Airline.conf.TicketFactory; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.After; public class testTicket { private Ticket ticket; private Ticket newTicket; @Before public void setUp() { ticket = TicketFactory.createTicket(123,"Business"); } @Test public void testCreateTicket() throws Exception { Assert.assertEquals("Business",ticket.getTicketClass()); } @Test public void testUpdateTicket() { newTicket = new Ticket .Builder("Standard") .copy(ticket) .build(); Assert.assertEquals("Standard",newTicket.getTicketClass()); } @After public void tearDown() { } }
[ "thawhirwow@gmail.com" ]
thawhirwow@gmail.com
ebdcd70add9438e69c5f1b0f38ff0d61148cf9cb
0f30d43960d46961688497af9004c2f154d71877
/color/target/java/ts15/src/thx/_Validation/Validation_Impl__val7_130__Fun_0.java
ee7a346dc658e1f71bb801ebe74f22e00dada136
[ "MIT" ]
permissive
mboussaa/haxe-testing
77d2c44596f92d3b509ad2e450f61d2e640eb9a3
930bd6e63c8cb91a4df323d01ae518d048c089ba
refs/heads/master
2021-01-17T10:20:07.126520
2016-06-02T10:00:49
2016-06-02T10:00:49
59,005,172
1
0
null
null
null
null
UTF-8
Java
false
true
1,247
java
// Generated by Haxe 3.3.0 package thx._Validation; import haxe.root.*; @SuppressWarnings(value={"rawtypes", "unchecked"}) public class Validation_Impl__val7_130__Fun_0<C, D, E, F, G, H, B, A> extends haxe.lang.Function { public Validation_Impl__val7_130__Fun_0(haxe.lang.Function f5) { //line 130 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Validation.hx" super(2, 0); //line 130 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Validation.hx" this.f5 = f5; } @Override public java.lang.Object __hx_invoke2_o(double __fn_float1, java.lang.Object __fn_dyn1, double __fn_float2, java.lang.Object __fn_dyn2) { //line 130 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Validation.hx" B b4 = ( (( __fn_dyn2 == haxe.lang.Runtime.undefined )) ? (((B) (((java.lang.Object) (__fn_float2) )) )) : (((B) (__fn_dyn2) )) ); //line 130 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Validation.hx" A a4 = ( (( __fn_dyn1 == haxe.lang.Runtime.undefined )) ? (((A) (((java.lang.Object) (__fn_float1) )) )) : (((A) (__fn_dyn1) )) ); //line 130 "/usr/lib/haxe/lib/thx,core/0,40,1/src/thx/Validation.hx" return new thx._Validation.Validation_Impl__val7_130__Fun_1<B, A, D, E, F, G, H, C>(this.f5, b4, a4); } public haxe.lang.Function f5; }
[ "mohamed.boussaa@inria.fr" ]
mohamed.boussaa@inria.fr
365c301150fc6ba662b7b7594903d4a0fa063280
5d92778cc862e1f1788e1dad9a64c7b6f9986602
/src/com/tocersoft/product/model/ProductWeightRangeModel.java
ebf34e33a7352405e6915dbc365246a1b2118378
[]
no_license
zhaozhihao59/waston
0492f72905ea74ddb221f5f0b12da4be644926e5
792e480d9db9e451b7cee0f10c62177c63f4a954
refs/heads/master
2020-12-02T22:15:20.101310
2017-08-19T13:55:36
2017-08-19T13:55:36
96,101,831
0
0
null
null
null
null
UTF-8
Java
false
false
786
java
package com.tocersoft.product.model; import com.tocersoft.base.model.BaseModel; import com.tocersoft.product.entity.ProductWeightRange; import com.tocersoft.product.dto.ProductWeightRangeCondition; public class ProductWeightRangeModel extends BaseModel<ProductWeightRange>{ private ProductWeightRange item = new ProductWeightRange(); private ProductWeightRangeCondition condition = new ProductWeightRangeCondition(); public ProductWeightRangeModel() { super(); } public ProductWeightRange getItem() { return item; } public void setItem(ProductWeightRange item) { this.item = item; } public ProductWeightRangeCondition getCondition() { return condition; } public void setCondition(ProductWeightRangeCondition condition) { this.condition = condition; } }
[ "win 10@DESKTOP-K8NV66R" ]
win 10@DESKTOP-K8NV66R
459122a013e7cddf503b4b04c1f8c10e6bd7137f
db1247a6c91970d843d9eedfb0a9812f8141d846
/src/main/java/com/ddf/scaffold/fw/tcp/server/ChannelStoreSyncTask.java
bc70ed12560413b4a4aca4674fba80b79b7e5701
[]
no_license
dongfangding/spring-boot-scaffold
0f91360c7974aad91d243a160688dbdfd89c181a
910d4ecfb97111545a5862bcbcbfd19dd756ed3d
refs/heads/master
2020-06-11T02:19:02.249696
2019-10-09T07:33:46
2019-10-09T07:33:46
193,824,550
1
0
null
2019-10-29T17:15:59
2019-06-26T03:41:08
Java
UTF-8
Java
false
false
8,137
java
package com.ddf.scaffold.fw.tcp.server; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ddf.scaffold.fw.tcp.biz.ChannelTransferBizService; import com.ddf.scaffold.fw.tcp.mapper.ChannelInfoMapper; import com.ddf.scaffold.fw.tcp.mapper.ChannelTransferMapper; import com.ddf.scaffold.fw.tcp.model.datao.ChannelInfo; import com.ddf.scaffold.fw.tcp.model.datao.ChannelTransfer; import com.ddf.scaffold.fw.tcp.service.ChannelTransferService; import com.ddf.scaffold.fw.util.SpringContextHolder; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; /** * 连接信息同步任务类 * * @author dongfang.ding * @date 2019/7/8 10:12 */ @Slf4j public class ChannelStoreSyncTask implements Runnable { private Executor executorService; private ChannelInfoMapper channelInfoMapper = SpringContextHolder.getBean(ChannelInfoMapper.class); private ChannelTransferMapper channelTransferMapper = SpringContextHolder.getBean(ChannelTransferMapper.class); private ChannelTransferService channelTransferService = SpringContextHolder.getBean(ChannelTransferService.class); private ChannelTransferBizService channelTransferBizService = SpringContextHolder.getBean(ChannelTransferBizService.class); private Map<String, ChannelMonitor> noDeviceIdList = new ConcurrentHashMap<>(); public ChannelStoreSyncTask(Executor executorService) { this.executorService = executorService; } public ChannelStoreSyncTask() { this.executorService = (ThreadPoolTaskExecutor) SpringContextHolder.getBean("transferQueueExecutor"); } /** * 这一块如果是与数据库同步的话,下面处理没有这么复杂,就简单很多了,连接状态和消息需要分开处理 * 该方法必须要有先后顺序,不能后面的状态先处理再处理前面的数据状态,可能会导致覆盖 */ @Override public synchronized void run() { log.info("===========================同步连接信息========================"); log.info("排错用: 未同步到设备id: [{}]", noDeviceIdList); log.info("当前连接大小: " + ChannelTransferStore.getStore().size()); // 每次只处理当前数据 final Map<String, ChannelMonitor> channels = new HashMap<>(ChannelTransferStore.getStore()); if (!channels.isEmpty()) { for (Map.Entry<String, ChannelMonitor> entry : channels.entrySet()) { // TODO 确认 executorService.execute(() -> { try { String key = entry.getKey(); ChannelMonitor channelMonitor = entry.getValue(); if (!channelMonitor.isSyncDone()) { ChannelInfo channelInfo = ChannelInfo.build(channelMonitor); if (channelInfo.getDeviceNo() == null) { noDeviceIdList.put(key, channelMonitor); return; } LambdaQueryWrapper<ChannelInfo> queryWrapper = Wrappers.lambdaQuery(); queryWrapper.eq(ChannelInfo::getClientAddress, key); ChannelInfo persistence = channelInfoMapper.selectOne(queryWrapper); noDeviceIdList.remove(key); if (persistence == null) { channelInfoMapper.insert(channelInfo); } else { persistence.setStatus(channelInfo.getStatus()); persistence.setChangeTime(new Date()); persistence.setDeviceNo(channelInfo.getDeviceNo()); LambdaUpdateWrapper<ChannelInfo> updateWrapper = Wrappers.lambdaUpdate(); updateWrapper.eq(ChannelInfo::getId, persistence.getId()); channelInfoMapper.update(persistence, updateWrapper); } channelMonitor.setSyncDone(true); } // 如果连接掉线并且队列里的数据已经同步完,则需要移除掉节省key的大小 if (channelMonitor.getQueue().peek() == null && ChannelMonitor.STATUS_INACTIVE == channelMonitor.getStatus()) { ChannelTransferStore.getStore().remove(channelMonitor.getRemoteAddress()); } // 持久化接收队列里的数据 consumerRequestContentQueue(channelMonitor); } catch (Exception e) { e.printStackTrace(); } }); } } } /** * 处理接收消息队列中的数据 * * @param channelMonitor */ @SuppressWarnings("unchecked") private void consumerRequestContentQueue(ChannelMonitor channelMonitor) { if (channelMonitor.getQueue().peek() != null) { ChannelTransfer channelTransfer = channelMonitor.getQueue().poll(); if (channelTransfer == null) { return; } RequestContent requestContent = channelTransfer.getRequestContent(); log.info("RequestContext: {}", requestContent); if (requestContent == null) { return; } // 相同的requestId不允许处理多次 if (channelTransferService.existByRequestId(requestContent.getRequestId())) { // 重发的话有可能是连接中断后没有收到服务器的响应,在这里做补偿,设备注册只有真的将设备保存下来才响应 if (!RequestContent.Cmd.DEVICE_REGISTRY.name().equals(requestContent.getCmd())) { // 设备注册只有当消费成功后才响应注册成功 ChannelTransferStore.get(channelTransfer.getClientAddress()).getChannel() .writeAndFlush(RequestContent.responseOK(channelTransfer.getRequestContent())); } return; } // 记录传输日志 channelTransferMapper.insert(channelTransfer); // FIXME // 如果日志已保存则告诉客户端,不需要重发了,我已经保存了。后面及时处理失败,服务端自己会去表里重试 // 但是这个通知,其实是个随缘通知;如果当时发送这条消息的客户端断掉了,重连之后换了地址,其实是通知不回去的; // 解决方法: // 1. 存储连接的key使用客户端的ip即可,不需要端口;那么这样重连也能找到,但是一台设备就不能启动多个连接 // 2. 提供一个接口,接收客户端传送的requestId,然后服务端去查询表中是否存在,如果存在返回给客户端;这样客户端就可以删除旧数据了 // 3. 维护所有在线的设备号对应的有效Channel对象,如果失效的话就是用旧的连接对应的设备号,在根据设备号找最新的连接 if (!RequestContent.Cmd.DEVICE_REGISTRY.name().equals(requestContent.getCmd())) { // 设备注册只有当消费成功后才响应注册成功 ChannelTransferStore.get(channelTransfer.getClientAddress()).getChannel() .writeAndFlush(RequestContent.responseOK(channelTransfer.getRequestContent())); } // 消费报文记录和解析短信内容 channelTransferBizService.consumerRequestContentQueue(channelTransfer); } } }
[ "1041765757@qq.com" ]
1041765757@qq.com
2f20fa8a003cdaa776c4b1a16f1e9a315b88c927
ca986a78b88128c8090a31ce0d892bdb6929bfb8
/src/test/java/id/ac/tazkia/registration/registrasimahasiswa/service/TagihanServiceTests.java
ad9a2931e8ae813bc561e5907ba9177494c318f8
[]
no_license
Gifar/registrasi-mahasiswa
1a22a5029c5c4028fd005267c8022f1a76c61309
9a06aedf998fa0cfb52f24152ab4e858eef36b13
refs/heads/master
2021-08-28T21:56:36.200674
2017-12-13T07:27:34
2017-12-13T07:27:34
110,522,560
0
0
null
2017-11-13T08:45:16
2017-11-13T08:45:16
null
UTF-8
Java
false
false
700
java
package id.ac.tazkia.registration.registrasimahasiswa.service; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import java.math.BigDecimal; @RunWith(SpringRunner.class) @SpringBootTest public class TagihanServiceTests { @Autowired private TagihanService tagihanService; @Test public void testBiayaPendaftaran(){ BigDecimal pendaftaran = new BigDecimal("300000.00"); Assert.assertEquals(pendaftaran, tagihanService.hitungBiayaPendaftaran()); } }
[ "endy.muhardin@gmail.com" ]
endy.muhardin@gmail.com
c55a66b7ffdc2bccc06ae4f91f2851f6da8a36aa
6b0fb41f1b7c3af74d8bf02edb7a15c8495a76b9
/P061-K08-AStrangeTriptotheMarket/src/com/granovskiy/Kata.java
b4553f358df564dc871d0ecc5031a6e619e7c2da
[]
no_license
SviatoslavExpert/CodeWars
e6487856a2c66a6ef2ad328b11899aaa9e9026af
a2d68ef816d044dd65578d76133471d4920ffdb4
refs/heads/master
2020-08-01T06:55:54.149213
2019-10-10T12:42:20
2019-10-10T12:42:20
210,905,873
0
0
null
null
null
null
UTF-8
Java
false
false
171
java
package com.granovskiy; public class Kata { public static boolean isLockNessMonster(String s){ return s.contains("tree fiddy") || s.contains("3.50"); } }
[ "s.granovskiy@gmail.com" ]
s.granovskiy@gmail.com
5fe86efad4cdc5f440430dd7ffc621bb82f9afdf
366aec26c921e77c211905b93e1f04743199684e
/src/com/igomall/util/BeanUtils.java
91ab9392a2d7def7d0186c4587e868a11dd5d3cc
[]
no_license
cloudgoon/mall-1
492dbdb6b8b71f40cad66e325c5e55218e11db54
3340c8cc16418ee8f986c8f181f634e3abcf90ab
refs/heads/master
2021-05-16T19:59:24.613232
2019-10-12T07:52:27
2019-10-12T07:52:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,912
java
package com.igomall.util; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.ArrayUtils; import org.springframework.util.Assert; /** * Utils - Bean * * @author IGOMALL Team * @version 1.0 */ public final class BeanUtils { /** * Field缓存 */ private static final Map<Class<?>, Field[]> DECLARED_FIELDS_CACHE = new ConcurrentHashMap<>(); /** * Method缓存 */ private static final Map<Class<?>, Method[]> DECLARED_METHODS_CACHE = new ConcurrentHashMap<>(); /** * PropertyDescriptor缓存 */ private static final Map<Class<?>, PropertyDescriptor[]> PROPERTY_DESCRIPTORS_CACHE = new ConcurrentHashMap<>(); /** * 不可实例化 */ private BeanUtils() { } /** * 设置Field允许访问 * * @param field * Field */ public static void setAccessible(Field field) { if (field != null && !field.isAccessible() && (!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier.isFinal(field.getModifiers()))) { field.setAccessible(true); } } /** * 设置Method允许访问 * * @param method * Method */ public static void setAccessible(Method method) { if (method != null && !method.isAccessible() && (!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))) { method.setAccessible(true); } } /** * 设置Field值 * * @param field * Field * @param target * 目标 * @param value * 值 */ public static void setField(Field field, Object target, Object value) { Assert.notNull(field,""); Assert.notNull(target,""); try { field.set(target, value); } catch (IllegalAccessException e) { throw new RuntimeException(e.getMessage(), e); } } /** * 执行Method * * @param method * Method * @param target * 目标 * @param args * 参数 * @return 结果 */ public static Object invokeMethod(Method method, Object target, Object... args) { Assert.notNull(method,""); Assert.notNull(target,""); try { return method.invoke(target, args); } catch (IllegalAccessException e) { throw new RuntimeException(e.getMessage(), e); } catch (IllegalArgumentException e) { throw new RuntimeException(e.getMessage(), e); } catch (InvocationTargetException e) { throw new RuntimeException(e.getMessage(), e); } } /** * 查找Field * * @param type * 类 * @param annotationType * Annotation类 * @return Field,包含父类Field */ public static List<Field> findFields(Class<?> type, Class<? extends Annotation> annotationType) { Assert.notNull(type,""); Assert.notNull(annotationType,""); List<Field> result = new ArrayList<>(); Class<?> targetClass = type; while (targetClass != null && !Object.class.equals(targetClass)) { for (Field field : getDeclaredFields(targetClass)) { if (getAnnotation(field, annotationType) != null) { result.add(field); } } targetClass = targetClass.getSuperclass(); } return result; } /** * 查找Method * * @param type * 类 * @param annotationType * Annotation类 * @return Method,包含父类Method */ public static List<Method> findMethods(Class<?> type, Class<? extends Annotation> annotationType) { Assert.notNull(type,""); Assert.notNull(annotationType,""); List<Method> result = new ArrayList<>(); Class<?> targetClass = type; while (targetClass != null && !Object.class.equals(targetClass)) { for (Method method : getDeclaredMethods(targetClass)) { if (getAnnotation(method, annotationType) != null) { result.add(method); } } targetClass = targetClass.getSuperclass(); } return result; } /** * 查找PropertyDescriptor * * @param type * 类 * @param annotationType * Annotation类 * @return PropertyDescriptor */ public static List<PropertyDescriptor> getPropertyDescriptors(Class<?> type, Class<? extends Annotation> annotationType) { Assert.notNull(type,""); Assert.notNull(annotationType,""); List<PropertyDescriptor> result = new ArrayList<>(); for (PropertyDescriptor propertyDescriptor : getPropertyDescriptors(type)) { Method readMethod = propertyDescriptor.getReadMethod(); Method writeMethod = propertyDescriptor.getWriteMethod(); for (Method method : Arrays.asList(readMethod, writeMethod)) { if (method == null) { continue; } if (getAnnotation(method, annotationType) != null) { result.add(propertyDescriptor); } } } return result; } /** * 获取Annotation * * @param annotatedElement * Annotation元素 * @param annotationType * Annotation类 * @return Annotation */ private static <A extends Annotation> A getAnnotation(AnnotatedElement annotatedElement, Class<A> annotationType) { Assert.notNull(annotatedElement,""); Assert.notNull(annotationType,""); A annotation = annotatedElement.getAnnotation(annotationType); if (annotation == null) { for (Annotation metaAnnotation : annotatedElement.getAnnotations()) { annotation = metaAnnotation.annotationType().getAnnotation(annotationType); if (annotation != null) { break; } } } return annotation; } /** * 获取Field * * @param type * 类 * @return Field */ private static Field[] getDeclaredFields(Class<?> type) { Assert.notNull(type,""); Field[] result = DECLARED_FIELDS_CACHE.get(type); if (result == null) { result = type.getDeclaredFields(); DECLARED_FIELDS_CACHE.put(type, result != null ? result : new Field[0]); } return result; } /** * 获取Method * * @param type * 类 * @return Method */ private static Method[] getDeclaredMethods(Class<?> type) { Assert.notNull(type,""); Method[] result = DECLARED_METHODS_CACHE.get(type); if (result == null) { Method[] declaredMethods = type.getDeclaredMethods(); Method[] defaultMethods = findConcreteMethodsOnInterfaces(type); result = (Method[]) ArrayUtils.addAll(declaredMethods, defaultMethods); DECLARED_METHODS_CACHE.put(type, result != null ? result : new Method[0]); } return result; } /** * 获取接口实现Method * * @param type * 类 * @return 接口实现Method */ private static Method[] findConcreteMethodsOnInterfaces(Class<?> type) { Assert.notNull(type,""); List<Method> foundMethods = new ArrayList<>(); for (Class<?> ifc : type.getInterfaces()) { for (Method method : ifc.getMethods()) { if (!Modifier.isAbstract(method.getModifiers())) { foundMethods.add(method); } } } return foundMethods.toArray(new Method[foundMethods.size()]); } /** * 获取PropertyDescriptor * * @param type * 类 * @return PropertyDescriptor */ private static PropertyDescriptor[] getPropertyDescriptors(Class<?> type) { Assert.notNull(type,""); PropertyDescriptor[] result = PROPERTY_DESCRIPTORS_CACHE.get(type); if (result == null) { try { result = Introspector.getBeanInfo(type).getPropertyDescriptors(); } catch (IntrospectionException e) { throw new RuntimeException(e.getMessage(), e); } PROPERTY_DESCRIPTORS_CACHE.put(type, result != null ? result : new PropertyDescriptor[0]); } return result; } }
[ "1169794338@qq.com" ]
1169794338@qq.com
09854c9758a90256819d1b17d0d3ba327d345d4a
53424074edb7fb0c173c22f232e79662283ba7ba
/ureport2-core/src/main/java/com/bstek/ureport/definition/searchform/DateInputComponent.java
d7e734a417b8aceeef1a0ae4387c2fb415ddafc8
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
wangtao6/ureport
33b1aa0eb1e889e9468799876354d0a586fe8f09
7433f2d0d5e90b54958fcb550140d4d121ace129
refs/heads/master
2021-08-24T11:31:37.662933
2017-11-21T06:27:22
2017-11-21T06:27:22
111,680,234
1
0
null
2017-11-22T12:16:04
2017-11-22T12:16:04
null
UTF-8
Java
false
false
2,326
java
/******************************************************************************* * Copyright 2017 Bstek * * 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.bstek.ureport.definition.searchform; /** * @author Jacky.gao * @since 2016年1月11日 */ public class DateInputComponent extends InputComponent { private String format; public void setFormat(String format) { this.format = format; } public String getFormat() { return format; } @Override public String initJs(RenderContext context) { StringBuffer sb=new StringBuffer(); sb.append("$('#"+context.buildComponentId(this)+"').datetimepicker({"); sb.append("format:'"+this.format+"'"); sb.append(""); sb.append("});"); String name=getBindParameter(); sb.append("formElements.push("); sb.append("function(){"); sb.append("if(''==='"+name+"'){"); sb.append("alert('日期输入框未绑定查询参数名,不能进行查询操作!');"); sb.append("throw '日期输入框未绑定查询参数名,不能进行查询操作!'"); sb.append("}"); sb.append("return {"); sb.append("\""+name+"\":"); sb.append("$(\"input[name='"+name+"']\").val()"); sb.append("}"); sb.append("}"); sb.append(");"); return sb.toString(); } @Override public String inputHtml(RenderContext context) { StringBuffer sb=new StringBuffer(); sb.append("<div id='"+context.buildComponentId(this)+"' class='input-group date'>"); sb.append("<input type='text' style=\"padding:3px;height:28px\" name='"+getBindParameter()+"' class='form-control'>"); sb.append("<span class='input-group-addon' style=\"font-size:12px\"><span class='glyphicon glyphicon-calendar'></span></span>"); sb.append("</div>"); return sb.toString(); } }
[ "jacky6024@sina.com" ]
jacky6024@sina.com
56be3e3874e64f63045f76dadfaf1a2e93108616
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/b/c/a/n.java
4993f728d0e947270166b9144e4b7fd3b9731320
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
4,222
java
package com.viber.voip.b.c.a; import android.content.Context; import com.viber.dexshared.Logger; import com.viber.voip.ViberEnv; import com.viber.voip.b.c.a.a.e; import com.viber.voip.b.c.a.a.h; import com.viber.voip.engagement.c.d; import com.viber.voip.stickers.entity.Sticker; import com.viber.voip.stickers.entity.b; import com.viber.voip.stickers.i; import com.viber.voip.util.b.a.a; import com.viber.voip.util.u; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; public class n extends c { private static final Logger d = ViberEnv.getLogger(); private com.viber.voip.stickers.b.a e; public n(Context paramContext, com.viber.voip.stickers.b.a parama) { super(paramContext); this.e = parama; } private List<File> a(com.viber.voip.stickers.entity.a parama, f paramf) { List localList = this.e.c(parama.e()); if ((localList == null) || (localList.size() == 0)) return Collections.emptyList(); Iterator localIterator = localList.iterator(); while (localIterator.hasNext()) ((Sticker)localIterator.next()).markFiles(paramf); return paramf.a(parama.a(this.c)); } private void f() { com.viber.voip.engagement.data.a locala = new d().a(); List localList1; if (locala != null) { localList1 = locala.a().b(); if (!u.a(localList1)) break label111; } label111: HashSet localHashSet; for (Object localObject = Collections.emptySet(); ; localObject = localHashSet) { List localList2 = this.e.a((Set)localObject); if ((localList2 != null) && (localList2.size() > 0)) { i locali = i.a(); Iterator localIterator2 = localList2.iterator(); while (true) if (localIterator2.hasNext()) { locali.v(((Integer)localIterator2.next()).intValue()); continue; localList1 = null; break; localHashSet = new HashSet(localList1.size()); Iterator localIterator1 = localList1.iterator(); while (localIterator1.hasNext()) localHashSet.add(Integer.valueOf(((a.a)localIterator1.next()).a())); } } return; } } public void a() { this.b = new f(new e(new h(new com.viber.voip.b.c.a.a.g(new com.viber.voip.b.c.a.a.a()), 86400000L)), 512); this.b.b(true); } protected void b() { f(); List localList1 = this.e.c(); ArrayList localArrayList = new ArrayList(); HashSet localHashSet = new HashSet(); Iterator localIterator1 = localList1.iterator(); b localb; if (localIterator1.hasNext()) { localb = (b)localIterator1.next(); if (!this.a); } label224: List localList2; do { do { do { do { return; if (!localb.F()) break label224; localArrayList.addAll(a(localb, this.b)); this.b.d(); localHashSet.add(localb.a(this.c).getPath()); if (localArrayList.size() < this.b.b()) break; } while (this.a); this.b.a(localArrayList); } while ((localArrayList.size() >= this.b.b()) || (this.a)); this.b.a(localHashSet); Iterator localIterator2 = this.e.b().iterator(); while (localIterator2.hasNext()) ((Sticker)localIterator2.next()).markFiles(this.b); Iterator localIterator3 = this.e.c(localb.e()).iterator(); while (localIterator3.hasNext()) ((Sticker)localIterator3.next()).markFiles(localHashSet); break; this.b.b(true); } while (this.a); localList2 = this.b.a(com.viber.voip.stickers.c.g.a(this.c)); } while (this.a); this.b.a(localList2); } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.b.c.a.n * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
f0ec2b515e38c543ba5167af79b9401b412a44d4
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_59F6BAD148C6989ADE2EDE5BB6A934439D27D7996FF9EAC6BEDCA0CE9955D720_471034747.java
8cad0dda25f2feabbcae267960bfbdb02ae146bb
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
import android.graphics.drawable.Drawable; import android.support.v4.graphics.drawable.DrawableCompat; import androidx.test.runner.AndroidJUnit4; import org.easymock.EasyMock; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_59F6BAD148C6989ADE2EDE5BB6A934439D27D7996FF9EAC6BEDCA0CE9955D720_471034747 { public static void testCase() throws Exception { Object var0 = EasyMock.createMock(Drawable.class); boolean var1 = true; DrawableCompat.setAutoMirrored((Drawable)var0, var1); } @Test public void staticTest() throws Exception { testCase(); } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
cacd085612386c9b392ff43ea3b8cb62e28ae81d
4168b1d8b44ea61cab5144ce2c0968ac7fa08149
/src/main/java/com/qiangdong/reader/request/comic/DeleteComicChapterRequest.java
89604f466925b76a7af7f7dbd6ab4459aa375bd7
[ "Apache-2.0" ]
permissive
Vivian-miao/qiangdongserver
2a841f0a964c92cbfe73d4eb98f0c2888e542fff
0c16fec01b369d5491b8239860f291732db38f2e
refs/heads/master
2023-04-25T07:21:57.354176
2021-05-20T04:16:51
2021-05-20T04:16:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
package com.qiangdong.reader.request.comic; import com.qiangdong.reader.request.BaseRequest; public class DeleteComicChapterRequest extends BaseRequest { private Long comicId = 0L; private Long chapterId = 0L; public Long getComicId() { return comicId; } public void setComicId(Long comicId) { this.comicId = comicId; } public Long getChapterId() { return chapterId; } public void setChapterId(Long chapterId) { this.chapterId = chapterId; } }
[ "a857681664@gmail.com" ]
a857681664@gmail.com
8d0ca8e9c883574e7b4528ed45d3369aceb9e78d
a6b9598a91da6fd35c8a1611d9d234fee667c280
/kie-server-embedded-app/src/main/java/org/jbpm/examples/util/Constants.java
fc88ae902781a107dd8feb3c78e194419b269cb0
[]
no_license
tkobayas/RHPAM70examples
d198b0a017543286c3394785b03b88431b490283
1668f8785db58f3fbf167b1dab306b4864661fd1
refs/heads/master
2022-10-02T07:03:27.039548
2019-10-08T03:09:20
2019-10-08T03:09:20
121,611,952
0
0
null
2022-09-22T18:23:51
2018-02-15T09:38:57
Java
UTF-8
Java
false
false
306
java
package org.jbpm.examples.util; public class Constants { // public static final String GROUP_ID = "com.myspace"; // public static final String ARTIFACT_ID = "simple-proj1"; // public static final String VERSION = "1.0.0"; public static final String CONTAINER_ID = "simple-proj1_1.0.0"; }
[ "toshiyakobayashi@gmail.com" ]
toshiyakobayashi@gmail.com
0d7f33493ec2ba52b0fdcb44e9bef4801c16827d
0646128352ee5b5cf46ea6ce82af338d0d6c3db7
/baekjoon/Exam11726.java
831fbf3166f9453970ab7b21e440c8776e3d805e
[]
no_license
kimjongmo/Algorithm
6ecd01559dd2586215acd9091ea96733d9c28161
d0b956dd47bb76eb4b2d472a258feaefbe45e7e4
refs/heads/master
2021-05-11T08:22:28.498561
2019-09-06T13:29:54
2019-09-06T13:29:54
118,051,574
1
4
null
2019-04-25T09:24:41
2018-01-18T23:39:29
Java
UTF-8
Java
false
false
509
java
import java.util.Scanner; public class Exam11726 { static int MOD = 10007; static int[] cache; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); cache = new int[n+1]; for(int i=0;i<n+1;i++) cache[i]=-1; System.out.println(tile(n)); sc.close(); } static int tile(int n) { if(n==0) return 0; if(n==1) return 1; if(n==2) return 2; if(cache[n]!=-1) return cache[n]; cache[n]= (tile(n-1)+tile(n-2))%MOD; return cache[n]; } }
[ "kfmd1008@naver.com" ]
kfmd1008@naver.com
09b3b3aceb556474bc2fb13d0f88d860a4e2db34
ce0732fde9c3a5d270742d72396611c67a715056
/test-manual/src/main/java/de/plushnikov/data/DataWithOverrideEqualsAndHashCodeSugestion184.java
1c73f71bffcc103c2f2fbfd90061b73eb28ffda9
[ "BSD-3-Clause" ]
permissive
chen1920/lombok-intellij-plugin
c0dc16203b57e919d01bd9bb37a4f2e9f57a48fd
9bcc54e1ee1b36bb41f25280110fe485d5800866
refs/heads/master
2021-07-13T15:16:00.380545
2020-08-27T08:11:43
2020-08-27T08:11:43
201,156,113
1
0
BSD-3-Clause
2020-08-27T08:11:45
2019-08-08T01:42:53
Java
UTF-8
Java
false
false
1,009
java
package de.plushnikov.data; import lombok.Data; public class DataWithOverrideEqualsAndHashCodeSugestion184 { @Data private static class SomeBasic { private int property; } @Data private static class SomeComplex extends SomeBasic { private final String value; @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SomeComplex that = (SomeComplex) o; return value.equals(that.value); } @Override public int hashCode() { return value.hashCode(); } } @Data private static class SomeDifferent extends SomeBasic { private final String value; } public static void main(String[] args) { SomeComplex complex = new SomeComplex("This is very complex"); System.out.println(complex); SomeDifferent different = new SomeDifferent("This is something different"); System.out.println(different); } }
[ "michail@plushnikov.de" ]
michail@plushnikov.de
f6e8815e278454d7d082d387148cd42279016181
6e53b84d289d2df842b9548bdb10fea8e38ec53f
/GatewayApp/src/main/java/io/changsoft/gatewayapp/service/ColumnConverter.java
f1992e33137174dd7ac8a3b289958b9f5eafc448
[]
no_license
chang-ngeno/java-batch-processing
415917127fe0c52605cb3e8da6da385d58c6b31c
ccc23a1f7e9ba82481b2f6c8e648fafe87386521
refs/heads/master
2023-06-17T05:36:51.355534
2021-07-13T19:09:07
2021-07-13T19:09:07
385,011,093
0
0
null
null
null
null
UTF-8
Java
false
false
2,505
java
package io.changsoft.gatewayapp.service; import io.r2dbc.spi.Row; import org.springframework.core.convert.ConversionService; import org.springframework.data.r2dbc.convert.R2dbcConverter; import org.springframework.data.r2dbc.convert.R2dbcCustomConversions; import org.springframework.lang.Nullable; import org.springframework.stereotype.Service; import org.springframework.util.ClassUtils; /** * This service provides helper function dealing with the low level {@link Row} and Spring's {@link R2dbcCustomConversions}, so type conversions can be applied. */ @Service public class ColumnConverter { private final ConversionService conversionService; private final R2dbcCustomConversions conversions; public ColumnConverter(R2dbcCustomConversions conversions, R2dbcConverter r2dbcConverter) { this.conversionService = r2dbcConverter.getConversionService(); this.conversions = conversions; } /** * Converts the value to the target class with the help of the {@link ConversionService}. * @param value to convert. * @param target class. * @param <T> the parameter for the intended type. * @return the value which can be constructed from the input. */ @SuppressWarnings("unchecked") public <T> T convert(@Nullable Object value, @Nullable Class<T> target) { if (value == null || target == null || ClassUtils.isAssignableValue(target, value)) { return (T) value; } if (conversions.hasCustomReadTarget(value.getClass(), target)) { return conversionService.convert(value, target); } if (Enum.class.isAssignableFrom(target)) { return (T) Enum.valueOf((Class<Enum>) target, value.toString()); } return conversionService.convert(value, target); } /** * Convert a value from the {@link Row} to a type - throws an exception, it it's impossible. * @param row which contains the column values. * @param target class. * @param columnName the name of the column which to convert. * @param <T> the parameter for the intended type. * @return the value which can be constructed from the input. */ public <T> T fromRow(Row row, String columnName, Class<T> target) { try { // try, directly the driver return row.get(columnName, target); } catch (Exception e) { Object obj = row.get(columnName); return convert(obj, target); } } }
[ "danchangmasa@gmail.com" ]
danchangmasa@gmail.com
f56169364532fd0b6d5893bd26a05ccd6411e362
5598faaaaa6b3d1d8502cbdaca903f9037d99600
/code_changes/Apache_projects/HDFS-4846/719034c12c1105e3ab2e033bce30798750e38e2d/LsSnapshottableDir.java
260ecf65dc09a1d6e40db26a139f3a588a3bdd50
[]
no_license
SPEAR-SE/LogInBugReportsEmpirical_Data
94d1178346b4624ebe90cf515702fac86f8e2672
ab9603c66899b48b0b86bdf63ae7f7a604212b29
refs/heads/master
2022-12-18T02:07:18.084659
2020-09-09T16:49:34
2020-09-09T16:49:34
286,338,252
0
2
null
null
null
null
UTF-8
Java
false
false
2,525
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hdfs.tools.snapshot; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus; /** * A tool used to list all snapshottable directories that are owned by the * current user. The tool returns all the snapshottable directories if the user * is a super user. */ @InterfaceAudience.Private public class LsSnapshottableDir { public static void main(String[] argv) throws IOException { String description = "LsSnapshottableDir: \n" + "\tGet the list of snapshottable directories that are owned by the current user.\n" + "\tReturn all the snapshottable directories if the current user is a super user.\n"; if(argv.length != 0) { System.err.println("Usage: \n" + description); System.exit(1); } Configuration conf = new Configuration(); FileSystem fs = FileSystem.get(conf); if (! (fs instanceof DistributedFileSystem)) { System.err.println( "LsSnapshottableDir can only be used in DistributedFileSystem"); System.exit(1); } DistributedFileSystem dfs = (DistributedFileSystem) fs; try { SnapshottableDirectoryStatus[] stats = dfs.getSnapshottableDirListing(); SnapshottableDirectoryStatus.print(stats, System.out); } catch (IOException e) { String[] content = e.getLocalizedMessage().split("\n"); System.err.println("lsSnapshottableDir: " + content[0]); } } }
[ "archen94@gmail.com" ]
archen94@gmail.com
19871f1e4660d19fede18afaa3c4fa6ec595fa3b
0335816ba7e7e098be345db932d3707d22f2a0d5
/underscore-string-builder/src/test/java/kr/pe/kwonnam/underscore/stringbuilder/transformers/UnderscoreStringFormatTransformerTest.java
b2ed7309a378bfce7a35c9e441f8e94a9ab50e43
[ "Apache-2.0" ]
permissive
kwon37xi/underscore-builder
affc8db9e09c7eebf86049c16537db20efb8a0b6
fa718f22239a424d6be879936b5fca00690855fd
refs/heads/master
2021-01-18T02:05:06.784494
2016-01-01T11:53:41
2016-01-01T11:53:41
47,127,238
2
0
null
null
null
null
UTF-8
Java
false
false
2,008
java
package kr.pe.kwonnam.underscore.stringbuilder.transformers; import org.hamcrest.CoreMatchers; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Date; import java.util.Locale; import static kr.pe.kwonnam.underscore.stringbuilder.UnderscoreStringBuilderTransformers.format; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; public class UnderscoreStringFormatTransformerTest extends AbstractTransformerTest { @Test public void transform_appendee_null() throws Exception { try { underscoreStringBuilder.__((String) null, format("hello")); fail("Must throw an exception - IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertThat("Must throw an exception", ex.getMessage(), is("appendee must not be null for format.")); } } @Test public void transform_format() throws Exception { assertThat(underscoreStringBuilder.__("Hello [%10s] [%7d]~", format("World", 12345)).toString(), is("Hello [ World] [ 12345]~")); } @Test public void transform_format_without_Locale() throws Exception { Locale defaultLocale = Locale.getDefault(); Date now = new Date(); assertThat(underscoreStringBuilder.__("%tB %ta", format(now, now)).toString(), is(String.format(defaultLocale, "%tB %ta", now, now))); } @Test public void transform_format_with_locale() throws Exception { Date now = new Date(); assertThat(underscoreStringBuilder.__("%tB %ta", format(Locale.US, now, now)).toString(), is(String.format(Locale.US, "%tB %ta", now, now))); } @Test public void transform_format_with_another_locale() throws Exception { Date now = new Date(); assertThat(underscoreStringBuilder.__("%tB %ta", format(Locale.FRENCH, now, now)).toString(), is(String.format(Locale.FRENCH, "%tB %ta", now, now))); } }
[ "kwon37xi@gmail.com" ]
kwon37xi@gmail.com
6115e1eafe74467588d409327b8ba3523f6dd813
6e8a5f607a4fa3e8ff01fdc46aa967db04f993b4
/SoulissApp/src/main/java/it/angelic/soulissclient/SoulissApp.java
53a0f676f095a2ee55596840dad0b1af3122a765
[ "MIT" ]
permissive
fghsolutions/soulissapp
6393436d5d581cd71de1c59ef796c6f9914bea1c
3185d97590aa89ee7bd72c55f04a128609dfb249
refs/heads/master
2021-01-18T13:30:55.463249
2020-08-19T11:27:47
2020-08-19T11:27:47
57,386,013
0
0
null
2016-04-29T13:26:43
2016-04-29T13:26:43
null
UTF-8
Java
false
false
4,999
java
package it.angelic.soulissclient; import android.app.Activity; import android.app.Application; import android.content.Context; import android.content.SharedPreferences; import android.graphics.drawable.GradientDrawable; import android.util.DisplayMetrics; import android.util.Log; import android.view.View; import android.view.WindowManager; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import it.angelic.soulissclient.helpers.SoulissPreferenceHelper; /** * Contenitore metodi globali per reperimento contesto * e dimensioni finestra * * @author pegoraro */ public class SoulissApp extends Application implements Serializable { private static final long serialVersionUID = 962480567399715745L; private static volatile Context context; private static DisplayMetrics metrics = new DisplayMetrics(); private static float displayWidth; private static float displayHeight; private static SoulissPreferenceHelper opzioni; private static SharedPreferences soulissConfigurationPreference; public static Context getAppContext() { return SoulissApp.context; } public static float getDisplayHeight() { return displayHeight; } public static float getDisplayWidth() { return displayWidth; } /** * Setta la dimensione del background Drawable * gli errori vengono ignorati e sparati in warn * * @param target * @param mgr */ public static void setBackground(View target, WindowManager mgr) { try { mgr.getDefaultDisplay().getMetrics(metrics); //StateListDrawable gras = (StateListDrawable) target.getRootView().getBackground(); GradientDrawable gra = (GradientDrawable) target.getRootView().getBackground(); gra.setGradientRadius(metrics.widthPixels / 2f); //displayWidth = metrics.widthPixels; //displayHeight = metrics.heightPixels; gra.setDither(true); } catch (Exception e) { Log.w(Constants.TAG, "Couldn't set background:" + e.getMessage()); } } public static SoulissPreferenceHelper getOpzioni() { return opzioni; } /*public static InetAddress getBroadcastAddress() throws UnknownHostException { WifiManager wifi = (WifiManager) SoulissClient.context.getSystemService(Context.WIFI_SERVICE); DhcpInfo dhcp = wifi.getDhcpInfo(); // handle null somehow int broadcast = (dhcp.ipAddress & dhcp.netmask) | ~dhcp.netmask; byte[] quads = new byte[4]; for (int k = 0; k < 4; k++) quads[k] = (byte) ((broadcast >> k * 8) & 0xFF); return InetAddress.getByAddress("255.255.255.255"); }*/ private static void setOpzioni(SoulissPreferenceHelper opzioni) { SoulissApp.opzioni = opzioni; } /*private static void setCtx(Context ct){ SoulissClient.context = ct; }*/ public static boolean isWelcomeDisabled() { return soulissConfigurationPreference.getBoolean("welcome_disabled", false); } public static void saveWelcomeDisabledPreference(boolean val) { SharedPreferences.Editor edit = soulissConfigurationPreference.edit(); edit.putBoolean("welcome_disabled", val).apply(); } public static String getCurrentConfig() { return soulissConfigurationPreference.getString("current_config", ""); } public static void setCurrentConfig(String newConfig) { soulissConfigurationPreference.edit().putString("current_config", newConfig).apply(); } public void onCreate() { super.onCreate(); context = getApplicationContext(); setOpzioni(new SoulissPreferenceHelper(context)); DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); displayWidth = displayMetrics.heightPixels / displayMetrics.density; displayHeight = displayMetrics.widthPixels / displayMetrics.density; soulissConfigurationPreference = getSharedPreferences("SoulissConfigPrefs", Activity.MODE_PRIVATE); } public static void addConfiguration(String newConfig) { SharedPreferences.Editor editor = soulissConfigurationPreference.edit(); Set<String> current = getConfigurations(); current.add(newConfig); editor.putStringSet(Constants.SOULISS_CONFIGURATIONS_KEY, current); editor.apply(); } public static void deleteConfiguration(String newConfig) { SharedPreferences.Editor editor = soulissConfigurationPreference.edit(); Set<String> current = getConfigurations(); if (current.contains(newConfig)) current.remove(newConfig); editor.putStringSet(Constants.SOULISS_CONFIGURATIONS_KEY, current); editor.apply(); } public static Set<String> getConfigurations() { return soulissConfigurationPreference.getStringSet(Constants.SOULISS_CONFIGURATIONS_KEY, new HashSet<String>()); } }
[ "shineangelic@gmail.com" ]
shineangelic@gmail.com
9cfb4c153bf3f29850cf4df7e1386606ca6f20ab
de807011fb550d09e2c474135d0ba24548da8824
/src/java/command/ErrorCommand.java
5b739b45ec8ec00808dc1c019c859321a25dfde6
[]
no_license
Lomovskoy/MyBlogJava
28889db6048291af0a4fd92bdd922d9b38f54ec5
7bb669b61ead766a77603d0d3596a5c29b153e29
refs/heads/master
2018-07-03T10:10:52.187562
2018-05-31T18:09:40
2018-05-31T18:09:40
110,419,159
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package command; import java.util.ResourceBundle; import javax.servlet.http.HttpServletRequest; /** * Класс перенаправления настраницу ошибки * @author Lomovskoy */ public class ErrorCommand implements ActionCommand{ /** * Метод направляющий на страницу ошибки * @param request HttpServletRequest * @return String */ @Override public String execute(HttpServletRequest request) { ResourceBundle resourceBundle = ResourceBundle.getBundle("resours.config"); String page = resourceBundle.getString("page.error"); return page; } }
[ "lomovskoy.kirill@yandex.ru" ]
lomovskoy.kirill@yandex.ru
92534434a18c776d09a415f5c69a3406c841b9dd
39723eae63b30bba1dc2e6bade36eea0c5d982cb
/wemo_apk/java_code/com/belkin/controller/WidgetStateChangedListener.java
3a18d9672e98ab69d7952e1a533d17b84f8a852c
[]
no_license
haoyu-liu/crack_WeMo
39142e3843b16cdf0e3c88315d1bfbff0d581827
cdca239427cb170316e9774886a4eed9a5c51757
refs/heads/master
2020-03-22T21:40:45.425229
2019-02-24T13:48:11
2019-02-24T13:48:11
140,706,494
1
1
null
null
null
null
UTF-8
Java
false
false
571
java
package com.belkin.controller; import android.content.Context; public abstract interface WidgetStateChangedListener { public abstract boolean appliesToDevice(String paramString); public abstract void deviceStateChanged(Context paramContext, String paramString, boolean paramBoolean); public abstract int getState(); public abstract int getWidgetId(); } /* Location: /root/Documents/wemo_apk/classes-dex2jar.jar!/com/belkin/controller/WidgetStateChangedListener.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "root@localhost.localdomain" ]
root@localhost.localdomain
c49c509e8734b67c09b2ea66a8bd952ba417a213
239b35515e39c91eed39885a71aa64a4d3a8e0cb
/hadrumaths/hadrumaths-plot/src/main/java/net/thevpc/scholar/hadrumaths/plot/PlotValueExprType.java
19f2f294151a6758463462aa1deb300e501f18c1
[]
no_license
thevpc/scholar-mw
de62e654ae3129dc9b79648aaa4f083d3a81d532
76ced260b583f1d1308ba07ed0b54282b4f90842
refs/heads/master
2023-05-10T19:37:25.647409
2023-05-04T19:10:52
2023-05-04T19:10:52
72,082,286
2
1
null
2022-09-30T17:22:45
2016-10-27T07:24:33
Java
UTF-8
Java
false
false
432
java
package net.thevpc.scholar.hadrumaths.plot; import net.thevpc.scholar.hadrumaths.Expr; import net.thevpc.scholar.hadruplot.model.value.AbstractPlotValueType; public class PlotValueExprType extends AbstractPlotValueType { public PlotValueExprType() { super("expr"); } public Expr toExpr(Object o) { return (Expr) o; } @Override public Object getValue(Object o) { return o; } }
[ "taha.bensalah@gmail.com" ]
taha.bensalah@gmail.com
43cb6e529c6c0e16e3fa546107bf7d684ccdc21f
33e8666fca5f5492c925defd25f08a7d2fd938b7
/spring03/src/main/java/com/bit/spr/model/Bbs06Dao1.java
9348b909ae8816743f64fbcd5d630babd7204d8f
[]
no_license
bit01class/framework2018
2f7321ff82272405699d0f5326d879468bc9b104
e4c3354b32a0308ff581231738e9228d4d0cc594
refs/heads/master
2020-04-17T03:27:41.418023
2019-01-30T09:24:39
2019-01-30T09:24:39
166,184,121
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
2,138
java
package com.bit.spr.model; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.bit.spr.model.entity.Bbs06Vo; public class Bbs06Dao1 implements Bbs06Dao { private String driver; private String url; private String user; private String password; private PreparedStatement pstmt; private ResultSet rs; public Bbs06Dao1(String driver,String url,String user,String password){ this.driver=driver; this.url=url; this.user=user; this.password=password; } public Connection newConnection() throws SQLException{ try { Class.forName(driver); } catch (ClassNotFoundException e) { e.printStackTrace(); } return DriverManager.getConnection(url, user, password); } public List<Bbs06Vo> selectAll() throws SQLException{ String sql="select bbs_num,nvl((select name from user06 where user_num =A.user_num),'¼Õ´Ô') as name,sub,content,cnt from bbs06 A"; List<Bbs06Vo> list = new ArrayList<Bbs06Vo>(); try(Connection conn=newConnection()){ pstmt=conn.prepareStatement(sql); rs=pstmt.executeQuery(); while(rs.next())list.add(new Bbs06Vo( rs.getInt("bbs_num"),rs.getString("name"),rs.getString("sub"), rs.getString("content"),rs.getInt("cnt") )); } return list; } public void insertOne(Bbs06Vo bean) throws SQLException{ String sql="INSERT INTO BBS06 VALUES (BBS06_SEQ.NEXTVAL,?,?,?,0)"; try(Connection conn=newConnection()){ pstmt=conn.prepareStatement(sql); pstmt.setInt(1, bean.getUserNum()); pstmt.setString(2, bean.getSub()); pstmt.setString(3, bean.getContent()); pstmt.executeUpdate(); } } @Override public Bbs06Vo selectOne(int idx) throws SQLException { // TODO Auto-generated method stub return null; } @Override public int updateOne(Bbs06Vo bean) throws SQLException { // TODO Auto-generated method stub return 0; } @Override public int deleteOne(int idx) throws SQLException { // TODO Auto-generated method stub return 0; } }
[ "bit01class@gmail.com" ]
bit01class@gmail.com
aa56184c9f1c3c9d179f13f36d2a687629ffe636
c290452e95406502ec031e569f3756de784d959c
/wES-client/src/main/java/org/datasays/wes/actions/IndicesCreate.java
52a21c68506cc97c352bb4dc2f9f85b277146b37
[ "MIT" ]
permissive
xinxin321198/wES
b2ec5a36fd5605b873f55563629f776a38da0593
3f1e828f6e7e799ab65bd88392cb2da3c820950d
refs/heads/master
2021-01-12T00:19:50.464044
2017-02-13T02:46:06
2017-02-13T02:46:06
78,707,554
0
0
null
2017-01-12T04:09:37
2017-01-12T04:09:37
null
UTF-8
Java
false
false
1,815
java
package org.datasays.wes.actions; import okhttp3.HttpUrl; import org.datasays.wes.core.RequestInfo; import org.datasays.wes.types.*; // documentation: http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html public class IndicesCreate extends RequestInfo{ public IndicesCreate(String baseUrl){ super(baseUrl); } public IndicesCreate(HttpUrl baseUrl){ super(baseUrl); } // param: string waitForActiveShards: Set the number of active shards to wait for before the operation returns. public IndicesCreate waitForActiveShards(String waitForActiveShards){ addParams("waitForActiveShards", waitForActiveShards); return this; } // param: time timeout: Explicit operation timeout public IndicesCreate timeout(long timeout){ addParams("timeout", timeout); return this; } // param: time masterTimeout: Specify timeout for connection to master public IndicesCreate masterTimeout(long masterTimeout){ addParams("masterTimeout", masterTimeout); return this; } // param: boolean updateAllTypes: Whether to update the mapping for all fields with the same name across all types or not public IndicesCreate updateAllTypes(boolean updateAllTypes){ addParams("updateAllTypes", updateAllTypes); return this; } // body:The configuration for the index (`settings` and `mappings`) @Override public void setBody(Object body) { super.setBody(body); } //The name of the index private String index; public IndicesCreate setParts(String index){ this.index=index; return this; } @Override public String parseUrl(String method) { if(!"PUT".equalsIgnoreCase(method)){ throw new IllegalArgumentException("Unsupported method:"+method); } //=>/{index} if(index != null ){ setUrl(index); return super.parseUrl(method); } return null; } }
[ "watano@qq.com" ]
watano@qq.com
edc4971baeba8efae0db77be0095c9cbfba1ea77
6249a2b3928e2509b8a5d909ef9d8e18221d9637
/revolsys-core/src/main/java/com/revolsys/collection/map/ThreadLocalMap.java
1c25f80c29d922d57ae6844cc775c53bbac1a9a0
[ "Apache-2.0" ]
permissive
revolsys/com.revolsys.open
dbcdc3bdcee3276dc3680311948e91ec64e1264e
7f4385c632094eb5ed67c0646ee3e2e258fba4e4
refs/heads/main
2023-08-22T17:18:48.499931
2023-05-31T01:59:22
2023-05-31T01:59:22
2,709,026
5
11
NOASSERTION
2023-05-31T01:59:23
2011-11-04T12:33:49
Java
UTF-8
Java
false
false
2,388
java
package com.revolsys.collection.map; import java.util.Collection; import java.util.Map; import java.util.Set; import java.util.function.Supplier; public class ThreadLocalMap<K, V> implements Map<K, V> { private final ThreadLocal<Map<K, V>> map = new ThreadLocal<>(); private final Supplier<Map<K, V>> factory; public ThreadLocalMap() { this(Maps.factoryHash()); } public ThreadLocalMap(final Supplier<Map<K, V>> factory) { this.factory = factory; } @Override public void clear() { this.map.set(null); } @Override public boolean containsKey(final Object key) { final Map<K, V> localMap = getMap(); return localMap.containsKey(key); } @Override public boolean containsValue(final Object value) { final Map<K, V> localMap = getMap(); return localMap.containsValue(value); } @Override public Set<Map.Entry<K, V>> entrySet() { final Map<K, V> localMap = getMap(); return localMap.entrySet(); } @Override public V get(final Object key) { final Map<K, V> localMap = getMap(); return localMap.get(key); } public Map<K, V> getMap() { Map<K, V> localMap = this.map.get(); if (localMap == null) { localMap = this.factory.get(); this.map.set(localMap); } return localMap; } @Override public boolean isEmpty() { final Map<K, V> localMap = this.map.get(); return localMap == null || localMap.isEmpty(); } @Override public Set<K> keySet() { final Map<K, V> localMap = getMap(); return localMap.keySet(); } @Override public V put(final K key, final V value) { final Map<K, V> localMap = getMap(); return localMap.put(key, value); } @Override public void putAll(final Map<? extends K, ? extends V> t) { final Map<K, V> localMap = getMap(); localMap.putAll(t); } @Override public V remove(final Object key) { final Map<K, V> localMap = getMap(); return localMap.remove(key); } @Override public int size() { final Map<K, V> localMap = getMap(); return localMap.size(); } @Override public String toString() { final Map<K, V> localMap = this.map.get(); if (localMap == null) { return "{}"; } else { return localMap.toString(); } } @Override public Collection<V> values() { final Map<K, V> localMap = getMap(); return localMap.values(); } }
[ "paul.austin@revolsys.com" ]
paul.austin@revolsys.com
a7932e2b8ea5bb8330681d7a5ce2ea4dc88b03fe
6d0fc7bb076817497295d3e5c0df8fc614160202
/dkpro-core-tokit-asl/src/main/java/de/tudarmstadt/ukp/dkpro/core/tokit/LineBasedSentenceSegmenter.java
018838adc2f9a9bb85367c8af231958617c483ff
[ "Apache-2.0" ]
permissive
luto65/dkpro-core
c41a3149e44d7ec2db533f42e719ac51e8e510db
68df0b533fa06c12167f59a483dc4881e50c9f9e
refs/heads/master
2020-12-02T19:49:57.942171
2017-06-21T19:30:25
2017-07-01T19:52:29
96,394,613
2
0
null
2017-07-06T06:09:08
2017-07-06T06:09:08
null
UTF-8
Java
false
false
2,035
java
/* * Copyright 2014 * Ubiquitous Knowledge Processing (UKP) Lab * Technische Universität Darmstadt * * 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 de.tudarmstadt.ukp.dkpro.core.tokit; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.fit.descriptor.TypeCapability; import org.apache.uima.jcas.JCas; import de.tudarmstadt.ukp.dkpro.core.api.segmentation.SegmenterBase; /** * Annotates each line in the source text as a sentence. This segmenter is not capable of creating * tokens! All respective parameters have no functionality. * * @deprecated Use {@link RegexSegmenter} */ @TypeCapability( outputs={ "de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Sentence"}) @Deprecated public class LineBasedSentenceSegmenter extends SegmenterBase { @Override protected void process(JCas aJCas, String aText, int aZoneBegin) throws AnalysisEngineProcessException { int begin = 0; int cursor = 0; while (true) { // Create a new sentence if (cursor >= aText.length() || aText.charAt(cursor) == '\n') { cursor = Math.min(cursor, aText.length()); createSentence(aJCas, aZoneBegin + begin, aZoneBegin + cursor); begin = cursor + 1; } // Stop at end of text if (cursor >= aText.length()) { break; } cursor++; } } }
[ "richard.eckart@gmail.com" ]
richard.eckart@gmail.com
fffacc43a600ee22b2a54a48d4574be024ce8cdd
6395a4761617ad37e0fadfad4ee2d98caf05eb97
/.history/src/main/java/frc/robot/subsystems/CheesyDrive_20191110151038.java
520e99cfd53517dbb805d8ee3f0d6ad4107d45af
[]
no_license
iNicole5/Cheesy_Drive
78383e3664cf0aeca42fe14d583ee4a8af65c1a1
80e1593512a92dbbb53ede8a8af968cc1efa99c5
refs/heads/master
2020-09-22T06:38:04.415411
2019-12-01T00:50:53
2019-12-01T00:50:53
225,088,973
0
0
null
null
null
null
UTF-8
Java
false
false
861
java
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package frc.robot.subsystems; import edu.wpi.first.wpilibj.command.Subsystem; /** * An example subsystem. You can replace me with your own Subsystem. */ public class CheesyDrive extends Subsystem { WPIT @Override public void initDefaultCommand() { // Set the default command for a subsystem here. // setDefaultCommand(new MySpecialCommand()); } }
[ "40499551+iNicole5@users.noreply.github.com" ]
40499551+iNicole5@users.noreply.github.com
1f8be0c6d64be39fddfe9ffa9dcc354e619e661a
e06df16478bc1ecd396319cfde5b6e1076581781
/app/src/main/java/com/jinke/housekeeper/saas/patrol/service/impl/PointPlanBizIml.java
be1054130ac210c82f6dea1b5830264108ac9d6a
[]
no_license
632215/HouseKeeper
52c44ec439ea29e23c16f5a35e1c05d9799b6a87
05ba37d8e3f127b0ea46c96c43cda7c438f37cd2
refs/heads/master
2020-03-21T12:01:25.883436
2018-06-25T02:20:32
2018-06-25T02:20:32
138,533,070
0
0
null
null
null
null
UTF-8
Java
false
false
2,301
java
package com.jinke.housekeeper.saas.patrol.service.impl; import android.content.Context; import com.jinke.housekeeper.saas.patrol.bean.HttpResult; import com.jinke.housekeeper.saas.patrol.bean.IsStartBean; import com.jinke.housekeeper.saas.patrol.bean.PointDataBean; import com.jinke.housekeeper.saas.patrol.bean.PointPlanBean; import com.jinke.housekeeper.saas.patrol.http.HttpMethods; import com.jinke.housekeeper.saas.patrol.listener.OnRequestListener; import com.jinke.housekeeper.saas.patrol.http.ProgressSubscriber; import com.jinke.housekeeper.saas.patrol.http.SubscriberOnNextListener; import com.jinke.housekeeper.saas.patrol.listener.PointPlanListener; import com.jinke.housekeeper.saas.patrol.service.PointPlanBiz; import java.util.Map; /** * author : huominghao * date : 2018/1/25 0025 * function : */ public class PointPlanBizIml implements PointPlanBiz { private Context mContext; public PointPlanBizIml(Context mContext) { this.mContext = mContext; } @Override public void getTaskInfo(Map<String, String> map, final OnRequestListener listener) { SubscriberOnNextListener onNextListener = new SubscriberOnNextListener<PointPlanBean>() { @Override public void onNext(PointPlanBean bean) { listener.onSuccess(bean); } @Override public void onError(String Code, String Msg) { listener.onError(Code, Msg); } }; HttpMethods.getInstance().getTaskInfo(new ProgressSubscriber<HttpResult<PointPlanBean>>(onNextListener, mContext), map); } @Override public void isStart(Map<String, String> map, final PointPlanListener listener) { SubscriberOnNextListener onNextListener = new SubscriberOnNextListener<IsStartBean>() { @Override public void onNext(IsStartBean bean) { listener.onPointPlanList(bean); } @Override public void onError(String Code, String Msg) { listener.onError(Code, Msg); } }; HttpMethods.getInstance().isStart(new ProgressSubscriber<HttpResult<IsStartBean>>(onNextListener, mContext), map); } }
[ "weishaung@example.com" ]
weishaung@example.com
2fc628e6c862eb284ca99597c5b9f671272bf265
bd5562090487237b27274d6ad4b0e64c90d70604
/abc.web/src/main/java/com/autoserve/abc/web/module/screen/webnotify/OpenAccountNotify.java
a5fa7aea1e01beec16559f37c63042ca7950dfca
[]
no_license
haxsscker/abc.parent
04b0d659958a4c1b91bb41a002e814ea31bd0e85
0522c15aed591e755662ff16152b702182692f54
refs/heads/master
2020-05-04T20:25:34.863818
2019-04-04T05:49:01
2019-04-04T05:49:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
package com.autoserve.abc.web.module.screen.webnotify; import java.io.IOException; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.alibaba.citrus.service.requestcontext.parser.ParameterParser; import com.alibaba.citrus.turbine.Context; import com.autoserve.abc.service.biz.intf.cash.AccountInfoService; import com.autoserve.abc.service.biz.intf.cash.DoubleDryService; import com.autoserve.abc.service.util.EasyPayUtils; public class OpenAccountNotify { private final static Logger logger = LoggerFactory.getLogger(PayInterfaceNotify.class); @Resource private AccountInfoService accountInfoService; @Resource private HttpServletResponse resp; @Resource private HttpServletRequest resq; @Resource private DoubleDryService doubleDtyService; public void execute(Context context, ParameterParser params) { Map paramterMap = resq.getParameterMap(); Map notifyMap = EasyPayUtils.transformRequestMap(paramterMap); try { resp.getWriter().print("SUCCESS"); } catch (IOException e) { // TODO Auto-generated catch block } } }
[ "845534336@qq.com" ]
845534336@qq.com
24a58ff0c6689c0bccc6502eee45cd22d55a599f
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/activiti-activiti/nonFlakyMethods/org.activiti.examples.bpmn.receivetask.ReceiveTaskTest-testWaitStateBehavior.java
72aafef7f80a878aa6f75efe246d57c15a85e342
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
@Deployment public void testWaitStateBehavior(){ ProcessInstance pi=runtimeService.startProcessInstanceByKey("receiveTask"); Execution execution=runtimeService.createExecutionQuery().processInstanceId(pi.getId()).activityId("waitState").singleResult(); assertNotNull(execution); runtimeService.trigger(execution.getId()); assertProcessEnded(pi.getId()); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
7dce7a81f3f76add2832bc59e9537ea69bb773cf
2403e5d04d8bdcb7cd6d545eff244c813b71c555
/app/src/main/java/com/zhangju/xingquban/interestclassapp/ui/fragment/find/lookactivity/FindActiveActivity.java
6c4537f026500d7b992877060f06f5f48b788749
[]
no_license
tangyang0317/XQB-Android
4a9eb9f183cad2ec84ee4bd257b9fb48ef875b8b
8acc0ed1b4a7208f28b9e2f9c2e972c25e62cd75
refs/heads/master
2020-03-25T11:27:07.132526
2018-11-20T03:49:51
2018-11-20T03:49:51
143,732,904
1
0
null
null
null
null
UTF-8
Java
false
false
4,660
java
package com.zhangju.xingquban.interestclassapp.ui.fragment.find.lookactivity; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.util.Pair; import android.support.v4.view.ViewPager; import android.view.View; import com.fastlib.adapter.CommonFragmentViewPagerAdapter; import com.fastlib.annotation.ContentView; import com.fastlib.app.FastActivity; import com.fastlib.net.Request; import com.fastlib.net.SimpleListener; import com.fastlib.widget.TitleBar; import com.zhangju.xingquban.R; import com.zhangju.xingquban.interestclassapp.refactor.discover.fragment.ActiveListFragment; import com.zhangju.xingquban.interestclassapp.refactor.me.activity.ActiveActivity; import com.zhangju.xingquban.interestclassapp.refactor.user.UserManager; import com.zhangju.xingquban.interestclassapp.ui.fragment.find.lookactivity.bean.LooktabListBean; import com.zhangju.xingquban.interestclassapp.ui.fragment.live.LiveTabLayoutFragment.LiveTabLayoutAdapter; import com.zhangju.xingquban.interestclassapp.util.LoadingDialog; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * create by hqf 2017/11/22 * 发现模块--找活动主页 */ @ContentView(R.layout.activity_look_main) public class FindActiveActivity extends FastActivity { @BindView(R.id.titleBar) TitleBar mTitleBar; @BindView(R.id.look_tablayout) TabLayout lookTablayout; @BindView(R.id.look_viewpage) ViewPager lookViewpage; // private List<Fragment> mLookListFrag = new ArrayList<>(); // private List<String> mListTitle = new ArrayList<>(); private LiveTabLayoutAdapter adapter; private LoadingDialog loadingDialog; @Override protected void alreadyPrepared() { loadingDialog = new LoadingDialog(FindActiveActivity.this); loadingDialog.setLoading(""); setPubHead(); getTabTabTitle(); } //获取tablayout标题数据 private void getTabTabTitle() { loadingDialog.show(); final Request request = Request.obtain(LookActiviInterface.POST_LOOK_LIST_TAB); String token = UserManager.getInstance().getToken(); request.addHeader("X-CustomToken", token); request.setListener(new SimpleListener<LooktabListBean>() { @Override public void onResponseListener(Request r, LooktabListBean result) { boolean success = result.isSuccess(); loadingDialog.dismiss(); try { if (success) { List<LooktabListBean.AaDataBean> data = result.getAaData(); if (data != null) { setTableList(data); } } } catch (Exception ex) { ex.printStackTrace(); } } @Override public void onErrorListener(Request r, String error) { super.onErrorListener(r, error); loadingDialog.dismiss(); } }); net(request); } //设置标题选项卡 private void setTableList(List<LooktabListBean.AaDataBean> dataBeanList){ if(dataBeanList==null||dataBeanList.isEmpty()) return; List<Pair<String,Fragment>> pages=new ArrayList<>(); pages.add(Pair.<String, Fragment>create("精选", ActiveListFragment.getInstance(""))); pages.add(Pair.<String, Fragment>create("热门",ActiveListFragment.getInstance("-1"))); for(LooktabListBean.AaDataBean bean:dataBeanList) pages.add(Pair.<String, Fragment>create(bean.getName(),ActiveListFragment.getInstance(bean.getId()))); lookViewpage.setAdapter(new CommonFragmentViewPagerAdapter(getSupportFragmentManager(),pages)); lookViewpage.setCurrentItem(1); lookTablayout.setupWithViewPager(lookViewpage); } private void setPubHead() { mTitleBar.setOnLeftClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); mTitleBar.setOnRightClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(FindActiveActivity.this, ActiveActivity.class)); //我的活动 } }); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ButterKnife.bind(this); } }
[ "2491548203@qq.com" ]
2491548203@qq.com
ddcf89bdecc7563e5614a60a666f1f8dc8f718e0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_3463a65b77aa6955931954ef7e2e41e94611accc/ConfigurationFactory/8_3463a65b77aa6955931954ef7e2e41e94611accc_ConfigurationFactory_s.java
0e1ef9c19a795e038fc7b96aa241974c85ce39c2
[]
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
3,813
java
/** * Copyright 2011-2014 Asakusa Framework Team. * * 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.asakusafw.testdriver.hadoop; import java.net.URL; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.LocalFileSystem; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.asakusafw.runtime.util.hadoop.ConfigurationProvider; /** * Creates {@link Configuration}s with system defaults. * @since 0.2.5 * @version 0.6.0 */ public class ConfigurationFactory extends ConfigurationProvider { /** * The system property key of {@link LocalFileSystem} implementation class name. */ public static String KEY_LOCAL_FILE_SYSTEM = "asakusa.testdriver.fs"; static final Logger LOG = LoggerFactory.getLogger(ConfigurationFactory.class); private Preferences preferences; /** * Creates a new instance. * @see #getDefault() */ public ConfigurationFactory() { this(Preferences.getDefault()); } /** * Creates a new instance. * @param defaultConfigPath the default configuration path * @see #getDefault() */ public ConfigurationFactory(URL defaultConfigPath) { super(defaultConfigPath); } /** * Creates a new instance. * @param preferences the preferences for this instance * @see #getDefault() * @since 0.6.0 */ public ConfigurationFactory(Preferences preferences) { super(preferences.defaultConfigPath); this.preferences = preferences; } /** * Returns a default factory which referes the System Hadoop configuration path. * <p> * If Hadoop installation is not found in your system, * this returns a factory which use the current context classloader. * </p> * @return a default factory object */ public static ConfigurationFactory getDefault() { return new ConfigurationFactory(); } @Override protected void configure(Configuration configuration) { if (preferences.localFileSystemClassName != null) { configuration.set("fs.file.impl", preferences.localFileSystemClassName); configuration.setBoolean("fs.fs.impl.disable.cache", true); } } /** * Preferences for {@link ConfigurationFactory}. * @since 0.6.0 */ public static class Preferences { String localFileSystemClassName; URL defaultConfigPath; /** * Sets a implementation class name of {@link LocalFileSystem}. * @param className the class name */ public void setLocalFileSystemClassName(String className) { this.localFileSystemClassName = className; } /** * Returns a {@link Preferences} with default values. * @return default preferences */ public static Preferences getDefault() { Preferences prefs = new Preferences(); prefs.localFileSystemClassName = System.getProperty(KEY_LOCAL_FILE_SYSTEM, AsakusaTestLocalFileSystem.class.getName()); prefs.defaultConfigPath = null; return prefs; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
67ab0ff8fc741a3fb396deb6919bd5da00a8f776
e1ed5f410bba8c05310b6a7dabe65b7ef62a9322
/src/main/java/com/sda/javabyd3/syga/exg001/Ogolne/ex04/Person.java
fea4c34e347046036c59eed3519c698fe25666a3
[]
no_license
pmkiedrowicz/javabyd3
252f70e70f0fc71e8ef9019fdd8cea5bd05ca90b
7ff8e93c041f27383b3ad31b43f014c059ef53e3
refs/heads/master
2022-01-01T08:56:08.747392
2019-07-26T19:02:50
2019-07-26T19:02:50
199,065,478
0
0
null
null
null
null
UTF-8
Java
false
false
473
java
package com.sda.javabyd3.syga.exg001.Ogolne.ex04; import lombok.*; @Getter @Setter @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCode @ToString public class Person { String imie; String nazwisko; long pesel; @Override public String toString() { return "Imie: " + String.format("%s", imie) + "\n" + "Nazwisko: " + String.format("%s", nazwisko) + "\n" + "PESEL: " + String.format("%s", pesel); } }
[ "pmkiedrowicz@gmail.com" ]
pmkiedrowicz@gmail.com
44453d9da3d7abe5bcd3489a6a0f244b7684b202
85fc8915ed7369ef39bc5380a708fa34e395ffe8
/app/src/main/java/com/anton/beatmake/fileexplorer/FileArrayAdapter.java
b56cc7ab16278c8904bdb621da6c9cb7ee05aa06
[]
no_license
Komakk/BeatMake
dcfdf6f48ec3038bdd46de5eab848e8f484a9bd8
fcdf3a42d6e88c0b3cb0492581a75c75db54149f
refs/heads/master
2021-05-10T12:08:56.033041
2018-01-22T09:10:06
2018-01-22T09:10:06
118,411,813
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
package com.anton.beatmake.fileexplorer; import android.content.Context; import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import com.anton.beatmake.R; import java.util.List; public class FileArrayAdapter extends ArrayAdapter<Item> { private Context c; private int id; private List<Item> items; public FileArrayAdapter(Context context, int textViewResourceId, List<Item> objects) { super(context, textViewResourceId, objects); c = context; id = textViewResourceId; items = objects; } public Item getItem(int i) { return items.get(i); } @Override public View getView(int position, View convertView, ViewGroup parent) { View rowView = convertView; if (rowView == null) { LayoutInflater vi = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE); rowView = vi.inflate(id, null); } final Item o = items.get(position); if (o != null) { TextView t1 = (TextView) rowView.findViewById(R.id.TextView01); TextView t2 = (TextView) rowView.findViewById(R.id.TextView02); TextView t3 = (TextView) rowView.findViewById(R.id.TextViewDate); /* Take the ImageView from layout and set the city's image */ ImageView imageCity = (ImageView) rowView.findViewById(R.id.fd_Icon1); String uri = "drawable/" + o.getImage(); int imageResource = c.getResources().getIdentifier(uri, null, c.getPackageName()); Drawable image = c.getResources().getDrawable(imageResource); imageCity.setImageDrawable(image); if(t1!=null) t1.setText(o.getName()); if(t2!=null) t2.setText(o.getData()); if(t3!=null) t3.setText(o.getDate()); } return rowView; } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
395ca9137bb7d9589dde4fd1b8611fe29edfa2cc
ba2d1d2ca7abbafd31f60cc60a1f7c9211c09a43
/resteasy-core-spi/src/main/java/org/jboss/resteasy/spi/concurrent/ThreadContext.java
6b254a7069eb959d057542ce827a029747f0bcd2
[ "Apache-2.0" ]
permissive
martin-g/Resteasy
f6c2516cc96a662861d966910693f9117098b70b
81b186fe00315fa77a922285331a6d70e867df4a
refs/heads/main
2023-07-17T05:02:20.793407
2021-08-27T02:01:26
2021-08-27T02:01:26
401,680,623
0
0
NOASSERTION
2021-08-31T11:37:50
2021-08-31T11:37:49
null
UTF-8
Java
false
false
1,657
java
/* * JBoss, Home of Professional Open Source. * * Copyright 2021 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.resteasy.spi.concurrent; /** * A utility used to {@linkplain #capture() capture} the current context and {@linkplain #push(Object) set it} on a * thread before it's execute. Finally {@linkplain #reset() resetting} the context. * * @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a> * @see org.jboss.resteasy.concurrent.ContextualExecutorService * @see org.jboss.resteasy.concurrent.ContextualScheduledExecutorService * @since 5.0.0 */ public interface ThreadContext<T> { /** * Captures the current context to be passed to {@link #push(Object)} before a thread executes. * * @return the current context */ T capture(); /** * Pushes the context previously captured to the currently running thread. * * @param context the context to push */ void push(T context); /** * Resets the context on the current thread. */ void reset(); }
[ "jperkins@redhat.com" ]
jperkins@redhat.com
82166b2ccb75889fa4098b9b2aa8ab53d4119f9b
64995981fe2fbd07cce5ca7a3ba7b2d8183114eb
/zhao_sheng/build/generated/source/apt/debug/com/yfy/app/answer/fragment/Tab3Fragment$$ViewBinder.java
478acfe4cf959f346493ae8cc54ef1a79b679668
[]
no_license
Zhaoxianxv/zhao_sheng_old_one
f34b71d48f7c671c2005c254e4cf2eb8818b27a7
94ca6b035546778b264ce89399e3e8aedde5bb45
refs/heads/master
2022-12-06T15:47:46.156918
2020-09-03T10:14:14
2020-09-03T10:14:14
292,534,564
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
// Generated code from Butter Knife. Do not modify! package com.yfy.app.answer.fragment; import android.view.View; import butterknife.ButterKnife.Finder; public class Tab3Fragment$$ViewBinder<T extends com.yfy.app.answer.fragment.Tab3Fragment> extends com.yfy.base.fragment.BaseFragment$$ViewBinder<T> { @Override public void bind(final Finder finder, final T target, Object source) { super.bind(finder, target, source); View view; view = finder.findRequiredView(source, 2131296335, "field 'xlist'"); target.xlist = finder.castView(view, 2131296335, "field 'xlist'"); } @Override public void unbind(T target) { super.unbind(target); target.xlist = null; } }
[ "1006584058@qq.com" ]
1006584058@qq.com
d232c67e706d759824807c1268d26476d285ca18
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project65/src/test/java/org/gradle/test/performance65_2/Test65_176.java
bcdd93a659950a172215856229c4ef83a93184b1
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance65_2; import static org.junit.Assert.*; public class Test65_176 { private final Production65_176 production = new Production65_176("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
973abb926ecc42468c658853acad696a6ac055c5
5f7df7f23b239c1a6eef96123337942a7331e883
/src/main/java/com/htkj/lng/ssm/controller/UserController.java
5cdc22fc62c524e2093516be530eb5994a8eb691
[]
no_license
sukai33/lng
2dce6177c824918ae3bcb25e640f82058765dbb5
b480fde03aa8e6f57de08d33537ed99e76f6ef3b
refs/heads/master
2021-05-10T11:35:04.438916
2018-01-22T06:28:41
2018-01-22T06:28:41
118,415,661
0
0
null
null
null
null
UTF-8
Java
false
false
3,475
java
package com.htkj.lng.ssm.controller; import com.htkj.lng.ssm.model.SysMenu; import com.htkj.lng.ssm.model.User; import com.htkj.lng.ssm.service.MenuService; import com.htkj.lng.ssm.service.UserService; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 关于权限,角色,机构的控制类 * Created by hecs */ @Controller @RequestMapping("/admin") public class UserController { private Logger log = Logger.getLogger(UserController.class); public static final String[] DEPT_NAME = {"研发部","财务部","总经办","服务部","综合部"}; @Resource private UserService userService; /** * 菜单service */ @Autowired private MenuService menuService; /** * 查询所有角色 * @param request * @param model * @return */ @RequestMapping("/showUser") public String showUser(HttpServletRequest request, Model model){ log.info("查询所有用户信息"); List<User> userList = userService.getAllUser(); model.addAttribute("userList",userList); return "show-user"; } /** * 添加用户 * @param request * @param model * @return */ @RequestMapping("/addUser") public String addUser(HttpServletRequest request, Model model){ log.info("查询所有用户信息"); List<User> userList = userService.getAllUser(); model.addAttribute("userList",userList); JSONArray jsonArray = JSONArray.fromObject(DEPT_NAME); request.setAttribute("depts",jsonArray); return "add-role"; } /** * 查询所有菜单 * @param response 返回 * @return 结果 */ @RequestMapping(value = "/findAllMenu", produces = "application/json;charset=UTF-8") public @ResponseBody String findAllMenu(HttpServletResponse response) { JSONArray jsonArray = new JSONArray(); JSONObject json = null; List<SysMenu> menus = menuService.findAll(); for (SysMenu zNode : menus) { json = new JSONObject(); json.put("id", zNode.getMenu_id()); json.put("pId", zNode.getParent_id()); json.put("name", zNode.getMenu_name()); json.put("open", false); jsonArray.add(json); } String s = jsonArray.toString(); return jsonArray.toString(); } /** * 查询所有部门 * @param response * @return */ @RequestMapping(value = "/findAllDept", produces = "application/json;charset=UTF-8") public @ResponseBody Map<String, Object> findAllDept(HttpServletResponse response) { Map<String, Object> map = new HashMap<String, Object>(); JSONArray jsonArray = JSONArray.fromObject(DEPT_NAME); map.put("result",jsonArray); return map; } }
[ "dell@dell-PC" ]
dell@dell-PC
42db1e70a8c8f410be33e66221716012376f345e
4ad8f282fa015116c227e480fe913779dc3c311b
/src/test/java/com/alibaba/druid/bvt/sql/mysql/select/MySqlSelectTest_218_jdbc.java
0afe8b9b9de31de77d3a05dd567173972f2cbdfe
[ "Apache-2.0" ]
permissive
lonelyit/druid
91b6f36cdebeef4f96fec5b5c42e666c28e6019b
08da6108e409f18d38a30c0656553ab7fcbfc0f8
refs/heads/master
2023-07-24T17:37:14.479317
2021-09-20T06:26:47
2021-09-20T06:26:47
164,882,032
0
1
Apache-2.0
2021-09-20T13:40:13
2019-01-09T14:52:14
Java
UTF-8
Java
false
false
1,613
java
/* * Copyright 1999-2017 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.bvt.sql.mysql.select; import com.alibaba.druid.DbType; import com.alibaba.druid.sql.MysqlTest; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser; import java.util.List; public class MySqlSelectTest_218_jdbc extends MysqlTest { public void test_0() throws Exception { String sql = "select {d '2018-07-24'}, {t '12:34:56'}, {ts '2018-07-24 12:34:56'}"; System.out.println(sql); MySqlStatementParser parser = new MySqlStatementParser(sql); List<SQLStatement> statementList = parser.parseStatementList(); assertEquals(1, statementList.size()); SQLStatement stmt = statementList.get(0); assertEquals("SELECT DATE '2018-07-24', TIME '12:34:56', TIMESTAMP '2018-07-24 12:34:56'", stmt.toString()); assertEquals("select date '2018-07-24', time '12:34:56', timestamp '2018-07-24 12:34:56'", stmt.clone().toLowerCaseString()); } }
[ "shaojin.wensj@alibaba-inc.com" ]
shaojin.wensj@alibaba-inc.com
aac790855eeeb099ad9b2d1eedb90a76bb8fed02
ddce1fbc658e4bf9d124dc4acfc3914817a580a5
/sources/com/googlecode/leptonica/android/Binarize.java
b7afac067cab4b064e2f2cc587de806161c434ef
[]
no_license
ShahedSabab/eExpense
1011f833a614c64cbb52a203821e38f18fce8a4f
b85c7ad6ee5ce6ae433a6220df182e14c0ea2d6d
refs/heads/master
2020-12-21T07:39:45.956655
2020-07-13T21:52:04
2020-07-13T21:52:04
235,963,863
0
0
null
null
null
null
UTF-8
Java
false
false
2,469
java
package com.googlecode.leptonica.android; public class Binarize { public static final float OTSU_SCORE_FRACTION = 0.1f; public static final int OTSU_SIZE_X = 32; public static final int OTSU_SIZE_Y = 32; public static final int OTSU_SMOOTH_X = 2; public static final int OTSU_SMOOTH_Y = 2; public static final int SAUVOLA_DEFAULT_NUM_TILES_X = 1; public static final int SAUVOLA_DEFAULT_NUM_TILES_Y = 1; public static final float SAUVOLA_DEFAULT_REDUCTION_FACTOR = 0.35f; public static final int SAUVOLA_DEFAULT_WINDOW_HALFWIDTH = 8; private static native long nativeOtsuAdaptiveThreshold(long j, int i, int i2, int i3, int i4, float f); private static native long nativeSauvolaBinarizeTiled(long j, int i, float f, int i2, int i3); static { System.loadLibrary("pngt"); System.loadLibrary("lept"); } public static Pix otsuAdaptiveThreshold(Pix pixs) { return otsuAdaptiveThreshold(pixs, 32, 32, 2, 2, 0.1f); } public static Pix otsuAdaptiveThreshold(Pix pixs, int sizeX, int sizeY, int smoothX, int smoothY, float scoreFraction) { if (pixs == null) { throw new IllegalArgumentException("Source pix must be non-null"); } else if (pixs.getDepth() != 8) { throw new IllegalArgumentException("Source pix depth must be 8bpp"); } else { long nativePix = nativeOtsuAdaptiveThreshold(pixs.getNativePix(), sizeX, sizeY, smoothX, smoothY, scoreFraction); if (nativePix != 0) { return new Pix(nativePix); } throw new RuntimeException("Failed to perform Otsu adaptive threshold on image"); } } public static Pix sauvolaBinarizeTiled(Pix pixs) { return sauvolaBinarizeTiled(pixs, 8, 0.35f, 1, 1); } public static Pix sauvolaBinarizeTiled(Pix pixs, int whsize, float factor, int nx, int ny) { if (pixs == null) { throw new IllegalArgumentException("Source pix must be non-null"); } else if (pixs.getDepth() != 8) { throw new IllegalArgumentException("Source pix depth must be 8bpp"); } else { long nativePix = nativeSauvolaBinarizeTiled(pixs.getNativePix(), whsize, factor, nx, ny); if (nativePix != 0) { return new Pix(nativePix); } throw new RuntimeException("Failed to perform Sauvola binarization on image"); } } }
[ "59721350+ShahedSabab@users.noreply.github.com" ]
59721350+ShahedSabab@users.noreply.github.com
210baf30b927233419ca9ccfc5cc0ee11858efe8
979e1fb047c78c2c21d0da39db8eb1be75575033
/mysql-protocol/src/main/java/com/yuqi/sql/rule/cbo/SlothPhysicalJoinChooseRule.java
f7e5b96cecc9c43f37a6e4ea0c83c5c283472b70
[]
no_license
yuqi1129/schema
fae466f7a4e8030bb9614b9f0e6ee7bcfeab35d5
7ad18532dee304fb8fffd04273e77a38a471d6bd
refs/heads/master
2023-07-22T13:58:03.480447
2022-08-29T07:11:52
2022-08-29T07:14:11
239,989,609
92
38
null
2023-07-05T20:49:46
2020-02-12T10:50:49
Java
UTF-8
Java
false
false
2,009
java
package com.yuqi.sql.rule.cbo; import com.yuqi.sql.PhysicalJoinType; import com.yuqi.sql.rel.SlothHashJoin; import com.yuqi.sql.rel.SlothJoin; import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.plan.RelOptRuleCall; import org.apache.calcite.plan.RelOptRuleOperand; import org.apache.calcite.rel.RelNode; /** * @author yuqi * @mail yuqi4733@gmail.com * @description your description * @time 2/3/21 下午8:52 **/ public class SlothPhysicalJoinChooseRule extends RelOptRule { public static final SlothPhysicalJoinChooseRule INSTANCE = new SlothPhysicalJoinChooseRule( operand(SlothJoin.class, any()), "SlothPhysicalJoinChooseRule"); public SlothPhysicalJoinChooseRule(RelOptRuleOperand operand, String description) { super(operand, description); } @Override public void onMatch(RelOptRuleCall call) { SlothJoin slothJoin = call.rel(0); RelNode left = slothJoin.getLeft(); RelNode right = slothJoin.getRight(); // // RelOptCost leftCost = left instanceof RelSubset ? ((RelSubset) left).getWinnerCost() : // left.computeSelfCost(call.getPlanner(), call.getMetadataQuery()); // // RelOptCost rightCost = right instanceof RelSubset ? ((RelSubset) right).getWinnerCost() : // right.computeSelfCost(call.getPlanner(), call.getMetadataQuery()); //假如说这里sort Merge // if (leftCost.getRows() >= 1000 || rightCost.getRows() >= 1000) { // First directly use hash join SlothHashJoin res = new SlothHashJoin( slothJoin.getCluster(), slothJoin.getTraitSet(), slothJoin.getHints(), slothJoin.getLeft(), slothJoin.getRight(), slothJoin.getCondition(), slothJoin.getVariablesSet(), slothJoin.getJoinType()); res.setPhysicalNode(PhysicalJoinType.HASH_JOIN); call.transformTo(res); // } } }
[ "yuqi4733@gmail.com" ]
yuqi4733@gmail.com
7a5eaf5385dc948f2cc891b417870a6746da7d82
997d2bac220050eda2ad492decf0dfd097800a19
/day10-code/src/cn/itcast/day10/demo01/MyInterfacePrivateB.java
34d18bdac4b90f347750cdb9cdf9becd37e22b42
[]
no_license
WXCD-LYY/lyynb
87c6fabcd7f37cea0ded31f760ec374d67844671
84f2a20c7f366cb1f55db2432cf8377a9170f45a
refs/heads/master
2023-03-05T14:30:06.936278
2021-02-06T05:27:53
2021-02-06T05:27:53
336,455,074
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package cn.itcast.day10.demo01; public interface MyInterfacePrivateB { public static void methodStatic1(){ System.out.println("静态方法1"); methodStaticCommon(); } public static void methodStatic2(){ System.out.println("静态方法2"); methodStaticCommon(); } private static void methodStaticCommon(){ System.out.println("AAA"); System.out.println("BBB"); System.out.println("CCC"); } }
[ "13222762017@163.com" ]
13222762017@163.com
335a88768d6307195264fa72def36049a5ceef20
b66bdee811ed0eaea0b221fea851f59dd41e66ec
/src/com/grubhub/AppBaseLibrary/android/dataServices/dto/apiV2/V2TokenizeCreditCardDTO.java
ee8e0c8badec54259d149678a830071c43573b13
[]
no_license
reverseengineeringer/com.grubhub.android
3006a82613df5f0183e28c5e599ae5119f99d8da
5f035a4c036c9793483d0f2350aec2997989f0bb
refs/heads/master
2021-01-10T05:08:31.437366
2016-03-19T20:41:23
2016-03-19T20:41:23
54,286,207
0
0
null
null
null
null
UTF-8
Java
false
false
617
java
package com.grubhub.AppBaseLibrary.android.dataServices.dto.apiV2; import com.grubhub.AppBaseLibrary.android.dataServices.interfaces.GHSITokenizeCreditCardDataModel; public class V2TokenizeCreditCardDTO implements GHSITokenizeCreditCardDataModel { private String client_token; private String nonce; public String getClientToken() { return client_token; } public String getNonce() { return nonce; } } /* Location: * Qualified Name: com.grubhub.AppBaseLibrary.android.dataServices.dto.apiV2.V2TokenizeCreditCardDTO * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
a08efba44a406e24e5e94db1c0174dead77c4db0
2acf522966be43cf0a1c8e60229314b2b15e8fb9
/io/netty/util/ResourceLeak.java
41dca7789e297dc9c4e71d6b4d7dd2ae9044b47e
[]
no_license
jarrettFord/Test
b23cecf07c5ab424bccddf52deab86c648a004a0
5a4534971cebeec74510f22569454553e16291bb
refs/heads/master
2016-09-06T11:43:36.297712
2014-12-17T19:05:58
2014-12-17T19:05:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package io.netty.util; public abstract interface ResourceLeak { public abstract void record(); public abstract boolean close(); } /* Location: C:\Users\User\Desktop\spam.jar * Qualified Name: io.netty.util.ResourceLeak * JD-Core Version: 0.7.0.1 */
[ "jarrettjamesford@gmail.com" ]
jarrettjamesford@gmail.com
e1c2492b97f1932dce7cfb693dd52604c9eef2ea
a16b2a58625081530c089568e2b29f74e23f95a9
/doolin/Doolin-Application/src/main/java/net/sf/doolin/gui/field/helper/DefaultLabelInfoProvider.java
8a84f89e5374ce42ef4f9319fd63989e5ffd2720
[]
no_license
dcoraboeuf/orbe
440335b109dee2ee3db9ee2ab38430783e7a3dfb
dae644da030e5a5461df68936fea43f2f31271dd
refs/heads/master
2022-01-27T10:18:43.222802
2022-01-01T11:45:35
2022-01-01T11:45:35
178,600,867
0
0
null
2022-01-01T11:46:01
2019-03-30T19:13:13
Java
UTF-8
Java
false
false
329
java
/* * Created on Jul 19, 2007 */ package net.sf.doolin.gui.field.helper; import org.apache.commons.lang.ObjectUtils; public class DefaultLabelInfoProvider implements LabelInfoProvider { public LabelInfo getLabelIcon(Object item) { String value = ObjectUtils.toString(item, ""); return new LabelInfo (value, null); } }
[ "damien.coraboeuf@gmail.com" ]
damien.coraboeuf@gmail.com
6e11ad0b7e63bd3750a22351f2befc63fc1f7359
45c111548defd3dc532ce02faae02449267aac75
/tests/system/src/test/java/com/emc/mongoose/tests/system/MultipleRandomUpdateAndMultipleFixedReadTest.java
347841401ffd9f2484be6ce138907e43bf475358
[ "MIT" ]
permissive
evgeniiz321/mongoose
e37319753861dc515ed340eb4639f8b4a21016da
bf78770905d8e6a86ae805520405640b4ab44ef2
refs/heads/master
2023-06-09T05:59:53.199253
2017-10-29T17:15:07
2017-10-29T17:15:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,613
java
package com.emc.mongoose.tests.system; import com.github.akurilov.commons.system.SizeInBytes; import com.emc.mongoose.api.common.env.PathUtil; import com.emc.mongoose.api.model.io.IoType; import com.emc.mongoose.run.scenario.JsonScenario; import com.emc.mongoose.tests.system.base.ScenarioTestBase; import com.emc.mongoose.tests.system.base.params.Concurrency; import com.emc.mongoose.tests.system.base.params.DriverCount; import com.emc.mongoose.tests.system.base.params.ItemSize; import com.emc.mongoose.tests.system.base.params.StorageType; import com.emc.mongoose.tests.system.util.DirWithManyFilesDeleter; import com.emc.mongoose.ui.log.LogUtil; import static com.emc.mongoose.api.common.env.PathUtil.getBaseDir; import static com.emc.mongoose.run.scenario.Scenario.DIR_SCENARIO; import org.apache.commons.csv.CSVRecord; import org.junit.After; import org.junit.Before; import static org.junit.Assert.assertEquals; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.LongAdder; import java.util.function.Consumer; import java.util.stream.LongStream; /** Created by kurila on 15.06.17. */ public class MultipleRandomUpdateAndMultipleFixedReadTest extends ScenarioTestBase { private String itemOutputPath; private String stdOutput; private SizeInBytes expectedUpdateSize; private SizeInBytes expectedReadSize; private static final long EXPECTED_COUNT = 10000; private static final int UPDATE_RANDOM_RANGES_COUNT = 5; public MultipleRandomUpdateAndMultipleFixedReadTest( final StorageType storageType, final DriverCount driverCount, final Concurrency concurrency, final ItemSize itemSize ) throws Exception { super(storageType, driverCount, concurrency, itemSize); } @Override protected String makeStepId() { return MultipleRandomUpdateAndMultipleFixedReadTest.class.getSimpleName() + '-' + storageType.name() + '-' + driverCount.name() + 'x' + concurrency.name() + '-' + itemSize.name(); } @Override protected Path makeScenarioPath() { return Paths.get( getBaseDir(), DIR_SCENARIO, "systest", "MultipleRandomUpdateAndMultipleFixedRead.json" ); } @Before public void setUp() throws Exception { super.setUp(); expectedUpdateSize = new SizeInBytes( 2 << (UPDATE_RANDOM_RANGES_COUNT - 2), itemSize.getValue().get(), 1 ); expectedReadSize = new SizeInBytes( -LongStream.of(1-2,5-10,20-50,100-200,500-1000,2000-5000).sum() ); if(storageType.equals(StorageType.FS)) { itemOutputPath = Paths .get(Paths.get(PathUtil.getBaseDir()).getParent().toString(), stepId) .toString(); config.getItemConfig().getOutputConfig().setPath(itemOutputPath); } scenario = new JsonScenario(config, scenarioPath.toFile()); stdOutStream.startRecording(); scenario.run(); LogUtil.flushAll(); stdOutput = stdOutStream.stopRecordingAndGet(); } @After public void tearDown() throws Exception { if(storageType.equals(StorageType.FS)) { try { DirWithManyFilesDeleter.deleteExternal(itemOutputPath); } catch(final Exception e) { e.printStackTrace(System.err); } } super.tearDown(); } @Override public void test() throws Exception { final LongAdder ioTraceRecCount = new LongAdder(); final Consumer<CSVRecord> ioTraceRecFunc = ioTraceRec -> { if(ioTraceRecCount.sum() < EXPECTED_COUNT) { testIoTraceRecord(ioTraceRec, IoType.UPDATE.ordinal(), expectedUpdateSize ); } else { testIoTraceRecord(ioTraceRec, IoType.READ.ordinal(), expectedReadSize); } ioTraceRecCount.increment(); }; testIoTraceLogRecords(ioTraceRecFunc); assertEquals( "There should be " + 2 * EXPECTED_COUNT + " records in the I/O trace log file", 2 * EXPECTED_COUNT, ioTraceRecCount.sum() ); final List<CSVRecord> totalMetrcisLogRecords = getMetricsTotalLogRecords(); testTotalMetricsLogRecord( totalMetrcisLogRecords.get(0), IoType.UPDATE, concurrency.getValue(), driverCount.getValue(), expectedUpdateSize, EXPECTED_COUNT, 0 ); testTotalMetricsLogRecord( totalMetrcisLogRecords.get(1), IoType.READ, concurrency.getValue(), driverCount.getValue(), expectedReadSize, EXPECTED_COUNT, 0 ); final List<CSVRecord> metricsLogRecords = getMetricsLogRecords(); final List<CSVRecord> updateMetricsRecords = new ArrayList<>(); final List<CSVRecord> readMetricsRecords = new ArrayList<>(); for(final CSVRecord metricsLogRec : metricsLogRecords) { if(IoType.UPDATE.name().equalsIgnoreCase(metricsLogRec.get("TypeLoad"))) { updateMetricsRecords.add(metricsLogRec); } else { readMetricsRecords.add(metricsLogRec); } } testMetricsLogRecords( updateMetricsRecords, IoType.UPDATE, concurrency.getValue(), driverCount.getValue(), expectedUpdateSize, EXPECTED_COUNT, 0, config.getOutputConfig().getMetricsConfig().getAverageConfig().getPeriod() ); testMetricsLogRecords( readMetricsRecords, IoType.READ, concurrency.getValue(), driverCount.getValue(), expectedReadSize, EXPECTED_COUNT, 0, config.getOutputConfig().getMetricsConfig().getAverageConfig().getPeriod() ); final String stdOutput = this.stdOutput.replaceAll("[\r\n]+", " "); testSingleMetricsStdout( stdOutput, IoType.UPDATE, concurrency.getValue(), driverCount.getValue(), expectedUpdateSize, config.getOutputConfig().getMetricsConfig().getAverageConfig().getPeriod() ); testSingleMetricsStdout( stdOutput, IoType.READ, concurrency.getValue(), driverCount.getValue(), expectedReadSize, config.getOutputConfig().getMetricsConfig().getAverageConfig().getPeriod() ); } }
[ "andrey.kurilov@emc.com" ]
andrey.kurilov@emc.com
ba77fe38c61a6661cbb669c945585fec19570c11
eacfc7cf6b777649e8e017bf2805f6099cb9385d
/APK Source/src/com/urbanairship/preference/QuietTimeStartPreference.java
2c2587d59435f92a6a3b8c93c06c38e53e72fab5
[]
no_license
maartenpeels/WordonHD
8b171cfd085e1f23150162ea26ed6967945005e2
4d316eb33bc1286c4b8813c4afd478820040bf05
refs/heads/master
2021-03-27T16:51:40.569392
2017-06-12T13:32:51
2017-06-12T13:32:51
44,254,944
0
0
null
null
null
null
UTF-8
Java
false
false
1,132
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.urbanairship.preference; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; // Referenced classes of package com.urbanairship.preference: // QuietTimePickerPreference public class QuietTimeStartPreference extends QuietTimePickerPreference { public QuietTimeStartPreference(Context context, AttributeSet attributeset) { super(context, attributeset); } public final UAPreference.PreferenceType a() { return UAPreference.PreferenceType.e; } public final volatile void a(Object obj) { super.a(obj); } public final volatile String b() { return super.b(); } public volatile View onCreateView(ViewGroup viewgroup) { return super.onCreateView(viewgroup); } public volatile void onDialogClosed(boolean flag) { super.onDialogClosed(flag); } }
[ "maartenpeels1012@hotmail.com" ]
maartenpeels1012@hotmail.com
409718d46cdbab7118c2ba186af8287137f8bb26
29fa6fcffc88fdc5414cf9fb4f10123ac204b92c
/src/main/java/org/web3j/methods/response/EthGetBlockTransactionCountByNumber.java
be4775fa00bd06fecc4553f6d3d484e57116d1e5
[ "MIT" ]
permissive
ligi/web3j
c4890217f110bbb155dd88ae1a5e7afe2ca7052f
26a411081ebd9387ed4dfe5434fa685fa2799854
refs/heads/master
2021-08-10T12:57:33.179137
2016-09-16T13:04:14
2016-09-16T13:04:14
68,536,996
0
1
null
2016-09-18T17:41:05
2016-09-18T17:41:05
null
UTF-8
Java
false
false
381
java
package org.web3j.methods.response; import java.math.BigInteger; import org.web3j.protocol.utils.Codec; import org.web3j.protocol.jsonrpc20.Response; /** * eth_getBlockTransactionCountByNumber */ public class EthGetBlockTransactionCountByNumber extends Response<String> { public BigInteger getTransactionCount() { return Codec.decodeQuantity(getResult()); } }
[ "conor10@gmail.com" ]
conor10@gmail.com
38eb3fe001a0b46dfb6be3b3cf1642c4138f2075
f3dfc9dcfb7c4cbdb38ab851e3bb74a06871bf46
/src/com/huiyee/interact/template/mgr/IWxTemplateMgr.java
f6b64e98d6336d764f883dce140fa4e96d69a717
[]
no_license
yilaoban/hy_esite2.0
967f96daf28a0b7f99404398ef7ecee52ff3b97a
7b5a36bf8b998140436c92ddd9200af7e382f831
refs/heads/master
2021-01-11T19:59:03.348983
2017-07-13T09:44:01
2017-07-13T09:44:01
79,436,860
3
2
null
null
null
null
UTF-8
Java
false
false
997
java
package com.huiyee.interact.template.mgr; import java.util.List; import com.huiyee.interact.template.model.WxTemplate; public interface IWxTemplateMgr { public int getTemplateCount(long owner); public int getTemplateCount(long owner, String type, long entityid); public int getTemplateCount(long mpid, String template_id); public List<WxTemplate> getTemplateList(long owner, int start, int rows); public List<WxTemplate> getTemplateList(long owner, String type, long entityid, int start, int rows); public WxTemplate getTemplate(long id); public WxTemplate getTemplate(long owner, String type); public WxTemplate getTemplate(long owner, String type, long entityid); public WxTemplate getTemplate(long mpid, long store_id); public int addTemplate(WxTemplate wt); public int[] addTemplate(List<WxTemplate> list); public int updateTemplate(WxTemplate wt); public int delTemplate(long id); public int delAllTemplate(long owner); }
[ "huangjian@huangjian.yinpiao.com" ]
huangjian@huangjian.yinpiao.com
a4cecf5a48cdcc4f1bf9a509b1890b6db214b551
aa6997aba1475b414c1688c9acb482ebf06511d9
/src/com/sun/org/apache/xerces/internal/impl/dv/xs/YearDV.java
15453caf6076731813c6d519da3fca522e0bc8e6
[]
no_license
yueny/JDKSource1.8
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
b88b99265ecf7a98777dd23bccaaff8846baaa98
refs/heads/master
2021-06-28T00:47:52.426412
2020-12-17T13:34:40
2020-12-17T13:34:40
196,523,101
4
2
null
null
null
null
UTF-8
Java
false
false
4,245
java
/* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 1999-2002,2004,2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sun.org.apache.xerces.internal.impl.dv.xs; import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.XMLGregorianCalendar; import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext; /** * Validator for &lt;gYear&gt; datatype (W3C Schema Datatypes) * * @author Elena Litani * @author Gopal Sharma, SUN Microsystem Inc. * @version $Id: YearDV.java,v 1.7 2010-11-01 04:39:47 joehw Exp $ * @xerces.internal */ public class YearDV extends AbstractDateTimeDV { /** * Convert a string to a compiled form * * @param content The lexical representation of time * @return a valid and normalized time object */ public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { try { return parse(content); } catch (Exception ex) { throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gYear"}); } } /** * Parses, validates and computes normalized version of gYear object * * @param str The lexical representation of year object CCYY with possible time zone Z or * (-),(+)hh:mm * @return normalized date representation * @throws SchemaDateTimeException Invalid lexical representation */ protected DateTimeData parse(String str) throws SchemaDateTimeException { DateTimeData date = new DateTimeData(str, this); int len = str.length(); // check for preceding '-' sign int start = 0; if (str.charAt(0) == '-') { start = 1; } int sign = findUTCSign(str, start, len); final int length = ((sign == -1) ? len : sign) - start; if (length < 4) { throw new RuntimeException("Year must have 'CCYY' format"); } else if (length > 4 && str.charAt(start) == '0') { throw new RuntimeException( "Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden"); } if (sign == -1) { date.year = parseIntYear(str, len); } else { date.year = parseIntYear(str, sign); getTimeZone(str, date, sign, len); } //initialize values date.month = MONTH; date.day = 1; //validate and normalize validateDateTime(date); //save unnormalized values saveUnnormalized(date); if (date.utc != 0 && date.utc != 'Z') { normalize(date); } date.position = 0; return date; } /** * Converts year object representation to String * * @param date year object * @return lexical representation of month: CCYY with optional time zone sign */ protected String dateToString(DateTimeData date) { StringBuffer message = new StringBuffer(5); append(message, date.year, 4); append(message, (char) date.utc, 0); return message.toString(); } protected XMLGregorianCalendar getXMLGregorianCalendar(DateTimeData date) { return datatypeFactory .newXMLGregorianCalendar(date.unNormYear, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, date.hasTimeZone() ? date.timezoneHr * 60 + date.timezoneMin : DatatypeConstants.FIELD_UNDEFINED); } }
[ "yueny09@163.com" ]
yueny09@163.com
7be9b2be049ba06d4977bb9f913ab503c480e692
e51de484e96efdf743a742de1e91bce67f555f99
/Android/triviacrack_src/src/com/google/android/gms/internal/cf.java
99f46aefa1a2e11a1ce0bf77adfed36d7ab56c56
[]
no_license
adumbgreen/TriviaCrap
b21e220e875f417c9939f192f763b1dcbb716c69
beed6340ec5a1611caeff86918f107ed6807d751
refs/heads/master
2021-03-27T19:24:22.401241
2015-07-12T01:28:39
2015-07-12T01:28:39
28,071,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,276
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.internal; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; // Referenced classes of package com.google.android.gms.internal: // bw public final class cf implements SafeParcelable { public static final bw CREATOR = new bw(); public final int a; public final String b; public final String c; public final String d; public final String e; public final String f; public final String g; public final String h; public cf(int i, String s, String s1, String s2, String s3, String s4, String s5, String s6) { a = i; b = s; c = s1; d = s2; e = s3; f = s4; g = s5; h = s6; } public cf(String s, String s1, String s2, String s3, String s4, String s5, String s6) { this(1, s, s1, s2, s3, s4, s5, s6); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { bw.a(this, parcel, i); } }
[ "klayderpus@chimble.net" ]
klayderpus@chimble.net
0e10cf0ec01232d012cc4a6722b9fc91e23eeb21
f7b6ef06c7fee4985e8bba5edce208b3af0c13ab
/server/cs-service-sdk/src/main/java/com/cheyooh/service/sdk/idata/cmccmm/XmlCmccmmUploadPgRequest.java
e70494e1340ddf42298a9d901ace3373fded8a50
[]
no_license
iNarcissuss/bird_pay_sdk
4d2bc9f4e9b11e4524c36fd3925f836e81ecf6d2
22bbcd36b72b2a125a92023039e6958647cca977
refs/heads/master
2021-01-15T09:56:33.799774
2016-06-26T13:54:09
2016-06-26T13:54:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,847
java
package com.cheyooh.service.sdk.idata.cmccmm; import java.util.ArrayList; import java.util.List; import org.nuxeo.common.xmap.annotation.XNode; import org.nuxeo.common.xmap.annotation.XNodeList; import org.nuxeo.common.xmap.annotation.XObject; @XObject("UploadPgRequest") public class XmlCmccmmUploadPgRequest { @XNode(value = "TransactionId") private String TransactionId = ""; @XNode(value = "PltID") private String PltID=""; @XNode(value = "MD5sign") private String MD5sign=""; @XNode(value = "APPID") private String APPID=""; @XNode(value = "PID") private String PID=""; @XNode(value = "ProgramUrl") private String ProgramUrl=""; @XNode(value = "FileSize") private String FileSize=""; @XNode(value = "FileCRC32") private String FileCRC32=""; @XNode(value = "PublishToMM") private String PublishToMM=""; @XNodeList(componentType = XmlCmccmmPgExtSchema.class, type = ArrayList.class, value = "PgExtInfo") private List<XmlCmccmmPgExtSchema> PgExtInfo; public String getTransactionId() { return TransactionId; } public void setTransactionId(String transactionId) { TransactionId = transactionId; } public String getPltID() { return PltID; } public void setPltID(String pltID) { PltID = pltID; } public String getMD5sign() { return MD5sign; } public void setMD5sign(String mD5sign) { MD5sign = mD5sign; } public String getAPPID() { return APPID; } public void setAPPID(String aPPID) { APPID = aPPID; } public String getPID() { return PID; } public void setPID(String pID) { PID = pID; } public String getProgramUrl() { return ProgramUrl; } public void setProgramUrl(String programUrl) { ProgramUrl = programUrl; } public String getFileSize() { return FileSize; } public void setFileSize(String fileSize) { FileSize = fileSize; } public String getFileCRC32() { return FileCRC32; } public void setFileCRC32(String fileCRC32) { FileCRC32 = fileCRC32; } public String getPublishToMM() { return PublishToMM; } public void setPublishToMM(String publishToMM) { PublishToMM = publishToMM; } public List<XmlCmccmmPgExtSchema> getPgExtInfo() { return PgExtInfo; } public void setPgExtInfo(List<XmlCmccmmPgExtSchema> pgExtInfo) { PgExtInfo = pgExtInfo; } @Override public String toString() { return "XmlCmccmmUploadPgRequest [TransactionId=" + TransactionId + ", PltID=" + PltID + ", MD5sign=" + MD5sign + ", APPID=" + APPID + ", PID=" + PID + ", ProgramUrl=" + ProgramUrl + ", FileSize=" + FileSize + ", FileCRC32=" + FileCRC32 + ", PublishToMM=" + PublishToMM + ", PgExtInfo=" + PgExtInfo + "]"; } }
[ "fzcheng813@gmail.com" ]
fzcheng813@gmail.com
e62991b7e63be2b2a09230b337cfb803ae8f5f76
ad52ff39d2d91ce5e637b9f736b98271dab5c346
/src/com/comp/codeforces/UncleBogdanAndHappiness.java
d10caa0aa7acf87659b8ddb7ac2312a109cf744e
[]
no_license
Am-Coder/Competitive-Coding
af52e198ec9d595bbcce533658b5bb8d78c8136b
1500cd3f453f6586b5630707abeb59f692a3a14f
refs/heads/master
2023-06-12T14:37:55.417713
2021-03-12T14:46:12
2021-06-19T14:46:12
198,250,303
5
0
null
null
null
null
UTF-8
Java
false
false
6,920
java
package com.comp.codeforces; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.LinkedList; import java.util.Random; import java.util.StringTokenizer; public class UncleBogdanAndHappiness { static final int MAXN = 1000_006; static final long MOD = (long) 1e9 + 7; static LinkedList<Integer>[] adj; static int[] pi; static int[] hi; static int n; public static void main(String[] args) throws IOException { MyScanner s = new MyScanner(); Print p = new Print(); int t = s.nextInt(); while (t-- > 0) { n = s.nextInt(); int m = s.nextInt(); pi = new int[n]; hi = new int[n]; for (int i = 0; i < n; i++) pi[i] = s.nextInt(); for (int i = 0; i < n; i++) hi[i] = s.nextInt(); adj = new LinkedList[n]; for (int i = 0; i < n; i++) adj[i] = new LinkedList<Integer>(); for (int i = 0; i < n - 1; i++) { int a = s.nextInt() - 1; int b = s.nextInt() - 1; adj[a].add(b); adj[b].add(a); } ans = true; dfs(0, -1); if (ans) { p.println("YES"); } else { p.println("NO"); } } p.close(); } static boolean ans; public static Pair dfs(int st, int pa) { if (!ans) { return new Pair(-1, -1); } if (adj[st].size() == 1 && pa == adj[st].get(0)) { if ((hi[st] + pi[st]) % 2 == 0 && Math.abs(hi[st]) <= pi[st]) { return new Pair((pi[st] + hi[st]) / 2, pi[st]); } else { ans = false; return new Pair(-1, -1); } } int good = 0; int extra = pi[st]; int tot = 0; for (int chi : adj[st]) { if (chi != pa) { Pair pp = dfs(chi, st); good += pp.first; tot += pp.second; } } tot += extra; int g1 = 0; if ((hi[st] + tot) % 2 == 0 && Math.abs(hi[st]) <= tot) { g1 += (tot + hi[st]) / 2; if (g1 < good) { ans = false; } else { good = g1; } } else { ans = false; } return new Pair(good, tot); } public static class Pair implements Comparable<Pair> { int first; int second; public Pair(int a, int b) { this.first = a; this.second = b; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + first; result = prime * result + second; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Pair other = (Pair) obj; if (first != other.first) return false; if (second != other.second) return false; return true; } @Override public int compareTo(Pair o) { // TODO Auto-generated method stub return o.first - first; } } public static class Helper { long MOD = (long) 1e9 + 7; int MAXN = 1000_006;; Random rnd; public Helper(long mod, int maxn) { MOD = mod; MAXN = maxn; rnd = new Random(); } public Helper() { } public static int[] sieve; public static ArrayList<Integer> primes; public void setSieve() { primes = new ArrayList<>(); sieve = new int[MAXN]; int i, j; for (i = 2; i < MAXN; ++i) if (sieve[i] == 0) { primes.add(i); for (j = i; j < MAXN; j += i) { sieve[j] = i; } } } public static long[] factorial; public void setFactorial() { factorial = new long[MAXN]; factorial[0] = 1; for (int i = 1; i < MAXN; ++i) factorial[i] = factorial[i - 1] * i % MOD; } public long getFactorial(int n) { if (factorial == null) setFactorial(); return factorial[n]; } public long ncr(int n, int r) { if (r > n) return 0; if (factorial == null) setFactorial(); long numerator = factorial[n]; long denominator = factorial[r] * factorial[n - r] % MOD; return numerator * pow(denominator, MOD - 2, MOD) % MOD; } public long[] getLongArray(int size, MyScanner s) throws Exception { long[] ar = new long[size]; for (int i = 0; i < size; ++i) ar[i] = s.nextLong(); return ar; } public int[] getIntArray(int size, MyScanner s) throws Exception { int[] ar = new int[size]; for (int i = 0; i < size; ++i) ar[i] = s.nextInt(); return ar; } public int[] getIntArray(String s) throws Exception { s = s.trim().replaceAll("\\s+", " "); String[] strs = s.split(" "); int[] arr = new int[strs.length]; for (int i = 0; i < strs.length; i++) { arr[i] = Integer.parseInt(strs[i]); } return arr; } public long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); } public int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } public long max(long[] ar) { long ret = ar[0]; for (long itr : ar) ret = Math.max(ret, itr); return ret; } public int max(int[] ar) { int ret = ar[0]; for (int itr : ar) ret = Math.max(ret, itr); return ret; } public long min(long[] ar) { long ret = ar[0]; for (long itr : ar) ret = Math.min(ret, itr); return ret; } public int min(int[] ar) { int ret = ar[0]; for (int itr : ar) ret = Math.min(ret, itr); return ret; } public long sum(long[] ar) { long sum = 0; for (long itr : ar) sum += itr; return sum; } public long sum(int[] ar) { long sum = 0; for (int itr : ar) sum += itr; return sum; } public long pow(long base, long exp, long MOD) { base %= MOD; long ret = 1; while (exp > 0) { if ((exp & 1) == 1) ret = ret * base % MOD; base = base * base % MOD; exp >>= 1; } return ret; } } static class Print { private BufferedWriter bw; public Print() { this.bw = new BufferedWriter(new OutputStreamWriter(System.out)); } public void print(Object object) throws IOException { bw.append("" + object); } public void println(Object object) throws IOException { print(object); bw.append("\n"); } public void close() throws IOException { bw.close(); } } public static class MyScanner { BufferedReader br; StringTokenizer st; public MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ "mishraaman2210@gmail.com" ]
mishraaman2210@gmail.com
595cc869d4231386a01f65719f45cb153fc4d14c
24605743dbd29461804c94bccde1c28fe7b57703
/fr/unedic/cali/autresdoms/cohab/sigma/servicecali/dom/CriteresCali.java
23e5afc949c28c8941f3114f30173d540476d6ff
[]
no_license
foretjerome/ARE
aa00cee993ed3e61c47f246616dc2c6cc3ab8f45
d8e2b5c67ae0370e254742cd5f6fcf50c0257994
refs/heads/master
2020-05-02T15:21:27.784344
2019-03-27T16:58:56
2019-03-27T16:58:56
178,038,731
0
0
null
null
null
null
UTF-8
Java
false
false
3,482
java
package fr.unedic.cali.autresdoms.cohab.sigma.servicecali.dom; import fr.unedic.cali.autresdoms.cohab.sigma.dom.Criteres; import fr.unedic.cali.autresdoms.cohab.sigma.servicecali.dom.spec.CriteresCaliSpec; import fr.unedic.util.temps.Damj; public class CriteresCali extends Criteres implements CriteresCaliSpec { private String m_numeroAllocataire; private int m_identifiantPriseEnCharge; private Damj m_dateDeRecherchePec; private Damj m_dateDispense; private Damj m_dateDebutEvtActualisation; private Damj m_dateFinEvtActualisation; private int m_identifiantActionFormation; private Damj m_dateRechercheFormation; private String m_idDAL; private String m_typeSegmentV1; private String m_typeDemande; private String m_identifiantRecherche; public int getIdentifiantPriseEnCharge() { return m_identifiantPriseEnCharge; } public void setIdentifiantPriseEnCharge(int p_identifiantPriseEnCharge) { m_identifiantPriseEnCharge = p_identifiantPriseEnCharge; } public Damj getDateRecherchePec() { return m_dateDeRecherchePec; } public void setDateRecherchePec(Damj p_dateRecherche) { m_dateDeRecherchePec = p_dateRecherche; } public Damj getDateDispense() { return m_dateDispense; } public void setDateDispense(Damj p_dateDispense) { m_dateDispense = p_dateDispense; } public Damj getDateDebutEvtActualisation() { return m_dateDebutEvtActualisation; } public void setDateDebutEvtActualisation(Damj p_dateDebut) { m_dateDebutEvtActualisation = p_dateDebut; } public Damj getDateFinEvtActualisation() { return m_dateFinEvtActualisation; } public void setDateFinEvtActualisation(Damj p_dateFin) { m_dateFinEvtActualisation = p_dateFin; } public int getIdentifiantActionFormation() { return m_identifiantActionFormation; } public void setIdentifiantActionFormation(int p_identifiant) { m_identifiantActionFormation = p_identifiant; } public Damj getDateRechercheFormation() { return m_dateRechercheFormation; } public void setDateRechercheFormation(Damj p_dateRecherche) { m_dateRechercheFormation = p_dateRecherche; } public String getNumeroAllocataire() { return m_numeroAllocataire; } public void setNumeroAllocataire(String p_numeroAllocataire) { m_numeroAllocataire = p_numeroAllocataire; } public String toString() { return "CriteresFormation [" + getNumeroAllocataire() + ", " + getIdentifiantActionFormation() + ", " + (getDateRechercheFormation() == null ? null : getDateRechercheFormation().formater()) + "]"; } public String getIdentifiantDemande() { return m_idDAL; } public String getTypeSegmentV1() { return m_typeSegmentV1; } public void setIdentifiantDemande(String p_idDAL) { m_idDAL = p_idDAL; } public void setTypeSegment(String p_typeSegmentV1) { m_typeSegmentV1 = p_typeSegmentV1; } public String getTypeDemande() { return m_typeDemande; } public String getIdentifiantRecherche() { return m_identifiantRecherche; } public void setTypeDemande(String p_typeDemande) { m_typeDemande = p_typeDemande; } public void setIdentifiantRecherche(String p_identifiant) { m_identifiantRecherche = p_identifiant; } } /* Location: * Qualified Name: CriteresCali * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "jerome.foret@codecasesoftware.com" ]
jerome.foret@codecasesoftware.com
165236f255c57622656b0f368f68c1d520894843
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/4/ClusterBinderTest.java
33790548a9747b40faa3ee63355bbef5b6c95a49
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
7,793
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.causalclustering.identity; import org.junit.Test; import java.io.IOException; import java.util.Optional; import java.util.UUID; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.neo4j.causalclustering.core.state.CoreBootstrapper; import org.neo4j.causalclustering.core.state.snapshot.CoreSnapshot; import org.neo4j.causalclustering.core.state.storage.SimpleStorage; import org.neo4j.causalclustering.discovery.CoreTopology; import org.neo4j.causalclustering.discovery.CoreTopologyService; import org.neo4j.logging.NullLogProvider; import org.neo4j.time.Clocks; import org.neo4j.time.FakeClock; import static java.util.Collections.emptyMap; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class ClusterBinderTest { private final CoreBootstrapper coreBootstrapper = mock( CoreBootstrapper.class ); private final FakeClock clock = Clocks.fakeClock(); @Test public void shouldTimeoutWhenNotBootrappableAndNobodyElsePublishesClusterId() throws Throwable { // given CoreTopology unboundTopology = new CoreTopology( null, false, emptyMap() ); CoreTopologyService topologyService = mock( CoreTopologyService.class ); when( topologyService.coreServers() ).thenReturn( unboundTopology ); ClusterBinder binder = new ClusterBinder( new StubClusterIdStorage(), topologyService, NullLogProvider.getInstance(), clock, () -> clock.forward( 1, TimeUnit.SECONDS ), 3_000, coreBootstrapper ); try { // when binder.bindToCluster(); fail( "Should have timed out" ); } catch ( TimeoutException e ) { // expected } // then verify( topologyService, atLeast( 2 ) ).coreServers(); } @Test public void shouldBindToClusterIdPublishedByAnotherMember() throws Throwable { // given ClusterId publishedClusterId = new ClusterId( UUID.randomUUID() ); CoreTopology unboundTopology = new CoreTopology( null, false, emptyMap() ); CoreTopology boundTopology = new CoreTopology( publishedClusterId, false, emptyMap() ); CoreTopologyService topologyService = mock( CoreTopologyService.class ); when( topologyService.coreServers() ).thenReturn( unboundTopology ).thenReturn( boundTopology ); ClusterBinder binder = new ClusterBinder( new StubClusterIdStorage(), topologyService, NullLogProvider.getInstance(), clock, () -> clock.forward( 1, TimeUnit.SECONDS ), 3_000, coreBootstrapper ); // when binder.bindToCluster(); // then Optional<ClusterId> clusterId = binder.get(); assertTrue( clusterId.isPresent() ); assertEquals( publishedClusterId, clusterId.get() ); verify( topologyService, atLeast( 2 ) ).coreServers(); } @Test public void shouldPublishStoredClusterIdIfPreviouslyBound() throws Throwable { // given ClusterId previouslyBoundClusterId = new ClusterId( UUID.randomUUID() ); CoreTopologyService topologyService = mock( CoreTopologyService.class ); when( topologyService.setClusterId( previouslyBoundClusterId ) ).thenReturn( true ); StubClusterIdStorage clusterIdStorage = new StubClusterIdStorage(); clusterIdStorage.writeState( previouslyBoundClusterId ); ClusterBinder binder = new ClusterBinder( clusterIdStorage, topologyService, NullLogProvider.getInstance(), clock, () -> clock.forward( 1, TimeUnit.SECONDS ), 3_000, coreBootstrapper ); // when binder.bindToCluster(); // then verify( topologyService ).setClusterId( previouslyBoundClusterId ); Optional<ClusterId> clusterId = binder.get(); assertTrue( clusterId.isPresent() ); assertEquals( previouslyBoundClusterId, clusterId.get() ); } @Test public void shouldFailToPublishMismatchingStoredClusterId() throws Throwable { // given ClusterId previouslyBoundClusterId = new ClusterId( UUID.randomUUID() ); CoreTopologyService topologyService = mock( CoreTopologyService.class ); when( topologyService.setClusterId( previouslyBoundClusterId ) ).thenReturn( false ); StubClusterIdStorage clusterIdStorage = new StubClusterIdStorage(); clusterIdStorage.writeState( previouslyBoundClusterId ); ClusterBinder binder = new ClusterBinder( clusterIdStorage, topologyService, NullLogProvider.getInstance(), clock, () -> clock.forward( 1, TimeUnit.SECONDS ), 3_000, coreBootstrapper ); // when try { binder.bindToCluster(); fail( "Should have thrown exception" ); } catch ( BindingException e ) { // expected } } @Test public void shouldBootstrapWhenBootstrappable() throws Throwable { // given CoreTopology bootstrappableTopology = new CoreTopology( null, true, emptyMap() ); CoreTopologyService topologyService = mock( CoreTopologyService.class ); when( topologyService.coreServers() ).thenReturn( bootstrappableTopology ); when( topologyService.setClusterId( any() ) ).thenReturn( true ); CoreSnapshot snapshot = mock( CoreSnapshot.class ); when( coreBootstrapper.bootstrap( any() ) ).thenReturn( snapshot ); ClusterBinder binder = new ClusterBinder( new StubClusterIdStorage(), topologyService, NullLogProvider.getInstance(), clock, () -> clock.forward( 1, TimeUnit.SECONDS ), 3_000, coreBootstrapper ); // when BoundState boundState = binder.bindToCluster(); // then verify( coreBootstrapper ).bootstrap( any() ); Optional<ClusterId> clusterId = binder.get(); assertTrue( clusterId.isPresent() ); verify( topologyService ).setClusterId( clusterId.get() ); assertTrue( boundState.snapshot().isPresent() ); assertEquals( boundState.snapshot().get(), snapshot ); } private class StubClusterIdStorage implements SimpleStorage<ClusterId> { private ClusterId clusterId; @Override public boolean exists() { return clusterId != null; } @Override public ClusterId readState() throws IOException { return clusterId; } @Override public void writeState( ClusterId state ) throws IOException { clusterId = state; } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
bfba133438d392384fe12bb9cbe3b4da8d5384d0
5f8109fa4637634b458c196967e0a8d9a0bb2c3c
/workspace_07_08/java_02/src/day19/Test06_Command_Map.java
612ca5ae375af2618eed1655112213d4d027691f
[]
no_license
mini222333/mini
72e7a9f2126dfdd0b5dde551cfaa4d375c0256d2
787b02e0d4db27a208a3e2cac652711898ed2cbe
refs/heads/master
2020-07-29T09:31:16.776045
2019-09-20T08:54:40
2019-09-20T08:54:40
209,746,612
0
0
null
null
null
null
UTF-8
Java
false
false
1,048
java
package day19; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Test06_Command_Map { //Map 구조로 설계 public static void main(String[] args) { Map<String, Command> map = new HashMap<String, Command>(); Scanner scanner = new Scanner(System.in); System.out.println("delete update select insert중 하나 입력하세요"); String cmd = scanner.nextLine(); //객체 4개 맵구조가 관리 map.put("insert", new InsertCommand());//insert.insertcommand레퍼런싱 map.put("update", new UpdateCommand()); map.put("select", new SelectCommand()); map.put("delete", new DeleteCommand()); map.put("new" , new Command() {//new 입력하면 기능추가 @Override public void exec() { System.out.println(" 기능 추가 "); } } ); //String cmd = args[0]; //delete update select insert Command command = map.get(cmd); if(command != null) command.exec();//스위치를 이 두문장이 처리 //map.get(cmd).exec(); } }
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
cf17d7c813137cba4afd3ea9cc9312d42fef6a0d
97101f3922ef73fcfb80a0a3f5e420f84ab4d132
/testing/src/main/java/com/sda/testing/junit5/Day.java
4cdbe576ac6ea59c76511015e980a046b5b08be2
[]
no_license
cristian-hum/Spring-si-recapiturare
27deb99a7ce5bd490d3ecac2f912b8e1d0f9e377
0be61d6e681bee7fd8718e33fe155b093c05f3d6
refs/heads/master
2023-08-13T23:56:56.303296
2021-10-09T09:45:10
2021-10-09T09:45:10
410,203,653
1
0
null
null
null
null
UTF-8
Java
false
false
145
java
package com.sda.testing.junit5; public enum Day { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }
[ "cosmin.bucur@kambi.com" ]
cosmin.bucur@kambi.com
aa0f3d6becf85d8336707f8d122b02671baafaeb
6bd99e8942d2ed8c99e280316b226ac5370440e3
/htfapi-investregistercenter/src/main/java/com/htf/bigdata/registercenter/RegisterCenterApplication.java
ffde1a4980cfa3c5dae15a13b79dc3befccb7747
[]
no_license
RichardZhong/htf-assistant-platform
bacd37861bbb99d5ea51578452c05156e10d1f1a
7c5f1497389290a30016011879fac040292f99b5
refs/heads/master
2023-03-18T14:36:56.629227
2019-12-11T02:52:37
2019-12-11T02:52:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,136
java
package com.htf.bigdata.registercenter; import java.util.TimeZone; import javax.annotation.PostConstruct; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; import org.springframework.context.ApplicationContext; @SpringBootApplication @EnableEurekaServer public class RegisterCenterApplication extends SpringBootServletInitializer { @PostConstruct void postConstruct() { TimeZone.setDefault(TimeZone.getTimeZone("PRC")); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(RegisterCenterApplication.class); } public static void main(String[] args) { SpringApplication springApplication = new SpringApplication(RegisterCenterApplication.class); final ApplicationContext applicationContext = springApplication.run(args); } }
[ "zhairp@zhairpdeMacBook-Pro.local" ]
zhairp@zhairpdeMacBook-Pro.local
03ad7eae9963b627d57c6702ef149cc93fd206cd
106cce45fa593bc6ef7ea105f5055b5d13d251d0
/Examples/Discourse/src/generated/java/discourse/example/com/anonymous/admin/sitesettings/FixedCategoryPositionsOnCreate.java
627e01cbbfba5ab224d91771b53d1a1d50ac8dcd
[]
no_license
glelouet/JSwaggerMaker
f7faf2267e900d78019db42979922d2f2c2fcb33
1bf9572d313406d1d9e596094714daec6f50e068
refs/heads/master
2022-12-08T04:28:53.468581
2022-12-04T14:37:47
2022-12-04T14:37:47
177,210,549
0
0
null
2022-12-04T14:37:48
2019-03-22T21:19:28
Java
UTF-8
Java
false
false
945
java
package discourse.example.com.anonymous.admin.sitesettings; import java.util.HashMap; import java.util.Map; import discourse.example.com.Anonymous; import fr.lelouet.jswaggermaker.client.common.impl.DelegateTransfer; public class FixedCategoryPositionsOnCreate extends DelegateTransfer<Anonymous> { public FixedCategoryPositionsOnCreate(Anonymous delegate) { super(delegate); } /** * * <p> * Update fixed category positions on create * </p> * * @param fixed_category_positions_on_create */ public void put(boolean fixed_category_positions_on_create) { String url = ("https://discourse.example.com//admin/site_settings/fixed_category_positions_on_create"); Map<String, Object> content = new HashMap<>(); content.put("fixed_category_positions_on_create", (fixed_category_positions_on_create)); requestPut(url, null, content, Void.class); } }
[ "guillaume.lelouet@gmail.com" ]
guillaume.lelouet@gmail.com
45d69f53b4372eee1858996726e4d209874fe7ec
d991dfbef8c02b207ba543ac0720cbd7bda94e57
/common/common-base/src/main/java/org/oclc/circill/toolkit/common/base/BaseChainingServiceContext.java
48e3297845363bf806bb07ede981ac4e27c71cd6
[ "MIT" ]
permissive
OCLC-Developer-Network/circill-toolkit
fa66f6a800029b51960634dc674562c4588c63ae
f29d6f59a8b223dabf7b733f178be8fd4489ad58
refs/heads/master
2023-03-18T22:06:48.392938
2021-03-04T22:19:07
2021-03-04T22:19:07
307,710,469
2
0
null
null
null
null
UTF-8
Java
false
false
2,419
java
/* * Copyright (c) 2017 OCLC, Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the MIT/X11 license. The text of the license can be * found at http://www.opensource.org/licenses/mit-license.php. */ package org.oclc.circill.toolkit.common.base; import org.oclc.circill.toolkit.service.base.ServiceContext; import org.oclc.circill.toolkit.service.base.ServiceInitiationData; import org.oclc.circill.toolkit.service.base.ServiceMessage; import org.oclc.circill.toolkit.service.base.ServiceResponseData; import org.oclc.circill.toolkit.service.base.ValidationException; import java.util.ArrayList; import java.util.List; /** * An implementation of the {@link ChainingServiceContext}. * Note: When an interface is added to the Toolkit that is appropriate for a ServiceContext to implement, a default * implementation of its methods should be added to this class so that classes which extend this class * will gain this default implementation. * @param <SM> the type of {@link ServiceMessage} * @param <ID> the type of {@link ServiceInitiationData} * @param <RD> the type of {@link ServiceResponseData} */ public class BaseChainingServiceContext<SM extends ServiceMessage<ID, RD>, ID extends ServiceInitiationData, RD extends ServiceResponseData> implements ChainingServiceContext<SM, ID, RD> { protected List<ServiceContext<SM, ID, RD>> serviceContexts = new ArrayList<>(0); @Override public List<ServiceContext<SM, ID, RD>> getServiceContexts() { return serviceContexts; } @Override public void setServiceContexts(final List<ServiceContext<SM, ID, RD>> serviceContexts) { this.serviceContexts = serviceContexts; } @Override public void appendServiceContext(final ServiceContext<SM, ID, RD> serviceContext) { serviceContexts.add(serviceContext); } @Override public void validateBeforeMarshalling(final SM message) throws ValidationException { for (final ServiceContext<SM, ID, RD> serviceContext : serviceContexts) { serviceContext.validateBeforeMarshalling(message); } } @Override public void validateAfterUnmarshalling(final SM message) throws ValidationException { for (final ServiceContext<SM, ID, RD> serviceContext : serviceContexts) { serviceContext.validateAfterUnmarshalling(message); } } }
[ "73138532+bushmanb614@users.noreply.github.com" ]
73138532+bushmanb614@users.noreply.github.com