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
f6f6fb6a646dd5f4660120890d4d9fadc8cbc83f
18606c6b3f164a935e571932b3356260b493e543
/JastAddExtensions/JastAddModules/case_study/JHotDraw 7.1/jhotdraw7/src/main/java/batik1.8pre/org/apache/batik/util/HaltingThread.java
96fb5543d080959e604574684364b582111bd65e
[]
no_license
jackyhaoli/abc
d9a3bd2d4140dd92b9f9d0814eeafa16ea7163c4
42071b0dcb91db28d7b7fdcffd062f567a5a1e6c
refs/heads/master
2020-04-03T09:34:47.612136
2019-01-11T07:16:04
2019-01-11T07:16:04
155,169,244
0
0
null
null
null
null
UTF-8
Java
false
false
3,117
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. */ module org.apache.batik1_8pre; package org.apache.batik.util; /** * This is a subclass of java.lang.Thread that includes a non-intrusive * 'halt' method. The Halt method simply sets a boolean that can be * checked periodically during expensive processing. * * @author <a href="mailto:deweese@apache.org">deweese</a> * @version $Id: HaltingThread.java 478169 2006-11-22 14:23:24Z dvholten $ */ public class HaltingThread extends Thread { /** * Boolean indicating if this thread has ever been 'halted'. */ protected boolean beenHalted = false; public HaltingThread() { } public HaltingThread(Runnable r) { super(r); } public HaltingThread(String name) { super(name); } public HaltingThread(Runnable r, String name) { super(r, name); } /** * returns true if someone has halted the thread. */ public boolean isHalted() { synchronized (this) { return beenHalted; } } /** * Set's beenHalted to true. */ public void halt() { synchronized (this) { beenHalted = true; } } /** * Set's beenHalted to false. */ public void clearHalted() { synchronized (this) { beenHalted = false; } } /** * Calls 'halt' on <tt>Thread.currentThread()</tt> if it is an * instance of HaltingThread otherwise it does nothing. */ public static void haltThread() { haltThread(Thread.currentThread()); } /** * Calls 'halt' on <tt>t</tt> if it is an instance of * HaltingThread otherwise it does nothing. */ public static void haltThread(Thread t) { if (t instanceof HaltingThread) ((HaltingThread)t).halt(); } /** * Returns the result of calling hasBeenHalted on * <tt>Thread.currentThread()</tt>, if it is an instance of * HaltingThread otherwise it returns false. */ public static boolean hasBeenHalted() { return hasBeenHalted(Thread.currentThread()); } /** * Returns the result of calling hasBeenHalted on <tt>t</tt>, * if it is an instance of HaltingThread otherwise it returns false. */ public static boolean hasBeenHalted(Thread t) { if (t instanceof HaltingThread) return ((HaltingThread)t).isHalted(); return false; } }
[ "neil@40514614-586c-40e6-bf05-bf7e477dc3e6" ]
neil@40514614-586c-40e6-bf05-bf7e477dc3e6
60ba92cb1f2676be5755ace669f34c67d5ace1e0
2692a566517b0a8213194381aa3425721a9788fd
/src/main/java/com/dimple/project/blog/service/TagService.java
8c95a063111f090f2501aaf41505d8790484712e
[ "Apache-2.0" ]
permissive
pjsqwerty/DimpleBlog
262f7ad6f5affd55a5832d1f5f2ee4e880bcf19d
2504ea39cb13d8dab513cee38bef2aac337d216b
refs/heads/master
2023-02-21T01:20:36.331699
2021-01-07T11:00:35
2021-01-07T11:00:35
269,525,943
0
0
Apache-2.0
2020-06-05T03:53:27
2020-06-05T03:53:26
null
UTF-8
Java
false
false
1,885
java
package com.dimple.project.blog.service; import com.dimple.project.blog.domain.Tag; import com.dimple.project.blog.domain.TagMapping; import java.util.List; /** * @className: TagService * @description: * @author: Dimple * @date: 11/22/19 */ public interface TagService { /** * 获取Tag列表 * * @param tag 带查询条件的Tag * @return tagList */ List<Tag> selectTagList(Tag tag); /** * 新增Tag * * @param tag tag实体 * @return 受影响的行数 */ int insertTag(Tag tag); /** * 根据Id查询tag * * @param id id * @return tag实体 */ Tag selectTagById(Long id); /** * 更新Tag * * @param tag tag实体 * @return 受影响的行数 */ int updateTag(Tag tag); /** * 删除Tag * * @param ids tag的id * @return 受影响的行数 */ int deleteTagByIds(String ids); /** * 删除Tag的mapping,里面设置的有哪个字段的值,便以那个值作为条件进行删除 * * @param tagMapping TagMapping * @return 受影响的行数 */ int deleteTagMapping(TagMapping tagMapping); /** * 根据Tag的title 和 type搜索Tag * * @param title Tag的title * @return Tag */ Tag selectTagByTitle(String title); /** * 新增Tag Mapping映射关系 * * @param tagMapping 映射关系 * @return 受影响的行数 */ int insertTagMapping(TagMapping tagMapping); /** * 更新TagMapping * * @param id id * @param tagTitleList list */ void updateTagMapping( Long id, List<String> tagTitleList); /** * 根据Tag的type和Id获取该Id下的所有Tag * * @param id id * @return Tag list */ List<Tag> selectTagListByBlogId(Long id); }
[ "bianxiaofeng@sohu.com" ]
bianxiaofeng@sohu.com
c7787fc310737418c32f047b82961db1a74001b3
0206367829f6c13c3005733cce3c79337cbbca07
/silo-api/src/main/java/se/l4/silo/Transaction.java
367cdbbb1c680c7856723fbf5c81896b866667d1
[ "MIT" ]
permissive
LevelFourAB/silo
d74eb129b3887d2589ce11e5a1887be575b2710f
3748fcd7b494c9849602eee891e633b5fc6d30a8
refs/heads/master
2021-09-20T07:45:06.119901
2021-09-01T07:14:48
2021-09-01T07:15:43
54,744,500
1
1
Apache-2.0
2021-01-10T14:31:47
2016-03-25T20:02:26
Java
UTF-8
Java
false
false
1,367
java
package se.l4.silo; import java.util.function.Function; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** * Transaction in {@link Silo}. See {@link Silo} for details on the * transaction semantics in use. */ public interface Transaction { /** * Rollback any changes made. * * @return * {@link Mono} that will roll back any changes done via this transaction */ Mono<Void> rollback(); /** * Commit any changes made. * * @return * {@link Mono} that will commit any changes done via this transaction */ Mono<Void> commit(); /** * Turn the given {@link Mono} into a transactional one that will execute * within this transaction. * * @param <V> * @param mono * @return */ <V> Mono<V> wrap(Mono<V> mono); /** * Turn the given {@link Flux} into a transactional one that will execute * within this transaction. * * @param <V> * @param flux * @return */ <V> Flux<V> wrap(Flux<V> flux); /** * Execute the given function within this transaction. * * <pre> * transaction.execute(tx -> { * // This will run within this transaction * return collection.store(new TestData()); * }); * </pre> * * @param <V> * @param scopeFunction * @return */ <V> Flux<V> execute(Function<Transaction, Publisher<V>> scopeFunction); }
[ "a@holstenson.se" ]
a@holstenson.se
a0e8d1e3aa361930705d942054b16b6fa116d86c
ca60502a473aaff1594674cc4ac49db8b5546e51
/src/main/java/org/encog/app/analyst/commands/CmdCluster.java
e47bc0dee4412498dc3480bbd407cce998fd42ab
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
pidster/encog-java-core
9ce59b82cf07e2c3710f294b0e5b98c67463f7b1
50aa01c19d09ffc431d5310e06ea7fc2a230c342
refs/heads/master
2021-01-24T20:47:28.860579
2014-04-13T14:14:34
2014-04-13T14:14:34
17,671,426
0
0
NOASSERTION
2020-10-14T00:27:15
2014-03-12T15:16:26
Java
UTF-8
Java
false
false
3,390
java
/* * Encog(tm) Core v3.2 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2013 Heaton Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.app.analyst.commands; import java.io.File; import org.encog.app.analyst.EncogAnalyst; import org.encog.app.analyst.csv.AnalystClusterCSV; import org.encog.app.analyst.script.prop.ScriptProperties; import org.encog.app.analyst.util.AnalystReportBridge; import org.encog.util.csv.CSVFormat; import org.encog.util.logging.EncogLogging; /** * This command is used to randomize the lines in a CSV file. * */ public class CmdCluster extends Cmd { /** * The default number of iterations. */ public static final int DEFAULT_ITERATIONS = 100; /** * The name of this command. */ public static final String COMMAND_NAME = "CLUSTER"; /** * Construct the cluster command. * * @param analyst * The analyst object to use. */ public CmdCluster(final EncogAnalyst analyst) { super(analyst); } /** * {@inheritDoc} */ @Override public boolean executeCommand(final String args) { // get filenames final String sourceID = getProp().getPropertyString( ScriptProperties.CLUSTER_CONFIG_SOURCE_FILE); final String targetID = getProp().getPropertyString( ScriptProperties.CLUSTER_CONFIG_TARGET_FILE); final int clusters = getProp().getPropertyInt( ScriptProperties.CLUSTER_CONFIG_CLUSTERS); getProp().getPropertyString(ScriptProperties.CLUSTER_CONFIG_TYPE); EncogLogging.log(EncogLogging.LEVEL_DEBUG, "Beginning cluster"); EncogLogging.log(EncogLogging.LEVEL_DEBUG, "source file:" + sourceID); EncogLogging.log(EncogLogging.LEVEL_DEBUG, "target file:" + targetID); EncogLogging.log(EncogLogging.LEVEL_DEBUG, "clusters:" + clusters); final File sourceFile = getScript().resolveFilename(sourceID); final File targetFile = getScript().resolveFilename(targetID); // get formats final CSVFormat format = getScript().determineFormat(); // mark generated getScript().markGenerated(targetID); // prepare to normalize final AnalystClusterCSV cluster = new AnalystClusterCSV(); cluster.setScript(getScript()); getAnalyst().setCurrentQuantTask(cluster); cluster.setReport(new AnalystReportBridge(getAnalyst())); final boolean headers = getScript().expectInputHeaders(sourceID); cluster.analyze(getAnalyst(), sourceFile, headers, format); cluster.process(targetFile, clusters, getAnalyst(), DEFAULT_ITERATIONS); getAnalyst().setCurrentQuantTask(null); return cluster.shouldStop(); } /** * {@inheritDoc} */ @Override public String getName() { return CmdCluster.COMMAND_NAME; } }
[ "jeff@jeffheaton.com" ]
jeff@jeffheaton.com
1ec82d5c9c1279dc9a287f1f7089c5adcd0f241d
74539d9e911ccfd18b0c13a526810be052eec77b
/src/com/google/gdata/data/dublincore/Format.java
aff47dfb8acbb59bee7de337f723a357eab1e14c
[]
no_license
dovikn/inegotiate-android
723f12a3ee7ef46b980ee465b36a6a154e5adf6f
cea5e088b01ae4487d83cd1a84e6d2df78761a6e
refs/heads/master
2021-01-12T02:14:41.503567
2017-01-10T04:20:15
2017-01-10T04:20:15
78,492,148
0
1
null
null
null
null
UTF-8
Java
false
false
918
java
package com.google.gdata.data.dublincore; import com.google.gdata.data.ExtensionDescription; import com.google.gdata.data.ExtensionDescription.Default; import com.google.gdata.data.ValueConstruct; @Default(localName = "format", nsAlias = "dc", nsUri = "http://purl.org/dc/terms") public class Format extends ValueConstruct { static final String XML_NAME = "format"; public Format() { this(null); } public Format(String value) { super(DublincoreNamespace.DC_NS, XML_NAME, null, value); } public static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(Format.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; } public String toString() { return "{Format value=" + getValue() + "}"; } }
[ "dovik@dovik-macbookpro.roam.corp.google.com" ]
dovik@dovik-macbookpro.roam.corp.google.com
1212c18c4c2b0c4b3b41bcf3cca3be82b630fe52
43c012a9cdea1df74ddeaf16f7850ccaaedf0782
/fermat-android-core/src/main/java/com/bitdubai/android_core/app/common/version_1/provisory/InstalledDesktop.java
80622509fb0284718dbbd0db69bc827923a8a433
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
franklinmarcano1970/fermat
ef08d8c46740ac80ebeec96eca85936ce36d3ee8
c5239a0d4c97414881c9baf152243e6311c9afd5
refs/heads/develop
2020-04-07T04:12:39.745585
2016-05-23T21:20:37
2016-05-23T21:20:37
52,887,265
1
22
null
2016-08-23T12:58:03
2016-03-01T15:26:55
Java
UTF-8
Java
false
false
282
java
package com.bitdubai.android_core.app.common.version_1.provisory; import com.bitdubai.fermat_api.layer.all_definition.runtime.FermatApp; import java.io.Serializable; /** * Created by mati on 2016.02.22.. */ public interface InstalledDesktop extends FermatApp,Serializable{ }
[ "mati_fur@hotmail.com" ]
mati_fur@hotmail.com
59a053bcaccf7d62082270026995a74c2161eb25
05e45581f8b3b147af2f42cff1b701654d7b61d2
/suzhou/taicang/common/src/main/java/cn/gtmap/landsale/service/AuditLogService.java
3819b189db3e04e69eccfd5e3467f53aa963dcb1
[]
no_license
TimfuDeng/gtfree-bank
581bdc0478e47e2303296b3b6921ae59f976208f
48106284af428a449f0a2ccbee1653b57b4bd120
refs/heads/master
2020-04-03T05:22:06.031843
2018-10-28T06:50:40
2018-10-28T06:50:40
155,043,209
0
2
null
null
null
null
UTF-8
Java
false
false
1,210
java
package cn.gtmap.landsale.service; import cn.gtmap.egovplat.core.data.Page; import cn.gtmap.egovplat.core.data.Pageable; import cn.gtmap.landsale.Constants; import cn.gtmap.landsale.model.TransAuditLog; import java.util.Date; /** * 审计日志服务 * @author <a href="mailto:shenjian@gtmap.cn">shenjian</a> * @version 1.0, 2015/6/9 */ public interface AuditLogService { /** * 获取日志对象 * @param auditId * @return */ TransAuditLog getTransAuditLog(String auditId); /** * 分页获取日志信息 * @param beginTime 查询条件 * @param endTime * @param request * @param producer 来源 * @param category 类别 * @return */ Page<TransAuditLog> findTransAuditLogs(Date beginTime, Date endTime,Constants.LogProducer producer, Constants.LogCategory category,Pageable request); /** * 清除日志 * @param startTime 起时间 * @param endTime 至时间 */ void clearAuditLogs(Date startTime, Date endTime); /** * 保存审计日志 * @param transAuditLog 日志对象 */ void saveAuditLog(TransAuditLog transAuditLog); }
[ "1337343005@qq.com" ]
1337343005@qq.com
5a5fc38333065ecf3b7ba663ae5f71edfce76251
7f298c2bf9ff5a61eeb87e3929e072c9a04c8832
/spring-web/src/test/java/org/springframework/web/context/support/AnnotationConfigWebApplicationContextTests.java
98fee528366d66770470292c6e152803c772966b
[ "Apache-2.0" ]
permissive
stwen/my-spring5
1ca1e85786ba1b5fdb90a583444a9c030fe429dd
d44be68874b8152d32403fe87c39ae2a8bebac18
refs/heads/master
2023-02-17T19:51:32.686701
2021-01-15T05:39:14
2021-01-15T05:39:14
322,756,105
0
0
null
null
null
null
UTF-8
Java
false
false
2,882
java
/* * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.context.support; import org.junit.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.context.annotation.AnnotationBeanNameGenerator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; /** * @author Chris Beams * @author Juergen Hoeller */ public class AnnotationConfigWebApplicationContextTests { @Test @SuppressWarnings("resource") public void registerSingleClass() { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.register(Config.class); ctx.refresh(); TestBean bean = ctx.getBean(TestBean.class); assertNotNull(bean); } @Test @SuppressWarnings("resource") public void configLocationWithSingleClass() { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.setConfigLocation(Config.class.getName()); ctx.refresh(); TestBean bean = ctx.getBean(TestBean.class); assertNotNull(bean); } @Test @SuppressWarnings("resource") public void configLocationWithBasePackage() { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.setConfigLocation("org.springframework.web.context.support"); ctx.refresh(); TestBean bean = ctx.getBean(TestBean.class); assertNotNull(bean); } @Test @SuppressWarnings("resource") public void withBeanNameGenerator() { AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); ctx.setBeanNameGenerator(new AnnotationBeanNameGenerator() { @Override public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) { return "custom-" + super.generateBeanName(definition, registry); } }); ctx.setConfigLocation(Config.class.getName()); ctx.refresh(); assertThat(ctx.containsBean("custom-myConfig"), is(true)); } @Configuration("myConfig") static class Config { @Bean public TestBean myTestBean() { return new TestBean(); } } static class TestBean { } }
[ "xianhao_gan@qq.com" ]
xianhao_gan@qq.com
851e43652caaf7a2a38f06d3636f5fdd11e99d57
b39cbeaeb411968d6fa3c059b833fe4c06852a33
/src/Chapter7/Task2/Cleanser.java
7643f1c6bdd3741f78f1941537afaa366bca2bf1
[]
no_license
AvdeevaElena/FromBookEckel_JavaSE
1e11b3265f3f84306fdf9d74a55e622a32fdafc9
89ff1b084a9d1c6ff69b05333d57fbea7c0b9620
refs/heads/master
2020-04-16T17:19:37.451624
2019-01-15T02:42:18
2019-01-15T02:42:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
package Chapter7.Task2; public class Cleanser { private String s = "Cleanser"; public void append(String a) { s += a; } public void dilute() { append(" diluteQ"); } public void apply() { append(" apply()"); } public void scrub() { append(" scrub()"); } public String toString() { return s; } public static void main(String[] args) { Cleanser x = new Cleanser(); x.dilute(); x.apply(); x.scrub(); System.out.println(x); } }
[ "avdeevaelena5@gmail.com" ]
avdeevaelena5@gmail.com
d5d42b516d164b930ab106b3e6dcc7b2f3e044dc
71b919749069accbdbfc35f7dba703dd5c5780a6
/learn-basics/src/main/java/list/Employee.java
6cfc57ad699b557c2ba18d4273998cae52af9644
[ "MIT" ]
permissive
xp-zhao/learn-java
489f811acf20649b773032a6831fbfc72dc4c418
108dcf1e4e02ae76bfd09e7c2608a38a1216685c
refs/heads/master
2023-09-01T03:07:23.795372
2023-08-25T08:28:59
2023-08-25T08:28:59
118,060,929
2
0
MIT
2022-06-21T04:16:08
2018-01-19T01:39:11
Java
UTF-8
Java
false
false
201
java
package list; import lombok.Builder; import lombok.Data; /** * Employee.java * * @author: zhaoxiaoping * @date: 2019/10/28 **/ @Builder @Data public class Employee { long id; String name; }
[ "13688396271@163.com" ]
13688396271@163.com
9f82bdc3980b5b745e467e11c44c26126578a485
9e1ad925f368f89a3849de6cedcfa4eb67658494
/src/main/java/heaps/maps/LRUCache.java
87a107d5a4708f04c741b4b4ed69d3c544380f4e
[]
no_license
sherif98/ProblemSolving
d776c7aff35f3369a5316d567d092daee290c125
e120733197d6db08cd82448412ce8fa8626a4763
refs/heads/master
2021-09-16T22:40:36.257030
2018-06-25T16:52:46
2018-06-25T16:52:46
125,643,027
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package heaps.maps; import java.util.LinkedHashMap; import java.util.Map; public class LRUCache { private LRU lru; public LRUCache(int capacity) { lru = new LRU(capacity); } public int get(int key) { return lru.getOrDefault(key, -1); } public void set(int key, int value) { lru.put(key, value); } } class LRU extends LinkedHashMap<Integer, Integer> { private int capacity; public LRU(int capacity) { super(capacity, 0.75f, true); this.capacity = capacity; } @Override public boolean removeEldestEntry(Map.Entry<Integer, Integer> entry) { return this.size() > capacity; } }
[ "sherif.hamdy.1995@gmail.com" ]
sherif.hamdy.1995@gmail.com
74d72f90dea24dd6f66f1afbae73d72d9ed2c14f
ee9aa986a053e32c38d443d475d364858db86edc
/src/main/java/com/ebay/soap/eBLBaseComponents/BiddingDetailsType.java
7652f3796bc07668b1c3007de633fc0dbb4230d3
[ "Apache-2.0" ]
permissive
modelccc/springarin_erp
304db18614f69ccfd182ab90514fc1c3a678aaa8
42eeb70ee6989b4b985cfe20472240652ec49ab8
refs/heads/master
2020-05-15T13:10:21.874684
2018-05-24T15:39:20
2018-05-24T15:39:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,928
java
package com.ebay.soap.eBLBaseComponents; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * * Type defining the <b>BiddingDetails</b> container, which consists of * information about the buyer's bidding history on a single auction item. * * * <p>Java class for BiddingDetailsType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="BiddingDetailsType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ConvertedMaxBid" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/> * &lt;element name="MaxBid" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/> * &lt;element name="QuantityBid" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="QuantityWon" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="Winning" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="BidAssistant" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;any/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BiddingDetailsType", propOrder = { "convertedMaxBid", "maxBid", "quantityBid", "quantityWon", "winning", "bidAssistant", "any" }) public class BiddingDetailsType implements Serializable { private final static long serialVersionUID = 12343L; @XmlElement(name = "ConvertedMaxBid") protected AmountType convertedMaxBid; @XmlElement(name = "MaxBid") protected AmountType maxBid; @XmlElement(name = "QuantityBid") protected Integer quantityBid; @XmlElement(name = "QuantityWon") protected Integer quantityWon; @XmlElement(name = "Winning") protected Boolean winning; @XmlElement(name = "BidAssistant") protected Boolean bidAssistant; @XmlAnyElement(lax = true) protected List<Object> any; /** * Gets the value of the convertedMaxBid property. * * @return * possible object is * {@link AmountType } * */ public AmountType getConvertedMaxBid() { return convertedMaxBid; } /** * Sets the value of the convertedMaxBid property. * * @param value * allowed object is * {@link AmountType } * */ public void setConvertedMaxBid(AmountType value) { this.convertedMaxBid = value; } /** * Gets the value of the maxBid property. * * @return * possible object is * {@link AmountType } * */ public AmountType getMaxBid() { return maxBid; } /** * Sets the value of the maxBid property. * * @param value * allowed object is * {@link AmountType } * */ public void setMaxBid(AmountType value) { this.maxBid = value; } /** * Gets the value of the quantityBid property. * * @return * possible object is * {@link Integer } * */ public Integer getQuantityBid() { return quantityBid; } /** * Sets the value of the quantityBid property. * * @param value * allowed object is * {@link Integer } * */ public void setQuantityBid(Integer value) { this.quantityBid = value; } /** * Gets the value of the quantityWon property. * * @return * possible object is * {@link Integer } * */ public Integer getQuantityWon() { return quantityWon; } /** * Sets the value of the quantityWon property. * * @param value * allowed object is * {@link Integer } * */ public void setQuantityWon(Integer value) { this.quantityWon = value; } /** * Gets the value of the winning property. * * @return * possible object is * {@link Boolean } * */ public Boolean isWinning() { return winning; } /** * Sets the value of the winning property. * * @param value * allowed object is * {@link Boolean } * */ public void setWinning(Boolean value) { this.winning = value; } /** * Gets the value of the bidAssistant property. * * @return * possible object is * {@link Boolean } * */ public Boolean isBidAssistant() { return bidAssistant; } /** * Sets the value of the bidAssistant property. * * @param value * allowed object is * {@link Boolean } * */ public void setBidAssistant(Boolean value) { this.bidAssistant = value; } /** * * * @return * array of * {@link Object } * {@link Element } * */ public Object[] getAny() { if (this.any == null) { return new Object[ 0 ] ; } return ((Object[]) this.any.toArray(new Object[this.any.size()] )); } /** * * * @return * one of * {@link Object } * {@link Element } * */ public Object getAny(int idx) { if (this.any == null) { throw new IndexOutOfBoundsException(); } return this.any.get(idx); } public int getAnyLength() { if (this.any == null) { return 0; } return this.any.size(); } /** * * * @param values * allowed objects are * {@link Object } * {@link Element } * */ public void setAny(Object[] values) { this._getAny().clear(); int len = values.length; for (int i = 0; (i<len); i ++) { this.any.add(values[i]); } } protected List<Object> _getAny() { if (any == null) { any = new ArrayList<Object>(); } return any; } /** * * * @param value * allowed object is * {@link Object } * {@link Element } * */ public Object setAny(int idx, Object value) { return this.any.set(idx, value); } }
[ "601906911@qq.com" ]
601906911@qq.com
ace5c45345f242e7a82ebafcb413f0299d70d1b7
0aff25b84e76c9e11efde0d8f2d4236903c5ac6c
/day17-API/src/api/collection/Book.java
4ac9489881143dc98d8b034918ce87abdc70314d
[]
no_license
YuHyeonDong/02_java
e04bb8850c3f9838f59a7c7b1bdee7b0eacdd40d
6260c9f9d16d6e5a080a90c66a52b5e9af07a9cd
refs/heads/master
2020-06-14T22:20:10.014853
2019-08-11T06:45:46
2019-08-11T06:45:46
195,142,860
0
0
null
null
null
null
UTF-8
Java
false
false
4,721
java
package api.collection; /** * 책 한 권의 정보를 담는 클래스 * ---------------------------- * 일련번호 : sequence : int * ISBN : isbn : String * 제목 : title : String * 저자 : author : String * 출판사 : company : String * 페이지 수 : totalPage : int * 가격 : price : int * 재고수량 : quantity : int * ---------------------------- * 생성자 중복정의 * (기본생성자 명시, 매개변수 생성자 중복정의) * ---------------------------- * 메소드 : * -- 기능 메소드 * void print() : 책의 정보를 출력하는 메소드 * void buy(int amount) : amount 만큼 책의 재고를 늘리는 메소드 * void sell(int amount) : amount 만큼 책의 재고를 줄이는 메소드 * * -- 각 필드를 설정하는 메소드 * -- 자바 빈즈(Java Beans) 규격에 의한 접근자/수정자 메소드 * -- getter/setter * * getter 작성시 메소드 이름 규격 * ==> get으로 시작하고 멤버변수필드의 첫글자를 대문자로 조합 * 매개변수는 없음. * 리턴타입이 해당 멤버변수 필드의 타입과 맞춤 * * 예) sequence 필드의 getter 는 다음의 규격을 갖는다. * int getSequnece() { * return this.requence; * } * * setter 작성시 메소드 이름 규격 * ==> set으로 시작하고 멤버변수 필드의 첫글자를 대문자로 조합 * 매개변수는 해당 멤버변수 필드와 같은 타입과 변수로 받는다. * 리턴값이 없이 작성 * void setSequence(int sequence) { * this.sequcne = sequence; * } * * 만약 멤버변수 필드가 boolean 타입이라면 getter의 이름은 * get으로 시작하지 않고 is로 시작한다. * ==================================================================== * 1. 캡슐화 적용 : 멤버변수는 private * 생성자, 메소드는 public * * 2. 메소드 재정의 : toString(), * equals() & hashCode() 재정의 * ==> sequence 필드 기준 재정의 * * 3. 메소드 수정 : print() 메소드는 this 객체 출력코드로 변경 * ==================================================================== * @author 304 * */ public class Book { private int sequence; private String isbn; private String title; private String author; private String company; private int totalPage; private int price; private int quantity; public Book() { } public Book(int sequence) { this(); setSequence(sequence); } public Book(int sequence, String isbn) { this(sequence); setIsbn(isbn); } public Book(int sequence, String isbn, String title) { this(sequence, isbn); this.title = title; } // sequence 멤버 변수의 getter public int getSequence() { return sequence; } // sequence 의 setter public void setSequence(int sequence) { this.sequence = sequence; } // isbn멤버변수 필드에 대한 getter public String getIsbn() { return isbn; } // isbn의 setter public void setIsbn(String isbn) { this.isbn = isbn; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getCompany() { return company; } public void setCompany(String company) { this.company = company; } public int getTotalPage() { return totalPage; } public void setTotalPage(int totalPage) { this.totalPage = totalPage; } public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + sequence; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Book other = (Book) obj; if (sequence != other.sequence) return false; return true; } public String toString() { String strBook = String.format("책 정보 [일련번호 : %d, ISBN : %s, 제목 : %s, 저자 : %s" + ", 출판사 : %s, 페이지 수 : %s, 가격 : %s, 재고수량 : %s]" , sequence, isbn, title, author, company, totalPage, price, quantity); return strBook; } }
[ "you@example.com" ]
you@example.com
3198fbc39d2c860c09cdf3f35b46be4709d8c4c4
62e334192393326476756dfa89dce9f0f08570d4
/tk_code/tiku-essay-app/essay-common/src/main/java/com/huatu/tiku/essay/entity/EssayMockExam.java
beb035e70ce26e309ed136df81e3e76083fb9bd9
[]
no_license
JellyB/code_back
4796d5816ba6ff6f3925fded9d75254536a5ddcf
f5cecf3a9efd6851724a1315813337a0741bd89d
refs/heads/master
2022-07-16T14:19:39.770569
2019-11-22T09:22:12
2019-11-22T09:22:12
223,366,837
1
2
null
2022-06-30T20:21:38
2019-11-22T09:15:50
Java
UTF-8
Java
false
false
1,931
java
package com.huatu.tiku.essay.entity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; import javax.persistence.*; import java.util.Date; /** * Created by x6 on 2017/12/28. * 申论模考 */ @NoArgsConstructor @AllArgsConstructor @Data @Builder @Entity @Table(name="v_essay_mock_exam") @DynamicUpdate @DynamicInsert public class EssayMockExam { @Id protected Long id; @Column(columnDefinition = "smallint default 0") protected int bizStatus; @Column(columnDefinition = "smallint default 1") protected int status; @Column(columnDefinition = "varchar(128) default ''") protected String creator; @Column(columnDefinition = "varchar(128) default ''") protected String modifier; @Temporal(TemporalType.TIMESTAMP) @Column(updatable = false) @org.hibernate.annotations.CreationTimestamp protected Date gmtCreate; @org.hibernate.annotations.UpdateTimestamp @Temporal(TemporalType.TIMESTAMP) protected Date gmtModify; /* bizStatus 0初始化 1已关联 2已上线 3已结束 */ //模考名称 private String name; //平均分 private double avgScore; //最高分 private double maxScore; //报名总人数 private int enrollCount; //考试总人数 private int examCount; //开始时间 private Date startTime; //结束时间 private Date endTime; //行测id private long practiceId; //年份 private String paperYear; //tag private int tag; //是否是联合模考(1 联合模考 2申论模考) private int mockType; //解析课介绍 private String courseInfo; //解析课id private int courseId; //考试说明 private String instruction; private String instructionPC; }
[ "jelly_b@126.com" ]
jelly_b@126.com
e3287d1734468e13f3ae232263f6944df4d31d7f
d4506724ba8a4f2ae64b999d9e6631c7a149b45c
/src/main/java/yd/swig/SWIGTYPE_p_f_p__GSource_p_f_p_void__int_p_void__int.java
794c2a50fa441073d6966933aed797b8a510bdc9
[]
no_license
ydaniels/frida-java
6dc70b327ae8e8a6d808a0969e861225dcc0192b
cf3c198b2a4b7c7a3a186359b5c8c768deacb285
refs/heads/master
2022-12-08T21:28:27.176045
2019-10-24T09:51:44
2019-10-24T09:51:44
214,268,850
2
1
null
2022-11-25T19:46:38
2019-10-10T19:30:26
Java
UTF-8
Java
false
false
877
java
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.1 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package yd.swig; public class SWIGTYPE_p_f_p__GSource_p_f_p_void__int_p_void__int { private transient long swigCPtr; protected SWIGTYPE_p_f_p__GSource_p_f_p_void__int_p_void__int(long cPtr, @SuppressWarnings("unused") boolean futureUse) { swigCPtr = cPtr; } protected SWIGTYPE_p_f_p__GSource_p_f_p_void__int_p_void__int() { swigCPtr = 0; } protected static long getCPtr(SWIGTYPE_p_f_p__GSource_p_f_p_void__int_p_void__int obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
[ "yomi@erpsoftapp.com" ]
yomi@erpsoftapp.com
bf9f69339a75344099fed3f7ccab2d763aef2d3a
6a280e6b17d620482e22d38e2cafffeda8ca708b
/src/main/java/kr/ac/skuniv/medicalhelperbatch/global/fcm/NotificationRequest.java
304e151af71c6f1195bdb0ddbff7f75d544bbe26
[]
no_license
jaeho214/medical-helper-batch
638399032dd48b43bf41c0274b9e97cbce7f4282
14d78d0a01db36e3f1763caf6630dab5e2ffc7fd
refs/heads/master
2020-11-24T08:15:11.005753
2020-01-26T16:18:03
2020-01-26T16:18:03
228,046,343
0
0
null
null
null
null
UTF-8
Java
false
false
893
java
package kr.ac.skuniv.medicalhelperbatch.global.fcm; import kr.ac.skuniv.medicalhelperbatch.domain.member.entity.Member; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.ToString; @Getter @ToString @NoArgsConstructor public class NotificationRequest { private String title; private String message; private String token; @Builder public NotificationRequest(String title, String message, String token) { this.title = title; this.message = message; this.token = token; } public static NotificationRequest setDrugTimeNotification(Member member){ return NotificationRequest.builder() .title("약 먹을 시간") .message(member.getName() + "님 약 먹으실 시간이에요!") .token(member.getFcmToken()) .build(); } }
[ "jaeho214@naver.com" ]
jaeho214@naver.com
b46066c07140700b65f8634eab63df6b52bf7c58
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0707_public/tests/more/src/java/module0707_public_tests_more/a/Foo2.java
ab027676ced7a8efa6da2af1558237a94ddfa4ad
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,670
java
package module0707_public_tests_more.a; import java.util.logging.*; import java.util.zip.*; import javax.annotation.processing.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.net.ssl.ExtendedSSLSession * @see javax.rmi.ssl.SslRMIClientSocketFactory * @see java.awt.datatransfer.DataFlavor */ @SuppressWarnings("all") public abstract class Foo2<Q> extends module0707_public_tests_more.a.Foo0<Q> implements module0707_public_tests_more.a.IFoo2<Q> { java.beans.beancontext.BeanContext f0 = null; java.io.File f1 = null; java.rmi.Remote f2 = null; public Q element; public static Foo2 instance; public static Foo2 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module0707_public_tests_more.a.Foo0.create(input); } public String getName() { return module0707_public_tests_more.a.Foo0.getInstance().getName(); } public void setName(String string) { module0707_public_tests_more.a.Foo0.getInstance().setName(getName()); return; } public Q get() { return (Q)module0707_public_tests_more.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (Q)element; module0707_public_tests_more.a.Foo0.getInstance().set(this.element); } public Q call() throws Exception { return (Q)module0707_public_tests_more.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
cfb7d6af14ccd1f8789ce567b22c894768701c77
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/6371580.java
056387c113b6a51046ab827757ed3db28e97a1a5
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,769
java
import java.io.*; import java.lang.*; import java.util.*; import java.net.*; import java.applet.*; import java.security.*; class c6371580 { public void insertDomain(final List<String> domains) throws Throwable { try { MyHelperClass connection = new MyHelperClass(); connection.setAutoCommit(false); // MyHelperClass connection = new MyHelperClass(); new ProcessEnvelope().executeNull(new ExecuteProcessAbstractImpl(connection, false, false, true, true) { // @Override public void executeProcessReturnNull() throws SQLException { MyHelperClass psImpl = new MyHelperClass(); MyHelperClass sqlCommands = new MyHelperClass(); MyHelperClass connImpl = new MyHelperClass(); psImpl = connImpl.prepareStatement(sqlCommands.getProperty("domain.add")); Iterator<String> iter = domains.iterator(); String domain; while (iter.hasNext()) { domain = iter.next(); // MyHelperClass psImpl = new MyHelperClass(); psImpl.setString(1, domain); MyHelperClass locale = new MyHelperClass(); psImpl.setString(2, domain.toLowerCase((Locale)(Object)locale)); // MyHelperClass psImpl = new MyHelperClass(); psImpl.executeUpdate(); } } }); // MyHelperClass connection = new MyHelperClass(); connection.commit(); MyHelperClass cmDB = new MyHelperClass(); cmDB.updateDomains(null, null); } catch (UncheckedIOException sqle) { MyHelperClass log = new MyHelperClass(); log.error((SQLException)(Object)sqle); MyHelperClass connection = new MyHelperClass(); if (connection != null) { try { // MyHelperClass connection = new MyHelperClass(); connection.rollback(); } catch (UncheckedIOException ex) { } } } finally { MyHelperClass connection = new MyHelperClass(); if (connection != null) { try { // MyHelperClass connection = new MyHelperClass(); connection.setAutoCommit(true); } catch (UncheckedIOException ex) { MyHelperClass log = new MyHelperClass(); log.error((SQLException)(Object)ex); } } } } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass commit(){ return null; } public MyHelperClass setAutoCommit(boolean o0){ return null; } public MyHelperClass getProperty(String o0){ return null; } public MyHelperClass executeUpdate(){ return null; } public MyHelperClass setString(int o0, String o1){ return null; } public MyHelperClass updateDomains(Object o0, Object o1){ return null; } public MyHelperClass prepareStatement(MyHelperClass o0){ return null; } public MyHelperClass rollback(){ return null; } public MyHelperClass error(SQLException o0){ return null; }} class ExecuteProcessAbstractImpl { ExecuteProcessAbstractImpl(){} ExecuteProcessAbstractImpl(MyHelperClass o0, boolean o1, boolean o2, boolean o3, boolean o4){}} class SQLException extends Exception{ public SQLException(String errorMessage) { super(errorMessage); } } class ProcessEnvelope { public MyHelperClass executeNull(){ return null; } public MyHelperClass executeNull( ExecuteProcessAbstractImpl o0){ return null; }}
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
ee9588b05546846ff9e6db18d9e874cf7b977570
305484c9ad9e3fd418059d19513aa2c5d518432b
/src/main/java/io/moonman/emergingtechnology/machines/harvester/HarvesterContainer.java
b71a1cfda9e11c46d22e3e6b80342f502e50c1fc
[ "MIT" ]
permissive
Tape-Dispenser/EmergingTechnology
a6094166ff68a1aa21b65269f6d61c383013ae08
131ce25ca288e2ac0f9f7c836857c301edff0c30
refs/heads/master
2022-04-07T19:13:51.612181
2020-01-10T21:45:39
2020-01-10T21:45:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,897
java
package io.moonman.emergingtechnology.machines.harvester; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IContainerListener; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.SlotItemHandler; // Handles inventory and slots public class HarvesterContainer extends Container { private final HarvesterTileEntity tileEntity; private int energy; private int progress; public HarvesterContainer(InventoryPlayer player, HarvesterTileEntity tileEntity) { this.tileEntity = tileEntity; IItemHandler handler = tileEntity.itemHandler; this.addSlotToContainer(new SlotItemHandler(handler, 0, 17, 35)); this.addSlotToContainer(new SlotItemHandler(handler, 1, 80, 35)); // Inventory for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(player, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } // Hotbar for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(player, x, 8 + x * 18, 142)); } } @SideOnly(Side.CLIENT) @Override public void updateProgressBar(int id, int data) { this.tileEntity.setField(id, data); } @Override public void detectAndSendChanges() { super.detectAndSendChanges(); for(int i = 0; i < this.listeners.size(); ++i) { IContainerListener listener = (IContainerListener)this.listeners.get(i); if(this.energy != this.tileEntity.getField(0)) listener.sendWindowProperty(this, 0, this.tileEntity.getField(0)); if(this.progress != this.tileEntity.getField(1)) listener.sendWindowProperty(this, 1, this.tileEntity.getField(1)); } this.energy = this.tileEntity.getField(0); this.progress = this.tileEntity.getField(1); } @Override public boolean canInteractWith(EntityPlayer playerIn) { return this.tileEntity.isUsableByPlayer(playerIn); } @Override public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack stack = ItemStack.EMPTY; Slot fromSlot = (Slot) this.inventorySlots.get(index); if (fromSlot != null && fromSlot.getHasStack()) { ItemStack fromStack = fromSlot.getStack(); stack = fromStack.copy(); // If it's from the harvester, put in player's inventory if (index < 2) { if (!this.mergeItemStack(fromStack, 2, 38, false)) { return ItemStack.EMPTY; } else { fromSlot.onSlotChanged(); } } else {// Otherwise try to put it in input slot if (!this.mergeItemStack(fromStack, 0, 1, false)) { return ItemStack.EMPTY; } else { fromSlot.onSlotChanged(); } } fromSlot.onTake(playerIn, fromStack); } return stack; } }
[ "moonmanmodding@gmail.com" ]
moonmanmodding@gmail.com
0e62f7375538c112e34ef6a42008f76465618a14
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/15a09a04f2cc62650d54a20ae85c94e92d4d7de9/before/BoolQueryBuilderTest.java
303079aa49f5d47bdd81661c411a54e35bad1c05
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,107
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.index.query; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene.search.Query; import org.elasticsearch.common.lucene.search.Queries; import org.junit.Test; import java.io.IOException; import java.util.List; import static org.elasticsearch.common.lucene.search.Queries.fixNegativeQueryIfNeeded; public class BoolQueryBuilderTest extends BaseQueryTestCase<BoolQueryBuilder> { @Override protected BoolQueryBuilder doCreateTestQueryBuilder() { BoolQueryBuilder query = new BoolQueryBuilder(); if (randomBoolean()) { query.adjustPureNegative(randomBoolean()); } if (randomBoolean()) { query.disableCoord(randomBoolean()); } if (randomBoolean()) { query.minimumNumberShouldMatch(randomIntBetween(1, 10)); } int mustClauses = randomIntBetween(0, 3); for (int i = 0; i < mustClauses; i++) { query.must(RandomQueryBuilder.createQuery(random())); } int mustNotClauses = randomIntBetween(0, 3); for (int i = 0; i < mustNotClauses; i++) { query.mustNot(RandomQueryBuilder.createQuery(random())); } int shouldClauses = randomIntBetween(0, 3); for (int i = 0; i < shouldClauses; i++) { query.should(RandomQueryBuilder.createQuery(random())); } int filterClauses = randomIntBetween(0, 3); for (int i = 0; i < filterClauses; i++) { query.filter(RandomQueryBuilder.createQuery(random())); } return query; } @Override protected Query doCreateExpectedQuery(BoolQueryBuilder queryBuilder, QueryParseContext context) throws IOException { if (!queryBuilder.hasClauses()) { return new MatchAllDocsQuery(); } BooleanQuery boolQuery = new BooleanQuery(queryBuilder.disableCoord()); addBooleanClauses(context, boolQuery, queryBuilder.must(), BooleanClause.Occur.MUST); addBooleanClauses(context, boolQuery, queryBuilder.mustNot(), BooleanClause.Occur.MUST_NOT); addBooleanClauses(context, boolQuery, queryBuilder.should(), BooleanClause.Occur.SHOULD); addBooleanClauses(context, boolQuery, queryBuilder.filter(), BooleanClause.Occur.FILTER); if (boolQuery.clauses().isEmpty()) { return new MatchAllDocsQuery(); } Queries.applyMinimumShouldMatch(boolQuery, queryBuilder.minimumNumberShouldMatch()); return queryBuilder.adjustPureNegative() ? fixNegativeQueryIfNeeded(boolQuery) : boolQuery; } private static void addBooleanClauses(QueryParseContext parseContext, BooleanQuery booleanQuery, List<QueryBuilder> clauses, Occur occurs) throws IOException { for (QueryBuilder query : clauses) { Query innerQuery = query.toQuery(parseContext); if (innerQuery != null) { booleanQuery.add(new BooleanClause(innerQuery, occurs)); } } } @Test public void testValidate() { BoolQueryBuilder booleanQuery = new BoolQueryBuilder(); int iters = randomIntBetween(0, 3); int totalExpectedErrors = 0; for (int i = 0; i < iters; i++) { if (randomBoolean()) { booleanQuery.must(RandomQueryBuilder.createInvalidQuery(random())); totalExpectedErrors++; } else { booleanQuery.must(RandomQueryBuilder.createQuery(random())); } } iters = randomIntBetween(0, 3); for (int i = 0; i < iters; i++) { if (randomBoolean()) { booleanQuery.should(RandomQueryBuilder.createInvalidQuery(random())); totalExpectedErrors++; } else { booleanQuery.should(RandomQueryBuilder.createQuery(random())); } } for (int i = 0; i < iters; i++) { if (randomBoolean()) { booleanQuery.mustNot(RandomQueryBuilder.createInvalidQuery(random())); totalExpectedErrors++; } else { booleanQuery.mustNot(RandomQueryBuilder.createQuery(random())); } } for (int i = 0; i < iters; i++) { if (randomBoolean()) { booleanQuery.filter(RandomQueryBuilder.createInvalidQuery(random())); totalExpectedErrors++; } else { booleanQuery.filter(RandomQueryBuilder.createQuery(random())); } } assertValidate(booleanQuery, totalExpectedErrors); } @Test(expected=NullPointerException.class) public void testAddNullMust() { new BoolQueryBuilder().must(null); } @Test(expected=NullPointerException.class) public void testAddNullMustNot() { new BoolQueryBuilder().mustNot(null); } @Test(expected=NullPointerException.class) public void testAddNullShould() { new BoolQueryBuilder().should(null); } @Test(expected=NullPointerException.class) public void testAddNullFilter() { new BoolQueryBuilder().filter(null); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ba57ae96fe606ec783272d841d6ce5b81da38e51
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_cfr/y/h/b/ab.java
6ce7134edd4b34827510d88e4520814ad2b0534f
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
/* * Decompiled with CFR 0_115. */ package y.h.b; import java.awt.Rectangle; import y.h.az; abstract class ab implements az { protected double a; protected double b; protected double c; protected double d; ab() { } public void a(double d2, double d3, double d4, double d5) { this.a = d2; this.b = d3; this.c = Math.ceil(d4); this.d = Math.ceil(d5); } @Override public Rectangle getBounds() { return new Rectangle((int)this.a, (int)this.b, (int)this.c, (int)this.d); } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
a696adc4f52b06f980399f8b4553c8b3a83478f7
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/protocal/protobuf/afz.java
a0c1efafdc4b377072c8dd0f6fc07c3258cade23
[]
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
2,663
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import e.a.a.c.a; import java.util.LinkedList; public final class afz extends bsr { public int Version; public final int op(int i, Object... objArr) { AppMethodBeat.i(28419); int ix; if (i == 0) { a aVar = (a) objArr[0]; if (this.BaseRequest != null) { aVar.iy(1, this.BaseRequest.computeSize()); this.BaseRequest.writeFields(aVar); } aVar.iz(2, this.Version); AppMethodBeat.o(28419); return 0; } else if (i == 1) { if (this.BaseRequest != null) { ix = e.a.a.a.ix(1, this.BaseRequest.computeSize()) + 0; } else { ix = 0; } int bs = ix + e.a.a.b.b.a.bs(2, this.Version); AppMethodBeat.o(28419); return bs; } else if (i == 2) { e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (ix = com.tencent.mm.bt.a.getNextFieldNumber(aVar2); ix > 0; ix = com.tencent.mm.bt.a.getNextFieldNumber(aVar2)) { if (!super.populateBuilderWithField(aVar2, this, ix)) { aVar2.ems(); } } AppMethodBeat.o(28419); return 0; } else if (i == 3) { e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0]; afz afz = (afz) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); switch (intValue) { case 1: LinkedList Vh = aVar3.Vh(intValue); int size = Vh.size(); for (intValue = 0; intValue < size; intValue++) { byte[] bArr = (byte[]) Vh.get(intValue); hl hlVar = new hl(); e.a.a.a.a aVar4 = new e.a.a.a.a(bArr, unknownTagHandler); for (boolean z = true; z; z = hlVar.populateBuilderWithField(aVar4, hlVar, com.tencent.mm.bt.a.getNextFieldNumber(aVar4))) { } afz.BaseRequest = hlVar; } AppMethodBeat.o(28419); return 0; case 2: afz.Version = aVar3.BTU.vd(); AppMethodBeat.o(28419); return 0; default: AppMethodBeat.o(28419); return -1; } } else { AppMethodBeat.o(28419); return -1; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
d007eaa6508575f2b2abb0c80eda54979547e996
1308960171ada28b011fa80a8ddb9cb296daae76
/WebApplicationTesting/src/com/DataDriven/NewTours_NewUserRegistration_TestData.java
d6da384e2d5b1f291b6316c348e8a6e44f657e52
[]
no_license
srinuqatrainer/SudhaSelenium
0ec5b43725aaf62d43be87760964d10b208e8783
a81bd5d2fcaa339ac4aa73a70c41751481440631
refs/heads/master
2020-04-07T11:07:05.078222
2018-11-20T01:36:12
2018-11-20T01:36:12
158,313,200
0
0
null
null
null
null
UTF-8
Java
false
false
3,836
java
package com.DataDriven; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class NewTours_NewUserRegistration_TestData { FirefoxDriver driver; @BeforeTest public void setUp() { driver = new FirefoxDriver(); driver.get("http://newtours.demoaut.com"); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); } @Test(priority=0) public void register() { // <a href="mercuryregister.php">REGISTER</a> driver.findElement(By.linkText("REGISTER")).click(); } @Test public void userRegistration() throws IOException { FileInputStream file = new FileInputStream(System.getProperty("user.dir")+"\\src\\com\\ApplicationTestDataFiles\\NewUserRegistrationTestData.xlsx"); XSSFWorkbook workBook = new XSSFWorkbook(file); XSSFSheet sheet = workBook.getSheet("sheet1"); int rowCount=sheet.getLastRowNum(); for(int i=1;i<=rowCount;i++) { Row r=sheet.getRow(i); driver.findElementByName("firstName").sendKeys(r.getCell(0).getStringCellValue()); driver.findElementByName("lastName").sendKeys(r.getCell(1).getStringCellValue()); double d=r.getCell(2).getNumericCellValue(); long x=(long)d; String phoneNumber=Long.toString(x); driver.findElementByName("phone").sendKeys(phoneNumber); driver.findElementById("userName").sendKeys(r.getCell(3).getStringCellValue()); driver.findElementByName("address1").sendKeys(r.getCell(4).getStringCellValue()); driver.findElementByName("city").sendKeys(r.getCell(5).getStringCellValue()); driver.findElementByName("state").sendKeys(r.getCell(6).getStringCellValue()); double p=r.getCell(7).getNumericCellValue(); long q=(long)p; String postalCode=Long.toString(q); driver.findElementByName("postalCode").sendKeys(postalCode); driver.findElementByName("country").sendKeys(r.getCell(8).getStringCellValue()); driver.findElementByName("email").sendKeys(r.getCell(9).getStringCellValue()); driver.findElementByName("password").sendKeys(r.getCell(10).getStringCellValue()); driver.findElementByName("confirmPassword").sendKeys(r.getCell(11).getStringCellValue()); driver.findElement(By.name("register")).click(); String expected_UserName=r.getCell(9).getStringCellValue(); System.out.println(" The expected UserName is : "+expected_UserName); String actual_UserRegisteredText=driver.findElementByXPath("html/body/div[1]/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[3]/td/p[3]/a/font/b").getText(); System.out.println(" The actual Registered text is :"+actual_UserRegisteredText); if(actual_UserRegisteredText.contains(expected_UserName)) { System.out.println(" User registration Successfull - PASS"); r.createCell(12).setCellValue("User registration Successfull - PASS"); } else { System.out.println(" User Registration Failed - FAIL"); r.createCell(12).setCellValue("User Registration Failed - FAIL"); } FileOutputStream file1 = new FileOutputStream(System.getProperty("user.dir")+"\\src\\com\\ApplicationTestResultFiles\\NewTours_UserRegistrationResult.xlsx"); workBook.write(file1); driver.navigate().back(); } } @AfterTest public void tearDown() { driver.close(); } }
[ "srinu.qatrainer@gmail.com" ]
srinu.qatrainer@gmail.com
528c57c954aee92e63c74968790169ad5e2f632a
115cf07622637a87ffecb716ec1ef71d091fb566
/WEB-INF/src/com/yhaguy/gestion/contabilidad/subdiario/BrowserLibroCompra.java
caa599d63d9e42c7f67c1d0b37d5a6809328d320
[]
no_license
sraul/alborada
60e3ba054a1c9ee17cb6e17534404a6fbae2c6f0
df6ae6041f4b8969409a6648ac8f1ad9d0e06a19
refs/heads/master
2021-09-26T19:20:00.713648
2018-11-01T15:29:35
2018-11-01T15:29:35
114,824,304
0
0
null
null
null
null
UTF-8
Java
false
false
6,222
java
package com.yhaguy.gestion.contabilidad.subdiario; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.zkoss.zk.ui.HtmlBasedComponent; import org.zkoss.zul.Label; import org.zkoss.zul.Textbox; import com.coreweb.extras.browser.Browser2; import com.coreweb.extras.browser.ColumnaBrowser; import com.yhaguy.domain.CompraFiscal; import com.yhaguy.domain.RegisterDomain; public class BrowserLibroCompra extends Browser2{ String query = "Select cf.emision, cf.condicion, cf.numero, cf.timbrado, cf.razonSocial, cf.ruc, cf.importeGs," + " cf.moneda, cf.tipoCambio, cf.tipoIva, cf.gravada, cf.iva, cf.exenta" + " from CompraFiscal cf "; @Override public String getCabeceraZulUrl() { return "/yhaguy/gestion/contabilidad/subdiario/visor_LibroCompra.zul"; } @Override public List<ColumnaBrowser> getColumnasBrowser() { ColumnaBrowser fecha = new ColumnaBrowser(); fecha.setCampo("cf.emision"); fecha.setComponente("getFechaFromato"); fecha.setTitulo("Fecha"); fecha.setWidthColumna("80px"); fecha.setWidthComponente("50px"); ColumnaBrowser tipo = new ColumnaBrowser(); tipo.setCampo("cf.condicion"); tipo.setTitulo("Tipo"); tipo.setWidthColumna("80px"); tipo.setWidthComponente("50px"); ColumnaBrowser numero = new ColumnaBrowser(); numero.setCampo("cf.numero"); numero.setTitulo("Número"); numero.setWidthColumna("80px"); numero.setWidthComponente("50px"); ColumnaBrowser timbrado = new ColumnaBrowser(); timbrado.setCampo("cf.timbrado"); timbrado.setTitulo("Timbrado"); timbrado.setWidthColumna("80px"); timbrado.setWidthComponente("50px"); ColumnaBrowser proveedor = new ColumnaBrowser(); proveedor.setCampo("cf.razonSocial"); proveedor.setTitulo("Proveedor"); proveedor.setWidthColumna("150px"); proveedor.setWidthComponente("120px"); ColumnaBrowser ruc = new ColumnaBrowser(); ruc.setCampo("cf.ruc"); ruc.setTitulo("Ruc"); ruc.setWidthColumna("90px"); ruc.setWidthComponente("60px"); ColumnaBrowser importeGs = new ColumnaBrowser(); importeGs.setCampo("cf.importeGs"); importeGs.setTitulo("Importe Gs"); importeGs.setComponente("getGuaraniComp"); importeGs.setWidthColumna("120px"); importeGs.setWidthComponente("90px"); ColumnaBrowser moneda = new ColumnaBrowser(); moneda.setCampo("cf.moneda"); moneda.setTitulo("Moneda"); moneda.setWidthColumna("80px"); moneda.setWidthComponente("50px"); ColumnaBrowser tipoCambio = new ColumnaBrowser(); tipoCambio.setCampo("cf.tipoCambio"); tipoCambio.setComponente("getGuaraniComp"); tipoCambio.setTitulo("Tipo Cambio"); tipoCambio.setWidthColumna("100px"); tipoCambio.setWidthComponente("70px"); ColumnaBrowser tipoIva = new ColumnaBrowser(); tipoIva.setCampo("cf.tipoIva"); tipoIva.setTitulo("Tipo Iva"); tipoIva.setWidthColumna("80px"); tipoIva.setWidthComponente("50px"); ColumnaBrowser gravada = new ColumnaBrowser(); gravada.setCampo("cf.gravada"); gravada.setComponente("getGuaraniComp"); gravada.setTitulo("Gravada"); gravada.setWidthColumna("120px"); gravada.setWidthComponente("90px"); ColumnaBrowser iva = new ColumnaBrowser(); iva.setCampo("cf.iva"); iva.setComponente("getGuaraniComp"); iva.setTitulo("Iva"); iva.setWidthColumna("100px"); iva.setWidthComponente("70px"); ColumnaBrowser exenta = new ColumnaBrowser(); exenta.setCampo("cf.exenta"); exenta.setComponente("getGuaraniComp"); exenta.setTitulo("Exenta"); exenta.setWidthColumna("100px"); exenta.setWidthComponente("70px"); List<ColumnaBrowser> columnas = new ArrayList<ColumnaBrowser>(); columnas.add(fecha); columnas.add(tipo); columnas.add(numero); columnas.add(timbrado); columnas.add(proveedor); columnas.add(ruc); columnas.add(importeGs); columnas.add(moneda); columnas.add(tipoCambio); columnas.add(tipoIva); columnas.add(gravada); columnas.add(iva); columnas.add(exenta); return columnas; } @Override public String getQuery() { return this.query; } public void setQuery(String query) { this.query = query; } @Override public void setingInicial() { // TODO Auto-generated method stub } @Override public String getTituloBrowser() { // TODO Auto-generated method stub return null; } public HtmlBasedComponent getFechaFromato(Object obj, Object[] datos) { Label l = new Label(); l.setValue(this.m.dateToString((Date) obj, this.m.DD_MM_YYYY)); return l; } public HtmlBasedComponent getDolarComp(Object obj, Object[] datos) { return getStyle(obj, datos, false); } public HtmlBasedComponent getGuaraniComp(Object obj, Object[] datos) { return getStyle(obj, datos, true); } public HtmlBasedComponent getStyle(Object obj, Object[] datos, boolean moneda) { Textbox l = new Textbox(); l.setReadonly(true); l.setInplace(true); l.setStyle("text-align:right"); double valor = (double) obj; if(moneda == true){ l.setValue(this.m.formatoGs(valor)); }else if(moneda == false){ l.setValue(this.m.formatoDs(valor,30,false)); } return l; } public static void main(String[] args) throws Exception { RegisterDomain rr = RegisterDomain.getInstance(); CompraFiscal cf = new CompraFiscal(); cf.setEmision(new Date()); cf.setCondicion("Contado"); cf.setNumero("100"); cf.setTimbrado("100"); cf.setRazonSocial("Yhaguy"); cf.setRuc("45678-9"); cf.setImporteGs(1000000); cf.setImporteDs(5000); cf.setMoneda("Dolar"); cf.setTipoCambio(4850); cf.setIva(100000); cf.setGravada(900000); cf.setTipoIva("10%"); rr.saveObject(cf, "pepe"); String query = "Select cf.emision, cf.condicion, cf.numero, cf.timbrado, cf.razonSocial, cf.ruc, cf.importeGs," + " cf.moneda, cf.tipoCambio, cf.tipoIva, cf.gravada, cf.iva, cf.exenta" + " from CompraFiscal cf "; System.out.println(query); List<Object[]> obj = rr.hql(query); for(Object oj[] : obj){ //System.out.println("fecha: "+oj[0]+"\nTipo: "+oj[1]+"\nNumero: "+oj[2]+"\nTimbrado: "+oj[3]+"\nProveedor: "+oj[4]+"\nRuc: "+oj[5]+"\nImporte: "+oj[6]); System.out.println("fecha: "+oj[0]+"\nTipo: "+oj[1]+"\nNumero: "+oj[2]+"\nTimbrado: "+oj[3]+"\nImporte: "+oj[4]); } } }
[ "sraul@users.noreply.github.com" ]
sraul@users.noreply.github.com
e2e96338583b42e37235f502d3f26fbcf688957c
80ceba00d547a9fab40921cdebf4ebcbb427a1fc
/day39_retrofit_demo/src/main/java/com/androidxx/yangjw/day39_retrofit_demo/ApiService.java
d0df78a4c4c323c75fbbf3a6c0326254cdbb45af
[]
no_license
yangjingwen2/android1607_2
e59a165219c5b9e0abf74fb5aca5a906979d3bed
89e67f143832963290296727dd84cebeea0811f7
refs/heads/master
2021-05-02T18:08:11.964235
2016-11-04T03:55:08
2016-11-04T03:55:15
72,394,556
4
1
null
null
null
null
UTF-8
Java
false
false
959
java
package com.androidxx.yangjw.day39_retrofit_demo; import com.androidxx.yangjw.day39_retrofit_demo.bean.GiftBean; import com.androidxx.yangjw.day39_retrofit_demo.bean.SelectBean; import retrofit2.Call; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Path; import retrofit2.http.Query; /** * Created by yangjw on 2016/11/3. */ public interface ApiService { /** * get请求 * GET参数是URI * @return */ @GET("v2/channels/{num}/items") Call<SelectBean> querySelectList(@Path("num") int path,@Query("ad")int ad, @Query("gender") int gender , @Query("generation") int generation, @Query("limit") int limit, @Query("offset")int offset); /** * Post请求 * @return */ @FormUrlEncoded @POST("majax.action?method=getGiftList") Call<GiftBean> queryGiftList(@Field("pageno") int num); }
[ "yangwen8701@126.com" ]
yangwen8701@126.com
86a53a6228da046820d019006147ac7b3fd07ddc
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/storage/aw.java
59fae301586f8b7372d221d0c4caa8f61c6986d3
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
631
java
package com.tencent.mm.storage; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.autogen.b.bb; import com.tencent.mm.sdk.storage.IAutoDBItem.MAutoDBInfo; public class aw extends bb { protected static IAutoDBItem.MAutoDBInfo info; static { AppMethodBeat.i(32839); info = bb.aJm(); AppMethodBeat.o(32839); } public IAutoDBItem.MAutoDBInfo getDBInfo() { return info; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes4.jar * Qualified Name: com.tencent.mm.storage.aw * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
ccbdd8a23d01b485bd3515b85860893a56e87b57
57e09fe34befa76f40766c0a289087ee3c851e7f
/sources/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
187d52afbc7086235ec1e24fe206389f04ce966f
[]
no_license
Moudoux/Torch
a36f059044c4e926d73499f565fde1fc2343f96c
bdd6fcf1ea955accb6a44a217c06dae1ee8ef9fa
refs/heads/master
2020-12-30T13:39:18.440636
2017-05-14T10:07:29
2017-05-14T10:07:29
91,236,109
1
0
null
2017-05-14T10:31:20
2017-05-14T10:31:20
null
UTF-8
Java
false
false
5,917
java
package org.bukkit.craftbukkit.entity; import java.util.List; import net.minecraft.server.EntityAreaEffectCloud; import net.minecraft.server.EntityLiving; import net.minecraft.server.MobEffect; import net.minecraft.server.MobEffectList; import org.apache.commons.lang3.Validate; import org.bukkit.Color; import org.bukkit.Particle; import org.bukkit.craftbukkit.CraftParticle; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.entity.AreaEffectCloud; import org.bukkit.entity.EntityType; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.projectiles.ProjectileSource; import org.bukkit.potion.PotionData; import com.google.common.collect.ImmutableList; public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud { public CraftAreaEffectCloud(CraftServer server, EntityAreaEffectCloud entity) { super(server, entity); } @Override public EntityAreaEffectCloud getHandle() { return (EntityAreaEffectCloud) super.getHandle(); } @Override public EntityType getType() { return EntityType.AREA_EFFECT_CLOUD; } @Override public int getDuration() { return getHandle().getDuration(); } @Override public void setDuration(int duration) { getHandle().setDuration(duration); } @Override public int getWaitTime() { return getHandle().waitTime; } @Override public void setWaitTime(int waitTime) { getHandle().setWaitTime(waitTime); } @Override public int getReapplicationDelay() { return getHandle().reapplicationDelay; } @Override public void setReapplicationDelay(int delay) { getHandle().reapplicationDelay = delay; } @Override public int getDurationOnUse() { return getHandle().durationOnUse; } @Override public void setDurationOnUse(int duration) { getHandle().durationOnUse = duration; } @Override public float getRadius() { return getHandle().getRadius(); } @Override public void setRadius(float radius) { getHandle().setRadius(radius); } @Override public float getRadiusOnUse() { return getHandle().radiusOnUse; } @Override public void setRadiusOnUse(float radius) { getHandle().setRadiusOnUse(radius); } @Override public float getRadiusPerTick() { return getHandle().radiusPerTick; } @Override public void setRadiusPerTick(float radius) { getHandle().setRadiusPerTick(radius); } @Override public Particle getParticle() { return CraftParticle.toBukkit(getHandle().getParticle()); } @Override public void setParticle(Particle particle) { getHandle().setParticle(CraftParticle.toNMS(particle)); } @Override public Color getColor() { return Color.fromRGB(getHandle().getColor()); } @Override public void setColor(Color color) { getHandle().setColor(color.asRGB()); } @Override public boolean addCustomEffect(PotionEffect effect, boolean override) { int effectId = effect.getType().getId(); MobEffect existing = null; for (MobEffect mobEffect : getHandle().effects) { if (MobEffectList.getId(mobEffect.getMobEffect()) == effectId) { existing = mobEffect; } } if (existing != null) { if (!override) { return false; } getHandle().effects.remove(existing); } getHandle().a(CraftPotionUtil.fromBukkit(effect)); getHandle().refreshEffects(); return true; } @Override public void clearCustomEffects() { getHandle().effects.clear(); getHandle().refreshEffects(); } @Override public List<PotionEffect> getCustomEffects() { ImmutableList.Builder<PotionEffect> builder = ImmutableList.builder(); for (MobEffect effect : getHandle().effects) { builder.add(CraftPotionUtil.toBukkit(effect)); } return builder.build(); } @Override public boolean hasCustomEffect(PotionEffectType type) { for (MobEffect effect : getHandle().effects) { if (CraftPotionUtil.equals(effect.getMobEffect(), type)) { return true; } } return false; } @Override public boolean hasCustomEffects() { return !getHandle().effects.isEmpty(); } @Override public boolean removeCustomEffect(PotionEffectType effect) { int effectId = effect.getId(); MobEffect existing = null; for (MobEffect mobEffect : getHandle().effects) { if (MobEffectList.getId(mobEffect.getMobEffect()) == effectId) { existing = mobEffect; } } if (existing == null) { return false; } getHandle().effects.remove(existing); getHandle().refreshEffects(); return true; } @Override public void setBasePotionData(PotionData data) { Validate.notNull(data, "PotionData cannot be null"); getHandle().setType(CraftPotionUtil.fromBukkit(data)); } @Override public PotionData getBasePotionData() { return CraftPotionUtil.toBukkit(getHandle().getType()); } public ProjectileSource getSource() { return getHandle().projectileSource; } public void setSource(ProjectileSource shooter) { if (shooter instanceof CraftLivingEntity) { getHandle().setSource((EntityLiving) ((CraftLivingEntity) shooter).getHandle()); } else { getHandle().setSource((EntityLiving) null); } getHandle().projectileSource = shooter; } }
[ "i@omc.hk" ]
i@omc.hk
14b3592a0e4ce28c6d9636bdf4621596bcd93e31
028cbe18b4e5c347f664c592cbc7f56729b74060
/v2/appserv-api/src/java/com/sun/appserv/management/util/misc/DebugOutImpl.java
8455550493f5e74ee915de24228985837afe4c43
[]
no_license
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
4,094
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package com.sun.appserv.management.util.misc; /** */ public class DebugOutImpl implements DebugOut { private final String mID; private boolean mDebug; private DebugSink mSink; public DebugOutImpl( final String id, final boolean debug, final DebugSink sink) { mID = id; mDebug = debug; mSink = sink == null ? new DebugSinkImpl( System.out ) : sink ; } public DebugOutImpl( final String id, final boolean debug ) { this( id, debug, null ); } public String getID() { return mID; } public boolean getDebug() { return mDebug; } public void print( final Object o ) { mSink.print( "" + o ); } public void println( Object o ) { mSink.println( "" + o ); } public String toString( final Object... args ) { return StringUtil.toString( ", ", args ); } public void setDebug( final boolean debug) { mDebug = debug; } public void debug( final Object... args ) { if ( getDebug() ) { mSink.println( toString( args ) ); } } public void debugMethod( final String methodName, final Object... args ) { if ( getDebug() ) { debug( methodString( methodName, args ) ); } } public void debugMethod( final String msg, final String methodName, final Object... args ) { if ( getDebug() ) { debug( methodString( methodName, args ) + ": " + msg ); } } public static String methodString( final String name, final Object... args ) { String result = null; if ( args == null || args.length == 0 ) { result = name + "()"; } else { final String argsString = StringUtil.toString( ", ", args ); result = StringUtil.toString( "", name, "(", argsString, ")" ); } return result; } }
[ "kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
3373012074cbc155ef7ffb61c92f62309f6e0157
20240a61b712e13bff98c2055317a8500e08c3ca
/ca/ca-mgmt-api/src/main/java/org/xipki/ca/server/mgmt/api/CrlSignerEntry.java
ac191ce0f7a91d86ef8c18a20c100fd761bf3399
[]
no_license
tempbottle/xipki
fc215ffea193dd07480a995c372eea7a16f72a24
aaf69c31f77dc71f1297ddfb671b565f9c20dca6
refs/heads/master
2021-01-18T05:09:20.408000
2014-10-16T18:45:31
2014-10-16T18:45:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,265
java
/* * Copyright (c) 2014 Lijun Liao * * TO-BE-DEFINE * */ package org.xipki.ca.server.mgmt.api; import java.io.Serializable; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; import org.bouncycastle.util.encoders.Base64; import org.xipki.security.common.ConfigurationException; import org.xipki.security.common.IoCertUtil; import org.xipki.security.common.ParamChecker; /** * @author Lijun Liao */ public class CrlSignerEntry implements Serializable { private static final long serialVersionUID = 1L; private final String name; private final String signerType; private final String signerConf; private X509Certificate cert; private String crlControl; public CrlSignerEntry(String name, String signerType, String signerConf, String crlControl) throws ConfigurationException { ParamChecker.assertNotEmpty("name", name); ParamChecker.assertNotEmpty("type", signerType); ParamChecker.assertNotEmpty("crlControl", crlControl); this.name = name; this.signerType = signerType; this.signerConf = signerConf; this.crlControl = crlControl; } public String getName() { return name; } public String getType() { return signerType; } public String getConf() { return signerConf; } public X509Certificate getCertificate() { return cert; } public void setCertificate(X509Certificate cert) { this.cert = cert; } public String getCRLControl() { return crlControl; } @Override public String toString() { return toString(false); } public String toString(boolean verbose) { StringBuilder sb = new StringBuilder(); sb.append("name: ").append(name).append('\n'); sb.append("signerType: ").append(signerType).append('\n'); sb.append("signerConf: "); if(signerConf == null) { sb.append("null"); } else if(verbose || signerConf.length() < 101) { sb.append(signerConf); } else { sb.append(signerConf.substring(0, 97)).append("..."); } sb.append('\n'); sb.append("crlControl: ").append(crlControl).append("\n"); if(cert != null) { sb.append("cert: ").append("\n"); sb.append("\tissuer: ").append( IoCertUtil.canonicalizeName(cert.getIssuerX500Principal())).append('\n'); sb.append("\tserialNumber: ").append(cert.getSerialNumber()).append('\n'); sb.append("\tsubject: ").append( IoCertUtil.canonicalizeName(cert.getSubjectX500Principal())).append('\n'); if(verbose) { sb.append("\tencoded: "); try { sb.append(Base64.toBase64String(cert.getEncoded())); } catch (CertificateEncodingException e) { sb.append("ERROR"); } } } else { sb.append("cert: null\n"); } return sb.toString(); } }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
45e9d0964917c5bca84c8f3823811d6302ec16a2
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5708921029263360_0/java/Soronbe/Fashion.java
3272bc1a79db9b2c341b3afab8a53d97f38fab23
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,941
java
import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.Scanner; import java.util.Set; /** * Created by david on 5/8/16. */ public class Fashion { public static void main(String[] args) { new Fashion(); } public Fashion() { try { Scanner sc = new Scanner(System.in); PrintWriter pw = new PrintWriter("solution.txt", "UTF-8"); int T = sc.nextInt(); sc.nextLine(); for (int i = 1; i <= T; ++i) { pw.print(String.format("Case #%d: ", i)); run(sc, pw); } pw.close(); } catch (FileNotFoundException | UnsupportedEncodingException e) { e.printStackTrace(); } } protected void run(Scanner scanner, PrintWriter writer) { int J = scanner.nextInt(); int P = scanner.nextInt(); int S = scanner.nextInt(); int K = scanner.nextInt(); if (S < K) { K = S; } int[][] matchesJ = new int[J][S]; int[][] matchesP = new int[P][S]; int count = 0; int shift = Math.min(J, K) * Math.min(P, K); writer.println(J * P * K); for (int j = 1; j <= J; ++j) { for (int p = 1; p <= P; ++p) { int maxK = 0; for (int s = 1; s <= S; ++s) { int s2 = ((s+S+p+j-2)%S)+1; if (matchesJ[j-1][s2-1] < K && matchesP[p-1][s2-1] < K) { writer.println(String.format("%d %d %d", j, p, s2)); ++matchesJ[j-1][s2-1]; ++matchesP[p-1][s2-1]; count++; ++maxK; } if(maxK == K) { break; } } } } } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
febb0ffb0e0a1daa79ee37d50181fe2c18fbea13
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/basecrm/app/AbstractFDCCustomerListUIHandler.java
d0efc9a5b24470d53f3d45b7b050e4cefb334937
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
1,861
java
/** * output package name */ package com.kingdee.eas.fdc.basecrm.app; import com.kingdee.bos.Context; import com.kingdee.eas.framework.batchHandler.RequestContext; import com.kingdee.eas.framework.batchHandler.ResponseContext; /** * output class name */ public abstract class AbstractFDCCustomerListUIHandler extends com.kingdee.eas.framework.app.ListUIHandler { public void handleActionChangeCusName(RequestContext request,ResponseContext response, Context context) throws Exception { _handleActionChangeCusName(request,response,context); } protected void _handleActionChangeCusName(RequestContext request,ResponseContext response, Context context) throws Exception { } public void handleActionUpdateCus(RequestContext request,ResponseContext response, Context context) throws Exception { _handleActionUpdateCus(request,response,context); } protected void _handleActionUpdateCus(RequestContext request,ResponseContext response, Context context) throws Exception { } public void handleActionShare(RequestContext request,ResponseContext response, Context context) throws Exception { _handleActionShare(request,response,context); } protected void _handleActionShare(RequestContext request,ResponseContext response, Context context) throws Exception { } public void handleActionMerge(RequestContext request,ResponseContext response, Context context) throws Exception { _handleActionMerge(request,response,context); } protected void _handleActionMerge(RequestContext request,ResponseContext response, Context context) throws Exception { } public void handleActionImport(RequestContext request,ResponseContext response, Context context) throws Exception { _handleActionImport(request,response,context); } protected void _handleActionImport(RequestContext request,ResponseContext response, Context context) throws Exception { } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
576e3f387105311fdb2f8cbcf31f2806ec05d252
7dc6bf17c5acc4a5755063a3ffc0c86f4b6ad8c3
/java_decompiled_from_smali/com/google/android/gms/internal/q.java
08980a35fc57e97fee45f6f59023283249ff900a
[]
no_license
alecsandrudaj/mobileapp
183dd6dc5c2fe8ab3aa1f21495d4221e6f304965
b1b4ad337ec36ffb125df8aa1d04c759c33c418a
refs/heads/master
2023-02-19T18:07:50.922596
2021-01-07T15:30:44
2021-01-07T15:30:44
300,325,195
0
0
null
2020-11-19T13:26:25
2020-10-01T15:18:57
Smali
UTF-8
Java
false
false
2,010
java
package com.google.android.gms.internal; import com.google.android.gms.common.data.d; import com.google.android.gms.games.multiplayer.realtime.RealTimeMessage; public abstract class q extends aa { public void a() { } public void a(int i) { } public void a(int i, int i2, String str) { } public void a(int i, String str) { } public void a(int i, String str, boolean z) { } public void a(d dVar) { } public void a(d dVar, d dVar2) { } public void a(d dVar, String[] strArr) { } public void a(RealTimeMessage realTimeMessage) { } public void a(String str) { } public void b(int i) { } public void b(int i, String str) { } public void b(d dVar) { } public void b(d dVar, String[] strArr) { } public void b(String str) { } public void c(int i) { } public void c(int i, String str) { } public void c(d dVar) { } public void c(d dVar, String[] strArr) { } public void d(int i) { } public void d(d dVar) { } public void d(d dVar, String[] strArr) { } public void e(d dVar) { } public void e(d dVar, String[] strArr) { } public void f(d dVar) { } public void f(d dVar, String[] strArr) { } public void g(d dVar) { } public void h(d dVar) { } public void i(d dVar) { } public void j(d dVar) { } public void k(d dVar) { } public void l(d dVar) { } public void m(d dVar) { } public void n(d dVar) { } public void o(d dVar) { } public void p(d dVar) { } public void q(d dVar) { } public void r(d dVar) { } public void s(d dVar) { } public void t(d dVar) { } public void u(d dVar) { } public void v(d dVar) { } }
[ "rgosa@bitdefender.com" ]
rgosa@bitdefender.com
9ec83ea3bca9f05b54d63aedcdd0760c54c79b89
1b6a269d889bb6ef300fce834702e2d63dafb992
/Sunny/src/goods/com/ybt/service/work/GoodsOrderService.java
af635e2fae56d0f50d61d1fea140eb42b71faf22
[]
no_license
244522645/demo
b77690f3034ded577e92f88fa8d3b1fd92b96169
231013391c8c58aefee9dc65253f3975d43ebfe2
refs/heads/master
2021-01-23T18:58:06.544798
2017-04-17T05:25:18
2017-04-17T05:25:18
83,005,616
0
0
null
null
null
null
UTF-8
Java
false
false
1,231
java
package com.ybt.service.work; import java.util.List; import org.springframework.stereotype.Component; import com.ybt.model.work.SunDdOrder; import com.ybt.model.work.SunGoodsOrder; import com.ybt.service.base.IBaseService; @Component public interface GoodsOrderService extends IBaseService<SunGoodsOrder, String> { /** * 生成订单-保存订单信息 * @param order * @param openId * @return * @author AndyBao * @version V4.0, 2016年12月12日 下午2:01:18 */ public SunDdOrder createOrder(SunGoodsOrder order, String openId); /** * 完善订单 - 收货信息 * @param order * @param openId * @return * @author AndyBao * @version V4.0, 2016年12月12日 下午2:01:18 */ public SunDdOrder updateOrder(SunGoodsOrder order, String openId); /** * 我的订单列表 * @param order * @param openId * @return * @author AndyBao * @version V4.0, 2016年12月12日 下午2:01:18 */ public List<SunDdOrder> getOrderListByUserId(String openId); /** * 我的订单详情 * @param order * @param openId * @return * @author AndyBao * @version V4.0, 2016年12月12日 下午2:01:18 */ public SunDdOrder getOrderDetailsByUserId(String openId); }
[ "244522645@qq.com" ]
244522645@qq.com
549f8645cf6b75463c0d030b8347ca052fde999b
35e656065008890f8b969dddb64189da6db82977
/app/src/main/java/com/github/dachhack/sprout/items/wands/WandOfDisintegration.java
0358c3967daf6bc3726960cae2ef4e6c7bcba1f2
[]
no_license
Smujb/harder-sprouted-pd
52cc9809baabb17d42e7b60650fd1b89647224a7
e3a8b7b94432a211cd2a26c4ea1e5cd9dfe67f13
refs/heads/master
2021-01-07T23:30:44.249813
2020-02-01T13:58:04
2020-02-01T13:58:04
241,845,803
1
1
null
null
null
null
UTF-8
Java
false
false
4,692
java
/* * Pixel Dungeon * Copyright (C) 2012-2014 Oleg Dolya * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/> */ package com.github.dachhack.sprout.items.wands; import java.util.ArrayList; import com.github.dachhack.sprout.Dungeon; import com.github.dachhack.sprout.DungeonTilemap; import com.github.dachhack.sprout.actors.Actor; import com.github.dachhack.sprout.actors.Char; import com.github.dachhack.sprout.actors.blobs.Blob; import com.github.dachhack.sprout.actors.buffs.Buff; import com.github.dachhack.sprout.actors.buffs.Burning; import com.github.dachhack.sprout.actors.buffs.Strength; import com.github.dachhack.sprout.actors.hero.Hero; import com.github.dachhack.sprout.actors.mobs.Mob; import com.github.dachhack.sprout.effects.CellEmitter; import com.github.dachhack.sprout.effects.DeathRay; import com.github.dachhack.sprout.effects.particles.PurpleParticle; import com.github.dachhack.sprout.items.weapon.enchantments.Death; import com.github.dachhack.sprout.items.weapon.enchantments.Fire; import com.github.dachhack.sprout.items.weapon.melee.MeleeWeapon; import com.github.dachhack.sprout.levels.Level; import com.github.dachhack.sprout.levels.Terrain; import com.github.dachhack.sprout.mechanics.Ballistica; import com.github.dachhack.sprout.scenes.GameScene; import com.watabou.utils.Callback; import com.watabou.utils.Random; public class WandOfDisintegration extends Wand { { name = "Wand of Disintegration"; hitChars = false; } @Override public int magicMax(int lvl) { return 10 + 7*lvl; } @Override public int magicMin(int lvl) { return 1 + (int)(0.5f*lvl); } @Override protected void onZap(int cell) { boolean terrainAffected = false; int level = level(); int maxDistance = distance(); Ballistica.distance = Math.min(Ballistica.distance, maxDistance); ArrayList<Char> chars = new ArrayList<Char>(); for (int i = 1; i < Ballistica.distance; i++) { int c = Ballistica.trace[i]; Char ch; if ((ch = Actor.findChar(c)) != null) { chars.add(ch); } int terr = Dungeon.level.map[c]; if (terr == Terrain.DOOR || terr == Terrain.BARRICADE) { Level.set(c, Terrain.EMBERS); GameScene.updateMap(c); terrainAffected = true; } else if (terr == Terrain.HIGH_GRASS) { Level.set(c, Terrain.GRASS); GameScene.updateMap(c); terrainAffected = true; } CellEmitter.center(c).burst(PurpleParticle.BURST, Random.IntRange(1 + level()/8, 2 + level()/4)); } if (terrainAffected) { Dungeon.observe(); } int dmg = magicDamageRoll(); if (Dungeon.hero.buff(Strength.class) != null){ dmg *= (int) 4f; Buff.detach(Dungeon.hero, Strength.class);} for (Char ch : chars) { ch.damage(dmg, this); processSoulMark(ch, chargesPerCast()); ch.sprite.centerEmitter().burst(PurpleParticle.BURST, Random.IntRange(1, 2)); ch.sprite.flash(); } } private int distance() { return level() + 4; } @Override protected void fx(int cell, Callback callback) { cell = Ballistica.trace[Math.min(Ballistica.distance, distance()) - 1]; curUser.sprite.parent.add(new DeathRay(curUser.sprite.center(), DungeonTilemap.tileCenterToWorld(cell))); callback.call(); } @Override public void onHit(Wand wand, Hero attacker, Char defender, int damage) { super.onHit(wand, attacker, defender, damage); if (Random.Int(10) == 0) {//1/10 times, attack the highest HP enemy on the map! Mob highestHP = null; int highestHPAmt = -1; for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { if (!mob.ally & mob.HP > highestHPAmt) { highestHP = mob; highestHPAmt = mob.HP; } } if (highestHP != null) { highestHP.damage(wand.magicDamageRoll(), wand); attacker.sprite.parent.add(new DeathRay(attacker.sprite.center(), DungeonTilemap.tileCenterToWorld(highestHP.pos))); } } } @Override public String desc() { return "This wand emits a beam of destructive energy, which pierces all creatures in its way. " + "The more targets it hits, the more damage it inflicts to each of them." + "\n\n" + statsDesc(); } }
[ "smujamesb@gmail.com" ]
smujamesb@gmail.com
9ce25155c1b1d9c1ffcfd33c7ed10a41697f1a57
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_56d7e4295d1750653d1d2ccf12d9dcaf89bf2184/GroovyShellPanel/26_56d7e4295d1750653d1d2ccf12d9dcaf89bf2184_GroovyShellPanel_s.java
892c180a9a657d7dcb5f82c07c81967cd49e4173
[]
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
4,225
java
/** * Copyright (C) 2011 Hippo * * 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.onehippo.forge.cms.groovy.plugin.panels; import org.apache.wicket.Component; import org.apache.wicket.Session; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.AjaxSelfUpdatingTimerBehavior; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.extensions.breadcrumb.IBreadCrumbModel; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextArea; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.util.time.Duration; import org.hippoecm.frontend.plugin.IPluginContext; import org.hippoecm.frontend.plugin.config.IPluginConfig; import org.hippoecm.frontend.plugins.standards.panelperspective.breadcrumb.PanelPluginBreadCrumbPanel; import org.hippoecm.frontend.session.UserSession; import org.onehippo.forge.cms.groovy.plugin.GroovyShellOutput; import org.onehippo.forge.cms.groovy.plugin.codemirror.CodeMirrorEditor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import groovy.lang.GroovyShell; import groovy.lang.Script; /** * Panel for executing Groovy scripts * * @author Jeroen Reijn */ public class GroovyShellPanel extends PanelPluginBreadCrumbPanel { private final static Logger logger = LoggerFactory.getLogger(GroovyShellPanel.class); private final Form form; private final TextArea script; private GroovyShellOutput output = new GroovyShellOutput(); public GroovyShellPanel(final String componentId, final IPluginContext pluginContext, final IPluginConfig pluginConfig, final IBreadCrumbModel breadCrumbModel) { super(componentId, breadCrumbModel); final CompoundPropertyModel<GroovyShellOutput> compoundPropertyModel = new CompoundPropertyModel<GroovyShellOutput>(output); final Label shellFeedback = new Label("output", compoundPropertyModel); shellFeedback.setOutputMarkupId(true); form = new Form("shellform"); // add a button that can be used to submit the form via ajax form.add(new AjaxButton("ajax-button", form) { @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { GroovyShell shell = new GroovyShell(); Script script = shell.parse(GroovyShellPanel.this.getScript()); if (Session.exists()) { UserSession userSession = (UserSession) Session.get(); script.setProperty("session", userSession.getJcrSession()); GroovyShellOutput shellOutput = compoundPropertyModel.getObject(); script.setProperty("out", shellOutput); script.setProperty("err", shellOutput); } script.run(); target.addComponent(shellFeedback); } }); form.setOutputMarkupId(true); output.printVersion(); script = new CodeMirrorEditor("script", new Model("")); shellFeedback.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); form.add(shellFeedback); form.add(script); add(form); } public IModel<String> getTitle(final Component component) { return new ResourceModel("groovy-shell-panel-title"); } public String getScript() { return (String) script.getModelObject(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
39daeeb86957527b1d15faf8d6022b9064665d03
b4e0e50e467ee914b514a4f612fde6acc9a82ba7
/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyPrefixRegionSplitPolicy.java
df8510716041abe0a14f1e4fc356dec6e24a64df
[ "Apache-2.0", "CPL-1.0", "MPL-1.0" ]
permissive
tenggyut/HIndex
5054b13118c3540d280d654cfa45ed6e3edcd4c6
e0706e1fe48352e65f9f22d1f80038f4362516bb
refs/heads/master
2021-01-10T02:58:08.439962
2016-03-10T01:15:18
2016-03-10T01:15:18
44,219,351
3
4
Apache-2.0
2023-03-20T11:47:22
2015-10-14T02:34:53
Java
UTF-8
Java
false
false
3,497
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.hbase.regionserver; import java.util.Arrays; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.classification.InterfaceAudience; /** * A custom RegionSplitPolicy implementing a SplitPolicy that groups * rows by a prefix of the row-key * * This ensures that a region is not split "inside" a prefix of a row key. * I.e. rows can be co-located in a region by their prefix. */ @InterfaceAudience.Private public class KeyPrefixRegionSplitPolicy extends IncreasingToUpperBoundRegionSplitPolicy { private static final Log LOG = LogFactory .getLog(KeyPrefixRegionSplitPolicy.class); @Deprecated public static final String PREFIX_LENGTH_KEY_DEPRECATED = "prefix_split_key_policy.prefix_length"; public static final String PREFIX_LENGTH_KEY = "KeyPrefixRegionSplitPolicy.prefix_length"; private int prefixLength = 0; @Override protected void configureForRegion(HRegion region) { super.configureForRegion(region); if (region != null) { prefixLength = 0; // read the prefix length from the table descriptor String prefixLengthString = region.getTableDesc().getValue( PREFIX_LENGTH_KEY); if (prefixLengthString == null) { //read the deprecated value prefixLengthString = region.getTableDesc().getValue(PREFIX_LENGTH_KEY_DEPRECATED); if (prefixLengthString == null) { LOG.error(PREFIX_LENGTH_KEY + " not specified for table " + region.getTableDesc().getTableName() + ". Using default RegionSplitPolicy"); return; } } try { prefixLength = Integer.parseInt(prefixLengthString); } catch (NumberFormatException nfe) { /* Differentiate NumberFormatException from an invalid value range reported below. */ LOG.error("Number format exception when parsing " + PREFIX_LENGTH_KEY + " for table " + region.getTableDesc().getTableName() + ":" + prefixLengthString + ". " + nfe); return; } if (prefixLength <= 0) { LOG.error("Invalid value for " + PREFIX_LENGTH_KEY + " for table " + region.getTableDesc().getTableName() + ":" + prefixLengthString + ". Using default RegionSplitPolicy"); } } } @Override protected byte[] getSplitPoint() { byte[] splitPoint = super.getSplitPoint(); if (prefixLength > 0 && splitPoint != null && splitPoint.length > 0) { // group split keys by a prefix return Arrays.copyOf(splitPoint, Math.min(prefixLength, splitPoint.length)); } else { return splitPoint; } } }
[ "tengyutong0213@gmail.com" ]
tengyutong0213@gmail.com
cf757d11db7b1df34f4bd974a316e209b710b105
139aa575296282ad3d3756b2472e8f6518a5024c
/QHDemo3.1.0/app/src/main/java/com/qhcloud/demo/util/ToastUtil.java
852caf4960fe6b25952f9b1afc90af25c5008374
[]
no_license
Sarah-alsh/QLinqDemo
c02931f8057f34bbfa2d2986009aafcc83f02508
090de0cc2a4ebaee62c76b4be44a78e0ee608938
refs/heads/master
2020-04-18T02:26:12.445663
2019-01-23T10:22:24
2019-01-23T10:22:24
167,162,437
0
2
null
null
null
null
UTF-8
Java
false
false
715
java
package com.qhcloud.demo.util; import android.content.Context; import android.text.TextUtils; import android.widget.Toast; public class ToastUtil { private static Toast mToast; public static void show(Context context, CharSequence text) { show(context, text, Toast.LENGTH_SHORT); } public static void show(Context context, CharSequence text, int duration) { if (context != null && !TextUtils.isEmpty(text)) { if (mToast == null) { mToast = Toast.makeText(context, text, duration); } else { mToast.setDuration(duration); mToast.setText(text); } mToast.show(); } } }
[ "sarah.shughri@gmail.com" ]
sarah.shughri@gmail.com
b4e0b6146ee2dcb3fa743e4ba1b87472ad0f44d6
75fbde50c808163d2bae775f0090711d37a358c4
/src/controladores/Profesionales/MisTurnos/ControladorBuscar.java
60e5cc983cde973707fe939afd1c3308e2a7bd33
[]
no_license
deive1993/TurnosMedicos
4f117c37413da0f1fbaeea06e40d6152663e1ade
ad5fee1fa417fb297da05c65e06830ccf6c98fef
refs/heads/master
2021-08-11T17:52:03.379183
2017-11-14T01:07:27
2017-11-14T01:07:27
104,943,889
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package controladores.Profesionales.MisTurnos; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; /** * * @author USER */ public class ControladorBuscar implements MouseListener{ @Override public void mouseClicked(MouseEvent e) { } @Override public void mousePressed(MouseEvent e) { } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } }
[ "you@example.com" ]
you@example.com
2df0919ef894a8a2fc8832d99a9db8a8dc82855e
e7cb38a15026d156a11e4cf0ea61bed00b837abe
/groundwork-monitor-portal/applications/statusviewer/src/main/java/com/groundworkopensource/portal/statusviewer/bean/PerfMeasurementTimeBean.java
63146c08fca024ac42af2b2e13ab4c1665d68124
[]
no_license
wang-shun/groundwork-trunk
5e0ce72c739fc07f634aeefc8f4beb1c89f128af
ea1ca766fd690e75c3ee1ebe0ec17411bc651a76
refs/heads/master
2020-04-01T08:50:03.249587
2018-08-20T21:21:57
2018-08-20T21:21:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,406
java
/* * * Copyright 2007 GroundWork Open Source, Inc. ("GroundWork") All rights * reserved. This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package com.groundworkopensource.portal.statusviewer.bean; import java.io.Serializable; import com.groundworkopensource.portal.statusviewer.common.Constant; /** * This class contain previous start and end time for Perf Measurement portlet * to avoid multiple web service call . * * @author manish_kjain * */ public class PerfMeasurementTimeBean implements Serializable { /** * serialVersionUID */ private static final long serialVersionUID = 2737805046422341526L; /** * Start time in string */ private String previousStartTime = Constant.EMPTY_STRING; /** * End time in String */ private String previousEndTime = Constant.EMPTY_STRING; /** * Sets the previousStartTime. * * @param previousStartTime * the previousStartTime to set */ public void setPreviousStartTime(String previousStartTime) { this.previousStartTime = previousStartTime; } /** * Returns the previousStartTime. * * @return the previousStartTime */ public String getPreviousStartTime() { return previousStartTime; } /** * Sets the previousEndTime. * * @param previousEndTime * the previousEndTime to set */ public void setPreviousEndTime(String previousEndTime) { this.previousEndTime = previousEndTime; } /** * Returns the previousEndTime. * * @return the previousEndTime */ public String getPreviousEndTime() { return previousEndTime; } }
[ "gibaless@gmail.com" ]
gibaless@gmail.com
96d07a6f6feb07a32eed2703c04944afd528e968
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/huawei/pluginkidwatch/plugin/chat/ah.java
9e10eed83243e99d5e540ad3bce9471e338433a8
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
625
java
package com.huawei.pluginkidwatch.plugin.chat; import android.os.AsyncTask; import java.util.List; /* compiled from: ChatActivity */ class ah extends AsyncTask<String, Void, Void> { final /* synthetic */ List f4810a; final /* synthetic */ ChatActivity f4811b; ah(ChatActivity chatActivity, List list) { this.f4811b = chatActivity; this.f4810a = list; } protected /* synthetic */ Object doInBackground(Object[] objArr) { return m8485a((String[]) objArr); } protected Void m8485a(String... strArr) { this.f4811b.m8413d(this.f4810a); return null; } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
4ad57434371eff46ea411d7c8ed823f3278ef01e
879c7c01b1d3cd98fbc40768001ebcd3c94bcc52
/src/combit/ListLabel24/DesignerExtensions/DialogBasedDesignerProperty.java
d61747e2b1a4f320f068ca1f7ef1b85012809fc6
[]
no_license
Javonet-io-user/7d825c3a-6d32-4c9b-9e58-43c503f77adb
c63f350b2754ef6c7fbdf42c9b8fa2a7ab45faf8
e5826d95ac9e013f9907aa75e16cec840d6ef276
refs/heads/master
2020-04-21T08:01:21.991093
2019-02-06T13:06:19
2019-02-06T13:06:19
169,407,296
0
0
null
null
null
null
UTF-8
Java
false
false
3,896
java
package combit.ListLabel24.DesignerExtensions; import Common.Activation; import static Common.JavonetHelper.Convert; import static Common.JavonetHelper.getGetObjectName; import static Common.JavonetHelper.getReturnObjectName; import static Common.JavonetHelper.ConvertToConcreteInterfaceImplementation; import Common.JavonetHelper; import com.javonet.Javonet; import com.javonet.JavonetException; import com.javonet.JavonetFramework; import com.javonet.api.NObject; import com.javonet.api.NEnum; import com.javonet.api.keywords.NRef; import com.javonet.api.keywords.NOut; import com.javonet.api.NControlContainer; import java.util.concurrent.atomic.AtomicReference; import java.util.Iterator; import java.lang.*; import combit.ListLabel24.DesignerExtensions.*; import jio.System.*; import jio.System.Runtime.Serialization.*; public class DialogBasedDesignerProperty extends DesignerProperty implements IDesignerProperty, IDisposable { protected NObject javonetHandle; /** GetProperty */ public Object getValueAsDialogBasedDesignerProperty() { try { Object res = javonetHandle.<NObject>get("Value"); if (res == null) return null; return ConvertToConcreteInterfaceImplementation(res); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return null; } } /** SetProperty */ public void setFormulaAsDialogBasedDesignerProperty(Object value) { try { javonetHandle.set("Formula", value); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } /** GetProperty */ public Object getFormulaAsDialogBasedDesignerProperty() { try { Object res = javonetHandle.<NObject>get("Formula"); if (res == null) return null; return ConvertToConcreteInterfaceImplementation(res); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); return null; } } public DialogBasedDesignerProperty(java.lang.String name, ISerializable defaultValue) { super((NObject) null); try { javonetHandle = Javonet.New( "combit.ListLabel24.DesignerExtensions.DialogBasedDesignerProperty", name, defaultValue); super.setJavonetHandle(javonetHandle); javonetHandle.addEventListener( "ButtonClicked", new com.javonet.api.INEventListener() { @Override public void eventOccurred(Object[] objects) { for (EventHandler<EventArgs> handler : _ButtonClickedListeners) { handler.Invoke( Convert(objects[0], Object.class), Convert(objects[1], EventArgs.class)); } } }); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } public DialogBasedDesignerProperty(NObject handle) { super(handle); this.javonetHandle = handle; } public void setJavonetHandle(NObject handle) { this.javonetHandle = handle; } /** Method */ public void Dispose() { try { javonetHandle.invoke("Dispose"); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } /** Event */ private java.util.ArrayList<EventHandler<EventArgs>> _ButtonClickedListeners = new java.util.ArrayList<EventHandler<EventArgs>>(); public void addButtonClicked(EventHandler<EventArgs> toAdd) { _ButtonClickedListeners.add(toAdd); } public void removeButtonClicked(EventHandler<EventArgs> toRemove) { _ButtonClickedListeners.remove(toRemove); } static { try { Activation.initializeJavonet(); } catch (java.lang.Exception e) { e.printStackTrace(); } } }
[ "support@javonet.com" ]
support@javonet.com
fe10c98a6a1b9ab162871f0d7f08deba15116f16
321beb6ca1b50e60e067ca3caafb8b37fc9ccfef
/privacystreamsevents-android-sdk/src/main/java/io/github/privacystreamsevents/device/DeviceIdGetter.java
8a4c2e5cd6ba017ffed0fca1f6cf60e07da49ac4
[]
no_license
xinyu1118/PrivacyStreamsEvents
8adce95b4fe4873d023603ee9b5003bd01e1aaa6
609a6b41e010fbfaa38e1b72eb689b3e76c36d1a
refs/heads/master
2020-03-23T18:59:06.681202
2018-08-27T12:47:35
2018-08-27T12:47:35
141,946,448
0
0
null
null
null
null
UTF-8
Java
false
false
767
java
package io.github.privacystreamsevents.device; import android.Manifest; import android.content.Context; import android.telephony.TelephonyManager; import io.github.privacystreamsevents.core.Function; import io.github.privacystreamsevents.core.UQI; /** * Get device id */ class DeviceIdGetter extends Function<Void, String> { DeviceIdGetter() { this.addRequiredPermissions(Manifest.permission.READ_PHONE_STATE); } private transient String uuid; @Override public String apply(UQI uqi, Void input) { if (this.uuid == null) { TelephonyManager tm = (TelephonyManager) uqi.getContext().getSystemService(Context.TELEPHONY_SERVICE); this.uuid = tm.getDeviceId(); } return this.uuid; } }
[ "yangxycl@163.com" ]
yangxycl@163.com
229d56b600cbbd844d62a67ea20bf9093c629135
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/messages/conversation/chatinfo/a/e.java
e252f9d4d9c83289610c1fb3f6dcd46463b2f4e1
[]
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
2,646
java
package com.viber.voip.messages.conversation.chatinfo.a; import android.content.res.Resources; import com.viber.voip.contacts.ui.list.as; import com.viber.voip.messages.conversation.ConversationItemLoaderEntity; import com.viber.voip.messages.conversation.ac; import com.viber.voip.messages.conversation.chatinfo.presentation.n; import com.viber.voip.phone.viber.conference.ConferenceCallsRepository; import com.viber.voip.settings.d.as; import com.viber.voip.util.bi; class e extends a { e(Resources paramResources, com.viber.voip.publicaccount.ui.holders.recentmedia.b paramb, ac paramac, ConferenceCallsRepository paramConferenceCallsRepository) { super(paramResources, paramb, paramac, paramConferenceCallsRepository); } private void c(ConversationItemLoaderEntity paramConversationItemLoaderEntity, n paramn) { a.a locala = a(paramn, true, true, paramn.a(), paramn.b(), paramConversationItemLoaderEntity.isGroupBehavior()); b(); a(c.a(this.a, paramConversationItemLoaderEntity, locala.d())); if (locala.f() == 0) a(c.l(this.a)); if (locala.d() > 0) { b(locala.e()); if (locala.e() < locala.d()) a(c.p(this.a)); } a(c.a(this.a, locala.a())); if (as.c(paramConversationItemLoaderEntity)) a(c.s(this.a)); if (locala.a() > 0) { c(locala.b()); if (locala.b() < locala.a()) a(c.q(this.a)); } a(c.a()); } public void b(ConversationItemLoaderEntity paramConversationItemLoaderEntity, n paramn) { a(c.a(paramConversationItemLoaderEntity)); a(c.a()); if ((!paramConversationItemLoaderEntity.isSecret()) && (this.b.getCount() > 0)) { a(c.a(this.b)); a(c.a()); } a(c.b(this.a, paramConversationItemLoaderEntity)); if ((d.as.a.d()) && (paramConversationItemLoaderEntity.isSecure())) a(c.d(this.a)); a(c.a()); if (bi.a(paramConversationItemLoaderEntity)) { a(c.e(this.a)); a(c.a()); } c(paramConversationItemLoaderEntity, paramn); a(paramConversationItemLoaderEntity); a(c.g(this.a, paramConversationItemLoaderEntity)); a(c.d(this.a, paramConversationItemLoaderEntity)); if (!paramn.e()) a(c.i(this.a, paramConversationItemLoaderEntity)); a(c.e(this.a, paramConversationItemLoaderEntity)); c(); b(paramConversationItemLoaderEntity); } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.messages.conversation.chatinfo.a.e * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
6a0d1ac2464fb481a931573e47288e3d8c840ca4
f35f4008d60bf04e6e3236a60514693cae296d42
/app/src/main/java/com/kakao/KakaoTalkLinkMessageBuilder.java
bff3b7ae029446db15e7f4d9addfdc6014329bd3
[]
no_license
alsmwsk/golfmon
ef0c8e8c7ecaa13371deed40f7e20468b823b0e9
740132d47185bfe9ec9d6774efbde5404ea8cf6d
refs/heads/master
2020-03-22T11:16:01.438894
2018-07-06T09:47:10
2018-07-06T09:47:10
139,959,669
0
0
null
null
null
null
UTF-8
Java
false
false
7,237
java
package com.kakao; import com.kakao.internal.Action; import com.kakao.internal.KakaoTalkLinkProtocol; import com.kakao.internal.LinkObject; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.json.JSONArray; import org.json.JSONException; public class KakaoTalkLinkMessageBuilder { private final String appKey; private final String appVer; private final AtomicInteger buttonType; private final String extra; private final AtomicInteger imageType; private final List<LinkObject> linkObjList; private final AtomicInteger linkType; private final AtomicInteger textType; KakaoTalkLinkMessageBuilder(String paramString1, String paramString2, String paramString3) { this.appKey = paramString1; this.appVer = paramString2; this.extra = paramString3; this.textType = new AtomicInteger(0); this.imageType = new AtomicInteger(0); this.buttonType = new AtomicInteger(0); this.linkType = new AtomicInteger(0); this.linkObjList = new ArrayList(); } public KakaoTalkLinkMessageBuilder addAppButton(String paramString) throws KakaoParameterException { addAppButton(paramString, Action.newActionApp(null, null)); return this; } public KakaoTalkLinkMessageBuilder addAppButton(String paramString, Action paramAction) throws KakaoParameterException { if (this.buttonType.getAndIncrement() == 1) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.DUPLICATE_OBJECTS_USED, "buttonType already added. each type can be added once, at most."); } LinkObject localLinkObject = LinkObject.newButton(paramString, paramAction); this.linkObjList.add(localLinkObject); return this; } public KakaoTalkLinkMessageBuilder addAppLink(String paramString) throws KakaoParameterException { addAppLink(paramString, Action.newActionApp(null, null)); return this; } public KakaoTalkLinkMessageBuilder addAppLink(String paramString, Action paramAction) throws KakaoParameterException { if (this.linkType.getAndIncrement() == 1) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.DUPLICATE_OBJECTS_USED, "linkType already added. each type can be added once, at most."); } LinkObject localLinkObject = LinkObject.newLink(paramString, paramAction); this.linkObjList.add(localLinkObject); return this; } public KakaoTalkLinkMessageBuilder addImage(String paramString, int paramInt1, int paramInt2) throws KakaoParameterException { if (this.imageType.getAndIncrement() == 1) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.DUPLICATE_OBJECTS_USED, "imageType already added. each type can be added once, at most."); } LinkObject localLinkObject = LinkObject.newImage(paramString, paramInt1, paramInt2); this.linkObjList.add(localLinkObject); return this; } public KakaoTalkLinkMessageBuilder addText(String paramString) throws KakaoParameterException { if (this.textType.getAndIncrement() == 1) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.DUPLICATE_OBJECTS_USED, "textType already added. each type can be added once, at most."); } LinkObject localLinkObject = LinkObject.newText(paramString); this.linkObjList.add(localLinkObject); return this; } public KakaoTalkLinkMessageBuilder addWebButton(String paramString) throws KakaoParameterException { addWebButton(paramString, null); return this; } public KakaoTalkLinkMessageBuilder addWebButton(String paramString1, String paramString2) throws KakaoParameterException { if (this.buttonType.getAndIncrement() == 1) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.DUPLICATE_OBJECTS_USED, "buttonType already added. each type can be added once, at most."); } LinkObject localLinkObject = LinkObject.newButton(paramString1, Action.newActionWeb(paramString2)); this.linkObjList.add(localLinkObject); return this; } public KakaoTalkLinkMessageBuilder addWebLink(String paramString) throws KakaoParameterException { addWebLink(paramString, null); return this; } public KakaoTalkLinkMessageBuilder addWebLink(String paramString1, String paramString2) throws KakaoParameterException { if (this.linkType.getAndIncrement() == 1) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.DUPLICATE_OBJECTS_USED, "linkType already added. each type can be added once, at most."); } LinkObject localLinkObject = LinkObject.newLink(paramString1, Action.newActionWeb(paramString2)); this.linkObjList.add(localLinkObject); return this; } public String build() throws KakaoParameterException { try { if (this.linkObjList.isEmpty()) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.CORE_PARAMETER_MISSING, "call addAppLink or addWebLink or addAppButton or addWebButton or addText or addImage before calling build()."); } } catch (UnsupportedEncodingException localUnsupportedEncodingException) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.UNSUPPORTED_ENCODING, localUnsupportedEncodingException); StringBuilder localStringBuilder = new StringBuilder("kakaolink://send").append("?"); localStringBuilder.append("linkver").append("=").append(URLEncoder.encode("3.5", KakaoTalkLinkProtocol.ENCODING)).append("&"); localStringBuilder.append("apiver").append("=").append(URLEncoder.encode("3.0", KakaoTalkLinkProtocol.ENCODING)).append("&"); localStringBuilder.append("appkey").append("=").append(URLEncoder.encode(this.appKey, KakaoTalkLinkProtocol.ENCODING)).append("&"); localStringBuilder.append("appver").append("=").append(URLEncoder.encode(this.appVer, KakaoTalkLinkProtocol.ENCODING)).append("&"); localStringBuilder.append("extras").append("=").append(URLEncoder.encode(this.extra, KakaoTalkLinkProtocol.ENCODING)).append("&"); localStringBuilder.append("objs").append("="); JSONArray localJSONArray = new JSONArray(); Iterator localIterator = this.linkObjList.iterator(); for (;;) { if (!localIterator.hasNext()) { return URLEncoder.encode(localJSONArray.toString(), KakaoTalkLinkProtocol.ENCODING); } localJSONArray.put(((LinkObject)localIterator.next()).createJSONObject()); } } catch (JSONException localJSONException) { throw new KakaoParameterException(KakaoParameterException.ERROR_CODE.JSON_PARSING_ERROR, localJSONException); } } } /* Location: C:\Users\TGKIM\Downloads\작업폴더\리버싱\androidReversetools\jd-gui-0.3.6.windows\com.appg.golfmon-1-dex2jar.jar * Qualified Name: com.kakao.KakaoTalkLinkMessageBuilder * JD-Core Version: 0.7.0.1 */
[ "alsmwsk@naver.com" ]
alsmwsk@naver.com
0af7278680703762643549c383d0647ff3ab8619
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate7917.java
c182d2dba0e9e7bc0388bd075770468e445acb0e
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
574
java
@Test @FailureExpected( jiraKey = "" ) public void testParameterTypeMismatch() { Session s = openSession(); s.beginTransaction(); Query query = s.createQuery( "from Animal a where a.description = :nonstring" ) .setParameter( "nonstring", Integer.valueOf( 1 ) ); try { query.list(); fail( "query execution should have failed" ); } catch (IllegalArgumentException e) { assertTyping( TypeMismatchException.class, e.getCause() ); } catch( TypeMismatchException tme ) { // expected behavior } s.getTransaction().commit(); s.close(); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
73ec059af04792f16ad79484403d5c8362469edc
a5a704bbd8c828bad8fbd06e8d1d168c86203139
/src/main/java/com/me/reader/service/impl/BookServiceImpl.java
1ab2a0af8e9c5c009297e43858251c6a455b59e3
[]
no_license
liuchenyang0515/me-reader
ad2cea9ffe8e115cfc9a0af726a63898d9f5a29a
91621ac66f18b80c8951fff0b06791823a1d93a4
refs/heads/main
2023-03-01T07:06:32.738850
2021-02-09T07:38:18
2021-02-09T07:38:18
334,795,747
0
0
null
null
null
null
UTF-8
Java
false
false
5,377
java
package com.me.reader.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.me.reader.entity.Book; import com.me.reader.entity.Evaluation; import com.me.reader.entity.MemberReadState; import com.me.reader.mapper.BookMapper; import com.me.reader.mapper.EvaluationMapper; import com.me.reader.mapper.MemberReadStateMapper; import com.me.reader.service.BookService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; @Service("bookService") @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true) public class BookServiceImpl implements BookService { @Resource private BookMapper bookMapper; @Resource private MemberReadStateMapper memberReadStateMapper; @Resource private EvaluationMapper evaluationMapper; /** * 分页查询图书 * * @param categoryId 分类编号 * @param order 排序方式 * @param page 页号 * @param rows 每页记录数 * @return 分页对象 */ @Override public IPage<Book> paging(Long categoryId, String order, Integer page, Integer rows) { Page<Book> p = new Page<>(page, rows); QueryWrapper<Book> queryWrapper = new QueryWrapper<Book>(); // 前端是设置的隐藏域,点击分类后修改隐藏域的值来控制categoryId和order来控制分类和排序分类 if (categoryId != null && categoryId != -1) { queryWrapper.eq("category_id", categoryId); } if (order != null) { if (order.equals("quantity")) { queryWrapper.orderByDesc("evaluation_quantity"); // 按照热度--评分人数降序 } else { queryWrapper.orderByDesc("evaluation_score"); // 按照评分降序 } } IPage<Book> pageObject = bookMapper.selectPage(p, queryWrapper); return pageObject; } /** * 根据图书编号查询图书对象 * * @param bookId 图书编号 * @return 图书对象 */ @Override public Book selectById(Long bookId) { Book book = bookMapper.selectById(bookId); return book; } /** * 更新图书评分/评价数量 */ @Override @Transactional // 开启声明式事务 public void updateEvaluation() { bookMapper.updateEvaluation(); } /** * 创建新的图书 * * @param book * @return */ @Override @Transactional public Book createBook(Book book) { bookMapper.insert(book); return book; } /** * 更新图书 * * @param book 新图书数据 * @return 更新后的数据 */ @Override @Transactional public Book updateBook(Book book) { bookMapper.updateById(book); return book; } /** * 删除图书及相关数据 * * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.BookMapper.deleteById - ==> Preparing: DELETE FROM book WHERE book_id=? * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.BookMapper.deleteById - ==> Parameters: 47(Long) * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.BookMapper.deleteById - <== Updates: 1 * 19:47:47 DEBUG [http-nio-80-exec-7] o.m.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3925b814] * 19:47:47 DEBUG [http-nio-80-exec-7] o.m.spring.SqlSessionUtils - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3925b814] from current transaction * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.M.delete - ==> Preparing: DELETE FROM member_read_state WHERE (book_id = ?) * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.M.delete - ==> Parameters: 47(Long) * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.M.delete - <== Updates: 0 * 19:47:47 DEBUG [http-nio-80-exec-7] o.m.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3925b814] * 19:47:47 DEBUG [http-nio-80-exec-7] o.m.spring.SqlSessionUtils - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3925b814] from current transaction * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.E.delete - ==> Preparing: DELETE FROM evaluation WHERE (book_id = ?) * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.E.delete - ==> Parameters: 47(Long) * 19:47:47 DEBUG [http-nio-80-exec-7] c.m.r.m.E.delete - <== Updates: 0 * @param bookId 图书编号 */ @Override @Transactional public void deleteBook(Long bookId) { // 三个表的删除,书籍、评论、会员对该书的阅读状态都得删除 bookMapper.deleteById(bookId); QueryWrapper<MemberReadState> msrQueryWrapper = new QueryWrapper<>(); msrQueryWrapper.eq("book_id", bookId); memberReadStateMapper.delete(msrQueryWrapper); QueryWrapper<Evaluation> evaluationQueryWrapper = new QueryWrapper<>(); evaluationQueryWrapper.eq("book_id", bookId); evaluationMapper.delete(evaluationQueryWrapper); } }
[ "897418643@qq.com" ]
897418643@qq.com
556f04a92b2ac6b105bd61029d538f91c8d38dce
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/21/21_6dd835d615482635c0acec42c8e3f34e087ea3b4/SharedInstallTests/21_6dd835d615482635c0acec42c8e3f34e087ea3b4_SharedInstallTests_s.java
510326c303577d4526e41833a6cf0592f3348d2e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,062
java
/******************************************************************************* * Copyright (c) 2008, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.equinox.p2.tests.reconciler.dropins; import java.io.*; import java.util.Properties; import junit.framework.Test; import junit.framework.TestSuite; import org.eclipse.core.runtime.Platform; import org.eclipse.equinox.internal.p2.updatesite.Activator; public class SharedInstallTests extends AbstractReconcilerTest { private static final boolean WINDOWS = java.io.File.separatorChar == '\\'; private static File readOnlyBase; private static File userBase; public static Test suite() { TestSuite suite = new ReconcilerTestSuite(); suite.setName(SharedInstallTests.class.getName()); suite.addTest(new SharedInstallTests("testBasicStartup")); suite.addTest(new SharedInstallTests("testReadOnlyDropinsStartup")); suite.addTest(new SharedInstallTests("testUserDropinsStartup")); return suite; } /* * Constructor for the class. */ public SharedInstallTests(String name) { super(name); } public static void reconcileReadOnly(String message) { File root = new File(Activator.getBundleContext().getProperty("java.home")); root = new File(root, "bin"); File exe = new File(root, "javaw.exe"); if (!exe.exists()) exe = new File(root, "java"); String configuration = new File(userBase, "configuration").getAbsolutePath(); String[] command = new String[] {(new File(output, "eclipse/eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-application", "org.eclipse.equinox.p2.reconciler.application", "-configuration", configuration, "-vm", exe.getAbsolutePath(), "-vmArgs", "-Dosgi.checkConfiguration=true"}; run(message, command); } public static void setReadOnly(File target, boolean readOnly) { if (WINDOWS) { String targetPath = target.getAbsolutePath(); String[] command = new String[] {"attrib", readOnly ? "+r" : "-r", targetPath, "/s", "/d"}; run("setReadOnly " + readOnly + " failed on" + target.getAbsolutePath(), command); if (target.isDirectory()) { targetPath += "\\*.*"; command = new String[] {"attrib", readOnly ? "+r" : "-r", targetPath, "/s", "/d"}; run("setReadOnly " + readOnly + " failed on" + target.getAbsolutePath(), command); } } else { String[] command = new String[] {"chmod", "-R", readOnly ? "-w" : "+w", target.getAbsolutePath()}; run("setReadOnly " + readOnly + " failed on" + target.getAbsolutePath(), command); } } private static void cleanupReadOnlyInstall() { delete(userBase); setReadOnly(readOnlyBase, false); assertTrue("0.7", readOnlyBase.canWrite()); } private static void setupReadOnlyInstall() { readOnlyBase = new File(output, "eclipse"); assertTrue(readOnlyBase.canWrite()); setReadOnly(readOnlyBase, true); assertFalse(readOnlyBase.canWrite()); userBase = new File(output, "user"); userBase.mkdir(); } public void testBasicStartup() throws IOException { assertInitialized(); setupReadOnlyInstall(); try { File userBundlesInfo = new File(userBase, "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"); File userConfigIni = new File(userBase, "configuration/config.ini"); assertFalse("0.1", userBundlesInfo.exists()); assertFalse("0.2", userConfigIni.exists()); reconcileReadOnly("0.21"); // This line is disabled until bug 300050 is also fixed // assertFalse("0.3", userBundlesInfo.exists()); assertTrue("0.4", userConfigIni.exists()); Properties props = new Properties(); InputStream is = new BufferedInputStream(new FileInputStream(userConfigIni)); try { props.load(is); } finally { is.close(); } assertTrue("0.5", props.containsKey("osgi.sharedConfiguration.area")); assertTrue("0.51", props.containsKey("eclipse.p2.data.area")); assertTrue("0.6", props.size() == 2); } finally { cleanupReadOnlyInstall(); } } public void testReadOnlyDropinsStartup() throws IOException { if (Platform.getOS().equals(Platform.OS_MACOSX)) return; assertInitialized(); assertDoesNotExistInBundlesInfo("0.1", "myBundle"); File jar = getTestData("2.0", "testData/reconciler/plugins/myBundle_1.0.0.jar"); add("0.2", "dropins", jar); setupReadOnlyInstall(); try { File userBundlesInfo = new File(userBase, "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"); File userConfigIni = new File(userBase, "configuration/config.ini"); assertFalse("0.1", userBundlesInfo.exists()); assertFalse("0.2", userConfigIni.exists()); reconcileReadOnly("0.21"); assertTrue("0.3", userBundlesInfo.exists()); assertTrue("0.4", userConfigIni.exists()); assertTrue(isInBundlesInfo("myBundle", null, userBundlesInfo)); // remove the bundle from the dropins and reconcile setReadOnly(readOnlyBase, false); assertTrue("0.7", readOnlyBase.canWrite()); remove("1.0", "dropins", "myBundle_1.0.0.jar"); setReadOnly(readOnlyBase, true); assertFalse("0.7", readOnlyBase.canWrite()); reconcileReadOnly("0.21"); assertFalse(isInBundlesInfo("myBundle", null, userBundlesInfo)); } finally { cleanupReadOnlyInstall(); // try to remove it in case an exception was thrown remove("1.0", "dropins", "myBundle_1.0.0.jar"); } } public void testUserDropinsStartup() throws IOException { if (Platform.getOS().equals(Platform.OS_MACOSX)) return; assertInitialized(); assertDoesNotExistInBundlesInfo("0.1", "myBundle"); File jar = getTestData("2.0", "testData/reconciler/plugins/myBundle_1.0.0.jar"); File dropins = new File(userBase, "dropins"); setupReadOnlyInstall(); try { dropins.mkdir(); copy("copying to dropins", jar, new File(dropins, jar.getName())); File userBundlesInfo = new File(userBase, "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info"); File userConfigIni = new File(userBase, "configuration/config.ini"); assertFalse("0.1", userBundlesInfo.exists()); assertFalse("0.2", userConfigIni.exists()); reconcileReadOnly("0.21"); assertTrue("0.3", userBundlesInfo.exists()); assertTrue("0.4", userConfigIni.exists()); assertTrue(isInBundlesInfo("myBundle", null, userBundlesInfo)); // remove the bundle from the dropins and reconcile delete(dropins); reconcileReadOnly("0.21"); assertFalse(isInBundlesInfo("myBundle", null, userBundlesInfo)); } finally { delete(dropins); cleanupReadOnlyInstall(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ee2fd7b43ddc2cc65d5fc043683f7280f2a643cd
b118a9cb23ae903bc5c7646b262012fb79cca2f2
/src/com/estrongs/android/pop/app/t.java
34e4525cd04f4c0423c2269b20d8c2acb95b0983
[]
no_license
secpersu/com.estrongs.android.pop
22186c2ea9616b1a7169c18f34687479ddfbb6f7
53f99eb4c5b099d7ed22d70486ebe179e58f47e0
refs/heads/master
2020-07-10T09:16:59.232715
2015-07-05T03:24:29
2015-07-05T03:24:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package com.estrongs.android.pop.app; import android.os.Handler; import com.estrongs.android.ui.view.ag; class t implements Runnable { t(r paramr) {} public void run() { r.a(a, true); if (!r.a(a).e()) { ag.a(r.d(a), 2131428517, 1); r.a(a, false); return; } r.g(a).post(new u(this)); r.a(a, false); } } /* Location: * Qualified Name: com.estrongs.android.pop.app.t * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
bd952b37bedc6a953b0d7ffd15255760206ca6fb
2e03da8505fba2f5fba0aa96096240cfe1584490
/crunchyroll/crunchyroll2-0-3/roboguice/inject/AssetManagerProvider.java
8ff3e251522dc812986555300c088517d832fd6e
[]
no_license
JairoBm13/crunchywomod
c00f8535a76ee7a5e0554d766ddc08b608e57f9b
90ad43cdf12e41fc6ff2323ec5d6d94cc45a1c52
refs/heads/master
2021-01-20T14:48:30.312526
2017-05-08T21:37:16
2017-05-08T21:37:16
90,674,385
2
0
null
null
null
null
UTF-8
Java
false
false
424
java
// // Decompiled by Procyon v0.5.30 // package roboguice.inject; import com.google.inject.Inject; import android.content.Context; import android.content.res.AssetManager; import com.google.inject.Provider; public class AssetManagerProvider implements Provider<AssetManager> { @Inject protected Context context; @Override public AssetManager get() { return this.context.getAssets(); } }
[ "j.bautista.m13@outlook.com" ]
j.bautista.m13@outlook.com
4b349d0d6eab3458b4f71a70ffc70a3b3378a50a
2ccda455ff6501cd7ab922df6e0deeb626a96269
/src/test/java/com/dyn/client/v3/traffic/features/GeoServiceApiExpectTest.java
d880f6ce112fe79b40352a6ee4ca434e3751b37d
[ "Apache-2.0" ]
permissive
cloudstead/dyn-java
d4dc090c871fe4c217da316be55397d498ff6071
ea61ce322493bc941d00dff51b11f7a5051b6f3e
refs/heads/master
2021-01-21T01:43:07.548815
2015-09-12T01:14:45
2015-09-12T01:14:45
42,337,553
0
0
null
2015-09-11T23:55:54
2015-09-11T23:55:54
null
UTF-8
Java
false
false
3,294
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 com.dyn.client.v3.traffic.features; import static com.dyn.client.common.DynClientVersion.VERSION; import static com.google.common.net.HttpHeaders.CONTENT_TYPE; import static com.google.common.net.HttpHeaders.USER_AGENT; import static javax.ws.rs.HttpMethod.GET; import static javax.ws.rs.core.MediaType.APPLICATION_JSON; import static javax.ws.rs.core.Response.Status.OK; import static org.testng.Assert.assertEquals; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.testng.annotations.Test; import com.dyn.client.v3.traffic.DynTrafficApi; import com.dyn.client.v3.traffic.internal.BaseDynTrafficApiExpectTest; import com.dyn.client.v3.traffic.parse.GetGeoServiceResponseTest; import com.dyn.client.v3.traffic.parse.ListGeoServicesResponseTest; /** * @author Adrian Cole */ @Test(groups = "unit", testName = "GeoServiceApiExpectTest") public class GeoServiceApiExpectTest extends BaseDynTrafficApiExpectTest { HttpRequest list = HttpRequest.builder().method(GET).endpoint("https://api2.dynect.net/REST/Geo") .addHeader("API-Version", "3.3.8").addHeader(USER_AGENT, VERSION).addHeader(CONTENT_TYPE, APPLICATION_JSON) .addHeader("Auth-Token", authToken).build(); HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode()) .payload(payloadFromResourceWithContentType("/list_geo_services.json", APPLICATION_JSON)).build(); public void testListWhenResponseIs2xx() { DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, list, listResponse); assertEquals(success.getGeoServiceApi().list().toString(), new ListGeoServicesResponseTest().expected() .toString()); } HttpRequest get = HttpRequest.builder().method(GET).endpoint("https://api2.dynect.net/REST/Geo/srv") .addHeader("API-Version", "3.3.8").addHeader(USER_AGENT, VERSION).addHeader(CONTENT_TYPE, APPLICATION_JSON) .addHeader("Auth-Token", authToken).build(); HttpResponse getResponse = HttpResponse.builder().statusCode(OK.getStatusCode()) .payload(payloadFromResourceWithContentType("/get_geo_service.json", APPLICATION_JSON)).build(); public void testGetWhenResponseIs2xx() { DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, get, getResponse); assertEquals(success.getGeoServiceApi().get("srv").toString(), new GetGeoServiceResponseTest().expected() .toString()); } }
[ "sunny.gleason@gmail.com" ]
sunny.gleason@gmail.com
7f70f2ff22d5ffc802fe25dcebbd166f8eea948f
0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7
/JavaSource/dream/part/pur/buy/dao/LovPtprAcListDAO.java
6f790efa05301c3cb5d2cef57e6ac217d8a9809a
[]
no_license
eMainTec-DREAM/DREAM
bbf928b5c50dd416e1d45db3722f6c9e35d8973c
05e3ea85f9adb6ad6cbe02f4af44d941400a1620
refs/heads/master
2020-12-22T20:44:44.387788
2020-01-29T06:47:47
2020-01-29T06:47:47
236,912,749
0
0
null
null
null
null
UHC
Java
false
false
579
java
package dream.part.pur.buy.dao; import java.util.List; import java.util.Map; import common.bean.User; import dream.org.emp.dto.LovEmpListDTO; import dream.part.pur.buy.dto.LovPtprAcListDTO; /** * 사원검색 팝업 * @author ssong * @version $Id:$ * @since 1.0 */ public interface LovPtprAcListDAO { List findTaskMapAcList(LovPtprAcListDTO lovPtprAcListDTO, User user, Map<String, String> conditionMap); String findTotalCount(LovPtprAcListDTO lovPtprAcListDTO, User user, Map<String, String> conditionMap); }
[ "HN4741@10.31.0.185" ]
HN4741@10.31.0.185
463bcab651c100fadcc26901ea95c91c78a17a7d
704507754a9e7f300dfab163e97cd976b677661b
/src/java/net/SocketException.java
ce2a2754caadbc63f73667b0a9ff757385c89fe6
[]
no_license
ossaw/jdk
60e7ca5e9f64541d07933af25c332e806e914d2a
b9d61d6ade341b4340afb535b499c09a8be0cfc8
refs/heads/master
2020-03-27T02:23:14.010857
2019-08-07T06:32:34
2019-08-07T06:32:34
145,785,700
0
0
null
null
null
null
UTF-8
Java
false
false
815
java
/* * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.net; import java.io.IOException; /** * Thrown to indicate that there is an error creating or accessing a Socket. * * @author Jonathan Payne * @since JDK1.0 */ public class SocketException extends IOException { private static final long serialVersionUID = -5935874303556886934L; /** * Constructs a new {@code SocketException} with the specified detail * message. * * @param msg * the detail message. */ public SocketException(String msg) { super(msg); } /** * Constructs a new {@code SocketException} with no detail message. */ public SocketException() {} }
[ "jianghao7625@gmail.com" ]
jianghao7625@gmail.com
d7de894069b668e65a16d0c0c3999edde7dce5d1
c992cc664787167313fb4d317f172e8b057b1f5b
/modules/ui/src/main/java/io/jmix/ui/components/RadioButtonGroup.java
ac566d89e62575c206d1b9b4ced2771958fdfc71
[ "Apache-2.0" ]
permissive
alexbudarov/jmix
42628ce00a2a67bac7f4113a7e642d5a67c38197
23272dc3d6cb1f1a9826edbe888b3c993ab22d85
refs/heads/master
2020-12-19T15:57:38.886284
2020-01-23T10:06:16
2020-01-23T10:06:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,357
java
/* * Copyright 2019 Haulmont. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jmix.ui.components; import io.jmix.ui.components.data.Options; import java.util.function.Function; /** * A group of RadioButtons. Individual radio buttons are made from items supplied by a {@link Options}. * * @param <I> item type */ public interface RadioButtonGroup<I> extends OptionsField<I, I>, LookupComponent, Component.Focusable, HasOrientation { String NAME = "radioButtonGroup"; /** * @return icon provider of the LookupField. */ Function<? super I, String> getOptionIconProvider(); /** * Set the icon provider for the LookupField. * * @param optionIconProvider provider which provides icons for options */ void setOptionIconProvider(Function<? super I, String> optionIconProvider); }
[ "minaev@haulmont.com" ]
minaev@haulmont.com
c726b38793b848e2f2258c835f09e50f68a65088
69ee0508bf15821ea7ad5139977a237d29774101
/cmis-core/src/main/java/vmware/vim25/ArrayOfKeyAnyValue.java
58a2b550555a9e2cd2a6d7eed97fdb0c6e4e214c
[]
no_license
bhoflack/cmis
b15bac01a30ee1d807397c9b781129786eba4ffa
09e852120743d3d021ec728fac28510841d5e248
refs/heads/master
2021-01-01T05:32:17.872620
2014-11-17T15:00:47
2014-11-17T15:00:47
8,852,575
0
0
null
null
null
null
UTF-8
Java
false
false
1,892
java
package vmware.vim25; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ArrayOfKeyAnyValue complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ArrayOfKeyAnyValue"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="KeyAnyValue" type="{urn:vim25}KeyAnyValue" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArrayOfKeyAnyValue", propOrder = { "keyAnyValue" }) public class ArrayOfKeyAnyValue { @XmlElement(name = "KeyAnyValue") protected List<KeyAnyValue> keyAnyValue; /** * Gets the value of the keyAnyValue property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the keyAnyValue property. * * <p> * For example, to add a new item, do as follows: * <pre> * getKeyAnyValue().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link KeyAnyValue } * * */ public List<KeyAnyValue> getKeyAnyValue() { if (keyAnyValue == null) { keyAnyValue = new ArrayList<KeyAnyValue>(); } return this.keyAnyValue; } }
[ "brh@melexis.com" ]
brh@melexis.com
b98f6699eb21e3ef7fa6cfac362a8d41c752587d
29b6a856a81a47ebab7bfdba7fe8a7b845123c9e
/dingtalk/java/src/main/java/com/aliyun/dingtalklive_1_0/models/CreateCloudFeedRequest.java
4f9296ff3386eb9cf580f15c32b1fe1a3bf11bbb
[ "Apache-2.0" ]
permissive
aliyun/dingtalk-sdk
f2362b6963c4dbacd82a83eeebc223c21f143beb
586874df48466d968adf0441b3086a2841892935
refs/heads/master
2023-08-31T08:21:14.042410
2023-08-30T08:18:22
2023-08-30T08:18:22
290,671,707
22
9
null
2021-08-12T09:55:44
2020-08-27T04:05:39
PHP
UTF-8
Java
false
false
1,852
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dingtalklive_1_0.models; import com.aliyun.tea.*; public class CreateCloudFeedRequest extends TeaModel { @NameInMap("coverUrl") public String coverUrl; @NameInMap("intro") public String intro; @NameInMap("startTime") public Long startTime; @NameInMap("title") public String title; @NameInMap("userId") public String userId; @NameInMap("videoUrl") public String videoUrl; public static CreateCloudFeedRequest build(java.util.Map<String, ?> map) throws Exception { CreateCloudFeedRequest self = new CreateCloudFeedRequest(); return TeaModel.build(map, self); } public CreateCloudFeedRequest setCoverUrl(String coverUrl) { this.coverUrl = coverUrl; return this; } public String getCoverUrl() { return this.coverUrl; } public CreateCloudFeedRequest setIntro(String intro) { this.intro = intro; return this; } public String getIntro() { return this.intro; } public CreateCloudFeedRequest setStartTime(Long startTime) { this.startTime = startTime; return this; } public Long getStartTime() { return this.startTime; } public CreateCloudFeedRequest setTitle(String title) { this.title = title; return this; } public String getTitle() { return this.title; } public CreateCloudFeedRequest setUserId(String userId) { this.userId = userId; return this; } public String getUserId() { return this.userId; } public CreateCloudFeedRequest setVideoUrl(String videoUrl) { this.videoUrl = videoUrl; return this; } public String getVideoUrl() { return this.videoUrl; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
4ebe8b966332f2dc426f1bda3202da97ff9aeddd
0ee1bc8b2e5adbfb74c2d78dc299c7ac6066ac50
/source/analytics-sdk-common/src/main/java/so/sao/analytics/sdk/kafka/logger/ThirdpartyLogger.java
3710e319572ab8709298a82aad3a19c7bbace5a5
[]
no_license
dev000il/analytics-sdk
d8860f567cc7dea04d936fb4536e2c1bd26f5305
e9cb414bfabb591579e6d03501aaf5e01d3a81b1
refs/heads/master
2020-06-10T19:39:19.397191
2016-12-08T02:13:21
2016-12-08T02:13:21
75,893,911
0
0
null
null
null
null
UTF-8
Java
false
false
1,210
java
package so.sao.analytics.sdk.kafka.logger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import so.sao.analytics.sdk.common.model.event.Thirdparty; import so.sao.analytics.sdk.common.model.flatevent.FlatThirdparty; /** * Third party events log * * @author senhui.li */ public class ThirdpartyLogger extends EventBasicLogger { private static final Logger logger = LoggerFactory.getLogger(ThirdpartyLogger.class.getSimpleName()); private static ThirdpartyLogger thirdpartyLogger; public static ThirdpartyLogger create() { if (thirdpartyLogger == null) { synchronized (ThirdpartyLogger.class) { if (thirdpartyLogger == null) { thirdpartyLogger = new ThirdpartyLogger(); } } } return thirdpartyLogger; } @Override protected void loggerInfo(String message) { logger.info(message); } public static ThirdpartyLogger get() { return thirdpartyLogger; } public static void log(Thirdparty event) { thirdpartyLogger.push(event); } public static void log(FlatThirdparty event) { thirdpartyLogger.push(event); } }
[ "dev000il@hotmail.com" ]
dev000il@hotmail.com
e3970de689f95014618f053dc0134408d8cac691
a90450b6a44715a9752915b2407a4f827cf35baf
/WDE/src/wde/cs/MappedValue.java
71448b38cc5bafd29b16e96e655d4d48420c97ec
[]
no_license
usdot-fhwa-stol/WxDE
8af0ea15dc4d88356142a8e974fac9533490541c
8614f264ed014ea545a47a134b32c0d6ca03cc9a
refs/heads/master
2023-02-18T13:58:32.514197
2017-11-06T22:33:35
2017-11-06T22:40:35
41,399,863
0
0
null
null
null
null
UTF-8
Java
false
false
1,843
java
// Copyright (c) 2010 Mixon/Hill, Inc. All rights reserved. /** * @file MappedValue.java */ package wde.cs; /** * Maps a value to an observation type, and label key. */ public class MappedValue { /** * Observation type. */ int m_nObsType; /** * The value being mapped to the Observation type and label */ double m_dValue; /** * The label for this observation type. */ CharSequence m_sLabel; /** * <b> Default Constructor </b> * <p> * Creates new instances of {@code MappedValue} * </p> */ MappedValue() { } /** * <b> Copy Constructor </b> * <p/> * <p> * Copies {@code oMappedValue} to a new instance of {@code MappedValue}. * </p> * * @param oMappedValue The target of the new instance of * {@code MappedValue}. */ MappedValue(MappedValue oMappedValue) { m_nObsType = oMappedValue.m_nObsType; m_dValue = oMappedValue.m_dValue; m_sLabel = oMappedValue.m_sLabel; } /** * Creates a new instance of {@code MappedValue} containing the supplied * paremters. * * @param nObsType The Observation type contained in this * {@code MappedValue} * @param sLabel The label assigned to this obseration type. * @param dValue The value mapped to the Key (nObsType, sLabel). */ MappedValue(int nObsType, CharSequence sLabel, double dValue) { setKey(nObsType, sLabel); m_dValue = dValue; } /** * Sets the "key" of the mapped value. * * @param nObsType Observation type. * @param sLabel Label for this observation type. */ void setKey(int nObsType, CharSequence sLabel) { m_nObsType = nObsType; m_sLabel = sLabel; } }
[ "schultzjl@leidos.com" ]
schultzjl@leidos.com
12fb545d3c8c25056f646ff334c5c41be82945f3
1b074ff0f0bd5eacbca4c3d96c186901c5f075ab
/config/src/test/java/org/springframework/security/config/debug/SecurityDebugBeanFactoryPostProcessorTests.java
a721906b21a5d8a37fbc83df374b7fffb71fbe7a
[ "Apache-2.0" ]
permissive
selvinsource/spring-security
abb4f762d98967673f216c657dc6abebf3642d15
8dd2864dea3de5ea98637a1629debc89c29e76c0
refs/heads/master
2020-04-29T16:13:59.943047
2019-03-22T01:40:05
2019-03-23T00:30:56
176,251,873
10
12
Apache-2.0
2019-03-18T09:54:43
2019-03-18T09:54:40
null
UTF-8
Java
false
false
1,812
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.security.config.debug; import org.junit.Rule; import org.junit.Test; import org.springframework.security.config.test.SpringTestRule; import org.springframework.security.web.FilterChainProxy; import org.springframework.security.web.debug.DebugFilter; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.security.config.BeanIds.FILTER_CHAIN_PROXY; import static org.springframework.security.config.BeanIds.SPRING_SECURITY_FILTER_CHAIN; /** * @author Rob Winch * @author Josh Cummings */ public class SecurityDebugBeanFactoryPostProcessorTests { @Rule public final SpringTestRule spring = new SpringTestRule(); @Test public void contextRefreshWhenInDebugModeAndDependencyHasAutowiredConstructorThenDebugModeStillWorks() { // SEC-1885 this.spring.configLocations("classpath:org/springframework/security/config/debug/SecurityDebugBeanFactoryPostProcessorTests-context.xml") .autowire(); assertThat(this.spring.getContext().getBean(SPRING_SECURITY_FILTER_CHAIN)).isInstanceOf(DebugFilter.class); assertThat(this.spring.getContext().getBean(FILTER_CHAIN_PROXY)).isInstanceOf(FilterChainProxy.class); } }
[ "rwinch@users.noreply.github.com" ]
rwinch@users.noreply.github.com
1b2a4504412b9d8636cc4ba30dee7f09ce525f57
6ae941f410b479da108c421c0fd29a82194b9ad7
/src/test/java/io/github/cepr0/resolver/FirstStrategy.java
88848c1819d5c9e01832b0f22fa994f900d4e81e
[]
no_license
Cepr0/sb-generic-strategy-resolver
4760bb1c496faa26ef73324781840f2f9687fc54
50c9707df62ff208442d7dec607800b87b31c1f8
refs/heads/master
2020-06-29T11:47:30.898799
2019-08-05T13:20:48
2019-08-05T13:20:48
200,525,919
0
0
null
null
null
null
UTF-8
Java
false
false
240
java
package io.github.cepr0.resolver; import org.springframework.stereotype.Component; @Component public class FirstStrategy implements TestStrategy<FirstData> { @Override public String test(FirstData data) { return data.getFirst(); } }
[ "cepr0@ukr.net" ]
cepr0@ukr.net
0d5811de4782826bd539bf04944977fa7299fcfc
e871b9112a3dd9e6557e03be045c2e0d500e428b
/core/src/main/java/com/ctrip/ferriswheel/core/util/ClassScanner.java
e41160795ed42e770ac333f09a7f4c543b4ad591
[ "MIT" ]
permissive
littleorca/ferris-wheel
6ca377e31276f46cf947a98470301d0751b76109
aede3ba7e40518856b47e9df59ea221c00c6d871
refs/heads/master
2022-10-12T08:50:13.393513
2020-07-31T07:54:43
2020-07-31T07:54:43
159,432,398
17
3
MIT
2022-10-04T23:48:12
2018-11-28T02:38:11
Java
UTF-8
Java
false
false
1,202
java
package com.ctrip.ferriswheel.core.util; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; import java.util.Enumeration; public class ClassScanner { public static void main(String[] args) throws IOException, URISyntaxException { Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources("com/ctrip/ferriswheel/"); while (resources.hasMoreElements()) { URL res = resources.nextElement(); System.out.println(res); if (res.getProtocol().equals("file")) { scanFile(new File(res.toURI())); } else if (res.getProtocol().equals("jar")) { scanJar(res); } } } private static void scanFile(File parent) throws IOException { File[] files = parent.listFiles(); if (files == null) { return; } for (File f : files) { if (f.isDirectory()) { scanFile(f); } else { System.out.println("File => "+f.getCanonicalPath()); } } } private static void scanJar(URL res) { } }
[ "liuhaifeng@live.com" ]
liuhaifeng@live.com
1f6039c43c2d806da4316568d8a6c7dc9fe88498
3f845730d07e3e1f847dc285905e77a132d6edcc
/src/main/java/practica3/Ejercicio2Bridge/Cliente.java
0a5bb92ceca8e4cb5e6b67567c22e99b1d19c7ae
[]
no_license
AleChirinos/Todo-DP
2d4911e2910e8f7a2418cd81004352337659c16c
c076cb66c9eb5395c8448081249585e53f892ef4
refs/heads/main
2023-06-08T14:19:18.364102
2021-07-01T06:12:10
2021-07-01T06:12:10
372,260,222
0
0
null
null
null
null
UTF-8
Java
false
false
1,078
java
package practica3.Ejercicio2Bridge; public class Cliente { public static void main(String[] args){ IEmpresas empresaAlcantarillado = new InstalacionAlcantarillado(new PagoEfectivo(), "EPSAS", 1245343, 10000234, 140); empresaAlcantarillado.tipoPago(); IEmpresas empresaAlcantarillado2 = new InstalacionAlcantarillado(new PagoAplicacionEmpresa(), "SEMAPA", 233243, 10002345, 200); empresaAlcantarillado2.tipoPago(); IEmpresas empresaElectrica = new InstalacionElectrica(new PagoTigoMoney(), "De la Paz", 5433123, 20000434, 170); empresaElectrica.tipoPago(); IEmpresas empresaElectrica2 = new InstalacionElectrica(new PagoTransferenciaBancaria(), "SEPSA", 346544, 10043222, 100); empresaElectrica2.tipoPago(); IEmpresas empresaAgua = new IntalacionAgua(new PagoAplicacionEmpresa(), "SAGUAPAC", 543326, 10002788, 150); empresaAgua.tipoPago(); IEmpresas empresaAgua2 = new IntalacionAgua(new PagoTigoMoney(), "COOSALT", 123422, 2003737, 300); empresaAgua2.tipoPago(); } }
[ "alejandra.chirinos2702@gmail.com" ]
alejandra.chirinos2702@gmail.com
f75dfb1e9cd16a52e7688a94051472cdb0d6a882
e1095749b78bb767a8fe558e46ba0b7010ebd547
/src/main/java/com/robertx22/mine_and_slash/vanilla_mc/packets/RequestTilePacket.java
bb92c43e0ec5090ae37b873f85e191ab6ba846e9
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
RobertSkalko/Mine-and-Slash
6d1148fa3e626311c2238d314f8c6c5e30c7c00c
e16832ccd7ffc438b562202ecde39a324732d7f5
refs/heads/1.15
2023-07-03T18:47:05.628869
2020-07-17T21:40:02
2020-07-17T21:40:02
113,667,576
44
41
NOASSERTION
2022-10-28T01:56:01
2017-12-09T12:28:35
Java
UTF-8
Java
false
false
1,872
java
package com.robertx22.mine_and_slash.vanilla_mc.packets; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.server.SUpdateTileEntityPacket; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.network.NetworkEvent; import java.util.function.Supplier; public class RequestTilePacket { public BlockPos pos; public RequestTilePacket() { } public RequestTilePacket(BlockPos pos) { this.pos = pos; } public static RequestTilePacket decode(PacketBuffer buf) { RequestTilePacket newpkt = new RequestTilePacket(); newpkt.pos = buf.readBlockPos(); return newpkt; } public static void encode(RequestTilePacket packet, PacketBuffer tag) { tag.writeBlockPos(packet.pos); } public static void handle(final RequestTilePacket pkt, Supplier<NetworkEvent.Context> ctx) { ctx.get() .enqueueWork(() -> { try { ServerPlayerEntity player = ctx.get() .getSender(); if (player != null) { sendUpdate(pkt.pos, player); } } catch (Exception e) { e.printStackTrace(); } }); ctx.get() .setPacketHandled(true); } private static void sendUpdate(BlockPos pos, ServerPlayerEntity player) { TileEntity tile = player.world.getTileEntity(pos); if (tile != null) { SUpdateTileEntityPacket supdatetileentitypacket = tile.getUpdatePacket(); if (supdatetileentitypacket != null) { player.connection.sendPacket(supdatetileentitypacket); } } } }
[ "treborx555@gmail.com" ]
treborx555@gmail.com
eeac7eb67715fce3d256a6114289f8c90ca99538
c176a6013af49e8f5632d4b4e14b9080cea7aae4
/perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/model/PerunError.java
d966290812e3f7e45b36a7728481727a48da097b
[ "Apache-2.0" ]
permissive
katarinaHrab/perun
16306682b176d8c1d7d9630a56256359d0ca1f7e
6e4b16063835b79776333dc20f3c481bf29cb4da
refs/heads/master
2020-12-26T11:14:51.305569
2014-01-16T14:14:44
2014-01-16T14:14:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,058
java
package cz.metacentrum.perun.webgui.model; import com.google.gwt.core.client.JavaScriptObject; /** * Overlay type for PerunException object from Perun * * @author Vaclav Mach <374430@mail.muni.cz> * @author Pavel Zlamal <256627@mail.muni.cz> * @version $Id$ */ public class PerunError extends JavaScriptObject { protected PerunError() { } public final native String getErrorId() /*-{ if (typeof this.errorId === 'undefined' || !this.errorId) { return ""; } return this.errorId; }-*/; public final native void setErrorId(String id) /*-{ this.errorId = id; }-*/; /** * Return name of exception (this.getClass().getSimpleName()) * which is equivalent to "beanName" in Perun Beans * * @return name of exception or empty string */ public final native String getName() /*-{ if (!this.name) { return ""; } return this.name; }-*/; /** * Return TYPE of exception (e.g. for CabinetException) * * @return type of exception or empty string */ public final native String getType() /*-{ if (!this.type) { return ""; } return this.type; }-*/; /** * Return reason for "ExtendMembershipException" * @return reason why can't extend membership */ public final native String getReason() /*-{ if (!this.reason) { return ""; } return this.reason; }-*/; public final native void setType(String type) /*-{ this.type = type; }-*/; public final native String getErrorInfo() /*-{ if (typeof this.message === 'undefined' || !this.message) { return ""; } return this.message; }-*/; public final native void setErrorInfo(String info) /*-{ this.message = info; }-*/; /** * Get attribute object related to error message * * @return attribute object or null if not present */ public final native Attribute getAttribute() /*-{ if (!this.attribute) { return null; } return this.attribute; }-*/; /** * Get referenced attribute object related to error message * * @return attribute object or null if not present */ public final native Attribute getReferenceAttribute() /*-{ if (!this.referenceAttribute) { return null; } return this.referenceAttribute; }-*/; /** * Get referenced VO related to error message * * @return Vo object or null if not present */ public final native VirtualOrganization getVo() /*-{ if (!this.vo) { return null; } return this.vo; }-*/; /** * Get referenced Facility related to error message * * @return Facility object or null if not present */ public final native Facility getFacility() /*-{ if (!this.facility) { return null; } return this.facility; }-*/; /** * Get referenced Group related to error message * * @return Group object or null if not present */ public final native Group getGroup() /*-{ if (!this.group) { return null; } return this.group; }-*/; /** * Get referenced User related to error message * * @return User object or null if not present */ public final native User getUser() /*-{ if (!this.user) { return null; } return this.user; }-*/; /** * Get holder of attribute related to error message * * @return GeneralObject object or null if not present */ public final native GeneralObject getAttributeHolder() /*-{ if (!this.attributeHolder) { return null; } return this.attributeHolder; }-*/; /** * Get secondary holder of attribute related to error message * * @return GeneralObject object or null if not present */ public final native GeneralObject getAttributeHolderSecondary() /*-{ if (!this.attributeHolderSecondary) { return null; } return this.attributeHolderSecondary; }-*/; /** * Get referenced Member related to error message * * @return Member object or null if not present */ public final native Member getMember() /*-{ if (!this.member) { return null; } return this.member; }-*/; /** * Get referenced login related to error message * * @return login string or null */ public final native String getLogin() /*-{ if (!this.login) { return null; } return this.login; }-*/; /** * Get referenced login-namespace related to error message * * @return login namespace string or null */ public final native String getNamespace() /*-{ if (!this.namespace) { return null; } return this.namespace; }-*/; /** * Get referenced destination related to error message * * @return destination object or null */ public final native Destination getDestination() /*-{ if (!this.destination) { return null; } return this.destination; }-*/; /** * Get referenced external source related to error message * * @return external source or null */ public final native ExtSource getExtSource() /*-{ if (!this.extSource) { return null; } return this.extSource; }-*/; /** * Get referenced service related to error message * * @return service or null */ public final native Service getService() /*-{ if (!this.service) { return null; } return this.service; }-*/; /** * Returns Perun specific type of object * * @return type of object */ public final String getObjectType() { if ("".equalsIgnoreCase(getErrorId()) && "".equalsIgnoreCase(getErrorInfo())) { return getNativeObjectType(); } else { return "PerunError"; } } /** * Get native type */ public final native String getNativeObjectType() /*-{ if (!this.beanName) { return "JavaScriptObject"; } else { return this.beanName; } }-*/; /** * Sets Perun specific type of object * * @param type type of object */ public final native void setObjectType(String type) /*-{ this.beanName = type; }-*/; /** * Returns the status of this item in Perun system as String * VALID, INVALID, SUSPENDED, EXPIRED, DISABLED * * @return string which defines item status */ public final native String getStatus() /*-{ return this.status; }-*/; /** * Compares to another object * @param o Object to compare * @return true, if they are the same */ public final boolean equals(PerunError o) { return o.getErrorId() == this.getErrorId(); } }
[ "256627@mail.muni.cz" ]
256627@mail.muni.cz
34a5b007b34c7e234382b3b65eb6522f55fe7b26
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13141-19-3-Single_Objective_GGA-WeightedSum/org/xwiki/wysiwyg/server/filter/ConversionFilter_ESTest.java
56ebea226f92f50f546b17c54a6bc643f26ed750
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
/* * This file was automatically generated by EvoSuite * Sat Jan 18 04:58:13 UTC 2020 */ package org.xwiki.wysiwyg.server.filter; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ConversionFilter_ESTest extends ConversionFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
5f6c54f1bff64af5d8774951508fe4f8da15bc8a
c19cb77e3958a194046d6f84ca97547cc3a223c3
/jce/src/main/java/javax/crypto/spec/SecretKeySpec.java
e60be16054fb0aaa4f4fb84c81c0a1e2597ad2b6
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bcgit/bc-java
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
refs/heads/main
2023-09-04T00:48:33.995258
2023-08-30T05:33:42
2023-08-30T05:33:42
10,416,648
1,984
1,021
MIT
2023-08-26T05:14:28
2013-06-01T02:38:42
Java
UTF-8
Java
false
false
5,725
java
package javax.crypto.spec; import javax.crypto.SecretKey; import java.security.spec.KeySpec; /** * This class specifies a secret key in a provider-independent fashion. * <p> * It can be used to construct a <code>SecretKey</code> from a byte array, * without having to go through a (provider-based) * <code>SecretKeyFactory</code>. * <p> * This class is only useful for raw secret keys that can be represented as * a byte array and have no key parameters associated with them, e.g., DES or * Triple DES keys. * * @see SecretKey * @see javax.crypto.SecretKeyFactory */ public class SecretKeySpec implements KeySpec, SecretKey { private static final long serialVersionUID = 6577238317307289933L; private String algorithm; private byte[] key; /** * Constructs a secret key from the given byte array. * <p> * This constructor does not check if the given bytes indeed specify a * secret key of the specified algorithm. For example, if the algorithm is * DES, this constructor does not check if <code>key</code> is 8 bytes * long, and also does not check for weak or semi-weak keys. * In order for those checks to be performed, an algorithm-specific * <i>key specification</i> class (in this case: * <a href = "DESKeySpec.html"><code>DESKeySpec</code></a>) * should be used. * * @param key the key material of the secret key. * @param algorithm the name of the secret-key algorithm to be associated * See Appendix A in the Java Cryptography Extension API Specification &amp; Reference * for information about standard algorithm names. */ public SecretKeySpec( byte[] key, String algorithm) { if (key == null) { throw new IllegalArgumentException("null key passed"); } if (algorithm == null) { throw new IllegalArgumentException("null algorithm passed"); } this.key = new byte[key.length]; System.arraycopy(key, 0, this.key, 0, key.length); this.algorithm = algorithm; } /** * Constructs a secret key from the given byte array, using the first * <code>len</code> bytes of <code>key</code>, starting at * <code>offset</code> inclusive. * <p> * The bytes that constitute the secret key are those between <code>key[offset]</code> and * <code>key[offset+len-1]</code> inclusive. * <p> * This constructor does not check if the given bytes indeed specify a * secret key of the specified algorithm. For example, if the algorithm is * DES, this constructor does not check if <code>key</code> is 8 bytes * long, and also does not check for weak or semi-weak keys. * In order for those checks to be performed, an algorithm-specific key * specification class (in this case: <a href = "DESKeySpec.html"><code>DESKeySpec</code></a>) * must be used. * * @param key the key material of the secret key. * @param offset the offset in <code>key</code> where the key material starts. * @param len the length of the key material. * @param algorithm the name of the secret-key algorithm to be associated * with the given key material. See Appendix A in the Java Cryptography Extension API * Specification &amp; Reference for information about standard algorithm names. */ public SecretKeySpec( byte[] key, int offset, int len, String algorithm) { if (key == null) { throw new IllegalArgumentException("Null key passed"); } if ((key.length - offset) < len) { throw new IllegalArgumentException("Bad offset/len"); } if (algorithm == null) { throw new IllegalArgumentException("Null algorithm string passed"); } this.key = new byte[len]; System.arraycopy(key, offset, this.key, 0, len); this.algorithm = algorithm; } /** * Returns the name of the algorithm associated with this secret key. * * @return the secret key algorithm. */ public String getAlgorithm() { return algorithm; } /** * Returns the name of the encoding format for this secret key. * * @return the string "RAW". */ public java.lang.String getFormat() { return "RAW"; } /** * Returns the key material of this secret key. * * @return the key material */ public byte[] getEncoded() { byte[] tmp = new byte[key.length]; System.arraycopy(key, 0, tmp, 0, tmp.length); return tmp; } /** * Calculates a hash code value for the object. * Objects that are equal will also have the same hashcode. */ public int hashCode() { int code = algorithm.toUpperCase().hashCode(); for (int i = 0; i != this.key.length; i++) { code ^= this.key[i] << (8 * (i % 4)); } return code; } public boolean equals( Object obj) { if ((obj == null) || !(obj instanceof SecretKeySpec)) { return false; } SecretKeySpec spec = (SecretKeySpec)obj; if (!this.algorithm.equalsIgnoreCase(spec.algorithm)) { return false; } if (this.key.length != spec.key.length) { return false; } for (int i = 0; i != this.key.length; i++) { if (this.key[i] != spec.key[i]) { return false; } } return true; } }
[ "dgh@cryptoworkshop.com" ]
dgh@cryptoworkshop.com
1290449cc88dab9c86e5ee14e618c02921ed49cf
f80fcb5ba1de922083a5a17311b53fc4f9e5a7dd
/src/main/java/org/jboss/cache/notifications/event/NodeRemovedEvent.java
2672e50f72ead22efa168b75b0a72354b88623cb
[]
no_license
SummaNetworks/jbosscache-core
c93d588aebab91f94cf36470c2939799e7b3717c
7d880bbe35274d1a00bd6b06a00d9416005f871e
refs/heads/master
2020-04-05T12:08:14.889656
2019-09-25T15:44:22
2019-09-25T15:44:22
156,860,363
0
1
null
null
null
null
UTF-8
Java
false
false
1,653
java
/* * JBoss, Home of Professional Open Source. * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.cache.notifications.event; import java.util.Map; /** * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeRemoved}. * * @author <a href="mailto:manik AT jboss DOT org">Manik Surtani</a> * @since 2.0.0 */ public interface NodeRemovedEvent extends NodeEvent { /** * @return an unmodifiable {@link Map} of data. When <tt>isPre() == true</tt>, this is the initial state of the {@link org.jboss.cache.Node} * before removal. When called with <tt>isPre() == false</tt>, this is <tt>null</tt>. */ Map getData(); }
[ "blackpent@gmail.com" ]
blackpent@gmail.com
0b6410043f618d18687d53ca1ba4e9faaad1514a
51b299957d2347d7f353481eff1458edfd6f9931
/app/src/main/java/com/lida/cloud/util/ShareUtil.java
062d3e626d63077da4f546d28c1d5b59b9851017
[]
no_license
StormFeng/YunZhongLi
adee3a54f6bd7527c83a6c8a52d2d606c4f40f4f
eea5ad46a676cfa5d89659a9c11abac275b5fa19
refs/heads/master
2021-07-04T00:59:35.272986
2017-09-26T02:13:10
2017-09-26T02:13:10
104,295,721
1
2
null
null
null
null
UTF-8
Java
false
false
753
java
package com.lida.cloud.util; import com.umeng.socialize.PlatformConfig; /** * Created by Administrator on 2016/11/3 0003. */ public class ShareUtil { public static String weiboAppId = "3028578287"; public static String weiboAppSecret = "8cad7ad744230a52024ea69aacc9544b"; public static String qqAppId = "1106101833"; public static String qqAppKEY = "ybr8p8FcpdMg3O5F"; public static String weixinAppId = "wx624ae4772b304702"; public static String weixinAppSecret = "d70e1d72a3d7af2321205d899ac54782"; public static void init(){ PlatformConfig.setWeixin(weixinAppId, weixinAppSecret); PlatformConfig.setSinaWeibo(weiboAppId, weiboAppSecret); PlatformConfig.setQQZone(qqAppId,qqAppKEY); } }
[ "1170017470@qq.com" ]
1170017470@qq.com
a058f2b858390d34401708936096c935d6e5b1d3
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/jinxiaocun/jxc-emsclient/src/main/java/jxc/emsclient/ems/command/stockIn/CreateStockInCommand.java
3ef80218f027e2914ab9738418e2cf555c4a2cf5
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,207
java
package jxc.emsclient.ems.command.stockIn; import java.io.Serializable; import java.util.List; import jxc.emsclient.ems.dto.stockIn.StockInProductDTO; public class CreateStockInCommand implements Serializable{ /** * */ private static final long serialVersionUID = 1L; /** * 仓库机构编码(EMS提供) */ private String warehouse_code; /** * 货主编码(EMS提供) */ private String owner_code; /** * 入库单号 */ private String asn_id; /** * 入库单类型编码(自定义,定义后告知EMS) */ private String order_type_code; /** * 入库单类型名称 */ private String order_type_name; /** * 总件数 */ private Long count; /** * 该入库单对应商品种数 */ private Long sku_count; /** * 备注 */ private String remark; /** * 入库单中商品列表 */ private List<StockInProductDTO> stockInProductList; //不用的字段 /** * 销售订单号,客户退货入库时使用,记录退货相关的源订单号 */ private String sale_order_id; /** * 发货方编码,适用于公司客户、调出仓库编码、供应商编码 */ private String sender_code; /** * 发货方名称 */ private String sender_name; /** * 发货方联系人 */ private String sender_contact; /** * 发货方联系电话 */ private String sender_phone; /** * 物流公司编码 */ private String LogisticProviderId; /** * 运输公司运单号 */ private String tms_order_code; /** * 运输公司名称 */ private String LogisticProviderName; /** * 发货时间(格式:yyyy-MM-dd HH:mm:ss) */ private String send_Time; /** * 预计到达的时间(格式:yyyy-MM-dd HH:mm:ss) */ private String pre_arrive_time; public String getWarehouse_code() { return warehouse_code; } public void setWarehouse_code(String warehouse_code) { this.warehouse_code = warehouse_code; } public String getOwner_code() { return owner_code; } public void setOwner_code(String owner_code) { this.owner_code = owner_code; } public String getAsn_id() { return asn_id; } public void setAsn_id(String asn_id) { this.asn_id = asn_id; } public String getOrder_type_code() { return order_type_code; } public void setOrder_type_code(String order_type_code) { this.order_type_code = order_type_code; } public String getOrder_type_name() { return order_type_name; } public void setOrder_type_name(String order_type_name) { this.order_type_name = order_type_name; } public Long getCount() { return count; } public void setCount(Long count) { this.count = count; } public Long getSku_count() { return sku_count; } public void setSku_count(Long sku_count) { this.sku_count = sku_count; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public List<StockInProductDTO> getStockInProductList() { return stockInProductList; } public void setStockInProductList(List<StockInProductDTO> stockInProductList) { this.stockInProductList = stockInProductList; } public static long getSerialversionuid() { return serialVersionUID; } public String getSale_order_id() { return sale_order_id; } public void setSale_order_id(String sale_order_id) { this.sale_order_id = sale_order_id; } public String getSender_code() { return sender_code; } public void setSender_code(String sender_code) { this.sender_code = sender_code; } public String getSender_name() { return sender_name; } public void setSender_name(String sender_name) { this.sender_name = sender_name; } public String getSender_contact() { return sender_contact; } public void setSender_contact(String sender_contact) { this.sender_contact = sender_contact; } public String getSender_phone() { return sender_phone; } public void setSender_phone(String sender_phone) { this.sender_phone = sender_phone; } public String getLogisticProviderId() { return LogisticProviderId; } public void setLogisticProviderId(String logisticProviderId) { LogisticProviderId = logisticProviderId; } public String getTms_order_code() { return tms_order_code; } public void setTms_order_code(String tms_order_code) { this.tms_order_code = tms_order_code; } public String getLogisticProviderName() { return LogisticProviderName; } public void setLogisticProviderName(String logisticProviderName) { LogisticProviderName = logisticProviderName; } public String getSend_Time() { return send_Time; } public void setSend_Time(String send_Time) { this.send_Time = send_Time; } public String getPre_arrive_time() { return pre_arrive_time; } public void setPre_arrive_time(String pre_arrive_time) { this.pre_arrive_time = pre_arrive_time; } }
[ "cangsong6908@gmail.com" ]
cangsong6908@gmail.com
51641822a984d884e7a451ab925f3eb5d2583121
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/55_lavalamp-net.sf.lavalamp.site.BuildChecker-1.0-8/net/sf/lavalamp/site/BuildChecker_ESTest.java
84b99785895d2c45ea2e2d81cbe4be955f18a7ce
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
/* * This file was automatically generated by EvoSuite * Fri Oct 25 23:37:06 GMT 2019 */ package net.sf.lavalamp.site; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class BuildChecker_ESTest extends BuildChecker_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
6beb54269dbdb00366110d8f2eae5064ba071c40
aabd1a360f11276059bc7bde7435bfa89ba15f34
/manage_web/src/main/java/com/jhcz/base/jdbc/session/SessionFactory.java
a7441fb9f88f9850f9fdb9ac2f772255b58abb4f
[]
no_license
yizhishang/jhcztech
ff941d8f8062f73b8add1601ac95d3bae51689a3
a3cb8fd95f835b81909f6994380acfacf38cff44
refs/heads/master
2023-04-07T10:36:41.389527
2023-03-18T16:53:11
2023-03-18T16:53:11
54,635,934
0
1
null
2023-03-18T16:53:12
2016-03-24T11:09:21
Java
UTF-8
Java
false
false
945
java
package com.jhcz.base.jdbc.session; import java.sql.Connection; import com.jhcz.base.jdbc.connection.ConnManager; import com.jhcz.base.jdbc.session.Impl.SessionImpl; /** * 描述: * 版权: Copyright (c) 2015 * 公司: 285206405@qq.com * 作者: 袁永君 * 版本: 1.0 * 创建日期: 2015-12-5 * 创建时间: 16:24:45 */ public final class SessionFactory { /** * 根据datasource.xml文件中配置数据源ID,得到对应的会话对象 * @param id 数据源ID * @return */ public static Session getSession(String id) { Connection conn = ConnManager.getConnection(id); return new SessionImpl(conn); } /** * 获得缺省的数据源会话对象 * @return */ public static Session getSession() { Connection conn = ConnManager.getConnection(); return new SessionImpl(conn); } }
[ "285206405@qq.com" ]
285206405@qq.com
3407c05410e3eab31d3b50d41e6e925885f090bf
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-61b-1-3-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/MathRuntimeException_ESTest_scaffolding.java
dd9984c68534760d6b067112b4f80f6c6f7e01e7
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 08:40:25 UTC 2020 */ package org.apache.commons.math; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class MathRuntimeException_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e9aafe57fc59a6db07c2551d3cf6c21290ba7321
aafe93e7540066975198c0e35211494b1282349e
/src/test/java/ezvcard/io/scribe/EmailScribeTest.java
60597d8d54c39b8105718652e6157356e511c832
[ "BSD-2-Clause-Views" ]
permissive
firebird76/ez-vcard
cac81ae11797023b125b4c96ac25fc88730f1fe6
343082879dba3c8090f64d879e69749fa2ec70de
refs/heads/master
2022-10-08T15:35:34.813768
2020-10-30T17:23:32
2020-10-30T17:23:32
206,840,609
0
0
NOASSERTION
2022-10-05T05:05:03
2019-09-06T17:12:06
Java
UTF-8
Java
false
false
3,737
java
package ezvcard.io.scribe; import static ezvcard.VCardVersion.V2_1; import static ezvcard.VCardVersion.V3_0; import static ezvcard.VCardVersion.V4_0; import org.junit.Test; import ezvcard.VCard; import ezvcard.parameter.EmailType; import ezvcard.property.Email; /* Copyright (c) 2012-2020, Michael Angstadt All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project. */ /** * @author Michael Angstadt */ public class EmailScribeTest { private final EmailScribe scribe = new EmailScribe(); private final Sensei<Email> sensei = new Sensei<Email>(scribe); @Test public void prepareParameters_type_pref() { Email property = new Email("johndoe@example.com"); property.getTypes().add(EmailType.PREF); sensei.assertPrepareParams(property).versions(V2_1, V3_0).expected("TYPE", "pref").run(); sensei.assertPrepareParams(property).versions(V4_0).expected("PREF", "1").run(); } @Test public void prepareParameters_pref_parameter() { Email property = new Email("johndoe@example.com"); property.setPref(1); VCard vcard = new VCard(); vcard.addEmail(property); sensei.assertPrepareParams(property).versions(V2_1, V3_0).vcard(vcard).expected("TYPE", "pref").run(); sensei.assertPrepareParams(property).versions(V4_0).vcard(vcard).expected("PREF", "1").run(); } @Test public void parseText() { Email expected = new Email("johndoe@example.com"); sensei.assertParseText("johndoe@example.com").run(expected); } @Test public void parseHtml() { Email expected = new Email("johndoe@example.com"); //@formatter:off sensei.assertParseHtml( "<a href=\"mailto:johndoe@example.com\">Email Me</a>" ).run(expected); sensei.assertParseHtml( "<a href=\"MAILTO:johndoe@example.com\">Email Me</a>" ).run(expected); sensei.assertParseHtml( "<a href=\"http://www.example.com\">johndoe@example.com</a>" ).run(expected); sensei.assertParseHtml( "<div>johndoe@example.com</div>" ).run(expected); //@formatter:on } @Test public void parseHtml_types() { Email expected = new Email("johndoe@example.com"); expected.getTypes().add(EmailType.HOME); //@formatter:off sensei.assertParseHtml( "<a href=\"mailto:johndoe@example.com\">" + "<span class=\"type\">Home</span> Email" + "</a>" ).run(expected); //@formatter:on } }
[ "mike.angstadt@gmail.com" ]
mike.angstadt@gmail.com
846ebb06d017afb81025e47fefb2d993ca140cbd
dfb3f631ed8c18bd4605739f1ecb6e47d715a236
/disconnect-classlib/src/main/java/js/web/dom/HTMLDataElement.java
e2fb1d0ebd8ca19c1b140a48d27d67e2450ccb10
[ "Apache-2.0" ]
permissive
fluorumlabs/disconnect-project
ceb788b901d1bf7cfc5ee676592f55f8a584a34e
54f4ea5e6f05265ea985e1ee615cc3d59d5842b4
refs/heads/master
2022-12-26T11:26:46.539891
2020-08-20T16:37:19
2020-08-20T16:37:19
203,577,241
6
1
Apache-2.0
2022-12-16T00:41:56
2019-08-21T12:14:42
Java
UTF-8
Java
false
false
761
java
package js.web.dom; import org.teavm.jso.JSBody; import org.teavm.jso.JSProperty; /** * Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating &lt;data&gt; elements. */ public interface HTMLDataElement extends HTMLElement { @JSBody(script = "return HTMLDataElement.prototype") static HTMLDataElement prototype() { throw new UnsupportedOperationException("Available only in JavaScript"); } @JSBody(script = "return new HTMLDataElement()") static HTMLDataElement create() { throw new UnsupportedOperationException("Available only in JavaScript"); } @JSProperty String getValue(); @JSProperty void setValue(String value); }
[ "fluorumlabs@users.noreply.github.com" ]
fluorumlabs@users.noreply.github.com
c408afe6e82d9b160aec1f8ee8d4561d2bb78327
59ca721ca1b2904fbdee2350cd002e1e5f17bd54
/aliyun-java-sdk-nas/src/main/java/com/aliyuncs/nas/transform/v20170626/DescribeTieringPoliciesResponseUnmarshaller.java
9dc7a360baa0be521e43645c407bf1e5435a5433
[ "Apache-2.0" ]
permissive
longtx/aliyun-openapi-java-sdk
8fadfd08fbcf00c4c5c1d9067cfad20a14e42c9c
7a9ab9eb99566b9e335465a3358553869563e161
refs/heads/master
2020-04-26T02:00:35.360905
2019-02-28T13:47:08
2019-02-28T13:47:08
173,221,745
2
0
NOASSERTION
2019-03-01T02:33:35
2019-03-01T02:33:35
null
UTF-8
Java
false
false
3,045
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.nas.transform.v20170626; import java.util.ArrayList; import java.util.List; import com.aliyuncs.nas.model.v20170626.DescribeTieringPoliciesResponse; import com.aliyuncs.nas.model.v20170626.DescribeTieringPoliciesResponse.TieringPolicy; import java.util.Map; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeTieringPoliciesResponseUnmarshaller { public static DescribeTieringPoliciesResponse unmarshall(DescribeTieringPoliciesResponse describeTieringPoliciesResponse, UnmarshallerContext context) { describeTieringPoliciesResponse.setRequestId(context.stringValue("DescribeTieringPoliciesResponse.RequestId")); describeTieringPoliciesResponse.setTotalCount(context.integerValue("DescribeTieringPoliciesResponse.TotalCount")); describeTieringPoliciesResponse.setPageSize(context.integerValue("DescribeTieringPoliciesResponse.PageSize")); describeTieringPoliciesResponse.setPageNumber(context.integerValue("DescribeTieringPoliciesResponse.PageNumber")); List<TieringPolicy> tieringPolicies = new ArrayList<TieringPolicy>(); for (int i = 0; i < context.lengthValue("DescribeTieringPoliciesResponse.TieringPolicies.Length"); i++) { TieringPolicy tieringPolicy = new TieringPolicy(); tieringPolicy.setName(context.stringValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].Name")); tieringPolicy.setDescription(context.stringValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].Description")); tieringPolicy.setRefCount(context.integerValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].RefCount")); tieringPolicy.setMtime(context.longValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].Mtime")); tieringPolicy.setAtime(context.longValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].Atime")); tieringPolicy.setCtime(context.longValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].Ctime")); tieringPolicy.setSize(context.longValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].Size")); tieringPolicy.setFileName(context.stringValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].FileName")); tieringPolicy.setRecallTime(context.longValue("DescribeTieringPoliciesResponse.TieringPolicies["+ i +"].RecallTime")); tieringPolicies.add(tieringPolicy); } describeTieringPoliciesResponse.setTieringPolicies(tieringPolicies); return describeTieringPoliciesResponse; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
d6b74a80b768445fc4bb613659a7a8dcb7a61186
e9664119586e3218921a5d3062037635c28f6534
/MPP/20170920_21_lesson9/lesson9/lecture/optional/PickAnElement.java
c2e87fe3dda6507f3252c790f9ff1c42d9302a4a
[]
no_license
yangquan1982/MSCS
5818ff1d2b5ea2159ecf74f29f800dfac389846f
a90c86b64223587bb8dde92ba325423b934d459b
refs/heads/master
2021-08-14T13:30:49.810867
2017-11-15T20:34:15
2017-11-15T20:34:15
109,010,825
1
0
null
null
null
null
UTF-8
Java
false
false
1,055
java
/*** * Excerpted from "Functional Programming in Java", * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is fit for any purpose. * Visit http://www.pragmaticprogrammer.com/titles/vsjava8 for more book information. ***/ package lesson9.lecture.optional; import java.util.List; public class PickAnElement { //OLD WAY public static void pickName(final List<String> names, final String startingLetter) { String foundName = null; for (String name : names) { if (name.startsWith(startingLetter)) { foundName = name; break; } } System.out.print(String.format("A name starting with %s: ", startingLetter)); if (foundName != null) { System.out.println(foundName); } else { System.out.println("No name found"); } } public static void main(final String[] args) { pickName(Folks.friends, "N"); pickName(Folks.friends, "Z"); } }
[ "tbg127@gmail.com" ]
tbg127@gmail.com
dc90e8aafb7775c217574518e7b2d69cbb0fba3a
bb9140f335d6dc44be5b7b848c4fe808b9189ba4
/Extra-DS/Corpus/class/aspectj/168.java
f451156662303c9a2c5f39bdc162cf9488c173f4
[]
no_license
masud-technope/EMSE-2019-Replication-Package
4fc04b7cf1068093f1ccf064f9547634e6357893
202188873a350be51c4cdf3f43511caaeb778b1e
refs/heads/master
2023-01-12T21:32:46.279915
2022-12-30T03:22:15
2022-12-30T03:22:15
186,221,579
5
3
null
null
null
null
UTF-8
Java
false
false
576
java
import java.util.ArrayList; import java.util.Iterator; import java.util.Properties; public class LTWHelloWorld extends ArrayList { private String message = "Hello World!"; public void println() { System.out.println(message); } public static void main(String[] args) { LTWHelloWorld hw = new LTWHelloWorld(); hw.println(); for (int i = 0; i < args.length; i++) { String jp = args[i]; if (!hw.contains(jp)) { throw new RuntimeException(jp + " missing"); } } } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
5e586de915651792144442801bba1b9d92003bfc
064875f6746ff611f142c44c2e19deadbcb94b36
/platform/src/main/java/net/firejack/platform/core/config/meta/diff/FoldersDiff.java
d4e5211ad28e6c6ab3d0cade3bb79df26bc71b02
[ "Apache-2.0" ]
permissive
alim-firejack/Firejack-Platform
d7faeb35091c042923e698d598d0118f3f4b0c11
bc1f58d425d91425cfcd6ab4fb6b1eed3fe0b815
refs/heads/master
2021-01-15T09:23:05.489281
2014-02-27T17:39:25
2014-02-27T17:39:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,345
java
/* * Firejack Open Flame - Copyright (c) 2011 Firejack Technologies * * This source code is the product of the Firejack Technologies * Core Technologies Team (Benjamin A. Miller, Oleg Marshalenko, and Timur * Asanov) and licensed only under valid, executed license agreements * between Firejack Technologies and its customers. Modification and / or * re-distribution of this source code is allowed only within the terms * of an executed license agreement. * * Any modification of this code voids any and all warranties and indemnifications * for the component in question and may interfere with upgrade path. Firejack Technologies * encourages you to extend the core framework and / or request modifications. You may * also submit and assign contributions to Firejack Technologies for consideration * as improvements or inclusions to the platform to restore modification * warranties and indemnifications upon official re-distributed in patch or release form. */ package net.firejack.platform.core.config.meta.diff; import net.firejack.platform.core.config.meta.IPackageDescriptorElement; import net.firejack.platform.core.config.meta.element.FolderElement; public class FoldersDiff extends PackageDescriptorElementDiff <IPackageDescriptorElement, FolderElement> { /** * @param added * @param element */ public FoldersDiff(Boolean added, FolderElement element) { super(added, element); } /** * @param oldElement * @param newElement */ public FoldersDiff(FolderElement oldElement, FolderElement newElement) { super(oldElement, newElement); } @Override public String toString() { StringBuilder result = new StringBuilder(type.name()); result.append(" : "); if (type == DifferenceType.UPDATED) { result.append(this.getDiffTarget().getPath()) .append('.').append(this.getDiffTarget().getName()) .append(" -> ").append(getNewElement().getPath()) .append('.').append(getNewElement().getName()); } else { result.append(getDiffTarget().getPath()) .append('.').append(getDiffTarget().getName()); } return result.toString(); } }
[ "CF8DCmPgvS" ]
CF8DCmPgvS
98d56faa0f7b690b650562bd348aeb3ba53b0645
cbdb7891230c83b61be509bc0c8cd02ff5f420d8
/jczh/jczh_bean/src/main/java/com/kaiwait/bean/jczh/entity/Job.java
a6136e4dc11d62540cfa3f5b168d1f91556cc0c8
[]
no_license
zhanglixye/jcyclic
87e26d1412131e441279240b4468993cb9b08bc3
8a311f8b1e6a81fb40f093d725b5182763d6624e
refs/heads/master
2023-01-04T11:23:22.001517
2020-11-02T05:20:08
2020-11-02T05:20:08
309,265,334
0
0
null
null
null
null
UTF-8
Java
false
false
5,283
java
package com.kaiwait.bean.jczh.entity; import java.util.List; public class Job { private String jobNo=""; //JOB对象 private JobLand jobObject; //卖上对象 private SaleType saleObject; //外发对象 private Cost costObject; //支付对象 private Pay payObject; //立替对象 private Lendtrn lendObject; //振替对象 private Trantrn tranObject; //JobLable private List<JobLableTrn> jobLableList; //担当者 private List<JobUserLable> jobUserList; //外发list private List<Cost> costList; //外发LableList private List<JobLableTrn> costLableList; //支付LableList private List<JobLableTrn> payLableList; //立替LableList private List<JobLableTrn> lendLableList; //振替LableList private List<JobLableTrn> tranLableList; //支付凭证 private List<Prooftrn> payProoList; //立替凭证 private List<Prooftrn> lendProoList; private List<JobUserLable> jobUserLable; private List<Cost> foreign; //JOB对象 private JobInfo jobInfo; //卖上对象 private SaleInfo saleInfo; private Skip skip; private String orderType; private Double purposrAmt; private String orderNo; private Double rate2; private Double rate3; private int isThisMonth; private String userIDByMonth; public String getUserIDByMonth() { return userIDByMonth; } public void setUserIDByMonth(String userIDByMonth) { this.userIDByMonth = userIDByMonth; } public int getIsThisMonth() { return isThisMonth; } public void setIsThisMonth(int isThisMonth) { this.isThisMonth = isThisMonth; } public Double getRate2() { return rate2; } public void setRate2(Double rate2) { this.rate2 = rate2; } public Double getRate3() { return rate3; } public void setRate3(Double rate3) { this.rate3 = rate3; } public List<Cost> getForeign() { return foreign; } public void setForeign(List<Cost> foreign) { this.foreign = foreign; } public String getOrderNo() { return orderNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public String getOrderType() { return orderType; } public void setOrderType(String orderType) { this.orderType = orderType; } public Double getPurposrAmt() { return purposrAmt; } public void setPurposrAmt(Double purposrAmt) { this.purposrAmt = purposrAmt; } public Skip getSkip() { return skip; } public void setSkip(Skip skip) { this.skip = skip; } public List<JobUserLable> getJobUserLable() { return jobUserLable; } public void setJobUserLable(List<JobUserLable> jobUserLable) { this.jobUserLable = jobUserLable; } public String getJobNo() { return jobNo; } public void setJobNo(String jobNo) { this.jobNo = jobNo; } public JobInfo getJobInfo() { return jobInfo; } public void setJobInfo(JobInfo jobInfo) { this.jobInfo = jobInfo; } public SaleInfo getSaleInfo() { return saleInfo; } public void setSaleInfo(SaleInfo saleInfo) { this.saleInfo = saleInfo; } public JobLand getJobObject() { return jobObject; } public void setJobObject(JobLand jobObject) { this.jobObject = jobObject; } public SaleType getSaleObject() { return saleObject; } public void setSaleObject(SaleType saleObject) { this.saleObject = saleObject; } public Cost getCostObject() { return costObject; } public void setCostObject(Cost costObject) { this.costObject = costObject; } public Pay getPayObject() { return payObject; } public void setPayObject(Pay payObject) { this.payObject = payObject; } public Lendtrn getLendObject() { return lendObject; } public void setLendObject(Lendtrn lendObject) { this.lendObject = lendObject; } public Trantrn getTranObject() { return tranObject; } public void setTranObject(Trantrn tranObject) { this.tranObject = tranObject; } public List<JobLableTrn> getJobLableList() { return jobLableList; } public void setJobLableList(List<JobLableTrn> jobLableList) { this.jobLableList = jobLableList; } public List<JobUserLable> getJobUserList() { return jobUserList; } public void setJobUserList(List<JobUserLable> jobUserList) { this.jobUserList = jobUserList; } public List<Cost> getCostList() { return costList; } public void setCostList(List<Cost> costList) { this.costList = costList; } public List<JobLableTrn> getCostLableList() { return costLableList; } public void setCostLableList(List<JobLableTrn> costLableList) { this.costLableList = costLableList; } public List<JobLableTrn> getPayLableList() { return payLableList; } public void setPayLableList(List<JobLableTrn> payLableList) { this.payLableList = payLableList; } public List<JobLableTrn> getLendLableList() { return lendLableList; } public void setLendLableList(List<JobLableTrn> lendLableList) { this.lendLableList = lendLableList; } public List<JobLableTrn> getTranLableList() { return tranLableList; } public void setTranLableList(List<JobLableTrn> tranLableList) { this.tranLableList = tranLableList; } public List<Prooftrn> getPayProoList() { return payProoList; } public void setPayProoList(List<Prooftrn> payProoList) { this.payProoList = payProoList; } public List<Prooftrn> getLendProoList() { return lendProoList; } public void setLendProoList(List<Prooftrn> lendProoList) { this.lendProoList = lendProoList; } }
[ "1364969970@qq.com" ]
1364969970@qq.com
a854eafd37d89953382442ba9f704ff48a42e5fd
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/28/org/apache/commons/lang3/builder/EqualsBuilder_append_590.java
24a066d4d8335f8b2d858e0a31852af10f1dbcf0
[]
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,402
java
org apach common lang3 builder assist implement link object equal object method method build good equal method rule laid href http java sun doc book effect index html effect java joshua bloch rule compar code doubl code code float code arrai tricki make code equal code code hash code hashcod code consist difficult object compar equal gener hash code object hash code equal relev field includ calcul equal deriv field field gener hash code equal method vice versa typic code pre equal object obj obj obj obj class getclass class getclass class myclass rh class myclass obj equal builder equalsbuild append super appendsup equal obj append field1 rh field1 append field2 rh field2 append field3 rh field3 equal isequ pre altern method reflect determin field test field method code reflect equal reflectionequ code code access object accessibleobject set access setaccess code chang visibl field fail secur manag permiss set correctli slower test explicitli typic invoc method pre equal object obj equal builder equalsbuild reflect equal reflectionequ obj pre author apach softwar foundat author href mailto steve downei netfolio steve downei author gari gregori author pete gieser author arun mammen thoma author oliv sauder version equal builder equalsbuild builder boolean test code code equal param lh left hand code code param rh hand code code equal builder equalsbuild chain call equal builder equalsbuild append lh rh equal isequ equal isequ lh rh
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
77d461ed49ca25cd4a143412c83fd2eb96081d58
e774de0a5e1a542f1edd33280315a17c973bd047
/kitty-mq/kitty-mq-rocketmq-aliyun/src/main/java/com/cxytiandi/kitty/rocketmq/properties/RocketMqProperties.java
288f928e3222cae748f1fe9bd1fc2c291e37144c
[]
no_license
yaoqi/kitty
bb46c2b2bd94e9c3cc491abcf3749320fa69bf16
b30f8012675233011ffc676a997af32e32fd0d7b
refs/heads/master
2022-12-31T08:30:49.508385
2020-10-27T04:59:44
2020-10-27T04:59:44
302,558,856
0
1
null
2020-10-27T04:59:45
2020-10-09T06:56:29
Java
UTF-8
Java
false
false
1,662
java
package com.cxytiandi.kitty.rocketmq.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; /** * RocketMQ 配置 * * @作者 尹吉欢 * @个人微信 jihuan900 * @微信公众号 猿天地 * @GitHub https://github.com/yinjihuan * @作者介绍 http://cxytiandi.com/about * @时间 2020-06-07 15:50 */ @Data @ConfigurationProperties(prefix = "kitty.rocketmq.aliyun") public class RocketMqProperties { private String accessKey; private String secretKey; private String nameServiceAddress; /** * 分组ID */ private String groupId; private String instanceId; private String regionId; /** * 集群订阅方式: CLUSTERING 广播订阅方式: BROADCASTING */ private String messageModel = "CLUSTERING"; /** * 设置 Consumer 实例的消费线程数,默认值:20。 */ private Integer consumeThreadNums = 20; /** * 设置消息消费失败的最大重试次数,默认值:16。 */ private Integer maxReconsumeTimes = 16; /** * 设置每条消息消费的最大超时时间,超过设置时间则被视为消费失败,等下次重新投递再次消费。每个业务需要设置一个合理的值,默认值:15,单位:分钟 。 */ private Integer consumeTimeout = 15; /** * 只适用于顺序消息,设置消息消费失败的重试间隔时间。 */ private Long suspendTimeMillis; /** * 客户端本地的最大缓存消息数据,默认值:1000,单位:条。 */ private Integer maxCachedMessageAmount = 1000; }
[ "jihuan.yin@ipiaoniu.com" ]
jihuan.yin@ipiaoniu.com
bc6737215732b0578def9440d422cbd4a7cacc95
58046a11761071763ea6ca9b6dc249240afd68fe
/ev/endrov/typeCoordinateSystem/PLUGIN.java
e362a8370277785784348a25834d0bbd99b589c6
[]
no_license
dorry123/Endrov
71be9c63ef30b5e36284745cc6baee1017901ee0
c60571941bc14e4341fdb1351a48a55aca35b6a7
refs/heads/master
2021-01-21T02:46:46.357482
2013-10-16T09:17:53
2013-10-16T09:17:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
/*** * Copyright (C) 2010 Johan Henriksson * This code is under the Endrov / BSD license. See www.endrov.net * for the full text and how to cite. */ package endrov.typeCoordinateSystem; import endrov.core.EvPluginDefinition; public class PLUGIN extends EvPluginDefinition { public String getPluginName() { return "Coordinate system"; } public String getAuthor() { return "Johan Henriksson"; } public boolean systemSupported() { return true; } public String cite() { return ""; } public String[] requires() { return new String[]{}; } public Class<?>[] getInitClasses() { return new Class[]{CoordinateSystem.class}; } public boolean isDefaultEnabled(){return true;}; }
[ "mahogny@areta.org" ]
mahogny@areta.org
d1c1381abd9190f90c6119570f4b4c54e08bdf19
d70b377e840a64a7ceb99ad3bdafe9bfde406aa6
/arms/src/main/java/com/jess/arms/http/OkHttpStreamFetcher.java
8540ed2c817e68c904ded08d5a9d3ca05976570b
[ "Apache-2.0" ]
permissive
xiaobailong24/MVPArms
4391c64cd8da2a08138e4d03739ecc8faf32bb9c
15ad4b5229aceb8232e34b9cf2d437ba88729b3f
refs/heads/master
2021-01-19T14:59:12.805665
2017-09-16T10:55:26
2017-09-16T10:55:26
86,650,895
7
0
null
null
null
null
UTF-8
Java
false
false
3,721
java
/** * Copyright 2017 JessYan * * 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.jess.arms.http; import android.util.Log; import com.bumptech.glide.Priority; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.HttpException; import com.bumptech.glide.load.data.DataFetcher; import com.bumptech.glide.load.model.GlideUrl; import com.bumptech.glide.util.ContentLengthInputStream; import com.bumptech.glide.util.Synthetic; import java.io.IOException; import java.io.InputStream; import java.util.Map; import okhttp3.Call; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; /** * Fetches an {@link InputStream} using the okhttp library. */ public class OkHttpStreamFetcher implements DataFetcher<InputStream> { private static final String TAG = "OkHttpFetcher"; private final Call.Factory client; private final GlideUrl url; @Synthetic InputStream stream; @Synthetic ResponseBody responseBody; private volatile Call call; public OkHttpStreamFetcher(Call.Factory client, GlideUrl url) { this.client = client; this.url = url; } @Override public void loadData(Priority priority, final DataCallback<? super InputStream> callback) { Request.Builder requestBuilder = new Request.Builder().url(url.toStringUrl()); for (Map.Entry<String, String> headerEntry : url.getHeaders().entrySet()) { String key = headerEntry.getKey(); requestBuilder.addHeader(key, headerEntry.getValue()); } Request request = requestBuilder.build(); call = client.newCall(request); call.enqueue(new okhttp3.Callback() { @Override public void onFailure(Call call, IOException e) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "OkHttp failed to obtain result", e); } callback.onLoadFailed(e); } @Override public void onResponse(Call call, Response response) throws IOException { responseBody = response.body(); if (response.isSuccessful()) { long contentLength = responseBody.contentLength(); stream = ContentLengthInputStream.obtain(responseBody.byteStream(), contentLength); callback.onDataReady(stream); } else { callback.onLoadFailed(new HttpException(response.message(), response.code())); } } }); } @Override public void cleanup() { try { if (stream != null) { stream.close(); } } catch (IOException e) { // Ignored } if (responseBody != null) { responseBody.close(); } } @Override public void cancel() { Call local = call; if (local != null) { local.cancel(); } } @Override public Class<InputStream> getDataClass() { return InputStream.class; } @Override public DataSource getDataSource() { return DataSource.REMOTE; } }
[ "jessyan@foxmail.com" ]
jessyan@foxmail.com
96cf0dfd440a45157c53a9af03222070f3703948
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/8/org/joda/time/format/DateTimeFormatterBuilder_appendDayOfYear_784.java
0936e8d608817482bfac1d30936b5f03b72cdce9
[]
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
4,181
java
org joda time format factori creat complex instanc date time formatt datetimeformatt method call datetim format perform link date time formatt datetimeformatt class provid factori method creat formatt link date time format datetimeformat link iso date time format isodatetimeformat date time formatt builder datetimeformatterbuild construct formatt print pars formatt built append specif field formatt instanc builder formatt print month year januari construct pre date time formatt datetimeformatt month year monthandyear date time formatt builder datetimeformatterbuild append month year text appendmonthofyeartext append liter appendliter append year appendyear formatt toformatt pre date time formatt builder datetimeformatterbuild mutabl thread safe formatt build thread safe immut author brian neill o'neil author stephen colebourn author fredrik borgh date time format datetimeformat iso date time format isodatetimeformat date time formatt builder datetimeformatterbuild instruct printer emit numer dai year dayofyear field param min digit mindigit minimum number digit print date time formatt builder datetimeformatterbuild chain date time formatt builder datetimeformatterbuild append dai year appenddayofyear min digit mindigit append decim appenddecim date time field type datetimefieldtyp dai year dayofyear min digit mindigit
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
dd93123779c3bcf0820b8234e64885cfb8f4306a
4cd934d823612a89c1340f0bfc1ae31a964a5204
/bedrock150/src/main/java/soupply/bedrock150/type/LoginBody.java
7953d896f1ca85f97556c16164845452419d5e6b
[ "MIT" ]
permissive
DaMatrix/java
307d9b426efd1086efc4466e7bd9528b103e68a3
e94bcca06efe16eaab8d1cfb4e349df9715da4cf
refs/heads/master
2020-03-21T05:21:32.137602
2018-06-18T14:50:44
2018-06-18T14:50:44
138,156,892
1
0
null
2018-06-21T10:40:33
2018-06-21T10:40:32
null
UTF-8
Java
false
false
1,375
java
package soupply.bedrock150.type; import java.util.*; import soupply.util.*; public class LoginBody extends Type { public byte[] chain; public byte[] clientData; public LoginBody() { } public LoginBody(byte[] chain, byte[] clientData) { this.chain = chain; this.clientData = clientData; } @Override public void encodeBody(Buffer _buffer) { Buffer _nbuffer = new Buffer(); this.encodeBodyImpl(_nbuffer); _buffer.writeVaruint(_nbuffer._buffer.length); _buffer.writeBytes(_nbuffer.toByteArray()); } private void encodeBodyImpl(Buffer _buffer) { _buffer.writeLittleEndianInt((int)chain.length); _buffer.writeBytes(chain); _buffer.writeLittleEndianInt((int)clientData.length); _buffer.writeBytes(clientData); } @Override public void decodeBody(Buffer _buffer) throws BufferOverflowException { final int _length = _buffer.readVaruint(); this.decodeBodyImpl(new Buffer(_buffer.readBytes(_length))); } private void decodeBodyImpl(Buffer _buffer) throws BufferOverflowException { final int bnyl = _buffer.readLittleEndianInt(); chain = _buffer.readBytes(bnyl); final int bnavdrde = _buffer.readLittleEndianInt(); clientData = _buffer.readBytes(bnavdrde); } }
[ "selutils@mail.com" ]
selutils@mail.com
ced1d79b117220523556758af0c78c20d3f1f59a
08119e2e591290a880e01731894eaf07ba0d9336
/src/_05_ObjectsClassesAndCollections_Exercises/_12_AMinerTask.java
736b12eb3dfd67b8424760b0e7a92f48e29e9c71
[]
no_license
nataliya-stoichevska/JavaFundamentals_AdvancedJava
a77d48135da7bfc95d909c97af64b05171929fa1
c7b7cd2a137716870bc321ba575abb597712d908
refs/heads/master
2022-01-20T20:31:37.253646
2018-09-04T08:26:14
2018-09-04T08:26:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
package _05_ObjectsClassesAndCollections_Exercises; import java.util.LinkedHashMap; import java.util.Map; import java.util.Scanner; public class _12_AMinerTask { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Map<String, Long> productsQuantities = new LinkedHashMap<>(); String line = scanner.nextLine(); while(!"stop".equals(line)){ String name = line; long quantity = Long.parseLong(scanner.nextLine()); if(!productsQuantities.containsKey(name)){ productsQuantities.put(name, 0L); } productsQuantities.put(name, productsQuantities.get(name) + quantity); line = scanner.nextLine(); } for (Map.Entry<String, Long> productQuantity : productsQuantities.entrySet()) { System.out.println(productQuantity.getKey() + " -> " + productQuantity.getValue()); } } }
[ "stojcevskanatalija8@gmail.com" ]
stojcevskanatalija8@gmail.com
88456aa10ca798c71e6f69b9dd0c01ba52ac4455
df48dc6e07cdf202518b41924444635f30d60893
/jinx-com4j/src/main/java/com/exceljava/com4j/excel/XlHtmlType.java
82010a36be709b8f9736217dd82fa87801180017
[ "MIT" ]
permissive
ashwanikaggarwal/jinx-com4j
efc38cc2dc576eec214dc847cd97d52234ec96b3
41a3eaf71c073f1282c2ab57a1c91986ed92e140
refs/heads/master
2022-03-29T12:04:48.926303
2020-01-10T14:11:17
2020-01-10T14:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
package com.exceljava.com4j.excel ; import com4j.*; /** */ public enum XlHtmlType { /** * <p> * The value of this constant is 0 * </p> */ xlHtmlStatic, // 0 /** * <p> * The value of this constant is 1 * </p> */ xlHtmlCalc, // 1 /** * <p> * The value of this constant is 2 * </p> */ xlHtmlList, // 2 /** * <p> * The value of this constant is 3 * </p> */ xlHtmlChart, // 3 }
[ "tony@pyxll.com" ]
tony@pyxll.com
1a6177c1b3521a9a1f2b4e9d427cd124378e704b
720cba9eef8d7ded75a2f418b075621c2597e5c3
/RabbitMQ-Lab1/src/main/java/com/coursecube/springboot/rabbitmq/OrderSender.java
a8ecdcf448c36a97e75d87a4dad81c0565de4cc7
[]
no_license
lekhrajprasad/coursecube
8c064d4b802e6c7af4127ba9ccb04692582b1f42
4fd5f96dcff6ccdf64e00caae411d2aed31f20e4
refs/heads/master
2023-01-08T16:48:27.222963
2020-11-14T04:53:37
2020-11-14T04:53:37
286,967,466
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package com.coursecube.springboot.rabbitmq; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class OrderSender { @Autowired private RabbitTemplate rabbitTemplate; public void sendOrder(Order order){ String routingKey = JLCBeanConfig.ORDER_QUEUE; rabbitTemplate.convertAndSend(routingKey, order); } }
[ "lekhraj.prasad@gmail.com" ]
lekhraj.prasad@gmail.com
14a1ea62f4d2fc260f68ee20891d190e6aff0106
75d1f41d291ba9662b5abf12b5fd01a240f9cd5a
/xui_lib/src/main/java/com/xuexiang/xui/widget/XUIKeyboardScrollView.java
cfc50dc120c0526dde04afb07bd3f600f18022b9
[ "Apache-2.0" ]
permissive
CrackerCat/XUI
4730ef38a46bf69e0cbf94ec5236fd4257b457b3
491d9f770fa74f51df6c50b8967810ae136ec2f1
refs/heads/master
2023-02-19T05:18:02.818052
2022-11-17T15:41:05
2022-11-17T15:41:05
239,412,037
0
1
Apache-2.0
2020-02-10T02:34:06
2020-02-10T02:34:06
null
UTF-8
Java
false
false
4,131
java
/* * Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.xuexiang.xui.widget; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.ScrollView; import com.xuexiang.xui.R; import com.xuexiang.xui.utils.DensityUtils; import com.xuexiang.xui.utils.KeyboardUtils; /** * 监听键盘弹出,自动滚动 * * @author xuexiang * @since 2018/12/19 下午11:27 */ public class XUIKeyboardScrollView extends ScrollView implements KeyboardUtils.SoftKeyboardToggleListener { /** * 默认键盘弹出时滚动的高度 */ private final static int DEFAULT_SCROLL_HEIGHT = 40; /** * 是否自动滚动,默认false */ private boolean mAutoScroll; /** * 键盘弹出时滚动的高度 */ private int mScrollHeight; /** * 滚动延迟 */ private int mScrollDelay; /** * 滚动是否隐藏键盘,默认true */ private boolean mScrollHide; public XUIKeyboardScrollView(Context context) { super(context); mScrollHide = true; } public XUIKeyboardScrollView(Context context, AttributeSet attrs) { super(context, attrs); initAttrs(context, attrs); } public XUIKeyboardScrollView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initAttrs(context, attrs); } /** * 初始化属性 * * @param context * @param attrs */ private void initAttrs(Context context, AttributeSet attrs) { TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.XUIKeyboardScrollView); if (ta != null) { mAutoScroll = ta.getBoolean(R.styleable.XUIKeyboardScrollView_ksv_auto_scroll, false); mScrollHeight = ta.getDimensionPixelSize(R.styleable.XUIKeyboardScrollView_ksv_scroll_height, DensityUtils.dp2px(getContext(), DEFAULT_SCROLL_HEIGHT)); mScrollDelay = ta.getInt(R.styleable.XUIKeyboardScrollView_ksv_scroll_delay, 100); mScrollHide = ta.getBoolean(R.styleable.XUIKeyboardScrollView_ksv_scroll_hide, true); ta.recycle(); } if (mAutoScroll) { KeyboardUtils.addKeyboardToggleListener(this, this); } } @Override public void onToggleSoftKeyboard(boolean isVisible) { if (isVisible) { postDelayed(new Runnable() { @Override public void run() { smoothScrollTo(0, getScrollY() + mScrollHeight); } }, mScrollDelay); } else { postDelayed(new Runnable() { @Override public void run() { smoothScrollTo(0, 0); } }, mScrollDelay); } } @Override protected void onDetachedFromWindow() { if (mAutoScroll) { KeyboardUtils.removeKeyboardToggleListener(this); } super.onDetachedFromWindow(); } @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); if (mScrollHide) { KeyboardUtils.hideSoftInput(this); } } /** * 设置滚动是否隐藏键盘 * * @param isScrollHideKeyboard * @return */ public XUIKeyboardScrollView setIsScrollHideKeyboard(boolean isScrollHideKeyboard) { mScrollHide = isScrollHideKeyboard; return this; } }
[ "xuexiangjys@163.com" ]
xuexiangjys@163.com
431279c1f13ee4fedb1d226d0801dc051528e1e1
c9d1ed728caf4b18ac6a68f13f093f43893db249
/chapter_002/src/main/java/ru/job4j/professions/package-info.java
e74ad45c93e95965dadbfdb5d0e31ffc3df4530f
[ "Apache-2.0" ]
permissive
danailKondov/dkondov
07580eabe06ffd7bc77566fc8969b0e2253dd20d
14b3d2940638b2f69072dbdc0a9d7f8ba1b3748b
refs/heads/master
2021-01-01T16:00:49.687121
2018-05-10T19:45:50
2018-05-10T19:45:50
97,752,582
1
1
null
null
null
null
UTF-8
Java
false
false
151
java
/** * Package for professions. * * @author Kondov Danail (mailto:dkondov@yandex.ru) * @version $1$ * @since 27.07.2017 */ package ru.job4j.professions;
[ "dkondov@yandex.ru" ]
dkondov@yandex.ru
39d40f48522673bbc8999f0b77ce9bfc89a249a6
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/google/android/material/bottomnavigation/LabelVisibilityMode.java
5ae5609b42b61d37208a1cfcf4526f2ee3955e5e
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
package com.google.android.material.bottomnavigation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.SOURCE) public @interface LabelVisibilityMode { public static final int LABEL_VISIBILITY_AUTO = -1; public static final int LABEL_VISIBILITY_LABELED = 1; public static final int LABEL_VISIBILITY_SELECTED = 0; public static final int LABEL_VISIBILITY_UNLABELED = 2; }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
7667d1c6f185ce24c2d7369d827deed92c7a8f4f
88d785ca23def4ca733f7d52a146bc8d34c77429
/src/dev/zt/UpliftedVFFV/events/EventsCommon/EventJanitor1.java
cda99b868b82bc26bae3b6aed9bc74662e77f427
[]
no_license
Donpommelo/Uplifted.VFFV
30fe1e41a9aeefee16c1e224388af6ce55ebfcce
99b63eb2a00666eb4fdf84ac20cebebefad1a3dc
refs/heads/master
2020-12-24T17:44:19.147662
2016-06-01T21:46:13
2016-06-01T21:46:13
33,390,964
0
0
null
2015-08-25T01:57:41
2015-04-04T01:58:48
Java
UTF-8
Java
false
false
5,361
java
package dev.zt.UpliftedVFFV.events.EventsCommon; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.TreeMap; import dev.zt.UpliftedVFFV.dialog.Dialog; import dev.zt.UpliftedVFFV.entities.creatures.Player; import dev.zt.UpliftedVFFV.events.Event; import dev.zt.UpliftedVFFV.events.SpriteSorter; import dev.zt.UpliftedVFFV.gfx.Assets; import dev.zt.UpliftedVFFV.gfx.ImageLoader; import dev.zt.UpliftedVFFV.inventory.Item; import dev.zt.UpliftedVFFV.inventory.consumables.Bettergent; import dev.zt.UpliftedVFFV.inventory.consumables.CaffeinePatch; import dev.zt.UpliftedVFFV.inventory.consumables.MedPak; import dev.zt.UpliftedVFFV.inventory.consumables.SmellingSalt; import dev.zt.UpliftedVFFV.inventory.consumables.StatScrubber; import dev.zt.UpliftedVFFV.inventory.equipables.Conduit; import dev.zt.UpliftedVFFV.inventory.misc.DamageSponge; import dev.zt.UpliftedVFFV.inventory.misc.JanitorDonationForm; import dev.zt.UpliftedVFFV.inventory.misc.MagicBottle; import dev.zt.UpliftedVFFV.inventory.misc.SleepingPills; import dev.zt.UpliftedVFFV.inventory.misc.SummonSauce; import dev.zt.UpliftedVFFV.party.Schmuck; public class EventJanitor1 extends Event { public String[] Choices={"Save","Shop","Never Mind"}; public static int stagenum = 2; public BufferedImage shopKeeper = ImageLoader.loadImage("/CharacterBusts/Janitor2small.png"); public TreeMap<Item, Integer> selection = new TreeMap<>(); public ArrayList<Item> stuff = new ArrayList<Item>(); public static BufferedImage img=SpriteSorter.SpriteSort(1,Assets.Wiper); public EventJanitor1(float x, float y, int idnum) { super(img,idnum,x, y, stagenum); } public void run(){ if (Player.runlast==0){ this.setTex(SpriteSorter.SpriteSort(1,Assets.Wiper)); } if (Player.runlast==1){ this.setTex(SpriteSorter.SpriteSort(10,Assets.Wiper)); } if (Player.runlast==2){ this.setTex(SpriteSorter.SpriteSort(7,Assets.Wiper)); } if (Player.runlast==3){ this.setTex(SpriteSorter.SpriteSort(4,Assets.Wiper)); } switch(this.getstage()){ case 0: if(!this.isSelfswitch1()){ Dialog[] d = new Dialog[8]; d[0] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"Hmm? I don't believe we've met before."); d[1] = new Dialog("Operator","/CharacterBusts/Player-1.png",0,"Hello. I am the Operator. I was looking for Suite 521."); d[2] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"Oh. Sadly I've never heard of the place before./But maybe I can provide you some other services . . ."); d[3] = new Dialog("Operator","/CharacterBusts/Player-1.png",0,"What sort of . . . services?"); d[4] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"I am the humble janitor of this facility, but I also do all manner of odd jobs too."); d[5] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"Well, mostly I run my own little business. Y'know, just to make a bit of money on the side. Feel free to purchase anything that interests you."); d[6] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"Just don't mention anything to Management."); d[7] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"Oh, and if you ever need your game saved, come to me and I can help./Free of charge!"); super.Dialog(d, 7, this.getId(), true); this.setSelfswitch1(true); } else{ Dialog[] d = new Dialog[1]; d[0] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"Well, if it isn't my favorite customer."); super.Dialog(d, 0, this.getId(), true); } break; case 1: Dialog[] d = new Dialog[1]; d[0] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"So, what'll it be?"); super.Dialog(d, 0, this.getId(), true); super.ChoiceBranch(this.getId(), Choices, 150); break; case 2: this.setstage(0); break; } } public boolean isSolid(int i){ return true; } public void ChoiceMade(int i){ switch(i){ case 0: super.Save(this.getId()); this.setstage(2); break; case 1: getGoods(); super.shop(this.getId(),selection,shopKeeper,0); this.setstage(2); break; case 2: Dialog[] d = new Dialog[1]; d[0] = new Dialog("Janitor","/CharacterBusts/Janitor2small.png",1,"See you again soon."); super.Dialog(d, 0, this.getId(), true); this.setstage(2); break; } } public void getGoods(){ double discount = 0; for(Schmuck s : gamestate.partymanager.party){ discount += s.getDiscountBonus(); } if(super.getVar(12) >= 1){ stuff.add(new MedPak()); stuff.add(new CaffeinePatch()); stuff.add(new SmellingSalt()); } if(super.getVar(12) >= 2){ stuff.add(new Bettergent()); stuff.add(new StatScrubber()); stuff.add(new Conduit()); } if(super.getVar(12) >= 3){ stuff.add(new SleepingPills()); stuff.add(new JanitorDonationForm()); } if(super.getVar(12) >= 5){ stuff.add(new MagicBottle()); stuff.add(new DamageSponge()); } for(Item i : stuff){ selection.put(i, (int)(i.value * (1 - discount))); } } public String shopOpen(){ return "Got some real nice stuff here. Take a real good look."; } public String boughtString(Item i, int num, int scr){ switch(i.getName()){ case "Med-Pak": return "Test"; } return "Bought "+num+" "+i.getName()+"('s) for "+num*scr+" Script!"; } }
[ "donpommelo@gmail" ]
donpommelo@gmail
65e039cc297c01d20ca334aedd24f730e965b32d
229bea88558ba355856e000f95a71e6491eeae9f
/velocity/velocity-1.2/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java
87ae74a35c8441eb6225c88d6ebb3d679ecc8c81
[ "Apache-1.1", "Apache-2.0", "BSD-2-Clause" ]
permissive
tpso-src/thirdparty
1d255893e0149ea2e79395b2bf8154783b0ba3be
9b033adff45bc7a5dcecd3d5bf13a200e4b6ad67
refs/heads/master
2021-01-19T02:57:18.402854
2016-07-21T11:35:36
2016-07-21T11:35:36
44,494,736
0
0
null
null
null
null
UTF-8
Java
false
false
3,722
java
package org.apache.velocity.runtime.parser.node; /* Generated By:JJTree: Do not edit this line. ASTBlock.java */ /* * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Velocity", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ import java.io.Writer; import java.io.IOException; import org.apache.velocity.context.InternalContextAdapter; import org.apache.velocity.runtime.parser.Parser; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; import org.apache.velocity.exception.ResourceNotFoundException; public class ASTBlock extends SimpleNode { public ASTBlock(int id) { super(id); } public ASTBlock(Parser p, int id) { super(p, id); } /** Accept the visitor. **/ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } public boolean render( InternalContextAdapter context, Writer writer) throws IOException, MethodInvocationException, ResourceNotFoundException, ParseErrorException { int i, k = jjtGetNumChildren(); for (i = 0; i < k; i++) jjtGetChild(i).render(context, writer); return true; } }
[ "ms@tpso.com" ]
ms@tpso.com
72d3e69e77bfd51e41d1f0f9293de93328bc3deb
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Honor5C-7.0/src/main/java/gov/nist/core/HostPort.java
bef127a5c3d31abb344e4a4b0fe072d6d1e93675
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,089
java
package gov.nist.core; import java.net.InetAddress; import java.net.UnknownHostException; public final class HostPort extends GenericObject { private static final long serialVersionUID = -7103412227431884523L; protected Host host; protected int port; public HostPort() { this.host = null; this.port = -1; } public String encode() { return encode(new StringBuffer()).toString(); } public StringBuffer encode(StringBuffer buffer) { this.host.encode(buffer); if (this.port != -1) { buffer.append(Separators.COLON).append(this.port); } return buffer; } public boolean equals(Object other) { boolean z = false; if (other == null || getClass() != other.getClass()) { return false; } HostPort that = (HostPort) other; if (this.port == that.port) { z = this.host.equals(that.host); } return z; } public Host getHost() { return this.host; } public int getPort() { return this.port; } public boolean hasPort() { return this.port != -1; } public void removePort() { this.port = -1; } public void setHost(Host h) { this.host = h; } public void setPort(int p) { this.port = p; } public InetAddress getInetAddress() throws UnknownHostException { if (this.host == null) { return null; } return this.host.getInetAddress(); } public void merge(Object mergeObject) { super.merge(mergeObject); if (this.port == -1) { this.port = ((HostPort) mergeObject).port; } } public Object clone() { HostPort retval = (HostPort) super.clone(); if (this.host != null) { retval.host = (Host) this.host.clone(); } return retval; } public String toString() { return encode(); } public int hashCode() { return this.host.hashCode() + this.port; } }
[ "dstmath@163.com" ]
dstmath@163.com
23bae6dccbd6f7284baa3ecc70c58bc4eb38b8e6
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/3b2376ab97bb5d1a5dbbf2b45cf062db320757549c761936d19df05e856de894e45695014cd8063cdc22148b13fa1803b3c9e77356931d66f4fbec0efacf7829/006/mutations/63/smallest_3b2376ab_006.java
6cf3a18ca4aa5a3683387f6c1569c9bea5b67956
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,141
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_3b2376ab_006 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_3b2376ab_006 mainClass = new smallest_3b2376ab_006 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj n1 = new IntObj (), n2 = new IntObj (), n3 = new IntObj (), n4 = new IntObj (), small = new IntObj (); output += (String.format ("Please enter 4 numbers seperated by spaces > ")); n1.value = scanner.nextInt (); n2.value = scanner.nextInt (); n3.value = scanner.nextInt (); n4.value = scanner.nextInt (); small.value = n1.value; if (n2.value < n1.value) { small.value = n2.value; } if ((n3.value) < (n2.value)) { small.value = n3.value;} if (n3.value < n2.value) { small.value = n3.value; } if (n4.value < n3.value) { small.value = n4.value; } else if (n4.value < n1.value) { small.value = n4.value; } output += (String.format ("%d is the smallest", small.value)); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
96c78086068ff36b1f37ee013d89671b16607c01
2b438c607ca0b2ee575eec4752cc7c5c7792f4cc
/JBehave_example/src/com/example/StepExecutorJUnit.java
c37a9d0017b7d01787d34af91921f0138e35b7c5
[]
no_license
cherkavi/java-code-example
a94a4c5eebd6fb20274dc4852c13e7e8779a7570
9c640b7a64e64290df0b4a6820747a7c6b87ae6d
refs/heads/master
2023-02-08T09:03:37.056639
2023-02-06T15:18:21
2023-02-06T15:18:21
197,267,286
0
4
null
2022-12-15T23:57:37
2019-07-16T21:01:20
Java
UTF-8
Java
false
false
2,074
java
package com.example; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.jbehave.core.configuration.Configuration; import org.jbehave.core.configuration.MostUsefulConfiguration; import org.jbehave.core.io.LoadFromClasspath; import org.jbehave.core.io.LoadFromURL; import org.jbehave.core.io.StoryLoader; import org.jbehave.core.junit.JUnitStory; import org.jbehave.core.reporters.StoryReporterBuilder; import org.jbehave.core.reporters.StoryReporterBuilder.Format; import org.jbehave.core.steps.InjectableStepsFactory; import org.jbehave.core.steps.InstanceStepsFactory; public class StepExecutorJUnit extends JUnitStory { public static void main(String[] args) throws Throwable{ new StepExecutorJUnit().run(); } private StoryLoader getStoryLoader(){ String pathToFile="C:\\\\JBehave_example\\src\\com\\example\\step_executor_j_unit.story"; LoadFromURL urlLoader=new LoadFromURL(); try { urlLoader.loadStoryAsText(FileUtils.readFileToString(new File(pathToFile))); } catch (IOException e) { e.printStackTrace(); System.err.println("File does not found: "+pathToFile); } return urlLoader; } // Here we specify the configuration, starting from default MostUsefulConfiguration, and changing only what is needed @SuppressWarnings("deprecation") @Override public Configuration configuration() { return new MostUsefulConfiguration() // where to find the stories .useStoryLoader(new LoadFromClasspath(this.getClass())) // CONSOLE and TXT reporting .useStoryReporterBuilder(new StoryReporterBuilder() .withDefaultFormats() .withFormats(Format.CONSOLE, Format.TXT)); } // Here we specify the steps classes @Override public InjectableStepsFactory stepsFactory() { // varargs, can have more that one steps classes return new InstanceStepsFactory(configuration(), new GridSteps()); } }
[ "technik7job@gmail.com" ]
technik7job@gmail.com
5b9532288645b1b1fa8d706cb137b38cde84336a
09373d32b0c2b1cde09ff7e0beddda86627dc334
/src/main/java/org/mvelx/ast/ReturnNode.java
a9fac4b43f64c184ceaa6e09394d84d2e8005763
[]
no_license
flym/mvelx
ba4a7e2d8ad4a151699d106a1c7fe9445afa3ac3
18c9eb7635f285a769c443107220e02c898e1b6b
refs/heads/master
2020-07-10T20:18:00.570137
2019-03-11T01:49:43
2019-03-11T01:49:43
74,010,079
12
8
null
null
null
null
UTF-8
Java
false
false
2,677
java
/** * MVEL 2.0 * Copyright (C) 2007 The Codehaus * Mike Brock, Dhanji Prasanna, John Graham, Mark Proctor * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.mvelx.ast; import org.mvelx.Operator; import org.mvelx.ParserContext; import org.mvelx.compiler.Accessor; import org.mvelx.integration.VariableResolverFactory; import org.mvelx.integration.impl.StackDemarcResolverFactory; import static org.mvelx.util.ParseTools.subCompileExpression; /** * 描述一个简单的return x 节点 此节点的作用除对x求值外,还将在当前作用域中设定标记,以提前中止计算并返回 * * @author Christopher Brock */ public class ReturnNode extends ASTNode { public ReturnNode(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; //在翻译期对相应的返回数据进行编译,以确保其执行 if((fields & COMPILE_IMMEDIATE) != 0) { setAccessor((Accessor) subCompileExpression(expr, start, offset, pCtx)); } } public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { if(accessor == null) { setAccessor((Accessor) subCompileExpression(expr, start, offset, pCtx)); } //因为已经最终需要返回,因此相应的解析器工厂设置终止标记 factory.setTiltFlag(true); //直接使用访问器来处理相应的数据 //使用StackDemarcResolverFactory来隔离相应的终止标记 return accessor.getValue(ctx, thisValue, new StackDemarcResolverFactory(factory)); } /** return 也算作操作符的一部分,但优先级最低 */ @Override public boolean isOperator() { return true; } /** 其操作符为return 在某些执行中,也会使用此操作符进行相应的流程处理 */ @Override public Integer getOperator() { return Operator.RETURN; } @Override public boolean isOperator(Integer operator) { return Operator.RETURN == operator; } }
[ "www@iflym.com" ]
www@iflym.com
08da0ff79746b5b436b2713768d4b8393b675aec
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgGson/src/org/kyojo/schemaOrg/m3n3/gson/core/container/TypeOfGoodDeserializer.java
99f97b5863a9b85ecc2e0c2bf1bcffc071ccb68b
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
2,065
java
package org.kyojo.schemaorg.m3n3.gson.core.container; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; import org.kyojo.gson.JsonDeserializationContext; import org.kyojo.gson.JsonDeserializer; import org.kyojo.gson.JsonElement; import org.kyojo.gson.JsonObject; import org.kyojo.gson.JsonParseException; import org.kyojo.gson.reflect.TypeToken; import org.kyojo.schemaorg.m3n3.core.impl.TYPE_OF_GOOD; import org.kyojo.schemaorg.m3n3.core.Container.TypeOfGood; public class TypeOfGoodDeserializer implements JsonDeserializer<TypeOfGood> { @Override public TypeOfGood deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { if(jsonElement.isJsonPrimitive()) { return new TYPE_OF_GOOD(jsonElement.getAsString()); } JsonObject jsonObject = jsonElement.getAsJsonObject(); TypeOfGood obj = new TYPE_OF_GOOD(); HashMap<String, Field> fldMap = new HashMap<>(); Field[] flds = TYPE_OF_GOOD.class.getFields(); for(Field fld : flds) { fldMap.put(fld.getName(), fld); } for(Entry<String, JsonElement> ent : jsonObject.entrySet()) { if(fldMap.containsKey(ent.getKey())) { Field fld = fldMap.get(ent.getKey()); JsonElement elm = ent.getValue(); try { if(fld.getType().equals(List.class)) { ParameterizedType gType = (ParameterizedType)fld.getGenericType(); Type[] aTypes = gType.getActualTypeArguments(); Type listType = TypeToken.getParameterized(ArrayList.class, (Class<?>)aTypes[0]).getType(); List<?> list = context.deserialize(elm, listType); fld.set(obj, list); } else { Object val = context.deserialize(elm, fld.getType()); fld.set(obj, val); } } catch(IllegalArgumentException iae) { throw new JsonParseException(iae); } catch(IllegalAccessException iae) { throw new JsonParseException(iae); } } } return obj; } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
f34cfd971de1a6feb26f3b7155d1386a6ed5c6c2
b2018d92fdd74823768317307bc8e58087c1c1c9
/src/com/igomall/event/CartAddedEvent.java
8e28dc675ed66f1f3a2921cd38d6c4fef1f8a25d
[]
no_license
hyerming/demo123
911d124b18934c093ff6c8be3046016d5f64ea61
b3851e389adf83a2a9523dac631d72ecd5a065e8
refs/heads/master
2020-04-28T11:37:22.378116
2019-03-09T02:06:32
2019-03-09T02:06:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
899
java
package com.igomall.event; import com.igomall.entity.Cart; import com.igomall.entity.Sku; /** * Event - 添加购物车SKU * * @author blackboy * @version 1.0 */ public class CartAddedEvent extends CartEvent { private static final long serialVersionUID = 4639867730725258843L; /** * SKU */ private Sku sku; /** * 数量 */ private int quantity; /** * 构造方法 * * @param source * 事件源 * @param cart * 购物车 * @param sku * SKU * @param quantity * 数量 */ public CartAddedEvent(Object source, Cart cart, Sku sku, int quantity) { super(source, cart); this.sku = sku; this.quantity = quantity; } /** * 获取SKU * * @return SKU */ public Sku getSku() { return sku; } /** * 获取数量 * * @return 数量 */ public int getQuantity() { return quantity; } }
[ "Liziyi521521" ]
Liziyi521521
1df475f5604fcddbaeaa159f49ce70d574b15a39
eec047d50d823186610d37bca40d96cf7e0262f7
/src/java/com/wings/web/struts/actions/ReportSummaryTruckingAction.java
c49f6449a96bc0ca305b572b3ccb38a87657ca6c
[]
no_license
husainahmad/wings
d62cbf74abbf6f39c60ec687c2a9fbce0367bb75
6c8dbd4feb8b05b1b515e342fe1335416f0025f0
refs/heads/master
2021-04-29T01:03:34.665312
2017-07-05T16:01:46
2017-07-05T16:01:46
77,786,458
0
0
null
null
null
null
UTF-8
Java
false
false
1,263
java
package com.wings.web.struts.actions; import java.io.IOException; import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; public final class ReportSummaryTruckingAction extends Action { public ActionForward execute ( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { ServletContext context = this.getServlet().getServletConfig().getServletContext(); try { List truckings = com.wings.adapter.StrutsTransporterDelegate.findAll(null); request.setAttribute("truckingList", truckings); return mapping.findForward("index"); } catch (Exception e) { request.setAttribute("err", e.getMessage()); return mapping.findForward("err"); } } }
[ "husainahmad@gmail.com" ]
husainahmad@gmail.com
0f568e7d61a3ca1793f0a27770d93fafa41b2cbd
29c5c5d7225abe3ce068d4cc819803747c47b3e7
/test/regression/src/org/jacorb/test/notification/CosEventChannelTest.java
b40576d7e6a3f2659fa199b52b5ad5b773c6fe30
[]
no_license
wolfc/jacorb
308a770016586ce3e8f902507ba1bde295df78c1
40e0ec34c36fdcfe67b67a9ceba729e1d4581899
refs/heads/master
2020-05-02T12:50:56.097066
2010-05-25T22:23:05
2010-05-25T22:23:05
686,203
0
1
null
null
null
null
UTF-8
Java
false
false
4,358
java
package org.jacorb.test.notification; import junit.framework.Test; import org.jacorb.test.notification.common.NotificationTestUtils; import org.jacorb.test.notification.common.NotifyServerTestCase; import org.jacorb.test.notification.common.NotifyServerTestSetup; import org.omg.CORBA.Any; import org.omg.CORBA.IntHolder; import org.omg.CosNotification.Property; import org.omg.CosNotifyChannelAdmin.EventChannel; /** * Unit Test for class EventChannel. Test Backward compability. Access Notification Channel via the * CosEvent Interfaces. * * @author Alphonse Bendt */ public class CosEventChannelTest extends NotifyServerTestCase { EventChannel channel_; Any testData_; public void setUpTest() throws Exception { channel_ = getDefaultChannel(); testData_ = new NotificationTestUtils(getClientORB()).getTestPersonAny(); } public void testPushPush() throws Exception { CosEventPushReceiver _receiver = new CosEventPushReceiver(getClientORB()); _receiver.connect(channel_, false); CosEventPushSender _sender = new CosEventPushSender(getClientORB(), testData_); _sender.connect(channel_, false); Thread _r = new Thread(_receiver); _r.start(); Thread _s = new Thread(_sender); _s.start(); _s.join(); assertTrue(_sender.isEventHandled()); _r.join(); assertTrue(_receiver.isEventHandled()); } public void testPushPull() throws Exception { CosEventPullReceiver _receiver = new CosEventPullReceiver(getClientORB()); _receiver.connect(channel_, false); Thread _r = new Thread(_receiver); CosEventPushSender _sender = new CosEventPushSender(getClientORB(), testData_); _sender.connect(channel_, false); Thread _s = new Thread(_sender); _r.start(); _s.start(); _s.join(); assertTrue(_sender.isEventHandled()); _r.join(); assertTrue(_receiver.isEventHandled()); } public void testPullPush() throws Exception { CosEventPushReceiver _receiver = new CosEventPushReceiver(getClientORB()); _receiver.connect(channel_, false); CosEventPullSender _sender = new CosEventPullSender(getClientORB(), testData_); _sender.connect(channel_, false); Thread _r = new Thread(_receiver); _r.start(); Thread _s = new Thread(_sender); _s.start(); _s.join(); assertTrue(_sender.isEventHandled()); _r.join(); assertTrue(_receiver.isEventHandled()); } public void testPullPull() throws Exception { CosEventPullReceiver _receiver = new CosEventPullReceiver(getClientORB()); _receiver.connect(channel_, false); Thread _r = new Thread(_receiver); CosEventPullSender _sender = new CosEventPullSender(getClientORB(), testData_); _sender.connect(channel_, false); _r.start(); _r.join(); assertTrue(_receiver.isEventHandled()); } public void testDestroyChannelDisconnectsClients() throws Exception { EventChannel _channel = getEventChannelFactory().create_channel(new Property[0], new Property[0], new IntHolder()); TestClientOperations[] _testClients = new TestClientOperations[] { new CosEventPullSender(getClientORB(), testData_), new CosEventPushSender(getClientORB(), testData_), new CosEventPushReceiver(getClientORB()), new CosEventPullReceiver(getClientORB()) }; for (int x = 0; x < _testClients.length; ++x) { _testClients[x].connect(_channel, false); assertTrue(_testClients[x].isConnected()); } _channel.destroy(); Thread.sleep(1000); for (int x = 0; x < _testClients.length; ++x) { assertTrue("Idx: " + x + " still connected", !_testClients[x].isConnected()); } } public CosEventChannelTest(String name, NotifyServerTestSetup setup) { super(name, setup); } public static Test suite() throws Exception { return NotifyServerTestCase.suite("Basic CosEvent EventChannel Tests", CosEventChannelTest.class); } }
[ "cdewolf@redhat.com" ]
cdewolf@redhat.com