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
f6e3042100746e0ae6901ecae35fc5475069f4a9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_89f7ab3e12da5cc652a5b56395fb7624db1ae63d/TransactionContextImpl/6_89f7ab3e12da5cc652a5b56395fb7624db1ae63d_TransactionContextImpl_s.java
a41bb1e6708b41d8679842fab2e8688b89f18e62
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,744
java
/* * Copyright (c) 2008-2013, Hazelcast, 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.hazelcast.transaction.impl; import com.hazelcast.collection.CollectionProxyId; import com.hazelcast.collection.CollectionProxyType; import com.hazelcast.collection.CollectionService; import com.hazelcast.collection.list.ObjectListProxy; import com.hazelcast.collection.set.ObjectSetProxy; import com.hazelcast.core.*; import com.hazelcast.map.MapService; import com.hazelcast.queue.QueueService; import com.hazelcast.spi.TransactionalService; import com.hazelcast.spi.impl.NodeEngineImpl; import com.hazelcast.transaction.*; import java.util.HashMap; import java.util.Map; /** * @author mdogan 2/26/13 */ final class TransactionContextImpl implements TransactionContext { private final NodeEngineImpl nodeEngine; private final TransactionImpl transaction; private final Map<TransactionalObjectKey, TransactionalObject> txnObjectMap = new HashMap<TransactionalObjectKey, TransactionalObject>(2); TransactionContextImpl(TransactionManagerServiceImpl transactionManagerService, NodeEngineImpl nodeEngine, TransactionOptions options, String ownerUuid) { this.nodeEngine = nodeEngine; this.transaction = new TransactionImpl(transactionManagerService, nodeEngine, options, ownerUuid); } public String getTxnId() { return transaction.getTxnId(); } public void beginTransaction() { transaction.begin(); } public void commitTransaction() throws TransactionException { if (transaction.getTransactionType().equals(TransactionOptions.TransactionType.TWO_PHASE)) { transaction.prepare(); } transaction.commit(); } public void rollbackTransaction() { transaction.rollback(); } @SuppressWarnings("unchecked") public <K, V> TransactionalMap<K, V> getMap(String name) { return (TransactionalMap<K, V>) getTransactionalObject(MapService.SERVICE_NAME, name); } @SuppressWarnings("unchecked") public <E> TransactionalQueue<E> getQueue(String name) { return (TransactionalQueue<E>) getTransactionalObject(QueueService.SERVICE_NAME, name); } @SuppressWarnings("unchecked") public <K, V> TransactionalMultiMap<K, V> getMultiMap(String name) { return (TransactionalMultiMap<K, V>) getTransactionalObject(CollectionService.SERVICE_NAME, new CollectionProxyId(name, null, CollectionProxyType.MULTI_MAP)); } @SuppressWarnings("unchecked") public <E> TransactionalList<E> getList(String name) { return (TransactionalList<E>) getTransactionalObject(CollectionService.SERVICE_NAME, new CollectionProxyId(ObjectListProxy.COLLECTION_LIST_NAME, name, CollectionProxyType.LIST)); } @SuppressWarnings("unchecked") public <E> TransactionalSet<E> getSet(String name) { return (TransactionalSet<E>) getTransactionalObject(CollectionService.SERVICE_NAME, new CollectionProxyId(ObjectSetProxy.COLLECTION_SET_NAME, name, CollectionProxyType.SET)); } @SuppressWarnings("unchecked") public TransactionalObject getTransactionalObject(String serviceName, Object id) { if (transaction.getState() != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + id + "]!"); } TransactionalObjectKey key = new TransactionalObjectKey(serviceName, id); TransactionalObject obj = txnObjectMap.get(key); if (obj == null) { final Object service = nodeEngine.getService(serviceName); if (service instanceof TransactionalService) { nodeEngine.getProxyService().initializeDistributedObject(serviceName, id); obj = ((TransactionalService) service).createTransactionalObject(id, transaction); txnObjectMap.put(key, obj); } else { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } } return obj; } Transaction getTransaction() { return transaction; } private class TransactionalObjectKey { private final String serviceName; private final Object id; TransactionalObjectKey(String serviceName, Object id) { this.serviceName = serviceName; this.id = id; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TransactionalObjectKey)) return false; TransactionalObjectKey that = (TransactionalObjectKey) o; if (!id.equals(that.id)) return false; if (!serviceName.equals(that.serviceName)) return false; return true; } public int hashCode() { int result = serviceName.hashCode(); result = 31 * result + id.hashCode(); return result; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
20d94180771ff7a0e3bcc523d4f56a1c7c04e66a
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project93/src/test/java/org/gradle/test/performance93_4/Test93_317.java
e64551c79e809fae0c96729b78fffd1ccd48a7d4
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance93_4; import static org.junit.Assert.*; public class Test93_317 { private final Production93_317 production = new Production93_317("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
eea37752d6448bba0988f977fb91557dd5960980
c670fe9624e7490e262e90716145fe1f966a9f60
/app_tms_required/src/main/java/tms/space/lbs_driver/tms_required/business_person/PersonalVh.java
f542dafb5f0aa4cbc31ec3bf0c19088d7bc67cd9
[]
no_license
15608447849/lbs_driver
8c747a15ae43555840c75dc8f168fa14fa54b949
f675232d5f51def0cad386c7cfa4574149d8ba49
refs/heads/master
2020-03-27T17:38:12.646649
2018-12-25T09:48:54
2018-12-25T09:48:54
146,863,268
3
0
null
null
null
null
UTF-8
Java
false
false
765
java
package tms.space.lbs_driver.tms_required.business_person; import android.content.Context; import android.support.v7.widget.RecyclerView; import com.leezp.lib.viewholder.annotations.RidClass; import tms.space.lbs_driver.tms_base.recycler.FragmentRecycleViewHolderAbs; import tms.space.lbs_driver.tms_base.viewholder.base.IncRecyclerView; import tms.space.lbs_driver.tms_required.R; /** * Created by Leeping on 2018/7/25. * email: 793065165@qq.com */ @RidClass(R.id.class) public class PersonalVh extends FragmentRecycleViewHolderAbs { public IncRecyclerView list; public PersonalVh(Context context) { super(context, R.layout.frg_person); } @Override public RecyclerView getRecyclerView() { return list.recycler; } }
[ "793065165@qq.com" ]
793065165@qq.com
0b7a62f5dcbf32caff553c22cfcafe98d6774b20
cdf45feab95cbf6670801c5b27e90ed3657d8ea7
/firebaseconnector/src/main/java/it/cosenonjaviste/firebaseconnector/Survey.java
6c28378f69f8b4e84422d5a99c4621adc3f52add
[]
no_license
fabioCollini/AndroidWearCodeLab
eb5895512d185d2a530f5fc078a3a179cff17b4c
19009ba5d14a4ce8288e9924563758d5559824b1
HEAD
2016-08-11T06:25:27.031915
2015-11-04T08:08:39
2015-11-04T08:08:39
45,523,819
2
0
null
null
null
null
UTF-8
Java
false
false
1,491
java
package it.cosenonjaviste.firebaseconnector; import android.support.annotation.Nullable; import com.google.gson.Gson; import java.util.Map; public class Survey { private String question; private Map<String, String> answers; private long timestamp; public Survey() { } public Survey(String question, Map<String, String> answers) { this.question = question; this.answers = answers; } public String getQuestion() { return question; } public Map<String, String> getAnswers() { return answers; } public int getYesCount() { return countAnswers("yes"); } public int getNoCount() { return countAnswers("no"); } private int countAnswers(String value) { int tot = 0; for (Map.Entry<String, String> entry : answers.entrySet()) { if (value.equals(entry.getValue())) { tot++; } } return tot; } public String toJson() { timestamp = System.currentTimeMillis(); return new Gson().toJson(this); } public static Survey parse(String json) { return new Gson().fromJson(json, Survey.class); } @Nullable public String getUserAnswer(String userName) { for (Map.Entry<String, String> entry : answers.entrySet()) { if (userName.equals(entry.getKey())) { return entry.getValue(); } } return null; } }
[ "fabio.collini@gmail.com" ]
fabio.collini@gmail.com
c9c0519f99c4a64859623ab8329a6f981768b9b9
cdceb0cd5840af01e21dd21b2648f571c840e53d
/src/main/java/win/hupubao/mapper/hupubao/ArticleTagMapper.java
fd7525e3d343722e5dd74a6f3d3e1aa4a292f868
[]
no_license
ysdxz207/hupubao
3175935a22e4c1c0e06e11f3399caba24767f556
697edf2e278acd906999576d1e2708f5cbe3d6df
refs/heads/master
2020-03-23T22:29:54.512721
2019-01-18T06:23:18
2019-01-18T06:23:18
52,258,543
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
package win.hupubao.mapper.hupubao; import org.springframework.stereotype.Repository; import win.hupubao.domain.ArticleTag; import win.hupubao.utils.mybatis.MyMapper; @Repository public interface ArticleTagMapper extends MyMapper<ArticleTag> { }
[ "ysdxz207@qq.com" ]
ysdxz207@qq.com
c28002a0c53e31fbce2d588003aa09919eee7676
69736cac0f131234afe0c6aa02e2ac4679f42874
/Dddml.Wms.JavaCommon/src/org/dddml/wms/domain/OrganizationStateEventIdDto.java
5d8f3c547054ebd76c039265d5c9697e65a4efcc
[]
no_license
573000126/wms-4
4455f5238eb651a5026c15bdcbea9071cfb9c5de
7ed986e44a8a801b221288511e7f23c76548d2e9
refs/heads/master
2021-03-10T22:28:53.440247
2016-08-18T09:32:17
2016-08-18T09:32:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,275
java
package org.dddml.wms.domain; public class OrganizationStateEventIdDto { private OrganizationStateEventId value; public OrganizationStateEventIdDto() { this(new OrganizationStateEventId()); } public OrganizationStateEventIdDto(OrganizationStateEventId value) { this.value = value; } public OrganizationStateEventId toOrganizationStateEventId() { return this.value; } public String getOrganizationId() { return this.value.getOrganizationId(); } public void setOrganizationId(String organizationId) { this.value.setOrganizationId(organizationId); } public Long getVersion() { return this.value.getVersion(); } public void setVersion(Long version) { this.value.setVersion(version); } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || obj.getClass() != this.getClass()) { return false; } OrganizationStateEventIdDto other = (OrganizationStateEventIdDto)obj; return value.equals(other.value); } @Override public int hashCode() { return value.hashCode(); } }
[ "yangjiefeng@gmail.com" ]
yangjiefeng@gmail.com
189ba6e0b19b936520d5535b5162342d0df19477
aeb932b777a87f8db00bf4b043c2b6a30876d95b
/wechat-frameword/src/main/java/com/water/wechat/framework/message/resp/NewsMessage.java
b8a5b22095c1d89a91729d2ab1c4e14383538f13
[]
no_license
zhangxiaoxu132113/mw-weichart
b26e4fc8f1e836ed58479798704ca939f0382fdc
47dd0d8c11fafc2fcb8579ea22a165f79cbd2bbe
refs/heads/master
2020-12-02T22:39:54.314388
2017-08-22T10:01:11
2017-08-22T10:01:11
96,163,161
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
package com.water.wechat.framework.message.resp; import java.util.List; /** * ClassName: NewsMessage * @Description: 多图文消息 */ public class NewsMessage extends BaseMessage { // 图文消息个数,限制为10条以内 private int ArticleCount; // 多条图文消息信息,默认第一个item为大图 private List<Article> Articles; public int getArticleCount() { return ArticleCount; } public void setArticleCount(int articleCount) { ArticleCount = articleCount; } public List<Article> getArticles() { return Articles; } public void setArticles(List<Article> articles) { Articles = articles; } }
[ "136218949@qq.com" ]
136218949@qq.com
dff963c82ef3aa4b1f668ce70c5236b87d663ace
c9031206be0be3fa70de1689d5448807c4f4609b
/pigeon-core/src/main/java/payne/framework/pigeon/core/exception/SignerException.java
7e5f69a0d9a5ea7067b673eef1f3a29c0fb953a1
[]
no_license
liangmingjie/pigeon
3d2dff89c32a94c44914cb1d15ef2ca4f4a190f8
a1076afda2cab8ac6aa0f5d41c1f086f45948ef6
refs/heads/master
2020-12-03T05:12:25.785988
2016-01-07T07:21:10
2016-01-07T07:21:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
package payne.framework.pigeon.core.exception; public class SignerException extends Exception { private static final long serialVersionUID = 2868413020300168866L; public SignerException() { super(); } public SignerException(String message, Throwable cause) { super(message, cause); } public SignerException(String message) { super(message); } public SignerException(Throwable cause) { super(cause); } }
[ "646742615@qq.com" ]
646742615@qq.com
55bb8c2836629126885e5c7f63392f8512e3937f
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1758_public/tests/unittests/src/java/module1758_public_tests_unittests/a/Foo2.java
11f8e1d10d3521d877411ea6b5f2a87029877951
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,674
java
package module1758_public_tests_unittests.a; import java.awt.datatransfer.*; import java.beans.beancontext.*; import java.io.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.awt.datatransfer.DataFlavor * @see java.beans.beancontext.BeanContext * @see java.io.File */ @SuppressWarnings("all") public abstract class Foo2<K> extends module1758_public_tests_unittests.a.Foo0<K> implements module1758_public_tests_unittests.a.IFoo2<K> { java.rmi.Remote f0 = null; java.nio.file.FileStore f1 = null; java.sql.Array f2 = null; public K element; public static Foo2 instance; public static Foo2 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1758_public_tests_unittests.a.Foo0.create(input); } public String getName() { return module1758_public_tests_unittests.a.Foo0.getInstance().getName(); } public void setName(String string) { module1758_public_tests_unittests.a.Foo0.getInstance().setName(getName()); return; } public K get() { return (K)module1758_public_tests_unittests.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (K)element; module1758_public_tests_unittests.a.Foo0.getInstance().set(this.element); } public K call() throws Exception { return (K)module1758_public_tests_unittests.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
677e1ae290ef079bee45cef9e577925660896bb3
6b87a819bea2a777e0e022243c200aaecac92cd0
/Java/src/Tema5/Ejercicio_28.java
028a0be335e36f6a1ec03458ca4d9fbbdcecba20
[]
no_license
AngelBarrosoDelRio/EjerciciosJava
02694d0857b4897573937ae7c4b9e2da99265dd3
fb9a19e53b0f5deeefc30c3ea414da2379c2a30f
refs/heads/master
2021-01-17T07:15:23.625260
2016-05-23T19:18:49
2016-05-23T19:18:49
43,482,033
1
0
null
null
null
null
UTF-8
Java
false
false
1,614
java
/* * Escribe un programa que calcule el factorial de un número entero leído por teclado. */ package Tema5; import java.util.Scanner; /** * * @author angelo */ public class Ejercicio_28 { public static void main(String[] args) { Scanner entrada = new Scanner (System.in); System.out.println("A continuacion le pedire que introduzca un numero " + "entero POSITIVO y le dire su factorial"); int numeroIntro; do{ System.out.print("Por favor introduzca un numero: "); numeroIntro= entrada.nextInt(); if(numeroIntro<0){ System.out.println("el numero introducido debe ser positivo."); } }while(numeroIntro<0); int factorial=numeroIntro; if(numeroIntro==0){ System.out.println("El factorial de "+numeroIntro+"!=1"); }else if(numeroIntro>0){ System.out.print("El factorial de "+numeroIntro+"!="); for(int i=1;i<numeroIntro;i++){ factorial*=i; System.out.print(" x "); if(i<=numeroIntro){ System.out.print(i); } } System.out.println(" = "+factorial); System.out.println(""); } } }
[ "you@example.com" ]
you@example.com
5081b8bad0f3d8394848a9db83db9478c125b544
6259a830a3d9e735e6779e41a678a71b4c27feb2
/anchor-plugin-image-task/src/main/java/org/anchoranalysis/plugin/image/task/bean/grouped/selectchannels/All.java
4cbcde6ef9b38c72d2516ffff4f812e9f0ed5284
[ "MIT" ]
permissive
anchoranalysis/anchor-plugins
103168052419b1072d0f8cd0201dabfb7dc84f15
5817d595d171b8598ab9c0195586c5d1f83ad92e
refs/heads/master
2023-07-24T02:38:11.667846
2023-07-18T07:51:10
2023-07-18T07:51:10
240,064,307
2
0
MIT
2023-07-18T07:51:12
2020-02-12T16:48:04
Java
UTF-8
Java
false
false
3,565
java
/*- * #%L * anchor-plugin-image-task * %% * Copyright (C) 2010 - 2020 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche * %% * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * #L% */ package org.anchoranalysis.plugin.image.task.bean.grouped.selectchannels; import java.util.Set; import java.util.stream.Stream; import org.anchoranalysis.core.exception.OperationFailedException; import org.anchoranalysis.core.functional.CheckedStream; import org.anchoranalysis.core.identifier.provider.NamedProviderGetException; import org.anchoranalysis.image.core.stack.Stack; import org.anchoranalysis.plugin.image.task.channel.aggregator.NamedChannels; import org.anchoranalysis.plugin.image.task.grouped.ChannelSource; /** * Selects all possible channels from all possible stacks * * <p>If a stack has a single-channel, it it uses this name as an output If a stack has multiple * channels, this name is used but suffixed with a number of each channel (00, 01 etc.) * * @author Owen Feehan */ public class All extends FromStacks { @Override public NamedChannels selectChannels(ChannelSource source, boolean checkType) throws OperationFailedException { Set<String> keys = source.getStackStore().keys(); Stream<NamedChannels> stream = CheckedStream.map( keys.stream(), OperationFailedException.class, key -> extractAllChannels(source, key, checkType)); return new NamedChannels(stream); } private NamedChannels extractAllChannels( ChannelSource source, String stackName, boolean checkType) throws OperationFailedException { try { // We make a single histogram Stack stack = source.getStackStore().getException(stackName); NamedChannels out = new NamedChannels(stack.isRGB()); for (int i = 0; i < stack.getNumberChannels(); i++) { String outputName = stackName + createSuffix(i, stack.getNumberChannels() > 1); out.add(outputName, source.extractChannel(stack, checkType, i)); } return out; } catch (NamedProviderGetException e) { throw new OperationFailedException(e.summarize()); } } private static String createSuffix(int index, boolean hasMultipleChannels) { if (hasMultipleChannels) { return String.format("%02d", index); } else { return ""; } } }
[ "owenfeehan@users.noreply.github.com" ]
owenfeehan@users.noreply.github.com
20503271e9add46dceeb2182e3f1c90abbaca405
cdeee1295065d0ba965dd0c502973e9c3aa60618
/gameserver/data/scripts/quests/_147_PathToBecomingAnEliteMercenary.java
a3c2519a262c0cea94402c2c7b6532e104566af9
[]
no_license
forzec/l-server
526b1957f289a4223942d3746143769c981a5508
0f39edf60a14095b269b4a87c1b1ac01c2eb45d8
refs/heads/master
2021-01-10T11:39:14.088518
2016-03-19T18:28:04
2016-03-19T18:28:04
54,065,298
5
0
null
null
null
null
UTF-8
Java
false
false
4,565
java
package quests; import org.mmocore.gameserver.model.Player; import org.mmocore.gameserver.model.entity.events.impl.DominionSiegeEvent; import org.mmocore.gameserver.model.entity.residence.Castle; import org.mmocore.gameserver.model.instances.NpcInstance; import org.mmocore.gameserver.model.quest.Quest; import org.mmocore.gameserver.model.quest.QuestState; import org.mmocore.gameserver.network.l2.components.NpcString; import org.mmocore.gameserver.network.l2.s2c.ExShowScreenMessage; /** * @author pchayka */ public class _147_PathToBecomingAnEliteMercenary extends Quest { private final int[] MERCENARY_CAPTAINS = { 36481, 36482, 36483, 36484, 36485, 36486, 36487, 36488, 36489 }; private final int[] CATAPULTAS = { 36499, 36500, 36501, 36502, 36503, 36504, 36505, 36506, 36507 }; public _147_PathToBecomingAnEliteMercenary() { super(PARTY_ALL); addStartNpc(MERCENARY_CAPTAINS); addKillId(CATAPULTAS); } @Override public String onEvent(String event, QuestState st, NpcInstance npc) { String htmltext = event; if(event.equalsIgnoreCase("gludio_merc_cap_q0147_04b.htm")) { st.giveItems(13766, 1); } else if(event.equalsIgnoreCase("gludio_merc_cap_q0147_07.htm")) { st.setCond(1); st.setState(STARTED); st.playSound(SOUND_ACCEPT); } return htmltext; } @Override public String onTalk(NpcInstance npc, QuestState st) { Player player = st.getPlayer(); Castle castle = npc.getCastle(); String htmlText = NO_QUEST_DIALOG; int cond = st.getCond(); if(cond == 0) { if(player.getClan() != null) { if(player.getClan().getCastle() == castle.getId()) return "gludio_merc_cap_q0147_01.htm"; else if(player.getClan().getCastle() > 0) return "gludio_merc_cap_q0147_02.htm"; } if(player.getLevel() < 40 || player.getClassId().getLevel() <= 2) htmlText = "gludio_merc_cap_q0147_03.htm"; else if(st.getQuestItemsCount(13766) < 1) htmlText = "gludio_merc_cap_q0147_04a.htm"; else htmlText = "gludio_merc_cap_q0147_04.htm"; } else if(cond == 1 || cond == 2 || cond == 3) htmlText = "gludio_merc_cap_q0147_08.htm"; else if(cond == 4) { htmlText = "gludio_merc_cap_q0147_09.htm"; st.takeAllItems(13766); st.giveItems(13767, 1); st.setState(COMPLETED); st.playSound(SOUND_FINISH); st.exitCurrentQuest(false); } return htmlText; } @Override public String onKill(Player killed, QuestState st) { if(st.getCond() == 1 || st.getCond() == 3) { if(isValidKill(killed, st.getPlayer())) { int killedCount = st.getInt("enemies"); int maxCount = 10; killedCount++; if(killedCount < maxCount) { st.set("enemies", killedCount); st.getPlayer().sendPacket(new ExShowScreenMessage(NpcString.YOU_HAVE_DEFEATED_S2_OF_S1_ENEMIES, 4000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true, String.valueOf(maxCount), String.valueOf(killedCount))); } else { if(st.getCond() == 1) st.setCond(2); else if(st.getCond() == 3) st.setCond(4); st.unset("enemies"); st.getPlayer().sendPacket(new ExShowScreenMessage(NpcString.YOU_WEAKENED_THE_ENEMYS_ATTACK, 4000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true)); } } } return null; } @Override public String onKill(NpcInstance npc, QuestState st) { if(isValidNpcKill(st.getPlayer(), npc)) { if(st.getCond() == 1) st.setCond(3); else if(st.getCond() == 2) st.setCond(4); } return null; } private boolean isValidKill(Player killed, Player killer) { DominionSiegeEvent killedSiegeEvent = killed.getEvent(DominionSiegeEvent.class); DominionSiegeEvent killerSiegeEvent = killer.getEvent(DominionSiegeEvent.class); if(killedSiegeEvent == null || killerSiegeEvent == null) return false; if(killedSiegeEvent == killerSiegeEvent) return false; if(killed.getLevel() < 61) return false; return true; } private boolean isValidNpcKill(Player killer, NpcInstance npc) { DominionSiegeEvent npcSiegeEvent = npc.getEvent(DominionSiegeEvent.class); DominionSiegeEvent killerSiegeEvent = killer.getEvent(DominionSiegeEvent.class); if(npcSiegeEvent == null || killerSiegeEvent == null) return false; if(npcSiegeEvent == killerSiegeEvent) return false; return true; } @Override public void onCreate(QuestState qs) { super.onCreate(qs); qs.addPlayerOnKillListener(); } @Override public void onAbort(QuestState qs) { qs.removePlayerOnKillListener(); super.onAbort(qs); } }
[ "dmitry@0xffff" ]
dmitry@0xffff
3f20026993e2ec593e9ff633b39d1c6f90f64794
abc31f87a253ae4d73cb9d3219af6874f917d955
/aliyun-java-sdk-iot/src/main/java/com/aliyuncs/iot/model/v20160530/SubTopicFilterRequest.java
12d1e727fe9d8c4138795df85dbd21d8153224cd
[ "Apache-2.0" ]
permissive
nocb/aliyun-openapi-java-sdk
edd274a67671df07c399e5d0b780f47ac6ac5178
ddbb07da2743fd9f64dd018c658fcbc35b813027
refs/heads/master
2021-01-01T06:37:16.017716
2017-07-14T10:08:31
2017-07-14T10:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,039
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.aliyuncs.iot.model.v20160530; import com.aliyuncs.RpcAcsRequest; import java.util.List; /** * @author auto create * @version */ public class SubTopicFilterRequest extends RpcAcsRequest<SubTopicFilterResponse> { public SubTopicFilterRequest() { super("Iot", "2016-05-30", "SubTopicFilter"); } private List<String> topics; private Long productKey; private String subCallback; public List<String> getTopics() { return this.topics; } public void setTopics(List<String> topics) { this.topics = topics; for (int i = 0; i < topics.size(); i++) { putQueryParameter("Topic." + (i + 1) , topics.get(i)); } } public Long getProductKey() { return this.productKey; } public void setProductKey(Long productKey) { this.productKey = productKey; putQueryParameter("ProductKey", productKey); } public String getSubCallback() { return this.subCallback; } public void setSubCallback(String subCallback) { this.subCallback = subCallback; putQueryParameter("SubCallback", subCallback); } @Override public Class<SubTopicFilterResponse> getResponseClass() { return SubTopicFilterResponse.class; } }
[ "ling.wu@alibaba-inc.com" ]
ling.wu@alibaba-inc.com
ca3bb93326764b05677c3d259e6a12764ec6d427
acd9b11687fd0b5d536823daf4183a596d4502b2
/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelStats.java
6446023640de7d9a525e6f477d48c57431917a64
[ "Apache-2.0" ]
permissive
szabosteve/elasticsearch-java
75be71df80a4e010abe334a5288b53fa4a2d6d5e
79a1249ae77be2ce9ebd5075c1719f3c8be49013
refs/heads/main
2023-08-24T15:36:51.047105
2021-10-01T14:23:34
2021-10-01T14:23:34
399,091,850
0
0
Apache-2.0
2021-08-23T12:15:19
2021-08-23T12:15:19
null
UTF-8
Java
false
false
7,407
java
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ //---------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- package co.elastic.clients.elasticsearch.ml; import co.elastic.clients.json.DelegatingDeserializer; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ModelTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; // typedef: ml._types.TrainedModelStats @JsonpDeserializable public final class TrainedModelStats implements JsonpSerializable { private final String modelId; private final int pipelineCount; @Nullable private final TrainedModelInferenceStats inferenceStats; @Nullable private final Map<String, JsonData> ingest; // --------------------------------------------------------------------------------------------- public TrainedModelStats(Builder builder) { this.modelId = Objects.requireNonNull(builder.modelId, "model_id"); this.pipelineCount = Objects.requireNonNull(builder.pipelineCount, "pipeline_count"); this.inferenceStats = builder.inferenceStats; this.ingest = ModelTypeHelper.unmodifiable(builder.ingest); } public TrainedModelStats(Function<Builder, Builder> fn) { this(fn.apply(new Builder())); } /** * The unique identifier of the trained model. * <p> * API name: {@code model_id} */ public String modelId() { return this.modelId; } /** * The number of ingest pipelines that currently refer to the model. * <p> * API name: {@code pipeline_count} */ public int pipelineCount() { return this.pipelineCount; } /** * A collection of inference stats fields. * <p> * API name: {@code inference_stats} */ @Nullable public TrainedModelInferenceStats inferenceStats() { return this.inferenceStats; } /** * A collection of ingest stats for the model across all nodes. The values are * summations of the individual node statistics. The format matches the ingest * section in Nodes stats. * <p> * API name: {@code ingest} */ @Nullable public Map<String, JsonData> ingest() { return this.ingest; } /** * Serialize this object to JSON. */ public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); generator.writeEnd(); } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("model_id"); generator.write(this.modelId); generator.writeKey("pipeline_count"); generator.write(this.pipelineCount); if (this.inferenceStats != null) { generator.writeKey("inference_stats"); this.inferenceStats.serialize(generator, mapper); } if (this.ingest != null) { generator.writeKey("ingest"); generator.writeStartObject(); for (Map.Entry<String, JsonData> item0 : this.ingest.entrySet()) { generator.writeKey(item0.getKey()); item0.getValue().serialize(generator, mapper); } generator.writeEnd(); } } // --------------------------------------------------------------------------------------------- /** * Builder for {@link TrainedModelStats}. */ public static class Builder implements ObjectBuilder<TrainedModelStats> { private String modelId; private Integer pipelineCount; @Nullable private TrainedModelInferenceStats inferenceStats; @Nullable private Map<String, JsonData> ingest; /** * The unique identifier of the trained model. * <p> * API name: {@code model_id} */ public Builder modelId(String value) { this.modelId = value; return this; } /** * The number of ingest pipelines that currently refer to the model. * <p> * API name: {@code pipeline_count} */ public Builder pipelineCount(int value) { this.pipelineCount = value; return this; } /** * A collection of inference stats fields. * <p> * API name: {@code inference_stats} */ public Builder inferenceStats(@Nullable TrainedModelInferenceStats value) { this.inferenceStats = value; return this; } /** * A collection of inference stats fields. * <p> * API name: {@code inference_stats} */ public Builder inferenceStats( Function<TrainedModelInferenceStats.Builder, ObjectBuilder<TrainedModelInferenceStats>> fn) { return this.inferenceStats(fn.apply(new TrainedModelInferenceStats.Builder()).build()); } /** * A collection of ingest stats for the model across all nodes. The values are * summations of the individual node statistics. The format matches the ingest * section in Nodes stats. * <p> * API name: {@code ingest} */ public Builder ingest(@Nullable Map<String, JsonData> value) { this.ingest = value; return this; } /** * Add a key/value to {@link #ingest(Map)}, creating the map if needed. */ public Builder putIngest(String key, JsonData value) { if (this.ingest == null) { this.ingest = new HashMap<>(); } this.ingest.put(key, value); return this; } /** * Builds a {@link TrainedModelStats}. * * @throws NullPointerException * if some of the required fields are null. */ public TrainedModelStats build() { return new TrainedModelStats(this); } } // --------------------------------------------------------------------------------------------- /** * Json deserializer for {@link TrainedModelStats} */ public static final JsonpDeserializer<TrainedModelStats> _DESERIALIZER = ObjectBuilderDeserializer .lazy(Builder::new, TrainedModelStats::setupTrainedModelStatsDeserializer, Builder::build); protected static void setupTrainedModelStatsDeserializer(DelegatingDeserializer<TrainedModelStats.Builder> op) { op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); op.add(Builder::pipelineCount, JsonpDeserializer.integerDeserializer(), "pipeline_count"); op.add(Builder::inferenceStats, TrainedModelInferenceStats._DESERIALIZER, "inference_stats"); op.add(Builder::ingest, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "ingest"); } }
[ "sylvain@elastic.co" ]
sylvain@elastic.co
17898e592e3690cd79b1f5abb1cd91179d003b77
1e7f68d62f0b9408054a7ddee252a02d94bf93fc
/CommModule/src/ca/uhn/hl7v2/model/v26/group/PEX_P07_RX_ADMINISTRATION.java
7c853893e93c49cd3c0e472cd69dd9ea268ea822
[]
no_license
sac10nikam/TX
8b296211601cddead3749e48876e3851e867b07d
e5a5286f1092ce720051036220e1780ba3408893
refs/heads/master
2021-01-15T16:00:19.517997
2013-01-21T09:38:09
2013-01-21T09:38:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,615
java
/* * This class is an auto-generated source file for a HAPI * HL7 v2.x standard structure class. * * For more information, visit: http://hl7api.sourceforge.net/ * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (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.mozilla.org/MPL/ * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the * specific language governing rights and limitations under the License. * * The Original Code is "[file_name]". Description: * "[one_line_description]" * * The Initial Developer of the Original Code is University Health Network. Copyright (C) * 2012. All Rights Reserved. * * Contributor(s): ______________________________________. * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License (the "GPL"), in which case the provisions of the GPL are * applicable instead of those above. If you wish to allow use of your version of this * file only under the terms of the GPL and not to allow others to use your version * of this file under the MPL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by the GPL License. * If you do not delete the provisions above, a recipient may use your version of * this file under either the MPL or the GPL. * */ package ca.uhn.hl7v2.model.v26.group; import ca.uhn.hl7v2.model.v26.segment.*; import ca.uhn.hl7v2.HL7Exception; import ca.uhn.hl7v2.parser.ModelClassFactory; import ca.uhn.hl7v2.model.*; import net.newel.android.Log; import ca.uhn.hl7v2.util.Constants; /** * <p>Represents a PEX_P07_RX_ADMINISTRATION group structure (a Group object). * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together. * This Group contains the following elements: * </p> * <ul> * <li>1: RXA (Pharmacy/Treatment Administration) <b> </b></li> * <li>2: RXR (Pharmacy/Treatment Route) <b>optional </b></li> * </ul> */ public class PEX_P07_RX_ADMINISTRATION extends AbstractGroup { private static final long serialVersionUID = 1L; /** * Creates a new PEX_P07_RX_ADMINISTRATION group */ public PEX_P07_RX_ADMINISTRATION(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { try { this.add(RXA.class, true, false); this.add(RXR.class, false, false); } catch(HL7Exception e) { Log.e(Constants.TAG, "Unexpected error creating PEX_P07_RX_ADMINISTRATION - this is probably a bug in the source code generator.", e); } } /** * Returns "2.6" */ public String getVersion() { return "2.6"; } /** * Returns * RXA (Pharmacy/Treatment Administration) - creates it if necessary */ public RXA getRXA() { RXA retVal = getTyped("RXA", RXA.class); return retVal; } /** * Returns * RXR (Pharmacy/Treatment Route) - creates it if necessary */ public RXR getRXR() { RXR retVal = getTyped("RXR", RXR.class); return retVal; } }
[ "nacrotic@hotmail.com" ]
nacrotic@hotmail.com
949e07c997650247437fb4e4a43f43a24427a388
f763af9d7f3cb2d9015e512e353385bc5abc8318
/DSAJ-Ch2-Ex3/src/HighArray.java
96e2b21994f38923cdf5bfeb721417de6802ac11
[]
no_license
shonessy/Data_Structures_And_Algorithms_in_Java-AND-Programming_Interviews_Exposed
18b66b5656cf577b88189fadad79c940800835f0
c1c8fd74385fcae1ee2ec0b7e84a68de4bcbc2b6
refs/heads/master
2021-09-03T03:50:12.432391
2017-12-18T23:37:56
2017-12-18T23:37:56
109,734,362
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
public class HighArray implements Array{ private int array[]; private int index; public HighArray(int max) { this.array = new int[max]; this.index = 0; } public void insert(int e) { this.array[this.index++] = e; } public int find(int e) { for(int i=0; i<this.array.length; i++) if(this.array[i]==e) return i; return -1; } public boolean delete(int e) { int index = this.find(e); if(index==-1) { System.out.println("Nije pronadjen element niza za brisanje"); return false; } for(int i= index; i<this.index; i++) this.array[i] = this.array[i+1]; this.index--; System.out.println("Obrisan je element niza na poziciji: " + index); return true; } public void display() { System.out.println("Niz: "); for(int i=0; i< this.index; i++) System.out.print(this.array[i] + "\t"); System.out.println(""); } }
[ "nemanja.el@hotmail.com" ]
nemanja.el@hotmail.com
342443de799b9dde8f08173210ded45effb86aa8
68e4676b246cfef371a0de908fd3922f56b881d0
/alipay-sdk-master/src/main/java/com/alipay/api/response/SsdataDataserviceRiskRainscoreQueryResponse.java
7af199886579e475989ff8657e960082f22c6113
[ "Apache-2.0" ]
permissive
everLuck666/BoruiSystem
c66872ac965df2c6d833c7b529c1f76805d5cb05
7e19e43e8bb42420e87398dcd737f80904611a56
refs/heads/master
2023-03-29T12:08:07.978557
2021-03-22T03:12:23
2021-03-22T03:12:23
335,288,821
0
0
null
null
null
null
UTF-8
Java
false
false
2,105
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.InfoCode; import com.alipay.api.AlipayResponse; /** * ALIPAY API: ssdata.dataservice.risk.rainscore.query response. * * @author auto create * @since 1.0, 2017-12-12 09:58:59 */ public class SsdataDataserviceRiskRainscoreQueryResponse extends AlipayResponse { private static final long serialVersionUID = 3231363813415315559L; /** * 风险解释,即本次风险评分中TOP 3风险因子的代码、名称、解释、风险倍数(JSON格式)。详情请参考<a href="https://doc.open.alipay.com/doc2/detail.htm?treeId=214&articleId=104588&docType=1">《风险解释与身份标签》</a> */ @ApiListField("infocode") @ApiField("info_code") private List<InfoCode> infocode; /** * 身份标签,即本次风险评分中评分主体(手机号)相关自然人的推测身份,例如:Scalper_3C(3C行业黄牛)等。没有与当前风险类型相关的推测身份时,身份标签可能为空。详情及申请方式请参考<a href="https://doc.open.alipay.com/doc2/detail.htm?treeId=214&articleId=104588&docType=1#s1">《风险解释及身份标签》</a> */ @ApiListField("label") @ApiField("string") private List<String> label; /** * 风险评分,范围为[0,100],评分越高风险越大 */ @ApiField("score") private String score; /** * 用户唯一请求id */ @ApiField("unique_id") private String uniqueId; public void setInfocode(List<InfoCode> infocode) { this.infocode = infocode; } public List<InfoCode> getInfocode( ) { return this.infocode; } public void setLabel(List<String> label) { this.label = label; } public List<String> getLabel( ) { return this.label; } public void setScore(String score) { this.score = score; } public String getScore( ) { return this.score; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } public String getUniqueId( ) { return this.uniqueId; } }
[ "49854860+DFRUfO@users.noreply.github.com" ]
49854860+DFRUfO@users.noreply.github.com
336cb50919fcaa102822d21eaef41943f1945ba3
d310d2d6442754f7cd614150596fb5faed9363f4
/src/main/java/prosayj/thinking/springsecurity/model/user/mapper/UserDomainMapper.java
fff529dcc59cf72b28dad090dfb598953834a0b9
[]
no_license
ProSayJ/think-in-spring-security
944d8e078835c247611552cef3a03a2ad1969e28
9cbacac76bb2b071ad2b8bb30ce0a4539d641182
refs/heads/main
2023-06-22T16:38:38.700341
2021-07-08T10:52:56
2021-07-08T10:52:56
332,620,997
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package prosayj.thinking.springsecurity.model.user.mapper; import prosayj.thinking.springsecurity.model.user.domain.UserDomain; /** * UserDomainMapper * * @author yangjian@bubi.cn * @date 2020-07-15 下午 11:13 * @since 1.0.0 */ public interface UserDomainMapper { UserDomain findByUsername(String username); int save(UserDomain userDomain); }
[ "15665662468@163.com" ]
15665662468@163.com
afae372a720248731771eb749062a19a4dfa3d5e
53f895ac58cb7c9e1e8976c235df9c4544e79d33
/27_String/com/source/string1/K.java
43ac78948c34e519c132478b7a8d36d649ed87b3
[]
no_license
alagurajan/CoreJava
c336356b45cdbcdc88311efbba8f57503e050b66
be5a8c2a60aac072f777d8b0320e4c94a1266cb3
refs/heads/master
2021-01-11T01:33:11.447570
2016-12-16T22:24:58
2016-12-16T22:24:58
70,690,915
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.source.string1; public class K { public static void main(String[] args) { String s1 = "null"; String s2 = null; String s3 = s1+null; String s4 = s2+null; System.out.println(s3); System.out.println(s4); System.out.println(s3.equals(s4)); } }
[ "aalagurajan@gmail.com" ]
aalagurajan@gmail.com
8e382f983c8a8336ef47649c27fb9e5952ef71e2
6928f1c8d5b86d24a0e017fc9ac180ed3d9e72b1
/src/chapter06/ch13/SystemInTest1.java
260f2ee71040e6e245c1d479d2586b2a77d504b3
[]
no_license
minhee0327/fastcampus-java
5c25d4377b720945b83646c34eb6af43c0a541a3
57f03ccc0ab4ec97b7305e09a944f6a0b8a9fb6f
refs/heads/master
2023-05-22T18:11:15.092799
2021-06-14T02:28:12
2021-06-14T02:28:12
362,716,434
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package chapter06.ch13; import java.io.IOException; import java.io.InputStreamReader; public class SystemInTest1 { public static void main(String[] args) { System.out.println("알파벳 여러개를 쓰고 [Enter]를 누르세요"); int i; try { //InputStreamReader 문자를 바이트 단위로 읽을 수 있도록 돕는 보조스트림 InputStreamReader irs = new InputStreamReader(System.in); while((i = irs.read()) != '\n'){ // System.out.println(i); System.out.print ((char)i); } } catch (IOException e) { e.printStackTrace(); } } }
[ "queen.minhee@gmail.com" ]
queen.minhee@gmail.com
834a27206ba1d48be5cb92b927a86911e7c2057e
8122409d3d5ec087ecdcf429d9f213ddabd19a64
/app/src/main/java/com/cpigeon/book/module/play/viewmodel/PlayListViewModel.java
60bc811ba2ae09cc98ea2ef935ed8715f8dddd10
[]
no_license
xiaohl-902/PSpectrumAndroid
69779c2813f0c0f45354d6182e47c16c4024e702
365d6015c2cbbf985b14b7e7009d0b893a4790ed
refs/heads/master
2020-04-06T13:09:13.919105
2018-11-14T03:43:57
2018-11-14T03:43:57
157,486,399
0
1
null
null
null
null
UTF-8
Java
false
false
2,278
java
package com.cpigeon.book.module.play.viewmodel; import android.arch.lifecycle.MutableLiveData; import com.base.base.BaseViewModel; import com.base.http.HttpErrorException; import com.cpigeon.book.model.PlayModel; import com.cpigeon.book.model.UserModel; import com.cpigeon.book.model.entity.LeagueDetailsEntity; import com.cpigeon.book.model.entity.PigeonPlayEntity; import com.cpigeon.book.model.entity.PlayAdditionalInfoEntity; import java.util.List; /** * 赛绩列表 * Created by Administrator on 2018/9/4. */ public class PlayListViewModel extends BaseViewModel { //鸽子id public String pigeonid; //足环ID public String footid; public int pi = 1; public int ps = 99999; public MutableLiveData<List<PigeonPlayEntity>> mPigeonPlayListData = new MutableLiveData<>(); public MutableLiveData<List<LeagueDetailsEntity>> mDataFristLeague = new MutableLiveData<>(); //获取 赛绩列表 public void getZGW_Users_GetLogData() { submitRequestThrowError(PlayModel.getTXGP_PigeonMatch_SelectAll(UserModel.getInstance().getUserId(), pigeonid, footid, String.valueOf(pi), String.valueOf(ps)), r -> { if (r.isOk()) { listEmptyMessage.setValue(r.msg); mPigeonPlayListData.setValue(r.data); } else throw new HttpErrorException(r); }); } public MutableLiveData<List<PlayAdditionalInfoEntity>> mPlayAdditionalInfoListData = new MutableLiveData<>(); public int infoPi = 1; public int infoPs = 99999; //获取 赛绩 附加信息 列表 public void getPlayAdditionalInfoList() { submitRequestThrowError(PlayModel.getTXGP_PigeonInfoList_SelectAll(UserModel.getInstance().getUserId(), pigeonid, footid, String.valueOf(infoPi), String.valueOf(infoPs)), r -> { if (r.isOk()) { listEmptyMessage.setValue(r.msg); mPlayAdditionalInfoListData.setValue(r.data); } else throw new HttpErrorException(r); }); } public void getFirstLeague() { submitRequestThrowError(PlayModel.getFirstLeague(), r -> { if (r.isOk()) { mDataFristLeague.setValue(r.data); } else throw new HttpErrorException(r); }); } }
[ "656452024@qq.com" ]
656452024@qq.com
467fb7539f14178510abfd03dfd7217b99e67e72
3a94e2beee1f4d2289b1abbe459b1dad18b60168
/src/main/java/org/lhqz/demo/thinkinginjava/enums/SpaceShip.java
0cf66ea8e93053997b9819971de1a0c3ee7baeaf
[]
no_license
leihenqingze/demo-thinkinjava
320b0292589dd52d02cad013558b8c45d5ba5a57
6735c807fad1963aaec2c755aae5f525304361ad
refs/heads/master
2020-03-28T19:49:11.915175
2018-10-14T08:02:12
2018-10-14T08:02:12
149,012,487
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package org.lhqz.demo.thinkinginjava.enums; import static org.lhqz.demo.tools.Print.*; /** * 覆盖enum方法 */ public enum SpaceShip { SCOUT, CARGO, TRANSPORT, CRUISER, BATTLESHIP, MOTHERSHIP; @Override public String toString() { String id = name(); String lower = id.substring(1).toLowerCase(); return id.charAt(0) + lower; } public static void main(String[] args) { for (SpaceShip s : SpaceShip.values()) { println(s); } } }
[ "leihenqingze@sina.com" ]
leihenqingze@sina.com
7910f02ce6acf60da0d60695497f23204818a74b
45d26acc585bfcf0612e6dacc6badfcf62c7985a
/dospexml-basic/src/main/java/javax0/dospexml/commands/basic/package-info.java
8a978f98c15c750d0de24e968212ae32736614fe
[]
no_license
verhas/dospexml
3d270f9fd66a15fde99f1180cbde5b1f22ba35ac
5d314c5ca1b59a4ba08b662688a4d2111529186a
refs/heads/master
2023-02-02T02:13:23.612687
2020-12-12T18:31:55
2020-12-12T18:31:55
233,652,144
0
0
null
null
null
null
UTF-8
Java
false
false
130
java
/** * Very simple basic commands, which can be registered and used in an application. */ package javax0.dospexml.commands.basic;
[ "peter@verhas.com" ]
peter@verhas.com
6b40b0b577c166627f79dc2f3babd99e9e82901b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project39/src/main/java/org/gradle/test/performance39_4/Production39_393.java
91bd404fe28d2daf83bcd267c5cb79adef402b7d
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance39_4; public class Production39_393 extends org.gradle.test.performance13_4.Production13_393 { private final String property; public Production39_393() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
34954011fecc9e5e471e5bba45339d6d7672faf5
d33e0f73bb75541a031fa6f082c6d7706355233c
/ezyfox-hazelcast-mongodb/src/test/java/com/tvd12/ezyfox/hazelcast/testing/service/ExampleUserTest.java
79a8444fa1b22aa6189925d1e1efc9341336ff9e
[ "Apache-2.0" ]
permissive
communityus-branch/ezyfox
75707e0587fba2d0989a14fe44dc1ae9b28cf0dc
8af507665bfb1bc53b8451c74a54e4be86f66f59
refs/heads/master
2020-04-17T15:56:52.591673
2018-10-13T18:20:51
2018-10-13T18:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
package com.tvd12.ezyfox.hazelcast.testing.service; import org.testng.annotations.Test; import com.hazelcast.core.IMap; import com.tvd12.ezyfox.hazelcast.service.EzySimpleMaxIdService; import com.tvd12.ezyfox.hazelcast.testing.HazelcastBaseTest; import com.tvd12.ezyfox.hazelcast.testing.constant.Entities; import com.tvd12.ezyfox.hazelcast.testing.entity.ExampleUser; public class ExampleUserTest extends HazelcastBaseTest { @Test public void test() throws Exception { EzySimpleMaxIdService service = new EzySimpleMaxIdService(); service.setHazelcastInstance(HZ_INSTANCE); service.setMapTransactionFactory(MAP_TRANSACTION_FACTORY); long userId1 = service.incrementAndGet(Entities.USER); long userId2 = service.incrementAndGet(Entities.USER); ExampleUser user1 = new ExampleUser(userId1, "user1"); ExampleUser user2 = new ExampleUser(userId2, "user2"); IMap<String, ExampleUser> userMap = HZ_INSTANCE.getMap(Entities.USER); userMap.set("user1", user1); userMap.set("user2", user2); Thread.sleep(3000); } }
[ "itprono3@gmail.com" ]
itprono3@gmail.com
57794de040958f173b872db444058eefc208d89d
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/com/uber/rave/InvalidModelException.java
d3150cd14dac49b7bd3812217d5712e1a9ed50c9
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
208
java
package com.uber.rave; import java.util.List; public final class InvalidModelException extends RaveException { public InvalidModelException(List<RaveError> list) { super(list); } }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
fbd3ffcf4eca5c7ac1e20060de3ff53ad8b805fe
f311c7063f3226966dea65e9102f60e4bb8cd821
/src/main/java/enterprises/orbital/evekit/dataplatform/ReleaseWS.java
7830dde0c1c979720dc63cc148a67a90ec2cbb4d
[]
no_license
OrbitalEnterprises/evekit-data-platform-frontend
342d1a9eafe2d57873d9057ea869cfa6051e78f2
170b35e2563414d841f135fb8ea77fbfa0e46391
refs/heads/master
2021-07-13T11:02:09.762187
2017-10-15T21:25:47
2017-10-15T21:25:47
107,019,062
0
0
null
null
null
null
UTF-8
Java
false
false
1,819
java
package enterprises.orbital.evekit.dataplatform; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Response; import enterprises.orbital.base.OrbitalProperties; /** * API for release information. */ @Path("/ws/v1/release") @Produces({ "application/json" }) @io.swagger.annotations.Api( tags = { "Release" }, produces = "application/json") public class ReleaseWS { public static final String PROP_BUILD_DATE = "enterprises.orbital.evekit.dataplatform.build"; public static final String PROP_VERSION = "enterprises.orbital.evekit.dataplatform.version"; @Path("/build_date") @GET @io.swagger.annotations.ApiOperation( value = "Return the build date of the current release") @io.swagger.annotations.ApiResponses( value = { @io.swagger.annotations.ApiResponse( code = 200, message = "Build date of current release", response = String.class) }) public Response buildDate() { return Response.ok().entity(new Object() { @SuppressWarnings("unused") public final String buildDate = OrbitalProperties.getGlobalProperty(PROP_BUILD_DATE, "unknown"); }).build(); } @Path("/version") @GET @io.swagger.annotations.ApiOperation( value = "Return the version of the current release") @io.swagger.annotations.ApiResponses( value = { @io.swagger.annotations.ApiResponse( code = 200, message = "Version of current release", response = String.class) }) public Response version() { return Response.ok().entity(new Object() { @SuppressWarnings("unused") public final String version = OrbitalProperties.getGlobalProperty(PROP_VERSION, "unknown"); }).build(); } }
[ "deadlybulb@orbital.enterprises" ]
deadlybulb@orbital.enterprises
460280a5e313bdcd4c616af3b77da98c2c10f4c5
bde0ded5ff9eb1a93fe22e284aa80df6ed5d847c
/core/src/main/java/com/matsg/battlegrounds/command/SetGameSign.java
12094e8b1ae114483a8522367194df2aef5bb3e4
[]
no_license
matsgemmeke/battlegrounds-plugin
ee379db349f6624011fc327daa113414370569ab
2fbdb6ac6364a804bae16c4698b3338854e0297e
refs/heads/master
2021-07-17T08:40:43.359600
2021-07-14T23:16:04
2021-07-14T23:16:04
114,624,863
5
6
null
2019-11-11T08:41:53
2017-12-18T10:00:31
Java
UTF-8
Java
false
false
2,125
java
package com.matsg.battlegrounds.command; import com.matsg.battlegrounds.TranslationKey; import com.matsg.battlegrounds.api.GameManager; import com.matsg.battlegrounds.api.Translator; import com.matsg.battlegrounds.api.game.Game; import com.matsg.battlegrounds.api.game.GameSign; import com.matsg.battlegrounds.api.Placeholder; import com.matsg.battlegrounds.api.storage.BattlegroundsConfig; import com.matsg.battlegrounds.command.validator.GameIdValidator; import com.matsg.battlegrounds.game.BattleGameSign; import org.bukkit.block.BlockState; import org.bukkit.block.Sign; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class SetGameSign extends Command { private BattlegroundsConfig config; private GameManager gameManager; public SetGameSign(Translator translator, GameManager gameManager, BattlegroundsConfig config) { super(translator); this.gameManager = gameManager; this.config = config; setAliases("sgs"); setDescription(createMessage(TranslationKey.DESCRIPTION_SETGAMESIGN)); setName("setgamesign"); setPermissionNode("battlegrounds.setgamesign"); setPlayerOnly(true); setUsage("bg setgamesign [id]"); registerValidator(new GameIdValidator(gameManager, translator, true)); } public void execute(CommandSender sender, String[] args) { Player player = (Player) sender; BlockState state = player.getTargetBlock(null, 5).getState(); Game game = gameManager.getGame(Integer.parseInt(args[1])); if (!(state instanceof Sign)) { player.sendMessage(createMessage(TranslationKey.INVALID_BLOCK)); return; } Sign sign = (Sign) state; GameSign gameSign = new BattleGameSign(game, sign, translator, config); game.getDataFile().setLocation("sign", sign.getLocation(), true); game.getDataFile().save(); game.setGameSign(gameSign); gameSign.update(); player.sendMessage(createMessage(TranslationKey.GAMESIGN_SET, new Placeholder("bg_game", game.getId()))); } }
[ "matsgemmeke@gmail.com" ]
matsgemmeke@gmail.com
e06fc6de751bdc84901d9aaf95bac2a45aa5a61b
152ef2363fd430cd7cfd2bbae3335c228f6b4634
/src/main/java/com/gbw/httplog/store/redis/GBWHttpLogStoreRedisConfig.java
283b9f02e28aedcbf4ec4a36df5cab5c8aba52d8
[]
no_license
jacks001314/GBWHttpLog
b9acb0f4104d0ac62a1c88eedc71f893705b9343
847131f894c96a114bfab9faab02b41a96ce40a8
refs/heads/master
2022-12-31T06:59:25.278908
2020-10-22T04:47:42
2020-10-22T04:47:42
295,948,688
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
package com.gbw.httplog.store.redis; import com.gbw.httplog.store.GBWHttpLogStoreConfig; public class GBWHttpLogStoreRedisConfig extends GBWHttpLogStoreConfig { private String auth; private int database; private int timeout; private int maxTotal; private int maxIdle; private int maxWaitMs; private boolean ping; public int getMaxTotal() { return maxTotal; } public void setMaxTotal(int maxTotal) { this.maxTotal = maxTotal; } public int getMaxIdle() { return maxIdle; } public void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; } public int getMaxWaitMs() { return maxWaitMs; } public void setMaxWaitMs(int maxWaitMs) { this.maxWaitMs = maxWaitMs; } public boolean isPing() { return ping; } public void setPing(boolean ping) { this.ping = ping; } public String getAuth() { return auth; } public void setAuth(String auth) { this.auth = auth; } public int getTimeout() { return timeout; } public void setTimeout(int timeout) { this.timeout = timeout; } public int getDatabase() { return database; } public void setDatabase(int database) { this.database = database; } }
[ "you@example.com" ]
you@example.com
83aefc7a8d0359d9a25eedf7caaca1e2d43509dd
9acb2dcaac7c7e59c982e4a7c67118e2eccab681
/src/main/java/net/sf/l2j/gameserver/model/actor/ai/NextAction.java
e44d7e16112faee5dd749e1292b5e5074921f0a8
[]
no_license
denismaster/midnight
d1356bdbb06e56d67afea2c3090fcbca5e3d6b3f
d8832e701d1ba1b8ffadab5ec8e258a34dea2340
refs/heads/develop
2020-03-23T03:46:56.864185
2018-08-26T21:29:46
2018-08-26T21:29:46
141,048,546
1
0
null
2018-08-26T21:29:58
2018-07-15T18:18:40
HTML
UTF-8
Java
false
false
1,052
java
package net.sf.l2j.gameserver.model.actor.ai; /** * Class for AI action after some event. * @author Yaroslav */ public class NextAction { /** After which CtrlEvent is this action supposed to run. */ private final CtrlEvent _event; /** What is the intention of the action, e.g. if AI gets this CtrlIntention set, NextAction is canceled. */ private final CtrlIntention _intention; /** Wrapper for NextAction content. */ private final Runnable _runnable; /** * Single constructor. * @param event : After which the NextAction is triggered. * @param intention : CtrlIntention of the action. * @param runnable : */ public NextAction(CtrlEvent event, CtrlIntention intention, Runnable runnable) { _event = event; _intention = intention; _runnable = runnable; } /** * @return the _event */ public CtrlEvent getEvent() { return _event; } /** * @return the _intention */ public CtrlIntention getIntention() { return _intention; } /** * Do action. */ public void run() { _runnable.run(); } }
[ "denismaster@outlook.com" ]
denismaster@outlook.com
270a6d910693e310fb7941dd35b7715f3ac6cb3e
991c64efda3d86734df278f39ade4c0ab981cdff
/api/src/main/java/org/jboss/seam/drools/qualifiers/Channel.java
d9403a3ec1e94dbafb597ac324c3db399da918d5
[]
no_license
sbryzak/drools
4de3d05357ef7103f34efc10a8baa4c552e318dd
43176f40b43c31c38552e22a9b3954f0e847d3a2
refs/heads/master
2021-01-20T23:04:07.480585
2010-10-26T10:40:02
2010-10-26T10:40:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,773
java
/* * JBoss, Home of Professional Open Source * Copyright ${year}, Red Hat, Inc., and individual contributors * 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.jboss.seam.drools.qualifiers; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.enterprise.util.Nonbinding; import javax.inject.Qualifier; /** * * @author Tihomir Surdilovic */ @Qualifier @Target( { TYPE, METHOD, FIELD, PARAMETER }) @Documented @Retention(RUNTIME) @Inherited public @interface Channel { @Nonbinding String value() default ""; }
[ "tsurdilo@redhat.com" ]
tsurdilo@redhat.com
c6228b46877589eda0c65d479976575ecd486d9b
329307375d5308bed2311c178b5c245233ac6ff1
/src/com/tencent/smtt/export/external/DexLoader.java
66feacf3d50008cae5f825ba337cb8399912c530
[]
no_license
ZoneMo/com.tencent.mm
6529ac4c31b14efa84c2877824fa3a1f72185c20
dc4f28aadc4afc27be8b099e08a7a06cee1960fe
refs/heads/master
2021-01-18T12:12:12.843406
2015-07-05T03:21:46
2015-07-05T03:21:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,953
java
package com.tencent.smtt.export.external; import android.content.Context; import dalvik.system.DexClassLoader; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; public class DexLoader { private DexClassLoader mClassLoader; public DexLoader(Context paramContext, String paramString1, String paramString2) { this(paramContext, new String[] { paramString1 }, paramString2); } public DexLoader(Context paramContext, String[] paramArrayOfString, String paramString) { paramContext = paramContext.getClassLoader(); int i = 0; while (i < paramArrayOfString.length) { paramContext = new DexClassLoader(paramArrayOfString[i], paramString, null, paramContext); mClassLoader = paramContext; i += 1; } } public Object getStaticField(String paramString1, String paramString2) { try { Object localObject = mClassLoader.loadClass(paramString1).getField(paramString2); ((Field)localObject).setAccessible(true); localObject = ((Field)localObject).get(null); return localObject; } catch (Throwable localThrowable) { getClass().getSimpleName(); new StringBuilder("'").append(paramString1).append("' get field '").append(paramString2).append("' failed"); } return null; } public Object invokeMethod(Object paramObject, String paramString1, String paramString2, Class[] paramArrayOfClass, Object... paramVarArgs) { try { paramArrayOfClass = mClassLoader.loadClass(paramString1).getMethod(paramString2, paramArrayOfClass); paramArrayOfClass.setAccessible(true); paramObject = paramArrayOfClass.invoke(paramObject, paramVarArgs); return paramObject; } catch (Throwable paramObject) { getClass().getSimpleName(); new StringBuilder("'").append(paramString1).append("' invoke method '").append(paramString2).append("' failed"); } return null; } public Object invokeStaticMethod(String paramString1, String paramString2, Class[] paramArrayOfClass, Object... paramVarArgs) { try { paramArrayOfClass = mClassLoader.loadClass(paramString1).getMethod(paramString2, paramArrayOfClass); paramArrayOfClass.setAccessible(true); paramArrayOfClass = paramArrayOfClass.invoke(null, paramVarArgs); return paramArrayOfClass; } catch (Throwable paramArrayOfClass) { getClass().getSimpleName(); new StringBuilder("'").append(paramString1).append("' invoke static method '").append(paramString2).append("' failed"); } return null; } public Class loadClass(String paramString) { try { Class localClass = mClassLoader.loadClass(paramString); return localClass; } catch (Throwable localThrowable) { getClass().getSimpleName(); new StringBuilder("loadClass '").append(paramString).append("' failed"); } return null; } public Object newInstance(String paramString) { try { Object localObject = mClassLoader.loadClass(paramString).newInstance(); return localObject; } catch (Throwable localThrowable) { getClass().getSimpleName(); new StringBuilder("create ").append(paramString).append(" instance failed"); } return null; } public Object newInstance(String paramString, Class[] paramArrayOfClass, Object... paramVarArgs) { try { paramArrayOfClass = mClassLoader.loadClass(paramString).getConstructor(paramArrayOfClass).newInstance(paramVarArgs); return paramArrayOfClass; } catch (Throwable paramArrayOfClass) { getClass().getSimpleName(); new StringBuilder("create '").append(paramString).append("' instance failed"); } return null; } } /* Location: * Qualified Name: com.tencent.smtt.export.external.DexLoader * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
b6fa683a7261448cc8dd866b237739ebc1ed430b
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/WidgetWarren/src/com/puttysoftware/widgetwarren/objects/Ruby.java
3cc9d2eb758eb4e505f18c65fc642eeb65a2558f
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
959
java
/* WidgetWarren: A Maze-Solving Game Copyright (C) 2008-2014 Eric Ahnell Any questions should be directed to the author via email at: products@puttysoftware.com */ package com.puttysoftware.widgetwarren.objects; import com.puttysoftware.widgetwarren.WidgetWarren; import com.puttysoftware.widgetwarren.generic.GenericScoreIncreaser; public class Ruby extends GenericScoreIncreaser { // Fields private static final long SCORE_INCREASE = 100L; // Constructors public Ruby() { super(); } @Override public String getName() { return "Ruby"; } @Override public String getPluralName() { return "Rubys"; } @Override public void postMoveActionHook() { WidgetWarren.getApplication().getGameManager() .addToScore(Ruby.SCORE_INCREASE); } @Override public String getDescription() { return "Rubys increase your score when picked up."; } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
30142333c70555b4bbbcc3f089bac71c38a00aae
509d496f1d4a37d1b56693d19cf96c528938baaa
/src/argouml-app/src/org/argouml/uml/ui/foundation/core/PropPanelAttribute.java
5a8f23f4571c9e8c7fff3c70fcc201db4fa60f25
[ "LicenseRef-scancode-other-permissive", "BSD-3-Clause" ]
permissive
SofienBoutaib/argouml
bb65203a680b6d2c977c0bb96637914fd30584b1
71809598cfc3793b14809c51c975ac305e9bea6a
refs/heads/master
2022-06-20T21:36:50.184555
2011-11-01T17:43:21
2011-11-01T17:43:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,922
java
/* $Id: PropPanelAttribute.java 18588 2010-07-28 21:30:25Z bobtarling $ ***************************************************************************** * Copyright (c) 2009 Contributors - see below * 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: * dthompson ***************************************************************************** * * Some portions of this file was previously release using the BSD License: */ // Copyright (c) 1996-2008 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.uml.ui.foundation.core; import java.util.List; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; import org.argouml.i18n.Translator; import org.argouml.model.Model; import org.argouml.uml.ui.ActionNavigateContainerElement; import org.argouml.uml.ui.ActionNavigateUpNextDown; import org.argouml.uml.ui.ActionNavigateUpPreviousDown; import org.argouml.uml.ui.UMLComboBoxNavigator; import org.argouml.uml.ui.UMLExpressionBodyField; import org.argouml.uml.ui.UMLExpressionLanguageField; import org.argouml.uml.ui.UMLExpressionModel2; import org.argouml.uml.ui.UMLUserInterfaceContainer; import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewStereotype; /** * The properties panel for an Attribute of a Classifier, * and the Qualifier of an AssociationEnd. * * @author jrobbins * @author jaap.branderhorst * @deprecated in 0.31.2 by Bob Tarling This is replaced by the XML property * panels module */ @Deprecated public class PropPanelAttribute extends PropPanelStructuralFeature { /** * The serial version. */ private static final long serialVersionUID = -5596689167193050170L; /** * The constructor. * */ public PropPanelAttribute() { super("label.attribute", lookupIcon("Attribute")); addField(Translator.localize("label.name"), getNameTextField()); addField(Translator.localize("label.type"), new UMLComboBoxNavigator( Translator.localize("label.class.navigate.tooltip"), getTypeComboBox())); addField(Translator.localize("label.multiplicity"), getMultiplicityComboBox()); addField(Translator.localize("label.owner"), getOwnerScroll()); add(getVisibilityPanel()); addSeparator(); add(getChangeabilityRadioButtonPanel()); JPanel modifiersPanel = createBorderPanel( Translator.localize("label.modifiers")); modifiersPanel.add(getOwnerScopeCheckbox()); add(modifiersPanel); UMLExpressionModel2 initialModel = new UMLInitialValueExpressionModel( this, "initialValue"); JPanel initialPanel = createBorderPanel(Translator .localize("label.initial-value")); JScrollPane jsp = new JScrollPane(new UMLExpressionBodyField( initialModel, true)); jsp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jsp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); initialPanel.add(jsp); initialPanel.add(new UMLExpressionLanguageField(initialModel, false)); add(initialPanel); addAction(new ActionNavigateContainerElement()); addAction(new ActionNavigateUpPreviousDown() { public List getFamily(Object parent) { if (Model.getFacade().isAAssociationEnd(parent)) { return Model.getFacade().getQualifiers(parent); } return Model.getFacade().getAttributes(parent); } public Object getParent(Object child) { return Model.getFacade().getModelElementContainer(child); } }); addAction(new ActionNavigateUpNextDown() { public List getFamily(Object parent) { if (Model.getFacade().isAAssociationEnd(parent)) { return Model.getFacade().getQualifiers(parent); } return Model.getFacade().getAttributes(parent); } public Object getParent(Object child) { return Model.getFacade().getModelElementContainer(child); } }); addAction(new ActionAddAttribute()); addAction(new ActionAddDataType()); addAction(new ActionAddEnumeration()); addAction(new ActionNewStereotype()); addAction(getDeleteAction()); } private class UMLInitialValueExpressionModel extends UMLExpressionModel2 { /** * The constructor. * * @param container the container of UML user interface components * @param propertyName the name of the property */ public UMLInitialValueExpressionModel( UMLUserInterfaceContainer container, String propertyName) { super(container, propertyName); } /* * @see org.argouml.uml.ui.UMLExpressionModel2#getExpression() */ public Object getExpression() { Object target = getTarget(); if (target == null) { return null; } return Model.getFacade().getInitialValue(target); } /* * @see org.argouml.uml.ui.UMLExpressionModel2#setExpression(java.lang.Object) */ public void setExpression(Object expression) { Object target = getTarget(); if (target == null) { throw new IllegalStateException( "There is no target for " + getContainer()); } Model.getCoreHelper().setInitialValue(target, expression); } /* * @see org.argouml.uml.ui.UMLExpressionModel2#newExpression() */ public Object newExpression() { return Model.getDataTypesFactory().createExpression("", ""); } } }
[ "email@cs-ware.de" ]
email@cs-ware.de
d986ef567de4ebcd111fc111dc4644a2c9a5af49
c5ca82622d155ca142cebe93b12882992e93b1f6
/src/com/geocento/webapps/earthimages/emis/application/server/utils/PolicyHelper.java
06b9676041d35786a00c025a874a778c3eecda52
[]
no_license
leforthomas/EMIS
8721a6c21ad418380e1f448322fa5c8c51e33fc0
32e58148eca1e18fd21aa583831891bc26d855b1
refs/heads/master
2020-05-17T08:54:22.044423
2019-04-29T20:45:24
2019-04-29T20:45:24
183,617,011
0
0
null
null
null
null
UTF-8
Java
false
false
1,057
java
package com.geocento.webapps.earthimages.emis.application.server.utils; import com.metaaps.webapps.earthimages.extapi.server.domain.policies.EULADocumentDTO; import com.metaaps.webapps.earthimages.extapi.server.domain.policies.LicensingPolicy; import com.metaaps.webapps.libraries.client.widget.util.ListUtil; /** * Created by thomas on 16/06/14. */ public class PolicyHelper { public static EULADocumentDTO getLicensingEULADocument(LicensingPolicy licensingPolicy, String value) { // get options // basic checks first if(licensingPolicy == null || value == null || licensingPolicy.getParameter().getLicenseOptions() == null) { return null; } // now look for the matching value return ListUtil.findValue(licensingPolicy.getParameter().getLicenseOptions(), option -> option.getOption().contentEquals(value)).getEulaDocument(); } public static String getLicensingEULAUrl(EULADocumentDTO eulaDocument) { return "./api/license/eula/download/" + eulaDocument.getId(); } }
[ "leforthomas@gmail.com" ]
leforthomas@gmail.com
0cdbf6df46928578cb305667472c171fbd77a3d4
fe25d571013398e7b80336d538fd35b10c9bcf88
/src/zz/PermutationSeq.java
c2a3064745a2ca133112caae7d830b721d6c7896
[]
no_license
lyk-ohlyk/leetcode3
b17601fca2eae1df7caca65b4d55b5ad27588d8e
1df951441a2f28ddf8e4337e4ddb59573d8625d4
refs/heads/master
2020-07-23T12:20:40.546726
2017-11-29T00:21:09
2017-11-29T00:21:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,465
java
//zz reviewed package zz; import java.util.Arrays; public class PermutationSeq { public static void main(String[] args) { // TODO Auto-generated method stub PermutationSeq p=new PermutationSeq(); System.out.println(p.getPermutation(3, 4)); } public String getPermutation(int n, int k) { if(n==0 || k==0){ return ""; } //zz independent funciton int[] fact=new int[n+1];//zz why fact has length n+1, and only fact[n-1] is used? fact[0]=1; for(int i=1;i<=n;i++){ fact[i]=fact[i-1]*i; } System.out.println(Arrays.toString(fact)); boolean[] used=new boolean[n+1];//zz isUsed, why used has length n+1, while there is only n elements? used[0]=true; k--; StringBuilder resBuf=new StringBuilder(); for(int i=n-1;i>=0;i--){ int nth=k>0?k/fact[i]:0; //nth=nth==0?fact[i]:nth; System.out.println("nth="+nth+", i="+i); k=k%fact[i]; //k=k==0?fact[i]:k; System.out.println("k="+k); resBuf.append(find(nth,used)); } return resBuf.toString(); } public int find(int nth,boolean[] used){ int i=0; while(nth>=0){//zz while(i<used.length){if(nth<0) ***} is more reasonable //zz this loop is more reasonable to be written in for-loop i++; if(i>=used.length-1){ return i; } if(!used[i]){ nth--; } } used[i]=true; return i; } }
[ "zhou66.ustc@gmail.com" ]
zhou66.ustc@gmail.com
e702ae4402c46c33500ec8376b780f4663f0e98c
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
/src/main/java/ohos/agp/render/render3d/components/NodeComponent.java
12690de4fa26df4d67fab444ce8731cc8a7af4d9
[]
no_license
yearsyan/Harmony-OS-Java-class-library
d6c135b6a672c4c9eebf9d3857016995edeb38c9
902adac4d7dca6fd82bb133c75c64f331b58b390
refs/heads/main
2023-06-11T21:41:32.097483
2021-06-24T05:35:32
2021-06-24T05:35:32
379,816,304
6
3
null
null
null
null
UTF-8
Java
false
false
928
java
package ohos.agp.render.render3d.components; import ohos.agp.render.render3d.Component; import ohos.agp.render.render3d.Entity; public class NodeComponent implements Component { private boolean mIsEnabled; private boolean mIsExported; private String mName; private Entity mParent; public String getName() { return this.mName; } public void setName(String str) { this.mName = str; } public Entity getParent() { return this.mParent; } public void setParent(Entity entity) { this.mParent = entity; } public boolean isEnabled() { return this.mIsEnabled; } public void setEnabled(boolean z) { this.mIsEnabled = z; } public boolean isExported() { return this.mIsExported; } public void setExported(boolean z) { this.mIsExported = z; } }
[ "yearsyan@gmail.com" ]
yearsyan@gmail.com
2f42971e2e236eb3d24558530993f6a7220b89e3
34bbd6c4b46602fef9ddfc34022af16ffe386e84
/jgltf-model/src/main/java/de/javagl/jgltf/model/io/v1/GltfReaderV1.java
b53b13548e33f2313a68f8eb4842bbe22833066a
[ "MIT" ]
permissive
javagl/JglTF
a1bf14745ed21c2a24336f128453b899b2edca58
ec0b0dc27b9e666e027d6cd80ac4e1feaede22a2
refs/heads/master
2023-08-19T09:50:36.919314
2023-08-06T12:50:28
2023-08-06T12:50:28
58,940,073
187
60
MIT
2023-08-06T12:50:29
2016-05-16T14:41:52
Java
UTF-8
Java
false
false
3,115
java
/* * www.javagl.de - JglTF * * Copyright 2015-2016 Marco Hutter - http://www.javagl.de * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ package de.javagl.jgltf.model.io.v1; import java.io.IOException; import java.io.InputStream; import java.util.function.Consumer; import com.fasterxml.jackson.databind.ObjectMapper; import de.javagl.jgltf.impl.v1.GlTF; import de.javagl.jgltf.model.io.JacksonUtils; import de.javagl.jgltf.model.io.JsonError; import de.javagl.jgltf.model.io.JsonErrorConsumers; /** * A class for reading a version 1.0 {@link GlTF} from an input stream */ public final class GltfReaderV1 { // Note: This class could use GltfReader as a delegate, and could // then verify that the glTF has the right version. Right now, it // assumes that it is only used for glTF 1.0 inputs. /** * A consumer for {@link JsonError}s that may occur while reading * the glTF JSON */ private Consumer<? super JsonError> jsonErrorConsumer = JsonErrorConsumers.createLogging(); /** * Creates a new glTF reader */ public GltfReaderV1() { // Default constructor } /** * Set the given consumer to receive {@link JsonError}s that may * occur when the JSON part of the glTF is read * * @param jsonErrorConsumer The consumer */ public void setJsonErrorConsumer( Consumer<? super JsonError> jsonErrorConsumer) { this.jsonErrorConsumer = jsonErrorConsumer; } /** * Read the {@link GlTF} from the given stream * * @param inputStream The input stream * @return The {@link GlTF} * @throws IOException If an IO error occurs */ public GlTF read(InputStream inputStream) throws IOException { ObjectMapper objectMapper = JacksonUtils.createObjectMapper(jsonErrorConsumer); GlTF gltf = objectMapper.readValue(inputStream, GlTF.class); return gltf; } }
[ "javagl@javagl.de" ]
javagl@javagl.de
bb09f06afc2f4a971670e2b76d06f22280174bb7
66220fbb2b7d99755860cecb02d2e02f946e0f23
/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractConnection.java
dfe51dd58c4ec131c571f2e2ab110a86ab935c78
[ "MIT" ]
permissive
isabella232/plantuml-mit
27e7c73143241cb13b577203673e3882292e686e
63b2bdb853174c170f304bc56f97294969a87774
refs/heads/master
2022-11-09T00:41:48.471405
2020-06-28T12:42:10
2020-06-28T12:42:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,545
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2020, Arnaud Roques * * Project Info: https://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * https://plantuml.com/patreon (only 1$ per month!) * https://plantuml.com/paypal * * This file is part of PlantUML. * * Licensed under The MIT License (Massachusetts Institute of Technology License) * * See http://opensource.org/licenses/MIT * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * Original Author: Arnaud Roques */ package net.sourceforge.plantuml.activitydiagram3.ftile; import net.sourceforge.plantuml.graphic.HorizontalAlignment; public abstract class AbstractConnection implements Connection { private final Ftile ftile1; private final Ftile ftile2; public AbstractConnection(Ftile ftile1, Ftile ftile2) { this.ftile1 = ftile1; this.ftile2 = ftile2; } @Override public String toString() { return "[" + ftile1 + "]->[" + ftile2 + "]"; } final public Ftile getFtile1() { return ftile1; } final public Ftile getFtile2() { return ftile2; } final public HorizontalAlignment arrowHorizontalAlignment() { if (ftile1 != null) { return ftile1.arrowHorizontalAlignment(); } if (ftile2 != null) { return ftile2.arrowHorizontalAlignment(); } return HorizontalAlignment.LEFT; } }
[ "plantuml@gmail.com" ]
plantuml@gmail.com
81d50e58eeff5b9aaf2e3b352635953b1923aa03
753e59a2277d26ceb26bfbd330aff7cd7d0d7c4b
/api-server/src/main/java/io/enmasse/api/v1/types/APIResource.java
3a4947562c23f6fbda546d43d479a37cc1677b08
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "CDDL-1.0", "GPL-2.0-only" ]
permissive
riccardo-forina/enmasse
e17bc17677015a8711073429fc1d73c2f6602ef6
f93289ec5865f87d4fb35892a2d9eec3b8125396
refs/heads/master
2020-08-10T16:40:41.189040
2020-01-14T09:35:05
2020-01-14T09:35:05
214,378,403
0
6
Apache-2.0
2020-01-14T09:35:06
2019-10-11T08:01:32
Java
UTF-8
Java
false
false
1,446
java
/* * Copyright 2018, EnMasse authors. * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). */ package io.enmasse.api.v1.types; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) public class APIResource { @JsonProperty("name") private String name; @JsonProperty("singularname") private String singularname = ""; @JsonProperty("namespaced") private boolean namespaced = false; @JsonProperty("kind") private String kind; @JsonProperty("verbs") private List<String> verbs; public APIResource(String name, String singularname, boolean namespaced, String kind, List<String> verbs) { this.name = name; this.singularname = singularname; this.namespaced = namespaced; this.kind = kind; this.verbs = verbs; } @JsonProperty("name") public String getName() { return name; } @JsonProperty("singularname") private String getSingularname() { return singularname; } @JsonProperty("namespaced") private boolean getNamespaced() { return namespaced; } @JsonProperty("kind") public String getKind() { return kind; } @JsonProperty("verbs") private List<String> getVerbs() { return verbs; } }
[ "lulf@pvv.ntnu.no" ]
lulf@pvv.ntnu.no
cec45fda7a978b3d3a6c8ffbeb9168ab9cc767ad
0fdeaea9f8d0cfd48e30c25e2d515fab7ad22be2
/bus-image/src/main/java/org/aoju/bus/image/metric/Thumbnail.java
92c006930ad34137b56d070959c18aabeab29694
[ "MIT" ]
permissive
usbwc/bus
7315d6a035631c7debf2247900fca415346b2b07
30c91fb8be0820b430bebcb816c045d013fc162f
refs/heads/master
2023-04-04T21:26:20.176586
2021-03-25T07:10:44
2021-03-25T07:10:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,351
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2021 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * * * ********************************************************************************/ package org.aoju.bus.image.metric; import java.io.File; /** * @author Kimi Liu * @version 6.2.2 * @since JDK 1.8+ */ public interface Thumbnail { void registerListeners(); File getThumbnailPath(); void dispose(); void removeMouseAndKeyListener(); }
[ "839536@qq.com" ]
839536@qq.com
9e237d529cdf4d37df245305bddbf52d7ade8dc4
57067de1347b64aae39007e803f2f4899f71a0a9
/src/main/java/net/minecraft/inventory/ContainerBeacon.java
3cd06904039c5314fb06881f953c21a7857f3b56
[ "MIT" ]
permissive
Akarin-project/Paper2Srg
4ae05ffeab86195c93406067ea06414cb240aad6
55798e89ed822e8d59dc55dfc6aa70cef1e47751
refs/heads/master
2020-03-20T21:57:05.620082
2018-06-23T10:17:43
2018-06-23T10:17:43
137,770,306
4
4
null
2018-06-21T14:51:05
2018-06-18T15:29:10
Java
UTF-8
Java
false
false
5,004
java
package net.minecraft.inventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityBeacon; import org.bukkit.craftbukkit.inventory.CraftInventoryView; public class ContainerBeacon extends Container { private final IInventory field_82866_e; private final ContainerBeacon.BeaconSlot field_82864_f; // CraftBukkit start private CraftInventoryView bukkitEntity = null; private InventoryPlayer player; // CraftBukkit end public ContainerBeacon(IInventory iinventory, IInventory iinventory1) { player = (InventoryPlayer) iinventory; // CraftBukkit - TODO: check this this.field_82866_e = iinventory1; this.field_82864_f = new ContainerBeacon.BeaconSlot(iinventory1, 0, 136, 110); this.func_75146_a((Slot) this.field_82864_f); boolean flag = true; boolean flag1 = true; int i; for (i = 0; i < 3; ++i) { for (int j = 0; j < 9; ++j) { this.func_75146_a(new Slot(iinventory, j + i * 9 + 9, 36 + j * 18, 137 + i * 18)); } } for (i = 0; i < 9; ++i) { this.func_75146_a(new Slot(iinventory, i, 36 + i * 18, 195)); } } public void func_75132_a(IContainerListener icrafting) { super.func_75132_a(icrafting); icrafting.func_175173_a(this, this.field_82866_e); } public IInventory func_180611_e() { return this.field_82866_e; } public void func_75134_a(EntityPlayer entityhuman) { super.func_75134_a(entityhuman); if (!entityhuman.field_70170_p.field_72995_K) { ItemStack itemstack = this.field_82864_f.func_75209_a(this.field_82864_f.func_75219_a()); if (!itemstack.func_190926_b()) { entityhuman.func_71019_a(itemstack, false); } } } public boolean func_75145_c(EntityPlayer entityhuman) { if (!this.checkReachable) return true; // CraftBukkit return this.field_82866_e.func_70300_a(entityhuman); } public ItemStack func_82846_b(EntityPlayer entityhuman, int i) { ItemStack itemstack = ItemStack.field_190927_a; Slot slot = (Slot) this.field_75151_b.get(i); if (slot != null && slot.func_75216_d()) { ItemStack itemstack1 = slot.func_75211_c(); itemstack = itemstack1.func_77946_l(); if (i == 0) { if (!this.func_75135_a(itemstack1, 1, 37, true)) { return ItemStack.field_190927_a; } slot.func_75220_a(itemstack1, itemstack); } else if (!this.field_82864_f.func_75216_d() && this.field_82864_f.func_75214_a(itemstack1) && itemstack1.func_190916_E() == 1) { if (!this.func_75135_a(itemstack1, 0, 1, false)) { return ItemStack.field_190927_a; } } else if (i >= 1 && i < 28) { if (!this.func_75135_a(itemstack1, 28, 37, false)) { return ItemStack.field_190927_a; } } else if (i >= 28 && i < 37) { if (!this.func_75135_a(itemstack1, 1, 28, false)) { return ItemStack.field_190927_a; } } else if (!this.func_75135_a(itemstack1, 1, 37, false)) { return ItemStack.field_190927_a; } if (itemstack1.func_190926_b()) { slot.func_75215_d(ItemStack.field_190927_a); } else { slot.func_75218_e(); } if (itemstack1.func_190916_E() == itemstack.func_190916_E()) { return ItemStack.field_190927_a; } slot.func_190901_a(entityhuman, itemstack1); } return itemstack; } class BeaconSlot extends Slot { public BeaconSlot(IInventory iinventory, int i, int j, int k) { super(iinventory, i, j, k); } public boolean func_75214_a(ItemStack itemstack) { Item item = itemstack.func_77973_b(); return item == Items.field_151166_bC || item == Items.field_151045_i || item == Items.field_151043_k || item == Items.field_151042_j; } public int func_75219_a() { return 1; } } // CraftBukkit start @Override public CraftInventoryView getBukkitView() { if (bukkitEntity != null) { return bukkitEntity; } org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon((TileEntityBeacon) this.field_82866_e); // TODO - check this bukkitEntity = new CraftInventoryView(this.player.field_70458_d.getBukkitEntity(), inventory, this); return bukkitEntity; } // CraftBukkit end }
[ "i@omc.hk" ]
i@omc.hk
f8f4a4e19e0a57105cb37d327caa7373634fbc9c
c802aaf4730f4eefd74b273435379a496a18ab9d
/src/test/java/com/tpg/smp/persistence/entities/PersonEntities.java
74756dabd2b2cbc292a1531b429380fc70edad78
[]
no_license
tpgoldie/smp
2984074493aa6b69821ecc095dd73a59ae790ef4
fd42a1e555b0a6969bbb25aad1428c485f678dc0
refs/heads/master
2021-01-13T05:31:02.439836
2017-02-04T17:39:52
2017-02-04T17:39:52
80,115,970
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
package com.tpg.smp.persistence.entities; import java.util.Optional; public abstract class PersonEntities<T extends PersonEntity> extends SmpEntities<T> { T findByUserId(String id) { Optional<T> found = entities.stream().filter(e -> e.getIdentificationNumber().equalsIgnoreCase(id)).findAny(); if (found.isPresent()) { return found.get(); } throw new RuntimeException(String.format("Entity %s not found", id)); } }
[ "tpg@blueyonder.co.uk" ]
tpg@blueyonder.co.uk
56e8a7f271e8aa3a4b4dfa4707e0e5c488de60ec
7ceafb397501c016c1c434a9b8bec9bb9f8abd08
/speech-to-text/src/main/java/com/ibm/watson/speech_to_text/v1/model/DeleteAudioOptions.java
ecdac701c2a5bfecffa81569829cc997478552ef
[ "Apache-2.0" ]
permissive
kanazawaLri/java-sdk
0cdf1faa1b417a4da2ba56fd635f52bcc2ce8ad9
31e119269fbd8cc8c813f61913f11be1e0835edb
refs/heads/master
2020-07-18T10:37:10.387401
2019-10-07T03:27:19
2019-10-07T03:27:19
206,228,148
0
0
Apache-2.0
2019-09-04T04:03:17
2019-09-04T04:03:17
null
UTF-8
Java
false
false
3,335
java
/* * Copyright 2018 IBM Corp. 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.ibm.watson.speech_to_text.v1.model; import com.ibm.cloud.sdk.core.service.model.GenericModel; import com.ibm.cloud.sdk.core.util.Validator; /** * The deleteAudio options. */ public class DeleteAudioOptions extends GenericModel { private String customizationId; private String audioName; /** * Builder. */ public static class Builder { private String customizationId; private String audioName; private Builder(DeleteAudioOptions deleteAudioOptions) { this.customizationId = deleteAudioOptions.customizationId; this.audioName = deleteAudioOptions.audioName; } /** * Instantiates a new builder. */ public Builder() { } /** * Instantiates a new builder with required properties. * * @param customizationId the customizationId * @param audioName the audioName */ public Builder(String customizationId, String audioName) { this.customizationId = customizationId; this.audioName = audioName; } /** * Builds a DeleteAudioOptions. * * @return the deleteAudioOptions */ public DeleteAudioOptions build() { return new DeleteAudioOptions(this); } /** * Set the customizationId. * * @param customizationId the customizationId * @return the DeleteAudioOptions builder */ public Builder customizationId(String customizationId) { this.customizationId = customizationId; return this; } /** * Set the audioName. * * @param audioName the audioName * @return the DeleteAudioOptions builder */ public Builder audioName(String audioName) { this.audioName = audioName; return this; } } private DeleteAudioOptions(Builder builder) { Validator.notEmpty(builder.customizationId, "customizationId cannot be empty"); Validator.notEmpty(builder.audioName, "audioName cannot be empty"); customizationId = builder.customizationId; audioName = builder.audioName; } /** * New builder. * * @return a DeleteAudioOptions builder */ public Builder newBuilder() { return new Builder(this); } /** * Gets the customizationId. * * The customization ID (GUID) of the custom acoustic model that is to be used for the request. You must make the * request with credentials for the instance of the service that owns the custom model. * * @return the customizationId */ public String customizationId() { return customizationId; } /** * Gets the audioName. * * The name of the audio resource for the custom acoustic model. * * @return the audioName */ public String audioName() { return audioName; } }
[ "loganpatino10@gmail.com" ]
loganpatino10@gmail.com
756858e96b95c196b191c0ae1179b0fa57776fb4
063f3b313356c366f7c12dd73eb988a73130f9c9
/erp_ejb/src_facturacion/com/bydan/erp/facturacion/business/dataaccess/TipoDetaNotaCreditoDataAccessAdditional.java
8f636791962b84055e27f2c7c4b6807de2122061
[ "Apache-2.0" ]
permissive
bydan/pre
0c6cdfe987b964e6744ae546360785e44508045f
54674f4dcffcac5dbf458cdf57a4c69fde5c55ff
refs/heads/master
2020-12-25T14:58:12.316759
2016-09-01T03:29:06
2016-09-01T03:29:06
67,094,354
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
/* * ============================================================================ * GNU Lesser General Public License * ============================================================================ * * BYDAN - Free Java BYDAN library. * Copyright (C) 2008 * * This library 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 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. * * BYDAN Corporation */ package com.bydan.erp.facturacion.business.dataaccess; import java.util.List; import java.util.ArrayList; import java.util.Set; import java.util.HashSet; import java.util.ArrayList; import java.io.Serializable; import java.util.Date; import com.bydan.framework.erp.business.entity.DatoGeneral; import com.bydan.framework.erp.business.dataaccess.*;//DataAccessHelper; import com.bydan.erp.facturacion.business.entity.*; @SuppressWarnings("unused") public class TipoDetaNotaCreditoDataAccessAdditional extends DataAccessHelper<TipoDetaNotaCredito> { public TipoDetaNotaCreditoDataAccessAdditional () { } }
[ "byrondanilo10@hotmail.com" ]
byrondanilo10@hotmail.com
6c1c2d8c68556a6bd991f5f8ea29ce2179ee6e61
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/org/apache/shardingsphere/core/routing/type/broadcast/DatabaseBroadcastRoutingEngineTest.java
5ad730a2b391a7d9a811e463ca6169ae1d996498
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
1,851
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.shardingsphere.core.routing.type.broadcast; import java.util.List; import org.apache.shardingsphere.core.routing.type.RoutingResult; import org.apache.shardingsphere.core.routing.type.TableUnit; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.junit.Test; public final class DatabaseBroadcastRoutingEngineTest { private DatabaseBroadcastRoutingEngine databaseBroadcastRoutingEngine; @Test public void assertRoute() { RoutingResult routingResult = databaseBroadcastRoutingEngine.route(); List<TableUnit> tableUnitList = new java.util.ArrayList(routingResult.getTableUnits().getTableUnits()); Assert.assertThat(routingResult, CoreMatchers.instanceOf(RoutingResult.class)); Assert.assertThat(routingResult.getTableUnits().getTableUnits().size(), CoreMatchers.is(2)); Assert.assertThat(tableUnitList.get(0).getDataSourceName(), CoreMatchers.is("ds0")); Assert.assertThat(tableUnitList.get(1).getDataSourceName(), CoreMatchers.is("ds1")); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
6e616d471eb2d9cfde69ed1338ad371368cd877e
1249bf699981de47d3261a35b554ec1856a1520b
/foundation-service/src/main/java/org/unidal/lookup/container/model/transform/DefaultSaxMaker.java
ef7d494803e2d2fd9eb97d9504316b53120b5ed8
[]
no_license
liu76874151/frameworks
32beb451e01524de827857c7d94cc66addebcf45
e10883d2288eec6b1b3bb7a45e77dd6657484452
refs/heads/master
2021-06-30T12:24:37.616392
2017-09-15T09:14:22
2017-09-15T09:14:22
103,633,472
0
0
null
2017-09-15T08:28:08
2017-09-15T08:28:08
null
UTF-8
Java
false
false
2,418
java
package org.unidal.lookup.container.model.transform; import java.util.Arrays; import java.util.HashSet; import org.xml.sax.Attributes; import org.unidal.lookup.container.model.entity.Any; import org.unidal.lookup.container.model.entity.ComponentModel; import org.unidal.lookup.container.model.entity.ConfigurationModel; import org.unidal.lookup.container.model.entity.PlexusModel; import org.unidal.lookup.container.model.entity.RequirementModel; public class DefaultSaxMaker implements IMaker<Attributes> { @Override public Any buildAny(Attributes attributes) { throw new UnsupportedOperationException("Not needed!"); } @Override public ComponentModel buildComponent(Attributes attributes) { ComponentModel component = new ComponentModel(); return component; } @Override public ConfigurationModel buildConfiguration(Attributes attributes) { ConfigurationModel configuration = new ConfigurationModel(); return configuration; } @Override public PlexusModel buildPlexus(Attributes attributes) { PlexusModel plexus = new PlexusModel(); return plexus; } @Override public RequirementModel buildRequirement(Attributes attributes) { RequirementModel requirement = new RequirementModel(); return requirement; } @SuppressWarnings("unchecked") protected <T> T convert(Class<T> type, String value, T defaultValue) { if (value == null || value.length() == 0) { return defaultValue; } if (type == Boolean.class || type == Boolean.TYPE) { return (T) Boolean.valueOf(value); } else if (type == Integer.class || type == Integer.TYPE) { return (T) Integer.valueOf(value); } else if (type == Long.class || type == Long.TYPE) { return (T) Long.valueOf(value); } else if (type == Short.class || type == Short.TYPE) { return (T) Short.valueOf(value); } else if (type == Float.class || type == Float.TYPE) { return (T) Float.valueOf(value); } else if (type == Double.class || type == Double.TYPE) { return (T) Double.valueOf(value); } else if (type == Byte.class || type == Byte.TYPE) { return (T) Byte.valueOf(value); } else if (type == Character.class || type == Character.TYPE) { return (T) (Character) value.charAt(0); } else { return (T) value; } } }
[ "qmwu2000@gmail.com" ]
qmwu2000@gmail.com
7e1a173bc1db35603d8cc0fa5a826db4345e72c7
927c8d365e1cd66e5ec224710156939d12cbbe17
/restlet-1.1.6-5346-sonatype/modules/org.restlet.test/src/org/restlet/test/jaxrs/services/tests/InheritAnnotationTest.java
0c206ac6a7cddc78935bdefe5f52d37b51efa1d0
[]
no_license
peterlynch/spice
63531485189d794d6bdb23dd5f4baae5725a348b
e95877f143d4e9eab3c464550fabe3787da75561
refs/heads/master
2022-10-19T11:30:27.921153
2010-10-12T13:32:12
2010-10-12T13:32:12
997,598
0
0
null
2022-10-04T23:47:23
2010-10-18T13:34:10
Java
UTF-8
Java
false
false
4,658
java
/** * Copyright 2005-2008 Noelios Technologies. * * The contents of this file are subject to the terms of the following open * source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 (the "Licenses"). You can * select the license that you prefer but you may not use this file except in * compliance with one of these Licenses. * * You can obtain a copy of the LGPL 3.0 license at * http://www.gnu.org/licenses/lgpl-3.0.html * * You can obtain a copy of the LGPL 2.1 license at * http://www.gnu.org/licenses/lgpl-2.1.html * * You can obtain a copy of the CDDL 1.0 license at * http://www.sun.com/cddl/cddl.html * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royaltee free commercial license with less * limitations, transferable or non-transferable, directly at * http://www.noelios.com/products/restlet-engine * * Restlet is a registered trademark of Noelios Technologies. */ package org.restlet.test.jaxrs.services.tests; import java.util.HashSet; import java.util.Set; import javax.ws.rs.core.Application; import org.restlet.data.MediaType; import org.restlet.data.Method; import org.restlet.data.Reference; import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.test.jaxrs.services.resources.InheritAnnotationTestService1; import org.restlet.test.jaxrs.services.resources.InheritAnnotationTestService2; import org.restlet.test.jaxrs.services.resources.InheritAnnotationTestServiceInterface; /** * Check, if the inheritation of method annotations works corerct. * * @author Stephan Koops * @see InheritAnnotationTestService1 * @see InheritAnnotationTestService2 * @see InheritAnnotationTestServiceInterface */ public class InheritAnnotationTest extends JaxRsTestCase { private static final Class<InheritAnnotationTestService1> SERVICE_1 = InheritAnnotationTestService1.class; private static final Class<InheritAnnotationTestService2> SERVICE_2 = InheritAnnotationTestService2.class; @Override protected Application getApplication() { return new Application() { @Override public Set<Class<?>> getClasses() { final Set<Class<?>> rrcs = new HashSet<Class<?>>(2); rrcs.add(SERVICE_1); rrcs.add(SERVICE_2); return rrcs; } }; } public void test1() throws Exception { final Reference reference = createReference(SERVICE_1, "getText"); final Response response = accessServer(Method.GET, reference); sysOutEntityIfError(response); assertEquals(Status.SUCCESS_OK, response.getStatus()); assertEqualMediaType(MediaType.TEXT_PLAIN, response); final String entityText = response.getEntity().getText(); assertEquals(InheritAnnotationTestService1.RETURN_STRING, entityText); } public void test2a() throws Exception { final Reference reference = createReference(SERVICE_2, "getText"); final Response response = accessServer(Method.GET, reference); sysOutEntityIfError(response); assertEquals(Status.SUCCESS_OK, response.getStatus()); assertEqualMediaType(MediaType.TEXT_PLAIN, response); final String entityText = response.getEntity().getText(); assertEquals(InheritAnnotationTestService2.RETURN_STRING, entityText); } public void test2b() throws Exception { final Reference reference = createReference(SERVICE_2, "getSubClassText"); final Response response = accessServer(Method.GET, reference); sysOutEntityIfError(response); assertEquals(Status.SUCCESS_OK, response.getStatus()); assertEqualMediaType(MediaType.TEXT_PLAIN, response); final String entityText = response.getEntity().getText(); assertEquals(InheritAnnotationTestService2.RETURN_STRING_SUB, entityText); } public void x_test2c() throws Exception { final Reference reference = createReference(SERVICE_2, "getSubClassText/sub"); final Response response = accessServer(Method.GET, reference); sysOutEntityIfError(response); assertEquals(Status.SUCCESS_OK, response.getStatus()); assertEqualMediaType(MediaType.TEXT_PLAIN, response); final String entityText = response.getEntity().getText(); assertEquals(InheritAnnotationTestService2.RETURN_STRING_SUB2, entityText); } }
[ "dbradicich@5751e0cb-dcb7-432f-92e2-260806df54be" ]
dbradicich@5751e0cb-dcb7-432f-92e2-260806df54be
38cf2ec2b385cbcf468f606a4799a12b02e9add8
9b62a49653d5ef7e2ce8bc9b15ae7fbbcd058cd3
/src/main/java/com/zbkj/crmeb/wechat/vo/SendTemplateMessageVo.java
4f819a8fcf0922258357c8847a53eccd004d983c
[]
no_license
123guo789/E-commerce-marketing-system
cfcc00d11e0f645f30e3b3c465b4a907dd7ab5bc
14241e0777e86cd15404811bb397f820ffb4dfd9
refs/heads/master
2023-05-30T19:43:39.276634
2021-06-16T13:07:54
2021-06-16T13:07:54
363,798,792
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.zbkj.crmeb.wechat.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.util.HashMap; /** * 微信模板发送类 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @ApiModel(value="SendTemplateMessageVo对象", description="微信模板发送类") public class SendTemplateMessageVo { @ApiModelProperty(value = "OPENID", required = true) private String openId; @ApiModelProperty(value = "模板ID", required = true) private String templateId; @ApiModelProperty(value = "模板跳转链接(海外帐号没有跳转能力)") private String url; @ApiModelProperty(value = "发送内容") private HashMap<String, SendTemplateMessageItemVo> data; }
[ "321458547@qq.com" ]
321458547@qq.com
be89887ed3a1dd0f0ae1dbf87d7c5b272cfb0436
b40b76705b45589b45744b7616209d754a5d2ac4
/ch-10/apollo-java/src/main/java/com/cxytiandi/apollo_java/App.java
b6ea440c57c0c7497affaac92fa64f320a287a8a
[]
no_license
gaohanghang/Spring-Cloud-Book-Code-2
91aa2ec166a0155198558da5d739829dae398745
6adde8b577f8238eade41571f58a5e2943b0912e
refs/heads/master
2021-10-24T04:07:36.293149
2021-10-17T10:49:48
2021-10-17T10:49:48
203,406,993
2
0
null
2020-10-13T16:17:46
2019-08-20T15:47:02
Java
UTF-8
Java
false
false
1,693
java
package com.cxytiandi.apollo_java; import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.ConfigChangeListener; import com.ctrip.framework.apollo.ConfigService; import com.ctrip.framework.apollo.model.ConfigChange; import com.ctrip.framework.apollo.model.ConfigChangeEvent; /** * Apollo整合Java项目示列 * * @author yinjihuan * * @about http://cxytiandi.com/about * * @date 2018-12-16 * */ public class App { public static void main(String[] args) { // 指定环境(开发演示用,不能用于生产环境)) System.setProperty("env", "DEV"); Config config = ConfigService.getAppConfig(); //getValue(config); addChangeListener(config); try { Thread.sleep(Integer.MAX_VALUE); } catch (InterruptedException e) { e.printStackTrace(); } } private static void addChangeListener(Config config) { config.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { System.out.println("发生修改数据的命名空间是:" + changeEvent.getNamespace()); for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format("发现修改 - 配置key: %s, 原来的值: %s, 修改后的值: %s, 操作类型: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); } private static void getValue(Config config) { String key = "username"; String defaultValue = "尹吉欢"; String username = config.getProperty(key, defaultValue); System.out.println("username=" + username); } }
[ "1341947277@qq.com" ]
1341947277@qq.com
29254d3d990a1e61049dd2f25da58855ca144160
fb386d4480779accc1353a4041a4661632881348
/10-programming-fundamentals-java/10-basics/10-variables-types/src/main/java/basic/VTCodelab06.java
42f253379fc96552bff6353ae61124dd1565b132
[]
no_license
Jermathie/javaexo1
e65ef4ae418fb2d1d23e54faaf854d97782bc7b2
3e1468f17b94f0aeb771ea611b3ef740dcd32bf8
refs/heads/main
2023-03-12T07:10:37.709324
2021-02-07T16:31:40
2021-02-07T16:31:40
336,832,107
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package basic; public class VTCodelab06 { public static void main(String[] args) { System.out.println("\n"); System.out.println("Assignment 6"); System.out.println("--------------"); // ---------------- // Declare and initialize a char variable // Print the result using: System.out.println("Printing char with value: " + <YOUR_VARIABLE_NAME>); } }
[ "jeremie.mathieu@sfpd.fgov.be" ]
jeremie.mathieu@sfpd.fgov.be
8c8084d30e093496f10f48680c92fae210ae2427
692a7b9325014682d72bd41ad0af2921a86cf12e
/iWiFi/src/com/pubinfo/freewifialliance/view/PersonalPage$1$2.java
388fa615ce95387fe5ce59a64085e0f879974a47
[]
no_license
syanle/WiFi
f76fbd9086236f8a005762c1c65001951affefb6
d58fb3d9ae4143cbe92f6f893248e7ad788d3856
refs/heads/master
2021-01-20T18:39:13.181843
2015-10-29T12:38:57
2015-10-29T12:38:57
45,156,955
0
0
null
null
null
null
UTF-8
Java
false
false
3,897
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.pubinfo.freewifialliance.view; import android.content.Intent; import android.net.Uri; import android.os.Handler; import android.os.Message; import com.pubinfo.wifi_core.core.view.WifiDialog; import java.io.IOException; // Referenced classes of package com.pubinfo.freewifialliance.view: // PersonalPage class val.wifiDialog2 implements com.pubinfo.wifi_core.core.view.hClickListener { final ler this$1; private final WifiDialog val$wifiDialog2; public void onCancelClick() { val$wifiDialog2.dismiss(); } public void onWatchClick() { val$wifiDialog2.dismiss(); handler.sendEmptyMessage(6); } is._cls0() { this$1 = final__pcls0; val$wifiDialog2 = WifiDialog.this; super(); } // Unreferenced inner class com/pubinfo/freewifialliance/view/PersonalPage$1 /* anonymous class */ class PersonalPage._cls1 extends Handler { final PersonalPage this$0; public void handleMessage(final Message wifiDialog1) { switch (wifiDialog1.what) { case 3: // '\003' default: return; case 2: // '\002' PersonalPage.access$0(PersonalPage.this, "\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\u672C"); return; case 4: // '\004' wifiDialog1 = new WifiDialog(PersonalPage.this, 0x7f070002); wifiDialog1.setOnWatchClickListener(new PersonalPage._cls1._cls1()); wifiDialog1.setPoint(introfomation); wifiDialog1.setCanceBtn(w); wifiDialog1.show(); return; case 5: // '\005' wifiDialog1 = new WifiDialog(PersonalPage.this, 0x7f070002); wifiDialog1.setOnWatchClickListener(wifiDialog1. new PersonalPage._cls1._cls2()); wifiDialog1.setPoint(introfomation); wifiDialog1.show(); return; case 6: // '\006' break; } try { Runtime.getRuntime().exec((new StringBuilder("chmod 755 ")).append(PersonalPage.access$1(PersonalPage.this)).toString()); } // Misplaced declaration of an exception variable catch (final Message wifiDialog1) { wifiDialog1.printStackTrace(); } wifiDialog1 = new Intent("android.intent.action.VIEW"); wifiDialog1.addFlags(0x10000000); wifiDialog1.setDataAndType(Uri.fromFile(PersonalPage.access$1(PersonalPage.this)), "application/vnd.android.package-archive"); startActivity(wifiDialog1); finish(); } { this$0 = PersonalPage.this; super(); } // Unreferenced inner class com/pubinfo/freewifialliance/view/PersonalPage$1$1 /* anonymous class */ class PersonalPage._cls1._cls1 implements com.pubinfo.wifi_core.core.view.WifiDialog.OnWatchClickListener { final PersonalPage._cls1 this$1; private final WifiDialog val$wifiDialog1; public void onCancelClick() { wifiDialog1.dismiss(); } public void onWatchClick() { wifiDialog1.dismiss(); handler.sendEmptyMessage(6); } { this$1 = PersonalPage._cls1.this; wifiDialog1 = wifidialog; super(); } } } }
[ "arehigh@gmail.com" ]
arehigh@gmail.com
093b9e65e70b381e37d6fb888870aa4753f19717
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_4d05cb9de388dd7ebc753d063bc5943079b5d2d2/LuntDeployTask/14_4d05cb9de388dd7ebc753d063bc5943079b5d2d2_LuntDeployTask_t.java
63c23571ef0edde4be5250ddd04675b117f2da24
[]
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,376
java
package net.mccg.lunt; import java.io.DataInputStream; import java.io.FileOutputStream; import java.net.URL; import java.net.URLConnection; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; public class LuntDeployTask extends Task{ private String luntUsername; private String luntPassword; private String luntServer; private String project; private String schedule; private String artifact; private String deployUsername; private String deployPassword; private String deployServer; private String deployDir; private String isLocalDeploy; public void execute() throws BuildException { try { String filepath = getLuntService(getLuntProject()).getArtifactUrl(); deploy(filepath); } catch (Exception e) { throw new BuildException(e); } } LuntProject getLuntProject() { return new LuntProject(luntUsername, luntPassword, luntServer, project, schedule, artifact); } LuntServiceImpl getLuntService(LuntProject luntProject) throws Exception { return new LuntServiceImpl(luntProject); } SshServiceImpl getSshService() throws Exception { return new SshServiceImpl(deployServer, deployUsername, deployPassword); } void deploy(final String filepath) { log("Deploying Lunt Artifact: " + filepath); try { URL url = new URL(filepath); URLConnection urlConn = url.openConnection(); urlConn.setDoInput(true); urlConn.setUseCaches(false); DataInputStream dis = new DataInputStream(urlConn.getInputStream()); if(isLocalCopy()){ FileOutputStream fos = new FileOutputStream(deployDir+"/"+getArtifactName(artifact)); int c; while ((c = dis.read()) != -1) fos.write(c); fos.close(); } else { getSshService().sftp(dis, deployDir, getArtifactName(artifact)); } } catch (Exception e) { throw new BuildException(e); } } private String getArtifactName(final String artifact) { if(artifact.indexOf("/") != -1) return artifact.substring(artifact.lastIndexOf("/")+1); return artifact; } private boolean isLocalCopy() { return "true".equalsIgnoreCase(isLocalDeploy); } public void setLuntUsername(String luntUsername) { this.luntUsername = luntUsername; } public void setLuntPassword(String luntPassword) { this.luntPassword = luntPassword; } public void setLuntServer(String luntServer) { this.luntServer = luntServer; } public void setDeployUsername(String deployUsername) { this.deployUsername = deployUsername; } public void setDeployPassword(String deployPassword) { this.deployPassword = deployPassword; } public void setDeployServer(String deployServer) { this.deployServer = deployServer; } public void setProject(String project) { this.project = project; } public void setSchedule(String schedule) { this.schedule = schedule; } public void setArtifact(String artifact) { this.artifact = artifact; } public void setDeployDir(String deployDir) { this.deployDir = deployDir; } public void setIsLocalDeploy(String isLocalDeploy) { this.isLocalDeploy = isLocalDeploy; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a782adf20eef385f76ad36e70ae3f04699b828ab
2c107c0051d942362a5632ca7eca477d6cd66468
/paopao-parent/paopao-api/src/main/java/com/kuangji/paopao/controller/DictAreaController.java
53c05abf7c418d2ea4be7861b943a681476d5f6d
[]
no_license
Mo-AG/xinlizixun_app
8ac23f9ef3091dd40b4aecc59d517808979b7139
40b587a5a69b72547b4b98fa45f4def4c0128fef
refs/heads/master
2023-03-20T06:12:51.074683
2020-06-09T23:03:53
2020-06-09T23:03:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,076
java
package com.kuangji.paopao.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.kuangji.paopao.service.DictAreaService; import com.kuangji.paopao.util.ServiceResultUtils; import com.kuangji.paopao.vo.DictAreaVO; /** * Author 金威正 * Date 2020-02-18 */ @RestController @RequestMapping(value = "/v1/dictArea") public class DictAreaController { @Autowired private DictAreaService dictAreaService; /*** * parentId 0 省 * * areaType 1直辖市 2市 3区 * */ @PostMapping(value = {"/list"}) public Object list(Integer areaType,@RequestParam(defaultValue="0")Integer parentId) { List<DictAreaVO> dictAreaVOs=dictAreaService.listDictAreaVO(); return ServiceResultUtils.success(dictAreaVOs); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
189073f98088d46a804cd634852a2949755fe21e
720a1d60d3abe6845abc60e943fb24a12278fcce
/src/main/java/com/baamtu/atelier/bank/config/LoggingAspectConfiguration.java
e0073bd059f2b6d103fef393af2eb08dedb3782a
[]
no_license
mathiamry/bank-advice-system-blob
c9cc97d4388f581b043ce2795114d9da83c7d3e4
b17024025be4abf4756428f7cd9dcac78ffb1dd8
refs/heads/main
2023-07-05T01:24:02.817332
2021-08-21T18:16:19
2021-08-21T18:16:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
501
java
package com.baamtu.atelier.bank.config; import com.baamtu.atelier.bank.aop.logging.LoggingAspect; import org.springframework.context.annotation.*; import org.springframework.core.env.Environment; import tech.jhipster.config.JHipsterConstants; @Configuration @EnableAspectJAutoProxy public class LoggingAspectConfiguration { @Bean @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public LoggingAspect loggingAspect(Environment env) { return new LoggingAspect(env); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
fc6f6fb3da5852ab138f82fffaeb299b9b872b95
accff7fe3dfff09ce904bc3bbe185b41f4a57f71
/src/main/java/org/chinalbs/logistics/common/utils/ReflectionUtils.java
fcf67560d8d8e9a13d7fc2e43e2dabeb09a3a55c
[]
no_license
wangyiran125/huaxing
6fae74b3c0e27863e6675dc9e3e68a70ce84cf56
2b531aa58d713306fae49ba09d5c9fc483bc73bc
refs/heads/master
2021-01-10T01:37:50.095847
2015-05-29T02:36:30
2015-05-29T02:36:30
36,478,552
0
1
null
null
null
null
UTF-8
Java
false
false
679
java
package org.chinalbs.logistics.common.utils; import java.lang.reflect.Method; public class ReflectionUtils { /** * 获得method对象的一个简单字符串描述,不能保证唯一性 * @param method * @return */ public static String toSimpleSignature(Method method) { StringBuilder sb = new StringBuilder(); sb.append(method.getDeclaringClass().getSimpleName()).append('.').append(method.getName()).append('('); Class<?>[] params = method.getParameterTypes(); for (int i = 0; i < params.length; i++) { sb.append(params[i].getSimpleName()); if (i < params.length -1) { sb.append(","); } } sb.append(')'); return sb.toString(); } }
[ "wangyiran125@icloud.com" ]
wangyiran125@icloud.com
0956026b96681853357c5e016adbd80f8dfcfcc6
32927026863b4e7ecab9b956ee4eb1b3958ce20b
/webs/simple-web-netty/src/test/java/com/simple/boot/web/netty/model/User.java
e15024929a34ce430f6dd35ac0ad6ab4a0af1b21
[ "Apache-2.0" ]
permissive
visualkhh/simple-boot
d4acbea85f0b7c70c28d943d885ec64c430c10b5
d28e9645e230181fcb3b5c848f4721e047857657
refs/heads/master
2023-04-13T14:29:59.740547
2021-04-22T02:20:01
2021-04-22T02:20:01
338,986,538
7
2
null
2021-04-22T02:20:02
2021-02-15T06:27:51
Java
UTF-8
Java
false
false
310
java
package com.simple.boot.web.netty.model; import lombok.Builder; import lombok.Getter; import lombok.Setter; @Getter @Setter public class User { public String name; public Integer age; @Builder public User(String name, Integer age) { this.name = name; this.age = age; } }
[ "visualkhh@gmail.com" ]
visualkhh@gmail.com
3b7eb5f5d84ef01b883ca46f4445fb8308c7badd
67e94be3e7db237a680cc14d264a7da0294f40aa
/initializr-generator/src/test/java/io/spring/initializr/util/AgentTests.java
cb9e7b95ca2b9ba2587806075816103d750cecc4
[ "Apache-2.0" ]
permissive
fluig/initializr
0b79f0e4f5757de864b5d342a1c7b84373421648
899f6d3967143a8db3fa234bd709f592de1a819a
refs/heads/master
2020-03-11T03:35:22.906768
2018-04-12T16:04:47
2018-04-12T16:04:47
129,752,225
0
1
Apache-2.0
2018-04-16T14:00:12
2018-04-16T14:00:11
null
UTF-8
Java
false
false
3,378
java
/* * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.spring.initializr.util; import org.junit.Test; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertThat; /** * Tests for {@link Agent}. * * @author Stephane Nicoll */ public class AgentTests { @Test public void checkCurl() { Agent agent = Agent.fromUserAgent("curl/1.2.4"); assertThat(agent.getId(), equalTo(Agent.AgentId.CURL)); assertThat(agent.getVersion(), equalTo("1.2.4")); } @Test public void checkHttpie() { Agent agent = Agent.fromUserAgent("HTTPie/0.8.0"); assertThat(agent.getId(), equalTo(Agent.AgentId.HTTPIE)); assertThat(agent.getVersion(), equalTo("0.8.0")); } @Test public void checkJBossForge() { Agent agent = Agent.fromUserAgent("SpringBootForgeCli/1.0.0.Alpha4"); assertThat(agent.getId(), equalTo(Agent.AgentId.JBOSS_FORGE)); assertThat(agent.getVersion(), equalTo("1.0.0.Alpha4")); } @Test public void checkSpringBootCli() { Agent agent = Agent.fromUserAgent("SpringBootCli/1.3.1.RELEASE"); assertThat(agent.getId(), equalTo(Agent.AgentId.SPRING_BOOT_CLI)); assertThat(agent.getVersion(), equalTo("1.3.1.RELEASE")); } @Test public void checkSts() { Agent agent = Agent.fromUserAgent("STS 3.7.0.201506251244-RELEASE"); assertThat(agent.getId(), equalTo(Agent.AgentId.STS)); assertThat(agent.getVersion(), equalTo("3.7.0.201506251244-RELEASE")); } @Test public void checkIntelliJIDEA() { Agent agent = Agent.fromUserAgent("IntelliJ IDEA"); assertThat(agent.getId(), equalTo(Agent.AgentId.INTELLIJ_IDEA)); assertThat(agent.getVersion(), is(nullValue())); } @Test public void checkIntelliJIDEAWithVersion() { Agent agent = Agent.fromUserAgent("IntelliJ IDEA/144.2 (Community edition; en-us)"); assertThat(agent.getId(), equalTo(Agent.AgentId.INTELLIJ_IDEA)); assertThat(agent.getVersion(), is("144.2")); } @Test public void checkNetBeans() { Agent agent = Agent.fromUserAgent("nb-springboot-plugin/0.1"); assertThat(agent.getId(), equalTo(Agent.AgentId.NETBEANS)); assertThat(agent.getVersion(), is("0.1")); } @Test public void checkVsCode() { Agent agent = Agent.fromUserAgent("vscode/0.2.0"); assertThat(agent.getId(), equalTo(Agent.AgentId.VSCODE)); assertThat(agent.getVersion(), is("0.2.0")); } @Test public void checkGenericBrowser() { Agent agent = Agent.fromUserAgent( "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MMB29K) "); assertThat(agent.getId(), equalTo(Agent.AgentId.BROWSER)); assertThat(agent.getVersion(), is(nullValue())); } @Test public void checkRobot() { Agent agent = Agent.fromUserAgent("Googlebot-Mobile"); assertThat(agent, is(nullValue())); } }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
5b0c956d74187992ad295ded17b80cc3ae5a5a07
a61d019ccc331c2ac68694dc6bce06f06a8adba2
/springboot-demo/src/main/java/com/personal/test/demo/FilterConfig.java
688b62a1f35ba1767cc998b2655cf0398ccce80e
[]
no_license
OuYangLiang/code-example
de110b36ba3c3066019b95c7fc1b9463f9d3a6bd
80f1dbb52ffb761d8b25ab677e4957136301d20e
refs/heads/master
2023-07-25T21:42:54.999876
2022-06-28T01:10:03
2022-06-28T01:10:03
112,132,893
1
2
null
2023-07-16T10:23:58
2017-11-27T01:38:56
Java
UTF-8
Java
false
false
727
java
package com.personal.test.demo; import javax.servlet.Filter; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.personal.test.demo.filter.DemoFilter; @Configuration public class FilterConfig { /** * 注册Demo Filter */ @Bean public FilterRegistrationBean<Filter> filterRegistrationBean() { FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>(); registration.setOrder(1); registration.setFilter(new DemoFilter()); registration.addUrlPatterns("/*"); return registration; } }
[ "ouyanggod@gmail.com" ]
ouyanggod@gmail.com
d4214cf622bda5fa99c7981734bed5755c4d2b9f
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/13041693.java
7ac3849718cfc2bc63f53a650a0be3d59b1891f9
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,501
java
import java.io.*; import java.lang.*; import java.util.*; import java.net.*; import java.applet.*; import java.security.*; class c13041693 { public MyHelperClass getCookies(HttpURLConnection o0){ return null; } // @Override public void vote(String urlString, Map<String, String> headData, Map<String, String> paramData) throws Throwable { HttpURLConnection httpConn = null; try { URL url = new URL(urlString); httpConn = (HttpURLConnection) url.openConnection(); String cookies =(String)(Object) getCookies(httpConn); System.out.println(cookies); BufferedReader post = new BufferedReader(new InputStreamReader(httpConn.getInputStream(), "GB2312")); String text = null; while ((text = post.readLine()) != null) { System.out.println(text); } } catch (MalformedURLException e) { e.printStackTrace(); throw new VoteBeanException("网址不正确", e); } catch (IOException e) { e.printStackTrace(); throw new VoteBeanException("不能打开网址", e); } } } // Code below this line has been added to remove errors class MyHelperClass { } class VoteBeanException extends Exception{ public VoteBeanException(String errorMessage) { super(errorMessage); } VoteBeanException(String o0, IOException o1){} VoteBeanException(){} VoteBeanException(String o0, MalformedURLException o1){} }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
5ada98390c4faec0cdb268f1cf636b9140dcc861
dc2cd532798e8b3f1477ae17fd363a04a680a710
/docx4j-openxml-objects/src/main/java/org/docx4j/com/microsoft/schemas/office/drawing/x2014/chartex/STEntityType.java
67d57f249eeeb05d9911bfc8ef9419d3e9ffd1ea
[ "Apache-2.0" ]
permissive
aammar79/docx4j
4715a6924f742e6e921b08c009cb556e1c42e284
0eec2587ab38db5265ce66c12423849c1bea2c60
refs/heads/master
2022-09-15T07:27:19.545649
2022-02-24T22:18:53
2022-02-24T22:18:53
175,789,215
0
0
null
2019-03-15T09:27:09
2019-03-15T09:27:07
null
UTF-8
Java
false
false
2,302
java
package org.docx4j.com.microsoft.schemas.office.drawing.x2014.chartex; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ST_EntityType. * * <p>The following schema fragment specifies the expected content contained within this class. * <pre> * &lt;simpleType name="ST_EntityType"&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; * &lt;enumeration value="Address"/&gt; * &lt;enumeration value="AdminDistrict"/&gt; * &lt;enumeration value="AdminDistrict2"/&gt; * &lt;enumeration value="AdminDistrict3"/&gt; * &lt;enumeration value="Continent"/&gt; * &lt;enumeration value="CountryRegion"/&gt; * &lt;enumeration value="Locality"/&gt; * &lt;enumeration value="Ocean"/&gt; * &lt;enumeration value="Planet"/&gt; * &lt;enumeration value="PostalCode"/&gt; * &lt;enumeration value="Region"/&gt; * &lt;enumeration value="Unsupported"/&gt; * &lt;/restriction&gt; * &lt;/simpleType&gt; * </pre> * */ @XmlType(name = "ST_EntityType") @XmlEnum public enum STEntityType { @XmlEnumValue("Address") ADDRESS("Address"), @XmlEnumValue("AdminDistrict") ADMIN_DISTRICT("AdminDistrict"), @XmlEnumValue("AdminDistrict2") ADMIN_DISTRICT_2("AdminDistrict2"), @XmlEnumValue("AdminDistrict3") ADMIN_DISTRICT_3("AdminDistrict3"), @XmlEnumValue("Continent") CONTINENT("Continent"), @XmlEnumValue("CountryRegion") COUNTRY_REGION("CountryRegion"), @XmlEnumValue("Locality") LOCALITY("Locality"), @XmlEnumValue("Ocean") OCEAN("Ocean"), @XmlEnumValue("Planet") PLANET("Planet"), @XmlEnumValue("PostalCode") POSTAL_CODE("PostalCode"), @XmlEnumValue("Region") REGION("Region"), @XmlEnumValue("Unsupported") UNSUPPORTED("Unsupported"); private final String value; STEntityType(String v) { value = v; } public String value() { return value; } public static STEntityType fromValue(String v) { for (STEntityType c: STEntityType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "jason@plutext.org" ]
jason@plutext.org
f40eb62a8214cdaa5c9188f210a7edb75c0e0e1e
67984d7d945b67709b24fda630efe864b9ae9c72
/base-info/src/main/java/com/ey/piit/sdo/invoice/vo/InvoiceOtherVo.java
bcd078900184aa43311f6785e62b4e1cceebaa8b
[]
no_license
JackPaiPaiNi/Piit
76c7fb6762912127a665fa0638ceea1c76893fc6
89b8d79487e6d8ff21319472499b6e255104e1f6
refs/heads/master
2020-04-07T22:30:35.105370
2018-11-23T02:58:31
2018-11-23T02:58:31
158,773,760
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package com.ey.piit.sdo.invoice.vo; import com.ey.piit.sdo.invoice.entity.InvoiceOther; /** * 发票其他费用明细Entity * @author 高文浩 */ public class InvoiceOtherVo extends InvoiceOther { public InvoiceOtherVo() { super(); } public InvoiceOtherVo(String id){ super(id); } }
[ "1210287515@master" ]
1210287515@master
693479b878b74e16214a976f7e8b5c55c9abe722
2af17e20773cb5f80ae5e27b53da5904b83cf5a4
/source code/opeserver_Onsite_Release_Source_Code/src/paymentsrc/com/ope/patu/payments/lum2/beans/LUM2PaymentRecordBean.java
c4cecd1d623a7bad1d21b74b46509e8c6ccb2fdc
[]
no_license
debjava/OPE_releases
d977e8a16d7f33230456566f555fe50522162151
d9d1c34d998dd128392e2e6e9572fab7da3fd41d
refs/heads/master
2020-04-08T09:07:19.787283
2018-11-26T18:21:09
2018-11-26T18:21:09
159,208,875
0
0
null
null
null
null
UTF-8
Java
false
false
6,169
java
package com.ope.patu.payments.lum2.beans; import java.util.ArrayList; import java.util.List; public class LUM2PaymentRecordBean { String applicationCode,recordCode,acceptanceCode,beneficiaryNameAddress,beneficiaryCountryCode,swiftCode, beneficiaryBankNameAddress,beneficiaryAccountCode,reasonPaymentInformation, currencyAmount,currencyCode, reservedWord1,exchangeRateAgmtNo,paymentType,serviceFee, debitDate, counterValuePayment,exchangeRatePayment, debitingAccount, debitingAccountCurrencyCode,debitingAmount,archiveId,feedbackCurrency,reservedWord2; int lineLength; int seqNo; private List<String> paymentErrorMsg = new ArrayList<String>(); private List<String> paymentSuccessMsg = new ArrayList<String>(); private List<String> itemisationErrorMsg = new ArrayList<String>(); private List<String> paymentRejectedMsg = new ArrayList<String>(); public int getSeqNo() { return seqNo; } public void setSeqNo(int seqNo) { this.seqNo = seqNo; } public List<String> getItemisationErrorMsg() { return itemisationErrorMsg; } public void setItemisationErrorMsg(List<String> itemisationErrorMsg) { this.itemisationErrorMsg = itemisationErrorMsg; } public String getApplicationCode() { return applicationCode; } public void setApplicationCode(String applicationCode) { this.applicationCode = applicationCode; } public String getRecordCode() { return recordCode; } public void setRecordCode(String recordCode) { this.recordCode = recordCode; } public String getAcceptanceCode() { return acceptanceCode; } public void setAcceptanceCode(String acceptanceCode) { this.acceptanceCode = acceptanceCode; } public String getBeneficiaryNameAddress() { return beneficiaryNameAddress; } public void setBeneficiaryNameAddress(String beneficiaryNameAddress) { this.beneficiaryNameAddress = beneficiaryNameAddress; } public String getBeneficiaryCountryCode() { return beneficiaryCountryCode; } public void setBeneficiaryCountryCode(String beneficiaryCountryCode) { this.beneficiaryCountryCode = beneficiaryCountryCode; } public String getSwiftCode() { return swiftCode; } public void setSwiftCode(String swiftCode) { this.swiftCode = swiftCode; } public String getBeneficiaryBankNameAddress() { return beneficiaryBankNameAddress; } public void setBeneficiaryBankNameAddress(String beneficiaryBankNameAddress) { this.beneficiaryBankNameAddress = beneficiaryBankNameAddress; } public String getBeneficiaryAccountCode() { return beneficiaryAccountCode; } public void setBeneficiaryAccountCode(String beneficiaryAccountCode) { this.beneficiaryAccountCode = beneficiaryAccountCode; } public String getReasonPaymentInformation() { return reasonPaymentInformation; } public void setReasonPaymentInformation(String reasonPaymentInformation) { this.reasonPaymentInformation = reasonPaymentInformation; } public String getCurrencyAmount() { return currencyAmount; } public void setCurrencyAmount(String currencyAmount) { this.currencyAmount = currencyAmount; } public String getCurrencyCode() { return currencyCode; } public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } public String getReservedWord1() { return reservedWord1; } public void setReservedWord1(String reservedWord1) { this.reservedWord1 = reservedWord1; } public String getExchangeRateAgmtNo() { return exchangeRateAgmtNo; } public void setExchangeRateAgmtNo(String exchangeRateAgmtNo) { this.exchangeRateAgmtNo = exchangeRateAgmtNo; } public String getPaymentType() { return paymentType; } public void setPaymentType(String paymentType) { this.paymentType = paymentType; } public String getServiceFee() { return serviceFee; } public void setServiceFee(String serviceFee) { this.serviceFee = serviceFee; } public String getDebitDate() { return debitDate; } public void setDebitDate(String debitDate) { this.debitDate = debitDate; } public String getCounterValuePayment() { return counterValuePayment; } public void setCounterValuePayment(String counterValuePayment) { this.counterValuePayment = counterValuePayment; } public String getExchangeRatePayment() { return exchangeRatePayment; } public void setExchangeRatePayment(String exchangeRatePayment) { this.exchangeRatePayment = exchangeRatePayment; } public String getDebitingAccount() { return debitingAccount; } public void setDebitingAccount(String debitingAccount) { this.debitingAccount = debitingAccount; } public String getDebitingAccountCurrencyCode() { return debitingAccountCurrencyCode; } public void setDebitingAccountCurrencyCode(String debitingAccountCurrencyCode) { this.debitingAccountCurrencyCode = debitingAccountCurrencyCode; } public String getDebitingAmount() { return debitingAmount; } public void setDebitingAmount(String debitingAmount) { this.debitingAmount = debitingAmount; } public String getArchiveId() { return archiveId; } public void setArchiveId(String archiveId) { this.archiveId = archiveId; } public String getFeedbackCurrency() { return feedbackCurrency; } public void setFeedbackCurrency(String feedbackCurrency) { this.feedbackCurrency = feedbackCurrency; } public String getReservedWord2() { return reservedWord2; } public void setReservedWord2(String reservedWord2) { this.reservedWord2 = reservedWord2; } public int getLineLength() { return lineLength; } public void setLineLength(int lineLength) { this.lineLength = lineLength; } public List<String> getPaymentErrorMsg() { return paymentErrorMsg; } public void setPaymentErrorMsg(List<String> paymentErrorMsg) { this.paymentErrorMsg = paymentErrorMsg; } public List<String> getPaymentSuccessMsg() { return paymentSuccessMsg; } public void setPaymentSuccessMsg(List<String> paymentSuccessMsg) { this.paymentSuccessMsg = paymentSuccessMsg; } public List<String> getPaymentRejectedMsg() { return paymentRejectedMsg; } public void setPaymentRejectedMsg(List<String> paymentRejectedMsg) { this.paymentRejectedMsg = paymentRejectedMsg; } }
[ "deba.java@gmail.com" ]
deba.java@gmail.com
9f8cfd0da8d4c225ffa4e641191c784ea66d3ba1
6f98ae382525553896f550dde6002c53d193cf8b
/src/main/java/com/liuyanzhao/forum/controller/common/KaptchaController.java
00cbe920b88ca68920e7698b2acdcf9330653795
[]
no_license
saysky/codergroup
8979d4c3801c4b799827aae49c39a1569cbfba4e
c62521da1add3179a5dceed1707e6c355d06c67d
refs/heads/master
2023-03-03T10:42:52.474469
2022-05-07T04:39:37
2022-05-07T04:39:37
190,708,888
31
9
null
2023-02-22T05:15:58
2019-06-07T08:05:46
Java
UTF-8
Java
false
false
1,911
java
package com.liuyanzhao.forum.controller.common; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import javax.servlet.ServletOutputStream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import com.google.code.kaptcha.Constants; import com.google.code.kaptcha.Producer; /** * @author 言曌 * @date 2018/5/4 下午12:36 */ @Controller public class KaptchaController extends BaseController { @Autowired private Producer captchaProducer; @GetMapping("/getKaptchaImage") public void getKaptchaImage() throws Exception { response.setDateHeader("Expires", 0); // Set standard HTTP/1.1 no-cache headers. response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate"); // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader("Cache-Control", "post-check=0, pre-check=0"); // Set standard HTTP/1.0 no-cache header. response.setHeader("Pragma", "no-cache"); // return a jpeg response.setContentType("image/jpeg"); // create the text for the image String capText = captchaProducer.createText(); // store the text in the session //request.getSession().setAttribute(Constants.KAPTCHA_SESSION_KEY, capText); //将验证码存到session session.setAttribute(Constants.KAPTCHA_SESSION_KEY, capText); // System.out.println("验证码是:"+capText); // create the image with the text BufferedImage bi = captchaProducer.createImage(capText); ServletOutputStream out = response.getOutputStream(); // write the data out ImageIO.write(bi, "jpg", out); try { out.flush(); } finally { out.close(); } } }
[ "847064370@qq.com" ]
847064370@qq.com
619cc7b65cd41bb8d8bd0a62a2ba110862cecc63
285b8c38ab7e1b9c5eecc7d9c858eaa9ed39afc7
/cloud-config-center-3344/src/main/java/com/atguigu/springcloud/ConfigCenterApplication3344.java
55d7d83c5a97c3477fdd0ff7c385929386a31dcc
[]
no_license
wangchirl/cloud2020
66b22ac12012e29470268b8dfce2f40424ef55ac
ed8f99542be42f321ddb83ef3ef53f487e9a680a
refs/heads/master
2022-07-04T18:06:58.720928
2020-03-13T05:57:43
2020-03-13T05:57:43
246,998,511
0
0
null
2022-06-21T02:58:46
2020-03-13T05:56:19
Java
UTF-8
Java
false
false
521
java
package com.atguigu.springcloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.config.server.EnableConfigServer; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @SpringBootApplication @EnableConfigServer @EnableEurekaClient public class ConfigCenterApplication3344 { public static void main(String[] args) { SpringApplication.run(ConfigCenterApplication3344.class,args); } }
[ "“757748953@qq.com" ]
“757748953@qq.com
1083546a330fc8ff1fd9e0d56411091134e0b824
5979994b215fabe125cd756559ef2166c7df7519
/aimir-mdms-iesco/src/main/java/_1_release/cpsm_v4/MspCIMObject.java
5abb3888876932cf333a8df072bfc06aa0f8cf70
[]
no_license
TechTinkerer42/Haiti
91c45cb1b784c9afc61bf60d43e1d5623aeba888
debaea96056d1d4611b79bd846af8f7484b93e6e
refs/heads/master
2023-04-28T23:39:43.176592
2021-05-03T10:49:42
2021-05-03T10:49:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,918
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.07.22 at 06:41:41 PM KST // package _1_release.cpsm_v4; import java.util.HashMap; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; /** * <p>Java class for mspCIMObject complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="mspCIMObject"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="extensions" type="{cpsm_V4.1_Release}extensions" minOccurs="0"/> * &lt;element name="comments" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="extensionsList" type="{cpsm_V4.1_Release}extensionsList" minOccurs="0"/> * &lt;element name="IdentifiedObject" type="{cpsm_V4.1_Release}IdentifiedObject" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="objectID" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="verb" type="{cpsm_V4.1_Release}action" default="Change" /> * &lt;attribute name="errorString" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="replaceID" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;attribute name="utility" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;anyAttribute/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "mspCIMObject", propOrder = { "extensions", "comments", "extensionsList", "identifiedObject" }) public abstract class MspCIMObject { protected Extensions extensions; protected String comments; protected ExtensionsList extensionsList; @XmlElement(name = "IdentifiedObject") protected IdentifiedObject identifiedObject; @XmlAttribute(name = "objectID") protected String objectID; @XmlAttribute(name = "verb") protected Action verb; @XmlAttribute(name = "errorString") protected String errorString; @XmlAttribute(name = "replaceID") protected String replaceID; @XmlAttribute(name = "utility") protected String utility; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the extensions property. * * @return * possible object is * {@link Extensions } * */ public Extensions getExtensions() { return extensions; } /** * Sets the value of the extensions property. * * @param value * allowed object is * {@link Extensions } * */ public void setExtensions(Extensions value) { this.extensions = value; } /** * Gets the value of the comments property. * * @return * possible object is * {@link String } * */ public String getComments() { return comments; } /** * Sets the value of the comments property. * * @param value * allowed object is * {@link String } * */ public void setComments(String value) { this.comments = value; } /** * Gets the value of the extensionsList property. * * @return * possible object is * {@link ExtensionsList } * */ public ExtensionsList getExtensionsList() { return extensionsList; } /** * Sets the value of the extensionsList property. * * @param value * allowed object is * {@link ExtensionsList } * */ public void setExtensionsList(ExtensionsList value) { this.extensionsList = value; } /** * Gets the value of the identifiedObject property. * * @return * possible object is * {@link IdentifiedObject } * */ public IdentifiedObject getIdentifiedObject() { return identifiedObject; } /** * Sets the value of the identifiedObject property. * * @param value * allowed object is * {@link IdentifiedObject } * */ public void setIdentifiedObject(IdentifiedObject value) { this.identifiedObject = value; } /** * Gets the value of the objectID property. * * @return * possible object is * {@link String } * */ public String getObjectID() { return objectID; } /** * Sets the value of the objectID property. * * @param value * allowed object is * {@link String } * */ public void setObjectID(String value) { this.objectID = value; } /** * Gets the value of the verb property. * * @return * possible object is * {@link Action } * */ public Action getVerb() { if (verb == null) { return Action.CHANGE; } else { return verb; } } /** * Sets the value of the verb property. * * @param value * allowed object is * {@link Action } * */ public void setVerb(Action value) { this.verb = value; } /** * Gets the value of the errorString property. * * @return * possible object is * {@link String } * */ public String getErrorString() { return errorString; } /** * Sets the value of the errorString property. * * @param value * allowed object is * {@link String } * */ public void setErrorString(String value) { this.errorString = value; } /** * Gets the value of the replaceID property. * * @return * possible object is * {@link String } * */ public String getReplaceID() { return replaceID; } /** * Sets the value of the replaceID property. * * @param value * allowed object is * {@link String } * */ public void setReplaceID(String value) { this.replaceID = value; } /** * Gets the value of the utility property. * * @return * possible object is * {@link String } * */ public String getUtility() { return utility; } /** * Sets the value of the utility property. * * @param value * allowed object is * {@link String } * */ public void setUtility(String value) { this.utility = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "marsr0913@nuritelecom.com" ]
marsr0913@nuritelecom.com
8117c267a09e2b95b0a468bcdd1f3144ea657997
96afbc3165ac24c6be2d1cd9ec19c7e07ecc05ff
/src/main/java/eu/mihosoft/vmf/core/DelegationInfo.java
0358088d544387f0af28d77b457b6bc9095daff1
[ "Apache-2.0" ]
permissive
chandra1123/VMF
b81f240567a9725d3b0b2b339e57589dad547d0d
b931f6f08923c2bdf245c2c63d96313dfea3ba9d
refs/heads/master
2020-03-23T09:27:19.732898
2018-07-16T20:42:38
2018-07-16T20:42:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,995
java
/* * Copyright 2017-2018 Michael Hoffer <info@michaelhoffer.de>. All rights reserved. * Copyright 2017-2018 Goethe Center for Scientific Computing, University Frankfurt. 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. * * If you use this software for scientific research then please cite the following publication(s): * * M. Hoffer, C. Poliwoda, & G. Wittum. (2013). Visual reflection library: * a framework for declarative GUI programming on the Java platform. * Computing and Visualization in Science, 2013, 16(4), * 181–192. http://doi.org/10.1007/s00791-014-0230-y */ package eu.mihosoft.vmf.core; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Parameter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; /** * Created by miho on 21.03.2017. * * @author Michael Hoffer <info@michaelhoffer.de> */ public class DelegationInfo { private final String fullTypeName; private final String returnType; private final String methodName; private final List<String> paramTypes; private final List<String> paramNames; private static final List<String> delegationTypes = new ArrayList<>(); private final String varName; private final boolean constructor; private DelegationInfo(String fullTypeName, String methodName, String returnType, List<String> paramTypes, List<String> paramNames, boolean constructor) { this.fullTypeName = fullTypeName; this.methodName = methodName; this.returnType = returnType; this.paramTypes = Collections.unmodifiableList(paramTypes); this.paramNames = Collections.unmodifiableList(paramNames); if(!delegationTypes.contains(fullTypeName)) { delegationTypes.add(fullTypeName); } varName = "_vmf_delegate"+delegationTypes.indexOf(fullTypeName); this.constructor = constructor; } public static DelegationInfo newInstance(String className, String methodName, String returnType, List<String> paramTypes, List<String> paramNames, boolean constructor) { return new DelegationInfo(className, methodName, returnType, paramTypes, paramNames, constructor); } public static DelegationInfo newInstance(Model model, Method m) { DelegateTo delegation = m.getAnnotation(DelegateTo.class); if(delegation==null) { return null; } List<String> paramTypes = new ArrayList<>(m.getParameters().length); List<String> paramNames = new ArrayList<>(m.getParameters().length); for(Parameter p : m.getParameters()) { paramTypes.add(TypeUtil.getTypeAsString(model,p.getType())); paramNames.add(p.getName()); } return newInstance( delegation.className(), m.getName(), TypeUtil.getReturnTypeAsString(model,m), paramTypes, paramNames, false); } public static DelegationInfo newInstance(Model model, Class<?> clazz) { DelegateTo delegation = clazz.getAnnotation(DelegateTo.class); if(delegation==null) { return null; } List<String> paramTypes = new ArrayList<>(); List<String> paramNames = new ArrayList<>(); return newInstance( delegation.className(), "on"+clazz.getSimpleName()+"Instantiated", TypeUtil.getTypeAsString(model,clazz), paramTypes, paramNames, true); } public List<String> getParamTypes() { return paramTypes; } public List<String> getParamNames() { return paramNames; } public String getFullTypeName() { return fullTypeName; } public String getMethodName() { return methodName; } public String getReturnType() { return returnType; } public String getMethodDeclaration() { String method = "public " + getReturnType() + " " + getMethodName()+"("; for(int i = 0; i < paramTypes.size();i++) { method += (i>0?", ":"") + paramTypes.get(i) + " " + paramNames.get(i); } method+=")"; return method; } public boolean isVoid() { return returnType.equals(void.class.getName()); } public boolean isConstructor() { return constructor; } public String getVarName() { return varName; } }
[ "info@michaelhoffer.de" ]
info@michaelhoffer.de
f3c0bc122607a42b785e4d993e92d46ddd82c656
9f62d3a5a5923ba1809dc2d621f1a627c4034c73
/ProgrammingContest/src/leetcode/weekly_contest/_260/A.java
2ceb670af588809909d6b21f20ed520af3da10da
[]
no_license
smakslow/java-learn
aa5587eaba0acd522850afc9cbc32597ad3be456
7d37c59568b047d384245fd28abf7bc3e0013093
refs/heads/master
2023-08-30T04:14:13.962547
2021-10-11T16:29:17
2021-10-11T16:29:17
356,228,254
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package leetcode.weekly_contest._260; public class A { class Solution { public int maximumDifference(int[] nums) { int ans = -1; for (int i = 0; i < nums.length; i++) { for (int j = i + 1; j < nums.length; j++) { if (nums[j] > nums[i]) ans = Math.max(nums[j] - nums[i], ans); } } return ans; } } }
[ "514841961@qq.com" ]
514841961@qq.com
9ad7b8abff7ad00012dfc2b2bcc71eb1a42da0ca
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XCOMMONS-1057-8-11-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/job/AbstractJob_ESTest_scaffolding.java
8d9bf36f4c3ccbe741df2837105bbcf1dc8415bb
[]
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
429
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 12:26:52 UTC 2020 */ package org.xwiki.job; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
daf3e57079c1e7123cd3cbdfc5681c9e501a3b86
225bd2dc2179d10ec57ccd9f4da8ecb1ef119057
/app/src/main/java/com/louisgeek/myarch/image/picasso/PicassoImageLoader.java
f7b89898351b261223baaff8d213660ed45cfa1c
[]
no_license
louisgeek/MyArch
0676e5fa7a387ff037bd572798c13184a61c6209
e1e4767ffea519671f6610309daac2c444d21ee0
refs/heads/master
2020-03-14T12:09:43.767820
2018-05-06T16:36:54
2018-05-06T16:36:54
131,605,632
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package com.louisgeek.myarch.image.picasso; import android.widget.ImageView; import com.louisgeek.myarch.image.IImageLoader; import com.squareup.picasso.Picasso; import java.io.File; public class PicassoImageLoader implements IImageLoader { @Override public void load(ImageView imageView, int imageResId) { Picasso.get().load(imageResId).into(imageView); } @Override public void load(ImageView imageView, File imageFile) { Picasso.get().load(imageFile).into(imageView); } @Override public void load(ImageView imageView, String url) { Picasso.get().load(url).into(imageView); } }
[ "louisgeek@qq.com" ]
louisgeek@qq.com
73b5989ef29f42cad0233c648b94fad63dd26396
485c4fb77a6a3e8773ac98cb4bbf4915ecd82a0a
/app/src/main/java/com/example/geomob2/Videos.java
54d9ccc64f6a17428386f2a27a4b8bacb531a822
[]
no_license
RekkasImene/ProjetMob
8b2c6af68b7b74d026110e2e37024b1f75dbc745
596fba3d24fa48a28d7c2c5826b06cff1a438a53
refs/heads/master
2022-11-15T12:07:16.739505
2020-06-30T12:38:45
2020-06-30T12:38:45
276,091,348
0
0
null
null
null
null
UTF-8
Java
false
false
849
java
package com.example.geomob2; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity(tableName = "Videos") public class Videos { public Videos(String title,String video) { this.title = title; this.video = video; } @PrimaryKey(autoGenerate = true) private int id; @ColumnInfo(name = "title") private String title; @ColumnInfo(name = "video") private String video; public int getId() { return id; } public String getTitle() { return title; } public String getVideo() { return video; } public void setTitle(String title) { this.title = title; } public void setVideo(String name) { this.video = name; } public void setId(int name) { this.id = name; } }
[ "you@example.com" ]
you@example.com
0339fa8d80da0844a3267f6545e80f8c57bf54f6
49b4cb79c910a17525b59d4b497a09fa28a9e3a8
/parserValidCheck/src/main/java/com/ke/css/cimp/fwb/fwb7/Rule_CHARGEABLE_WEIGHT.java
43fb7d68ea22e3bfdaf1bf134a27dd1eadeb8b38
[]
no_license
ganzijo/koreanair
a7d750b62cec2647bfb2bed4ca1bf8648d9a447d
e980fb11bc4b8defae62c9d88e5c70a659bef436
refs/heads/master
2021-04-26T22:04:17.478461
2018-03-06T05:59:32
2018-03-06T05:59:32
124,018,887
0
0
null
null
null
null
UTF-8
Java
false
false
2,304
java
package com.ke.css.cimp.fwb.fwb7; /* ----------------------------------------------------------------------------- * Rule_CHARGEABLE_WEIGHT.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:38:08 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_CHARGEABLE_WEIGHT extends Rule { public Rule_CHARGEABLE_WEIGHT(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_CHARGEABLE_WEIGHT parse(ParserContext context) { context.push("CHARGEABLE_WEIGHT"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; @SuppressWarnings("unused") int c1 = 0; for (int i1 = 0; i1 < 7 && f1; i1++) { Rule rule = Rule_Typ_Decimal.parse(context); if ((f1 = rule != null)) { a1.add(rule, context.index); c1++; } } parsed = true; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_CHARGEABLE_WEIGHT(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("CHARGEABLE_WEIGHT", parsed); return (Rule_CHARGEABLE_WEIGHT)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "wrjo@wrjo-PC" ]
wrjo@wrjo-PC
b9e1b9be35377e816ff7cca48e9a751c005e54cd
60c7d8b2e8ae1d547f6cfc52b81d2eade1faf31d
/reportProject/st-js-stjs-3.3.0/generator-plugin-java8/src/test/java/org/stjs/generator/plugin/java8/writer/lambda/Lambda1.java
8240add1fa1be42b1eed316c8db17200903ecff5
[ "Apache-2.0" ]
permissive
dovanduy/Riddle_artifact
851725d9ac1b73b43b82b06ff678312519e88941
5371ee83161f750892d4f7720f50043e89b56c87
refs/heads/master
2021-05-18T10:00:54.221815
2019-01-27T10:10:01
2019-01-27T10:10:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
264
java
package org.stjs.generator.plugin.java8.writer.lambda; import org.stjs.javascript.functions.Function1; public class Lambda1 { public static void method(Function1<Integer, Integer> f) { } public static void main(String[] args) { method((x) -> x + 1); } }
[ "liuzhenwei_sx@qiyi.com" ]
liuzhenwei_sx@qiyi.com
2d7a4eb100321f2699ce02fc0e94a5f760a28c2a
ccf82688f082e26cba5fc397c76c77cc007ab2e8
/Mage.Sets/src/mage/cards/s/SecurityRhox.java
4da2c0ce9bc563dce8dc7d03b526968640ce82bf
[ "MIT" ]
permissive
magefree/mage
3261a89320f586d698dd03ca759a7562829f247f
5dba61244c738f4a184af0d256046312ce21d911
refs/heads/master
2023-09-03T15:55:36.650410
2023-09-03T03:53:12
2023-09-03T03:53:12
4,158,448
1,803
1,133
MIT
2023-09-14T20:18:55
2012-04-27T13:18:34
Java
UTF-8
Java
false
false
1,499
java
package mage.cards.s; import mage.MageInt; import mage.abilities.costs.AlternativeCostSourceAbility; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterPermanent; import java.util.UUID; /** * @author TheElk801 */ public final class SecurityRhox extends CardImpl { private static final FilterPermanent filter = new FilterPermanent(SubType.TREASURE, ""); public SecurityRhox(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); this.subtype.add(SubType.RHINO); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(5); this.toughness = new MageInt(4); // You may pay {R}{G} rather than pay this spell's mana cost. Spend only mana produced by Treasures to cast it this way. ManaCost cost = new ManaCostsImpl<>("{R}{G}"); cost.setSourceFilter(filter); this.addAbility(new AlternativeCostSourceAbility( cost, null, "You may pay {R}{G} rather than pay this spell's mana cost. " + "Spend only mana produced by Treasures to cast it this way." )); } private SecurityRhox(final SecurityRhox card) { super(card); } @Override public SecurityRhox copy() { return new SecurityRhox(this); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
d83cd7853f017773ec627c69c01da2db64a16e66
9a513db24f6d400f5aafc97615c1d0653b8d05a1
/OCCJava/TDataStd_Integer.java
d4f278adf2012488691b66fc4e2a8ac5df50450d
[]
no_license
Aircraft-Design-UniNa/jpad-occt
71d44cb3c2a906554caeae006199e1885b6ebc6c
f0aae35a8ae7c25c860d6c5ca5262f2b9da53432
refs/heads/master
2020-05-01T04:52:43.335920
2019-03-23T15:08:04
2019-03-23T15:08:04
177,285,955
3
1
null
null
null
null
UTF-8
Java
false
false
2,392
java
package opencascade; /** * The basis to define an integer attribute. */ public class TDataStd_Integer extends TDF_Attribute { TDataStd_Integer(long cPtr, boolean cMemoryOwn){super(cPtr, cMemoryOwn);} public synchronized void disposeUnused() {} /** * Integer methods * =============== */ public static TDataStd_Integer Set( TDF_Label label, int value) { return new TDataStd_Integer ( OCCwrapJavaJNI.TDataStd_Integer_Set__SWIG_0(TDF_Label.getCPtr(label), label, value), true ); } public static TDataStd_Integer Set( TDF_Label label, Standard_GUID guid, int value) { return new TDataStd_Integer ( OCCwrapJavaJNI.TDataStd_Integer_Set__SWIG_1(TDF_Label.getCPtr(label), label, Standard_GUID.getCPtr(guid), guid, value), true ); } public void Set(int V) { OCCwrapJavaJNI.TDataStd_Integer_Set__SWIG_2(swigCPtr, this, V); } /** * Sets the explicit GUID (user defined) for the attribute. */ public void SetID( Standard_GUID guid) { OCCwrapJavaJNI.TDataStd_Integer_SetID__SWIG_0(swigCPtr, this, Standard_GUID.getCPtr(guid), guid); } /** * Sets default GUID for the attribute. */ public void SetID() { OCCwrapJavaJNI.TDataStd_Integer_SetID__SWIG_1(swigCPtr, this); } /** * Returns the integer value contained in the attribute. */ public int Get() { return OCCwrapJavaJNI.TDataStd_Integer_Get(swigCPtr, this); } /** * Returns True if there is a reference on the same label */ public long IsCaptured() { return OCCwrapJavaJNI.TDataStd_Integer_IsCaptured(swigCPtr, this); } public TDataStd_Integer() { this(OCCwrapJavaJNI.new_TDataStd_Integer(), true); } public static String get_type_name() { return OCCwrapJavaJNI.TDataStd_Integer_get_type_name(); } public static Standard_Type get_type_descriptor() { return new Standard_Type ( OCCwrapJavaJNI.TDataStd_Integer_get_type_descriptor(), true ); } public static Standard_GUID GetId() { return new Standard_GUID(OCCwrapJavaJNI.TDataStd_Integer_GetId(), true); } public static TDataStd_Integer DownCast( Standard_Transient T) { return new TDataStd_Integer ( OCCwrapJavaJNI.TDataStd_Integer_DownCast( Standard_Transient.getCPtr(T) , T), true ); } public static Standard_Type TypeOf() { return new Standard_Type ( OCCwrapJavaJNI.TDataStd_Integer_TypeOf(), true ); } }
[ "agostino.demarco@unina.it" ]
agostino.demarco@unina.it
160d39a83d72d8fe058c23ab60968ee2f676f01c
cc1b47db2b25d7f122d0fb48a4917fd01f129ff8
/domino-jnx-api/src/main/java/com/hcl/domino/design/frameset/FrameSizingType.java
36460712707c751d400f60436b8fff1a8f3d3ab0
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
savlpavel/domino-jnx
666f7e12abdf5e36b471cdd7c99086db589f923f
2d94e42cdfa56de3b117231f4488685f8e084e83
refs/heads/main
2023-09-04T10:20:43.968949
2023-07-31T16:41:34
2023-07-31T16:41:34
392,598,440
0
1
Apache-2.0
2021-08-04T07:49:29
2021-08-04T07:49:29
null
UTF-8
Java
false
false
1,607
java
/* * ========================================================================== * Copyright (C) 2019-2022 HCL America, Inc. ( http://www.hcl.com/ ) * 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.hcl.domino.design.frameset; import com.hcl.domino.design.DesignConstants; import com.hcl.domino.misc.INumberEnum; /** * Represents the modes for sizing a frame within a frameset. * * @author Jesse Gallagher * @since 1.0.34 */ public enum FrameSizingType implements INumberEnum<Short> { PIXELS(DesignConstants.PIXELS_LengthType), PERCENTAGE(DesignConstants.PERCENTAGE_LengthType), RELATIVE(DesignConstants.RELATIVE_LengthType); private final short value; private FrameSizingType(short value) { this.value = value; } @Override public long getLongValue() { return value; } @Override public Short getValue() { return value; } }
[ "jesse@secondfoundation.org" ]
jesse@secondfoundation.org
8eb5736ac207397c9c99dd86c00771ad27de3053
f5ac511aa742ea0fad493aa47a916f0370a41aa0
/src/main/java/ru/nik66/engine/player/Player.java
28f5f800c425b5a101c8f210729355ab2ef27cfe
[]
no_license
Nikbstar/JavaChess
42005550eb4e4e85d7e4142660daa41985ca3fb9
a9fc29cd2d6d25f63af98fd33137e51e277b9818
refs/heads/master
2020-05-21T03:37:51.409659
2017-04-04T14:28:31
2017-04-04T14:28:31
84,566,184
0
0
null
null
null
null
UTF-8
Java
false
false
5,767
java
package ru.nik66.engine.player; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import ru.nik66.engine.Alliance; import ru.nik66.engine.border.Board; import ru.nik66.engine.border.Move; import ru.nik66.engine.pieces.King; import ru.nik66.engine.pieces.Piece; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * Created by nkotkin on 3/13/17. * Player. */ public abstract class Player { /** * board. */ private final Board board; /** * King. */ private final King playerKing; /** * legal moves. */ private final Collection<Move> legalMoves; /** * Check a check. */ private final boolean isInCheck; /** * Player initialization constructor. * @param boardArg board. * @param legalMovesArg legal moves. * @param opponentMovesArg opponent moves. */ Player(final Board boardArg, final Collection<Move> legalMovesArg, final Collection<Move> opponentMovesArg) { this.board = boardArg; this.playerKing = establishKing(); this.legalMoves = ImmutableList.copyOf( Iterables.concat(legalMovesArg, calculateKingCastles(legalMovesArg, opponentMovesArg)) ); this.isInCheck = !Player.calculateAttacksOnTile(this.playerKing.getPiecePosition(), opponentMovesArg).isEmpty(); } /** * Calculate attacks on tile. * @param piecePositionArg piece position. * @param movesArg move. * @return Attacks on tile collection. */ protected static Collection<Move> calculateAttacksOnTile(final int piecePositionArg, final Collection<Move> movesArg) { final List<Move> attackMoves = new ArrayList<>(); for (final Move move : movesArg) { if (piecePositionArg == move.getDestinationCoordinate()) { attackMoves.add(move); } } return ImmutableList.copyOf(attackMoves); } /** * Getter for board. * @return board. */ public Board getBoard() { return board; } /** * Getter for player king. * @return player king. */ public King getPlayerKing() { return playerKing; } /** * Getter for legalMoves. * @return legalMoves. */ public Collection<Move> getLegalMoves() { return legalMoves; } /** * King. * @return King piece. */ private King establishKing() { for (final Piece piece : getActivePieces()) { if (piece.getPieceType().isKing()) { return (King) piece; } } throw new RuntimeException("Should not reach here! Not a valid board!"); } /** * Check legal move. * @param moveArg move. * @return true if move is legal. */ public boolean isMoveLegal(final Move moveArg) { return this.legalMoves.contains(moveArg); } /** * check a check. * @return true if check. */ public boolean isInCheck() { return this.isInCheck; } /** * check check mate. * @return true if check mate. */ public boolean isInCheckMate() { return this.isInCheck && !hasEscapeMoves(); } /** * check stale mate. * @return true if stale mate. */ public boolean isInStaleMate() { return !this.isInCheck && !hasEscapeMoves(); } //TODO implement these methods below!!! /** * check castled. * @return true if castled. */ public boolean isCastled() { return false; } /** * Has escape moves? * @return true if it. */ protected boolean hasEscapeMoves() { boolean result = false; for (final Move move : this.legalMoves) { final MoveTransition transition = makeMove(move); if (transition.getMoveStatus().isDone()) { result = true; } } return result; } /** * make move. * @param moveArg move. * @return move transition. */ public MoveTransition makeMove(final Move moveArg) { MoveTransition result; if (!isMoveLegal(moveArg)) { result = new MoveTransition(this.board, moveArg, MoveStatus.ILLEGAL_MOVE); } else { final Board transitionBoard = moveArg.execute(); final Collection<Move> kingAttacks = Player.calculateAttacksOnTile( transitionBoard.getCurrentPlayer().getOpponent().getPlayerKing().getPiecePosition(), transitionBoard.getCurrentPlayer().getLegalMoves()); if (!kingAttacks.isEmpty()) { result = new MoveTransition(this.board, moveArg, MoveStatus.LEAVES_PLAYER_IN_CHECK); } else { result = new MoveTransition(transitionBoard, moveArg, MoveStatus.DONE); } } return result; } /** * Active pieces collection. * @return Pieces collection. */ public abstract Collection<Piece> getActivePieces(); /** * Get player alliance. * @return alliance. */ public abstract Alliance getAlliance(); /** * get opponent. * @return opponent. */ public abstract Player getOpponent(); /** * Calculate king castles. * @param playerLegalsArg Player legals. * @param opponentsLegalsArg Opponent legals. * @return Moves collection. */ protected abstract Collection<Move> calculateKingCastles(Collection<Move> playerLegalsArg, Collection<Move> opponentsLegalsArg); }
[ "nikbstar@gmail.com" ]
nikbstar@gmail.com
d106c0782300a5f797db83c4f57ea889ef898b33
4a632a8729a568840afd18cf623ca4da90afd8dd
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201603/mcm/AccountLabelServiceInterface.java
809ce75cf144730f8a34231be7280c75678f695d
[ "Apache-2.0" ]
permissive
tagrawaleddycom/googleads-java-lib
10818b03d5343dd3d7fd46a69185b61a4c72ca25
de36c3cf36a330525e60b890f8309ce91a424ad7
refs/heads/master
2020-12-26T03:23:28.175751
2016-05-26T18:22:48
2016-05-26T18:22:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,833
java
package com.google.api.ads.adwords.jaxws.v201603.mcm; import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; import com.google.api.ads.adwords.jaxws.v201603.cm.Selector; /** * * Service for creating, editing, and deleting labels that can be applied to managed customers. * * <p>Labels created by a manager are not accessible to any customers managed * by this manager. Only manager customers may create these labels. * * <p>Note that label access works a little differently in the API than it does in the * AdWords UI. In the UI, a manager will never see a submanager's labels, and will always * be using his own labels regardless of which managed account he is viewing. In this API, * like other API services, if you specify a submanager as the effective account for the API * request, then the request will operate on the submanager's labels. * * <p>To apply a label to a managed customer, see * {@link com.google.ads.api.services.mcm.customer.ManagedCustomerService#mutateLabel}. * * * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.1 * */ @WebService(name = "AccountLabelServiceInterface", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603") @XmlSeeAlso({ com.google.api.ads.adwords.jaxws.v201603.cm.ObjectFactory.class, com.google.api.ads.adwords.jaxws.v201603.mcm.ObjectFactory.class }) public interface AccountLabelServiceInterface { /** * * Returns a list of labels specified by the selector for the authenticated user. * * @param selector filters the list of labels to return * @return response containing lists of labels that meet all the criteria of the selector * @throws ApiException if a problem occurs fetching the information requested * * * @param selector * @return * returns com.google.api.ads.adwords.jaxws.v201603.mcm.AccountLabelPage * @throws ApiException */ @WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603") @RequestWrapper(localName = "get", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603", className = "com.google.api.ads.adwords.jaxws.v201603.mcm.AccountLabelServiceInterfaceget") @ResponseWrapper(localName = "getResponse", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603", className = "com.google.api.ads.adwords.jaxws.v201603.mcm.AccountLabelServiceInterfacegetResponse") public AccountLabelPage get( @WebParam(name = "selector", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603") Selector selector) throws ApiException ; /** * * Possible actions: * <ul> * <li> Create a new label - create a new {@link Label} and call mutate with ADD operator * <li> Edit the label name - set the appropriate fields in your {@linkplain Label} and call * mutate with the SET operator. Null fields will be interpreted to mean "no change" * <li> Delete the label - call mutate with REMOVE operator * </ul> * * @param operations list of unique operations to be executed in a single transaction, in the * order specified. * @return the mutated labels, in the same order that they were in as the parameter * @throws ApiException if problems occurs while modifying label information * * * @param operations * @return * returns com.google.api.ads.adwords.jaxws.v201603.mcm.AccountLabelReturnValue * @throws ApiException */ @WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603") @RequestWrapper(localName = "mutate", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603", className = "com.google.api.ads.adwords.jaxws.v201603.mcm.AccountLabelServiceInterfacemutate") @ResponseWrapper(localName = "mutateResponse", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603", className = "com.google.api.ads.adwords.jaxws.v201603.mcm.AccountLabelServiceInterfacemutateResponse") public AccountLabelReturnValue mutate( @WebParam(name = "operations", targetNamespace = "https://adwords.google.com/api/adwords/mcm/v201603") List<AccountLabelOperation> operations) throws ApiException ; }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
17265c66b9c57049cf42fa21e2aa50614db95612
d4dbb0571226af5809cc953e73924d505094e211
/Hibernate/04.HibernateCodeFirst/BookShop/src/main/java/app/serviceImpls/CategoryServiceImpl.java
80085005fe42fb93a27dc2cb1ffad67c9536aab9
[]
no_license
vasilgramov/database-fundamentals
45e258e965e85514e60b849d9049737ae25e81c0
0ebe74ab4bffef0d29d6ee2e200f07bdc24fe6bf
refs/heads/master
2021-06-18T17:54:36.238976
2017-07-10T14:49:44
2017-07-10T14:49:44
89,739,950
0
1
null
null
null
null
UTF-8
Java
false
false
1,021
java
package app.serviceImpls; import app.daos.CategoryRepository; import app.entities.Category; import app.services.CategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Service; import java.util.List; @Service @Primary public class CategoryServiceImpl implements CategoryService { private final CategoryRepository categoryRepository; @Autowired public CategoryServiceImpl(CategoryRepository categoryRepository) { this.categoryRepository = categoryRepository; } @Override public void save(Category category) { this.categoryRepository.saveAndFlush(category); } @Override public List<Category> findByNameIn(String... categories) { return this.categoryRepository.findByNameIn(categories); } @Override public List<Object[]> findTotalProfitByCategory() { return this.categoryRepository.findTotalProfitByCategory(); } }
[ "gramovv@gmail.com" ]
gramovv@gmail.com
b980236816ba766b45ed21c00a3a65cb8f13f9eb
832815fa3d65b121a15ae162efd01432f32df1cc
/src/com/dp2345/dao/impl/SeoDaoImpl.java
126407625f81e7cc5ffe0fd70598e75e8bcc4ee6
[]
no_license
jeffson1985/dp2345
a7c04907eda300ed73ccd921f4a509fcf5821de8
11618f889baef48a659251146d32085f478ed0ef
refs/heads/master
2020-05-31T23:44:59.895931
2015-09-18T12:52:40
2015-09-18T12:52:41
42,158,460
0
0
null
null
null
null
UTF-8
Java
false
false
927
java
/* * Copyright 2013-2015 cetvision.com. All rights reserved. * Support: http://www.cetvision.com * License: http://www.cetvision.com/license */ package com.dp2345.dao.impl; import javax.persistence.FlushModeType; import javax.persistence.NoResultException; import org.springframework.stereotype.Repository; import com.dp2345.dao.SeoDao; import com.dp2345.entity.Seo; import com.dp2345.entity.Seo.Type; /** * Dao - SEO设置 * * @author CETVISION CORP * @version 2.0.3 */ @Repository("seoDaoImpl") public class SeoDaoImpl extends BaseDaoImpl<Seo, Long> implements SeoDao { public Seo find(Type type) { if (type == null) { return null; } try { String jpql = "select seo from Seo seo where seo.type = :type"; return entityManager.createQuery(jpql, Seo.class).setFlushMode(FlushModeType.COMMIT).setParameter("type", type).getSingleResult(); } catch (NoResultException e) { return null; } } }
[ "kevionsun@gmail.com" ]
kevionsun@gmail.com
e7ff14053b435becc22281649ef9c26dd3d2b342
a99e3dcc3fbff2e39e90fd0df21fac85a1132e64
/contrib/scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/xpl/impl/OutputStreamWrapper.java
c0525ba32f17544f39cca937b76f2eff4b1a3356
[ "Apache-2.0", "JSON" ]
permissive
MRivas-XumaK/slingBuild
246f10ccdd17ace79696d760f0801aec188a38fc
c153c22d893cd55c805606041b1292e628d5461e
refs/heads/master
2023-01-09T22:49:01.251652
2014-05-08T15:46:12
2014-05-08T15:46:12
19,578,020
3
3
Apache-2.0
2022-12-21T18:50:52
2014-05-08T15:13:56
Java
UTF-8
Java
false
false
1,715
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.sling.scripting.xproc.xpl.impl; import java.io.IOException; import java.io.OutputStream; /** OutputStream that wraps another one using a method * that's only called if the wrapped stream is actually * used. */ abstract class OutputStreamWrapper extends OutputStream { protected abstract OutputStream getWrappedStream() throws IOException; @Override public void close() throws IOException { getWrappedStream().close(); } @Override public void flush() throws IOException { getWrappedStream().flush(); } @Override public void write(byte[] arg0, int arg1, int arg2) throws IOException { getWrappedStream().write(arg0, arg1, arg2); } @Override public void write(byte[] arg0) throws IOException { getWrappedStream().write(arg0); } @Override public void write(int arg0) throws IOException { getWrappedStream().write(arg0); } }
[ "marito.rivas@hotmail.com" ]
marito.rivas@hotmail.com
58c24c80e0ac9611897961881344109558025643
48a88aea6e9774279c8563f1be665a540e02a894
/src/opennlp/tools/cmdline/parser/ModelUpdaterTool.java
cd40199ac713d513b6f7052a3d661e087f466098
[]
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
2,964
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 opennlp.tools.cmdline.parser; import java.io.File; import java.io.IOException; import opennlp.tools.cmdline.AbstractTypedParamTool; import opennlp.tools.cmdline.ArgumentParser; import opennlp.tools.cmdline.CmdLineUtil; import opennlp.tools.cmdline.ObjectStreamFactory; import opennlp.tools.cmdline.TerminateToolException; import opennlp.tools.cmdline.params.TrainingToolParams; import opennlp.tools.parser.Parse; import opennlp.tools.parser.ParserModel; import opennlp.tools.util.ObjectStream; /** * Abstract base class for tools which update the parser model. */ abstract class ModelUpdaterTool extends AbstractTypedParamTool<Parse, ModelUpdaterTool.ModelUpdaterParams> { interface ModelUpdaterParams extends TrainingToolParams { } protected ModelUpdaterTool() { super(Parse.class, ModelUpdaterParams.class); } protected abstract ParserModel trainAndUpdate(ParserModel originalModel, ObjectStream<Parse> parseSamples, ModelUpdaterParams parameters) throws IOException; @Override public final void run(String format, String[] args) { ModelUpdaterParams params = validateAndParseParams( ArgumentParser.filter(args, ModelUpdaterParams.class), ModelUpdaterParams.class); // Load model to be updated File modelFile = params.getModel(); ParserModel originalParserModel = new ParserModelLoader().load(modelFile); ObjectStreamFactory<Parse> factory = getStreamFactory(format); String[] fargs = ArgumentParser.filter(args, factory.getParameters()); validateFactoryArgs(factory, fargs); ObjectStream<Parse> sampleStream = factory.create(fargs); ParserModel updatedParserModel; try { updatedParserModel = trainAndUpdate(originalParserModel, sampleStream, params); } catch (IOException e) { throw new TerminateToolException(-1, "IO error while reading training data or indexing data: " + e.getMessage(), e); } finally { try { sampleStream.close(); } catch (IOException e) { // sorry that this can fail } } CmdLineUtil.writeModel("parser", modelFile, updatedParserModel); } }
[ "josepvalls@Valls.local" ]
josepvalls@Valls.local
926a43d997c5657720270c6c1372d536b8803193
e7c02b26e6da1b0652203285071edef433fae4cb
/rest-annotations/src/main/java/one/xingyi/restAnnotations/annotations/XingYiClient.java
2c0c7d5f7e371337d66f4126714a9e648dbc7481
[]
no_license
phil-rice/rest
155af53fe32e6571001a4b640fcb546896e24dc8
3a31ce94c04871faded6fea645c2da0d99e342bb
refs/heads/master
2020-04-15T19:11:11.276133
2019-01-18T00:58:20
2019-01-18T00:58:20
164,940,369
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package one.xingyi.restAnnotations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.TYPE}) @Retention(RetentionPolicy.CLASS) // Make it class retention for incremental compilation public @interface XingYiClient { }
[ "phil.rice@iee.org" ]
phil.rice@iee.org
3efe083bc24a6e3583b88f74b4c285c31d5506c3
0e97171d925d8b72dde03148a974e743d24e96a7
/super-nomina/src/main/java/com/quat/api/EmpleadoApiController.java
afaf3ac92f259d8e06f8aea4d766dddfc69d6727
[]
no_license
badillosoft/java-quat
50916aed28f43a3fd1a102e8dabdfcdae6871a29
6cb568ae3149f0e8f873cc6f70b2a8b88d7c2d0d
refs/heads/master
2020-03-10T07:58:48.293674
2018-06-09T18:54:14
2018-06-09T18:54:14
129,275,010
2
0
null
null
null
null
UTF-8
Java
false
false
2,334
java
package com.quat.api; import java.io.IOException; import java.util.Optional; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import com.quat.model.Empleado; import com.quat.reposity.EmpleadoRepository; import com.quat.service.EmpleadoService; @RestController @RequestMapping("/api/empleado") public class EmpleadoApiController { @Autowired EmpleadoService empleadoService; @Autowired EmpleadoRepository empleadoRepository; @GetMapping("/{id}") @ResponseBody public Empleado verEmpleado(@PathVariable Long id, HttpServletResponse response) throws IOException { Optional<Empleado> empleadoOptional = empleadoRepository.findById(id); if (!empleadoOptional.isPresent()) { response.sendError(HttpStatus.BAD_REQUEST.value(), "No existe ese Empleado >: ("); return null; } Empleado empleado = empleadoOptional.get(); return empleado; } @PostMapping("/{id}/asignar/sueldo") @ResponseBody public Empleado asignarSueldo(@PathVariable Long id, @RequestParam Double sueldo, HttpServletResponse response) throws IOException { Empleado empleado = empleadoService.asignarSueldo(id, sueldo); if (empleado == null) { response.sendError(HttpStatus.BAD_REQUEST.value(), empleadoService.getLastMessage()); } return empleado; } @GetMapping("/nomina") @ResponseBody public Double calcularNomina() { return empleadoRepository.sumaNomina(); } @PutMapping("") @ResponseBody public Empleado crearEmpleado(@RequestParam String nombre) { Empleado empleado = new Empleado(); empleado.setNombre(nombre); return empleadoService.crearEmpleado(empleado); } @GetMapping("") @ResponseBody public Iterable<Empleado> mostrarEmpleados() { return empleadoRepository.findAll(); } }
[ "badillo.soft@hotmail.com" ]
badillo.soft@hotmail.com
254a957e1a8093b81699fdf2cb4700d85787ba8b
b6e99b0346572b7def0e9cdd1b03990beb99e26f
/src/gcom/gui/AutocompleteGenericoServlet.java
f36010f25ae67805460e8323848961aa89c29c14
[]
no_license
prodigasistemas/gsan
ad64782c7bc991329ce5f0bf5491c810e9487d6b
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
refs/heads/master
2023-08-31T10:47:21.784105
2023-08-23T17:53:24
2023-08-23T17:53:24
14,600,520
19
20
null
2015-07-29T19:39:10
2013-11-21T21:24:16
Java
ISO-8859-1
Java
false
false
4,948
java
package gcom.gui; import gcom.fachada.Fachada; import gcom.util.Util; import java.io.IOException; import java.io.PrintWriter; import java.text.StringCharacterIterator; import java.util.Collection; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class AutocompleteGenericoServlet extends HttpServlet { private static final long serialVersionUID = 1L; private static final int CLIENTE = 1; private static final int USUARIO = 2; private static final int CLIENTE_RESPONSAVEL = 3; private Fachada fachada = Fachada.getInstancia(); protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String valor = req.getParameter("q"); String method = req.getParameter("method"); PrintWriter print = resp.getWriter(); boolean numerico = Util.validarStringNumerica(method); //Valida se o parâmetro method possui valor válido if(numerico){ switch (Integer.parseInt(method)) { case AutocompleteGenericoServlet.CLIENTE: filtrarAutocompleteCliente(print, valor); break; case AutocompleteGenericoServlet.USUARIO: filtrarAutocompleteUsuario(print, valor); break; case AutocompleteGenericoServlet.CLIENTE_RESPONSAVEL: filtrarAutocompleteClienteResponsavel(print, valor); break; default: break; } } } //Inicio dos metodos privados private void filtrarAutocompleteCliente(PrintWriter print, String valor){ Collection coll = fachada.filtrarAutocompleteCliente(valor); System.out.println(coll.size()); print.println("["); int indice = 1; for (Object object : coll) { Object[] cliente = (Object[]) object; String cnpj = ""; if(cliente[1] != null && !cliente[1].equals("")){ cnpj = Util.formatarCnpj(cliente[1] + ""); } if(indice < coll.size()){ print.println("{ resultado: '" + cliente[0] + " - " + encodeCaracteresEspeciaisJSON(cliente[2].toString()) +"' , identificador: "+cliente[3]+", cnpj: '"+cnpj+ "' },"); }else{ print.println("{ resultado: '" + cliente[0] + " - " + encodeCaracteresEspeciaisJSON(cliente[2].toString()) +"' , identificador: "+cliente[3]+", cnpj: '"+cnpj+ "' }"); } indice++; } print.println("]"); } private void filtrarAutocompleteClienteResponsavel(PrintWriter print, String valor){ Collection coll = fachada.filtrarAutocompleteClienteResponsavel(valor); System.out.println(coll.size()); print.println("["); int indice = 1; for (Object object : coll) { Object[] cliente = (Object[]) object; String cnpj = ""; if(cliente[1] != null && !cliente[1].equals("")){ cnpj = Util.formatarCnpj(cliente[1] + ""); } if(indice < coll.size()){ print.println("{ resultado: '" + cliente[0] + " - " + encodeCaracteresEspeciaisJSON(cliente[2].toString()) +"' , identificador: "+cliente[3]+", cnpj: '"+cnpj+ "' },"); }else{ print.println("{ resultado: '" + cliente[0] + " - " + encodeCaracteresEspeciaisJSON(cliente[2].toString()) +"' , identificador: "+cliente[3]+", cnpj: '"+cnpj+ "' }"); } indice++; } print.println("]"); } private void filtrarAutocompleteUsuario(PrintWriter print, String valor){ Collection coll = fachada.filtrarAutocompleteUsuario(valor); System.out.println(coll.size()); for (Object object : coll) { Object[] usuario = (Object[]) object; print.println(usuario[0] + " - " + encodeCaracteresEspeciaisJSON(usuario[1].toString())); } } private static String encodeCaracteresEspeciaisJSON(String aText){ final StringBuilder result = new StringBuilder(); StringCharacterIterator iterator = new StringCharacterIterator(aText); char character = iterator.current(); while (character != StringCharacterIterator.DONE){ if( character == '\"' ){ result.append("\\\""); } else if(character == '\\'){ result.append("\\\\"); } else if(character == '/'){ result.append("\\/"); } else if(character == '\b'){ result.append("\\b"); } else if(character == '\f'){ result.append("\\f"); } else if(character == '\n'){ result.append("\\n"); } else if(character == '\r'){ result.append("\\r"); } else if(character == '\t'){ result.append("\\t"); }else if(character == '\''){ result.append("\\'"); } else { //the char is not a special one //add it to the result as is result.append(character); } character = iterator.next(); } return result.toString(); } }
[ "piagodinho@gmail.com" ]
piagodinho@gmail.com
79abe5e518f565aa836231590cecc2b10114df82
6c805ba587a3cac1f3a4cbeba0d95f1b711b639e
/wezard-pay/src/main/java/com/natsumes/wezard/service/impl/PayServiceImpl.java
884812f0b281e22fd941762cc2afd995274d23cf
[ "Apache-2.0" ]
permissive
SpikeLavender/nastume
bb9580a87c7ca55ed0221c56f711326b2a51dcae
9d0bc8ecddf6f6d192bad36c7efea45ae09b0c99
refs/heads/master
2023-03-20T01:51:57.758074
2021-03-07T14:47:54
2021-03-07T14:47:54
244,695,144
0
0
Apache-2.0
2020-07-04T02:13:07
2020-03-03T17:09:43
Java
UTF-8
Java
false
false
5,743
java
package com.natsumes.wezard.service.impl; import com.lly835.bestpay.enums.BestPayPlatformEnum; import com.lly835.bestpay.enums.BestPayTypeEnum; import com.lly835.bestpay.enums.OrderStatusEnum; import com.lly835.bestpay.model.OrderQueryRequest; import com.lly835.bestpay.model.OrderQueryResponse; import com.lly835.bestpay.model.PayRequest; import com.lly835.bestpay.model.PayResponse; import com.lly835.bestpay.service.BestPayService; import com.natsumes.wezard.entity.Response; import com.natsumes.wezard.enums.PayPlatformEnum; import com.natsumes.wezard.mapper.PayInfoMapper; import com.natsumes.wezard.pojo.PayInfo; import com.natsumes.wezard.service.MessageProducer; import com.natsumes.wezard.service.PayService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; @Slf4j @Service public class PayServiceImpl implements PayService { private static final String QUEUE_PAY_NOTIFY = "payNotify"; @Autowired private BestPayService bestPayService; @Autowired private MessageProducer messageProducer; @Autowired private PayInfoMapper payInfoMapper; @Override public Response<PayResponse> create(Integer userId, String orderId, String openId, BigDecimal amount, BestPayTypeEnum payTypeEnum) { //已存在, 查询 PayInfo payInfo = payInfoMapper.selectByByOrderNo(orderId); if (payInfo == null) { //1. 写入数据库 payInfo = new PayInfo(orderId, PayPlatformEnum.getByBestPayTypeEnum(payTypeEnum).getCode(), OrderStatusEnum.NOTPAY.name(), amount); payInfo.setUserId(userId); payInfoMapper.insertSelective(payInfo); } if (payTypeEnum != BestPayTypeEnum.WXPAY_NATIVE && payTypeEnum != BestPayTypeEnum.WXPAY_MINI && payTypeEnum != BestPayTypeEnum.ALIPAY_PC) { throw new RuntimeException("暂不支持的支付类型"); } PayRequest request = new PayRequest(); request.setOrderName("2361478-最好的支付SDK"); request.setOrderId(orderId); request.setOrderAmount(amount.doubleValue()); request.setPayTypeEnum(payTypeEnum); request.setOpenid(openId); PayResponse response = bestPayService.pay(request); response.setOrderId(orderId); response.setOrderAmount(amount.doubleValue()); response.setPayPlatformEnum(payTypeEnum.getPlatform()); //存储信息 log.info("response: " + response); return Response.success(response); } @Override public String asyncNotify(String notifyData) { //1.签名校验 PayResponse response = bestPayService.asyncNotify(notifyData); log.info("response={}", response); //2.金额校验(从数据库查订单) //比较严重(正常情况下是不会发生的)发出告警:钉钉、短信 PayInfo payInfo = payInfoMapper.selectByByOrderNo(response.getOrderId()); if (payInfo == null) { //todo: throw new RuntimeException("通过orderNo查询到的结果是null"); } //如果订单支付状态不是"已支付" if (!payInfo.getPlatformStatus().equals(OrderStatusEnum.SUCCESS.name())) { //Double类型比较大小,精度。1.00 1.0 if (payInfo.getPayAmount().compareTo(BigDecimal.valueOf(response.getOrderAmount())) != 0) { //todo:告警 throw new RuntimeException("异步通知中的金额和数据库里的不一致,orderNo=" + response.getOrderId()); } //3. 修改订单支付状态 payInfo.setPlatformStatus(OrderStatusEnum.SUCCESS.name()); payInfo.setPlatformNumber(response.getOutTradeNo()); payInfoMapper.updateByPrimaryKeySelective(payInfo); } //TODO totoro发送MQ消息,natsume接受MQ消息, payInfoVo messageProducer.sendPayInfo(payInfo); if (response.getPayPlatformEnum() == BestPayPlatformEnum.WX) { //4.告诉微信不要在通知了 return "<xml>\n" + " <return_code><![CDATA[SUCCESS]]></return_code>\n" + " <return_msg><![CDATA[OK]]></return_msg>\n" + "</xml>"; } else if (response.getPayPlatformEnum() == BestPayPlatformEnum.ALIPAY) { return "success"; } throw new RuntimeException("异步通知中错误的支付平台"); } @Override public PayInfo queryByOrderId(String orderId) { return payInfoMapper.selectByByOrderNo(orderId); } /** * 查询订单接口 * @param orderId * @param payTypeEnum * @return */ private String query(String orderId, BestPayTypeEnum payTypeEnum) { PayInfo payInfo = payInfoMapper.selectByByOrderNo(orderId); if (payInfo != null) { OrderQueryRequest queryRequest = new OrderQueryRequest(); queryRequest.setOrderId(orderId); queryRequest.setPlatformEnum(payTypeEnum.getPlatform()); //更新状态 OrderQueryResponse queryResponse = bestPayService.query(queryRequest); payInfo.setPlatformStatus(queryResponse.getOrderStatusEnum().name()); // update状态: payInfoMapper.updateByPrimaryKeySelective(payInfo); if (queryResponse.getOrderStatusEnum().equals(OrderStatusEnum.CLOSED) || queryResponse.getOrderStatusEnum().equals(OrderStatusEnum.SUCCESS)) { } } return ""; } }
[ "hetengjiao@chinamobile.com" ]
hetengjiao@chinamobile.com
a257afa503e05e42ceda393e57d17c4c085b12e2
df72d2a31adf86da1e2355a5879a57b1e7d0f3d9
/CompiladorMJ/microLIR/src/microLIR/parser/sym.java
50566f35a5850158860b1f7789c5cd862be4c712
[]
no_license
in-silico/in-silico
81c79a973f202a7cf604707ccc7c78804179634e
042a8bbcadfb70354506b2855e16a06f9e8831c3
refs/heads/master
2020-04-13T14:11:00.745975
2015-06-19T17:13:52
2015-06-19T17:13:52
37,735,182
0
0
null
null
null
null
UTF-8
Java
false
false
2,019
java
//---------------------------------------------------- // The following code was generated by CUP v0.10k TUM Edition 20050516 // Tue Jan 02 00:59:58 GMT+02:00 2007 //---------------------------------------------------- package microLIR.parser; /** CUP generated class containing symbol constants. */ public class sym { /* terminals */ public static final int MOVEARRAY = 11; public static final int STATICCALL = 35; public static final int MOVEFIELD = 13; public static final int XOR = 25; public static final int REG = 40; public static final int LIBRARY = 36; public static final int NOT = 22; public static final int AND = 23; public static final int LP = 2; public static final int OR = 24; public static final int COMMA = 7; public static final int JUMPTRUE = 28; public static final int JUMPGE = 31; public static final int INC = 19; public static final int DIV = 17; public static final int RP = 3; public static final int ASSIGN = 9; public static final int DOT = 6; public static final int EOF = 0; public static final int RETURN = 37; public static final int LB = 4; public static final int error = 1; public static final int MUL = 16; public static final int RB = 5; public static final int JUMPFALSE = 29; public static final int ADD = 14; public static final int JUMP = 27; public static final int NUMBER = 38; public static final int MOD = 18; public static final int ARRAYLENGTH = 12; public static final int VIRTUALLCALL = 34; public static final int MOVE = 10; public static final int COMPARE = 26; public static final int COLON = 8; public static final int NEG = 21; public static final int JUMPLE = 33; public static final int JUMPL = 32; public static final int STRING = 42; public static final int JUMPG = 30; public static final int DEC = 20; public static final int LABEL = 41; public static final int SUB = 15; public static final int VAR = 39; }
[ "santigutierrez1@gmail.com" ]
santigutierrez1@gmail.com
08a878a147216002e0b2fc884e2d80c9f35da8f1
3221b6bc93eea51d46d9baec8b76ac6f24b90313
/Studio/plugins/com.wizzer.mle.studio.dwp/src/java/com/wizzer/mle/studio/dwp/ui/DwpMediaRefTargetContextMenuHandler.java
38ab908f32cccc09062e159df645bcdae56da7f8
[ "MIT" ]
permissive
magic-lantern-studio/mle-studio
67224f61d0ba8542b39c4a6ed6bd65b60beab15d
06520cbff5b052b98c7280f51f25e528b1c98b64
refs/heads/master
2022-01-12T04:11:56.033265
2022-01-06T23:40:11
2022-01-06T23:40:11
128,479,137
0
0
null
null
null
null
UTF-8
Java
false
false
4,744
java
/* * DwpMediaRefTargetContextMenuHandler.java */ // COPYRIGHT_BEGIN // // The MIT License (MIT) // // Copyright (c) 2000-2020 Wizzer Works // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // // COPYRIGHT_END // Declare package. package com.wizzer.mle.studio.dwp.ui; // Import Eclipse classes. import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; // Import Magic Lantern Tool Framework classes. import com.wizzer.mle.studio.framework.attribute.IAttribute; import com.wizzer.mle.studio.framework.ui.AttributeTreeViewer; import com.wizzer.mle.studio.dwp.attribute.DwpItemAttribute; import com.wizzer.mle.studio.dwp.attribute.DwpMediaAttribute; import com.wizzer.mle.studio.dwp.attribute.DwpMediaRefTargetAttribute; import com.wizzer.mle.studio.dwp.attribute.DwpSceneAttribute; /** * This class is used to provide a handler for a context menu in an * <code>AttributetreeViewer</code> for a <code>DwpMediaRefTargetAttribute</code>. * * @author Mark S. Millard */ public class DwpMediaRefTargetContextMenuHandler extends AbstractItemContextMenuHandler { // A menu item for adding a Media DWP item. private MenuItem m_popupAddMediaItem = null; // The current count of Media items. private int m_mediaCount = 0; /** * The default constructor. */ public DwpMediaRefTargetContextMenuHandler() { super(); } /** * Initialize the handler. * <p> * This must be called prior to getting the context menu. * </p> * * @param viewer The <code>AttributeTreeViewer</code> that will use the * context menu. */ public void init(AttributeTreeViewer viewer) { super.init(viewer); this.createContextMenu(); } /** * Create the context menu. */ protected void createContextMenu() { // Create a context menu for adding elements to the Attribute tree. m_popupMenu = new Menu(m_viewer.getControl().getShell(),SWT.POP_UP); // Add menu item for adding MediaRef Source DWP item. m_popupAddMediaItem = new MenuItem(m_popupMenu,SWT.PUSH); m_popupAddMediaItem.setText("Add DWP Media Item"); m_popupAddMediaItem.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { popupAddListElementActionPerformed(e, DwpItemAttribute.TYPE_DWP_MEDIA); } }); super.createContextMenu(); } /** * Process the "Add List Element" action. * * @param event The selection event that caused this handler to be invoked. * @param type The type of <code>Attribute</code> to add. */ public void popupAddListElementActionPerformed(Event event, String type) { DwpMediaRefTargetAttribute mref = (DwpMediaRefTargetAttribute)m_viewer.getSelectedAttribute(); if (type == DwpItemAttribute.TYPE_DWP_MEDIA) { Integer flags = new Integer(0); String label = "source"; String url = "file://filename"; DwpMediaAttribute media = new DwpMediaAttribute(flags,label,url,false); mref.addChild(media,m_viewer.getTable()); } } /** * Get a context <code>Menu</code> for the specified <code>IAttribute</code>. * * @param attribute The <code>IAttribute</code> to create a context menu for. * * @return A reference to a <code>Menu</code> is returned. */ public Menu getContextMenu(IAttribute attribute, AttributeTreeViewer viewer) { Menu popup = null; String type = attribute.getType(); IAttribute parent = attribute.getParent(); String parentType = parent.getType(); if (type == DwpSceneAttribute.TYPE_DWP_MEDIAREFTARGET) { init(viewer); popup = m_popupMenu; } return popup; } }
[ "msm@wizzerworks.com" ]
msm@wizzerworks.com
d803423b3eeecdbeadcf9b17216fbb2c33546a59
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/trunk/seasar-benchmark/src/main/java/benchmark/wire/Bean00862AImpl.java
7579bb97348d9848588ac9d12246ebc711effb88
[]
no_license
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
340
java
package benchmark.wire; public class Bean00862AImpl implements Bean00862A { private benchmark.wire.Bean00862B bean00862B; public benchmark.wire.Bean00862B getBean00862B() { return bean00862B; } public void setBean00862B(benchmark.wire.Bean00862B bean00862B) { this.bean00862B = bean00862B; } }
[ "manhole@319488c0-e101-0410-93bc-b5e51f62721a" ]
manhole@319488c0-e101-0410-93bc-b5e51f62721a
0176aace61537141605bae83027854d4615bea71
2d62bbd24ebc6c2b109d39378b1e75985afbed81
/bundles/Toometa/de.uka.ipd.sdq.dsexplore.qml.contract/src/de/uka/ipd/sdq/dsexplore/qml/contract/DeterministicEvaluationAspect.java
962c22d14fd839de8e7c4b8114acb4e2d81282d5
[ "Apache-2.0" ]
permissive
SebastianWeberKamp/KAMP
1cc11c83da882f5b0660fe1de6a6c80e13386841
818206ab33c9a2c4f3983d40943e2598d034d18e
refs/heads/master
2020-09-20T08:15:02.977029
2019-12-18T12:35:11
2019-12-18T12:35:11
224,419,712
0
0
Apache-2.0
2019-11-27T11:54:14
2019-11-27T11:54:13
null
UTF-8
Java
false
false
463
java
/** */ package de.uka.ipd.sdq.dsexplore.qml.contract; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Deterministic Evaluation Aspect</b></em>'. * <!-- end-user-doc --> * * * @see de.uka.ipd.sdq.dsexplore.qml.contract.QMLContractPackage#getDeterministicEvaluationAspect() * @model abstract="true" * @generated */ public interface DeterministicEvaluationAspect extends EvaluationAspect { } // DeterministicEvaluationAspect
[ "layornos@gmail.com" ]
layornos@gmail.com
e10d9091b1ebf361c658da6d01fa13dd1a43a742
172092c48eea1c2498f8a3f95970308696932321
/Servo-Online/src/com/minds/servo/service/impl/UserServiceImpl.java
89b8de8b26c1dce35dc10f7c3a604632f9b94e3a
[ "BSD-2-Clause" ]
permissive
mindsolvit/servoil-master
e3c66db00c2d528d4c8a33541c7bf7e2713aea72
d6c823f9fe43281b126cce3288cea18baa78afe0
refs/heads/master
2020-12-24T19:17:28.164384
2014-12-26T11:31:57
2014-12-26T11:31:57
28,481,540
0
1
null
2016-03-09T05:35:15
2014-12-25T12:53:32
JavaScript
UTF-8
Java
false
false
999
java
package com.minds.servo.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.minds.servo.dao.UserDAO; import com.minds.servo.model.User; import com.minds.servo.model.UserType; import com.minds.servo.iservice.UserService; @Service public class UserServiceImpl implements UserService { @Autowired private UserDAO userDAO; public void insertUser(User user) { userDAO.insertUser(user); } public User getUserByID(String id) { //userDAO.getUserById(id); return null; } public User getUserByName(String userName) { //userDAO.getUserByName(userName); return null; } public User getUserByEmailId(String emailId) { User user = userDAO.getUserByemailId(emailId); return user; } public void deleteUser(String ID) { // TODO Auto-generated method stub } public UserType getUserTypeByRole(String role){ UserType userType = userDAO.getUserTypeByRole(role); return userType; } }
[ "lenovo@lenovo-PC" ]
lenovo@lenovo-PC
9ca187bc44831a61126ac07984b19d9420bb6fc6
e3c7db733b85f2b7a25ec829bd85b80d994a5494
/app-cms/src/main/java/vn/vmg/ptdv/hola/cms/rest/servicepack/ServicePackJSONRequest.java
78bff29c3be8807bbdc13df54fddf0d9f5a75503
[]
no_license
HoangHieuBK/Holaship
c15cc1c47367ede4de4d7bac12850b2201d85c98
c49f0dcf82f5886080e024fa3802d628e4808ea8
refs/heads/master
2022-12-31T00:04:20.974666
2020-10-15T06:26:52
2020-10-15T06:26:52
304,214,124
0
0
null
null
null
null
UTF-8
Java
false
false
3,473
java
package vn.vmg.ptdv.hola.cms.rest.servicepack; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.Instant; @Data public class ServicePackJSONRequest { private Long id; private String name; private String code; private Instant effectiveAt; private Instant createAt; private Long createdBy; // private Instant createdAtFrom; // private Instant createdAtTo; private Boolean state; private Integer status; private String note; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone = "UTC") private Instant uTimestamp; // private Long id; // private String name; // private String code; // private String note; // private Integer active; // private Integer status; // private Integer maxTime; // private Integer maxDistance; // private Integer maxPoint; // private Integer maxOrder; // private Integer baseDistance; // private Integer basePoint; // private Integer baseCost; // private Integer baseOrderDetail; // private Long surchargeDistance; // private Long surchargePoint; // private Long surchargeOrderDetail; // private Long porterFee; // private Long doorDeliveryFee; // private Long refundFee; // private Long priceDeclareFee; // private Integer type; // private Long servicePackId; // private Long otherCost; // // public ServicePackJSONRequest() { // } // // public ServicePackJSONRequest(@Nullable @RequestParam String name, // String code, // String note, // Integer active, // Integer status, // Integer maxTime, // Integer maxDistance, // Integer maxPoint, // Integer maxOrder, // Integer baseDistance, // Integer basePoint, // Integer baseCost, // Integer baseOrderDetail, // Long surchargeDistance, // Long surchargePoint, // Long surchargeOrderDetail, // Long porterFee, // Long doorDeliveryFee, // Long refundFee, // Long priceDeclareFee, // Integer type, // Long createdBy, // LocalDate createdAt, // Instant uTimestamp, // @Nullable @RequestParam LocalDate effectiveAt) { // this.id = id; // this.name = name; // this.code = code; // this.note = note; // this.active = active; // this.status = status; // this.maxTime = maxTime; // this.maxDistance = maxDistance; // this.maxPoint = maxPoint; // this.maxOrder = maxOrder; // this.baseDistance = baseDistance; // this.basePoint = basePoint; // this.baseCost = baseCost; // this.baseOrderDetail = baseOrderDetail; // this.surchargeDistance = surchargeDistance; // this.surchargePoint = surchargePoint; // this.surchargeOrderDetail = surchargeOrderDetail; // this.porterFee = porterFee; // this.doorDeliveryFee = doorDeliveryFee; // this.refundFee = refundFee; // this.priceDeclareFee = priceDeclareFee; // this.type = type; // this.createdBy = createdBy; // this.createdAt = createdAt; // this.servicePackId = servicePackId; // this.otherCost = otherCost; // this.effectiveAt = effectiveAt; // this.uTimestamp = uTimestamp; // } }
[ "hoanghieubk1996@gmail.com" ]
hoanghieubk1996@gmail.com
04150ae917fef2972f07934bdc125e05ec4592d4
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/invs/CheckData0101U01Handler.java
0c11a535062f8d30b81bf857603af370e2a5d2f1
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,254
java
package nta.med.service.ihis.handler.invs; import javax.annotation.Resource; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.vertx.java.core.Vertx; import nta.med.core.infrastructure.socket.handler.ScreenHandler; import nta.med.data.dao.medi.inv.Inv0101Repository; import nta.med.data.dao.medi.inv.Inv0102Repository; import nta.med.service.ihis.proto.InvsServiceProto; @Service @Scope("prototype") public class CheckData0101U01Handler extends ScreenHandler<InvsServiceProto.CheckData0101U01Request, InvsServiceProto.CheckData0101U01Response> { private static final Log LOGGER = LogFactory.getLog(CheckData0101U01Handler.class); @Resource private Inv0101Repository inv0101Repository; @Resource private Inv0102Repository inv0102Repository; @Override @Transactional(readOnly = true) public InvsServiceProto.CheckData0101U01Response handle(Vertx vertx, String clientId, String sessionId, long contextId, InvsServiceProto.CheckData0101U01Request request) throws Exception { InvsServiceProto.CheckData0101U01Response.Builder response = InvsServiceProto.CheckData0101U01Response.newBuilder(); String resultDel = inv0102Repository.checkDRG0102U00CheckExitToDelete(getHospitalCode(vertx, sessionId), request.getCodeType(), getLanguage(vertx, sessionId)); if (!StringUtils.isEmpty(resultDel)) { response.setDelDetail(resultDel); } String resultMaster = inv0101Repository.checkDRG0102U00GrdMasterGridColumnChanged(request.getCodeType(), getLanguage(vertx, sessionId)); if (!StringUtils.isEmpty(resultMaster)) { response.setCheckMaster(resultMaster); } String resultDetail = inv0102Repository.checkDrg0102U01GrdDetail(getHospitalCode(vertx, sessionId), request.getCodeType(), request.getCode(), getLanguage(vertx, sessionId)); if (!StringUtils.isEmpty(resultDetail)) { response.setCheckDetail(resultDetail); } return response.build(); } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
9905f36b4ae7af51376956ee9cf1a3156dd3ce87
3b481b302b02edf57b816acac9e5ff3b7ec602e2
/src/android/support/v4/widget/ScrollerCompat$ScrollerCompatImplBase.java
044686a34cff4106f66032158e2b409a070224ea
[]
no_license
reverseengineeringer/com.twitter.android
53338ae009b2b6aa79551a8273875ec3728eda99
f834eee04284d773ccfcd05487021200de30bd1e
refs/heads/master
2021-04-15T04:35:06.232782
2016-07-21T03:51:19
2016-07-21T03:51:19
63,835,046
1
1
null
null
null
null
UTF-8
Java
false
false
2,984
java
package android.support.v4.widget; import android.content.Context; import android.view.animation.Interpolator; import android.widget.Scroller; class ScrollerCompat$ScrollerCompatImplBase implements ScrollerCompat.ScrollerCompatImpl { public void abortAnimation(Object paramObject) { ((Scroller)paramObject).abortAnimation(); } public boolean computeScrollOffset(Object paramObject) { return ((Scroller)paramObject).computeScrollOffset(); } public Object createScroller(Context paramContext, Interpolator paramInterpolator) { if (paramInterpolator != null) { return new Scroller(paramContext, paramInterpolator); } return new Scroller(paramContext); } public void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8) { ((Scroller)paramObject).fling(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8); } public void fling(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10) { ((Scroller)paramObject).fling(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8); } public float getCurrVelocity(Object paramObject) { return 0.0F; } public int getCurrX(Object paramObject) { return ((Scroller)paramObject).getCurrX(); } public int getCurrY(Object paramObject) { return ((Scroller)paramObject).getCurrY(); } public int getFinalX(Object paramObject) { return ((Scroller)paramObject).getFinalX(); } public int getFinalY(Object paramObject) { return ((Scroller)paramObject).getFinalY(); } public boolean isFinished(Object paramObject) { return ((Scroller)paramObject).isFinished(); } public boolean isOverScrolled(Object paramObject) { return false; } public void notifyHorizontalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3) {} public void notifyVerticalEdgeReached(Object paramObject, int paramInt1, int paramInt2, int paramInt3) {} public boolean springBack(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6) { return false; } public void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4) { ((Scroller)paramObject).startScroll(paramInt1, paramInt2, paramInt3, paramInt4); } public void startScroll(Object paramObject, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5) { ((Scroller)paramObject).startScroll(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5); } } /* Location: * Qualified Name: android.support.v4.widget.ScrollerCompat.ScrollerCompatImplBase * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
7426b25d5f3ecfb7c9d5f0135af0fc358905ba5f
8228efa27043e0a236ca8003ec0126012e1fdb02
/L2JOptimus_Core/java/net/sf/l2j/gameserver/scripting/quests/Q636_TruthBeyondTheGate.java
d80221c9a1035d77518216ddb3ff57f399f3b399
[]
no_license
wan202/L2JDeath
9982dfce14ae19a22392955b996b42dc0e8cede6
e0ab026bf46ac82c91bdbd048a0f50dc5213013b
refs/heads/master
2020-12-30T12:35:59.808276
2017-05-16T18:57:25
2017-05-16T18:57:25
91,397,726
0
1
null
null
null
null
UTF-8
Java
false
false
2,622
java
package net.sf.l2j.gameserver.scripting.quests; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.zone.L2ZoneType; import net.sf.l2j.gameserver.scripting.Quest; import net.sf.l2j.gameserver.scripting.QuestState; import net.sf.l2j.gameserver.scripting.quests.audio.Sound; public class Q636_TruthBeyondTheGate extends Quest { private static final String qn = "Q636_TruthBeyondTheGate"; // NPCs private static final int ELIYAH = 31329; private static final int FLAURON = 32010; // Reward private static final int VISITOR_MARK = 8064; private static final int FADED_VISITOR_MARK = 8065; public Q636_TruthBeyondTheGate() { super(636, "The Truth Beyond the Gate"); addStartNpc(ELIYAH); addTalkId(ELIYAH, FLAURON); addEnterZoneId(100000); } @Override public String onAdvEvent(String event, Npc npc, Player player) { String htmltext = event; QuestState st = player.getQuestState(qn); if (st == null) return htmltext; if (event.equalsIgnoreCase("31329-04.htm")) { st.setState(STATE_STARTED); st.set("cond", "1"); st.playSound(Sound.SOUND_ACCEPT); } else if (event.equalsIgnoreCase("32010-02.htm")) { st.giveItems(VISITOR_MARK, 1); st.playSound(Sound.SOUND_FINISH); st.exitQuest(false); } return htmltext; } @Override public String onTalk(Npc npc, Player player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestState(qn); if (st == null) return htmltext; switch (st.getState()) { case STATE_CREATED: htmltext = (player.getLevel() < 73) ? "31329-01.htm" : "31329-02.htm"; break; case STATE_STARTED: switch (npc.getNpcId()) { case ELIYAH: htmltext = "31329-05.htm"; break; case FLAURON: htmltext = (st.hasQuestItems(VISITOR_MARK)) ? "32010-03.htm" : "32010-01.htm"; break; } break; case STATE_COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } @Override public final String onEnterZone(Creature character, L2ZoneType zone) { // QuestState already null on enter because quest is finished if (character instanceof Player) { if (character.getActingPlayer().destroyItemByItemId("Mark", VISITOR_MARK, 1, character, false)) character.getActingPlayer().addItem("Mark", FADED_VISITOR_MARK, 1, character, true); } return null; } }
[ "wande@DESKTOP-DM71DUV" ]
wande@DESKTOP-DM71DUV
a0e5a020f0b6b623f38fa4b013dd034cf8f06709
be608e227e7e385cd8e68bdfae4c79283ee88595
/service-edi271/src/main/java/org/delta/b2b/edi/handler/element/NM1SourceHandler.java
9d76245deb42b25410bbb220088269c9ec1e80de
[]
no_license
msen2000/services
4867cdc3e2be12e9b5f54f2568e7c9844e91af25
cb84c48792aee88ab8533f407b8150430c5da2dd
refs/heads/master
2016-08-04T19:08:09.872078
2014-02-16T08:11:16
2014-02-16T08:11:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,774
java
package org.delta.b2b.edi.handler.element; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import org.delta.b2b.edi.parser.Row; import org.delta.b2b.edi.t271.ENM101EntityIdentifierCode; import org.delta.b2b.edi.t271.ENM102EntityTypeQualifier; import org.delta.b2b.edi.t271.ENM103NameLastOrOrganizationName; import org.delta.b2b.edi.t271.ENM104NameFirst; import org.delta.b2b.edi.t271.ENM105NameMiddle; import org.delta.b2b.edi.t271.ENM106NamePrefix; import org.delta.b2b.edi.t271.ENM107NameSuffix; import org.delta.b2b.edi.t271.ENM108IdentificationCodeQualifier; import org.delta.b2b.edi.t271.ENM109IdentificationCode; import org.delta.b2b.edi.t271.SNM1InformationSourceName; public class NM1SourceHandler { private SNM1InformationSourceName snm1; public NM1SourceHandler(SNM1InformationSourceName snm1, Row row) { this.snm1 = snm1; process(row); } public void process(Row row) { String[] arr = row.getElementsInArray(); System.out.println("NM1 array lenght :"+arr.length); ENM101EntityIdentifierCode e01 = new ENM101EntityIdentifierCode(); e01.setValue(arr[0]); snm1.setENM101EntityIdentifierCode(e01); ENM102EntityTypeQualifier e02 = new ENM102EntityTypeQualifier(); e02.setValue(arr[1]); snm1.setENM102EntityTypeQualifier(e02); ENM103NameLastOrOrganizationName e03 = new ENM103NameLastOrOrganizationName(); e03.setValue(arr[2]); snm1.setENM103NameLastOrOrganizationName(e03); ENM104NameFirst e04 = new ENM104NameFirst(); e04.setValue(arr[3]); JAXBElement<ENM104NameFirst> jaxe04 = new JAXBElement(QName.valueOf("E-NM104-Name_First"), ENM104NameFirst.class, null, e04); snm1.setENM104NameFirst(jaxe04); ENM105NameMiddle e05 = new ENM105NameMiddle(); e05.setValue(arr[4]); JAXBElement<ENM105NameMiddle> jaxe05 = new JAXBElement(QName.valueOf("E-NM105-Name_Middle"), ENM105NameMiddle.class, null, e05); snm1.setENM105NameMiddle(jaxe05); ENM106NamePrefix e06 = new ENM106NamePrefix(); e06.setType(arr[5]); JAXBElement<ENM106NamePrefix> jaxe06 = new JAXBElement(QName.valueOf("E-NM106-Name_Prefix"), ENM106NamePrefix.class, null, e06); snm1.setENM106NamePrefix(jaxe06); ENM107NameSuffix e07 = new ENM107NameSuffix(); e07.setValue(arr[6]); JAXBElement<ENM107NameSuffix> jaxe07 = new JAXBElement(QName.valueOf("E-NM107-Name_Suffix"), ENM107NameSuffix.class, null, e07); snm1.setENM107NameSuffix(jaxe07); ENM108IdentificationCodeQualifier e08 = new ENM108IdentificationCodeQualifier(); e08.setValue(arr[7]); snm1.setENM108IdentificationCodeQualifier(e08); ENM109IdentificationCode e09 = new ENM109IdentificationCode(); e09.setValue(arr[8]); snm1.setENM109IdentificationCode(e09); /* ENM110EntityRelationshipCode e10 = new ENM110EntityRelationshipCode(); e10.setType(arr[9]); JAXBElement<ENM110EntityRelationshipCode> jaxe10 = new JAXBElement(QName.valueOf("E-NM110-Entity_Relationship_Code"), ENM110EntityRelationshipCode.class, null, e10); snm1.setENM110EntityRelationshipCode(jaxe10); ENM111EntityIdentifierCode e11 = new ENM111EntityIdentifierCode(); e11.setType(arr[10]); JAXBElement<ENM111EntityIdentifierCode> jaxe11 = new JAXBElement(QName.valueOf("E-NM111-Entity_Identifier_Code"), ENM111EntityIdentifierCode.class, null, e11); snm1.setENM111EntityIdentifierCode(jaxe11); ENM112NameLastOrOrganizationName e12 = new ENM112NameLastOrOrganizationName(); e12.setType(arr[11]); JAXBElement<ENM112NameLastOrOrganizationName> jaxe12 = new JAXBElement(QName.valueOf("E-NM112-Name_Last_or_Organization_Name"), ENM112NameLastOrOrganizationName.class, null, e12); snm1.setENM112NameLastOrOrganizationName(jaxe12); */ } }
[ "msen2000@gmail.com" ]
msen2000@gmail.com
5bb2d33815da5e50ae4954e2d693aca50245d000
8eaaf20f0f20240fb0e31cb62ff838b8bbca7770
/DreamPvP [mc-1.3.1]/se/proxus/DreamPvP/Gui/Screens/ItemList.java
813d3ab2d5a4bfcdd7300e90958c7e1918f09747
[ "LicenseRef-scancode-public-domain", "Unlicense" ]
permissive
Olivki/minecraft-clients
aa7e5d94596c3c67fa748816566ccce17160d000
19e00b00d3556e6b3cee5f968005638593d12c01
refs/heads/master
2020-04-13T05:30:22.073886
2019-03-04T20:52:54
2019-03-04T20:52:54
162,994,258
4
0
null
null
null
null
WINDOWS-1252
Java
false
false
2,454
java
package se.proxus.DreamPvP.Gui.Screens; import java.io.File; import net.minecraft.src.GuiButton; import net.minecraft.src.GuiScreen; import net.minecraft.src.GuiYesNo; import net.minecraft.src.Item; import net.minecraft.src.StringTranslate; public class ItemList extends GuiScreen { private GuiButton give; private ItemListSlot mSlot; public boolean deletePressed = false, focused = false; public GuiButton xrayAdd, chat, friend; @Override public void initGui() { mSlot = new ItemListSlot(this); mSlot.registerScrollButtons(controlList, 7, 8); give = new GuiButton(0, width / 2 - 100, height - 48, "Give yourself " + mSlot.getCurName() + " [" + mSlot.getCurID() + "]."); controlList.clear(); controlList.add(give); controlList.add(new GuiButton(2, width / 2 - 100, height - 26, "Done.")); } @Override public void updateScreen() { give = new GuiButton(0, width / 2 - 100, height - 48, "Give yourself " + mSlot.getCurName() + " [" + mSlot.getCurID() + "]."); controlList.clear(); controlList.add(give); controlList.add(new GuiButton(2, width / 2 - 100, height - 26, "Done.")); } @Override protected void actionPerformed(GuiButton button) { if(button.enabled) { if(button.id == 0) { mc.dp.utils.sendChat("/give " + mc.session.username + " " + mSlot.getCurID() + " 64"); } if(button.id == 1) { /*int var1 = mc.dp.settings.xrayArray.get(mSlot.getSelected()); String id = StringTranslate.getInstance().translateNamedKey(Item.itemsList[var1].getItemName()); if (id != null) { deletePressed = true; StringTranslate stringtranslate = StringTranslate.getInstance(); String s1 = "Are you sure you want to delete this friend?"; String s2 = "\"" + id + "\" will be lost forever! (A long time!)"; String s3 = "Delete."; String s4 = "Cancel."; GuiYesNo guiyesno = new GuiYesNo(this, s1, s2, s3, s4, mSlot.getSelected()); mc.displayGuiScreen(guiyesno); mc.dp.files.saveBaseFile(new File(mc.dp.files.baseFolder, "xRay.txt"), mc.dp.settings.xrayArray, false); }*/ } if(button.id == 2) { mc.displayGuiScreen(new Main_2()); } else { mSlot.actionPerformed(button); } } } @Override public void drawScreen(int I1, int I2, float I3) { mSlot.drawScreen(I1, I2, I3); drawCenteredString(fontRenderer, "Items list. [§e" + mc.dp.settings.itemArray.size() + "§r]", width / 2, 10, 0xFFFFFFFF); super.drawScreen(I1, I2, I3); } }
[ "0liverb3rg@gmail.com" ]
0liverb3rg@gmail.com
75bee055379e63f57b25eb0b71bc688f10d533f9
f727c689c6916cb5d5b7bf986eec3bc1bf0543cd
/src/Accepted/RestoreIPAddress.java
6253ee073ae083f5a82753a9870e5178b58252ff
[]
no_license
lizhieffe/LC150Round2
375a3e3f3a637bfdac7fe4babf337cb12b983bcb
07dd4de65291637b96015412978d00bcde139cb4
refs/heads/master
2020-12-04T08:16:13.494103
2015-01-20T14:18:34
2015-01-20T14:18:34
25,339,447
0
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package Accepted; import java.util.ArrayList; import java.util.List; public class RestoreIPAddress { public List<String> restoreIpAddresses(String s) { List<String> result = new ArrayList<String>(); if (s == null || s.length() < 4 || s.length() > 12) return result; List<String> solution = new ArrayList<String>(); restore(s, 0, solution, result); return result; } private void restore(String s, int beg, List<String> solution, List<String> result) { if (solution.size() == 4 && beg == s.length()) { String tmp = solution.get(0) + '.' + solution.get(1) + '.' + solution.get(2) + '.' + solution.get(3); result.add(tmp); return; } if (solution.size() == 4 || beg >= s.length()) return; for (int i = beg; i < beg + Math.min(3, s.length() - beg); i++) { String tmpString = s.substring(beg, i + 1); if ((Integer.parseInt(tmpString) <= 255) && (i == beg || tmpString.charAt(0) != '0')) { List<String> tmpSolution = new ArrayList<String>(solution); tmpSolution.add(tmpString); restore(s, i + 1, tmpSolution, result); } } } public static void main(String[] args) { String s = "010010"; new RestoreIPAddress().restoreIpAddresses(s); } }
[ "lizhieffe@gmail.com" ]
lizhieffe@gmail.com
9dd615c1e66569ccc75039f85cfba39943825253
d132a32f07cdc583c021e56e61a4befff6228900
/src/main/java/net/minecraft/client/resources/FolderResourcePack.java
8ac2c7418b7f60596b399f2af0b907bc9610f1cf
[]
no_license
TechCatOther/um_clean_forge
27d80cb6e12c5ed38ab7da33a9dd9e54af96032d
b4ddabd1ed7830e75df9267e7255c9e79d1324de
refs/heads/master
2020-03-22T03:14:54.717880
2018-07-02T09:28:10
2018-07-02T09:28:10
139,421,233
0
0
null
null
null
null
UTF-8
Java
false
false
1,538
java
package net.minecraft.client.resources; import com.google.common.collect.Sets; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashSet; import java.util.Set; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.commons.io.filefilter.DirectoryFileFilter; @SideOnly(Side.CLIENT) public class FolderResourcePack extends AbstractResourcePack { private static final String __OBFID = "CL_00001076"; public FolderResourcePack(File p_i1291_1_) { super(p_i1291_1_); } protected InputStream getInputStreamByName(String p_110591_1_) throws IOException { return new BufferedInputStream(new FileInputStream(new File(this.resourcePackFile, p_110591_1_))); } protected boolean hasResourceName(String p_110593_1_) { return (new File(this.resourcePackFile, p_110593_1_)).isFile(); } public Set getResourceDomains() { HashSet hashset = Sets.newHashSet(); File file1 = new File(this.resourcePackFile, "assets/"); if (file1.isDirectory()) { File[] afile = file1.listFiles((java.io.FileFilter)DirectoryFileFilter.DIRECTORY); int i = afile.length; for (int j = 0; j < i; ++j) { File file2 = afile[j]; String s = getRelativeName(file1, file2); if (!s.equals(s.toLowerCase())) { this.logNameNotLowercase(s); } else { hashset.add(s.substring(0, s.length() - 1)); } } } return hashset; } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
525d864d0d29dfe38cfc1d81be8b1638d4e789f7
a9330e4017dac2568a5e950d2c6096d0f7cc3268
/app/src/main/java/com/jing/app/jjgallery/gdb/view/adapter/RecordGridDetailAdapter.java
5eb3fd02f4b24fbce1531fc0cc3becf3872936e1
[]
no_license
JasonKing0329/Gdb
3714247181a944c13f7ca0bd0977cf685daf5f0b
49324b68e5da3baf307ed2f3c6805983b644dce7
refs/heads/master
2021-07-17T13:36:38.717856
2018-08-17T06:35:04
2018-08-17T06:35:04
108,059,270
0
0
null
null
null
null
UTF-8
Java
false
false
2,012
java
package com.jing.app.jjgallery.gdb.view.adapter; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.jing.app.jjgallery.gdb.R; import com.king.app.gdb.data.entity.Record; import com.king.app.gdb.data.entity.Star; import java.util.List; /** * 描述: only for pad landscape * <p/>作者:景阳 * <p/>创建时间: 2017/8/7 11:44 */ public class RecordGridDetailAdapter extends RecyclerView.Adapter<RecordGridDetailHolder> { private List<Record> list; private Star currentStar; private OnDetailActionListener onDetailListener; private int sortMode; public void setCurrentStar(Star currentStar) { this.currentStar = currentStar; } public void setSortMode(int sortMode) { this.sortMode = sortMode; } public void setOnDetailListener(OnDetailActionListener onDetailListener) { this.onDetailListener = onDetailListener; } public void setRecordList(List<Record> recordList) { this.list = recordList; } @Override public RecordGridDetailHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_gdb_record_grid_detail, parent, false); return new RecordGridDetailHolder(view); } @Override public void onBindViewHolder(RecordGridDetailHolder holder, int position) { Record record = list.get(position); holder.setCurrentStar(currentStar); holder.setSortMode(sortMode); holder.bindView(record, position, onDetailListener); } @Override public int getItemCount() { return list == null ? 0 : list.size(); } public interface OnDetailActionListener { void onClickCardItem(View v, Record record); void onPopupMenu(View v, Record record); void onClickStar(View v, Star star); void onClickScene(View v, String scene); } }
[ "jingyang@tcsl.com.cn" ]
jingyang@tcsl.com.cn