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
e7fa69735c8dd36aab426fad496336a7a7f7d353
19b1ed801a2453c4f93e758ee4e2c39cb0fbe913
/RemoveDuplicatesFromSortedArray_1.java
2c8a44d1bc118cf8dbc8af628ab1422b1c201569
[]
no_license
guaguahuahua/Leetcode
c1ea867b98f2e493c3686fa9b8d089af5ecccecc
95b5554b6d8e44cd0c4fe4e23b316517791dd1a7
refs/heads/master
2021-01-23T01:56:09.973798
2017-04-07T14:26:12
2017-04-07T14:26:12
85,947,329
0
0
null
null
null
null
UTF-8
Java
false
false
905
java
package com.xjtuse.easy; public class RemoveDuplicatesFromSortedArray_1 { public static int removeDuplicates(int []nums){ if(nums.length==0){ System.out.print(0); return 0; } int i=0,length=1,total=0; for(int j=1;j<nums.length;j++){ if(nums[i]==nums[j]){ length++; }else{ if(length>2){ total+=2; i+=2; nums[i]=nums[j]; length=1; }else{ total+=length; i+=length; nums[i]=nums[j]; length=1; } } } total+=length>2?2:length; System.out.println("length:"+total); for(int K:nums){ System.out.print(K+" "); } return total; } public static void main(String[] args) { // TODO Auto-generated method stub // int []nums={1,1,1,2,2,3}; // int []nums={1,1,1,2,2,2}; // int []nums={1,2}; // int []nums={1,1,1,2}; // int []nums={1,1,1,1,1,1,1,1,1}; int []nums={1,1,1,1,3,3}; removeDuplicates(nums); } }
[ "dante.zyd@gmail.com" ]
dante.zyd@gmail.com
159958979224fa01b407355818b64ede246add1c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_d40efb532fb769946012d3f25773c2d74a920620/WeightedIntDocVector/31_d40efb532fb769946012d3f25773c2d74a920620_WeightedIntDocVector_t.java
0497ba269daff95a06914112f4d18857f82b289a
[]
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,447
java
package ivory.data; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.io.WritableUtils; import org.apache.log4j.Level; import org.apache.log4j.Logger; import edu.umd.cloud9.io.map.HMapIFW; /** * Implementation of {@link IntDocVector} with term weights * * @author Earl J. Wagner * */ public class WeightedIntDocVector implements IntDocVector { private static final Logger sLogger = Logger.getLogger (WeightedIntDocVector.class); { sLogger.setLevel (Level.DEBUG); } private int docLength; private HMapIFW weightedTerms; public WeightedIntDocVector () { docLength = 0; weightedTerms = new HMapIFW (); } public WeightedIntDocVector (int docLength, HMapIFW weightedTerms) { this.docLength = docLength; this.weightedTerms = weightedTerms; } public HMapIFW getWeightedTerms() { return weightedTerms; } public void setWeightedTerms(HMapIFW weightedTerms) { this.weightedTerms = weightedTerms; } public int getDocLength () { return docLength; } public void setDocLength (int docLength) { this.docLength = docLength; } public void write (DataOutput out) throws IOException { WritableUtils.writeVInt (out, docLength); weightedTerms.write (out); } public void readFields (DataInput in) throws IOException { docLength = WritableUtils.readVInt (in); weightedTerms = new HMapIFW (); weightedTerms.readFields (in); } public Reader getReader () throws IOException { return null; } public float dot (WeightedIntDocVector otherVector) { //sLogger.debug ("dot (otherVector: " + otherVector + ")"); float result = weightedTerms.dot (otherVector.weightedTerms); //sLogger.debug ("in KMeansClusterDocs mapper dotProduct () returning: " + result); return result; } public void plus (WeightedIntDocVector otherVector) { //sLogger.debug ("plus (otherVector: " + otherVector + ")"); //sLogger.debug ("weightedTerms == null: " + (weightedTerms == null)); //sLogger.debug ("otherVector.mWeightedTerms == null: " + (otherVector.mWeightedTerms == null)); weightedTerms.plus (otherVector.weightedTerms); docLength += otherVector.docLength; } public void normalizeWith (float l) { for (int f : weightedTerms.keySet ()) { weightedTerms.put (f, weightedTerms.get (f) / l); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
50d460b3624b4ead009f62183c5a797042500c5f
e78325594090f7891ec9246ae0a99c139f1bd151
/timesheet/src/main/java/com/fastcode/timesheetapp1/addons/scheduler/application/job/dto/UpdateJobInput.java
125929a36fbb4309a781b01f1a1785da665e1e59
[]
no_license
fastcode-inc/timesheet-old
a3eb3359ce4dd34bed326e7f54ad0e788787d810
0fb28c98b7b3f702c364e09884384c465f215794
refs/heads/master
2023-03-23T22:06:26.319991
2021-03-25T19:08:34
2021-03-25T19:08:34
351,547,054
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
package com.fastcode.timesheetapp1.addons.scheduler.application.job.dto; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import lombok.Getter; import lombok.Setter; @Getter @Setter public class UpdateJobInput { private String jobName; private String jobGroup; private String jobClass; private String jobDescription; private Boolean isDurable =false; private Map<String, String> jobMapData = new HashMap<String, String>(); private List<FindByTriggerOutput> triggerDetails = new ArrayList<FindByTriggerOutput>(); private String jobStatus; public UpdateJobInput() { } public UpdateJobInput(String jName, String jGroup, String jClass, String jobDescription, Map<String, String> jMapData, List<FindByTriggerOutput> triggerDetails, boolean isDurable, String jobStatus) { super(); this.jobName = jName; this.jobGroup = jGroup; this.jobClass = jClass; this.jobDescription = jobDescription; this.jobMapData = jMapData; this.isDurable = isDurable; this.jobStatus = jobStatus; this.setTriggerDetails(triggerDetails); } }
[ "info@nfinityllc.com" ]
info@nfinityllc.com
c9d84bec53ac240051138488cc5155e5e2556501
c8705eb0df74ff16ae8ad9a6c2fe39697de2a78c
/spring-boot-web/elasticsearch-demo/src/main/java/com/ynthm/elasticsearch/config/ElasticsearchConfig.java
01ba5eaee5f5b6132b04fe557e90a1af7116a4bd
[]
no_license
ynthm/spring-boot-demo
4140992d3a513bffe83660c3c624e21b8971b41c
d471bf0dd047d1249e1addb75fa26b4bcdddaa8e
refs/heads/master
2023-07-09T15:56:48.610656
2023-06-27T05:47:06
2023-06-27T05:47:06
222,863,011
0
0
null
2023-07-07T21:52:10
2019-11-20T06:04:27
Java
UTF-8
Java
false
false
2,735
java
package com.ynthm.elasticsearch.config; import co.elastic.clients.elasticsearch.ElasticsearchAsyncClient; import co.elastic.clients.elasticsearch.ElasticsearchClient; import co.elastic.clients.json.jackson.JacksonJsonpMapper; import co.elastic.clients.transport.ElasticsearchTransport; import co.elastic.clients.transport.rest_client.RestClientTransport; import lombok.extern.slf4j.Slf4j; import org.apache.http.HttpHost; import org.elasticsearch.client.RestClient; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; import org.springframework.data.convert.ReadingConverter; import org.springframework.data.convert.WritingConverter; import org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate; import org.springframework.data.elasticsearch.config.ElasticsearchConfigurationSupport; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; /** * @author Ethan Wang */ @Slf4j @Configuration public class ElasticsearchConfig extends ElasticsearchConfigurationSupport { @Bean public ElasticsearchTransport elasticsearchTransport(RestClientProperties restClientProperties) { RestClient restClient = RestClient.builder( restClientProperties.getUris().stream() .map(HttpHost::create) .toArray(HttpHost[]::new)) .build(); // Create the transport with a Jackson mapper return new RestClientTransport(restClient, new JacksonJsonpMapper()); } @Bean public ElasticsearchClient elasticsearchClient(ElasticsearchTransport transport) { return new ElasticsearchClient(transport); } @Bean public ElasticsearchAsyncClient elasticsearchAsyncClient(ElasticsearchTransport transport) { return new ElasticsearchAsyncClient(transport); } @Bean public ElasticsearchTemplate elasticsearchTemplate( ElasticsearchClient elasticsearchClient, ElasticsearchConverter elasticsearchConverter) { return new ElasticsearchTemplate(elasticsearchClient, elasticsearchConverter); } @WritingConverter static class LocalDateTimeToString implements Converter<LocalDateTime, String> { @Override public String convert(LocalDateTime source) { return source.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME); } } @ReadingConverter static class StringToLocalDateTime implements Converter<String, LocalDateTime> { @Override public LocalDateTime convert(String source) { return LocalDateTime.parse(source, DateTimeFormatter.ISO_LOCAL_DATE_TIME); } } }
[ "ynthm.w@gmail.com" ]
ynthm.w@gmail.com
40f4b95a9cde657adfeb73e6084c605f778e4880
22e506ee8e3620ee039e50de447def1e1b9a8fb3
/java_src/android/support/p007v4/view/ViewPropertyAnimatorCompatKK.java
e03ad9bdd9871457a9ea2a361a966ceb1dcbf6e2
[]
no_license
Qiangong2/GraffitiAllianceSource
477152471c02aa2382814719021ce22d762b1d87
5a32de16987709c4e38594823cbfdf1bd37119c5
refs/heads/master
2023-07-04T23:09:23.004755
2021-08-11T18:10:17
2021-08-11T18:10:17
395,075,728
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package android.support.p007v4.view; import android.animation.ValueAnimator; import android.view.View; /* renamed from: android.support.v4.view.ViewPropertyAnimatorCompatKK */ class ViewPropertyAnimatorCompatKK { ViewPropertyAnimatorCompatKK() { } public static void setUpdateListener(final View view, final ViewPropertyAnimatorUpdateListener listener) { ValueAnimator.AnimatorUpdateListener wrapped = null; if (listener != null) { wrapped = new ValueAnimator.AnimatorUpdateListener() { /* class android.support.p007v4.view.ViewPropertyAnimatorCompatKK.C01751 */ public void onAnimationUpdate(ValueAnimator valueAnimator) { listener.onAnimationUpdate(view); } }; } view.animate().setUpdateListener(wrapped); } }
[ "sassafrass@fasizzle.com" ]
sassafrass@fasizzle.com
9f9607e33f85465bf0e432bbcdae5a401e04dc0a
ca95555a6ce6410807699face40f070f92d41d20
/LQian-change-param/src/main/java/com/zl/github/translate/TransformerSettings.java
6dbab207b37ecb2d7a6ca9a8cd9a99159443e583
[]
no_license
SaberSola/LQian
0000adef39a0940c2771f76e69790643acc6c892
b8a42ffe46d37968ecdbf70b402f7b1b09549f55
refs/heads/master
2022-12-20T23:43:19.657158
2021-12-27T13:18:45
2021-12-27T13:18:45
144,002,792
9
3
null
2022-12-16T04:33:33
2018-08-08T11:15:53
Java
UTF-8
Java
false
false
1,098
java
package com.zl.github.translate; import com.zl.github.model.FieldTransformer; import lombok.Getter; import lombok.Setter; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /** * @Author zl * @Date 2019-09-13 * @Des ${todo} */ @Getter public class TransformerSettings { /** * Contains the mapping between fields's name in the source object and the destination one. */ private final Map<String, String> fieldsNameMapping = new ConcurrentHashMap<>(); /** * Contains the lambda functions to be applied on a given fields. */ private final Map<String, FieldTransformer> fieldsTransformers = new ConcurrentHashMap<>(); private final Set<String> fieldsToSkip = new HashSet<>(); @Setter private boolean setDefaultValueForMissingField; @Setter private boolean flatFieldNameTransformation; @Setter private boolean validationEnabled; @Setter private boolean defaultValueSetEnabled = true; @Setter private boolean primitiveTypeConversionEnabled; }
[ "1198902364@qq.com" ]
1198902364@qq.com
f54004f8557230bf35df87a45b654185b44431b1
ca7d41ff7b2a52de9393274ce8f54be8cb34958b
/src/main/java/cn/xpbootcamp/refactoring/Order.java
a88db6897a6e47ba6333d8f67aec587f02298857
[]
no_license
xpbootcamp/refactoring-cashier-baseline
173b6a9b3aa2dcd0f42c858650d56ff07faa726b
b7c5502ba477053e6dbdfb10d124741d61d78dac
refs/heads/master
2022-07-15T10:07:08.469364
2020-05-18T10:29:51
2020-05-18T10:29:51
264,900,703
0
11
null
null
null
null
UTF-8
Java
false
false
479
java
package cn.xpbootcamp.refactoring; import java.util.List; public class Order { String nm; String addr; List<LineItem> li; public Order(String nm, String addr, List<LineItem> li) { this.nm = nm; this.addr = addr; this.li = li; } public String getCustomerName() { return nm; } public String getCustomerAddress() { return addr; } public List<LineItem> getLineItems() { return li; } }
[ "sjyuan@thoughtworks.com" ]
sjyuan@thoughtworks.com
a3a97d9c5a35ec5d27a4910904e417e4242c00ea
d001000626f1c4279663f0070b5cd32391b661fe
/src/main/java/com/imaginea/javapractise/OCJP/StaticFrog.java
6d3b59753947eebbb6ec3cc7628cdef3c2c41524
[]
no_license
scharanjit/JavaPractise
26e5de6e285ed489239bc025cfec9941096006d5
de07f66274fe97fce7697a2b3057cb00fa5d39f1
refs/heads/master
2016-09-12T09:00:52.967466
2016-05-20T07:07:28
2016-05-20T07:07:28
59,269,704
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package OCJP; public class StaticFrog { int frogSize = 0; public int getFrogSize() { return frogSize; } public StaticFrog(int s) { frogSize = s; } public static void main (String [] args) { StaticFrog f = new StaticFrog(25); System.out.println(f.getFrogSize()); // Access instance // method using f } }
[ "charanjit.singh@imaginea.com" ]
charanjit.singh@imaginea.com
703faa31a01169e6b4e507230eacc7d12232f94f
64e3f2b8d6abff582d8dff2f200e0dfc708a5f4b
/2017/Isis/DemoApp/src/main/java/domainapp/dom/impl/HelloWorldObject.java
c7cdb6ca1bca6e74c9f993797bee23690edf07ce
[]
no_license
tedneward/Demos
a65df9d5a0390e3fdfd100c33bbc756c83d4899e
28fff1c224e1f6e28feb807a05383d7dc1361cc5
refs/heads/master
2023-01-11T02:36:24.465319
2019-11-30T09:03:45
2019-11-30T09:03:45
239,251,479
0
0
null
2023-01-07T14:38:21
2020-02-09T05:21:15
Java
UTF-8
Java
false
false
4,434
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 domainapp.dom.impl; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.VersionStrategy; import com.google.common.collect.Ordering; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.Auditing; import org.apache.isis.applib.annotation.CommandReification; import org.apache.isis.applib.annotation.DomainObject; import org.apache.isis.applib.annotation.DomainObjectLayout; import org.apache.isis.applib.annotation.Editing; import org.apache.isis.applib.annotation.Parameter; import org.apache.isis.applib.annotation.ParameterLayout; import org.apache.isis.applib.annotation.Property; import org.apache.isis.applib.annotation.Publishing; import org.apache.isis.applib.annotation.SemanticsOf; import org.apache.isis.applib.annotation.Title; import org.apache.isis.applib.services.message.MessageService; import org.apache.isis.applib.services.repository.RepositoryService; import org.apache.isis.applib.services.title.TitleService; import lombok.AccessLevel; @javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "DemoApp" ) @javax.jdo.annotations.DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id") @javax.jdo.annotations.Version(strategy= VersionStrategy.DATE_TIME, column ="version") @javax.jdo.annotations.Queries({ @javax.jdo.annotations.Query( name = "findByName", value = "SELECT " + "FROM domainapp.dom.impl.HelloWorldObject " + "WHERE name.indexOf(:name) >= 0 ") }) @javax.jdo.annotations.Unique(name="HelloWorldObject_name_UNQ", members = {"name"}) @DomainObject(auditing = Auditing.ENABLED) @DomainObjectLayout() // trigger events etc. @lombok.RequiredArgsConstructor(staticName = "create") @lombok.Getter @lombok.Setter public class HelloWorldObject implements Comparable<HelloWorldObject> { @javax.jdo.annotations.Column(allowsNull = "false", length = 40) @lombok.NonNull @Property(editing = Editing.DISABLED) @Title(prepend = "Object: ") private String name; @javax.jdo.annotations.Column(allowsNull = "true", length = 4000) @Property(editing = Editing.ENABLED) private String notes; @Action(semantics = SemanticsOf.IDEMPOTENT, command = CommandReification.ENABLED, publishing = Publishing.ENABLED) public HelloWorldObject updateName( @Parameter(maxLength = 40) @ParameterLayout(named = "Name of Object") final String name) { setName(name); return this; } public String default0UpdateName() { return getName(); } @Action(semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE) public void delete() { final String title = titleService.titleOf(this); messageService.informUser(String.format("'%s' deleted", title)); repositoryService.removeAndFlush(this); } @Override public int compareTo(final HelloWorldObject other) { return Ordering.natural().onResultOf(HelloWorldObject::getName).compare(this, other); } //region > injected services @javax.inject.Inject @lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE) RepositoryService repositoryService; @javax.inject.Inject @lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE) TitleService titleService; @javax.inject.Inject @lombok.Getter(AccessLevel.NONE) @lombok.Setter(AccessLevel.NONE) MessageService messageService; //endregion }
[ "ted@tedneward.com" ]
ted@tedneward.com
041d2f2154e41b6742d761eab72d4aa48a8d32f3
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a167/A167978Test.java
634773ebceca71f8c0c077e9c1ef63125bff1166
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a167; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A167978Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
50ad0e1dc866360f995bf744f347dd09ba47cd8b
cbb46a87afffde3964b0f952c9555a7e2966bf62
/modules/learning/src/test/java/deepboof/impl/backward/standard/TestBackwards_DFunctionDropOut_F64.java
7089351f613f1b539009a43606ae89b535c02d71
[ "Apache-2.0" ]
permissive
caomw/DeepBoof
973179c5274908b267cb5cbdcb15a466d803afaf
df8a901ce554d95a88feac197c767aaeb27bbd86
refs/heads/master
2020-05-23T08:15:53.463486
2016-09-15T16:10:01
2016-09-15T16:10:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,921
java
/* * Copyright (c) 2016, Peter Abeles. All Rights Reserved. * * This file is part of DeepBoof * * 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 deepboof.impl.backward.standard; import deepboof.DeepBoofConstants; import deepboof.misc.TensorFactory; import deepboof.tensors.Tensor_F64; import org.junit.Test; import java.util.ArrayList; import java.util.Random; import static org.junit.Assert.assertEquals; /** * @author Peter Abeles */ public class TestBackwards_DFunctionDropOut_F64 { Random rand = new Random(234); TensorFactory<Tensor_F64> factory = new TensorFactory<>(Tensor_F64.class); /** * Check to see if there are zeros in the gradient at the expected location */ @Test public void checkZeros() { double drop = 0.3; DFunctionDropOut_F64 alg = new DFunctionDropOut_F64(1234,drop); Tensor_F64 input = factory.random(rand,false,5.0,6.0,3,4); Tensor_F64 output = input.createLike(); alg.initialize(4); alg.learning(); alg.forward(input,output); Tensor_F64 dout = factory.random(rand,false,5.0,6.0,3,4); Tensor_F64 gradientInput = input.createLike(); alg.backwards(input,dout,gradientInput, new ArrayList<>()); for (int i = 0; i < 12; i++) { if( output.d[i] == 0 ) { assertEquals(0,gradientInput.d[i], DeepBoofConstants.TEST_TOL_F64); } else { assertEquals(dout.d[i],gradientInput.d[i], DeepBoofConstants.TEST_TOL_F64); } } } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
d0f3a12b85a4639f46636df6b91a0d4e43d2c5ee
6259a830a3d9e735e6779e41a678a71b4c27feb2
/anchor-plugin-image/src/main/java/org/anchoranalysis/plugin/image/bean/thumbnail/object/ThumbnailColorIndex.java
1e0ad8a2d1a5c89ba0e5bcd7139f848a6d853a06
[ "MIT", "Apache-2.0" ]
permissive
anchoranalysis/anchor-plugins
103168052419b1072d0f8cd0201dabfb7dc84f15
5817d595d171b8598ab9c0195586c5d1f83ad92e
refs/heads/master
2023-07-24T02:38:11.667846
2023-07-18T07:51:10
2023-07-18T07:51:10
240,064,307
2
0
MIT
2023-07-18T07:51:12
2020-02-12T16:48:04
Java
UTF-8
Java
false
false
3,145
java
/*- * #%L * anchor-plugin-image * %% * Copyright (C) 2010 - 2020 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche * %% * 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. * #L% */ package org.anchoranalysis.plugin.image.bean.thumbnail.object; import java.awt.Color; import lombok.RequiredArgsConstructor; import org.anchoranalysis.core.color.ColorIndex; import org.anchoranalysis.core.color.RGBColor; /** * Creates a suitable color index for distinguishing between the different types of objects that * appear * * <p>The order of the objects is presented is important. First are the objects associated with the * input (one for single, two for pair). And the remainder of the objects are assumed to be other * objects shown in blue only for context. * * @author Owen Feehan */ @RequiredArgsConstructor class ThumbnailColorIndex implements ColorIndex { /** The color GREEN is used for the outline of object in the input (always) */ private static final Color OUTLINE_FIRST_OBJECT = Color.GREEN; /** * The color RED is used for the outline of object of the second object in the input (if its * pairs) */ private static final Color OUTLINE_SECOND_OBJECT = Color.RED; // START REQUIRED ARGUMENTS /** * Whether pairs are being used or not (in which case the second object is not treated as a * context object) */ private final boolean pairs; /** * Color for outline of context objects (objects that aren't part of the input but which are * outlined as context) */ private final Color colorContextObject; // END REQUIRED ARGUMENTS @Override public RGBColor get(int index) { return new RGBColor(colorForIndex(index)); } @Override public int numberUniqueColors() { return 3; } private Color colorForIndex(int index) { if (index == 0) { return OUTLINE_FIRST_OBJECT; } else if (index == 1) { return pairs ? OUTLINE_SECOND_OBJECT : colorContextObject; } else { return colorContextObject; } } }
[ "owenfeehan@users.noreply.github.com" ]
owenfeehan@users.noreply.github.com
f56e260cd003145e7a8b4019c5e416e2e06852b5
9ed31b29d6062572648795668aee9ab05c38d2fd
/src/test/java/tests/day7/CssSelectorPractice.java
1a37d6f5d3e68f78cc689655047282faccf0b5e3
[]
no_license
erhan-d/TestNGSeleniumProject
938ee058c26ee22bb4d7224e108527b0ae6efc4c
269dea8a566bb544d62108f719c022ca724ea3b6
refs/heads/master
2023-05-11T11:08:07.261384
2020-04-23T00:16:57
2020-04-23T00:16:57
258,051,432
1
2
null
2023-05-09T18:22:29
2020-04-23T00:20:57
Java
UTF-8
Java
false
false
1,830
java
package tests.day7; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import utils.BrowserFactory; import utils.BrowserUtils; import java.util.List; public class CssSelectorPractice { //Please use google chrome //Which locator to use? //#1 id //#2 css //#3 xpath //## whatever public static void main(String[] args) { WebDriver driver = BrowserFactory.getDriver("chrome"); driver.get("http://practice.cybertekschool.com/multiple_buttons"); //let's fin all buttons, and click on them one by one // why I put . instead of space? because it's 2 class names .btn.btn-primary //in this case, we will find all buttons that have: class="btn btn-primary" // or like this [class='btn btn-primary'], no need for . //. means class name //# means id //all buttons List<WebElement> buttons = driver.findElements(By.cssSelector(".btn.btn-primary")); //loop through list of buttons for (WebElement button: buttons){ //and click on every button one by one button.click(); BrowserUtils.wait(1); //get the message after click WebElement message = driver.findElement(By.cssSelector("#result")); //print a text of that message System.out.println(message.getText()); } // find element with a tag name h3, that has a parent element, with class name container WebElement header = driver.findElement(By.cssSelector(".container > h3")); System.out.println(header.getText()); //Multiple buttons WebElement p = driver.findElement(By.cssSelector("[class='container'] > p")); System.out.println(p.getText()); driver.quit(); } }
[ "github@cybertekschool.com" ]
github@cybertekschool.com
36f7b2db907a821b2771612565280ad8cdbf740c
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/response/AlipayAccountCashpoolDetailQueryResponse.java
5983bf609cf66c6864bc05556fd4e0219d1961fe
[ "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
762
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.account.cashpool.detail.query response. * * @author auto create * @since 1.0, 2020-07-06 11:22:30 */ public class AlipayAccountCashpoolDetailQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8869883822913917665L; /** * ่ต„้‡‘ๆฑ ่ฏฆๆƒ…๏ผŒๅŒ…ๅซ่ง„ๅˆ™็ป„ไฟกๆฏใ€่ง„ๅˆ™ไฟกๆฏใ€่ดฆๆˆทๅ…ณ่”ไฟกๆฏ */ @ApiField("cash_pool_detail") private String cashPoolDetail; public void setCashPoolDetail(String cashPoolDetail) { this.cashPoolDetail = cashPoolDetail; } public String getCashPoolDetail( ) { return this.cashPoolDetail; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8046d047338c3d332b09007fce510bfeef365c64
d67f6450b24fb08f2f61b74dcdecce3025ee3efc
/gemp-swccg-cards/src/main/java/com/gempukku/swccgo/cards/set11/light/Card11_016.java
54caf3cade471585bca5605016093cd2e1cd36e2
[ "MIT" ]
permissive
cburyta/gemp-swccg-public
00a974d042195e69d3c104e61e9ee5bd48728f9a
05529086de91ecb03807fda820d98ec8a1465246
refs/heads/master
2023-01-09T12:45:33.347296
2020-10-26T14:39:28
2020-10-26T14:39:28
309,400,711
0
0
MIT
2020-11-07T04:57:04
2020-11-02T14:47:59
null
UTF-8
Java
false
false
4,772
java
package com.gempukku.swccgo.cards.set11.light; import com.gempukku.swccgo.cards.AbstractNormalEffect; import com.gempukku.swccgo.cards.GameConditions; import com.gempukku.swccgo.cards.effects.usage.OncePerGameEffect; import com.gempukku.swccgo.common.*; import com.gempukku.swccgo.filters.Filters; import com.gempukku.swccgo.game.PhysicalCard; import com.gempukku.swccgo.game.SwccgGame; import com.gempukku.swccgo.logic.GameUtils; import com.gempukku.swccgo.logic.TriggerConditions; import com.gempukku.swccgo.logic.actions.OptionalGameTextTriggerAction; import com.gempukku.swccgo.logic.actions.TopLevelGameTextAction; import com.gempukku.swccgo.logic.effects.UseForceEffect; import com.gempukku.swccgo.logic.effects.choose.DeployCardFromReserveDeckEffect; import com.gempukku.swccgo.logic.effects.choose.StackOneCardFromLostPileEffect; import com.gempukku.swccgo.logic.effects.choose.TakeStackedCardIntoHandEffect; import com.gempukku.swccgo.logic.timing.EffectResult; import com.gempukku.swccgo.logic.timing.results.LostFromTableResult; import java.util.Collections; import java.util.LinkedList; import java.util.List; /** * Set: Tatooine * Type: Effect * Title: Brisky Morning Munchen */ public class Card11_016 extends AbstractNormalEffect { public Card11_016() { super(Side.LIGHT, 3, PlayCardZoneOption.YOUR_SIDE_OF_TABLE, Title.Brisky_Morning_Munchen, Uniqueness.UNIQUE); setLore("'Den boom! Getten berry scared, and grabben dat Jedi, and pow! Mesa here. Huh! Mesa getten berry, berry scared. Mm.'"); setGameText("Deploy on table. Once per game, may deploy Jar Jar from Reserve Deck; reshuffle. If you just lost Jar Jar from a site, may place him here. At any time, may use 3 Force to take Jar Jar from here into hand."); addIcons(Icon.TATOOINE, Icon.EPISODE_I); } @Override protected List<TopLevelGameTextAction> getGameTextTopLevelActions(final String playerId, SwccgGame game, final PhysicalCard self, int gameTextSourceCardId) { List<TopLevelGameTextAction> actions = new LinkedList<TopLevelGameTextAction>(); GameTextActionId gameTextActionId = GameTextActionId.BRISKY_MORNING_MUNCHEN__DOWNLOAD_JAR_JAR; // Check condition(s) if (GameConditions.isOncePerGame(game, self, gameTextActionId) && GameConditions.canDeployCardFromReserveDeck(game, playerId, self, gameTextActionId, Persona.JAR_JAR)) { final TopLevelGameTextAction action = new TopLevelGameTextAction(self, gameTextSourceCardId, gameTextActionId); action.setText("Deploy Jar Jar from Reserve Deck"); // Update usage limit(s) action.appendUsage( new OncePerGameEffect(action)); // Perform result(s) action.appendEffect( new DeployCardFromReserveDeckEffect(action, Filters.Jar_Jar, true)); actions.add(action); } gameTextActionId = GameTextActionId.OTHER_CARD_ACTION_1; // Check condition(s) if (GameConditions.hasStackedCards(game, self, Filters.Jar_Jar) && GameConditions.canUseForce(game, playerId, 3)) { final TopLevelGameTextAction action = new TopLevelGameTextAction(self, gameTextSourceCardId, gameTextActionId); action.setText("Take Jar Jar into hand"); // Pay cost(s) action.appendCost( new UseForceEffect(action, playerId, 3)); // Perform result(s) action.appendEffect( new TakeStackedCardIntoHandEffect(action, playerId, self, Filters.Jar_Jar)); actions.add(action); } return actions; } @Override protected List<OptionalGameTextTriggerAction> getGameTextOptionalAfterTriggers(final String playerId, SwccgGame game, final EffectResult effectResult, final PhysicalCard self, int gameTextSourceCardId) { GameTextActionId gameTextActionId = GameTextActionId.OTHER_CARD_ACTION_2; // Check condition(s) if (TriggerConditions.justLost(game, effectResult, Filters.and(Filters.your(self), Filters.Jar_Jar))) { PhysicalCard cardLost = ((LostFromTableResult) effectResult).getCard(); final OptionalGameTextTriggerAction action = new OptionalGameTextTriggerAction(self, gameTextSourceCardId, gameTextActionId); action.setText("Stack " + GameUtils.getFullName(cardLost)); action.setActionMsg("Stack " + GameUtils.getCardLink(cardLost)); // Perform result(s) action.appendEffect( new StackOneCardFromLostPileEffect(action, cardLost, self, false, true, true)); return Collections.singletonList(action); } return null; } }
[ "andrew@bender.io" ]
andrew@bender.io
48ac62763ff78c00cd45e8b64bb619ab9fe71f4d
fcb6c796a4a345cfff3cc71b95b01e150ab10755
/WebAuthServer/src/main/java/ru/scorpio92/socketchat/authserver/data/model/message/request/DeauthServerDataRequest.java
0066e9f1f8ab7bdb455b477f4055a40c14ef1f46
[]
no_license
Scorpio92/SocketChat
950514d9fee957a6f4afb4ea1cfe0c4519fe770d
56d362b9a15c2990ddce2cb33b73a828f57ed963
refs/heads/master
2020-03-21T02:47:45.784161
2018-07-04T13:23:22
2018-07-04T13:23:22
138,019,677
1
1
null
null
null
null
UTF-8
Java
false
false
212
java
package ru.scorpio92.socketchat.authserver.data.model.message.request; public class DeauthServerDataRequest { private String authToken; public String getAuthToken() { return authToken; } }
[ "scorpio92@mail.ru" ]
scorpio92@mail.ru
69e67de536cfff72781eadce6a11733a4886ed21
1ebdbfcc6c4f906bb202e4cb97c38d9719a49f1d
/SyncAppServer/webagent/src/main/java/com/borqs/sync/server/webagent/account/ConfigfileServlet.java
68d2ab5e215ba4b2f749a55a5d24125ab0e712ed
[]
no_license
FreeDao/syncserver
8ebc6d7ad6da1e1eddcc692f6d0e88ca0e160030
8967e73106b8a248ff5c346883323be5d53ca16a
refs/heads/master
2020-12-25T06:13:05.053916
2013-09-24T07:54:36
2013-09-24T07:54:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,377
java
package com.borqs.sync.server.webagent.account; import java.util.logging.Logger; import com.borqs.sync.server.common.exception.AccountException; import com.borqs.sync.server.common.httpservlet.HttpServletDelegate; import com.borqs.sync.server.common.httpservlet.QueryParams; import com.borqs.sync.server.common.httpservlet.ResponseWriter; import com.borqs.sync.server.common.httpservlet.WebMethod; import com.borqs.sync.server.common.runtime.Context; import com.borqs.sync.server.webagent.ServletImp; import com.borqs.sync.server.webagent.util.WebLog; @Deprecated //temp,should remove the class after the client upgrade and do use configfile rest interface public class ConfigfileServlet extends HttpServletDelegate { public Logger mLogger; //for configuration file query private static final String REQUEST_PARMETER_FILENAME = "filename"; public ConfigfileServlet(Context context) { super(context); mLogger = WebLog.getLogger(context); } /** * http://..../configfile/query?filename=borqs_plus.xml * @throws AccountException */ @Deprecated @WebMethod("query") public void queryConfigurationFile(QueryParams qp,ResponseWriter writer) throws AccountException { String fileName = qp.checkGetString(REQUEST_PARMETER_FILENAME); ServletImp.queryConfigurationFile(mContext,fileName,writer); } }
[ "liuhuadong78@gmail.com" ]
liuhuadong78@gmail.com
495e1a641347f870bc3e1ae4f7c80f817fa1cd8f
7af928921898828426b7af6eff4dd9b7e4252817
/platforms/android-28/android-stubs-src/file/java/net/URISyntaxException.java
1135175eab496cc725dcf49a0b74246da1b396e1
[]
no_license
Davidxiahao/RAPID
40c546a739a818a6562d0c9bce5df9f1a462d92b
e99f46155a2f3e6b84324ba75ecd22a278ba7167
refs/heads/master
2023-06-27T13:09:02.418736
2020-03-06T01:38:16
2020-03-06T01:38:16
239,509,129
0
0
null
null
null
null
UTF-8
Java
false
false
3,726
java
/* * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.net; /** * Checked exception thrown to indicate that a string could not be parsed as a * URI reference. * * @author Mark Reinhold * @see URI * @since 1.4 */ @SuppressWarnings({"unchecked", "deprecation", "all"}) public class URISyntaxException extends java.lang.Exception { /** * Constructs an instance from the given input string, reason, and error * index. * * @param input The input string * @param reason A string explaining why the input could not be parsed * @param index The index at which the parse error occurred, * or {@code -1} if the index is not known * * @throws NullPointerException * If either the input or reason strings are {@code null} * * @throws IllegalArgumentException * If the error index is less than {@code -1} */ public URISyntaxException(java.lang.String input, java.lang.String reason, int index) { throw new RuntimeException("Stub!"); } /** * Constructs an instance from the given input string and reason. The * resulting object will have an error index of {@code -1}. * * @param input The input string * @param reason A string explaining why the input could not be parsed * * @throws NullPointerException * If either the input or reason strings are {@code null} */ public URISyntaxException(java.lang.String input, java.lang.String reason) { throw new RuntimeException("Stub!"); } /** * Returns the input string. * * @return The input string */ public java.lang.String getInput() { throw new RuntimeException("Stub!"); } /** * Returns a string explaining why the input string could not be parsed. * * @return The reason string */ public java.lang.String getReason() { throw new RuntimeException("Stub!"); } /** * Returns an index into the input string of the position at which the * parse error occurred, or {@code -1} if this position is not known. * * @return The error index */ public int getIndex() { throw new RuntimeException("Stub!"); } /** * Returns a string describing the parse error. The resulting string * consists of the reason string followed by a colon character * ({@code ':'}), a space, and the input string. If the error index is * defined then the string {@code " at index "} followed by the index, in * decimal, is inserted after the reason string and before the colon * character. * * @return A string describing the parse error */ public java.lang.String getMessage() { throw new RuntimeException("Stub!"); } }
[ "davidxiahao@gmail.com" ]
davidxiahao@gmail.com
81351e5dc2852079c12c5ab5b2d1b116780b68f1
fd96fd48f06cc20ee5472a99ec6c6dcc2e2ca956
/src/main/java/org/slieb/soy/meta/MetaCustomClassConverterFactory.java
48aac74fefa1236a3d52940798fedfeeb76f449d
[ "MIT" ]
permissive
StefanLiebenberg/SoyAnnotations
0e0a9f1153a5f2ffbef5f0f34263f4b43d4b418f
353618e160eda65a1456a09298a0288ee9206681
refs/heads/master
2021-01-21T21:43:23.762262
2016-03-24T00:05:40
2016-03-24T00:05:40
17,048,427
1
1
null
null
null
null
UTF-8
Java
false
false
2,009
java
package org.slieb.soy.meta; import com.google.inject.Inject; import org.slieb.soy.annotations.CustomConverter; import org.slieb.soy.factories.MetaConverterFactory; import org.slieb.soy.helpers.FactoryHelper; import org.slieb.throwables.FunctionWithThrowable; import javax.annotation.Nonnull; @SuppressWarnings("WeakerAccess") public class MetaCustomClassConverterFactory implements FunctionWithThrowable<Class<?>, MetaClassInformation, ReflectiveOperationException>, MetaConverterFactory { private final FactoryHelper factoryHelper; @Inject public MetaCustomClassConverterFactory(FactoryHelper factoryHelper) { this.factoryHelper = factoryHelper; } @Nonnull public MetaConverter getConverterInstance(Class<? extends MetaConverter> converterClass) throws IllegalAccessException, InstantiationException { MetaConverter converter = converterClass.newInstance(); if (converter instanceof MetaFactoryHelperAware) { ((MetaFactoryHelperAware) converter).setFactoryHelper(factoryHelper); } return converter; } @Nonnull public Class<? extends MetaConverter> getConverterClass(Class<?> classObject) { return classObject.getAnnotation(CustomConverter.class).value(); } public MetaConverter getConverter(Class<?> classObject) throws InstantiationException, IllegalAccessException { return getConverterInstance(getConverterClass(classObject)); } @Override public MetaClassInformation applyWithThrowable(Class<?> from) throws IllegalAccessException, InstantiationException { return new MetaClassInformation(Boolean.TRUE, from, getConverter(from), null, false); } @Nonnull @Override public Boolean canCreate(@Nonnull Class<?> classObject) { return classObject.isAnnotationPresent(CustomConverter.class); } @Nonnull @Override public MetaCustomClassConverterFactory create(@Nonnull Class<?> classObject) { return this; } }
[ "siga.fredo@gmail.com" ]
siga.fredo@gmail.com
245403c39c7432581925f77ee964d1d9663ac59f
732182a102a07211f7c1106a1b8f409323e607e0
/gsd/externs/cfg/equip/AnnealBonus.java
23c99e2d384e7eb9a27ba3e179a1e265d7b888e5
[]
no_license
BanyLee/QYZ_Server
a67df7e7b4ec021d0aaa41cfc7f3bd8c7f1af3da
0eeb0eb70e9e9a1a06306ba4f08267af142957de
refs/heads/master
2021-09-13T22:32:27.563172
2018-05-05T09:20:55
2018-05-05T09:20:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package cfg.equip; public final class AnnealBonus extends cfg.CfgObject { public final static int TYPEID = 1317540776; final public int getTypeId() { return TYPEID; } public final int id; public final String name; public final java.util.List<cfg.equip.BonusData> bonus = new java.util.ArrayList<>(); public AnnealBonus(cfg.DataStream fs) { this.id = fs.getInt(); this.name = fs.getString(); for(int n = fs.getInt(); n-- > 0 ; ) { this.bonus.add(new cfg.equip.BonusData(fs)); } } }
[ "hadowhadow@gmail.com" ]
hadowhadow@gmail.com
57a58f937462c8707370f3a3ddb020beee6af8b6
11f8ead88a9b02959c5cf9a7eee27084259519a0
/src/main/java/carpet/mixins/TrapezoidHeightProvider_cleanLogsMixin.java
4c024ba4c6483ad4212a1f990ec65124af58d41e
[ "MIT" ]
permissive
DichuuCraft/fabric-carpet
0d90c7a9e5500eb35c4d650901f4d94c73dd542b
157f76ced08f76b741d2bfb0335d8b106fe23f28
refs/heads/master
2023-08-09T23:15:57.253430
2022-02-26T06:49:36
2022-02-26T06:49:36
249,002,188
2
2
MIT
2022-03-09T11:28:02
2020-03-21T15:17:03
Java
UTF-8
Java
false
false
766
java
package carpet.mixins; import carpet.CarpetSettings; import net.minecraft.world.gen.heightprovider.TrapezoidHeightProvider; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(TrapezoidHeightProvider.class) public class TrapezoidHeightProvider_cleanLogsMixin { @SuppressWarnings("UnresolvedMixinReference") @Redirect(method = "get", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V") ) private void skipLogs(Logger logger, String message, Object p0) { if (!CarpetSettings.cleanLogs) logger.warn(message, p0); } }
[ "gnembonmc@gmail.com" ]
gnembonmc@gmail.com
def55a595b88037e6e0680626bb0870113f90025
8e03a2d3a5554a7193a5fdb22afdcefe634878cb
/Webflux/lib/org/springframework/web/reactive/ServerHttpRequest$Builder.java
3f14f4507f5693ea121832b7f26b780db0852163
[]
no_license
iathanasy/notes
586ae05f0f270307e87e1be8ed009bfa30bb67a7
e6eced651f86759ed881a4145b71f340a0493688
refs/heads/master
2023-08-03T00:58:16.035557
2021-09-29T02:01:11
2021-09-29T02:01:11
414,809,012
1
0
null
2021-10-08T01:33:56
2021-10-08T01:33:56
null
IBM852
Java
false
false
533
java
-------------------- Builder -------------------- # ServerHttpRequestโ”€โ”Œโ–“โ”ลปร‹โ”โ”Œ interface Builder -------------------- this -------------------- Builder method(HttpMethod httpMethod); Builder uri(URI uri); Builder path(String path); Builder contextPath(String contextPath); Builder header(String headerName, String... headerValues); Builder headers(Consumer<HttpHeaders> headersConsumer); Builder sslInfo(SslInfo sslInfo); Builder remoteAddress(InetSocketAddress remoteAddress); ServerHttpRequest build();
[ "747692844@qq.com" ]
747692844@qq.com
af6509e390c8ea243a305270c730bb7736783a97
a8a7cc6bae2a202941e504aea4356e2a959e5e95
/jenkow-activiti/modules/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/StartEvent.java
0cb3fd2eb05f191715fe20180ebf5ce0b5c8c3b9
[ "Apache-2.0" ]
permissive
jenkinsci/jenkow-plugin
aed5d5db786ad260c16cebecf5c6bbbcbf498be5
228748890476b2f17f80b618c8d474a4acf2af8b
refs/heads/master
2023-08-19T23:43:15.544100
2013-05-14T00:49:56
2013-05-14T00:49:56
4,395,961
2
4
null
2022-12-20T22:37:41
2012-05-21T16:58:26
Java
UTF-8
Java
false
false
1,332
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 org.activiti.bpmn.model; import java.util.ArrayList; import java.util.List; /** * @author Tijs Rademakers */ public class StartEvent extends Event { protected String initiator; protected String formKey; protected List<FormProperty> formProperties = new ArrayList<FormProperty>(); public String getInitiator() { return initiator; } public void setInitiator(String initiator) { this.initiator = initiator; } public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public List<FormProperty> getFormProperties() { return formProperties; } public void setFormProperties(List<FormProperty> formProperties) { this.formProperties = formProperties; } }
[ "m2spring@springdot.org" ]
m2spring@springdot.org
61305c2deed38a0715a156f960035267326e5343
381f843b02e47be9ca87da97f1c7e61b7d83d425
/src/utopia/vision/test/VisionMapTest.java
7187b839d94f4b8525af2a4edcaed7f4c0d09c31
[]
no_license
Mikkomario/Utopia-Vision
8cf87d8872209d13bb26251ace905a971d085009
16c4496ee8bd18cedbf9a88cf315d1774c2741d7
refs/heads/master
2021-01-15T15:32:52.857539
2016-06-26T14:42:34
2016-06-26T14:42:34
27,561,460
0
0
null
null
null
null
UTF-8
Java
false
false
5,343
java
package utopia.vision.test; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import utopia.arc.io.XmlFileBankRecorder; import utopia.arc.resource.Bank; import utopia.arc.resource.BankBank; import utopia.arc.resource.BankRecorder; import utopia.arc.resource.BankRecorder.RecordingFailedException; import utopia.flow.structure.Pair; import utopia.genesis.event.Actor; import utopia.genesis.event.Drawable; import utopia.genesis.event.StepHandler; import utopia.genesis.util.Transformable; import utopia.genesis.util.Transformation; import utopia.genesis.util.Vector3D; import utopia.genesis.video.GamePanel; import utopia.genesis.video.GameWindow; import utopia.genesis.video.GamePanel.ScalingPolicy; import utopia.genesis.video.SplitPanel.ScreenSplit; import utopia.inception.handling.HandlerRelay; import utopia.inception.util.SimpleHandled; import utopia.vision.generics.VisionDataType; import utopia.vision.resource.Sprite; import utopia.vision.resource.Tile; import utopia.vision.resource.TileMap; import utopia.vision.resource.TileMapDrawer; /** * This class tests the basic functions of TileMap and TileMapDrawer * @author Mikko Hilpinen * @since 16.6.2016 */ class VisionMapTest { // ATTRIBUTES --------------- private static final Path RESOURCE_DIRECTORY = Paths.get("testData"); // MAIN METHOD ---------------- public static void main(String[] args) { try { VisionDataType.initialise(); // Creates the sprites createSprites(); // Creates the tilemap(s) next createTileMaps(); // Reads the resources BankRecorder recorder = new XmlFileBankRecorder(RESOURCE_DIRECTORY); BankBank<Sprite> sprites = new BankBank<>(VisionDataType.SPRITE, recorder, true); BankBank<TileMap> tileMaps = new BankBank<>(VisionDataType.TILEMAP, recorder, true); sprites.initialiseAll(); tileMaps.initialiseAll(); // Sets up the environment Vector3D resolution = new Vector3D(800, 500); StepHandler stepHandler = new StepHandler(120, 20); GameWindow window = new GameWindow(resolution.toDimension(), "Test", false, false, ScreenSplit.HORIZONTAL); GamePanel panel = new GamePanel(resolution, ScalingPolicy.PROJECT, 120); window.addGamePanel(panel); HandlerRelay handlers = new HandlerRelay(); handlers.addHandler(stepHandler, panel.getDrawer()); // Creates the tilemap drawer object handlers.add(new SimpleTileMapObject(resolution.dividedBy(2), 32, tileMaps.get("default", "test"), sprites)); // Starts the game stepHandler.start(); } catch (Exception e) { System.err.println("Failed"); e.printStackTrace(); } } // OTHER METHODS ----------- private static void createSprites() throws IOException, RecordingFailedException { Bank<Sprite> sprites = new Bank<>("default", VisionDataType.SPRITE, new XmlFileBankRecorder(RESOURCE_DIRECTORY)); sprites.put("bookMark", new Sprite(RESOURCE_DIRECTORY.resolve("bookmarks_strip5.png").toFile(), 5, null)); sprites.put("close", new Sprite(RESOURCE_DIRECTORY.resolve("closebutton_strip2.png").toFile(), 2, Vector3D.ZERO)); sprites.save(); } private static void createTileMaps() throws RecordingFailedException { List<Pair<Vector3D, Tile>> tiles = new ArrayList<>(); tiles.add(new Pair<>(Vector3D.ZERO, new Tile("default", "bookMark", new Vector3D(64, 96), 0, false))); tiles.add(new Pair<>(new Vector3D(64), new Tile("default", "close", new Vector3D(96, 96)))); tiles.add(new Pair<>(new Vector3D(64 + 96), new Tile("default", "bookMark", new Vector3D(64, 96), 3, false))); TileMap map = new TileMap(tiles, new Vector3D(64 + 96 / 2, 96 / 2)); Bank<TileMap> maps = new Bank<>("default", VisionDataType.TILEMAP, new XmlFileBankRecorder(RESOURCE_DIRECTORY)); maps.put("test", map); maps.save(); } // NESTED CLASSES ---------------- private static class SimpleTileMapObject extends SimpleHandled implements Drawable, Actor, Transformable { // ATTRIBUTES ---------------- private Transformation transformation; private TileMapDrawer drawer; // CONSTRUCTOR ---------------- public SimpleTileMapObject(Vector3D position, double rotation, TileMap map, BankBank<Sprite> sprites) { this.transformation = new Transformation(position, Vector3D.IDENTITY, new Vector3D(0.5, 0), rotation); this.drawer = new TileMapDrawer(map, sprites); } // IMPLEMENTED METHODS -------- @Override public Transformation getTransformation() { return this.transformation; } @Override public void setTrasformation(Transformation t) { this.transformation = t; } @Override public void act(double duration) { this.drawer.animate(duration); } @Override public void drawSelf(Graphics2D g2d) { AffineTransform lastTransform = getTransformation().transform(g2d); this.drawer.drawMap(g2d); g2d.setTransform(lastTransform); } @Override public int getDepth() { return 0; } } }
[ "mikko_hilpinen@hotmail.com" ]
mikko_hilpinen@hotmail.com
3c3df4ca00be5b7328a45674878eb7299f74cf11
95f5e9a6401fb4ff57ed600b243e937f7cd16627
/FitnessRoomCtrService/src/main/java/fitnessroom/service/UsersService.java
f9d4f36639e225247875006d7f693d996502f95b
[]
no_license
MyAuntIsPost90s/FitnessRoom
50c97513c877552453a8562398d9146efb4d4244
703a37b37832cf84e19320fa9d9c7a3c12edba64
refs/heads/master
2021-01-24T04:13:19.484049
2018-05-31T12:26:54
2018-05-31T12:26:54
122,926,051
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package fitnessroom.service; import java.util.List; import fitnessroom.base.model.Users; import fitnessroom.uimodel.EUIPageList; public interface UsersService { public Users doLogin(Users users, StringBuilder stringBuilder); public Users getSingle(String userid); public EUIPageList<Users> getList(Users user, int page, int rows); public void add(Users user) throws Exception; public void update(Users user); public void delete(List<String> ids); }
[ "1126670571@qq.com" ]
1126670571@qq.com
4fe62fef46904d2ce481eb5c2605165ad1568969
e97b3dbaa5ee1e6bd64989299827d7056968c7f2
/inception-ui-kb/src/main/java/de/tudarmstadt/ukp/inception/ui/kb/project/KnowledgeBaseProjectSettingsPanelFactory.java
f492b7dcc66ddc3d8f9532942e1eb313e14f938e
[ "Apache-2.0" ]
permissive
HerrKrishna/inception
998d1ef052eb4e1e6dbc58f9c9061d09ec62c8f0
218709fea6b6374dc753601e616a74204f605db4
refs/heads/master
2023-03-12T21:26:15.633221
2021-02-16T11:07:49
2021-02-16T11:07:49
313,596,910
0
0
Apache-2.0
2021-02-08T10:39:33
2020-11-17T11:23:00
null
UTF-8
Java
false
false
1,991
java
/* * Copyright 2018 * Ubiquitous Knowledge Processing (UKP) Lab and FG Language Technology * Technische Universitรคt Darmstadt * * Licensed to the Technische Universitรคt Darmstadt under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The Technische Universitรคt Darmstadt * 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. * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package de.tudarmstadt.ukp.inception.ui.kb.project; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; import org.springframework.core.annotation.Order; import de.tudarmstadt.ukp.clarin.webanno.model.Project; import de.tudarmstadt.ukp.clarin.webanno.ui.core.settings.ProjectSettingsPanelFactory; import de.tudarmstadt.ukp.inception.ui.kb.config.KnowledgeBaseServiceUIAutoConfiguration; /** * <p> * This class is exposed as a Spring Component via * {@link KnowledgeBaseServiceUIAutoConfiguration#knowledgeBaseProjectSettingsPanelFactory}. * </p> */ @Order(350) public class KnowledgeBaseProjectSettingsPanelFactory implements ProjectSettingsPanelFactory { @Override public String getPath() { return "/knowledge-bases"; } @Override public String getLabel() { return "Knowledge Bases"; } @Override public Panel createSettingsPanel(String aID, final IModel<Project> aProjectModel) { return new ProjectKnowledgeBasePanel(aID, aProjectModel); } }
[ "richard.eckart@gmail.com" ]
richard.eckart@gmail.com
5b3f2fd15a0c7576d31d6f7ceaed758f11eb6ac1
88b6ebd21c60f2e52a1fa34e7d8cdac0c903e6c2
/pms/src/main/java/com/beskilled/controller/ImageOptimizer.java
5e77149c2c5a910e6575a79154004c6427f165b8
[]
no_license
mostafiz9900/spring
f8738a1c9bc01013d9ec9804ec742d8ca553326d
c31208a629dd6c1735a6688389c25af28063f4c7
refs/heads/master
2020-04-19T21:57:17.908148
2019-03-22T23:44:39
2019-03-22T23:44:39
168,456,063
1
1
null
null
null
null
UTF-8
Java
false
false
1,736
java
package com.beskilled.controller; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @Component public class ImageOptimizer { public void optimizeImage(String UPLOADED_FOLDER, MultipartFile file, float quality, int width, int height) throws IOException { MultipartFile multipartFile = null; Path path = Paths.get(UPLOADED_FOLDER + file.getOriginalFilename()); System.out.println("Path: "+path); Path pathOut = Paths.get(UPLOADED_FOLDER +"new-"+ file.getOriginalFilename()); //create instance of File File optimizedImage=new File(pathOut.toString()); File inputImage=new File(path.toString()); //BufferedImage bufferedImage = ImageIO.read(Files.newInputStream(Paths.get(basePath + imageSource))); BufferedImage bufferedImage=ImageIO.read(Files.newInputStream(path)); BufferedImage resizedBufferedImage=resize(bufferedImage,height,width); ImageIO.write(resizedBufferedImage,"jpg",optimizedImage); // multipartFile.transferTo(optimizedImage); // return multipartFile; } private static BufferedImage resize(BufferedImage img, int height, int width) { Image tmp = img.getScaledInstance(width, height, Image.SCALE_SMOOTH); BufferedImage resized = new BufferedImage(width, height, BufferedImage.TYPE_INT_BGR); Graphics2D g2d = resized.createGraphics(); g2d.drawImage(tmp, 0, 0, null); return resized; } }
[ "you@example.com" ]
you@example.com
dc44a147353dabdc0e10c8f035ebc8f91f447ed2
a303420d87f033aab7f2d90cbcfb7f9eeea3fc8f
/drools/drools-model/drools-model-compiler/src/main/java/org/drools/modelcompiler/builder/DeclaredTypeWriter.java
03824dc7fb6e25b25efd26d07929ea1502538df3
[ "Apache-2.0" ]
permissive
elguardian/kogito-runtimes
2ebb5bf7e6a7791e54dd7198c2ed2198329ad97b
e9e73651812ec9d629c892c491899411aa557fcb
refs/heads/master
2023-06-22T10:10:34.033976
2019-09-25T06:29:13
2019-09-25T06:29:13
211,028,460
0
0
Apache-2.0
2019-09-26T07:33:48
2019-09-26T07:33:48
null
UTF-8
Java
false
false
1,550
java
/* * Copyright 2019 Red Hat, Inc. and/or its affiliates. * * 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.drools.modelcompiler.builder; import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; public class DeclaredTypeWriter { protected final ClassOrInterfaceDeclaration generatedPojo; protected final PackageModel pkgModel; private final String name; public DeclaredTypeWriter(ClassOrInterfaceDeclaration generatedPojo, PackageModel pkgModel) { this.generatedPojo = generatedPojo; this.name = generatedPojo.getNameAsString(); this.pkgModel = pkgModel; } public String getSource() { String source = JavaParserCompiler.toPojoSource( pkgModel.getName(), pkgModel.getImports(), pkgModel.getStaticImports(), generatedPojo); PackageModel.log(source); return source; } public String getName() { return pkgModel.getPathName() + "/" + name + ".java"; } }
[ "mario.fusco@gmail.com" ]
mario.fusco@gmail.com
6ac7ce8daf13a468860333ed99b2e0eba15c9173
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/zuiyou/sources/cn/xiaochuankeji/tieba/json/UgcVideoMusicJson.java
2ee59729b7e68aa5bf5c4647bce698536d58c31d
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
2,006
java
package cn.xiaochuankeji.tieba.json; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import cn.xiaochuankeji.tieba.json.imgjson.ServerImgJson; import com.alibaba.fastjson.annotation.JSONField; import java.io.Serializable; import java.util.ArrayList; public class UgcVideoMusicJson implements Parcelable, Serializable { public static final Creator<UgcVideoMusicJson> CREATOR = new Creator<UgcVideoMusicJson>() { public UgcVideoMusicJson createFromParcel(Parcel parcel) { return new UgcVideoMusicJson(parcel); } public UgcVideoMusicJson[] newArray(int i) { return new UgcVideoMusicJson[i]; } }; @JSONField(name = "cid") public long cid; @JSONField(name = "dur") public int dur; @JSONField(name = "favor") public int favor; @JSONField(name = "id") public long id; @JSONField(name = "img") public ServerImgJson img; @JSONField(name = "title") public String musicName; @JSONField(name = "singers") public ArrayList<String> singers; @JSONField(name = "mid") public long uploaderMid; @JSONField(name = "url") public String url; protected UgcVideoMusicJson() { } protected UgcVideoMusicJson(Parcel parcel) { this.id = parcel.readLong(); this.cid = parcel.readLong(); this.url = parcel.readString(); this.musicName = parcel.readString(); this.singers = parcel.createStringArrayList(); this.uploaderMid = parcel.readLong(); this.dur = parcel.readInt(); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { parcel.writeLong(this.id); parcel.writeLong(this.cid); parcel.writeString(this.url); parcel.writeString(this.musicName); parcel.writeStringList(this.singers); parcel.writeLong(this.uploaderMid); parcel.writeInt(this.dur); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
635e0e80474203015a1c3f7bffa92619ba9be097
4e9c5e37a4380d5a11a27781187918a6aa31f3f9
/dse-core-6.7.0/com/datastax/bdp/cassandra/tracing/ClientConnectionMetadata.java
f1ade119b00f1fa227f49aa94b0864abdb4f752a
[]
no_license
jiafu1115/dse67
4a49b9a0d7521000e3c1955eaf0911929bc90d54
62c24079dd5148e952a6ff16bc1161952c222f9b
refs/heads/master
2021-10-11T15:38:54.185842
2019-01-28T01:28:06
2019-01-28T01:28:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package com.datastax.bdp.cassandra.tracing; import java.net.InetAddress; import java.util.Objects; public class ClientConnectionMetadata { public final String userId; public final InetAddress clientAddress; public final int clientPort; public final String connectionId; private final int hash; public ClientConnectionMetadata(InetAddress clientAddress, int clientPort, String userId) { this.clientAddress = clientAddress; this.clientPort = clientPort; this.userId = userId; this.connectionId = clientAddress.getHostAddress() + ":" + clientPort; this.hash = Objects.hash(new Object[]{this.connectionId, userId}); } public int hashCode() { return this.hash; } public boolean equals(Object other) { if(other == this) { return true; } else if(!(other instanceof ClientConnectionMetadata)) { return false; } else { ClientConnectionMetadata otherCCM = (ClientConnectionMetadata)other; return Objects.equals(this.connectionId, otherCCM.connectionId) && Objects.equals(this.userId, otherCCM.userId); } } public String toString() { return String.format("ClientConnectionMetadata { 'connectionId':'%s', 'userId':'%s'}", new Object[]{this.connectionId, this.userId}); } }
[ "superhackerzhang@sina.com" ]
superhackerzhang@sina.com
6e46f9b22ee5111fa4da71d427149b6e9a31019e
6a95484a8989e92db07325c7acd77868cb0ac3bc
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201409/cm/GeoTargetTypeSettingNegativeGeoTargetType.java
fdad6346d82cf5a1abba6c21e145cfa41400f5cd
[ "Apache-2.0" ]
permissive
popovsh6/googleads-java-lib
776687dd86db0ce785b9d56555fe83571db9570a
d3cabb6fb0621c2920e3725a95622ea934117daf
refs/heads/master
2020-04-05T23:21:57.987610
2015-03-12T19:59:29
2015-03-12T19:59:29
33,672,406
1
0
null
2015-04-09T14:06:00
2015-04-09T14:06:00
null
UTF-8
Java
false
false
1,376
java
package com.google.api.ads.adwords.jaxws.v201409.cm; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for GeoTargetTypeSetting.NegativeGeoTargetType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="GeoTargetTypeSetting.NegativeGeoTargetType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="DONT_CARE"/> * &lt;enumeration value="LOCATION_OF_PRESENCE"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "GeoTargetTypeSetting.NegativeGeoTargetType") @XmlEnum public enum GeoTargetTypeSettingNegativeGeoTargetType { /** * * Specifies that a user is excluded from seeing the ad * if either their AOI or their LOP matches the geo target. * * */ DONT_CARE, /** * * Specifies that a user is excluded from seeing the ad * only if their LOP matches the geo target. * * */ LOCATION_OF_PRESENCE; public String value() { return name(); } public static GeoTargetTypeSettingNegativeGeoTargetType fromValue(String v) { return valueOf(v); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
48557d5b84ae95524ae1d93d78a47afa14b24ea6
31f043184e2839ad5c3acbaf46eb1a26408d4296
/src/main/java/com/github/highcharts4gwt/model/highcharts/option/api/plotoptions/funnel/MouseOutEvent.java
dab831fa8aabb36105dbb4f2dbcdb6b4cbe5287f
[]
no_license
highcharts4gwt/highchart-wrapper
52ffa84f2f441aa85de52adb3503266aec66e0ac
0a4278ddfa829998deb750de0a5bd635050b4430
refs/heads/master
2021-01-17T20:25:22.231745
2015-06-30T15:05:01
2015-06-30T15:05:01
24,794,406
1
0
null
null
null
null
UTF-8
Java
false
false
213
java
package com.github.highcharts4gwt.model.highcharts.option.api.plotoptions.funnel; import com.github.highcharts4gwt.model.highcharts.object.api.Series; public interface MouseOutEvent { Series series(); }
[ "ronan.quillevere@gmail.com" ]
ronan.quillevere@gmail.com
12909dd7bcdc5b9ee98e4e08c2ce32f987d28022
d6bd766475fbd87945a6d4c56c828fb0f82e53c2
/src/main/java/com/kwic/security/base64/Base64Decoder.java
e81c2a403fececc358eedc4256da91060fe0233e
[]
no_license
suhojang/TCPforScraping
1d2d66824f5938229fb4c2da37d4d15ffd9e1c6c
f9eab5fd01d8f3e861476c538a150194080d15fb
refs/heads/main
2023-04-13T00:42:21.844097
2021-04-07T06:36:44
2021-04-07T06:36:44
355,095,300
0
0
null
null
null
null
UTF-8
Java
false
false
4,543
java
// Base64Decoder.java // $Id: Base64Decoder.java,v 1.1 1980/01/03 17:02:38 jjh Exp $ // (c) COPYRIGHT MIT and INRIA, 1996. // Please first read the full copyright statement in file COPYRIGHT.html package com.kwic.security.base64; import java.io.* ; /** * Decode a BASE64 encoded input stream to some output stream. * This class implements BASE64 decoding, as specified in the * <a href="http://ds.internic.net/rfc/rfc1521.txt">MIME specification</a>. * @see org.w3c.tools.codec.Base64Encoder */ public class Base64Decoder { private static final int BUFFER_SIZE = 800000 ; InputStream in = null ; OutputStream out = null ; boolean stringp = false ; private final int get1 (byte buf[], int off) { return ((buf[off] & 0x3f) << 2) | ((buf[off+1] & 0x30) >>> 4) ; } private final int get2 (byte buf[], int off) { return ((buf[off+1] & 0x0f) << 4) | ((buf[off+2] &0x3c) >>> 2) ; } private final int get3 (byte buf[], int off) { return ((buf[off+2] & 0x03) << 6) | (buf[off+3] & 0x3f) ; } private final int check (int ch) { if ((ch >= 'A') && (ch <= 'Z')) { return ch - 'A' ; } else if ((ch >= 'a') && (ch <= 'z')) { return ch - 'a' + 26 ; } else if ((ch >= '0') && (ch <= '9')) { return ch - '0' + 52 ; } else { switch (ch) { case '=': return 65 ; case '+': return 62 ; case '/': return 63 ; default: return -1 ; } } } /** * Do the actual decoding. * Process the input stream by decoding it and emiting the resulting bytes * into the output stream. * @exception IOException If the input or output stream accesses failed. * @exception Base64FormatException If the input stream is not compliant * with the BASE64 specification. */ public void process () throws IOException, Base64FormatException { byte buffer[] = new byte[BUFFER_SIZE] ; byte chunk[] = new byte[4] ; int got = -1 ; int ready = 0 ; fill: while ((got = in.read(buffer)) > 0) { int skiped = 0 ; while ( skiped < got ) { // Check for un-understood characters: while ( ready < 4 ) { if ( skiped >= got ) continue fill ; int ch = check (buffer[skiped++]) ; if ( ch >= 0 ) chunk[ready++] = (byte) ch ; } if ( chunk[2] == 65 ) { out.write(get1(chunk, 0)); return ; } else if ( chunk[3] == 65 ) { out.write(get1(chunk, 0)) ; out.write(get2(chunk, 0)) ; return ; } else { out.write(get1(chunk, 0)) ; out.write(get2(chunk, 0)) ; out.write(get3(chunk, 0)) ; } ready = 0 ; } } if ( ready != 0 ) throw new Base64FormatException ("Invalid length.") ; out.flush() ; out.close(); } /** * Do the decoding, and return a String. * This methods should be called when the decoder is used in * <em>String</em> mode. It decodes the input string to an output string * that is returned. * @exception RuntimeException If the object wasn't constructed to * decode a String. * @exception Base64FormatException If the input string is not compliant * with the BASE64 specification. */ public String processString () throws Base64FormatException { if ( ! stringp ) throw new RuntimeException (this.getClass().getName() + "[processString]" + "invalid call (not a String)"); try { process() ; } catch (IOException e) { } return ((ByteArrayOutputStream) out).toString() ; } /** * Create a decoder to decode a String. * @param input The string to be decoded. */ public Base64Decoder (String input) { byte bytes[] = input.getBytes () ; this.stringp = true ; this.in = new ByteArrayInputStream(bytes) ; this.out = new ByteArrayOutputStream () ; } /** * Create a decoder to decode a stream. * @param in The input stream (to be decoded). * @param out The output stream, to write decoded data to. */ public Base64Decoder (InputStream in, OutputStream out) { this.in = in ; this.out = out ; this.stringp = false ; } public Base64Decoder (String input, OutputStream out) { byte bytes[] = input.getBytes () ; this.stringp = true ; this.in = new ByteArrayInputStream(bytes) ; this.out = out ; } }
[ "jsh2808@naver.com" ]
jsh2808@naver.com
b31481560b22084b6cb8dfc20c3ee136e28cdc40
c04e424a5282b06598fe2d6f689f69b2bcf00786
/isap-dao/src/main/java/com/gosun/isap/dao/po/face/ListFilterParaBean.java
159164dc6ed62be6aca19c2e0c6d1a4923edf216
[]
no_license
soon14/isap-parent
859d9c0d4adc0e7d60f92a537769b237c1c5095b
2f6c1ec4e635e08eab57d4df4c92e90e4e09e044
refs/heads/master
2021-12-15T03:09:00.641560
2017-07-26T02:13:40
2017-07-26T02:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,380
java
package com.gosun.isap.dao.po.face; import java.io.Serializable; public class ListFilterParaBean implements Serializable{ private Integer listType; //ๅๅ•็ฑปๅž‹(1.้ป‘ๅๅ• 2.็™ฝๅๅ•) private String departmentID; //้ƒจ้—จID private String cameraID; //็›ธๆœบID private String startTime; //ๅผ€ๅง‹ๆ—ถ้—ด private String endTime; //็ป“ๆŸๆ—ถ้—ด private Integer start; //้กต็ดขๅผ• private Integer limit; //ไธ€้กตๆ€ปๆ•ฐ public Integer getListType() { return listType; } public void setListType(Integer listType) { this.listType = listType; } public String getDepartmentID() { return departmentID; } public void setDepartmentID(String departmentID) { this.departmentID = departmentID; } public String getCameraID() { return cameraID; } public void setCameraID(String cameraID) { this.cameraID = cameraID; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public Integer getStart() { return start; } public void setStart(Integer start) { this.start = start; } public Integer getLimit() { return limit; } public void setLimit(Integer limit) { this.limit = limit; } }
[ "lzk90s@163.com" ]
lzk90s@163.com
86bb32519f30f371d81469dec75ff391ce2c80d3
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.6.2/common/src/main/java/com/tc/util/Stack.java
7a74d0e8ee54a25f5ad79e119ac3de42df906107
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
3,450
java
/** * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright * notice. All rights reserved. */ package com.tc.util; import java.util.ArrayList; import java.util.EmptyStackException; import java.util.Iterator; import java.util.List; /* * This stack implementation uses ArrayList internally. This is mainly created so that we don't have synchronization * overheads that java.util.Stack imposes since it is based on Vector. This class maintains an interface level * compatibility with java.util.Stack but doesn't implement all of Vector interfaces. */ public class Stack<T> { private final List<T> list = new ArrayList<T>(); /** * Creates an empty Stack. */ public Stack() { // Creates an empty Stack. } /** * Pushes an item onto the top of this stack. This has exactly the same effect as: <blockquote> * * @param item the item to be pushed onto this stack. * @return the <code>item</code> argument. * @see java.util.Vector#addElement */ public T push(T item) { list.add(item); return item; } /** * Removes the object at the top of this stack and returns that object as the value of this function. * * @return The object at the top of this stack (the last item of the <tt>Vector</tt> object). * @exception EmptyStackException if this stack is empty. */ public T pop() { int len = size(); if (len == 0) throw new EmptyStackException(); return list.remove(len - 1); } /** * Looks at the object at the top of this stack without removing it from the stack. * * @return the object at the top of this stack (the last item of the <tt>Vector</tt> object). * @exception EmptyStackException if this stack is empty. */ public T peek() { int len = size(); if (len == 0) throw new EmptyStackException(); return list.get(len - 1); } /** * Tests if this stack is empty. * * @return <code>true</code> if and only if this stack contains no items; <code>false</code> otherwise. */ public boolean empty() { return size() == 0; } /** * Size of this Stack * * @return the size of the stack */ public int size() { return list.size(); } /** * Returns the 1-based position where an object is on this stack. If the object <tt>o</tt> occurs as an item in this * stack, this method returns the distance from the top of the stack of the occurrence nearest the top of the stack; * the topmost item on the stack is considered to be at distance <tt>1</tt>. The <tt>equals</tt> method is used to * compare <tt>o</tt> to the items in this stack. * * @param o the desired object. * @return the 1-based position from the top of the stack where the object is located; the return value * <code>-1</code> indicates that the object is not on the stack. */ public int search(T o) { int i = list.lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; } /* I am not in big favor of having these interfaces */ public T get(int index) { return list.get(index); } public T remove(int index) { return list.remove(index); } public Iterator<T> iterator() { return list.iterator(); } public boolean isEmpty() { return empty(); } public boolean contains(T o) { return list.contains(o); } public boolean remove(T o) { return list.remove(o); } }
[ "hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
dfea2d71074e11004980c98bbad78dbe306df612
95a54e3f3617bf55883210f0b5753b896ad48549
/java_src/com/google/zxing/maxicode/decoder/DecodedBitStreamParser.java
e6ccc229dd27aba670c5dd9e6c10c587d487db95
[]
no_license
aidyk/TagoApp
ffc5a8832fbf9f9819f7f8aa7af29149fbab9ea5
e31a528c8f931df42075fc8694754be146eddc34
refs/heads/master
2022-12-22T02:20:58.486140
2021-05-16T07:42:02
2021-05-16T07:42:02
325,695,453
3
1
null
2022-12-16T00:32:10
2020-12-31T02:34:45
Smali
UTF-8
Java
false
false
7,018
java
package com.google.zxing.maxicode.decoder; import com.google.zxing.common.DecoderResult; import java.text.DecimalFormat; /* access modifiers changed from: package-private */ public final class DecodedBitStreamParser { private static final char ECI = 65530; private static final char FS = 28; private static final char GS = 29; private static final char LATCHA = 65527; private static final char LATCHB = 65528; private static final char LOCK = 65529; private static final char NS = 65531; private static final char PAD = 65532; private static final char RS = 30; private static final String[] SETS = {"\nABCDEFGHIJKLMNOPQRSTUVWXYZ๏ฟบ\u001c\u001d\u001e๏ฟป ๏ฟผ\"#$%&'()*+,-./0123456789:๏ฟฑ๏ฟฒ๏ฟณ๏ฟด๏ฟธ", "`abcdefghijklmnopqrstuvwxyz๏ฟบ\u001c\u001d\u001e๏ฟป{๏ฟผ}~;<=>?[\\]^_ ,./:@!|๏ฟผ๏ฟต๏ฟถ๏ฟผ๏ฟฐ๏ฟฒ๏ฟณ๏ฟด๏ฟท", "ร€รร‚รƒร„ร…ร†ร‡รˆร‰รŠร‹รŒรรŽรรร‘ร’ร“ร”ร•ร–ร—ร˜ร™รš๏ฟบ\u001c\u001d\u001eร›รœรรžรŸยชยฌยฑยฒยณยตยนยบยผยฝยพย€ยย‚ยƒย„ย…ย†ย‡ยˆย‰๏ฟท ๏ฟน๏ฟณ๏ฟด๏ฟธ", "ร รกรขรฃรครฅรฆรงรจรฉรชรซรฌรญรฎรฏรฐรฑรฒรณรดรตรถรทรธรนรบ๏ฟบ\u001c\u001d\u001e๏ฟปรปรผรฝรพรฟยกยจยซยฏยฐยดยทยธยปยฟยŠย‹ยŒยยŽยยย‘ย’ย“ย”๏ฟท ๏ฟฒ๏ฟน๏ฟด๏ฟธ", "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a๏ฟบ๏ฟผ๏ฟผ\u001b๏ฟป\u001c\u001d\u001e\u001fยŸย ยขยฃยคยฅยฆยงยฉยญยฎยถย•ย–ย—ย˜ย™ยšย›ยœยยž๏ฟท ๏ฟฒ๏ฟณ๏ฟน๏ฟธ", "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?"}; private static final char SHIFTA = 65520; private static final char SHIFTB = 65521; private static final char SHIFTC = 65522; private static final char SHIFTD = 65523; private static final char SHIFTE = 65524; private static final char THREESHIFTA = 65526; private static final char TWOSHIFTA = 65525; private DecodedBitStreamParser() { } static DecoderResult decode(byte[] bArr, int i) { String str; StringBuilder sb = new StringBuilder(144); switch (i) { case 2: case 3: if (i == 2) { str = new DecimalFormat("0000000000".substring(0, getPostCode2Length(bArr))).format((long) getPostCode2(bArr)); } else { str = getPostCode3(bArr); } DecimalFormat decimalFormat = new DecimalFormat("000"); String format = decimalFormat.format((long) getCountry(bArr)); String format2 = decimalFormat.format((long) getServiceClass(bArr)); sb.append(getMessage(bArr, 10, 84)); if (!sb.toString().startsWith("[)>\u001e01\u001d")) { sb.insert(0, str + GS + format + GS + format2 + GS); break; } else { sb.insert(9, str + GS + format + GS + format2 + GS); break; } case 4: sb.append(getMessage(bArr, 1, 93)); break; case 5: sb.append(getMessage(bArr, 1, 77)); break; } return new DecoderResult(bArr, sb.toString(), null, String.valueOf(i)); } private static int getBit(int i, byte[] bArr) { int i2 = i - 1; return ((1 << (5 - (i2 % 6))) & bArr[i2 / 6]) == 0 ? 0 : 1; } private static int getInt(byte[] bArr, byte[] bArr2) { if (bArr2.length != 0) { int i = 0; for (int i2 = 0; i2 < bArr2.length; i2++) { i += getBit(bArr2[i2], bArr) << ((bArr2.length - i2) - 1); } return i; } throw new IllegalArgumentException(); } private static int getCountry(byte[] bArr) { return getInt(bArr, new byte[]{53, 54, 43, 44, 45, 46, 47, 48, 37, 38}); } private static int getServiceClass(byte[] bArr) { return getInt(bArr, new byte[]{55, 56, 57, 58, 59, 60, 49, 50, 51, 52}); } private static int getPostCode2Length(byte[] bArr) { return getInt(bArr, new byte[]{39, 40, 41, 42, 31, 32}); } private static int getPostCode2(byte[] bArr) { return getInt(bArr, new byte[]{33, 34, 35, 36, 25, 26, 27, 28, 29, 30, 19, 20, 21, 22, 23, 24, 13, 14, 15, 16, 17, 18, 7, 8, 9, 10, 11, 12, 1, 2}); } private static String getPostCode3(byte[] bArr) { return String.valueOf(new char[]{SETS[0].charAt(getInt(bArr, new byte[]{39, 40, 41, 42, 31, 32})), SETS[0].charAt(getInt(bArr, new byte[]{33, 34, 35, 36, 25, 26})), SETS[0].charAt(getInt(bArr, new byte[]{27, 28, 29, 30, 19, 20})), SETS[0].charAt(getInt(bArr, new byte[]{21, 22, 23, 24, 13, 14})), SETS[0].charAt(getInt(bArr, new byte[]{15, 16, 17, 18, 7, 8})), SETS[0].charAt(getInt(bArr, new byte[]{9, 10, 11, 12, 1, 2}))}); } /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */ private static String getMessage(byte[] bArr, int i, int i2) { StringBuilder sb = new StringBuilder(); int i3 = i; int i4 = 0; int i5 = -1; int i6 = 0; while (i3 < i + i2) { char charAt = SETS[i4].charAt(bArr[i3]); switch (charAt) { case 65520: case 65521: case 65522: case 65523: case 65524: i6 = i4; i4 = charAt - SHIFTA; i5 = 1; break; case 65525: i5 = 2; i6 = i4; i4 = 0; break; case 65526: i5 = 3; i6 = i4; i4 = 0; break; case 65527: i4 = 0; i5 = -1; break; case 65528: i4 = 1; i5 = -1; break; case 65529: i5 = -1; break; case 65530: default: sb.append(charAt); break; case 65531: int i7 = i3 + 1; int i8 = i7 + 1; int i9 = i8 + 1; int i10 = i9 + 1; i3 = i10 + 1; sb.append(new DecimalFormat("000000000").format((long) ((bArr[i7] << 24) + (bArr[i8] << 18) + (bArr[i9] << 12) + (bArr[i10] << 6) + bArr[i3]))); break; } int i11 = i5 - 1; if (i5 == 0) { i4 = i6; } i3++; i5 = i11; } while (sb.length() > 0 && sb.charAt(sb.length() - 1) == 65532) { sb.setLength(sb.length() - 1); } return sb.toString(); } }
[ "ai@AIs-MacBook-Pro.local" ]
ai@AIs-MacBook-Pro.local
435f490f2c01c66a2e44b60cf2f66c4f881486e1
cc6ebd1214a2a33bbb5de97449bd30b986c38f61
/subsystem/src/test/java/test/org/picketlink/as/subsystem/util/TestModule.java
db8e71f3b35a1cf011a5181a38db46967f5e4d0f
[]
no_license
picketlink/picketlink-tests
aacdf967b85798f0897122094bf878e28e748e79
153ae9ad2771f671b3986976f0afc7d45b353bf0
refs/heads/master
2020-05-28T13:29:16.505241
2015-12-17T04:13:05
2015-12-17T04:13:05
16,284,113
0
1
null
2014-07-24T07:00:12
2014-01-27T16:05:21
Java
UTF-8
Java
false
false
7,774
java
/* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package test.org.picketlink.as.subsystem.util; import org.jboss.jandex.Index; import org.jboss.jandex.IndexWriter; import org.jboss.jandex.Indexer; import org.jboss.shrinkwrap.api.Node; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.ByteArrayAsset; import org.jboss.shrinkwrap.api.exporter.ZipExporter; import org.jboss.shrinkwrap.api.spec.JavaArchive; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; /** * <p>Utility class with some convenience methods to create and remove modules.</p> * * @author Pedro Igor */ public class TestModule { private final String moduleName; private final File moduleXml; private final List<JavaArchive> resources = new ArrayList<JavaArchive>(); /** * <p>Creates a new module with the given name and module definition.</p> * * @param moduleName The name of the module. * @param moduleXml The module definition file.. */ public TestModule(String moduleName, File moduleXml) { if (!moduleXml.exists()) { throw new IllegalArgumentException("The module definition must exists."); } this.moduleName = moduleName; this.moduleXml = moduleXml; } /** * <p>Creates the module directory. If the module already exists, it will deleted first.</p> * * @throws java.io.IOException If any error occurs during the module creation. */ public void create() throws IOException { create(true); } /** * <p>Creates the module directory.</p> * * @param deleteFirst If the module already exists, this argument specifies if it should be deleted before continuing. * * @throws java.io.IOException */ public void create(boolean deleteFirst) throws IOException { File moduleDirectory = getModuleDirectory(); if (moduleDirectory.exists()) { if (!deleteFirst) { throw new IllegalArgumentException(moduleDirectory + " already exists."); } remove(); } File mainDirectory = new File(moduleDirectory, "main"); if (!mainDirectory.mkdirs()) { throw new IllegalArgumentException("Could not create " + mainDirectory); } try { copyFile(new File(mainDirectory, "module.xml"), new FileInputStream(this.moduleXml)); } catch (IOException e) { throw new RuntimeException("Could not create module definition.", e); } for (JavaArchive resourceRoot : this.resources) { FileOutputStream jarFile = null; try { Indexer indexer = new Indexer(); for (Node content : resourceRoot.getContent().values()) { if (content.getPath().get().endsWith(".class")) { indexer.index(content.getAsset().openStream()); } } Index index = indexer.complete(); ByteArrayOutputStream data = new ByteArrayOutputStream(); IndexWriter writer = new IndexWriter(data); writer.write(index); resourceRoot.addAsManifestResource(new ByteArrayAsset(data.toByteArray()), "jandex.idx"); jarFile = new FileOutputStream(new File(mainDirectory, resourceRoot.getName())); resourceRoot.as(ZipExporter.class).exportTo(jarFile); } catch (Exception e) { throw new RuntimeException("Could not create module resource [" + resourceRoot.getName() + ".", e); } finally { if (jarFile != null) { jarFile.flush(); jarFile.close(); } } } } /** * <p>Removes the module from the modules directory. This operation can not be reverted.</p> */ public void remove() { remove(getModuleDirectory()); } /** * <p>Creates a {@link org.jboss.shrinkwrap.api.spec.JavaArchive} instance that will be used to create a jar file inside the * module's directory.</p> * * <p>The name of the archive must match one of the <code>resource-root</code> definitions defined in the module * definition.</p> * * @param fileName The name of the archive. * * @return */ public JavaArchive addResource(String fileName) { JavaArchive resource = ShrinkWrap.create(JavaArchive.class, fileName); this.resources.add(resource); return resource; } private void remove(File file) { if (file.exists()) { if (file.isDirectory()) { for (String name : file.list()) { remove(new File(file, name)); } } if (!file.delete()) { throw new RuntimeException("Could not delete [" + file.getPath() + "."); } } else { throw new IllegalStateException("Module [" + this.moduleName + "] does not exists."); } } private File getModuleDirectory() { return new File(getModulesDirectory(), this.moduleName.replace('.', File.separatorChar)); } private File getModulesDirectory() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.path nor -Djboss.home were set"); } modulePath = jbossHome + File.separatorChar + "modules"; } else { modulePath = modulePath.split(File.pathSeparator)[0]; } File moduleDir = new File(modulePath); if (!moduleDir.exists()) { throw new IllegalStateException("Determined module path does not exist"); } if (!moduleDir.isDirectory()) { throw new IllegalStateException("Determined module path is not a dir"); } return moduleDir; } private static void copyFile(File target, InputStream src) throws IOException { final BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(target)); try { int i = src.read(); while (i != -1) { out.write(i); i = src.read(); } } finally { out.close(); } } public String getName() { return moduleName; } }
[ "pigor.craveiro@gmail.com" ]
pigor.craveiro@gmail.com
182b06a57d6a4141261ecf0afb0de60fbc7fb272
eae1771a055d3d1796f87e7491a405ac5d030d26
/test/com/facebook/buck/rules/coercer/SourceSetTest.java
ba781240148d9fff658f80075c722f40ea44e563
[ "Apache-2.0" ]
permissive
auserj/buck
0015bf14dfdf1125923e295ff8c0bc227916cac4
046feaa1eb9b1dd2c31ce6c364995fb3207e627d
refs/heads/master
2021-09-20T17:20:19.845804
2018-08-12T21:39:25
2018-08-12T22:39:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,261
java
/* * Copyright 2016-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.rules.coercer; import static org.junit.Assert.assertThat; import com.facebook.buck.core.cell.TestCellPathResolver; import com.facebook.buck.core.cell.resolver.CellPathResolver; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.BuildTargetFactory; import com.facebook.buck.core.sourcepath.DefaultBuildTargetSourcePath; import com.facebook.buck.parser.BuildTargetPattern; import com.facebook.buck.parser.BuildTargetPatternParser; import com.facebook.buck.testutil.FakeProjectFilesystem; import com.facebook.buck.versions.FixedTargetNodeTranslator; import com.facebook.buck.versions.TargetNodeTranslator; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import java.util.Optional; import org.hamcrest.Matchers; import org.junit.Test; public class SourceSetTest { private static final CellPathResolver CELL_PATH_RESOLVER = TestCellPathResolver.get(new FakeProjectFilesystem()); private static final BuildTargetPatternParser<BuildTargetPattern> PATTERN = BuildTargetPatternParser.fullyQualified(); @Test public void translatedNamedSourcesTargets() { BuildTarget target = BuildTargetFactory.newInstance("//:rule"); BuildTarget newTarget = BuildTargetFactory.newInstance("//something:else"); TargetNodeTranslator translator = new FixedTargetNodeTranslator( new DefaultTypeCoercerFactory(), ImmutableMap.of(target, newTarget)); assertThat( translator.translate( CELL_PATH_RESOLVER, PATTERN, SourceSet.ofNamedSources( ImmutableMap.of("name", DefaultBuildTargetSourcePath.of(target)))), Matchers.equalTo( Optional.of( SourceSet.ofNamedSources( ImmutableMap.of("name", DefaultBuildTargetSourcePath.of(newTarget)))))); } @Test public void untranslatedNamedSourcesTargets() { BuildTarget target = BuildTargetFactory.newInstance("//:rule"); TargetNodeTranslator translator = new FixedTargetNodeTranslator(new DefaultTypeCoercerFactory(), ImmutableMap.of()); SourceSet list = SourceSet.ofNamedSources(ImmutableMap.of("name", DefaultBuildTargetSourcePath.of(target))); assertThat( translator.translate(CELL_PATH_RESOLVER, PATTERN, list), Matchers.equalTo(Optional.empty())); } @Test public void translatedUnnamedSourcesTargets() { BuildTarget target = BuildTargetFactory.newInstance("//:rule"); BuildTarget newTarget = BuildTargetFactory.newInstance("//something:else"); TargetNodeTranslator translator = new FixedTargetNodeTranslator( new DefaultTypeCoercerFactory(), ImmutableMap.of(target, newTarget)); assertThat( translator.translate( CELL_PATH_RESOLVER, PATTERN, SourceSet.ofUnnamedSources(ImmutableSet.of(DefaultBuildTargetSourcePath.of(target)))), Matchers.equalTo( Optional.of( SourceSet.ofUnnamedSources( ImmutableSet.of(DefaultBuildTargetSourcePath.of(newTarget)))))); } @Test public void untranslatedUnnamedSourcesTargets() { BuildTarget target = BuildTargetFactory.newInstance("//:rule"); TargetNodeTranslator translator = new FixedTargetNodeTranslator(new DefaultTypeCoercerFactory(), ImmutableMap.of()); SourceSet list = SourceSet.ofUnnamedSources(ImmutableSet.of(DefaultBuildTargetSourcePath.of(target))); assertThat( translator.translate(CELL_PATH_RESOLVER, PATTERN, list), Matchers.equalTo(Optional.empty())); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
2a850a1799e7f3be8452ba9886e97a8dfc6be9dd
98d14a8d01c22b473c14ed61323c6a30c1081088
/src/main/java/com/mashibing/juc/c_028_interview/A1B2C3/T04_00_lock_condition.java
d11e758f78089741c86d8d53e54f62c7a1c3626f
[]
no_license
lintianneng/JUC
4d489686df95679ee88b34c2d4dfc1ffea20bc25
1bc8ae127947c402ce032aaee4fd9f24e54fb112
refs/heads/master
2020-08-08T23:09:25.807066
2019-09-29T03:24:03
2019-09-29T03:24:03
213,942,502
1
0
null
null
null
null
UTF-8
Java
false
false
1,372
java
package com.mashibing.juc.c_028_interview.A1B2C3; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class T04_00_lock_condition { public static void main(String[] args) { char[] aI = "1234567".toCharArray(); char[] aC = "ABCDEFG".toCharArray(); Lock lock = new ReentrantLock(); Condition condition = lock.newCondition(); new Thread(()->{ try { lock.lock(); for(char c : aI) { System.out.print(c); condition.signal(); condition.await(); } condition.signal(); } catch (Exception e) { e.printStackTrace(); } finally { lock.unlock(); } }, "t1").start(); new Thread(()->{ try { lock.lock(); for(char c : aC) { System.out.print(c); condition.signal(); condition.await(); } condition.signal(); } catch (Exception e) { e.printStackTrace(); } finally { lock.unlock(); } }, "t2").start(); } }
[ "alanpppbox@gmail.com" ]
alanpppbox@gmail.com
256a5cb09fd0b5f549c46ff113da40852922e870
bfbfdb87807191e08f40a3853b000cd5d8da47d8
/common/service/facade/src/main/java/com/xianglin/appserv/common/service/facade/model/Response.java
bf15a37caa21f9bb3acef0af2c5c5295db9a9766
[]
no_license
1amfine2333/appserv
df73926f5e70b8c265cc32277d8bf76af06444cc
ca33ff0f9bc3b5daf0ee32f405a2272cc4673ffa
refs/heads/master
2021-10-10T09:59:03.114589
2019-01-09T05:39:20
2019-01-09T05:40:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,324
java
/** * */ package com.xianglin.appserv.common.service.facade.model; import com.google.common.base.Optional; import com.xianglin.appserv.common.service.facade.model.enums.FacadeEnums; import com.xianglin.appserv.common.service.facade.model.enums.ResponseEnum; import org.apache.commons.lang3.StringUtils; import static com.xianglin.appserv.common.service.facade.model.enums.FacadeEnums.RETURN_EMPTY; /** * ้€š็”จๆœๅŠกๅ“ๅบ”็ป“ๆžœ * * @author pengpeng 2016ๅนด2ๆœˆ18ๆ—ฅไธ‹ๅˆ4:04:56 */ public class Response<T> extends com.xianglin.gateway.common.service.facade.model.Response<T> { public Response() { super(null); } public Response(T t) { super(t); } /** * ๆฃ€ๆŸฅๅ“ๅบ”๏ผŒ้™ๆ€ๅฏผๅ…ฅๅŽๅฏ็”จไบŽๆฃ€ๆŸฅๅ“ๅบ”็ป“ๆžœๅนถ่ฟ”ๅ›žๅ“ๅบ”็ป“ๆžœ * * @param response * @param <T> * @return * @throws IllegalArgumentException ๅ“ๅบ”ๅคฑ่ดฅ */ public static <T> Optional<T> checkResponse(Response<T> response) { if (response == null) { return Optional.absent(); } if (!response.isSuccess()) { throw new IllegalArgumentException(response.getTips()); } T result = response.getResult(); return Optional.fromNullable(result); } /** * ๆˆๅŠŸๅ“ๅบ” * * @param data * @return */ public static <T> Response<T> ofSuccess(T data) { Response<T> response = new Response<>(data); response.setCode(1000); return response; } /** * ๅคฑ่ดฅๅ“ๅบ”็š„ๅทฅๅŽ‚ๆ–นๆณ•(ๅธฆๆ็คบ) * * @param message * @return */ public static <T> Response<T> ofFail(String message) { Response response = new Response<>(RETURN_EMPTY); if (!StringUtils.isBlank(message)) { response.setTips(message); } return response; } /** * ๅคฑ่ดฅๅ“ๅบ”็š„ๅทฅๅŽ‚ๆ–นๆณ• * * @return */ public static <T> Response<T> ofFail() { return ofFail(null); } public void setFacade(FacadeEnums facadeEnums) { setResonpse(facadeEnums.code, facadeEnums.msg, facadeEnums.tip); } @Deprecated public void setResonpse(ResponseEnum response) { setResonpse(response.getCode(), response.getMemo(), response.getTips()); } }
[ "wangleitom@126.com" ]
wangleitom@126.com
638d066ca2886fd93b4fa15fbd30ee04a247b034
3659875802aec87a3ab191c09388d59b63869380
/javademo/src/java0705_basic_operator/prob/Prob0705_02.java
51a1cfd83423a49d2d4a7c497051fc11780c8fb0
[]
no_license
hongdaepyo/h1o1n1g1
fab31dbd459dab78cb380acdec6563eb02cb2534
87896497a321440dff589e163cfa5a0644fad559
refs/heads/master
2021-06-06T17:38:46.362177
2016-12-20T10:47:39
2016-12-20T10:47:39
64,099,068
0
0
null
2021-05-07T06:13:59
2016-07-25T02:55:09
Java
UTF-8
Java
false
false
549
java
package java0705_basic_operator.prob; /* * data๋ณ€์ˆ˜์˜ ๊ฐ’์ด ๋Œ€๋ฌธ์ž ์ด๋ฉด 'A', ์†Œ๋ฌธ์ž์ด๋ฉด 'a'์„ * ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ๊ตฌํ˜„ํ•˜์‹œ์˜ค. * [์‹คํ–‰๊ฒฐ๊ณผ] * a */ /* char result = data >= 'A'&&data<='Z'?'A':'a'; System.out.println(result); */ public class Prob0705_02 { public static void main(String[] args) { char data = 'A'; // A ~ Z a~z // ์—ฌ๊ธฐ์— ์ž‘์„ฑํ•˜์‹œ์˜ค int asc = data; asc = data < 97 ? 65 : 97; char alpaUpper = (char) (asc); System.out.println(alpaUpper); } }
[ "h1o1n1g1@nate.com" ]
h1o1n1g1@nate.com
75a1871f020b9ca0b135f41d979d5cc096e2f2c7
a602903c73834edbd6b1161dd202d1e36428a7ca
/Java/restassured.sandata.interop/src/test/java/AltEVV_generic/restassured/sandata/Indiana/Visit/SEVV277_TC100795_AltEVV_Visit_Modifier1field_validation_positive.java
9c40aaaef13f143406eae8fc651ad65aa38ee2c8
[]
no_license
PharahPhat/Selenium
e5e0ce5ca91708f63005fe205b061f23f1cd2c8e
572fcf773c9e70b7ac168752d11c11b24837cab9
refs/heads/master
2022-12-08T12:59:52.010706
2020-04-01T04:49:04
2020-04-01T04:49:04
143,975,962
0
0
null
2022-12-06T00:44:30
2018-08-08T07:20:16
Java
UTF-8
Java
false
false
3,189
java
package AltEVV_generic.restassured.sandata.Indiana.Visit; import java.io.IOException; import java.sql.SQLException; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.ParseException; import org.testng.annotations.Test; import com.globalMethods.core.Assertion_DbVerifier; import com.globalMethods.core.CommonMethods; import com.globalMethods.core.GenerateUniqueParam; import com.globalMethods.core.globalVariables; import com.relevantcodes.extentreports.LogStatus; import Utills_ExtentReport_Log4j.BaseTest; public class SEVV277_TC100795_AltEVV_Visit_Modifier1field_validation_positive extends BaseTest{ GenerateUniqueParam GenerateUniqueParam=new GenerateUniqueParam(); Assertion_DbVerifier Assertion_DbVerifier= new Assertion_DbVerifier(); @Test(groups = {"All", "Regression"}) public void TC100795_AltEVV_Visit_Modifier1field_validation_positive() throws InterruptedException, java.text.ParseException, IOException, ParseException, SQLException, ClassNotFoundException, java.text.ParseException { // logger = extent.startTest("TC100795_AltEVV_Visit_Modifier1field_validation_positive"); logger.log(LogStatus.INFO, "TC100795_AltEVV_Visit_Modifier1field_validation_positive"); JSONArray jsonArrayVisit=GenerateUniqueParam.VisitParams_AltEVV(); JSONObject jsonObjectVisit = (JSONObject) jsonArrayVisit.get(0); jsonObjectVisit.put(globalVariables.Modifier1, CommonMethods.generateRandomStringOfFixLength(2)); CommonMethods.validateResponse(jsonArrayVisit, CommonMethods.propertyfileReader(globalVariables.altevv_visit)); } @Test(groups = {"All", "Regression"}) public void TC100795_AltEVV_Visit_Modifier1field_alphanumeric() throws InterruptedException, java.text.ParseException, IOException, ParseException, SQLException, ClassNotFoundException, java.text.ParseException { // logger = extent.startTest("TC100795_AltEVV_Visit_Modifier1field_alphanumeric"); logger.log(LogStatus.INFO, "TC100795_AltEVV_Visit_Modifier1field_alphanumeric"); JSONArray jsonArrayVisit=GenerateUniqueParam.VisitParams_AltEVV(); JSONObject jsonObjectVisit = (JSONObject) jsonArrayVisit.get(0); jsonObjectVisit.put(globalVariables.Modifier1, CommonMethods.generateRandomAlphaNumeric(2)); CommonMethods.validateResponse(jsonArrayVisit, CommonMethods.propertyfileReader(globalVariables.altevv_visit)); } @Test(groups = {"All", "Regression"}) public void TC100795_AltEVV_Visit_Modifier1field_singlechar() throws InterruptedException, java.text.ParseException, IOException, ParseException, SQLException, ClassNotFoundException, java.text.ParseException { // logger = extent.startTest("TC100795_AltEVV_Visit_Modifier1field_singlechar"); logger.log(LogStatus.INFO, "TC100795_AltEVV_Visit_Modifier1field_singlechar"); JSONArray jsonArrayVisit=GenerateUniqueParam.VisitParams_AltEVV(); JSONObject jsonObjectVisit = (JSONObject) jsonArrayVisit.get(0); jsonObjectVisit.put(globalVariables.Modifier1, CommonMethods.generateRandomStringOfFixLength(1)); CommonMethods.validateResponse(jsonArrayVisit, CommonMethods.propertyfileReader(globalVariables.altevv_visit)); } }
[ "phattnguyen@kms-technology.com" ]
phattnguyen@kms-technology.com
076891fab3aa1c98dacac56a37bd7ead2b601353
f84cdfcbf69944a0c553a7c75bc886cb048961a2
/base/src/com/google/idea/blaze/base/projectview/section/sections/DirectoryEntry.java
0744eea10ddd94880c2821a8f76628087d490df9
[ "Apache-2.0" ]
permissive
ahirreddy/intellij
737940df855c3c72f10f365c187cc076d1b7e96b
369ec0911356207231bffee0995095159ae8c93d
refs/heads/master
2021-01-19T21:19:48.543782
2018-08-17T22:10:54
2018-08-17T22:10:54
82,481,985
0
1
Apache-2.0
2019-03-22T21:17:33
2017-02-19T18:59:05
Java
UTF-8
Java
false
false
2,072
java
/* * Copyright 2016 The Bazel Authors. 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.google.idea.blaze.base.projectview.section.sections; import com.google.common.base.Objects; import com.google.idea.blaze.base.model.primitives.WorkspacePath; import java.io.Serializable; /** An entry in the directory section. */ public class DirectoryEntry implements Serializable { private static final long serialVersionUID = 1L; public final WorkspacePath directory; public final boolean included; public DirectoryEntry(WorkspacePath directory, boolean included) { this.directory = directory; this.included = included; } public static DirectoryEntry include(WorkspacePath directory) { return new DirectoryEntry(directory, true); } public static DirectoryEntry exclude(WorkspacePath directory) { return new DirectoryEntry(directory, false); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DirectoryEntry that = (DirectoryEntry) o; return Objects.equal(included, that.included) && Objects.equal(directory, that.directory); } @Override public int hashCode() { return Objects.hashCode(directory, included); } @Override public String toString() { return (included ? "" : "-") + directoryString(); } private String directoryString() { if (directory.isWorkspaceRoot()) { return "."; } return directory.relativePath(); } }
[ "brendandouglas@google.com" ]
brendandouglas@google.com
278ee40e7ac3ec37e9f7ddad6e5118a8aa8e79dc
013056e44ecf131f5ff76f5280e05c95d443303a
/IDE Files/Phase2/src/main/controllers/SHPController/encog/app/analyst/csv/basic/BasicCachedFile.java
8ab6c268ac5f29313ca6de2e07b02829026e6405
[]
no_license
neguskay/CS5099-Dissertation
f1921b15d370e056a7d6d8e6aee26ef8224ed390
561d48318c720e3963775953bd67c75cb9ccd002
refs/heads/master
2020-04-10T09:46:32.247792
2018-12-08T15:20:47
2018-12-08T15:20:47
160,946,902
0
0
null
null
null
null
UTF-8
Java
false
false
5,301
java
/* * Encog(tm) Core v3.4 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2016 Heaton Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.app.analyst.csv.basic; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.encog.app.quant.QuantError; import org.encog.util.csv.CSVFormat; import org.encog.util.csv.ReadCSV; import org.encog.util.logging.EncogLogging; /** * Forms the foundation of all of the cached files in Encog Quant. */ public class BasicCachedFile extends BasicFile { /** * The column mapping. */ private final Map<String, BaseCachedColumn> columnMapping = new HashMap<String, BaseCachedColumn>(); /** * The columns. */ private final List<BaseCachedColumn> columns = new ArrayList<BaseCachedColumn>(); /** * Add a new column. * * @param column * The column to add. */ public void addColumn(final BaseCachedColumn column) { this.columns.add(column); this.columnMapping.put(column.getName(), column); } /** * Analyze the input file. * * @param input * The input file. * @param headers * True, if there are headers. * @param format * The format of the CSV data. */ public void analyze(final File input, final boolean headers, final CSVFormat format) { resetStatus(); setInputFilename(input); setExpectInputHeaders(headers); setInputFormat(format); this.columnMapping.clear(); this.columns.clear(); // first count the rows BufferedReader reader = null; try { int recordCount = 0; reader = new BufferedReader(new FileReader(getInputFilename())); while (reader.readLine() != null) { updateStatus(true); recordCount++; } if (headers) { recordCount--; } setRecordCount(recordCount); } catch (final IOException ex) { throw new QuantError(ex); } finally { reportDone(true); if (reader != null) { try { reader.close(); } catch (final IOException e) { throw new QuantError(e); } } setInputFilename(input); setExpectInputHeaders(headers); setInputFormat(format); } // now analyze columns ReadCSV csv = null; try { csv = new ReadCSV(input.toString(), headers, format); if (!csv.next()) { throw new QuantError("File is empty"); } for (int i = 0; i < csv.getColumnCount(); i++) { String name; if (headers) { name = attemptResolveName(csv.getColumnNames().get(i)); } else { name = "Column-" + (i + 1); } // determine if it should be an input/output field final String str = csv.get(i); boolean io = false; try { Double.parseDouble(str); io = true; } catch (final NumberFormatException ex) { EncogLogging.log(ex); } addColumn(new FileData(name, i, io, io)); } } finally { csv.close(); setAnalyzed(true); } } /** * Attempt to resolve a column name. * * @param name * The unknown column name. * @return The known column name. */ private String attemptResolveName(final String name) { String name2 = name.toLowerCase(); if (name2.indexOf("open") != -1) { return FileData.OPEN; } else if (name2.indexOf("close") != -1) { return FileData.CLOSE; } else if (name2.indexOf("low") != -1) { return FileData.LOW; } else if (name2.indexOf("hi") != -1) { return FileData.HIGH; } else if (name2.indexOf("vol") != -1) { return FileData.VOLUME; } else if ((name2.indexOf("date") != -1) || (name.indexOf("yyyy") != -1)) { return FileData.DATE; } else if (name2.indexOf("time") != -1) { return FileData.TIME; } return name; } /** * Get the data for a specific column. * * @param name * The column to read. * @param csv * The CSV file to read from. * @return The column data. */ public String getColumnData(final String name, final ReadCSV csv) { if (!this.columnMapping.containsKey(name)) { return null; } final BaseCachedColumn column = this.columnMapping.get(name); if (!(column instanceof FileData)) { return null; } final FileData fd = (FileData) column; return csv.get(fd.getIndex()); } /** * @return The column mappings. */ public Map<String, BaseCachedColumn> getColumnMapping() { return this.columnMapping; } /** * @return The columns. */ public List<BaseCachedColumn> getColumns() { return this.columns; } }
[ "neguskay93@gmail.com" ]
neguskay93@gmail.com
437ca551d3de102f9f39e2b601ae73880c5001d8
a8d19866f2fc047c5efc6f6a1eadc633838f2dcb
/fbcore/src/main/java/com/facebook/common/internal/Closeables.java
3f82ef3f6a27cdb31d6293f494ef44db75ca4a28
[ "BSD-3-Clause" ]
permissive
gavanx/l-fres
e3464f961cab7492f9fb455166376f217b73cdcb
b2de0f052f6074069bded3080bcce0b2a68bf11e
refs/heads/master
2021-01-17T17:19:35.253905
2016-06-17T07:22:17
2016-06-17T07:22:17
61,353,580
0
0
null
null
null
null
UTF-8
Java
false
false
4,882
java
/* * Copyright (C) 2007 The Guava 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 com.facebook.common.internal; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; /** * Utility methods for working with {@link Closeable} objects. * * @author Michael Lancaster * @since 1.0 */ public final class Closeables { @VisibleForTesting static final Logger logger = Logger.getLogger(Closeables.class.getName()); private Closeables() { } /** * Closes a {@link Closeable}, with control over whether an {@code IOException} may be thrown. * This is primarily useful in a finally block, where a thrown exception needs to be logged but * not propagated (otherwise the original exception will be lost). * * <p>If {@code swallowIOException} is true then we never throw {@code IOException} but merely log * it. * * <p>Example: <pre> {@code * * public void useStreamNicely() throws IOException { * SomeStream stream = new SomeStream("foo"); * boolean threw = true; * try { * // ... code which does something with the stream ... * threw = false; * } finally { * // If an exception occurs, rethrow it only if threw==false: * Closeables.close(stream, threw); * } * }}</pre> * * @param closeable the {@code Closeable} object to be closed, or null, in which case this method * does nothing * @param swallowIOException if true, don't propagate IO exceptions thrown by the {@code close} * methods * @throws IOException if {@code swallowIOException} is false and {@code close} throws an * {@code IOException}. */ public static void close(@Nullable Closeable closeable, boolean swallowIOException) throws IOException { if (closeable == null) { return; } try { closeable.close(); } catch (IOException e) { if (swallowIOException) { logger.log(Level.WARNING, "IOException thrown while closing Closeable.", e); } else { throw e; } } } /** * Closes the given {@link InputStream}, logging any {@code IOException} that's thrown rather * than propagating it. * * <p>While it's not safe in the general case to ignore exceptions that are thrown when closing * an I/O resource, it should generally be safe in the case of a resource that's being used only * for reading, such as an {@code InputStream}. Unlike with writable resources, there's no * chance that a failure that occurs when closing the stream indicates a meaningful problem such * as a failure to flush all bytes to the underlying resource. * * @param inputStream the input stream to be closed, or {@code null} in which case this method * does nothing * @since 17.0 */ public static void closeQuietly(@Nullable InputStream inputStream) { try { close(inputStream, true); } catch (IOException impossible) { throw new AssertionError(impossible); } } /** * Closes the given {@link Reader}, logging any {@code IOException} that's thrown rather than * propagating it. * * <p>While it's not safe in the general case to ignore exceptions that are thrown when closing * an I/O resource, it should generally be safe in the case of a resource that's being used only * for reading, such as a {@code Reader}. Unlike with writable resources, there's no chance that * a failure that occurs when closing the reader indicates a meaningful problem such as a failure * to flush all bytes to the underlying resource. * * @param reader the reader to be closed, or {@code null} in which case this method does nothing * @since 17.0 */ public static void closeQuietly(@Nullable Reader reader) { try { close(reader, true); } catch (IOException impossible) { throw new AssertionError(impossible); } } }
[ "gavan@leoedu.cn" ]
gavan@leoedu.cn
95d47d0102c52c39eeddd08f589e0a0700a7fedb
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
/2018-work/jiuy-biz/jiuy-biz-core/src/main/java/com/qianmi/open/api/response/ItemDetailUpdateResponse.java
8644e427b79cc5712d9f7c5b0a16fb238c83e650
[]
no_license
github4n/other_workplace
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
7c07e0d078518bb70399e50b35e9f9ca859ba2df
refs/heads/master
2020-05-31T10:12:37.160922
2019-05-25T15:48:54
2019-05-25T15:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
package com.qianmi.open.api.response; import com.qianmi.open.api.tool.mapping.ApiField; import com.qianmi.open.api.domain.cloudshop.Item; import com.qianmi.open.api.QianmiResponse; /** * API: qianmi.cloudshop.item.detail.update response. * * @author auto * @since 2.0 */ public class ItemDetailUpdateResponse extends QianmiResponse { private static final long serialVersionUID = 1L; /** * ่ฟ”ๅ›žๆ˜ฏๅฆๆˆๅŠŸis_success */ @ApiField("item") private Item item; public void setItem(Item item) { this.item = item; } public Item getItem( ) { return this.item; } }
[ "nessary@foxmail.com" ]
nessary@foxmail.com
164fa3f2092117ba4a98e801f4745fd881f19b2f
02d263f0e15f5448924b966568f986498234a9bd
/core/jreleaser-model/src/main/java/org/jreleaser/model/Twitter.java
56bfdf910ac2dd2d239e45f9b1168ae084fcf752
[ "Apache-2.0" ]
permissive
DennisRippinger/jreleaser
3dd0692d88d60b3d9cc5165c80737d19700aab9c
65b0e520d3bcc6c129e725ae42d65a1bfa6b55aa
refs/heads/main
2023-05-04T02:38:30.269492
2021-05-21T20:31:43
2021-05-21T20:31:43
370,090,801
0
0
Apache-2.0
2021-05-23T15:37:14
2021-05-23T15:37:14
null
UTF-8
Java
false
false
4,083
java
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2020-2021 Andres Almiray. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jreleaser.model; import org.jreleaser.util.Env; import java.util.Map; import static org.jreleaser.util.Constants.HIDE; import static org.jreleaser.util.Constants.UNSET; import static org.jreleaser.util.MustacheUtils.applyTemplate; import static org.jreleaser.util.StringUtils.isNotBlank; /** * @author Andres Almiray * @since 0.1.0 */ public class Twitter extends AbstractAnnouncer { public static final String NAME = "twitter"; public static final String TWITTER_CONSUMER_KEY = "TWITTER_CONSUMER_KEY"; public static final String TWITTER_CONSUMER_SECRET = "TWITTER_CONSUMER_SECRET"; public static final String TWITTER_ACCESS_TOKEN = "TWITTER_ACCESS_TOKEN"; public static final String TWITTER_ACCESS_TOKEN_SECRET = "TWITTER_ACCESS_TOKEN_SECRET"; private String consumerKey; private String consumerSecret; private String accessToken; private String accessTokenSecret; private String status; public Twitter() { super(NAME); } void setAll(Twitter twitter) { super.setAll(twitter); this.consumerKey = twitter.consumerKey; this.consumerSecret = twitter.consumerSecret; this.accessToken = twitter.accessToken; this.accessTokenSecret = twitter.accessTokenSecret; this.status = twitter.status; } public String getResolvedStatus(JReleaserContext context) { Map<String, Object> props = context.props(); context.getModel().getRelease().getGitService().fillProps(props, context.getModel()); return applyTemplate(status, props); } public String getResolvedConsumerKey() { return Env.resolve(TWITTER_CONSUMER_KEY, consumerKey); } public String getResolvedConsumerSecret() { return Env.resolve(TWITTER_CONSUMER_SECRET, consumerSecret); } public String getResolvedAccessToken() { return Env.resolve(TWITTER_ACCESS_TOKEN, accessToken); } public String getResolvedAccessTokenSecret() { return Env.resolve(TWITTER_ACCESS_TOKEN_SECRET, accessTokenSecret); } public String getConsumerKey() { return consumerKey; } public void setConsumerKey(String consumerKey) { this.consumerKey = consumerKey; } public String getConsumerSecret() { return consumerSecret; } public void setConsumerSecret(String consumerSecret) { this.consumerSecret = consumerSecret; } public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } public String getAccessTokenSecret() { return accessTokenSecret; } public void setAccessTokenSecret(String accessTokenSecret) { this.accessTokenSecret = accessTokenSecret; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override protected void asMap(Map<String, Object> props) { props.put("consumerKey", isNotBlank(getResolvedConsumerKey()) ? HIDE : UNSET); props.put("consumerSecret", isNotBlank(getResolvedConsumerSecret()) ? HIDE : UNSET); props.put("accessToken", isNotBlank(getResolvedAccessToken()) ? HIDE : UNSET); props.put("accessTokenSecret", isNotBlank(getResolvedAccessTokenSecret()) ? HIDE : UNSET); props.put("status", status); } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
924814930ffa39079c5251d64df62fe8f2721f94
8b1138629e7d22a9b6d33e43ae93cd1dd765b6e0
/rpc/src/test/java/cc/lovezhy/raft/rpc/kryo/KryoTest.java
6ff52d228f2a3ad3378dc894fe8289ba1fcfe374
[ "Apache-2.0" ]
permissive
zhyzhyzhy/Rub-Raft
4271fa8f972b28456cd943e1fb05efdd8217140d
cea1fb65a67e99c6bb5b59c0ce2f30159a5deeae
refs/heads/master
2022-07-07T07:29:05.343491
2020-01-31T07:56:07
2020-01-31T07:56:50
156,950,281
7
1
Apache-2.0
2022-06-17T02:03:50
2018-11-10T05:21:21
Java
UTF-8
Java
false
false
1,558
java
package cc.lovezhy.raft.rpc.kryo; import cc.lovezhy.raft.rpc.kryo.model.School; import cc.lovezhy.raft.rpc.kryo.model.Student; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; import com.google.common.collect.Lists; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.ByteArrayOutputStream; import java.util.List; public class KryoTest { private static final Logger log = LoggerFactory.getLogger(KryoTest.class); private Student student; @Before public void setUp() { student = new Student(); student.setName("zhuyichen"); student.setAge(18); List<School> schoolList = Lists.newArrayList(); schoolList.add(new School("ๆฑŸ้ƒฝไธญๅญฆ")); schoolList.add(new School("ๅ—ไบฌ้‚ฎ็”ตๅคงๅญฆ")); student.setSchoolList(schoolList); log.info("origin student={}", student); } @Test public void serializeTest() { Kryo kryo = new Kryo(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); Output output = new Output(byteArrayOutputStream); kryo.writeObject(output, student); output.close(); Input input = new Input(byteArrayOutputStream.toByteArray()); Student student = kryo.readObject(input, Student.class); log.info("serialized student={}", student); Assert.assertEquals(this.student, student); } }
[ "1012146386@qq.com" ]
1012146386@qq.com
28c7aae364e821a6e3f03e12d11a79746d35a4a6
4a65774fef1062b5b89c244b18a9474f7b7661b5
/RitmeRecipe/src/be/apb/gfddpp/productfilter/RangesType.java
7501ed2931cee362c612c9ac931f6eea812ab8e0
[]
no_license
imec-int/ritme
30c3c8eb7488a66f83a69527ee501b4b7889e568
a004895d3b33d73156eaf113b7aeb85aa5bcf9d0
refs/heads/master
2022-01-15T04:58:12.436553
2019-07-29T14:12:05
2019-07-29T14:12:05
80,729,112
0
1
null
2019-07-29T14:12:06
2017-02-02T13:49:28
Java
UTF-8
Java
false
false
2,225
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: 2013.08.08 at 04:15:31 PM CEST // package be.apb.gfddpp.productfilter; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for rangesType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="rangesType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="range" type="{}range" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "rangesType", propOrder = { "range" }) @XmlSeeAlso({ MedicinesRanges.class, PreparationsRanges.class }) public class RangesType { @XmlElement(required = true) protected List<Range> range; /** * Gets the value of the range property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the range property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRange().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Range } * * */ public List<Range> getRange() { if (range == null) { range = new ArrayList<Range>(); } return this.range; } }
[ "ritm-e@uzleuven.be" ]
ritm-e@uzleuven.be
026c7c447301d4c14207d1db7cf0a09e53f49f58
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-481-15-28-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/com/xpn/xwiki/api/Document_ESTest_scaffolding.java
78c5db8567c24ac4db5fd22a5c0cf2378cb9c8c4
[]
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
430
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Apr 06 14:58:48 UTC 2020 */ package com.xpn.xwiki.api; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Document_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
7fc444ff7e3692913c0e08133d51b03de6f4a19a
5fd3d2d20539d4e160f8ac293e0d4f1566a98a2c
/hz-fine-master/src/main/java/com/hz/fine/master/core/service/impl/DidServiceImpl.java
edecf6a0b22cecc8a3611203d58f1af5887d5235
[]
no_license
hzhuazhi/hz-fine
eeac8ba3b7eecebf1934abab5a4610d3f7e0cd6f
addc43d2fe849e01ebd5b78300aae6fdf2171719
refs/heads/master
2022-12-14T12:24:59.982673
2020-09-05T11:02:02
2020-09-05T11:02:02
262,562,132
1
0
null
null
null
null
UTF-8
Java
false
false
2,278
java
package com.hz.fine.master.core.service.impl; import com.hz.fine.master.core.common.dao.BaseDao; import com.hz.fine.master.core.common.service.impl.BaseServiceImpl; import com.hz.fine.master.core.mapper.DidMapper; import com.hz.fine.master.core.model.did.DidModel; import com.hz.fine.master.core.service.DidService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @Description ็”จๆˆทServiceๅฑ‚็š„ๅฎž็Žฐๅฑ‚ * @Author yoko * @Date 2020/5/13 18:34 * @Version 1.0 */ @Service public class DidServiceImpl<T> extends BaseServiceImpl<T> implements DidService<T> { /** * 5ๅˆ†้’Ÿ. */ public long FIVE_MIN = 300; public long TWO_HOUR = 2; @Autowired private DidMapper didMapper; public BaseDao<T> getDao() { return didMapper; } @Override public List<DidModel> getEffectiveDidList(DidModel model) { return didMapper.getEffectiveDidList(model); } @Override public int updateDidMoneyByOrder(DidModel model) { return didMapper.updateDidMoneyByOrder(model); } @Override public List<DidModel> getEffectiveDidByZfbList(DidModel model) { return didMapper.getEffectiveDidByZfbList(model); } @Override public int updateDidBalance(DidModel model) { return didMapper.updateDidBalance(model); } @Override public List<DidModel> getEffectiveDidByWxGroupList(DidModel model) { return didMapper.getEffectiveDidByWxGroupList(model); } @Override public int updateDidGroupNumOrSwitchType(DidModel model) { return didMapper.updateDidGroupNumOrSwitchType(model); } @Override public List<DidModel> getNewEffectiveDidByWxGroupList(DidModel model) { return didMapper.getNewEffectiveDidByWxGroupList(model); } @Override public List<DidModel> getDidByWxGroupList(DidModel model) { return didMapper.getDidByWxGroupList(model); } @Override public int updateDidOperateGroupNum(DidModel model) { return didMapper.updateDidOperateGroupNum(model); } @Override public List<DidModel> getDidByPoolList(DidModel model) { return didMapper.getDidByPoolList(model); } }
[ "duanfeng_1712@qq.com" ]
duanfeng_1712@qq.com
ee31a4eddd5cda397e4a9e82813f96bd209ce083
30fb57d45aa33af600898998f30924185ea21872
/src/main/java/it/unimi/dsi/fastutil/floats/FloatBigList.java
1b1993eb5bf21128a9ea320fbae165e204cf6534
[ "Apache-2.0" ]
permissive
mrfsong363/fastutil
7fb632c577360a44d9787feaf2bcfc6617287770
4609803e953926e0670e59335a75624f74388e2a
refs/heads/master
2021-09-24T08:14:41.094887
2018-10-05T14:34:55
2018-10-05T14:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,624
java
/* * Copyright (C) 2010-2017 Sebastiano Vigna * * 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 it.unimi.dsi.fastutil.floats; import it.unimi.dsi.fastutil.BigList; import it.unimi.dsi.fastutil.Size64; import java.util.List; /** A type-specific {@link BigList}; provides some additional methods that use polymorphism to avoid (un)boxing. * * <p>Additionally, this interface strengthens {@link #iterator()}, {@link #listIterator()}, * {@link #listIterator(long)} and {@link #subList(long,long)}. * * <p>Besides polymorphic methods, this interfaces specifies methods to copy into an array or remove contiguous * sublists. Although the abstract implementation of this interface provides simple, one-by-one implementations * of these methods, it is expected that concrete implementation override them with optimized versions. * * @see List */ public interface FloatBigList extends BigList<Float>, FloatCollection , Size64, Comparable<BigList<? extends Float>> { /** Returns a type-specific iterator on the elements of this list. * * <p>Note that this specification strengthens the one given in {@link java.util.Collection#iterator()}. * @see java.util.Collection#iterator() */ @Override FloatBigListIterator iterator(); /** Returns a type-specific big-list iterator on this type-specific big list. * * <p>Note that this specification strengthens the one given in {@link BigList#listIterator()}. * @see BigList#listIterator() */ @Override FloatBigListIterator listIterator(); /** Returns a type-specific list iterator on this type-specific big list starting at a given index. * * <p>Note that this specification strengthens the one given in {@link BigList#listIterator(long)}. * @see BigList#listIterator(long) */ @Override FloatBigListIterator listIterator(long index); /** Returns a type-specific view of the portion of this type-specific big list from the index {@code from}, inclusive, to the index {@code to}, exclusive. * * <p>Note that this specification strengthens the one given in {@link BigList#subList(long,long)}. * * @see BigList#subList(long,long) */ @Override FloatBigList subList(long from, long to); /** Copies (hopefully quickly) elements of this type-specific big list into the given big array. * * @param from the start index (inclusive). * @param a the destination big array. * @param offset the offset into the destination big array where to store the first element copied. * @param length the number of elements to be copied. */ void getElements(long from, float a[][], long offset, long length); /** Removes (hopefully quickly) elements of this type-specific big list. * * @param from the start index (inclusive). * @param to the end index (exclusive). */ void removeElements(long from, long to); /** Add (hopefully quickly) elements to this type-specific big list. * * @param index the index at which to add elements. * @param a the big array containing the elements. */ void addElements(long index, float a[][]); /** Add (hopefully quickly) elements to this type-specific big list. * * @param index the index at which to add elements. * @param a the big array containing the elements. * @param offset the offset of the first element to add. * @param length the number of elements to add. */ void addElements(long index, float a[][], long offset, long length); /** Inserts the specified element at the specified position in this type-specific big list (optional operation). * @see BigList#add(long,Object) */ void add(long index, float key); /** Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation). * @see List#addAll(int,java.util.Collection) */ boolean addAll(long index, FloatCollection c); /** Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation). * @see List#addAll(int,java.util.Collection) */ boolean addAll(long index, FloatBigList c); /** Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation). * @see List#addAll(int,java.util.Collection) */ boolean addAll(FloatBigList c); /** Returns the element at the specified position. * @see BigList#get(long) */ float getFloat(long index); /** Removes the element at the specified position. * @see BigList#remove(long) */ float removeFloat(long index); /** Replaces the element at the specified position in this big list with the specified element (optional operation). * @see BigList#set(long,Object) */ float set(long index, float k); /** Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element. * @see BigList#indexOf(Object) */ long indexOf(float k); /** Returns the index of the last occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element. * @see BigList#lastIndexOf(Object) */ long lastIndexOf(float k); /** {@inheritDoc} * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override void add(long index, Float key); /** {@inheritDoc} * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override Float get(long index); /** {@inheritDoc} * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override long indexOf(Object o); /** {@inheritDoc} * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override long lastIndexOf(Object o); /** {@inheritDoc} * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override Float remove(long index); /** {@inheritDoc} * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override Float set(long index, Float k); }
[ "lysongfei@gmail.com" ]
lysongfei@gmail.com
77424159df6e75b0687dcf7b36d89625754df2d8
1fc89c80068348031fdd012453d081bac68c85b0
/CalculadoraDeHorasDeProjetos/src/main/java/br/com/rsi/business/rules/DataPatterns.java
dd7f572a25015c8e763976a68584e519c1d77acf
[]
no_license
Jose-R-Vieira/WorkspaceEstudosJava
e81858e295972928d3463f23390d5d5ee67966c9
7ba374eef760ba2c3ee3e8a69657a96f9adec5c1
refs/heads/master
2020-03-26T16:47:26.846023
2018-08-17T14:06:57
2018-08-17T14:06:57
145,123,028
0
0
null
null
null
null
UTF-8
Java
false
false
1,687
java
package br.com.rsi.business.rules; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; public class DataPatterns { String symbols = ":\\/,\\."; Pattern numberComponents = Pattern.compile("^[0-9]*$"); Pattern numberScreens = Pattern.compile("^[0-9]*$"); Pattern timeMapping1 = Pattern.compile("^[0-9]*$"); Pattern timeMapping2 = Pattern.compile("^[0-6]*$"); Pattern symbolExpression = Pattern.compile("^\\d*([" + symbols + "]?)\\d*$"); List<String> temporaryData = new ArrayList<String>(); List<Pattern> patterns = new ArrayList<Pattern>(); Matcher validate; int[] returnRules = { 0, 0, 0 }; Matcher receivedSymbol = null; String stringReceivedSymbol = null; public DataPatterns() { patterns.add(numberComponents); patterns.add(numberScreens); patterns.add(timeMapping1); patterns.add(timeMapping2); returnRules[0] = 0; returnRules[1] = 0; returnRules[2] = 0; } public int[] checkRules(List<String> data) { temporaryData.add(data.get(0)); temporaryData.add(data.get(1)); receivedSymbol = symbolExpression.matcher(data.get(2)); if (receivedSymbol.matches()) { stringReceivedSymbol = receivedSymbol.group(1); String temporaryDataChar[] = data.get(2).split(stringReceivedSymbol); temporaryData.add(temporaryDataChar[0]); temporaryData.add(temporaryDataChar[1]); } int i = 0; for (; i < patterns.size(); i++) { validate = patterns.get(i).matcher(temporaryData.get(i)); if (validate.matches()&& i<returnRules.length) { returnRules[i] = 1; }else if (!validate.matches()){ returnRules[(i-1)] = 0; } } return returnRules; } }
[ "jose.rodrigues@rsinet.com.br" ]
jose.rodrigues@rsinet.com.br
b5d822089b9de8a494c3dd8a4835f9dcf4a5abae
dc72291d817c3e61bd427b50eac9706c2b80b963
/ConcurrencyLabAugust2017/src/lesson170830/SerialExecutor.java
20278321670730e914fed7366220add86bfd6ec9
[]
no_license
zstudent/ConcurrencyLabAug2017
7a5eee7d519ff2e2d740823f69c69d4a97977bec
72c672dd7c8b31b1304173e261f5cad28967f256
refs/heads/master
2021-01-19T17:30:25.261856
2017-09-02T10:18:07
2017-09-02T10:18:07
101,063,220
0
1
null
null
null
null
UTF-8
Java
false
false
668
java
package lesson170830; import java.util.ArrayDeque; import java.util.Queue; import java.util.concurrent.Executor; public class SerialExecutor implements Executor { final Queue<Runnable> tasks = new ArrayDeque<Runnable>(); final Executor executor; Runnable active; SerialExecutor(Executor executor) { this.executor = executor; } @Override public synchronized void execute(final Runnable r) { tasks.offer(() -> { try { r.run(); } finally { scheduleNext(); } }); if (active == null) { scheduleNext(); } } protected synchronized void scheduleNext() { if ((active = tasks.poll()) != null) { executor.execute(active); } } }
[ "Zaal_Lyanov@epam.com" ]
Zaal_Lyanov@epam.com
e7cae6b8c443b7cb609c00c0dd35415aa9b8ac81
8b6f42415b617072aa3b81ade82f1345d2c1962e
/src/main/java/org/realityforge/replicant/client/transport/RequestDebugger.java
034f4e7846d73f3ff0d9049b85d7e6fd5b1fba9a
[ "Apache-2.0" ]
permissive
icaughley/replicant
31a7e418a5fe99cd8e64b1729c5a0f5fead3621c
fafad58c9876d8fb9b37d5c50123d70467e3cdef
refs/heads/master
2021-01-18T01:12:40.072622
2015-04-02T02:33:05
2015-04-02T02:33:05
33,848,399
0
0
null
2015-04-13T04:49:53
2015-04-13T04:49:53
null
UTF-8
Java
false
false
1,131
java
package org.realityforge.replicant.client.transport; import java.util.logging.Logger; import javax.annotation.Nonnull; public class RequestDebugger { protected static final Logger LOG = Logger.getLogger( RequestDebugger.class.getName() ); public void outputRequests( @Nonnull final String prefix, @Nonnull final ClientSession<?, ?> session ) { LOG.info( prefix + " Request Count: " + session.getRequests().size() ); for ( final RequestEntry entry : session.getRequests().values() ) { outputRequest( prefix, entry ); } } protected void outputRequest( @Nonnull final String prefix, @Nonnull final RequestEntry entry ) { LOG.info( prefix + " Request: " + entry.getRequestKey() + " / " + entry.getRequestID() + " CacheKey: " + entry.getCacheKey() + " BulkLoad: " + entry.isBulkLoad() + " CompletionDataPresent?: " + entry.isCompletionDataPresent() + " ExpectingResults?: " + entry.isExpectingResults() + " NormalCompletion?: " + ( entry.isCompletionDataPresent() ? entry.isNormalCompletion() : '?' ) ); } }
[ "peter@realityforge.org" ]
peter@realityforge.org
0a917936216f74423347fe17d82279e1f31161dd
2fb8bc59cfaa6cef59f0212cc394fa4e51208a35
/src/main/java/com/yisingle/webapp/websocket/HandshakeInterceptor.java
2e5fbbdb15ce4ccca9ecbc993659c6edcd25976f
[]
no_license
ooozxv2/yisingle
e48322e6699d4d79549db10cb60300b55c645185
976757d3152fdc9a3fcda92d4ceb209aee3e5233
refs/heads/master
2020-05-20T05:25:33.736914
2018-11-01T10:21:45
2018-11-01T10:21:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,251
java
package com.yisingle.webapp.websocket; import java.util.Map; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; import org.springframework.stereotype.Component; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor; @Component public class HandshakeInterceptor extends HttpSessionHandshakeInterceptor { @Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception { //่งฃๅ†ณThe extension [x-webkit-deflate-frame] is not supported้—ฎ้ข˜ if(request.getHeaders().containsKey("Sec-WebSocket-Extensions")) { request.getHeaders().set("Sec-WebSocket-Extensions", "permessage-deflate"); } System.out.println("Before Handshake"); return super.beforeHandshake(request, response, wsHandler, attributes); } @Override public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception ex) { System.out.println("After Handshake"); super.afterHandshake(request, response, wsHandler, ex); } }
[ "j314815101@qq.com" ]
j314815101@qq.com
59efb919e558c46a34199c3f8376e96704f23ca8
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/twitter4j/internal/http/XAuthAuthorization.java
94361165a5a052d3f57c1a7785e866ba87366c87
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
1,559
java
package twitter4j.internal.http; import java.io.Serializable; import twitter4j.auth.Authorization; import twitter4j.auth.BasicAuthorization; public class XAuthAuthorization implements Serializable, Authorization { private static final long serialVersionUID = -6082451214083464902L; private BasicAuthorization basic; private String consumerKey; private String consumerSecret; public XAuthAuthorization(BasicAuthorization paramBasicAuthorization) { this.basic = paramBasicAuthorization; } public String getAuthorizationHeader(HttpRequest paramHttpRequest) { return this.basic.getAuthorizationHeader(paramHttpRequest); } public String getConsumerKey() { return this.consumerKey; } public String getConsumerSecret() { return this.consumerSecret; } public String getPassword() { return this.basic.getPassword(); } public String getUserId() { return this.basic.getUserId(); } public boolean isEnabled() { return this.basic.isEnabled(); } public void setOAuthConsumer(String paramString1, String paramString2) { try { this.consumerKey = paramString1; this.consumerSecret = paramString2; return; } finally { localObject = finally; throw localObject; } } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_5_dex2jar.jar * Qualified Name: twitter4j.internal.http.XAuthAuthorization * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
bb3cc2fd552f9c2ffa48940eaff61dc9a0adacca
5ebf8e5463d207b5cc17e14cc51e5a1df135ccb9
/moe.apple/moe.platform.ios/src/main/java/apple/networkextension/NEAppRule.java
a4d5ac60e74010c94627032e666c7cf136e88d1d
[ "ICU", "Apache-2.0", "W3C" ]
permissive
multi-os-engine-community/moe-core
1cd1ea1c2caf6c097d2cd6d258f0026dbf679725
a1d54be2cf009dd57953c9ed613da48cdfc01779
refs/heads/master
2021-07-09T15:31:19.785525
2017-08-22T10:34:50
2017-08-22T10:59:02
101,847,137
1
0
null
2017-08-30T06:43:46
2017-08-30T06:43:46
null
UTF-8
Java
false
false
6,341
java
/* Copyright 2014-2016 Intel Corporation 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 apple.networkextension; import apple.NSObject; import apple.foundation.NSArray; import apple.foundation.NSCoder; import apple.foundation.NSMethodSignature; import apple.foundation.NSSet; import apple.foundation.protocol.NSCopying; import apple.foundation.protocol.NSSecureCoding; import org.moe.natj.c.ann.FunctionPtr; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; import org.moe.natj.general.ann.Library; import org.moe.natj.general.ann.Mapped; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.general.ann.NInt; import org.moe.natj.general.ann.NUInt; import org.moe.natj.general.ann.Owned; import org.moe.natj.general.ann.Runtime; import org.moe.natj.general.ptr.VoidPtr; import org.moe.natj.objc.Class; import org.moe.natj.objc.ObjCRuntime; import org.moe.natj.objc.SEL; import org.moe.natj.objc.ann.ObjCClassBinding; import org.moe.natj.objc.ann.ProtocolClassMethod; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; @Generated @Library("NetworkExtension") @Runtime(ObjCRuntime.class) @ObjCClassBinding public class NEAppRule extends NSObject implements NSSecureCoding, NSCopying { static { NatJ.register(); } @Generated protected NEAppRule(Pointer peer) { super(peer); } @Generated @Selector("accessInstanceVariablesDirectly") public static native boolean accessInstanceVariablesDirectly(); @Generated @Owned @Selector("alloc") public static native NEAppRule alloc(); @Generated @Selector("allocWithZone:") @MappedReturn(ObjCObjectMapper.class) public static native Object allocWithZone(VoidPtr zone); @Generated @Selector("automaticallyNotifiesObserversForKey:") public static native boolean automaticallyNotifiesObserversForKey(String key); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:") public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:") public static native void cancelPreviousPerformRequestsWithTargetSelectorObject( @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector, @Mapped(ObjCObjectMapper.class) Object anArgument); @Generated @Selector("classFallbacksForKeyedArchiver") public static native NSArray<String> classFallbacksForKeyedArchiver(); @Generated @Selector("classForKeyedUnarchiver") public static native Class classForKeyedUnarchiver(); @Generated @Selector("debugDescription") public static native String debugDescription_static(); @Generated @Selector("description") public static native String description_static(); @Generated @Selector("hash") @NUInt public static native long hash_static(); @Generated @Selector("instanceMethodForSelector:") @FunctionPtr(name = "call_instanceMethodForSelector_ret") public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector); @Generated @Selector("instanceMethodSignatureForSelector:") public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector); @Generated @Selector("instancesRespondToSelector:") public static native boolean instancesRespondToSelector(SEL aSelector); @Generated @Selector("isSubclassOfClass:") public static native boolean isSubclassOfClass(Class aClass); @Generated @Selector("keyPathsForValuesAffectingValueForKey:") public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key); @Generated @Owned @Selector("new") @MappedReturn(ObjCObjectMapper.class) public static native Object new_objc(); @Generated @Selector("resolveClassMethod:") public static native boolean resolveClassMethod(SEL sel); @Generated @Selector("resolveInstanceMethod:") public static native boolean resolveInstanceMethod(SEL sel); @Generated @Selector("setVersion:") public static native void setVersion_static(@NInt long aVersion); @Generated @Selector("superclass") public static native Class superclass_static(); @Generated @Selector("supportsSecureCoding") public static native boolean supportsSecureCoding(); @Generated @Selector("version") @NInt public static native long version_static(); @Generated @Owned @Selector("copyWithZone:") @MappedReturn(ObjCObjectMapper.class) public native Object copyWithZone(VoidPtr zone); @Generated @Selector("encodeWithCoder:") public native void encodeWithCoder(NSCoder aCoder); @Generated @Selector("init") public native NEAppRule init(); @Generated @Selector("initWithCoder:") public native NEAppRule initWithCoder(NSCoder aDecoder); @Generated @Selector("initWithSigningIdentifier:") public native NEAppRule initWithSigningIdentifier(String signingIdentifier); @Generated @Selector("matchDomains") public native NSArray<?> matchDomains(); @Generated @Selector("matchPath") public native String matchPath(); @Generated @Selector("matchSigningIdentifier") public native String matchSigningIdentifier(); @Generated @Selector("setMatchDomains:") public native void setMatchDomains(NSArray<?> value); @Generated @Selector("setMatchPath:") public native void setMatchPath(String value); @Generated @ProtocolClassMethod("supportsSecureCoding") public boolean _supportsSecureCoding() { return supportsSecureCoding(); } }
[ "kristof.liliom@migeran.com" ]
kristof.liliom@migeran.com
bd348979ece40b700b66a051c98142ab83f5335e
e7b14ab36032a83e3e96e153eb5442577773da60
/open-metadata-implementation/access-services/discovery-engine/discovery-engine-server/src/main/java/org/odpi/openmetadata/accessservices/discoveryengine/converters/DiscoveryServicePropertiesConverter.java
4eeb5cba0820cfc4d377c3e99c323cba920538a1
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
popa-raluca/egeria
fc2f45c84ef3f16d33762f7bfeb1718177b2d727
cb9dc3189d4a4954fa7e43e492d6e1f6dab586cf
refs/heads/master
2023-06-22T07:56:58.117738
2021-05-25T08:44:23
2021-05-25T08:44:23
149,274,100
0
0
Apache-2.0
2018-09-18T11:02:17
2018-09-18T11:02:16
null
UTF-8
Java
false
false
8,134
java
/* SPDX-License-Identifier: Apache 2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.discoveryengine.converters; import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIMapper; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.discovery.properties.DiscoveryServiceProperties; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; import java.util.List; /** * DiscoveryServicePropertiesConverter transfers the relevant properties from an Open Metadata Repository Services (OMRS) * EntityDetail object into a DiscoveryServiceProperties bean. */ public class DiscoveryServicePropertiesConverter<B> extends DiscoveryEngineOMASConverter<B> { /** * Constructor * * @param repositoryHelper helper object to parse entity/relationship objects * @param serviceName name of this component * @param serverName local server name */ public DiscoveryServicePropertiesConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) { super(repositoryHelper, serviceName, serverName); } /** * Using the supplied instances, return a new instance of the bean. It is used for beans such as * a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the * relationships between them. The relationships may be omitted if they do not have an properties. * * @param beanClass name of the class to create * @param primaryEntity entity that is the root of the cluster of entities that make up the * content of the bean * @param supplementaryEntities entities connected to the primary entity by the relationships * @param relationships relationships linking the entities * @param methodName calling method * @return bean populated with properties from the instances supplied * @throws PropertyServerException there is a problem instantiating the bean */ @Override public B getNewComplexBean(Class<B> beanClass, EntityDetail primaryEntity, List<EntityDetail> supplementaryEntities, List<Relationship> relationships, String methodName) throws PropertyServerException { try { /* * This is initial confirmation that the generic converter has been initialized with an appropriate bean class. */ B returnBean = beanClass.newInstance(); if (returnBean instanceof DiscoveryServiceProperties) { DiscoveryServiceProperties bean = (DiscoveryServiceProperties)returnBean; if (primaryEntity != null) { /* * Check that the entity is of the correct type. */ bean.setElementHeader(this.getMetadataElementHeader(beanClass, primaryEntity, methodName)); /* * The initial set of values come from the entity properties. The super class properties are removed from a copy of the entities * properties, leaving any subclass properties to be stored in extended properties. */ InstanceProperties instanceProperties = new InstanceProperties(primaryEntity.getProperties()); bean.setQualifiedName(this.removeQualifiedName(instanceProperties)); bean.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); bean.setDisplayName(this.removeName(instanceProperties)); bean.setDescription(this.removeDescription(instanceProperties)); /* Note this value should be in the classification */ bean.setOwner(this.removeOwner(instanceProperties)); /* Note this value should be in the classification */ bean.setOwnerType(this.removeOwnerTypeFromProperties(instanceProperties)); /* Note this value should be in the classification */ bean.setZoneMembership(this.removeZoneMembership(instanceProperties)); /* * Any remaining properties are returned in the extended properties. They are * assumed to be defined in a subtype. */ bean.setExtendedProperties(this.getRemainingExtendedProperties(instanceProperties)); /* * The values in the classifications override the values in the main properties of the Asset's entity. * Having these properties in the main entity is deprecated. */ instanceProperties = super.getClassificationProperties(OpenMetadataAPIMapper.ASSET_ZONES_CLASSIFICATION_NAME, primaryEntity); bean.setZoneMembership(this.getZoneMembership(instanceProperties)); instanceProperties = super.getClassificationProperties(OpenMetadataAPIMapper.ASSET_OWNERSHIP_CLASSIFICATION_NAME, primaryEntity); bean.setOwner(this.getOwner(instanceProperties)); bean.setOwnerType(this.getOwnerTypeFromProperties(instanceProperties)); instanceProperties = super.getClassificationProperties(OpenMetadataAPIMapper.ASSET_ORIGIN_CLASSIFICATION_NAME, primaryEntity); bean.setOriginOrganizationGUID(this.getOriginOrganizationGUID(instanceProperties)); bean.setOriginBusinessCapabilityGUID(this.getOriginBusinessCapabilityGUID(instanceProperties)); bean.setOtherOriginValues(this.getOtherOriginValues(instanceProperties)); if (supplementaryEntities != null) { for (EntityDetail entity : supplementaryEntities) { if ((entity != null) && (entity.getType() != null)) { if (repositoryHelper.isTypeOf(serviceName, entity.getType().getTypeDefName(), OpenMetadataAPIMapper.CONNECTION_TYPE_NAME)) { bean.setConnection(super.getEmbeddedConnection(beanClass, entity, supplementaryEntities, relationships, methodName)); } } } } } else { handleMissingMetadataInstance(beanClass.getName(), TypeDefCategory.ENTITY_DEF, methodName); } } else { handleUnexpectedBeanClass(beanClass.getName(), DiscoveryServiceProperties.class.getName(), methodName); } return returnBean; } catch (IllegalAccessException | InstantiationException | ClassCastException error) { super.handleInvalidBeanClass(beanClass.getName(), error, methodName); } return null; } }
[ "mandy_chessell@uk.ibm.com" ]
mandy_chessell@uk.ibm.com
3acc00adbb801307f25366b6b41dc620b2f670ca
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/androidx/media/AudioAttributesImplApi21.java
d41089aaf21d10d0254b137405480c08003b43eb
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
4,701
java
package androidx.media; import android.media.AudioAttributes; import android.os.Build.VERSION; import android.os.Bundle; import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import androidx.annotation.RestrictTo; import androidx.annotation.RestrictTo.Scope; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @RequiresApi(21) @RestrictTo({Scope.LIBRARY_GROUP}) public class AudioAttributesImplApi21 implements AudioAttributesImpl { private static final String TAG = "AudioAttributesCompat21"; static Method sAudioAttributesToLegacyStreamType; @RestrictTo({Scope.LIBRARY_GROUP}) public AudioAttributes mAudioAttributes; @RestrictTo({Scope.LIBRARY_GROUP}) public int mLegacyStreamType; AudioAttributesImplApi21() { this.mLegacyStreamType = -1; } AudioAttributesImplApi21(AudioAttributes audioAttributes) { this(audioAttributes, -1); } AudioAttributesImplApi21(AudioAttributes audioAttributes, int i) { this.mLegacyStreamType = -1; this.mAudioAttributes = audioAttributes; this.mLegacyStreamType = i; } static Method getAudioAttributesToLegacyStreamTypeMethod() { try { if (sAudioAttributesToLegacyStreamType == null) { sAudioAttributesToLegacyStreamType = AudioAttributes.class.getMethod("toLegacyStreamType", new Class[]{AudioAttributes.class}); } return sAudioAttributesToLegacyStreamType; } catch (NoSuchMethodException unused) { return null; } } public Object getAudioAttributes() { return this.mAudioAttributes; } public int getVolumeControlStream() { if (VERSION.SDK_INT >= 26) { return this.mAudioAttributes.getVolumeControlStream(); } return AudioAttributesCompat.toVolumeStreamType(true, getFlags(), getUsage()); } public int getLegacyStreamType() { int i = this.mLegacyStreamType; if (i != -1) { return i; } Method audioAttributesToLegacyStreamTypeMethod = getAudioAttributesToLegacyStreamTypeMethod(); String str = TAG; if (audioAttributesToLegacyStreamTypeMethod == null) { StringBuilder sb = new StringBuilder(); sb.append("No AudioAttributes#toLegacyStreamType() on API: "); sb.append(VERSION.SDK_INT); Log.w(str, sb.toString()); return -1; } try { return ((Integer) audioAttributesToLegacyStreamTypeMethod.invoke(null, new Object[]{this.mAudioAttributes})).intValue(); } catch (IllegalAccessException | InvocationTargetException e) { StringBuilder sb2 = new StringBuilder(); sb2.append("getLegacyStreamType() failed on API: "); sb2.append(VERSION.SDK_INT); Log.w(str, sb2.toString(), e); return -1; } } public int getRawLegacyStreamType() { return this.mLegacyStreamType; } public int getContentType() { return this.mAudioAttributes.getContentType(); } public int getUsage() { return this.mAudioAttributes.getUsage(); } public int getFlags() { return this.mAudioAttributes.getFlags(); } @NonNull public Bundle toBundle() { Bundle bundle = new Bundle(); bundle.putParcelable("androidx.media.audio_attrs.FRAMEWORKS", this.mAudioAttributes); int i = this.mLegacyStreamType; if (i != -1) { bundle.putInt("androidx.media.audio_attrs.LEGACY_STREAM_TYPE", i); } return bundle; } public int hashCode() { return this.mAudioAttributes.hashCode(); } public boolean equals(Object obj) { if (!(obj instanceof AudioAttributesImplApi21)) { return false; } return this.mAudioAttributes.equals(((AudioAttributesImplApi21) obj).mAudioAttributes); } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("AudioAttributesCompat: audioattributes="); sb.append(this.mAudioAttributes); return sb.toString(); } public static AudioAttributesImpl fromBundle(Bundle bundle) { if (bundle == null) { return null; } AudioAttributes audioAttributes = (AudioAttributes) bundle.getParcelable("androidx.media.audio_attrs.FRAMEWORKS"); if (audioAttributes == null) { return null; } return new AudioAttributesImplApi21(audioAttributes, bundle.getInt("androidx.media.audio_attrs.LEGACY_STREAM_TYPE", -1)); } }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
d61ff6a9b29dd451c2b987da2f5847174725d610
ccdb80501cb1724a4084f987b7315bb7289e21a0
/praxis.core/src/net/neilcsmith/praxis/core/interfaces/ServiceManager.java
c588473cbbce51ae17e72742a003822bc16e6574
[]
no_license
omzo006/praxis
1f33796b14e968e3de6237441ce8fc6072373a52
d2e561739dd326ad96b7f61c4a269bcfd6f3804f
refs/heads/master
2021-01-01T03:36:32.452130
2013-12-05T16:55:57
2013-12-05T16:55:57
56,091,630
0
0
null
null
null
null
UTF-8
Java
false
false
1,248
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2010 Neil C Smith. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 only, as * published by the Free Software Foundation. * * This code 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 * version 3 for more details. * * You should have received a copy of the GNU General Public License version 3 * along with this work; if not, see http://www.gnu.org/licenses/ * * * Please visit http://neilcsmith.net if you need additional information or * have any questions. */ package net.neilcsmith.praxis.core.interfaces; import net.neilcsmith.praxis.core.ComponentAddress; import net.neilcsmith.praxis.core.InterfaceDefinition; /** * * @author Neil C Smith */ public interface ServiceManager { public ComponentAddress findService(InterfaceDefinition info) throws ServiceUnavailableException; public ComponentAddress[] findAllServices(InterfaceDefinition info) throws ServiceUnavailableException; }
[ "neilcsmith.net@googlemail.com" ]
neilcsmith.net@googlemail.com
f0038f6903c42f19b689512bab25479457e4938f
8d571d9eb9de0cc964c8e1149459866121326142
/app/src/main/java/com/example/administrator/layzyweek/selfadapter/SecondCategoryAdapter.java
d442ebff793d09a49d8c15e2d44bf39349d43921
[]
no_license
yulu1121/LayzyWeek
f82698a7655fea1e5743bbff8efd5f937de37765
6831e098e51d56acc244f7dc9aa4c0cc785d8bfd
refs/heads/master
2021-01-09T05:18:44.506014
2017-02-07T11:03:21
2017-02-07T11:03:21
80,798,519
0
0
null
null
null
null
UTF-8
Java
false
false
3,656
java
package com.example.administrator.layzyweek.selfadapter; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.example.administrator.layzyweek.R; import com.example.administrator.layzyweek.activities.FirstFormationActivity; import com.example.administrator.layzyweek.entries.FirstPage; import com.example.administrator.layzyweek.utils.ImageLoader; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * * Created by Administrator on 2017/2/5. */ public class SecondCategoryAdapter extends BaseAdapter{ private Context context; private List<FirstPage.ResultBean> mlist; private LayoutInflater inflater; public SecondCategoryAdapter(Context context,List<FirstPage.ResultBean> list){ this.context = context; this.mlist = list; inflater = LayoutInflater.from(context); } @Override public int getCount() { return null==mlist?0:mlist.size(); } @Override public Object getItem(int position) { return mlist.get(position); } @Override public long getItemId(int position) { return mlist.get(position).getLeo_id(); } @Override public View getView(int position, View convertView, ViewGroup parent) { View view=convertView; final ViewHolder viewHolder; if(null==view){ view = inflater.inflate(R.layout.second_category_item,parent,false); viewHolder = new ViewHolder(view); }else { viewHolder = (ViewHolder) view.getTag(); } final FirstPage.ResultBean bean = mlist.get(position); //ๅ‘่ฏฆๆƒ…็•Œ้ขไผ ้€’ๆ•ฐๆฎ view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(context, FirstFormationActivity.class); Bundle bundle = new Bundle(); bundle.putInt("leo_id",bean.getLeo_id()); intent.putExtra("formation",bundle); context.startActivity(intent); } }); viewHolder.mainTitle.setText(bean.getTitle()); viewHolder.mainCompany.setText(bean.getPoi_name()+"\tยท\t"+bean.getCategory()); viewHolder.clicksMain.setText(String.valueOf(bean.getCollected_num())+"ไบบๆ”ถ่—"); viewHolder.priceMain.setText("๏ฟฅ"+String.valueOf(bean.getPrice())); String imageUrlOne = bean.getFront_cover_image_list().get(0); viewHolder.mainImageView.setTag(imageUrlOne); ImageLoader.loadImage(imageUrlOne,450,150,new ImageLoader.ImageListener() { @Override public void ImageComplete(Bitmap bitMap, String Url) { if(Url.equals(viewHolder.mainImageView.getTag())){ viewHolder.mainImageView.setImageBitmap(bitMap); } } }); return view; } class ViewHolder{ @BindView(R.id.second_backgroud) ImageView mainImageView; @BindView(R.id.second_title) TextView mainTitle; @BindView(R.id.second_company) TextView mainCompany; @BindView(R.id.clicks_second) TextView clicksMain; @BindView(R.id.price_second) TextView priceMain; ViewHolder(View view){ view.setTag(this); ButterKnife.bind(this,view); } } }
[ "626899174@qq.com" ]
626899174@qq.com
7f864ae86982821dfb5dcc878012e65400239b18
1983964b1c049f426f100b833775eec21a3e9917
/JavaKnow/src/main/java/com/feagle/learn/thread/racecondition/EnergySystem.java
b0b58fcf22328f2ffb7193b466ed81c6287eace4
[]
no_license
adanac/java-project
688accbb97773dd52c0e68d96d99003d637d8ecb
f90418ea89406f0c0ddf4f0383f7fbd0b532a205
refs/heads/master
2021-01-21T15:03:46.890994
2017-08-29T14:24:54
2017-08-29T14:24:54
95,373,196
0
0
null
null
null
null
UTF-8
Java
false
false
1,864
java
package com.feagle.learn.thread.racecondition; /** * ๅฎ‡ๅฎ™็š„่ƒฝ้‡็ณป็ปŸ * ้ตๅพช่ƒฝ้‡ๅฎˆๆ’ๅฎšๅพ‹๏ผš * ่ƒฝ้‡ไธไผšๅ‡ญ็ฉบๅˆ›็”Ÿๆˆ–ๆถˆๅคฑ๏ผŒๅชไผšไปŽไธ€ๅค„่ฝฌ็งปๅˆฐๅฆไธ€ๅค„ */ public class EnergySystem { //่ƒฝ้‡็›’ๅญ๏ผŒ่ƒฝ้‡ๅญ˜่ดฎ็š„ๅœฐๆ–น private final double[] energyBoxes; private final Object lockObj = new Object(); /** * * @param n ่ƒฝ้‡็›’ๅญ็š„ๆ•ฐ้‡ * @param initialEnergy ๆฏไธช่ƒฝ้‡็›’ๅญๅˆๅง‹ๅซๆœ‰็š„่ƒฝ้‡ๅ€ผ */ public EnergySystem(int n, double initialEnergy){ energyBoxes = new double[n]; for (int i = 0; i < energyBoxes.length; i++) energyBoxes[i] = initialEnergy; } /** * ่ƒฝ้‡็š„่ฝฌ็งป๏ผŒไปŽไธ€ไธช็›’ๅญๅˆฐๅฆไธ€ไธช็›’ๅญ * @param from ่ƒฝ้‡ๆบ * @param to ่ƒฝ้‡็ปˆ็‚น * @param amount ่ƒฝ้‡ๅ€ผ */ public void transfer(int from, int to, double amount){ synchronized(lockObj){ // if (energyBoxes[from] < amount) // return; //whileๅพช็Žฏ๏ผŒไฟ่ฏๆกไปถไธๆปก่ถณๆ—ถไปปๅŠก้ƒฝไผš่ขซๆกไปถ้˜ปๆŒก //่€Œไธๆ˜ฏ็ปง็ปญ็ซžไบ‰CPU่ต„ๆบ,ๆ้ซ˜ๆ€ง่ƒฝ while (energyBoxes[from] < amount){ try { //ๆกไปถไธๆปก่ถณ, ๅฐ†ๅฝ“ๅ‰็บฟ็จ‹ๆ”พๅ…ฅWait Set lockObj.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.print(Thread.currentThread().getName()); energyBoxes[from] -= amount; System.out.printf("ไปŽ%d่ฝฌ็งป%10.2fๅ•ไฝ่ƒฝ้‡ๅˆฐ%d", from, amount, to); energyBoxes[to] += amount; System.out.printf(" ่ƒฝ้‡ๆ€ปๅ’Œ๏ผš%10.2f%n", getTotalEnergies()); //ๅ”ค้†’ๆ‰€ๆœ‰ๅœจlockObjๅฏน่ฑกไธŠ็ญ‰ๅพ…็š„็บฟ็จ‹ lockObj.notifyAll(); } } /** * ่Žทๅ–่ƒฝ้‡ไธ–็•Œ็š„่ƒฝ้‡ๆ€ปๅ’Œ */ public double getTotalEnergies(){ double sum = 0; for (double amount : energyBoxes) sum += amount; return sum; } /** * ่ฟ”ๅ›ž่ƒฝ้‡็›’ๅญ็š„้•ฟๅบฆ */ public int getBoxAmount(){ return energyBoxes.length; } }
[ "adanac@sina.com" ]
adanac@sina.com
488e8d9ffa1fa305cab39831d4874dcc47f44e1d
e9474845462e5f2531a74c760b7770d17c74baef
/10-Application/Application/Swing-Sample-APP/src/main/java/com/sgu/infowksporga/jfx/views/file/explorer/action/PasteFilesAction.java
9cca6777f0f1fd4f0b50af0ca9104e243f2c4783
[ "Apache-2.0" ]
permissive
github188/InfoWkspOrga
869051f4e70ebc9a0125a0bddecdc1704e868b52
89162f127af51d697e25a46bc32dc90553388a54
refs/heads/master
2020-12-03T00:43:46.453187
2016-11-06T05:48:37
2016-11-06T05:48:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,137
java
package com.sgu.infowksporga.jfx.views.file.explorer.action; import java.awt.event.ActionEvent; import com.sgu.apt.annotation.AnnotationConfig; import com.sgu.apt.annotation.i18n.I18n; import com.sgu.apt.annotation.i18n.I18nProperty; import com.sgu.core.framework.spring.loader.SpringBeanHelper; import com.sgu.infowksporga.jfx.menu.action.AbstractInfoWrkspOrgaAction; import com.sgu.infowksporga.jfx.views.file.explorer.FileExplorerView; import com.sgu.infowksporga.jfx.views.file.explorer.rules.IsAtLeastViewFileSelectedRule; import com.sgu.infowksporga.jfx.zfacade.local.edit.PasteFilesFromClipboardServiceUI; /** * Description : Paste Files Action class<br> * * @author SGU */ public class PasteFilesAction extends AbstractInfoWrkspOrgaAction { /** * The attribute serialVersionUID */ private static final long serialVersionUID = -3651435084049489336L; /** * The reference to get the directory tree */ private final FileExplorerView fileExplorerView; /** * Constructor<br> */ @I18n(baseProject = AnnotationConfig.I18N_TARGET_APPLICATION_PROPERTIES_FOLDER, filePackage = "i18n", fileName = "application-prez", properties = { // Force \n @I18nProperty(key = "file.explorer.view.action.paste.files.text", value = "Coller les fichiers"), // Force \n @I18nProperty(key = "file.explorer.view.action.paste.files.tooltip", value = "Coller les fichiers/dossiers de la vue en cours dans le rรฉpertoire selectionnรฉ"), // Force \n @I18nProperty(key = "file.explorer.view.action.paste.files.icon", value = "/icons/paste.png"), // Force \n }) public PasteFilesAction(final FileExplorerView fileExplorerView) { super("file.explorer.view.action.paste.files"); this.fileExplorerView = fileExplorerView; setRule(new IsAtLeastViewFileSelectedRule(fileExplorerView)); } /** {@inheritDoc} */ @Override public void actionPerformed(final ActionEvent evt) { final PasteFilesFromClipboardServiceUI facade = SpringBeanHelper.getImplementationByInterface(PasteFilesFromClipboardServiceUI.class); facade.execute(); } }
[ "sebguisse@gmail.com" ]
sebguisse@gmail.com
57a2730ff1bc91fb59298ee2231555ccf7cea9a6
f7160c0f0526cc5afc0fe4e6f06d384394059aa1
/fsa/fs-gridservice/src/impl/java/com/fs/gridservice/core/impl/hazelcast/objects/DgSetHC.java
9de3c93f60b79e4a4e2fd16b0c8b917058f962be
[]
no_license
o1711/somecode
e2461c4fb51b3d75421c4827c43be52885df3a56
a084f71786e886bac8f217255f54f5740fa786de
refs/heads/master
2021-09-14T14:51:58.704495
2018-05-15T07:51:05
2018-05-15T07:51:05
112,574,683
0
0
null
null
null
null
UTF-8
Java
false
false
1,718
java
/** * Dec 13, 2012 */ package com.fs.gridservice.core.impl.hazelcast.objects; import java.util.ArrayList; import java.util.List; import com.fs.gridservice.core.api.objects.DgSetI; import com.fs.gridservice.core.impl.hazelcast.DataGridHC; import com.fs.gridservice.core.impl.hazelcast.HazelcastObjectWrapper; import com.hazelcast.core.ISet; import com.hazelcast.core.Instance; /** * @author wuzhen * */ public class DgSetHC<V> extends HazelcastObjectWrapper<ISet<V>> implements DgSetI<V> { /** * @param q */ public DgSetHC(String name, Instance q, DataGridHC dg) { super(name, (ISet<V>) q, dg); } /* * (non-Javadoc) * * @see * com.fs.gridservice.core.api.objects.DgSetI#contains(java.lang.Object) */ @Override public boolean contains(V value) { this.assertNotDestroied(); return this.target.contains(value); } /* * (non-Javadoc) * * @see com.fs.gridservice.core.api.objects.DgSetI#remove(java.lang.Object) */ @Override public boolean remove(V value) { return this.target.remove(value); } /* * (non-Javadoc) * * @see com.fs.gridservice.core.api.objects.DgSetI#add(java.lang.Object) */ @Override public boolean add(V value) { return this.target.add(value); } /* * (non-Javadoc) * * @see com.fs.gridservice.core.api.objects.DgSetI#valueList() */ @Override public List<V> valueList() { return new ArrayList<V>(this.target); } @Override public void dump() { System.out.println("set:" + this.name); System.out.println("-Start------------------------"); System.out.println("TODO"); System.out.println("------------------------End-"); } }
[ "wkz808@163.com" ]
wkz808@163.com
1375ce27b1436cc6afb3c49f6defa0655ddf25a5
dc97ffc79dc1ef8150852bbc08a3e07d0c5b59b0
/jdroid-android-sample/src/main/java/com/jdroid/android/sample/ui/notifications/NotificationsFragment.java
a517c5fd53044e60049167362f5feb811ff91839
[ "Apache-2.0" ]
permissive
irfanirawansukirman/jdroid
7349480810aba53aedcb5ae046d5c832f6d85374
31b3294db1241185749e8566df161db864c14977
refs/heads/master
2021-07-20T05:57:47.273315
2017-10-30T02:55:18
2017-10-30T02:55:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,780
java
package com.jdroid.android.sample.ui.notifications; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.CheckBox; import android.widget.EditText; import com.jdroid.android.application.AbstractApplication; import com.jdroid.android.fragment.AbstractFragment; import com.jdroid.android.notification.NotificationBuilder; import com.jdroid.android.notification.NotificationUtils; import com.jdroid.android.sample.R; import com.jdroid.android.sample.application.AndroidNotificationChannelType; import com.jdroid.android.uil.UilBitmapLoader; import com.jdroid.java.concurrent.ExecutorUtils; import com.jdroid.java.date.DateUtils; import com.jdroid.java.utils.IdGenerator; import com.jdroid.java.utils.StringUtils; public class NotificationsFragment extends AbstractFragment { private EditText notificationName; private EditText notificationChannel; private EditText contentTitle; private EditText contentText; private EditText largeIconUrlEditText; private CheckBox largeIconDrawable; private EditText urlEditText; @Override public Integer getContentFragmentLayout() { return R.layout.notifications_fragment; } @SuppressLint("SetTextI18n") @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); notificationName = findView(R.id.notificationName); notificationName.setText("myNotification"); notificationChannel = findView(R.id.notificationChannel); notificationChannel.setText(AndroidNotificationChannelType.DEFAULT_IMPORTANCE.getChannelId()); contentTitle = findView(R.id.contentTitle); contentTitle.setText(R.string.contentTitleSample); contentText = findView(R.id.contentText); contentText.setText(R.string.contextTextSample); largeIconUrlEditText = findView(R.id.largeIconUrl); largeIconUrlEditText.setText("http://jdroidframework.com/images/gradle.png"); urlEditText = findView(R.id.url); urlEditText.setText("http://jdroidframework.com/uri"); largeIconDrawable = findView(R.id.largeIconDrawable); largeIconDrawable.setChecked(false); findView(R.id.sendNotification).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { ExecutorUtils.execute(new Runnable() { @Override public void run() { NotificationBuilder builder = new NotificationBuilder(notificationName.getText().toString(), notificationChannel.getText().toString()); builder.setSmallIcon(AbstractApplication.get().getNotificationIconResId()); if (largeIconDrawable.isChecked()) { builder.setLargeIcon(R.drawable.marker); } else { String largeIconUrl = largeIconUrlEditText.getText().toString(); if (StringUtils.isNotEmpty(largeIconUrl)) { builder.setLargeIcon(new UilBitmapLoader(largeIconUrl)); } } builder.setContentTitle(contentTitle.getText().toString()); builder.setContentText(contentText.getText().toString()); String url = urlEditText.getText().toString(); if (StringUtils.isNotBlank(url)) { builder.setSingleTopUrl(url); } else { Intent intent = new Intent(getActivity(), AbstractApplication.get().getHomeActivityClass()); builder.setContentIntent(intent); } builder.setWhen(DateUtils.nowMillis()); builder.setBlueLight(); builder.setDefaultSound(); NotificationUtils.sendNotification(IdGenerator.getIntId(), builder); } }); } }); findView(R.id.cancelNotifications).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { NotificationUtils.cancelAllNotifications(); } }); } }
[ "maxirosson@gmail.com" ]
maxirosson@gmail.com
e029bd7320891f33154246dffcf00c7a58979354
e3c38acaa9105863d6181afa68c15ef61122bc56
/src/android/support/v4/app/TaskStackBuilder.java
d4d9a36613cc51d596393044af82f69e10970ed4
[]
no_license
Neio/iMessageChatDecompile
2d3349d848c25478e2bbbbaaf15006e9566b2f26
f0b32c44a6e7ba6bb6952adf73fa8529b70db59c
refs/heads/master
2021-01-18T06:52:36.066331
2013-09-24T17:29:28
2013-09-24T17:29:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,421
java
package android.support.v4.app; import android.app.Activity; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Build.VERSION; import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.util.Log; import java.util.ArrayList; import java.util.Iterator; public class TaskStackBuilder implements Iterable { private static final TaskStackBuilder.TaskStackBuilderImpl IMPL = new TaskStackBuilder.TaskStackBuilderImplBase(); private static final String TAG = "TaskStackBuilder"; private final ArrayList mIntents = new ArrayList(); private final Context mSourceContext; static { if (Build.VERSION.SDK_INT >= 11) { IMPL = new TaskStackBuilder.TaskStackBuilderImplHoneycomb(); return; } } private TaskStackBuilder(Context paramContext) { this.mSourceContext = paramContext; } public static TaskStackBuilder create(Context paramContext) { return new TaskStackBuilder(paramContext); } public static TaskStackBuilder from(Context paramContext) { return create(paramContext); } public TaskStackBuilder addNextIntent(Intent paramIntent) { this.mIntents.add(paramIntent); return this; } public TaskStackBuilder addNextIntentWithParentStack(Intent paramIntent) { ComponentName localComponentName = paramIntent.getComponent(); if (localComponentName == null) localComponentName = paramIntent.resolveActivity(this.mSourceContext.getPackageManager()); if (localComponentName != null) addParentStack(localComponentName); addNextIntent(paramIntent); return this; } public TaskStackBuilder addParentStack(Activity paramActivity) { Intent localIntent = NavUtils.getParentActivityIntent(paramActivity); if (localIntent != null) { ComponentName localComponentName = localIntent.getComponent(); if (localComponentName == null) localComponentName = localIntent.resolveActivity(this.mSourceContext.getPackageManager()); addParentStack(localComponentName); addNextIntent(localIntent); } return this; } public TaskStackBuilder addParentStack(ComponentName paramComponentName) { int i = this.mIntents.size(); try { Intent localIntent; for (Object localObject = NavUtils.getParentActivityIntent(this.mSourceContext, paramComponentName); localObject != null; localObject = localIntent) { this.mIntents.add(i, localObject); localIntent = NavUtils.getParentActivityIntent(this.mSourceContext, ((Intent)localObject).getComponent()); } } catch (PackageManager.NameNotFoundException localNameNotFoundException) { Log.e("TaskStackBuilder", "Bad ComponentName while traversing activity parent metadata"); throw new IllegalArgumentException(localNameNotFoundException); } return this; } public TaskStackBuilder addParentStack(Class paramClass) { return addParentStack(new ComponentName(this.mSourceContext, paramClass)); } public Intent editIntentAt(int paramInt) { return (Intent)this.mIntents.get(paramInt); } public Intent getIntent(int paramInt) { return editIntentAt(paramInt); } public int getIntentCount() { return this.mIntents.size(); } public Intent[] getIntents() { Intent[] arrayOfIntent = new Intent[this.mIntents.size()]; if (arrayOfIntent.length == 0) return arrayOfIntent; arrayOfIntent[0] = new Intent((Intent)this.mIntents.get(0)).addFlags(268484608); for (int i = 1; i < arrayOfIntent.length; i++) arrayOfIntent[i] = new Intent((Intent)this.mIntents.get(i)); return arrayOfIntent; } public PendingIntent getPendingIntent(int paramInt1, int paramInt2) { return getPendingIntent(paramInt1, paramInt2, null); } public PendingIntent getPendingIntent(int paramInt1, int paramInt2, Bundle paramBundle) { if (this.mIntents.isEmpty()) throw new IllegalStateException("No intents added to TaskStackBuilder; cannot getPendingIntent"); Intent[] arrayOfIntent = (Intent[])this.mIntents.toArray(new Intent[this.mIntents.size()]); arrayOfIntent[0] = new Intent(arrayOfIntent[0]).addFlags(268484608); return IMPL.getPendingIntent(this.mSourceContext, arrayOfIntent, paramInt1, paramInt2, paramBundle); } public Iterator iterator() { return this.mIntents.iterator(); } public void startActivities() { startActivities(null); } public void startActivities(Bundle paramBundle) { if (this.mIntents.isEmpty()) throw new IllegalStateException("No intents added to TaskStackBuilder; cannot startActivities"); Intent[] arrayOfIntent = (Intent[])this.mIntents.toArray(new Intent[this.mIntents.size()]); arrayOfIntent[0] = new Intent(arrayOfIntent[0]).addFlags(268484608); if (!ContextCompat.startActivities(this.mSourceContext, arrayOfIntent, paramBundle)) { Intent localIntent = new Intent(arrayOfIntent[(-1 + arrayOfIntent.length)]); localIntent.addFlags(268435456); this.mSourceContext.startActivity(localIntent); } } } /* Location: /Users/mdp/Downloads/iMessage/classes-dex2jar.jar * Qualified Name: android.support.v4.app.TaskStackBuilder * JD-Core Version: 0.6.2 */
[ "mdp@yahoo-inc.com" ]
mdp@yahoo-inc.com
d8cf2c43afa8e2f11c5802dd841c75c6e381d16e
5e2cab8845e635b75f699631e64480225c1cf34d
/modules/core/org.jowidgets.impl/src/main/java/org/jowidgets/impl/widgets/composed/blueprint/defaults/QuestionDialogDefaults.java
70907d71e0b6867c1306ac6aeba680256e6e9e99
[ "BSD-3-Clause" ]
permissive
alec-liu/jo-widgets
2277374f059500dfbdb376333743d5507d3c57f4
a1dde3daf1d534cb28828795d1b722f83654933a
refs/heads/master
2022-04-18T02:36:54.239029
2018-06-08T13:08:26
2018-06-08T13:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,445
java
/* * Copyright (c) 2010, Michael Grossmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the jo-widgets.org nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ package org.jowidgets.impl.widgets.composed.blueprint.defaults; import org.jowidgets.api.image.Icons; import org.jowidgets.api.widgets.blueprint.builder.IQuestionDialogSetupBuilder; import org.jowidgets.api.widgets.blueprint.defaults.IDefaultInitializer; import org.jowidgets.impl.widgets.composed.blueprint.BluePrintFactory; public class QuestionDialogDefaults implements IDefaultInitializer<IQuestionDialogSetupBuilder<?>> { @Override public void initialize(final IQuestionDialogSetupBuilder<?> builder) { final BluePrintFactory bpF = new BluePrintFactory(); builder.setYesButton(bpF.button(Messages.getString("QuestionDialogDefaults.yes"))); //$NON-NLS-1$ builder.setNoButton(bpF.button(Messages.getString("QuestionDialogDefaults.no"))); //$NON-NLS-1$ builder.setIcon(Icons.QUESTION); } }
[ "herrgrossmann@users.noreply.github.com" ]
herrgrossmann@users.noreply.github.com
4242a59bcbb10cbcee032af92edaa2cc16cf9ba6
440129ba5acb1166570b13a97653ae9c95c9387c
/src/caceresenzo/libs/boxplay/culture/searchngo/content/text/INovelContentProvider.java
f24bbe2016349747636075b07ff1bf111dbdd9a7
[]
no_license
Caceresenzo/boxplay3-library
b8bd923d0431e84b342b7016c71a202a70bdf77b
5d65333a323d77e457962060120fbdf03d64cd20
refs/heads/master
2022-02-21T03:45:53.090540
2019-09-18T20:46:38
2019-09-18T20:46:38
137,792,287
0
0
null
null
null
null
UTF-8
Java
false
false
139
java
package caceresenzo.libs.boxplay.culture.searchngo.content.text; public interface INovelContentProvider extends ITextContentProvider { }
[ "caceresenzo1502@gmail.com" ]
caceresenzo1502@gmail.com
54abec77fe7e0ced4ef5bf51d99eff8a8ca56a72
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Codec-14/org.apache.commons.codec.language.bm.PhoneticEngine/BBC-F0-opt-70/tests/29/org/apache/commons/codec/language/bm/PhoneticEngine_ESTest.java
04eb57ba05f57a27b12b202c88727583f7cb5dfd
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
5,967
java
/* * This file was automatically generated by EvoSuite * Sun Oct 24 04:31:05 GMT 2021 */ package org.apache.commons.codec.language.bm; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.Set; import org.apache.commons.codec.language.bm.Languages; import org.apache.commons.codec.language.bm.NameType; import org.apache.commons.codec.language.bm.PhoneticEngine; import org.apache.commons.codec.language.bm.Rule; import org.apache.commons.codec.language.bm.RuleType; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class PhoneticEngine_ESTest extends PhoneticEngine_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { NameType nameType0 = NameType.SEPHARDIC; RuleType ruleType0 = RuleType.APPROX; PhoneticEngine phoneticEngine0 = null; try { phoneticEngine0 = new PhoneticEngine(nameType0, ruleType0, false, 0); fail("Expecting exception: NoClassDefFoundError"); } catch(NoClassDefFoundError e) { // // Could not initialize class org.apache.commons.codec.language.bm.Lang // verifyException("org.apache.commons.codec.language.bm.PhoneticEngine", e); } } @Test(timeout = 4000) public void test1() throws Throwable { NameType nameType0 = NameType.SEPHARDIC; RuleType ruleType0 = RuleType.RULES; PhoneticEngine phoneticEngine0 = null; try { phoneticEngine0 = new PhoneticEngine(nameType0, ruleType0, true); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // ruleType must not be RULES // verifyException("org.apache.commons.codec.language.bm.PhoneticEngine", e); } } @Test(timeout = 4000) public void test2() throws Throwable { NameType nameType0 = NameType.GENERIC; RuleType ruleType0 = RuleType.RULES; PhoneticEngine phoneticEngine0 = null; try { phoneticEngine0 = new PhoneticEngine(nameType0, ruleType0, true, (-465)); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // ruleType must not be RULES // verifyException("org.apache.commons.codec.language.bm.PhoneticEngine", e); } } @Test(timeout = 4000) public void test3() throws Throwable { PhoneticEngine.PhonemeBuilder phoneticEngine_PhonemeBuilder0 = PhoneticEngine.PhonemeBuilder.empty((Languages.LanguageSet) null); String string0 = phoneticEngine_PhonemeBuilder0.makeString(); assertEquals("", string0); } @Test(timeout = 4000) public void test4() throws Throwable { LinkedHashSet<String> linkedHashSet0 = new LinkedHashSet<String>(); linkedHashSet0.add(""); Languages.LanguageSet languages_LanguageSet0 = Languages.LanguageSet.from(linkedHashSet0); PhoneticEngine.PhonemeBuilder phoneticEngine_PhonemeBuilder0 = PhoneticEngine.PhonemeBuilder.empty(languages_LanguageSet0); Rule.Phoneme rule_Phoneme0 = new Rule.Phoneme("", languages_LanguageSet0); // Undeclared exception! try { phoneticEngine_PhonemeBuilder0.apply(rule_Phoneme0, 1); fail("Expecting exception: NoClassDefFoundError"); } catch(NoClassDefFoundError e) { // // Could not initialize class org.apache.commons.codec.language.bm.Languages // verifyException("org.apache.commons.codec.language.bm.Languages$SomeLanguages", e); } } @Test(timeout = 4000) public void test5() throws Throwable { PhoneticEngine.PhonemeBuilder phoneticEngine_PhonemeBuilder0 = PhoneticEngine.PhonemeBuilder.empty((Languages.LanguageSet) null); LinkedList<Rule.Phoneme> linkedList0 = new LinkedList<Rule.Phoneme>(); Rule.PhonemeList rule_PhonemeList0 = new Rule.PhonemeList(linkedList0); phoneticEngine_PhonemeBuilder0.apply(rule_PhonemeList0, 0); } @Test(timeout = 4000) public void test6() throws Throwable { LinkedHashSet<String> linkedHashSet0 = new LinkedHashSet<String>(); linkedHashSet0.add("bA$"); Languages.LanguageSet languages_LanguageSet0 = Languages.LanguageSet.from(linkedHashSet0); PhoneticEngine.PhonemeBuilder phoneticEngine_PhonemeBuilder0 = PhoneticEngine.PhonemeBuilder.empty(languages_LanguageSet0); phoneticEngine_PhonemeBuilder0.append("bA$"); assertTrue(linkedHashSet0.contains("bA$")); } @Test(timeout = 4000) public void test7() throws Throwable { RuleType ruleType0 = RuleType.EXACT; NameType nameType0 = NameType.GENERIC; PhoneticEngine phoneticEngine0 = null; try { phoneticEngine0 = new PhoneticEngine(nameType0, ruleType0, false); fail("Expecting exception: NoClassDefFoundError"); } catch(NoClassDefFoundError e) { // // Could not initialize class org.apache.commons.codec.language.bm.Lang // verifyException("org.apache.commons.codec.language.bm.PhoneticEngine", e); } } @Test(timeout = 4000) public void test8() throws Throwable { LinkedHashSet<String> linkedHashSet0 = new LinkedHashSet<String>(); linkedHashSet0.add(""); Languages.LanguageSet languages_LanguageSet0 = Languages.LanguageSet.from(linkedHashSet0); PhoneticEngine.PhonemeBuilder phoneticEngine_PhonemeBuilder0 = PhoneticEngine.PhonemeBuilder.empty(languages_LanguageSet0); Set<Rule.Phoneme> set0 = phoneticEngine_PhonemeBuilder0.getPhonemes(); assertEquals(1, set0.size()); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
fd7f51709fc040f5e09ace962bd9225898211324
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/zhihu/android/app/feed/p1083ui/holder/p1103ad/AdFocusVideoDynamicViewHolder.java
b4f0df49f09cd6207bd4e6a69f9d87d3d7f47635
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,721
java
package com.zhihu.android.app.feed.p1083ui.holder.p1103ad; import android.view.View; import android.widget.TextView; import com.secneo.apkwrapper.C6969H; import com.zhihu.android.R; import com.zhihu.android.api.model.FeedAdvert; import com.zhihu.android.p945ad.C9180g; import com.zhihu.android.video.player2.widget.VideoInlineVideoView; /* renamed from: com.zhihu.android.app.feed.ui.holder.ad.AdFocusVideoDynamicViewHolder */ public class AdFocusVideoDynamicViewHolder extends AdFocusDynamicAdViewHolder { /* renamed from: B */ private boolean m61613B() { return true; } public AdFocusVideoDynamicViewHolder(View view) { super(view); } /* access modifiers changed from: protected */ @Override // com.zhihu.android.app.feed.p1083ui.holder.p1103ad.AdFocusDynamicAdViewHolder, com.zhihu.android.app.feed.p1083ui.holder.p1103ad.BaseDynamicAdViewHolder, com.zhihu.android.app.feed.p1083ui.holder.p1103ad.BaseAdFeedHolder /* renamed from: a */ public void mo56529a(FeedAdvert feedAdvert) { super.mo56529a(feedAdvert); TextView textView = (TextView) this.f43883j.findViewByStringTag(C6969H.m41409d("G68879B0CB634AE26A801864DE0E9C2CE2794DC1CB6")); if (textView == null) { C9180g.m54586b("wifiTips is null"); return; } textView.setVisibility(m61613B() ? 0 : 4); VideoInlineVideoView A = mo67275A(); if (A != null) { try { TextView textView2 = (TextView) A.findViewById(R.id.duration); if (textView2 != null) { textView2.setVisibility(4); } } catch (Exception unused) { } } } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
29bc8c8da1f9a955e2504e92a9ea07642afe6f06
0d0d2eb6da1b7f9416f5baac5041e84e3f9e66a6
/drools-model/drools-canonical-model/src/main/java/org/drools/model/functions/Predicate3.java
396f8f0de956389c1140dfc03ed262ce827f1adb
[ "Apache-2.0" ]
permissive
denis554/drools
33dcddc6d5c61fdd405c8be2dbbfbe4ea3e189be
90479684574a001c5a5cf60ad30f02d11f6c0e98
refs/heads/master
2020-04-25T01:10:34.137932
2019-02-22T16:45:54
2019-02-22T16:45:54
172,400,914
1
0
Apache-2.0
2019-02-24T23:01:55
2019-02-24T23:01:54
null
UTF-8
Java
false
false
661
java
package org.drools.model.functions; import java.io.Serializable; public interface Predicate3<A, B, C> extends Serializable { boolean test(A a, B b, C c) throws Exception; class Impl<A, B, C> extends IntrospectableLambda implements Predicate3<A, B, C> { private final Predicate3<A, B, C> predicate; public Impl(Predicate3<A, B, C> predicate) { this.predicate = predicate; } @Override public boolean test(A a, B b, C c) throws Exception { return predicate.test(a, b, c); } @Override public Object getLambda() { return predicate; } } }
[ "mario.fusco@gmail.com" ]
mario.fusco@gmail.com
ec5b09557ed676becbb2dea8018b6f883cfca716
0e7f18f5c03553dac7edfb02945e4083a90cd854
/src/main/resources/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/tables/PgReplicationOriginStatus.java
15a7c78625bed8a3276020f12e033071968a7398
[]
no_license
brunomathidios/PostgresqlWithDocker
13604ecb5506b947a994cbb376407ab67ba7985f
6b421c5f487f381eb79007fa8ec53da32977bed1
refs/heads/master
2020-03-22T00:54:07.750044
2018-07-02T22:20:17
2018-07-02T22:20:17
139,271,591
0
0
null
null
null
null
UTF-8
Java
false
true
4,850
java
/* * This file is generated by jOOQ. */ package com.br.sp.posgresdocker.model.jooq.pg_catalog.tables; import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog; import com.br.sp.posgresdocker.model.jooq.pg_catalog.tables.records.PgReplicationOriginStatusRecord; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; import org.jooq.impl.DSL; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class PgReplicationOriginStatus extends TableImpl<PgReplicationOriginStatusRecord> { private static final long serialVersionUID = -845492361; /** * The reference instance of <code>pg_catalog.pg_replication_origin_status</code> */ public static final PgReplicationOriginStatus PG_REPLICATION_ORIGIN_STATUS = new PgReplicationOriginStatus(); /** * The class holding records for this type */ @Override public Class<PgReplicationOriginStatusRecord> getRecordType() { return PgReplicationOriginStatusRecord.class; } /** * The column <code>pg_catalog.pg_replication_origin_status.local_id</code>. */ public final TableField<PgReplicationOriginStatusRecord, Long> LOCAL_ID = createField("local_id", org.jooq.impl.SQLDataType.BIGINT, this, ""); /** * The column <code>pg_catalog.pg_replication_origin_status.external_id</code>. */ public final TableField<PgReplicationOriginStatusRecord, String> EXTERNAL_ID = createField("external_id", org.jooq.impl.SQLDataType.CLOB, this, ""); /** * @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration. */ @java.lang.Deprecated public final TableField<PgReplicationOriginStatusRecord, Object> REMOTE_LSN = createField("remote_lsn", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"pg_lsn\""), this, ""); /** * @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration. */ @java.lang.Deprecated public final TableField<PgReplicationOriginStatusRecord, Object> LOCAL_LSN = createField("local_lsn", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"pg_lsn\""), this, ""); /** * Create a <code>pg_catalog.pg_replication_origin_status</code> table reference */ public PgReplicationOriginStatus() { this(DSL.name("pg_replication_origin_status"), null); } /** * Create an aliased <code>pg_catalog.pg_replication_origin_status</code> table reference */ public PgReplicationOriginStatus(String alias) { this(DSL.name(alias), PG_REPLICATION_ORIGIN_STATUS); } /** * Create an aliased <code>pg_catalog.pg_replication_origin_status</code> table reference */ public PgReplicationOriginStatus(Name alias) { this(alias, PG_REPLICATION_ORIGIN_STATUS); } private PgReplicationOriginStatus(Name alias, Table<PgReplicationOriginStatusRecord> aliased) { this(alias, aliased, null); } private PgReplicationOriginStatus(Name alias, Table<PgReplicationOriginStatusRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, DSL.comment("")); } public <O extends Record> PgReplicationOriginStatus(Table<O> child, ForeignKey<O, PgReplicationOriginStatusRecord> key) { super(child, key, PG_REPLICATION_ORIGIN_STATUS); } /** * {@inheritDoc} */ @Override public Schema getSchema() { return PgCatalog.PG_CATALOG; } /** * {@inheritDoc} */ @Override public PgReplicationOriginStatus as(String alias) { return new PgReplicationOriginStatus(DSL.name(alias), this); } /** * {@inheritDoc} */ @Override public PgReplicationOriginStatus as(Name alias) { return new PgReplicationOriginStatus(alias, this); } /** * Rename this table */ @Override public PgReplicationOriginStatus rename(String name) { return new PgReplicationOriginStatus(DSL.name(name), null); } /** * Rename this table */ @Override public PgReplicationOriginStatus rename(Name name) { return new PgReplicationOriginStatus(name, null); } }
[ "brunomathidios@yahoo.com.br" ]
brunomathidios@yahoo.com.br
f4861e5e82bdc84d51b3d084f6f18007948c6157
c1a9357cf34cb93fe1828a43d6782bcefa211804
/source_code/netweaver/src/main/java/com/sap/netweaver/porta/core/ServerFactory.java
80d2ada69b8ba314fd3822c4ae16c9c3b92373b9
[]
no_license
Hessah/Quality-Metrics-of-Test-suites-for-TDD-Applications
d5bd48b1c1965229f8249dcfc53a10869bb9bbb0
d7abc677685ab0bc11ae9bc41dd2554bceaf18a8
refs/heads/master
2020-05-29T22:38:33.553795
2014-12-22T23:55:02
2014-12-22T23:55:02
24,071,022
2
0
null
null
null
null
UTF-8
Java
false
false
5,693
java
/******************************************************************************* * Copyright (c) 2009, 2010 SAP AG. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kaloyan Raev (SAP AG) - initial API and implementation *******************************************************************************/ package com.sap.netweaver.porta.core; import java.io.IOException; import java.lang.reflect.Method; import java.net.URL; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import java.util.Properties; /** * The <code>ServerFactory</code> is used to create instances of the * <code>Server</code> interface that represent physical SAP NetWeaver Application * Server systems. * * <p> * The factory requires a set of <code>Properties</code> to create a * <code>Server</code> instance. These properties determine the correct * implementation object that will be created. The <code>Server</code> * interface hides the specifics of the implementation and provides only an * abstract interface to operate with the physical system. * </p> * * <p> * Another goal of the <code>ServerFactory</code> is to optimize the creation * of <code>Server</code> instances. The factory remembers all created * <code>Server</code> instances with their corresponding properties. If, on a * further call to create a <code>Server</code> instance, the same properties * are given, then the factory returns the <code>Server</code> instance that * has already been created. This way duplicate instances to one and the same * physical system are avoided. Users of the factory do not need to persist * the <code>Server</code> instances created from the factory, because they * can be obtained again from the factory using the same set of properties. * </p> * * @see Server */ public class ServerFactory { /** * Constant for the <b>server.type</b> property used for creating a * </code>Server</code> instance. * * <p> * The <b>server.type</b> property specifies the version of the SAP * NetWeaver Application Server system. * </p> */ public static final String SERVER_TYPE = "server.type"; /* * A map where discovered server types and their factory classes are * registered. */ private final static Map<String, String> map = new HashMap<String, String>(); /* * Browse through the JARs in the classpath to discover server types. */ static { try { // Retrieve a list of all porta.properties files in the default // package of the JARs in the classpath Enumeration<URL> resources = ServerFactory.class.getClassLoader().getResources("porta.properties"); while (resources.hasMoreElements()) { URL url = resources.nextElement(); // load the porta.properties file Properties props = new Properties(); props.load(url.openStream()); // retrieve the server.type property String type = props.getProperty(SERVER_TYPE); // retrieve the server.factory property String factory = props.getProperty("server.factory"); // register the discovered server type in the map if (type != null && factory != null) { map.put(type, factory); } } } catch (IOException e) { e.printStackTrace(); } } /** * Creates an instance of the <code>Server</code> interface that represents * a physical SAP NetWeaver Application Server system. * * <p> * It is mandatory to specify the <code>ServerType</code> property. It * determines the type of the implementation type that will be created for * the <code>Server</code> interface. The valid property value for a * specific implementation type could be obtained from the * </code>porta.properties</code> file in the implementation JAR. * </p> * * </p> Other required properties are specific to the selected server type. * Consult the java doc of the server factory class in the implementation * JAR. </p> * * @param props * - a set of properties that determines the implementation * object that will be returned as instance of the * <code>Server</code> interface * * @return instance of the <code>Server</code> interface. * * @throws IllegalArgumentException * - if a required property is missing, or a property value is * invalid or not supported * @throws CoreException * - if a problem happens while creating the <code>Server</code> * instance * * @see #SERVER_TYPE */ public static Server createServer(Properties properties) throws CoreException { if (properties == null) { throw new NullPointerException("properties cannot be null"); } String type = properties.getProperty(SERVER_TYPE); if (type == null) { throw new IllegalArgumentException(String.format("%s property missing", SERVER_TYPE)); } String factory = map.get(type); if (factory == null) { throw new IllegalArgumentException(String.format("%s is not supported server type. Supported types are: %s. ", type, map.keySet())); } try { Class<?> factoryClass = Class.forName(factory); Method method = factoryClass.getMethod("createServer", new Class[] { Properties.class }); return (Server) method.invoke(null, properties); } catch (Exception e) { throw new CoreException(e); } } }
[ "hesaah@gmail.com" ]
hesaah@gmail.com
19d359c91f25b39125f6edbfabc4bd6b09678eba
7cee770c9a0b35fb881f2a54cac688de72e8c511
/DOM/src/dombook/suathongtin.java
0bc40f056b97723ab87dbfcaadae3fec8407cfba
[]
no_license
nguyenbahung94/Java
e65920bdeffcd7954e01f22fa9abd5a0dedc23b7
84350c6bc619fc913a8e8f9e7963fa6b8c075ee1
refs/heads/master
2021-01-10T06:22:13.219546
2016-03-21T17:47:17
2016-03-21T17:47:17
54,410,392
0
0
null
null
null
null
UTF-8
Java
false
false
4,257
java
package dombook; import java.io.File; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Scanner; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; public class suathongtin { static String path="C:\\Users\\everything\\Desktop\\lap trinh huong dich vu\\DOM\\src\\dombook\\book.xml"; public static void main(String[] args) { File file=new File(path); Scanner scan=new Scanner(System.in); DocumentBuilderFactory build = DocumentBuilderFactory.newInstance(); DocumentBuilder builder; try { builder = build.newDocumentBuilder(); Document document=builder.parse(file); Element ele=document.getDocumentElement(); NodeList list=ele.getChildNodes(); System.out.println("nhap vao id"); String id=scan.nextLine(); for(int i=0;i<list.getLength();i++){ Element elstudent = (Element)document.getElementsByTagName("book").item(i); if(elstudent!=null){ if(elstudent.getAttribute("id").equalsIgnoreCase(id)) { Element elauthor = (Element)elstudent.getElementsByTagName("author").item(0); Element eltitle = (Element) elstudent.getElementsByTagName("title").item(0); Element elgenre = (Element) elstudent.getElementsByTagName("genre").item(0); Element elprince = (Element) elstudent.getElementsByTagName("price").item(0); Element elpusbli = (Element)elstudent.getElementsByTagName("publish_date").item(0); Element elxnb = (Element)elstudent.getElementsByTagName("nxb").item(0); Element elxdescrip = (Element)elstudent.getElementsByTagName("description").item(0); System.out.println("nhap vao author"); String author=scan.nextLine(); System.out.println("nhap vao title"); String title=scan.nextLine(); System.out.println("nhap vao genre"); String genre=scan.nextLine(); System.out.println("nhap vao prince"); String prince=scan.nextLine(); System.out.println("nhap vao publish date"); String publish=scan.nextLine(); System.out.println("nhap vao nxb"); String xnb=scan.nextLine(); System.out.println("nhap vao description"); String description=scan.nextLine(); elauthor.setTextContent(author); eltitle.setTextContent(title); elgenre.setTextContent(genre); elprince.setTextContent(prince); elpusbli.setTextContent(publish); elxnb.setTextContent(xnb); elxdescrip.setTextContent(description); ghi(document); } } } } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static final void ghi(Document xml) throws Exception { TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); DOMSource source = new DOMSource(xml); StreamResult result = new StreamResult(new File("src\\dom\\book1.xml")); transformer.transform(source, result); // Output to console for testing Writer output = new StringWriter(); StreamResult consoleResult = new StreamResult(output); transformer.transform(source, consoleResult); System.out.println(output.toString()); } }
[ "mr.hungcity@gmail.com" ]
mr.hungcity@gmail.com
4a819fbaba0d9d0e412945630a81114719ea737a
ba1aa2e72bd7b139855f52013f35260ebcdbc853
/web/src/main/java/org/tdar/struts/action/bulk/BulkUpdateStatusAction.java
47e75ff90ee1c9e218da381bfccd7c836ae830ac
[ "Apache-2.0" ]
permissive
digital-antiquity/tdar
6286194f87c559a9b50af38543b5525bfa0ca6d6
4984d088921f2a33e566e1d4b121e157d4a283f5
refs/heads/master
2023-08-15T21:21:12.184455
2023-08-04T05:58:21
2023-08-04T05:58:21
149,938,554
2
3
NOASSERTION
2023-09-14T17:04:05
2018-09-23T01:30:51
Java
UTF-8
Java
false
false
2,336
java
package org.tdar.struts.action.bulk; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; import org.apache.struts2.convention.annotation.ParentPackage; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.interceptor.validation.SkipValidation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.tdar.core.service.bulk.BulkUpdateReceiver; import org.tdar.core.service.bulk.BulkUploadService; import org.tdar.struts.action.AbstractAuthenticatableAction; import org.tdar.struts.interceptor.annotation.HttpsOnly; import org.tdar.struts_base.interceptor.annotation.PostOnly; import org.tdar.struts_base.result.HasJsonDocumentResult; import com.opensymphony.xwork2.Preparable; @ParentPackage("secured") @Component @HttpsOnly @Scope("prototype") @Namespace("/bulk") public class BulkUpdateStatusAction extends AbstractAuthenticatableAction implements Preparable, HasJsonDocumentResult { private static final long serialVersionUID = -5855079741655022360L; @Autowired private transient BulkUploadService bulkUploadService; private Long ticketId; private BulkUpdateReceiver status = new BulkUpdateReceiver(); @Override public void prepare() { BulkUpdateReceiver checkAsyncStatus = bulkUploadService.checkAsyncStatus(getTicketId()); if (checkAsyncStatus != null) { setStatus(checkAsyncStatus); } if (getStatus() != null) { getLogger().debug("{} {}%", getStatus().getMessage(), getStatus().getPercentComplete()); } } @Override public Object getResultObject() { return getStatus(); } @SkipValidation @Action(value = "checkstatus", results = { @Result(name = SUCCESS, type = JSONRESULT) }) @PostOnly public String checkStatus() { return SUCCESS; } public Long getTicketId() { return ticketId; } public void setTicketId(Long ticketId) { this.ticketId = ticketId; } public BulkUpdateReceiver getStatus() { return status; } public void setStatus(BulkUpdateReceiver status) { this.status = status; } }
[ "abrin@digitalantiquity.org" ]
abrin@digitalantiquity.org
6c6b0dcdc1258abc56002cf4a08b9175c4992769
17a8c11a36b9ae72fe47e584ba63a8a9d7e9dfeb
/src/main/java/com/space/demo/spider/newsRecommend/QuestionAnswer.java
5e30de6b1729af09f527a6f27f432a7846b6b801
[]
no_license
LumenWang/Knowledge_Graph_Aerospace
7a0ec1c047616a70a548b2ece0e0d36e79873469
1e745cbc1b1d1c9f073f91c8ee64a8eee2a7e75d
refs/heads/master
2023-05-13T01:31:10.050776
2021-06-01T13:14:02
2021-06-01T13:14:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,755
java
package com.space.demo.spider.newsRecommend; import com.space.demo.entity.newsReommend.Question; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import us.codecraft.webmagic.Page; import us.codecraft.webmagic.Site; import us.codecraft.webmagic.processor.PageProcessor; import us.codecraft.webmagic.selector.Selectable; import java.util.ArrayList; import java.util.List; @Component public class QuestionAnswer implements PageProcessor { @Value("${spring.spider.timeout}") private Integer timeout; @Value("${spring.spider.sleeptime}") private Integer sleeptime; @Value("${spring.spider.retrytimes}") private Integer retrytimes; @Value("${spring.spider.retrysleeptime}") private Integer retrysleeptime; List<Question> questions = new ArrayList<>(); @Override public void process(Page page) { List<Selectable> nodes = page.getHtml().xpath("//tr").nodes(); for(Selectable node:nodes){ String question = node.xpath("//dt/allText()").get().trim().substring(2); String itemA = node.xpath("//li[1]/allText()").get().trim(); String itemB = node.xpath("//li[2]/allText()").get().trim(); String itemC = node.xpath("//li[3]/allText()").get().trim(); String itemD = node.xpath("//li[4]/allText()").get().trim(); questions.add(new Question(question,itemA,itemB,itemC,itemD)); } page.putField("question",questions); } @Override public Site getSite() { return new Site().setTimeOut(timeout) .setSleepTime(sleeptime) .setRetryTimes(retrytimes) .setRetrySleepTime(retrysleeptime); } }
[ "1093453695@qq.com" ]
1093453695@qq.com
bf9dd337a3c1ad30374fd38cb86235f4678f8f8f
7bfe3e48037c507b3797bf7059a070ccf03b779c
/build/generated-sources/jax-ws/co/matisses/b1ws/drafts/UpdateFromXML.java
4cae1992acc06f49a5da8eae68ca063d71165484
[]
no_license
matisses/B1WSClient
c0f8147a0f86eb7ef8377f2398ecfc248c6159e2
6fdc8d1010cc6d3cc32a583b63d2d538fc1a540b
refs/heads/master
2020-03-17T12:13:04.267787
2018-05-15T22:14:50
2018-05-15T22:14:50
133,578,758
1
1
null
null
null
null
UTF-8
Java
false
false
1,516
java
package co.matisses.b1ws.drafts; 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>Clase Java para anonymous complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.sap.com/SBO/DIS}Document" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "document" }) @XmlRootElement(name = "UpdateFromXML", namespace = "DraftsService") public class UpdateFromXML { @XmlElement(name = "Document") protected Document document; /** * Obtiene el valor de la propiedad document. * * @return * possible object is * {@link Document } * */ public Document getDocument() { return document; } /** * Define el valor de la propiedad document. * * @param value * allowed object is * {@link Document } * */ public void setDocument(Document value) { this.document = value; } }
[ "ygil@matisses.co" ]
ygil@matisses.co
152efa84c7b8c83cbc1e335110fe9305cf19adf3
88f997d8bb36917a4dcbde5e2dea99d4f6ab6563
/workspace/okwei-myportal/src/main/java/com/okwei/myportal/service/IDistributorMgtService.java
6d20b5250f447ec4593dbe536832a51da00613a6
[]
no_license
cenbow/wd
f68843fec0da31487ce9f8928383d9979a643185
c32f30107cf44dff45027447c0b6f29fc35e571f
refs/heads/master
2021-01-21T17:23:37.337895
2016-12-01T06:57:59
2016-12-01T06:57:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.okwei.myportal.service; import com.okwei.common.Limit; import com.okwei.common.PageResult; import com.okwei.myportal.bean.vo.DistributorVO; import com.okwei.service.IBaseService; public interface IDistributorMgtService extends IBaseService { PageResult<DistributorVO> getMyDistributors(Long userId, Limit limit); }
[ "okmen.zy@foxmail.com" ]
okmen.zy@foxmail.com
84c357f264d38dd2bd42dd8c8f16a18888166bbf
35d7385f92e046e9ccf6a5697dc76396d8720244
/Clase03/AprendiendoColecciones/src/pe/uni/aprendiendocolecciones/set/Ejemplo01.java
72cf6a15f1fb01f1bd044981311dbd6989d0812d
[]
no_license
gcoronelc/JAVA-OO-2020-1
81d95e310ceabdd438cb99c12eea016dcd09e8bb
47309db120011e944add50bd3e9ab1bdbee241e3
refs/heads/master
2020-12-07T20:33:35.415018
2020-01-23T13:04:33
2020-01-23T13:04:33
232,795,350
2
0
null
null
null
null
UTF-8
Java
false
false
554
java
package pe.uni.aprendiendocolecciones.set; import java.util.HashSet; import java.util.Set; /** * * @author Gustavo Coronel * @blog gcoronelc.blogspot.pe * @videos youtube.com/c/DesarrollaSoftware */ public class Ejemplo01 { public static void main(String[] args) { Set<String> lista = new HashSet<>(); lista.add("Alianza Lima"); lista.add("Deportiva Barrio"); lista.add("Club de Gustavo"); lista.add("Real Madrid"); lista.add("Real Madrid"); for (String nombre : lista) { System.out.println(nombre); } } }
[ "gcoronelc@gmail.com" ]
gcoronelc@gmail.com
7ce0dfc1b4529d2ef6d139c1b4477509d0c3b107
7884ee9eefe884eba1a8db0722c556729647d23a
/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/JavaCompilerFieldValuesParser.java
a56ce83b5c5941e1b253e2135aa83b9c202fa022
[ "Apache-2.0" ]
permissive
1030907690/spring-boot-2.0.4.RELEASE
c050d74e3b89c3edc6bdef3993153b8aec265ff4
0426c9aa8f6767b4e8e584c957439c8d373aae30
refs/heads/master
2023-01-23T01:33:09.576021
2022-05-07T08:42:42
2022-05-07T08:42:42
165,577,620
1
0
Apache-2.0
2022-12-27T14:52:43
2019-01-14T01:48:13
Java
UTF-8
Java
false
false
6,301
java
/* * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.boot.configurationprocessor.fieldvalues.javac; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import org.springframework.boot.configurationprocessor.fieldvalues.FieldValuesParser; /** * {@link FieldValuesParser} implementation for the standard Java compiler. * * @author Phillip Webb * @author Stephane Nicoll * @since 1.2.0 */ public class JavaCompilerFieldValuesParser implements FieldValuesParser { private final Trees trees; public JavaCompilerFieldValuesParser(ProcessingEnvironment env) throws Exception { this.trees = Trees.instance(env); } @Override public Map<String, Object> getFieldValues(TypeElement element) throws Exception { Tree tree = this.trees.getTree(element); if (tree != null) { FieldCollector fieldCollector = new FieldCollector(); tree.accept(fieldCollector); return fieldCollector.getFieldValues(); } return Collections.emptyMap(); } /** * {@link TreeVisitor} to collect fields. */ private static class FieldCollector implements TreeVisitor { private static final Map<String, Class<?>> WRAPPER_TYPES; static { Map<String, Class<?>> types = new HashMap<>(); types.put("boolean", Boolean.class); types.put(Boolean.class.getName(), Boolean.class); types.put("byte", Byte.class); types.put(Byte.class.getName(), Byte.class); types.put("short", Short.class); types.put(Short.class.getName(), Short.class); types.put("int", Integer.class); types.put(Integer.class.getName(), Integer.class); types.put("long", Long.class); types.put(Long.class.getName(), Long.class); WRAPPER_TYPES = Collections.unmodifiableMap(types); } private static final Map<Class<?>, Object> DEFAULT_TYPE_VALUES; static { Map<Class<?>, Object> values = new HashMap<>(); values.put(Boolean.class, false); values.put(Byte.class, (byte) 0); values.put(Short.class, (short) 0); values.put(Integer.class, 0); values.put(Long.class, (long) 0); DEFAULT_TYPE_VALUES = Collections.unmodifiableMap(values); } private static final Map<String, Object> WELL_KNOWN_STATIC_FINALS; static { Map<String, Object> values = new HashMap<>(); values.put("Boolean.TRUE", true); values.put("Boolean.FALSE", false); values.put("StandardCharsets.ISO_8859_1", "ISO-8859-1"); values.put("StandardCharsets.UTF_8", "UTF-8"); values.put("StandardCharsets.UTF_16", "UTF-16"); values.put("StandardCharsets.US_ASCII", "US-ASCII"); WELL_KNOWN_STATIC_FINALS = Collections.unmodifiableMap(values); } private static final String DURATION_OF = "Duration.of"; private static final Map<String, String> DURATION_SUFFIX; static { Map<String, String> values = new HashMap<>(); values.put("Nanos", "ns"); values.put("Millis", "ms"); values.put("Seconds", "s"); values.put("Minutes", "m"); values.put("Hours", "h"); values.put("Days", "d"); DURATION_SUFFIX = Collections.unmodifiableMap(values); } private final Map<String, Object> fieldValues = new HashMap<>(); private final Map<String, Object> staticFinals = new HashMap<>(); @Override public void visitVariable(VariableTree variable) throws Exception { Set<Modifier> flags = variable.getModifierFlags(); if (flags.contains(Modifier.STATIC) && flags.contains(Modifier.FINAL)) { this.staticFinals.put(variable.getName(), getValue(variable)); } if (!flags.contains(Modifier.FINAL)) { this.fieldValues.put(variable.getName(), getValue(variable)); } } private Object getValue(VariableTree variable) throws Exception { ExpressionTree initializer = variable.getInitializer(); Class<?> wrapperType = WRAPPER_TYPES.get(variable.getType()); Object defaultValue = DEFAULT_TYPE_VALUES.get(wrapperType); if (initializer != null) { return getValue(initializer, defaultValue); } return defaultValue; } private Object getValue(ExpressionTree expression, Object defaultValue) throws Exception { Object literalValue = expression.getLiteralValue(); if (literalValue != null) { return literalValue; } Object factoryValue = expression.getFactoryValue(); if (factoryValue != null) { return getFactoryValue(expression, factoryValue); } List<? extends ExpressionTree> arrayValues = expression.getArrayExpression(); if (arrayValues != null) { Object[] result = new Object[arrayValues.size()]; for (int i = 0; i < arrayValues.size(); i++) { Object value = getValue(arrayValues.get(i), null); if (value == null) { // One of the elements could not be resolved return defaultValue; } result[i] = value; } return result; } if (expression.getKind().equals("IDENTIFIER")) { return this.staticFinals.get(expression.toString()); } if (expression.getKind().equals("MEMBER_SELECT")) { return WELL_KNOWN_STATIC_FINALS.get(expression.toString()); } return defaultValue; } private Object getFactoryValue(ExpressionTree expression, Object factoryValue) { Object instance = expression.getInstance(); if (instance != null && instance.toString().startsWith(DURATION_OF)) { String type = instance.toString(); type = type.substring(DURATION_OF.length(), type.indexOf('(')); String suffix = DURATION_SUFFIX.get(type); return (suffix != null) ? factoryValue + suffix : null; } return factoryValue; } public Map<String, Object> getFieldValues() { return this.fieldValues; } } }
[ "1030907690@qq.com" ]
1030907690@qq.com
14b490c2879dd90bae2bce449711cf09fa1f1d7a
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/61/org/apache/commons/lang/NumberUtils_createBigDecimal_377.java
3b8d12b917b6a1a8fd862ac7a090b50bbbf25078
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,348
java
org apach common lang extra function java number class author href mailto bayard generationjava henri yandel author href mailto rand mcneeli yahoo rand neeli mcneeli author stephen colebourn author href mailto steve downei netfolio steve downei author eric pugh author phil steitz version deprec move org apach common lang math class remov common lang number util numberutil convert code string code code big decim bigdecim code param val code string code convert convert code big decim bigdecim code number format except numberformatexcept convert big decim bigdecim creat big decim createbigdecim string val big decim bigdecim big decim bigdecim val
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
697e244102d420716098e3dd8c62c05965a997df
ae6b36ea0c1e5e8a5f52a59db155b698e1d6b558
/src/main/java/com/github/fge/jsonschema/keyword/digest/NullDigester.java
d1d6f59da7bdf45badf0d8fbfbd9956b3cd32a77
[]
no_license
erwink/json-schema-validator
5eeae39fb95ead27131c689a22757dc3d97d00b1
dce5c64379e455488c60f8f59cfbe7ba99fbb5f8
refs/heads/master
2020-12-25T17:14:45.268780
2013-02-08T14:00:32
2013-02-08T14:00:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
/* * Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the Lesser 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 * Lesser GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.github.fge.jsonschema.keyword.digest; import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jsonschema.util.NodeType; public final class NullDigester extends AbstractDigester { public NullDigester(final String keyword, final NodeType first, final NodeType... other) { super(keyword, first, other); } @Override public JsonNode digest(final JsonNode schema) { return FACTORY.nullNode(); } }
[ "fgaliegue@gmail.com" ]
fgaliegue@gmail.com
5a2a2c05512ce6c9517e6bdbf873be01b16ba086
c3a78a28ea12b598b7287a804a099529a0910337
/src/main/java/ar/com/telecom/gemp/domain/TipoObra.java
d5a72c91ac03b3ff35332e8d26e500288fbaf24c
[]
no_license
Palopezg/gemp
80be9ad7766167e7507a97ee024b1b792e76a0b5
c582b440489e198b99510bd1164c93d5b51721ad
refs/heads/master
2023-04-22T18:25:26.038545
2020-11-16T13:13:40
2020-11-16T13:13:40
288,794,038
0
1
null
2021-03-16T15:30:58
2020-08-19T17:24:33
TypeScript
UTF-8
Java
false
false
2,048
java
package ar.com.telecom.gemp.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import javax.persistence.*; import java.io.Serializable; /** * A TipoObra. */ @Entity @Table(name = "tipo_obra") public class TipoObra implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @Column(name = "descripcion") private String descripcion; @ManyToOne @JsonIgnoreProperties(value = "tipoObras", allowSetters = true) private Segmento segmento; // jhipster-needle-entity-add-field - JHipster will add fields here public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDescripcion() { return descripcion; } public TipoObra descripcion(String descripcion) { this.descripcion = descripcion; return this; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public Segmento getSegmento() { return segmento; } public TipoObra segmento(Segmento segmento) { this.segmento = segmento; return this; } public void setSegmento(Segmento segmento) { this.segmento = segmento; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TipoObra)) { return false; } return id != null && id.equals(((TipoObra) o).id); } @Override public int hashCode() { return 31; } // prettier-ignore @Override public String toString() { return "TipoObra{" + "id=" + getId() + ", descripcion='" + getDescripcion() + "'" + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f414fefd1ec774d26c5daf6b4aa5c0fe35ae090d
ad01d3afcadd5b163ecf8ba60ba556ea268b4827
/amuedrp/trunk/LibMS/src/java/com/myapp/struts/circulation/OpacCheckOutDoc.java
dcfaa6f25e59c3f9f3f6eea27438254292590a5a
[]
no_license
ynsingh/repos
64a82c103f0033480945fcbb567b599629c4eb1b
829ad133367014619860932c146c208e10bb71e0
refs/heads/master
2022-04-18T11:39:24.803073
2020-04-08T09:39:43
2020-04-08T09:39:43
254,699,274
1
2
null
null
null
null
UTF-8
Java
false
false
2,125
java
package com.myapp.struts.circulation; import com.myapp.struts.admin.*; public class OpacCheckOutDoc { private String memid; private String memname; private String accession_no; private String document_id; private String call_no; private String title; private String author; /** * @return the memid */ public String getMemid() { return memid; } /** * @param memid the memid to set */ public void setMemid(String memid) { this.memid = memid; } /** * @return the memname */ public String getMemname() { return memname; } /** * @param memname the memname to set */ public void setMemname(String memname) { this.memname = memname; } /** * @return the accession_no */ public String getAccession_no() { return accession_no; } /** * @param accession_no the accession_no to set */ public void setAccession_no(String accession_no) { this.accession_no = accession_no; } /** * @return the document_id */ public String getDocument_id() { return document_id; } /** * @param document_id the document_id to set */ public void setDocument_id(String document_id) { this.document_id = document_id; } /** * @return the call_no */ public String getCall_no() { return call_no; } /** * @param call_no the call_no to set */ public void setCall_no(String call_no) { this.call_no = call_no; } /** * @return the title */ public String getTitle() { return title; } /** * @param title the title to set */ public void setTitle(String title) { this.title = title; } /** * @return the author */ public String getAuthor() { return author; } /** * @param author the author to set */ public void setAuthor(String author) { this.author = author; } }
[ "ynsingh@0c22728b-0eb9-4c4e-a44d-29de7e55569f" ]
ynsingh@0c22728b-0eb9-4c4e-a44d-29de7e55569f
e817233d4af1c7253f7acd53f60b9e1180283185
6f356af61b6a00bbd3064882ad16f77b814edecc
/product-app/src/main/java/cn/stylefeng/guns/cloud/product/service/Impl/GunsCouponProductServiceImpl.java
c2403e6b76cb9baaca703d992c01ab6158447438
[]
no_license
xwb666666/sp_server
7ebc34b0ea991aca0786520207fedfa69ac17de2
a8ed11913586cafa80778d0e9900b55bfc540e2b
refs/heads/master
2023-06-25T07:41:48.280132
2021-05-31T01:36:03
2021-05-31T01:37:30
387,706,227
0
0
null
null
null
null
UTF-8
Java
false
false
539
java
package cn.stylefeng.guns.cloud.product.service.Impl; import cn.stylefeng.guns.cloud.product.mapper.GunsCouponProductMapper; import cn.stylefeng.guns.cloud.product.model.api.GunsCouponProduct; import cn.stylefeng.guns.cloud.product.service.GunsCouponProductService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; @Service public class GunsCouponProductServiceImpl extends ServiceImpl<GunsCouponProductMapper, GunsCouponProduct> implements GunsCouponProductService { }
[ "15316314665@163.com" ]
15316314665@163.com
a241f648a0f6a91025073a370569577e0aac379a
adfc518a40bae0e7e0ef08700de231869cdc9e07
/src/main/java/zes/base/privacy/PrivacyHwpFileFilter.java
8994e33a804e68907e0158343395f7dff7555f43
[ "Apache-2.0" ]
permissive
tenbirds/OPENWORKS-3.0
49d28a2f9f9c9243b8f652de1d6bc97118956053
d9ea72589854380d7ad95a1df7e5397ad6d726a6
refs/heads/master
2020-04-10T02:49:18.841692
2018-12-07T03:40:00
2018-12-07T03:40:00
160,753,369
0
1
null
null
null
null
UTF-8
Java
false
false
1,680
java
/* * Copyright (c) 2012 ZES Inc. All rights reserved. This software is the * confidential and proprietary information of ZES Inc. You shall not disclose * such Confidential Information and shall use it only in accordance with the * terms of the license agreement you entered into with ZES Inc. * (http://www.zesinc.co.kr/) */ package zes.base.privacy; import java.io.File; import java.io.FileInputStream; /** * ํ•œ๊ธ€๊ณผ์ปดํ“จํ„ฐ HWP ํŒŒ์ผ(hwp ํ™•์žฅ์ž)์— ๋Œ€ํ•œ ๊ฐœ์ธ์ •๋ณด ํฌํ•จ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•œ๋‹ค. * * <pre> * << ๊ฐœ์ •์ด๋ ฅ(Modification Information) >> * * ์ˆ˜์ •์ผ ์ˆ˜์ •์ž ์ˆ˜์ •๋‚ด์šฉ * -------------- -------- ------------------------------- * * * 2013. 06. 04. ๋ฐฉ๊ธฐ๋ฐฐ ๊ฐœ์ธ์ •๋ณด ํ•„ํ„ฐ๋ง * </pre> */ public class PrivacyHwpFileFilter extends AbstractPrivacyFilter implements PrivacyFilter { public PrivacyHwpFileFilter(File file) throws Exception { this.file = file; } /* * HWP ํŒŒ์ผ๋‚ด์—์„œ ๊ฐœ์ธ์ •๋ณด๋ฅผ ํฌํ•จํ•œ ๊ฐ’์ด ์žˆ๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ํ™•์ธ * @see * zes.base.privacy.PrivacyFilter#doFilter(java.lang.String) */ @Override public boolean doFilter() { FileInputStream fileInput = null; try { fileInput = new FileInputStream(this.file); return doPrivacyCheck(""); } catch (Exception e) { logger.error("HWP(.hwp) File search Failed", e); return false; } finally { if(fileInput != null) { try { fileInput.close(); } catch (Exception e) {} } } } }
[ "tenbirds@gmail.com" ]
tenbirds@gmail.com
8e5bad9316105ffc3298fd39a8e31bee1863e8cc
b1d46d20de3352b7ab145b11374a0b32a9d53b20
/chapter15_day01/src/main/java/chapter15_day01/errorExample/CodeGroup.java
adbece1e0166a89fbd2707a90d9d7f16a1fa2a46
[]
no_license
KnewHow/studyDesignPatterns
5f6cd3561b7263b04e3c407e94cd4b84d8a4b19c
c7254b1172019494a8de9f70c2af23cb5fedba2a
refs/heads/master
2021-01-01T04:28:34.693674
2017-08-17T11:32:19
2017-08-17T11:32:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package chapter15_day01.errorExample; public class CodeGroup extends Group { @Override public void find() { System.out.println("find code group"); } @Override public void add() { System.out.println("add some codes"); } @Override public void delete() { System.out.println("delete some codes"); } @Override public void change() { System.out.println("change some codes"); } @Override public void plan() { System.out.println("exeute listing codes"); } }
[ "=" ]
=
c14513eab59e2bd2d31ce7021aabf9d5075511e2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_1358ff130f0a9a1080f1bdee962f4e197e8d6285/StringUtil/3_1358ff130f0a9a1080f1bdee962f4e197e8d6285_StringUtil_t.java
b33afe10f2ee98de64e5157b650c8b4267ece52f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,925
java
package net.pms.util; import static org.apache.commons.lang3.StringUtils.isBlank; public class StringUtil { private static final int[] MULTIPLIER = new int[] {1, 60, 3600, 24*3600}; public static final String ASS_TIME_FORMAT = "%01d:%02d:%02.2f"; public static final String SRT_TIME_FORMAT = "%02d:%02d:%02.3f"; public static final String SEC_TIME_FORMAT = "%02d:%02d:%02d"; /** * Appends "&lt;<u>tag</u> " to the StringBuilder. This is a typical HTML/DIDL/XML tag opening. * @param sb String to append the tag beginning to. * @param tag String that represents the tag */ public static void openTag(StringBuilder sb, String tag) { sb.append("&lt;"); sb.append(tag); } /** * Appends the closing symbol &gt; to the StringBuilder. This is a typical HTML/DIDL/XML tag closing. * @param sb String to append the ending character of a tag. */ public static void endTag(StringBuilder sb) { sb.append("&gt;"); } /** * Appends "&lt;/<u>tag</u>&gt;" to the StringBuilder. This is a typical closing HTML/DIDL/XML tag. * @param sb * @param tag */ public static void closeTag(StringBuilder sb, String tag) { sb.append("&lt;/"); sb.append(tag); sb.append("&gt;"); } public static void addAttribute(StringBuilder sb, String attribute, Object value) { sb.append(" "); sb.append(attribute); sb.append("=\""); sb.append(value); sb.append("\""); } public static void addXMLTagAndAttribute(StringBuilder sb, String tag, Object value) { sb.append("&lt;"); sb.append(tag); sb.append("&gt;"); sb.append(value); sb.append("&lt;/"); sb.append(tag); sb.append("&gt;"); } /** * Does basic transformations between characters and their HTML representation with ampersands. * @param s String to be encoded * @return Encoded String */ public static String encodeXML(String s) { s = s.replace("&", "&amp;"); s = s.replace("<", "&lt;"); s = s.replace(">", "&gt;"); s = s.replace("\"", "&quot;"); s = s.replace("'", "&apos;"); s = s.replace("&", "&amp;"); return s; } /** * Converts a URL string to a more canonical form * @param url String to be converted * @return Converted String. */ public static String convertURLToFileName(String url) { url = url.replace('/', '\u00b5'); url = url.replace('\\', '\u00b5'); url = url.replace(':', '\u00b5'); url = url.replace('?', '\u00b5'); url = url.replace('*', '\u00b5'); url = url.replace('|', '\u00b5'); url = url.replace('<', '\u00b5'); url = url.replace('>', '\u00b5'); return url; } /** * Parse as double, or if it's not just one number, handles {hour}:{minute}:{seconds} * * @param time * @return */ public static double convertStringToTime(String time) throws IllegalArgumentException { if (isBlank(time)) { throw new IllegalArgumentException("time String should not be blank."); } try { return Double.parseDouble(time); } catch (NumberFormatException e) { String[] arrs = time.split(":"); double value, sum = 0; for (int i = 0; i < arrs.length; i++) { String tmp = arrs[arrs.length - i - 1]; value = Double.parseDouble(tmp.replace(",",".")); sum += value * MULTIPLIER[i]; } return sum; } } /** * Converts time to string. * * @param d time in double. * @param timeFormat Format string e.g. "%02d:%02d:%02d" or use predefined constants * ASS_TIME_FORMAT, SRT_TIME_FORMAT, SEC_TIME_FORMAT. * * @return Converted String. */ public static String convertTimeToString(double d, String timeFormat) { double s = d % 60; int h = (int) (d / 3600); int m = ((int) (d / 60)) % 60; if (timeFormat.equals(SRT_TIME_FORMAT)) { return String.format(timeFormat, h, m, s).replaceAll("\\.", ","); } return String.format(timeFormat, h, m, s); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7d36c69a66a09bae50e50b63c607a8774a83d2f7
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/reduce/IntSumReducer.java
78906556af2561eecdd9edca2165ec38141694aa
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
415
java
package org.apache.hadoop.mapreduce.lib.reduce; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.mapreduce.Reducer; @InterfaceAudience.Public @InterfaceStability.Stable public class IntSumReducer<Key> extends Reducer<Key,IntWritable, Key,IntWritable>
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
560b39a20fa8c58f9bb8505862384e76d01a6434
cc953f667e11f32d4119ac827d9378ed477b7706
/backend-servers/tms-server/src/main/java/com/stosz/tms/web/ShippingController.java
0925ea1e70eb23f6c0e68a0233d2b1c6c0aea1b0
[]
no_license
ttggaa/erp
e20ed03ecf6965da95c9fc472d505ae8ef4f3902
167f5d60d085d016b08452083f172df654a7c5c5
refs/heads/master
2020-04-22T12:03:43.913915
2018-12-05T16:16:11
2018-12-05T16:16:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,880
java
package com.stosz.tms.web; import com.google.common.primitives.Ints; import com.google.errorprone.annotations.RestrictedApi; import com.stosz.plat.common.RestResult; import com.stosz.plat.common.ThreadLocalUtils; import com.stosz.plat.common.UserDto; import com.stosz.plat.web.AbstractController; import com.stosz.tms.enums.HandlerTypeEnum; import com.stosz.tms.model.Shipping; import com.stosz.tms.service.ShippingService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @RestController @RequestMapping("/tms/shipping") public class ShippingController extends AbstractController { private final Logger logger = LoggerFactory.getLogger(getClass()); @Resource private ShippingService shippingService; @RequestMapping(method = RequestMethod.GET) public RestResult selectShippingList(@RequestParam(name = "name", required = false) String name, @RequestParam(name = "page", required = true, defaultValue = "1") Integer page, @RequestParam(name = "limit", required = true, defaultValue = "10") Integer limit) { RestResult restResult = new RestResult(); restResult.setCode(RestResult.OK); int start = (page == null || page <= 0) ? 0 : (page - 1) * limit; limit = (limit == null) ? 10 : limit; Shipping shipping = new Shipping(); if (name != null) shipping.setShippingName(name); int shippingCount = shippingService.getShippingCount(shipping); restResult.setTotal(shippingCount); if (shippingCount == 0) { return restResult; } List<Shipping> shippingList = shippingService.getShippingList(name, start, limit); restResult.setDesc("ๆŸฅ่ฏขๆˆๅŠŸ"); restResult.setItem(shippingList); return restResult; } /** * ๆทปๅŠ ็‰ฉๆตๅ•† * @return */ @RequestMapping(method = RequestMethod.POST) public RestResult addShipping(Shipping shipping) { Assert.notNull(shipping.getShippingName(), "็‰ฉๆตๅ•†ๅ็งฐไธ่ƒฝไธบ็ฉบ!"); Assert.notNull(shipping.getShippingCode(), "็‰ฉๆตๅ•†ไปฃ็ ไธ่ƒฝไธบ็ฉบ!"); UserDto user = ThreadLocalUtils.getUser(); shipping.setCreator(user.getLastName()); shipping.setCreatorId(user.getId()); RestResult restResult = new RestResult(); shippingService.addShipping(shipping); restResult.setCode(RestResult.NOTICE); restResult.setDesc("ๆ–ฐๅขž็‰ฉๆตๅ•†ๆˆๅŠŸ"); return restResult; } /** * ไฟฎๆ”น็‰ฉๆตๅ•† * @return */ @RequestMapping(method = RequestMethod.PUT, value = "edit") public RestResult editShipping(@ModelAttribute Shipping shipping) { Assert.notNull(shipping.getId(), "idไธ่ƒฝไธบ็ฉบ!"); Assert.notNull(shipping.getShippingName(), "ๅ•†ๆˆทๅ็งฐไธ่ƒฝไธบ็ฉบ!"); UserDto user = ThreadLocalUtils.getUser(); shipping.setModifier(user.getLastName()); shipping.setModifierId(user.getId()); shippingService.editShipping(shipping); RestResult restResult = new RestResult(); restResult.setCode(RestResult.NOTICE); restResult.setDesc("ๆ›ดๆ–ฐ็‰ฉๆตๅ•†ๆˆๅŠŸ"); return restResult; } /** * ่Žทๅ–ๆ‰€ๆœ‰็š„shippingCodeๅˆ—่กจ * @return */ @RequestMapping(method = RequestMethod.GET, value = "codeList") public RestResult getShippingCodeList() { HandlerTypeEnum[] values = HandlerTypeEnum.values(); List<Map<String, Object>> codeMapList = new ArrayList<>(); for (HandlerTypeEnum typeEnum : values) { if (typeEnum.isVisible()) { Map<String, Object> codeMap = new HashMap<>(); codeMap.put("code", typeEnum.code()); codeMap.put("name", typeEnum.display()); codeMapList.add(codeMap); } } RestResult restResult = new RestResult(); restResult.setCode(RestResult.OK); restResult.setItem(codeMapList); return restResult; } }
[ "714106661@qq.com" ]
714106661@qq.com
6da190ac770061d42890d53ec45e334a22daa467
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava18/Foo25.java
80249dbd5d70074a78ea4e8d631f1c3bc94d3583
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package applicationModulepackageJava18; public class Foo25 { public void foo0() { new applicationModulepackageJava18.Foo24().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
4c5fd12320b0a4aae09ea8debc0acaf7cfffbf0f
f2bdbc0f528fbb744ea2f4f76ac1de2056af940a
/java-note-algorithm/src/main/java/com/leosanqing/leetcode/medium/_92_reverseLinkedList2.java
90db87a94ff54fcc57bdda7468dcc1b556694ce5
[]
no_license
krystal-my/Java-Notes
62f5ae1be3f866921303346ac1a3b1b7041dce0d
8a80365e4e05107de0bf190de53b319f4cde593f
refs/heads/master
2022-10-07T09:40:21.662106
2020-06-02T11:50:56
2020-06-02T11:50:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,625
java
package com.leosanqing.leetcode.medium; import java.util.List; /** * @Author: rtliu * @Date: 2020/6/1 ไธ‹ๅˆ7:01 * @Package: com.leosanqing.leetcode.medium * @Description: Reverse a linked list from position m to n. Do it in one-pass. * ๅฏนๅ่ฝฌ็ป™ๅฎš่Œƒๅ›ด็š„้“พ่กจ่Š‚็‚น่ฟ›่กŒๅ่ฝฌ๏ผŒๅช้ๅކไธ€้ * * Note: 1 โ‰ค m โ‰ค n โ‰ค length of list. * * Example: * * Input: 1->2->3->4->5->NULL, m = 2, n = 4 * Output: 1->4->3->2->5->NULL * * @Version: 1.0 */ public class _92_reverseLinkedList2 { public ListNode reverseBetween(ListNode head, int m, int n) { if (head == null) { return null; } // ่ฎพ็ฝฎไธ€ไธช่™šๆ‹Ÿๅคด็ป“็‚น ListNode fakeHead = new ListNode(0); fakeHead.next = head; ListNode cur1 = fakeHead; ListNode pre1 = null; // ๆ‰พๅˆฐ m ็š„ไฝ็ฝฎ for (int i = 0; i < m; i++) { pre1 = cur1; cur1 = cur1.next; } ListNode next; ListNode pre2 = pre1; ListNode cur2 = cur1; for (int i = 0; i <= n - m; i++) { next = cur2.next; cur2.next = pre2; pre2 = cur2; cur2 = next; } pre1.next = pre2; cur1.next = cur2; return fakeHead.next; } static class ListNode { int val; ListNode next; ListNode() { } ListNode(int val) { this.val = val; } ListNode(int val, ListNode next) { this.val = val; this.next = next; } } }
[ "stormleo@qq.com" ]
stormleo@qq.com
5454743a24b1b137d5369574bce84ceefdf19598
9fb90a4bcc514fcdfc0003ed2060e88be831ac26
/src/com/mic/demo/strings/ReplacingStringTokenizer.java
beccbcbae0489fd1fdd07aa6369db3706d4dbda1
[]
no_license
lpjhblpj/FimicsJava
84cf93030b7172b0986b75c6d3e44226edce2019
0f00b6457500db81d9eac3499de31cc980a46166
refs/heads/master
2020-04-24T23:32:16.893756
2019-02-24T14:45:43
2019-02-24T14:45:43
132,058,969
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
//: com.mic.demo.strings/ReplacingStringTokenizer.java package com.mic.demo.strings; /* Added by Eclipse.py */ import java.util.Arrays; import java.util.Scanner; import java.util.StringTokenizer; public class ReplacingStringTokenizer { public static void main(String[] args) { String input = "But I'm not dead yet! I feel happy!"; StringTokenizer stoke = new StringTokenizer(input); while (stoke.hasMoreElements()) System.out.print(stoke.nextToken() + " "); System.out.println(); System.out.println(Arrays.toString(input.split(" "))); Scanner scanner = new Scanner(input); while (scanner.hasNext()) System.out.print(scanner.next() + " "); } } /* Output: But I'm not dead yet! I feel happy! [But, I'm, not, dead, yet!, I, feel, happy!] But I'm not dead yet! I feel happy! *///:~
[ "lpjhblpj@sina.com" ]
lpjhblpj@sina.com
bf7072374ba8461f095a25a1bcca6c4ff9ed3d03
359f049e4575dc1ecba21d0e99766f0c4a1534eb
/standard_test/src/main/java/com/Class0911.java
6a10456fe7c5e73487c5ffe002915b134146d150
[]
no_license
CK-qa/IDETest
be9001ffa20b025fc8fd2a54c5b58861349eb81a
7f798d4ab463b075a18bbf278883dd4b3278c430
refs/heads/master
2021-05-10T12:11:21.720178
2019-09-27T10:17:03
2019-09-27T10:17:03
118,434,301
0
0
null
2021-03-31T20:33:12
2018-01-22T09:20:33
Java
UTF-8
Java
false
false
131
java
package com; public class Class0911 { public static void main(String[] args) { System.out.println("lalala"); } }
[ "viktoria.bozhko@jetbrains.com" ]
viktoria.bozhko@jetbrains.com
fa5707ee8c5b6becfadfd93f7398f4b903db978d
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/LANG-35b-1-24-Single_Objective_GGA-IntegrationSingleObjective-/org/apache/commons/lang3/time/DateUtils_ESTest_scaffolding.java
0d9115e9a62a002014e0a447cb99b663df6020cf
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,989
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon May 18 01:58:11 UTC 2020 */ package org.apache.commons.lang3.time; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DateUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.time.DateUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(DateUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang3.time.DateUtils$DateIterator", "org.apache.commons.lang3.time.DateUtils" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1c42e7efdc05bf9988feab46d009261ebf54ee60
93ac298897fb0b8df30882028254e48857684217
/lecture/src/jdbc1/StudentDAO3.java
5d2d4f752be76e01bc31c6afea07052c3c3b1c5f
[]
no_license
KimJye/jsp_practice
976361f908bc06691f02fcc408a7009f782fc294
8e9b871b9d4d817a99bb6e2737cdbfd5e58ba8e4
refs/heads/master
2021-04-06T19:25:24.423360
2018-11-07T04:08:13
2018-11-07T04:08:13
124,510,993
0
0
null
null
null
null
UTF-8
Java
false
false
2,966
java
package jdbc1; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; public class StudentDAO3 { public static Student createStudent(ResultSet resultSet) throws SQLException{ Student student = new Student(); student.setId(resultSet.getInt("id")); student.setStudentNumber(resultSet.getString("studentNumber")); student.setName(resultSet.getString("name")); student.setDepartmentId(resultSet.getInt("departmentId")); student.setYear(resultSet.getInt("year")); student.setDepartmentName(resultSet.getString("departmentName")); return student; } public static List<Student> findAll() throws Exception {//๋ฆฌํ„ดํƒ€์ž…์ด List ํƒ€์ž…์ธ๋ฐ ์ด๋ ‡๊ฒŒ ๊ฐ€๊ธ‰์  ๋ถ€๋ชจํƒ€์ž…์œผ๋กœ ์ ์–ด์ฃผ๋Š”๊ฒƒ์ด ์ข‹๋‹ค. ์ด์œ ๋Š” ๋‹คํ˜•์„ฑ๋•Œ๋ฌธ. ๋‹คํ˜•์„ฑ ๊ตฌํ˜„ํ• ๋•Œ๋Š” 1. ๋ถ€๋ชจํด๋ž˜์Šค๋‚˜ ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ์žˆ์–ด์•ผ ํ•œ๋‹ค. 2. ์ž์‹์ด ๋ถ€๋ชจ ๋ฉ”์†Œ๋“œ๋ฅผ ์žฌ์ •์˜(์˜ค๋ฒ„๋ผ์ด๋”ฉ)ํ•ด์•ผํ•œ๋‹ค. 3. ๋ถ€๋ชจํƒ€์ž…์˜ ๋ณ€์ˆ˜๋กœ ๋ฉ”์†Œ๋“œ๋ฅผ ํ˜ธ์ถœํ•ด์•ผ ๋‹คํ˜•์„ฑ ํ˜ธ์ถœ์ด๋‹ค. String sql = "SELECT s.*, d.departmentName " + "FROM student s LEFT JOIN department d ON s.departmentId = d.id"; //d.departmentName ์ดํ›„ ๋ฐ˜๋“œ์‹œ ๊ณต๋ฐฑ์„ ์จ์ค€๋‹ค. ์•ˆ์จ์ฃผ๋ฉด ์ฟผ๋ฆฌ๋ฌธ ์—๋Ÿฌ๋‚œ๋‹ค. try (Connection connection = DB.getConnection("student1"); PreparedStatement statement = connection.prepareStatement(sql); ResultSet resultSet = statement.executeQuery()) { ArrayList<Student> list = new ArrayList<Student>(); while (resultSet.next()) list.add(createStudent(resultSet)); return list; } } public static List<Student> findByName(String name) throws Exception{ String sql = "SELECT s.*, d.departmentName " + "FROM student s LEFT JOIN department d ON s.departmentId = d.id " + //d.departmentName ์ดํ›„ ๋ฐ˜๋“œ์‹œ ๊ณต๋ฐฑ์„ ์จ์ค€๋‹ค. ์•ˆ์จ์ฃผ๋ฉด ์ฟผ๋ฆฌ๋ฌธ ์—๋Ÿฌ๋‚œ๋‹ค. "WHERE s.name LIKE ?"; try (Connection connection = DB.getConnection("student1"); PreparedStatement statement = connection.prepareStatement(sql)){ statement.setString(1,name + "%"); try(ResultSet resultSet = statement.executeQuery()){ ArrayList<Student> list = new ArrayList<Student>(); while (resultSet.next()) { list.add(createStudent(resultSet)); } return list; } } } public static List<Student> findByDepartmentId(int departmentId) throws Exception{ String sql = "SELECT s.*, d.departmentName " + "FROM student s LEFT JOIN department d ON s.departmentId = d.id " + "WHERE s.departmentId = ?"; try(Connection connection = DB.getConnection("student1"); PreparedStatement statement = connection.prepareStatement(sql)){ statement.setInt(1, departmentId); try(ResultSet resultSet = statement.executeQuery()){ ArrayList<Student> list = new ArrayList<Student>(); while(resultSet.next()) list.add(createStudent(resultSet)); return list; } } } }
[ "eoeogudgud@naver.com" ]
eoeogudgud@naver.com
3df443f9505bc1e5074bdbed1a57197817523b80
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
/projetos/LearnEnglishApp/src/program/SoundEngine.java
3920ab891249adcac345fc88784c6e8582b8873e
[]
no_license
charles-marques/dataset-375
29e2f99ac1ba323f8cb78bf80107963fc180487c
51583daaf58d5669c69d8208b8c4ed4e009001a5
refs/heads/master
2023-01-20T07:23:09.445693
2020-11-27T22:35:49
2020-11-27T22:35:49
283,315,149
0
1
null
null
null
null
UTF-8
Java
false
false
1,161
java
/* * SoundEngine.java 1.1 2012/6/1 * * Copyright (c) 2012 Northeastern University Software Engineering College * Software International 1001 Group Three * * All rights reserved. */ package program; import java.io.BufferedInputStream; import java.io.FileInputStream; import javazoom.jl.player.Player; /** * A class uses to play sound according to the audio file name. * * @author Eric * @version 1.1 */ public class SoundEngine { /** * lay sound according to the audio file name * * @param filename the audio file name. */ public static void playSound(String filename) { Player player = null; try { FileInputStream fis = new FileInputStream("sounds/" + filename + ".mp3"); BufferedInputStream bis = new BufferedInputStream(fis); player = new Player(bis); } catch (Exception e) { System.out.println("Problem playing file " + filename); System.out.println(e); } final Player soundPlayer = player; // run in new thread to play in background new Thread() { public void run() { try { soundPlayer.play(); } catch (Exception e) { System.out.println(e); } } }.start(); } }
[ "suporte@localhost.localdomain" ]
suporte@localhost.localdomain
36f8522820778261bb50de8b3f85a1988a6f09ed
f3d5667d71bf4aea5104ac789547b15241499b2f
/app/src/main/java/com/gsy/ml/prestener/message/EaseChatPrestener.java
670f4908e5c96a443de91922d92cf03c8593c406
[]
no_license
ax3726/MaiLi
c55c3482c0fe2e7e646fc1f3a0dbe1a01eb1f73c
cefb0d66f4b2ce838e420d0354a1ab4e74b19ee2
refs/heads/master
2021-07-14T11:48:56.104111
2018-09-14T09:43:40
2018-09-14T09:43:40
135,269,966
0
0
null
null
null
null
UTF-8
Java
false
false
2,033
java
package com.gsy.ml.prestener.message; import com.gsy.ml.common.Api; import com.gsy.ml.common.Link; import com.gsy.ml.common.MaiLiApplication; import com.gsy.ml.model.common.HttpErrorModel; import com.gsy.ml.model.message.EaseChatFragmentModel; import com.gsy.ml.prestener.common.ILoadPVListener; import java.util.HashMap; import java.util.Map; import ml.gsy.com.library.utils.ParseJsonUtils; /** * Created by Administrator on 2017/9/11. */ public class EaseChatPrestener { final int SEESERVICECHARGE = 1; int requestType = SEESERVICECHARGE; private final ILoadPVListener mListener; public EaseChatPrestener(ILoadPVListener mListener) { this.mListener = mListener; } public void messageFee(String phone, String city) { requestType = SEESERVICECHARGE; Map<String, String> map = new HashMap<String, String>(); map.put("phone", phone); map.put("city", city); Api.getInstance(MaiLiApplication.getInstance()).getData(Link.SEESERVICECHARGE, map, callback); } Api.CustomHttpHandler callback = new Api.CustomHttpHandler() { @Override public void onFailure(HttpErrorModel errorModel) { mListener.onLoadComplete(errorModel); } @Override public void onSuccess(Object object) { switch (requestType) { case SEESERVICECHARGE: try { if (object instanceof HttpErrorModel) { mListener.onLoadComplete(object); } else { EaseChatFragmentModel modle = ParseJsonUtils.getBean((String) object, EaseChatFragmentModel.class); mListener.onLoadComplete(modle); } } catch (Exception e) { e.printStackTrace(); mListener.onLoadComplete(HttpErrorModel.createError()); } break; } } }; }
[ "15970060419lma" ]
15970060419lma
3bb666941213d2d99d675cda83fbf84f291597b2
22c0ea86a3a73dda44921a87208022a3871d6c06
/Source/com/tv/xeeng/base/protocol/messages/json/BanTruongJSON.java
ac3f0df81fb947965d55bc667a5ef4fd8b998dbd
[]
no_license
hungdt138/xeeng_server
e9cd0a3be7ee0fc928fb6337e950e12846bd065a
602ce57a4ec625c25aff0a48ac01d3c41f481c5a
refs/heads/master
2021-01-04T14:06:51.158259
2014-08-01T09:52:00
2014-08-01T09:52:00
22,504,067
1
0
null
null
null
null
UTF-8
Java
false
false
2,225
java
package com.tv.xeeng.base.protocol.messages.json; import org.json.JSONObject; import org.slf4j.Logger; import com.tv.xeeng.base.common.LoggerContext; import com.tv.xeeng.base.common.ServerException; import com.tv.xeeng.base.protocol.messages.BanTruongRequest; import com.tv.xeeng.base.protocol.messages.BanTruongResponse; import com.tv.xeeng.game.data.ResponseCode; import com.tv.xeeng.protocol.IMessageProtocol; import com.tv.xeeng.protocol.IRequestMessage; import com.tv.xeeng.protocol.IResponseMessage; public class BanTruongJSON implements IMessageProtocol { private final Logger mLog = LoggerContext.getLoggerFactory().getLogger(BanTruongJSON.class); public boolean decode(Object aEncodedObj, IRequestMessage aDecodingObj) throws ServerException { try { // request data JSONObject jsonData = (JSONObject) aEncodedObj; // plain obj BanTruongRequest ban = (BanTruongRequest) aDecodingObj; // decoding ban.money = jsonData.getLong("money"); ban.matchID = jsonData.getLong("match_id"); return true; } catch (Throwable t) { mLog.error("[DECODER] " + aDecodingObj.getID(), t); return false; } } public Object encode(IResponseMessage aResponseMessage) throws ServerException { try { JSONObject encodingObj = new JSONObject(); // put response data into json object encodingObj.put("mid", aResponseMessage.getID()); BanTruongResponse ban = (BanTruongResponse) aResponseMessage; encodingObj.put("code", ban.mCode); // System.out.println(" chat.mUsername : " + chat.mUsername); if (ban.mCode == ResponseCode.FAILURE) { encodingObj.put("error_msg", ban.mErrorMsg); } else if (ban.mCode == ResponseCode.SUCCESS) { encodingObj.put("money", ban.money); encodingObj.put("uid", ban.mUid); } // response encoded obj return encodingObj; } catch (Throwable t) { mLog.error("[ENCODER] " + aResponseMessage.getID(), t); return null; } } }
[ "hungdt138@outlook.com" ]
hungdt138@outlook.com