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
3630bce1aafa89b766f83a2bd23a827bcfb0a122
146086a1d08e226047b91c8b11675b0ed8b9f029
/snap-studio-service/src/main/java/org/snapscript/studio/service/command/RenameCommandMarshaller.java
15e697998952b37fa23cfb0128dbda901cbd4aae
[]
no_license
snapscript/snap-develop
750c82b8b82f7cb5369bec0f7354d007d15bfee0
12ea04b6af12b95426171dc668fcd2fc4f21d4d2
refs/heads/master
2020-05-21T14:59:23.856444
2019-02-09T15:17:50
2019-02-09T15:17:50
65,230,424
2
1
null
null
null
null
UTF-8
Java
false
false
214
java
package org.snapscript.studio.service.command; public class RenameCommandMarshaller extends ObjectCommandMarshaller<RenameCommand>{ public RenameCommandMarshaller() { super(CommandType.RENAME); } }
[ "gallagher_niall@yahoo.com" ]
gallagher_niall@yahoo.com
879979a5a41c56ab6ffe52f01d2cd58d0d002e30
0ac05e3da06d78292fdfb64141ead86ff6ca038f
/OSWE/oswe/openCRX/rtjar/rt.jar.src/java/rmi/server/RemoteStub.java
b844d35187892c0d9de326111fcbe2cb0e58dc79
[]
no_license
qoo7972365/timmy
31581cdcbb8858ac19a8bb7b773441a68b6c390a
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
refs/heads/master
2023-07-26T12:26:35.266587
2023-07-17T12:35:19
2023-07-17T12:35:19
353,889,195
7
1
null
null
null
null
UTF-8
Java
false
false
1,426
java
/* */ package java.rmi.server; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ public abstract class RemoteStub /* */ extends RemoteObject /* */ { /* */ private static final long serialVersionUID = -1585587260594494182L; /* */ /* */ protected RemoteStub() {} /* */ /* */ protected RemoteStub(RemoteRef paramRemoteRef) { /* 63 */ super(paramRemoteRef); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @Deprecated /* */ protected static void setRef(RemoteStub paramRemoteStub, RemoteRef paramRemoteRef) { /* 81 */ throw new UnsupportedOperationException(); /* */ } /* */ } /* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/java/rmi/server/RemoteStub.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "t0984456716" ]
t0984456716
599d40553f981a2bde08328570a1b966229dc2d0
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/aimcost/NewPlanIndexCollection.java
3c1d03c571b2a8653453ea1f3a721771881b01f0
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
1,178
java
package com.kingdee.eas.fdc.aimcost; import com.kingdee.bos.dao.AbstractObjectCollection; import com.kingdee.bos.dao.IObjectPK; public class NewPlanIndexCollection extends AbstractObjectCollection { public NewPlanIndexCollection() { super(NewPlanIndexInfo.class); } public boolean add(NewPlanIndexInfo item) { return addObject(item); } public boolean addCollection(NewPlanIndexCollection item) { return addObjectCollection(item); } public boolean remove(NewPlanIndexInfo item) { return removeObject(item); } public NewPlanIndexInfo get(int index) { return(NewPlanIndexInfo)getObject(index); } public NewPlanIndexInfo get(Object key) { return(NewPlanIndexInfo)getObject(key); } public void set(int index, NewPlanIndexInfo item) { setObject(index, item); } public boolean contains(NewPlanIndexInfo item) { return containsObject(item); } public boolean contains(Object key) { return containsKey(key); } public int indexOf(NewPlanIndexInfo item) { return super.indexOf(item); } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
53ebdf2f04a1b1afe4d7e8d2933ac3865f6841a8
1a32d704493deb99d3040646afbd0f6568d2c8e7
/BOOT-INF/lib/com/google/common/util/concurrent/CombinedFuture.java
70e6bc9666243bb461288f418809508bf5afb7c6
[]
no_license
yanrumei/bullet-zone-server-2.0
e748ff40f601792405143ec21d3f77aa4d34ce69
474c4d1a8172a114986d16e00f5752dc019cdcd2
refs/heads/master
2020-05-19T11:16:31.172482
2019-03-25T17:38:31
2019-03-25T17:38:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,266
java
/* */ package com.google.common.util.concurrent; /* */ /* */ import com.google.common.annotations.GwtCompatible; /* */ import com.google.common.base.Preconditions; /* */ import com.google.common.collect.ImmutableCollection; /* */ import java.util.concurrent.Callable; /* */ import java.util.concurrent.CancellationException; /* */ import java.util.concurrent.ExecutionException; /* */ import java.util.concurrent.Executor; /* */ import java.util.concurrent.RejectedExecutionException; /* */ import javax.annotation.Nullable; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ @GwtCompatible /* */ final class CombinedFuture<V> /* */ extends AggregateFuture<Object, V> /* */ { /* */ CombinedFuture(ImmutableCollection<? extends ListenableFuture<?>> futures, boolean allMustSucceed, Executor listenerExecutor, AsyncCallable<V> callable) /* */ { /* 40 */ init(new CombinedFutureRunningState(futures, allMustSucceed, new AsyncCallableInterruptibleTask(callable, listenerExecutor))); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ CombinedFuture(ImmutableCollection<? extends ListenableFuture<?>> futures, boolean allMustSucceed, Executor listenerExecutor, Callable<V> callable) /* */ { /* 52 */ init(new CombinedFutureRunningState(futures, allMustSucceed, new CallableInterruptibleTask(callable, listenerExecutor))); /* */ } /* */ /* */ /* */ private final class CombinedFutureRunningState /* */ extends AggregateFuture<Object, V>.RunningState /* */ { /* */ private CombinedFuture<V>.CombinedFutureInterruptibleTask task; /* */ /* */ /* */ CombinedFutureRunningState(boolean futures, CombinedFuture<V>.CombinedFutureInterruptibleTask allMustSucceed) /* */ { /* 64 */ super(futures, allMustSucceed, false); /* 65 */ this.task = task; /* */ } /* */ /* */ /* */ void collectOneValue(boolean allMustSucceed, int index, @Nullable Object returnValue) {} /* */ /* */ void handleAllCompleted() /* */ { /* 73 */ CombinedFuture<V>.CombinedFutureInterruptibleTask localTask = this.task; /* 74 */ if (localTask != null) { /* 75 */ localTask.execute(); /* */ } else { /* 77 */ Preconditions.checkState(CombinedFuture.this.isDone()); /* */ } /* */ } /* */ /* */ void releaseResourcesAfterFailure() /* */ { /* 83 */ super.releaseResourcesAfterFailure(); /* 84 */ this.task = null; /* */ } /* */ /* */ void interruptTask() /* */ { /* 89 */ CombinedFuture<V>.CombinedFutureInterruptibleTask localTask = this.task; /* 90 */ if (localTask != null) { /* 91 */ localTask.interruptTask(); /* */ } /* */ } /* */ } /* */ /* */ private abstract class CombinedFutureInterruptibleTask extends InterruptibleTask /* */ { /* */ private final Executor listenerExecutor; /* 99 */ volatile boolean thrownByExecute = true; /* */ /* */ public CombinedFutureInterruptibleTask(Executor listenerExecutor) { /* 102 */ this.listenerExecutor = ((Executor)Preconditions.checkNotNull(listenerExecutor)); /* */ } /* */ /* */ final void runInterruptibly() /* */ { /* 107 */ this.thrownByExecute = false; /* */ /* 109 */ if (!CombinedFuture.this.isDone()) { /* */ try { /* 111 */ setValue(); /* */ } catch (ExecutionException e) { /* 113 */ CombinedFuture.this.setException(e.getCause()); /* */ } catch (CancellationException e) { /* 115 */ CombinedFuture.this.cancel(false); /* */ } catch (Throwable e) { /* 117 */ CombinedFuture.this.setException(e); /* */ } /* */ } /* */ } /* */ /* */ final boolean wasInterrupted() /* */ { /* 124 */ return CombinedFuture.this.wasInterrupted(); /* */ } /* */ /* */ final void execute() { /* */ try { /* 129 */ this.listenerExecutor.execute(this); /* */ } catch (RejectedExecutionException e) { /* 131 */ if (this.thrownByExecute) { /* 132 */ CombinedFuture.this.setException(e); /* */ } /* */ } /* */ } /* */ /* */ abstract void setValue() throws Exception; /* */ } /* */ /* */ private final class AsyncCallableInterruptibleTask extends CombinedFuture<V>.CombinedFutureInterruptibleTask /* */ { /* */ private final AsyncCallable<V> callable; /* */ /* */ public AsyncCallableInterruptibleTask(Executor callable) { /* 145 */ super(listenerExecutor); /* 146 */ this.callable = ((AsyncCallable)Preconditions.checkNotNull(callable)); /* */ } /* */ /* */ void setValue() throws Exception /* */ { /* 151 */ CombinedFuture.this.setFuture(this.callable.call()); /* */ } /* */ } /* */ /* */ private final class CallableInterruptibleTask extends CombinedFuture<V>.CombinedFutureInterruptibleTask /* */ { /* */ private final Callable<V> callable; /* */ /* */ public CallableInterruptibleTask(Executor callable) { /* 160 */ super(listenerExecutor); /* 161 */ this.callable = ((Callable)Preconditions.checkNotNull(callable)); /* */ } /* */ /* */ void setValue() throws Exception /* */ { /* 166 */ CombinedFuture.this.set(this.callable.call()); /* */ } /* */ } /* */ } /* Location: C:\Users\ikatwal\Downloads\bullet-zone-server-2.0.jar!\BOOT-INF\lib\guava-22.0.jar!\com\google\commo\\util\concurrent\CombinedFuture.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "ishankatwal@gmail.com" ]
ishankatwal@gmail.com
e4707f40eb57bfd13fc469d7b2c244996e0c291f
1201b7b03161bd57c7ef1fc965a6685ceb8b97d8
/src/main/java/org/dasein/cloud/platform/PlatformServices.java
a2135c8e69bd5d393a5c3929bba1297a4f7e9869
[ "Artistic-2.0" ]
permissive
TranscendComputing/dasein-cloud-core
316332fe76b239c8478a04fc9f6387f2e95f6b6c
4f7b809de66f1381a9ac6e496d68f8a962730c64
refs/heads/master
2021-01-15T22:14:55.116957
2012-11-14T19:32:28
2012-11-14T19:32:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,577
java
/** * Copyright (C) 2009-2012 enStratus Networks 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 org.dasein.cloud.platform; import javax.annotation.Nullable; public interface PlatformServices { public abstract @Nullable CDNSupport getCDNSupport(); public abstract @Nullable KeyValueDatabaseSupport getKeyValueDatabaseSupport(); public abstract @Nullable MessageQueueSupport getMessageQueueSupport(); public abstract @Nullable PushNotificationSupport getPushNotificationSupport(); public abstract @Nullable RelationalDatabaseSupport getRelationalDatabaseSupport(); public abstract boolean hasCDNSupport(); public abstract boolean hasKeyValueDatabaseSupport(); public abstract boolean hasMessageQueueSupport(); public abstract boolean hasPushNotificationSupport(); public abstract boolean hasRelationalDatabaseSupport(); }
[ "george.reese@imaginary.com" ]
george.reese@imaginary.com
c3e3e99eb502f463f5e0fc5da08724d2fb780c11
2ecef5908c27f392cd9ef3f77884d81b0064be1a
/src/main/java/info/julang/interpretation/syntax/DeclInfo.java
5fa2768e980c659f003892706f49834bf9fa76a0
[]
no_license
zhoux738/JSE
478b2419b2fea54890947989a8492489e34b4746
3b1d3f9ee4150213fb1589e95db64d375d920539
refs/heads/master
2022-07-08T12:08:14.006918
2021-06-29T20:41:25
2021-06-29T20:41:25
128,875,987
3
1
null
2022-07-01T22:17:26
2018-04-10T04:59:22
Java
UTF-8
Java
false
false
3,942
java
/* MIT License Copyright (c) 2017 Ming Zhou Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package info.julang.interpretation.syntax; import info.julang.interpretation.errorhandling.IHasLocationInfo; import info.julang.interpretation.errorhandling.ILocationInfoAware; import info.julang.typesystem.jclass.Accessibility; import java.util.ArrayList; import java.util.List; public abstract class DeclInfo implements IHasLocationInfo, ILocationInfoAware { private boolean isHosted; private boolean isFinal; private boolean isConst; private boolean isAbstract; private boolean isStatic; private Accessibility accessibility; private String name; private IHasLocationInfo linfo; protected List<AttributeDeclInfo> attributes; public boolean isFinal() { return isFinal; } // public for lazy statements public void setFinal() { this.isFinal = true; } public boolean isConst() { return isConst; } // public for lazy statements public void setConst() { this.isConst = true; } public boolean isHosted() { return isHosted; } // public for lazy statements public void setHosted() { this.isHosted = true; } public boolean isAbstract() { return isAbstract; } // public for lazy statements public void setAbstract() { this.isAbstract = true; } public boolean isStatic() { return isStatic; } // public for lazy statements public void setStatic() { this.isStatic = true; } public Accessibility getAccessibility() { return accessibility; } // public for lazy statements public void setAccessibility(Accessibility accessibility) { this.accessibility = accessibility; } public boolean isAccessibilitySet(){ return accessibility != null; } public String getName() { return name; } // public for lazy statements public void setName(String name) { this.name = name; } // public for lazy statements public void addAttribute(AttributeDeclInfo attr){ if(attributes==null){ attributes = new ArrayList<AttributeDeclInfo>(); } attributes.add(attr); } public List<AttributeDeclInfo> getAttributes(){ return attributes; } void copyTo(DeclInfo other) { other.accessibility = this.accessibility; other.isAbstract = this.isAbstract; other.isConst = this.isConst; other.isFinal = this.isFinal; other.isStatic = this.isStatic; other.isHosted = this.isHosted; other.name = this.name; other.attributes = this.attributes; } abstract boolean allowModifier(Modifier modifier); //------------------ Location info about this declaration ------------------// public String getFileName(){ return linfo != null ? linfo.getFileName() : ""; } public int getLineNumber(){ return linfo != null ? linfo.getLineNumber() : -1; } public void setLocationInfo(IHasLocationInfo linfo){ this.linfo = linfo; } }
[ "zhoux738@umn.edu" ]
zhoux738@umn.edu
356fcb4e80ed26459bcb287a32ba26d7445fd336
8dfd406e855dbef74ef6b80e7b1fcde43d0b7d56
/Web-Stock1.0/src/test/java/com/example/demo/MailSendTest.java
6ccb75ef5c53a01796797d09f72db7e151ac2665
[]
no_license
iechenyb/springboot
db0e4caaf545721f5b6a70d97cce2af2cbbd0797
46e541a6319bfced7d2445038464ce249b409e83
refs/heads/master
2021-01-20T01:35:04.050414
2019-05-16T02:02:04
2019-05-16T02:02:04
89,299,676
0
0
null
null
null
null
UTF-8
Java
false
false
5,510
java
package com.example.demo; import java.io.File; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.io.FileSystemResource; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.cyb.MyBootStarter; /** *作者 : iechenyb<br> *类描述: 说点啥<br> *创建时间: 2017年12月4日 */ @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = MyBootStarter.class) public class MailSendTest { Log logger = LogFactory.getLog(getClass()); @Autowired private JavaMailSender sender; private String to = "1048417686@qq.com"; private String from ="383065059@qq.com"; @Test public void sendSimpleMail() throws Exception { String subject="主题:简单邮件"; String content = "测试邮件内容!"; SimpleMailMessage message = new SimpleMailMessage(); message.setFrom(from); message.setTo(to); message.setSubject(subject); message.setText(content); sender.send(message); // sendAttachmentsMail(subject,content,"d:/data/mail.txt"); } /** * 发送纯文本的简单邮件 * @param to * @param subject * @param content */ public void sendSimpleMail(String to, String subject, String content){ SimpleMailMessage message = new SimpleMailMessage(); message.setFrom(from); message.setTo(to); message.setSubject(subject); message.setText(content); try { sender.send(message); logger.info("简单邮件已经发送。"); } catch (Exception e) { logger.error("发送简单邮件时发生异常!", e); } } /** * 发送html格式的邮件 * @param to * @param subject * @param content */ public void sendHtmlMail(String to, String subject, String content){ MimeMessage message = sender.createMimeMessage(); try { //true表示需要创建一个multipart message MimeMessageHelper helper = new MimeMessageHelper(message, true); helper.setFrom(from); helper.setTo(to); helper.setSubject(subject); helper.setText(content, true); sender.send(message); logger.info("html邮件已经发送。"); } catch (MessagingException e) { logger.error("发送html邮件时发生异常!", e); } } /** * 发送带附件的邮件 * @param to * @param subject * @param content * @param filePath */ public void sendAttachmentsMail(String subject, String content, String filePath){ MimeMessage message = sender.createMimeMessage(); try { //true表示需要创建一个multipart message MimeMessageHelper helper = new MimeMessageHelper(message, true); helper.setFrom(from); helper.setTo(to); helper.setSubject(subject); helper.setText(content, true); FileSystemResource file = new FileSystemResource(new File(filePath)); String fileName ="testname.txt"; //filePath.substring(filePath.lastIndexOf(File.separator)); helper.addAttachment(fileName, file); sender.send(message); logger.info("带附件的邮件已经发送。"); } catch (MessagingException e) { logger.error("发送带附件的邮件时发生异常!", e); } } /** * 发送嵌入静态资源(一般是图片)的邮件 * @param to * @param subject * @param content 邮件内容,需要包括一个静态资源的id,比如:<img src=\"cid:rscId01\" > * @param rscPath 静态资源路径和文件名 * @param rscId 静态资源id */ public void sendInlineResourceMail(String subject, String content, String rscPath, String rscId){ MimeMessage message = sender.createMimeMessage(); try { //true表示需要创建一个multipart message MimeMessageHelper helper = new MimeMessageHelper(message, true); helper.setFrom(from); helper.setTo(to); helper.setSubject(subject); helper.setText(content, true); FileSystemResource res = new FileSystemResource(new File(rscPath)); helper.addInline(rscId, res); sender.send(message); logger.info("嵌入静态资源的邮件已经发送。"); } catch (MessagingException e) { logger.error("发送嵌入静态资源的邮件时发生异常!", e); } } }
[ "zzuchenyb@sina.com" ]
zzuchenyb@sina.com
3e1116567b30ea071395af665bc1ff92a5a0e459
77fb90c41fd2844cc4350400d786df99e14fa4ca
/androidx/media/AudioAttributesImplBaseParcelizer.java
f8a48fd09d29481811bd59e9cf082ff73f599e9e
[]
no_license
highnes7/umaang_decompiled
341193b25351188d69b4413ebe7f0cde6525c8fb
bcfd90dffe81db012599278928cdcc6207632c56
refs/heads/master
2020-06-19T07:47:18.630455
2019-07-12T17:16:13
2019-07-12T17:16:13
196,615,053
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
package androidx.media; import b.b.a.N; import de.asm.ByteVector; import support.android.v4.asm.Attribute; @N({b.b.a.N.a.a}) public final class AudioAttributesImplBaseParcelizer { public AudioAttributesImplBaseParcelizer() {} public static Attribute read(ByteVector paramByteVector) { Attribute localAttribute = new Attribute(); a = paramByteVector.add(a, 1); type = paramByteVector.add(type, 2); b = paramByteVector.add(b, 3); c = paramByteVector.add(c, 4); return localAttribute; } public static void write(Attribute paramAttribute, ByteVector paramByteVector) { paramByteVector.a(false, false); paramByteVector.put(a, 1); paramByteVector.put(type, 2); paramByteVector.put(b, 3); paramByteVector.put(c, 4); } }
[ "highnes.7@gmail.com" ]
highnes.7@gmail.com
20116276af9a830b249363606c1ce9abee1a5856
ccf3b9914a04e121a323de4050dc8a1c450bf21b
/20_JAVA_Training_Practice/30_JAVA_Core_and_Collections/Collection/L_8_task_0830/Main.java
3657f17e8a7f8cead06e314f3a2351587e2dd35b
[]
no_license
PetrBelmst/JavaRush_Course_Rep
81333e65963bb69ee2f032acbaab025580cc5bde
39e6fb64f8d5fc9b5284c8477b70cd1c62a769d5
refs/heads/master
2021-05-23T14:20:51.674509
2020-05-05T05:45:25
2020-05-05T05:45:25
253,335,289
1
0
null
null
null
null
UTF-8
Java
false
false
1,106
java
package com.company; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] array = new String[20]; for (int i = 0; i < array.length; i++) { array[i] = reader.readLine(); } sort(array); for (String word : array) { System.out.println(word); } } public static void sort(String[] array) { for (int i = 0; i<array.length; i++) { for (int j = 0; j<array.length-1; j++) { if (!isGreaterThan(array[j+1],array[j])) { String temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; } } } } //Метод для сравнения строк: 'а' больше чем 'b' public static boolean isGreaterThan(String a, String b) { return a.compareTo(b) > 0; } }
[ "PetrBelmst@users.noreply.github.com" ]
PetrBelmst@users.noreply.github.com
bfb569b576de46abd83fd1d474dc8ef62f0b261c
e8cd24201cbfadef0f267151ea5b8a90cc505766
/group05/578505552/miniJvm/src/com/coderising/jvm/field/Field.java
f5f2cad49d466748b78d44462656fb224c973f2f
[]
no_license
XMT-CN/coding2017-s1
30dd4ee886dd0a021498108353c20360148a6065
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
refs/heads/master
2021-01-21T21:38:42.199253
2017-06-25T07:44:21
2017-06-25T07:44:21
94,863,023
0
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
package com.coderising.jvm.field; import com.coderising.jvm.constant.ConstantPool; import com.coderising.jvm.constant.UTF8Info; import com.coderising.jvm.loader.ByteCodeIterator; public class Field { private int accessFlag; private int nameIndex; private int descriptorIndex; private ConstantPool pool; public Field(int accessFlag, int nameIndex, int descriptorIndex, ConstantPool pool) { this.accessFlag = accessFlag; this.nameIndex = nameIndex; this.descriptorIndex = descriptorIndex; this.pool = pool; } public String toString() { String name = ((UTF8Info)pool.getConstantInfo(this.nameIndex)).getValue(); String desc = ((UTF8Info)pool.getConstantInfo(this.descriptorIndex)).getValue(); return name +":"+ desc; } public static Field parse(ConstantPool pool, ByteCodeIterator iter){ int accessFlag = iter.nextU2ToInt(); int nameIndex = iter.nextU2ToInt(); int descIndex = iter.nextU2ToInt(); int attribCount = iter.nextU2ToInt(); String name = pool.getUTF8String(nameIndex); System.out.println("field <" + name + "> attribute count:"+ attribCount); Field f = new Field(accessFlag, nameIndex, descIndex,pool); if(attribCount > 0){ throw new RuntimeException("Field Attribute has not been implemented"); } return f; } }
[ "542194147@qq.com" ]
542194147@qq.com
f66d1fd0172b8d5be49606a5bc1387542c63138b
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/protocal/b/acb.java
a06f9569253ed705a0ec2a42fb0252d62d655777
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,169
java
package com.tencent.mm.protocal.b; import a.a.a.b; import java.util.LinkedList; public final class acb extends alq { protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (a.a.a.c.a)paramVarArgs[0]; if (jHj == null) { throw new b("Not all required fields were included: BaseResponse"); } if (jHj != null) { paramVarArgs.cj(1, jHj.kn()); jHj.a(paramVarArgs); } return 0; } if (paramInt == 1) { if (jHj == null) { break label305; } } label305: for (paramInt = a.a.a.a.ch(1, jHj.kn()) + 0;; paramInt = 0) { return paramInt; if (paramInt == 2) { paramVarArgs = new a.a.a.a.a((byte[])paramVarArgs[0], iTR); for (paramInt = alq.a(paramVarArgs); paramInt > 0; paramInt = alq.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.bog(); } } if (jHj != null) { break; } throw new b("Not all required fields were included: BaseResponse"); } if (paramInt == 3) { Object localObject1 = (a.a.a.a.a)paramVarArgs[0]; acb localacb = (acb)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: return -1; } paramVarArgs = ((a.a.a.a.a)localObject1).sJ(paramInt); int i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new dd(); localObject2 = new a.a.a.a.a((byte[])localObject2, iTR); for (boolean bool = true; bool; bool = ((dd)localObject1).a((a.a.a.a.a)localObject2, (com.tencent.mm.at.a)localObject1, alq.a((a.a.a.a.a)localObject2))) {} jHj = ((dd)localObject1); paramInt += 1; } break; } return -1; } } } /* Location: * Qualified Name: com.tencent.mm.protocal.b.acb * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
ee5feede9a375522fb256dd41baf515839c49f1d
5bb376c84746f552fbc25e30e62decb8ed2952cd
/numerical-recipes-j/core/src/main/java/com/google/code/numericalrecipes/GlobalMembersQroot.java
5f0de810dc1c7e4959ffc4a6049199ab856eb788
[]
no_license
githubapitest2/githubapitest
293a10a5f123cf3cdcf58e2891b85c8afe820cd6
a4c927926744a75316768b0be1b0a905f52978db
refs/heads/master
2021-01-18T07:57:13.699195
2009-12-09T13:43:47
2009-12-09T13:43:47
1,302,359
3
0
null
null
null
null
UTF-8
Java
false
false
1,326
java
package com.google.code.numericalrecipes; public class GlobalMembersQroot { public static void qroot(RefObject<VecDoub_I> p, RefObject<Doub> b, RefObject<Doub> c, Doub eps) { final Int ITMAX = 20; final Doub TINY = 1.0e-14; Doub sc = new Doub(); Doub sb = new Doub(); Doub s = new Doub(); Doub rc = new Doub(); Doub rb = new Doub(); Doub r = new Doub(); Doub dv = new Doub(); Doub delc = new Doub(); Doub delb = new Doub(); Int n = p.argvalue.size()-1; VecDoub d = new VecDoub(3); VecDoub q = new VecDoub(n+1); VecDoub qq = new VecDoub(n+1); VecDoub rem = new VecDoub(n+1); d[2]=1.0; for (Int iter = 0;iter<ITMAX;iter++) { d[1]=b.argvalue; d[0]=c.argvalue; poldiv(p.argvalue,d,q,rem); s = rem[0]; r = rem[1]; poldiv(q,d,qq,rem); sb = -c.argvalue*(rc = -rem[1]); rb = -b.argvalue *rc+(sc = -rem[0]); dv = 1.0/(sb *rc-sc *rb); delb = (r *sc-s *rc)*dv; delc = (-r *sb+s *rb)*dv; b.argvalue += (delb = (r *sc-s *rc)*dv); c.argvalue += (delc = (-r *sb+s *rb)*dv); if ((Math.abs(delb) <= eps *Math.abs(b.argvalue) || Math.abs(b.argvalue) < TINY) && (Math.abs(delc) <= eps *Math.abs(c.argvalue) || Math.abs(c.argvalue) < TINY)) { return; } } throw("Too many iterations in routine qroot"); } }
[ "nabeelmukhtar@yahoo.com" ]
nabeelmukhtar@yahoo.com
ab723e710fee04c4634c672f15fd0ecc676dde02
db6614d06a6433a6e8e8e964d7822b54ba1c44ef
/app/src/main/java/com/geek/huixiaoer/mvp/person/ui/adapter/ShopOrderAdapter.java
58f2f8de988d1963d0094649925a1c9fc71fb303
[]
no_license
DarianLiu/HuiXiaoEr
979a1d8755c7eb203abc08046bbbefd8ad3160d8
4ee10a740d134149c7b02ce7e2f8ae7202c460b1
refs/heads/master
2021-05-03T08:08:32.138775
2018-06-20T02:27:49
2018-06-20T02:27:49
120,560,453
0
0
null
null
null
null
UTF-8
Java
false
false
8,130
java
package com.geek.huixiaoer.mvp.person.ui.adapter; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.geek.huixiaoer.R; import com.geek.huixiaoer.common.utils.DateUtil; import com.geek.huixiaoer.storage.entity.shop.OrderBean; import com.geek.huixiaoer.storage.entity.shop.OrderItemBean; import com.jess.arms.http.imageloader.glide.GlideArms; import java.util.List; /** * 创建订单列表适配器 * Created by Administrator on 2018/3/5. */ public class ShopOrderAdapter extends BaseExpandableListAdapter { private LayoutInflater mInflater; private Context mContext; private List<OrderBean> modelList; public ShopOrderAdapter(Context context, List<OrderBean> list) { mContext = context; modelList = list; mInflater = LayoutInflater.from(context); } @Override public int getGroupCount() { return modelList.size(); } @Override public int getChildrenCount(int groupPosition) { return modelList.get(groupPosition).getItems().size(); } @Override public Object getGroup(int groupPosition) { return modelList.get(groupPosition); } @Override public Object getChild(int groupPosition, int childPosition) { return modelList.get(groupPosition).getItems().get(childPosition); } @Override public long getGroupId(int groupPosition) { return groupPosition; } @Override public long getChildId(int groupPosition, int childPosition) { return childPosition; } @Override public boolean hasStableIds() { return false; } @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { GroupViewHolder groupViewHolder; if (convertView == null) { groupViewHolder = new GroupViewHolder(); convertView = mInflater.inflate(R.layout.item_shop_merchant, null); groupViewHolder.tvShopName = convertView.findViewById(R.id.tv_shop_name); groupViewHolder.ivShop = convertView.findViewById(R.id.iv_shop); groupViewHolder.tvOrderStatus = convertView.findViewById(R.id.tv_order_status); convertView.setTag(groupViewHolder); } else { groupViewHolder = (GroupViewHolder) convertView.getTag(); } groupViewHolder.tvOrderStatus.setVisibility(View.VISIBLE); OrderBean orderBean = modelList.get(groupPosition); if (orderBean.getStatus().equals("pendingPayment")) { groupViewHolder.tvOrderStatus.setText("待付款"); groupViewHolder.tvOrderStatus.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); } else if (orderBean.getStatus().equals("completed")) { groupViewHolder.tvOrderStatus.setText("已完成"); } else if (orderBean.getStatus().equals("failed")) { groupViewHolder.tvOrderStatus.setText("已失效"); } else if (orderBean.getStatus().equals("canceled")) { groupViewHolder.tvOrderStatus.setText("已取消"); } else { groupViewHolder.tvOrderStatus.setText("已付款"); } long orderCreateData = modelList.get(groupPosition).getCreateDate(); long nowData = System.currentTimeMillis(); if (DateUtil.invalid(orderCreateData, nowData)) { groupViewHolder.tvOrderStatus.setText("已失效"); } // if (orderBean.getStatus().equals("pendingReview")) { //// model.setOrderStatus("待审核"); // groupViewHolder.tvOrderStatus.setText("待审核"); // } else if (orderBean.getStatus().equals("pendingShipment")) { // groupViewHolder.tvOrderStatus.setText("待发货"); // } else if (orderBean.getStatus().equals("shipped")) { // groupViewHolder.tvOrderStatus.setText("待收货"); // } // else if (orderBean.getStatus().equals("denied")) { // groupViewHolder.tvOrderStatus.setText("已拒绝"); // } else if (orderBean.getStatus().equals("received")) groupViewHolder.tvShopName.setText(modelList.get(groupPosition).getMerchantName()); GlideArms.with(mContext).load(modelList.get(groupPosition).getMerchantHeadURL()).circleCrop() .error(R.drawable.icon_user_head) .into(groupViewHolder.ivShop) ; convertView.setPadding(0, 20, 0, 0);//设置列表间距 return convertView; } @Override public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { ChildViewHolder holder; if (convertView == null) { holder = new ChildViewHolder(); convertView = mInflater.inflate(R.layout.item_shop_order, null); holder.ivProduct = convertView.findViewById(R.id.iv_product); holder.tvProductName = convertView.findViewById(R.id.tv_product_name); holder.tvProductPrice = convertView.findViewById(R.id.tv_product_price); holder.tvQuantity = convertView.findViewById(R.id.tvQuantity); holder.tvCreateData = convertView.findViewById(R.id.tv_create_data); holder.tvTotalAmount = convertView.findViewById(R.id.tv_total_amount); holder.tvMemo = convertView.findViewById(R.id.tv_memo); holder.rlFootView = convertView.findViewById(R.id.rl_footView); convertView.setTag(holder); } else { holder = (ChildViewHolder) convertView.getTag(); } OrderItemBean orderItemBean = modelList.get(groupPosition).getItems().get(childPosition); GlideArms.with(mContext).load(orderItemBean.getThumbnail()).centerCrop().into(holder.ivProduct); if (orderItemBean.getProduct_specifications() == null || orderItemBean.getProduct_specifications().size() == 0) { holder.tvProductName.setText(orderItemBean.getName()); } else { holder.tvProductName.setText(orderItemBean.getName() + "(" + orderItemBean.getSpecifications() + ")"); } holder.tvProductPrice.setText(String.format("¥%s", orderItemBean.getPrice())); holder.tvQuantity.setText(String.format("x %s", String.valueOf(modelList.get(groupPosition) .getItems().get(childPosition).getQuantity()))); if (childPosition == (getChildrenCount(groupPosition) - 1)) { holder.rlFootView.setVisibility(View.VISIBLE); holder.tvCreateData.setText(DateUtil.getDateTimeToString(modelList.get(groupPosition) .getCreateDate())); holder.tvTotalAmount.setText("共" + modelList.get(groupPosition).getItems().size() + "件商品,合计" + modelList.get(groupPosition).getAmount() + "元"); if (TextUtils.isEmpty(modelList.get(groupPosition).getMemo())) { holder.tvMemo.setVisibility(View.GONE); } else { holder.tvMemo.setText(modelList.get(groupPosition).getMemo()); } } else { holder.rlFootView.setVisibility(View.GONE); } return convertView; } @Override public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } private class GroupViewHolder { TextView tvShopName;//地址 ImageView ivShop; TextView tvOrderStatus; } private class ChildViewHolder { ImageView ivProduct; TextView tvProductName;//商品名 TextView tvProductPrice; // 售价 TextView tvQuantity;//数量 TextView tvCreateData; TextView tvTotalAmount; TextView tvMemo; RelativeLayout rlFootView; } }
[ "darian.liu@foxmail.com" ]
darian.liu@foxmail.com
4f8e859511fd5f9383a39d8683df7d7c53f0c258
5a027c7a6d9afc1bbc8b2bc86e43e96b80dd9fa8
/workspace_movistar_wl11/zejbVpiStbBaClient/actividadesvpistbba/co/com/telefonica/atiempo/vpistbba/actividades/factory/df/configuracion/ADesactivarCodigoSecretoFactory.java
b154bce260ebed07396ddf9f36041f6afaf8e4b8
[]
no_license
alexcamp/ArrobaTiempoGradle
00135dc6f101e99026a377adc0d3b690cb5f2bd7
fc4a845573232e332c5f1211b72216ce227c3f38
refs/heads/master
2020-12-31T00:18:57.337668
2016-05-27T15:02:04
2016-05-27T15:02:04
59,520,455
0
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
/* * Created on 01-set-09 */ package co.com.telefonica.atiempo.vpistbba.actividades.factory.df.configuracion; import javax.ejb.CreateException; import javax.naming.NamingException; import co.com.telefonica.atiempo.actividades.IActividadEJB; import co.com.telefonica.atiempo.actividades.IActividadFactoryEJBService; import co.com.telefonica.atiempo.vpistbba.actividades.df.configuracion.ejb.sb.ADesactivarCodigoSecretoLocalHome; import com.telefonica_chile.atiempo.actividades.TnProcesoExcepcion; import com.telefonica_chile.atiempo.utiles.HomeFactory; /** * @author 810884 */ public class ADesactivarCodigoSecretoFactory implements IActividadFactoryEJBService { /* (non-Javadoc) * @see co.com.telefonica.atiempo.vpistbba.actividades.factory.IActividadFactoryEJBService#getActividadEJB() */ public IActividadEJB getActividadEJB() throws TnProcesoExcepcion { IActividadEJB actEJB=null; try { ADesactivarCodigoSecretoLocalHome ejbHome= (ADesactivarCodigoSecretoLocalHome)HomeFactory.getHome(ADesactivarCodigoSecretoLocalHome.JNDI_NAME); actEJB=ejbHome.create(); } catch (CreateException e) { throw new TnProcesoExcepcion(e.getClass().getName() + " : El EJB " + ADesactivarCodigoSecretoLocalHome.JNDI_NAME + " no es posible levantarlo" + e.getMessage()); } catch (NamingException e) { throw new TnProcesoExcepcion(e.getClass().getName() + " : El EJB " + ADesactivarCodigoSecretoLocalHome.JNDI_NAME + " no es posible levantarlo" + e.getMessage()); } return actEJB; } }
[ "alexander5075@hotmail.com" ]
alexander5075@hotmail.com
159e3d6ee49520ccbb97c004b4128750ed6f9ef3
7003f8a6e4e0e9ac4da6311957a4dd639edbf5a2
/src/main/java/br/com/enviNFe/SignatureType.java
57df91e395b7374d14d23311744c9c58c59360c4
[]
no_license
renangtm/frente_caixa_contabilidade
65e2586ec2e4e10d7d0dbad70b66fda52a81c0ac
91b1175d3adc8d1357a2cf99efac11223d4071d0
refs/heads/master
2022-12-10T09:59:18.687217
2019-11-06T05:34:12
2019-11-06T05:34:12
212,447,056
1
1
null
2023-08-23T17:54:30
2019-10-02T21:43:38
Java
ISO-8859-1
Java
false
false
4,459
java
// // Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802 // Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem. // Gerado em: 2018.07.04 às 01:31:44 PM BRT // package br.com.enviNFe; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Classe Java de SignatureType complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="SignatureType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="SignedInfo" type="{http://www.w3.org/2000/09/xmldsig#}SignedInfoType"/> * &lt;element name="SignatureValue" type="{http://www.w3.org/2000/09/xmldsig#}SignatureValueType"/> * &lt;element name="KeyInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/> * &lt;/sequence> * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SignatureType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { "signedInfo", "signatureValue", "keyInfo" }) public class SignatureType { @XmlElement(name = "SignedInfo", required = true) protected SignedInfoType signedInfo; @XmlElement(name = "SignatureValue", required = true) protected SignatureValueType signatureValue; @XmlElement(name = "KeyInfo", required = true) protected KeyInfoType keyInfo; @XmlAttribute(name = "Id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String id; /** * Obtém o valor da propriedade signedInfo. * * @return * possible object is * {@link SignedInfoType } * */ public SignedInfoType getSignedInfo() { return signedInfo; } /** * Define o valor da propriedade signedInfo. * * @param value * allowed object is * {@link SignedInfoType } * */ public void setSignedInfo(SignedInfoType value) { this.signedInfo = value; } /** * Obtém o valor da propriedade signatureValue. * * @return * possible object is * {@link SignatureValueType } * */ public SignatureValueType getSignatureValue() { return signatureValue; } /** * Define o valor da propriedade signatureValue. * * @param value * allowed object is * {@link SignatureValueType } * */ public void setSignatureValue(SignatureValueType value) { this.signatureValue = value; } /** * Obtém o valor da propriedade keyInfo. * * @return * possible object is * {@link KeyInfoType } * */ public KeyInfoType getKeyInfo() { return keyInfo; } /** * Define o valor da propriedade keyInfo. * * @param value * allowed object is * {@link KeyInfoType } * */ public void setKeyInfo(KeyInfoType value) { this.keyInfo = value; } /** * Obtém o valor da propriedade id. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Define o valor da propriedade id. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } }
[ "renan_goncalves@outlook.com.br" ]
renan_goncalves@outlook.com.br
57d170a80eb6e58c4b3c22af61bedbcf9e8c8023
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_cad88e4de023f3b7eee6e9990889900a29225121/ConfigurationManager/1_cad88e4de023f3b7eee6e9990889900a29225121_ConfigurationManager_t.java
d06f041af7dee7b983540663d68f126802faeaf8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,252
java
/* * Copyright (C) 2005-2009 Team XBMC * http://xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XBMC Remote; see the file license. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * http://www.gnu.org/copyleft/gpl.html * */ package org.xbmc.android.remote; import android.app.Activity; import android.app.KeyguardManager; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.preference.PreferenceManager; public class ConfigurationManager implements OnSharedPreferenceChangeListener { public final static String PREF_KEYGUARD_DISABLED = "setting_disable_keyguard"; public final static String KEYGUARD_STATUS_ENABLED = "0"; public final static String KEYGUARD_STATUS_REMOTE_ONLY = "1"; public final static String KEYGUARD_STATUS_ALL = "2"; public final static String KEYGUARD_TAG = "xbmc_remote_keyguard_lock"; private static ConfigurationManager sInstance; private Activity mActivity; private boolean mKeyguardDisabled = false; private boolean mKeyguardFromRemote = false; private KeyguardManager.KeyguardLock mKeyguardLock = null; private ConfigurationManager(Activity activity) { mActivity = activity; } public static ConfigurationManager getInstance(Activity activity) { if (sInstance == null) { sInstance = new ConfigurationManager(activity); } else { sInstance.mActivity = activity; } return sInstance; } public void initKeyguard() { initKeyguard(false); } public void initKeyguard(boolean fromRemoteControl) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mActivity); mKeyguardFromRemote = fromRemoteControl; mKeyguardDisabled = isKeyguardDisabled(prefs); prefs.registerOnSharedPreferenceChangeListener(this); } public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.equals(PREF_KEYGUARD_DISABLED)) { boolean disableKeyguardState = isKeyguardDisabled(prefs); if (disableKeyguardState != mKeyguardDisabled) { if (disableKeyguardState) { if (mActivity.hasWindowFocus()) { KeyguardManager keyguardManager = (KeyguardManager) mActivity.getSystemService(Activity.KEYGUARD_SERVICE); mKeyguardLock = keyguardManager.newKeyguardLock(KEYGUARD_TAG); mKeyguardLock.disableKeyguard(); } } else { if (mActivity.hasWindowFocus()) { if (mKeyguardLock != null) { mKeyguardLock.reenableKeyguard(); } mKeyguardLock = null; } } mKeyguardDisabled = disableKeyguardState; } } } public void onActivityResume(Activity activity) { if (mKeyguardDisabled) { KeyguardManager keyguardManager = (KeyguardManager) activity.getSystemService(Activity.KEYGUARD_SERVICE); mKeyguardLock = keyguardManager.newKeyguardLock(KEYGUARD_TAG); mKeyguardLock.disableKeyguard(); } mActivity = activity; } public void onActivityPause() { if (mKeyguardLock != null){ mKeyguardLock.reenableKeyguard(); mKeyguardLock = null; } } private boolean isKeyguardDisabled(SharedPreferences prefs) { String disableKeyguardString = prefs.getString(PREF_KEYGUARD_DISABLED, KEYGUARD_STATUS_ENABLED); if (!mKeyguardFromRemote) { return disableKeyguardString.equals(KEYGUARD_STATUS_ALL); } else { return disableKeyguardString.equals(KEYGUARD_STATUS_REMOTE_ONLY) || disableKeyguardString.equals(KEYGUARD_STATUS_ALL); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3326cac45a4168169ef8aa294aed70e033362079
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_1756776789274360ab9964ac985d5ec1434117bc/CustomDateFormat/8_1756776789274360ab9964ac985d5ec1434117bc_CustomDateFormat_s.java
d76ffa263159ff591b51db51771c0e8a530b5515
[]
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
5,303
java
/* * This file is part of muCommander, http://www.mucommander.com * Copyright (C) 2002-2007 Maxence Bernard * * muCommander is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * muCommander is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.mucommander.text; import com.mucommander.conf.ConfigurationEvent; import com.mucommander.conf.ConfigurationListener; import com.mucommander.conf.impl.MuConfiguration; import java.text.SimpleDateFormat; import java.util.Date; /** * CustomDateFormat allows custom date formatting, according to the date format stored in the preferences. * * @author Maxence Bernard */ public class CustomDateFormat implements ConfigurationListener { /** Singleton instance */ private static CustomDateFormat singleton; /** Custom SimpleDateFormat instance */ private static SimpleDateFormat dateFormat; /** * Creates a new CustomDateFormat instance. */ private CustomDateFormat() {} /** * Forces static fields to be initialized */ public static void init() { // Create a singleton instance and keep it as a static member of this class. // Not doing it so would cause the garbage collector to GC it as MuConfiguration holds // weak references of its listeners. singleton = new CustomDateFormat(); MuConfiguration.addConfigurationListener(singleton); dateFormat = createDateFormat(); } /** * Replace the default '/' separator in the given format string, by the given custom separator. * * @return the given format string with '/' separator characters replaced by the given separator character. */ public static String replaceDateSeparator(String dateFormatString, String separator) { if(separator==null || separator.equals("/")) return dateFormatString; StringBuffer dateFormatStringSB = new StringBuffer(); int pos1 = 0; int pos2; while((pos2=dateFormatString.indexOf('/', pos1))>-1) { dateFormatStringSB.append(dateFormatString.substring(pos1, pos2)); dateFormatStringSB.append(separator); pos1 = pos2+1; } dateFormatStringSB.append(dateFormatString.substring(pos1, dateFormatString.length())); return dateFormatStringSB.toString(); } /** * Returns the date format stored in the preferences and used by this class to format dates. * The format of the returned string is the one used by the <code>java.text.SimpleDateFormat</code> class. */ public static String getDateFormatString() { return replaceDateSeparator( MuConfiguration.getVariable(MuConfiguration.DATE_FORMAT, MuConfiguration.DEFAULT_DATE_FORMAT), MuConfiguration.getVariable(MuConfiguration.DATE_SEPARATOR, MuConfiguration.DEFAULT_DATE_SEPARATOR)) + " " + MuConfiguration.getVariable(MuConfiguration.TIME_FORMAT, MuConfiguration.DEFAULT_TIME_FORMAT); } /** * Forces CustomDateFormat to update the date format by looking it up in the preferences. */ public static void updateDateFormat() { dateFormat = createDateFormat(); } /** * Creates and returns a SimpleDateFormat instance using the date format stored in the preferences. */ private static SimpleDateFormat createDateFormat() { return new SimpleDateFormat(getDateFormatString()); } /** * Formats the given with custom date format and returns a formatted date string. * * @return a formatted string representing the given date. */ public static synchronized String format(Date date) { // Calls to SimpleDateFormat MUST be synchronized otherwise if will start throwing exceptions (verified that!), // that is why this method is synchronized. // Quote from SimpleDateFormat's Javadoc: "Date formats are not synchronized. It is recommended to create // separate format instances for each thread. If multiple threads access a format concurrently, // it must be synchronized externally." return dateFormat.format(date); } /////////////////////////////////// // ConfigurationListener methods // /////////////////////////////////// /** * Listens to some configuration variables. */ public void configurationChanged(ConfigurationEvent event) { String var = event.getVariable(); if (var.equals(MuConfiguration.TIME_FORMAT) || var.equals(MuConfiguration.DATE_FORMAT) || var.equals(MuConfiguration.DATE_SEPARATOR)) dateFormat = createDateFormat(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a6340ffc287748d6d0a1350bd179aedf6d809c48
434eeace9a2d4d19d8946499ad92331bca2e7c5f
/descent.ui/src/descent/internal/ui/text/folding/JavaFoldingStructureProviderRegistry.java
7fdbd7303cd45668d23d0be4b42b956d4d28f5bd
[]
no_license
jacob-carlborg/descent
bc9632d774c5d4b6b36ace5b63ab213e5040c6b6
4a78f1e441aa89632c4a7329fe894f9ed506b4ad
refs/heads/master
2021-03-12T23:27:42.290232
2011-08-26T17:42:07
2011-08-26T17:42:07
2,454,693
0
0
null
null
null
null
UTF-8
Java
false
false
4,851
java
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package descent.internal.ui.text.folding; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.IPreferenceStore; import descent.internal.corext.util.Messages; import descent.ui.PreferenceConstants; import descent.ui.text.folding.IJavaFoldingStructureProvider; import descent.internal.ui.JavaPlugin; /** * @since 3.0 */ public class JavaFoldingStructureProviderRegistry { private static final String EXTENSION_POINT= "foldingStructureProviders"; //$NON-NLS-1$ /** The map of descriptors, indexed by their identifiers. */ private Map fDescriptors; /** * Creates a new instance. */ public JavaFoldingStructureProviderRegistry() { } /** * Returns an array of <code>JavaFoldingStructureProviderDescriptor</code> describing * all extension to the <code>foldingProviders</code> extension point. * * @return the list of extensions to the * <code>quickDiffReferenceProvider</code> extension point. */ public JavaFoldingStructureProviderDescriptor[] getFoldingProviderDescriptors() { synchronized (this) { ensureRegistered(); return (JavaFoldingStructureProviderDescriptor[]) fDescriptors.values().toArray(new JavaFoldingStructureProviderDescriptor[fDescriptors.size()]); } } /** * Returns the folding provider descriptor with identifier <code>id</code> or * <code>null</code> if no such provider is registered. * * @param id the identifier for which a provider is wanted * @return the corresponding provider descriptor, or <code>null</code> if none can be * found */ public JavaFoldingStructureProviderDescriptor getFoldingProviderDescriptor(String id) { synchronized (this) { ensureRegistered(); return (JavaFoldingStructureProviderDescriptor) fDescriptors.get(id); } } /** * Instantiates and returns the provider that is currently configured in the * preferences. * * @return the current provider according to the preferences */ public IJavaFoldingStructureProvider getCurrentFoldingProvider() { IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore(); String currentProviderId= preferenceStore.getString(PreferenceConstants.EDITOR_FOLDING_PROVIDER); JavaFoldingStructureProviderDescriptor desc= getFoldingProviderDescriptor(currentProviderId); // Fallback to default if extension has gone if (desc == null) { String message= Messages.format(FoldingMessages.JavaFoldingStructureProviderRegistry_warning_providerNotFound_resetToDefault, currentProviderId); JavaPlugin.log(new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, message, null)); String defaultProviderId= preferenceStore.getDefaultString(PreferenceConstants.EDITOR_FOLDING_PROVIDER); desc= getFoldingProviderDescriptor(defaultProviderId); /* * In 3.2.1 we don't want to risk anything, hence don't * Assert.isNotNull(provider); */ if (desc == null) return null; preferenceStore.setToDefault(PreferenceConstants.EDITOR_FOLDING_PROVIDER); } try { return desc.createProvider(); } catch (CoreException e) { JavaPlugin.log(e); return null; } } /** * Ensures that the extensions are read and stored in * <code>fDescriptors</code>. */ private void ensureRegistered() { if (fDescriptors == null) reloadExtensions(); } /** * Reads all extensions. * <p> * This method can be called more than once in * order to reload from a changed extension registry. * </p> */ public void reloadExtensions() { IExtensionRegistry registry= Platform.getExtensionRegistry(); Map map= new HashMap(); IConfigurationElement[] elements= registry.getConfigurationElementsFor(JavaPlugin.getPluginId(), EXTENSION_POINT); for (int i= 0; i < elements.length; i++) { JavaFoldingStructureProviderDescriptor desc= new JavaFoldingStructureProviderDescriptor(elements[i]); map.put(desc.getId(), desc); } synchronized(this) { fDescriptors= Collections.unmodifiableMap(map); } } }
[ "asterite@6538119e-2221-0410-ba12-9a5a7e5062c7" ]
asterite@6538119e-2221-0410-ba12-9a5a7e5062c7
d14d45483459258ccad191e47a0e51ccba3fd304
b5f5c802cc7ef69113fc480a4fc4b109e86cf1d6
/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/QueryStringParserTests.java
b287d4415e5a6bd3df896c24916bf58812e24ff6
[ "Apache-2.0" ]
permissive
wilkinsona/spring-restdocs
a5180d3c7149ee57a8918073a303934732cc0c2b
d3a1c0b792433635d034d803f7879a6324b1b1df
refs/heads/master
2022-01-25T15:34:58.481889
2020-09-14T10:33:32
2020-09-14T10:33:32
24,940,450
50
9
null
null
null
null
UTF-8
Java
false
false
3,356
java
/* * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.restdocs.operation; import java.net.URI; import java.util.Arrays; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.CoreMatchers.equalTo; /** * Tests for {@link QueryStringParser}. * * @author Andy Wilkinson */ public class QueryStringParserTests { @Rule public ExpectedException thrown = ExpectedException.none(); private final QueryStringParser queryStringParser = new QueryStringParser(); @Test public void noParameters() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost")); assertThat(parameters.size()).isEqualTo(0); } @Test public void singleParameter() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost?a=alpha")); assertThat(parameters.size()).isEqualTo(1); assertThat(parameters).containsEntry("a", Arrays.asList("alpha")); } @Test public void multipleParameters() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost?a=alpha&b=bravo&c=charlie")); assertThat(parameters.size()).isEqualTo(3); assertThat(parameters).containsEntry("a", Arrays.asList("alpha")); assertThat(parameters).containsEntry("b", Arrays.asList("bravo")); assertThat(parameters).containsEntry("c", Arrays.asList("charlie")); } @Test public void multipleParametersWithSameKey() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost?a=apple&a=avocado")); assertThat(parameters.size()).isEqualTo(1); assertThat(parameters).containsEntry("a", Arrays.asList("apple", "avocado")); } @Test public void encoded() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost?a=al%26%3Dpha")); assertThat(parameters.size()).isEqualTo(1); assertThat(parameters).containsEntry("a", Arrays.asList("al&=pha")); } @Test public void malformedParameter() { this.thrown.expect(IllegalArgumentException.class); this.thrown.expectMessage(equalTo("The parameter 'a=apple=avocado' is malformed")); this.queryStringParser.parse(URI.create("http://localhost?a=apple=avocado")); } @Test public void emptyParameter() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost?a=")); assertThat(parameters.size()).isEqualTo(1); assertThat(parameters).containsEntry("a", Arrays.asList("")); } @Test public void emptyAndNotEmptyParameter() { Parameters parameters = this.queryStringParser.parse(URI.create("http://localhost?a=&a=alpha")); assertThat(parameters.size()).isEqualTo(1); assertThat(parameters).containsEntry("a", Arrays.asList("", "alpha")); } }
[ "awilkinson@pivotal.io" ]
awilkinson@pivotal.io
88fd7047145db5ab61c600c47108ba55822ebb28
2eb2670d8535d15ae47f6c85befac3aaa24ac26f
/projects/pro03Algorithm/src/main/java/com/hef/stack/tis/LargestRectangleArea.java
445e78ff86b616baa83e8c948c763121b6dfa742
[]
no_license
hefrankeleyn/ARTS
327550b24add9d5f70157f29ff22a7f1a84f005d
4ee365a692b0e092a816a6fd7b06a723c061e989
refs/heads/master
2023-05-12T08:58:27.045907
2023-04-29T08:24:12
2023-04-29T08:24:12
142,887,094
0
0
null
null
null
null
UTF-8
Java
false
false
1,294
java
package com.hef.stack.tis; import java.util.*; /** * @Date 2021/10/17 * @Author lifei */ public class LargestRectangleArea { public static void main(String[] args) { LargestRectangleArea rectangleArea = new LargestRectangleArea(); int[] heights = {2,1,5,6,2,3}; // int[] heights = {2,4}; int res = rectangleArea.largestRectangleArea(heights); System.out.println(res); } public int largestRectangleArea(int[] heights) { Deque<Integer> deque = new LinkedList<>(); deque.addFirst(-1); int max=0; for (int i=0; i<=heights.length; i++) { if (i==heights.length || (deque.peek()!=-1 && heights[deque.peek()]>heights[i])){ while ((i==heights.length && deque.peek()!=-1) || (deque.peek()!=-1 && heights[deque.peek()]>heights[i])) { int h_i = deque.removeFirst(); while (deque.peek() != -1 && heights[deque.peek()] == heights[h_i]) h_i = deque.removeFirst(); int l_i = deque.peek(); int r_i = i; int area = (r_i - l_i - 1) * heights[h_i]; max = Math.max(area, max); } } deque.addFirst(i); } return max; } }
[ "hefrankeleyn@gamil.com" ]
hefrankeleyn@gamil.com
c47a20399db4f676fc17e91e2df410b546ac8e8b
6232a4752f83858e96b583a2115554803b44eb61
/src/main/java/com/linxu/microapp/dao/RobotDao.java
d6fa0d66350fdc1d040049917f70c15625ddc984
[]
no_license
URcoders/micro_application
c683a9cee6b66cae005050c452ecd54dc040c4dc
20a63f8260cb1a7e6e50812cbf92ce2073d4033c
refs/heads/master
2022-06-05T03:13:21.751526
2019-05-06T08:43:55
2019-05-06T08:43:55
179,464,085
0
0
null
2022-05-25T06:28:58
2019-04-04T09:17:46
Java
UTF-8
Java
false
false
1,578
java
package com.linxu.microapp.dao; import com.linxu.microapp.models.Robot; import org.apache.ibatis.annotations.*; import java.sql.SQLException; /** * @author linxu * @date 2019/4/27 */ @Mapper public interface RobotDao { /**********************************robot table*****************************************************/ @Insert("INSERT INTO robot (robot_no,robot_type) VALUES (#{robot.robotNumber},#{robot.robotType})") @Options( useGeneratedKeys = true, keyProperty = "id" ) void addRobot(@Param("robot") Robot robot) throws SQLException; @Select("SELECT * FROM robot WHERE robot_no = #{no}") @Results( { @Result(property = "id",column = "robot_id"), @Result(property = "robotNumber",column = "robot_no"), @Result(property = "robotType",column = "robot_type") } ) Robot queryRobotByNumber(@Param("no") String robotNumber); @Select("SELECT * FROM robot WHERE robot_id = #{id}") @Results( { @Result(property = "id",column = "robot_id"), @Result(property = "robotNumber",column = "robot_no"), @Result(property = "robotType",column = "robot_type") } ) Robot queryRobotById(@Param("id") int id); @Update("update robot set robot_type=#{r.robotType},robot_no=#{r.robotNumber} where robot_id=#{rid}") void updateRobot(@Param("r") Robot robot,@Param("rid") int id); /**********************************user_robot*****************/ }
[ "929159338@qq.com" ]
929159338@qq.com
6e8a40ff2cccd4a806a214fd0985d1c701624f51
a737fcf8b109e1b6cee754ccb44ef73d356a4e20
/yoko/spec-corba/src/main/java/org/omg/SecurityLevel2/PrincipalAuthenticatorPOA.java
cddedaa6bc5e582cca4803eff5bfda7813265ab8
[ "Apache-2.0" ]
permissive
napile/napile.classpath
42fc9e1eef7bc291960f98924b1dcfa94ca51379
1599cba24d751a75dceefdabda0cce384e672ed8
refs/heads/master
2020-06-06T05:32:28.210419
2012-10-06T10:39:45
2012-10-06T10:39:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,552
java
package org.omg.SecurityLevel2; /** * org/omg/SecurityLevel2/PrincipalAuthenticatorPOA.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from F:/yoko-1.0/yoko-spec-corba/src/main/idl/SecurityLevel2.idl * 14 Август 2012 г. 21:55:46 EEST */ /* */ public abstract class PrincipalAuthenticatorPOA extends org.omg.PortableServer.Servant implements org.omg.SecurityLevel2.PrincipalAuthenticatorOperations, org.omg.CORBA.portable.InvokeHandler { // Constructors private static java.util.Hashtable _methods = new java.util.Hashtable (); static { _methods.put ("get_supported_authen_methods", new java.lang.Integer (0)); _methods.put ("authenticate", new java.lang.Integer (1)); _methods.put ("continue_authentication", new java.lang.Integer (2)); } public org.omg.CORBA.portable.OutputStream _invoke (String $method, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler $rh) { org.omg.CORBA.portable.OutputStream out = null; java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); if (__method == null) throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); switch (__method.intValue ()) { case 0: // SecurityLevel2/PrincipalAuthenticator/get_supported_authen_methods { String mechanism = org.omg.Security.MechanismTypeHelper.read (in); int $result[] = null; $result = this.get_supported_authen_methods (mechanism); out = $rh.createReply(); org.omg.Security.AuthenticationMethodListHelper.write (out, $result); break; } case 1: // SecurityLevel2/PrincipalAuthenticator/authenticate { int method = org.omg.Security.AuthenticationMethodHelper.read (in); String mechanism = org.omg.Security.MechanismTypeHelper.read (in); String security_name = org.omg.Security.SecurityNameHelper.read (in); org.omg.CORBA.Any auth_data = in.read_any (); org.omg.Security.SecAttribute privileges[] = org.omg.Security.AttributeListHelper.read (in); org.omg.SecurityLevel2.CredentialsHolder creds = new org.omg.SecurityLevel2.CredentialsHolder (); org.omg.CORBA.AnyHolder continuation_data = new org.omg.CORBA.AnyHolder (); org.omg.CORBA.AnyHolder auth_specific_data = new org.omg.CORBA.AnyHolder (); org.omg.Security.AuthenticationStatus $result = null; $result = this.authenticate (method, mechanism, security_name, auth_data, privileges, creds, continuation_data, auth_specific_data); out = $rh.createReply(); org.omg.Security.AuthenticationStatusHelper.write (out, $result); org.omg.SecurityLevel2.CredentialsHelper.write (out, creds.value); out.write_any (continuation_data.value); out.write_any (auth_specific_data.value); break; } case 2: // SecurityLevel2/PrincipalAuthenticator/continue_authentication { org.omg.CORBA.Any response_data = in.read_any (); org.omg.SecurityLevel2.Credentials creds = org.omg.SecurityLevel2.CredentialsHelper.read (in); org.omg.CORBA.AnyHolder continuation_data = new org.omg.CORBA.AnyHolder (); org.omg.CORBA.AnyHolder auth_specific_data = new org.omg.CORBA.AnyHolder (); org.omg.Security.AuthenticationStatus $result = null; $result = this.continue_authentication (response_data, creds, continuation_data, auth_specific_data); out = $rh.createReply(); org.omg.Security.AuthenticationStatusHelper.write (out, $result); out.write_any (continuation_data.value); out.write_any (auth_specific_data.value); break; } default: throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); } return out; } // _invoke // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:SecurityLevel2/PrincipalAuthenticator:1.0"}; public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) { return (String[])__ids.clone (); } public PrincipalAuthenticator _this() { return PrincipalAuthenticatorHelper.narrow( super._this_object()); } public PrincipalAuthenticator _this(org.omg.CORBA.ORB orb) { return PrincipalAuthenticatorHelper.narrow( super._this_object(orb)); } } // class PrincipalAuthenticatorPOA
[ "vistall@i.ua" ]
vistall@i.ua
0581320d57fdc0dba28a8080d19d4349117556a5
b511684052910867af4c32068042b5c7a9d92908
/MDSE-master/lab1/lab1.mdse.industrialManSys/src/manufacturingSystem/TransportSteps.java
7a2a87463e95b23c2a3f320cfe7618ae5c1ce25b
[]
no_license
hchuphal/Chalmers_GU
5e000e8346e669754a1ae675a65b04d5daa81645
68831e266a599fd429dbdf254f9ace7ce0a0c30a
refs/heads/master
2023-01-19T14:29:20.006127
2019-12-01T00:00:53
2019-12-01T00:00:53
225,082,667
1
0
null
2023-01-09T12:05:50
2019-11-30T23:29:22
Java
UTF-8
Java
false
false
1,151
java
/** */ package manufacturingSystem; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Transport Steps</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link manufacturingSystem.TransportSteps#getTransports <em>Transports</em>}</li> * </ul> * * @see manufacturingSystem.ManufacturingSystemPackage#getTransportSteps() * @model * @generated */ public interface TransportSteps extends EachStep { /** * Returns the value of the '<em><b>Transports</b></em>' reference list. * The list contents are of type {@link manufacturingSystem.WorkPieces}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Transports</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Transports</em>' reference list. * @see manufacturingSystem.ManufacturingSystemPackage#getTransportSteps_Transports() * @model required="true" * @generated */ EList<WorkPieces> getTransports(); } // TransportSteps
[ "himanshu.chuphal07@gmail.com" ]
himanshu.chuphal07@gmail.com
66b2fe54eb655d163cda6e64c35d7677b655a421
a411a11a39384b0d4dba78f23e9d1409abaf2bac
/dubbo-test/src/main/java/pattern/dynamic/example/sdynamic/Movie.java
9f931f8f8b5ab5ce9087f27d8956c9d94264be90
[]
no_license
jtracydy/dubbo
8765ed72d0b47faf86a77308afd5f060834326e4
38c48b61ad849ae40c67e176167b970ba33d0b5f
refs/heads/master
2022-12-23T14:38:50.861937
2019-10-15T01:58:33
2019-10-15T01:58:33
143,490,493
0
0
null
null
null
null
UTF-8
Java
false
false
173
java
/* * 2019 */ package pattern.dynamic.example.sdynamic; /** * @author wangdan Date: 2019/3/12 Time: 16:00 * @version $Id$ */ public interface Movie { void play(); }
[ "jtracydy@163.com" ]
jtracydy@163.com
d7fca446c8d9138b92c6c865d1992980df3317b0
3b30f392e996250bd02714d6066aaa4b4f37a5b6
/pet-fetch/src/main/java/com/taobao/api/response/FenxiaoGradeDeleteResponse.java
7a157a1d0b9dd332b44957580f33b4790e84b075
[]
no_license
khaliyo/pet
1d4ec5ff2d21388c008177f44e810483f012a249
4ea1d08b8e75a6fcd4e20e4096c38c318e8af53b
refs/heads/master
2021-01-14T11:57:54.447524
2013-05-21T12:36:30
2013-05-21T12:36:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
626
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.fenxiao.grade.delete response. * * @author auto create * @since 1.0, null */ public class FenxiaoGradeDeleteResponse extends TaobaoResponse { private static final long serialVersionUID = 4314438317324669962L; /** * 操作是否成功 */ @ApiField("is_success") private Boolean isSuccess; public void setIsSuccess(Boolean isSuccess) { this.isSuccess = isSuccess; } public Boolean getIsSuccess( ) { return this.isSuccess; } }
[ "ordinary1792207542@gmail.com" ]
ordinary1792207542@gmail.com
fdec08c59d5ef281d3a62418066a004f63c10831
8376443ea92cd3906c23d13823ba0de09624f16c
/app/src/main/java/moshimoshi/cyplay/com/doublenavigation/ui/custom/AdyenTerminalAddForm.java
3cca797b6991b3d514be93d790e1ea6a08caa6a3
[]
no_license
altkachuk/pixika_offline
cd39b7ffe16a626ff2e3c13db9187ddab2ce6cd0
bd89105279fe899db75ebcd26fc69b63a19ece63
refs/heads/master
2020-05-17T03:02:26.224229
2019-04-25T16:53:37
2019-04-25T16:53:37
183,467,684
0
0
null
null
null
null
UTF-8
Java
false
false
1,795
java
package moshimoshi.cyplay.com.doublenavigation.ui.custom; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import moshimoshi.cyplay.com.doublenavigation.R; /** * Created by romainlebouc on 24/11/2016. */ public class AdyenTerminalAddForm extends LinearLayout { @BindView(R.id.terminal_id) EditText terminalId; @BindView(R.id.status_title) TextView statusMessage; @BindView(R.id.in_progress) View inProgress; public AdyenTerminalAddForm(Context context) { this(context, null); } public AdyenTerminalAddForm(Context context, AttributeSet attrs) { this(context, attrs, 0); } public AdyenTerminalAddForm(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.custom_adyen_terminal_add_form, this, true); // Bind xml ButterKnife.bind(this); } public String getTerminalId() { return terminalId.getText().toString(); } public void setStatus(TerminalAddStatus status, String statusMessage) { this.statusMessage.setText(statusMessage); this.inProgress.setVisibility(status.visibiltiy); } public enum TerminalAddStatus { INIT(GONE), IN_PROGRESS(VISIBLE), DONE(GONE), ERROR(GONE); private final int visibiltiy; TerminalAddStatus(int visibiltiy) { this.visibiltiy = visibiltiy; } } }
[ "andreyltkachuk@gmail.com" ]
andreyltkachuk@gmail.com
e79440df651772806886871a33cfe5919b363b67
286d74972076811b780a6cb748c33c7868cf53a7
/B_Baekjoon/Numbering/Main_02001_to_4000/Main_3943_헤일스톤수열.java
1dcaf53cfa55759b49c759b8552edb7daf5aeb73
[]
no_license
muckyang/Algorithm_Study
8a2d63f1afea5bcbe9fadcfe8d2cdc5010c00487
7ff692c341a012880316dbdb8d0679870039c2d9
refs/heads/master
2023-03-27T14:51:11.200187
2021-03-22T05:59:02
2021-03-22T05:59:02
346,667,291
0
0
null
null
null
null
UTF-8
Java
false
false
546
java
package Main_02001_to_4000; import java.util.Scanner; public class Main_3943_헤일스톤수열 { static int N, num; static int max; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); for (int tc = 0; tc < N; tc++) { num = sc.nextInt(); max = num; solve(num); System.out.println(max); } } private static void solve(int n) { if (max < n) max = n; if (n == 1) return; else { if (n % 2 == 0) { solve(n / 2); } else { solve(n * 3 + 1); } } } }
[ "yn782@naver.com" ]
yn782@naver.com
ce87e1bdaf0999bf9017ff0999f43875cb660e54
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/WhereYouGo-0.9.3-beta/DecompiledCode/Fernflower/src/main/java/com/google/zxing/client/result/SMSTOMMSTOResultParser.java
828b925a934cc1e45a42dd875f61bd475e089c14
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
813
java
package com.google.zxing.client.result; import com.google.zxing.Result; public final class SMSTOMMSTOResultParser extends ResultParser { public SMSParsedResult parse(Result var1) { String var2 = null; String var5 = getMassagedText(var1); SMSParsedResult var6; if (!var5.startsWith("smsto:") && !var5.startsWith("SMSTO:") && !var5.startsWith("mmsto:") && !var5.startsWith("MMSTO:")) { var6 = var2; } else { String var3 = var5.substring(6); var2 = null; int var4 = var3.indexOf(58); var5 = var3; if (var4 >= 0) { var2 = var3.substring(var4 + 1); var5 = var3.substring(0, var4); } var6 = new SMSParsedResult(var5, (String)null, (String)null, var2); } return var6; } }
[ "crash@home.home.hr" ]
crash@home.home.hr
a75ae6c8478779468c93a08c17a67180d891441e
3ac4184c438c85bed29d1dbbd5f16822090bbf73
/XiaoWuWeiboClient/src/com/wwj/weiboClient/model/Favorite.java
a179edcc90183bb8056d831beb6cdc9cdce6ff63
[]
no_license
devilWwj/sinaweibo-tencentweibo-client
09aabe4d2e6308856a3f90ed3df43f1ce1431458
22f7454d4f2ce35b733f87558e08238779c67b54
refs/heads/master
2016-09-07T18:39:50.395228
2014-11-10T09:58:19
2014-11-10T09:58:19
26,429,394
1
1
null
null
null
null
UTF-8
Java
false
false
934
java
package com.wwj.weiboClient.model; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Date; import com.wwj.weiboClient.interfaces.WeiboObject; import com.wwj.weiboClient.util.Tools; import android.text.Html; public class Favorite implements WeiboObject, Serializable { /** 收藏时间 */ public String favorited_time; /** 收藏的微博信息字段?*/ public Status status; /** 获取Date形式的创建时段?*/ public Date getCreatedAt() { return Tools.strToDate(status.created_at); } public String getFormatCreatedAt() { SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm"); return sdf.format(getCreatedAt()); } /** 文本形式的source�?*/ private String text_source; /** 获取文本形式的source */ public String getTextSource() { if (text_source == null) { text_source = Html.fromHtml(status.source).toString(); } return text_source; } }
[ "mac@macdeMacBook-Pro.local" ]
mac@macdeMacBook-Pro.local
8a5042b18f14221e993fa9f97696aae24504e77d
eb840800bc31f991eab945d9e6efe694143b6718
/codility-algos/src/main/java/algos/MedianOfTwoSortedArray.java
b7bdad6bf430d1098c6faaaed2008b5fb1fa35ba
[]
no_license
aqib1/HackCodeLeet
f3ef6e76bb0d4a94b4fc6cbcca1dc76f8a3fc420
65c4b30395e980e73e1abec5219c8a37ddb5f063
refs/heads/master
2023-03-16T23:03:09.118125
2023-03-13T08:07:30
2023-03-13T08:07:30
228,961,291
10
3
null
2023-01-08T02:51:52
2019-12-19T02:45:26
Java
UTF-8
Java
false
false
757
java
package algos; public class MedianOfTwoSortedArray { // Time complexity O(n) and space O(n+m) public double findMedianSortedArrays(int[] nums1, int[] nums2) { int[] merge = merge(nums1, nums2); int half = merge.length / 2; return merge.length % 2 != 0 ? merge[half] : // ((double) merge[half - 1] + merge[half]) / 2; } private int[] merge(int[] nums1, int[] nums2) { int[] merge = new int[nums1.length + nums2.length]; int i = 0, j = 0, k = 0; while (i < nums1.length && j < nums2.length) { if (nums1[i] <= nums2[j]) merge[k++] = nums1[i++]; else merge[k++] = nums2[j++]; } while (i < nums1.length) { merge[k++] = nums1[i++]; } while (j < nums2.length) { merge[k++] = nums2[j++]; } return merge; } }
[ "aqibbutt3078@gmail.com" ]
aqibbutt3078@gmail.com
a40648d607d6ba12e36804abf27088944b59bfbc
c404d8a4561428ceb878ce85b5c0cee2bf3f7a14
/intelliwork/src/main/java/com/hxsn/intelliwork/adapter/FolderAdapter.java
312b4de03ab37a8353eb439bbbe2f4ac5f5ca72b
[]
no_license
jielysong/HXSN
3e55acc7c1c35b76d9a3bf106155d2ec5ca4a5e9
b336bdbf2d9e4ecc6e10a01583812b01a2706cb5
refs/heads/master
2021-01-17T20:00:01.236954
2016-06-16T06:45:32
2016-06-16T06:45:32
61,268,879
0
1
null
null
null
null
UTF-8
Java
false
false
4,180
java
package com.hxsn.intelliwork.adapter; import java.io.File; import java.util.ArrayList; import java.util.List; import android.content.Context; 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.hxsn.intelliwork.R; import com.hxsn.intelliwork.beans.Folder; import com.squareup.picasso.Picasso; /** * 文件夹Adapter * lvningpeng 2015/12/21. */ public class FolderAdapter extends BaseAdapter { private Context mContext; private LayoutInflater mInflater; private List<Folder> mFolders = new ArrayList<Folder>(); int mImageSize; int lastSelected = 0; public FolderAdapter(Context context){ mContext = context; mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mImageSize = mContext.getResources().getDimensionPixelOffset(R.dimen.folder_cover_size); } /** * 设置数据�? * @param folders */ public void setData(List<Folder> folders) { if(folders != null && folders.size()>0){ mFolders = folders; }else{ mFolders.clear(); } notifyDataSetChanged(); } @Override public int getCount() { return mFolders.size()+1; } @Override public Folder getItem(int i) { if(i == 0) return null; return mFolders.get(i-1); } @Override public long getItemId(int i) { return i; } @Override public View getView(int i, View view, ViewGroup viewGroup) { ViewHolder holder; if(view == null){ view = mInflater.inflate(R.layout.list_item_folder, viewGroup, false); holder = new ViewHolder(view); }else{ holder = (ViewHolder) view.getTag(); } if (holder != null) { if(i == 0){ holder.name.setText("所有图片"); holder.size.setText(getTotalImageSize()+"张"); if(mFolders.size()>0){ Folder f = mFolders.get(0); Picasso.with(mContext) .load(new File(f.cover.path)) .error(R.drawable.default_error) .resize(mImageSize, mImageSize) .centerCrop() .into(holder.cover); } }else { holder.bindData(getItem(i)); } if(lastSelected == i){ holder.indicator.setVisibility(View.VISIBLE); }else{ holder.indicator.setVisibility(View.INVISIBLE); } } return view; } private int getTotalImageSize(){ int result = 0; if(mFolders != null && mFolders.size()>0){ for (Folder f: mFolders){ result += f.images.size(); } } return result; } public void setSelectIndex(int i) { if(lastSelected == i) return; lastSelected = i; notifyDataSetChanged(); } public int getSelectIndex(){ return lastSelected; } class ViewHolder{ ImageView cover; TextView name; TextView size; ImageView indicator; ViewHolder(View view){ cover = (ImageView)view.findViewById(R.id.cover); name = (TextView) view.findViewById(R.id.name); size = (TextView) view.findViewById(R.id.size); indicator = (ImageView) view.findViewById(R.id.indicator); view.setTag(this); } void bindData(Folder data) { name.setText(data.name); size.setText(data.images.size()+"张"); // 显示图片 Picasso.with(mContext) .load(new File(data.cover.path)) .placeholder(R.drawable.default_error) .resize(mImageSize, mImageSize) .centerCrop() .into(cover); // TODO 选择标识 } } }
[ "jielysong@163.com" ]
jielysong@163.com
adff03862ab86a7c60bbb3792ba39d65e0cf997f
d2697b2dc2ada2a5db3d3b763f00648be682a3c5
/bookexchangeUpdated(1)_source_from_JADX/sources/com/google/firebase/analytics/connector/AnalyticsConnectorImpl.java
f9da58fddfaa08b5c99f3bc45bc659ea6e0f9b9f
[]
no_license
cseadnan16/Uncomplete-project--Android-
3639b51512c23bfe5baf97d0328a4939133bab15
3b7036115db7ae1f141678282cc892ed1bc5f56e
refs/heads/main
2023-03-06T20:25:28.244479
2021-02-21T07:35:29
2021-02-21T07:35:29
340,841,260
0
0
null
null
null
null
UTF-8
Java
false
false
6,440
java
package com.google.firebase.analytics.connector; import android.content.Context; import android.os.Bundle; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.measurement.AppMeasurement; import com.google.firebase.DataCollectionDefaultChange; import com.google.firebase.FirebaseApp; import com.google.firebase.analytics.connector.AnalyticsConnector; import com.google.firebase.analytics.connector.internal.zza; import com.google.firebase.analytics.connector.internal.zzc; import com.google.firebase.analytics.connector.internal.zzd; import com.google.firebase.analytics.connector.internal.zze; import com.google.firebase.events.Event; import com.google.firebase.events.Subscriber; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /* compiled from: com.google.android.gms:play-services-measurement-api@@17.2.3 */ public class AnalyticsConnectorImpl implements AnalyticsConnector { private static volatile AnalyticsConnector zzb; final Map<String, zza> zza = new ConcurrentHashMap(); private final AppMeasurement zzc; private AnalyticsConnectorImpl(AppMeasurement appMeasurement) { Preconditions.checkNotNull(appMeasurement); this.zzc = appMeasurement; } public static AnalyticsConnector getInstance(FirebaseApp firebaseApp, Context context, Subscriber subscriber) { Preconditions.checkNotNull(firebaseApp); Preconditions.checkNotNull(context); Preconditions.checkNotNull(subscriber); Preconditions.checkNotNull(context.getApplicationContext()); if (zzb == null) { synchronized (AnalyticsConnectorImpl.class) { if (zzb == null) { Bundle bundle = new Bundle(1); if (firebaseApp.isDefaultApp()) { subscriber.subscribe(DataCollectionDefaultChange.class, zzb.zza, zza.zza); bundle.putBoolean("dataCollectionDefaultEnabled", firebaseApp.isDataCollectionDefaultEnabled()); } zzb = new AnalyticsConnectorImpl(AppMeasurement.zza(context, bundle)); } } } return zzb; } public static AnalyticsConnector getInstance() { return getInstance(FirebaseApp.getInstance()); } public static AnalyticsConnector getInstance(FirebaseApp firebaseApp) { return (AnalyticsConnector) firebaseApp.get(AnalyticsConnector.class); } public void logEvent(String str, String str2, Bundle bundle) { if (bundle == null) { bundle = new Bundle(); } if (zzd.zza(str) && zzd.zza(str2, bundle) && zzd.zza(str, str2, bundle)) { zzd.zzb(str, str2, bundle); this.zzc.logEventInternal(str, str2, bundle); } } public void setUserProperty(String str, String str2, Object obj) { if (zzd.zza(str) && zzd.zza(str, str2)) { this.zzc.setUserPropertyInternal(str, str2, obj); } } public Map<String, Object> getUserProperties(boolean z) { return this.zzc.getUserProperties(z); } public AnalyticsConnector.AnalyticsConnectorHandle registerAnalyticsConnectorListener(final String str, AnalyticsConnector.AnalyticsConnectorListener analyticsConnectorListener) { Object obj; Preconditions.checkNotNull(analyticsConnectorListener); if (!zzd.zza(str) || zza(str)) { return null; } AppMeasurement appMeasurement = this.zzc; if ("fiam".equals(str)) { obj = new zzc(appMeasurement, analyticsConnectorListener); } else if ("crash".equals(str) || "clx".equals(str)) { obj = new zze(appMeasurement, analyticsConnectorListener); } else { obj = null; } if (obj == null) { return null; } this.zza.put(str, obj); return new AnalyticsConnector.AnalyticsConnectorHandle() { public void unregister() { if (AnalyticsConnectorImpl.this.zza(str)) { AnalyticsConnector.AnalyticsConnectorListener zza2 = AnalyticsConnectorImpl.this.zza.get(str).zza(); if (zza2 != null) { zza2.onMessageTriggered(0, (Bundle) null); } AnalyticsConnectorImpl.this.zza.remove(str); } } public void registerEventNames(Set<String> set) { if (AnalyticsConnectorImpl.this.zza(str) && str.equals("fiam") && set != null && !set.isEmpty()) { AnalyticsConnectorImpl.this.zza.get(str).zza(set); } } public void unregisterEventNames() { if (AnalyticsConnectorImpl.this.zza(str) && str.equals("fiam")) { AnalyticsConnectorImpl.this.zza.get(str).zzb(); } } }; } public void setConditionalUserProperty(AnalyticsConnector.ConditionalUserProperty conditionalUserProperty) { if (zzd.zza(conditionalUserProperty)) { this.zzc.setConditionalUserProperty(zzd.zzb(conditionalUserProperty)); } } public void clearConditionalUserProperty(String str, String str2, Bundle bundle) { if (str2 == null || zzd.zza(str2, bundle)) { this.zzc.clearConditionalUserProperty(str, str2, bundle); } } public List<AnalyticsConnector.ConditionalUserProperty> getConditionalUserProperties(String str, String str2) { ArrayList arrayList = new ArrayList(); for (AppMeasurement.ConditionalUserProperty zza2 : this.zzc.getConditionalUserProperties(str, str2)) { arrayList.add(zzd.zza(zza2)); } return arrayList; } public int getMaxUserProperties(String str) { return this.zzc.getMaxUserProperties(str); } /* access modifiers changed from: private */ public final boolean zza(String str) { return !str.isEmpty() && this.zza.containsKey(str) && this.zza.get(str) != null; } static final /* synthetic */ void zza(Event event) { boolean z = ((DataCollectionDefaultChange) event.getPayload()).enabled; synchronized (AnalyticsConnectorImpl.class) { ((AnalyticsConnectorImpl) zzb).zzc.zza(z); } } }
[ "adnanan.cse2016@gmail.com" ]
adnanan.cse2016@gmail.com
5932bf55f5c423e60a9fc3f0d67c4282bdc0c542
352b10ed3ab99d5687492f2707fd825047d10148
/src/main/java/com/sjc/enumerated/OzWitch.java
324a1269ea50621f59867f62ba8dcdb82617ed07
[]
no_license
sunjiecheng/Thinking-in-Java
81b260e4bc9c9137c9c0b37330cb0bb5e6c7ab23
4add447dac23483249e281879a337f2631701fc1
refs/heads/master
2022-02-24T08:40:21.154529
2019-09-21T08:45:18
2019-09-21T08:45:18
112,471,196
0
0
null
null
null
null
UTF-8
Java
false
false
900
java
package com.sjc.enumerated; import static net.mindview.util.Print.print; /** * @author jiecheng * @create 2017-12-07 下午10:00 */ public enum OzWitch { // Instances must be defined first, before methods: WEST("Miss Gulch, aka the Wicked Witch of the West"), NORTH("Glinda, the Good Witch of the North"), EAST("Wicked Witch of the East, wearer of the Ruby " + "Slippers, crushed by Dorothy's house"), SOUTH("Good by inference, but missing"); private String description; // Constructor must be package or private access: private OzWitch(String description) { this.description = description; } public String getDescription() { return description; } public static void main(String[] args) { for (OzWitch witch : OzWitch.values()) { print(witch + ": " + witch.getDescription()); } } }
[ "tojiecheng@163.com" ]
tojiecheng@163.com
f7cb873f1e62af71a1c24222fe3731f83e187e5e
0558bde59ea4699e3af128fbf7679d54a6ff855a
/frame/src/payment/src/main/java/com/eastinno/otransos/payment/union/pc/util/QuickPayConf.java
e9b14ce31348fab78f65b4c4737812f84aeb9bab
[]
no_license
lingxfeng/seafood
758fccfc2ef4ff7b5ec1317de3fde32155cc0939
4015e374d373fa7df3de941b727161487610484d
refs/heads/master
2022-08-12T19:21:34.172827
2020-12-15T06:16:53
2020-12-15T06:17:08
81,176,380
1
2
null
2022-07-07T23:17:42
2017-02-07T06:50:25
JavaScript
UTF-8
Java
false
false
2,809
java
package com.eastinno.otransos.payment.union.pc.util; public class QuickPayConf { public final static String version = "1.0.0"; // 编码方式 public final static String charset = "UTF-8"; private final static String UPOP_BASE_URL = "https://unionpaysecure.com/api/"; private final static String UPOP_BSPAY_BASE_URL = "https://besvr.unionpaysecure.com/api/"; private final static String UPOP_QUERY_BASE_URL = "http://58.246.226.99/UpopWeb/api/"; // 支付网址 public final static String gateWay = UPOP_BASE_URL + "Pay.action"; // 后续交易网址 public final static String backStagegateWay = UPOP_BSPAY_BASE_URL + "BSPay.action"; // 查询网址 public final static String queryUrl = UPOP_QUERY_BASE_URL + "Query.action"; // 认证支付2.0网址 public final static String authPayUrl = UPOP_BASE_URL + "AuthPay.action"; // 发短信网址 public final static String smsUrl = UPOP_BASE_URL + "Sms.action"; // 商户代码 public static String merCode = "898111148990003"; // 商户名称 public final static String merName = "梦坊在线"; public final static String merFrontEndUrl = "union_pc_return.otr"; public final static String merBackEndUrl = "union_pc_notify.otr"; // 加密方式 public final static String signType = "MD5"; public final static String signType_SHA1withRSA = "SHA1withRSA"; public static String securityKey = "BNFTYU50T6RL4LPUPIWFPOL5PLU"; // 签名 public final static String signature = "signature"; public final static String signMethod = "signMethod"; // 组装消费请求包 public final static String[] reqVo = new String[] {"version", "charset", "transType", "origQid", "merId", "merAbbr", "acqCode", "merCode", "commodityUrl", "commodityName", "commodityUnitPrice", "commodityQuantity", "commodityDiscount", "transferFee", "orderNumber", "orderAmount", "orderCurrency", "orderTime", "customerIp", "customerName", "defaultPayType", "defaultBankNumber", "transTimeout", "frontEndUrl", "backEndUrl", "merReserved"}; public final static String[] notifyVo = new String[] {"charset", "cupReserved", "exchangeDate", "exchangeRate", "merAbbr", "merId", "orderAmount", "orderCurrency", "orderNumber", "qid", "respCode", "respMsg", "respTime", "settleAmount", "settleCurrency", "settleDate", "traceNumber", "traceTime", "transType", "version"}; public final static String[] queryVo = new String[] {"version", "charset", "transType", "merId", "orderNumber", "orderTime", "merReserved"}; public final static String[] smsVo = new String[] {"version", "charset", "acqCode", "merId", "merAbbr", "orderNumber", "orderAmount", "orderCurrency", "merReserved"}; }
[ "991736913@qq.com" ]
991736913@qq.com
fc331fe416ec2bc7a652c6a2855b1939db9cc6c8
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE477_Obsolete_Functions/CWE477_Obsolete_Functions__Date_parse_10.java
f0b23986913b422578d1c4e45e3e335637816b8e
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
2,524
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE477_Obsolete_Functions__Date_parse_10.java Label Definition File: CWE477_Obsolete_Functions.label.xml Template File: point-flaw-10.tmpl.java */ /* * @description * CWE: 477 Use of Obsolete Functions * Sinks: Date_parse * GoodSink: Use of preferred java.text.DateFormat.parse(String) * BadSink : Use of deprecated java.util.Date.parse(String) method * Flow Variant: 10 Control flow: if(IO.staticTrue) and if(IO.staticFalse) * * */ package testcases.CWE477_Obsolete_Functions; import testcasesupport.*; public class CWE477_Obsolete_Functions__Date_parse_10 extends AbstractTestCase { public void bad() throws Throwable { if (IO.staticTrue) { /* FLAW: Use of deprecated Date.parse(String) method */ long unixDate = java.util.Date.parse("2010-07-13 10:41:00"); IO.writeLine(unixDate); /* Use unixDate */ } } /* good1() changes IO.staticTrue to IO.staticFalse */ private void good1() throws Throwable { if (IO.staticFalse) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); } else { /* FIX: Use preferred DateFormat.parse(String) method */ java.util.Date date = java.text.DateFormat.getInstance().parse("2010-07-13 10:41:00"); IO.writeLine(date.toString()); /* Use date */ } } /* good2() reverses the bodies in the if statement */ private void good2() throws Throwable { if (IO.staticTrue) { /* FIX: Use preferred DateFormat.parse(String) method */ java.util.Date date = java.text.DateFormat.getInstance().parse("2010-07-13 10:41:00"); IO.writeLine(date.toString()); /* Use date */ } } public void good() throws Throwable { good1(); good2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
af165668e98db34511b1b57860a583ce1bfa2095
e6cb9525dbfa760086e715e4926f0f0e41e72ad4
/qyds-service-api/src/main/java/net/dlyt/qyds/web/service/ErpBankRecordService.java
ac60e8e1315b428e9d42bb5694c4cdb77044f36a
[]
no_license
422517423/QYDS
97fbd76d05ef47d23468a173972e734e82768817
bcee5294c0554a2c35d11ea15663cba978b84016
refs/heads/master
2021-10-08T10:10:31.652107
2018-12-11T02:03:31
2018-12-11T02:03:31
113,963,190
0
3
null
2018-01-04T12:44:58
2017-12-12T08:22:33
JavaScript
UTF-8
Java
false
false
1,692
java
package net.dlyt.qyds.web.service; import com.alibaba.fastjson.JSONObject; import net.dlyt.qyds.common.dto.ext.ErpBankRecordExt; import net.dlyt.qyds.common.form.ErpBankRecordForm; import java.util.List; /** * Created by zlh on 2016/8/6. */ public interface ErpBankRecordService { /** * 根据Id获取库存列表 * * @return */ JSONObject selectAll(); /** * 根据条件获取库存列表 * * @param record * @return */ JSONObject selectBySelective(String record); /** * 根据条件获取合计库存列表 * * @param form * @return */ JSONObject selectSumByPage(String form); /** * 根据条件获取合计库存件数 * * @param form * @return */ JSONObject getCountSumByPage(String form); /** * 根据条件获取库存记录列表 * * @param record * @return */ JSONObject selectRecordByPage(String record); /** * 根据ID获取库存信息 * * @param id * @return */ JSONObject getById(String id); /** * 根据ID更新库存信息 * * @param record */ JSONObject updateById(String record); /** * 新建库存信息 * * @param record */ JSONObject insert(String record); /** * 根据ID物理删除库存信息 * * @param key */ JSONObject deleteByPrimaryKey(String key); /** * 物理删除所以库存信息 * */ JSONObject deleteAll(); /** * 删除原有数据,批量导入库存信息 * * @param data */ JSONObject inputAll(String data); }
[ "422517423@qq.com" ]
422517423@qq.com
7f1b0a5645afb8193eda9dbea18cf136966baa4d
28a9e7a9aa62b0114f0dc4469b82ac1698d0c95f
/java/common/cout970/UltraTech/packets/PacketTesseract.java
a1d4579ff2b339ae2b94ecd4c4330f2085d68467
[]
no_license
Kilok/UltraTech
c36d6197e544c84c5dff23f0cfbee28f3f59d2ae
10fd80a54df71733b2eb824198080e624c308aaf
refs/heads/master
2021-01-16T20:06:45.316379
2014-06-20T18:32:19
2014-06-20T18:32:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,471
java
package common.cout970.UltraTech.packets; import api.cout970.UltraTech.network.PacketBase; import common.cout970.UltraTech.TileEntities.electric.TesseractEntity; import common.cout970.UltraTech.TileEntities.electric.TesseractEntity.T_Mode; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; public class PacketTesseract extends PacketBase{ int x,y,z; int mode,freq; public PacketTesseract(TileEntity t,int mode, int freq){ x = t.xCoord; y = t.yCoord; z = t.zCoord; this.mode = mode; this.freq = freq; } public PacketTesseract(){} @Override public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { PacketBuffer pb = new PacketBuffer(buffer); pb.writeInt(x); pb.writeShort(y); pb.writeInt(z); pb.writeInt(mode); pb.writeInt(freq); } @Override public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { PacketBuffer pb = new PacketBuffer(buffer); x = pb.readInt(); y = pb.readShort(); z = pb.readInt(); mode = pb.readInt(); freq = pb.readInt(); } @Override public void handleClientSide(EntityPlayer player) { } @Override public void handleServerSide(EntityPlayer player) { TesseractEntity a = (TesseractEntity) player.worldObj.getTileEntity(x, y, z); a.setFrequency(freq); a.changeMode(T_Mode.getMode(mode)); } }
[ "thecout970@gmail.com" ]
thecout970@gmail.com
48c1dc26d12361cb83bb14425562cc7435addc63
551e459d83c4f8e006d32b54d6365eacc6c78e00
/smartas-demo/src/main/java/org/smartas/demo/workflow/service/impl/DemoWorkflowServiceImpl.java
b1162281637ad4094a9bfe3eb407472fc291afcc
[]
no_license
summitxf/SmartAs
088f8b5185e215aae2cec31061b13c7316522f72
a8235d6ddadf5b6e42694f0a3a7d926fbea0869d
refs/heads/master
2021-01-18T10:49:58.807715
2016-07-05T02:54:35
2016-07-05T02:54:35
50,152,795
1
0
null
2016-01-22T02:44:49
2016-01-22T02:44:49
null
UTF-8
Java
false
false
658
java
package org.smartas.demo.workflow.service.impl; import org.smartas.core.service.BaseFlowServiceImpl; import org.smartas.demo.workflow.DemoWorkflow; import org.smartas.demo.workflow.dao.DemoWorkflowDao; import org.smartas.demo.workflow.service.DemoWorkflowService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * @author ftl * */ @Service public class DemoWorkflowServiceImpl extends BaseFlowServiceImpl<DemoWorkflow> implements DemoWorkflowService { @Autowired private DemoWorkflowDao dao; protected DemoWorkflowDao getDao() { return dao; } //// }
[ "chenjpu@gmail.com" ]
chenjpu@gmail.com
5699683f6b21bcfb1d4d3969f9ffdba305e88540
32d98545e373a15eace94da9db91ca69c26dd577
/src/com/transportation/SIRI_IL/SOAP/InfoLinkStructure2.java
0f7e78a79bf045fc24c7797f1661ee0be477aaac
[]
no_license
sagiben/SIRI_IL
80eedc6e2530ef6d2e367ed6d70797e7e350120a
95e3526a6ea02ef2b563f77bfb446f1d20f0ef20
refs/heads/master
2016-09-10T01:59:40.616241
2013-02-24T21:17:33
2013-02-24T21:17:33
7,036,640
1
0
null
null
null
null
UTF-8
Java
false
false
1,417
java
package com.transportation.SIRI_IL.SOAP; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * Type for Info Link. * * <p>Java class for InfoLinkStructure complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="InfoLinkStructure"> * &lt;simpleContent> * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>anyURI"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "InfoLinkStructure", namespace = "http://www.ifopt.org.uk/ifopt", propOrder = { "value" }) public class InfoLinkStructure2 { @XmlValue @XmlSchemaType(name = "anyURI") protected String value; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } }
[ "ilnextbus@gmail.com" ]
ilnextbus@gmail.com
a5dbef0c8dca93201f9ee23826ceb44bbfbabc10
7a699656fee75c43d493497510c081093cf2de56
/bos_parent/bos_domain/src/main/java/com/hafele/bos/domain/Decidedzone.java
56285d3beecfef718dfd683af3fb028db689b787
[]
no_license
wenMN1994/BOS
715e60f8db3973203538a8e78411e58bfbadaec3
559abda0c8fece16a0f052c1b363298d97b6e27c
refs/heads/master
2020-03-27T19:40:09.625215
2018-09-21T03:05:57
2018-09-21T03:05:57
147,004,302
0
1
null
null
null
null
UTF-8
Java
false
false
1,199
java
package com.hafele.bos.domain; import java.util.HashSet; import java.util.Set; /** * 定区 */ public class Decidedzone implements java.io.Serializable { // Fields /** * serialVersionUID */ private static final long serialVersionUID = 2437819101012210387L; private String id; private Staff staff; private String name; private Set subareas = new HashSet(0); // Constructors /** default constructor */ public Decidedzone() { } /** minimal constructor */ public Decidedzone(String id) { this.id = id; } /** full constructor */ public Decidedzone(String id, Staff staff, String name, Set subareas) { this.id = id; this.staff = staff; this.name = name; this.subareas = subareas; } // Property accessors public String getId() { return this.id; } public void setId(String id) { this.id = id; } public Staff getStaff() { return this.staff; } public void setStaff(Staff staff) { this.staff = staff; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public Set getSubareas() { return this.subareas; } public void setSubareas(Set subareas) { this.subareas = subareas; } }
[ "18475536452@163.com" ]
18475536452@163.com
6aef87fa421f3d2b4351f08731b0ed034a971e65
7683938be3d4e276106ee60b227a8bf9351ff906
/app/src/main/java/com/zige/robot/http/rxhttp/converter/ConverterFactory.java
de248ff2d382a72c57774831dc5d4a9c081c1381
[]
no_license
PhoneSj/Robot
a42aad4c1c0b34607ed68d8ed777190e18dd2721
59a5978ef4ba8338edd7afa78c57fb0edae6b92e
refs/heads/master
2021-07-16T02:52:12.023042
2017-10-10T11:47:42
2017-10-10T11:47:42
106,408,173
0
0
null
null
null
null
UTF-8
Java
false
false
1,251
java
package com.zige.robot.http.rxhttp.converter; import com.google.gson.Gson; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import okhttp3.ResponseBody; import retrofit2.Converter; import retrofit2.Retrofit; /** *自定义的转换器工厂类 */ public class ConverterFactory extends Converter.Factory { private final Gson gson; public static ConverterFactory create() { return create(new Gson()); } public static ConverterFactory create(Gson gson) { return new ConverterFactory(gson); } private ConverterFactory(Gson gson) { if (gson == null) throw new NullPointerException(ConverterFactory.class.getSimpleName()+":gson == null"); this.gson = gson; } @Override public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { return new ResponseConverter<>(gson, type); } // @Override // public Converter<?, RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { // TypeAdapter<?> adapter = gson.getAdapter(TypeToken.get(type)); // return new RequestConverter<>(gson, adapter); // } }
[ "724430327@qq.com" ]
724430327@qq.com
06b1b326dfa2dc068bb9f66366b6a902eea36ba7
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
/acm-module-hrb-sys/src/main/java/com/wisdom/acm/hrb/sys/common/PropertiesLoaderUtils.java
7468cd78d453b0675a8a234d3a6a06a581c78870
[ "Apache-2.0" ]
permissive
daiqingsong2021/ord_project
332056532ee0d3f7232a79a22e051744e777dc47
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
refs/heads/master
2023-09-04T12:11:51.519578
2021-10-28T01:58:43
2021-10-28T01:58:43
406,659,566
0
0
null
null
null
null
UTF-8
Java
false
false
5,320
java
package com.wisdom.acm.hrb.sys.common; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; import java.util.Properties; /** * Properties文件载入工具类. 可载入多个properties文件, 相同的属性在最后载入的文件中的值将会覆盖之前的值,但以System的Property优先. * * @author calvin * @version 2013-05-15 */ public class PropertiesLoaderUtils { private static Logger logger = LoggerFactory.getLogger(PropertiesLoaderUtils.class); private static ResourceLoader resourceLoader = new DefaultResourceLoader(); private final Properties properties; public PropertiesLoaderUtils(String... resourcesPaths) { properties = loadProperties(resourcesPaths); } public Properties getProperties() { return properties; } /** * 取出Property,但以System的Property优先,取不到返回空字符串. */ private String getValue(String key) { String systemProperty = System.getProperty(key); if (systemProperty != null) { return systemProperty; } if (properties.containsKey(key)) { return properties.getProperty(key); } return ""; } /** * 取出String类型的Property,但以System的Property优先,如果都为Null则抛出异常. */ public String getProperty(String key) { String value = getValue(key); if (value == null) { throw new NoSuchElementException(); } return value; } /** * 取出String类型的Property,但以System的Property优先.如果都为Null则返回Default值. */ public String getProperty(String key, String defaultValue) { String value = getValue(key); return value != null ? value : defaultValue; } /** * 取出Integer类型的Property,但以System的Property优先.如果都为Null或内容错误则抛出异常. */ public Integer getInteger(String key) { String value = getValue(key); if (value == null) { throw new NoSuchElementException(); } return Integer.valueOf(value); } /** * 取出Integer类型的Property,但以System的Property优先.如果都为Null则返回Default值,如果内容错误则抛出异常 */ public Integer getInteger(String key, Integer defaultValue) { String value = getValue(key); return value != null ? Integer.valueOf(value) : defaultValue; } /** * 取出Double类型的Property,但以System的Property优先.如果都为Null或内容错误则抛出异常. */ public Double getDouble(String key) { String value = getValue(key); if (value == null) { throw new NoSuchElementException(); } return Double.valueOf(value); } /** * 取出Double类型的Property,但以System的Property优先.如果都为Null则返回Default值,如果内容错误则抛出异常 */ public Double getDouble(String key, Integer defaultValue) { String value = getValue(key); return value != null ? Double.valueOf(value) : defaultValue; } /** * 取出Boolean类型的Property,但以System的Property优先.如果都为Null抛出异常,如果内容不是true/false则返回false. */ public Boolean getBoolean(String key) { String value = getValue(key); if (value == null) { throw new NoSuchElementException(); } return Boolean.valueOf(value); } /** * 取出Boolean类型的Property,但以System的Property优先.如果都为Null则返回Default值,如果内容不为true/false则返回false. */ public Boolean getBoolean(String key, boolean defaultValue) { String value = getValue(key); return value != null ? Boolean.valueOf(value) : defaultValue; } /** * 载入多个文件, 文件路径使用Spring Resource格式. */ private Properties loadProperties(String... resourcesPaths) { Properties props = new Properties(); for (String location : resourcesPaths) { //logger.debug("Loading properties file from:" + location); InputStream is = null; try { Resource resource = resourceLoader.getResource(location); is = resource.getInputStream(); props.load(is); } catch (IOException ex) { logger.info("Could not load properties from path:" + location + ", " + ex.getMessage()); } finally { if (is != null) { try { is.close(); } catch (IOException e) { } } } } return props; } }
[ "homeli@126.com" ]
homeli@126.com
d9d5f625d12bb2a931139b816cc132cabb4c8737
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE89_SQL_Injection/s02/CWE89_SQL_Injection__Environment_executeQuery_61a.java
51b86f9f40922a7c345992385d58e37128cb31a6
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
7,385
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE89_SQL_Injection__Environment_executeQuery_61a.java Label Definition File: CWE89_SQL_Injection.label.xml Template File: sources-sinks-61a.tmpl.java */ /* * @description * CWE: 89 SQL Injection * BadSource: Environment Read data from an environment variable * GoodSource: A hardcoded string * Sinks: executeQuery * GoodSink: Use prepared statement and executeQuery (properly) * BadSink : data concatenated into SQL statement used in executeQuery(), which could result in SQL Injection * Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package * * */ package testcases.CWE89_SQL_Injection.s02; import testcasesupport.*; import javax.servlet.http.*; import java.sql.*; import java.util.logging.Level; public class CWE89_SQL_Injection__Environment_executeQuery_61a extends AbstractTestCase { public void bad() throws Throwable { String data = (new CWE89_SQL_Injection__Environment_executeQuery_61b()).badSource(); Connection dbConnection = null; Statement sqlStatement = null; ResultSet resultSet = null; try { dbConnection = IO.getDBConnection(); sqlStatement = dbConnection.createStatement(); /* POTENTIAL FLAW: data concatenated into SQL statement used in executeQuery(), which could result in SQL Injection */ resultSet = sqlStatement.executeQuery("select * from users where name='"+data+"'"); IO.writeLine(resultSet.getRow()); /* Use ResultSet in some way */ } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql); } finally { try { if (resultSet != null) { resultSet.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql); } try { if (sqlStatement != null) { sqlStatement.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql); } try { if (dbConnection != null) { dbConnection.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql); } } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { String data = (new CWE89_SQL_Injection__Environment_executeQuery_61b()).goodG2BSource(); Connection dbConnection = null; Statement sqlStatement = null; ResultSet resultSet = null; try { dbConnection = IO.getDBConnection(); sqlStatement = dbConnection.createStatement(); /* POTENTIAL FLAW: data concatenated into SQL statement used in executeQuery(), which could result in SQL Injection */ resultSet = sqlStatement.executeQuery("select * from users where name='"+data+"'"); IO.writeLine(resultSet.getRow()); /* Use ResultSet in some way */ } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql); } finally { try { if (resultSet != null) { resultSet.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql); } try { if (sqlStatement != null) { sqlStatement.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql); } try { if (dbConnection != null) { dbConnection.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql); } } } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { String data = (new CWE89_SQL_Injection__Environment_executeQuery_61b()).goodB2GSource(); Connection dbConnection = null; PreparedStatement sqlStatement = null; ResultSet resultSet = null; try { /* FIX: Use prepared statement and executeQuery (properly) */ dbConnection = IO.getDBConnection(); sqlStatement = dbConnection.prepareStatement("select * from users where name=?"); sqlStatement.setString(1, data); resultSet = sqlStatement.executeQuery(); IO.writeLine(resultSet.getRow()); /* Use ResultSet in some way */ } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql); } finally { try { if (resultSet != null) { resultSet.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql); } try { if (sqlStatement != null) { sqlStatement.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing PreparedStatement", exceptSql); } try { if (dbConnection != null) { dbConnection.close(); } } catch (SQLException exceptSql) { IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql); } } } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
863d439b7ee9ff98d92d4119d984c1c5dc30cfc7
da1a4eab3f0747c415a67135685166a08c6bb324
/mall-services/hmall-promotion-service/src/main/java/com/hand/promotion/client/impl/UserClientServiceImpl.java
72c52633161b2305615fee7eff0c236c54f4faaa
[]
no_license
newbigTech/mk
ee3ea627c4ec8fca9b9f0c8166733c516e1554aa
6bc5f34ce3ac35096596ddce8519f1bf4f4c9bab
refs/heads/master
2020-03-30T06:39:57.542743
2018-04-01T08:53:10
2018-04-01T08:53:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.hand.promotion.client.impl; import com.hand.hmall.dto.ResponseData; import com.hand.promotion.client.IUserClientService; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.PathVariable; /** * Created by shanks on 2017/2/27. */ @Component public class UserClientServiceImpl implements IUserClientService { @Override public ResponseData queryDefault(String userId) { return null; } }
[ "changbing.quan@hand-china.com" ]
changbing.quan@hand-china.com
d69722e658b865437ce7fcf5147abbd24689ad2d
2122d24de66635b64ec2b46a7c3f6f664297edc4
/spring/spring-security/spring-boot-spring-security-session-management-sample/src/main/java/com/packtpub/springsecurity/dataaccess/JpaEventDao.java
8a9588a4df6d49db950eecf21b45420b22008f48
[]
no_license
yiminyangguang520/Java-Learning
8cfecc1b226ca905c4ee791300e9b025db40cc6a
87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25
refs/heads/master
2023-01-10T09:56:29.568765
2022-08-29T05:56:27
2022-08-29T05:56:27
92,575,777
5
1
null
2023-01-05T05:21:02
2017-05-27T06:16:40
Java
UTF-8
Java
false
false
2,305
java
package com.packtpub.springsecurity.dataaccess; import com.packtpub.springsecurity.domain.CalendarUser; import com.packtpub.springsecurity.domain.Event; import com.packtpub.springsecurity.repository.EventRepository; import java.util.Calendar; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Example; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; /** * A jdbc implementation of {@link EventDao}. * * @author Rob Winch * @author Mick Knutson */ @Repository public class JpaEventDao implements EventDao { private EventRepository repository; @Autowired public JpaEventDao(EventRepository repository) { if (repository == null) { throw new IllegalArgumentException("repository cannot be null"); } this.repository = repository; } @Override @Transactional(readOnly = true) public Event getEvent(int eventId) { return repository.findById(eventId).orElse(null); } @Override public int createEvent(final Event event) { if (event == null) { throw new IllegalArgumentException("event cannot be null"); } if (event.getId() != null) { throw new IllegalArgumentException("event.getId() must be null when creating a new Message"); } final CalendarUser owner = event.getOwner(); if (owner == null) { throw new IllegalArgumentException("event.getOwner() cannot be null"); } final CalendarUser attendee = event.getAttendee(); if (attendee == null) { throw new IllegalArgumentException("attendee.getOwner() cannot be null"); } final Calendar when = event.getWhen(); if (when == null) { throw new IllegalArgumentException("event.getWhen() cannot be null"); } Event newEvent = repository.save(event); return newEvent.getId(); } @Override @Transactional(readOnly = true) public List<Event> findForUser(final int userId) { Event example = new Event(); CalendarUser cu = new CalendarUser(); cu.setId(userId); example.setOwner(cu); return repository.findAll(Example.of(example)); } @Override @Transactional(readOnly = true) public List<Event> getEvents() { return repository.findAll(); } }
[ "litz-a@glodon.com" ]
litz-a@glodon.com
30399025d352819c93718632fec7a42eda5f0162
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/ecf/2303.java
c4a52cdeb05301b6ed923f2262fcedf71591aadb
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
1,693
java
/**************************************************************************** * Copyright (c) 2004 Composent, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Composent, Inc. - initial API and implementation *****************************************************************************/ package org.eclipse.ecf.internal.example.collab.ui.hyperlink; import java.net.URI; import org.eclipse.ecf.core.ContainerCreateException; import org.eclipse.ecf.core.IContainer; import org.eclipse.ecf.internal.example.collab.actions.JoinGroupWizardAction; import org.eclipse.ecf.ui.IConnectWizard; import org.eclipse.ecf.ui.hyperlink.AbstractURLHyperlink; import org.eclipse.jface.text.IRegion; /** * */ public class ECFGenericHyperlink extends AbstractURLHyperlink { /** * Creates a new URL hyperlink. * * @param region * @param uri */ public ECFGenericHyperlink(IRegion region, URI uri) { super(region, uri); } /* * (non-Javadoc) * * @see org.eclipse.ecf.ui.hyperlink.AbstractURLHyperlink#createConnectWizard() */ protected IConnectWizard createConnectWizard() { return null; } /* * (non-Javadoc) * * @see org.eclipse.ecf.ui.hyperlink.AbstractURLHyperlink#createContainer() */ protected IContainer createContainer() throws ContainerCreateException { return null; } public void open() { new JoinGroupWizardAction(getURI().toString()).run(null); } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
b3c22296f6277824e312ed3b904f9c7278cac88d
582b3b233d9c979323aabed1749d83d7b9fa0228
/noticehiber/src/noticehiber/Main.java
87dc4377af82529246d0c8a7a13f03dc1c71421e
[]
no_license
PadminiNancy/Hiberuts
227abd500c6732327d7db190056161f901c9c336
db7991ccd548b0bfb936f1f290d4e95137da6d0d
refs/heads/master
2020-04-13T00:02:42.708308
2018-12-22T19:23:18
2018-12-22T19:23:18
162,836,329
1
0
null
null
null
null
UTF-8
Java
false
false
332
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package noticehiber; /** * * @author Nancy */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }
[ "pdmnnancy@gmail.com" ]
pdmnnancy@gmail.com
2280d90ce364de7738f713357c986c197cda620a
6895565fdaeda65cb7674a9dd80604b6c25069be
/app/src/main/java/com/aserbao/aserbaosandroid/functions/database/greenDao/db/ThingDao.java
019079e45232ad4a8ed44b5411acb19a7cc9737c
[]
no_license
DawnJF/AserbaosAndroid
f1708b96988b6a34cc954c9dcc87e4d384012176
6fd3841c122583f40915447380a961a30a60d817
refs/heads/master
2020-03-30T06:02:01.931252
2018-09-28T13:15:05
2018-09-28T13:15:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,817
java
package com.aserbao.aserbaosandroid.functions.database.greenDao.db; import android.database.Cursor; import android.database.sqlite.SQLiteStatement; import org.greenrobot.greendao.AbstractDao; import org.greenrobot.greendao.Property; import org.greenrobot.greendao.internal.DaoConfig; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.DatabaseStatement; import com.aserbao.aserbaosandroid.functions.database.greenDao.beans.Thing; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table "THING". */ public class ThingDao extends AbstractDao<Thing, Void> { public static final String TABLENAME = "THING"; /** * Properties of entity Thing.<br/> * Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property Id = new Property(0, int.class, "id", false, "ID"); public final static Property Message = new Property(1, String.class, "message", false, "MESSAGE"); public final static Property Time = new Property(2, long.class, "time", false, "TIME"); } public ThingDao(DaoConfig config) { super(config); } public ThingDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } /** Creates the underlying database table. */ public static void createTable(Database db, boolean ifNotExists) { String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "\"THING\" (" + // "\"ID\" INTEGER NOT NULL ," + // 0: id "\"MESSAGE\" TEXT," + // 1: message "\"TIME\" INTEGER NOT NULL );"); // 2: time } /** Drops the underlying database table. */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"THING\""; db.execSQL(sql); } @Override protected final void bindValues(DatabaseStatement stmt, Thing entity) { stmt.clearBindings(); stmt.bindLong(1, entity.getId()); String message = entity.getMessage(); if (message != null) { stmt.bindString(2, message); } stmt.bindLong(3, entity.getTime()); } @Override protected final void bindValues(SQLiteStatement stmt, Thing entity) { stmt.clearBindings(); stmt.bindLong(1, entity.getId()); String message = entity.getMessage(); if (message != null) { stmt.bindString(2, message); } stmt.bindLong(3, entity.getTime()); } @Override public Void readKey(Cursor cursor, int offset) { return null; } @Override public Thing readEntity(Cursor cursor, int offset) { Thing entity = new Thing( // cursor.getInt(offset + 0), // id cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // message cursor.getLong(offset + 2) // time ); return entity; } @Override public void readEntity(Cursor cursor, Thing entity, int offset) { entity.setId(cursor.getInt(offset + 0)); entity.setMessage(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setTime(cursor.getLong(offset + 2)); } @Override protected final Void updateKeyAfterInsert(Thing entity, long rowId) { // Unsupported or missing PK type return null; } @Override public Void getKey(Thing entity) { return null; } @Override public boolean hasKey(Thing entity) { // TODO return false; } @Override protected final boolean isEntityUpdateable() { return true; } }
[ "1142803753@qq.com" ]
1142803753@qq.com
bb841249eb19f60600ab29891f8010842dda148d
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
/apps_final/mobi.dream.neko/apk/org/codehaus/jackson/map/deser/std/TokenBufferDeserializer.java
f27c6bff47f43d0368678c6ace4879460e98f9e6
[]
no_license
linux86/AndoirdSecurity
3165de73b37f53070cd6b435e180a2cb58d6f672
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
refs/heads/master
2021-01-11T01:20:58.986651
2016-04-05T17:14:26
2016-04-05T17:14:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,023
java
package org.codehaus.jackson.map.deser.std; import java.io.IOException; import org.codehaus.jackson.JsonParser; import org.codehaus.jackson.JsonProcessingException; import org.codehaus.jackson.map.DeserializationContext; import org.codehaus.jackson.map.annotate.JacksonStdImpl; import org.codehaus.jackson.util.TokenBuffer; @JacksonStdImpl public class TokenBufferDeserializer extends StdScalarDeserializer<TokenBuffer> { public TokenBufferDeserializer() { super(TokenBuffer.class); } public TokenBuffer deserialize(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext) throws IOException, JsonProcessingException { paramDeserializationContext = new TokenBuffer(paramJsonParser.getCodec()); paramDeserializationContext.copyCurrentStructure(paramJsonParser); return paramDeserializationContext; } } /* Location: * Qualified Name: org.codehaus.jackson.map.deser.std.TokenBufferDeserializer * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "i@xuzhao.net" ]
i@xuzhao.net
f9fbb715cd429608b6603bd8859912bd4064a70b
fbfc3cb38d8eee2fc7e37c5754527a5d48c3e9a8
/utilcode/lib/src/main/java/com/blankj/utilcode/util/CacheMemoryUtils.java
c8404bfb163db524ee6aece071486c0c3493e9e3
[ "Apache-2.0" ]
permissive
daweibayu/AndroidUtilCode
ad7c912c71afcffb9a53031ab15e14b3c1568998
22a2aad4f81477f89a05ce9bdfff04d85f59c413
refs/heads/master
2021-01-01T16:22:12.689864
2019-01-17T08:02:56
2019-01-17T08:02:56
97,814,518
0
0
Apache-2.0
2019-01-17T08:02:57
2017-07-20T09:06:10
Java
UTF-8
Java
false
false
4,558
java
package com.blankj.utilcode.util; import android.support.annotation.NonNull; import android.support.v4.util.LruCache; import com.blankj.utilcode.constant.CacheConstants; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * <pre> * author: Blankj * blog : http://blankj.com * time : 2017/05/24 * desc : utils about memory cache * </pre> */ public final class CacheMemoryUtils implements CacheConstants { private static final int DEFAULT_MAX_COUNT = 256; private static final Map<String, CacheMemoryUtils> CACHE_MAP = new ConcurrentHashMap<>(); private final String mCacheKey; private final LruCache<String, CacheValue> mMemoryCache; /** * Return the single {@link CacheMemoryUtils} instance. * * @return the single {@link CacheMemoryUtils} instance */ public static CacheMemoryUtils getInstance() { return getInstance(DEFAULT_MAX_COUNT); } /** * Return the single {@link CacheMemoryUtils} instance. * * @param maxCount The max count of cache. * @return the single {@link CacheMemoryUtils} instance */ public static CacheMemoryUtils getInstance(final int maxCount) { return getInstance(String.valueOf(maxCount), maxCount); } /** * Return the single {@link CacheMemoryUtils} instance. * * @param cacheKey The key of cache. * @param maxCount The max count of cache. * @return the single {@link CacheMemoryUtils} instance */ public static CacheMemoryUtils getInstance(final String cacheKey, final int maxCount) { CacheMemoryUtils cache = CACHE_MAP.get(cacheKey); if (cache == null) { cache = new CacheMemoryUtils(cacheKey, new LruCache<String, CacheValue>(maxCount)); CACHE_MAP.put(cacheKey, cache); } return cache; } private CacheMemoryUtils(String cacheKey, LruCache<String, CacheValue> memoryCache) { mCacheKey = cacheKey; mMemoryCache = memoryCache; } @Override public String toString() { return mCacheKey + "@" + Integer.toHexString(hashCode()); } /** * Put bytes in cache. * * @param key The key of cache. * @param value The value of cache. */ public void put(@NonNull final String key, final Object value) { put(key, value, -1); } /** * Put bytes in cache. * * @param key The key of cache. * @param value The value of cache. * @param saveTime The save time of cache, in seconds. */ public void put(@NonNull final String key, final Object value, int saveTime) { if (value == null) return; long dueTime = saveTime < 0 ? -1 : System.currentTimeMillis() + saveTime * 1000; mMemoryCache.put(key, new CacheValue(dueTime, value)); } /** * Return the value in cache. * * @param key The key of cache. * @return the value if cache exists or null otherwise */ public <T> T get(@NonNull final String key) { return get(key, null); } /** * Return the value in cache. * * @param key The key of cache. * @param defaultValue The default value if the cache doesn't exist. * @return the value if cache exists or defaultValue otherwise */ public <T> T get(@NonNull final String key, final T defaultValue) { CacheValue val = mMemoryCache.get(key); if (val == null) return defaultValue; if (val.dueTime == -1 || val.dueTime >= System.currentTimeMillis()) { return (T) val.value; } mMemoryCache.remove(key); return defaultValue; } /** * Return the count of cache. * * @return the count of cache */ public int getCacheCount() { return mMemoryCache.size(); } /** * Remove the cache by key. * * @param key The key of cache. * @return {@code true}: success<br>{@code false}: fail */ public Object remove(@NonNull final String key) { CacheValue remove = mMemoryCache.remove(key); if (remove == null) return null; return remove.value; } /** * Clear all of the cache. */ public void clear() { mMemoryCache.evictAll(); } private static final class CacheValue { long dueTime; Object value; CacheValue(long dueTime, Object value) { this.dueTime = dueTime; this.value = value; } } }
[ "625783482@qq.com" ]
625783482@qq.com
49ff3088858a27877e62a894e01340fd26275d2f
be2ba637a6135abf28e693650d5399fb3fdaf780
/app/src/main/java/com/example/c2n/customer_cart/presenter/adapter/CustomerCartMylistAdapter.java
431f826d507c04079ad30acf9a12e476198e6a14
[]
no_license
devrath123/C2NRetailer
fcca842c9f97b32bbf42ea33aa0ce8f4260ee6fc
38fec2e3ede5bdb527c6b72bb5acc94a7a90e3c8
refs/heads/master
2022-02-26T02:16:06.675820
2019-10-06T10:16:08
2019-10-06T10:16:08
197,916,532
0
0
null
null
null
null
UTF-8
Java
false
false
2,495
java
package com.example.c2n.customer_cart.presenter.adapter; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import com.example.c2n.R; import com.example.c2n.core.models.MasterProductDataModel; import com.squareup.picasso.Picasso; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import de.hdodenhof.circleimageview.CircleImageView; public class CustomerCartMylistAdapter extends RecyclerView.Adapter<CustomerCartMylistAdapter.ViewHolder> { private Context context; private List<MasterProductDataModel> masterProductDataModelList; public CustomerCartMylistAdapter(Context context, List<MasterProductDataModel> masterProductDataModelList) { this.context = context; this.masterProductDataModelList = masterProductDataModelList; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.item_cart_product, parent, false); return new CustomerCartMylistAdapter.ViewHolder(itemView); } @Override public void onBindViewHolder(@NonNull ViewHolder viewHolder, int i) { Picasso.get().load(masterProductDataModelList.get(i).getProductImageURL()).into(viewHolder.circleImageViewProductImage); viewHolder.textViewProductName.setText(masterProductDataModelList.get(i).getProductName()); viewHolder.textViewProductCategory.setText(masterProductDataModelList.get(i).getProductCategory()); viewHolder.linearLayoutPrice.setVisibility(View.GONE); } @Override public int getItemCount() { return masterProductDataModelList.size(); } public class ViewHolder extends RecyclerView.ViewHolder { @BindView(R.id.civ_product_image) CircleImageView circleImageViewProductImage; @BindView(R.id.tv_product_name) TextView textViewProductName; @BindView(R.id.ll_price) LinearLayout linearLayoutPrice; @BindView(R.id.tv_product_category) TextView textViewProductCategory; public ViewHolder(@NonNull View itemView) { super(itemView); ButterKnife.bind(this, itemView); } } }
[ "dev.rathee2010@gmail.com" ]
dev.rathee2010@gmail.com
e18995cbed221320c606f5a436026f27c7f4c63d
da2d0d2e0a8d44194beff2271e9a803e698e96cb
/spring-integration-file/src/main/java/org/springframework/integration/file/filters/ExpressionFileListFilter.java
a874add028be8fe512d80b17ce45e8dd08787631
[]
no_license
zoeoros/spring-integration
745f4b382bea9100229a66026b57a9359efbacb1
fac04aeecee8ab8d46ad23ff4406d3a30e64ad3c
refs/heads/master
2021-01-11T13:50:51.170696
2017-03-29T17:00:21
2017-03-29T17:52:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,442
java
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.integration.file.filters; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; import org.springframework.expression.ExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.integration.expression.ExpressionUtils; import org.springframework.util.Assert; /** * A SpEL expression based {@link AbstractFileListFilter} implementation. * * @author Artem Bilan * * @since 5.0 */ public class ExpressionFileListFilter<F> extends AbstractFileListFilter<F> implements BeanFactoryAware { private static final ExpressionParser EXPRESSION_PARSER = new SpelExpressionParser(); private final Expression expression; private BeanFactory beanFactory; private EvaluationContext evaluationContext; public ExpressionFileListFilter(String expression) { this(EXPRESSION_PARSER.parseExpression(expression)); Assert.hasText(expression, "'expression' must not be empty"); } public ExpressionFileListFilter(Expression expression) { Assert.notNull(expression, "'expression' must not be null"); this.expression = expression; } @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } @Override protected boolean accept(F file) { return this.expression.getValue(getEvaluationContext(), file, Boolean.class); } private EvaluationContext getEvaluationContext() { if (this.evaluationContext == null) { this.evaluationContext = ExpressionUtils.createStandardEvaluationContext(this.beanFactory); } return this.evaluationContext; } }
[ "grussell@pivotal.io" ]
grussell@pivotal.io
78a3ee88f5dbb6ce84269e351fef0fde60b966c4
68883d55f35e539d4c00d7fe6f626a6309a09773
/src/main/java/com/coderdream/gensql/bean/IsbgProjectFinishComparator.java
f163ccd13edf742f5a2751aa5622a73020ca7a4e
[]
no_license
CoderDream/selenium-java-demo
bba75b9210fbf4cea3f5f7596cc0094a14b95974
3092ce2267287fdcf393b0cc67f3bd2b5539b1ba
refs/heads/master
2021-09-08T13:06:23.866612
2021-09-02T08:03:52
2021-09-02T08:03:52
94,756,165
1
0
null
null
null
null
UTF-8
Java
false
false
656
java
package com.coderdream.gensql.bean; import java.util.Comparator; import com.coderdream.util.DateUtil; /** http://www.cnblogs.com/aheizi/p/5207870.html * */ public class IsbgProjectFinishComparator implements Comparator<IsbgProjectFinish> { /** * 先按员工号排序,再按月份排序 */ @Override public int compare(IsbgProjectFinish o1, IsbgProjectFinish o2) { String monthDate1 = o1.getProjectEndDateTime(); String monthDate2 = o2.getProjectStartDateTime(); if (DateUtil.compareTwoDate(monthDate1, monthDate2)) { return -1; } else if (DateUtil.compareTwoDate(monthDate2, monthDate1)) { return 1; } return 0; } }
[ "coderdream@gmail.com" ]
coderdream@gmail.com
829608f41de0b60c41541f52a1530d02fe2dd0fc
47da275d6b10915cc60d6fc3238b5bc243d6c5c1
/de.rcenvironment.core.gui.utils.incubator/src/main/java/de/rcenvironment/core/gui/utils/incubator/AlphanumericalTextContraintListener.java
a2751de59affcd88fcb967f445af8f4aa58ae2ba
[]
no_license
rcenvironment/rce-test
aa325877be8508ee0f08181304a50bd97fa9f96c
392406e8ca968b5d8168a9dd3155d620b5631ab6
HEAD
2016-09-06T03:35:58.165632
2015-01-16T10:45:50
2015-01-16T10:45:50
29,299,206
1
2
null
null
null
null
UTF-8
Java
false
false
1,920
java
/* * Copyright (C) 2006-2014 DLR, Germany * * All rights reserved * * http://www.rcenvironment.de/ */ package de.rcenvironment.core.gui.utils.incubator; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; /** * Verifies that endpoint names only contain characters a..z, A..Z, 0..9, underscore or blank. * Underscore and blank are parameterized. * * @author Sascha Zur * @author Oliver Seebach * */ public class AlphanumericalTextContraintListener implements Listener { private boolean acceptBlank = false; private boolean acceptUnderscore = false; private final char[] forbiddenCharacters; public AlphanumericalTextContraintListener(boolean acceptBlank, boolean acceptUnderscore) { this.acceptBlank = acceptBlank; this.acceptUnderscore = acceptUnderscore; forbiddenCharacters = null; } public AlphanumericalTextContraintListener(char[] acceptedCharacters) { acceptBlank = false; acceptUnderscore = false; this.forbiddenCharacters = acceptedCharacters; } @Override public void handleEvent(Event event) { String string = event.text; for (int i = 0; i < string.length(); i++) { char c = string.charAt(i); boolean inForbiddenChars = false; if (forbiddenCharacters != null) { for (char accepted : forbiddenCharacters) { if (accepted == c) { inForbiddenChars = true; } } } if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9') && !((c == ' ') && acceptBlank) && !((c == '_') && acceptUnderscore) && inForbiddenChars) { event.doit = false; return; } } } }
[ "robert.mischke@dlr.de" ]
robert.mischke@dlr.de
d66a947720298790dc4c297f3f913ceb627bf2d4
3df27b037c878b7d980b5c068d3663682c09b0b3
/src/com/freework/freedbm/util/listUtil/group/Aggregate/LevelSetData.java
abb9fd301a22d53d86feecd0505df0d8ec7d673f
[]
no_license
shinow/tjec
82fbd67886bc1f60c63af3e6054d1e4c16df2a0d
0b2f4de2eda13acf351dfc04faceea508c9dd4b0
refs/heads/master
2021-09-24T15:45:42.212349
2018-10-11T06:13:55
2018-10-11T06:13:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package com.freework.freedbm.util.listUtil.group.Aggregate; import java.util.Map; import com.freework.freedbm.util.listUtil.group.AggregateCol; public class LevelSetData implements AggregateData{ int level=0; AggregateCol col; public void setCol(AggregateCol col) { this.col=col; } public void setData(Map sourceMap, Map groupMap,String tagertName) { Object value=sourceMap.get(col.sourceName); Integer level=(Integer) groupMap.get("gourp_sys_level"); if(!groupMap.containsKey(tagertName)&&value!=null&&!value.equals("")&&level==this.level){ groupMap.put(tagertName,value); } } public AggregateData newAggregateData(String[] args) { LevelSetData myobj=new LevelSetData(); if(args!=null&&args.length>0) myobj.level=Integer.parseInt(args[0]); return myobj; } public String getName() { return "levelSet"; } }
[ "lin521lh" ]
lin521lh
452a5fcf0e0d6f9ad7cc891ecf348897d4cc0ac7
6103cb13beb5c3564376849332c0f65013fb1e4a
/src/org/omg/DynamicAny/NameDynAnyPair.java
0c457acf40ca418fd93e3d2e72cd1ea4f93554ea
[ "Apache-2.0" ]
permissive
songningbo/jdk8source
26e1c3b66ce589f0d1bbe4e50a39de0adf106b68
7458e994df5fc9519004e60d280b728b6736a978
refs/heads/main
2023-03-30T01:12:21.275633
2021-04-05T13:40:48
2021-04-05T13:40:48
334,418,487
1
0
null
null
null
null
UTF-8
Java
false
false
804
java
package org.omg.DynamicAny; /** * org/omg/DynamicAny/NameDynAnyPair.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u152/9742/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl * Thursday, September 14, 2017 2:31:37 AM PDT */ public final class NameDynAnyPair implements org.omg.CORBA.portable.IDLEntity { /** * The name associated with the DynAny. */ public String id = null; /** * The DynAny value associated with the name. */ public org.omg.DynamicAny.DynAny value = null; public NameDynAnyPair () { } // ctor public NameDynAnyPair (String _id, org.omg.DynamicAny.DynAny _value) { id = _id; value = _value; } // ctor } // class NameDynAnyPair
[ "songningbo520@163.com" ]
songningbo520@163.com
e032ce054f04d362066364dcc78a6ff76017cfc2
774004a61fbc87daf2a51fa8466e7508dbc9f6b6
/bqiupu/src/com/borqs/common/view/CircleGridView.java
50cd5bd809ee12a94284e90306b06390b817ff0b
[]
no_license
eastlhu/android
4f23984a5f11f835a22136ddd95b8f3b964ff3fd
0d256031e3c04fffdf61700fcbb49f7fcf93486a
refs/heads/master
2021-01-21T04:11:53.350910
2013-09-24T07:29:49
2013-09-24T07:29:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,363
java
package com.borqs.common.view; import twitter4j.CircleGridData; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.GridView; import android.widget.LinearLayout; import android.widget.TextView; import com.borqs.common.adapter.GridPeopleSimpleAdapter; import com.borqs.qiupu.QiupuConfig; import com.borqs.qiupu.R; public class CircleGridView extends LinearLayout{ private static final String TAG = "CircleGridView"; private Context mContext; private GridView mGrid_in_member; private View inMemberView; private TextView tv_in_member; private CircleGridData mCircle; public CircleGridView(Context context, AttributeSet attrs) { super(context, attrs); mContext = context; } public CircleGridView(Context context,CircleGridData circle) { super(context); mContext = context; mCircle = circle; init(); initUI(); } @Override protected void onFinishInflate() { super.onFinishInflate(); init(); } private void init() { removeAllViews(); View contentView = LayoutInflater.from(mContext).inflate( R.layout.circle_grid_layout, null); contentView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); addView(contentView); mGrid_in_member = (GridView) contentView.findViewById(R.id.grid_in_member); tv_in_member = (TextView)contentView.findViewById(R.id.tv_in_member); inMemberView = contentView.findViewById(R.id.in_member_rl); } private void initUI() { if(mCircle == null) { if(QiupuConfig.LOGD) Log.e(TAG,"data is null"); setVisibility(View.GONE); return; } if(mCircle.memberCount > 0 && mCircle.memberList != null && mCircle.memberList.size() >0) { setVisibility(View.VISIBLE); tv_in_member.setText(mCircle.name + "(" + mCircle.memberCount + ")"); if(mCircle.memberList != null && mCircle.memberList.size() > 0) { mGrid_in_member.setAdapter(new GridPeopleSimpleAdapter(mContext, mCircle.memberList)); } inMemberView.setOnClickListener(mCircle.clickListener); }else { setVisibility(View.GONE); } } public void updateDataInfo(CircleGridData circle) { mCircle = circle; initUI(); } public CircleGridData getDataInfo() { return mCircle; } }
[ "liuhuadong78@gmail.com" ]
liuhuadong78@gmail.com
1d8bcc74cb0db8dffb10bff25efbe03da3db9313
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/TB/Math95/AstorMain-math_95/src/variant-1060/org/apache/commons/math/special/Beta.java
50e21c55245f2253dd15a4a0f979bc7e529995cb
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
3,757
java
package org.apache.commons.math.special; public class Beta implements java.io.Serializable { private static final long serialVersionUID = -3833485397404128220L; private static final double DEFAULT_EPSILON = 1.0E-14; private Beta() { super(); } public static double regularizedBeta(double x, double a, double b) throws org.apache.commons.math.MathException { return org.apache.commons.math.special.Beta.regularizedBeta(x, a, b, org.apache.commons.math.special.Beta.DEFAULT_EPSILON, java.lang.Integer.MAX_VALUE); } public static double regularizedBeta(double x, double a, double b, double epsilon) throws org.apache.commons.math.MathException { return org.apache.commons.math.special.Beta.regularizedBeta(x, a, b, epsilon, java.lang.Integer.MAX_VALUE); } public static double regularizedBeta(double x, double a, double b, int maxIterations) throws org.apache.commons.math.MathException { return org.apache.commons.math.special.Beta.regularizedBeta(x, a, b, org.apache.commons.math.special.Beta.DEFAULT_EPSILON, maxIterations); } public static double regularizedBeta(double x, final double a, final double b, double epsilon, int maxIterations) throws org.apache.commons.math.MathException { double ret; if (((((((java.lang.Double.isNaN(x)) || (java.lang.Double.isNaN(a))) || (java.lang.Double.isNaN(b))) || (x < 0)) || (x > 1)) || (a <= 0.0)) || (b <= 0.0)) { ret = java.lang.Double.NaN; } else { if (x > ((a + 1.0) / ((a + b) + 2.0))) { ret = 1.0 - (org.apache.commons.math.special.Beta.regularizedBeta((1.0 - x), b, a, epsilon, maxIterations)); } else { org.apache.commons.math.util.ContinuedFraction fraction = new org.apache.commons.math.util.ContinuedFraction() { private static final long serialVersionUID = -7658917278956100597L; protected double getB(int n, double x) { double ret; double m; if ((n % 2) == 0) { m = n / 2.0; return super.getSumsq(); ret = ((m * (b - m)) * x) / (((a + (2 * m)) - 1) * (a + (2 * m))); } else { m = (n - 1.0) / 2.0; ret = (-(((a + m) * ((a + b) + m)) * x)) / ((a + (2 * m)) * ((a + (2 * m)) + 1.0)); } return ret; } protected double getA(int n, double x) { return 1.0; } }; ret = ((java.lang.Math.exp(((((a * (java.lang.Math.log(x))) + (b * (java.lang.Math.log((1.0 - x))))) - (java.lang.Math.log(a))) - (org.apache.commons.math.special.Beta.logBeta(a, b, epsilon, maxIterations))))) * 1.0) / (fraction.evaluate(x, epsilon, maxIterations)); } } return ret; } public static double logBeta(double a, double b) { return org.apache.commons.math.special.Beta.logBeta(a, b, org.apache.commons.math.special.Beta.DEFAULT_EPSILON, java.lang.Integer.MAX_VALUE); } public static double logBeta(double a, double b, double epsilon, int maxIterations) { double ret; if ((((java.lang.Double.isNaN(a)) || (java.lang.Double.isNaN(b))) || (a <= 0.0)) || (b <= 0.0)) { ret = java.lang.Double.NaN; } else { ret = ((org.apache.commons.math.special.Gamma.logGamma(a)) + (org.apache.commons.math.special.Gamma.logGamma(b))) - (org.apache.commons.math.special.Gamma.logGamma((a + b))); } return ret; } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
e8145afaf4cd907e493ec7362f9aff164cc1e271
9254e7279570ac8ef687c416a79bb472146e9b35
/qualitycheck-20190115/src/main/java/com/aliyun/qualitycheck20190115/models/UpdateOnPurchaseSuccessResponseBody.java
a31d384b99cb6120596d21616c2f659d29b21f3d
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,713
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.qualitycheck20190115.models; import com.aliyun.tea.*; public class UpdateOnPurchaseSuccessResponseBody extends TeaModel { @NameInMap("Message") public String message; @NameInMap("RequestId") public String requestId; @NameInMap("Data") public String data; @NameInMap("Code") public String code; @NameInMap("Success") public Boolean success; public static UpdateOnPurchaseSuccessResponseBody build(java.util.Map<String, ?> map) throws Exception { UpdateOnPurchaseSuccessResponseBody self = new UpdateOnPurchaseSuccessResponseBody(); return TeaModel.build(map, self); } public UpdateOnPurchaseSuccessResponseBody setMessage(String message) { this.message = message; return this; } public String getMessage() { return this.message; } public UpdateOnPurchaseSuccessResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public UpdateOnPurchaseSuccessResponseBody setData(String data) { this.data = data; return this; } public String getData() { return this.data; } public UpdateOnPurchaseSuccessResponseBody setCode(String code) { this.code = code; return this; } public String getCode() { return this.code; } public UpdateOnPurchaseSuccessResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f956d8842d51643f153e1b8bb0e75d180246d0d3
784a70b67e80b05554a0b6fdb49e396bbccd319b
/SellABook/src/Controller/PageAssiController.java
b53a1f2f9948e2c1677b8264ec8ec9cfa988b21e
[]
no_license
0D2807/ICIA_Project2
5577f3340ffe1b4ed08f253bfcdaa98bc14e9a42
af7619dd8c2ee96f8377aa0cb455b0de2d15eaaf
refs/heads/master
2022-12-29T02:50:48.903023
2020-10-19T00:54:46
2020-10-19T00:54:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,114
java
package Controller; import java.io.IOException; import java.util.List; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import DTO.BookDTO; import DTO.MembersDTO; import DTO.PageDTO; import Service.BookService; import Service.PageService; /** * Servlet implementation class PageAssiController */ @WebServlet("/PageAssi") public class PageAssiController extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public PageAssiController() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doProcess(request, response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doProcess(request, response); } protected void doProcess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub request.setCharacterEncoding("UTF-8"); response.setContentType("text/html; charset=UTF-8"); int page = 1; int limit = 5; // page �뙆�씪誘명꽣 媛� 寃��궗 if (request.getParameter("page") != null) { page = Integer.parseInt(request.getParameter("page")); } PageService pagesvc = new PageService(); // �쟾泥� 寃뚯떆湲� 媛��닔瑜� 媛��졇�삤湲� �쐞�븳 PageService�쓽 ListCount硫붿냼�뱶 �샇異� int listCount = pagesvc.ListCount(); // pagesvc.ListCount() = 36; �뵲�씪�꽌 listCount = 36; // limit 媛믪쓣 嫄몄뼱�넃�� 留뚰겮 踰붿쐞�뿉 �빐�떦�븯�뒗 湲�留� 媛��졇�삤�뒗 諛⑸쾿 int startRow = (page-1) * limit + 1; int endRow = page * limit; String category1 = request.getParameter("category1"); System.out.println("category = " + category1); HttpSession session = request.getSession(); MembersDTO member = new MembersDTO(); // BookDTO category = new BookDTO(); // category.setCategory("category1"); // category.setCategory("category2"); // System.out.println("1. " + category1); // startRow = 1 // endRow = 3 List<BookDTO> bookList = pagesvc.BookList(category1,startRow, endRow); // 理쒕�濡� �븘�슂�븳 �럹�씠吏� 媛��닔 怨꾩궛 int maxPage = (int)((double)listCount / limit + 0.9); // �쁽�옱 �럹�씠吏��뿉 蹂댁뿬以� �떆�옉�럹�씠吏� int startPage = (((int)((double)page / 10 + 0.9))-1)*10+1; // �쁽�옱 �럹�씠吏��뿉 蹂댁뿬以� �걹 �럹�씠吏� int endPage = startPage + 5 -1; if (endPage > maxPage) { endPage = maxPage; } PageDTO paging = new PageDTO(); String title= request.getParameter("title"); BookService booksvc= new BookService(); BookDTO book = booksvc.getInfo(title); paging.setPage(page); paging.setStartPage(startPage); paging.setEndPage(endPage); paging.setMaxPage(maxPage); paging.setListCount(listCount); System.out.println(paging.toString()); request.setAttribute("book", book); request.setAttribute("paging", paging); request.setAttribute("bookList", bookList); request.setAttribute("category",category1 ); RequestDispatcher dispatcher = request.getRequestDispatcher("BookList1.jsp"); dispatcher.forward(request, response); } }
[ "1@1-PC" ]
1@1-PC
2ae053a0fa28bf1dc3f0823b5cbc6788e2818bf0
75b04f6a1e1d280bb95f6daa32ca683c9ed87c40
/Java_OOP_2021/src/Polymorphism/Exercise/P03WildFarm/Meat.java
d2ddb72b0e64b9b7dc33195be3818bbc435f9fb7
[ "MIT" ]
permissive
lmarinov/Java_Basics_And_Advanced_Repo
42629aa0c558d50d0777b064b5a6fbdbbf5a4714
e08e4f2ee3c1e6e1e47172cdee9ae3cbfa514f15
refs/heads/master
2023-04-05T22:54:33.885916
2021-04-19T19:30:52
2021-04-19T19:30:52
79,246,030
0
0
MIT
2021-04-10T11:03:23
2017-01-17T16:15:33
Java
UTF-8
Java
false
false
141
java
package Polymorphism.Exercise.P03WildFarm; public class Meat extends Food{ public Meat(int quantity) { super(quantity); } }
[ "lmarinov93@gmail.com" ]
lmarinov93@gmail.com
27e8743117d507d94b88dbe6dac482f2c5bb48e0
1fe2e09c4682b6ebd52d5201978ecc6c7ce7fa0f
/topographica-spigot/src/main/java/nl/rutgerkok/topographica/render/ServerTaskList.java
982838952e23f64de9dd056e35d086aa48b676ba
[ "MIT" ]
permissive
rutgerkok/Topographica
4d31d5b8a99e6aab45af2ed5fe6c7c442228749f
4a7d8e27d9918da718f1403f60aed96da1b70ec5
refs/heads/master
2021-06-10T07:36:24.358470
2021-05-01T18:06:08
2021-05-01T18:06:08
176,159,698
13
1
null
null
null
null
UTF-8
Java
false
false
3,080
java
package nl.rutgerkok.topographica.render; import java.util.Map; import java.util.Objects; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import com.google.common.collect.ImmutableMap; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.block.Block; import nl.rutgerkok.topographica.config.Config; import nl.rutgerkok.topographica.config.WorldConfig; import nl.rutgerkok.topographica.render.WorldTaskList.DrawInstruction; import nl.rutgerkok.topographica.util.Region; /** * The class that is responsible for rendering all worlds on the server. * */ public class ServerTaskList { private final ConcurrentMap<UUID, WorldTaskList> taskLists = new ConcurrentHashMap<>(); private final Config config; public ServerTaskList(Config config) { this.config = Objects.requireNonNull(config, "config"); } /** * General method to (re-)render something. * * @param world * The world. * @param drawInstruction * The thing to re-render. */ public void askToRender(World world, DrawInstruction drawInstruction) { WorldTaskList renderer = getTaskList(world); renderer.requestRedraw(drawInstruction); } /** * Puts the region of a block in the queue for rendering. * * @param block * The block. */ public void askToRenderBlock(Block block) { askToRender(block.getWorld(), DrawInstruction.ofChunk(block.getX() >> 4, block.getZ() >> 4)); } /** * Puts the chunk in the queue for rendering. * * @param chunk * The chunk. */ public void askToRenderChunk(Chunk chunk) { this.askToRender(chunk.getWorld(), DrawInstruction.ofChunk(chunk.getX(), chunk.getZ())); } /** * Puts a single region in the queue for rendering. * * @param world * The world. * @param region * The region. */ public void askToRenderRegion(World world, Region region) { askToRender(world, DrawInstruction.ofRegion(region)); } /** * Gets an immutable list of all registered renderers. * * @return The renderers. */ public Map<UUID, WorldTaskList> getActiveTaskLists() { return ImmutableMap.copyOf(taskLists); } private WorldTaskList getTaskList(World world) { UUID uuid = world.getUID(); WorldTaskList renderer = taskLists.get(uuid); // A if (renderer == null) { // Ok, create one WorldConfig worldConfig = config.getWorldConfig(world); renderer = new WorldTaskList(worldConfig.getRenderArea()); WorldTaskList justAdded = taskLists.putIfAbsent(uuid, renderer); // B if (justAdded != null) { // Interesting, another thread just created a renderer between A // and B. Use that one instead renderer = justAdded; } } return renderer; } }
[ "rutger.kok@live.com" ]
rutger.kok@live.com
2b35ed03304060d13a280cec884ea39f9e2c1c4c
fea683c0ec66ff872b001f39fba4bd0f5a772176
/jpuppeteer-cdp/src/main/java/jpuppeteer/cdp/cdp/entity/target/GetTargetInfoRequest.java
75a46643f8fdaa41fed6444efe8015b8c8d646c7
[]
no_license
affjerry/jpuppeteer
c343f64636eabdf5c3da52b6c0d660054d837894
5dbd900862035b4403b975f91f1b18938b19f08b
refs/heads/master
2023-08-15T23:45:39.292666
2020-05-27T01:48:41
2020-05-27T01:48:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
197
java
package jpuppeteer.cdp.cdp.entity.target; /** */ @lombok.Setter @lombok.Getter @lombok.ToString public class GetTargetInfoRequest { /** */ private String targetId; }
[ "jarvis.xu@vipshop.com" ]
jarvis.xu@vipshop.com
8d6c0144ad50574c0ac7bef116df693cf84705d6
5adca47d426f1f90fd111a8e13421280ef8fc08e
/nio-official/src/main/java/org/lili/nio/official/file/DiskUsage.java
a11fb7f4ff4de9ab5ce28e4e266e48b4e57e5951
[]
no_license
xiaozhiliaoo/netty-practice
8d829657a7e30b2c96c2980553d54a7aaaf1a637
c236b9f211c291f81b1e1490c9b2fb0cba097f6b
refs/heads/master
2023-07-23T03:06:56.823662
2022-02-06T14:25:08
2022-02-06T14:25:08
248,139,147
1
0
null
2023-07-13T17:04:02
2020-03-18T04:34:59
Java
UTF-8
Java
false
false
3,219
java
package org.lili.nio.official.file;/* * Copyright (c) 2008, 2011, Oracle and/or its affiliates. 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 Oracle 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. */ /* * This source code is provided to illustrate the usage of a given feature * or technique and has been deliberately simplified. Additional steps * required for a production-quality application, such as security checks, * input validation and proper error handling, might not be present in * this sample code. */ import java.nio.file.*; import java.nio.file.attribute.*; import java.io.IOException; /** * Example utility that works like the df(1M) program to print out disk space * information */ public class DiskUsage { static final long K = 1024; static void printFileStore(FileStore store) throws IOException { long total = store.getTotalSpace() / K; long used = (store.getTotalSpace() - store.getUnallocatedSpace()) / K; long avail = store.getUsableSpace() / K; String s = store.toString(); if (s.length() > 20) { System.out.println(s); s = ""; } System.out.format("%-20s %12d %12d %12d\n", s, total, used, avail); } public static void main(String[] args) throws IOException { System.out.format("%-20s %12s %12s %12s\n", "Filesystem", "kbytes", "used", "avail"); if (args.length == 0) { FileSystem fs = FileSystems.getDefault(); for (FileStore store: fs.getFileStores()) { printFileStore(store); } } else { for (String file: args) { FileStore store = Files.getFileStore(Paths.get(file)); printFileStore(store); } } } }
[ "lili@chainup.com" ]
lili@chainup.com
eeb891921a8cb3bb4f902e31522c3b5e9bcd804c
5468f8e2dd1c6ba3fb4d0561f43ad5baa764b62e
/src/org/mybatis/generator/api/dom/java/TopLevelEnumeration.java
22ee844420d118b698c629d27c4ad28c4912e3be
[]
no_license
liuyuhua1984/MyBatisSql
f0934de98e0c5111efe0de71081a11dc3b28f62f
e039cc7387cf00e04f8b5008e1e9428f77992310
refs/heads/master
2021-01-20T16:55:16.391918
2017-06-13T10:35:17
2017-06-13T10:35:17
90,857,314
0
0
null
null
null
null
UTF-8
Java
false
false
5,150
java
/** * Copyright 2006-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mybatis.generator.api.dom.java; import static org.mybatis.generator.api.dom.OutputUtilities.calculateImports; import static org.mybatis.generator.api.dom.OutputUtilities.newLine; import static org.mybatis.generator.internal.util.messages.Messages.getString; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeSet; /** * The Class TopLevelEnumeration. * * @author Jeff Butler */ public class TopLevelEnumeration extends InnerEnum implements CompilationUnit { /** The imported types. */ private Set<FullyQualifiedJavaType> importedTypes; /** The static imports. */ private Set<String> staticImports; /** The file comment lines. */ private List<String> fileCommentLines; /** * Instantiates a new top level enumeration. * * @param type the type */ public TopLevelEnumeration(FullyQualifiedJavaType type) { super(type); importedTypes = new TreeSet<FullyQualifiedJavaType>(); fileCommentLines = new ArrayList<String>(); staticImports = new TreeSet<String>(); } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#getFormattedContent() */ public String getFormattedContent() { StringBuilder sb = new StringBuilder(); for (String fileCommentLine : fileCommentLines) { sb.append(fileCommentLine); newLine(sb); } if (getType().getPackageName() != null && getType().getPackageName().length() > 0) { sb.append("package "); //$NON-NLS-1$ sb.append(getType().getPackageName()); sb.append(';'); newLine(sb); newLine(sb); } for (String staticImport : staticImports) { sb.append("import static "); //$NON-NLS-1$ sb.append(staticImport); sb.append(';'); newLine(sb); } if (staticImports.size() > 0) { newLine(sb); } Set<String> importStrings = calculateImports(importedTypes); for (String importString : importStrings) { sb.append(importString); newLine(sb); } if (importStrings.size() > 0) { newLine(sb); } sb.append(super.getFormattedContent(0, this)); return sb.toString(); } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#getImportedTypes() */ public Set<FullyQualifiedJavaType> getImportedTypes() { return importedTypes; } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#getSuperClass() */ public FullyQualifiedJavaType getSuperClass() { throw new UnsupportedOperationException(getString("RuntimeError.11")); //$NON-NLS-1$ } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#isJavaInterface() */ public boolean isJavaInterface() { return false; } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#isJavaEnumeration() */ public boolean isJavaEnumeration() { return true; } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#addImportedType(org.mybatis.generator.api.dom.java.FullyQualifiedJavaType) */ public void addImportedType(FullyQualifiedJavaType importedType) { if (importedType.isExplicitlyImported() && !importedType.getPackageName().equals(getType().getPackageName())) { importedTypes.add(importedType); } } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#addFileCommentLine(java.lang.String) */ public void addFileCommentLine(String commentLine) { fileCommentLines.add(commentLine); } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#getFileCommentLines() */ public List<String> getFileCommentLines() { return fileCommentLines; } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#addImportedTypes(java.util.Set) */ public void addImportedTypes(Set<FullyQualifiedJavaType> importedTypes) { this.importedTypes.addAll(importedTypes); } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#getStaticImports() */ public Set<String> getStaticImports() { return staticImports; } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#addStaticImport(java.lang.String) */ public void addStaticImport(String staticImport) { staticImports.add(staticImport); } /* (non-Javadoc) * * @see org.mybatis.generator.api.dom.java.CompilationUnit#addStaticImports(java.util.Set) */ public void addStaticImports(Set<String> staticImports) { this.staticImports.addAll(staticImports); } }
[ "lyh@163.com" ]
lyh@163.com
a6f0bbe4b8103071e81315eb5bd7c65f91d3d1c6
f393be3b18ac2a87ea859cac5a5a07f2a9525c16
/src/com/facebook/buck/step/StepExecutionResults.java
7b59f0a2f84bbc0c8d94eead9be830980d9c878d
[ "Apache-2.0" ]
permissive
blubfoo/buck
976890da6ae3b4850b149213badaea9cc24fc5ed
45955d18b4155c4e87be3a89707fcfb1411c806a
refs/heads/master
2023-01-13T02:06:23.501307
2019-10-22T04:18:52
2019-10-22T05:39:25
216,879,969
0
1
Apache-2.0
2022-12-24T05:44:05
2019-10-22T18:12:41
null
UTF-8
Java
false
false
1,250
java
/* * Copyright 2017-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.step; /** A collection of common StepExecutionResult constants. */ public class StepExecutionResults { // NB: These constants cannot live in StepExecutionResult, as referencing subclass in // static initializer may cause deadlock during classloading. public static final int SUCCESS_EXIT_CODE = 0; public static final int ERROR_EXIT_CODE = 1; public static final StepExecutionResult SUCCESS = StepExecutionResult.of(SUCCESS_EXIT_CODE); public static final StepExecutionResult ERROR = StepExecutionResult.of(ERROR_EXIT_CODE); private StepExecutionResults() {} // Utility class. Do not instantiate. }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
a93df15d0af4b797b398b2b88e72b5eea042aac8
46739ddb77feee2265af8436db6ac0eb2517e85a
/wallet-service/wallet-service-common/src/main/java/org/wallet/service/common/dao/BaseRepository.java
0eb23f353c6d1515c991ec6e906fdcead3627caf
[]
no_license
guolinxin/wallet-parent
9f21e6208153a35c85ed9feb1e2112c5ca53d8c5
47dcec9c477dfe0433464033d234acf62c2dad57
refs/heads/master
2022-04-06T23:50:50.385832
2020-02-04T07:07:40
2020-02-04T07:07:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
642
java
package org.wallet.service.common.dao; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.repository.NoRepositoryBean; import org.springframework.data.repository.PagingAndSortingRepository; import java.io.Serializable; /** * @author zengfucheng **/ @NoRepositoryBean public interface BaseRepository<T> extends JpaRepository<T, Serializable>, JpaSpecificationExecutor<T>, PagingAndSortingRepository<T, Serializable> { /** * 验证是不是我们要的领域模型 */ boolean support(String modelType); }
[ "snzke@live.cn" ]
snzke@live.cn
a1848c15875ca8b7f6231f9215709bc1a771a74f
a01eaed695583aad70bd7e1da1af0ec736c7bf22
/cave/com.raytheon.viz.core.contours/src/com/raytheon/viz/core/contours/rsc/displays/PlotLocationCache.java
b38f451b56715287016938e620d299156997a420
[]
no_license
SeanTheGuyThatAlwaysHasComputerTrouble/awips2
600d3e6f7ea1b488471e387c642d54cb6eebca1a
c8f8c20ca34e41ac23ad8e757130e91c77b558fe
refs/heads/master
2021-01-19T18:00:12.598133
2013-03-26T17:06:45
2013-03-26T17:06:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,647
java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.viz.core.contours.rsc.displays; import java.lang.ref.Reference; import java.lang.ref.SoftReference; import java.util.HashMap; import java.util.Map; import org.geotools.coverage.grid.GridGeometry2D; import org.geotools.coverage.grid.InvalidGridGeometryException; import org.geotools.referencing.CRS; import org.geotools.referencing.operation.transform.ConcatenatedTransform; import org.opengis.referencing.FactoryException; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.NoninvertibleTransformException; import org.opengis.referencing.operation.TransformException; /** * * TODO Add Description * * <pre> * * SOFTWARE HISTORY * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 13, 2011 bsteffen Initial creation * * </pre> * * @author bsteffen * @version 1.0 */ public class PlotLocationCache { private static class CacheKey { private final GridGeometry2D gridGeometry; private final GridGeometry2D descriptorGeometry; public CacheKey(GridGeometry2D gridGeometry, GridGeometry2D descriptorGeometry) { super(); this.gridGeometry = gridGeometry; this.descriptorGeometry = descriptorGeometry; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((descriptorGeometry == null) ? 0 : descriptorGeometry .hashCode()); result = prime * result + ((gridGeometry == null) ? 0 : gridGeometry.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; CacheKey other = (CacheKey) obj; if (descriptorGeometry == null) { if (other.descriptorGeometry != null) return false; } else if (!descriptorGeometry.equals(other.descriptorGeometry)) return false; if (gridGeometry == null) { if (other.gridGeometry != null) return false; } else if (!gridGeometry.equals(other.gridGeometry)) return false; return true; } } private static PlotLocationCache instance; public static PlotLocationCache getInstance() { if (instance == null) { instance = new PlotLocationCache(); } return instance; } private Map<CacheKey, Reference<float[]>> cache = new HashMap<CacheKey, Reference<float[]>>(); private PlotLocationCache() { } public synchronized float[] getPlotLocations(GridGeometry2D gridGeometry, GridGeometry2D descriptorGeometry) { CacheKey key = new CacheKey(gridGeometry, descriptorGeometry); float[] result = null; Reference<float[]> resultRef = cache.get(key); if (resultRef != null) { result = resultRef.get(); } if (result == null) { int xDim = gridGeometry.getGridRange().getSpan(0); int yDim = gridGeometry.getGridRange().getSpan(1); result = new float[xDim * yDim * 2]; for (int i = 0; i < result.length; i += 2) { result[i] = (i / 2) / yDim; result[i + 1] = (i / 2) % yDim; } try { MathTransform grid2crs = gridGeometry.getGridToCRS(); MathTransform crs2crs = CRS.findMathTransform( gridGeometry.getCoordinateReferenceSystem(), descriptorGeometry.getCoordinateReferenceSystem()); MathTransform crs2grid = descriptorGeometry.getGridToCRS() .inverse(); MathTransform grid2grid = ConcatenatedTransform.create( ConcatenatedTransform.create(grid2crs, crs2crs), crs2grid); grid2grid.transform(result, 0, result, 0, xDim * yDim); } catch (FactoryException e) { throw new RuntimeException(e); } catch (InvalidGridGeometryException e) { throw new RuntimeException(e); } catch (NoninvertibleTransformException e) { throw new RuntimeException(e); } catch (TransformException e) { throw new RuntimeException(e); } cache.put(key, new SoftReference<float[]>(result)); } return result; } }
[ "root@lightning.(none)" ]
root@lightning.(none)
657b364ce0bd5fb9806942a1e01e1f2df2813fb9
3dea1a7bd0722494144fda232cd51e5fcb6ad920
/publiclibrary/src/main/java/com/library/widget/shimmer/ShimmerTextView.java
175a651b332630cc0697978c1e6579a9e5e8e16d
[]
no_license
luozhimin0918/KxtPkx
59b53259fcde26f6cdfeb835bac7831ab8307516
94e4fc15f1307d10fde73891d138ab8cf9307ae9
refs/heads/master
2021-01-23T07:26:57.698708
2017-03-28T06:52:09
2017-03-28T06:52:09
86,425,236
1
0
null
null
null
null
UTF-8
Java
false
false
3,313
java
package com.library.widget.shimmer; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Canvas; import android.util.AttributeSet; import android.widget.TextView; /** * Shimmer * User: romainpiel * Date: 06/03/2014 * Time: 10:19 * * Shimmering TextView * Dumb class wrapping a ShimmerViewHelper */ public class ShimmerTextView extends TextView implements ShimmerViewBase { private ShimmerViewHelper shimmerViewHelper; public ShimmerTextView(Context context) { super(context); shimmerViewHelper = new ShimmerViewHelper(this, getPaint(), null); shimmerViewHelper.setPrimaryColor(getCurrentTextColor()); } public ShimmerTextView(Context context, AttributeSet attrs) { super(context, attrs); shimmerViewHelper = new ShimmerViewHelper(this, getPaint(), attrs); shimmerViewHelper.setPrimaryColor(getCurrentTextColor()); } public ShimmerTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); shimmerViewHelper = new ShimmerViewHelper(this, getPaint(), attrs); shimmerViewHelper.setPrimaryColor(getCurrentTextColor()); } @Override public float getGradientX() { return shimmerViewHelper.getGradientX(); } @Override public void setGradientX(float gradientX) { shimmerViewHelper.setGradientX(gradientX); } @Override public boolean isShimmering() { return shimmerViewHelper.isShimmering(); } @Override public void setShimmering(boolean isShimmering) { shimmerViewHelper.setShimmering(isShimmering); } @Override public boolean isSetUp() { return shimmerViewHelper.isSetUp(); } @Override public void setAnimationSetupCallback(ShimmerViewHelper.AnimationSetupCallback callback) { shimmerViewHelper.setAnimationSetupCallback(callback); } @Override public int getPrimaryColor() { return shimmerViewHelper.getPrimaryColor(); } @Override public void setPrimaryColor(int primaryColor) { shimmerViewHelper.setPrimaryColor(primaryColor); } @Override public int getReflectionColor() { return shimmerViewHelper.getReflectionColor(); } @Override public void setReflectionColor(int reflectionColor) { shimmerViewHelper.setReflectionColor(reflectionColor); } @Override public void setTextColor(int color) { super.setTextColor(color); if (shimmerViewHelper != null) { shimmerViewHelper.setPrimaryColor(getCurrentTextColor()); } } @Override public void setTextColor(ColorStateList colors) { super.setTextColor(colors); if (shimmerViewHelper != null) { shimmerViewHelper.setPrimaryColor(getCurrentTextColor()); } } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); if (shimmerViewHelper != null) { shimmerViewHelper.onSizeChanged(); } } @Override public void onDraw(Canvas canvas) { if (shimmerViewHelper != null) { shimmerViewHelper.onDraw(); } super.onDraw(canvas); } }
[ "54543534@domain.com" ]
54543534@domain.com
e827fc7c76ed83e405dd45d381a44a13c68ed240
cf7278e9f104cbbbfaef4ec5ffac86e60a02e727
/src/main/java/ar/gob/gcba/dgisis/mapa360/config/Constants.java
5d778b6450910dd699e9fd70ac28e7867612d28b
[]
no_license
scarabetta/mapa360
019a8319b2bc243731b7f1c447e901e85822879d
a1b4252edecccfefcf8227cb92dce8c4cff7ec99
refs/heads/master
2020-03-12T07:43:35.824417
2018-04-21T21:09:16
2018-04-21T21:09:16
130,512,243
0
0
null
2023-04-27T12:08:59
2018-04-21T21:09:14
Java
UTF-8
Java
false
false
432
java
package ar.gob.gcba.dgisis.mapa360.config; /** * Application constants. */ public final class Constants { // Regex for acceptable logins public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$"; public static final String SYSTEM_ACCOUNT = "system"; public static final String ANONYMOUS_USER = "anonymoususer"; public static final String DEFAULT_LANGUAGE = "en"; private Constants() { } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
59fa31eba211cff654b7b84fe6f6fc1f2a5d3ae6
bb45ca5f028b841ca0a08ffef60cedc40090f2c1
/app/src/main/java/com/baidu/mapapi/s.java
4da2760379f5238716898238340e5f5a3b5676c3
[]
no_license
tik5213/myWorldBox
0d248bcc13e23de5a58efd5c10abca4596f4e442
b0bde3017211cc10584b93e81cf8d3f929bc0a45
refs/heads/master
2020-04-12T19:52:17.559775
2017-08-14T05:49:03
2017-08-14T05:49:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,026
java
package com.baidu.mapapi; import android.content.Context; import android.os.Handler; import android.util.Log; import io.netty.handler.codec.http.HttpHeaders.Values; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; import org.apache.tools.ant.util.FileUtils; public class s { static s b; static boolean c = false; ArrayList<File> a = new ArrayList(); private boolean d = false; private String e; private Handler f = new t(this); class a extends Thread { File a; final /* synthetic */ s b; public a(s sVar, File file) { this.b = sVar; this.a = file; Log.d("kal", "upload file:" + this.a.getAbsolutePath()); } public void a() { if (!this.a.exists()) { this.b.a.remove(this.a); } s.a().c(); } public void run() { try { if (s.c) { Log.d("kal", "UploadWorker:begin uploading."); } Map hashMap = new HashMap(); hashMap.put("ver", "2"); hashMap.put("pd", "mapsdk"); hashMap.put("im", Mj.k); hashMap.put("os", "android"); String uuid = UUID.randomUUID().toString(); String str = "--"; String str2 = "\r\n"; String str3 = Values.MULTIPART_FORM_DATA; String str4 = "UTF-8"; HttpURLConnection a = d.a("http://ulog.imap.baidu.com/up"); if (s.c) { Log.d("kal", "UploadWorker:begin get connection ok."); } a.setReadTimeout(5000); a.setDoInput(true); a.setDoOutput(true); a.setUseCaches(false); a.setRequestMethod("POST"); a.setRequestProperty("connection", "keep-alive"); a.setRequestProperty("Charsert", "UTF-8"); a.setRequestProperty("Content-Type", str3 + ";boundary=" + uuid); StringBuilder stringBuilder = new StringBuilder(); for (Entry entry : hashMap.entrySet()) { stringBuilder.append(str); stringBuilder.append(uuid); stringBuilder.append(str2); stringBuilder.append("Content-Disposition: form-data; name=\"" + ((String) entry.getKey()) + "\"" + str2); stringBuilder.append("Content-Type: text/plain; charset=" + str4 + str2); stringBuilder.append("Content-Transfer-Encoding: 8bit" + str2); stringBuilder.append(str2); stringBuilder.append((String) entry.getValue()); stringBuilder.append(str2); } DataOutputStream dataOutputStream = new DataOutputStream(a.getOutputStream()); dataOutputStream.write(stringBuilder.toString().getBytes()); if (s.c) { Log.d("kal", "UploadWorker:write header is ok."); } if (this.a != null) { StringBuilder stringBuilder2 = new StringBuilder(); stringBuilder2.append(str); stringBuilder2.append(uuid); stringBuilder2.append(str2); stringBuilder2.append("Content-Disposition: form-data; name=\"datafile\"; filename=\"" + this.a.getName() + "\"" + str2); stringBuilder2.append("Content-Type: application/octet-stream; charset=" + str4 + str2); stringBuilder2.append(str2); dataOutputStream.write(stringBuilder2.toString().getBytes()); InputStream fileInputStream = new FileInputStream(this.a); byte[] bArr = new byte[1024]; while (true) { int read = fileInputStream.read(bArr); if (read == -1) { break; } dataOutputStream.write(bArr, 0, read); } fileInputStream.close(); dataOutputStream.write(str2.getBytes()); if (s.c) { Log.d("kal", "UploadWorker: write data is ok."); } } dataOutputStream.write((str + uuid + str + str2).getBytes()); dataOutputStream.flush(); int responseCode = a.getResponseCode(); dataOutputStream.close(); a.disconnect(); if (responseCode == 200) { synchronized (this.b.a) { this.b.d = false; if (s.c) { Log.d("kal", "remove file:" + this.a.getAbsolutePath()); } this.b.a.remove(this.a); if (s.c) { Log.d("kal", "updateList size: " + this.b.a.size()); } this.a.delete(); if (this.b.a.size() > 0) { this.b.f.sendMessageDelayed(this.b.f.obtainMessage(1), FileUtils.FAT_FILE_TIMESTAMP_GRANULARITY); } else { this.b.f.sendEmptyMessage(2); } } return; } synchronized (this.b.a) { this.b.d = false; if (this.b.a.size() > 0) { this.b.f.sendMessageDelayed(this.b.f.obtainMessage(1), FileUtils.FAT_FILE_TIMESTAMP_GRANULARITY); } else { this.b.f.sendEmptyMessage(2); } } } catch (MalformedURLException e) { e.printStackTrace(); a(); } catch (IOException e2) { e2.printStackTrace(); a(); } } } public static s a() { if (b == null) { b = new s(); } return b; } private void b() { if (this.a.size() > 0) { if (c) { Log.d("kal", "started."); } this.d = true; new a(this, (File) this.a.get(0)).start(); } } private void b(File file) { if (file.isDirectory()) { File[] listFiles = file.listFiles(); if (listFiles.length > 0) { for (File file2 : listFiles) { if (!(file2.getName().contains("udclog") || this.a.contains(file2))) { this.a.add(file2); } } b(); } } } private void c() { if (c) { Log.d("kal", "stoped."); } this.d = false; if (this.e != null) { b(new File(this.e)); } } public String a(String str, String str2) { String AppendRecord = Mj.AppendRecord(str, str2); if (!(AppendRecord == null || "".equals(AppendRecord))) { a(new File(AppendRecord)); } return AppendRecord; } void a(Context context) { b(new File(context.getFilesDir(), "udc/")); } public void a(File file) { synchronized (this.a) { if (!this.a.contains(file)) { this.a.add(file); this.e = file.getParent(); if (!this.d) { b(); } } } } }
[ "18631616220@163.com" ]
18631616220@163.com
5577136496ec2461adafe9217a43ea85a8cbcc98
3b85db026f3aa749cff2a7ccf8cca2b62246140a
/src/rewriter/com/newrelic/org/apache/commons/io/IOExceptionWithCause.java
d500218188992687ad5a504cc12509ef84e2dfe1
[]
no_license
chenhq/newrelic_ref
9255cf81572d89309a17989c09e42b0d00db126d
792d7c84dd231fec170894b233996c744f8c318d
refs/heads/master
2021-01-10T19:01:40.257458
2014-12-26T08:39:09
2014-12-26T08:39:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
812
java
/* */ package com.newrelic.org.apache.commons.io; /* */ /* */ import java.io.IOException; /* */ /* */ public class IOExceptionWithCause extends IOException /* */ { /* */ private static final long serialVersionUID = 1L; /* */ /* */ public IOExceptionWithCause(String message, Throwable cause) /* */ { /* 49 */ super(message); /* 50 */ initCause(cause); /* */ } /* */ /* */ public IOExceptionWithCause(Throwable cause) /* */ { /* 64 */ super(cause == null ? null : cause.toString()); /* 65 */ initCause(cause); /* */ } /* */ } /* Location: /home/think/Downloads/newrelic-android-4.120.0/lib/class.rewriter.jar * Qualified Name: com.newrelic.org.apache.commons.io.IOExceptionWithCause * JD-Core Version: 0.6.2 */
[ "hongqing.chen@gmail.com" ]
hongqing.chen@gmail.com
48aa38a91a17feeca6c1664eb22f554bd5f79b1e
068a591d47a7cfa296d72572fc5c99d76bcd58f4
/semester4/AISD/2/Sort/src/L3/RandSelect.java
6759e67e3aaf8e2352dc9390120e55e986526719
[]
no_license
n1t4chi/studies
6afc9243d36d5917e3c6d69001d5ec0913d0cd66
f21a8255b011cb9dbc119887811b65830a69c09f
refs/heads/master
2021-01-23T01:17:26.887381
2017-06-23T15:36:11
2017-06-23T15:36:11
92,862,450
0
1
null
null
null
null
UTF-8
Java
false
false
4,303
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package L3; import Log.SelectLog; import java.io.PrintStream; import java.util.AbstractMap; import java.util.Map.Entry; import java.util.concurrent.ThreadLocalRandom; /** * * @author n1t4chi */ public class RandSelect { public static Entry<Integer,Comparable> randSelect(Comparable[] A, int i){ return randSelect(A, 0, A.length-1, i, null,true); } public static Entry<Entry<Integer,Comparable>,SelectLog> randSelectWithLog(Comparable[] A, int i,PrintStream out){ SelectLog log = new SelectLog(out); Entry<Entry<Integer,Comparable>,SelectLog> rtrn = new AbstractMap.SimpleEntry<>(randSelect(A, 0,A.length-1,i,log,true),log); return rtrn; } private static Entry<Integer,Comparable> randSelect(Comparable[] A,int p,int q,int i,SelectLog log,boolean first){ if(first){ SelectLog.println("randSelect(p:"+p+" q:"+q+" i:"+i+") received below tab", log); SelectLog.printlnTab(A,-1, log); } Entry<Integer,Comparable> rtrn; if(p==q){ rtrn = new AbstractMap.SimpleEntry<>(p,A[p]); }else{ int r = randPartition(A,p,q,log); int k = r-p+1; if(i==k){ rtrn = new AbstractMap.SimpleEntry<>(r,A[r]); }else{ if(i<k){ rtrn = randSelect(A, p, r-1, i, log, false); }else{ /*(i>k)*/ rtrn = randSelect(A, r+1, q, i-k, log, false); } } } SelectLog.println("", log); if(first){ SelectLog.printlnSummary(A, log); } SelectLog.println("randSelect(p:"+p+" q:"+q+" i:"+i+") returns element:"+rtrn.getValue()+" at "+(rtrn.getKey()+1)+"th position", log); SelectLog.printlnTab(A, rtrn.getKey(), log); return rtrn; } private static int randPartition(Comparable[] A, int p, int q,SelectLog log){ SelectLog.println("", log); SelectLog.println("randPartition(p:"+p+" q:"+q+") received below tab", log); SelectLog.printlnTab(A,-1, log); int piv_i; Comparable piv; if(p>=q){ piv_i = q; piv = A[q]; }else{ piv_i = ThreadLocalRandom.current().nextInt(p,q+1); piv = A[piv_i]; SelectLog.println("randPartition(p:"+p+" q:"+q+") selected pivot "+piv+" at "+piv_i, log); swap(A,piv_i,p,log); piv_i = p; int start = p+1; int end = q; /* piv = 4 4,(1),2,3,7,6,5 s=2 e=7 4,1,(2),3,7,6,5 s=3 e=7 4,1,2,(3),7,6,5 s=4 e=7 4,1,2,3,(7),6,5 s=5 e=7 4,1,2,3,(5),6,7 s=5 e=6 4,1,2,3,(6),5,7 s=5 e=5 */ while(start<end){ SelectLog.incrementCompare(log); if(piv.compareTo(A[start])<0){ swap(A,start,end,log); end--; }else{ start++; } } SelectLog.incrementCompare(log); if(piv.compareTo(A[start])>0){ swap(A,p,start,log); piv_i = start; }else{ swap(A,p,start-1,log); piv_i = start-1; } } SelectLog.println("randPartition(p:"+p+" q:"+q+") finished working and divided array as seen below by pivot"+piv+" and division is at "+piv_i+" position", log); SelectLog.printlnTab(A,piv_i, log); return piv_i; } private static void swap(Comparable[] tab,int i,int j,SelectLog log){ if(i!=j){ SelectLog.incrementCompare(log); if(tab[i]!=tab[j]){ Comparable c = tab[i]; tab[i] = tab[j]; tab[j] = c; // SelectLog.incrementSwap(log); // SelectLog.addToHistory(tab, log,true); SelectLog.println("swap("+i+","+j+") swaps "+tab[i]+" with "+tab[j], log /*always*/); } } } }
[ "n1t4chi@interia.pl" ]
n1t4chi@interia.pl
e19c190c2c1afd4092b201e79ee49cf8e1a962ad
e450e158ccaad7b11e33d2f2a06ca62d1f9cbfb7
/jadx-core/src/test/java/jadx/tests/integration/java8/TestLambdaStatic.java
257f071215db2c613dbc2fb4a58db3b5d264c361
[ "Apache-2.0", "BSD-3-Clause", "LGPL-2.1-only", "EPL-1.0", "CC-BY-2.5", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
skylot/jadx
ab484eef2e9fc2f2362401a19feca88e46f6d0c7
2c92c6b0a60f7fca9a5b0c90925644f8c20b2aac
refs/heads/master
2023-09-02T07:17:31.375276
2023-09-01T20:15:14
2023-09-01T20:18:58
8,859,474
37,693
4,938
Apache-2.0
2023-09-14T17:33:32
2013-03-18T17:08:21
Java
UTF-8
Java
false
false
1,862
java
package jadx.tests.integration.java8; import java.util.concurrent.Callable; import java.util.function.Function; import org.junit.jupiter.api.Test; import jadx.tests.api.IntegrationTest; import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat; public class TestLambdaStatic extends IntegrationTest { public static class TestCls { public Callable<String> test1() { return () -> "test"; } public Callable<String> test2(String str) { return () -> str; } public Function<String, Integer> test3(String a) { return (b) -> Integer.parseInt(a) - Integer.parseInt(b); } public Function<String, Integer> test4() { return Integer::parseInt; } @SuppressWarnings("Convert2MethodRef") public Function<String, Integer> test4a() { return s -> Integer.parseInt(s); } public Function<String, Integer> test5() { String str = Integer.toString(3); return (s) -> Integer.parseInt(str) - Integer.parseInt(s); } public void check() throws Exception { assertThat(test1().call()).isEqualTo("test"); assertThat(test2("a").call()).isEqualTo("a"); assertThat(test3("3").apply("1")).isEqualTo(2); assertThat(test4().apply("5")).isEqualTo(5); assertThat(test4a().apply("7")).isEqualTo(7); assertThat(test5().apply("1")).isEqualTo(2); } } @Test public void test() { assertThat(getClassNode(TestCls.class)) .code() .doesNotContain("lambda$") .doesNotContain("renamed") .containsLines(2, "return () -> {", indent() + "return \"test\";", "};") .containsLines(2, "return () -> {", indent() + "return str;", "};") .containsOne("return Integer::parseInt;"); } @Test public void testNoDebug() { noDebugInfo(); getClassNode(TestCls.class); } @Test public void testFallback() { setFallback(); getClassNode(TestCls.class); } }
[ "skylot@gmail.com" ]
skylot@gmail.com
6d5faadfad8960252370c561b916fa27d554163e
dd4f84a8e9f4b719cc8204f9459c223981dc7448
/java_syntax_1/level5/lecture12/task3/Solution.java
dbf9a2bebd5f4850bc3ad6da718b66dedc6792fa
[]
no_license
SevenLightnapper/javarush
0ab08f532813ae20f68ea01c1b84b2ee5c5a137e
d9631957d5a17f3055e6b3013073a8ed0c8db229
refs/heads/master
2020-07-02T13:33:49.565221
2019-08-09T20:59:32
2019-08-09T20:59:32
201,534,677
0
0
null
null
null
null
UTF-8
Java
false
false
1,787
java
package javarush.java_syntax_1.level5.lecture12.task3; /* package com.javarush.Task.task05.task0527; */ /* Том и Джерри */ /* Создай классы Dog, Cat, Mouse. Добавь по три поля в каждый класс, на твой выбор. Создай объекты для героев мультика Том и Джерри. Так много, как только вспомнишь. Пример: Mouse jerryMouse = new Mouse("Jerry", 12 , 5), где 12 - высота в см, 5 - длина хвоста в см. */ public class Solution { public static void main(String[] args) { Mouse jerryMouse = new Mouse("Jerry", 12, 5); Dog americanBulldog = new Dog("Spike", 50, "grey"); Dog americanBulldogSon = new Dog("Tyke", 25, "grey"); Cat tomCat = new Cat("Jasper/Tom", 38, "grey-white");//напишите тут ваш код Cat alleyCat = new Cat("Butch", 45, "black"); } public static class Mouse { String name; int height; int tail; public Mouse(String name, int height, int tail) { this.name = name; this.height = height; this.tail = tail; } } public static class Dog{ String name; int weight; String color; public Dog(String name, int weight, String color){ this.name = name; this.weight = weight; this.color = color; } }//напишите тут ваш код public static class Cat{ String name; int weight; String color; public Cat(String name, int weight, String color){ this.name = name; this.weight = weight; this.color = color; } } }
[ "dairenray@gmail.com" ]
dairenray@gmail.com
7733ed567cf5f6c6478c55e564cddc42e265e2d9
888911ce2d6b42806c73b6c99ebc52413fe7a528
/app/src/main/java/com/zmm/diary/utils/config/CommonConfig.java
cd36556fdbb3bec94091c1defb68858f6197e9b7
[]
no_license
Giousa/DiraySystem
3e4d79c41940c25a651eb6e56d497071fad70427
32f9288130c5aa19d2e70cd137aea9dcc2c3efbb
refs/heads/master
2020-04-04T13:33:33.889973
2019-04-17T07:36:12
2019-04-17T07:36:12
155,966,079
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package com.zmm.diary.utils.config; /** * Description: * Author:zhangmengmeng * Date:2018/11/3 * Email:65489469@qq.com */ public class CommonConfig { //基本网络请求地址 public static final String BASE_URL = "http://192.168.253.7:8080/diary/"; // public static final String BASE_URL = "http://giousa.nat300.top/diary/"; public static final String BASE_PIC_URL = "http://uog.oss-cn-shanghai.aliyuncs.com/pic/"; //Cookie public static final String COOKIE="diary_cookie"; // public static final String COOKIE="diary_session"; //登录用户 public static final String LOGIN_USER="LOGIN_USER"; }
[ "65489469@qq.com" ]
65489469@qq.com
cab01a86622baf050736a545a18e3adbdf11ba28
4dacd4ccfca64833fb8bd5666c2f01ab80beee18
/src/main/java/relationship/one_to_one/uni_directional/entity/Employee.java
5829c594dc71723d1009be19aed953c4600ee093
[]
no_license
andervyd/Hibernate
1e4e68fa68b864f38d4a5cd38887d19aa0fe5d89
c5149f0567d5f050e4a1a3967a1b0054f1f8df52
refs/heads/master
2023-02-12T08:11:27.685090
2020-12-22T17:23:32
2020-12-22T17:23:32
308,037,969
0
0
null
null
null
null
UTF-8
Java
false
false
2,013
java
package relationship.one_to_one.uni_directional.entity; import javax.persistence.*; @Entity @Table(name = "re_employees") public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "name") private String name; @Column(name = "surname") private String surname; @Column(name = "department") private String department; @Column(name = "salary") private double salary; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "details_id") private Detail employeeDetail; public Employee() { // default } public Employee(String name, String surname, String department, double salary) { this.name = name; this.surname = surname; this.department = department; this.salary = salary; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } public Detail getEmployeeDetail() { return employeeDetail; } public void setEmployeeDetail(Detail employeeDetail) { this.employeeDetail = employeeDetail; } public String toString() { return "Employee [ id: " + id + ", name: " + name + ", surname: " + surname + ", department: " + department + ", salary: " + salary + " $ ]"; } }
[ "andervyd@gmail.com" ]
andervyd@gmail.com
0eb1f432cad4abd49778497e5fef41e06670f936
a5610dc24443c7586e4fef4bcfa0df9ccee4ccaf
/1.JavaSyntax/src/com/javarush/task/task07/task0722/Solution.java
8fb746f7fb220b45b7beebf3774993af794d7c8c
[]
no_license
NMakhamatov/JavaRushTasks
8d0cafa33e72dcf6e37bb4d062717983c3b0f768
20b4130afc6ce84402b0dbf2ecf4bd67d43aaa27
refs/heads/master
2020-03-27T14:12:43.767842
2019-06-02T16:59:26
2019-06-02T16:59:26
146,650,183
0
0
null
null
null
null
UTF-8
Java
false
false
737
java
package com.javarush.task.task07.task0722; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /* Это конец */ public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ArrayList<String> list = new ArrayList<>(); //напишите тут ваш код while (true) { String s = reader.readLine(); if ("end".equals(s)) { break; } list.add(s); } for (String s: list ) { System.out.println(s); } } }
[ "zeropulse8@gmail.com" ]
zeropulse8@gmail.com
268628025b2585bff7d0530a9c9a4f0dca80f935
4eefc2f968d236b21758a56a5187d39a06898408
/frameWidget/src/main/java/com/ab/view/chart/TimeChart.java
5c479ecbbdb623b3ce805fa2f4ec943efb88fb2b
[]
no_license
phx1314/PettimeNew
ac2412056f947d5d1457d29095409d2a42f2523b
3d48aa33f40ce40b867b376c9cdbaa4a9656c1b5
refs/heads/master
2020-09-08T11:36:56.635775
2019-12-19T06:37:38
2019-12-19T06:37:38
221,121,803
0
0
null
null
null
null
UTF-8
Java
false
false
7,553
java
/* * Copyright (C) 2012 www.amsoft.cn * * 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.ab.view.chart; import android.graphics.Canvas; import android.graphics.Paint; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; // TODO: Auto-generated Javadoc /** * The time chart rendering class. */ public class TimeChart extends LineChart { /** The constant to identify this chart type. */ public static final String TYPE = "Time"; /** The number of milliseconds in a day. */ public static final long DAY = 24 * 60 * 60 * 1000; /** The date format pattern to be used in formatting the X axis labels. */ private String mDateFormat; /** The starting point for labels. */ private Double mStartPoint; /** * Instantiates a new time chart. */ TimeChart() { } /** * Builds a new time chart instance. * * @param dataset the multiple series dataset * @param renderer the multiple series renderer */ public TimeChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer) { super(dataset, renderer); } /** * Returns the date format pattern to be used for formatting the X axis * labels. * * @return the date format pattern for the X axis labels */ public String getDateFormat() { return mDateFormat; } /** * Sets the date format pattern to be used for formatting the X axis labels. * * @param format the date format pattern for the X axis labels. If null, an * appropriate default format will be used. */ public void setDateFormat(String format) { mDateFormat = format; } /** * The graphical representation of the labels on the X axis. * * @param xLabels the X labels values * @param xTextLabelLocations the X text label locations * @param canvas the canvas to paint to * @param paint the paint to be used for drawing * @param left the left value of the labels area * @param top the top value of the labels area * @param bottom the bottom value of the labels area * @param xPixelsPerUnit the amount of pixels per one unit in the chart labels * @param minX the minimum value on the X axis in the chart * @param maxX the maximum value on the X axis in the chart */ @Override protected void drawXLabels(List<Double> xLabels, Double[] xTextLabelLocations, Canvas canvas, Paint paint, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX) { int length = xLabels.size(); if (length > 0) { boolean showLabels = mRenderer.isShowLabels(); boolean showGridY = mRenderer.isShowGridY(); DateFormat format = getDateFormat(xLabels.get(0), xLabels.get(length - 1)); //System.out.println("时间点的数量i"+length); for (int i = 0; i < length; i++) { long label = Math.round(xLabels.get(i)); float xLabel = (float) (left + xPixelsPerUnit * (label - minX)); if (showLabels) { paint.setColor(mRenderer.getXLabelsColor()); canvas.drawLine(xLabel, bottom, xLabel, bottom + mRenderer.getLabelsTextSize() / 3, paint); //System.out.println("时间点:"+format.format(new Date(label))); drawText(canvas, format.format(new Date(label)), xLabel,bottom + mRenderer.getLabelsTextSize() * 4 / 3, paint, mRenderer.getXLabelsAngle()); } if (showGridY) { paint.setColor(mRenderer.getGridColor()); canvas.drawLine(xLabel, bottom, xLabel, top, paint); } } } drawXTextLabels(xTextLabelLocations, canvas, paint, true, left, top, bottom, xPixelsPerUnit, minX, maxX); } /** * Returns the date format pattern to be used, based on the date range. * * @param start the start date in milliseconds * @param end the end date in milliseconds * @return the date format */ private DateFormat getDateFormat(double start, double end) { if (mDateFormat != null) { SimpleDateFormat format = null; try { format = new SimpleDateFormat(mDateFormat); return format; } catch (Exception e) { // do nothing here } } DateFormat format = SimpleDateFormat.getDateInstance(SimpleDateFormat.MEDIUM); double diff = end - start; if (diff > DAY && diff < 5 * DAY) { format = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.SHORT, SimpleDateFormat.SHORT); } else if (diff < DAY) { format = SimpleDateFormat.getTimeInstance(SimpleDateFormat.MEDIUM); } return format; } /** * Returns the chart type identifier. * * @return the chart type */ public String getChartType() { return TYPE; } /** * 描述:TODO. * * @version v1.0 * @param min the min * @param max the max * @param count the count * @return the x labels * @see com.ab.view.chart.XYChart#getXLabels(double, double, int) * @author: amsoft.cn * @date:2013-6-17 上午9:04:48 */ protected List<Double> getXLabels(double min, double max, int count) { final List<Double> result = new ArrayList<Double>(); if (!mRenderer.isXRoundedLabels()) { if (mDataset.getSeriesCount() > 0) { XYSeries series = mDataset.getSeriesAt(0); int length = series.getItemCount(); int intervalLength = 0; int startIndex = -1; for (int i = 0; i < length; i++) { double value = series.getX(i); if (min <= value && value <= max) { intervalLength++; if (startIndex < 0) { startIndex = i; } } } if (intervalLength < count) { for (int i = startIndex; i < startIndex + intervalLength; i++) { result.add(series.getX(i)); } } else { float step = (float) intervalLength / count; int intervalCount = 0; for (int i = 0; i < length && intervalCount < count; i++) { double value = series.getX(Math.round(i * step)); if (min <= value && value <= max) { result.add(value); intervalCount++; } } } return result; } else { return super.getXLabels(min, max, count); } } if (mStartPoint == null) { mStartPoint = min - (min % DAY) + DAY + new Date(Math.round(min)).getTimezoneOffset() * 60 * 1000; } if (count > 25) { count = 25; } final double cycleMath = (max - min) / count; if (cycleMath <= 0) { return result; } double cycle = DAY; if (cycleMath <= DAY) { while (cycleMath < cycle / 2) { cycle = cycle / 2; } } else { while (cycleMath > cycle) { cycle = cycle * 2; } } double val = mStartPoint - Math.floor((mStartPoint - min) / cycle) * cycle; int i = 0; while (val < max && i++ <= count) { result.add(val); val += cycle; } return result; } }
[ "daif@deepblueai.com" ]
daif@deepblueai.com
ead4c4be95849d4366bf1449b892e87aaef3932f
1c218fc1c5d6bca1a93f74ab4fe7b25b03f41d7c
/src/main/java/org/training360/finalexam/teams/TeamController.java
54c7a8be08919bfa6952c07f1918491ebc896c4f
[]
no_license
NDboy/sv2021-jvjbf-zarovizsga
6d0533a536a5f0b95d8a1fc3dcb342a007ce1233
887d767b48cb7f6e6fde570a36cd47cb507e2644
refs/heads/master
2023-07-03T12:46:20.192105
2021-08-09T22:30:40
2021-08-09T22:30:40
394,298,881
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package org.training360.finalexam.teams; import lombok.AllArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import org.training360.finalexam.players.CreatePlayerCommand; import javax.validation.Valid; import java.util.List; @RestController @AllArgsConstructor @RequestMapping("/api/teams") public class TeamController { private TeamService teamService; @GetMapping public List<TeamDTO> listAllTeams() { return teamService.listAllTeams(); } @PostMapping @ResponseStatus(HttpStatus.CREATED) public TeamDTO createTeam(@Valid @RequestBody CreateTeamCommand command) { return teamService.createTeam(command); } @PostMapping("/{id}/players") public TeamDTO addNewPlayer(@PathVariable("id") long id, @RequestBody CreatePlayerCommand command) { return teamService.addNewPlayer(id, command); } @PutMapping("/{id}/players") public TeamDTO addExistingPlayer(@PathVariable("id") long id, @RequestBody UpdateWithExistingPlayerCommand command) { return teamService.addExistingPlayer(id, command); } }
[ "endre.karsai@gmail.com" ]
endre.karsai@gmail.com
9b9a5124291ae2df040137fbaecae22d781a4291
e69e5d899856b185e23b6ca0ed50df38b2aff5d1
/estimation-data-services/src/main/java/com/tip/estimation/model/RejectReasonRequest.java
76183559b56fdf067819d48e83554d280de06183
[]
no_license
shuvankar999/git_backup
10edee9a3db6e4dcb6b67df2a712ebce10c33f31
b39e126e45df1c6147aace22aabbcc75b3d65322
refs/heads/main
2023-06-14T17:12:55.874523
2021-07-09T16:16:14
2021-07-09T16:16:14
384,487,809
0
0
null
null
null
null
UTF-8
Java
false
false
1,815
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // 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: 2018.07.10 at 06:06:22 PM IST // package com.tip.estimation.model; import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for RejectReasonRequest complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RejectReasonRequest"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="estimationId" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RejectReasonRequest", propOrder = { "estimationId" }) public class RejectReasonRequest { protected BigDecimal estimationId; /** * Gets the value of the estimationId property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getEstimationId() { return estimationId; } /** * Sets the value of the estimationId property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setEstimationId(BigDecimal value) { this.estimationId = value; } }
[ "shuvankar999@gmail.com" ]
shuvankar999@gmail.com
2c0529fcffc1f21a0751fd1e53dffe5bc4399343
277e9b46052cc9abd859246de1c3529ec739fcb6
/szk/src/main/java/com/allen/entity/user/UserGroupResource.java
32366d85d48e2b3fd5ba2931491a38a4c519149e
[]
no_license
Allen5413/szk
9c9accc3e082cd6d65c17509461ae8f0e5030452
644a8c168132280be8d48fc3aa2f9c91b03aa274
refs/heads/master
2021-01-19T22:53:51.277881
2018-11-30T07:11:20
2018-11-30T07:11:20
88,923,608
0
0
null
null
null
null
UTF-8
Java
false
false
1,335
java
package com.allen.entity.user; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import java.util.Date; /** * Created by Allen on 2016/12/12. */ @Entity @Table(name = "user_group_resource") public class UserGroupResource { @Id @GeneratedValue private Long id; //主键 private long userGroupId; private long resourceId; private String creator; //创建人 private Date createTime = new Date(); //创建时间 public Long getId() { return id; } public void setId(Long id) { this.id = id; } public long getUserGroupId() { return userGroupId; } public void setUserGroupId(long userGroupId) { this.userGroupId = userGroupId; } public long getResourceId() { return resourceId; } public void setResourceId(long resourceId) { this.resourceId = resourceId; } public String getCreator() { return creator; } public void setCreator(String creator) { this.creator = creator; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
[ "2319772333@qq.com" ]
2319772333@qq.com
2b3081aaa518ad92692c0c31a01e27ec2a00bde7
e89fdd336ef07f755260d96c38e945c247b57db8
/visallo/core/core/src/main/java/org/visallo/core/model/artifactThumbnails/ArtifactThumbnailRepository.java
339d6d52906d00de4987844db45da9272b030dd1
[ "Apache-2.0" ]
permissive
pppguru/react-meta
badb4e78bfaaa9ca93884ac7d631a5d3fc188ca4
f99d34e4ebbd1afed557b06361dde3e04c3de5f3
refs/heads/master
2020-03-14T16:38:31.093667
2018-05-01T10:46:08
2018-05-01T10:46:08
131,702,126
0
0
null
null
null
null
UTF-8
Java
false
false
7,275
java
package org.visallo.core.model.artifactThumbnails; import com.google.inject.Inject; import com.v5analytics.simpleorm.SimpleOrmSession; import org.vertexium.Vertex; import org.visallo.core.exception.VisalloResourceNotFoundException; import org.visallo.core.model.ontology.OntologyRepository; import org.visallo.core.model.properties.types.BooleanVisalloProperty; import org.visallo.core.model.properties.types.IntegerVisalloProperty; import org.visallo.core.model.user.UserRepository; import org.visallo.core.user.User; import org.visallo.core.util.VisalloLogger; import org.visallo.core.util.VisalloLoggerFactory; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import static com.google.common.base.Preconditions.checkNotNull; public class ArtifactThumbnailRepository { private static final VisalloLogger LOGGER = VisalloLoggerFactory.getLogger(ArtifactThumbnailRepository.class); private static final String VISIBILITY_STRING = ""; public static int FRAMES_PER_PREVIEW = 20; public static int PREVIEW_FRAME_WIDTH = 360; public static int PREVIEW_FRAME_HEIGHT = 240; private final SimpleOrmSession simpleOrmSession; private final UserRepository userRepository; private BooleanVisalloProperty yAxisFlippedProperty; private IntegerVisalloProperty clockwiseRotationProperty; @Inject public ArtifactThumbnailRepository( SimpleOrmSession simpleOrmSession, UserRepository userRepository, final OntologyRepository ontologyRepository ) { this.simpleOrmSession = simpleOrmSession; this.userRepository = userRepository; String yAxisFlippedPropertyIri = ontologyRepository.getPropertyIRIByIntent("media.yAxisFlipped"); if (yAxisFlippedPropertyIri != null) { this.yAxisFlippedProperty = new BooleanVisalloProperty(yAxisFlippedPropertyIri); } String clockwiseRotationPropertyIri = ontologyRepository.getPropertyIRIByIntent("media.clockwiseRotation"); if (clockwiseRotationPropertyIri != null) { this.clockwiseRotationProperty = new IntegerVisalloProperty(clockwiseRotationPropertyIri); } } public ArtifactThumbnail getThumbnail(String artifactVertexId, String thumbnailType, int width, int height, User user) { String id = ArtifactThumbnail.createId(artifactVertexId, thumbnailType, width, height); return simpleOrmSession.findById(ArtifactThumbnail.class, id, userRepository.getSimpleOrmContext(user)); } public byte[] getThumbnailData(String artifactVertexId, String thumbnailType, int width, int height, User user) { ArtifactThumbnail artifactThumbnail = getThumbnail(artifactVertexId, thumbnailType, width, height, user); if (artifactThumbnail == null) { return null; } return artifactThumbnail.getData(); } public ArtifactThumbnail createThumbnail(Vertex artifactVertex, String propertyKey, String thumbnailType, InputStream in, int[] boundaryDims, User user) throws IOException { ArtifactThumbnail thumbnail = generateThumbnail(artifactVertex, propertyKey, thumbnailType, in, boundaryDims); simpleOrmSession.save(thumbnail, VISIBILITY_STRING, userRepository.getSimpleOrmContext(user)); return thumbnail; } public ArtifactThumbnail generateThumbnail(Vertex artifactVertex, String propertyKey, String thumbnailType, InputStream in, int[] boundaryDims) { ByteArrayOutputStream out = new ByteArrayOutputStream(); String format; int type; try { BufferedImage originalImage = ImageIO.read(in); checkNotNull(originalImage, "Could not generateThumbnail: read original image for artifact " + artifactVertex.getId()); type = ImageUtils.thumbnailType(originalImage); format = ImageUtils.thumbnailFormat(originalImage); BufferedImage transformedImage = getTransformedImage(originalImage, artifactVertex, propertyKey); //Get new image dimensions, which will be used for the icon. int[] transformedImageDims = new int[]{transformedImage.getWidth(), transformedImage.getHeight()}; int[] newImageDims = getScaledDimension(transformedImageDims, boundaryDims); if (newImageDims[0] >= transformedImageDims[0] || newImageDims[1] >= transformedImageDims[1]) { LOGGER.info("Original image dimensions %d x %d are smaller " + "than requested dimensions %d x %d returning original.", transformedImageDims[0], transformedImageDims[1], newImageDims[0], newImageDims[1]); } //Resize the image. BufferedImage resizedImage = new BufferedImage(newImageDims[0], newImageDims[1], type); Graphics2D g = resizedImage.createGraphics(); int width = resizedImage.getWidth(); int height = resizedImage.getHeight(); if (transformedImage.getColorModel().getNumComponents() > 3) { g.drawImage(transformedImage, 0, 0, width, height, null); } else { g.drawImage(transformedImage, 0, 0, width, height, Color.BLACK, null); } g.dispose(); //Write the bufferedImage to a file. ImageIO.write(resizedImage, format, out); return new ArtifactThumbnail(artifactVertex.getId(), thumbnailType, out.toByteArray(), format, width, height); } catch (IOException e) { throw new VisalloResourceNotFoundException("Error reading InputStream"); } } public BufferedImage getTransformedImage(BufferedImage originalImage, Vertex artifactVertex, String propertyKey) { int cwRotationNeeded = 0; if (clockwiseRotationProperty != null) { Integer nullable = clockwiseRotationProperty.getPropertyValue(artifactVertex, propertyKey); if (nullable != null) { cwRotationNeeded = nullable; } } boolean yAxisFlipNeeded = false; if (yAxisFlippedProperty != null) { Boolean nullable = yAxisFlippedProperty.getPropertyValue(artifactVertex, propertyKey); if (nullable != null) { yAxisFlipNeeded = nullable; } } //Rotate and flip image. return ImageUtils.reOrientImage(originalImage, yAxisFlipNeeded, cwRotationNeeded); } public int[] getScaledDimension(int[] imgSize, int[] boundary) { int originalWidth = imgSize[0]; int originalHeight = imgSize[1]; int boundWidth = boundary[0]; int boundHeight = boundary[1]; int newWidth = originalWidth; int newHeight = originalHeight; if (originalWidth > boundWidth) { newWidth = boundWidth; newHeight = (newWidth * originalHeight) / originalWidth; } if (newHeight > boundHeight) { newHeight = boundHeight; newWidth = (newHeight * originalWidth) / originalHeight; } return new int[]{newWidth, newHeight}; } }
[ "luisantonio_vera@yahoo.com" ]
luisantonio_vera@yahoo.com
97d4cbbd8bc9cf5cc1c6ddf1a18408bad1bca614
1b3357b3a4541d79365117d11d4190e87aeaff89
/app/src/main/java/huyifei/mymvp/architecture/mvp/IDownloadView.java
b78f42bc24616a6d7e522c1eb8e529290d3da612
[ "Apache-2.0" ]
permissive
songyuanyoung/My-MVP
7ee4f76e3570ea3b6af2c1a19af5cb9bd702a542
8f78442df250db3b9df28d31d1216f04e60ab85b
refs/heads/master
2021-01-15T10:42:37.293198
2017-08-04T02:05:40
2017-08-04T02:05:40
99,597,031
1
0
null
2017-08-07T16:16:25
2017-08-07T16:16:25
null
UTF-8
Java
false
false
510
java
package huyifei.mymvp.architecture.mvp; /** * Created by rookie on 2017/1/23. */ public interface IDownloadView { /** * 显示进度条 * @param show */ void showProgressBar(boolean show); /** * 设置进度条进度 * @param progress */ void setProcessProgress(int progress); /** * 根据数据设置view * @param result */ void setView(String result); /** * 设置请求失败时的view */ void showFailToast(); }
[ "foreverlove.zyl@163.com" ]
foreverlove.zyl@163.com
804144077f0ae5321fd54a318197d788e87128f0
4168b1d8b44ea61cab5144ce2c0968ac7fa08149
/src/main/java/com/qiangdong/reader/dto/BlockUserDto.java
62d7f436daf2a58a97b5f98b7b33dacd45ca92b8
[ "Apache-2.0" ]
permissive
Vivian-miao/qiangdongserver
2a841f0a964c92cbfe73d4eb98f0c2888e542fff
0c16fec01b369d5491b8239860f291732db38f2e
refs/heads/master
2023-04-25T07:21:57.354176
2021-05-20T04:16:51
2021-05-20T04:16:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package com.qiangdong.reader.dto; public class BlockUserDto { private Long id; private Long userId; private String username; private String avatar; private String signature; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public String getSignature() { return signature; } public void setSignature(String signature) { this.signature = signature; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } }
[ "a857681664@gmail.com" ]
a857681664@gmail.com
19c1b59fcf1731ef699c7fef437c7ca1aa6b98b3
8f70fe0e87e308fe3dc8cfe9a515a315ed131d18
/src/test/java/com/sugarcrm/test/opportunities/Opportunities_30698.java
57747e59f9cfc5be41c7975748505e4a38ab4ed8
[]
no_license
mustaeenbasit/LKW-Walter_Automation
76fd02c34c766bc34a5c300e3f5943664c70d67b
a97f4feca8e51c21f3cef1949573a8e4909e7143
refs/heads/master
2020-04-09T17:54:32.252374
2018-12-05T09:49:29
2018-12-05T09:49:29
160,495,697
0
0
null
null
null
null
UTF-8
Java
false
false
1,138
java
package com.sugarcrm.test.opportunities; import org.junit.Test; import com.sugarcrm.candybean.datasource.FieldSet; import com.sugarcrm.sugar.VoodooUtils; import com.sugarcrm.test.SugarTest; public class Opportunities_30698 extends SugarTest { public void setup() throws Exception { sugar().accounts.api.create(); sugar().login(); } /** * Verify that status field should update on creating an Opportunity with RLI * @throws Exception */ @Test public void Opportunities_30698_execute() throws Exception { VoodooUtils.voodoo.log.info("Running " + testName + "..."); // Creating a OPP + RLI record with Closed Won stage FieldSet oppData = testData.get(testName).get(0); FieldSet fs = new FieldSet(); fs.put("rli_stage", oppData.get("rli_stage")); sugar().opportunities.create(fs); // Asserting the status of Opportunity is Closed Won in Record View sugar().opportunities.listView.clickRecord(1); sugar().opportunities.recordView.getDetailField("status").assertEquals(oppData.get("status"), true); VoodooUtils.voodoo.log.info(testName + " complete."); } public void cleanup() throws Exception {} }
[ "mustaeen.basit@ROLUSTECH.NET" ]
mustaeen.basit@ROLUSTECH.NET
3e6defb09bcb334329bc36ecfd0b1d1ec3840c55
6b8bdbea705847c4484ec29f1e6532c8189dba1b
/app/src/main/java/com/activity/analyzer/AnalyzerResultActivity.java
f646cd9769eccb4f8df1b6539036696827f9b5ce
[ "Apache-2.0" ]
permissive
LittleFatZhang/ActivityLaunchAnalyzer
e7f406219a47b1200b556d5dd23eafee0c471b20
3194098bc122349c411b44c010a6a2296e48b0fc
refs/heads/master
2021-01-16T00:12:03.382945
2016-02-25T08:47:45
2016-02-25T08:47:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,142
java
package com.activity.analyzer; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import com.activity.analyzer.library.ActivityLaunchData; import com.activity.analyzer.library.AnalyzerDataHolder; import com.activity.analyzer.library.LevelToast; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; /** * 分析结果页 * * @author Megatron King * @since 2016/2/22 15:24 */ public class AnalyzerResultActivity extends ListActivity { private List<ActivityStat> mAllPageStat = new ArrayList<ActivityStat>(); private List<ActivityStat> mNormalPageStat = new ArrayList<ActivityStat>(); private List<ActivityStat> mSlightPageStat = new ArrayList<ActivityStat>(); private List<ActivityStat> mWarningPageStat = new ArrayList<ActivityStat>(); private List<ActivityStat> mAlterPageStat = new ArrayList<ActivityStat>(); private List<ActivityStat> mFatalPageStat = new ArrayList<ActivityStat>(); private MenuItem mMenuBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("Analyzer Result"); analyzerData(); } private void analyzerData(){ Map<String, List<ActivityLaunchData>> dataHolder = AnalyzerDataHolder.get(); if(dataHolder == null || dataHolder.isEmpty()){ Toast.makeText(this, "No Stat!", Toast.LENGTH_SHORT).show(); finish(); return; }else{ for (String componentName : dataHolder.keySet()){ if(componentName.equals(getClass().getName()) || componentName.equals(AnalyzerResultDetailActivity.class.getName())){ continue; } List<ActivityLaunchData> activityLaunchData = dataHolder.get(componentName); long totalLaunchTime = 0; for (ActivityLaunchData data : activityLaunchData){ totalLaunchTime += data.thisTime; } ActivityStat activityStat = new ActivityStat(); activityStat.componentName = activityLaunchData.get(0).getPageShortName(); activityStat.statCount = activityLaunchData.size(); activityStat.launchTime = totalLaunchTime / activityStat.statCount; activityStat.data = new ArrayList<ActivityLaunchData>(activityLaunchData); activityStat.level = LevelToast.getLevel(activityStat.launchTime); mAllPageStat.add(activityStat); } Collections.sort(mAllPageStat, new Comparator<ActivityStat>() { @Override public int compare(ActivityStat lhs, ActivityStat rhs) { return (int) (lhs.launchTime - rhs.launchTime); } }); for (ActivityStat activityStat : mAllPageStat){ if(activityStat.level == LevelToast.LEVEL_NORMAL){ mNormalPageStat.add(activityStat); } if(activityStat.level == LevelToast.LEVEL_SLIGHT){ mSlightPageStat.add(activityStat); } if(activityStat.level == LevelToast.LEVEL_WARNING){ mWarningPageStat.add(activityStat); } if(activityStat.level == LevelToast.LEVEL_ALERT){ mAlterPageStat.add(activityStat); } if(activityStat.level == LevelToast.LEVEL_FATAL){ mFatalPageStat.add(activityStat); } } } setListAdapter(new ResultListAdapter(this, mAllPageStat)); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); ActivityStat activityStat = (ActivityStat) getListAdapter().getItem(position); Intent intent = new Intent(this, AnalyzerResultDetailActivity.class); intent.putExtra(AnalyzerResultDetailActivity.EXTRAL_ACTIVITY_NAME, activityStat.componentName); intent.putExtra(AnalyzerResultDetailActivity.EXTRAL_ACTIVITY_DATA, activityStat.data); startActivity(intent); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.debug_analyzer_result, menu); menu.findItem(R.id.action_normal).setVisible(!mNormalPageStat.isEmpty()); menu.findItem(R.id.action_slight).setVisible(!mSlightPageStat.isEmpty()); menu.findItem(R.id.action_warning).setVisible(!mWarningPageStat.isEmpty()); menu.findItem(R.id.action_alert).setVisible(!mAlterPageStat.isEmpty()); menu.findItem(R.id.action_fatal).setVisible(!mFatalPageStat.isEmpty()); mMenuBar = menu.findItem(R.id.action_menu_bar); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { ListAdapter adapter = null; switch (item.getItemId()){ case R.id.action_menu_bar: return true; case R.id.action_all: adapter = new ResultListAdapter(this, mAllPageStat); mMenuBar.setTitle("All"); break; case R.id.action_normal: adapter = new ResultListAdapter(this, mNormalPageStat); mMenuBar.setTitle("Perfect"); break; case R.id.action_slight: adapter = new ResultListAdapter(this, mSlightPageStat); mMenuBar.setTitle("Normal"); break; case R.id.action_warning: adapter = new ResultListAdapter(this, mWarningPageStat); mMenuBar.setTitle("Slow"); break; case R.id.action_alert: adapter = new ResultListAdapter(this, mAlterPageStat); mMenuBar.setTitle("Serious"); break; case R.id.action_fatal: adapter = new ResultListAdapter(this, mFatalPageStat); mMenuBar.setTitle("Fatal"); break; } setListAdapter(adapter); return true; } private class ResultListAdapter extends BaseArrayHolderAdapter<ActivityStat>{ public ResultListAdapter(Context context, List<ActivityStat> data) { super(context, data); } @Override protected int getViewResId() { return R.layout.debug_analyze_result_item; } @Override protected void bindDataToView(View convertView, ActivityStat activityLaunchData, int position) { TextView page = findView(convertView, R.id.debug_analyze_result_page); TextView time = findView(convertView, R.id.debug_analyze_result_time); page.setText(activityLaunchData.componentName); time.setText("average time:" + activityLaunchData.launchTime + "ms stat count:" + activityLaunchData.statCount); ColorDrawable drawable = new ColorDrawable(LevelToast.getColorByLevel(activityLaunchData.level)); drawable.setBounds(0, 0, 30, 30); page.setCompoundDrawables(drawable, null, null, null); } } private class ActivityStat implements Serializable { private String componentName; private long launchTime; private int statCount; private int level; private ArrayList<ActivityLaunchData> data; } }
[ "jgy08954@ly.com" ]
jgy08954@ly.com
3d39e438c6e637fc710bcae50c6f28748ea1aeb0
f3c35ce8ca93ad644f523ca19171478dd0ec95da
/ib/src/main/java/com/dwidasa/ib/pages/payment/LoanPaymentReceipt.java
e4b054d3856e74b13d5b74466ae1c8bb2434c04f
[]
no_license
depot-air/internet-banking
da049da2f6288a388bd9f2d33a9e8e57f5954269
25a5e0038c446536eca748e18f35b7a6a8224604
refs/heads/master
2022-12-21T03:54:50.227565
2020-01-16T11:15:31
2020-01-16T11:15:31
234,302,680
0
1
null
2022-12-09T22:33:28
2020-01-16T11:12:17
Java
UTF-8
Java
false
false
1,493
java
package com.dwidasa.ib.pages.payment; import com.dwidasa.engine.model.view.LoanPaymentView; import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.annotations.DiscardAfter; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.ioc.Messages; import org.apache.tapestry5.ioc.annotations.Inject; /** * Created by IntelliJ IDEA. * User: emil * Date: 25/07/11 * Time: 14:14 */ public class LoanPaymentReceipt { @Persist private LoanPaymentView loanPaymentView; @Property private String status; @Inject private Messages messages; @Inject private ComponentResources componentResources; public Object onActivate() { if (loanPaymentView == null) { return LoanPaymentInput.class; } return null; } public void setupRender() { if (getLoanPaymentView().getResponseCode() != null && getLoanPaymentView().getResponseCode().equals(com.dwidasa.ib.Constants.SUCCESS_CODE)) { status = messages.get("success"); } else { status = messages.get("failed"); } } public LoanPaymentView getLoanPaymentView() { return loanPaymentView; } public void setLoanPaymentView(LoanPaymentView loanPaymentView) { this.loanPaymentView = loanPaymentView; } @DiscardAfter public Object onSelectedFromBack() { return LoanPaymentInput.class; } }
[ "gunungloli@gmail.com" ]
gunungloli@gmail.com
dbf43afc040d9204f36fb53a885c618d2054ba54
028cbe18b4e5c347f664c592cbc7f56729b74060
/v2/appserv-api/src/java/com/sun/appserv/management/monitor/statistics/KeepAliveStats.java
cb0df8af95022bdb196051a4876913e7445bba1c
[]
no_license
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
3,395
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ /* * $Id: KeepAliveStats.java,v 1.1 2006/12/02 06:03:59 llc Exp $ * $Date: 2006/12/02 06:03:59 $ * $Revision: 1.1 $ */ package com.sun.appserv.management.monitor.statistics; import javax.management.j2ee.statistics.Stats; import javax.management.j2ee.statistics.CountStatistic; /** @see com.sun.appserv.management.monitor.KeepAliveMonitor */ public interface KeepAliveStats extends Stats { /** * @return number of keep-alive connections that timed out. */ public CountStatistic getCountTimeouts(); /** @return number of connections in keep-alive mode */ public CountStatistic getCountConnections(); /** Gets the number of seconds before a keep-alive connection that has been idle times out and is closed. @return Keep-alive timeout in number of seconds */ public CountStatistic getSecondsTimeouts(); /** @return maximum number of concurrent connections in keep-alive mode */ public CountStatistic getMaxConnections(); /** @return number of keep-alive connections that were rejected. */ public CountStatistic getCountRefusals(); /** @return Number of keep-alive connections that were closed */ public CountStatistic getCountFlushes(); /** @return Number of requests received by connections in keep-alive mode. */ public CountStatistic getCountHits(); }
[ "kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
096da53dfd1706a54907cb0a764b13a6f4ca4b37
1931aa0e243dcdfc5a485c3281402319535d3f8c
/src/package1/TestAbstraction2.java
ae1e3ee23f4921881ec915f188c3a535981bf25e
[]
no_license
preetishIbankG99/MindQMisc
01975136742b2ee95bb1286a113b30156d774739
b120fafefbe5c695648953e04b67792a99447817
refs/heads/master
2023-04-13T18:22:51.294937
2021-05-01T13:42:26
2021-05-01T13:42:26
363,422,169
0
0
null
null
null
null
UTF-8
Java
false
false
152
java
package package1; public class TestAbstraction2 { public static void main(String[] args) { Scooty s; s=new Honda(); s.run(); s.presskey(); } }
[ "shubhamsethiabc87@gmail.com" ]
shubhamsethiabc87@gmail.com
023486af8060d34f35f692d72186866fd9c6e326
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/BoilerActuator5688.java
695fde03b6023e9490153dc78b25fbcad3841252
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
263
java
package syncregions; public class BoilerActuator5688 { public execute(int temperatureDifference5688, boolean boilerStatus5688) { //sync _bfpnGUbFEeqXnfGWlV5688, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
de3fb9dbb418414c4b3586cc30a757739f82624b
4a2ba40568ee24c54029421121ff89752613fbd4
/API/ShaftPowerReceiver.java
e94d8683cf12f736d43b069868bd839fb28491a3
[]
no_license
Baughn/RotaryCraft
6c5e079343e4379af157c0da0b77d380a3f5cabb
7a670e20e8d16124ec0e5160ded02ffe3d83a29c
refs/heads/master
2020-04-07T15:43:22.006492
2013-09-01T06:52:09
2013-09-01T06:52:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2013 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.RotaryCraft.API; public interface ShaftPowerReceiver { public void setOmega(int omega); public void setTorque(int torque); public void setPower(long power); public int getOmega(); public int getTorque(); public long getPower(); public int[] getInputBlocksX(); public int[] getInputBlocksY(); public int[] getInputBlocksZ(); /** x,y,z to read from */ public boolean canReadFromBlock(int x, int y, int z); public boolean isReceiving(); /** When there is no input machine. Usually used to set power, speed, torque = 0 */ public void noInputMachine(); /** For when to write it to chat or the like */ public String getName(); }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
82606adcf6cd68f41baad5a8230854a2e8e3d0a0
aa24c119d65bc08b554c265284c6dcb7800f82a8
/mybatis_homework_0927/src/main/java/com/jianjieming/study/mapper/GoodsMapper.java
5067cbfad2a43029652e33e9adc7362b0f21c70d
[]
no_license
JianJieMing/JianJieMing_JAVA
dfe4929d6e3702ebad62bfc8e5583b851fdb042e
0f3f7212e026e6ab0699943082a41f12cd487b69
refs/heads/master
2023-01-13T12:56:00.532459
2018-12-11T09:02:31
2018-12-11T09:02:31
149,609,661
2
0
null
2023-01-06T09:53:09
2018-09-20T12:59:01
Java
UTF-8
Java
false
false
302
java
package com.jianjieming.study.mapper; import com.jianjieming.study.entity.TbGoods; import java.util.List; /** * @author 铭 * 2018/9/27 9:57 */ public interface GoodsMapper { /** * 查询所有商品,并且携带出商品的种类 * @return */ List<TbGoods> findAll(); }
[ "1434640043@qq.com" ]
1434640043@qq.com
7114faaa485ae371e2bbf5f382240c09a2d896e2
b1eee7989acdad29096ef323a7609b5af2828792
/AppDyC/PjDevolucion/src/main/java/mx/gob/sat/siat/dyc/servicio/dto/declaraciones/personafisica1317/ConsultarDeclaracionISRPersonaFisica1317bAnexo5a2DTO.java
e0c303883e2fd0d7694697d6916f4da7f6c6d246
[]
no_license
xtaticzero/AppDyC
2185e5d25840ddbb73d0de6c6c0d61a497a6cdfa
1562a358558323ef6adb84fb0e70ba7560200bda
refs/heads/master
2021-09-09T21:50:41.930101
2018-03-19T21:38:45
2018-03-19T21:38:45
73,757,634
1
0
null
null
null
null
UTF-8
Java
false
false
4,376
java
/* * Todos los Derechos Reservados 2013 SAT. * Servicio de Administracion Tributaria (SAT). * * Este software contiene informacion propiedad exclusiva del SAT considerada * Confidencial. Queda totalmente prohibido su uso o divulgacion en forma * parcial o total. */ package mx.gob.sat.siat.dyc.servicio.dto.declaraciones.personafisica1317; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; /** * * @author Alfredo Ramirez * @since 06/08/2013 * */ @XmlType(propOrder = { "numeroOperacion", "tdiepco1", "fFperceh1", "nC180218", "iC105223", "dC105736", "dC105246", "iC13109205", "iC13109305", "iC13109405" }) public class ConsultarDeclaracionISRPersonaFisica1317bAnexo5a2DTO implements Serializable { @SuppressWarnings("compatibility:4042200130782731780") private static final long serialVersionUID = 1L; //***** Entradas ***** private String cRfceeog1a; private String cRfceeog1b; private int nPeriodo1; private int nEjercic1; //***** Salidas ***** private BigDecimal numeroOperacion; private int tdiepco1; private Date fFperceh1; private int nC180218; private String iC105223; private String dC105736; private BigDecimal dC105246; private BigDecimal iC13109205; private BigDecimal iC13109305; private BigDecimal iC13109405; public void setCRfceeog1a(String cRfceeog1a) { this.cRfceeog1a = cRfceeog1a; } @XmlTransient public String getCRfceeog1a() { return cRfceeog1a; } public void setCRfceeog1b(String cRfceeog1b) { this.cRfceeog1b = cRfceeog1b; } @XmlTransient public String getCRfceeog1b() { return cRfceeog1b; } public void setNPeriodo1(int nPeriodo1) { this.nPeriodo1 = nPeriodo1; } @XmlTransient public int getNPeriodo1() { return nPeriodo1; } public void setNEjercic1(int nEjercic1) { this.nEjercic1 = nEjercic1; } @XmlTransient public int getNEjercic1() { return nEjercic1; } public void setNumeroOperacion(BigDecimal numeroOperacion) { this.numeroOperacion = numeroOperacion; } public BigDecimal getNumeroOperacion() { return numeroOperacion; } public void setTdiepco1(int tdiepco1) { this.tdiepco1 = tdiepco1; } public int getTdiepco1() { return tdiepco1; } public void setFFperceh1(Date fFperceh1) { this.fFperceh1 = new Date(fFperceh1.getTime()); } public Date getFFperceh1() { return new Date(fFperceh1.getTime()); } public void setNC180218(int nC180218) { this.nC180218 = nC180218; } public int getNC180218() { return nC180218; } public void setIC105223(String iC105223) { this.iC105223 = iC105223; } public String getIC105223() { return iC105223; } public void setDC105736(String dC105736) { this.dC105736 = dC105736; } public String getDC105736() { return dC105736; } public void setDC105246(BigDecimal dC105246) { this.dC105246 = dC105246; } public BigDecimal getDC105246() { return dC105246; } public void setIC13109205(BigDecimal iC13109205) { this.iC13109205 = iC13109205; } public BigDecimal getIC13109205() { return iC13109205; } public void setIC13109305(BigDecimal iC13109305) { this.iC13109305 = iC13109305; } public BigDecimal getIC13109305() { return iC13109305; } public void setIC13109405(BigDecimal iC13109405) { this.iC13109405 = iC13109405; } public BigDecimal getIC13109405() { return iC13109405; } public String getParameterReport() { StringBuffer sb = new StringBuffer(); sb.append("c_rfceeog1a:"); sb.append(this.getCRfceeog1a()); sb.append(", "); sb.append("c_rfceeog1b:"); sb.append(this.getCRfceeog1b()); sb.append(", "); sb.append("n_periodo1:"); sb.append(this.getNPeriodo1()); sb.append("n_ejercic1:"); sb.append(this.getNEjercic1()); return sb.toString(); } }
[ "emmanuel.estrada@stksat.com" ]
emmanuel.estrada@stksat.com
af43089055d20224f786aa6d2d14d8221fccb695
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
/dms/src/main/java/com/jdcloud/sdk/service/dms/client/GeneralCreateViewExecutor.java
515076bc73fdc9b14ebbe3c629c22dece6f6833d
[ "Apache-2.0" ]
permissive
jdcloud-api/jdcloud-sdk-java
3fec9cf552693520f07b43a1e445954de60e34a0
bcebe28306c4ccc5b2b793e1a5848b0aac21b910
refs/heads/master
2023-07-25T07:03:36.682248
2023-07-25T06:54:39
2023-07-25T06:54:39
126,275,669
47
61
Apache-2.0
2023-09-07T08:41:24
2018-03-22T03:41:41
Java
UTF-8
Java
false
false
1,381
java
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * DmsView * 视图相关接口 * * OpenAPI spec version: v1 * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.dms.client; import com.jdcloud.sdk.client.JdcloudExecutor; import com.jdcloud.sdk.service.JdcloudResponse; import com.jdcloud.sdk.service.dms.model.GeneralCreateViewResponse; /** * 生产创建视图SQL语句,支持Mysql */ class GeneralCreateViewExecutor extends JdcloudExecutor { @Override public String method() { return "POST"; } @Override public String url() { return "/regions/{regionId}/view:generalCreate"; } @Override public Class<? extends JdcloudResponse> returnType() { return GeneralCreateViewResponse.class; } }
[ "jdcloud-api@jd.com" ]
jdcloud-api@jd.com
51f3359f10ab37ecc7323200c5edf626a3e45195
9bfcb31bdd532e817a5d162a8d7047048736d70e
/app/src/main/java/com/zhongan/demo/hxin/activitys/HXLoanMoneyDetailActivity.java
e4f124c3ed00b506f20e96ffe9ec7dfd5cd00260
[]
no_license
fsh596847/youyuDemo
998918b21647d53700177b23aa48ae79bbd68d37
55a3c1f59671cfb01a6c0166a7ec264fa0ba226b
refs/heads/master
2021-08-28T23:11:47.463407
2017-12-13T07:59:46
2017-12-13T07:59:46
111,054,710
0
0
null
null
null
null
UTF-8
Java
false
false
4,629
java
package com.zhongan.demo.hxin.activitys; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.zhongan.demo.R; import com.zhongan.demo.hxin.HXBaseActivity; import com.zhongan.demo.hxin.bean.HXLoanMoneyListItemBean; import com.zhongan.demo.hxin.util.Contants; import com.zhongan.demo.hxin.util.SysUtil; /** * 借款详情界面 */ public class HXLoanMoneyDetailActivity extends HXBaseActivity implements OnClickListener { private View mStatusView;//设置顶部标题栏距手机屏幕顶部距离为状态栏高度,防止状态栏遮挡 private Button mBackBtn; private TextView mTitleView,mLoanYinhangTv,mPayYinhangTv,mDayLilvTv, mStartEndDateTv,mLoanNumTv,mNotPayLilvTv,mPayStateTv,mNotPayNumTv,mNotPayLixiTv,mNotPayShouxufeiTv,mCurrentPaydateTv,mLookHetongBtn; private HXLoanMoneyListItemBean loanItem; @Override @SuppressLint("NewApi") protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.hxactivity_loan_money_detail_layout); Bundle bundle=getIntent().getBundleExtra("loanData"); loanItem=(HXLoanMoneyListItemBean) bundle.getSerializable("loanMeneyListItem"); initViews(); } private void initViews() { mStatusView=findViewById(R.id.status_bar_view); int statusHeight= SysUtil.getStatusBarHeight(this); LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mStatusView.getLayoutParams(); params.height=statusHeight; mStatusView.setLayoutParams(params); mBackBtn=(Button) findViewById(R.id.left_btn); mTitleView=(TextView) findViewById(R.id.center_title); mTitleView.setText(R.string.loan_money_detail_text); mBackBtn.setOnClickListener(this); mLoanNumTv=(TextView) findViewById(R.id.pay_money_loan_num_tv);//贷款金额 mLoanNumTv.setText(loanItem.getContractAmt()+"(元)"); mStartEndDateTv=(TextView) findViewById(R.id.pay_money_start_end_date_tv);//起止时间 mStartEndDateTv.setText(loanItem.getStartDate()+"~"+loanItem.getExpirationDate()); mDayLilvTv=(TextView) findViewById(R.id.pay_money_lilv_day_tv);//日利率 mDayLilvTv.setText(loanItem.getDayRate()+"%"); mPayYinhangTv=(TextView) findViewById(R.id.pay_money_pay_yanhang_tv);//还款银行 mPayYinhangTv.setText(loanItem.getPayBankName()+" "+loanItem.getPayBankType()+" ("+loanItem.getPayBankAcct()+")"); mLoanYinhangTv=(TextView) findViewById(R.id.pay_money_loan_yinhang_tv);//放款银行 mLoanYinhangTv.setText(loanItem.getLoanBank()); mNotPayLilvTv=(TextView) findViewById(R.id.pay_money_yuqililv_tv);//逾期利率 mNotPayLilvTv.setText(loanItem.getContractOverdueRate()+"%"); mPayStateTv=(TextView) findViewById(R.id.pay_money_loan_state_tv);//借款状态 mLookHetongBtn=(TextView) findViewById(R.id.pay_money_look_hetong_tv); mLookHetongBtn.setOnClickListener(this); String str=""; if(loanItem.getLoanStatus().equals("3")) { str="已还清"; } else if(loanItem.getLoanStatus().equals("7")) { str="已逾期"; }else { str="未还清"; } str=str+ " ("+loanItem.getCurrentPeriod()+"/"+loanItem.getContractTerm()+")"; mPayStateTv.setText(str); mNotPayNumTv=(TextView) findViewById(R.id.pay_money_not_pay_num_tv);//未还余额 mNotPayNumTv.setText(loanItem.getNotPayPrincipal()+"(元)"); mNotPayLixiTv=(TextView) findViewById(R.id.pay_money_not_pay_lixi_tv);//未还利息 mNotPayLixiTv.setText(loanItem.getNotPayInterest()+"(元)"); mNotPayShouxufeiTv=(TextView) findViewById(R.id.pay_money_not_pay_shouxufei_tv);//未还手续费 mNotPayShouxufeiTv.setText(loanItem.getNotPayFee()+"(元)"); mCurrentPaydateTv=(TextView) findViewById(R.id.pay_money_current_pay_date_tv);//当前还款时间 mCurrentPaydateTv.setText(loanItem.getCurrentEndDate()); } @Override public void onClick(View view) { // TODO Auto-generated method stub switch (view.getId()) { case R.id.left_btn: //返回 HXLoanMoneyDetailActivity.this.finish(); break; case R.id.pay_money_look_hetong_tv: String contractURL=loanItem.getContractUrl(); Intent useLinesIntent=new Intent(HXLoanMoneyDetailActivity.this,HXUserLineActivity.class); useLinesIntent.putExtra("title", "查看合同"); useLinesIntent.putExtra("url", Contants.BASE_URL+contractURL); startActivity(useLinesIntent); break; default: break; } } }
[ "fsh596847@163.com" ]
fsh596847@163.com
642206e6892e02f5304cc16940ee2e1c5c4a95f1
ea4da81a69a300624a46fce9e64904391c37267c
/src/main/java/com/alipay/api/domain/AlipayUserInviteOfflinedetailQueryModel.java
bee11b68af8efdf7c89af6f0fb995bf3aad42464
[ "Apache-2.0" ]
permissive
shiwei1024/alipay-sdk-java-all
741cc3cb8cf757292b657ce05958ff9ad8ecf582
d6a051fd47836c719a756607e6f84fee2b26ecb4
refs/heads/master
2022-12-29T18:46:53.195585
2020-10-09T06:34:30
2020-10-09T06:34:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,969
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 线下拉新结算明细数据查询 * * @author auto create * @since 1.0, 2019-12-17 11:38:45 */ public class AlipayUserInviteOfflinedetailQueryModel extends AlipayObject { private static final long serialVersionUID = 5867823321561455542L; /** * 页号 */ @ApiField("page") private Long page; /** * 页大小,page_size上限500,当大于500时,最多返回500条记录 */ @ApiField("page_size") private Long pageSize; /** * 二级渠道 */ @ApiField("partner_id") private String partnerId; /** * 一级渠道 */ @ApiField("pid") private String pid; /** * 日期 */ @ApiField("report_date") private String reportDate; /** * 参数名task_id,提供给商户按不同的线下拉新任务类型查询任务完成报表,当前枚举值有:xianxia001,xianxia002,xianxia_super,xianxia_bank。获取方式:该API仅提供给KA商户使用,接入时由运营沟通该参数如何使用。 */ @ApiField("task_id") private String taskId; public Long getPage() { return this.page; } public void setPage(Long page) { this.page = page; } public Long getPageSize() { return this.pageSize; } public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public String getPartnerId() { return this.partnerId; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } public String getPid() { return this.pid; } public void setPid(String pid) { this.pid = pid; } public String getReportDate() { return this.reportDate; } public void setReportDate(String reportDate) { this.reportDate = reportDate; } public String getTaskId() { return this.taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
2941336acaf466c450a8db0af3316b16c098af1e
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
/CodeComment_Data/Code_Jam/val/Magic_Trick/S/MagicTrick(1802).java
fbf8e92bd6fb44ec7f9852db13adb15fb65fd22a
[]
no_license
yxh-y/code_comment_generation
8367b355195a8828a27aac92b3c738564587d36f
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
refs/heads/master
2021-09-28T18:52:40.660282
2018-11-19T14:54:56
2018-11-19T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,406
java
package methodEmbedding.Magic_Trick.S.LYD1776; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.PrintStream; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class MagicTrick { public static void main(String[] args) { try { Scanner in = new Scanner(new File("a.txt")); PrintStream out = new PrintStream("out.txt"); int n = in.nextInt(); for (int i=0; i<n; i++) { int row1 = in.nextInt()-1; Set<Integer> set1 = new HashSet<Integer>(); Set<Integer> set2 = new HashSet<Integer>(); for (int j=0; j<16; j++) { int num = in.nextInt(); if (j>=4*row1 && j<4*(row1+1)) { set1.add(num); } } //System.out.println("Set1" + set1); int row2 = in.nextInt()-1; for (int j=0; j<16; j++) { int num = in.nextInt(); if (j>=4*row2 && j<4*(row2+1)) { set2.add(num); } } //System.out.println("Set2" + set2); int count = 0; int guess = 0; for (int number: set1) { if (set2.contains(number)) { count++; guess = number; } } out.print(String.format("Case #%s: ", i+1)); if (count==1) out.println(guess); else if (count==0) out.println("Volunteer Cheated!"); else out.println("Bad Magician!"); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "liangyuding@sjtu.edu.cn" ]
liangyuding@sjtu.edu.cn
605214e5de1c433fdb23746826c7a8391a3a8e6b
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/64/org/apache/commons/math/linear/MatrixUtils_createBigMatrix_295.java
05b064f43838490d7fef45865c8a06d92b13852d
[]
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,496
java
org apach common math linear collect method oper matric version revis date matrix util matrixutil return link big matrix bigmatrix entri valu input arrai input arrai copi referenc param data input arrai real matrix realmatrix valu arrai illeg argument except illegalargumentexcept code data code rectangular row length empti null pointer except nullpointerexcept data deprec replac link creat field matrix createfieldmatrix field element fieldel deprec big matrix bigmatrix creat big matrix createbigmatrix string data big matrix impl bigmatriximpl data
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
3fe9d6d2bc542985ae8b6300c2706a5dc2b46d11
47a31099142d84028f2a80c165ee475ac900b6c2
/guava-tests/test/com/google/common/escape/ArrayBasedCharEscaperTest.java
a5537cb4a725f1e4218de4e032b74c74492bc561
[ "Apache-2.0" ]
permissive
orenwf/guava
dafff1c9956e37251c5c8907d60d2a03b46ec4b7
c10d013e1928cac2202813864f1e210f231a5d00
refs/heads/master
2020-04-28T19:45:11.638333
2016-07-06T15:51:35
2016-07-06T15:51:42
175,521,556
0
0
Apache-2.0
2019-03-14T00:46:54
2019-03-14T00:46:54
null
UTF-8
Java
false
false
3,517
java
/* * Copyright (C) 2009 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.google.common.escape; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.ImmutableMap; import com.google.common.escape.testing.EscaperAsserts; import junit.framework.TestCase; import java.io.IOException; import java.util.Map; /** * @author David Beaumont */ @GwtCompatible public class ArrayBasedCharEscaperTest extends TestCase { private static final Map<Character, String> NO_REPLACEMENTS = ImmutableMap.of(); private static final Map<Character, String> SIMPLE_REPLACEMENTS = ImmutableMap.of( '\n', "<newline>", '\t', "<tab>", '&', "<and>"); public void testSafeRange() throws IOException { // Basic escaping of unsafe chars (wrap them in {,}'s) CharEscaper wrappingEscaper = new ArrayBasedCharEscaper(NO_REPLACEMENTS, 'A', 'Z') { @Override protected char[] escapeUnsafe(char c) { return ("{" + c + "}").toCharArray(); } }; EscaperAsserts.assertBasic(wrappingEscaper); // '[' and '@' lie either side of [A-Z]. assertEquals("{[}FOO{@}BAR{]}", wrappingEscaper.escape("[FOO@BAR]")); } public void testSafeRange_maxLessThanMin() throws IOException { // Basic escaping of unsafe chars (wrap them in {,}'s) CharEscaper wrappingEscaper = new ArrayBasedCharEscaper(NO_REPLACEMENTS, 'Z', 'A') { @Override protected char[] escapeUnsafe(char c) { return ("{" + c + "}").toCharArray(); } }; EscaperAsserts.assertBasic(wrappingEscaper); // escape everything. assertEquals("{[}{F}{O}{O}{]}", wrappingEscaper.escape("[FOO]")); } public void testDeleteUnsafeChars() throws IOException { CharEscaper deletingEscaper = new ArrayBasedCharEscaper(NO_REPLACEMENTS, ' ', '~') { private final char[] noChars = new char[0]; @Override protected char[] escapeUnsafe(char c) { return noChars; } }; EscaperAsserts.assertBasic(deletingEscaper); assertEquals("Everything outside the printable ASCII range is deleted.", deletingEscaper.escape("\tEverything\0 outside the\uD800\uDC00 " + "printable ASCII \uFFFFrange is \u007Fdeleted.\n")); } public void testReplacementPriority() throws IOException { CharEscaper replacingEscaper = new ArrayBasedCharEscaper(SIMPLE_REPLACEMENTS, ' ', '~') { private final char[] unknown = new char[] { '?' }; @Override protected char[] escapeUnsafe(char c) { return unknown; } }; EscaperAsserts.assertBasic(replacingEscaper); // Replacements are applied first regardless of whether the character is in // the safe range or not ('&' is a safe char while '\t' and '\n' are not). assertEquals("<tab>Fish <and>? Chips?<newline>", replacingEscaper.escape("\tFish &\0 Chips\r\n")); } }
[ "cpovirk@google.com" ]
cpovirk@google.com