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
f4e9a82ab2b4e04a9c2041724f7e53bfb8957655
c93d57edc5337e479230150b3bb3833c9a1cce3e
/JavaRushTasks/1.JavaSyntax/src/com/javarush/task/task01/task0134/Solution.java
3f16aae90b27f00a89590827b63926320ab9b0c0
[]
no_license
Lao-Ax/JavaRushHomeWork
fe1cbafc41a57a3bcb5804337ab10474ba34948a
d33681fad5d6f891609e1ff1bc51ae104476b7af
refs/heads/master
2023-01-28T22:01:36.059968
2023-01-15T13:11:46
2023-01-15T14:28:05
264,274,037
0
0
null
null
null
null
UTF-8
Java
false
false
1,048
java
package com.javarush.task.task01.task0134; /* Набираем воду в бассейн Амиго, сегодня наша задача наполнить корабельный бассейн. Нужно посчитать, сколько литров воды нужно для заполнения бассейна до бортов. Известно, что бассейн имеет линейные размеры a × b × c, заданные в метрах. Эти размеры передаются в метод getVolume. Метод должен вернуть количество литров воды, которое нужно для наполнения бассейна. Пример: Метод getVolume вызывается с параметрами 25, 5, 2. Пример вывода: 250000 */ public class Solution { public static void main(String[] args) { System.out.println(getVolume(25, 5, 2)); } public static long getVolume(int a, int b, int c) { return a * b * c * 1000; } }
[ "aplekhov@wiley.com" ]
aplekhov@wiley.com
6b2e017061684e618b8205a50f4664e6eaf61cc2
ae9efe033a18c3d4a0915bceda7be2b3b00ae571
/jambeth/jambeth-training/src/main/java/com/koch/ambeth/training/travelguides/guides/GuideBookExtendable.java
7b1f87c0ff1758fff9d95bb06f66a7021aedbf37
[ "Apache-2.0" ]
permissive
Dennis-Koch/ambeth
0902d321ccd15f6dc62ebb5e245e18187b913165
8552b210b8b37d3d8f66bdac2e094bf23c8b5fda
refs/heads/develop
2022-11-10T00:40:00.744551
2017-10-27T05:35:20
2017-10-27T05:35:20
88,013,592
0
4
Apache-2.0
2022-09-22T18:02:18
2017-04-12T05:36:00
Java
UTF-8
Java
false
false
715
java
package com.koch.ambeth.training.travelguides.guides; import java.util.HashMap; import com.koch.ambeth.log.ILogger; import com.koch.ambeth.log.LogInstance; import com.koch.ambeth.training.travelguides.annotation.LogCalls; @LogCalls public class GuideBookExtendable implements IGuideBookExtendable { @SuppressWarnings("unused") @LogInstance private ILogger log; HashMap<String, IGuideBook> books = new HashMap<String, IGuideBook>(); @Override public void register(IGuideBook book, String name) { books.put(name, book); } @Override public void unregister(IGuideBook book, String name) { books.remove(name); } @Override public IGuideBook getBook(String name) { return books.get(name); } }
[ "dennis.koch@bruker.com" ]
dennis.koch@bruker.com
954796a523ec466fcd24ce435a2ab03daf8e2044
f19c1e8b86d935c24c5ba4bb791d9818e407e245
/src/test/java/com/github/f4b6a3/uuid/creator/nonstandard/ShortSuffixCombCreatorTest.java
fe8ef869ad707bd6d6db1936cc73d8646cdc1845
[ "MIT" ]
permissive
leonlee/uuid-creator
ce2b6f5a38c1efb9cec13ddca1588720dc890baa
51b2444d8557a7d594b366bd391af2ac3bc2e0d8
refs/heads/master
2022-11-30T02:50:13.215557
2020-08-09T08:08:12
2020-08-09T08:08:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,224
java
package com.github.f4b6a3.uuid.creator.nonstandard; import org.junit.Test; import com.github.f4b6a3.uuid.UuidCreator; import com.github.f4b6a3.uuid.creator.AbstractUuidCreatorTest; import com.github.f4b6a3.uuid.creator.nonstandard.ShortSuffixCombCreator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.security.SecureRandom; import java.util.Random; import java.util.UUID; public class ShortSuffixCombCreatorTest extends AbstractUuidCreatorTest { private static final long ONE_MINUTE = 60_000; @Test public void testCompGuid() { UUID[] list = new UUID[DEFAULT_LOOP_MAX]; long startTime = (System.currentTimeMillis() / ONE_MINUTE) & 0x000000000000ffffL; for (int i = 0; i < DEFAULT_LOOP_MAX; i++) { list[i] = UuidCreator.getShortSuffixComb(); } long endTime = (System.currentTimeMillis() / ONE_MINUTE) & 0x000000000000ffffL; checkUniqueness(list); long previous = 0; for (int i = 0; i < DEFAULT_LOOP_MAX; i++) { long creationTime = (list[i].getLeastSignificantBits() & 0x0000ffff00000000L) >>> 32; assertTrue("Comb Guid creation time before start time", startTime <= creationTime); assertTrue("Comb Guid creation time after end time", creationTime <= endTime); assertTrue("Comb Guid sequence is not sorted " + previous + " " + creationTime, previous <= creationTime); previous = creationTime; } } @Test public void testCombGuid() { UUID[] list = new UUID[DEFAULT_LOOP_MAX]; ShortSuffixCombCreator creator = UuidCreator.getShortSuffixCombCreator(); for (int i = 0; i < DEFAULT_LOOP_MAX; i++) { list[i] = creator.create(); assertNotNull("UUID is null", list[i]); } checkUniqueness(list); } @Test public void testCombGuidWithCustomRandomGenerator() { UUID[] list = new UUID[DEFAULT_LOOP_MAX]; Random random = new Random(); ShortSuffixCombCreator creator = UuidCreator.getShortSuffixCombCreator().withRandomGenerator(random); ; for (int i = 0; i < DEFAULT_LOOP_MAX; i++) { list[i] = creator.create(); assertNotNull("UUID is null", list[i]); } checkUniqueness(list); } @Test public void testCombGuidWithCustomRandomGeneratorSecure() { UUID[] list = new UUID[DEFAULT_LOOP_MAX]; Random random = new SecureRandom(); ShortSuffixCombCreator creator = UuidCreator.getShortSuffixCombCreator().withRandomGenerator(random); for (int i = 0; i < DEFAULT_LOOP_MAX; i++) { list[i] = creator.create(); assertNotNull("UUID is null", list[i]); } checkUniqueness(list); } @Test public void testGetShortSuffixCombParallelGeneratorsShouldCreateUniqueUuids() throws InterruptedException { Thread[] threads = new Thread[THREAD_TOTAL]; TestThread.clearHashSet(); // Instantiate and start many threads for (int i = 0; i < THREAD_TOTAL; i++) { threads[i] = new TestThread(UuidCreator.getShortSuffixCombCreator(), DEFAULT_LOOP_MAX); threads[i].start(); } // Wait all the threads to finish for (Thread thread : threads) { thread.join(); } // Check if the quantity of unique UUIDs is correct assertEquals(DUPLICATE_UUID_MSG, TestThread.hashSet.size(), (DEFAULT_LOOP_MAX * THREAD_TOTAL)); } }
[ "fabiolimace@gmail.com" ]
fabiolimace@gmail.com
b81651b18bf33e34e8082b413c730035a0de8698
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/domain/AssetResult.java
f258a14c5ca4f25be03c16e93ccbcd4f5174a8f9
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-java-all
df461d00ead2be06d834c37ab1befa110736b5ab
8cd1750da98ce62dbc931ed437f6101684fbb66a
refs/heads/master
2023-08-27T03:59:06.566567
2023-08-22T14:54:57
2023-08-22T14:54:57
132,569,986
470
207
Apache-2.0
2022-12-25T07:37:40
2018-05-08T07:19:22
Java
UTF-8
Java
false
false
2,162
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 物料生产/配送/更正处理结果 * * @author auto create * @since 1.0, 2023-02-06 14:15:47 */ public class AssetResult extends AlipayObject { private static final long serialVersionUID = 1259294685421862186L; /** * 订单明细ID */ @ApiField("assign_item_id") private String assignItemId; /** * 批次号,分批反馈时用 */ @ApiField("batch_no") private String batchNo; /** * 错误码 */ @ApiField("error_code") private String errorCode; /** * 错误描述 */ @ApiField("error_desc") private String errorDesc; /** * openapi 请求id */ @ApiField("request_id") private String requestId; /** * AssetSubFeedbackInfo 列表 */ @ApiListField("sub_feedback_infos") @ApiField("asset_sub_feedback_info") private List<AssetSubFeedbackInfo> subFeedbackInfos; /** * 是否处理成功 */ @ApiField("success") private Boolean success; public String getAssignItemId() { return this.assignItemId; } public void setAssignItemId(String assignItemId) { this.assignItemId = assignItemId; } public String getBatchNo() { return this.batchNo; } public void setBatchNo(String batchNo) { this.batchNo = batchNo; } public String getErrorCode() { return this.errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String getErrorDesc() { return this.errorDesc; } public void setErrorDesc(String errorDesc) { this.errorDesc = errorDesc; } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public List<AssetSubFeedbackInfo> getSubFeedbackInfos() { return this.subFeedbackInfos; } public void setSubFeedbackInfos(List<AssetSubFeedbackInfo> subFeedbackInfos) { this.subFeedbackInfos = subFeedbackInfos; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } }
[ "auto-publish" ]
auto-publish
c0f121e344c9f46ef62dc4d646e5db90e4697b68
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/neo4j--neo4j/f9d2b35496754357ac4607037436eb0bc6021b0d/before/RecordCursors.java
a84a593d0f2d340ddeccc619b7ecc99fbce97c23
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,606
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.store; import org.neo4j.io.IOUtils; import org.neo4j.kernel.impl.store.record.AbstractBaseRecord; import org.neo4j.kernel.impl.store.record.DynamicRecord; import org.neo4j.kernel.impl.store.record.NodeRecord; import org.neo4j.kernel.impl.store.record.PropertyRecord; import org.neo4j.kernel.impl.store.record.RecordLoad; import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord; import org.neo4j.kernel.impl.store.record.RelationshipRecord; import static org.neo4j.kernel.impl.store.record.RecordLoad.NORMAL; /** * Container for {@link RecordCursor}s for different stores. Intended to be reused by pooled transactions. */ public class RecordCursors implements AutoCloseable { private final RecordCursor<NodeRecord> node; private final RecordCursor<RelationshipRecord> relationship; private final RecordCursor<RelationshipGroupRecord> relationshipGroup; private final RecordCursor<PropertyRecord> property; private final RecordCursor<DynamicRecord> propertyString; private final RecordCursor<DynamicRecord> propertyArray; private final RecordCursor<DynamicRecord> label; public RecordCursors( NeoStores neoStores ) { node = newCursor( neoStores.getNodeStore() ); relationship = newCursor( neoStores.getRelationshipStore() ); relationshipGroup = newCursor( neoStores.getRelationshipGroupStore() ); property = newCursor( neoStores.getPropertyStore() ); propertyString = newCursor( neoStores.getPropertyStore().getStringStore() ); propertyArray = newCursor( neoStores.getPropertyStore().getArrayStore() ); label = newCursor( neoStores.getNodeStore().getDynamicLabelStore() ); } private static <R extends AbstractBaseRecord> RecordCursor<R> newCursor( RecordStore<R> store ) { return store.newRecordCursor( store.newRecord() ).acquire( store.getNumberOfReservedLowIds(), NORMAL ); } @Override public void close() { IOUtils.closeAll( RuntimeException.class, node, relationship, relationshipGroup, property, propertyArray, propertyString, label ); } public RecordCursor<NodeRecord> node() { return node; } public RecordCursor<RelationshipRecord> relationship() { return relationship; } public RecordCursor<RelationshipGroupRecord> relationshipGroup() { return relationshipGroup; } public RecordCursor<PropertyRecord> property() { return property; } public RecordCursor<DynamicRecord> propertyArray() { return propertyArray; } public RecordCursor<DynamicRecord> propertyString() { return propertyString; } public RecordCursor<DynamicRecord> label() { return label; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
7a7d1a104d8405adb2f08cc693e6e52a5c44ca03
977af59a7e00524563176de990d92588f60d858c
/src/main/java/com/aol/cyclops/types/Unit.java
c022dec65327bc616e5ead8473ff55d826481b44
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
richardy2012/cyclops-react
173285f1a7be45b7b3c38888d53611b8929d3d62
0c2a98272211ef642ebaf3889d49f40a5acfeaeb
refs/heads/master
2020-06-16T22:19:53.009821
2016-11-28T23:18:33
2016-11-28T23:18:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
305
java
package com.aol.cyclops.types; /** * A Data type that supports instantiation of instances of the same type * * @author johnmcclean * * @param <T> Data type of element(s) stored inside this Unit instance */ @FunctionalInterface public interface Unit<T> { public <T> Unit<T> unit(T unit); }
[ "john.mcclean@teamaol.com" ]
john.mcclean@teamaol.com
aeb8ee9bc39a08174d95de6cfa7ca2784bf32a6f
6e498099b6858eae14bf3959255be9ea1856f862
/test/com/facebook/buck/testutil/integration/DelegatingInputStream.java
10bad45a0e0ebfaacd6b97b5c75ffc77dc530b31
[ "Apache-2.0" ]
permissive
Bonnie1312/buck
2dcfb0791637db675b495b3d27e75998a7a77797
3cf76f426b1d2ab11b9b3d43fd574818e525c3da
refs/heads/master
2020-06-11T13:29:48.660073
2019-06-26T19:59:32
2019-06-26T21:06:24
193,979,660
2
0
Apache-2.0
2019-09-22T07:23:56
2019-06-26T21:24:33
Java
UTF-8
Java
false
false
1,092
java
/* * Copyright 2015-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.testutil.integration; import java.io.IOException; import java.io.InputStream; public class DelegatingInputStream extends InputStream { private InputStream delegate; public DelegatingInputStream(InputStream delegate) { this.delegate = delegate; } public synchronized void setDelegate(InputStream delegate) { this.delegate = delegate; } @Override public synchronized int read() throws IOException { return delegate.read(); } }
[ "sdwilsh@fb.com" ]
sdwilsh@fb.com
49425999cf49a64a36f40c6f52cb886dac98b713
eb7e3a5627219ed55b1bc5480df1cdcde1ff7690
/Quiz5/src/test/java/rocks/zipcode/quiz5/collections/wordcounter/GetWordCountMapTest.java
58f64af0c0f5584fcd05e5f69814a88970e96c41
[]
no_license
trtong/Assessments
2f7c0c22ebd5299ad50c276a8ec4c9839050f56c
e0933ea2a176dfa05c287b60e82c5aa0deb733a0
refs/heads/master
2020-04-17T13:17:39.081738
2019-01-20T02:28:20
2019-01-20T02:28:20
166,609,428
0
0
null
null
null
null
UTF-8
Java
false
false
1,920
java
package rocks.zipcode.quiz5.collections.wordcounter; import org.junit.Assert; import org.junit.Test; import rocks.zipcode.quiz5.collections.WordCounter; import java.util.Map; public class GetWordCountMapTest { @Test public void test1() { // given WordCounter wordCounter = new WordCounter("Hey"); Integer expected = 1; // when Map<String, Integer> map = wordCounter.getWordCountMap(); Integer actual = map.get("Hey"); // then Assert.assertEquals(expected, actual); } @Test public void test2() { // given WordCounter wordCounter = new WordCounter("Hey", "Hey"); Integer expected = 2; // when Map<String, Integer> map = wordCounter.getWordCountMap(); Integer actual = map.get("Hey"); // then Assert.assertEquals(expected, actual); } @Test public void test3() { // given WordCounter wordCounter = new WordCounter("Hey", "Hey", "Hello"); Integer expectedHey = 2; Integer expectedHello = 1; // when Map<String, Integer> map = wordCounter.getWordCountMap(); Integer actualHey = map.get("Hey"); Integer actualHello = map.get("Hello"); // then Assert.assertEquals(expectedHey, actualHey); Assert.assertEquals(expectedHello, actualHello); } @Test public void test4() { // given WordCounter wordCounter = new WordCounter("Hey", "Hey", "Hello", "Hello", "Hello"); Integer expectedHey = 2; Integer expectedHello = 3; // when Map<String, Integer> map = wordCounter.getWordCountMap(); Integer actualHey = map.get("Hey"); Integer actualHello = map.get("Hello"); // then Assert.assertEquals(expectedHey, actualHey); Assert.assertEquals(expectedHello, actualHello); } }
[ "trt.tong@gmail.com" ]
trt.tong@gmail.com
94b58e1de2668a762126298ce76b152be5f16606
7b82d70ba5fef677d83879dfeab859d17f4809aa
/_part2/fastmybatis/fastmybatis-demo/fastmybatis-demo-springboot/src/test/java/com/myapp/UserInfoMapperTest.java
a056b70451fca0c58cab052c4cb9871626f29ec7
[ "MIT" ]
permissive
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,042
java
package com.myapp; import com.myapp.dao.UserInfoMapper; import com.myapp.entity.TUser; import com.myapp.entity.UserInfo; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; /** * @author tanghc */ public class UserInfoMapperTest extends FastmybatisSpringbootApplicationTests { @Autowired UserInfoMapper mapper; @Test public void testGet() { UserInfo userInfo = mapper.getById(2); System.out.println(userInfo.getAddress()); // 这里触发懒加载,将会执行 // SELECT t.`id` , t.`username` , t.`state` , t.`isdel` , t.`remark` , t.`add_time` , t.`money` , t.`left_money` FROM `t_user` t WHERE `id` = ? AND t.isdel = 0 LIMIT 1 // 可将下面两句注释查看sql执行情况 TUser user = userInfo.getUser(); System.out.println("延迟数据:" + user); } @Test public void testUpdate() { UserInfo userInfo = mapper.getById(2); userInfo.setAddress("北京" + System.currentTimeMillis()); int i = mapper.update(userInfo); System.out.println("update i:" + i); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
4e521f83c8d41743d089c48e82fb8b188ef24e5f
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Maven/Maven1139.java
22f022946a8465a44fdad6ca82f234ac36bf3f64
[]
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
515
java
public void testDuplicatePluginDefinitionsMerged() throws Exception { File f1 = getTestFile( "src/test/resources/projects/duplicate-plugins-merged-pom.xml" ); MavenProject project = getProject( f1 ); assertEquals( 2, project.getBuildPlugins().get( 0 ).getDependencies().size() ); assertEquals( 2, project.getBuildPlugins().get( 0 ).getExecutions().size() ); assertEquals( "first", project.getBuildPlugins().get( 0 ).getExecutions().get( 0 ).getId() ); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
88d10f3658fa32c9e8e5eb4e15625a4fe608676d
36a06ddcb67a3f5895e575ceab92fb71de98925e
/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/transform/TransformedExternalArtifactSet.java
f903712de85566da713aad85c124aa0e8d8fb19c
[ "BSD-3-Clause", "LGPL-2.1-or-later", "LicenseRef-scancode-mit-old-style", "EPL-2.0", "CDDL-1.0", "MIT", "LGPL-2.1-only", "Apache-2.0", "MPL-2.0", "EPL-1.0" ]
permissive
blindarcheology/gradle
b4308e9bfbe74172345a204c6f858ee76281ac7f
609634026935ea5d499204469da271b4ef057d43
refs/heads/master
2022-12-14T07:16:43.081747
2020-09-18T13:41:13
2020-09-18T13:41:13
294,432,244
1
0
Apache-2.0
2020-09-18T13:41:15
2020-09-10T14:23:10
null
UTF-8
Java
false
false
2,855
java
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.api.internal.artifacts.transform; import org.gradle.api.Action; import org.gradle.api.artifacts.component.ComponentIdentifier; import org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvableArtifact; import org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvedArtifactSet; import org.gradle.api.internal.attributes.ImmutableAttributes; import org.gradle.api.internal.tasks.TaskDependencyResolveContext; import java.io.File; import java.util.ArrayList; import java.util.List; /** * An artifact set containing transformed external artifacts. */ public class TransformedExternalArtifactSet extends AbstractTransformedArtifactSet { private final ComponentIdentifier componentIdentifier; private final ResolvedArtifactSet delegate; public TransformedExternalArtifactSet( ComponentIdentifier componentIdentifier, ResolvedArtifactSet delegate, ImmutableAttributes target, Transformation transformation, ExtraExecutionGraphDependenciesResolverFactory dependenciesResolverFactory, TransformationNodeRegistry transformationNodeRegistry ) { super(componentIdentifier, delegate, target, transformation, dependenciesResolverFactory, transformationNodeRegistry); this.componentIdentifier = componentIdentifier; this.delegate = delegate; } public ComponentIdentifier getOwnerId() { return componentIdentifier; } @Override public void visitDependencies(TaskDependencyResolveContext context) { } public List<File> calculateResult() { getTransformation().isolateParameters(); List<File> files = new ArrayList<>(); delegate.visitExternalArtifacts(artifact -> { TransformationSubject subject = TransformationSubject.initial(artifact.getId(), artifact.getFile()); TransformationSubject transformed = getTransformation().createInvocation(subject, getDependenciesResolver(), null).invoke().get(); files.addAll(transformed.getFiles()); }); return files; } public void visitArtifacts(Action<ResolvableArtifact> visitor) { delegate.visitExternalArtifacts(visitor); } }
[ "adam@gradle.com" ]
adam@gradle.com
f309a08e5bbe4da5b549dd6864e0ae4c39d311f2
ef64281d7925f68f644f62bce404539e8a500b4c
/examples/src/test/java/com/github/osvaldopina/linkbuilder/example/selffromcurrentcall/SelfFromCurrentCallApplicationTest.java
bfcdb35a13feb1ac3f4a2d56eeb35285aeb1a0aa
[]
no_license
osvaldopina/linkbuilder
1f454a422e9953879e6728cc11f85e22c0d204be
6e30709eaa36607782dfec27612212b09a98dd41
refs/heads/master
2020-05-21T04:17:44.901078
2017-03-29T00:25:16
2017-03-29T00:25:16
49,434,452
10
2
null
null
null
null
UTF-8
Java
false
false
1,539
java
package com.github.osvaldopina.linkbuilder.example.selffromcurrentcall; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration(classes = EnableSelfFromCurrentCallApplication.class) public class SelfFromCurrentCallApplicationTest { @Autowired private WebApplicationContext wac; private MockMvc mockMvc; @Before public void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); } @Test public void verifyResponse() throws Exception { mockMvc.perform(get("/")) .andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$._links.self.href"). value("http://localhost/")); } }
[ "osvaldo.pina@gmail.com" ]
osvaldo.pina@gmail.com
5e7730c7395c6114c8671fcbdb988a3d13e275a3
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.vrshell.home-VrHome/sources/retrofit/mime/TypedOutput.java
eb3c2fb927f6a13d16d2aa9348148009163ce36b
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
247
java
package retrofit.mime; import java.io.IOException; import java.io.OutputStream; public interface TypedOutput { String fileName(); long length(); String mimeType(); void writeTo(OutputStream outputStream) throws IOException; }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
648cd583a0cf2129aa8a8ca2f7ee86d4954be319
823d7d304b7914041137f5c8f82c10d357d6c604
/Thesis/GrammartestSet/extractedTestGrammar/ExtractedClojureVisitor.java
90b88bce318dc0709a93308d0cdffe8d79d80832
[]
no_license
grammarhoard/2014-butrus-testing
2a0496e6c6638e65021383d487a051c31036090d
df714500c0a983ef3ea6210e68f0849e9c4519b0
refs/heads/master
2021-01-16T19:58:02.667452
2014-08-17T08:56:37
2014-08-17T08:56:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,070
java
// Generated from ExtractedClojure.g4 by ANTLR 4.1 package extractedTestGrammar; import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.tree.ParseTreeVisitor; /** * This interface defines a complete generic visitor for a parse tree produced * by {@link ExtractedClojureParser}. * * @param <T> The return type of the visit operation. Use {@link Void} for * operations with no return type. */ public interface ExtractedClojureVisitor<T> extends ParseTreeVisitor<T> { /** * Visit a parse tree produced by {@link ExtractedClojureParser#special_form}. * @param ctx the parse tree * @return the visitor result */ T visitSpecial_form(@NotNull ExtractedClojureParser.Special_formContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#lambda}. * @param ctx the parse tree * @return the visitor result */ T visitLambda(@NotNull ExtractedClojureParser.LambdaContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#form}. * @param ctx the parse tree * @return the visitor result */ T visitForm(@NotNull ExtractedClojureParser.FormContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#var_quote}. * @param ctx the parse tree * @return the visitor result */ T visitVar_quote(@NotNull ExtractedClojureParser.Var_quoteContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#reader_macro}. * @param ctx the parse tree * @return the visitor result */ T visitReader_macro(@NotNull ExtractedClojureParser.Reader_macroContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#regex}. * @param ctx the parse tree * @return the visitor result */ T visitRegex(@NotNull ExtractedClojureParser.RegexContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#vector}. * @param ctx the parse tree * @return the visitor result */ T visitVector(@NotNull ExtractedClojureParser.VectorContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#file}. * @param ctx the parse tree * @return the visitor result */ T visitFile(@NotNull ExtractedClojureParser.FileContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#map}. * @param ctx the parse tree * @return the visitor result */ T visitMap(@NotNull ExtractedClojureParser.MapContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#list}. * @param ctx the parse tree * @return the visitor result */ T visitList(@NotNull ExtractedClojureParser.ListContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#meta_data}. * @param ctx the parse tree * @return the visitor result */ T visitMeta_data(@NotNull ExtractedClojureParser.Meta_dataContext ctx); /** * Visit a parse tree produced by {@link ExtractedClojureParser#literal}. * @param ctx the parse tree * @return the visitor result */ T visitLiteral(@NotNull ExtractedClojureParser.LiteralContext ctx); }
[ "eenassbutrus@gmail.com" ]
eenassbutrus@gmail.com
fd6953e44b7b44154c4bfd81514f3329efa08310
10d77fabcbb945fe37e15ae438e360a89a24ea05
/graalvm/transactions/fork/narayana/XTS/WS-C/dev/src/com/arjuna/webservices11/wsarj/ArjunaContext.java
41f701f35915b59bfdb24b8bf93373af8822906c
[ "LGPL-2.1-only", "Apache-2.0", "LGPL-2.1-or-later", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-proprietary-license", "SMLNJ", "GPL-1.0-or-later", "LicenseRef-scancode-other-permissive", "CDDL-1.0", "LicenseRef-scancode-warranty-disclaimer", "Apache-1.1", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "GPL-2.0-only", "BSD-2-Clause" ]
permissive
nmcl/scratch
1a881605971e22aa300487d2e57660209f8450d3
325513ea42f4769789f126adceb091a6002209bd
refs/heads/master
2023-03-12T19:56:31.764819
2023-02-05T17:14:12
2023-02-05T17:14:12
48,547,106
2
1
Apache-2.0
2023-03-01T12:44:18
2015-12-24T15:02:58
Java
UTF-8
Java
false
false
2,333
java
package com.arjuna.webservices11.wsarj; import com.arjuna.webservices11.wsarj.InstanceIdentifier; import javax.xml.ws.handler.MessageContext; /** * The arjuna context. * @author kevin */ public class ArjunaContext { /** * The key used for the arjuna context within a message exchange. */ private static final String ARJUNAWS_CONTEXT_PROPERTY = "org.jboss.xts.ws.context"; /** * The InstanceIdentifier header. */ private InstanceIdentifier instanceIdentifier ; /** * Default constructor. */ private ArjunaContext() { } /** * Get the instance identifier. * @return The instance identifier. */ public InstanceIdentifier getInstanceIdentifier() { return instanceIdentifier ; } /** * Set the instance identifier. * @param instanceIdentifier The instance identifier. */ public void setInstanceIdentifier(final InstanceIdentifier instanceIdentifier) { this.instanceIdentifier = instanceIdentifier ; } /** * Is the configuration of this element valid? * @return true if valid, false otherwise. */ public boolean isValid() { return ((instanceIdentifier != null) && instanceIdentifier.isValid()) ; } /** * Get the arjuna context from the message context if present. * @param messageContext The message context. * @return The arjuna context or null if not present. */ public static ArjunaContext getCurrentContext(final MessageContext messageContext) { return (ArjunaContext)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ; } /** * Get the arjuna context from the message context. * @param messageContext The message context. * @return The arjuna context. */ public static ArjunaContext getContext(final MessageContext messageContext) { final ArjunaContext current = (ArjunaContext)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ; if (current != null) { return current ; } final ArjunaContext newContext = new ArjunaContext() ; messageContext.put(ARJUNAWS_CONTEXT_PROPERTY, newContext) ; messageContext.setScope(ARJUNAWS_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION); return newContext ; } }
[ "mlittle@redhat.com" ]
mlittle@redhat.com
1786610191746231c6dc7ede1e325eaf72076820
960a750f64a87eb0c9c215dcaaebc61166616397
/app/src/main/java/com/supermap/demo/test/bean/DetailBusinessBean.java
d7edf00bd171a96a14c9fbdca6a2317d97c388ed
[]
no_license
qiangshi/Test_Demo
5d25637f7352115035a5e76edb7181dc59e6caf2
296e7d98f1a5f7a034614560de700b89be62a208
refs/heads/master
2020-05-17T06:13:09.324468
2019-04-27T03:07:53
2019-04-27T03:07:53
183,550,235
0
0
null
null
null
null
UTF-8
Java
false
false
1,336
java
package com.supermap.demo.test.bean; /** * @ClassName: DetailBusinessBean * @Description: java类作用描述 * @Author: 曾海强 * @CreateDate: 2019/4/14 17:12 */ public class DetailBusinessBean { private String month; private String year; private String license; private String landUse; private String approvals; public DetailBusinessBean(String month, String year, String license, String landUse, String approvals) { this.month = month; this.year = year; this.license = license; this.landUse = landUse; this.approvals = approvals; } public String getMonth() { return month; } public void setMonth(String month) { this.month = month; } public String getYear() { return year; } public void setYear(String year) { this.year = year; } public String getLicense() { return license; } public void setLicense(String license) { this.license = license; } public String getLandUse() { return landUse; } public void setLandUse(String landUse) { this.landUse = landUse; } public String getApprovals() { return approvals; } public void setApprovals(String approvals) { this.approvals = approvals; } }
[ "1104827297@qq.com" ]
1104827297@qq.com
1c66bfa3ce851313d6f8702dc274b8b139d96d45
cdff118a93947b54dfa32f258da2deb939af033c
/campaign/comm/CommMessageAPI.java
4c1b46d6aa2d80474165010298647024785877c6
[]
no_license
wilki24/Starsector-API
c12ea5d0c131f5cdd26d6799ac63f9a61d9b93fb
825b1bde4d2b3808c1ebd23a8afbb2414f7aed6d
refs/heads/main
2023-08-18T07:56:54.486127
2021-09-19T01:53:04
2021-09-19T01:53:04
408,007,467
0
0
null
null
null
null
UTF-8
Java
false
false
3,042
java
package com.fs.starfarer.api.campaign.comm; import java.awt.Color; import java.util.Collection; import java.util.List; import java.util.Map; import org.lwjgl.util.vector.Vector2f; import com.fs.starfarer.api.campaign.OnMessageDeliveryScript; import com.fs.starfarer.api.campaign.SectorEntityToken; import com.fs.starfarer.api.campaign.econ.MarketAPI; import com.fs.starfarer.api.campaign.events.CampaignEventPlugin; import com.fs.starfarer.api.campaign.events.CampaignEventPlugin.PriceUpdatePlugin; import com.fs.starfarer.api.util.Highlights; public interface CommMessageAPI { public static enum MessageClickAction { FLEET_TAB, REFIT_TAB, INTEL_TAB, CHARACTER_TAB, INCOME_TAB, COLONY_INFO, INTERACTION_DIALOG, NOTHING, } public static final String MESSAGE_FACTION_ID_KEY = "CMAPIfactionId"; public static final String MESSAGE_PERSON_ID_KEY = "CMAPIpersonId"; Color getSubjectColor(); void setSubjectColor(Color defaultColor); OnMessageDeliveryScript getOnDelivery(); void setOnDelivery(OnMessageDeliveryScript onDelivery); String getId(); boolean isAddToIntelTab(); void setAddToIntelTab(boolean addToIntelTab); String getType(); void setType(String type); String getShortType(); void setShortType(String shortType); String getDeliveredBy(); void setDeliveredBy(String deliveredBy); String getSender(); void setSender(String sender); long getTimeSent(); void setTimeSent(long timeSent); long getTimeReceived(); void setTimeReceived(long timeReceived); String getSubject(); void setSubject(String subject); MessageSectionAPI getSection1(); MessageSectionAPI getSection2(); MessageSectionAPI getSection3(); String getSound(); void setSound(String sound); String getSmallIcon(); void setSmallIcon(String smallIcon); String getImage(); void setImage(String largeIcon); String getStarSystemId(); void setStarSystemId(String starSystemId); String getLocationString(); void setLocationString(String locationString); Highlights getSubjectHighlights(); void setSubjectHighlights(Highlights subjectHighlights); String getChannel(); void setChannel(String channel); Object getCustomData(); void setCustomData(Object customData); CampaignEventPlugin getEvent(); String getNote(); void setNote(String note); Color getNoteColor(); void setNoteColor(Color noteColor); boolean hasTag(String tag); void addTag(String tag); void removeTag(String tag); Collection<String> getTags(); void clearTags(); Map<String, Object> getCustomMap(); String getMarketId(); void setMarketId(String marketId); MarketAPI getMarket(); List<PriceUpdatePlugin> getPriceUpdates(); void setPriceUpdates(List<PriceUpdatePlugin> priceUpdates); boolean isShowInCampaignList(); void setShowInCampaignList(boolean showInCampaignList); MessageClickAction getAction(); void setAction(MessageClickAction action); Vector2f getLocInHyper(); void setLocInHyper(Vector2f locInHyper); SectorEntityToken getCenterMapOnEntity(); void setCenterMapOnEntity(SectorEntityToken centerMapOnEntity); }
[ "8873894+wilki24@users.noreply.github.com" ]
8873894+wilki24@users.noreply.github.com
e70189c10f176ee98b995390774b0a28d763fa4b
3c6f4bb030a42d19ce8c25a931138641fb6fd495
/finance-invest/finance-invest-api/src/main/java/com/hongkun/finance/invest/service/BidTransferAutoService.java
108df3966181acebfbbbfb024d78e3c53c1378de
[]
no_license
happyjianguo/finance-hkjf
93195df26ebb81a8b951a191e25ab6267b73aaca
0389a6eac966ee2e4887b6db4f99183242ba2d4e
refs/heads/master
2020-07-28T13:42:40.924633
2019-08-03T00:22:19
2019-08-03T00:22:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,443
java
package com.hongkun.finance.invest.service; import java.math.BigDecimal; import java.util.Date; import java.util.List; import com.yirun.framework.core.model.ResponseEntity; import com.yirun.framework.core.utils.pager.Pager; import com.hongkun.finance.invest.model.BidInfo; import com.hongkun.finance.invest.model.BidInfoDetail; import com.hongkun.finance.invest.model.BidInvest; import com.hongkun.finance.invest.model.BidMatch; import com.hongkun.finance.invest.model.BidTransferAuto; import com.hongkun.finance.invest.model.vo.TransferAutoVo; /** * @Project : finance * @Program Name : com.hongkun.finance.invest.service.BidTransferAutoService.java * @Class Name : BidTransferAutoService.java * @Description : GENERATOR SERVICE类 * @Author : generator */ public interface BidTransferAutoService { /** * @Described : 单条插入 * @param bidTransferAuto 持久化的数据对象 * @return : void */ void insertBidTransferAuto(BidTransferAuto bidTransferAuto); /** * @Described : 批量插入 * @param List<BidTransferAuto> 批量插入的数据 * @return : void */ void insertBidTransferAutoBatch(List<BidTransferAuto> list); /** * @Described : 批量插入 * @param List<BidTransferAuto> 批量插入的数据 * @param count 多少条数提交一次 * @return : void */ void insertBidTransferAutoBatch(List<BidTransferAuto> list, int count); /** * @Described : 更新数据 * @param bidTransferAuto 要更新的数据 * @return : void */ void updateBidTransferAuto(BidTransferAuto bidTransferAuto); /** * @Described : 批量更新数据 * @param bidTransferAuto 要更新的数据 * @param count 多少条数提交一次 * @return : void */ void updateBidTransferAutoBatch(List<BidTransferAuto> list, int count); /** * @Described : 通过id查询数据 * @param id id值 * @return BidTransferAuto */ BidTransferAuto findBidTransferAutoById(int id); /** * @Described : 条件检索数据 * @param bidTransferAuto 检索条件 * @return List<BidTransferAuto> */ List<BidTransferAuto> findBidTransferAutoList(BidTransferAuto bidTransferAuto); /** * @Described : 条件检索数据 * @param bidTransferAuto 检索条件 * @param start 起始页 * @param limit 检索条数 * @return List<BidTransferAuto> */ List<BidTransferAuto> findBidTransferAutoList(BidTransferAuto bidTransferAuto, int start, int limit); /** * @Described : 条件检索数据 * @param bidTransferAuto 检索条件 * @param pager 分页数据 * @return List<BidTransferAuto> */ Pager findBidTransferAutoList(BidTransferAuto bidTransferAuto, Pager pager); /** * @Described : 统计条数 * @param bidTransferAuto 检索条件 * @param pager 分页数据 * @return int */ int findBidTransferAutoCount(BidTransferAuto bidTransferAuto); /** * @Description : 添加债权转让记录 * @Method_Name : addCreditorTransfer * @param oldInvest * @param newInvest * @param comnBidInfo * @param creditorAmount * @return : void * @Creation Date : 2017年6月17日 下午2:48:22 * @Author : xuhuiliu@hongkun.com.cn 刘旭辉 */ void addCreditorTransfer(BidInvest oldInvest, BidInvest newInvest,BidInfo comnBidInfo, BigDecimal creditorAmount, Date transferTime,int adminUserId) ; /** * @Description : 债权转让(后台匹配) * @Method_Name : addTransferAuto * @param comnBidInfo 散标标的 * @param transferInvestList 待转让投资记录 * @param receiveInvestList 接受投资记录 * @return * @return : ResponseEntity<?> * @Creation Date : 2017年6月17日 下午2:47:52 * @Author : xuhuiliu@hongkun.com.cn 刘旭辉 */ ResponseEntity<?> addTransferAuto(BidInfo comnBidInfo,List<BidInvest> transferInvestList, List<BidInvest> receiveInvestList,Date transferTime,int adminUserId) ; /** * @Description : 散标二次匹配时,生成优选标之间的转让记录 * @Method_Name : addTransferRecord * @param transferBids 待转让的优选标的列表 * @param newGoodBids 待接受的优选标列表 * @param transferDate 转让时间 * @param comnBidInfo 散标标的 * @return * @return : ResponseEntity<?> * @Creation Date : 2017年7月19日 上午11:51:18 * @Author : xuhuiliu@hongkun.com.cn 劉旭輝 */ ResponseEntity<?> addTransferRecord(List<BidInfo> transferBids, List<BidInfo> newGoodBids, Date transferDate, BidInfo comnBidInfo); /** * @Description : 匹配---数据处理 * @Method_Name : match * @param bidInvestList 不用债权转让的投资记录集合,散标首次匹配 * @param transferAutoVo 债权转让参数 * @param matchList 匹配记录 * @param updateGoodInvestList 需要更新的优选投资记录 * @param bidInfoDetailList 需要更新的标的列表 * @param adminUserId 操作人id * @return * @return : ResponseEntity<?> * @Creation Date : 2017年7月31日 下午2:14:57 * @Author : xuhuiliu@hongkun.com.cn 劉旭輝 */ ResponseEntity<?> match(List<BidInvest> bidInvestList,List<TransferAutoVo> transferAutoVo,List<BidMatch> matchList, List<BidInvest> updateGoodInvestList, List<BidInfoDetail> bidInfoDetailList,int adminUserId); }
[ "zc.ding@foxmail.com" ]
zc.ding@foxmail.com
6de1845d3ee84bcc30bb83876fd2f45afc3c0050
2a716bbd1f98fb35329058511cc0e919732cad79
/uk.ac.gda.core.test/src/gda/device/detector/countertimer/AllJUnitTests.java
0035b244bbab51a4eab60ea4142ef5a09d7aaa7d
[]
no_license
kusamau/gda-core
f88f4e5c4643bfc3370cc7e42fca56de27af0aca
567cf81772f1327b40948ee1819a8b7e310f4c95
refs/heads/master
2020-05-02T09:43:48.621943
2019-03-26T13:04:27
2019-03-26T13:04:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
963
java
/*- * Copyright © 2009 Diamond Light Source Ltd., Science and Technology * Facilities Council * * This file is part of GDA. * * GDA is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License version 3 as published by the Free * Software Foundation. * * GDA 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 GDA. If not, see <http://www.gnu.org/licenses/>. */ package gda.device.detector.countertimer; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * Run all JUnit tests in package and sub-packages */ @RunWith(Suite.class) @Suite.SuiteClasses( { CollectionSetterTest.class }) public class AllJUnitTests { }
[ "dag-group@diamond.ac.uk" ]
dag-group@diamond.ac.uk
94225a236d371a99e1b6e07252b7ab25e25495c3
770c76a2180ee695bc02064d24d87f5c47c0fb79
/factory-dz/src/main/java/com/lc/ibps/pgs/PGData/persistence/dao/DcwjxjQueryDao.java
45e4eab41f5c7e59446cc8873cf977cf1d8f17af
[]
no_license
incidunt/qingjiao_dev
aff658944c0f89c822d547f5a2180649f48cbf00
385a69cddabc784e974f7d802807fc19101e83ee
refs/heads/master
2020-09-23T17:05:12.859324
2018-12-18T08:26:04
2018-12-18T08:26:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package com.lc.ibps.pgs.PGData.persistence.dao; import java.util.List; import com.lc.ibps.base.framework.persistence.dao.IQueryDao; import com.lc.ibps.pgs.PGData.persistence.entity.DcwjxjPo; /** * t_dcwjxj 查询Dao接口 * *<pre> * 开发公司:广州流辰信息技术有限公司 * 开发人员:eddy * 邮箱地址:1546077710@qq.com * 创建时间:2018-05-04 17:37:35 *</pre> */ public interface DcwjxjQueryDao extends IQueryDao<String, DcwjxjPo> { List<DcwjxjPo> queryByType(String type); }
[ "marco23037@163.com" ]
marco23037@163.com
6b89a547a3a8c1996ab7c3103db4591bd5ebc6ae
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/104/79.java
ea32fe791b960b168c92b8c1c68e280847cdb89e
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
package <missing>; public class GlobalMembers { public static void Main() { int x; int y; int i; int count1; int count2; int[] a = new int[20]; int[] b = new int[20]; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { x = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { y = Integer.parseInt(tempVar2); } for (count1 = 0;x != 0;count1++) { a[count1] = x; x /= 2; } for (count2 = 0;y != 0;count2++) { b[count2] = y; y /= 2; } i = 0; do { i++; }while (a[count1 - i] == b[count2 - i]); System.out.printf("%d",a[count1 - i + 1]); } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
61ce17948637a4a6a461c3e3d6aa1099c2c57646
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13544-6-1-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/DocumentContentDisplayer_ESTest_scaffolding.java
4fbc01859ecfda5ef65c538a8e10ee927cc1bd46
[]
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
455
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Jan 20 15:38:40 UTC 2020 */ package org.xwiki.display.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DocumentContentDisplayer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b5c195ab468dabfdf12cfb248773adcbc27750d0
6e47715760eec5e49af7aa631a8aa879913b4520
/app/src/cn/dressbook/ui/model/MYXChild.java
9f7cafb22f472327b61eda60e2846746f9502513
[]
no_license
yuandonghua/DressBook
65db02eb77a7e2fc9a56a2c700ad7ed89e5fbf42
f2870142e3bdcab003fc48ef90d84619d3991174
refs/heads/master
2021-01-17T18:21:18.076691
2016-09-19T14:21:32
2016-09-19T14:21:32
68,613,330
1
1
null
null
null
null
UTF-8
Java
false
false
1,880
java
package cn.dressbook.ui.model; import android.os.Parcel; import android.os.Parcelable; /** * @description: 买手推荐方案 * @author:袁东华 * @time:2015-8-7下午4:54:15 */ public class MYXChild implements Parcelable { private String id; private String title; private String first; private String urlPic; private String url; private String external_url; public MYXChild() { } public String getExternal_url() { return external_url; } public void setExternal_url(String external_url) { this.external_url = external_url; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getFirst() { return first; } public void setFirst(String first) { this.first = first; } public String getUrlPic() { return urlPic; } public void setUrlPic(String urlPic) { this.urlPic = urlPic; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @Override public int describeContents() { // TODO Auto-generated method stub return 0; } @Override public void writeToParcel(Parcel out, int flags) { out.writeString(external_url); out.writeString(id); out.writeString(title); out.writeString(first); out.writeString(urlPic); out.writeString(url); } public static final Creator<MYXChild> CREATOR = new Creator<MYXChild>() { @Override public MYXChild createFromParcel(Parcel in) { return new MYXChild(in); } @Override public MYXChild[] newArray(int urlPic) { return new MYXChild[urlPic]; } }; private MYXChild(Parcel in) { external_url = in.readString(); id = in.readString(); title = in.readString(); first = in.readString(); urlPic = in.readString(); url = in.readString(); } }
[ "1348474384@qq.com" ]
1348474384@qq.com
2fed52e400d5f8b3bb1e9f2ed95af6c62f090e30
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/androidx/compose/foundation/lazy/n.java
2bb469b2db0ba0ea6bd4a109136fb3f69ce9c201
[]
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
1,070
java
package androidx.compose.foundation.lazy; import java.util.List; import kotlin.Metadata; import kotlin.ah; import kotlin.g.a.m; @Metadata(d1={""}, d2={"Landroidx/compose/foundation/lazy/LazyListItemsProvider;", "", "headerIndexes", "", "", "getHeaderIndexes", "()Ljava/util/List;", "itemsCount", "getItemsCount", "()I", "getContent", "Lkotlin/Function0;", "", "Landroidx/compose/runtime/Composable;", "index", "scope", "Landroidx/compose/foundation/lazy/LazyItemScope;", "(ILandroidx/compose/foundation/lazy/LazyItemScope;)Lkotlin/jvm/functions/Function2;", "getKey", "foundation_release"}, k=1, mv={1, 5, 1}, xi=48) public abstract interface n { public abstract m<androidx.compose.runtime.h, Integer, ah> a(int paramInt, h paramh); public abstract Object bu(int paramInt); public abstract int getItemsCount(); public abstract List<Integer> mI(); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar * Qualified Name: androidx.compose.foundation.lazy.n * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
079d3619a514bc15b1607addfc67e3fb3ca37349
e417bba0fc4f2768abe309cb84dbc67025dc8f2b
/src/test/java/com/example/mapper/CountryMapperTests.java
21b36d76d34ff9ff7cc18965a31ba07a62e46ce1
[]
no_license
jys103402/spring01
335c1ae55a5a9304fb9c1f6cc784af5ce2a78783
c58490bd5fcaaf40550f6220f0f978f007fb0001
refs/heads/master
2021-01-19T20:22:31.996832
2017-03-06T07:44:46
2017-03-06T07:44:46
83,747,484
0
0
null
null
null
null
UTF-8
Java
false
false
2,009
java
package com.example.mapper; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import com.example.domain.Country; import com.example.exception.NotFoundRuntimeException; import com.example.util.Pagination; import scala.annotation.meta.setter; @SpringBootTest @RunWith(SpringRunner.class) public class CountryMapperTests { @Autowired CountryMapper mapper; @Test public void test00_SelectTotalCount(){ System.out.println("count = " + mapper.selectTotalCount()); } @Test public void test01_selectAll(){ List<Country> list = mapper.selectAll(); for(Country c : list){ System.out.println(c); } } @Test public void test01_selectAllWithCity(){ List<Country> list = mapper.selectAllWithCity(); for(Country c : list){ System.out.println(c); } } @Test public void test02_selectPage(){ Pagination paging = new Pagination(); paging.setTotalItem(mapper.selectTotalCount()); paging.setPageNo(24); List<Country> list = mapper.selectPage(paging); for(Country c : list){ System.out.println(c); } } @Test public void test02_selectPageWithCity(){ Pagination paging = new Pagination(); paging.setTotalItem(mapper.selectTotalCount()); paging.setPageNo(24); List<Country> list = mapper.selectPageWithCity(paging); for(Country c : list){ System.out.println(c); } } @Test public void test03_selectByCode(){ Country country = mapper.selectByCode("KOR"); if(country == null){ throw new NotFoundRuntimeException("country 가 업습니다."); } System.out.println(country); } @Test public void test03_selectByCodeWithCity(){ Country country = mapper.selectByCodeWithCity("USA"); if(country == null){ throw new NotFoundRuntimeException("country가 없습니다."); } System.out.println(country); } }
[ "java" ]
java
7111a8829fdc14b89783b820b4413a3e71e1dc5c
bead5c9388e0d70156a08dfe86d48f52cb245502
/MyNotes/design_pattern/Adapter_pattern/p1/Banner.java
9d081c64c1fc1ccfec909e9b8b0260f8d7bb9efa
[]
no_license
LinZiYU1996/Learning-Java
bd96e2af798c09bc52a56bf21e13f5763bb7a63d
a0d9f538c9d373c3a93ccd890006ce0e5e1f2d5d
refs/heads/master
2020-11-28T22:22:56.135760
2020-05-03T01:24:57
2020-05-03T01:24:57
229,930,586
0
0
null
null
null
null
UTF-8
Java
false
false
491
java
package design_pattern.Adapter_pattern.p1; /** * \* Created with IntelliJ IDEA. * \* User: LinZiYu * \* Date: 2020/2/6 * \* Time: 21:08 * \* Description: * \ */ public class Banner { // 实际情况 private String string; public Banner(String string) { this.string = string; } public void showWithParen(){ System.out.println("(" + string + ")" ); } public void showWithAster(){ System.out.println("*" + string + "*"); } }
[ "2669093302@qq.com" ]
2669093302@qq.com
dbd5cfeb35962a77c293492694820a84c91765a7
d0536669bb37019e766766461032003ad045665b
/jdk1.4.2_src/com/sun/corba/se/internal/io/LibraryManager.java
76de2e4d7b14466a7a5068fd985054076792f468
[]
no_license
eagle518/jdk-source-code
c0d60f0762bce0221c7eeb1654aa1a53a3877313
91b771140de051fb843af246ab826dd6ff688fe3
refs/heads/master
2021-01-18T19:51:07.988541
2010-09-09T06:36:02
2010-09-09T06:36:02
38,047,470
11
23
null
null
null
null
UTF-8
Java
false
false
2,816
java
/* * @(#)LibraryManager.java 1.31 03/01/23 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Licensed Materials - Property of IBM * RMI-IIOP v1.0 * Copyright IBM Corp. 1998 1999 All Rights Reserved * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ package com.sun.corba.se.internal.io; import java.security.AccessController; //import sun.security.action.LoadLibraryAction; import java.security.PrivilegedAction; public class LibraryManager { private static boolean attempted = false; private static int majorVersion = 1; private static int minorVersion = 11; /*sun.4296963 ibm.11861*/ native private static int getMajorVersion(); native private static int getMinorVersion(); public static boolean load() { // First check if the ioser library has already been loaded // by other code in this VM using System.load() // or System.loadLibrary(). try { if ( getMajorVersion() == majorVersion && getMinorVersion() == minorVersion ) { attempted = true; return true ; } } catch ( java.lang.UnsatisfiedLinkError ule ) { } // Now try to load the ioser library try{ String libName = "ioser12"; try{ AccessController.doPrivileged(new LoadLibraryAction(libName)); } catch(java.lang.UnsatisfiedLinkError ule1) { if (!attempted){ System.out.println( "ERROR! Shared library " + libName + " could not be found."); } throw ule1; } if ((!attempted) && ((getMajorVersion() != majorVersion) || (getMinorVersion() != minorVersion))) { System.out.println( "WARNING : The " + libName + " library is not the correct version."); System.out.println(" Expected v" + majorVersion + "." + minorVersion + " but loaded v" + getMajorVersion() + "." + getMinorVersion() + "\n"); System.out.println( " *** YOU ARE ADVISED TO USE EXPECTED VERSION ***"); } attempted = true; return true; } catch(Error e){ attempted = true; return false; } } private static native boolean setEnableOverride(Class targetClass, Object instance); } // For some reason it doesn't work with the public class // sun.security.action.LoadLibraryAction class LoadLibraryAction implements PrivilegedAction { private String libname; public LoadLibraryAction (String libname) { this.libname = libname; } public Object run() { System.loadLibrary(libname); return null; } }
[ "kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd" ]
kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd
fe6db4f435423fb92752edbf121fa3c6a17ed0d1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_fa82f1b6f00738e32a5a618e5ce537320d569218/DeployedComponentRetrievalService/10_fa82f1b6f00738e32a5a618e5ce537320d569218_DeployedComponentRetrievalService_s.java
1dc0c2ea489ad6f25098725d851ced3d685ec52a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,880
java
package org.iplantc.workflow.service; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.iplantc.persistence.RepresentableAsJson; import org.json.JSONObject; /** * A service that can be used to retrieve a list of known deployed components. * * @author Dennis Roberts */ public class DeployedComponentRetrievalService extends BaseWorkflowElementRetrievalService { /** * Initializes the superclass with the appropriate query. */ protected DeployedComponentRetrievalService() { super("from DeployedComponent", "components"); } /** * Initializes the superclass with the appropriate query and sets the session factory. * * @param sessionFactory the session factory. */ public DeployedComponentRetrievalService(SessionFactory sessionFactory) { this(); setSessionFactory(sessionFactory); } /** * This is the service entry point. This method deals with all of the database details of retrieving * the list of filtered components and marshalling them into a JSONObject. * * @return the marshalled list of filtered deployed components. */ public JSONObject searchComponents(String searchTerm) { Session session = sessionFactory.openSession(); Transaction tx = null; JSONObject result = null; try { tx = session.beginTransaction(); result = marshall(filterComponents(session, searchTerm)); tx.commit(); } catch (RuntimeException e) { if (tx != null) { tx.rollback(); } throw e; } finally { session.close(); } return result; } /** * Retrieves a list of deployed components filtered by name or description. * * @param session the Hibernate session. * @param searchTerm the term used to filter the list of deployed components by name or description. * @return the list of filtered deployed components. */ private List<RepresentableAsJson> filterComponents(Session session, String searchTerm) { String searchClause = "lower(%1$s) like '%%' || lower(:search) || '%%' escape '\\'"; String escapedSearchTerm = searchTerm.replaceAll("([\\\\%_])", "\\\\$1"); String filter = String.format("where %1$s OR %2$s", String.format(searchClause, "name"), String.format(searchClause, "description")); Query query = session.createQuery(queryString + " " + filter).setParameter("search", escapedSearchTerm); return (List<RepresentableAsJson>)query.list(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
091123d49dde34540ae2a9f4b02342820983cebb
690f3f008d94abf130c4005146010cd63cd71567
/springbootInAction/highlight_springmvc4/src/main/java/com/wisely/highlight_springmvc4/service/PushService.java
6cefcfd1c2fdd5429185bfde73b78616624dc49b
[]
no_license
Oaks907/bookspace
819b8ec87067f8e9776a8b79210c74d33673aec9
114a4fc43ed6134b4a236ccdffd30a9594b54796
refs/heads/master
2022-12-24T17:01:02.454129
2021-05-26T15:53:02
2021-05-26T15:53:02
143,092,798
0
0
null
2022-12-16T05:20:36
2018-08-01T02:19:53
Java
UTF-8
Java
false
false
721
java
package com.wisely.highlight_springmvc4.service; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import org.springframework.web.context.request.async.DeferredResult; /** * @ClassName PushService * @USER haifei * @DATE 27/8/2018 10:18 AM * @Description */ @Service public class PushService { private DeferredResult<String> deferredResult; public DeferredResult<String> getAsyncUPdate() { deferredResult = new DeferredResult<>(); return deferredResult; } @Scheduled(fixedDelay = 5000) public void refresh() { if (deferredResult != null) { deferredResult.setResult(new Long(System.currentTimeMillis()).toString()); } } }
[ "haifei.li@renren-inc.com" ]
haifei.li@renren-inc.com
f488617d3ceed9ab45b853d7e879e004ba6009d9
aa76c179f0b424cdf4d0f11e89265881443bdd9a
/app/src/main/java/com/lltech/manager/activity/dialog/AreaAty.java
bb1f004e92a4b3d5f42b42fdfb863a71e4946355
[]
no_license
317764920/manager
ad9a63567e6c9f1c2c0787a1bc8085bda755df13
9813fcfe8208a4d5be746dca7d6e4b58fb0b9ca3
refs/heads/master
2020-12-25T09:38:17.988949
2016-06-23T08:39:28
2016-06-23T08:39:28
61,787,972
0
0
null
null
null
null
UTF-8
Java
false
false
5,037
java
package com.lltech.manager.activity.dialog; import android.content.Intent; import android.view.View; import android.widget.AdapterView; import com.android.volley.VolleyError; import com.lcx.mysdk.adapter.BaseAdapterHelper; import com.lcx.mysdk.adapter.QuickAdapter; import com.lcx.mysdk.application.BaseApplication; import com.lcx.mysdk.entity.Data; import com.lcx.mysdk.entity.ReqData; import com.lcx.mysdk.utils.CommonUtil; import com.lcx.mysdk.utils.LoginManager; import com.lcx.mysdk.utils.JsonUtils; import com.lcx.mysdk.utils.VolleyHttp; import com.lltech.manager.R; import com.lltech.manager.activity.LoginAty; import com.lltech.manager.common.DiaLogCode; import com.lltech.manager.entity.Req; import com.lltech.manager.entity.dialog.AreaInfo; import com.lltech.manager.entity.dialog.DialogReq; import com.lltech.manager.entity.dialog.DialogRes; import com.lltech.manager.util.UrlCons; import com.lltech.manager.widget.Msg; import com.lltech.manager.widget.TopBar; import java.util.LinkedList; /** * 选择项目区域 */ public class AreaAty extends DialogListAty { private BaseApplication application = BaseApplication.getApplication(); private LinkedList<AreaInfo> list = new LinkedList<AreaInfo>(); private QuickAdapter<AreaInfo> adapter; private int pageIndex = 0; private int pageType = Req.PULL_DOWN; private ReqData data; private DialogRes res; @Override public void initViews() { super.initViews(); } @Override public void initData() { refresh(); } @Override public void initListeners() { super.initListeners(); } @Override public void initConfig() { topBar.setTopText("选择项目区域"); topBar.setBtnStatus(TopBar.RIGHT1, View.GONE); topBar.setBtnStatus(TopBar.RIGHT2, View.GONE); } @Override public void setAdapter() { adapter = new QuickAdapter<AreaInfo>(this, R.layout.item_dialog, list) { @Override protected void convert(final BaseAdapterHelper helper, AreaInfo item) { helper.setText(R.id.id, item.getAreaID()); helper.setText(R.id.text, item.getAreaName()); } }; pullToRefresh.setAdapter(adapter); } @Override public void setItemClick(AdapterView<?> parent, View view, int position, long arg) { AreaInfo item = (AreaInfo) parent.getAdapter().getItem(position); Intent intent = getIntent(); intent.putExtra("id", item.getAreaID()); intent.putExtra("text", item.getAreaName()); setResult(DiaLogCode.AREA, intent); finish(); } @Override public void pullDown() { pageType = Req.PULL_DOWN; pageIndex = 0; refresh(); } @Override public void pullUp() { pageType = Req.PULL_UP; pageIndex++; refresh(); } private void refresh() { startProgressDialog(); String url = UrlCons.url(UrlCons.GetDialogData.GET); DialogReq req = new DialogReq(); req.setPageIndex(pageIndex); req.setSerialNumber(DialogReq.AREA); data = new ReqData(req); VolleyHttp.send(VolleyHttp.POST, url, data, new VolleyHttp.OnResponse() { @Override public void onOk(Data data) { String response = data.getResponse().toString(); res = JsonUtils.jsonToEntity(response, DialogRes.class); if (CommonUtil.isNotEmpty(res)) { list = res.getAreaList(); switch (pageType) { case Req.PULL_DOWN: { adapter.replaceAll(list); pullToRefresh.onRefreshComplete(true); break; } case Req.PULL_UP: { adapter.addAll(list); pullToRefresh.onRefreshComplete(); break; } } } stopProgressDialog(); } @Override public void onFail(Data data) { if (pageIndex > 0) { pageIndex--; } pullToRefresh.onRefreshComplete(); stopProgressDialog(); Msg.showError(application, VolleyHttp.errorInfo(data)); } @Override public void onError(VolleyError volleyError) { if (pageIndex > 0) { pageIndex--; } pullToRefresh.onRefreshComplete(); stopProgressDialog(); Msg.showError(application, getString(R.string.net_error)); } }, new VolleyHttp.OnTokenError() { @Override public void onTokenError() { new LoginManager().goToLogin(AreaAty.this, LoginAty.class, true); } }); } }
[ "java" ]
java
aaf3ec82fc4ac6ab634edb505eac6cfb23befad1
f0489dac17a48f535420651e6492a7d857e1ea03
/Java SE/Spring-Prooduct-APP/src/main/java/com/pennant/product/service/ProductService.java
5e7be589c44be3fe88ffbdb94a738e2c052619d6
[]
no_license
tracksdata/Java-Pennant
d696c78aa75a4c6cafeceec3fd0f6c9defcd0370
b5cd10e8ad936b6589742122d241389f9084d109
refs/heads/master
2021-09-13T13:01:30.673956
2018-04-30T06:56:23
2018-04-30T06:56:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.pennant.product.service; import java.util.List; import com.pennant.product.model.Product; public interface ProductService { public void saveProduct(Product prod); public void findProduct(String prodId); public List<Product> listAll(); }
[ "praveen.somireddy@gmail.com" ]
praveen.somireddy@gmail.com
72a3dba8aadef3d2cf09c2626e93d93ef14c4901
ef3d002f24eb93fc11776588e7343f7c213f1fa4
/basic-ioc-framework/src/com/iocframework/bean/SimpleBean.java
35523428cc6193c969873bd95845b962c6b7b4ba
[]
no_license
kbhatt23/java-reflection-annotation
2c6efbefa3435eef6b0b9d9abc303a0f0b0f7150
79765f6b1814f5378f33c08c48718d6cd614c894
refs/heads/main
2023-01-11T00:07:14.451768
2020-11-15T13:08:56
2020-11-15T13:08:56
303,308,142
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package com.iocframework.bean; import annotations.IOCAutowired; import annotations.IOCComponent; @IOCComponent public class SimpleBean { @IOCAutowired private AnotherBean anotherBean; public AnotherBean getAnotherBean() { return anotherBean; } public void setAnotherBean(AnotherBean anotherBean) { this.anotherBean = anotherBean; } }
[ "kanishklikesprogramming@gmail.com" ]
kanishklikesprogramming@gmail.com
2c6ab43cb1cb42ba1c6f3fcd772e47c70c7db6ef
cf4dfab6abf2f1512b3312f0d06e891e67aa1b17
/gmall-api/src/main/java/com/xiepanpan/gmall/ums/service/MemberMemberTagRelationService.java
f3cad31558d906e963b898173cbe3e126c366047
[]
no_license
xiepanpan/gmall-parent
564cfda41ed8e358012c4a90f04acf4ef09d3acc
5c50cbab58d4c83d440f9b3c1e9eac1f1fc80809
refs/heads/master
2022-06-22T12:02:58.320687
2020-04-03T08:39:01
2020-04-03T08:39:01
226,306,527
0
0
null
2022-06-21T02:23:38
2019-12-06T10:42:57
Java
UTF-8
Java
false
false
367
java
package com.xiepanpan.gmall.ums.service; import com.xiepanpan.gmall.ums.entity.MemberMemberTagRelation; import com.baomidou.mybatisplus.extension.service.IService; /** * <p> * 用户和标签关系表 服务类 * </p> * * @author xiepanpan * @since 2019-12-06 */ public interface MemberMemberTagRelationService extends IService<MemberMemberTagRelation> { }
[ "xiepanpan@thunisoft.com" ]
xiepanpan@thunisoft.com
cd42a19c900718636095aee3e509d9dd88d9242a
f89d8a84896f78e5bcf0d88fc4cca7d08fbb958e
/vitro-core/webapp/src/edu/cornell/mannlib/vitro/webapp/search/indexing/AdditionalURIsForClassGroupChanges.java
fafc9e0270178a510e668b6e301d24021509bc0f
[]
no_license
Data-to-Insight-Center/sead-vivo
c65ca49f663ec3770b8ad25e009d1a90c476ec56
c82ac568e5fc4691fa7d4981328b8049bfdc87f5
refs/heads/master
2020-04-15T06:15:38.963277
2020-02-01T16:17:13
2020-02-01T16:17:13
14,767,397
0
1
null
null
null
null
UTF-8
Java
false
false
3,991
java
/* Copyright (c) 2013, Cornell University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Cornell University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * */ package edu.cornell.mannlib.vitro.webapp.search.indexing; import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.hp.hpl.jena.ontology.OntModel; import com.hp.hpl.jena.rdf.model.Statement; import com.hp.hpl.jena.rdf.model.StmtIterator; import com.hp.hpl.jena.shared.Lock; import com.hp.hpl.jena.vocabulary.RDF; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; import edu.cornell.mannlib.vitro.webapp.search.beans.StatementToURIsToUpdate; /** * If a class changes classgroups, then all members of that class * will have to be update in the search since the serach include * the clasgroup membership of all individuals. * * Ex. when a statement like: * sub='http://vivoweb.org/ontology/core#Summer&#39; * pred='http://vitro.mannlib.cornell.edu/ns/vitro/0.7#inClassGroup&#39; * obj='http://vivoweb.org/ontology#vitroClassGrouppeople&#39; * changes, all members of the class core:Summer need to be update so they get the new classgroup values. */ public class AdditionalURIsForClassGroupChanges implements StatementToURIsToUpdate { private OntModel model; public AdditionalURIsForClassGroupChanges(OntModel model) { this.model = model; } @Override public List<String> findAdditionalURIsToIndex(Statement stmt) { if( stmt != null && VitroVocabulary.IN_CLASSGROUP.equals( stmt.getPredicate().getURI() ) && stmt.getSubject() != null ){ // its a classgroup membership change for a class, // update all individuals from the class. List<String> uris = new ArrayList<String>(); model.enterCriticalSection(Lock.READ); try{ StmtIterator iter = model.listStatements(null, RDF.type, stmt.getSubject()); while( iter.hasNext() ){ Statement typeStmt = iter.nextStatement(); if( typeStmt != null && typeStmt.getSubject().isURIResource() ){ uris.add(typeStmt.getSubject().getURI()); } } }finally{ model.leaveCriticalSection(); } return uris; }else{ return Collections.emptyList(); } } @Override public void startIndexing() { /* nothing to prepare */ } @Override public void endIndxing() { /* nothing to do */ } }
[ "kavchand@indiana.edu" ]
kavchand@indiana.edu
55c08ce56e3b84421871245202ccfc47afc8ebe4
a5cc9bd57f4784295ffbfca407d50b0e414fd153
/src/main/java/org/plutext/jaxb/xslfo/PageBreakInsideType.java
149090865ee7fcc7b4cd5ee52effa60e425d3006
[]
no_license
plutext/JAXB-classes-for-XSL-FO
31c658548fac740200d62917578565631f80a7af
6026dbf68780581c0b0b43b9069cb4a07560a387
refs/heads/master
2023-06-23T10:25:02.950164
2012-04-17T03:23:54
2012-04-17T03:23:54
3,914,707
1
1
null
null
null
null
UTF-8
Java
false
false
1,284
java
package org.plutext.jaxb.xslfo; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for page_break_inside_Type. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="page_break_inside_Type"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"> * &lt;enumeration value="auto"/> * &lt;enumeration value="avoid"/> * &lt;enumeration value="inherit"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "page_break_inside_Type") @XmlEnum public enum PageBreakInsideType { @XmlEnumValue("auto") AUTO("auto"), @XmlEnumValue("avoid") AVOID("avoid"), @XmlEnumValue("inherit") INHERIT("inherit"); private final String value; PageBreakInsideType(String v) { value = v; } public String value() { return value; } public static PageBreakInsideType fromValue(String v) { for (PageBreakInsideType c: PageBreakInsideType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "jason@plutext.org" ]
jason@plutext.org
33c9d7e7977aaa99f1753ba50d12ce64abb47a2e
73ddf37cb32504a6f504fe7bff8ef7842b15550a
/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java
aba811634568e16c18ed2653998f748d56e68ed2
[ "Apache-2.0" ]
permissive
onlyscorpion/scorpion-sql-parser
2c0ecd4758d5bc5e6f1a50e0fadcfcb012e3524f
a55f9597c7a3a8b9c610cacc5a957a41d3ea018a
refs/heads/master
2021-08-19T14:15:55.462593
2017-11-26T15:47:17
2017-11-26T15:47:17
112,094,653
1
0
null
null
null
null
UTF-8
Java
false
false
7,403
java
/* * Copyright 1999-2017 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.sql.ast.expr; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.*; import com.alibaba.druid.sql.visitor.SQLASTVisitor; import com.alibaba.druid.util.FnvHash; public class SQLAggregateExpr extends SQLExprImpl implements Serializable, SQLReplaceable { private static final long serialVersionUID = 1L; protected String methodName; protected long methodNameHashCod64; protected SQLAggregateOption option; protected final List<SQLExpr> arguments = new ArrayList<SQLExpr>(); protected SQLKeep keep; protected SQLOver over; protected SQLOrderBy withinGroup; protected Boolean ignoreNulls = false; public SQLAggregateExpr(String methodName){ this.methodName = methodName; } public SQLAggregateExpr(String methodName, SQLAggregateOption option){ this.methodName = methodName; this.option = option; } public String getMethodName() { return this.methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public long methodNameHashCod64() { if (methodNameHashCod64 == 0) { methodNameHashCod64 = FnvHash.hashCode64(methodName); } return methodNameHashCod64; } public SQLOrderBy getWithinGroup() { return withinGroup; } public void setWithinGroup(SQLOrderBy withinGroup) { if (withinGroup != null) { withinGroup.setParent(this); } this.withinGroup = withinGroup; } public SQLAggregateOption getOption() { return this.option; } public void setOption(SQLAggregateOption option) { this.option = option; } public List<SQLExpr> getArguments() { return this.arguments; } public void addArgument(SQLExpr argument) { if (argument != null) { argument.setParent(this); } this.arguments.add(argument); } public SQLOver getOver() { return over; } public void setOver(SQLOver over) { if (over != null) { over.setParent(this); } this.over = over; } public SQLKeep getKeep() { return keep; } public void setKeep(SQLKeep keep) { if (keep != null) { keep.setParent(this); } this.keep = keep; } public boolean isIgnoreNulls() { return this.ignoreNulls != null && this.ignoreNulls; } public Boolean getIgnoreNulls() { return this.ignoreNulls; } public void setIgnoreNulls(boolean ignoreNulls) { this.ignoreNulls = ignoreNulls; } public String toString() { return SQLUtils.toSQLString(this); } @Override protected void accept0(SQLASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, this.arguments); acceptChild(visitor, this.keep); acceptChild(visitor, this.over); acceptChild(visitor, this.withinGroup); } visitor.endVisit(this); } @Override public List getChildren() { List<SQLObject> children = new ArrayList<SQLObject>(); children.addAll(this.arguments); if (keep != null) { children.add(this.keep); } if (over != null) { children.add(over); } if (withinGroup != null) { children.add(withinGroup); } return children; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((arguments == null) ? 0 : arguments.hashCode()); result = prime * result + ((methodName == null) ? 0 : methodName.hashCode()); result = prime * result + ((option == null) ? 0 : option.hashCode()); result = prime * result + ((over == null) ? 0 : over.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } SQLAggregateExpr other = (SQLAggregateExpr) obj; if (arguments == null) { if (other.arguments != null) { return false; } } else if (!arguments.equals(other.arguments)) { return false; } if (methodName == null) { if (other.methodName != null) { return false; } } else if (!methodName.equals(other.methodName)) { return false; } if (over == null) { if (other.over != null) { return false; } } else if (!over.equals(other.over)) { return false; } if (option != other.option) { return false; } return true; } public SQLAggregateExpr clone() { SQLAggregateExpr x = new SQLAggregateExpr(methodName); x.option = option; for (SQLExpr arg : arguments) { x.addArgument(arg.clone()); } if (keep != null) { x.setKeep(keep.clone()); } if (over != null) { x.setOver(over.clone()); } if (withinGroup != null) { x.setWithinGroup(withinGroup.clone()); } x.ignoreNulls = ignoreNulls; return x; } public SQLDataType computeDataType() { long hash = methodNameHashCod64(); if (hash == FnvHash.Constants.COUNT || hash == FnvHash.Constants.ROW_NUMBER) { return SQLIntegerExpr.DEFAULT_DATA_TYPE; } if (arguments.size() > 0) { SQLDataType dataType = arguments.get(0).computeDataType(); if (dataType != null) { return dataType; } } if (hash == FnvHash.Constants.WM_CONCAT || hash == FnvHash.Constants.GROUP_CONCAT) { return SQLCharExpr.DEFAULT_DATA_TYPE; } return null; } public boolean replace(SQLExpr expr, SQLExpr target) { if (target == null) { return false; } for (int i = 0; i < arguments.size(); ++i) { if (arguments.get(i) == expr) { arguments.set(i, target); target.setParent(this); return true; } } return false; } }
[ "zhengchenglei@jd.com" ]
zhengchenglei@jd.com
2d9ce24474d46a8b3deb4a6d800b2a33e3e63bde
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
/Variant Programs/1-4/36/storeroom/CachingVoidExemptions.java
9fbbbf33cb6e821608fd36dbe7f138a139628446
[ "MIT" ]
permissive
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
42e4c2061c3f8da0dfce760e168bb9715063645f
a42ced1d5a92963207e3565860cac0946312e1b3
refs/heads/master
2020-08-09T08:10:08.888384
2019-11-25T01:14:23
2019-11-25T01:14:23
214,041,532
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package storeroom; public class CachingVoidExemptions extends java.lang.Exception { static final String morinWeighting = "0R8rcUu2rD"; public CachingVoidExemptions() { super(); } public CachingVoidExemptions(String telegram) { super(telegram); } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
ca78ed6101cfee8e8f7ef9e5eb304a84b100e7e4
e6d716fde932045d076ab18553203e2210c7bc44
/bluesky-pentaho-kettle/engine/src/main/java/org/pentaho/di/job/JobEntryListener.java
b49d88ce305312ce3db19b364a3ece2ad41eb34b
[]
no_license
BlueCodeBoy/bluesky
d04032e6c0ce87a18bcbc037191ca20d03aa133e
6fc672455b6047979527da9ba8e3fc220d5cee37
refs/heads/master
2020-04-18T10:47:20.434313
2019-01-25T03:30:47
2019-01-25T03:30:47
167,478,568
6
0
null
null
null
null
UTF-8
Java
false
false
1,358
java
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.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 org.pentaho.di.job; import org.pentaho.di.core.Result; import org.pentaho.di.job.entry.JobEntryCopy; import org.pentaho.di.job.entry.JobEntryInterface; public interface JobEntryListener { public void beforeExecution(Job job, JobEntryCopy jobEntryCopy, JobEntryInterface jobEntryInterface); public void afterExecution(Job job, JobEntryCopy jobEntryCopy, JobEntryInterface jobEntryInterface, Result result); }
[ "pp@gmail.com" ]
pp@gmail.com
5d978657cf54678e4dbae166f07c5169fd2c5518
52affbdd8b254f4db643fcf9f52e9e825048f4c1
/queryrouter/src/main/java/com/baidu/rigel/biplatform/queryrouter/QueryRouterApplication.java
f688d818b8abc475d40f05c79b99924bfe32034d
[ "Apache-2.0" ]
permissive
baidu/BIPlatform
d4f8a495fe6a7c152998347c10346287d48cd3d6
89155ca1d0c7e9d5d6200ca1d07b099b3eeeb03b
refs/heads/master
2023-08-12T05:07:38.594977
2023-04-21T00:37:33
2023-04-21T00:37:33
93,741,577
222
143
Apache-2.0
2019-03-08T04:54:18
2017-06-08T11:26:42
JavaScript
UTF-8
Java
false
false
4,667
java
/** * Copyright (c) 2014 Baidu, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.baidu.rigel.biplatform.queryrouter; import org.apache.catalina.connector.Connector; import org.apache.coyote.http11.Http11NioProtocol; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.redis.RedisAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory; import org.springframework.boot.context.embedded.FilterRegistrationBean; import org.springframework.boot.context.embedded.tomcat.TomcatConnectorCustomizer; import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory; import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; import com.baidu.rigel.biplatform.cache.util.ApplicationContextHelper; import com.baidu.rigel.biplatform.parser.RegisterFunction; import com.baidu.rigel.biplatform.parser.exception.RegisterFunctionException; import com.baidu.rigel.biplatform.queryrouter.query.udf.DateDataFunction; import com.baidu.rigel.biplatform.queryrouter.query.udf.RelativeRate; import com.baidu.rigel.biplatform.queryrouter.query.udf.SimilitudeRate; /** * * 平台服务入口 提供脱离tomcat容器提供queryservice的能力 * * @author 罗文磊 * @version 1.0.0.1 */ @Configuration @ComponentScan @EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class, RedisAutoConfiguration.class }) @ImportResource({ "applicationContext-queryrouter.xml"}) public class QueryRouterApplication extends SpringBootServletInitializer { /** * logger */ private static Logger logger = LoggerFactory.getLogger(QueryRouterApplication.class); /* * 设置gzip压缩 */ @Bean public EmbeddedServletContainerFactory servletContainer() { TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory(); tomcat.addConnectorCustomizers (customizer()); return tomcat; } @Bean public TomcatConnectorCustomizer customizer() { return new TomcatConnectorCustomizer() { @Override public void customize(Connector connector) { connector.setAttribute("socket.directBuffer", true); // nio2在第三方应用中存在问题 Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler(); protocol.setMaxThreads(1000); protocol.setMinSpareThreads(100); protocol.setMaxConnections(700); } }; } /** * 程序入口 * * @param args * 外部参数 */ public static void main(String[] args) { ConfigurableApplicationContext context = SpringApplication.run( QueryRouterApplication.class, args); try { RegisterFunction.register("rRate", RelativeRate.class); RegisterFunction.register("sRate", SimilitudeRate.class); RegisterFunction.register("dateData", DateDataFunction.class); } catch (RegisterFunctionException e) { // TODO Auto-generated catch block e.printStackTrace(); } ApplicationContextHelper.setContext(context); } /** * {@inheritDoc} */ @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(QueryRouterApplication.class); } }
[ "wangyuxue@baidu.com" ]
wangyuxue@baidu.com
22ee517f918e660f71c973893cf61d808946198a
f0d0631e221382c8a7d48c8bed6acc4efe0bfd2d
/JavaSource/org/unitime/commons/web/htmlgen/TableStream.java
59655280f9520c5f3f4ab6768bfbef8482fce894
[ "CC-BY-3.0", "EPL-1.0", "CC0-1.0", "CDDL-1.0", "MIT", "LGPL-2.1-or-later", "LGPL-3.0-only", "BSD-3-Clause", "LGPL-2.1-only", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-freemarker", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
tomas-muller/unitime
8c7097003b955053f32fe5891f1d29b554c4dd45
de307a63552128b75ae9a83d7e1d44c71b3dc266
refs/heads/master
2021-12-29T04:57:46.000745
2021-12-09T19:02:43
2021-12-09T19:02:43
30,605,965
4
0
Apache-2.0
2021-02-17T15:14:49
2015-02-10T18:01:29
Java
UTF-8
Java
false
false
1,720
java
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * The Apereo Foundation 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.unitime.commons.web.htmlgen; import java.io.IOException; import javax.servlet.jsp.JspWriter; /** * * @author Stephanie Schluttenhofer * */ public class TableStream extends ScrollTable { JspWriter outStream; public TableStream() { super(); } public TableStream(JspWriter out){ super(); outStream = out; } public JspWriter getOutStream() { return outStream; } public void setOutStream(JspWriter outStream) { this.outStream = outStream; } public void addContent(Object obj){ try { getOutStream().print(htmlForObject(obj)); } catch (IOException e) { e.printStackTrace(); } } public void tableDefComplete(){ try { getOutStream().print(startTagHtml()); } catch (IOException e) { e.printStackTrace(); } } public void tableComplete(){ try { getOutStream().print(endTagHtml()); } catch (IOException e) { e.printStackTrace(); } } }
[ "muller@unitime.org" ]
muller@unitime.org
929cdb4e308dfc5575da0e2e3b64b7d4cc279b12
4d8e1d4e5cd3406843e78a7e67bdfa848615841d
/src/main/java/com/yan/weather/controller/WeatherRestController.java
c8e6eee71b0a7f96a4915e731cf32568bde05c5b
[ "MIT" ]
permissive
yankj12/weather
a83d5f67d179e94bbd2bf37f2f2745d21bab7fbb
55dd39579f5bb93385c37081d16f24bc200e2bc4
refs/heads/master
2020-04-12T01:02:48.734485
2019-01-22T09:24:48
2019-01-22T09:24:48
162,220,225
0
0
null
null
null
null
UTF-8
Java
false
false
1,896
java
package com.yan.weather.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.yan.weather.service.facade.WeatherHistoryService; @RestController public class WeatherRestController { private static Logger logger = LoggerFactory.getLogger(WeatherRestController.class); @Autowired WeatherHistoryService weatherHistoryService; @RequestMapping("/crawlCityList") public String crawlCityList(@RequestParam(required = false) String areaCode){ logger.debug("================= crawlCityList ================="); try { weatherHistoryService.crawlWeatherCity(); } catch (Exception e) { e.printStackTrace(); return "error"; } return "success"; } @GetMapping("/crawlWeatherMonth") public String crawlWeatherMonth(@RequestParam(required = false, defaultValue = "beijing") String areaCode){ logger.debug("================= crawlWeatherMonth, areaCode=" + areaCode + " ================="); try { weatherHistoryService.crawlWeatherMonthByAreaCode(areaCode); } catch (Exception e) { e.printStackTrace(); return "error"; } return "success"; } @RequestMapping("/crawlWeatherDay") public String crawlWeatherDay(@RequestParam(required = true) String areaCode,@RequestParam(required = true) String yearMonth){ logger.debug("================= crawlCityList ================="); try { weatherHistoryService.crawlWeatherHistoryByMonth(areaCode, yearMonth); } catch (Exception e) { e.printStackTrace(); return "error"; } return "success"; } }
[ "yankj12@163.com" ]
yankj12@163.com
13604ecef3cdabb792acbf6986a8fe1dca197da8
fb0b25f2a4a4ccbb9f8fc39ff2282cde11c4c109
/java/TheRailgun/cards/Thundervolt.java
86294bac91b427bd09d9cf02f8e1b7c13449b294
[]
no_license
LegendBegins/The-Railgun
c3ddb8c459add1ae7a0a57c4b6dbd945b4822c36
a55704ab2182faf6b0a08a0c5ced44e956459ac4
refs/heads/master
2021-01-02T11:24:28.807162
2020-02-10T20:24:50
2020-02-10T20:24:50
239,600,895
0
0
null
null
null
null
UTF-8
Java
false
false
2,551
java
package TheRailgun.cards; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.actions.common.DamageAction; import com.megacrit.cardcrawl.cards.DamageInfo; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.localization.CardStrings; import com.megacrit.cardcrawl.monsters.AbstractMonster; import com.megacrit.cardcrawl.ui.panels.EnergyPanel; import TheRailgun.DefaultMod; import TheRailgun.characters.TheDefault; import static TheRailgun.DefaultMod.makeCardPath; public class Thundervolt extends AbstractDynamicCard { public static final String ID = DefaultMod.makeID(Thundervolt.class.getSimpleName()); public static final String IMG = makeCardPath("thundervolt.png"); private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); public static final String NAME = cardStrings.NAME; public static final String DESCRIPTION = cardStrings.DESCRIPTION; public static final String UPGRADE_DESCRIPTION = cardStrings.UPGRADE_DESCRIPTION; private static final CardRarity RARITY = CardRarity.RARE; private static final CardTarget TARGET = CardTarget.ENEMY; private static final CardType TYPE = CardType.ATTACK; public static final CardColor COLOR = TheDefault.Enums.COLOR_GRAY; private static final int COST = 4; private static final int DAMAGE = 20; private static final int UPGRADE_PLUS_DMG = 5; private static final int UPGRADE_REDUCED_COST = 3; public int specialDamage; public Thundervolt() { super(ID, IMG, COST, TYPE, COLOR, RARITY, TARGET); baseDamage = DAMAGE; isMultiDamage = true; } @Override public void use(AbstractPlayer p, AbstractMonster m) { int orbs = p.filledOrbCount(); for (int i = 0; i < orbs; i++) { AbstractDungeon.actionManager.addToBottom( new DamageAction(m, new DamageInfo(p, damage, damageTypeForTurn), AbstractGameAction.AttackEffect.LIGHTNING)); } } @Override public void upgrade() { if (!upgraded) { upgradeName(); rawDescription = UPGRADE_DESCRIPTION; upgradeDamage(UPGRADE_PLUS_DMG); upgradeBaseCost(UPGRADE_REDUCED_COST); initializeDescription(); } } }
[ "user@localhost.localdomain" ]
user@localhost.localdomain
01888014b53a09cdf6847f84a2a094f56048efa5
f09f5d3411a34c9a31d2476f5634ab8f6774c2cd
/src/main/java/com/abrid/dropme/web/rest/DriverResource.java
7cd077c4f2e65c47187a9b93d6c4bc8493710358
[]
no_license
Zahma/dropMe
e3f087f38b92c1576e30dac6f8e8dc2796b13f69
a44ee0c61c02c49319dc967f33e3074746479146
refs/heads/master
2022-12-23T22:49:45.875722
2022-03-11T10:54:04
2022-03-11T10:54:04
240,070,915
0
0
null
2022-12-16T05:12:49
2020-02-12T17:19:13
Java
UTF-8
Java
false
false
6,366
java
package com.abrid.dropme.web.rest; import com.abrid.dropme.service.DriverService; import com.abrid.dropme.web.rest.errors.BadRequestAlertException; import com.abrid.dropme.service.dto.DriverDTO; import com.abrid.dropme.service.dto.DriverCriteria; import com.abrid.dropme.service.DriverQueryService; import io.github.jhipster.web.util.HeaderUtil; import io.github.jhipster.web.util.PaginationUtil; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; import java.util.stream.StreamSupport; /** * REST controller for managing {@link com.abrid.dropme.domain.Driver}. */ @RestController @RequestMapping("/api") public class DriverResource { private final Logger log = LoggerFactory.getLogger(DriverResource.class); private static final String ENTITY_NAME = "driver"; @Value("${jhipster.clientApp.name}") private String applicationName; private final DriverService driverService; private final DriverQueryService driverQueryService; public DriverResource(DriverService driverService, DriverQueryService driverQueryService) { this.driverService = driverService; this.driverQueryService = driverQueryService; } /** * {@code POST /drivers} : Create a new driver. * * @param driverDTO the driverDTO to create. * @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new driverDTO, or with status {@code 400 (Bad Request)} if the driver has already an ID. * @throws URISyntaxException if the Location URI syntax is incorrect. */ @PostMapping("/drivers") public ResponseEntity<DriverDTO> createDriver(@RequestBody DriverDTO driverDTO) throws URISyntaxException { log.debug("REST request to save Driver : {}", driverDTO); if (driverDTO.getId() != null) { throw new BadRequestAlertException("A new driver cannot already have an ID", ENTITY_NAME, "idexists"); } DriverDTO result = driverService.save(driverDTO); return ResponseEntity.created(new URI("/api/drivers/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString())) .body(result); } /** * {@code PUT /drivers} : Updates an existing driver. * * @param driverDTO the driverDTO to update. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated driverDTO, * or with status {@code 400 (Bad Request)} if the driverDTO is not valid, * or with status {@code 500 (Internal Server Error)} if the driverDTO couldn't be updated. * @throws URISyntaxException if the Location URI syntax is incorrect. */ @PutMapping("/drivers") public ResponseEntity<DriverDTO> updateDriver(@RequestBody DriverDTO driverDTO) throws URISyntaxException { log.debug("REST request to update Driver : {}", driverDTO); if (driverDTO.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } DriverDTO result = driverService.save(driverDTO); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, driverDTO.getId().toString())) .body(result); } /** * {@code GET /drivers} : get all the drivers. * * @param pageable the pagination information. * @param criteria the criteria which the requested entities should match. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of drivers in body. */ @GetMapping("/drivers") public ResponseEntity<List<DriverDTO>> getAllDrivers(DriverCriteria criteria, Pageable pageable) { log.debug("REST request to get Drivers by criteria: {}", criteria); Page<DriverDTO> page = driverQueryService.findByCriteria(criteria, pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page); return ResponseEntity.ok().headers(headers).body(page.getContent()); } /** * {@code GET /drivers/count} : count all the drivers. * * @param criteria the criteria which the requested entities should match. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and the count in body. */ @GetMapping("/drivers/count") public ResponseEntity<Long> countDrivers(DriverCriteria criteria) { log.debug("REST request to count Drivers by criteria: {}", criteria); return ResponseEntity.ok().body(driverQueryService.countByCriteria(criteria)); } /** * {@code GET /drivers/:id} : get the "id" driver. * * @param id the id of the driverDTO to retrieve. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the driverDTO, or with status {@code 404 (Not Found)}. */ @GetMapping("/drivers/{id}") public ResponseEntity<DriverDTO> getDriver(@PathVariable Long id) { log.debug("REST request to get Driver : {}", id); Optional<DriverDTO> driverDTO = driverService.findOne(id); return ResponseUtil.wrapOrNotFound(driverDTO); } /** * {@code DELETE /drivers/:id} : delete the "id" driver. * * @param id the id of the driverDTO to delete. * @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}. */ @DeleteMapping("/drivers/{id}") public ResponseEntity<Void> deleteDriver(@PathVariable Long id) { log.debug("REST request to delete Driver : {}", id); driverService.delete(id); return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())).build(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
ec5ee3ddb0dbfd3dd17587fe7dbe54388a26c13f
22fd8db22a2cf60e144eee3d3e483be991649997
/src/de/og/batterycreator/gui/panels/iconset/IconSetMultiSelector.java
f227c01f148d29b7d79fa11b90bbea7e9b24bed5
[]
no_license
olivergeith/java_batteryiconcreator
f2b627354b5eedbe5e30af67e3f6f952212deb96
37d087a471719ec2a9431de607030b6fa57cdebe
refs/heads/master
2022-05-26T04:26:06.136900
2022-05-13T10:52:42
2022-05-13T10:52:42
8,984,062
0
0
null
null
null
null
UTF-8
Java
false
false
4,700
java
package de.og.batterycreator.gui.panels.iconset; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.io.File; import java.io.FileFilter; import java.util.Vector; import javax.swing.DefaultListCellRenderer; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ListCellRenderer; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import de.og.batterycreator.gui.widgets.overview.OverviewPanel; public class IconSetMultiSelector extends JList<IconSet> { private static final long serialVersionUID = -2767025548199058416L; private static final Logger LOGGER = LoggerFactory.getLogger(IconSetMultiSelector.class); private final OverviewPanel overPane = new OverviewPanel(); private final Vector<String> filenamesAndPath = new Vector<String>(); private final Vector<IconSet> iconSets = new Vector<IconSet>(); private final String rootDir; private final String setTypeName; public IconSetMultiSelector(final String setTypeName, final String rootDir) { super(); this.rootDir = rootDir; this.setTypeName = setTypeName; initUI(); } /** * @return the overviewPanel */ public JPanel getOverviewPanel() { return overPane; } private File[] findCustomDirs(final File dir) { if (dir.isDirectory()) { final File[] subdirs = dir.listFiles(new FileFilter() { @Override public boolean accept(final File file) { return file.isDirectory() && IconSet.findPNGs(file).length > 0; } }); return subdirs; } return null; } /** * @return the filenamesAndPath */ public Vector<String> getAllFilenamesAndPath() { return filenamesAndPath; } private void initUI() { LOGGER.info("Loading Custom " + setTypeName + " Icon Sets!"); addSetsFromFilesystem(); setCellRenderer(new MyCellRenderer()); setToolTipText("Choose your " + setTypeName + " Iconset"); // overPane.add(this, BorderLayout.WEST); addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(final ListSelectionEvent e) { // TODO Auto-generated method stub } }); // if (getModel().getSize() > 0) // setSelectedIndex(0); } /** * */ private void addSetsFromFilesystem() { final File dir = new File(rootDir); if (!dir.exists()) dir.mkdirs(); // find subdirs with icon sets final File[] setDirs = findCustomDirs(dir); if (setDirs != null) { for (final File setDir : setDirs) { final IconSet set = new IconSet(setDir); iconSets.add(set); } } setListData(iconSets); } /** * Renderer for WifiCreator-Combo */ private class MyCellRenderer implements ListCellRenderer<IconSet> { private final DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer(); @Override public Component getListCellRendererComponent(final JList<? extends IconSet> list, final IconSet value, final int index, final boolean isSelected, final boolean cellHasFocus) { final JLabel renderer = (JLabel) defaultRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof IconSet) { if (isSelected) renderer.setBackground(Color.darkGray.darker()); else renderer.setBackground(Color.black); renderer.setForeground(Color.white); final IconSet set = value; renderer.setIcon(set.getOverviewStripe()); } return renderer; } } public void createAllImages(final int size) { // final ImageIcon icon = (ImageIcon) getSelectedItem(); // if (!icon.equals(nada)) { // final int index = getSelectedIndex(); // final IconSet set = iconSets.elementAt(index - 1); // // final IconSetDeployer depl = new IconSetDeployer(set, setTypeName); // depl.createAllImages(size); // filenamesAndPath = depl.getAllFilenamesAndPath(); // } else { // filenamesAndPath = new Vector<String>(); // } } /** * For testing purposes !!! * * @param args */ public static void main(final String[] args) { final JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setTitle("Hallo Emmy!!!!!!!"); f.setBounds(200, 200, 640, 600); f.setLayout(new BorderLayout()); // final IconSetSelector combo = new IconSetSelector("Weather", // "./custom/weather/"); final IconSetMultiSelector list = new IconSetMultiSelector("Toggle", "./custom/toggles/"); final JScrollPane scroller = new JScrollPane(); scroller.add(list); scroller.getViewport().setView(list); f.add(scroller, BorderLayout.WEST); f.setVisible(true); } }
[ "oliver.geith@gmx.net" ]
oliver.geith@gmx.net
2de0af593ba00c5bc2bcc42db300580905356db2
f7a25da32609d722b7ac9220bf4694aa0476f7b2
/net/minecraft/nbt/EndTag.java
b93588a8c4f007a8a17de89790a8233c6ebe8535
[]
no_license
basaigh/temp
89e673227e951a7c282c50cce72236bdce4870dd
1c3091333f4edb2be6d986faaa026826b05008ab
refs/heads/master
2023-05-04T22:27:28.259481
2021-05-31T17:15:09
2021-05-31T17:15:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
956
java
package net.minecraft.nbt; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.Component; import java.io.DataOutput; import java.io.IOException; import java.io.DataInput; public class EndTag implements Tag { public void load(final DataInput dataInput, final int integer, final NbtAccounter in) throws IOException { in.accountBits(64L); } public void write(final DataOutput dataOutput) throws IOException { } public byte getId() { return 0; } public String toString() { return "END"; } public EndTag copy() { return new EndTag(); } public Component getPrettyDisplay(final String string, final int integer) { return new TextComponent(""); } public boolean equals(final Object object) { return object instanceof EndTag; } public int hashCode() { return this.getId(); } }
[ "mark70326511@gmail.com" ]
mark70326511@gmail.com
095ac46e9753007e7f0c2f055809b4a1eafb6200
b4b62c5c77ec817db61820ccc2fee348d1d7acc5
/src/main/java/com/alipay/api/domain/AlipayPcreditHuabeiEnterpriseUserinfoSyncModel.java
a977929a28e40293ac325a5be1aeac42e6b6cfd9
[ "Apache-2.0" ]
permissive
zhangpo/alipay-sdk-java-all
13f79e34d5f030ac2f4367a93e879e0e60f335f7
e69305d18fce0cc01d03ca52389f461527b25865
refs/heads/master
2022-11-04T20:47:21.777559
2020-06-15T08:31:02
2020-06-15T08:31:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,858
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 商务花呗用户信息同步 * * @author auto create * @since 1.0, 2020-05-11 14:49:48 */ public class AlipayPcreditHuabeiEnterpriseUserinfoSyncModel extends AlipayObject { private static final long serialVersionUID = 4453122973982878554L; /** * 商务花呗用户协议id */ @ApiField("agreement_id") private String agreementId; /** * 员工在支付宝的用户id */ @ApiField("alipay_user_id") private String alipayUserId; /** * 员工所在部门名称 */ @ApiField("dept_name") private String deptName; /** * 员工所在公司总人数 */ @ApiField("employee_count") private String employeeCount; /** * 员工职级 */ @ApiField("employee_level") private String employeeLevel; /** * 员工姓名 */ @ApiField("employee_name") private String employeeName; /** * 员工岗位 */ @ApiField("employee_position") private String employeePosition; /** * 员工入职时间,精确到月份,yyyymm六位 */ @ApiField("entry_time") private String entryTime; /** * 员工身份证号(和员工手机号至少填写一个) */ @ApiField("identity_no") private String identityNo; /** * 员工邮箱 */ @ApiField("mail_addr") private String mailAddr; /** * 员工是否管理岗,是管理岗传Y,非管理岗传N */ @ApiField("management") private String management; /** * 员工手机号(和员工身份证号至少填写一个) */ @ApiField("mobile_no") private String mobileNo; /** * 企业对应的支付宝商户Pid */ @ApiField("partner_id") private String partnerId; public String getAgreementId() { return this.agreementId; } public void setAgreementId(String agreementId) { this.agreementId = agreementId; } public String getAlipayUserId() { return this.alipayUserId; } public void setAlipayUserId(String alipayUserId) { this.alipayUserId = alipayUserId; } public String getDeptName() { return this.deptName; } public void setDeptName(String deptName) { this.deptName = deptName; } public String getEmployeeCount() { return this.employeeCount; } public void setEmployeeCount(String employeeCount) { this.employeeCount = employeeCount; } public String getEmployeeLevel() { return this.employeeLevel; } public void setEmployeeLevel(String employeeLevel) { this.employeeLevel = employeeLevel; } public String getEmployeeName() { return this.employeeName; } public void setEmployeeName(String employeeName) { this.employeeName = employeeName; } public String getEmployeePosition() { return this.employeePosition; } public void setEmployeePosition(String employeePosition) { this.employeePosition = employeePosition; } public String getEntryTime() { return this.entryTime; } public void setEntryTime(String entryTime) { this.entryTime = entryTime; } public String getIdentityNo() { return this.identityNo; } public void setIdentityNo(String identityNo) { this.identityNo = identityNo; } public String getMailAddr() { return this.mailAddr; } public void setMailAddr(String mailAddr) { this.mailAddr = mailAddr; } public String getManagement() { return this.management; } public void setManagement(String management) { this.management = management; } public String getMobileNo() { return this.mobileNo; } public void setMobileNo(String mobileNo) { this.mobileNo = mobileNo; } public String getPartnerId() { return this.partnerId; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
2d94d4451fe9b860d51ea80b8fc9827d0b5ff11b
fa52dee98c9c97b60451df961fb1666859a4817b
/CBP/library/api/fermat-cbp-api/src/main/java/com/bitdubai/fermat_cbp_api/layer/cbp_actor/crypto_customer/exceptions/CantGetPurchaseContractException.java
bb5fb0896a2d992436ade51e4bf7cc2cf697afd1
[ "MIT" ]
permissive
gustl-arg/fermat-old
ebb486902834f7b9f9b5918fcfdc5e00673a4cdb
3dbd908e0518f4c65ff38a70e4400e7e9e253c2c
refs/heads/master
2020-04-10T14:17:08.175541
2015-11-22T12:18:20
2015-11-22T12:18:20
42,355,728
0
1
null
null
null
null
UTF-8
Java
false
false
1,188
java
package com.bitdubai.fermat_cbp_api.layer.cbp_actor.crypto_customer.exceptions; import com.bitdubai.fermat_api.FermatException; /** * Created by Yordin Alayn on 11.11.2015. */ public class CantGetPurchaseContractException extends FermatException { public static final String DEFAULT_MESSAGE = "CAN'T GET PURCHASE CONTRACT"; /** * This is the constructor that every inherited FermatException must implement * * @param message the short description of the why this exception happened, there is a public static constant called DEFAULT_MESSAGE that can be used here * @param cause the exception that triggered the throwing of the current exception, if there are no other exceptions to be declared here, the cause should be null * @param context a String that provides the values of the variables that could have affected the exception * @param possibleReason an explicative reason of why we believe this exception was most likely thrown */ public CantGetPurchaseContractException(String message, Exception cause, String context, String possibleReason) { super(message, cause, context, possibleReason); } }
[ "y.alayn@gmail.com" ]
y.alayn@gmail.com
c6397a83d122757d0add9fed6631b21c88f715e7
05b3e5ad846c91bbfde097c32d5024dced19aa1d
/JavaProgramming/src/ch18/exam14/PrintStreamExample.java
c12f7f006eb4b0e1e83fa9916e8d3ae127c58f69
[]
no_license
yjs0511/MyRepository
4c2b256cb8ac34869cce8dfe2b1d2ab163b0e5ec
63bbf1f607f9d91374649bb7cacdf532b52e613b
refs/heads/master
2020-04-12T03:05:29.993060
2016-11-17T04:34:51
2016-11-17T04:34:51
65,808,570
0
0
null
null
null
null
UTF-8
Java
false
false
1,028
java
package ch18.exam14; import java.io.BufferedReader; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.PrintStream; public class PrintStreamExample { public static void main(String[] args) throws IOException { FileOutputStream fos = new FileOutputStream("src/ch18/exam14/data.txt"); PrintStream ps = new PrintStream(fos); // 바이트 기반이므로 사용 가능 ps.println(10); ps.println(true); ps.println(5.3); ps.println("JAVA"); ps.flush(); ps.close(); fos.close(); FileReader fr = new FileReader("src/ch18/exam14/data.txt"); BufferedReader br = new BufferedReader(fr); int v1 = Integer.parseInt(br.readLine()); boolean v2 = Boolean.parseBoolean(br.readLine()); double v3 = Double.parseDouble(br.readLine()); String v4 = br.readLine(); System.out.println(v1); System.out.println(v2); System.out.println(v3); System.out.println(v4); br.close(); fr.close(); } }
[ "hypermega22@gmail.com" ]
hypermega22@gmail.com
50a73ebdd6d4fec5b235bf87d20677235bc337e3
61c74eda9b8a821806488842dd37bae8a84788f4
/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java
f79d9b3571ff84f5fa2b72623751100a811fa853
[]
no_license
jmjobin/spring-source-code
c1e4a54790ee3e62663484738fbd46401c5338f2
a3c256000ca5b45bfe60c234844348edb742450f
refs/heads/master
2021-02-15T14:29:22.658473
2017-08-13T14:30:16
2017-08-13T14:30:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,508
java
/* * Copyright 2002-2017 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.core.io; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.net.URL; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** * {@link Resource} 为了类资源路径实现. * 使用给定的{@link ClassLoader}或{@link Class}加载资源. * <p>如果类路径资源在文件系统中,支持解析为{@link java.io.File},而不是用于JAR中的资源。 * 也就是不能把JAR中的资源解析为File.但全都支持解析为URL. * <p>其实就类似一个File,可以根据类路径或类加载器路径获取资源文件 * @see ClassLoader#getResourceAsStream(String) * @see Class#getResourceAsStream(String) */ public class ClassPathResource extends AbstractFileResolvingResource { private final String path; @Nullable private ClassLoader classLoader; @Nullable private Class<?> clazz; /** * Create a new {@code ClassPathResource} for {@code ClassLoader} usage. * A leading slash will be removed, as the ClassLoader resource access * methods will not accept it. * <p>The thread context class loader will be used for * loading the resource. * @param path the absolute path within the class path * @see java.lang.ClassLoader#getResourceAsStream(String) * @see org.springframework.util.ClassUtils#getDefaultClassLoader() */ public ClassPathResource(String path) { this(path, (ClassLoader) null); } /** * Create a new {@code ClassPathResource} for {@code ClassLoader} usage. * A leading slash will be removed, as the ClassLoader resource access * methods will not accept it. * @param path the absolute path within the classpath * @param classLoader the class loader to load the resource with, * or {@code null} for the thread context class loader * @see ClassLoader#getResourceAsStream(String) */ public ClassPathResource(String path, @Nullable ClassLoader classLoader) { Assert.notNull(path, "Path must not be null"); //将其变成规范的路径,确保不为空,替换路径分隔符等 String pathToUse = StringUtils.cleanPath(path); //如果路径不以/开头,去掉第一个字符 if (pathToUse.startsWith("/")) { pathToUse = pathToUse.substring(1); } this.path = pathToUse; //如果类加载器为空,获取默认类加载器, //优先级为 线程上下文类加载器 -> 该工具类的类加载器 -> 系统类加载器 -> 空加载器(科科,这个spring的程序员还卖萌) this.classLoader = (classLoader != null ? classLoader : ClassUtils.getDefaultClassLoader()); } /** * Create a new {@code ClassPathResource} for {@code Class} usage. * The path can be relative to the given class, or absolute within * the classpath via a leading slash. * @param path relative or absolute path within the class path * @param clazz the class to load resources with * @see java.lang.Class#getResourceAsStream */ public ClassPathResource(String path, @Nullable Class<?> clazz) { Assert.notNull(path, "Path must not be null"); this.path = StringUtils.cleanPath(path); this.clazz = clazz; } /** * Create a new {@code ClassPathResource} with optional {@code ClassLoader} * and {@code Class}. Only for internal usage. * @param path relative or absolute path within the classpath * @param classLoader the class loader to load the resource with, if any * @param clazz the class to load resources with, if any */ protected ClassPathResource(String path, @Nullable ClassLoader classLoader, @Nullable Class<?> clazz) { this.path = StringUtils.cleanPath(path); this.classLoader = classLoader; this.clazz = clazz; } /** * Return the path for this resource (as resource path within the class path). */ public final String getPath() { return this.path; } /** * Return the ClassLoader that this resource will be obtained from. */ @Nullable public final ClassLoader getClassLoader() { return (this.clazz != null ? this.clazz.getClassLoader() : this.classLoader); } /** * This implementation checks for the resolution of a resource URL. * @see java.lang.ClassLoader#getResource(String) * @see java.lang.Class#getResource(String) */ @Override public boolean exists() { return (resolveURL() != null); } /** * Resolves a URL for the underlying class path resource. * @return the resolved URL, or {@code null} if not resolvable */ @Nullable protected URL resolveURL() { if (this.clazz != null) { return this.clazz.getResource(this.path); } else if (this.classLoader != null) { return this.classLoader.getResource(this.path); } else { return ClassLoader.getSystemResource(this.path); } } /** * This implementation opens an InputStream for the given class path resource. * @see java.lang.ClassLoader#getResourceAsStream(String) * @see java.lang.Class#getResourceAsStream(String) */ @Override public InputStream getInputStream() throws IOException { InputStream is; if (this.clazz != null) { is = this.clazz.getResourceAsStream(this.path); } else if (this.classLoader != null) { is = this.classLoader.getResourceAsStream(this.path); } else { is = ClassLoader.getSystemResourceAsStream(this.path); } if (is == null) { throw new FileNotFoundException(getDescription() + " cannot be opened because it does not exist"); } return is; } /** * This implementation returns a URL for the underlying class path resource, * if available. * @see java.lang.ClassLoader#getResource(String) * @see java.lang.Class#getResource(String) */ @Override public URL getURL() throws IOException { URL url = resolveURL(); if (url == null) { throw new FileNotFoundException(getDescription() + " cannot be resolved to URL because it does not exist"); } return url; } /** * This implementation creates a ClassPathResource, applying the given path * relative to the path of the underlying resource of this descriptor. * @see org.springframework.util.StringUtils#applyRelativePath(String, String) */ @Override public Resource createRelative(String relativePath) { String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); return new ClassPathResource(pathToUse, this.classLoader, this.clazz); } /** * This implementation returns the name of the file that this class path * resource refers to. * @see org.springframework.util.StringUtils#getFilename(String) */ @Override public String getFilename() { return StringUtils.getFilename(this.path); } /** * This implementation returns a description that includes the class path location. */ @Override public String getDescription() { StringBuilder builder = new StringBuilder("class path resource ["); String pathToUse = path; if (this.clazz != null && !pathToUse.startsWith("/")) { builder.append(ClassUtils.classPackageAsResourcePath(this.clazz)); builder.append('/'); } if (pathToUse.startsWith("/")) { pathToUse = pathToUse.substring(1); } builder.append(pathToUse); builder.append(']'); return builder.toString(); } /** * This implementation compares the underlying class path locations. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof ClassPathResource) { ClassPathResource otherRes = (ClassPathResource) obj; return (this.path.equals(otherRes.path) && ObjectUtils.nullSafeEquals(this.classLoader, otherRes.classLoader) && ObjectUtils.nullSafeEquals(this.clazz, otherRes.clazz)); } return false; } /** * This implementation returns the hash code of the underlying * class path location. */ @Override public int hashCode() { return this.path.hashCode(); } }
[ "970389745@qq.com" ]
970389745@qq.com
39b73c13d4f5a1549a1922e63ba85c87d05dae60
f19a7a9a41450ccc7b8bb9e03c6046f8d69b371d
/src/main/java/org/endeavourhealth/transform/emis/openhr/schema/VocEnterpriseReportingLevel.java
d82e30d13b9239dfb6ffe84520e4e9fa9122b47d
[ "Apache-2.0" ]
permissive
endeavourhealth/Transforms
d377861ce7ae78ecb1e697fb69687c6389fe1c88
6b6a8e1778256c9a02bfb5ce1b6ed5bff5330d08
refs/heads/master
2021-06-13T22:12:33.315238
2021-03-09T14:21:10
2021-03-09T14:21:10
93,181,861
1
2
null
null
null
null
UTF-8
Java
false
false
1,011
java
package org.endeavourhealth.transform.emis.openhr.schema; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for voc.EnterpriseReportingLevel. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="voc.EnterpriseReportingLevel"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="AGGREGATE"/> * &lt;enumeration value="PSEUDO_IDENTIFYING"/> * &lt;enumeration value="PATIENT_LEVEL"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "voc.EnterpriseReportingLevel", namespace = "http://www.e-mis.com/emisopen") @XmlEnum public enum VocEnterpriseReportingLevel { AGGREGATE, PSEUDO_IDENTIFYING, PATIENT_LEVEL; public String value() { return name(); } public static VocEnterpriseReportingLevel fromValue(String v) { return valueOf(v); } }
[ "ergosoftuk@gmail.com" ]
ergosoftuk@gmail.com
4b45a4d575a66415c72705dd2fe35beb62bb0e9a
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-vod-v5/src/main/java/com/aliyuncs/v5/vod/model/v20170321/ListLiveRecordVideoRequest.java
66e85f09e7794d07f373e2758542352b14452714
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk-v5
9fa211e248b16c36d29b1a04662153a61a51ec88
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
refs/heads/master
2023-03-13T01:32:07.260745
2021-10-18T08:07:02
2021-10-18T08:07:02
263,800,324
4
2
NOASSERTION
2022-05-20T22:01:22
2020-05-14T02:58:50
Java
UTF-8
Java
false
false
4,546
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.v5.vod.model.v20170321; import com.aliyuncs.v5.RpcAcsRequest; import com.aliyuncs.v5.http.MethodType; import com.aliyuncs.v5.vod.Endpoint; /** * @author auto create * @version */ public class ListLiveRecordVideoRequest extends RpcAcsRequest<ListLiveRecordVideoResponse> { private Long resourceOwnerId; private String startTime; private String appName; private Integer pageSize; private String streamName; private String queryType; private String resourceOwnerAccount; private String domainName; private String endTime; private Long ownerId; private Integer pageNo; private String sortBy; public ListLiveRecordVideoRequest() { super("vod", "2017-03-21", "ListLiveRecordVideo", "vod"); setMethod(MethodType.POST); try { com.aliyuncs.v5.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.v5.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getResourceOwnerId() { return this.resourceOwnerId; } public void setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; if(resourceOwnerId != null){ putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); } } public String getStartTime() { return this.startTime; } public void setStartTime(String startTime) { this.startTime = startTime; if(startTime != null){ putQueryParameter("StartTime", startTime); } } public String getAppName() { return this.appName; } public void setAppName(String appName) { this.appName = appName; if(appName != null){ putQueryParameter("AppName", appName); } } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; if(pageSize != null){ putQueryParameter("PageSize", pageSize.toString()); } } public String getStreamName() { return this.streamName; } public void setStreamName(String streamName) { this.streamName = streamName; if(streamName != null){ putQueryParameter("StreamName", streamName); } } public String getQueryType() { return this.queryType; } public void setQueryType(String queryType) { this.queryType = queryType; if(queryType != null){ putQueryParameter("QueryType", queryType); } } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public void setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; if(resourceOwnerAccount != null){ putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); } } public String getDomainName() { return this.domainName; } public void setDomainName(String domainName) { this.domainName = domainName; if(domainName != null){ putQueryParameter("DomainName", domainName); } } public String getEndTime() { return this.endTime; } public void setEndTime(String endTime) { this.endTime = endTime; if(endTime != null){ putQueryParameter("EndTime", endTime); } } public Long getOwnerId() { return this.ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; if(ownerId != null){ putQueryParameter("OwnerId", ownerId.toString()); } } public Integer getPageNo() { return this.pageNo; } public void setPageNo(Integer pageNo) { this.pageNo = pageNo; if(pageNo != null){ putQueryParameter("PageNo", pageNo.toString()); } } public String getSortBy() { return this.sortBy; } public void setSortBy(String sortBy) { this.sortBy = sortBy; if(sortBy != null){ putQueryParameter("SortBy", sortBy); } } @Override public Class<ListLiveRecordVideoResponse> getResponseClass() { return ListLiveRecordVideoResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2a5ef730d5cb4ef4d9e44fb59a7031aae9261dad
bb6929a3365adeaf22dbc0c6590206a8ce608e7c
/Code/xsd/com/accela/adapter/model/cap/Keys.java
66f4c0fb7e6251b0ef8bdd2905eb60f99c39d767
[]
no_license
accela-robinson/CERS
a33c7a58ae90d82f430fcb9188a7a32951c47d81
58624383e0cb9db8d2d70bc6134edca585610eba
refs/heads/master
2020-04-02T12:23:34.108097
2015-04-10T05:34:02
2015-04-10T05:34:02
30,371,654
2
1
null
2015-04-08T07:01:04
2015-02-05T18:39:49
Java
UTF-8
Java
false
false
1,774
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.11.29 at 04:56:34 PM CST // package com.accela.adapter.model.cap; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "key" }) @XmlRootElement(name = "Keys") public class Keys { @XmlElement(name = "Key") protected String key; /** * Gets the value of the key property. * * @return * possible object is * {@link String } * */ public String getKey() { return key; } /** * Sets the value of the key property. * * @param value * allowed object is * {@link String } * */ public void setKey(String value) { this.key = value; } }
[ "rleung@accela.com" ]
rleung@accela.com
017395226fc6eae8cccdb8121d35ecf2f5873710
846a7668ac964632bdb6db639ab381be11c13b77
/android/tools/tradefederation/core/src/com/android/tradefed/device/IDeviceStateMonitor.java
a305ce345527039e0258aac1b09bab7f40f08042
[]
no_license
BPI-SINOVOIP/BPI-A64-Android8
f2900965e96fd6f2a28ced68af668a858b15ebe1
744c72c133b9bf5d2e9efe0ab33e01e6e51d5743
refs/heads/master
2023-05-21T08:02:23.364495
2020-07-15T11:27:51
2020-07-15T11:27:51
143,945,191
2
0
null
null
null
null
UTF-8
Java
false
false
5,497
java
/* * Copyright (C) 2010 The Android Open Source Project * * 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.android.tradefed.device; import com.android.ddmlib.IDevice; /** * Provides facilities for monitoring the state of a {@link IDevice}. */ public interface IDeviceStateMonitor { /** * Waits for device to be online. * <p/> * Note: this method will return once device is visible via DDMS. It does not guarantee that the * device is actually responsive to adb commands - use {@link #waitForDeviceAvailable()} * instead. * * @param time the maximum time in ms to wait * * @return the {@link IDevice} if device becomes online before time expires. <code>null</code> * otherwise. */ public IDevice waitForDeviceOnline(long time); /** * Waits for device to be online using standard boot timeout. * <p/> * Note: this method will return once device is visible via DDMS. It does not guarantee that the * device is actually responsive to adb commands - use {@link #waitForDeviceAvailable()} * instead. * * @return the {@link IDevice} if device becomes online before time expires. <code>null</code> * otherwise. */ public IDevice waitForDeviceOnline(); /** * Blocks until the device's boot complete flag is set * * @param waitTime the amount in ms to wait */ public boolean waitForBootComplete(final long waitTime); /** * Waits for device to be responsive to a basic adb shell command. * * @param waitTime the time in ms to wait * @return <code>true</code> if device becomes responsive before <var>waitTime</var> elapses. */ public boolean waitForDeviceShell(final long waitTime); /** * Waits for the device to be responsive and available for testing. Currently this means that * the package manager and external storage are available. * * @param waitTime the time in ms to wait * @return the {@link IDevice} if device becomes online before time expires. <code>null</code> * otherwise. */ public IDevice waitForDeviceAvailable(final long waitTime); /** * Waits for the device to be responsive and available for testing. * <p/> * Equivalent to {@link #waitForDeviceAvailable(long)}, but uses default device * boot timeout. * * @return the {@link IDevice} if device becomes online before time expires. <code>null</code> * otherwise. */ public IDevice waitForDeviceAvailable(); /** * Waits for the device to be in bootloader. * * @param waitTime the maximum time in ms to wait * * @return <code>true</code> if device is in bootloader before time expires */ public boolean waitForDeviceBootloader(long waitTime); /** * Waits for device bootloader state to be refreshed */ public void waitForDeviceBootloaderStateUpdate(); /** * Waits for the device to be not available * * @param waitTime the maximum time in ms to wait * * @return <code>true</code> if device becomes unavailable */ public boolean waitForDeviceNotAvailable(long waitTime); /** * Waits for the device to be in the 'adb recovery' state * * @param waitTime the maximum time in ms to wait * @return True if the device is in Recovery before the timeout, False otherwise. */ public boolean waitForDeviceInRecovery(long waitTime); /** * Gets the serial number of the device. */ public String getSerialNumber(); /** * Gets the device state. * * @return the {@link TestDeviceState} of device */ public TestDeviceState getDeviceState(); /** * Sets the device current state. * * @param deviceState */ public void setState(TestDeviceState deviceState); /** * Returns a mount point. * <p/> * Queries the device directly if the cached info in {@link IDevice} is not available. * <p/> * TODO: move this behavior to {@link IDevice#getMountPoint(String)} * * @param mountName the name of the mount point * @return the mount point or <code>null</code> * @see IDevice#getMountPoint(String) */ public String getMountPoint(String mountName); /** * Updates the current IDevice. * * @param device * * @see IManagedTestDevice#setIDevice(IDevice) */ public void setIDevice(IDevice device); /** * @return <code>true</code> if device is connected to adb via tcp */ public boolean isAdbTcp(); /** * Set the time in ms to wait for a device to be online in {@link #waitForDeviceOnline()}. */ public void setDefaultOnlineTimeout(long timeoutMs); /** * Set the time in ms to wait for a device to be available in {@link #waitForDeviceAvailable()}. */ public void setDefaultAvailableTimeout(long timeoutMs); }
[ "mingxin.android@gmail.com" ]
mingxin.android@gmail.com
035c154c0b13a3f0705a3cd6b0f0744f79cc6364
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
/p000a/p001a/p002a/p003a/p004a/p006b/AdvertisingInfoReflectionStrategy.java
1830d9ca288521c8aeb3eed140d37c74a09a6acc
[]
no_license
swapnilsen/OCR_2
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
1889d208e17e94a55ddeae91336fe92110e1bd2d
refs/heads/master
2021-01-20T08:46:03.508508
2017-05-03T19:50:52
2017-05-03T19:50:52
90,187,623
1
0
null
null
null
null
UTF-8
Java
false
false
2,344
java
package p000a.p001a.p002a.p003a.p004a.p006b; import android.content.Context; import p000a.p001a.p002a.p003a.Fabric; /* renamed from: a.a.a.a.a.b.d */ class AdvertisingInfoReflectionStrategy implements AdvertisingInfoStrategy { private final Context f12a; public AdvertisingInfoReflectionStrategy(Context context) { this.f12a = context.getApplicationContext(); } boolean m26a(Context context) { try { if (((Integer) Class.forName("com.google.android.gms.common.GooglePlayServicesUtil").getMethod("isGooglePlayServicesAvailable", new Class[]{Context.class}).invoke(null, new Object[]{context})).intValue() == 0) { return true; } return false; } catch (Exception e) { return false; } } public AdvertisingInfo m25a() { if (m26a(this.f12a)) { return new AdvertisingInfo(m22b(), m23c()); } return null; } private String m22b() { try { return (String) Class.forName("com.google.android.gms.ads.identifier.AdvertisingIdClient$Info").getMethod("getId", new Class[0]).invoke(m24d(), new Object[0]); } catch (Exception e) { Fabric.m397h().m364d("Fabric", "Could not call getId on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info"); return null; } } private boolean m23c() { try { return ((Boolean) Class.forName("com.google.android.gms.ads.identifier.AdvertisingIdClient$Info").getMethod("isLimitAdTrackingEnabled", new Class[0]).invoke(m24d(), new Object[0])).booleanValue(); } catch (Exception e) { Fabric.m397h().m364d("Fabric", "Could not call isLimitAdTrackingEnabled on com.google.android.gms.ads.identifier.AdvertisingIdClient$Info"); return false; } } private Object m24d() { Object obj = null; try { obj = Class.forName("com.google.android.gms.ads.identifier.AdvertisingIdClient").getMethod("getAdvertisingIdInfo", new Class[]{Context.class}).invoke(null, new Object[]{this.f12a}); } catch (Exception e) { Fabric.m397h().m364d("Fabric", "Could not call getAdvertisingIdInfo on com.google.android.gms.ads.identifier.AdvertisingIdClient"); } return obj; } }
[ "swasen@cisco.com" ]
swasen@cisco.com
f08115144fa65dc0cfa8d4b5f13f941214555fc5
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project51/src/test/java/org/gradle/test/performance51_4/Test51_387.java
e76030e738273bad3948dffa715a86d6206fc8a5
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance51_4; import static org.junit.Assert.*; public class Test51_387 { private final Production51_387 production = new Production51_387("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
22a8f6aa7e1316225ad61aa0398c3c3befbdca34
4c80c75f0e61119831dda3eee55d4026947db264
/assets/src/com/example/android/apis4_4/app/NotificationDisplay.java
76f84bfc4dffc105073307d700c1b8788b97a398
[]
no_license
weijunfeng/ApiDemos-4.4
882df5eba07547913b49fa060970400a3f4dfe36
b8f8558febb78ee92d29817629b10537fb9d8ac1
refs/heads/master
2021-01-17T16:04:21.014503
2017-02-26T09:35:44
2017-02-26T09:35:44
58,100,325
0
0
null
null
null
null
UTF-8
Java
false
false
3,170
java
/* * Copyright (C) 2007 The Android Open Source Project * * 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.example.android.apis4_4.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. import com.example.android.apis4_4.BaseActi; import com.example.android.apis4_4.R; import android.app.Activity; import android.app.NotificationManager; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.WindowManager; import android.widget.ImageButton; import android.widget.RelativeLayout; /** * Activity used by StatusBarNotification to show the notification to the user. */ public class NotificationDisplay extends BaseActi implements View.OnClickListener { /** * Initialization of the Activity after it is first created. Must at least * call {@link android.app.Activity#setContentView setContentView()} to * describe what is to be displayed in the screen. */ @Override protected void onCreate(Bundle icicle) { // Be sure to call the super class. super.onCreate(icicle); // Have the system blur any windows behind this one. getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND); RelativeLayout container = new RelativeLayout(this); ImageButton button = new ImageButton(this); button.setImageResource(getIntent().getIntExtra("moodimg", 0)); button.setOnClickListener(this); RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); lp.addRule(RelativeLayout.CENTER_IN_PARENT); container.addView(button, lp); setContentView(container); } public void onClick(View v) { // The user has confirmed this notification, so remove it. ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)) .cancel(R.layout.status_bar_notifications); // Pressing on the button brings the user back to our mood ring, // as part of the api demos app. Note the use of NEW_TASK here, // since the notification display activity is run as a separate task. Intent intent = new Intent(this, StatusBarNotifications.class); intent.setAction(Intent.ACTION_MAIN); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); // We're done. finish(); } }
[ "891130789@qq.com" ]
891130789@qq.com
bc33f2468e7532dcaf80dff11444a7a0a09ca605
7cae3ff377b916d15cf67da48df5e94b0f3cca5d
/src/main/java/ch/rasc/wampspring/security/WampDestinationMessageMatcher.java
90c5a0cb604fdd9b389a000ddca849c11e0885f5
[ "Apache-2.0" ]
permissive
cgb-ralscha/wampspring-security
54e967d6d403a5750d0228f984301d38132b2e90
e589b31dc2ff7c78b1be768edae0bc9d543ba7a6
refs/heads/master
2023-03-21T15:40:02.891246
2017-12-03T09:40:53
2017-12-03T09:40:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,064
java
/** * Copyright 2015-2017 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 ch.rasc.wampspring.security; import org.springframework.messaging.Message; import org.springframework.security.messaging.util.matcher.MessageMatcher; import org.springframework.util.AntPathMatcher; import org.springframework.util.Assert; import org.springframework.util.PathMatcher; import ch.rasc.wampspring.message.WampMessage; import ch.rasc.wampspring.message.WampMessageType; /** * <p> * MessageMatcher which compares a pre-defined pattern against the destination of a * {@link Message}. There is also support for optionally matching on a specified * {@link WampMessageType}. * </p> * * @since 4.0 * @author Rob Winch * @author Ralph Schaer */ public final class WampDestinationMessageMatcher implements MessageMatcher<Object> { public static final MessageMatcher<Object> NULL_DESTINATION_MATCHER = new MessageMatcher<Object>() { @Override public boolean matches(Message<? extends Object> message) { if (message instanceof WampMessage) { String destination = ((WampMessage) message).getDestination(); return destination == null; } return false; } }; private final PathMatcher matcher; /** * The {@link MessageMatcher} that determines if the type matches. If the type was * null, this matcher will match every Message. */ private final MessageMatcher<Object> messageTypeMatcher; private final String pattern; /** * <p> * Creates a new instance with the specified pattern, null {@link WampMessageType} * (matches any type), and a {@link AntPathMatcher} created from the default * constructor. * </p> * * <p> * The mapping matches destinations despite the using the following rules: * * <ul> * <li>? matches one character</li> * <li>* matches zero or more characters</li> * <li>** matches zero or more 'directories' in a path</li> * </ul> * * <p> * Some examples: * * <ul> * <li>{@code com/t?st.jsp} - matches {@code com/test} but also {@code com/tast} or * {@code com/txst}</li> * <li>{@code com/*suffix} - matches all files ending in {@code suffix} in the * {@code com} directory</li> * <li>{@code com/&#42;&#42;/test} - matches all destinations ending with {@code test} * underneath the {@code com} path</li> * </ul> * * @param pattern the pattern to use */ public WampDestinationMessageMatcher(String pattern) { this(pattern, new AntPathMatcher()); } /** * <p> * Creates a new instance with the specified pattern and {@link PathMatcher}. * </p> * * @param pattern the pattern to use * @param pathMatcher the {@link PathMatcher} to use. */ public WampDestinationMessageMatcher(String pattern, PathMatcher pathMatcher) { this(pattern, null, pathMatcher); } /** * <p> * Creates a new instance with the specified pattern, {@link WampMessageType}, and * {@link PathMatcher}. * </p> * * @param pattern the pattern to use * @param type the {@link WampMessageType} to match on or null if any * {@link WampMessageType} should be matched. * @param pathMatcher the {@link PathMatcher} to use. */ public WampDestinationMessageMatcher(String pattern, WampMessageType type, PathMatcher pathMatcher) { Assert.notNull(pattern, "pattern cannot be null"); Assert.notNull(pathMatcher, "pathMatcher cannot be null"); if (!isTypeWithDestination(type)) { throw new IllegalArgumentException("WampMessageType " + type + " does not contain a destination and so cannot be matched on."); } this.matcher = pathMatcher; this.messageTypeMatcher = type == null ? ANY_MESSAGE : new WampMessageTypeMatcher(type); this.pattern = pattern; } @Override public boolean matches(Message<? extends Object> message) { if (!this.messageTypeMatcher.matches(message)) { return false; } if (message instanceof WampMessage) { String destination = ((WampMessage) message).getDestination(); return destination != null && this.matcher.match(this.pattern, destination); } return false; } @Override public String toString() { return "WampDestinationMessageMatcher [matcher=" + this.matcher + ", messageTypeMatcher=" + this.messageTypeMatcher + ", pattern=" + this.pattern + "]"; } public static boolean isTypeWithDestination(WampMessageType type) { if (type == null) { return true; } return type == WampMessageType.CALL || type == WampMessageType.PUBLISH || type == WampMessageType.SUBSCRIBE || type == WampMessageType.UNSUBSCRIBE; } }
[ "ralphschaer@gmail.com" ]
ralphschaer@gmail.com
0e2e94afbcb08934e89bec634702e83656bf6dc0
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/response/AlipayMerchantPayforprivilegeCardbinactivityCreateormodifyResponse.java
8a90f020e8f0cacbc0b14677475174c6485f0889
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
827
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.CardBinActivityInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.merchant.payforprivilege.cardbinactivity.createormodify response. * * @author auto create * @since 1.0, 2021-04-21 15:07:33 */ public class AlipayMerchantPayforprivilegeCardbinactivityCreateormodifyResponse extends AlipayResponse { private static final long serialVersionUID = 2315251653741593216L; /** * 新增/修改的结果 */ @ApiField("card_bin_info") private CardBinActivityInfo cardBinInfo; public void setCardBinInfo(CardBinActivityInfo cardBinInfo) { this.cardBinInfo = cardBinInfo; } public CardBinActivityInfo getCardBinInfo( ) { return this.cardBinInfo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b7d6bd7e393bff9931e15df486bf8ae66e861535
7867212779fba845f04c2049bcdf535675a38db4
/pCrs/javaBDLConnector/src/com/photel/webserviceClient/BDL244/vo/purchaseRQ/DestinationGroup.java
b3afb8e645db1409b85132efe5155f39af1eba1d
[]
no_license
online4you/java-source
1b0f6727a7afb6df261d12b6f787f9a9a85136f4
ddaae964fcea6da11d811883cf4a93f61213c699
refs/heads/master
2020-04-02T03:52:55.226676
2018-10-21T16:03:06
2018-10-21T16:03:06
153,989,430
0
0
null
null
null
null
UTF-8
Java
false
false
2,865
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.5-b01-fcs // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.08.01 at 12:19:03 PM CEST // package com.photel.webserviceClient.BDL244.vo.purchaseRQ; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Contains simple destination list for a destination group. * * <p>Java class for DestinationGroup complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DestinationGroup"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="GroupDestination" type="{http://www.hotelbeds.com/schemas/2005/06/messages}Destination"/> * &lt;element name="SimpleDestinationList" type="{http://www.hotelbeds.com/schemas/2005/06/messages}DestinationList"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DestinationGroup", propOrder = { "groupDestination", "simpleDestinationList" }) public class DestinationGroup { @XmlElement(name = "GroupDestination", required = true) protected Destination groupDestination; @XmlElement(name = "SimpleDestinationList", required = true) protected DestinationList simpleDestinationList; /** * Gets the value of the groupDestination property. * * @return * possible object is * {@link Destination } * */ public Destination getGroupDestination() { return groupDestination; } /** * Sets the value of the groupDestination property. * * @param value * allowed object is * {@link Destination } * */ public void setGroupDestination(Destination value) { this.groupDestination = value; } /** * Gets the value of the simpleDestinationList property. * * @return * possible object is * {@link DestinationList } * */ public DestinationList getSimpleDestinationList() { return simpleDestinationList; } /** * Sets the value of the simpleDestinationList property. * * @param value * allowed object is * {@link DestinationList } * */ public void setSimpleDestinationList(DestinationList value) { this.simpleDestinationList = value; } }
[ "jceular.atwork@gmail.com" ]
jceular.atwork@gmail.com
9ad74d7225f18f118e6c97621bf9d5de0adbb9f2
bc5c2fb730f4562feb9bbe4b6c1bcfc8a32fe217
/liteav/src/main/java/com/tencent/qcloud/xiaoshipin/videoeditor/TCVideoCutActivity.java
1d8591d70bbddf9897cae25ed06a849ac64c4c11
[ "Apache-2.0" ]
permissive
Supopo/HealthElder
9238a3cea78fd8f9b76b4c31b08ef37c8240331c
03d8e11e03aa041aaf435d8b32986537e35bc4c8
refs/heads/master
2023-08-20T03:00:23.614887
2021-09-16T08:36:01
2021-09-16T08:36:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,325
java
package com.tencent.qcloud.xiaoshipin.videoeditor; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.Window; import android.view.WindowManager; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentActivity; import com.hjyy.liteav.R; import com.tencent.qcloud.ugckit.utils.ToastUtil; import com.tencent.qcloud.ugckit.basic.UGCKitResult; import com.tencent.qcloud.ugckit.UGCKitConstants; import com.tencent.qcloud.ugckit.module.cut.IVideoCutKit; import com.tencent.qcloud.ugckit.UGCKitVideoCut; /** * 裁剪视频Activity */ public class TCVideoCutActivity extends FragmentActivity { private String TAG = "TCVideoCutActivity"; private UGCKitVideoCut mUGCKitVideoCut; private String mInVideoPath; private IVideoCutKit.OnCutListener mOnCutListener = new IVideoCutKit.OnCutListener() { /** * 视频裁剪进度条执行完成后调用 */ @Override public void onCutterCompleted(UGCKitResult ugcKitResult) { Log.i(TAG, "onCutterCompleted"); if (ugcKitResult.errorCode == 0) { startEditActivity(); } else { ToastUtil.toastShortMessage("cut video failed. error code:" + ugcKitResult.errorCode + ",desc msg:" + ugcKitResult.descMsg); } } /** * 点击视频裁剪进度叉号,取消裁剪时被调用 */ @Override public void onCutterCanceled() { Log.i(TAG, "onCutterCanceled"); } }; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); initWindowParam(); // 必须在代码中设置主题(setTheme)或者在AndroidManifest中设置主题(android:theme) setTheme(R.style.EditerActivityTheme); setContentView(R.layout.lite_activity_video_cut); mUGCKitVideoCut = (UGCKitVideoCut) findViewById(R.id.video_cutter_layout); mInVideoPath = getIntent().getStringExtra(UGCKitConstants.VIDEO_PATH); mUGCKitVideoCut.setVideoPath(mInVideoPath); mUGCKitVideoCut.getTitleBar().setOnBackClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } private void initWindowParam() { requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } @Override protected void onResume() { super.onResume(); mUGCKitVideoCut.setOnCutListener(mOnCutListener); mUGCKitVideoCut.startPlay(); } @Override protected void onPause() { super.onPause(); mUGCKitVideoCut.stopPlay(); mUGCKitVideoCut.setOnCutListener(null); } @Override protected void onDestroy() { super.onDestroy(); mUGCKitVideoCut.release(); } @Override public void onBackPressed() { super.onBackPressed(); finish(); } private void startEditActivity() { Intent intent = new Intent(this, TCVideoEditerActivity.class); startActivity(intent); finish(); } }
[ "xiyezifeng@163.com" ]
xiyezifeng@163.com
307ecafbd2b8cde21bcec7b3bad52d4628812e44
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-32b-7-8-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/geometry/partitioning/BSPTree_ESTest.java
73cc908d3e2bb11d6d6da11db78fd094fd745d20
[]
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
567
java
/* * This file was automatically generated by EvoSuite * Thu Apr 02 12:21:43 UTC 2020 */ package org.apache.commons.math3.geometry.partitioning; 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 BSPTree_ESTest extends BSPTree_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
812622b53324385ea99559eee2175b2647a8271e
95bec9ea0a0e3b84f1722cd6bf1aa19349e6099e
/src/test/java/org/mockitousage/stacktrace/ClickableStackTracesWhenFrameworkMisusedTest.java
0f9e35190b3c115c02edaea4835000adaa35ac52
[ "MIT" ]
permissive
yangfancoming/mockito
fab90dbe69faf8958fc840208ed3e4a8801d7911
5aa9df3d4ffab02339081d1cf1a8fe691d1be20a
refs/heads/master
2020-06-13T21:21:25.181334
2019-07-02T05:39:51
2019-07-02T05:39:51
194,789,228
0
0
null
null
null
null
UTF-8
Java
false
false
2,188
java
package org.mockitousage.stacktrace; import org.junit.After; import org.junit.Test; import org.mockito.Mock; import org.mockito.exceptions.misusing.InvalidUseOfMatchersException; import org.mockito.exceptions.misusing.UnfinishedStubbingException; import org.mockito.exceptions.misusing.UnfinishedVerificationException; import org.mockitousage.IMethods; import org.mockitoutil.TestBase; import static org.junit.Assert.fail; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.*; public class ClickableStackTracesWhenFrameworkMisusedTest extends TestBase { @Mock private IMethods mock; @After public void resetState() { super.resetState(); } private void misplacedArgumentMatcherHere() { anyString(); } @Test public void shouldPointOutMisplacedMatcher() { misplacedArgumentMatcherHere(); try { verify(mock).simpleMethod(); fail(); } catch (InvalidUseOfMatchersException e) { assertThat(e) .hasMessageContaining("-> at ") .hasMessageContaining("misplacedArgumentMatcherHere("); } } @SuppressWarnings({"MockitoUsage", "CheckReturnValue"}) private void unfinishedStubbingHere() { when(mock.simpleMethod()); } @Test public void shouldPointOutUnfinishedStubbing() { unfinishedStubbingHere(); try { verify(mock).simpleMethod(); fail(); } catch (UnfinishedStubbingException e) { assertThat(e) .hasMessageContaining("-> at ") .hasMessageContaining("unfinishedStubbingHere("); } } @Test public void shouldShowWhereIsUnfinishedVerification() throws Exception { unfinishedVerificationHere(); try { mock(IMethods.class); fail(); } catch (UnfinishedVerificationException e) { assertThat(e).hasMessageContaining("unfinishedVerificationHere("); } } @SuppressWarnings({"MockitoUsage", "CheckReturnValue"}) private void unfinishedVerificationHere() { verify(mock); } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
f8786ee8a115b14dd7623c573723b2a6b6ec9ba2
40665051fadf3fb75e5a8f655362126c1a2a3af6
/ibinti-bugvm/1c6f4d6d47be60edf7b6a068b4e85bf83947529f/3466/ResponseDate.java
e70b8803d911fe91088fca61884807c7959cf110
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
2,401
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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.protocol; import java.io.IOException; import org.apache.http.HttpException; import org.apache.http.HttpResponse; import org.apache.http.HttpResponseInterceptor; import org.apache.http.HttpStatus; import org.apache.http.annotation.ThreadSafe; import org.apache.http.util.Args; /** * ResponseDate is responsible for adding {@code Date} header to the * outgoing responses. This interceptor is recommended for server side protocol * processors. * * @since 4.0 */ @ThreadSafe public class ResponseDate implements HttpResponseInterceptor { private static final HttpDateGenerator DATE_GENERATOR = new HttpDateGenerator(); public ResponseDate() { super(); } @Override public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException { Args.notNull(response, "HTTP response"); final int status = response.getStatusLine().getStatusCode(); if ((status >= HttpStatus.SC_OK) && !response.containsHeader(HTTP.DATE_HEADER)) { final String httpdate = DATE_GENERATOR.getCurrentDate(); response.setHeader(HTTP.DATE_HEADER, httpdate); } } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
326d6cfac6d3318739a83db84236e5fa12460d9c
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE191_Integer_Underflow/CWE191_Integer_Underflow__long_console_readLine_sub_81_goodG2B.java
29817ec27c057a81f626aca562556ffb67aa6e81
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
1,183
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__long_console_readLine_sub_81_goodG2B.java Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-81_goodG2B.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: console_readLine Read data from the console using readLine * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: sub * GoodSink: Ensure there will not be an underflow before subtracting 1 from data * BadSink : Subtract 1 from data, which can cause an Underflow * Flow Variant: 81 Data flow: data passed in a parameter to an abstract method * * */ package testcases.CWE191_Integer_Underflow; import testcasesupport.*; import java.util.logging.Level; import java.util.logging.Logger; public class CWE191_Integer_Underflow__long_console_readLine_sub_81_goodG2B extends CWE191_Integer_Underflow__long_console_readLine_sub_81_base { public void action(long data ) throws Throwable { /* POTENTIAL FLAW: if data == Long.MIN_VALUE, this will overflow */ long result = (long)(data - 1); IO.writeLine("result: " + result); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
33cb9fc809a3c409a4bf62a9f7baeb5796753558
bbf9641e7aa0b598aee4ee70a6529619e15cfe6e
/core/src/main/java/org/togglz/core/spi/FeatureManagerProvider.java
e79b3b11e8c4c119a76ce38a604ce0ff690885f3
[ "Apache-2.0" ]
permissive
talsalmona/togglz
f8eb5c555dd8e2edb0d853a84aee199100320c88
3e224e8a327c3f40df855a1343ddd6d7ab1fbc9f
refs/heads/master
2023-01-12T19:58:08.563802
2012-08-20T17:51:26
2012-08-20T17:51:26
5,108,913
0
0
Apache-2.0
2022-12-09T22:37:54
2012-07-19T11:18:34
Java
UTF-8
Java
false
false
400
java
package org.togglz.core.spi; import org.togglz.core.context.FeatureContext; import org.togglz.core.manager.FeatureManager; import org.togglz.core.util.Weighted; /** * * SPI used by {@link FeatureContext} to lookup the {@link FeatureManager} to use. * * @author Christian Kaltepoth * */ public interface FeatureManagerProvider extends Weighted { FeatureManager getFeatureManager(); }
[ "christian@kaltepoth.de" ]
christian@kaltepoth.de
9ee50045a0464de5289142f61574344bdfda6817
6a08f139bf1c988740dfa0e311d17711ba123d01
/com/google/gson/DefaultDateTypeAdapter.java
e562e8029e911709684e6bfc5c97cbebcac36cb7
[ "NAIST-2003", "LicenseRef-scancode-unicode", "ICU", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
IceCruelStuff/badlion-src
61e5b927e75ed5b895cb2fff2c2b95668468c7f7
18e0579874b8b55fd765be9c60f2b17d4766d504
refs/heads/master
2022-12-31T00:30:26.246407
2020-06-30T16:50:49
2020-06-30T16:50:49
297,207,115
0
0
NOASSERTION
2020-10-15T06:27:58
2020-09-21T02:23:57
null
UTF-8
Java
false
false
3,706
java
package com.google.gson; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonParseException; import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.gson.JsonSyntaxException; import java.lang.reflect.Type; import java.sql.Timestamp; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; final class DefaultDateTypeAdapter implements JsonSerializer, JsonDeserializer { private final DateFormat enUsFormat; private final DateFormat localFormat; private final DateFormat iso8601Format; DefaultDateTypeAdapter() { this(DateFormat.getDateTimeInstance(2, 2, Locale.US), DateFormat.getDateTimeInstance(2, 2)); } DefaultDateTypeAdapter(String datePattern) { this(new SimpleDateFormat(datePattern, Locale.US), new SimpleDateFormat(datePattern)); } DefaultDateTypeAdapter(int style) { this(DateFormat.getDateInstance(style, Locale.US), DateFormat.getDateInstance(style)); } public DefaultDateTypeAdapter(int dateStyle, int timeStyle) { this(DateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US), DateFormat.getDateTimeInstance(dateStyle, timeStyle)); } DefaultDateTypeAdapter(DateFormat enUsFormat, DateFormat localFormat) { this.enUsFormat = enUsFormat; this.localFormat = localFormat; this.iso8601Format = new SimpleDateFormat("yyyy-MM-dd\'T\'HH:mm:ss\'Z\'", Locale.US); this.iso8601Format.setTimeZone(TimeZone.getTimeZone("UTC")); } public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context) { synchronized(this.localFormat) { String dateFormatAsString = this.enUsFormat.format(src); return new JsonPrimitive(dateFormatAsString); } } public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if(!(json instanceof JsonPrimitive)) { throw new JsonParseException("The date should be a string value"); } else { Date date = this.deserializeToDate(json); if(typeOfT == Date.class) { return date; } else if(typeOfT == Timestamp.class) { return new Timestamp(date.getTime()); } else if(typeOfT == java.sql.Date.class) { return new java.sql.Date(date.getTime()); } else { throw new IllegalArgumentException(this.getClass() + " cannot deserialize to " + typeOfT); } } } private Date deserializeToDate(JsonElement json) { synchronized(this.localFormat) { Date var10; try { var10 = this.localFormat.parse(json.getAsString()); } catch (ParseException var7) { try { var10 = this.enUsFormat.parse(json.getAsString()); } catch (ParseException var6) { try { var10 = this.iso8601Format.parse(json.getAsString()); } catch (ParseException var5) { throw new JsonSyntaxException(json.getAsString(), var5); } return var10; } return var10; } return var10; } } public String toString() { StringBuilder sb = new StringBuilder(); sb.append(DefaultDateTypeAdapter.class.getSimpleName()); sb.append('(').append(this.localFormat.getClass().getSimpleName()).append(')'); return sb.toString(); } }
[ "50463419+routerabfrage@users.noreply.github.com" ]
50463419+routerabfrage@users.noreply.github.com
2e1cdc41bd66cebe0b0966174c4d7f12660b723b
0b0a55178557064324d7826cf8edf40985e91d5f
/algorithms/search/search-algorithms-examples/src/main/java/com/trl/SearchAlgorithm.java
151f0fbec6087763f6c96763c215017ec72fe003
[]
no_license
programming-practices/algorithms-and-data-structures
b9c8e1cd779e1e4940399160fd43d0f01a5e15b5
bab3d01cc0c776ac690d32af7279cf981645ae22
refs/heads/main
2022-12-31T12:27:49.620453
2020-10-11T09:07:25
2020-10-11T09:07:25
303,080,160
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package com.trl; /** * The common interface of most searching algorithms * * @author Podshivalov Nikita (https://github.com/nikitap492) * **/ public interface SearchAlgorithm { /** * * @param key is an element which should be found * @param array is an array where the element should be found * @param <T> Comparable type * @return first found index of the element */ <T extends Comparable<T>> int find(T array[], T key); }
[ "tsyupryk.roman@gmail.com" ]
tsyupryk.roman@gmail.com
7c5a8ff93da00607a4ee0e836081ee7588ab04c6
b092732608234c9f1ab25afbc0122f67fcaac94b
/src/main/java/com/mawujun/dwmeta/loader/compare/DiffTable.java
61ce313eea4de2dd6dbccbedd4c2525fec50a1f1
[]
no_license
mawujun1234/dwmeta
86e06cafbf65cc8e7214ae7e890b867a2e5cdc0c
79d6adbde6587e0c8968a18654f2b9c388831092
refs/heads/master
2020-12-30T10:23:40.294521
2017-09-22T09:04:57
2017-09-22T09:04:57
98,868,863
0
0
null
null
null
null
UTF-8
Java
false
false
2,834
java
package com.mawujun.dwmeta.loader.compare; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class DiffTable {//extends Table{ private String name; private String comment; private Map<String, DiffColumn> columns; private DiffPrimaryKey primaryKey;//当前表存在的主键 private Map<String,DiffForeignKey> foreignkeys; private Map<String,DiffUniqueKey> uniqueKeys; private List<DiffPrimaryKey> primaryKeyes;//只记录差异的主键,包括本地多了的,数据库多了的,或者两者都不一致的 private DiffMsgType diffMsgType; public void addDiffPrimaryKey(DiffPrimaryKey diffprimarykey){ if(primaryKeyes==null){ primaryKeyes=new ArrayList<DiffPrimaryKey>(); } primaryKeyes.add(diffprimarykey); } public void addColumn(DiffColumn col){ if(columns==null){ columns=new HashMap<String, DiffColumn>(); } this.columns.put(col.getName(), col); } public void addForeignKey(DiffForeignKey fk){ if(foreignkeys==null){ foreignkeys=new HashMap<String, DiffForeignKey>(); } this.foreignkeys.put(fk.getName(), fk); } public void addUniqueKey(DiffUniqueKey uk){ if(uniqueKeys==null){ uniqueKeys=new HashMap<String, DiffUniqueKey>(); } this.uniqueKeys.put(uk.getName(), uk); } public String getDiffMsgType_name() { if(diffMsgType==null){ return ""; } return diffMsgType.getMsg(); } public DiffMsgType getDiffMsgType() { return diffMsgType; } public void setDiffMsgType(DiffMsgType diffMsgType) { this.diffMsgType = diffMsgType; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public Map<String, DiffColumn> getColumns() { return columns; } public void setColumns(Map<String, DiffColumn> columns) { this.columns = columns; } public Map<String, DiffForeignKey> getForeignkeys() { return foreignkeys; } public void setForeignkeys(Map<String, DiffForeignKey> foreignkeys) { this.foreignkeys = foreignkeys; } public Map<String, DiffUniqueKey> getUniqueKeys() { return uniqueKeys; } public void setUniqueKeys(Map<String, DiffUniqueKey> uniqueKeys) { this.uniqueKeys = uniqueKeys; } public List<DiffPrimaryKey> getPrimaryKeyes() { return primaryKeyes; } public void setPrimaryKeyes(List<DiffPrimaryKey> primaryKeyes) { this.primaryKeyes = primaryKeyes; } public DiffPrimaryKey getPrimaryKey() { return primaryKey; } public void setPrimaryKey(DiffPrimaryKey primaryKey) { this.primaryKey = primaryKey; } }
[ "mawujun1234@163.com" ]
mawujun1234@163.com
043c7cdc9633164e594716b66fbba405b550c093
a95fbe4532cd3eb84f63906167f3557eda0e1fa3
/src/main/java/l2f/gameserver/templates/manor/CropProcure.java
f6eb9872a35da3502d9a8cd3b6e1dcc5a81fccd0
[ "MIT" ]
permissive
Kryspo/L2jRamsheart
a20395f7d1f0f3909ae2c30ff181c47302d3b906
98c39d754f5aba1806f92acc9e8e63b3b827be49
refs/heads/master
2021-04-12T10:34:51.419843
2018-03-26T22:41:39
2018-03-26T22:41:39
126,892,421
2
0
null
null
null
null
UTF-8
Java
false
false
795
java
package l2f.gameserver.templates.manor; public class CropProcure { int _rewardType; int _cropId; long _buyResidual; long _buy; long _price; public CropProcure(int id) { _cropId = id; _buyResidual = 0; _rewardType = 0; _buy = 0; _price = 0; } public CropProcure(int id, long amount, int type, long buy, long price) { _cropId = id; _buyResidual = amount; _rewardType = type; _buy = buy; _price = price; if (_price < 0L) _price = 0L; } public int getReward() { return _rewardType; } public int getId() { return _cropId; } public long getAmount() { return _buyResidual; } public long getStartAmount() { return _buy; } public long getPrice() { return _price; } public void setAmount(long amount) { _buyResidual = amount; } }
[ "cristianleon48@gmail.com" ]
cristianleon48@gmail.com
9674a8e4037b156e99d5209cb098fb3a4418a0a3
606222d9b55f5bea24c54ec2e7a26763e18bdb41
/support-auth-manager/src/test/java/com/lachesis/support/auth/annotation/SupportTestContext.java
8fee12143271b320caefea1e75fbaf2906bb4cef
[ "Apache-2.0" ]
permissive
gavin2lee/lachesis-support
ac8c38d9c81ba411506543d776f916a6b533d029
da2f5ba94f051a7fc7f1e952056eb34a3acc4bfc
refs/heads/master
2020-07-10T20:26:43.673141
2016-12-26T02:59:46
2016-12-26T02:59:46
74,009,817
0
2
null
null
null
null
UTF-8
Java
false
false
574
java
package com.lachesis.support.auth.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.test.context.ContextConfiguration; @Documented @Inherited @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @ContextConfiguration(locations = { "classpath:spring/support-auth-manager-service-test.xml" }) public @interface SupportTestContext { }
[ "gavin2lee@163.com" ]
gavin2lee@163.com
f73cde318c026291be165f8adcf0985781003e1b
dc17a43f25cfd1d3ecf0ffebf709b2721c80031d
/IDE/toolchain/com.lembed.lite.studio.managedbuild.llvm/src/com/lembed/lite/studio/managedbuild/cross/llvm/IsLLVMToolChainSupported.java
5321f3dd9caa5a05e297adbd6586d0b650972ed7
[]
no_license
skykying/bundle
e7b25a8d56668a5cb1cd70932d14958927960e50
0b3b590760baa953677eb99e07d7e1a37af5434c
refs/heads/master
2023-01-07T20:03:42.318642
2020-11-08T06:36:39
2020-11-08T06:36:39
306,216,461
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package com.lembed.lite.studio.managedbuild.cross.llvm; import org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported; import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.osgi.framework.Version; /** * The Class IsLLVMToolChainSupported. */ public class IsLLVMToolChainSupported implements IManagedIsToolChainSupported { @Override public boolean isSupported(IToolChain toolChain, Version version, String instance) { return true; } }
[ "root@lembed.com" ]
root@lembed.com
b5731696a8a12ade7c07d243d6b3bf10861efd72
619ab02c430b2170206be1aa0a71fdf56311de8e
/4GHot/app/src/main/java/com/doit/net/bean/DBBlackInfo.java
94913ba6a574fc2cad29084bb48900fa1b85e05f
[]
no_license
libin1993/yuntan
ee08756e0a2351871a14ad655910826131dfa4ab
33249adc589f743c8a3cd61430711654177f131c
refs/heads/master
2023-04-28T12:29:27.948045
2021-05-25T08:41:52
2021-05-25T08:41:52
367,234,086
0
0
null
null
null
null
UTF-8
Java
false
false
1,337
java
package com.doit.net.bean; import org.xutils.db.annotation.Column; import org.xutils.db.annotation.Table; import java.util.Date; /** * Created by wiker on 2016/4/26. */ @Table(name = "BlackList") public class DBBlackInfo { @Column(name = "id", isId = true) private int id; @Column(name = "imsi") private String imsi; @Column(name = "msisdn") private String msisdn; @Column(name = "remark") private String remark; public DBBlackInfo(String imsi, String msisdn, String remark) { this.imsi = imsi; this.msisdn = msisdn; this.remark = remark; } public DBBlackInfo() { } public String getImsi() { return imsi; } public String getMsisdn() { return msisdn; } public String getRemark() { return remark; } public void setImsi(String imsi) { this.imsi = imsi; } public void setMsisdn(String msisdn) { this.msisdn = msisdn; } public void setRemark(String remark) { this.remark = remark; } @Override public String toString() { return "WhiteListInfo{" + "id=" + id + ", imsi='" + imsi + '\'' + ", msisdn='" + msisdn + '\'' + ", remark='" + remark + '\'' + '}'; } }
[ "1993911441@qq.com" ]
1993911441@qq.com
db1f167479141df9e485f6dfac39f83388bc9767
db05d9d157f9497f99ef0f25d82658fe4c4b9ba3
/jeegem-core/src/main/java/com/jeegem/common/utils/echarts/data/ScatterData.java
5fd3e71f66fea84a7536b6919fafae7d0502269e
[ "MIT" ]
permissive
nwpuxiaozhi/jeegem
bfa3676e24cc188214c1473c492820a39fb65abc
773739569d883513ffe91889826d407b415e7cde
refs/heads/master
2021-09-23T15:34:47.822024
2018-09-25T09:13:03
2018-09-25T09:13:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,640
java
/* * The MIT License (MIT) * * Copyright (c) 2014-2015 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.jeegem.common.utils.echarts.data; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Description: ScatterData * * */ public class ScatterData implements Serializable { private static final long serialVersionUID = 658151140767993468L; private List<Object> value; /** * 横值,纵值 * * @param width * @param height */ public ScatterData(Object width, Object height) { this.value(width, height); } /** * 横值,纵值,大小 * * @param width * @param height * @param size */ public ScatterData(Object width, Object height, Object size) { this.value(width, height, size); } /** * 获取value值 */ public List<Object> value() { if (this.value == null) { this.value = new ArrayList<Object>(); } return this.value; } /** * 设置values值 * * @param values */ private ScatterData value(Object... values) { if (values == null || values.length == 0) { return this; } this.value().addAll(Arrays.asList(values)); return this; } /** * 获取value值 */ public List<Object> getValue() { return value; } /** * 设置value值 * * @param value */ public void setValue(List<Object> value) { this.value = value; } }
[ "4407509@qq.com" ]
4407509@qq.com
7d992913d2cb9e78efdcb5adb242db9cc5aaa0eb
939bfb9a6700935cfe7176ba7d29c24721553840
/src/main/java/fr/univnantes/termsuite/resources/OccurrenceFilter.java
eae8f4aac5689cbbfd5b02c09d25b36fd2cddc94
[ "Apache-2.0" ]
permissive
VisaTM/termsuite-core-omtd
db1f8f576e9a712fbbab4e95b561a4aae29b2922
44a5dde6d92be9758aa9c08fdc2fa888f6ede3d9
refs/heads/master
2020-03-17T05:42:42.944956
2018-05-17T09:54:02
2018-05-17T09:54:02
130,179,757
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
/******************************************************************************* * Copyright 2015-2016 - CNRS (Centre National de Recherche Scientifique) * * 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 fr.univnantes.termsuite.resources; import fr.univnantes.lina.uima.tkregex.RegexOccurrence; public interface OccurrenceFilter { boolean accept(RegexOccurrence occurrence); }
[ "damien.cram@univ-nantes.fr" ]
damien.cram@univ-nantes.fr
391d424586cbe84476ae0f625cdbf724fcb60ee3
2b438c607ca0b2ee575eec4752cc7c5c7792f4cc
/JabberClient2/src/jabber/wrap/IMessageListener.java
a8cd980ba5afd3f53ab8006574768cc1a41ee6f8
[]
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
WINDOWS-1251
Java
false
false
369
java
package jabber.wrap; /** оповещатель о входящих сообщениях */ public interface IMessageListener { /** оповещатель о входящих сообщениях * @param from - от кого * @param text - текст входящего сообщения */ public void messageNotify(String from, String text); }
[ "technik7job@gmail.com" ]
technik7job@gmail.com
653a88e99fa969d9cade3c629d1023ef8cb1eaf5
2295e593b7c4acd2fc612efa7ebaddc23fce4f1b
/bos-dao/src/main/java/com/guo/bos/dao/IFunctionDao.java
cc35931c7977b0e19f819eae0d2ae2c085aa5b01
[]
no_license
qsw1214/guo-bos
fd58bf54086024a2171032debf42b8ff8e21e46d
64fc746e24d35e87049d51f75cd7fe1793dcc1a9
refs/heads/master
2020-09-13T15:09:45.703647
2017-09-01T14:40:56
2017-09-01T14:40:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
391
java
package com.guo.bos.dao; import java.util.List; import com.guo.bos.dao.base.IBaseDao; import com.guo.bos.domain.Function; public interface IFunctionDao extends IBaseDao<Function> { public List<Function> findAll(); public List<Function> findFunctionListByUserId(String id); public List<Function> findAllMenu(); public List<Function> findMenuByUserId(String id); }
[ "gxx632364@gmail.com" ]
gxx632364@gmail.com
e7a2d52b9a6b433764e84887c38db371dabf30a8
25d410ce532514faf7f968598da489d13f92f585
/core/src/main/java/net/sf/mmm/util/lang/impl/spring/UtilLangSpringConfig.java
99e5017c981b924a6e34554cba69a823ac0e3d45
[ "Apache-2.0" ]
permissive
maybeec/util
8f7717fb60174139176a096f91bc465766a51f25
79f7297f6f220a73daf8e09146218da2afe2d719
refs/heads/master
2021-01-22T17:14:24.266110
2016-05-16T10:50:03
2016-05-16T10:50:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,965
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package net.sf.mmm.util.lang.impl.spring; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import net.sf.mmm.util.lang.api.BasicUtil; import net.sf.mmm.util.lang.api.DatatypeDescriptorManager; import net.sf.mmm.util.lang.api.DatatypeDetector; import net.sf.mmm.util.lang.api.EnumProvider; import net.sf.mmm.util.lang.api.StringUtil; import net.sf.mmm.util.lang.api.SystemUtil; import net.sf.mmm.util.lang.base.BasicUtilImpl; import net.sf.mmm.util.lang.base.DatatypeDetectorImpl; import net.sf.mmm.util.lang.base.SimpleEnumProvider; import net.sf.mmm.util.lang.base.StringUtilImpl; import net.sf.mmm.util.lang.base.SystemUtilImpl; import net.sf.mmm.util.lang.base.datatype.descriptor.DatatypeDescriptorManagerImpl; import net.sf.mmm.util.reflect.impl.spring.UtilReflectSpringConfig; /** * This is the Spring {@link Configuration} for {@link net.sf.mmm.util.lang}. * * @author hohwille * @since 8.0.0 */ @Configuration @Import(UtilReflectSpringConfig.class) @ComponentScan("net.sf.mmm.util.lang.base.datatype.descriptor") @SuppressWarnings("javadoc") public class UtilLangSpringConfig { @Bean public BasicUtil basicUtil() { return new BasicUtilImpl(); } @Bean public StringUtil stringUtil() { return new StringUtilImpl(); } @Bean public SystemUtil systemUtil() { return new SystemUtilImpl(); } @Bean public DatatypeDetector datatypeDetector() { return new DatatypeDetectorImpl(); } @Bean public DatatypeDescriptorManager datatypeDescriptorManager() { return new DatatypeDescriptorManagerImpl(); } @Bean public EnumProvider enumProvider() { return new SimpleEnumProvider(); } }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net
9b3f262e6394a6b07026b35cf3e4da5b4a7cf767
c98ded3f6de5a1bb91c7930cd090208fbee0081f
/skWeiChatBaidu/src/main/java/com/sk/weichat/bean/RoomMember.java
56ff2ad21017f72a2bab9f7b5303613095e5fbde
[]
no_license
GJF19981210/IM_Android
e628190bb504b52ec04e8beaf5449bd847904c84
7743586eac5ca07d1a7e9a2d4b2cc24d68a082ac
refs/heads/master
2023-01-01T11:15:42.085782
2020-10-19T07:10:43
2020-10-19T07:10:43
305,293,872
2
0
null
null
null
null
UTF-8
Java
false
false
3,174
java
package com.sk.weichat.bean; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; import com.sk.weichat.db.dao.RoomMemberDaoImpl; /** * Created by zq on 2017/6/27 0027. */ @DatabaseTable(daoClass = RoomMemberDaoImpl.class) public class RoomMember { public static final int ROLE_OWNER = 1; public static final int ROLE_MANAGER = 2; public static final int ROLE_MEMBER = 3; public static final int ROLE_INVISIBLE = 4; public static final int ROLE_GUARDIAN = 5; @DatabaseField(generatedId = true) private int _id; // 房间id @DatabaseField private String roomId; // 用户id @DatabaseField private String userId; // 用户昵称 A @DatabaseField private String userName; // 群主对该群内成员的备注名 仅群主可见 @DatabaseField private String cardName; /** * 1创建者,2管理员,3成员, * 4, 隐身人, * 5,监控人, * 隐身人和监控人:即群主设置某成员为这2个角色,则群员数量减1,其他人完全看不到他;隐身人和监控人的区别是,前者不可以说话,后者能说话。 */ // 职位 @DatabaseField private int role; // 加入时间 @DatabaseField private int createTime; public RoomMember() { } public static boolean shouldSendRead(Integer role) { if (role == null) { return true; } return role != 4 && role != 5; } /** * 返回是群主或者管理员, * 用于显示管理员头像相框, */ public boolean isGroupOwnerOrManager() { return getRole() == ROLE_OWNER || getRole() == ROLE_MANAGER; } /** * 全员禁言是否对此人生效, * {@link com.sk.weichat.bean.message.MucRoomMember#isAllBannedEffective} * {@link com.sk.weichat.bean.RoomMember#isAllBannedEffective} */ public boolean isAllBannedEffective() { return getRole() == ROLE_MEMBER; } /** * 是否是隐身人,不能发言, */ public boolean isInvisible() { return getRole() == ROLE_INVISIBLE; } public int get_id() { return _id; } public void set_id(int _id) { this._id = _id; } public String getRoomId() { return roomId; } public void setRoomId(String roomId) { this.roomId = roomId; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getCardName() { return cardName; } public void setCardName(String cardName) { this.cardName = cardName; } public int getRole() { return role; } public void setRole(int role) { this.role = role; } public int getCreateTime() { return createTime; } public void setCreateTime(int createTime) { this.createTime = createTime; } }
[ "2937717941@qq.com" ]
2937717941@qq.com
5c0b52856b6b581d26657217a458fc3102ca3128
08bdd164c174d24e69be25bf952322b84573f216
/opencores/client/foundation classes/j2sdk-1_4_2-src-scsl/hotspot/src/share/vm/agent/sun/jvm/hotspot/asm/sparc/SPARCV9FlushwInstruction.java
7ebab2c6d16464708034eab6f7a108c55d2b852c
[]
no_license
hagyhang/myforthprocessor
1861dcabcf2aeccf0ab49791f510863d97d89a77
210083fe71c39fa5d92f1f1acb62392a7f77aa9e
refs/heads/master
2021-05-28T01:42:50.538428
2014-07-17T14:14:33
2014-07-17T14:14:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
/* * @(#)SPARCV9FlushwInstruction.java 1.2 03/01/23 11:19:10 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package sun.jvm.hotspot.asm.sparc; import sun.jvm.hotspot.asm.*; public class SPARCV9FlushwInstruction extends SPARCInstruction implements SPARCV9Instruction { public SPARCV9FlushwInstruction() { super("flushw"); } }
[ "blue@cmd.nu" ]
blue@cmd.nu
eab8a1f9b4703b3137ad534fe8c6aac0f4e9daa5
df32c828632ae49e95067c8b3ce832f9408e2d16
/design_pattern/src/org/learning/pattern/state/gumballstatewinner/state/State.java
ee18713201f19461999be167828c4a92bc6d02fb
[]
no_license
rajiv0903/Funda
d2bdb7eb761b66a94788641b991a446467113dd4
7c6f85399974a20925e09962d0a9efa208b0ac76
refs/heads/master
2021-07-09T01:15:07.850076
2018-12-30T20:44:49
2018-12-30T20:44:49
100,295,023
0
0
null
null
null
null
UTF-8
Java
false
false
201
java
package org.learning.pattern.state.gumballstatewinner.state; public interface State { public void insertQuarter(); public void ejectQuarter(); public void turnCrank(); public void dispense(); }
[ "rajiv.juprod@gmail.com" ]
rajiv.juprod@gmail.com
b0b690376cad029241af35ae226387de0c5b9bd6
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/DB/Math70/AstorMain-math70/src/variant-1562/org/apache/commons/math/analysis/solvers/BisectionSolver.java
007e11eb2da789d8fdc7ac49a2048ef280174dda
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,228
java
package org.apache.commons.math.analysis.solvers; public class BisectionSolver extends org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl { @java.lang.Deprecated public BisectionSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) { super(f, 100, 1.0E-6); } public BisectionSolver() { super(100, 1.0E-6); } @java.lang.Deprecated public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } @java.lang.Deprecated public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return super.getSummary(); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(min, max); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifyInterval(min, max); double m; double fm; double fmin; int i = 0; while (i < (maximalIterationCount)) { m = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.midpoint(min, max); fmin = f.value(min); fm = f.value(m); if ((fm * fmin) > 0.0) { min = m; } else { max = m; } if ((java.lang.Math.abs((max - min))) <= (absoluteAccuracy)) { m = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.midpoint(min, max); setResult(m, i); return m; } ++i; } throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount); } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
6eb739fc0d812f55ab4bf30b3309421fb6667959
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/autonavi/inter/impl/ServiceLoaderImpl.java
992791230cf91e98cc61e33550d2702b29ce53b7
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,484
java
package com.autonavi.inter.impl; import com.autonavi.inter.IServiceLoader; import java.util.HashMap; import java.util.Map; public final class ServiceLoaderImpl implements IServiceLoader { private static final Map<Class, Class> sMap; static { HashMap hashMap = new HashMap(); sMap = hashMap; hashMap.putAll(new AMAP_MODULE_OPERATION_ServiceImpl_DATA()); sMap.putAll(new AMAP_MODULE_COMMON_ServiceImpl_DATA()); sMap.putAll(new BEHAVIORTRACKER_ServiceImpl_DATA()); sMap.putAll(new EYRIEADAPTER_ServiceImpl_DATA()); sMap.putAll(new APPUPGRADE_ServiceImpl_DATA()); sMap.putAll(new CLOUDSYNC_ServiceImpl_DATA()); sMap.putAll(new COMMUTE_ServiceImpl_DATA()); sMap.putAll(new FAVORITES_ServiceImpl_DATA()); sMap.putAll(new FEATUREGUIDE_ServiceImpl_DATA()); sMap.putAll(new FEEDBACK_ServiceImpl_DATA()); sMap.putAll(new FOOTRESULT_ServiceImpl_DATA()); sMap.putAll(new FREQUENTLOCATION_ServiceImpl_DATA()); sMap.putAll(new NOTIFICATION_ServiceImpl_DATA()); sMap.putAll(new OFFLINEMAP_API_ServiceImpl_DATA()); sMap.putAll(new QRCODE_ServiceImpl_DATA()); sMap.putAll(new RIDERESULT_ServiceImpl_DATA()); sMap.putAll(new SHAREBIKE_ServiceImpl_DATA()); sMap.putAll(new SPLASHSCREEN_ServiceImpl_DATA()); sMap.putAll(new TRAFFICEVENT_ServiceImpl_DATA()); sMap.putAll(new TRAFFICEVENT_API_ServiceImpl_DATA()); sMap.putAll(new VUI_ServiceImpl_DATA()); sMap.putAll(new WALLET_ServiceImpl_DATA()); sMap.putAll(new WEBVIEW_ServiceImpl_DATA()); sMap.putAll(new AMAPHOME_ServiceImpl_DATA()); sMap.putAll(new CAROWNERSERVICE_ServiceImpl_DATA()); sMap.putAll(new EVALUATE_ServiceImpl_DATA()); sMap.putAll(new LIFE_ServiceImpl_DATA()); sMap.putAll(new MAIN_ServiceImpl_DATA()); sMap.putAll(new MAPHOME_ServiceImpl_DATA()); sMap.putAll(new ROUTEPLAN_ServiceImpl_DATA()); sMap.putAll(new SEARCHRESULT_ServiceImpl_DATA()); sMap.putAll(new UITEMPLATE_ServiceImpl_DATA()); sMap.putAll(new DRIVE_ServiceImpl_DATA()); sMap.putAll(new PLANHOME_ServiceImpl_DATA()); sMap.putAll(new TRIPGROUP_ServiceImpl_DATA()); sMap.putAll(new SCHOOLBUS_ServiceImpl_DATA()); sMap.putAll(new MAPBASE_ServiceImpl_DATA()); } public final Class getService(Class cls) { return sMap.get(cls); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
42305abf530952a896e6976377e98d291a50eed6
24a32bc2aafcca19cf5e5a72ee13781387be7f0b
/src/framework/tags/gwt-test-utils-parent-0.24.4/gwt-test-utils/src/test/java/com/octo/gwt/test/CookiesTest.java
ec0051fb18fca691efdf3a5cc55b9fc8dee532c1
[]
no_license
google-code-export/gwt-test-utils
27d6ee080f039a8b4111e04f32ba03e5396dced5
0391347ea51b3db30c4433566a8985c4e3be240e
refs/heads/master
2016-09-09T17:24:59.969944
2012-11-20T07:13:03
2012-11-20T07:13:03
32,134,062
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.octo.gwt.test; import junit.framework.Assert; import org.junit.Test; import com.google.gwt.user.client.Cookies; public class CookiesTest extends GwtTestTest { @Test public void testCookies() { Cookies.setCookie("test", "test-value"); Assert.assertEquals("test-value", Cookies.getCookie("test")); Cookies.removeCookie("test"); Assert.assertNull(Cookies.getCookie("test")); } }
[ "gael.lazzari@d9eb14d4-a931-11de-b950-3d5b5f4ea0aa" ]
gael.lazzari@d9eb14d4-a931-11de-b950-3d5b5f4ea0aa
70c35653a6efa3861b914572477310a3929fa5e8
6ab578e02e660bc7aabead98398b052cc8835295
/v2/googlecloud-to-googlecloud/src/main/java/com/google/cloud/teleport/v2/templates/DataplexJdbcIngestion.java
7546acbc3f616a15a1d046f9fbdcf5c95d573193
[ "Apache-2.0" ]
permissive
smeyn/DataflowTemplates
093c84c7e57fc436c9e0cb6a70564cc9ff533b74
26029a4bb55a1ad91925289a8567ce44f4628dc9
refs/heads/master
2021-10-27T04:26:54.066317
2021-10-12T04:32:12
2021-10-12T04:32:12
131,914,366
0
0
null
2018-05-02T22:57:56
2018-05-02T22:57:56
null
UTF-8
Java
false
false
7,387
java
/* * Copyright (C) 2021 Google LLC * * 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.google.cloud.teleport.v2.templates; import static com.google.common.base.Preconditions.checkNotNull; import com.google.api.services.bigquery.model.TableRow; import com.google.api.services.dataplex.v1.model.GoogleCloudDataplexV1Asset; import com.google.cloud.teleport.v2.clients.DataplexClient; import com.google.cloud.teleport.v2.clients.DefaultDataplexClient; import com.google.cloud.teleport.v2.io.DynamicJdbcIO; import com.google.cloud.teleport.v2.io.DynamicJdbcIO.DynamicDataSourceConfiguration; import com.google.cloud.teleport.v2.options.DataplexJdbcIngestionOptions; import com.google.cloud.teleport.v2.utils.JdbcConverters; import com.google.cloud.teleport.v2.utils.KMSEncryptedNestedValue; import com.google.cloud.teleport.v2.utils.SchemaUtils; import com.google.cloud.teleport.v2.values.DataplexAssetResourceSpec; import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.util.concurrent.ExecutionException; import org.apache.avro.Schema; import org.apache.avro.generic.GenericRecord; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.coders.AvroCoder; import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO; import org.apache.beam.sdk.io.gcp.bigquery.TableRowJsonCoder; import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * The {@link DataplexJdbcIngestion} pipeline reads from Jdbc and exports results to a BigQuery * dataset or to Cloud Storage, registering metadata in Dataplex. * * <p>Accepts a Dataplex asset as the destination, which will be resolved to the corresponding * BigQuery dataset/Storage bucket via Dataplex API. * * <p>TODO: add more comments later */ public class DataplexJdbcIngestion { /* Logger for class.*/ private static final Logger LOG = LoggerFactory.getLogger(DataplexJdbcIngestion.class); private static KMSEncryptedNestedValue maybeDecrypt(String unencryptedValue, String kmsKey) { return new KMSEncryptedNestedValue(unencryptedValue, kmsKey); } /** * Main entry point for pipeline execution. * * @param args Command line arguments to the pipeline. */ public static void main(String[] args) throws IOException, InterruptedException, ExecutionException { DataplexJdbcIngestionOptions options = PipelineOptionsFactory.fromArgs(args) .withValidation() .as(DataplexJdbcIngestionOptions.class); Pipeline pipeline = Pipeline.create(options); DataplexClient dataplexClient = DefaultDataplexClient.withDefaultClient(); String assetName = options.getOutputAsset(); GoogleCloudDataplexV1Asset asset = resolveAsset(assetName, dataplexClient); String assetType = asset.getResourceSpec().getType(); if (DataplexAssetResourceSpec.BIGQUERY_DATASET.name().equals(assetType)) { buildBigQueryPipeline(pipeline, options); } else if (DataplexAssetResourceSpec.STORAGE_BUCKET.name().equals(assetType)) { String targetRootPath = "gs://" + asset.getResourceSpec().getName(); buildGcsPipeline(pipeline, options, targetRootPath); } else { throw new IllegalArgumentException( String.format( "Asset " + assetName + " is of type " + assetType + ". Only " + DataplexAssetResourceSpec.BIGQUERY_DATASET.name() + "and " + DataplexAssetResourceSpec.STORAGE_BUCKET.name() + " supported.")); } pipeline.run(); } /** * Resolves a Dataplex asset. * * @param assetName Asset name from which the Dataplex asset will be resolved. * @param dataplexClient Dataplex client to connect to Dataplex via asset name. * @return The resolved asset */ private static GoogleCloudDataplexV1Asset resolveAsset( String assetName, DataplexClient dataplexClient) throws IOException { LOG.info("Resolving asset: {}", assetName); GoogleCloudDataplexV1Asset asset = dataplexClient.getAsset(assetName); checkNotNull(asset.getResourceSpec(), "Asset has no ResourceSpec."); String assetType = asset.getResourceSpec().getType(); checkNotNull(assetType, "Asset has no type."); LOG.info("Resolved resource type: {}", assetType); String resourceName = asset.getResourceSpec().getName(); checkNotNull(resourceName, "Asset has no resource name."); LOG.info("Resolved resource name: {}", resourceName); return asset; } @VisibleForTesting static void buildGcsPipeline( Pipeline pipeline, DataplexJdbcIngestionOptions options, String targetRootPath) { // TODO: Add auto schema discovery checkNotNull(options.getSchemaPath(), "Path to Avro schema is required when writing to GCS."); Schema schema = SchemaUtils.getAvroSchema(options.getSchemaPath()); pipeline.apply( "Read from JdbcIO", DynamicJdbcIO.<GenericRecord>read() .withDataSourceConfiguration(configDataSource(options)) .withQuery(options.getQuery()) .withCoder(AvroCoder.of(schema)) .withRowMapper(JdbcConverters.getResultSetToGenericRecord(schema))); // TODO: write to transform that writes GenericRecords to GCS with partition // TODO: Dataplex Metadata Update } @VisibleForTesting static void buildBigQueryPipeline(Pipeline pipeline, DataplexJdbcIngestionOptions options) { pipeline .apply( "Read from JdbcIO", DynamicJdbcIO.<TableRow>read() .withDataSourceConfiguration(configDataSource(options)) .withQuery(options.getQuery()) .withCoder(TableRowJsonCoder.of()) .withRowMapper(JdbcConverters.getResultSetToTableRow())) .apply( "Write to BigQuery", BigQueryIO.writeTableRows() .withoutValidation() .withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_NEVER) .withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND) .to(options.getOutputTable())); // TODO: partition // TODO: Dataplex Metadata Update } static DynamicDataSourceConfiguration configDataSource(DataplexJdbcIngestionOptions options) { return DynamicJdbcIO.DynamicDataSourceConfiguration.create( options.getDriverClassName(), maybeDecrypt(options.getConnectionURL(), options.getKMSEncryptionKey())) .withUsername(maybeDecrypt(options.getUsername(), options.getKMSEncryptionKey())) .withPassword(maybeDecrypt(options.getPassword(), options.getKMSEncryptionKey())) .withDriverJars(options.getDriverJars()) .withConnectionProperties(options.getConnectionProperties()); } }
[ "cloud-teleport@google.com" ]
cloud-teleport@google.com
397eb3a8994111a7689899a978bee0f5c843243f
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.2.jar/classes.jar/cqw.java
81001139267d8a337fac3ca249f19f203560ec43
[]
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
734
java
import android.hardware.Camera; import com.tencent.biz.widgets.ScannerView; class cqw implements Runnable { cqw(cqv paramcqv) {} public void run() { if (this.a.jdField_a_of_type_AndroidHardwareCamera == null) { return; } try { this.a.jdField_a_of_type_AndroidHardwareCamera.cancelAutoFocus(); label21: ScannerView.a(this.a.jdField_a_of_type_ComTencentBizWidgetsScannerView, true); return; } catch (Exception localException) { break label21; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.2.jar\classes.jar * Qualified Name: cqw * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
7b14c0c4576c2b7c8387d72a63688f792c4bf881
2f3d768f86d22a3a1e236ad436ae131f8944a2cb
/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java
a0282dc805364d4a7652327de5a9bce5ee3fd1a9
[ "Apache-2.0" ]
permissive
micedre/syncope
975d074e1ee6d4d4acca5c55c8f332c52f8b11e1
aa36e2ab5f5e9a14cca5f851588de01c190ce2ff
refs/heads/master
2021-01-19T22:01:15.437534
2017-04-18T08:41:41
2017-04-18T08:43:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,325
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.syncope.core.workflow.java; import java.io.OutputStream; import java.util.Collections; import java.util.List; import org.apache.syncope.common.lib.patch.GroupPatch; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.WorkflowDefinitionTO; import org.apache.syncope.common.lib.to.WorkflowFormTO; import org.apache.syncope.core.provisioning.api.PropagationByResource; import org.apache.syncope.common.lib.types.ResourceOperation; import org.apache.syncope.core.persistence.api.entity.group.Group; import org.apache.syncope.core.provisioning.api.WorkflowResult; import org.apache.syncope.core.workflow.api.WorkflowDefinitionFormat; import org.apache.syncope.core.workflow.api.WorkflowException; /** * Simple implementation basically not involving any workflow engine. */ public class DefaultGroupWorkflowAdapter extends AbstractGroupWorkflowAdapter { @Override public WorkflowResult<String> create(final GroupTO groupTO) { Group group = entityFactory.newEntity(Group.class); dataBinder.create(group, groupTO); group = groupDAO.save(group); PropagationByResource propByRes = new PropagationByResource(); propByRes.set(ResourceOperation.CREATE, group.getResourceKeys()); return new WorkflowResult<>(group.getKey(), propByRes, "create"); } @Override protected WorkflowResult<String> doUpdate(final Group group, final GroupPatch groupPatch) { PropagationByResource propByRes = dataBinder.update(group, groupPatch); Group updated = groupDAO.save(group); return new WorkflowResult<>(updated.getKey(), propByRes, "update"); } @Override protected void doDelete(final Group group) { groupDAO.delete(group); } @Override public WorkflowResult<String> execute(final GroupTO group, final String taskId) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public List<WorkflowFormTO> getForms() { return Collections.emptyList(); } @Override public WorkflowFormTO getForm(final String workflowId) { return null; } @Override public WorkflowFormTO claimForm(final String taskId) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public WorkflowResult<GroupPatch> submitForm(final WorkflowFormTO form) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public List<WorkflowDefinitionTO> getDefinitions() { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public void exportDefinition(final String key, final WorkflowDefinitionFormat format, final OutputStream os) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public void exportDiagram(final String key, final OutputStream os) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public void importDefinition(final String key, final WorkflowDefinitionFormat format, final String definition) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } @Override public void deleteDefinition(final String key) { throw new WorkflowException(new UnsupportedOperationException("Not supported.")); } }
[ "ilgrosso@apache.org" ]
ilgrosso@apache.org
185a26ffc6c242c5de65b05ed97c6a9c7940b4bc
01ebbc94cd4d2c63501c2ebd64b8f757ac4b9544
/backend/gxqpt-exchange/gxqpt-exchange-api/src/main/java/com/hengyunsoft/platform/exchange/api/set/dto/DataSetDataDto.java
80f80419a947eb9022d0934442235b2dc8428efa
[]
no_license
KevinAnYuan/gxq
60529e527eadbbe63a8ecbbad6aaa0dea5a61168
9b59f4e82597332a70576f43e3f365c41d5cfbee
refs/heads/main
2023-01-04T19:35:18.615146
2020-10-27T06:24:37
2020-10-27T06:24:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package com.hengyunsoft.platform.exchange.api.set.dto; import com.github.pagehelper.PageInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.ArrayList; import java.util.List; /** * com.hengyunsoft.platform.exchange.api.set.dto * 版权:中科恒运软件科技股份有限公司贵阳分公司 * 描述:动态数据集列表Dto * 修改人:gbl * 修改时间:2018/4/22 * 修改内容:新增 */ @Data @ApiModel(value = " DataSetData", description = "动态数据集列表Dto") public class DataSetDataDto { @ApiModelProperty(value = "标题") private List<DataSetElementDTO> fieldName; @ApiModelProperty(value = "行数据") private PageInfo<Object> dataList; @ApiModelProperty(value = "每个字段的规则") private List<DateSetElementRuleDTO> eles; }
[ "470382668@qq.com" ]
470382668@qq.com
043bfdb24d0e211f933c5940c953576b6bddec5e
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/sns/model/af$6.java
59be147186931cdd55c581e21f95da970aebe9c3
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package com.tencent.mm.plugin.sns.model; import android.os.Looper; import com.tencent.mm.sdk.platformtools.ag; class af$6 implements Runnable { final /* synthetic */ af nqT; af$6(af afVar) { this.nqT = afVar; } public final void run() { Looper.prepare(); af.a(this.nqT, new ag()); Looper.loop(); } }
[ "707194831@qq.com" ]
707194831@qq.com
f467788a3450d8f23bfa079736a9b90d67438836
60155d3fbd07ba548c5c63230219f772364ed61b
/SPRING/spring-mvc/springmvc-demo/src/main/java/com/lagou/edu/interceptor/MyInterceptor01.java
dd7401206bb610a261c182869b97df91651a7c1c
[ "Apache-2.0" ]
permissive
SpikeLavender/totoro
f39a5334a32a0de526d846f8bdc45d1a863ed93b
db7125a355f0fccba4d69df04e9b1bd70ab43c7c
refs/heads/master
2022-12-24T16:44:35.001122
2020-01-18T21:08:20
2020-01-18T21:08:20
230,823,056
0
0
Apache-2.0
2022-12-16T05:10:58
2019-12-30T01:00:03
Java
UTF-8
Java
false
false
1,758
java
package com.lagou.edu.interceptor; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * 自定义springmvc拦截器 */ public class MyInterceptor01 implements HandlerInterceptor { /** * 该方法会在handler方法业务逻辑执行之前执行 * 往往在这里完成权限校验工作 * @param request * @param response * @param handler * @return 返回值boolean代表是否放行,true代表放行,false代表中止 * @throws Exception */ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { System.out.println("MyInterceptor01 preHandle......"); return true; } /** * 会在handler方法业务逻辑执行之后尚未跳转页面时执行 * @param request * @param response * @param handler * @param modelAndView 封装了视图和数据,此时尚未跳转页面,可以在这里针对返回的数据和视图信息进行修改 * @throws Exception */ @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { System.out.println("MyInterceptor01 postHandle......"); } /** * 页面已经跳转渲染完毕之后执行 * @param request * @param response * @param handler * @param ex 可以在这里捕获异常 * @throws Exception */ @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { System.out.println("MyInterceptor01 afterCompletion......"); } }
[ "hetengjiao@chinamobile.com" ]
hetengjiao@chinamobile.com
d19dbab676bf4fd3d5eee92de0c24eb484555281
7a6e973df8c5ff138f973f4ed436b52ee5751fdf
/Day09/src/kh/vo/MethodTest.java
ad1c512a66bd15e266ac05fa1883908ff2221d0f
[]
no_license
ajtwls1256/Eclipse-workspace
b0e6c17b49cdf94d46bc4d345851cf65a5f5dc7a
b473e632bc232768a9546172784c31f15fbd8680
refs/heads/master
2020-09-17T10:44:23.830133
2019-11-26T08:01:54
2019-11-26T08:01:54
224,078,431
1
0
null
null
null
null
UHC
Java
false
false
1,167
java
package kh.vo; public class MethodTest { public void main() { int result = add(10,20); System.out.println(result); int result2 = sub(10,20); System.out.println(result2); int result3 = mul(10,20); System.out.println(result3); double result4 = div(10,20); System.out.println(result4); int result5 = add1(10, 20, 30); System.out.println(result5); String test = test(); System.out.println(test); } public String test() { String str = "Hello"; return str; } // 더하기 public int add(int num1, int num2) { return num1 + num2; } // 빼기 public int sub(int num1, int num2) { return num1 - num2; } // 곱하기 public int mul(int num1, int num2) { return num1 * num2; } // 나누기 public double div(int num1, int num2) { return (double)num1 / num2; } public int add1(int num1, int num2, int num3) { return num1 + num2 + num3; } }
[ "ajtwls1256@gmail.com" ]
ajtwls1256@gmail.com
0dc83fb181b39dd7e76f91eabe81d4ba359376a6
7b0b184c0beece3c49ffaeaac10968d939c4a1d2
/main/internalmaven/io.sarl.maven.batchcompiler/src/main/java/io/sarl/lang/compiler/batch/JavacBatchCompiler.java
4f764d83b95b6b7f0a6fa18cef6a4602e85910bc
[ "Apache-2.0" ]
permissive
Franceshe/sarl
20b9b6421bdf13c641b43776cc1cc5664a6452a1
bfabc217b8c50683a3f77729eedc6137d97396a9
refs/heads/master
2022-04-19T03:51:53.314374
2020-04-05T17:01:42
2020-04-05T17:01:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,735
java
/* * $Id$ * * SARL is an general-purpose agent programming language. * More details on http://www.sarl.io * * Copyright (C) 2014-2020 the original authors or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.sarl.lang.compiler.batch; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.nio.charset.Charset; import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import javax.tools.JavaCompiler; import javax.tools.ToolProvider; import com.google.common.collect.Lists; import com.google.inject.Singleton; import org.apache.commons.io.output.WriterOutputStream; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.xtext.util.JavaVersion; import org.eclipse.xtext.util.Strings; import org.slf4j.Logger; /** A wrapper on top of the Oracle Java Compiler (javac). * * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ * @since 0.8 */ @Singleton public class JavacBatchCompiler implements IJavaBatchCompiler { @Override @SuppressWarnings({ "checkstyle:parameternumber", "checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity", "resource" }) public boolean compile(File classDirectory, Iterable<File> sourcePathDirectories, Iterable<File> classPathEntries, List<File> bootClassPathEntries, String javaVersion, String encoding, boolean isCompilerMoreVerbose, OptimizationLevel optimizationLevel, PrintWriter outWriter, PrintWriter errWriter, Logger logger, IProgressMonitor progress) { assert progress != null; final List<String> commandLineArguments = Lists.newArrayList(); if (optimizationLevel != null) { switch (optimizationLevel) { case G2: commandLineArguments.add("-g:none"); //$NON-NLS-1$ break; case G1: commandLineArguments.add("-g:none"); //$NON-NLS-1$ break; case G0: default: commandLineArguments.add("-g"); //$NON-NLS-1$ } } commandLineArguments.add("-nowarn"); //$NON-NLS-1$ if (isCompilerMoreVerbose) { commandLineArguments.add("-verbose"); //$NON-NLS-1$ } if (progress.isCanceled()) { return false; } if (!bootClassPathEntries.isEmpty() && !Strings.isEmpty(javaVersion)) { final JavaVersion jversion = JavaVersion.fromQualifier(javaVersion); if (!jversion.isAtLeast(JavaVersion.JAVA9)) { final StringBuilder cmd = new StringBuilder(); boolean first = true; for (final File entry : bootClassPathEntries) { if (progress.isCanceled()) { return false; } if (entry.exists()) { if (first) { first = false; } else { cmd.append(File.pathSeparator); } cmd.append(entry.getAbsolutePath()); } } if (cmd.length() > 0) { commandLineArguments.add("-bootclasspath"); //$NON-NLS-1$ commandLineArguments.add(cmd.toString()); } } } final Iterator<File> classPathIterator = classPathEntries.iterator(); if (classPathIterator.hasNext()) { final StringBuilder cmd = new StringBuilder(); boolean first = true; while (classPathIterator.hasNext()) { final File classpathPath = classPathIterator.next(); if (progress.isCanceled()) { return false; } if (classpathPath.exists()) { if (first) { first = false; } else { cmd.append(File.pathSeparator); } cmd.append(classpathPath.getAbsolutePath()); } } if (cmd.length() > 0) { commandLineArguments.add("-cp"); //$NON-NLS-1$ commandLineArguments.add(cmd.toString()); } } if (progress.isCanceled()) { return false; } if (!classDirectory.exists()) { classDirectory.mkdirs(); } commandLineArguments.add("-d"); //$NON-NLS-1$ commandLineArguments.add(classDirectory.getAbsolutePath()); commandLineArguments.add("-source"); //$NON-NLS-1$ commandLineArguments.add(javaVersion); commandLineArguments.add("-target"); //$NON-NLS-1$ commandLineArguments.add(javaVersion); if (!Strings.isEmpty(encoding)) { commandLineArguments.add("-encoding"); //$NON-NLS-1$ commandLineArguments.add(encoding); } if (progress.isCanceled()) { return false; } boolean hasSourceFile = false; for (final File sourceFolder : sourcePathDirectories) { if (progress.isCanceled()) { return false; } if (addJavaFilesDeeply(commandLineArguments, sourceFolder.getAbsoluteFile())) { hasSourceFile = true; } } final String[] arguments = new String[commandLineArguments.size()]; commandLineArguments.toArray(arguments); if (logger != null && logger.isDebugEnabled()) { logger.debug(Messages.JavacBatchCompiler_0, Strings.concat(" ", commandLineArguments)); //$NON-NLS-1$ } if (!hasSourceFile || progress.isCanceled()) { return false; } final OutputStream stdout = new WriterOutputStream(outWriter, Charset.defaultCharset()); final OutputStream stderr = new JavacErrorStream(errWriter, logger); final JavaCompiler systemCompiler = ToolProvider.getSystemJavaCompiler(); final int retcode = systemCompiler.run(null, stdout, stderr, arguments); return retcode == 0; } private static boolean addJavaFilesDeeply(List<String> list, File root) { final Deque<File> folders = new LinkedList<>(); if (root.exists()) { if (root.isDirectory()) { folders.addLast(root); } else { list.add(root.getAbsolutePath()); return true; } } boolean changed = false; while (!folders.isEmpty()) { final File current = folders.removeFirst(); assert current.isDirectory(); for (final File subfile : current.listFiles(name -> isJavaExtension(name))) { if (subfile.isDirectory()) { folders.addLast(subfile); } else { list.add(subfile.getAbsolutePath()); changed = true; } } } return changed; } private static boolean isJavaExtension(File file) { if (file != null) { if (file.isDirectory()) { return true; } final String name = file.getName(); final int index = name.lastIndexOf('.'); if (index > 1 && ".java".equalsIgnoreCase(name.substring(index))) { //$NON-NLS-1$ return true; } } return false; } /** Wrap a stderr writer for supporting specific Javac error messages. * * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ * @since 0.8 */ private static class JavacErrorStream extends WriterOutputStream { private static final String NOTE_PREFIX = "Note:"; //$NON-NLS-1$ private final Logger logger; /** Constructor. * * @param writer the writer to wrap. * @param logger the logger to use for printing out special messages. */ JavacErrorStream(PrintWriter writer, Logger logger) { super(writer, Charset.defaultCharset()); this.logger = logger; } @Override public void write(byte[] buffer, int offset, int length) throws IOException { final String msg = new String(buffer, offset, length); if (msg.startsWith(NOTE_PREFIX)) { if (this.logger != null) { this.logger.info(msg.substring(NOTE_PREFIX.length()).trim()); } return; } super.write(buffer, offset, length); } } }
[ "galland@arakhne.org" ]
galland@arakhne.org
dd034e62e880b56a2840ae81c1a16b5f001e9c58
4c6abb4ad26851156dbce86924493646e809c8eb
/src/test/java/io/github/jhipster/application/service/UserServiceIntTest.java
d69845e70040eac94388f85f3da4817ee3286983
[]
no_license
BulkSecurityGeneratorProject/firstJHipster
3374f7ca6b698beceff2f26e8edfa00622eb6c36
05c016ac9ce6af62eb2b8b4d69a63b133496a9d1
refs/heads/master
2022-12-10T22:09:19.019057
2018-05-25T09:21:54
2018-05-25T09:21:54
296,663,639
0
0
null
2020-09-18T15:43:51
2020-09-18T15:43:50
null
UTF-8
Java
false
false
6,476
java
package io.github.jhipster.application.service; import io.github.jhipster.application.FirstJHipsterApp; import io.github.jhipster.application.config.Constants; import io.github.jhipster.application.domain.User; import io.github.jhipster.application.repository.UserRepository; import io.github.jhipster.application.service.dto.UserDTO; import io.github.jhipster.application.service.util.RandomUtil; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.List; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; /** * Test class for the UserResource REST controller. * * @see UserService */ @RunWith(SpringRunner.class) @SpringBootTest(classes = FirstJHipsterApp.class) @Transactional public class UserServiceIntTest { @Autowired private UserRepository userRepository; @Autowired private UserService userService; private User user; @Before public void init() { user = new User(); user.setLogin("johndoe"); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail("johndoe@localhost"); user.setFirstName("john"); user.setLastName("doe"); user.setImageUrl("http://placehold.it/50x50"); user.setLangKey("en"); } @Test @Transactional public void assertThatUserMustExistToResetPassword() { userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset("invalid.login@localhost"); assertThat(maybeUser).isNotPresent(); maybeUser = userService.requestPasswordReset(user.getEmail()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getEmail()).isEqualTo(user.getEmail()); assertThat(maybeUser.orElse(null).getResetDate()).isNotNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNotNull(); } @Test @Transactional public void assertThatOnlyActivatedUserCanRequestPasswordReset() { user.setActivated(false); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset(user.getLogin()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatResetKeyMustNotBeOlderThan24Hours() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatResetKeyMustBeValid() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey("1234"); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional public void assertThatUserCanResetPassword() { String oldPassword = user.getPassword(); Instant daysAgo = Instant.now().minus(2, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getResetDate()).isNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNull(); assertThat(maybeUser.orElse(null).getPassword()).isNotEqualTo(oldPassword); userRepository.delete(user); } @Test @Transactional public void testFindNotActivatedUsersByCreationDateBefore() { Instant now = Instant.now(); user.setActivated(false); User dbUser = userRepository.saveAndFlush(user); dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); List<User> users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); assertThat(users).isNotEmpty(); userService.removeNotActivatedUsers(); users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); assertThat(users).isEmpty(); } @Test @Transactional public void assertThatAnonymousUserIsNotGet() { user.setLogin(Constants.ANONYMOUS_USER); if (!userRepository.findOneByLogin(Constants.ANONYMOUS_USER).isPresent()) { userRepository.saveAndFlush(user); } final PageRequest pageable = new PageRequest(0, (int) userRepository.count()); final Page<UserDTO> allManagedUsers = userService.getAllManagedUsers(pageable); assertThat(allManagedUsers.getContent().stream() .noneMatch(user -> Constants.ANONYMOUS_USER.equals(user.getLogin()))) .isTrue(); } @Test @Transactional public void testRemoveNotActivatedUsers() { user.setActivated(false); userRepository.saveAndFlush(user); // Let the audit first set the creation date but then update it user.setCreatedDate(Instant.now().minus(30, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); assertThat(userRepository.findOneByLogin("johndoe")).isPresent(); userService.removeNotActivatedUsers(); assertThat(userRepository.findOneByLogin("johndoe")).isNotPresent(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
c70c62b26eb079e2590da091b1c5529d8e8042d8
c39b0a0e8a4010f1b1d8617bfb0f933bbc6460bf
/swing/Swing TableModel Example/src/main/java/com/javacreed/examples/swing/part3/Item.java
b25f871997db0d306085bddc2442426ba74f4b87
[]
no_license
rkmishracs/java-creed-examples
4ac00308174acaaf46e0448dce7750166174b548
b5070604842dd8933ca4284a47a7144c8b1f22d7
refs/heads/master
2016-09-06T08:10:14.959217
2015-03-14T12:24:13
2015-03-14T12:24:13
42,683,378
0
1
null
null
null
null
UTF-8
Java
false
false
1,609
java
/** * Copyright 2012-2014 Java Creed. * * Licensed under the Apache License, Version 2.0 (the "<em>License</em>"); * 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.javacreed.examples.swing.part3; import java.util.ArrayList; import java.util.Collection; public class Item { public static Collection<Item> createSample() { final Collection<Item> collection = new ArrayList<>(); collection.add(new Item(1, "Car")); collection.add(new Item(2, "Phone")); collection.add(new Item(3, "Computer")); collection.add(new Item(4, "Table")); collection.add(new Item(5, "TV")); return collection; } private int id; private String name; public Item() {} public Item(final int id, final String name) { this.id = id; this.name = name; } public int getId() { return id; } public String getName() { return name; } public void setId(final int id) { this.id = id; } public void setName(final String name) { this.name = name; } }
[ "albertattard@gmail.com" ]
albertattard@gmail.com
c11d119b79135487e9cea87015c6c58584275cb1
8df656e8539253a19a80dc4b81103ff0f70b2651
/devManage/src/main/java/cn/pioneeruniverse/dev/dao/mybatis/TblCommissioningWindowMapper.java
06e969dfa92b79cc19d10f6202d836dc2ca0f0f3
[]
no_license
tanghaijian/itmp
8713960093a66a39723a975b65a20824a2011d83
758bed477ec9550a1fd1cb19435c3b543524a792
refs/heads/master
2023-04-16T00:55:56.140767
2021-04-26T05:42:47
2021-04-26T05:42:47
361,607,388
1
2
null
null
null
null
UTF-8
Java
false
false
1,753
java
package cn.pioneeruniverse.dev.dao.mybatis; import java.util.HashMap; import java.util.List; import java.util.Map; import com.baomidou.mybatisplus.mapper.BaseMapper; import cn.pioneeruniverse.dev.entity.TblCommissioningWindow; /** * * @ClassName: TblCommissioningWindowMapper * @Description: 项目mapper * @author author * @date 2020年8月12日 下午16:20 * */ public interface TblCommissioningWindowMapper extends BaseMapper<TblCommissioningWindow> { int deleteByPrimaryKey(Long id); int insertSelective(TblCommissioningWindow record); TblCommissioningWindow selectByPrimaryKey(Long id); int updateByPrimaryKeySelective(TblCommissioningWindow record); int updateByPrimaryKey(TblCommissioningWindow record); List<TblCommissioningWindow> getAll(); List<TblCommissioningWindow> selectAfterTime(); TblCommissioningWindow selectBeforeTime(); String getWindowName(Long commissioningWindowId); List<TblCommissioningWindow> findWindowBySystemId(Long systemId); List<TblCommissioningWindow> getAllComWindow(Map<String,Object> map); List<TblCommissioningWindow> selectWindows(HashMap<String, Object> map); int getAllComWindowTotal(Map<String, Object> window); List<TblCommissioningWindow> getAllWindowDesc(Long systemId); TblCommissioningWindow findWindowByFeatureId(Long featureId); List<TblCommissioningWindow> getWindowsByartId(String artifactids); List<TblCommissioningWindow> getWindowsByartId(Map<String, Object> map); List<TblCommissioningWindow> getAllWindow(); TblCommissioningWindow selectBeforeTimeOrderBy(); List<TblCommissioningWindow> selectAfterTimeLimit(); List<Map<String, Object>> getReqFeatureGroupbyWindow(Long requirementId); }
[ "1049604112@qq.com" ]
1049604112@qq.com
b5733ded63e57c931663c097a4ac9f07aef24f2f
421bf726c2937c438d2cbd6a8731ae455ac18bb4
/news/src/com/zhang/servlet/UserVerifyServlet.java
412a45ec84c026553b06ddfc627900a6344c3987
[]
no_license
jlzhang24/news
a3a8e3a00d1a83c0e911bb6abc31af12d4f937cb
256aff2ff087061568c26dd24a99ccc9656d3bc0
refs/heads/master
2021-01-20T16:47:32.993752
2017-05-10T09:11:04
2017-05-10T09:52:11
90,848,526
0
1
null
null
null
null
UTF-8
Java
false
false
1,383
java
package com.zhang.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.zhang.dao.UserDao; public class UserVerifyServlet extends HttpServlet { /** * 用户登录验证 */ private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doPost(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { PrintWriter out = resp.getWriter(); String username = req.getParameter("username"); String password = req.getParameter("password"); HttpSession session = null; int flag = new UserDao().userIsExist(username, password); if(flag == 1) { session = req.getSession(); session.setAttribute(username, username); out.print("<script language='javascript'>alert('success!');window.location.href='/news/yiguadmin/index.jsp';</script>"); } else { out.print("<script language='javascript'>alert('failed!');window.location.href='/news/yiguadmin/login.jsp';</script>"); } } }
[ "lenovo@lenovo-PC" ]
lenovo@lenovo-PC
118728ac4a88bae31ab7abf4a99f7eafb7db133a
fe52ed7e0722882b13c83eb27923a2f3fd50074b
/src/main/java/org/reaktivity/nukleus/http_cache/internal/HttpCacheNukleus.java
8b9ea3714891d7dcfebb9affd9fa96cb39f175bb
[ "Apache-2.0" ]
permissive
akrambek/nukleus-http-cache.java
b066ddf7f10e3ad1b091a293101eae78b250776d
83524ab79202b897271c85ea3a17f56fd289ae75
refs/heads/develop
2021-05-15T00:49:08.686818
2020-07-08T05:58:21
2020-07-08T05:58:21
103,102,763
0
1
null
2017-09-11T07:17:43
2017-09-11T07:17:43
null
UTF-8
Java
false
false
1,297
java
/** * Copyright 2016-2020 The Reaktivity Project * * The Reaktivity Project 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.reaktivity.nukleus.http_cache.internal; import org.reaktivity.nukleus.Nukleus; final class HttpCacheNukleus implements Nukleus { static final String NAME = "http-cache"; private final HttpCacheConfiguration config; HttpCacheNukleus( HttpCacheConfiguration config) { this.config = config; } @Override public String name() { return HttpCacheNukleus.NAME; } @Override public HttpCacheConfiguration config() { return config; } @Override public HttpCacheElektron supplyElektron() { return new HttpCacheElektron(config); } }
[ "john.fallows@kaazing.com" ]
john.fallows@kaazing.com
35f2d1e987c0ac883c5a7e269aefb95e06d67b5e
022980735384919a0e9084f57ea2f495b10c0d12
/src/ext-lltnxp/ext-impl/src/com/sgs/portlet/documentdelegate/search/PmlDocumentDelegateDisplayTerms.java
92bf151c68565a4ebe37f261ae80620b9bf7e54b
[]
no_license
thaond/nsscttdt
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
ae7dacc924efe578ce655ddfc455d10c953abbac
refs/heads/master
2021-01-10T03:00:24.086974
2011-02-19T09:18:34
2011-02-19T09:18:34
50,081,202
0
0
null
null
null
null
UTF-8
Java
false
false
2,195
java
/** * */ package com.sgs.portlet.documentdelegate.search; import javax.portlet.RenderRequest; import com.liferay.portal.kernel.dao.search.DisplayTerms; import com.liferay.portal.kernel.util.ParamUtil; /** * @author WIN7 *u */ public class PmlDocumentDelegateDisplayTerms extends DisplayTerms{ public static final String USER_DELEGATE = "userDelegate"; public static final String LIST_USER_IS_DELEGATE = "listUserIsDelegate"; public static final String FROM_DATE_DELEGATE = "fromDateDelegate"; public static final String TO_DATE_DELEGATE = "toDateDelegate"; public static final String CHECK_ALL_USER = "checkAllUser"; protected long userDelegate; protected String listUserIsDelegate; protected String fromDateDelegate; protected String toDateDelegate; protected boolean checkAllUser; public PmlDocumentDelegateDisplayTerms(RenderRequest renderRequest) { super(renderRequest); userDelegate = ParamUtil.getLong(renderRequest, USER_DELEGATE); listUserIsDelegate = ParamUtil.getString(renderRequest, LIST_USER_IS_DELEGATE); fromDateDelegate = ParamUtil.getString(renderRequest, FROM_DATE_DELEGATE); toDateDelegate = ParamUtil.getString(renderRequest, TO_DATE_DELEGATE); checkAllUser = ParamUtil.getBoolean(renderRequest, CHECK_ALL_USER); } public long getUserDelegate() { return userDelegate; } public void setUserDelegate(long userDelegate) { this.userDelegate = userDelegate; } public String getListUserIsDelegate() { return listUserIsDelegate; } public void setListUserIsDelegate(String listUserIsDelegate) { this.listUserIsDelegate = listUserIsDelegate; } public String getFromDateDelegate() { return fromDateDelegate; } public void setFromDateDelegate(String fromDateDelegate) { this.fromDateDelegate = fromDateDelegate; } public String getToDateDelegate() { return toDateDelegate; } public void setToDateDelegate(String toDateDelegate) { this.toDateDelegate = toDateDelegate; } public boolean isCheckAllUser() { return checkAllUser; } public void setCheckAllUser(boolean checkAllUser) { this.checkAllUser = checkAllUser; } }
[ "nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e" ]
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
61ae439b355ca6e5e66c9d0a042047546781e607
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-114-7-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java
68ac1466446187a78c2c9246c986fc2610b3cb10
[]
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
459
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 19:30:09 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class InternalTemplateManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2f38d4a42de300f24e66f95d86c2e57f4b7b43a9
d70b84c56a068cce2c6e7323ea4acd32c667aa45
/glarimy-spring-core-10/src/main/java/com/glarimy/directory/domain/Contact.java
7ac1397664b44ad0a1f5a452d2bd1ba1f5e89a4b
[]
no_license
glarimy/glarimy-spring
f7ad7afea8b0f53b3719a89e3c16b03d36451716
24e2f02079d0e3e2d99237f0a1ed640df2dbb781
refs/heads/master
2020-03-19T20:10:16.885122
2018-07-12T17:52:05
2018-07-12T17:52:05
136,884,526
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.glarimy.directory.domain; public class Contact { private String name; private long phoneNumber; public Contact() { } public Contact(String name, long phoneNumber) { super(); this.name = name; this.phoneNumber = phoneNumber; } public String getName() { return name; } public void setName(String name) { this.name = name; } public long getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(long phoneNumber) { this.phoneNumber = phoneNumber; } @Override public String toString() { return "Contact [name=" + name + ", phoneNumber=" + phoneNumber + "]"; } }
[ "krishna@glarimy.com" ]
krishna@glarimy.com
32d3d710f5165d2cb1e1447a9ed0dff517ffbf68
7a76838d738be65d601f164cb5a97b699be1da2b
/spring-batch-in-action/getting-started/getting-started/spring-batch-example/src/test/java/test/com/juxtapose/example/ch06/JobLaunchJMSTransaction.java
a9f07dc82c3f66b6954318fe8851933864da42f6
[ "Apache-2.0" ]
permissive
jinminer/spring-batch
fafdedec5de3198aa0c05353a26f0238b396bebc
f2e29682f882c8656b283030279e95ebcf08868a
refs/heads/master
2022-12-22T21:04:27.438433
2019-10-08T16:58:10
2019-10-08T16:58:10
209,073,938
1
1
Apache-2.0
2022-12-16T01:35:27
2019-09-17T14:18:30
Java
UTF-8
Java
false
false
2,906
java
/** * */ package test.com.juxtapose.example.ch06; import java.util.Date; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.ObjectMessage; import javax.jms.Session; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParametersBuilder; import org.springframework.batch.core.launch.JobLauncher; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; import com.jinm.example.ch06.CreditBill; /** * * 2013-1-6下午09:18:11 */ public class JobLaunchJMSTransaction { /** * * @param jobPath * @return */ public static ApplicationContext getContext(String jobPath){ return new ClassPathXmlApplicationContext(jobPath); } /** * * @param context * @return */ public static JmsTemplate getJmsTemplate(ApplicationContext context){ JmsTemplate jmsTemplate = (JmsTemplate)context.getBean("jmsTemplate"); return jmsTemplate; } /** * * @param jmsTemplate * @param creditBill */ public static void sendMessage(JmsTemplate jmsTemplate, final CreditBill creditBill){ jmsTemplate.send(new MessageCreator() { public Message createMessage(Session session) throws JMSException { ObjectMessage message = session.createObjectMessage(); message.setObject(creditBill); return message; } }); } /** * 执行批处理作业.<br> * @param context * @param jobName * @param builder */ public static void executeJob(ApplicationContext context, String jobName, JobParametersBuilder builder) { JobLauncher launcher = (JobLauncher) context.getBean("jobLauncher"); Job job = (Job) context.getBean(jobName); try { JobExecution result = launcher.run(job, builder.toJobParameters()); System.out.println(result.toString()); } catch (Exception e) { e.printStackTrace(); } } /** * @param args */ public static void main(String[] args) { final ApplicationContext context = getContext("ch06/job/job-jms-transaction.xml"); Thread thread = new Thread(new Runnable(){ @Override public void run() { JmsTemplate jmsTemplate = getJmsTemplate(context); sendMessage(jmsTemplate, new CreditBill("4047390012345678","tom",100.00,"2013-2-2 12:00:08","Lu Jia Zui road")); sendMessage(jmsTemplate, new CreditBill("4047390012345678","tom",320,"2013-2-3 10:35:21","Lu Jia Zui road")); sendMessage(jmsTemplate, new CreditBill("4047390012345678","tom",360.00,"2013-2-11 11:12:38","Longyang road")); } }); thread.run(); thread.setDaemon(Boolean.TRUE); executeJob(context, "jmsTransactionReadJob", new JobParametersBuilder().addDate("date", new Date())); } }
[ "jinm@uxunchina.com" ]
jinm@uxunchina.com