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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b6d23b03ba190eeb40a7f878fbc997badb5c9a1d
|
977e54fe78203de6f769a6c46321af0085a20a73
|
/faceye-code-api/src/main/java/com/faceye/component/clazz/repository/mongo/gen/PkgGenRepository.java
|
3b62b4f543d68d70558f5b77a7da8cd43fd28057
|
[] |
no_license
|
haipenge/faceye-code
|
33471eb2b23ad58906ef266134cff2001f0c2f73
|
2141ddb243152a9c44f443d22cd78c0fbfaca6e0
|
refs/heads/master
| 2020-04-06T06:25:45.475575
| 2018-09-13T01:51:01
| 2018-09-13T01:51:01
| 73,887,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 689
|
java
|
package com.faceye.component.clazz.repository.mongo.gen;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import com.faceye.component.clazz.entity.Pkg;
import com.faceye.feature.repository.mongo.BaseMongoRepository;
/**
* 模块:类管理->com.faceye.compoent.clazz.repository.mongo<br>
* 说明:<br>
* 实体:包名管理->com.faceye.component.clazz.entity.entity.Pkg 实体DAO<br>
* @author haipenge <br>
* 联系:haipenge@gmail.com<br>
* 创建日期:2016-7-4 10:33:01<br>
*/
public interface PkgGenRepository extends BaseMongoRepository<Pkg,Long> {
}/**@generate-repository-source@**/
|
[
"haipenge@gmail.com"
] |
haipenge@gmail.com
|
9052ee8e4e5bc070bbcf6d8d006dedc40b199483
|
79919453cc184a95a2c6e642963ee91eb312f9bc
|
/src/main/java/com/github/sutra/ehcachecollection/EhcacheMap.java
|
e39408f185bac34678ce1cc044dd7301655b0b7d
|
[
"BSD-2-Clause"
] |
permissive
|
sutra/ehcache-collection
|
100bc788036593fe6433f0c51f62dc1435b3a2a6
|
e82ad5c851ebf12f20523134f2f59b86dcd5366b
|
refs/heads/master
| 2021-01-21T02:30:56.252898
| 2014-05-14T19:34:05
| 2014-05-14T19:34:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,685
|
java
|
package com.github.sutra.ehcachecollection;
import java.io.Serializable;
import java.util.AbstractCollection;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;
/**
* <a href="http://ehcache.org">Ehcache</a> based implementation of the
* {@link Map} interface.
*
* <p>Does not support null key, but supports null values.</p>
*
* @author Sutra Zhou
*/
public class EhcacheMap<K extends Serializable, V extends Serializable>
extends AbstractMap<K, V>
implements Map<K, V>, Serializable {
private static final long serialVersionUID = 2014051301L;
private final class KeySet<E> extends AbstractSet<E> {
/**
* {@inheritDoc}
*/
@Override
public Iterator<E> iterator() {
return getKeys().iterator();
}
/**
* {@inheritDoc}
*/
@Override
public int size() {
return getKeys().size();
}
/**
* {@inheritDoc}
*/
@Override
public boolean remove(Object o) {
return cache.remove(o);
}
/**
* {@inheritDoc}
*/
@Override
public void clear() {
EhcacheMap.this.clear();
}
@SuppressWarnings("unchecked")
private List<E> getKeys() {
return cache.getKeys();
}
}
private final class Entry extends AbstractMap.SimpleEntry<K, V> {
private static final long serialVersionUID = 2014051301L;
public Entry(K key, V value) {
super(key, value);
}
/**
* {@inheritDoc}
*/
public V setValue(V value) {
super.setValue(value);
K key = getKey();
Element element = cache.get(key);
@SuppressWarnings("unchecked")
V previousValue = element != null ? (V) element.getObjectValue() : null;
cache.put(new Element(key, value));
return previousValue;
}
}
private final class EntrySet extends AbstractSet<Map.Entry<K, V>> {
/**
* {@inheritDoc}
*/
@Override
public Iterator<Map.Entry<K, V>> iterator() {
final Iterator<K> keyIterator = EhcacheMap.this.keySet().iterator();
return new Iterator<Map.Entry<K, V>>() {
private Map.Entry<K, V> currentEntry;
@Override
public boolean hasNext() {
return keyIterator.hasNext();
}
@Override
public Map.Entry<K, V> next() {
final K key = keyIterator.next();
final V value = get(key);
currentEntry = new Entry(key, value);
return currentEntry;
}
@Override
public void remove() {
if (currentEntry == null) {
throw new IllegalStateException();
}
EhcacheMap.this.remove(currentEntry.getKey());
}
};
}
/**
* {@inheritDoc}
*/
@Override
public int size() {
return EhcacheMap.this.size();
}
/**
* {@inheritDoc}
*/
@Override
public boolean remove(Object o) {
@SuppressWarnings("unchecked")
K key = ((Map.Entry<K, V>) o).getKey();
cache.remove(key);
return super.remove(o);
}
/**
* {@inheritDoc}
*/
@Override
public void clear() {
EhcacheMap.this.clear();
super.clear();
}
}
private final class Values extends AbstractCollection<V> {
/**
* {@inheritDoc}
*/
@Override
public Iterator<V> iterator() {
final Iterator<K> keyIterator = EhcacheMap.this.keySet().iterator();
return new Iterator<V>() {
private K currentKey;
@Override
public boolean hasNext() {
return keyIterator.hasNext();
}
@Override
public V next() {
currentKey = keyIterator.next();
return EhcacheMap.this.get(currentKey);
}
@Override
public void remove() {
if (currentKey == null) {
throw new IllegalStateException();
}
EhcacheMap.this.remove(currentKey);
}
};
}
/**
* {@inheritDoc}
*/
@Override
public int size() {
return EhcacheMap.this.size();
}
/**
* {@inheritDoc}
*/
@Override
public boolean remove(Object obj) {
Set<K> keysToRemove = new HashSet<K>();
Set<Map.Entry<K, V>> set = entrySet();
for (Map.Entry<K, V> entry : set) {
if (entry.getValue().equals(obj)) {
keysToRemove.add(entry.getKey());
}
}
for (K key : keysToRemove) {
EhcacheMap.this.remove(key);
}
return keysToRemove.size() > 0;
}
/**
* {@inheritDoc}
*/
@Override
public void clear() {
EhcacheMap.this.clear();
super.clear();
}
}
private final String cacheName;
private transient Ehcache cache;
public EhcacheMap(String cacheName) {
this.cacheName = cacheName;
this.cache = getCache(cacheName);
}
public EhcacheMap(Ehcache cache) {
this.cacheName = cache.getName();
this.cache = cache;
}
/**
* {@inheritDoc}
*/
public boolean isEmpty() {
return size() == 0;
}
/**
* {@inheritDoc}
*/
public boolean containsKey(Object key) {
return cache.get(key) != null;
}
/**
* {@inheritDoc}
*/
public boolean containsValue(Object value) {
return cache.isValueInCache(value);
}
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public V get(Object key) {
Element element = cache.get(key);
if (element != null) {
return (V) element.getObjectValue();
} else {
return null;
}
}
/**
* {@inheritDoc}
*/
public void clear() {
cache.removeAll();
}
/**
* {@inheritDoc}
*/
public Set<K> keySet() {
return new KeySet<K>();
}
/**
* {@inheritDoc}
*/
public Set<Map.Entry<K, V>> entrySet() {
return new EntrySet();
}
/**
* {@inheritDoc}
*/
public V put(K key, V value) {
final V oldValue = get(key);
cache.put(new Element(key, value));
return oldValue;
}
/**
* {@inheritDoc}
*/
public void putAll(Map<? extends K, ? extends V> m) {
for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) {
cache.put(new Element(entry.getKey(), entry.getValue()));
}
}
/**
* {@inheritDoc}
*/
public int size() {
return cache.getSize();
}
/**
* {@inheritDoc}
*/
public V remove(Object key) {
V value = get(key);
cache.remove(key);
return value;
}
/**
* {@inheritDoc}
*/
public Collection<V> values() {
return new Values();
}
/**
* Returns the cache with the specified name.
*
* @param cacheName the cache name.
* @return the cache with the specifie name.
*/
private Ehcache getCache(String cacheName) {
CacheManager cacheManager = CacheManager.create();
Ehcache cache = cacheManager.getCache(cacheName);
if (cache == null) {
throw new NullPointerException("Cache \"" + cacheName
+ "\" does not exist.");
}
return cache;
}
private Object readResolve() {
this.cache = getCache(cacheName);
return this;
}
}
|
[
"zhoushuqun@gmail.com"
] |
zhoushuqun@gmail.com
|
b2a8e33e533087ea1f5d5ff66bf922bd6792fe12
|
2f73a1a5dd8fa75f9f8bc99cf9397eb22b91c0ad
|
/src/main/java/com/yundao/tenant/app/dto/tag/TagReqDto.java
|
3ee56687acfcf049b5f6a2abaa9cd3506f9c4455
|
[] |
no_license
|
wucaiqiang/yundao-tenant_app
|
0efc99af366b8e6c7847f4858ecea7d09ed1e018
|
9a24d49aa102bb07bfea93737de0c7bec0e0bcb7
|
refs/heads/master
| 2021-08-30T14:57:41.797855
| 2017-12-18T10:48:11
| 2017-12-18T10:48:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 464
|
java
|
package com.yundao.tenant.app.dto.tag;
import com.yundao.tenant.app.dto.AbstractBasePageDto;
import io.swagger.annotations.ApiModelProperty;
public class TagReqDto extends AbstractBasePageDto {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty("模糊关键字关键字")
private String keyword;
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
}
|
[
"wucaiqiang@zcmall.com"
] |
wucaiqiang@zcmall.com
|
ea2db8a53482b196e65b14bce728809c1ac96381
|
fe75038d52067f1ee1051769ab347503ae01dff9
|
/bluemoutain-core/src/main/java/com/bluemoutain/web/support/ValidationMessage.java
|
1378421dc2c3d2094da1ebe304b525756197b6b1
|
[] |
no_license
|
kobejames88/bluemountain-web
|
9fe7463968553567b109ed4594beaa1ee434fefc
|
b31b94f6a63ded21a9d0197f88c3b909a38aa2e3
|
refs/heads/master
| 2020-03-28T16:00:52.621662
| 2018-09-14T13:59:43
| 2018-09-14T13:59:45
| 145,064,160
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,705
|
java
|
package com.bluemoutain.web.support;
import com.bluemoutain.utils.StringUtils;
import java.util.HashSet;
import java.util.Set;
/**
* 批量验证信息的消息处理
*/
public class ValidationMessage {
private String result = "";//验证结果
private Set<String> messages = new HashSet<String>();//验证信息
/**
* 初始化
*/
public ValidationMessage(){ }
/**
* 初始化,如果给出验证结果,则会自动拼接到导出文本中,例如:<br>
* result = “无法删除”<br>
* 导出信息为:“由于 ****,****等原因,无法删除”<br>
* 否则只返回原因:“****,****”
* @param result 验证结果
*/
public ValidationMessage(String result){
this.result = result;
}
/**
* 初始化
*/
public static ValidationMessage create(){
return new ValidationMessage();
}
/**
* 初始化,如果给出验证结果,则会自动拼接到导出文本中,例如:<br>
* result = “无法删除”<br>
* 导出信息为:“由于 ****,****等原因,无法删除”<br>
* 否则只返回原因:“****,****”
* @param result 验证结果
*/
public static ValidationMessage create(String result){
return new ValidationMessage(result);
}
/**
* 设置验证结果
* @param msgs 验证结果
* @return
*/
public ValidationMessage setResult(Object... results){
if(results == null || results.length == 0){
this.result = "";
return this;
}
if(results.length == 1){
this.result = results[0].toString();
return this;
}
StringBuilder builder = new StringBuilder();
for(Object r : results){
builder.append(r);
}
this.result = builder.toString();
return this;
}
/**
* 添加验证结果信息
* @param msgs 验证结果信息
* @return
*/
public ValidationMessage addMessage(String msg){
if(!StringUtils.isBlank(msg) && !messages.contains(msg)){
messages.add(msg);
}
return this;
}
/**
* 返回拼接后的字符串<br>
* 如果给出验证结果,则会自动拼接到导出文本中,例如:result = “无法删除”<br>
* 导出信息为:“由于 ****,****等原因,无法删除”<br>
* 否则只返回原因:“****,****”
* @return
*/
public String toMessage(){
if(messages == null || messages.size() == 0){
return "";
}
StringBuilder builder = null;
for(String msg : messages){
if(builder == null){
builder = new StringBuilder(StringUtils.isBlank(result)?"":"由于 ");
builder.append(msg);
}else{
builder.append(",").append(msg);
}
}
if(!StringUtils.isBlank(result)){
builder.append(" 原因,").append(result);
}
return builder.toString();
}
}
|
[
"1934615110@qq.com"
] |
1934615110@qq.com
|
fa9eafdd5a04f27f139ed3262f80e240b095cbff
|
c54979cd1e8b971cf0416a8fcf72b8b1cf72573f
|
/src/main/java/com/brain/config/JacksonConfiguration.java
|
4f5d5d87e912a85c4c2671c69898bd843d71efcf
|
[] |
no_license
|
BulkSecurityGeneratorProject/fisc
|
d1c743eb3c99dd9f1c879f4d6494c8cd10819206
|
80598bca9d2b37e52c40fd7d947d7376a0458715
|
refs/heads/master
| 2022-12-18T16:24:36.539662
| 2019-08-21T15:35:12
| 2019-08-21T15:35:12
| 296,603,894
| 0
| 0
| null | 2020-09-18T11:39:30
| 2020-09-18T11:39:29
| null |
UTF-8
|
Java
| false
| false
| 1,636
|
java
|
package com.brain.config;
import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.zalando.problem.ProblemModule;
import org.zalando.problem.violations.ConstraintViolationProblemModule;
@Configuration
public class JacksonConfiguration {
/**
* Support for Java date and time API.
* @return the corresponding Jackson module.
*/
@Bean
public JavaTimeModule javaTimeModule() {
return new JavaTimeModule();
}
@Bean
public Jdk8Module jdk8TimeModule() {
return new Jdk8Module();
}
/*
* Support for Hibernate types in Jackson.
*/
@Bean
public Hibernate5Module hibernate5Module() {
return new Hibernate5Module();
}
/*
* Jackson Afterburner module to speed up serialization/deserialization.
*/
@Bean
public AfterburnerModule afterburnerModule() {
return new AfterburnerModule();
}
/*
* Module for serialization/deserialization of RFC7807 Problem.
*/
@Bean
ProblemModule problemModule() {
return new ProblemModule();
}
/*
* Module for serialization/deserialization of ConstraintViolationProblem.
*/
@Bean
ConstraintViolationProblemModule constraintViolationProblemModule() {
return new ConstraintViolationProblemModule();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
a4239e35a864f7363ce406d36928290743f3654d
|
73458087c9a504dedc5acd84ecd63db5dfcd5ca1
|
/src/com/facebook/ads/internal/http/c.java
|
b2402560b37a876bd6353ec393381de1a5749954
|
[] |
no_license
|
jtap60/com.estr
|
99ff2a6dd07b02b41a9cc3c1d28bb6545e68fb27
|
8b70bf2da8b24c7cef5973744e6054ef972fc745
|
refs/heads/master
| 2020-04-14T02:12:20.424436
| 2018-12-30T10:56:45
| 2018-12-30T10:56:45
| 163,578,360
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,268
|
java
|
package com.facebook.ads.internal.http;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import java.io.IOException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.HttpResponseException;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.util.EntityUtils;
public class c
{
private Handler a;
public c()
{
if (Looper.myLooper() != null) {
a = new c.1(this);
}
}
protected Message a(int paramInt, Object paramObject)
{
if (a != null) {
return a.obtainMessage(paramInt, paramObject);
}
Message localMessage = Message.obtain();
what = paramInt;
obj = paramObject;
return localMessage;
}
public void a() {}
public void a(int paramInt, String paramString)
{
a(paramString);
}
protected void a(Message paramMessage)
{
switch (what)
{
default:
return;
case 0:
paramMessage = (Object[])obj;
c(((Integer)paramMessage[0]).intValue(), (String)paramMessage[1]);
return;
case 1:
paramMessage = (Object[])obj;
c((Throwable)paramMessage[0], (String)paramMessage[1]);
return;
case 2:
a();
return;
}
b();
}
public void a(String paramString) {}
public void a(Throwable paramThrowable) {}
public void a(Throwable paramThrowable, String paramString)
{
a(paramThrowable);
}
void a(HttpResponse paramHttpResponse)
{
Object localObject = null;
StatusLine localStatusLine = paramHttpResponse.getStatusLine();
try
{
HttpEntity localHttpEntity = paramHttpResponse.getEntity();
paramHttpResponse = (HttpResponse)localObject;
if (localHttpEntity != null) {
paramHttpResponse = EntityUtils.toString(new BufferedHttpEntity(localHttpEntity), "UTF-8");
}
}
catch (IOException paramHttpResponse)
{
for (;;)
{
b(paramHttpResponse, (String)null);
paramHttpResponse = (HttpResponse)localObject;
}
b(localStatusLine.getStatusCode(), paramHttpResponse);
}
if (localStatusLine.getStatusCode() >= 300)
{
b(new HttpResponseException(localStatusLine.getStatusCode(), localStatusLine.getReasonPhrase()), paramHttpResponse);
return;
}
}
public void b() {}
protected void b(int paramInt, String paramString)
{
b(a(0, new Object[] { Integer.valueOf(paramInt), paramString }));
}
protected void b(Message paramMessage)
{
if (a != null)
{
a.sendMessage(paramMessage);
return;
}
a(paramMessage);
}
protected void b(Throwable paramThrowable, String paramString)
{
b(a(1, new Object[] { paramThrowable, paramString }));
}
protected void c()
{
b(a(2, null));
}
protected void c(int paramInt, String paramString)
{
a(paramInt, paramString);
}
protected void c(Throwable paramThrowable, String paramString)
{
a(paramThrowable, paramString);
}
protected void d()
{
b(a(3, null));
}
}
/* Location:
* Qualified Name: com.facebook.ads.internal.http.c
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
93470fffc435f97efd51a189e53ce469f018210a
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/boot/svg/a/a/ahz.java
|
afcdecdc538158878859c70589917445a1660ee7
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,705
|
java
|
package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
public final class ahz extends c {
private final int height = 36;
private final int width = 46;
protected final int b(int i, Object... objArr) {
switch (i) {
case 0:
return 46;
case 1:
return 36;
case 2:
Canvas canvas = (Canvas) objArr[0];
Looper looper = (Looper) objArr[1];
Matrix f = c.f(looper);
float[] e = c.e(looper);
Paint i2 = c.i(looper);
i2.setFlags(385);
i2.setStyle(Style.FILL);
Paint i3 = c.i(looper);
i3.setFlags(385);
i3.setStyle(Style.STROKE);
i2.setColor(-16777216);
i3.setStrokeWidth(1.0f);
i3.setStrokeCap(Cap.BUTT);
i3.setStrokeJoin(Join.MITER);
i3.setStrokeMiter(4.0f);
i3.setPathEffect(null);
c.a(i3, looper).setStrokeWidth(1.0f);
canvas.save();
Paint a = c.a(i2, looper);
a.setColor(-9205837);
e = c.a(e, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f);
f.reset();
f.setValues(e);
canvas.concat(f);
canvas.save();
Paint a2 = c.a(a, looper);
Path j = c.j(looper);
j.moveTo(5.990267f, 0.0f);
j.lineTo(37.95505f, 0.0f);
j.cubicTo(40.559513f, 1.7584368f, 40.86003f, 5.144684f, 42.122192f, 7.797411f);
j.cubicTo(43.063805f, 10.480284f, 45.127342f, 13.555036f, 43.214066f, 16.308245f);
j.cubicTo(40.839996f, 20.166758f, 35.06009f, 19.654299f, 32.565815f, 16.187666f);
j.cubicTo(30.011436f, 19.634203f, 25.123058f, 19.86531f, 22.03777f, 17.021667f);
j.cubicTo(18.942465f, 19.87536f, 14.074121f, 19.614107f, 11.52976f, 16.187666f);
j.cubicTo(8.604748f, 20.4883f, 1.3122491f, 19.734684f, 0.0f, 14.459374f);
j.lineTo(0.0f, 12.891853f);
j.cubicTo(2.093588f, 8.671605f, 2.5744123f, 3.4264398f, 5.990267f, 0.0f);
j.lineTo(5.990267f, 0.0f);
j.close();
j.moveTo(7.0525346f, 3.0f);
j.cubicTo(5.7748885f, 6.6838603f, 4.008143f, 10.197542f, 3.0f, 13.971498f);
j.cubicTo(4.3075914f, 17.214895f, 8.759391f, 16.0737f, 9.617809f, 13.100585f);
j.cubicTo(10.8355665f, 13.080564f, 12.053323f, 13.020501f, 13.27108f, 12.910385f);
j.cubicTo(14.119516f, 14.65221f, 15.756501f, 16.48413f, 17.912529f, 15.883501f);
j.cubicTo(19.848963f, 15.112693f, 20.777252f, 13.00048f, 22.004992f, 11.4488535f);
j.cubicTo(23.402416f, 13.110595f, 24.47045f, 16.013638f, 27.025742f, 15.933554f);
j.cubicTo(28.902285f, 16.153784f, 29.750723f, 14.251791f, 30.698977f, 13.030511f);
j.lineTo(34.272392f, 13.030511f);
j.cubicTo(35.260574f, 15.923543f, 39.592594f, 17.315f, 41.0f, 13.981508f);
j.cubicTo(40.0218f, 10.207553f, 38.235092f, 6.6838603f, 36.96743f, 3.0f);
j.lineTo(7.0525346f, 3.0f);
j.lineTo(7.0525346f, 3.0f);
j.close();
WeChatSVGRenderC2Java.setFillType(j, 2);
canvas.drawPath(j, a2);
canvas.restore();
canvas.save();
a2 = c.a(a, looper);
j = c.j(looper);
j.moveTo(4.0f, 21.0f);
j.lineTo(7.0f, 21.0f);
j.cubicTo(6.99f, 25.0f, 7.01f, 29.0f, 7.0f, 33.0f);
j.cubicTo(17.0f, 32.99f, 27.0f, 32.99f, 37.0f, 33.0f);
j.cubicTo(36.99f, 29.0f, 37.01f, 25.0f, 37.0f, 21.0f);
j.lineTo(40.0f, 21.0f);
j.lineTo(40.0f, 36.0f);
j.lineTo(4.0f, 36.0f);
j.lineTo(4.0f, 21.0f);
j.lineTo(4.0f, 21.0f);
j.close();
WeChatSVGRenderC2Java.setFillType(j, 2);
canvas.drawPath(j, a2);
canvas.restore();
canvas.restore();
c.h(looper);
break;
}
return 0;
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
aaf7e031084ff107e683579687c1bbf4b600bb74
|
6324ba3857e09e1ff891dc547f05bb7c9ed6f449
|
/apps/speedcloud/services/core-parent/business/src/main/java/net/aicoder/speedcloud/business/deployscheme/dao/SchemeSpecification.java
|
fb9bf6cdf1945e5c5b42a118cf919b7b781051ef
|
[] |
no_license
|
ai-coders/devp
|
68a0431007ebd5796dbf48a321ee08ff2dd87708
|
9dfe34374048cea2e613fa01fd9f584c5090361d
|
refs/heads/master
| 2023-01-09T12:16:06.197363
| 2018-11-24T09:16:25
| 2018-11-24T09:16:25
| 134,250,514
| 0
| 2
| null | 2022-12-26T05:54:12
| 2018-05-21T09:53:00
|
Java
|
UTF-8
|
Java
| false
| false
| 5,276
|
java
|
package net.aicoder.speedcloud.business.deployscheme.dao;
import net.aicoder.speedcloud.business.deployscheme.domain.Scheme;
import net.aicoder.speedcloud.business.deployscheme.dto.SchemeCondition;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.jpa.domain.Specification;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.ArrayList;
import java.util.List;
public class SchemeSpecification implements Specification<Scheme>{
private SchemeCondition condition;
public SchemeSpecification(SchemeCondition condition){
this.condition = condition;
}
@Override
public Predicate toPredicate(Root<Scheme> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
List<Predicate> predicateList = new ArrayList<>();
if(condition==null){
return null;
}
tryAddTidPredicate(predicateList, root, cb);
tryAddNamePredicate(predicateList, root, cb);
tryAddCodePredicate(predicateList, root, cb);
tryAddAliasPredicate(predicateList, root, cb);
tryAddDescriptionPredicate(predicateList, root, cb);
tryAddTypePredicate(predicateList, root, cb);
tryAddVersionPredicate(predicateList, root, cb);
tryAddVerPostfixPredicate(predicateList, root, cb);
tryAddStatusPredicate(predicateList, root, cb);
tryAddNotesPredicate(predicateList, root, cb);
tryAddProjectPredicate(predicateList, root, cb);
tryAddEnvPredicate(predicateList, root, cb);
Predicate[] pre = new Predicate[predicateList.size()];
pre = predicateList.toArray(pre);
return cb.and(pre);
}
private void tryAddTidPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if (null != condition.getTid() ) {
predicateList.add(cb.equal(root.get(Scheme.PROPERTY_TID).as(Long.class), condition.getTid()));
}
if (null != condition.getTidMax() ) {
predicateList.add(cb.greaterThanOrEqualTo(root.get(Scheme.PROPERTY_TID).as(Long.class), condition.getTidMax()));
}
if (null != condition.getTidMin() ) {
predicateList.add(cb.lessThan(root.get(Scheme.PROPERTY_TID).as(Long.class), condition.getTidMin()));
}
}
private void tryAddNamePredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getName())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_NAME).as(String.class), "%"+condition.getName()+"%"));
}
}
private void tryAddCodePredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getCode())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_CODE).as(String.class), "%"+condition.getCode()+"%"));
}
}
private void tryAddAliasPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getAlias())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_ALIAS).as(String.class), "%"+condition.getAlias()+"%"));
}
}
private void tryAddDescriptionPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getDescription())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_DESCRIPTION).as(String.class), "%"+condition.getDescription()+"%"));
}
}
private void tryAddTypePredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getType())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_TYPE).as(String.class), "%"+condition.getType()+"%"));
}
}
private void tryAddVersionPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getVersion())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_VERSION).as(String.class), "%"+condition.getVersion()+"%"));
}
}
private void tryAddVerPostfixPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getVerPostfix())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_VER_POSTFIX).as(String.class), "%"+condition.getVerPostfix()+"%"));
}
}
private void tryAddStatusPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if (null != condition.getStatus() ) {
predicateList.add(cb.equal(root.get(Scheme.PROPERTY_STATUS).as(Boolean.class), condition.getStatus()));
}
}
private void tryAddNotesPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if(StringUtils.isNotEmpty(condition.getNotes())){
predicateList.add(cb.like(root.get(Scheme.PROPERTY_NOTES).as(String.class), "%"+condition.getNotes()+"%"));
}
}
private void tryAddProjectPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if (null != condition.getProject() ) {
predicateList.add(cb.equal(root.get(Scheme.PROPERTY_PROJECT).as(Long.class), condition.getProject()));
}
}
private void tryAddEnvPredicate(List<Predicate> predicateList, Root<Scheme> root, CriteriaBuilder cb){
if (null != condition.getEnv() ) {
predicateList.add(cb.equal(root.get(Scheme.PROPERTY_ENV).as(Long.class), condition.getEnv()));
}
}
}
|
[
"13962217@qq.com"
] |
13962217@qq.com
|
d99e03e9b11fc11dc72282c09fa278e47d733b0c
|
6c665d8a543eb920d85659599dcfd32032743b74
|
/BuddhistOfDesignPatternInJava/src/35、工厂方法模式+策略模式/factory_strategy/src/com/company/DeductionFacade.java
|
75758a601a5fbc57efc05eae7f0bdf4a375abbc8
|
[] |
no_license
|
teddyzhang1976/YanMoDesignPatternCode
|
2ee449ebdfa0442c0fa25fe1143315d64824a307
|
7055d3dc188d35b59d126c4ce4db72d011dc3aab
|
refs/heads/master
| 2021-01-22T17:29:56.486877
| 2016-07-11T14:59:08
| 2016-07-11T14:59:08
| 60,745,749
| 1
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 852
|
java
|
package com.company;
/**
* @author cbf4Life cbf4life@126.com
* I'm glad to share my knowledge with you all.
*/
public class DeductionFacade {
//对外公布的扣款信息
public static Card deduct(Card card,Trade trade){
//获得消费策略
StrategyMan reg = getDeductionType(trade);
//初始化一个消费策略对象
IDeduction deduction = StrategyFactory.getDeduction(reg);
//产生一个策略上下问
DeductionContext context = new DeductionContext(deduction);
//进行扣款处理
context.exec(card, trade);
//返回扣款处理完毕后的数据
return card;
}
//获得对应的商户消费策略
private static StrategyMan getDeductionType(Trade trade){
//模拟操作
if(trade.getTradeNo().contains("abc")){
return StrategyMan.FreeDeduction;
}else{
return StrategyMan.SteadyDeduction;
}
}
}
|
[
"teddy@fic-sh.com.cn"
] |
teddy@fic-sh.com.cn
|
21637b46bbd8ae0083440fa5ae274e2ba1b5ff2c
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/Mate20-9.0/src/main/java/vendor/huawei/hardware/qcomradio/V1_0/RILUICCAUTHRESPSTATUSTYPEENUM.java
|
b3e7b7fe90559ddf18a7b6fce7e1392117dadcaa
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,378
|
java
|
package vendor.huawei.hardware.qcomradio.V1_0;
import java.util.ArrayList;
public final class RILUICCAUTHRESPSTATUSTYPEENUM {
public static final int AUTH_RESP_FAIL = 1;
public static final int AUTH_RESP_SUCCESS = 0;
public static final int AUTH_RESP_SYNC_FAIL = 2;
public static final int AUTH_RESP_UNSUPPORTED = 3;
public static final String toString(int o) {
if (o == 0) {
return "AUTH_RESP_SUCCESS";
}
if (o == 1) {
return "AUTH_RESP_FAIL";
}
if (o == 2) {
return "AUTH_RESP_SYNC_FAIL";
}
if (o == 3) {
return "AUTH_RESP_UNSUPPORTED";
}
return "0x" + Integer.toHexString(o);
}
public static final String dumpBitfield(int o) {
ArrayList<String> list = new ArrayList<>();
int flipped = 0;
list.add("AUTH_RESP_SUCCESS");
if ((o & 1) == 1) {
list.add("AUTH_RESP_FAIL");
flipped = 0 | 1;
}
if ((o & 2) == 2) {
list.add("AUTH_RESP_SYNC_FAIL");
flipped |= 2;
}
if ((o & 3) == 3) {
list.add("AUTH_RESP_UNSUPPORTED");
flipped |= 3;
}
if (o != flipped) {
list.add("0x" + Integer.toHexString((~flipped) & o));
}
return String.join(" | ", list);
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
2f5dafcb7c084689ba9e3c431d0d0ec1286f124e
|
66f43e390ff07ad62d1bafb6933e74808ed4b848
|
/src/main/java/ch/rasc/e4desk/util/DateTimeDeserializer.java
|
ca867e682e4311a2f47059e26c9c3c7261d0afbf
|
[] |
no_license
|
mariianikonova/e4ds-desktop
|
97d1edd606cfabee55959ab8829c7b6270ce33ed
|
6b7ba43dfc7e68a716ab097076d354db91e261d5
|
refs/heads/master
| 2021-01-24T23:01:15.091720
| 2014-03-18T05:57:15
| 2014-03-18T05:57:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 770
|
java
|
package ch.rasc.e4desk.util;
import java.io.IOException;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
public class DateTimeDeserializer extends JsonDeserializer<DateTime> {
private final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm").withZoneUTC();
@Override
public DateTime deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
return DateTime.parse(jp.getText(), formatter);
}
}
|
[
"ralphschaer@gmail.com"
] |
ralphschaer@gmail.com
|
5f9ad1c47c0562c9d92b8f7368e92e7504f73c0d
|
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
|
/Common/FO/fo-jar/fo-withdraw/src/main/java/com/pay/fundout/withdraw/service/reviewfofile/impl/CCBReviewFoFileServiceImpl.java
|
a9b48a0b7992357689adc1bb602704ed9efd32ff
|
[] |
no_license
|
happyjianguo/pay-1
|
8631906be62707316f0ed3eb6b2337c90d213bc0
|
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
|
refs/heads/master
| 2020-07-27T19:51:54.958859
| 2016-12-19T07:34:24
| 2016-12-19T07:34:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,172
|
java
|
package com.pay.fundout.withdraw.service.reviewfofile.impl;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.IOUtils;
import com.pay.fundout.withdraw.service.reviewfofile.AbstractReviewFoFileService;
import com.pay.fundout.withdraw.service.reviewfofile.dto.ReviewFoFileDTO;
/**
* @author lIWEI
* @Date 2011-4-15
* @Description 建设银行文件解析器
* @Copyright Copyright (c) 2004-2013 pay.com . All rights reserved. 版权所有
*/
public class CCBReviewFoFileServiceImpl extends AbstractReviewFoFileService {
/* (non-Javadoc)
* @see com.pay.fundout.withdraw.service.reviewfofile.AbstractReviewFoFileService#parserImportFile(java.io.InputStream)
*/
@Override
protected List<ReviewFoFileDTO> parserImportFile(InputStream inputStream) {
final BufferedReader buffered = new BufferedReader(new InputStreamReader(inputStream));//导入文件的缓冲流
String line;//文件的当前行
final List<ReviewFoFileDTO> reviewFoFileDTOs = new ArrayList<ReviewFoFileDTO>();//解析结果
try {
line = buffered.readLine();
line = buffered.readLine();
while (line != null && line.length() != 0) {
String[] lineArray = line.split("\\|");
ReviewFoFileDTO reviewFoFileDTO = new ReviewFoFileDTO();
reviewFoFileDTO.setUsage("");//附言用途,含订单流水
reviewFoFileDTO.setAmount(new BigDecimal(lineArray[0]));//金额
reviewFoFileDTO.setPayeeAccountNo(lineArray[2]);//收款人账号
reviewFoFileDTO.setPayeeName(lineArray[3]);//收款人名称
reviewFoFileDTOs.add(reviewFoFileDTO);
line = buffered.readLine();
}
} catch (IOException e) {
e.printStackTrace();
}finally{
IOUtils.closeQuietly(buffered);
IOUtils.closeQuietly(inputStream);
}
return reviewFoFileDTOs;
}
/* (non-Javadoc)
* @see com.pay.fundout.withdraw.service.reviewfofile.AbstractReviewFoFileService#parserLoadLocalFile(java.io.InputStream)
*/
@Override
protected List<ReviewFoFileDTO> parserLoadLocalFile(InputStream inputStream) {
final BufferedReader buffered = new BufferedReader(new InputStreamReader(inputStream));//本地文件的缓冲流
String line;//文件的当前行
final List<ReviewFoFileDTO> reviewFoFileDTOs = new ArrayList<ReviewFoFileDTO>();//解析结果
try {
line = buffered.readLine();
line = buffered.readLine();
while (line != null && line.length() != 0) {
String[] lineArray = line.split("\\|");
ReviewFoFileDTO reviewFoFileDTO = new ReviewFoFileDTO();
reviewFoFileDTO.setUsage("");//附言用途,含订单流水
reviewFoFileDTO.setAmount(new BigDecimal(lineArray[0]));//金额
reviewFoFileDTO.setPayeeAccountNo(lineArray[2]);//收款人账号
reviewFoFileDTO.setPayeeName(lineArray[3]);//收款人名称
reviewFoFileDTOs.add(reviewFoFileDTO);
line = buffered.readLine();
}
} catch (IOException e) {
e.printStackTrace();
}finally{
IOUtils.closeQuietly(buffered);
IOUtils.closeQuietly(inputStream);
}
return reviewFoFileDTOs;
}
}
|
[
"stanley.zou@hrocloud.com"
] |
stanley.zou@hrocloud.com
|
c1f697544f4ebb18ed1b9303018f0c267b585cc7
|
7d737b32017ac0492c1b28c423f8913a62242fb9
|
/app/src/main/java/com/example/administrator/idlereader/utils/klog/XmlLog.java
|
4c778aaf1a022fce84bb97a9ec5e963001cc67e1
|
[] |
no_license
|
Huigesi/IdleReader
|
97ca00ddc2d4b54fec76ab753b9c5c3415450787
|
d1a25c775e9917bb4f133fe40020277b37bff5b0
|
refs/heads/master
| 2020-03-25T01:23:15.290571
| 2018-09-25T12:12:14
| 2018-09-25T12:12:14
| 134,377,129
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,731
|
java
|
package com.example.administrator.idlereader.utils.klog;
import android.util.Log;
import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
/**
* Created by zhaokaiqiang on 15/11/18.
*/
public class XmlLog {
public static void printXml(String tag, String xml, String headString) {
if (xml != null) {
xml = XmlLog.formatXML(xml);
xml = headString + "\n" + xml;
} else {
xml = headString + KLog.NULL_TIPS;
}
Util.printLine(tag, true);
String[] lines = xml.split(KLog.LINE_SEPARATOR);
for (String line : lines) {
if (!Util.isEmpty(line)) {
Log.d(tag, "║ " + line);
}
}
Util.printLine(tag, false);
}
public static String formatXML(String inputXML) {
try {
Source xmlInput = new StreamSource(new StringReader(inputXML));
StreamResult xmlOutput = new StreamResult(new StringWriter());
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.transform(xmlInput, xmlOutput);
return xmlOutput.getWriter().toString().replaceFirst(">", ">\n");
} catch (Exception e) {
e.printStackTrace();
return inputXML;
}
}
}
|
[
"791339970@qq.com"
] |
791339970@qq.com
|
8a84756b5c0adaa2e6d17f2e5fb7d1a0626e669b
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/kotlinx/coroutines/internal/C13104k.java
|
1f3431484f2da8d812be02ec4747c0ba9d79e757
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 197
|
java
|
package kotlinx.coroutines.internal;
/* renamed from: kotlinx.coroutines.internal.k */
public abstract class C13104k {
/* renamed from: a */
public abstract Object mo37580a(Object obj);
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
1f79dc612e817d0f4a0c8f081a230cd858eb21ce
|
22ca777d5fb55d7270f5b7b12af409e42721d4fa
|
/src/main/java/com/basic/leetcode/Solution53.java
|
f96f4abcd052dc05fd4cdb6a014dcdbd8265f8a1
|
[] |
no_license
|
Yommmm/Java-Basic
|
73d1f8ef59ba6186f7169f0dd885cbe7a21d2094
|
fec3793a1284ac53676daf71547f53469b33e042
|
refs/heads/master
| 2021-05-26T05:14:27.590319
| 2020-05-15T15:43:04
| 2020-05-15T15:43:04
| 127,542,927
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,189
|
java
|
package com.basic.leetcode;
/**
* 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。
* <p>
* 示例:
* <p>
* 输入: [-2,1,-3,4,-1,2,1,-5,4],
* 输出: 6
* 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6。
* 进阶:
* <p>
* 如果你已经实现复杂度为 O(n) 的解法,尝试使用更为精妙的分治法求解。
* <p>
* 来源:力扣(LeetCode)
* 链接:https://leetcode-cn.com/problems/maximum-subarray
* 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
public class Solution53 {
public static void main(String[] args) {
Solution53 solution = new Solution53();
System.out.println(solution.maxSubArray(new int[]{-1, 1, 2, 3, -1, 4, 5, 0, 0, 0, 0, 0}));
}
public int maxSubArray(int[] nums) {
int ans = nums[0];
int sum = 0;
for (int num : nums) {
if (sum > 0) {
sum += num;
} else {
sum = num;
}
ans = Math.max(ans, sum);
}
return ans;
}
}
|
[
"yangzhiwen@chalco-steering.com"
] |
yangzhiwen@chalco-steering.com
|
38dc4ea28ae386739c3e6779e0ba78013c8e318d
|
d855638c0d2c86c89d58f69d788d08bf1ede752e
|
/manufacturing-core/src/main/java/com/walrus/manufacturing/core/config/CorsConfig.java
|
568a7b2dd672a51e5b0a561c4afb604632fe1fd7
|
[] |
no_license
|
coco-iot/walrus-intelligent-manufacturing
|
2290008ca933408b1063ca61b8e3a50b2e5e2162
|
62b7303d2d9edc1081c51932cd333cf8a00ef3ed
|
refs/heads/master
| 2022-12-14T08:50:55.199833
| 2020-09-25T10:35:34
| 2020-09-25T10:35:34
| 297,271,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,205
|
java
|
package com.walrus.manufacturing.core.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
@Configuration
public class CorsConfig {
// 当前跨域请求最大有效时长。这里默认30天
private long maxAge = 30 * 24 * 60 * 60;
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.addAllowedOrigin("*"); // 1 设置访问源地址
corsConfiguration.addAllowedHeader("*"); // 2 设置访问源请求头
corsConfiguration.addAllowedMethod("*"); // 3 设置访问源请求方法
corsConfiguration.setMaxAge(maxAge);
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", buildConfig()); // 4 对接口配置跨域设置
return new CorsFilter(source);
}
}
|
[
"zhangchunsheng423@gmail.com"
] |
zhangchunsheng423@gmail.com
|
3691551d655178ef81da81c3cdd08400cdc6d19e
|
4af034492bad7e1ad6cdcc589701dddeda915b27
|
/src/test/java/org/apache/ibatis/submitted/xml_references/EnumWithOgnlTest.java
|
887e8d7168aaa7762b96a72abd4e84955faa5209
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
gm504117608/guomin-mybatis
|
7b3d013a26e20595c6058148a3e2eca2fb076ea3
|
5917d9d5d6876e19b15090026ab84ddd71a641bb
|
refs/heads/master
| 2021-01-20T12:31:00.307088
| 2017-03-09T10:10:17
| 2017-03-09T10:10:17
| 82,660,102
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,539
|
java
|
/**
* Copyright 2009-2015 the original author or authors.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.submitted.xml_references;
import java.io.Reader;
import java.util.Properties;
import org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.mapping.Environment;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.ibatis.session.defaults.DefaultSqlSessionFactory;
import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory;
import org.junit.Test;
public class EnumWithOgnlTest {
@Test
public void testConfiguration() {
UnpooledDataSourceFactory dataSourceFactory = new UnpooledDataSourceFactory();
Properties dataSourceProperties = new Properties();
dataSourceProperties.put("driver", "org.hsqldb.jdbcDriver");
dataSourceProperties.put("url", "jdbc:hsqldb:mem:xml_references");
dataSourceProperties.put("username", "sa");
dataSourceFactory.setProperties(dataSourceProperties);
Environment environment = new Environment("test", new JdbcTransactionFactory(), dataSourceFactory.getDataSource());
Configuration configuration = new Configuration();
configuration.setEnvironment(environment);
configuration.getTypeAliasRegistry().registerAlias(Person.class);
configuration.addMapper(PersonMapper.class);
configuration.addMapper(PersonMapper2.class);
new DefaultSqlSessionFactory(configuration);
}
@Test
public void testMixedConfiguration() throws Exception {
Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/xml_references/ibatisConfig.xml");
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
sqlSessionFactory.getConfiguration().addMapper(PersonMapper2.class);
}
}
|
[
"504117608@qq.com"
] |
504117608@qq.com
|
b399192c6c03f6ee545dac84669f468525dda1a3
|
e3f50a97b37dc5c1415b2d0348564ceb78832698
|
/1909 NSA Codebreaker Challenge/terrortime_jadx/java/org/jivesoftware/smackx/bookmarks/BookmarkedURL.java
|
c40a0c4b9a61865c3a50956b99b86445dd6613c9
|
[] |
no_license
|
sears-s/ctf
|
b8d13f121deb43189487b168a68f18dfc5538212
|
c0e5960b1b975ba7073dae28b0c0f28a6eab563e
|
refs/heads/master
| 2021-07-26T21:12:01.384166
| 2021-06-29T04:42:52
| 2021-06-29T04:42:52
| 145,129,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,367
|
java
|
package org.jivesoftware.smackx.bookmarks;
public class BookmarkedURL implements SharedBookmark {
private final String URL;
private boolean isRss;
private boolean isShared;
private String name;
protected BookmarkedURL(String URL2) {
this.URL = URL2;
}
protected BookmarkedURL(String URL2, String name2, boolean isRss2) {
this.URL = URL2;
this.name = name2;
this.isRss = isRss2;
}
public String getName() {
return this.name;
}
/* access modifiers changed from: protected */
public void setName(String name2) {
this.name = name2;
}
public String getURL() {
return this.URL;
}
/* access modifiers changed from: protected */
public void setRss(boolean isRss2) {
this.isRss = isRss2;
}
public boolean isRss() {
return this.isRss;
}
public boolean equals(Object obj) {
if (!(obj instanceof BookmarkedURL)) {
return false;
}
return ((BookmarkedURL) obj).getURL().equalsIgnoreCase(this.URL);
}
public int hashCode() {
return getURL().hashCode();
}
/* access modifiers changed from: protected */
public void setShared(boolean shared) {
this.isShared = shared;
}
public boolean isShared() {
return this.isShared;
}
}
|
[
"sears-s@users.noreply.github.com"
] |
sears-s@users.noreply.github.com
|
3509d73f4f6a59f82e5af62a953295b902c89d0b
|
2689de62f081865574fb81dc45926ea3d07771ad
|
/src/main/java/vdb/mydb/jdbc/LocalHsqlDataSource.java
|
94e1362fa95bbc9548b91c63de8dc3fd062f8d08
|
[
"BSD-2-Clause"
] |
permissive
|
cas-bigdatalab/vdb2020
|
e7efaed6b71b5e5604e9aa7396ce59025e375a83
|
ec08d687ae41bc94f04b6a56c05dfa6db226a8a3
|
refs/heads/master
| 2022-07-21T04:57:47.857759
| 2019-05-27T09:13:00
| 2019-05-27T09:18:50
| 159,260,460
| 0
| 0
|
BSD-2-Clause
| 2022-06-29T19:32:23
| 2018-11-27T01:58:57
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,002
|
java
|
package vdb.mydb.jdbc;
import java.io.File;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.Properties;
import java.util.logging.Logger;
import javax.sql.DataSource;
import org.apache.commons.dbcp.BasicDataSourceFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
public class LocalHsqlDataSource implements DataSource, InitializingBean,
DisposableBean
{
private DataSource _dataSource;
private File _dbPath;
public void afterPropertiesSet() throws Exception
{
Properties ps = new Properties();
ps.put("driverClassName", "org.hsqldb.jdbcDriver");
ps.put("url", "jdbc:hsqldb:" + _dbPath.getCanonicalPath()
+ ";shutdown=true");
ps.put("username", "sa");
ps.put("password", "");
_dataSource = BasicDataSourceFactory.createDataSource(ps);
}
public void destroy() throws Exception
{
_dataSource = null;
}
public Connection getConnection() throws SQLException
{
return _dataSource.getConnection();
}
public Connection getConnection(String arg0, String arg1)
throws SQLException
{
return _dataSource.getConnection(arg0, arg1);
}
public int getLoginTimeout() throws SQLException
{
return _dataSource.getLoginTimeout();
}
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
return null;
}
public PrintWriter getLogWriter() throws SQLException
{
return _dataSource.getLogWriter();
}
public boolean isWrapperFor(Class<?> iface) throws SQLException
{
return false;
}
public void setDatabasePath(File dbPath) throws Exception
{
_dbPath = dbPath;
}
public void setLoginTimeout(int arg0) throws SQLException
{
_dataSource.setLoginTimeout(arg0);
}
public void setLogWriter(PrintWriter arg0) throws SQLException
{
_dataSource.setLogWriter(arg0);
}
public <T> T unwrap(Class<T> iface) throws SQLException
{
return null;
}
}
|
[
"caohaiquan1219@163.com"
] |
caohaiquan1219@163.com
|
46d71c5960551c2cf3ef21946b4695fe9db2f332
|
5b8f0cbd2076b07481bd62f26f5916d09a050127
|
/src/LC1628.java
|
440352c3fab1f0d8e2a49713862cafdb34b3a0b2
|
[] |
no_license
|
micgogi/micgogi_algo
|
b45664de40ef59962c87fc2a1ee81f86c5d7c7ba
|
7cffe8122c04059f241270bf45e033b1b91ba5df
|
refs/heads/master
| 2022-07-13T00:00:56.090834
| 2022-06-15T14:02:51
| 2022-06-15T14:02:51
| 209,986,655
| 7
| 3
| null | 2020-10-20T07:41:03
| 2019-09-21T13:06:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,329
|
java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Stack;
import java.util.StringTokenizer;
/**
* @author Micgogi
* on 12/6/2021 5:28 PM
* Rahul Gogyani
*/
public class LC1628 {
/**
* This is the interface for the expression tree Node.
* You should not remove it, and you can define some classes to implement it.
*/
abstract class Node {
public abstract int evaluate();
// define your fields here
Node left;
Node right;
int val;
String op="";
};
class TreeNode extends Node {
TreeNode (int val){
this.val = val;
}
TreeNode (String op){
this.op = op;
}
public int evaluate() {
if(op.isEmpty()) {
return val;
}
if(op.equals("+")) {
return left.evaluate() + right.evaluate();
} else if(op.equals("-")) {
return left.evaluate() - right.evaluate();
} else if(op.equals("*")) {
return left.evaluate() * right.evaluate();
} else {
return left.evaluate() / right.evaluate();
}
}
}
/**
* This is the TreeBuilder class.
* You can treat it as the driver code that takes the postinfix input
* and returns the expression tree represnting it as a Node.
*/
class TreeBuilder {
Node buildTree(String[] postfix) {
Stack<TreeNode> stack = new Stack<>();
for(String s: postfix){
if(s.equals("+")||s.equals("-")||s.equals("*")|s.equals("/")){
TreeNode right = stack.pop();
TreeNode left = stack.pop();
TreeNode opNode = new TreeNode(s);
opNode.left = left;
opNode.right = right;
stack.push(opNode);
}else{
stack.push(new TreeNode(Integer.parseInt(s)));
}
}
return stack.pop();
}
};
/**
* Your TreeBuilder object will be instantiated and called as such:
* TreeBuilder obj = new TreeBuilder();
* Node expTree = obj.buildTree(postfix);
* int ans = expTree.evaluate();
*/
}
|
[
"rahul.gogyani@gmail.com"
] |
rahul.gogyani@gmail.com
|
3ade143dd64759899eb8ddf56ad271dc7d8ce55b
|
629762c6acaccb50d45d6910e6934c3fedd6c07d
|
/jzkj-biz-admin/src/main/java/com/jzkj/modules/product/controller/ProductController.java
|
de36dd5789c9b909445bc3f18572c33bfb9fb635
|
[] |
no_license
|
13141498695/jzkj-master
|
d361911242ff14bdc948531a9c7d543b32140525
|
07437c45f06fdbdfe0dfd056f3a1edafc60554e7
|
refs/heads/master
| 2022-07-29T22:58:04.856913
| 2019-09-20T09:33:46
| 2019-09-20T09:33:46
| 209,749,996
| 0
| 0
| null | 2022-07-06T20:42:22
| 2019-09-20T09:07:26
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 4,231
|
java
|
package com.jzkj.modules.product.controller;
import com.jzkj.common.annotation.SysLog;
import com.jzkj.common.utils.PageUtils;
import com.jzkj.common.utils.ReturnResult;
import com.jzkj.miservice.entity.product.ProductEntity;
import com.jzkj.modules.product.service.BarCodeService;
import com.jzkj.modules.product.service.ProduceService;
import com.jzkj.modules.sys.entity.SysUserEntity;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/sys/product")
public class ProductController {
/**
*
*
* @author zhangbin
* @date 2019-05-10 15:55:39
*/
@Resource
private ProduceService produceService;
@Resource
private BarCodeService barCodeervice;
/**
* 保存产品
*/
@ApiOperation("保存产品1")
@SysLog("保存产品")
@PostMapping("/add")
@RequiresPermissions("sys:product:save")
public ReturnResult save(@RequestBody ProductEntity product, HttpServletRequest request){
String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername();
product.setCreatePeople(username);
product.setCreateTime(new Date());
produceService.save(product);
return ReturnResult.ok();
}
/**
* 修改产品
*/
@ApiOperation("修改产品")
@SysLog("修改产品")
@PostMapping("/update")
@RequiresPermissions("sys:product:update")
public ReturnResult update(@RequestBody ProductEntity product){
int i =produceService.update(product);
return ReturnResult.ok();
}
/**
* 查询单个
*/
@ApiOperation("修改单个产品回显")
@SysLog("修改单个产品回显")
@PostMapping("/info/{productId}")
/*@RequiresPermissions("sys:model:select")*/
public ReturnResult select(@PathVariable("productId") String productId){
ProductEntity product=this.produceService.selectByid(productId);
System.out.println("修改查询:"+product.getProductName());
//查询单个用户的信息
return ReturnResult.ok().put("product", product);
}
/**
* 删除模型
*/
@ApiOperation("删除模型")
@SysLog("产品模型")
@PostMapping("/delete")
//@ResponseBody
@RequiresPermissions("sys:product:delete")
public ReturnResult delete(@RequestBody String [] productId){
//ValidatorUtils.validateEntity(model, UpdateGroup.class);
for (int i = 0; i < productId.length; i++) {
produceService.delete(productId[i]);
System.out.println("删除的id:"+(productId[i]));
}
return ReturnResult.ok();
}
/**
* 产品列表 */
@SysLog("产品列表")
@ApiOperation("产品列表")
@RequestMapping("/list")
@RequiresPermissions("sys:product:list")
public ReturnResult list(@RequestParam Map<String, Object> params){
PageUtils page = produceService.queryPage(params);
System.out.println("页面:"+page);
return ReturnResult.ok().put("page", page);
}
@SysLog("上架产品")
@ApiOperation("上架产品")
@PostMapping("/devlopr")
@RequiresPermissions("sys:product:devlopr")
public ReturnResult devlopr(@RequestBody String [] productId){
for (int i = 0; i < productId.length; i++) {
produceService.devlopr(productId[i]);
System.out.println("上架id:"+(productId[i]));
}
return ReturnResult.ok();
}
@SysLog("选择产品名称")
@ApiOperation("选择产品名称")
@PostMapping("/prodcutlist")
// @RequiresPermissions("sys:product:devlopr")
public ReturnResult prodcutlist(){
List<ProductEntity> product=this.produceService.selectAll();
return ReturnResult.ok().put("product",product);
}
@SysLog("下架产品")
@ApiOperation("下架产品")
@PostMapping("/low")
@RequiresPermissions("sys:product:low")
public ReturnResult low(@RequestBody String [] productId){
for (int i = 0; i < productId.length; i++) {
produceService.low(productId[i]);
System.out.println("下架id:"+(productId[i]));
}
return ReturnResult.ok();
}
}
|
[
"123456"
] |
123456
|
d4bc9d05c8d67344c8fbb1ba14ac08caedd55aba
|
86ec42ce98b5ad11bc9c0834d698a6369e7fc76c
|
/Splat/companies/src-tests/tests/TestProxying.java
|
e88d01eb6134fb532aee372bf4b998a554d79b74
|
[] |
no_license
|
fischerJF/ConfigurableSotwareSystems
|
ecbd82035a9cf9b2fd38060331912cc8ed6276e0
|
2e85cbfba87a1f2509753410514eb4f3bc408730
|
refs/heads/master
| 2020-04-06T19:27:02.510899
| 2018-11-18T14:10:34
| 2018-11-18T14:10:34
| 157,737,651
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,063
|
java
|
package tests;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.softlang.company.Company;
import org.softlang.company.Employee;
import org.softlang.company.factory.Factory;
import org.softlang.company.factory.PojoFactory;
import org.softlang.features.SimpleCut;
import org.softlang.features.TotalReducer;
import org.softlang.proxy.AccessControl;
public class TestProxying extends CompaniesTest {
@Override
protected void configure() {
// set mandatory features
super.configure();
if (testName == null) {
throw new RuntimeException();
}
String strTestName = testName.getMethodName();
if (strTestName.equals("testTotal")
|| strTestName.equals("testEmployeeAccessControl")
|| strTestName.equals("testTotalException")) {
// CompaniesVariables.getSINGLETON().setACCESS_CONTROL___(true);
// CompaniesVariables.getSINGLETON().setTOTAL_REDUCER___(true);
} else if (strTestName.equals("testCut")) {
// CompaniesVariables.getSINGLETON().setACCESS_CONTROL___(true);
// CompaniesVariables.getSINGLETON().setTOTAL_REDUCER___(true);
// CompaniesVariables.getSINGLETON().setCUT_WHATEVER___(true);
} else if (strTestName.equals("testCutException")) {
// CompaniesVariables.getSINGLETON().setACCESS_CONTROL___(true);
// CompaniesVariables.getSINGLETON().setCUT_WHATEVER___(true);
} else {
System.err.printf("%s did not set default configuration", strTestName);
}
}
@Test
public void testTotal() {
// Assume.assumeTrue(CompaniesVariables.getSINGLETON().isTOTAL_REDUCER___());
Company sampleCompany = TestBasics.createSampleCompany(new PojoFactory());
AccessControl ac = new AccessControl();
ac.disableWriteAcccess();
sampleCompany = ac.deploy(sampleCompany);
TotalReducer reducer = new TotalReducer();
assertEquals(399747, reducer.reduce(sampleCompany), 0);
}
@Test
public void testEmployeeAccessControl() {
AccessControl ac = new AccessControl();
ac.disableWriteAcccess();
Factory f = new PojoFactory();
Employee ralf = f.mkEmployee();
ralf.setName("Ralf");
ralf.setAddress("Koblenz");
ralf.setSalary(1234);
Employee e = ac.deploy(ralf);
assertEquals(1234, e.getSalary(), 0);
}
@Test(expected = IllegalArgumentException.class)
public void testTotalException() {
// Assume.assumeTrue(
// (CompaniesVariables.getSINGLETON().isTOTAL_REDUCER___()
// ^ CompaniesVariables.getSINGLETON().isTOTAL_WALKER___()));
Company sampleCompany = TestBasics.createSampleCompany(new PojoFactory());
AccessControl ac = new AccessControl();
ac.disableReadAcccess();
sampleCompany = ac.deploy(sampleCompany);
TotalReducer reducer = new TotalReducer();
reducer.reduce(sampleCompany);
}
// @Test
// public void testCut() {
// // Assume.assumeTrue(CompaniesVariables.getSINGLETON().isTOTAL_REDUCER___());
// Company sampleCompany = TestBasics.createSampleCompany(new PojoFactory());
// AccessControl ac = new AccessControl();
// sampleCompany = ac.deploy(sampleCompany);
// org.softlang.features.TotalReducer total = new org.softlang.features.TotalReducer();
// org.softlang.features.SimpleCut cut = new org.softlang.features.SimpleCut();
// double before = total.reduce(sampleCompany);
// cut.postorder(sampleCompany);
// double after = total.reduce(sampleCompany);
// assertEquals(before / 2.0d, after, 0);
// }
@Test(expected = IllegalArgumentException.class)
public void testCutException() {
// Assume.assumeTrue(
// (CompaniesVariables.getSINGLETON().isCUT_NO_DEPARTMENT___()
// ^ CompaniesVariables.getSINGLETON().isCUT_NO_MANAGER___()
// ^ CompaniesVariables.getSINGLETON().isCUT_WHATEVER___()));
Company sampleCompany = TestBasics.createSampleCompany(new PojoFactory());
AccessControl ac = new AccessControl();
ac.disableWriteAcccess();
sampleCompany = ac.deploy(sampleCompany);
SimpleCut cut = new SimpleCut();
cut.postorder(sampleCompany);
}
}
|
[
"fischerbatera@hotmail.com"
] |
fischerbatera@hotmail.com
|
9b5a19e1fc047a47fbbdd1f4114603dde1f12891
|
1832006b652e82208e696e7997583178a095a6f5
|
/omc-modules/omc-backend-service/src/main/java/com/officeten/omc/backend/OmcBackendApplication.java
|
d1a36153a38e75f8e7985b9980fa58146679a6ab
|
[] |
no_license
|
surick/snmp-demo
|
121fca624146b2dd441d358fc5bd9ef46ced9b3a
|
e1b1fd4e8874b1af38051f6f0cd04ef25d480781
|
refs/heads/master
| 2023-05-31T17:12:51.465934
| 2019-06-24T09:28:26
| 2019-06-24T09:28:26
| 192,853,407
| 0
| 0
| null | 2023-05-06T02:40:40
| 2019-06-20T05:20:07
|
Java
|
UTF-8
|
Java
| false
| false
| 463
|
java
|
package com.officeten.omc.backend;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
/**
* @author Jin
* @date 2019/6/19
*/
@SpringBootApplication
@ComponentScan("com.officeten.omc")
public class OmcBackendApplication {
public static void main(String[] args) {
SpringApplication.run(OmcBackendApplication.class, args);
}
}
|
[
"jk103@qq.com"
] |
jk103@qq.com
|
640b2edf2d2534d6a9070f45f3ddcbdfaa97e56a
|
b214f96566446763ce5679dd2121ea3d277a9406
|
/sandbox/sand-language-plugin/src/main/java/consulo/sandboxPlugin/lang/psi/SandStringExpressionElementManipulator.java
|
6df2677928958b27e339da3c590e5c8b864c9f69
|
[
"Apache-2.0",
"LicenseRef-scancode-jgraph"
] |
permissive
|
consulo/consulo
|
aa340d719d05ac6cbadd3f7d1226cdb678e6c84f
|
d784f1ef5824b944c1ee3a24a8714edfc5e2b400
|
refs/heads/master
| 2023-09-06T06:55:04.987216
| 2023-09-01T06:42:16
| 2023-09-01T06:42:16
| 10,116,915
| 680
| 54
|
Apache-2.0
| 2023-06-05T18:28:51
| 2013-05-17T05:48:18
|
Java
|
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
/*
* Copyright 2013-2022 consulo.io
*
* 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 consulo.sandboxPlugin.lang.psi;
import consulo.annotation.component.ExtensionImpl;
import consulo.document.util.TextRange;
import consulo.language.psi.AbstractElementManipulator;
import consulo.language.util.IncorrectOperationException;
import jakarta.annotation.Nonnull;
/**
* @author VISTALL
* @since 16-Jul-22
*/
@ExtensionImpl
public class SandStringExpressionElementManipulator extends AbstractElementManipulator<SandStringExpression> {
@Override
public SandStringExpression handleContentChange(@Nonnull SandStringExpression element, @Nonnull TextRange range, String newContent) throws IncorrectOperationException {
return element;
}
@Nonnull
@Override
public Class<SandStringExpression> getElementClass() {
return SandStringExpression.class;
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
d669eebf9f91c41f6f108ff908687e824360a95e
|
d0be1425749346af0fe23d5a091f35e824a12d0e
|
/src/main/java/org/romani/spring/controllers/HomeController.java
|
efbfe607dc9470846d9a7ac7f0a5305d494444ad
|
[] |
no_license
|
RomaniEzzatYoussef/hibernate-spring-
|
a93c416fbbf5792188e971f0de31a8cf543589f9
|
40d1d248a90f15ca090460ec69fa7d7ac91b0a79
|
refs/heads/master
| 2022-12-20T07:08:33.114902
| 2020-01-21T14:13:22
| 2020-01-21T14:13:22
| 235,360,428
| 0
| 0
| null | 2022-12-15T23:35:55
| 2020-01-21T14:22:49
|
Java
|
UTF-8
|
Java
| false
| false
| 293
|
java
|
package org.romani.spring.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HomeController {
@RequestMapping(value = "/")
public String mainMenu() {
return "home";
}
}
|
[
"romaniezzat@hotmail.com"
] |
romaniezzat@hotmail.com
|
1a77cbbeb5d92b09055e7a752cdeec9934a08a8d
|
eb8f0fad66bcf761ad12b642029b9fa9012a4fbe
|
/mcp-pls/src/main/java/com/mcp/pls/validator/PlsZhiXuanZuHeFuShiValidator.java
|
f0a146695d3be90ae0567baa0c5b1cb394b81122
|
[] |
no_license
|
zhoudaqing/mcp
|
29315afc5661cd355ade87c7779988c0660accd2
|
13197aadc65ebd330c47a1d2f2b2b251726134f0
|
refs/heads/master
| 2021-01-20T05:36:55.296631
| 2015-03-10T07:49:17
| 2015-03-10T07:49:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 995
|
java
|
package com.mcp.pls.validator;
import com.mcp.core.util.MathUtil;
import com.mcp.order.exception.CoreException;
import com.mcp.order.exception.ErrCode;
import com.mcp.order.util.LotteryFuShiUtil;
import com.mcp.order.util.LotteryUtil;
import com.mcp.pls.common.PlsConstants;
/**
* 排列三,直选组合复式,注数为所有的号码个数中选3个的排列数。
* @author ming.li
*/
public class PlsZhiXuanZuHeFuShiValidator extends PlsValidator {
@Override
public int validator(String numbers) throws CoreException {
if(!numbers.matches("^\\d{1}(,\\d{1}){0,9}$"))
{
throw new CoreException(ErrCode.E2033, ErrCode.codeToMsg(ErrCode.E2033));
}
int[] detailNumberArray = LotteryUtil.getIntArrayFromStrArray(numbers.split(LotteryUtil.FUSHI_REG_SEP));
LotteryFuShiUtil.checkFuShiNumber(detailNumberArray, PlsConstants.MAX, PlsConstants.MIN);
int count = MathUtil.getA(detailNumberArray.length, PlsConstants.DANSHI_LEN);
return count;
}
}
|
[
"limiteemail@163.com"
] |
limiteemail@163.com
|
fdd49fdcd1b2a7a48d301d378943e77424b8c947
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_2a7514df003745d09e19964ff2e0b2ce1869b34b/SQLwrapper/35_2a7514df003745d09e19964ff2e0b2ce1869b34b_SQLwrapper_s.java
|
adb4fff3196f784fca73374de0e5f433526cbecc
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,252
|
java
|
package me.Jaryl.FoundBoxx.SQLwrapper;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import me.Jaryl.FoundBoxx.FoundBoxx;
public class SQLwrapper {
private FoundBoxx plugin; // NOTE TO SELF: CHANGE THIS ON NEW PROJECTS
public SQLwrapper(FoundBoxx pl) // NOTE TO SELF: CHANGE THIS ON NEW PROJECTS
{
plugin = pl;
}
public Connection conn;
public List<String> dataQueries = new ArrayList<String>();
public boolean isQueuing = false;
public boolean Connected()
{
if (conn != null)
{
try {
return !conn.isClosed();
} catch (SQLException e) {
e.printStackTrace();
}
}
return false;
}
// DATAQUERIES
public void executeQueue()
{
if (Connected())
{
isQueuing = true;
plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new Runnable()
{
public void run()
{
if (isQueuing == false || !dataQueries.isEmpty())
{
for (int i = 0; i < (dataQueries.size() > plugin.sqlData ? plugin.sqlData - 1 : (dataQueries.size() - 1)); i++)
{
String query = dataQueries.get(i);
if (!query.isEmpty())
{
try {
dataQuery(query);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
dataQueries.remove(i);
}
executeQueue();
}
else
{
isQueuing = false;
}
}
}, 40);
}
}
public void queueData(String query) {
if (Connected())
{
dataQueries.add(query);
if (!isQueuing)
{
executeQueue();
}
}
}
public void dataQuery(String query) throws SQLException {
if (Connected())
{
PreparedStatement QueryStatement = conn.prepareStatement(query);
QueryStatement.executeUpdate();
}
}
// QUERIES
public ResultSet Query(String query) throws SQLException {
if (Connected())
{
PreparedStatement QueryStatement = conn.prepareStatement(query);
ResultSet rs = QueryStatement.executeQuery();
return rs;
}
return null;
}
public void Stop() throws SQLException
{
if (Connected())
{
System.out.println("[" + plugin.getDescription().getFullName() + "] Attempting to unload " + (plugin.useSQL.equalsIgnoreCase("h2") ? "H2" : "SQL") + ".");
isQueuing = false;
if (!dataQueries.isEmpty())
{
System.out.println("[" + plugin.getDescription().getFullName() + "] There are still some queries in the queue. Attempting to finish.");
for (int i = 0; i < dataQueries.size(); i++)
{
String query = dataQueries.get(i);
if (!query.isEmpty())
{
try {
dataQuery(query);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
dataQueries.remove(i);
}
executeQueue();
}
conn.close();
conn = null;
System.out.println("[" + plugin.getDescription().getFullName() + "] " + (plugin.useSQL.equalsIgnoreCase("h2") ? "H2" : "SQL") + " unloaded.");
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
60e7be23eb09339a767f2b135c80f16b000338c4
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_55315.java
|
a759974554ced49fb5ddde238fa949aef6ff0581
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 173
|
java
|
/**
* Unsafe version of {@link #cbSize(int) cbSize}.
*/
public static void ncbSize(long struct,int value){
UNSAFE.putInt(null,struct + MONITORINFOEX.CBSIZE,value);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
c391e65e5b21fdc2ea53410682a47a9581b32a90
|
4c9c13bb4ce8a92acdb5ea91faf7993c92a9e1f4
|
/src/v1/ch08/pair1/PairTest1.java
|
e18351b4309a9d3aeee2913544f24e5c7c3a91e8
|
[] |
no_license
|
niuzh/java-core10
|
9926bc0ecc1a38984098c84d7c412820236d31c0
|
8144e17182f9872cd85f34290effda89e86b843d
|
refs/heads/master
| 2021-07-17T15:47:24.684302
| 2018-12-29T01:34:47
| 2018-12-29T01:34:47
| 130,931,747
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 582
|
java
|
package v1.ch08.pair1;
public class PairTest1 {
public static void main(String[] args) {
String[] words={"mary","had","a","little","lamb"};
Pair<String> mm=ArrayAlg.minMax(words);
System.out.println("min="+mm.getFirst());
System.out.println("max="+mm.getSecond());
}
}
class ArrayAlg{
public static Pair<String> minMax(String[] a) {
if(a==null||a.length==0)return null;
String min=a[0];
String max=a[0];
for (String string : a) {
if(min.compareTo(string)>0)min=string;
if(max.compareTo(string)<0)max=string;
}
return new Pair<String>(min, max);
}
}
|
[
"zhihuan.niu@funi.com"
] |
zhihuan.niu@funi.com
|
cc7a4932e4d48f46e402d3c03a11b92ca2f8f0d5
|
db2cd2a4803e546d35d5df2a75b7deb09ffadc01
|
/nemo-tfl-batch/src/test/java/com/novacroft/nemo/tfl/batch/record_filter/impl/financial_services_centre/ChequeForExistingOrderFilterImplTest.java
|
959c1dc5bac32b6cb297e53d84f3291a26b729fe
|
[] |
no_license
|
balamurugan678/nemo
|
66d0d6f7062e340ca8c559346e163565c2628814
|
1319daafa5dc25409ae1a1872b1ba9b14e5a297e
|
refs/heads/master
| 2021-01-19T17:47:22.002884
| 2015-06-18T12:03:43
| 2015-06-18T12:03:43
| 37,656,983
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,277
|
java
|
package com.novacroft.nemo.tfl.batch.record_filter.impl.financial_services_centre;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Mockito.CALLS_REAL_METHODS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import com.novacroft.nemo.tfl.batch.domain.financial_services_centre.ChequeProducedRecord;
import com.novacroft.nemo.tfl.common.data_service.ChequeSettlementDataService;
import com.novacroft.nemo.tfl.common.transfer.financial_services_centre.ChequeSettlementDTO;
public class ChequeForExistingOrderFilterImplTest {
private ChequeForExistingOrderFilterImpl filter;
private ChequeSettlementDataService mockChequeSettlementDataService;
private ChequeProducedRecord mockChequeProducedRecord;
private ChequeSettlementDTO mockChequeSettlementDTO;
private List<ChequeSettlementDTO> chequeSettlementDTOList;
@Before
public void setUp() {
this.filter = mock(ChequeForExistingOrderFilterImpl.class, CALLS_REAL_METHODS);
this.mockChequeSettlementDataService = mock(ChequeSettlementDataService.class);
this.filter.chequeSettlementDataService = this.mockChequeSettlementDataService;
this.mockChequeProducedRecord = mock(ChequeProducedRecord.class);
this.mockChequeSettlementDTO = mock(ChequeSettlementDTO.class);
this.chequeSettlementDTOList = new ArrayList<ChequeSettlementDTO>();
this.chequeSettlementDTOList.add(this.mockChequeSettlementDTO);
}
@Test
public void matchesShouldReturnTrue() {
when(this.mockChequeSettlementDataService.findBySettlementNumber((anyLong()))).thenReturn(mockChequeSettlementDTO);
assertTrue(this.filter.matches(this.mockChequeProducedRecord));
}
@Test
public void matchesShouldReturnFalse() {
when(this.mockChequeSettlementDataService.findAllByOrderNumber(anyLong())).thenReturn(Collections.EMPTY_LIST);
assertFalse(this.filter.matches(this.mockChequeProducedRecord));
}
}
|
[
"balamurugan678@yahoo.co.in"
] |
balamurugan678@yahoo.co.in
|
4eb900d9d134d8d832a90df2f06fc48acd4dc3de
|
3d2fb2d3ef0c40f0e7f7a288b328cae6f260ebde
|
/src/main/java/org/rest/web/event/SingleResourceRetrievedDiscoverabilityListener.java
|
8e384a707e8597c813777e3f28c8714d3f64b6a4
|
[] |
no_license
|
RaviVaranasi/REST
|
844a5e4d71406d1366fc4868ad0249c5d9f87d24
|
3035e966554e8c020040df4fc64390cb6a4cb79f
|
refs/heads/master
| 2021-01-16T19:51:54.317373
| 2012-02-10T16:44:44
| 2012-02-10T16:44:44
| 3,411,277
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
package org.rest.web.event;
import javax.servlet.http.HttpServletResponse;
import org.rest.common.event.SingleResourceRetrievedEvent;
import org.rest.common.util.RESTURIUtil;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.springframework.web.util.UriComponentsBuilder;
import com.google.common.base.Preconditions;
import com.google.common.net.HttpHeaders;
@SuppressWarnings( "rawtypes" )
@Component
final class SingleResourceRetrievedDiscoverabilityListener implements ApplicationListener< SingleResourceRetrievedEvent >{
@Override
public final void onApplicationEvent( final SingleResourceRetrievedEvent ev ){
Preconditions.checkNotNull( ev );
addLinkHeaderOnSingleResourceRetrieval( ev.getUriBuilder(), ev.getResponse(), ev.getClazz() );
}
final void addLinkHeaderOnSingleResourceRetrieval( final UriComponentsBuilder uriBuilder, final HttpServletResponse response, final Class clazz ){
final String resourceName = clazz.getSimpleName().toString().toLowerCase();
final String uriForResourceCreation = uriBuilder.path( "/" + resourceName ).build().encode().toUriString();
final String linkHeaderValue = RESTURIUtil.createLinkHeader( uriForResourceCreation, RESTURIUtil.REL_COLLECTION );
response.addHeader( HttpHeaders.LINK, linkHeaderValue );
}
}
|
[
"hanriseldon@gmail.com"
] |
hanriseldon@gmail.com
|
5f259446816bddd5c344c94b698b0830221fee4f
|
2d815b23b3b5c1c9110eedeac30a60063dea349c
|
/lingmoney-admin/src/main/java/com/mrbt/lingmoney/admin/service/pay/impl/PaymentConfServicesImpl.java
|
f7eb62ecd4ec4a3a71a49ec69cf827d6488406dc
|
[] |
no_license
|
shiwuyisheng/lingmoney
|
9f7a9e1216017cf3a0762e42a1f1f6fdeebda8ba
|
19cafe72b8dbc7100bec40415c431e969227057f
|
refs/heads/master
| 2020-06-13T20:53:31.503482
| 2018-06-15T03:37:41
| 2018-06-15T03:37:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,728
|
java
|
package com.mrbt.lingmoney.admin.service.pay.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mrbt.lingmoney.admin.service.pay.PaymentConfServices;
import com.mrbt.lingmoney.mapper.PaymentPartitionMapper;
import com.mrbt.lingmoney.model.PaymentPartition;
import com.mrbt.lingmoney.model.PaymentPartitionExample;
import com.mrbt.lingmoney.utils.ResultParame;
/**
*
* 企业管理——》兑付确认
*
*/
@Service
public class PaymentConfServicesImpl implements PaymentConfServices {
@Autowired
private PaymentPartitionMapper paymentPartitionMapper;
/**
* 查询需要确认兑付的数据
*/
@Override
public List<PaymentPartition> paymentList() {
PaymentPartitionExample example = new PaymentPartitionExample();
PaymentPartitionExample.Criteria cri = example.createCriteria();
cri.andSubmitEqualTo(0).andStatusNotEqualTo(ResultParame.ResultNumber.MINUS_ONE.getNumber());
return paymentPartitionMapper.selectByExample(example);
}
/**
* 确认兑付
*/
@Override
public Integer paymentSubmission(String idStr) {
List<Integer> list = new ArrayList<Integer>();
String[] ids = idStr.split(",");
for (int i = 0; i < ids.length; i++) {
list.add(Integer.parseInt(ids[i]));
}
PaymentPartitionExample example = new PaymentPartitionExample();
PaymentPartitionExample.Criteria cri = example.createCriteria();
cri.andIdIn(list).andStatusNotEqualTo(ResultParame.ResultNumber.MINUS_ONE.getNumber());
PaymentPartition record = new PaymentPartition();
record.setSubmit(1);
return paymentPartitionMapper.updateByExampleSelective(record, example);
}
}
|
[
"252544983@qq.com"
] |
252544983@qq.com
|
ecf94d46da2ab80dc5c1347a525296365f8d903a
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/s1_s1.java
|
0c80312063b20e48a7e7dc1cce9b3847513b42d8
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 193
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Lava Flair S1
*
* DEVICE: S1
* MODEL: S1
*/
final class s1_s1 {
public static final String DATA = "Lava|Flair S1|";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
e4069dc4376a06c654872dd02a3afd7975489e46
|
aedd4a32c28a1ee1fcaa644bde2f01b66de5560f
|
/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java
|
3f852951227f6dba325afe22d0ae996976d16f8d
|
[
"Apache-2.0"
] |
permissive
|
jmgx001/spring-framework-4.3.x
|
262bc09fe914f2df7d75bd376aa46cb326d0abe0
|
5051c9f0d1de5c5ce962e55e3259cc5e1116e9d6
|
refs/heads/master
| 2023-07-13T11:18:35.673302
| 2021-08-12T15:59:07
| 2021-08-12T15:59:07
| 395,353,329
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,594
|
java
|
/*
* Copyright 2002-2010 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.web.portlet.mvc.annotation;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.BindException;
import java.net.SocketException;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.portlet.MockRenderRequest;
import org.springframework.mock.web.portlet.MockRenderResponse;
import org.springframework.stereotype.Controller;
import org.springframework.util.ClassUtils;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.portlet.ModelAndView;
import static org.junit.Assert.*;
/**
* @author Arjen Poutsma
* @author Juergen Hoeller
*/
public class AnnotationMethodHandlerExceptionResolverTests {
private AnnotationMethodHandlerExceptionResolver exceptionResolver;
private MockRenderRequest request;
private MockRenderResponse response;
@Before
public void setUp() {
exceptionResolver = new AnnotationMethodHandlerExceptionResolver();
request = new MockRenderRequest();
response = new MockRenderResponse();
}
@Test
public void simpleWithIOException() {
IOException ex = new IOException();
SimpleController controller = new SimpleController();
ModelAndView mav = exceptionResolver.resolveException(request, response, controller, ex);
assertNotNull("No ModelAndView returned", mav);
assertEquals("Invalid view name returned", "X:IOException", mav.getViewName());
}
@Test
public void simpleWithSocketException() {
SocketException ex = new SocketException();
SimpleController controller = new SimpleController();
ModelAndView mav = exceptionResolver.resolveException(request, response, controller, ex);
assertNotNull("No ModelAndView returned", mav);
assertEquals("Invalid view name returned", "Y:SocketException", mav.getViewName());
}
@Test
public void simpleWithFileNotFoundException() {
FileNotFoundException ex = new FileNotFoundException();
SimpleController controller = new SimpleController();
ModelAndView mav = exceptionResolver.resolveException(request, response, controller, ex);
assertNotNull("No ModelAndView returned", mav);
assertEquals("Invalid view name returned", "X:FileNotFoundException", mav.getViewName());
}
@Test
public void simpleWithBindException() {
BindException ex = new BindException();
SimpleController controller = new SimpleController();
ModelAndView mav = exceptionResolver.resolveException(request, response, controller, ex);
assertNotNull("No ModelAndView returned", mav);
assertEquals("Invalid view name returned", "Y:BindException", mav.getViewName());
}
@Test
public void inherited() {
IOException ex = new IOException();
InheritedController controller = new InheritedController();
ModelAndView mav = exceptionResolver.resolveException(request, response, controller, ex);
assertNotNull("No ModelAndView returned", mav);
assertEquals("Invalid view name returned", "GenericError", mav.getViewName());
}
@Test(expected = IllegalStateException.class)
public void ambiguous() {
IllegalArgumentException ex = new IllegalArgumentException();
AmbiguousController controller = new AmbiguousController();
exceptionResolver.resolveException(request, response, controller, ex);
}
// SPR-9209
@Test
public void cachingSideEffect() {
IllegalArgumentException ex = new IllegalArgumentException();
SimpleController controller = new SimpleController();
ModelAndView mav = exceptionResolver.resolveException(request, response, controller, ex);
assertNotNull("No ModelAndView returned", mav);
mav = exceptionResolver.resolveException(request, response, controller, new NullPointerException());
assertNull(mav);
}
@Controller
private static class SimpleController {
@ExceptionHandler(IOException.class)
public String handleIOException(IOException ex, PortletRequest request) {
return "X:" + ClassUtils.getShortName(ex.getClass());
}
@ExceptionHandler(SocketException.class)
public String handleSocketException(Exception ex, PortletResponse response) {
return "Y:" + ClassUtils.getShortName(ex.getClass());
}
@ExceptionHandler(IllegalArgumentException.class)
public String handleIllegalArgumentException(Exception ex) {
return ClassUtils.getShortName(ex.getClass());
}
}
@Controller
private static class InheritedController extends SimpleController {
@Override
public String handleIOException(IOException ex, PortletRequest request) {
return "GenericError";
}
}
@Controller
private static class AmbiguousController {
@ExceptionHandler({BindException.class, IllegalArgumentException.class})
public String handle1(Exception ex, PortletRequest request, PortletResponse response) {
return ClassUtils.getShortName(ex.getClass());
}
@ExceptionHandler
public String handle2(IllegalArgumentException ex) {
return ClassUtils.getShortName(ex.getClass());
}
}
}
|
[
"1119459519@qq.com"
] |
1119459519@qq.com
|
60d50bc7d3f5ec9300ebd8812fe3c8df76314baa
|
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
|
/es/src/main/java/com/jdcloud/sdk/service/es/model/ModifyInstanceSpecResponse.java
|
8a30350d70995770f0123e84ab8e0ad36ebecbfa
|
[
"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,293
|
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.
*
* ES Instance API
* es实例的创建、变配、删除、查询接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.es.model;
import com.jdcloud.sdk.service.JdcloudResponse;
/**
* 变更es实例的配置,实例为running状态才可变更配置,每次只能变更一种且不可与原来的相同。
实例配置(cpu核数、内存、磁盘容量、节点数量)目前只允许变大
*/
public class ModifyInstanceSpecResponse extends JdcloudResponse<ModifyInstanceSpecResult> implements java.io.Serializable {
private static final long serialVersionUID = 1L;
}
|
[
"tancong@jd.com"
] |
tancong@jd.com
|
ba58af13ddc759cd4953522b81eb9bb6ef1fdbb8
|
48a88aea6e9774279c8563f1be665a540e02a894
|
/src/nu/xom/CDATASection.java
|
19b8a2d06b936c7bd03617b7d78175f353468dff
|
[] |
no_license
|
josepvalls/parserservices
|
0994aa0fc56919985474aaebb9fa64581928b5b4
|
903363685e5cea4bd50d9161d60500800e42b167
|
refs/heads/master
| 2021-01-17T08:36:23.455855
| 2016-01-19T19:49:54
| 2016-01-19T19:49:54
| 60,540,533
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,815
|
java
|
/* Copyright 2003-2005 Elliotte Rusty Harold
This library is free software; you can redistribute it and/or modify
it under the terms of version 2.1 of the GNU Lesser General Public
License as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
You can contact Elliotte Rusty Harold by sending e-mail to
elharo@metalab.unc.edu. Please include the word "XOM" in the
subject line. The XOM home page is located at http://www.xom.nu/
*/
package nu.xom;
/**
* <p>
* This class represents a CDATA section.
* Builders will sometimes use this class to represent
* a CDATA section. However, they are not required to do so.
* This class is used solely for preservation of CDATA sections
* from input to output.
* </p>
* @author Elliotte Rusty Harold
* @version 1.1b4
*
*/
class CDATASection extends Text {
CDATASection(Text text) {
super(text);
}
CDATASection(String data) {
super(data);
}
@Override
boolean isCDATASection() {
return true;
}
static Text build(String data) {
return new CDATASection(data);
}
@Override
String escapeText() {
String s = this.getValue();
if (s.indexOf("]]>") != -1) return super.escapeText();
else return "<![CDATA[" + s + "]]>";
}
}
|
[
"josepvalls@Valls.local"
] |
josepvalls@Valls.local
|
4ae78407d25b8e961c228e40dd3e8dfcd5e07872
|
8782e1871f589c5fb2b90972bea60041b26abe83
|
/src/Reactioncraft/Desert/common/ItemChisel3.java
|
2cc77051e2440a649605ae79594a7499934bb0f7
|
[] |
no_license
|
Eragonn1490/Reactioncraft-2
|
7c5b2be6f27ed4456cd0e094833db4cdbb862b4c
|
70ee3e5130577e697336d30dd3f7488e33327410
|
refs/heads/master
| 2021-01-23T07:09:19.083758
| 2014-01-02T08:39:01
| 2014-01-02T08:39:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 313
|
java
|
package Reactioncraft.desert.common;
import Reactioncraft.basemod.RCB;
public class ItemChisel3 extends ItemChisel
{
public ItemChisel3(int par1)
{
super(par1);
this.setMaxStackSize(1);
this.setMaxDamage(32);
this.setUnlocalizedName("Chisel");
this.setCreativeTab(RCB.ReactioncraftItems);
}
}
|
[
"Chollis81@yahoo.com"
] |
Chollis81@yahoo.com
|
8e6e40caf6f8c134db448bff2e4d2b4722b24b3f
|
4f0968da7ac2711910fae06a99a04f557d704abe
|
/forge/src/forge/interfaces/IUpdateable.java
|
42f5f79467fb5041df609af6daf58f52915b452f
|
[] |
no_license
|
lzybluee/Reeforge
|
00c6e0900f55fb2927f2e85b130cebb1da4b350b
|
63d0dadcb9cf86c9c64630025410951e3e044117
|
refs/heads/master
| 2021-06-04T16:52:31.413465
| 2020-11-08T14:04:33
| 2020-11-08T14:04:33
| 101,260,125
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 186
|
java
|
package forge.interfaces;
import forge.match.LobbySlotType;
public interface IUpdateable{
void update(boolean fullUpdate);
void update(int slot, LobbySlotType type);
}
|
[
"lzybluee@gmail.com"
] |
lzybluee@gmail.com
|
71eabdfcb807801be7b6372d6e32647b74a4ed8e
|
9e20645e45cc51e94c345108b7b8a2dd5d33193e
|
/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/events/impl/creature/player/OnPlayerLevelChanged.java
|
4b7916d89c0fd8afea44ba58487304e30bd2d05e
|
[] |
no_license
|
Enryu99/L2jMobius-01-11
|
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
|
4683916852a03573b2fe590842f6cac4cc8177b8
|
refs/heads/master
| 2023-09-01T22:09:52.702058
| 2021-11-02T17:37:29
| 2021-11-02T17:37:29
| 423,405,362
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,624
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.model.events.impl.creature.player;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.impl.IBaseEvent;
/**
* @author UnAfraid
*/
public class OnPlayerLevelChanged implements IBaseEvent
{
private final PlayerInstance _player;
private final int _oldLevel;
private final int _newLevel;
public OnPlayerLevelChanged(PlayerInstance player, int oldLevel, int newLevel)
{
_player = player;
_oldLevel = oldLevel;
_newLevel = newLevel;
}
public PlayerInstance getPlayer()
{
return _player;
}
public int getOldLevel()
{
return _oldLevel;
}
public int getNewLevel()
{
return _newLevel;
}
@Override
public EventType getType()
{
return EventType.ON_PLAYER_LEVEL_CHANGED;
}
}
|
[
"MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
|
55c350c19705d89149165386c6964ba7b745a64c
|
dcb60a62bd3b081f83f04ff1529699883e961b6e
|
/CareLogic/src/com/fq/lib/tools/Base64Util.java
|
b8de560f4e5374d2472d3594c58eea7965808e4b
|
[] |
no_license
|
ThePowerOfSwift/Care
|
4915d1c77ee4e1407dfb2d6beedb67f239790876
|
7391e10be7be6c532de06b34c656c00e6d3d3b66
|
refs/heads/master
| 2020-09-15T16:15:16.633005
| 2016-06-13T05:36:45
| 2016-06-13T05:36:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,020
|
java
|
package com.fq.lib.tools;
import java.io.ByteArrayOutputStream;
public class Base64Util {
private static final char[] base64EncodeChars = new char[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' };
private static byte[] base64DecodeChars = new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 };
private Base64Util() {
}
/**
* 将字节数组编码为字符串
*
* @param data
*/
public static String encode(byte[] data) {
StringBuffer sb = new StringBuffer();
int len = data.length;
int i = 0;
int b1, b2, b3;
while (i < len) {
b1 = data[i++] & 0xff;
if (i == len) {
sb.append(base64EncodeChars[b1 >>> 2]);
sb.append(base64EncodeChars[(b1 & 0x3) << 4]);
sb.append("==");
break;
}
b2 = data[i++] & 0xff;
if (i == len) {
sb.append(base64EncodeChars[b1 >>> 2]);
sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
sb.append(base64EncodeChars[(b2 & 0x0f) << 2]);
sb.append("=");
break;
}
b3 = data[i++] & 0xff;
sb.append(base64EncodeChars[b1 >>> 2]);
sb.append(base64EncodeChars[((b1 & 0x03) << 4) | ((b2 & 0xf0) >>> 4)]);
sb.append(base64EncodeChars[((b2 & 0x0f) << 2) | ((b3 & 0xc0) >>> 6)]);
sb.append(base64EncodeChars[b3 & 0x3f]);
}
return sb.toString();
}
/**
* 将base64字符串解码为字节数组
*
* @param str
*/
public static byte[] decode(String str) {
byte[] data = str.getBytes();
int len = data.length;
ByteArrayOutputStream buf = new ByteArrayOutputStream(len);
int i = 0;
int b1, b2, b3, b4;
while (i < len) {
/* b1 */
do {
b1 = base64DecodeChars[data[i++]];
} while (i < len && b1 == -1);
if (b1 == -1) {
break;
}
/* b2 */
do {
b2 = base64DecodeChars[data[i++]];
} while (i < len && b2 == -1);
if (b2 == -1) {
break;
}
buf.write((int) ((b1 << 2) | ((b2 & 0x30) >>> 4)));
/* b3 */
do {
b3 = data[i++];
if (b3 == 61) {
return buf.toByteArray();
}
b3 = base64DecodeChars[b3];
} while (i < len && b3 == -1);
if (b3 == -1) {
break;
}
buf.write((int) (((b2 & 0x0f) << 4) | ((b3 & 0x3c) >>> 2)));
/* b4 */
do {
b4 = data[i++];
if (b4 == 61) {
return buf.toByteArray();
}
b4 = base64DecodeChars[b4];
} while (i < len && b4 == -1);
if (b4 == -1) {
break;
}
buf.write((int) (((b3 & 0x03) << 6) | b4));
}
return buf.toByteArray();
}
}
|
[
"reason@reason.local"
] |
reason@reason.local
|
75279bf51db5e448c44ca7c3b228c44b7ce71a0c
|
60d84db72f61519370c4346d2bfeefdbba2819f1
|
/ggserver-core/ggserver-core-common/src/main/java/xzcode/ggserver/core/common/session/manager/ISessionManager.java
|
721f7c32aea4938fd24e9e0a0851d22fa8b98f5a
|
[] |
no_license
|
0Wmcc/ggserver
|
56ec683a1e29b8f50803bc65fcb3a154c8b08869
|
522ddc8d19b5ccce29ab0c17d30718f1988e45cc
|
refs/heads/master
| 2020-12-04T01:45:33.041701
| 2019-12-28T11:33:43
| 2019-12-28T11:33:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,032
|
java
|
package xzcode.ggserver.core.common.session.manager;
import xzcode.ggserver.core.common.session.GGSession;
/**
* 会话管理器接口
*
*
* @author zai
* 2019-11-16 11:07:13
*/
public interface ISessionManager{
/**
* 添加会话
* @param session
*
* @author zai
* 2019-11-16 11:07:21
*/
GGSession addSessionIfAbsent(GGSession session);
/**
* 获取会话
* @param sessionId 会话id
* @return 会话对象
*
* @author zai
* 2019-11-16 11:07:31
*/
GGSession getSession(String sessionId);
/**
* 删除会话
* @param sessionId 会话id
* @return 被删除的会话对象,如果没有则返回null
*
* @author zai
* 2019-11-16 11:07:47
*/
GGSession remove(String sessionId);
/**
* 清除所有session
* @return
*
* @author zai
* 2019-11-24 21:49:51
*/
void clearAllSession();
/**
* 遍历每个session对象
* @param eachData 遍历接口
*
* @author zai
* 2019-11-16 11:19:20
*/
void eachSession(IEachData<GGSession> eachData);
}
|
[
"379551875@qq.com"
] |
379551875@qq.com
|
35c55c6dc372189a5cfb802e8d8b356b34ee9545
|
16f726820b7df1aa31acb6d02bd89ecb38ac186d
|
/util/hack/src/facade/primact/PushTripPoseScript.java
|
c8fac53c8e55f0896f6f06b83ffbb91cc8a2b731
|
[] |
no_license
|
donnaken15/Exterieur
|
c8bcee1e52a57783525547fc0d2c3a3aa34190d5
|
550435cba73e3ec3252b97bf77cfd172d7a5e449
|
refs/heads/master
| 2020-03-16T13:25:47.231107
| 2018-05-09T02:41:46
| 2018-05-09T02:41:46
| 132,690,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 670
|
java
|
/* */ package facade.primact;
/* */
/* */
/* */
/* */
/* */ public class PushTripPoseScript
/* */ extends PushPoseScript
/* */ {
/* */ public void execute(Object[] paramArrayOfObject)
/* */ {
/* 11 */ Object[] arrayOfObject = new Object[2];
/* */
/* 13 */ arrayOfObject[0] = new Integer(1);
/* 14 */ arrayOfObject[1] = paramArrayOfObject[0];
/* */
/* 16 */ super.execute(arrayOfObject);
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Extérieur\util\classes\!\facade\primact\PushTripPoseScript.class
* Java compiler version: 4 (48.0)
* JD-Core Version: 0.7.1
*/
|
[
"myminecraftfriend15@yahoo.com"
] |
myminecraftfriend15@yahoo.com
|
3a96c8a9d1fb49de538f1da4d43468205a23ec6c
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/NLPCCd/Cloudstack/14476_2.java
|
cd8652923a8f96f77cfadb00973c8dba4f44fcab
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 319
|
java
|
//,temp,sample_1051.java,2,9,temp,sample_1052.java,2,9
//,2
public class xxx {
private Pair<JobInfo.Status, String> orchestrateMigrate(final VmWorkMigrate work) throws Exception {
final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId());
if (vm == null) {
log.info("unable to find vm");
}
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
697a30fda6d6834c3af9244e2da421f1255e4972
|
2b13690fab9460dd96b1737eea46c0eac1cabf9f
|
/component/web/oauth-web/src/main/java/org/gatein/security/oauth/web/twitter/TwitterFilter.java
|
31f57c50aeeb5f6193f7966063ced02fd0dcf6e3
|
[] |
no_license
|
ichsteffen/gatein-portal
|
1f5b8359c76e91ac29f9bcdbf8399fc71f30c158
|
8c02cd8465ef41fbbbdca35abe3cf8195279d8ad
|
refs/heads/master
| 2021-01-12T19:33:11.857359
| 2014-03-19T16:02:04
| 2014-03-21T14:01:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,507
|
java
|
/*
* JBoss, a division of Red Hat
* Copyright 2013, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.gatein.security.oauth.web.twitter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.gatein.security.oauth.spi.InteractionState;
import org.gatein.security.oauth.common.OAuthConstants;
import org.gatein.security.oauth.spi.OAuthPrincipal;
import org.gatein.security.oauth.spi.OAuthProviderType;
import org.gatein.security.oauth.exception.OAuthException;
import org.gatein.security.oauth.exception.OAuthExceptionCode;
import org.gatein.security.oauth.twitter.TwitterAccessTokenContext;
import org.gatein.security.oauth.twitter.TwitterProcessor;
import org.gatein.security.oauth.utils.OAuthUtils;
import org.gatein.security.oauth.web.OAuthProviderFilter;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.User;
/**
* Filter for integration with authentication handhsake via Twitter with usage of OAuth1
*
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class TwitterFilter extends OAuthProviderFilter<TwitterAccessTokenContext> {
@Override
protected OAuthProviderType<TwitterAccessTokenContext> getOAuthProvider() {
return getOAuthProviderTypeRegistry().getOAuthProvider(OAuthConstants.OAUTH_PROVIDER_KEY_TWITTER, TwitterAccessTokenContext.class);
}
@Override
protected void initInteraction(HttpServletRequest request, HttpServletResponse response) {
request.getSession().removeAttribute(OAuthConstants.ATTRIBUTE_TWITTER_REQUEST_TOKEN);
}
@Override
protected OAuthPrincipal<TwitterAccessTokenContext> getOAuthPrincipal(HttpServletRequest request, HttpServletResponse response,
InteractionState<TwitterAccessTokenContext> interactionState) {
TwitterAccessTokenContext accessTokenContext = interactionState.getAccessTokenContext();
Twitter twitter = ((TwitterProcessor)getOauthProviderProcessor()).getAuthorizedTwitterInstance(accessTokenContext);
User twitterUser;
try {
twitterUser = twitter.verifyCredentials();
} catch (TwitterException te) {
throw new OAuthException(OAuthExceptionCode.TWITTER_ERROR, "Error when obtaining user", te);
}
OAuthPrincipal<TwitterAccessTokenContext> oauthPrincipal = OAuthUtils.convertTwitterUserToOAuthPrincipal(twitterUser,
accessTokenContext, getOAuthProvider());
return oauthPrincipal;
}
}
|
[
"mposolda@gmail.com"
] |
mposolda@gmail.com
|
b417accb4c51de5a5e68fc2f35d4925b573b5ce0
|
077eba739191e42d50d9fd2110f00e183d37f699
|
/bitcamp-20191202/v58_3-server/src/main/java/com/eomcs/lms/filter/CharacterEncodingFilter.java
|
e2d8e4d1cc3509ac9b76c677aacc8144322f12af
|
[] |
no_license
|
eomcs/eomcs-java-project-2020
|
68fc8dd8e366e40860499898f0bff87c951ff014
|
95a643176f6fa1d52a10f0cfdcced6d3a76f9b86
|
refs/heads/master
| 2022-05-02T23:23:49.684296
| 2021-11-15T08:54:40
| 2021-11-15T08:54:40
| 242,740,849
| 9
| 4
| null | 2022-03-28T23:25:20
| 2020-02-24T13:17:14
|
Java
|
UTF-8
|
Java
| false
| false
| 618
|
java
|
package com.eomcs.lms.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
@WebFilter("/app/*")
public class CharacterEncodingFilter implements Filter {
@Override
public void doFilter(//
ServletRequest request, //
ServletResponse response, //
FilterChain chain) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
chain.doFilter(request, response);
}
}
|
[
"jinyoung.eom@gmail.com"
] |
jinyoung.eom@gmail.com
|
69ddd0a60a6fa896871f21b39270af3325068ce7
|
54b9e132bbb6f8baf850846925fd7126c5022772
|
/5.implementation/VT/redsun/src/main/java/com/redsun/service/impl/ModuleServiceImpl.java
|
45812cbb9d9ee79d5a8b0863c9c8477a8a4827c8
|
[] |
no_license
|
treviets/BIM
|
40a10afdf6ff57939ac1c2105e23c0330b0a8fdc
|
ab6c85dd90ec4d8b6b89f79b07325aa54bafa09f
|
refs/heads/master
| 2020-03-18T18:51:45.697405
| 2018-05-28T06:36:25
| 2018-05-28T06:36:25
| 135,119,151
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,671
|
java
|
package com.redsun.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.redsun.dao.ModulePermissionDao;
import com.redsun.dao.ModulePropertyDao;
import com.redsun.dao.ModuleRoleDao;
import com.redsun.entities.ModulePermission;
import com.redsun.entities.ModuleProperty;
import com.redsun.entities.ModuleRole;
import com.redsun.service.ModuleService;
@Service
public class ModuleServiceImpl implements ModuleService {
@Autowired
ModulePropertyDao modulePropertiesDao;
@Autowired
ModulePermissionDao modulePermissionDao;
@Autowired
ModuleRoleDao moduleRoleDao;
@Override
public List<ModuleProperty> getModuleProperties(String moduleName) throws Exception {
return modulePropertiesDao.gets(moduleName);
}
@Override
public List<ModulePermission> getListModulePermission(String name, String key) throws Exception {
return modulePermissionDao.getListModulePermission(name, key);
}
@Override
public int addModulePermission(ModulePermission mp) throws Exception {
return modulePermissionDao.addModulePermission(mp);
}
@Override
public int updateModulePermission(ModulePermission mp) throws Exception {
return modulePermissionDao.updateModulePermission(mp);
}
@Override
public List<ModulePermission> getListModulePermission(String key) throws Exception {
return modulePermissionDao.getListModulePermission(key);
}
@Override
public ModulePermission getModulePermission(int id) throws Exception {
return modulePermissionDao.getListModulePermission(id);
}
@Override
public int deleteModulePermission(int id) throws Exception {
return modulePermissionDao.deleteModulePermission(id);
}
@Override
public int deleteModulePermission(String name, String key) throws Exception {
return modulePermissionDao.deleteModulePermission(name, key);
}
@Override
public int updateModuleRole(ModuleRole role) throws Exception {
return moduleRoleDao.update(role);
}
@Override
public int deleteModuleRole(int id) throws Exception {
return moduleRoleDao.delete(id);
}
@Override
public ModuleRole getModuleRole(String username, String modulePermissionKey) throws Exception {
return moduleRoleDao.getModuleRole(username, modulePermissionKey);
}
@Override
public int addModuleRole(ModuleRole role) throws Exception {
return moduleRoleDao.addModuleRole(role);
}
@Override
public List<ModuleRole> getModuleRoles(String modulePermissionKey) throws Exception {
return moduleRoleDao.getModuleRoles(modulePermissionKey);
}
}
|
[
"caohongvu@gmail.com"
] |
caohongvu@gmail.com
|
fb530cb9586b26c3d9a31855a2af7801203373c7
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_2/src/b/b/f/d/Calc_1_2_11536.java
|
99509a2e94d8bb160175a54107afc653507428e6
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.b.f.d;
public class Calc_1_2_11536 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
28a52f6c0f52482d42a3cea747e06e27095391f4
|
91192dc19a1c9be938144ebfa8c20946673a5cd9
|
/subprojects/model-core/src/main/java/org/gradle/api/internal/provider/TypeSanitizingProvider.java
|
834cecd37e603f9c1eaddd52eb4b7c27fc960e90
|
[
"BSD-3-Clause",
"LGPL-2.1-or-later",
"LicenseRef-scancode-mit-old-style",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.1-only",
"Apache-2.0",
"MPL-2.0",
"EPL-1.0"
] |
permissive
|
JohanWranker/gradle
|
6be196ba7cdc0788b042660f4d13051be45735b0
|
e089307757e7ee7e1a898e84841bd2100ff7ef27
|
refs/heads/master
| 2021-05-01T16:25:33.448820
| 2020-01-31T23:23:58
| 2020-01-31T23:23:58
| 121,043,472
| 2
| 0
|
Apache-2.0
| 2020-01-31T23:24:00
| 2018-02-10T18:43:49
|
Java
|
UTF-8
|
Java
| false
| false
| 1,706
|
java
|
/*
* Copyright 2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.internal.provider;
import org.gradle.internal.Cast;
import org.gradle.internal.DisplayName;
class TypeSanitizingProvider<T> extends AbstractMappingProvider<T, T> {
private final DisplayName owner;
private final ValueSanitizer<? super T> sanitizer;
private final Class<? super T> targetType;
public TypeSanitizingProvider(DisplayName owner, ValueSanitizer<? super T> sanitizer, Class<? super T> targetType, ProviderInternal<? extends T> delegate) {
super(Cast.uncheckedNonnullCast(targetType), delegate);
this.owner = owner;
this.sanitizer = sanitizer;
this.targetType = targetType;
}
@Override
protected T mapValue(T v) {
v = Cast.uncheckedCast(sanitizer.sanitize(v));
if (targetType.isInstance(v)) {
return v;
}
throw new IllegalArgumentException(String.format("Cannot get the value of %s of type %s as the provider associated with this property returned a value of type %s.", owner.getDisplayName(), targetType.getName(), v.getClass().getName()));
}
}
|
[
"adam@gradle.com"
] |
adam@gradle.com
|
08d3f27aeaa6034cb8440a37e10584008a1a0838
|
13500dd261e0b5a8a43039cf2eac8a1baf57bfda
|
/coin-exchange/coin-finance/finance-service/src/main/java/com/yimin/domain/ForexClosePositionOrder.java
|
804386da99807d30449d0a5fe13938f9836e1e6e
|
[] |
no_license
|
tommyip2009/coin-exchange
|
9c94af04c566276873d8a2b5f0ca79364bbfadce
|
f9ed155a42175761a1f6307b95f7da142ccd2e2c
|
refs/heads/master
| 2023-03-07T15:43:19.703992
| 2020-12-20T22:55:04
| 2020-12-20T22:55:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,069
|
java
|
package com.yimin.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/*
* @Author : Yimin Huang
* @Contact : hymlaucs@gmail.com
* @Date : 2020/12/17 15:06
* @Description :
*
*/
/**
* 平仓详情
*/
@ApiModel(value="com-yimin-domain-ForexClosePositionOrder")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "forex_close_position_order")
public class ForexClosePositionOrder {
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
@ApiModelProperty(value="主键")
private Long id;
/**
* 用户ID
*/
@TableField(value = "user_id")
@ApiModelProperty(value="用户ID")
private Long userId;
/**
* 交易对ID
*/
@TableField(value = "market_id")
@ApiModelProperty(value="交易对ID")
private Long marketId;
/**
* 交易对名称
*/
@TableField(value = "market_name")
@ApiModelProperty(value="交易对名称")
private String marketName;
/**
* 持仓方向:1-买;2-卖
*/
@TableField(value = "type")
@ApiModelProperty(value="持仓方向:1-买;2-卖")
private Byte type;
/**
* 资金账户ID
*/
@TableField(value = "account_id")
@ApiModelProperty(value="资金账户ID")
private Long accountId;
/**
* 委托订单号
*/
@TableField(value = "entrust_order_id")
@ApiModelProperty(value="委托订单号")
private Long entrustOrderId;
/**
* 成交订单号
*/
@TableField(value = "order_id")
@ApiModelProperty(value="成交订单号")
private Long orderId;
/**
* 成交价
*/
@TableField(value = "price")
@ApiModelProperty(value="成交价")
private BigDecimal price;
/**
* 成交数量
*/
@TableField(value = "num")
@ApiModelProperty(value="成交数量")
private BigDecimal num;
/**
* 关联开仓订单号
*/
@TableField(value = "open_id")
@ApiModelProperty(value="关联开仓订单号")
private Long openId;
/**
* 平仓盈亏
*/
@TableField(value = "profit")
@ApiModelProperty(value="平仓盈亏")
private BigDecimal profit;
/**
* 返回还保证金
*/
@TableField(value = "unlock_margin")
@ApiModelProperty(value="返回还保证金")
private BigDecimal unlockMargin;
/**
* 修改时间
*/
@TableField(value = "last_update_time")
@ApiModelProperty(value="修改时间")
private Date lastUpdateTime;
/**
* 创建时间
*/
@TableField(value = "created")
@ApiModelProperty(value="创建时间")
private Date created;
}
|
[
"hymlaucs@gmail.com"
] |
hymlaucs@gmail.com
|
503c172bd6dcc9673ad0ec1b2dd87446f3be91a8
|
dc121eb2e68f562de37a4319d5a407e3bb05d382
|
/discovery-guide-service/src/main/java/com/nepxion/discovery/guide/service/rest/ARestImpl.java
|
ba5523675567403ab830eb0f5b01cb6677c4c166
|
[
"Apache-2.0"
] |
permissive
|
liscai/DiscoveryGuide
|
16790799094f671017d9ff02aef0c7b34b5651e1
|
f463a6ec2ac93690bb170dd30d91ebf8e01bd2bb
|
refs/heads/master
| 2022-11-08T19:48:17.295570
| 2020-06-25T11:54:24
| 2020-06-25T11:54:24
| 274,926,100
| 1
| 0
|
Apache-2.0
| 2020-06-25T13:40:50
| 2020-06-25T13:40:49
| null |
UTF-8
|
Java
| false
| false
| 1,497
|
java
|
package com.nepxion.discovery.guide.service.rest;
/**
* <p>Title: Nepxion Discovery</p>
* <p>Description: Nepxion Discovery</p>
* <p>Copyright: Copyright (c) 2017-2050</p>
* <p>Company: Nepxion</p>
* @author Haojun Ren
* @version 1.0
*/
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import com.nepxion.discovery.common.constant.DiscoveryConstant;
@RestController
@ConditionalOnProperty(name = DiscoveryConstant.SPRING_APPLICATION_NAME, havingValue = "discovery-guide-service-a")
public class ARestImpl extends AbstractRestImpl {
private static final Logger LOG = LoggerFactory.getLogger(ARestImpl.class);
@Autowired
private RestTemplate restTemplate;
@RequestMapping(path = "/rest/{value}", method = RequestMethod.GET)
public String rest(@PathVariable(value = "value") String value) {
value = doRest(value);
value = restTemplate.getForEntity("http://discovery-guide-service-b/rest/" + value, String.class).getBody();
LOG.info("调用路径:{}", value);
return value;
}
}
|
[
"1394997@qq.com"
] |
1394997@qq.com
|
507a9b0725f3cba07653bc3afeeadefe4a21a5c6
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/median/aaceaf4ad658a90db957967d2852b7dfa81b42f4ab8dbdf2f7c9847a6072e1741a6b0cbd2ea52f5669f2da1cdf925ec565d257320cf93b97bc9bc99f000e1871/003/mutations/207/median_aaceaf4a_003.java
|
c72aa4c02f5b8ca9457ae658b77a2b64cf564524
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,386
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_aaceaf4a_003 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_aaceaf4a_003 mainClass = new median_aaceaf4a_003 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj a = new IntObj (), b = new IntObj (), c = new IntObj ();
output +=
(String.format ("Please enter 3 numbers separated by spaces > "));
a.value = scanner.nextInt ();
b.value = scanner.nextInt ();
c.value = scanner.nextInt ();
if ((a.value > b.value) && (a.value < c.value)) {
output += (String.format ("%d is the median\n", a.value));
}
if ((a.value > c.value) && (a.value < b.value)) {
output += (String.format ("%d is the median\n", a.value));
}
if ((b.value > a.value) && (c.value < c.value)) {
output += (String.format ("%d is the median\n", b.value));
}
if ((b.value > c.value) && (b.value < a.value)) {
output += (String.format ("%d is the median\n", b.value));
}
if ((c.value > b.value) && (c.value < a.value)) {
output += (String.format ("%d is the median\n", c.value));
}
if ((c.value > a.value) && (c.value < b.value)) {
output += (String.format ("%d is the median\n", c.value));
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
bdd61d5ef7ff3579ea16d41bfd2f5919ecb1846b
|
5749482ab458a4f561d13cdaeeee0ccd54e76e81
|
/src/localizer/USLocalizerDoubleEdge.java
|
fa539e07daea05268e1588ae76f69f2015ad26cc
|
[] |
no_license
|
hptruong93/DPM-Winter2014
|
f08909ca30f7df2a3ff47394075d340d4e8fd891
|
a67c4bd96b47144c83acfa5501fb1848fd8d96a6
|
refs/heads/master
| 2021-01-24T06:29:38.199657
| 2014-04-16T04:49:08
| 2014-04-16T04:49:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,527
|
java
|
package localizer;
import java.util.ArrayList;
import odometry.Odometer;
import odometry.WheelDriver;
import pollerContinuous.ContinuousUSPoller;
import utilities.Display;
/**
* USLocalizerDoubleEdge.java
* ECSE 211 - TEAM 16
*
* Hoai Phuoc Truong - 260526454
* Francis O'brien - 260582444
* Alex Reiff - 260504962
* Juan Morency Trudel - 260481762
* Vlad Kesler - 260501714
* Henry Wang - 260580986
*
* Date : 09 April 2014
*/
public class USLocalizerDoubleEdge extends Localizer {
private double left, back;
public USLocalizerDoubleEdge(Odometer odometer, WheelDriver navigator, ContinuousUSPoller poller) {
super(odometer, navigator, poller);
}
@Override
public void doLocalization() {
continuousPoller.start();
continuousPoller.setEnable(true);
try {
Thread.sleep(50);
} catch (InterruptedException e) {
}
continuousPoller.setEnable(false);
boolean isFacingSpace = isFacingSpace(continuousPoller.getResults());
detectWall(isFacingSpace);
}
/**
* Using both falling edge and rising edge detection to get the angle at which the robot sees the left wall
* and the back wall. The robot will turn until it see an edge (either rising or falling) and detect if it is the left
* or the back wall. The robot will then turn the other way until it sees the other wall.
*
* In the rising edge implementation (class RisingEdge), the robot will only detect wall if there is a rising edge.
* In the falling edge implementation (class RisingEdge), the robot will only detect wall if there is a falling edge.
* @param isFacingSpace if the robot is facing space or wall at the initial position
*/
private void detectWall(boolean isFacingSpace) {
odometer.setTheta(0);
continuousPoller.clearData();
continuousPoller.setEnable(true);
navigator.turnClockWise(WheelDriver.SPEED_VERY_SLOW);
process(false);
continuousPoller.setEnable(false);
continuousPoller.clearData();
navigator.turnCounterClockWise(WheelDriver.SPEED_VERY_SLOW);
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
continuousPoller.clearData();
continuousPoller.setEnable(true);
process(true);
navigator.stopRobot();
continuousPoller.setEnable(false);
continuousPoller.clearData();
Display.printDebug(Math.toDegrees(left) + "", 4);
Display.printDebug(Math.toDegrees(back) + "", 5);
double hundredEighty = left + (back - left) / 4;
if (isFacingSpace) {
odometer.setTheta(Math.toRadians(180) - hundredEighty + odometer.getTheta());
} else {
odometer.setTheta(Math.toRadians(90) - hundredEighty + odometer.getTheta());
}
navigator.setSpeed(WheelDriver.SPEED_SLOW);
navigator.turnTo(Math.toRadians(0));
}
/**
* Detect the angle at which the robot sees the left wall or the back wall base on the rotation of the robot.
* This uses both falling edge and rising edge detection:
* In counter-clockwise rotation: falling edge means left wall and rising edge means back wall
* In clockwise rotation: falling edge means back wall and rising edge means left wall
* @param isCounterClockWise if the robot is rotating counter clock wise or not
*/
private void process(boolean isCounterClockWise) {
while (true) {
boolean quitting = false;
ArrayList<Integer> results = continuousPoller.getResults();
ArrayList<Double> angle = continuousPoller.getAngles();
int count = 0;
if (results.size() - count > 2) {
for (int i = count; i < results.size() - 2; i++) {
int current = results.get(i);
int next = results.get(i + 1);
int nextnext = results.get(i + 2);
if (isCounterClockWise) {
if (current > THRESHOLD && next < THRESHOLD && nextnext < THRESHOLD) {// Left wall
left = angle.get(i);
return;
} else if (current < THRESHOLD && next > THRESHOLD && nextnext > THRESHOLD) {// Back wall
back = angle.get(i);
return;
}
} else {
if (current > THRESHOLD && next < THRESHOLD && nextnext < THRESHOLD) {// Back wall
back = angle.get(i);
return;
} else if (current < THRESHOLD && next > THRESHOLD && nextnext > THRESHOLD) {// Left wall
left = angle.get(i);
return;
}
}
}
count = results.size() - 1;
}
if (quitting)
break;
try {
Thread.sleep(50);
} catch (InterruptedException e) {
}
}
}
}
|
[
"hptruong93@gmail.com"
] |
hptruong93@gmail.com
|
a0065e6b8d38d8145987a756c401406e26c5d46a
|
bac24465b09a3a4938965906cba7501423005a9d
|
/src/test/java/com/zx/sms/common/TestBDBQueueMap.java
|
0f3466a1406daf0660ea171ebe3ff3d4d60affcc
|
[
"Apache-2.0"
] |
permissive
|
swjsj/SMSGate
|
05e118283e19799183ab97e3dc1aaeae4819fe1b
|
c63fda717162684a4ea4f705f17d00bf4e1d7cc9
|
refs/heads/netty4
| 2020-04-18T01:35:49.333084
| 2019-01-16T04:53:43
| 2019-01-16T04:53:43
| 167,124,527
| 0
| 0
|
Apache-2.0
| 2019-01-23T05:45:10
| 2019-01-23T05:45:09
| null |
UTF-8
|
Java
| false
| false
| 1,016
|
java
|
package com.zx.sms.common;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import org.apache.commons.lang.time.DateFormatUtils;
import org.junit.Test;
import com.zx.sms.common.util.CachedMillisecondClock;
public class TestBDBQueueMap {
@Test
public void testA() throws InterruptedException
{
// BlockingQueue<Message> queue = BDBStoredMapFactoryImpl.INS.getQueue("testA","testQ");
//
// queue.clear();
// System.out.println(((byte)0x2 << 8 ) | (byte)0x2);
// String prefix = (new StringBuilder()).append("\u3010\u7B2C").append(1).append("/").append(3).append("\u9875\u3011")
// .toString();
// System.out.println(prefix);
ByteBuffer bf = ByteBuffer.allocate(10);
ByteBuf nettybf = Unpooled.buffer();
System.out.println(ByteOrder.nativeOrder());
System.out.println(nettybf.order());
System.out.println(DateFormatUtils.format(CachedMillisecondClock.INS.now(), "yyMMddHHMM"));
}
}
|
[
"jameslover121@163.com"
] |
jameslover121@163.com
|
ce298e13d3c5296ad2e84151dd5182fd0caac40f
|
f69a85b6509aa10d72961b8b8dd322622ec01914
|
/app/src/main/java/com/dyh/commonlib/ui/adapter/SelectDeliveryAddressListAdapter.java
|
64ffc89ad2c9ba05caea60d2bafa079be2475a51
|
[] |
no_license
|
zqlhh/CommonLib
|
012e9528d71866a0005f08229739bd5641ccef34
|
6b97f3a934fdd489cd89505f62fb42d41448b8d6
|
refs/heads/master
| 2022-03-29T18:42:04.620487
| 2020-01-15T08:52:25
| 2020-01-15T08:52:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,722
|
java
|
package com.dyh.commonlib.ui.adapter;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import com.dyh.commonlib.R;
import com.dyh.commonlib.entity.response.DeliveryAddressManageItemBean;
import com.dyh.common.lib.dw.listview.BaseQuickRecyclerViewAdapter;
import com.dyh.common.lib.recyclerview_helper.BaseQuickAdapter;
import com.dyh.common.lib.recyclerview_helper.BaseViewHolder;
/**
* 作者:DongYonghui
* 邮箱:648731994@qq.com
* 创建时间:2019/11/27/027 15:33
* 描述:选择配送地址列表适配器
*/
public class SelectDeliveryAddressListAdapter extends BaseQuickRecyclerViewAdapter<DeliveryAddressManageItemBean> {
public interface OnItemCheckedChangedListener {
void onCheckedChanged(DeliveryAddressManageItemBean item, boolean isChecked);
}
private OnItemCheckedChangedListener onItemCheckedChangedListener;
private SelectedDeliveryAddressListAdapter selectedListAdapter;
public SelectDeliveryAddressListAdapter(int layoutResId, SelectedDeliveryAddressListAdapter selectedListAdapter) {
super(layoutResId);
this.selectedListAdapter = selectedListAdapter;
if (null != selectedListAdapter) {
selectedListAdapter.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
DeliveryAddressManageItemBean itemBean = selectedListAdapter.getItem(position);
selectedListAdapter.remove(position);
notifyDataSetChanged();
if (null != onItemCheckedChangedListener) {
onItemCheckedChangedListener.onCheckedChanged(itemBean, false);
}
}
});
}
}
@Override
protected void convert(@NonNull BaseViewHolder helper, DeliveryAddressManageItemBean item) {
helper.setText(R.id.mNameTextView, item.getRemark())
.setText(R.id.mAddressTextView, item.getAddress());
//监听复选框
CheckBox checkBox = helper.getView(R.id.mCheckBox);
if (null != selectedListAdapter) {
checkBox.setOnCheckedChangeListener(null);
checkBox.setChecked(selectedListAdapter.getData().contains(item));
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
selectedListAdapter.removeItem(item);
selectedListAdapter.addListBottom(item);
} else {
selectedListAdapter.removeItem(item);
}
if (null != onItemCheckedChangedListener) {
onItemCheckedChangedListener.onCheckedChanged(item, isChecked);
}
}
});
}
//点击列表项改变复选框状态
helper.getView(R.id.mRootView).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
checkBox.setChecked(!checkBox.isChecked());
}
});
}
public OnItemCheckedChangedListener getOnItemCheckedChangedListener() {
return onItemCheckedChangedListener;
}
public void setOnItemCheckedChangedListener(OnItemCheckedChangedListener onItemCheckedChangedListener) {
this.onItemCheckedChangedListener = onItemCheckedChangedListener;
}
}
|
[
"648731994@qq.com"
] |
648731994@qq.com
|
6958111d62dda3aac4893f7ee6bd63168b41b9f0
|
674b10a0a3e2628e177f676d297799e585fe0eb6
|
/src/main/java/com/google/android/gms/common/api/internal/zag.java
|
986cd7ffb449c8847c630e49179f28f98db2b430
|
[] |
no_license
|
Rune-Status/open-osrs-osrs-android
|
091792f375f1ea118da4ad341c07cb73f76b3e03
|
551b86ab331af94f66fe0dcb3adc8242bf3f472f
|
refs/heads/master
| 2020-08-08T03:32:10.802605
| 2019-10-08T15:50:18
| 2019-10-08T15:50:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,737
|
java
|
package com.google.android.gms.common.api.internal;
import android.os.DeadObjectException;
import android.os.RemoteException;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.Feature;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.tasks.TaskCompletionSource;
public final class zag extends zac {
private final TaskCompletionSource zacm;
private final TaskApiCall zacq;
private final StatusExceptionMapper zacr;
public zag(int arg1, TaskApiCall arg2, TaskCompletionSource arg3, StatusExceptionMapper arg4) {
super(arg1);
this.zacm = arg3;
this.zacq = arg2;
this.zacr = arg4;
}
public final void zaa(@NonNull Status arg3) {
this.zacm.trySetException(this.zacr.getException(arg3));
}
public final void zaa(zaa arg3) throws DeadObjectException {
try {
this.zacq.doExecute(arg3.zaab(), this.zacm);
return;
}
catch(RuntimeException v3) {
((zab)this).zaa(v3);
return;
}
catch(RemoteException v3_1) {
((zab)this).zaa(zab.zab(v3_1));
return;
}
catch(DeadObjectException v3_2) {
throw v3_2;
}
}
public final void zaa(@NonNull zaab arg2, boolean arg3) {
arg2.zaa(this.zacm, arg3);
}
public final void zaa(@NonNull RuntimeException arg2) {
this.zacm.trySetException(((Exception)arg2));
}
@Nullable public final Feature[] zab(zaa arg1) {
return this.zacq.zabt();
}
public final boolean zac(zaa arg1) {
return this.zacq.shouldAutoResolveMissingFeatures();
}
}
|
[
"kslrtips@gmail.com"
] |
kslrtips@gmail.com
|
bc06b82aa21faa6261dbd040c1b94c16f1846350
|
8b46b9c92e7b35919618b0696b3657ee13010945
|
/src/main/java/org/codelibs/fione/h2o/bindings/pojos/GenericV3.java
|
f389743ba56cd0051259932313be8f57f1020e43
|
[
"Apache-2.0"
] |
permissive
|
fireae/fione
|
837bebc22f7b7d42ed3079ff212eaf17cbcfebc6
|
b26f74d2fff6b9c34f64446503dd45edf0716ed8
|
refs/heads/master
| 2021-03-11T05:02:53.309517
| 2020-03-09T20:49:31
| 2020-03-09T20:49:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,649
|
java
|
/*
* Copyright 2012-2020 CodeLibs Project and the Others.
*
* 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.codelibs.fione.h2o.bindings.pojos;
import com.google.gson.GsonBuilder;
public class GenericV3 extends ModelBuilderSchema<GenericParametersV3> {
/*------------------------------------------------------------------------------------------------------------------
// INHERITED
//------------------------------------------------------------------------------------------------------------------
// Model builder parameters.
public GenericParametersV3 parameters;
// The algo name for this ModelBuilder.
public String algo;
// The pretty algo name for this ModelBuilder (e.g., Generalized Linear Model, rather than GLM).
public String algoFullName;
// Model categories this ModelBuilder can build.
public ModelCategory[] canBuild;
// Indicator whether the model is supervised or not.
public boolean supervised;
// Should the builder always be visible, be marked as beta, or only visible if the user starts up with the
// experimental flag?
public ModelBuilderBuilderVisibility visibility;
// Job Key
public JobV3 job;
// Parameter validation messages
public ValidationMessageV3[] messages;
// Count of parameter validation errors
public int errorCount;
// HTTP status to return for this build.
public int __httpStatus;
// Comma-separated list of JSON field paths to exclude from the result, used like:
// "/3/Frames?_exclude_fields=frames/frame_id/URL,__meta"
public String _excludeFields;
*/
/**
* Public constructor
*/
public GenericV3() {
algo = "";
algoFullName = "";
supervised = false;
errorCount = 0;
__httpStatus = 0;
_excludeFields = "";
}
/**
* Return the contents of this object as a JSON String.
*/
@Override
public String toString() {
return new GsonBuilder().serializeSpecialFloatingPointValues().create().toJson(this);
}
}
|
[
"shinsuke@apache.org"
] |
shinsuke@apache.org
|
4bfc7151e86389cfb6a224842b8c69fa1462456c
|
69c7d4e36de11709d08d3a897b9e7cebf864daf7
|
/app/src/main/java/com/faendir/kepi/vpviewer/contexts/BootBroadcastReceiver.java
|
5cd5339c0ccae3c144b31a63a146ea2b85aec8b3
|
[] |
no_license
|
F43nd1r/VPViewer
|
a524a93eacdb52b614b545ede7f30185d43521a9
|
290c1d009fe44b10a0e2d27bc741db1f741265ad
|
refs/heads/master
| 2021-01-18T20:30:31.406834
| 2016-10-03T18:19:50
| 2016-10-03T18:19:50
| 52,690,192
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,320
|
java
|
package com.faendir.kepi.vpviewer.contexts;
import android.app.AlarmManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import com.faendir.kepi.vpviewer.R;
import com.faendir.kepi.vpviewer.utils.Logger;
import com.faendir.kepi.vpviewer.utils.ServiceManager;
/**
* Created by Lukas on 06.12.2014.
* Starts the service at device startup, if enabled
*/
public class BootBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(@NonNull Context context, @NonNull Intent intent) {
if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
if (sharedPreferences.getBoolean(context.getString(R.string.pref_notify), false)) {
ServiceManager.scheduleService(context, Integer.parseInt(sharedPreferences.getString(context.getString(R.string.pref_interval), String.valueOf(AlarmManager.INTERVAL_HOUR))));
new Logger(context).log(R.string.log_startedBoot);
}
} else new Logger(context).log(R.string.log_badIntent);
}
}
|
[
"lukas.morawietz@gmail.com"
] |
lukas.morawietz@gmail.com
|
68db00d09c1d9a92ebacb5e7ca43d1a8fcc4aa96
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-14-16-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener_ESTest_scaffolding.java
|
071f09b9f1b8e3da04616b0dec42b4c0682b048b
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 04:25:05 UTC 2020
*/
package org.xwiki.rendering.internal.parser.wikimodel;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultXWikiGeneratorListener_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
34e4711cccba3e3744f6a8b579228c10eb956979
|
558667608651dfd5778e3cc1131e9eaf5f1be8d7
|
/smali/com/twocloo/com/cn/activitys/ReadbookDown$1.java
|
d07849bd02f0e661bec857229d42f906ab405b07
|
[] |
no_license
|
gambol/chunqingaikan
|
0cd6b0d3ca855f2d1a5ad22f7be3c46f8b1e6984
|
25fa70619ab484e61124465a0b4bdec1cdb5bf62
|
refs/heads/master
| 2021-01-10T11:13:41.624112
| 2015-03-04T14:08:40
| 2015-03-04T14:08:40
| 36,016,628
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,361
|
java
|
package com.twocloo.com.cn.activitys; class ReadbookDown$1 { void a() { int a;
a=0;// .class Lcom/twocloo/com/cn/activitys/ReadbookDown$1;
a=0;// .super Ljava/lang/Object;
a=0;// .source "ReadbookDown.java"
a=0;//
a=0;// # interfaces
a=0;// .implements Landroid/view/View$OnClickListener;
a=0;//
a=0;//
a=0;// # annotations
a=0;// .annotation system Ldalvik/annotation/EnclosingMethod;
a=0;// value = Lcom/twocloo/com/cn/activitys/ReadbookDown;->onClick(Landroid/view/View;)V
a=0;// .end annotation
a=0;//
a=0;// .annotation system Ldalvik/annotation/InnerClass;
a=0;// accessFlags = 0x0
a=0;// name = null
a=0;// .end annotation
a=0;//
a=0;//
a=0;// # instance fields
a=0;// .field final synthetic this$0:Lcom/twocloo/com/cn/activitys/ReadbookDown;
a=0;//
a=0;//
a=0;// # direct methods
a=0;// .method constructor <init>(Lcom/twocloo/com/cn/activitys/ReadbookDown;)V
a=0;// .locals 0
a=0;//
a=0;// .prologue
a=0;// .line 1
a=0;// iput-object p1, p0, Lcom/twocloo/com/cn/activitys/ReadbookDown$1;->this$0:Lcom/twocloo/com/cn/activitys/ReadbookDown;
a=0;//
a=0;// .line 342
a=0;// invoke-direct {p0}, Ljava/lang/Object;-><init>()V
a=0;//
a=0;// #p0=(Reference,Lcom/twocloo/com/cn/activitys/ReadbookDown$1;);
a=0;// return-void
a=0;// .end method
a=0;//
a=0;//
a=0;// # virtual methods
a=0;// .method public onClick(Landroid/view/View;)V
a=0;// .locals 1
a=0;// .param p1, "arg0" # Landroid/view/View;
a=0;//
a=0;// .prologue
a=0;// .line 345
a=0;// iget-object v0, p0, Lcom/twocloo/com/cn/activitys/ReadbookDown$1;->this$0:Lcom/twocloo/com/cn/activitys/ReadbookDown;
a=0;//
a=0;// #v0=(Reference,Lcom/twocloo/com/cn/activitys/ReadbookDown;);
a=0;// invoke-static {v0}, Lcom/twocloo/com/cn/activitys/ReadbookDown;->access$0(Lcom/twocloo/com/cn/activitys/ReadbookDown;)Landroid/app/Dialog;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// invoke-virtual {v0}, Landroid/app/Dialog;->cancel()V
a=0;//
a=0;// .line 346
a=0;// iget-object v0, p0, Lcom/twocloo/com/cn/activitys/ReadbookDown$1;->this$0:Lcom/twocloo/com/cn/activitys/ReadbookDown;
a=0;//
a=0;// invoke-static {v0}, Lcom/twocloo/com/cn/activitys/ReadbookDown;->access$1(Lcom/twocloo/com/cn/activitys/ReadbookDown;)V
a=0;//
a=0;// .line 347
a=0;// return-void
a=0;// .end method
}}
|
[
"zhenbao.zhou@qunar.com"
] |
zhenbao.zhou@qunar.com
|
12cf4eb448fb26487eac07fd107d9b3ed1037ff7
|
c2d8181a8e634979da48dc934b773788f09ffafb
|
/storyteller/output/gasbooknet/ShowBrandAction.java
|
e68a6d9346ac8cde77f1c4397d93822f6c8971b7
|
[] |
no_license
|
toukubo/storyteller
|
ccb8281cdc17b87758e2607252d2d3c877ffe40c
|
6128b8d275efbf18fd26d617c8503a6e922c602d
|
refs/heads/master
| 2021-05-03T16:30:14.533638
| 2016-04-20T12:52:46
| 2016-04-20T12:52:46
| 9,352,300
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,643
|
java
|
package net.gasbooknet.web.app;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.gasbooknet.model.*;
import net.gasbooknet.model.crud.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import net.enclosing.util.HibernateSession;
public class ShowBrandAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
Brand brand = new BrandImpl();
Criteria criteria = session.createCriteria(Brand.class);
if (req.getParameter("id") != null
&& !req.getParameter("id").equals("")) {
criteria.add(Restrictions.idEq(Integer.valueOf(req
.getParameter("id"))));
brand = (Brand) criteria.uniqueResult();
} else if (req.getAttribute("id") != null
&& !req.getAttribute("id").equals("")) {
criteria.add(Restrictions.idEq(req.getAttribute("id")));
brand = (Brand) criteria.uniqueResult();
}
req.setAttribute("brand",brand);
return mapping.findForward("success");
}
}
|
[
"toukubo@gmail.com"
] |
toukubo@gmail.com
|
0df6d7c5a35abd15eea629eff5993fe531067281
|
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
|
/src/modules/agrega/gestorflujo/src/main/java/es/pode/gestorFlujo/presentacion/objetosPendientes/MostrarODESPendientesDespublicados.java
|
09bd9f85b9307375648ccc731f519d59ed36eb10
|
[] |
no_license
|
nwlg/Colony
|
0170b0990c1f592500d4869ec8583a1c6eccb786
|
07c908706991fc0979e4b6c41d30812d861776fb
|
refs/heads/master
| 2021-01-22T05:24:40.082349
| 2010-12-23T14:49:00
| 2010-12-23T14:49:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,126
|
java
|
// license-header java merge-point
package es.pode.gestorFlujo.presentacion.objetosPendientes;
/**
*
*/
public final class MostrarODESPendientesDespublicados extends org.apache.struts.action.Action
{
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
final MostrarODESPendientesDespublicadosFormImpl specificForm = (MostrarODESPendientesDespublicadosFormImpl)form;
org.apache.struts.action.ActionForward forward = null;
try
{
forward = mapping.findForward("despublicados");
}
catch (java.lang.Exception exception)
{
// we populate the current form with only the request parameters
Object currentForm = request.getSession().getAttribute("form");
// if we can't get the 'form' from the session, try from the request
if (currentForm == null)
{
currentForm = request.getAttribute("form");
}
if (currentForm != null)
{
final java.util.Map parameters = new java.util.HashMap();
for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)
{
final String name = String.valueOf(names.nextElement());
parameters.put(name, request.getParameter(name));
}
try
{
org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
}
catch (java.lang.Exception populateException)
{
// ignore if we have an exception here (we just don't populate).
}
}
throw exception;
}
request.getSession().setAttribute("form", form);
return forward;
}
}
|
[
"build@zeno.siriusit.co.uk"
] |
build@zeno.siriusit.co.uk
|
8a4598426931f9f9d374c9f7870750f129cddf7e
|
a5f2ded17f5d1440bdb5db9a035841022adc6527
|
/src/main/java/edu/uiowa/slis/GeoNames/Feature/FeatureLabel.java
|
80d6ee2376997e26a0d5cb5ff85e99703d66770f
|
[] |
no_license
|
eichmann/GeoNamesTagLib
|
4f879455db4e1cf1996023c73aa389dc6e292e89
|
21cd75a964b8ea316ff9e633508408e7868640c3
|
refs/heads/master
| 2021-12-27T22:40:34.413421
| 2020-01-20T17:44:33
| 2020-01-20T17:44:33
| 135,755,001
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,596
|
java
|
package edu.uiowa.slis.GeoNames.Feature;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
@SuppressWarnings("serial")
public class FeatureLabel extends edu.uiowa.slis.GeoNames.TagLibSupport {
static FeatureLabel currentInstance = null;
private static final Log log = LogFactory.getLog(FeatureLabel.class);
// functional property
public int doStartTag() throws JspException {
try {
Feature theFeature = (Feature)findAncestorWithClass(this, Feature.class);
if (!theFeature.commitNeeded) {
pageContext.getOut().print(theFeature.getLabel());
}
} catch (Exception e) {
log.error("Can't find enclosing Feature for label tag ", e);
throw new JspTagException("Error: Can't find enclosing Feature for label tag ");
}
return SKIP_BODY;
}
public String getLabel() throws JspTagException {
try {
Feature theFeature = (Feature)findAncestorWithClass(this, Feature.class);
return theFeature.getLabel();
} catch (Exception e) {
log.error(" Can't find enclosing Feature for label tag ", e);
throw new JspTagException("Error: Can't find enclosing Feature for label tag ");
}
}
public void setLabel(String label) throws JspTagException {
try {
Feature theFeature = (Feature)findAncestorWithClass(this, Feature.class);
theFeature.setLabel(label);
} catch (Exception e) {
log.error("Can't find enclosing Feature for label tag ", e);
throw new JspTagException("Error: Can't find enclosing Feature for label tag ");
}
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
72abf26d9e023468c327abf2f7518a8d3fdb677a
|
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
|
/hl7/model/V2_7/datastructure/AUI.java
|
209fad4e1e0218fbf465bda5c71b074c66448b0c
|
[] |
no_license
|
nlp-lap/Version_Compatible_HL7_Parser
|
8bdb307aa75a5317265f730c5b2ac92ae430962b
|
9977e1fcd1400916efc4aa161588beae81900cfd
|
refs/heads/master
| 2021-03-03T15:05:36.071491
| 2020-03-09T07:54:42
| 2020-03-09T07:54:42
| 245,967,680
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 8,807
|
java
|
package hl7.model.V2_7.datastructure;
import hl7.bean.datastructure.DataStructure;
import hl7.bean.message.MessageStructure;
import hl7.bean.table.Table;
public class AUI extends hl7.model.V2_6.datastructure.AUI{
public static final String VERSION = "2.7";
public static final String AUTHORIZATION_NUMBER = "Authorization Number";
public static final String DATE = "Date";
public static final String SOURCE = "Source";
public static int SIZE = 3;
public DataStructure[] components = new DataStructure[SIZE];
public static DataStructure[] standard = new DataStructure[SIZE];
public static Table[] tables = new Table[SIZE];
public static String[] descriptions = new String[SIZE];
public static boolean[] required = new boolean[SIZE];
public static boolean[] optional = new boolean[SIZE];
public static boolean[] conditional = new boolean[SIZE];
public static int[] length = new int[SIZE];
static{
standard[0]=hl7.bean.datastructure.primitive.ST.CLASS;
standard[1]=hl7.bean.datastructure.primitive.DT.CLASS;
standard[2]=hl7.bean.datastructure.primitive.ST.CLASS;
tables[0]=null;
tables[1]=null;
tables[2]=null;
descriptions[0]=AUTHORIZATION_NUMBER;
descriptions[1]=DATE;
descriptions[2]=SOURCE;
required[0]=false;
required[1]=false;
required[2]=false;
optional[0]=false;
optional[1]=false;
optional[2]=false;
conditional[0]=false;
conditional[1]=false;
conditional[2]=false;
length[0]=2147483647;
length[1]=2147483647;
length[2]=2147483647;
}
public AUI(){
type = DataStructure.AUI;
}
@Override
public DataStructure cloneClass(String originalVersion, String setVersion) {
hl7.pseudo.datastructure.AUI data = new hl7.pseudo.datastructure.AUI();
data.originalVersion = originalVersion;
data.setVersion = setVersion;
return data;
}
public void depth(int depth) {
super.depth(depth);
this.depth = depth;
for(int i=0; i<components.length; i++){
DataStructure dataStructure = components[i];
if(dataStructure!=null) dataStructure.depth(depth+1);
}
}
public void setVersion(String setVersion) {
super.setVersion(setVersion);
this.setVersion = setVersion;
for(int i=0; i<components.length; i++){
DataStructure dataStructure = components[i];
if(dataStructure!=null) dataStructure.setVersion(setVersion);
}
}
public void originalVersion(String originalVersion) {
super.originalVersion(originalVersion);
this.originalVersion = originalVersion;
for(int i=0; i<components.length; i++){
DataStructure dataStructure = components[i];
if(dataStructure!=null) dataStructure.originalVersion(originalVersion);
}
}
public DataStructure[] getComponents(){
if(setVersion.equals(VERSION)){
return components;
}else{
return super.getComponents();
}
}
private boolean compiled = false; //최초 컴파일 여부 확인
public void decode(String message) throws Exception {
originalComponent = message;
if(MessageStructure.getVersionCode(originalVersion)<MessageStructure.getVersionCode(VERSION)){
super.decode(message);
}else{
compiled = true; //최초 컴파일 여부 확인
char separator = (depth<1)?MessageStructure.COMPONENT_SEPARATOR:MessageStructure.SUBCOMPONENT_SEPARATOR;
String[] comps = divide(message, separator);
if(comps==null) return;
for(int i=0; i<components.length&&comps!=null&&i<comps.length; i++){
components[i] = standard[i].cloneClass(originalVersion, setVersion);
components[i].originalVersion(originalVersion);
components[i].depth(depth+1);
components[i].decode(comps[i]);
}
}
}
/* -----------------------------------------------------------------
* 이전 버전으로 매핑 components:구버전, subComponents:신버전
* 신버전 메시지-->구버전 파서(상위호환)
* -----------------------------------------------------------------
*/
public static void backward(DataStructure[] components, DataStructure[] subComponents, String originalVersion, String setVersion, String prevVersion, int depth) throws Exception{
for(int i=0; subComponents!=null&&i<subComponents.length; i++){
if(i>=SIZE) break;
if(subComponents[i]==null) continue;
if(components[i]==null) continue;
components[i].depth(subComponents[i].depth);
subComponents[i].setVersion(prevVersion);
String data = subComponents[i].encode();
components[i].decode(data);
}
}
/* -----------------------------------------------------------------
* 이후 버전으로 매핑 components:구버전, subComponents:신버전
* 구버전 메시지-->신버전 파서(하위호환)
* -----------------------------------------------------------------
*/
public static void forward(DataStructure[] components, DataStructure[] subComponents, String originalVersion, String setVersion, int depth) throws Exception{
for(int i=0; components!=null&&i<components.length; i++){
if(components[i]==null) continue;
if(i==0) subComponents[i] = components[i];
if(i==1) subComponents[i] = components[i];
if(i==2) subComponents[i] = components[i];
if(components[i]==null) continue;
subComponents[i].depth(components[i].depth);
components[i].setVersion(originalVersion);
String data = components[i].encode();
subComponents[i].decode(data);
}
}
public String encode() throws Exception{
seekOriginalVersion = true; //가장 마지막 메소드에서 위치찾기 옵션 설정
return encode(null);
}
public String encode(DataStructure[] subComponents) throws Exception{
if(seekOriginalVersion&&MessageStructure.getVersionCode(originalVersion)<MessageStructure.getVersionCode(VERSION)){ //실제 버전의 위치 찾기
//실제 버전이 현재 위치가 아닐 때
//실제 버전 위치 찾아가기
return super.encode(null);
}else{//실제 버전의 위치 찾기
seekOriginalVersion = false;
//실제 버전이 현재 위치일 때
if(setVersion.equals(VERSION)){ //설정 버전의 위치 찾기
//설정 버전이 현재 위치일 때
String message = this.makeMessage(components, VERSION);
return message;
}else{ //설정 버전의 위치 찾기
//설정 버전이 현재 위치가 아닐 때
if(MessageStructure.getVersionCode(setVersion)<MessageStructure.getVersionCode(VERSION)){ //버전으로 이동 방향 찾기
//설정 버전이 현재 버전보다 낮을 때 (backward)
//if(MessageStructure.getVersionCode(originalVersion)>=MessageStructure.getVersionCode(VERSION)){
hl7.model.V2_6.datastructure.AUI type = (hl7.model.V2_6.datastructure.AUI)this;
type.backward(type.components, components, originalVersion, setVersion, VERSION, depth);
//}
//설정 버전의 위치로 찾아가기
return super.encode(components);
}else{ //버전으로 이동 방향 찾기
/*-------------------------------------------------------------
*설정 버전이 현재 버전보다 높을 때(forward)
*이후 버전으로 Casting 후 forward 호출
*마지막 버전은 생략
*-----------------------------------------------------------------
*/
encodeVersion = VERSION;
return this.encodeForward(encodeVersion, setVersion);
}
}
}
}
public String encodeForward(String encodeVersion, String setVersion) throws Exception{
//하위 버전으로 인코딩 시 해당 위치를 찾아 가도록 (메소드 오버라이딩 때문에 처음부터 다시 찾아가야 함)
if(encodeVersion.equals(VERSION)){
return null;
}else{
return super.encodeForward(encodeVersion, setVersion);
}
}
public String makeMessage(DataStructure[] components, String version) throws Exception{
if(VERSION.equals(version)){
String message = "";
boolean add = false; //뒤쪽에서 컴포넌트가 존재할 때 true
String component = "";
DataStructure exDS = null;
for(int i=0; i<components.length; i++){
if(components[i]!=null) exDS = components[i];
}
if(exDS==null) return null;
char separator = (exDS.depth<=1)?MessageStructure.COMPONENT_SEPARATOR:MessageStructure.SUBCOMPONENT_SEPARATOR;;
for(int i=components.length-1; i>=0; i--){
DataStructure comp = components[i];
if(comp!=null || required[i]) add=true; //필수항목부터 추가
if(add&&component.length()>0) component = separator + component;
if(comp==null) continue;
String data = comp.encode();
if(length[i]>0&&data!=null&&data.length()>length[i]) data=data.substring(0, length[i]);
component = ((data==null)?"":data) + component;
}
if(message.length()>0) message+=MessageStructure.REPEATITION_SEPARATOR;
message+=component;
return (message.length()==0)?null:message;
}else{
return super.makeMessage(components, version);
}
}
}
|
[
"terminator800@hanmail.net"
] |
terminator800@hanmail.net
|
d6fb25c1012ae94dfd96c69b0234a09486ae3974
|
7dd73504d783c7ebb0c2e51fa98dea2b25c37a11
|
/eaglercraft-main/eaglercraft-main/sp-server/src/main/java/net/minecraft/src/RecipesCrafting.java
|
1910997ec83139ab817269a638ff5074d3f1eb24
|
[
"CC-BY-NC-4.0"
] |
permissive
|
bagel-man/bagel-man.github.io
|
32813dd7ef0b95045f53718a74ae1319dae8c31e
|
eaccb6c00aa89c449c56a842052b4e24f15a8869
|
refs/heads/master
| 2023-04-05T10:27:26.743162
| 2023-03-16T04:24:32
| 2023-03-16T04:24:32
| 220,102,442
| 3
| 21
|
MIT
| 2022-12-14T18:44:43
| 2019-11-06T22:29:24
|
C++
|
UTF-8
|
Java
| false
| false
| 2,382
|
java
|
package net.minecraft.src;
public class RecipesCrafting {
/**
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager par1CraftingManager) {
par1CraftingManager.addRecipe(new ItemStack(Block.chest),
new Object[] { "###", "# #", "###", '#', Block.planks });
par1CraftingManager.addRecipe(new ItemStack(Block.chestTrapped),
new Object[] { "#-", '#', Block.chest, '-', Block.tripWireSource });
par1CraftingManager.addRecipe(new ItemStack(Block.enderChest),
new Object[] { "###", "#E#", "###", '#', Block.obsidian, 'E', Item.eyeOfEnder });
par1CraftingManager.addRecipe(new ItemStack(Block.furnaceIdle),
new Object[] { "###", "# #", "###", '#', Block.cobblestone });
par1CraftingManager.addRecipe(new ItemStack(Block.workbench), new Object[] { "##", "##", '#', Block.planks });
par1CraftingManager.addRecipe(new ItemStack(Block.sandStone), new Object[] { "##", "##", '#', Block.sand });
par1CraftingManager.addRecipe(new ItemStack(Block.sandStone, 4, 2),
new Object[] { "##", "##", '#', Block.sandStone });
par1CraftingManager.addRecipe(new ItemStack(Block.sandStone, 1, 1),
new Object[] { "#", "#", '#', new ItemStack(Block.stoneSingleSlab, 1, 1) });
par1CraftingManager.addRecipe(new ItemStack(Block.blockNetherQuartz, 1, 1),
new Object[] { "#", "#", '#', new ItemStack(Block.stoneSingleSlab, 1, 7) });
par1CraftingManager.addRecipe(new ItemStack(Block.blockNetherQuartz, 2, 2),
new Object[] { "#", "#", '#', new ItemStack(Block.blockNetherQuartz, 1, 0) });
par1CraftingManager.addRecipe(new ItemStack(Block.stoneBrick, 4),
new Object[] { "##", "##", '#', Block.stone });
par1CraftingManager.addRecipe(new ItemStack(Block.fenceIron, 16),
new Object[] { "###", "###", '#', Item.ingotIron });
par1CraftingManager.addRecipe(new ItemStack(Block.thinGlass, 16),
new Object[] { "###", "###", '#', Block.glass });
par1CraftingManager.addRecipe(new ItemStack(Block.redstoneLampIdle, 1),
new Object[] { " R ", "RGR", " R ", 'R', Item.redstone, 'G', Block.glowStone });
par1CraftingManager.addRecipe(new ItemStack(Block.beacon, 1),
new Object[] { "GGG", "GSG", "OOO", 'G', Block.glass, 'S', Item.netherStar, 'O', Block.obsidian });
par1CraftingManager.addRecipe(new ItemStack(Block.netherBrick, 1),
new Object[] { "NN", "NN", 'N', Item.netherrackBrick });
}
}
|
[
"tom@blowmage.com"
] |
tom@blowmage.com
|
83540601fca21dd2a942d9b121d181547ead74fc
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/google/firebase/messaging/b$a.java
|
1f027fe575f92ad6e27f50bb83519d14ed0d737a
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 336
|
java
|
package com.google.firebase.messaging;
public final class b$a
{
public static final int fcm_fallback_notification_channel_label = 2131759851;
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes7.jar
* Qualified Name: com.google.firebase.messaging.b.a
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
4bbd6d0ef289eeadddde7dfb7e1d49c4757231c1
|
40cd4da5514eb920e6a6889e82590e48720c3d38
|
/desktop/old/adv/src/test/java/code/adv/ValChangingImpl.java
|
fdb7c3687b8f95a6f5c1b19dc45dc5b407d87ffa
|
[] |
no_license
|
Cardman/projects
|
02704237e81868f8cb614abb37468cebb4ef4b31
|
23a9477dd736795c3af10bccccb3cdfa10c8123c
|
refs/heads/master
| 2023-08-17T11:27:41.999350
| 2023-08-15T07:09:28
| 2023-08-15T07:09:28
| 34,724,613
| 4
| 0
| null | 2020-10-13T08:08:38
| 2015-04-28T10:39:03
|
Java
|
UTF-8
|
Java
| false
| false
| 445
|
java
|
package code.adv;
public final class ValChangingImpl implements ValueChanging {
private final boolean condition;
private String action = "";
public ValChangingImpl(boolean _condition) {
condition = _condition;
}
@Override
public boolean skip() {
return condition;
}
@Override
public void act() {
action = " ";
}
public String getAction() {
return action;
}
}
|
[
"f.desrochettes@gmail.com"
] |
f.desrochettes@gmail.com
|
650fac67f29fbc61059bdb7d4bf68754cf0e7372
|
ea5606548f813f4b271841f029bfd6c80fc0440e
|
/app/src/main/java/com/example/myapplication/principal.java
|
4e142ec99ed9814736f0ebb8290191e462af4479
|
[] |
no_license
|
wilnierpitre/Tess
|
5fdf9e7743710cb6971d8cba5daf51ffb8b0367a
|
2337b58778fd32029da360a1042bd9a1799caa9a
|
refs/heads/main
| 2023-03-21T15:34:07.224146
| 2021-03-15T15:53:00
| 2021-03-15T15:53:00
| 329,805,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,220
|
java
|
package com.example.myapplication;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import static java.lang.Integer.*;
public class principal extends AppCompatActivity {
TextView txtNombre;
String nombre,apellido,url;
Integer id;
Button cerrarSesion;
ImageButton perfilBtn,agendarCita,btnHistorial,btnlink;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_principal);
cerrarSesion= findViewById(R.id.btnCerrar);
txtNombre= findViewById(R.id.txtNombre);
perfilBtn = findViewById(R.id.imgPerfil);
agendarCita = findViewById(R.id.ImgAgendar);
btnHistorial = findViewById(R.id.historico);
btnlink = findViewById(R.id.redes);
recuperarDatos();
btnlink.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
url="https://www.instagram.com/donperro_/?igshid=v1ys4gazzd5t";
Uri uri = Uri.parse(url);
Intent intent = new Intent(Intent.ACTION_VIEW,uri);
startActivity(intent);
}
});
perfilBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(principal.this,PerfilActivity.class);
startActivity(i);
}
});
cerrarSesion.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences preferences= getSharedPreferences("preferenciasLogin", Context.MODE_PRIVATE);
preferences.edit().clear().commit();
Intent miIntent = new Intent(principal.this,MainActivity.class);
startActivity(miIntent);
finish();
}
});
agendarCita.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent= new Intent(principal.this,CitasActivity.class);
startActivity(intent);
}
});
btnHistorial.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent miIntent = new Intent(principal.this,HisotrialActivity.class);
startActivity(miIntent);
}
});
}
private void recuperarDatos(){
SharedPreferences preferences= getSharedPreferences("preferenciasLogin", Context.MODE_PRIVATE);
nombre = preferences.getString("nombres_usuario","micorreo@gmail.com");
apellido = preferences.getString("apellidos_usuario","micorreo@gmail.com");
id =preferences.getInt("id", Integer.parseInt("0"));
txtNombre.setText(nombre+" "+apellido);
}
//ve+VvYAGt1PGNz6Q
}
|
[
"="
] |
=
|
206bc648e9f072365e202ad75782cb57ade9c5f0
|
c528842c39232c9b1f53dbacbc59b7cdef53e394
|
/src/chapter13_제네릭/CompareMethodExample.java
|
59dd54748bc431837fff4653a82d5da5a134572b
|
[] |
no_license
|
sskim91/thisisjava
|
5a18c8f1cbdebae63e465afbf642da71eabb1f8d
|
fe4398dea6119c13df9b79987142eba6af40ce1a
|
refs/heads/master
| 2021-07-15T20:40:45.024226
| 2017-10-20T11:31:59
| 2017-10-20T11:31:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,075
|
java
|
package chapter13_제네릭;
public class CompareMethodExample {
public static void main(String[] args) {
Pair<Integer, String> p1 = new Pair<Integer, String>(1, "사과");
Pair<Integer, String> p2 = new Pair<Integer, String>(1, "사과");
//구체적인 타입을 명시적으로 지정
boolean result1 = Util.<Integer, String>compare(p1, p2);
if (result1) {
System.out.println("논리적으로 동등한 객체입니다.");
} else {
System.out.println("논리적으로 동등하지 않는 객체입니다.");
}
Pair<String, String> p3 = new Pair<String, String>("user1", "삼성");
Pair<String, String> p4 = new Pair<String, String>("user2", "삼성");
//구체적인 타입을 추정
boolean result2 = Util.compare(p3, p4);
if (result2) {
System.out.println("논리적으로 동등한 객체입니다.");
} else {
System.out.println("논리적으로 동등하지 않는 객체입니다.");
}
}
}
|
[
"tjdtjq91@gmail.com"
] |
tjdtjq91@gmail.com
|
c00b05b83ddc1d3d99d0700302a5687d96c08ed2
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/27/org/apache/commons/math3/geometry/partitioning/utilities/AVLTree_size_263.java
|
263f34a5164063b8dfec49dd15b35e48c75799ed
|
[] |
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,223
|
java
|
org apach common math3 geometri partit util
avl tree
purpos sort element allow
duplic element code equal
code sort set sortedset
specif need null element allow
code equal method suffici
differenti element link delet delet method
implement equal oper
order mark method provid
semant
code sort set sortedset name
code add replac link insert insert
code remov replac link delet
delet
base implement georg kraml put
domain
href www purist org georg avltre index html page
exist
param type element
version
avl tree avltre compar
number element tree root node
number element contain tree root node
size
left left size size
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
70a5ab8eecdbbfea2772f93b13a2fb536703e871
|
8ae8e5d84aa44409e379d366a1e0f1e94cd7a77c
|
/src/main/java/com/djsoft/politicalpick/repository/PersistenceAuditEventRepository.java
|
c5a1851678925ce8f92d53d740d957b3d2304a5e
|
[] |
no_license
|
jewettdiane/political-pick
|
6553dfa85abb8d252dd0669a4c1a28f0389b0192
|
b49fd27417ac5b72ff6f9e05f5ebc33c60512bda
|
refs/heads/master
| 2022-12-26T20:58:18.335276
| 2019-08-23T20:33:40
| 2019-08-23T20:33:40
| 204,066,268
| 0
| 0
| null | 2022-12-16T05:03:09
| 2019-08-23T20:33:27
|
Java
|
UTF-8
|
Java
| false
| false
| 996
|
java
|
package com.djsoft.politicalpick.repository;
import com.djsoft.politicalpick.domain.PersistentAuditEvent;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import java.time.Instant;
import java.util.List;
/**
* Spring Data JPA repository for the {@link PersistentAuditEvent} entity.
*/
public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> {
List<PersistentAuditEvent> findByPrincipal(String principal);
List<PersistentAuditEvent> findByAuditEventDateAfter(Instant after);
List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfter(String principal, Instant after);
List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type);
Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable);
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
672f08bce6b331e13b1f454a07cb7f9a45ca24e0
|
ddec46506cbdee03b495b7bc287b14abab12c701
|
/jdk1.8/src/com/sun/org/apache/xml/internal/dtm/DTMWSFilter.java
|
2aa24700c8bd999843645ef68c67ca2f604efc54
|
[] |
no_license
|
kvenLin/JDK-Source
|
f86737d3761102933c4b87730bca8928a5885287
|
1ff43b09f1056d91de97356be388d58c98ba1982
|
refs/heads/master
| 2023-08-10T11:26:59.051952
| 2023-07-20T06:48:45
| 2023-07-20T06:48:45
| 161,105,850
| 60
| 24
| null | 2022-06-17T02:19:27
| 2018-12-10T02:37:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,827
|
java
|
/*
* Copyright (c) 2007-2012, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: DTMWSFilter.java,v 1.2.4.1 2005/09/15 08:14:55 suresh_emailid Exp $
*/
package com.sun.org.apache.xml.internal.dtm;
/**
* This interface is meant to be implemented by a client of the DTM, and allows
* stripping of whitespace nodes.
*/
public interface DTMWSFilter
{
/**
* Do not strip whitespace child nodes of this element.
*/
public static final short NOTSTRIP = 1;
/**
* Strip whitespace child nodes of this element.
*/
public static final short STRIP = 2;
/**
* Inherit whitespace stripping behavior of the parent node.
*/
public static final short INHERIT = 3;
/**
* Test whether whitespace-only text nodes are visible in the logical
* view of <code>DTM</code>. Normally, this function
* will be called by the implementation of <code>DTM</code>;
* it is not normally called directly from
* user code.
*
* @param elementHandle int Handle of the element.
* @return one of NOTSTRIP, STRIP, or INHERIT.
*/
public short getShouldStripSpace(int elementHandle, DTM dtm);
}
|
[
"1256233771@qq.com"
] |
1256233771@qq.com
|
0c5cef5e89ba07da5c88976197d8314788d78808
|
20cfebfb1552d2cc6637bb2be13be76fd3170e46
|
/leetcode/src/MinCostClimbingStairs.java
|
fea28340710f5bdeba09b916a28739674a35a93a
|
[] |
no_license
|
pankajmore/DPP
|
af7f66b3df36e49e9042eb0344f5dd8a39fc1bbb
|
bbbd2e8b0033411a98b63eba51486215a001ec46
|
refs/heads/master
| 2020-04-04T06:12:13.632124
| 2018-10-12T01:09:37
| 2018-10-12T01:09:37
| 8,388,144
| 9
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 449
|
java
|
/** https://leetcode.com/problems/min-cost-climbing-stairs/description/ */
class MinCostClimbingStairs {
int minCostClimbingStairs(int[] cost) {
if (cost.length < 2) {
return 0;
}
int[] min = new int[cost.length];
for (int i = cost.length - 1; i >= 0; i--) {
min[i] = cost[i];
if (i < cost.length - 2) {
min[i] += Math.min(min[i + 1], min[i + 2]);
}
}
return Math.min(min[0], min[1]);
}
}
|
[
"pankajmore@gmail.com"
] |
pankajmore@gmail.com
|
1c1d2f42b233b652aeaea6f0d473baf68f3b42f9
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.ui/9617.java
|
e7076c4d7ff0c2c1e998f32c3187b187c392aebd
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,243
|
java
|
/*******************************************************************************
* Copyright (c) 2005, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.refactoring.scripting;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ltk.core.refactoring.Refactoring;
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
import org.eclipse.jdt.internal.corext.refactoring.code.ExtractConstantRefactoring;
/**
* Refactoring contribution for the extract constant refactoring.
*
* @since 3.2
*/
public final class ExtractConstantRefactoringContribution extends JavaUIRefactoringContribution {
@Override
public final Refactoring createRefactoring(JavaRefactoringDescriptor descriptor, RefactoringStatus status) throws CoreException {
JavaRefactoringArguments arguments = new JavaRefactoringArguments(descriptor.getProject(), retrieveArgumentMap(descriptor));
return new ExtractConstantRefactoring(arguments, status);
}
@Override
public RefactoringDescriptor createDescriptor() {
return RefactoringSignatureDescriptorFactory.createExtractConstantDescriptor();
}
@Override
public RefactoringDescriptor createDescriptor(String id, String project, String description, String comment, Map<String, String> arguments, int flags) {
return RefactoringSignatureDescriptorFactory.createExtractConstantDescriptor(project, description, comment, arguments, flags);
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
1ad351295e368728ee308ceb81fbcc2b2bd67521
|
86fc030462b34185e0b1e956b70ece610ad6c77a
|
/src/main/java/com/alipay/api/domain/KoubeiMarketingCampaignUserAssetQueryModel.java
|
590c88eff08059450eb5c71044d6ce687a669eac
|
[] |
no_license
|
xiang2shen/magic-box-alipay
|
53cba5c93eb1094f069777c402662330b458e868
|
58573e0f61334748cbb9e580c51bd15b4003f8c8
|
refs/heads/master
| 2021-05-08T21:50:15.993077
| 2018-11-12T07:49:35
| 2018-11-12T07:49:35
| 119,653,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,479
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 用户口碑优惠资产查询接口
*
* @author auto create
* @since 1.0, 2017-08-08 19:56:13
*/
public class KoubeiMarketingCampaignUserAssetQueryModel extends AlipayObject {
private static final long serialVersionUID = 5555383571664619387L;
/**
* 页码
*/
@ApiField("page_num")
private Long pageNum;
/**
* 每页显示数目(最大查询50)
*/
@ApiField("page_size")
private Long pageSize;
/**
* 查询范围:用户所有资产(USER_ALL_ASSET),用户指定商户可用资产(USER_MERCHANT_ASSET),用户指定门店可用资产(USER_SHOP_ASSET);指定USER_SHOP_ASSET必须传递shopid
*/
@ApiField("scope")
private String scope;
/**
* 门店id,如果查询范围是门店,门店id不能为空
*/
@ApiField("shop_id")
private String shopId;
public Long getPageNum() {
return this.pageNum;
}
public void setPageNum(Long pageNum) {
this.pageNum = pageNum;
}
public Long getPageSize() {
return this.pageSize;
}
public void setPageSize(Long pageSize) {
this.pageSize = pageSize;
}
public String getScope() {
return this.scope;
}
public void setScope(String scope) {
this.scope = scope;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
}
|
[
"xiangshuo@10.17.6.161"
] |
xiangshuo@10.17.6.161
|
9e9c28bd4187da0d33751868c5161f946cd600a2
|
bc0c102e0e914e2ec20843067f753a1c522dac85
|
/webDemo/src/service/UserService.java
|
12bf8947de0bf5823de159d6df995ee98a19bcd7
|
[] |
no_license
|
Apuuu66/javaweb
|
2e5131a7262dacd5a1a3dfd9bf74d7ee3fecf572
|
5dba8ada7dc2242ad3ba39cb4ec0015467577976
|
refs/heads/master
| 2022-05-03T07:31:55.788897
| 2017-09-05T14:45:20
| 2017-09-05T14:45:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 554
|
java
|
package service;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.UserDao;
import domain.User;
/**
* Servlet implementation class UserService
*/
public class UserService extends HttpServlet {
public User login(String username, String password) {
// TODO Auto-generated method stub
UserDao userDao = new UserDao();
return userDao.getUserByusernameAndPwd(username,password);
}
}
|
[
"466007639@qq.com"
] |
466007639@qq.com
|
9ae228d9a18bada67efb50ed919013ba596b574f
|
6e3c5dfd47175d647ab4bf0e6c80e2cd44df7580
|
/ObserverReview/src/test/Chrono.java
|
9d7f69c762415dcd40a5f580a64d2efaecb43b6b
|
[] |
no_license
|
dorolyci4/Design-Pattern-Exercices
|
4f4981520a112adfab963fc897af2b2e2a67e31a
|
c0f4b623433b813d6b638c5760804daa818696dd
|
refs/heads/master
| 2022-04-27T22:27:27.705809
| 2020-01-25T23:02:06
| 2020-01-25T23:02:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,026
|
java
|
package test;
import java.util.ArrayList;
import java.util.List;
public class Chrono implements Subject {
private int secondes;
private int minutes;
private int heures;
List<DisplayObserver> displayObservers = new ArrayList<DisplayObserver>();
List<SonnerieObserver> sonnerieObservers = new ArrayList<SonnerieObserver>();
public int getSecondes() {
return secondes;
}
public void setSecondes(int secondes) {
this.secondes = secondes;
}
public int getMinutes() {
return minutes;
}
public void setMinutes(int minutes) {
this.minutes = minutes;
}
public int getHeures() {
return heures;
}
public void setHeures(int heures) {
this.heures = heures;
}
public List<DisplayObserver> getDisplayObservers() {
return displayObservers;
}
public void setDisplayObservers(List<DisplayObserver> displayObservers) {
this.displayObservers = displayObservers;
}
public List<SonnerieObserver> getSonnerieObservers() {
return sonnerieObservers;
}
public void setSonnerieObservers(List<SonnerieObserver> sonnerieObservers) {
this.sonnerieObservers = sonnerieObservers;
}
public void tick(int s, int m, int h) {
if (this.heures != h) {
notifierAllSonnorie();
}
this.setSecondes(s);
this.setMinutes(m);
this.setHeures(h);
// System.out.println("Second :" + secondes + "Minutes :" + minutes + "Heures :"
// + heures);
notifierAllDisplay();
}
@Override
public void createSonnorie(SonnerieObserver s) {
sonnerieObservers.add(s);
}
@Override
public void removeSonnorie(SonnerieObserver s) {
sonnerieObservers.remove(s);
}
@Override
public void notifierAllSonnorie() {
for (SonnerieObserver s : sonnerieObservers) {
s.ding();
}
}
@Override
public void createDisplay(DisplayObserver d) {
displayObservers.add(d);
}
@Override
public void removeDisplay(DisplayObserver d) {
displayObservers.remove(d);
}
@Override
public void notifierAllDisplay() {
for (DisplayObserver d : displayObservers) {
d.afficheTempsEcoule();
}
}
}
|
[
"Hassen.BenSlima"
] |
Hassen.BenSlima
|
77020eb903262d0f4b0066c2418ba33d0eb885da
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/26/26_de7f31b0f40e85924c516cac4c4abe122244ee66/HttpPostUtil/26_de7f31b0f40e85924c516cac4c4abe122244ee66_HttpPostUtil_t.java
|
6a940940abf18c5ed8f730ed083f4790cf079e13
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,675
|
java
|
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001-2012 Michael Bayne, et al.
// http://github.com/samskivert/samskivert/blob/master/COPYING
package com.samskivert.net;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Collections;
import java.util.Map;
import com.samskivert.util.ServiceWaiter;
/**
* Contains utility methods for doing a form post.
*/
public class HttpPostUtil
{
/**
* Return the results of a form post. Note that the http request takes place on another
* thread, but this thread blocks until the results are returned or it times out.
*
* @param url from which to make the request.
* @param submission the entire submission eg "foo=bar&baz=boo&futz=foo".
* @param timeout time to wait for the response, in seconds, or -1 for forever.
*/
public static String httpPost (URL url, String submission, int timeout)
throws IOException, ServiceWaiter.TimeoutException
{
return httpPost(url, submission, timeout, Collections.<String, String>emptyMap());
}
/**
* Return the results of a form post. Note that the http request takes place on another
* thread, but this thread blocks until the results are returned or it times out.
*
* @param url from which to make the request.
* @param submission the entire submission eg "foo=bar&baz=boo&futz=foo".
* @param timeout time to wait for the response, in seconds, or -1 for forever.
* @param requestProps additional request properties.
*/
public static String httpPost (
final URL url, final String submission, int timeout, final Map<String, String> requestProps)
throws IOException, ServiceWaiter.TimeoutException
{
final ServiceWaiter<String> waiter = new ServiceWaiter<String>(
(timeout < 0) ? ServiceWaiter.NO_TIMEOUT : timeout);
Thread tt = new Thread() {
@Override public void run () {
try {
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
for (Map.Entry<String, String> entry : requestProps.entrySet()) {
conn.setRequestProperty(entry.getKey(), entry.getValue());
}
DataOutputStream out = new DataOutputStream(conn.getOutputStream());
out.writeBytes(submission);
out.flush();
out.close();
BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
StringBuilder buf = new StringBuilder();
for (String s; null != (s = reader.readLine()); ) {
buf.append(s);
}
reader.close();
waiter.postSuccess(buf.toString()); // yay
} catch (IOException e) {
waiter.postFailure(e); // boo
}
}
};
tt.start();
if (waiter.waitForResponse()) {
return waiter.getArgument();
} else {
throw (IOException) waiter.getError();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d5957951674979fa861aa33f56a3abe5522657ac
|
7471ad83a2d1e9777dd341cb069ccfafed796ece
|
/26-security/src/main/java/security26/model/Clients.java
|
5f63f9d867bf2537b960fa184d59e9983b53569f
|
[] |
no_license
|
kyo9988789/spring-sercurity
|
18b8a59b54984db769aef93c973ba773576c7e76
|
0a36aab4c437970858ba1511345e6b0040ac94da
|
refs/heads/main
| 2023-03-31T17:45:12.072393
| 2021-04-14T03:22:25
| 2021-04-14T03:22:25
| 357,759,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,033
|
java
|
package security26.model;
import com.alibaba.fastjson.JSON;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.oauth2.provider.ClientDetails;
import java.util.*;
public class Clients implements ClientDetails {
private String clientId;
@Override
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
private String clientSecret;
@Override
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
@Override
public boolean isSecretRequired() {
return clientSecret != null;
}
private String resourceIds;
@Override
public Set<String> getResourceIds() {
if (resourceIds==null||resourceIds.trim().length()<=0){
return Collections.emptySet();
}
Set<String> resourceSet = new LinkedHashSet<>();
String[] resources = resourceIds.split(",");
for (String resource : resources) {
resourceSet.add(resource);
}
return resourceSet;
}
public void setResourceIds(String resourceIds) {
this.resourceIds = resourceIds;
}
private String scope;
@Override
public Set<String> getScope() {
if (scope==null||scope.trim().length()<=0){
return Collections.emptySet();
}
Set<String> scopeSet = new LinkedHashSet<>();
String[] scopes = scope.split(",");
for (String scope : scopes) {
scopeSet.add(scope);
}
return scopeSet;
}
public void setScope(String scope) {
this.scope = scope;
}
@Override
public boolean isScoped() {
return scope!=null&&scope.trim().length()>0;
}
private String authorizedGrantTypes;
@Override
public Set<String> getAuthorizedGrantTypes() {
if (authorizedGrantTypes==null||authorizedGrantTypes.trim().length()<=0){
return Collections.emptySet();
}
Set<String> authorizedGrantTypeSet = new LinkedHashSet<>();
String[] types = authorizedGrantTypes.split(",");
for (String type : types) {
authorizedGrantTypeSet.add(type);
}
return authorizedGrantTypeSet;
}
public void setAuthorizedGrantTypes(String authorizedGrantTypes) {
this.authorizedGrantTypes = authorizedGrantTypes;
}
private String registeredRedirectUris;
@Override
public Set<String> getRegisteredRedirectUri() {
if (registeredRedirectUris==null||registeredRedirectUris.trim().length()<=0){
return Collections.emptySet();
}
Set<String> redirectUriSet = new LinkedHashSet<>();
String[] uris = registeredRedirectUris.split(",");
for (String uri : uris) {
redirectUriSet.add(uri);
}
return redirectUriSet;
}
public void setRegisteredRedirectUri(String registeredRedirectUri) {
this.registeredRedirectUris = registeredRedirectUris;
}
private String authorities;
@Override
public Collection<GrantedAuthority> getAuthorities() {
if (authorities==null||authorities.trim().length()<=0){
return Collections.emptyList();
}
List<GrantedAuthority> authorityList = new ArrayList<>();
String[] authoritiesArray = authorities.split(",");
for (String authorities : authoritiesArray) {
authorityList.add((GrantedAuthority) () -> authorities);
}
return authorityList;
}
public void setAuthorities(String authorities) {
this.authorities = authorities;
}
private Integer accessTokenValiditySeconds;
@Override
public Integer getAccessTokenValiditySeconds() {
return accessTokenValiditySeconds;
}
public void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds) {
this.accessTokenValiditySeconds = accessTokenValiditySeconds;
}
private Integer refreshTokenValiditySeconds;
@Override
public Integer getRefreshTokenValiditySeconds() {
return refreshTokenValiditySeconds;
}
public void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds) {
this.refreshTokenValiditySeconds = refreshTokenValiditySeconds;
}
private String additionalInformation;
@Override
public Map<String, Object> getAdditionalInformation() {
if (additionalInformation==null||additionalInformation.trim().length()<=0){
return Collections.emptyMap();
}
return JSON.parseObject(additionalInformation);
}
public void setAdditionalInformation(String additionalInformation) {
this.additionalInformation = additionalInformation;
}
private String autoApproveScopes;
public Set<String> getAutoApproveScopes() {
if (autoApproveScopes==null||autoApproveScopes.trim().length()<=0){
return Collections.emptySet();
}
Set<String> approveSet = new HashSet<>();
String[] approves = autoApproveScopes.split(",");
for (String approve : approves) {
approveSet.add(approve);
}
return approveSet;
}
public void setAutoApproveScopes(String autoApproveScopes) {
this.autoApproveScopes = autoApproveScopes;
}
@Override
public boolean isAutoApprove(String scope) {
if(getAutoApproveScopes() == null||getAutoApproveScopes().isEmpty()) {
return false;
} else {
Iterator var2 = getAutoApproveScopes().iterator();
String auto;
do {
if(!var2.hasNext()) {
return false;
}
auto = (String)var2.next();
} while(!auto.equals("true") && !scope.matches(auto));
return true;
}
}
}
|
[
"704378949@qq.com"
] |
704378949@qq.com
|
6934734cfa6c7fb8a3569701fb5fafac9d9dd441
|
9491206f1f96009b6f106ece0ff383f12e2c8285
|
/src/main/java/ar/com/system/afip/wsfe/service/api/PaisTipo.java
|
33474e019c79a69d23082dbec2ab4fd665f3b56c
|
[
"Apache-2.0"
] |
permissive
|
sebasira/afip
|
ce687ff7c8d9c69abcc18e30b4d953fc4a3f4dc8
|
f290c63f875e409dd094e09bbae17e41004a73dd
|
refs/heads/master
| 2020-03-29T15:06:37.066950
| 2018-06-06T14:47:35
| 2018-06-06T14:47:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,645
|
java
|
package ar.com.system.afip.wsfe.service.api;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Clase Java para PaisTipo complex type.
*
* <p>
* El siguiente fragmento de esquema especifica el contenido que se espera que
* haya en esta clase.
*
* <pre>
* <complexType name="PaisTipo">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Id" type="{http://www.w3.org/2001/XMLSchema}short"/>
* <element name="Desc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PaisTipo", propOrder = { "id", "desc" })
public class PaisTipo {
@XmlElement(name = "Id")
protected short id;
@XmlElement(name = "Desc")
protected String desc;
/**
* Obtiene el valor de la propiedad id.
*
*/
public short getId() {
return id;
}
/**
* Define el valor de la propiedad id.
*
*/
public void setId(short value) {
this.id = value;
}
/**
* Obtiene el valor de la propiedad desc.
*
* @return possible object is {@link String }
*
*/
public String getDesc() {
return desc;
}
/**
* Define el valor de la propiedad desc.
*
* @param value
* allowed object is {@link String }
*
*/
public void setDesc(String value) {
this.desc = value;
}
}
|
[
"lbrasseur@gmail.com"
] |
lbrasseur@gmail.com
|
ab3ece6297e276537b331801dffc4d960b8bed1f
|
d224ca39564ac26cf7c528fbaac647655598990f
|
/betterlive-service/src/main/java/com/kingleadsw/betterlive/service/UserSingleCouponService.java
|
5f5226756c6739ee46e72c7da159646bafcdf624
|
[] |
no_license
|
Jane007/betterlive
|
ca921a19f92769363c6ea2177b4a315be4a8d50d
|
210ec86c358a985736e3b06ff00de597bc5c01b0
|
refs/heads/master
| 2020-03-14T00:37:53.863259
| 2018-04-28T01:44:59
| 2018-04-28T01:44:59
| 131,360,474
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package com.kingleadsw.betterlive.service;
import java.util.List;
import com.kingleadsw.betterlive.core.page.PageData;import com.kingleadsw.betterlive.core.service.BaseService;
import com.kingleadsw.betterlive.model.UserSingleCoupon;
public interface UserSingleCouponService extends BaseService<UserSingleCoupon>{
List<UserSingleCoupon> queryExpiringList(PageData pd);}
|
[
"zhangjingvc@163.com"
] |
zhangjingvc@163.com
|
9efa5fb9f006b37dcf38e7f769088c2033d40c71
|
a0a5e8655c7b344d2566fc7c585caf443fb17682
|
/src/main/java/com/renxl/club/raft/core/NodeBuilder.java
|
1e85f6d9a92a37261e3682f0aabd8d31b233ed88
|
[] |
no_license
|
renxinlin/renxl-raft
|
c2ee04ee97c3b0f501b967d019357c2c60a2888b
|
ed7cc1c9f3333cd416ef32d1378828db349225bf
|
refs/heads/master
| 2023-01-04T02:34:24.843853
| 2020-09-24T07:26:02
| 2020-09-24T07:26:02
| 290,180,306
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,257
|
java
|
package com.renxl.club.raft.core;
import com.google.common.base.Preconditions;
import com.google.common.eventbus.EventBus;
import com.renxl.club.raft.config.DefaultConfig;
import com.renxl.club.raft.connector.Connector;
import com.renxl.club.raft.connector.NioConnector;
import com.renxl.club.raft.core.member.Endpoint;
import com.renxl.club.raft.core.member.Member;
import com.renxl.club.raft.core.member.MemberGroup;
import com.renxl.club.raft.core.member.NodeId;
import com.renxl.club.raft.core.scheduled.DefaultScheduler;
import com.renxl.club.raft.core.scheduled.NodeWorker;
import com.renxl.club.raft.core.scheduled.Scheduler;
import com.renxl.club.raft.core.store.NodeStore;
import com.renxl.club.raft.core.store.NodeStoreImpl;
import com.renxl.club.raft.log.Log;
import lombok.Data;
import javax.annotation.Nonnull;
import java.util.List;
/**
* @Author renxl
* @Date 2020-08-28 20:42
* @Version 1.0.0
*/
@Data
public class NodeBuilder {
/**
* Group.
* 集群元信息
*/
private final MemberGroup group;
/**
* Self id.
*/
private final NodeId selfId;
/**
* Event bus, INTERNAL.
* 总线
*/
private final EventBus eventBus;
/**
* Node configuration.
* 配置信息
*/
private DefaultConfig config = new DefaultConfig();
private NodeStore nodeStore;
/**
* Starts as standby or not.
* <p>
* 重要: 这个属性在standby启动的时候 作用于catch up阶段
*/
private boolean standby = false;
////////////////////////////////////////////////////////////////////////////
/**
* 一致性组件上下文属性构建 start
*/
private Log log;
/**
* Scheduler, INTERNAL.
*/
private Scheduler scheduler = null;
/**
* Connector, component to communicate between nodes, INTERNAL.
*/
private Connector connector = null;
/**
* Task executor for node, INTERNAL.
*/
private NodeWorker nodeWorker;
/**
* 这里的配置来自于 命令行输入 也就是common-cli组件解析的结果
*/
public NodeBuilder(@Nonnull List<Endpoint> endpoints, @Nonnull NodeId selfId) {
Preconditions.checkNotNull(endpoints);
Preconditions.checkNotNull(selfId);
this.group = new MemberGroup(endpoints, selfId);
this.selfId = selfId;
this.eventBus = new EventBus("eventBus:" + selfId.getId());
}
/**
* Set task executor.
* 测试使用
*
* @param nodeWorker task executor
* @return this
*/
NodeBuilder setTaskExecutor(@Nonnull NodeWorker nodeWorker) {
Preconditions.checkNotNull(nodeWorker);
this.nodeWorker = nodeWorker;
return this;
}
/**
* Build node.
*
* @return node
*/
@Nonnull
public Node build() {
return new NodeImpl(buildContext());
}
/**
* 设置一致性组件的上下文关联的 各种属性
* Build context for node.
*
* @return node context
*/
@Nonnull
private NodeContext buildContext() {
NodeContext context = new NodeContext();
context.setConfig(config == null ? new DefaultConfig() : config);
context.setMemberGroup(group);
context.setSelfId(selfId);
context.setDefaultScheduler(scheduler == null ? new DefaultScheduler(
config.getMinElectionTimeout(),
config.getMaxElectionTimeout(),
config.getLogReplicationInterval()
) : scheduler);
context.setEventBus(eventBus == null ? new EventBus() : eventBus);
context.setLog(null);
context.setNodeWorker(new NodeWorker());
Member member = context.getMemberGroup().getMembers().get(context.getMemberGroup().getSelf());
context.setConnector(createNioConnector(member.getEndpoint().getAddress().getPort()));
context.setNodeStore(nodeStore == null ? new NodeStoreImpl(0, null) : nodeStore);
return context;
}
/**
* 创建rpc组件
* Create nio connector.
*
* @return nio connector
*/
private Connector createNioConnector(int port) {
return new NioConnector(eventBus, port);
}
}
|
[
"123456"
] |
123456
|
1e1410a0a7d6dcb4c3967b68269abc09088107ba
|
a69843c67fd8a5b227837bd253fde3f672739e87
|
/executor/src/test/java/com/linkedpipes/etl/executor/component/configuration/DefaultControlTest.java
|
f57869d23b48ac5fd416a8404acd663af41be046
|
[
"MIT"
] |
permissive
|
eghuro/etl
|
28713014be4db6bb010bd8c6a4e9a8249857ed2f
|
5d74f9156397a4b48ad0eb3d833721dc67ba74a2
|
refs/heads/master
| 2020-04-02T02:41:15.816327
| 2018-09-20T11:44:31
| 2018-09-20T11:44:31
| 153,922,127
| 0
| 0
|
NOASSERTION
| 2018-10-20T15:53:20
| 2018-10-20T15:53:20
| null |
UTF-8
|
Java
| false
| false
| 3,379
|
java
|
package com.linkedpipes.etl.executor.component.configuration;
import com.linkedpipes.etl.executor.api.v1.vocabulary.LP_OBJECTS;
import com.linkedpipes.etl.rdf.utils.RdfBuilder;
import com.linkedpipes.etl.rdf.utils.RdfUtilsException;
import com.linkedpipes.etl.executor.rdf.entity.EntityReference;
import com.linkedpipes.etl.executor.rdf.entity.MergeType;
import com.linkedpipes.etl.rdf.utils.model.ClosableRdfSource;
import com.linkedpipes.etl.rdf.utils.rdf4j.Rdf4jSource;
import com.linkedpipes.etl.rdf.utils.vocabulary.RDF;
import org.junit.Assert;
import org.junit.Test;
import java.util.LinkedList;
import java.util.List;
public class DefaultControlTest {
@Test
public void initFromTwoSources() throws RdfUtilsException {
final ClosableRdfSource source = Rdf4jSource.createInMemory();
final ClosableRdfSource otherSource = Rdf4jSource.createInMemory();
final RdfBuilder builder = RdfBuilder.create(source, "http://graph");
builder.entity("http://des").iri(RDF.TYPE, LP_OBJECTS.DESCRIPTION)
.iri(LP_OBJECTS.HAS_DESCRIBE, "http://type")
.entity(LP_OBJECTS.HAS_MEMBER, "http://des/1")
.iri(LP_OBJECTS.HAS_PROPERTY, "http://value/1")
.iri(LP_OBJECTS.HAS_CONTROL, "http://control/1")
.close()
.entity(LP_OBJECTS.HAS_MEMBER, "http://des/2")
.iri(LP_OBJECTS.HAS_PROPERTY, "http://value/2")
.iri(LP_OBJECTS.HAS_CONTROL, "http://control/2")
.close();
builder.commit();
final RdfBuilder cnf1 = RdfBuilder.create(source, "http://config/1");
cnf1.entity("http://config")
.iri(RDF.TYPE, "http://type")
.string("http://value/1", "1_1")
.string("http://control/1", LP_OBJECTS.NONE)
.string("http://value/2", "1_2")
.string("http://control/2", LP_OBJECTS.FORCE);
cnf1.commit();
final RdfBuilder cnf2 = RdfBuilder.create(otherSource, "http://config/2");
cnf2.entity("http://config")
.iri(RDF.TYPE, "http://type")
.string("http://value/1", "2_1")
.string("http://control/1", LP_OBJECTS.NONE)
.string("http://value/2", "2_1")
.string("http://control/2", LP_OBJECTS.FORCE);
cnf2.commit();
final DefaultControl control = new DefaultControl();
control.loadDefinition(source, "http://type");
final List<EntityReference> refs = new LinkedList<>();
refs.add(new EntityReference("http://config",
"http://config/1", source));
refs.add(new EntityReference("http://config",
"http://config/2", otherSource));
control.init(refs);
control.onReference("http://config", "http://config/1");
Assert.assertEquals(MergeType.SKIP,
control.onProperty("http://value/1"));
Assert.assertEquals(MergeType.LOAD,
control.onProperty("http://value/2"));
control.onReference("http://config", "http://config/2");
Assert.assertEquals(MergeType.LOAD,
control.onProperty("http://value/1"));
Assert.assertEquals(MergeType.SKIP,
control.onProperty("http://value/2"));
source.close();
otherSource.close();
}
}
|
[
"skodapetr@gmail.com"
] |
skodapetr@gmail.com
|
a3eaa9ff85d8c2330bc3411ec1dff0cacac98726
|
a840a5e110b71b728da5801f1f3e591f6128f30e
|
/src/test/java/com/google/security/zynamics/binnavi/Common/GenericEquivalenceRelationFactory.java
|
eb41118bed4f50373783e74b3a4e394bfe294869
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
tpltnt/binnavi
|
0a25d2fde2c6029aeef4fcfec8eead5c8e51f4b4
|
598c361d618b2ca964d8eb319a686846ecc43314
|
refs/heads/master
| 2022-10-20T19:38:30.080808
| 2022-07-20T13:01:37
| 2022-07-20T13:01:37
| 107,143,332
| 0
| 0
|
Apache-2.0
| 2023-08-20T11:22:53
| 2017-10-16T15:02:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,120
|
java
|
/*
Copyright 2014 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.google.security.zynamics.binnavi.Common;
/**
* Factory interface used by the GenericEquivalenceRelationTest class to test arbitrary types. The
* usefulness of the tests executed by the GenericEquivalenceRelationTest class is based on the fact
* that all three instances are different in terms of equals().
*
* @author jannewger@google.com (Jan Newger)
*
*/
public interface GenericEquivalenceRelationFactory<T> {
public T createFirstInstance();
public T createSecondInstance();
public T createThirdInstance();
}
|
[
"cblichmann@google.com"
] |
cblichmann@google.com
|
4a6520b4980950843d12f5a6e3d5117550bff9a9
|
0432a6ad0856a14ce864fc8c18a6ba962b98be15
|
/dubbo-remoting/dubbo-remoting-zookeeper/src/test/java/org/apache/dubbo/remoting/zookeeper/zkclient/ZkClientWrapperTest.java
|
9105b842facd65aa24f2bc7b744e75fe748e6c05
|
[
"Apache-2.0"
] |
permissive
|
wsccoder/incubator-dubbo
|
4661f0fa3eab4dee851b83c16cff3338f8963db7
|
db8293a88a8b1cd77dca1c325e44dcb235e73725
|
refs/heads/master
| 2020-03-28T15:48:36.882476
| 2019-12-27T07:54:00
| 2019-12-27T07:54:00
| 148,628,090
| 3
| 3
|
Apache-2.0
| 2018-09-13T11:30:54
| 2018-09-13T11:30:54
| null |
UTF-8
|
Java
| false
| false
| 2,053
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.remoting.zookeeper.zkclient;
import org.apache.dubbo.common.utils.NetUtils;
import org.I0Itec.zkclient.IZkChildListener;
import org.apache.curator.test.TestingServer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
public class ZkClientWrapperTest {
private TestingServer zkServer;
private ZkClientWrapper zkClientWrapper;
@Before
public void setUp() throws Exception {
int zkServerPort = NetUtils.getAvailablePort();
zkServer = new TestingServer(zkServerPort, true);
zkClientWrapper = new ZkClientWrapper("127.0.0.1:" + zkServerPort, 10000);
}
@After
public void tearDown() throws Exception {
zkServer.stop();
}
@Test
public void testConnectedStatus() {
boolean connected = zkClientWrapper.isConnected();
assertThat(connected, is(false));
zkClientWrapper.start();
IZkChildListener listener = mock(IZkChildListener.class);
zkClientWrapper.subscribeChildChanges("/path", listener);
zkClientWrapper.unsubscribeChildChanges("/path", listener);
}
}
|
[
"ian.luo@gmail.com"
] |
ian.luo@gmail.com
|
81d473c3f5da231b61544bb731f793daf956e772
|
2ba0f4afeee60d48a66c496c68e224f4d48e5c06
|
/src/ca/wimsc/client/mobile/AbstractDropDownMenu.java
|
860b5c49b4ebc8bbfaf5e480a90c194b9e989641
|
[
"Apache-2.0"
] |
permissive
|
jamesagnew/whereismystreetcar
|
6ed7b5252debb141b36b179715695b75d56cf81c
|
2906e511737ebef79d53d61654fccab97d707bb6
|
refs/heads/master
| 2020-06-30T03:21:12.088455
| 2015-07-29T22:25:13
| 2015-07-29T22:25:13
| 39,918,826
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,127
|
java
|
package ca.wimsc.client.mobile;
import ca.wimsc.client.common.map.BaseOuterPanel;
import ca.wimsc.client.common.map.BottomPanel;
import ca.wimsc.client.common.top.BaseTopPanel;
import ca.wimsc.client.common.widgets.google.MobileScrollPanel;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.PopupPanel;
public class AbstractDropDownMenu extends PopupPanel {
private BaseOuterPanel myContainer;
private MobileScrollPanel myScrollPanel;
private FlowPanel myScrollContainerPanel;
public AbstractDropDownMenu(BaseOuterPanel theBaseMapOuterPanel) {
this(theBaseMapOuterPanel, true);
}
public AbstractDropDownMenu(BaseOuterPanel theBaseMapOuterPanel, boolean theAddScrollPanel) {
myContainer = theBaseMapOuterPanel;
addStyleName("topMenuPopup");
if (theAddScrollPanel) {
myScrollContainerPanel = new FlowPanel();
this.add(myScrollContainerPanel);
myScrollPanel = new MobileScrollPanel();
myScrollContainerPanel.add(myScrollPanel);
}
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
resizeMe();
}
});
}
protected FlowPanel getScrollContainerPanel() {
return myScrollContainerPanel;
}
public BaseOuterPanel getContainer() {
return myContainer;
}
protected MobileScrollPanel getScrollPanel() {
return myScrollPanel;
}
protected void resizeMe() {
int width = Window.getClientWidth() - 40;
if (width > 500) {
width = 500;
}
int height = Window.getClientHeight() - (BaseTopPanel.TOP_PANEL_HEIGHT + BottomPanel.BOTTOM_PANEL_HEIGHT + 10);
setSize(width + "px", height + "px");
myScrollPanel.setSizePixels(width, height);
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
c0e69d48d893ae6bc254f88818ba9c2348853c97
|
0554f194b0ea739fc335a152a3145c2ae96b0245
|
/fest-assert-android-test/src/main/java/org/fest/assertions/api/StringAssert_isEmpty_Test.java
|
4d935094e76e1e1115a31676bd39d2adc291049e
|
[
"Apache-2.0"
] |
permissive
|
nicstrong/fest-assertions-android
|
76e4239e34130f72c2503590a9657c316c8570ef
|
2869c3279ae7eaa8dd7e76a9802e33ca5d16fac8
|
refs/heads/master
| 2016-09-09T18:19:20.501101
| 2011-12-18T23:11:23
| 2011-12-18T23:11:23
| 1,804,253
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
/*
* Created on Dec 21, 2010
*
* 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.
*
* Copyright @2010-2011 the original author or authors.
*/
package org.fest.assertions.api;
import static org.mockito.Mockito.*;
import org.fest.assertions.internal.Strings;
import org.junit.*;
/**
* Tests for <code>{@link StringAssert#isEmpty()}</code>.
*
* @author Alex Ruiz
*/
public class StringAssert_isEmpty_Test {
private Strings strings;
private StringAssert assertions;
@Before
public void setUp() {
strings = mock(Strings.class);
assertions = new StringAssert("Yoda");
assertions.strings = strings;
}
@Test
public void should_verify_that_actual_is_empty() {
assertions.isEmpty();
verify(strings).assertEmpty(assertions.info, assertions.actual);
}
}
|
[
"nic.strong@gmail.com"
] |
nic.strong@gmail.com
|
9bb651d49078765697bf84fe4f6d4aaf62c31502
|
67f86bb3d09cbc86cac698b3f0abaf01457a966a
|
/master/ecoware-monitoring-master/ecoware-monitoring-master/ECoWare/src/ecoware/ecowareaccessmanager/ECoWareMessage.java
|
14e49ac9d8a46e15b53778871cba4bcf664ae5cf
|
[
"MIT"
] |
permissive
|
tied/DevArtifacts
|
efba1ccea5f0d832d4227c9fe1a040cb93b9ad4f
|
931aabb8cbf27656151c54856eb2ea7d1153203a
|
refs/heads/master
| 2020-06-06T01:48:32.149972
| 2018-12-08T15:26:16
| 2018-12-08T15:26:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,652
|
java
|
package ecoware.ecowareaccessmanager;
/**
* @author Armando Varriale
*
*/
public class ECoWareMessage {
private String publisherID;
private long timestamp;
private Object messageBody;
private ECoWareEventType eventType;
private String eventName;
private int eventId;
/**
* Create an empty ECoWare message.
*/
public ECoWareMessage() {
this.publisherID = null;
this.timestamp = 0;
this.messageBody = null;
this.eventType = null;
this.eventName = null;
this.eventId = -1;
}
/**
* Create a ECoWare message for a specific standard event (eg "AvgRT", "ArrivalRate", etc.).
* @param publisherID the publisher ID
* @param messageBody the message body
* @param timestamp the message timestamp
* @param eventType the event type
* @param eventId the event id
*/
public ECoWareMessage(String publisherID, Object messageBody, long timestamp, ECoWareEventType eventType, int eventId) {
this.publisherID = publisherID;
this.timestamp = timestamp;
this.messageBody = messageBody;
this.eventType = eventType;
this.eventName = eventType.getValue();
this.eventId = eventId;
}
/**
* Create a ECoWare message for a custom event.
* @param publisherID the publisher ID
* @param messageBody the message body
* @param timestamp the message timestamp
* @param eventName the name for a custom event
* @param eventId the event id
*/
public ECoWareMessage(String publisherID, Object messageBody, long timestamp, String eventName, int eventId) {
this.publisherID = publisherID;
this.timestamp = timestamp;
this.messageBody = messageBody;
this.eventType = ECoWareEventType.CUSTOM_EVENT;
this.eventName = eventName;
this.eventId = eventId;
}
/**
* Returns the publisher ID.
* @return the publisherID
*/
public String getPublisherID() {
return publisherID;
}
/**
* Sets the publisher ID.
* @param publisherID the publisherID to set
*/
public void setPublisherID(String publisherID) {
this.publisherID = publisherID;
}
/**
* Returns the body content of the message.
* @return the messageBody
*/
public Object getMessageBody() {
return messageBody;
}
/**
* Sets the body content of the message.
* @param messageBody the messageBody to set
*/
public void setMessageBody(String messageBody) {
this.messageBody = messageBody;
}
/**
* Returns the timestamp of the message.
* @return the timestamp
*/
public long getTimestamp() {
return timestamp;
}
/**
* Sets the timestamp of the message.
* @param timestamp the timestamp to set
*/
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
/**
* Returns the event type associated to the message.
* @return the event type
*/
public ECoWareEventType getEventType() {
return eventType;
}
/**
* Sets the event type associated to the message.
* @param eventType the event type to set
*/
public void setEventType(ECoWareEventType eventType) {
this.eventType = eventType;
}
/**
* Returns the name of the event associated to the message.
* @return the event name
*/
public String getEventName() {
return eventName;
}
/**
* Sets the name of the event associated to the message.
* @param eventName the event name to set
*/
public void setEventName(String eventName) {
this.eventName = eventName;
}
/**
* Returns the id of the event associated to the message.
* @return the event id
*/
public int getEventId() {
return eventId;
}
/**
* Sets the id of the event associated to the message.
* @param eventId the event id to set
*/
public void setEventId(int eventId) {
this.eventId = eventId;
}
}
|
[
"alexander.rogalsky@yandex.ru"
] |
alexander.rogalsky@yandex.ru
|
edf0804a5a4467870cf1caf140cedf5416499e87
|
1febad71e622d6d5ca9629b93a696a9a7769a845
|
/WebView/app/src/main/java/com/jongkook/android/webview/MainActivity.java
|
156a2125b5fe4200e6a27a8813a1f17775ef0db8
|
[] |
no_license
|
conquerex/AppSettings
|
b49cf094bd1c7c8ee01c0a8952ca38477aa4e97b
|
ce70eb4bccc36e32748d1e094bdcd96ba51dc134
|
refs/heads/master
| 2020-12-28T21:05:41.407365
| 2016-11-25T08:59:14
| 2016-11-25T08:59:14
| 68,562,289
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,003
|
java
|
package com.jongkook.android.webview;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView = (WebView)findViewById(R.id.webView);
webView.setWebViewClient(new WebViewClient());
webView.setWebChromeClient(new WebChromeClient());
WebSettings webSettings = webView.getSettings();
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
// 버튼 위젯
webSettings.setDisplayZoomControls(true);
// javascript
webSettings.setJavaScriptEnabled(true);
webView.loadUrl("http://naver.com");
}
}
|
[
"conquerex@gmail.com"
] |
conquerex@gmail.com
|
fc0277d6af962c9f95b9ce40d4a6aa5e6a57b4f2
|
7f637b3d031cf53c095729c49dcce49a42ea0b68
|
/src/com/kcp/platform/util/jdbc/ConnDB.java
|
68a0dde2ce2e9e455b458826eff0c6b9a4abc872
|
[] |
no_license
|
thisisvoa/kcPlatform
|
1eebbd0a9d940368fd719d3721360c9f334e6f9f
|
d416100a4f75cdc8857bdeebd4d8b72af4138f17
|
refs/heads/master
| 2021-01-21T04:11:33.271292
| 2015-09-29T09:59:32
| 2015-09-29T09:59:32
| 44,574,789
| 0
| 1
| null | 2015-10-20T01:36:59
| 2015-10-20T01:36:59
| null |
UTF-8
|
Java
| false
| false
| 6,320
|
java
|
package com.kcp.platform.util.jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import net.sf.json.JSONArray;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.apache.log4j.Logger;
import com.kcp.platform.util.jdbc.dbType.DataBase;
import com.kcp.platform.util.jdbc.dbType.Oracle;
/**
*
* 类描述:
*
* @Version:1.0
*/
public class ConnDB
{
private static final Logger log = Logger.getLogger(com.kcp.platform.util.jdbc.ConnDB.class);
public Connection cn;
public Statement stmt;
public ResultSet rs;
public String errorMsg;
public boolean Open(DBSrc dbSrc)
{
String uname = dbSrc.getUname();
String password = dbSrc.getPassword();
String url = dbSrc.getUrl();
String className = dbSrc.getDriver();
try
{
Class.forName(className);
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
log.error("连接到据库失败:无法加载JDBC驱动:" + className);
errorMsg = "连接到据库失败:无法加载JDBC驱动:" + className;
return false;
}
try
{
log.debug(url);
cn = DriverManager.getConnection(url, uname, password);
stmt = cn.createStatement();
}
catch(SQLException e)
{
e.printStackTrace();
log.error("连接到据库失败:" + url + " user:" + uname + " password:" + password);
errorMsg = "连接到据库失败:" + url + " user:" + uname + " password:" + password;
return false;
}
return true;
}
public void close()
{
try
{
if(rs != null)
rs.close();
rs = null;
if(stmt != null)
stmt.close();
stmt = null;
if(cn != null)
cn.close();
cn = null;
}
catch(Exception ex)
{
log.error("Close the databse Connection fail:", ex);
errorMsg = "关闭数据库连接失败!";
}
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
/**
* 不带参数
* @param queryString
* @return
*/
public ResultSet query(String queryString)
{
try
{
log.debug("执行的查询:" + queryString);
rs = stmt.executeQuery(queryString);
}
catch(SQLException e)
{
e.printStackTrace();
return null;
}
return rs;
}
// public ResultSet query(String queryString, Object[] params) throws SQLException{
// stmt = cn.prepareStatement(queryString);
// PreparedStatement ps = (PreparedStatement)stmt;
// if(params != null){
// for (int i = 0; i < params.length; i++) {
// ps.setObject(i+1, params[i]);
// }
// }
// try
// {
// log.debug("执行的查询:" + queryString);
// rs = ps.executeQuery(queryString);
// }
// catch(SQLException e)
// {
// e.printStackTrace();
// return null;
// }
// return rs;
// }
public JSONArray RStoJSONArray(JSONArray ja)
{
ResultSet rs = this.rs;
try
{
ResultSetMetaData rsmd = rs.getMetaData();
for(JSONObject jo; rs.next(); ja.add(jo))
{
jo = new JSONObject();
int colCount = rsmd.getColumnCount();
String strColumnName = "";
String strColumnValue = "";
for(int i = 1; i <= colCount; i++)
try
{
strColumnName = rsmd.getColumnName(i);
strColumnValue = rs.getObject(i) != null ? rs.getString(i) : strColumnValue;
if(strColumnValue.indexOf("\n") > 0)
strColumnValue = strColumnValue.substring(0, strColumnValue.indexOf("\n"));
jo.put(strColumnName, strColumnValue);
}
catch(JSONException e)
{
e.printStackTrace();
}
}
}
catch(SQLException e)
{
e.printStackTrace();
return ja;
}
return ja;
}
public JSONArray getTableColumnsName(DBSrc dbSrc, String tableName)
{
ConnDB db = new ConnDB();
db.Open(dbSrc);
DataBase dbType = dbSrc.getDbType();
JSONArray ja = new JSONArray();
try {
String queryString = dbType.getTableColumnsNameSql(tableName);
this.rs = db.query(queryString);
db.RStoJSONArray(ja);
db.close();
} catch (JSONException e) {
e.printStackTrace();
}
return ja;
}
public JSONArray getTables(DBSrc dbSrc)
{
ConnDB db = new ConnDB();
db.Open(dbSrc);
DataBase dbType = dbSrc.getDbType();
JSONArray ja = new JSONArray();
try {
String queryString = dbType.getTablesSql();
this.rs = db.query(queryString);
db.RStoJSONArray(ja);
db.close();
} catch (JSONException e) {
e.printStackTrace();
}
return ja;
}
public Connection getCn()
{
return cn;
}
public void setCn(Connection cn)
{
this.cn = cn;
}
public static void main(String args[])
throws SQLException, JSONException
{
DBSrc dbSrc = new DBSrc(new Oracle(), "本地数据库", "zngjfx", "zngjfx", "orcl", "192.168.0.29", 1521);
ConnDB connDb = new ConnDB();
boolean isAccessSuccess = connDb.Open(dbSrc);
JSONArray ja = connDb.getTables(dbSrc);
System.out.println(ja.toString());
}
}
|
[
"515585452@qq.com"
] |
515585452@qq.com
|
fde6b6d1ff9a4118df98470e2169037338340ac0
|
edc139b0268d5568df88255df03585b5c340b8ca
|
/projects/org.activebpel.rt.bpel.server/src/org/activebpel/rt/bpel/server/deploy/IAeDeploymentHandlerFactory.java
|
258d2ad38826d435328ea26ff2e36e7155ed8563
|
[] |
no_license
|
wangzm05/provenancesys
|
61bad1933b2ff5398137fbbeb930a77086e8660b
|
031c84095c2a7afc4873bd6ef97012831f88e5a8
|
refs/heads/master
| 2020-03-27T19:50:15.067788
| 2009-05-08T06:02:31
| 2009-05-08T06:02:31
| 32,144,610
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
// $Header: /Development/AEDevelopment/projects/org.activebpel.rt.bpel.server/src/org/activebpel/rt/bpel/server/deploy/IAeDeploymentHandlerFactory.java,v 1.2 2007/04/24 00:45:52 rnaylor Exp $
/////////////////////////////////////////////////////////////////////////////
// PROPRIETARY RIGHTS STATEMENT
// The contents of this file represent confidential information that is the
// proprietary property of Active Endpoints, Inc. Viewing or use of
// this information is prohibited without the express written consent of
// Active Endpoints, Inc. Removal of this PROPRIETARY RIGHTS STATEMENT
// is strictly forbidden. Copyright (c) 2002-2007 All rights reserved.
/////////////////////////////////////////////////////////////////////////////
package org.activebpel.rt.bpel.server.deploy;
import org.activebpel.rt.bpel.server.logging.IAeLogWrapper;
/**
* Factory interface for creating deployment handlers.
*/
public interface IAeDeploymentHandlerFactory
{
/**
* Create a new IAeDeploymentHandler interface.
* @param aLogWrapper
*/
public IAeDeploymentHandler newInstance( IAeLogWrapper aLogWrapper );
/**
* Returns the web service deployer.
*/
public IAeWebServicesDeployer getWebServicesDeployer();
}
|
[
"wangzm05@ca528a1e-3b83-11de-a81c-fde7d73ceb89"
] |
wangzm05@ca528a1e-3b83-11de-a81c-fde7d73ceb89
|
5df3feda9a3f62fb2582812f7aea000e84fb62d2
|
cbc16846c28bfb3bd66889c4e0b349303af659f5
|
/codes/javadb/mysql/src/test/java/io/github/dunwu/javadb/MysqlDemoTest.java
|
20022da0798de429fc19cf33b9dbaa6cf972765e
|
[
"Apache-2.0"
] |
permissive
|
liyfree/database
|
a68a7dec1f0ffca61956f8f6511d4d2fab14ab87
|
0c4d6c658d9465b1d0a0cae646b0b1a1416d388a
|
refs/heads/master
| 2020-03-18T11:48:52.682775
| 2018-05-08T12:19:37
| 2018-05-08T12:19:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,473
|
java
|
package io.github.dunwu.javadb;
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Mysql 测试例
*
* @author Zhang Peng
* @see https://dev.mysql.com/doc/connector-j/5.1/en/
*/
public class MysqlDemoTest {
private static Logger logger = LoggerFactory.getLogger(MysqlDemoTest.class);
private static final String DB_HOST = "localhost";
private static final String DB_PORT = "3306";
private static final String DB_SCHEMA = "sakila";
private static final String DB_USER = "root";
private static final String DB_PASSWORD = "root";
private static Statement statement;
private static Connection connection;
@BeforeClass
public static void beforeClass() {
try {
final String DB_URL = String.format("jdbc:mysql://%s:%s/%s", DB_HOST, DB_PORT, DB_SCHEMA);
connection = DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWORD);
// connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/sakila?" + "user=root&password=root");
statement = connection.createStatement();
} catch (SQLException e) {
e.printStackTrace();
}
}
@AfterClass
public static void afterClass() {
try {
if (connection != null) {
connection.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
@Test
public void testString() {
final String sql = "select * from actor limit 10";
try {
ResultSet rs = statement.executeQuery(sql);
// 展开结果集数据库
while (rs.next()) {
// 通过字段检索
int id = rs.getInt("actor_id");
String firstName = rs.getString("first_name");
String lastName = rs.getString("last_name");
Date lastUpdate = rs.getDate("last_update");
// 输出数据
logger.debug("actor_id: {}, first_name: {}, last_name: {}, last_update: {}", id, firstName, lastName,
lastUpdate.toLocalDate());
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
|
[
"forbreak@163.com"
] |
forbreak@163.com
|
0c3d7e50ad6dfd338325f9297ab2ff2a4e7236d3
|
dba87418d2286ce141d81deb947305a0eaf9824f
|
/sources/com/google/android/gms/internal/measurement/zzoj.java
|
4aabae3e6ee58f0c3f5191ca140e0624c96c70fd
|
[] |
no_license
|
Sluckson/copyOavct
|
1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6
|
d20597e14411e8607d1d6e93b632d0cd2e8af8cb
|
refs/heads/main
| 2023-03-09T12:14:38.824373
| 2021-02-26T01:38:16
| 2021-02-26T01:38:16
| 341,292,450
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 572
|
java
|
package com.google.android.gms.internal.measurement;
/* compiled from: com.google.android.gms:play-services-measurement-impl@@17.5.0 */
public final class zzoj implements zzeb<zzom> {
private static zzoj zza = new zzoj();
private final zzeb<zzom> zzb;
public static boolean zzb() {
return ((zzom) zza.zza()).zza();
}
private zzoj(zzeb<zzom> zzeb) {
this.zzb = zzea.zza(zzeb);
}
public zzoj() {
this(zzea.zza(new zzol()));
}
public final /* synthetic */ Object zza() {
return this.zzb.zza();
}
}
|
[
"lucksonsurprice94@gmail.com"
] |
lucksonsurprice94@gmail.com
|
18b2c6c89b31d170f406926a4e79e48a867d7687
|
8ebd5b9bdc37377f5e07c08f80b8036e451c759e
|
/src/main/java/com/stylefeng/guns/modular/system/warpper/DeptWarpper.java
|
bae24b634a7448df9d43c73d31d3b07f834542c6
|
[
"Apache-2.0"
] |
permissive
|
zhmingyong/guns
|
3e9b0f64d96702a6be852bb0e50eb9ddf6c42ada
|
93febef978f35c7f9c4b6e7258355f0ff77c8f38
|
refs/heads/master
| 2021-06-18T23:24:27.883185
| 2017-07-04T09:04:06
| 2017-07-04T09:04:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 778
|
java
|
package com.stylefeng.guns.modular.system.warpper;
import com.stylefeng.guns.common.constant.factory.ConstantFactory;
import com.stylefeng.guns.common.warpper.BaseControllerWarpper;
import com.stylefeng.guns.core.util.ToolUtil;
import java.util.Map;
/**
* 部门列表的包装
*
* @author gaowh
* @date 2017年4月25日 18:10:31
*/
public class DeptWarpper extends BaseControllerWarpper {
public DeptWarpper(Object list) {
super(list);
}
@Override
public void warpTheMap(Map<String, Object> map) {
Integer pid = (Integer) map.get("pid");
if (ToolUtil.isEmpty(pid) || pid.equals(0)) {
map.put("pName", "--");
} else {
map.put("pName", ConstantFactory.me().getDeptName(pid));
}
}
}
|
[
"gwh_2014@163.com"
] |
gwh_2014@163.com
|
ff64b2a05934c7f4afa2fc1a0efe7d4418cb3fb2
|
355c41b5bb8706ad1acb282b828ab50f2a58d1a2
|
/cn/vcity/wbase/common/interceptor/LogInterceptor.java
|
63e798ec1e9e971e4d189b93d3f36c79b5b694a4
|
[] |
no_license
|
goldbo/vcity
|
d7a424f00939ceafbb4f6d06ebfa608321a75c8a
|
645f6a5eb429d3974ef4afa4e3f00ab37f6d5643
|
refs/heads/master
| 2021-01-22T01:54:36.186223
| 2012-02-20T09:30:57
| 2012-02-20T09:30:57
| 3,134,179
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,143
|
java
|
package cn.vcity.wbase.common.interceptor;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionMapping;
import cn.vcity.wbase.common.Constants;
/*import cn.vcity.wbase.web.action.SystemLogin;
import cn.vcity.wbase.web.action.OrgAction;
import cn.vcity.wbase.web.action.PostAction;
import cn.vcity.wbase.web.action.PowerAction;
import cn.vcity.wbase.web.action.ResourceAction;
import cn.vcity.wbase.web.action.RoleAction;
import cn.vcity.wbase.web.action.UploadAction;
import cn.vcity.wbase.web.action.UserAction;*/
/**
* @Title: LogInterceptor.java
* @Package cn.vcity.wbase.common.interceptor
* @Description: TODO(用一句话描述该文件做什么)
* @author CN:谢茂盛 EN:SamHsieh 珠海市网佳科技有限公司.
* @date 2011-4-4 上午10:28:50
* @version V1.0
*/
public class LogInterceptor implements MethodInterceptor {
protected Logger logger = Logger.getLogger(getClass());
public Object invoke(MethodInvocation invocation) throws Throwable {
// TODO Auto-generated method stub
Object[] object = invocation.getArguments();
HttpServletRequest request = null ;
ActionMapping mapping = null;
Object returnObject = new Object();
// 获取ACTION名称
try {
// 通过invocation.getArguments()可以获取代理对象的参数
// 代理的参数是ActionMapping, ActionForm ,HttpServletRequest ,
// HttpServletResponse 四个
// 只不过,这里根据实际情况,我们只需要使用HttpServletRequest,ActionMapping罢了
// 因为这里你要通过request获取session和通过mapping跳转页面
// 因为 Object[] args = invocation.getArguments(); 规定,返回的必须是一个数组
// 所以,没办法,只能迭代把要用的找出来
// 而我们在XML配置的对象都是Struts Action
for (int i = 0; i < object.length; i++) {
if (object[i] instanceof HttpServletRequest)
request = (HttpServletRequest) object[i];
if (object[i] instanceof ActionMapping)
mapping = (ActionMapping) object[i];
}
// 记录用户 create delete update 操作日志
// System.out.println("操作的用户名为:" + user);
// System.out.println("操作者的IP为:" + ip);
// System.out.println("操作的时间为:"
// + new java.sql.Date(System.currentTimeMillis()));
// System.out.println("操作Action 的名称:" + actionName);
// System.out.println("操作的方法为:" + method);
// System.out.println("参数有:" + parameters);
// System.out.println("操作的方法结果为:" + result);
HttpSession session = request.getSession();
Object obj = session.getAttribute(Constants.LOGIN_USER);
if (session == null || obj == null) {
}
//拦截到的ACTION
Object invoObj = invocation.getThis().getClass();
String actionName = invocation.getThis().getClass().getName();//操作Action 的名称
Object op = request.getParameter("action");
String method = op==null?"":op.toString();//操作的方法
String ip = request.getRemoteAddr();//操作者的IP
Date date = new Date(System.currentTimeMillis());//操作的时间
logger.info(invoObj);
logger.info(op);
logger.info(method);
logger.info(ip);
logger.info(date);
/*//需要日志记录的ACTION
Object loginAction = SystemLogin.class;//登录日志
Object orgAction = OrgAction.class;//组织管理日志
Object postAction = PostAction.class;//岗位管理日志
Object powerAction = PowerAction.class;//权限管理日志
Object resourceAction = ResourceAction.class;//资源管理日志
Object roleAction = RoleAction.class;//角色管理日志
Object userAction = UserAction.class;//用户管理日志
Object uploadAction = UploadAction.class;//上传日志
logger.info(userAction);
if(invoObj.equals(userAction)) {
logger.info("相等");
}*/
returnObject = invocation.proceed();
return returnObject;
} catch (Throwable throwable) {
return mapping.findForward("exit");
}
}
/**
* 显示系统返回信息
*
* @param response
* @param message:显示信息
* @param extJs:扩展JS代码
*/
public void returnJsMsg(HttpServletResponse response, String message,
String extJs) {
response.setContentType("text/html;charset=UTF-8");
response.setCharacterEncoding("UTF-8");// 防止弹出的信息出现乱码
// 以上2句代码一定要写在获取out对象之前,否则提示信息为乱码
PrintWriter out;
try {
out = response.getWriter();
out.println("<script language='JavaScript'>");
if (null != message) {
out.println("alert('" + message + "');");
}
out.println(extJs);
out.println("</script>");
out.flush();
out.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
|
[
"549668352@qq.com"
] |
549668352@qq.com
|
7ca3e3c291d5ab4ecf2a2af4e938b0b2bfed170f
|
1148b6ee683b0c4591981a759481c98433a4d472
|
/src/main/java/org/isotc211/gmd/EXGeographicDescriptionPropertyType.java
|
3bd69aea26d76176ef47ee4a864751f56afd26ba
|
[] |
no_license
|
khoeflm/SemNotam_WebApp
|
78c9f6ea8a640f98c033c94d5dfdfec6f3b35b80
|
3bbceaebfd6b9534c4fb81664a9d65c37ec156a1
|
refs/heads/master
| 2021-01-20T08:25:30.884165
| 2018-06-19T17:19:39
| 2018-06-19T17:19:39
| 90,143,773
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 7,743
|
java
|
package org.isotc211.gmd;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.w3.xlink.v1999.ActuateType;
import org.w3.xlink.v1999.ShowType;
import org.w3.xlink.v1999.TypeType;
/**
* <p>Java-Klasse für EX_GeographicDescription_PropertyType complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType name="EX_GeographicDescription_PropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence minOccurs="0">
* <element ref="{http://www.isotc211.org/2005/gmd}EX_GeographicDescription"/>
* </sequence>
* <attGroup ref="{http://www.isotc211.org/2005/gco}ObjectReference"/>
* <attribute ref="{http://www.isotc211.org/2005/gco}nilReason"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EX_GeographicDescription_PropertyType", propOrder = {
"exGeographicDescription"
})
public class EXGeographicDescriptionPropertyType {
@XmlElement(name = "EX_GeographicDescription")
protected EXGeographicDescriptionType exGeographicDescription;
@XmlAttribute(name = "nilReason", namespace = "http://www.isotc211.org/2005/gco")
protected List<String> nilReason;
@XmlAttribute(name = "uuidref")
protected String uuidref;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String titleAttribute;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Ruft den Wert der exGeographicDescription-Eigenschaft ab.
*
* @return
* possible object is
* {@link EXGeographicDescriptionType }
*
*/
public EXGeographicDescriptionType getEXGeographicDescription() {
return exGeographicDescription;
}
/**
* Legt den Wert der exGeographicDescription-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link EXGeographicDescriptionType }
*
*/
public void setEXGeographicDescription(EXGeographicDescriptionType value) {
this.exGeographicDescription = value;
}
/**
* Gets the value of the nilReason property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the nilReason property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNilReason().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getNilReason() {
if (nilReason == null) {
nilReason = new ArrayList<String>();
}
return this.nilReason;
}
/**
* Ruft den Wert der uuidref-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUuidref() {
return uuidref;
}
/**
* Legt den Wert der uuidref-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUuidref(String value) {
this.uuidref = value;
}
/**
* Ruft den Wert der type-Eigenschaft ab.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* Legt den Wert der type-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
/**
* Ruft den Wert der href-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Legt den Wert der href-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
/**
* Ruft den Wert der role-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Legt den Wert der role-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
/**
* Ruft den Wert der arcrole-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* Legt den Wert der arcrole-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
/**
* Ruft den Wert der titleAttribute-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitleAttribute() {
return titleAttribute;
}
/**
* Legt den Wert der titleAttribute-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitleAttribute(String value) {
this.titleAttribute = value;
}
/**
* Ruft den Wert der show-Eigenschaft ab.
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* Legt den Wert der show-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
/**
* Ruft den Wert der actuate-Eigenschaft ab.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* Legt den Wert der actuate-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
}
|
[
"k.hoeflmeier@gmx.at"
] |
k.hoeflmeier@gmx.at
|
95141fd72b0c0bef861c4bd4c6529244c7a9a066
|
61f0a3924ce3433b178cf032a8cda24ddff3000b
|
/moduli-aisimulation/src/main/java/edu/dhbw/mannheim/tigers/sumatra/model/modules/sim/stopcrit/SimStopGameStateReached.java
|
4429972bcfa95d44316331178f0482cc9a1d5dc6
|
[] |
no_license
|
orochigalois/ROBOCUP_SSL_EDU_PLATFORM
|
46e0e011baedea8e9f4643656a8319bf65208175
|
5e7b39559cf32d6682e3a78ace199d9df8ccf395
|
refs/heads/master
| 2021-07-16T08:08:36.893055
| 2017-10-21T03:20:27
| 2017-10-21T03:20:27
| 107,742,374
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 777
|
java
|
/*
* *********************************************************
* Copyright (c) 2017 智动天地(北京)科技有限公司
* All rights reserved.
* Project: 标准平台决策开发系统
* Authors:
* 智动天地(北京)科技有限公司
* *********************************************************
*/
package edu.dhbw.mannheim.tigers.sumatra.model.modules.sim.stopcrit;
import edu.tigers.sumatra.ai.data.EGameStateTeam;
public class SimStopGameStateReached extends ASimStopCriterion
{
private final EGameStateTeam gameState;
public SimStopGameStateReached(final EGameStateTeam gameState)
{
this.gameState = gameState;
}
@Override
protected boolean checkStopSimulation()
{
return getLatestFrame().getTacticalField().getGameState() == gameState;
}
}
|
[
"fudanyinxin@gmail.com"
] |
fudanyinxin@gmail.com
|
5a6528cbfd36840b4b08b19f349bf7bf5761f44e
|
dcde5d889dcc1ab80cb37477f2a51d5d6702d1d9
|
/Bukkit/src/main/java/me/egg82/altfinder/services/lookup/BukkitPlayerInfo.java
|
e8b73063f6a714099e6779a0bf93fb10e811f2b0
|
[
"MIT"
] |
permissive
|
Tominous/AltFinder
|
7f71a07a1ca96736659024245935b10eb94349d2
|
ff78426c59af7fb9e58493cf858771952918171f
|
refs/heads/master
| 2020-05-15T12:03:26.329108
| 2019-04-05T06:41:30
| 2019-04-05T06:41:30
| 182,252,938
| 1
| 0
| null | 2019-04-19T11:13:52
| 2019-04-19T11:13:52
| null |
UTF-8
|
Java
| false
| false
| 5,294
|
java
|
package me.egg82.altfinder.services.lookup;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import ninja.egg82.json.JSONUtil;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class BukkitPlayerInfo implements PlayerInfo {
private static final Logger logger = LoggerFactory.getLogger(BukkitPlayerInfo.class);
private UUID uuid;
private String name;
private static LoadingCache<UUID, String> uuidCache = Caffeine.newBuilder().expireAfterWrite(1L, TimeUnit.HOURS).build(k -> getNameExpensive(k));
private static LoadingCache<String, UUID> nameCache = Caffeine.newBuilder().expireAfterWrite(1L, TimeUnit.HOURS).build(k -> getUUIDExpensive(k));
public BukkitPlayerInfo(UUID uuid) throws IOException {
this.uuid = uuid;
try {
this.name = uuidCache.get(uuid);
} catch (RuntimeException ex) {
if (ex.getCause() instanceof IOException) {
throw (IOException) ex.getCause();
}
throw ex;
}
}
public BukkitPlayerInfo(String name) throws IOException {
this.name = name;
try {
this.uuid = nameCache.get(name);
} catch (RuntimeException ex) {
if (ex.getCause() instanceof IOException) {
throw (IOException) ex.getCause();
}
throw ex;
}
}
public UUID getUUID() { return uuid; }
public String getName() { return name; }
private static String getNameExpensive(UUID uuid) throws IOException {
// Currently-online lookup
Player player = Bukkit.getPlayer(uuid);
if (player != null) {
return player.getName();
}
// Network lookup
HttpURLConnection conn = getConnection("https://api.mojang.com/user/profiles/" + uuid.toString().replace("-", "") + "/names");
int code = conn.getResponseCode();
try (InputStream in = (code == 200) ? conn.getInputStream() : conn.getErrorStream();
InputStreamReader reader = new InputStreamReader(in);
BufferedReader buffer = new BufferedReader(reader)) {
StringBuilder builder = new StringBuilder();
String line;
while ((line = buffer.readLine()) != null) {
builder.append(line);
}
if (code == 200) {
JSONArray json = JSONUtil.parseArray(builder.toString());
JSONObject last = (JSONObject) json.get(json.size() - 1);
String name = (String) last.get("name");
nameCache.put(name, uuid);
return name;
} else if (code == 204) {
// No data exists
return null;
}
} catch (ParseException ex) {
logger.error(ex.getMessage(), ex);
}
return null;
}
private static UUID getUUIDExpensive(String name) throws IOException {
// Currently-online lookup
Player player = Bukkit.getPlayer(name);
if (player != null) {
return player.getUniqueId();
}
// Network lookup
HttpURLConnection conn = getConnection("https://api.mojang.com/users/profiles/minecraft/" + name);
int code = conn.getResponseCode();
try (InputStream in = (code == 200) ? conn.getInputStream() : conn.getErrorStream();
InputStreamReader reader = new InputStreamReader(in);
BufferedReader buffer = new BufferedReader(reader)) {
StringBuilder builder = new StringBuilder();
String line;
while ((line = buffer.readLine()) != null) {
builder.append(line);
}
if (code == 200) {
JSONObject json = JSONUtil.parseObject(builder.toString());
UUID uuid = UUID.fromString(((String) json.get("id")).replaceFirst("(\\p{XDigit}{8})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}+)", "$1-$2-$3-$4-$5"));
name = (String) json.get("name");
uuidCache.put(uuid, name);
return uuid;
} else if (code == 204) {
// No data exists
return null;
}
} catch (ParseException ex) {
logger.error(ex.getMessage(), ex);
}
return null;
}
private static HttpURLConnection getConnection(String url) throws IOException {
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setDoInput(true);
conn.setRequestProperty("Accept", "application/json");
conn.setRequestProperty("Connection", "close");
conn.setRequestProperty("User-Agent", "egg82/BukkitPlayerInfo");
conn.setRequestMethod("GET");
return conn;
}
}
|
[
"phantom_zero@ymail.com"
] |
phantom_zero@ymail.com
|
b049175799101e4b265ab8d0a65d55a915707c0d
|
9690256edcd62204b4bb598b06632c25607212e0
|
/src/main/java/com/issac/SpringDemo/aop/schema/api/introduction/Lockable.java
|
e4df85d587a1ba735cbf68317be2343a6a748ce3
|
[] |
no_license
|
IssacYoung2013/SpringDemo
|
599360fa01b2daf39c2f2faefea369c691ec1a91
|
5947844ab28326cbde287f1a6c5e8d4a7a97920a
|
refs/heads/master
| 2020-03-21T02:08:38.015777
| 2018-06-23T08:21:37
| 2018-06-23T08:21:37
| 137,471,862
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 217
|
java
|
package com.issac.SpringDemo.aop.schema.api.introduction;
/**
*
*
* @author Issac
*
* @date 2018-06-23
* @desc
*/
public interface Lockable {
void lock();
void unlock();
boolean locked();
}
|
[
"issacyoung@msn.cn"
] |
issacyoung@msn.cn
|
48b6aaf3abfdcf3e64e77297dd3ac5979ec125bf
|
d15f0d388d41e00f146e6c0d5c55e2282ada2af4
|
/Transferee/src/main/java/com/hitomi/tilibrary/transfer/RemoteThumState.java
|
9b0273a2f538ad5c78ebcfc3391003464862f4eb
|
[] |
no_license
|
FPhoenixCorneaE/Ignorance
|
0ed600d128918c01590c4e236939e185a9d05bce
|
8737327768d1ab9e5010f6ecca0f3347bae7cbdd
|
refs/heads/master
| 2021-08-07T22:35:50.683896
| 2021-06-16T03:45:01
| 2021-06-16T03:45:01
| 95,649,709
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,876
|
java
|
package com.hitomi.tilibrary.transfer;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import com.hitomi.tilibrary.loader.ImageLoader;
import com.hitomi.tilibrary.style.IProgressIndicator;
import com.hitomi.tilibrary.view.image.TransferImage;
import java.util.List;
/**
* 用户指定了缩略图路径,使用该路径加载缩略图,
* 并使用 {@link TransferImage#CATE_ANIMA_TOGETHER} 动画类型展示图片
* <p>
* Created by hitomi on 2017/5/4.
* <p>
* email: 196425254@qq.com
*/
class RemoteThumState extends TransferState {
RemoteThumState(TransferLayout transfer) {
super(transfer);
}
@Override
public void prepareTransfer(final TransferImage transImage, int position) {
final TransferConfig config = transfer.getTransConfig();
ImageLoader imageLoader = config.getImageLoader();
String imgUrl = config.getThumbnailImageList().get(position);
if (imageLoader.isLoaded(imgUrl)) {
imageLoader.loadThumbnailAsync(imgUrl, transImage, new ImageLoader.ThumbnailCallback() {
@Override
public void onFinish(Drawable drawable) {
transImage.setImageDrawable(drawable == null
? config.getMissDrawable(context) : drawable);
}
});
} else {
transImage.setImageDrawable(config.getMissDrawable(context));
}
}
@Override
public TransferImage createTransferIn(final int position) {
TransferConfig config = transfer.getTransConfig();
TransferImage transImage = createTransferImage(
config.getOriginImageList().get(position));
transformThumbnail(config.getThumbnailImageList().get(position), transImage, true);
transfer.addView(transImage, 1);
return transImage;
}
@Override
public void transferLoad(final int position) {
TransferAdapter adapter = transfer.getTransAdapter();
final TransferConfig config = transfer.getTransConfig();
final TransferImage targetImage = transfer.getTransAdapter().getImageItem(position);
final ImageLoader imageLoader = config.getImageLoader();
final IProgressIndicator progressIndicator = config.getProgressIndicator();
progressIndicator.attach(position, adapter.getParentItem(position));
if (config.isJustLoadHitImage()) {
// 如果用户设置了 JustLoadHitImage 属性,说明在 prepareTransfer 中已经
// 对 TransferImage 裁剪且设置了占位图, 所以这里直接加载原图即可
loadSourceImage(targetImage.getDrawable(), position, targetImage, progressIndicator);
} else {
String thumUrl = config.getThumbnailImageList().get(position);
if (imageLoader.isLoaded(thumUrl)) {
imageLoader.loadThumbnailAsync(thumUrl, targetImage, new ImageLoader.ThumbnailCallback() {
@Override
public void onFinish(Drawable drawable) {
if (drawable == null)
drawable = config.getMissDrawable(context);
loadSourceImage(drawable, position, targetImage, progressIndicator);
}
});
} else {
loadSourceImage(config.getMissDrawable(context), position, targetImage, progressIndicator);
}
}
}
private void loadSourceImage(Drawable drawable, final int position, final TransferImage targetImage, final IProgressIndicator progressIndicator) {
final TransferConfig config = transfer.getTransConfig();
config.getImageLoader().showSourceImage(config.getSourceImageList().get(position),
targetImage, drawable, new ImageLoader.SourceCallback() {
@Override
public void onStart() {
progressIndicator.onStart(position);
}
@Override
public void onProgress(int progress) {
progressIndicator.onProgress(position, progress);
}
@Override
public void onFinish() {
}
@Override
public void onDelivered(int status) {
switch (status) {
case ImageLoader.STATUS_DISPLAY_SUCCESS:
progressIndicator.onFinish(position); // onFinish 只是说明下载完毕,并没更新图像
// 启用 TransferImage 的手势缩放功能
targetImage.enable();
// 绑定点击关闭 Transferee
transfer.bindOnDismissListener(targetImage, position);
break;
case ImageLoader.STATUS_DISPLAY_FAILED: // 加载失败,显示加载错误的占位图
targetImage.setImageDrawable(config.getErrorDrawable(context));
break;
}
}
});
}
@Override
public TransferImage transferOut(final int position) {
TransferImage transImage = null;
TransferConfig config = transfer.getTransConfig();
List<ImageView> originImageList = config.getOriginImageList();
if (position < originImageList.size()) {
transImage = createTransferImage(
originImageList.get(position));
transformThumbnail(config.getThumbnailImageList().get(position), transImage, false);
transfer.addView(transImage, 1);
}
return transImage;
}
}
|
[
"wangkz@digi123.cn"
] |
wangkz@digi123.cn
|
1de87e3e7c28523954e9a8b7a69d25c496147195
|
c33ed30cf351450e27904705a2fdf694a86ac287
|
/springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/SpringWebProvider.java
|
b9f2718c6a7755145913bdbe48c1814e78993173
|
[
"Apache-2.0"
] |
permissive
|
springdoc/springdoc-openapi
|
fb627bd976a1f464914402bdee00b492f6194a49
|
d4f99ac9036a00ade542c3ebb1ce7780a171d7d8
|
refs/heads/main
| 2023-08-20T22:07:34.367597
| 2023-08-16T18:43:24
| 2023-08-16T18:43:24
| 196,475,719
| 2,866
| 503
|
Apache-2.0
| 2023-09-11T19:37:09
| 2019-07-11T23:08:20
|
Java
|
UTF-8
|
Java
| false
| false
| 2,161
|
java
|
/*
*
* *
* * *
* * * *
* * * * * Copyright 2019-2022 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.springdoc.core.providers;
import java.util.Map;
import java.util.Set;
import org.springdoc.core.properties.SpringDocConfigProperties;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* The type Spring web provider.
* @author bnasslahsen
*/
public abstract class SpringWebProvider implements ApplicationContextAware {
/**
* The Application context.
*/
protected ApplicationContext applicationContext;
/**
* The Handler methods.
*/
protected Map handlerMethods;
/**
* Gets handler methods.
*
* @return the handler methods
*/
public abstract Map getHandlerMethods();
/**
* Find path prefix string.
*
* @param springDocConfigProperties the spring doc config properties
* @return the string
*/
public abstract String findPathPrefix(SpringDocConfigProperties springDocConfigProperties);
/**
* Gets active patterns.
*
* @param requestMappingInfo the request mapping info
* @return the active patterns
*/
public abstract Set<String> getActivePatterns(Object requestMappingInfo);
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
}
|
[
"badr.nasslahsen@gmail.com"
] |
badr.nasslahsen@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.