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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
df4ee2524c5f25e4de2c3aa73a0d03309c04dc6c | b0dfc7557bd4935f90b514d46427dcfd1d85c30e | /sunCertifiedJavaProgrammer/chapter06/P484/src/Tester484.java | e1a58a0e2492f1041df8925c6f3bd008785b197b | [] | no_license | jareklaskowski7/javaCertifications | fcf99625594dd58a5c77098d72d720f2334fd2b0 | d08f18e9bf9da8a9cf5a32caf0467bb0e47ff190 | refs/heads/master | 2023-05-11T23:25:19.571714 | 2021-06-03T02:23:56 | 2021-06-03T02:23:56 | 373,316,443 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 823 | java | // Sun Certified Java Programmer
// Chapter 6, P484
// Strings, I/O, Formatting, and Parsing
import java.util.*;
class Tester484 {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
c.set(2010, 11, 14);
Date d2 = c.getTime();
Locale locBR = new Locale("pt", "BR"); // Brazil
Locale locDK = new Locale("da", "DK"); // Denmark
Locale locIT = new Locale("it", "IT"); // Italy
System.out.println("def " + locBR.getDisplayCountry());
System.out.println("loc " + locBR.getDisplayCountry(locBR));
System.out.println("def " + locDK.getDisplayLanguage());
System.out.println("loc " + locDK.getDisplayLanguage(locDK));
System.out.println("D>I " + locDK.getDisplayLanguage(locIT));
}
}
| [
"jareklaskowski7@gmail.com"
] | jareklaskowski7@gmail.com |
7febdbc6d30f25150eaca36dc07377a340761b39 | 0721305fd9b1c643a7687b6382dccc56a82a2dad | /src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/google/android/libraries/places/internal/zzt.java | ea1b54e033340df31ca549a9e023292a5171532e | [] | no_license | a2en/Zenly_re | 09c635ad886c8285f70a8292ae4f74167a4ad620 | f87af0c2dd0bc14fd772c69d5bc70cd8aa727516 | refs/heads/master | 2020-12-13T17:07:11.442473 | 2020-01-17T04:32:44 | 2020-01-17T04:32:44 | 234,470,083 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 277 | java | package com.google.android.libraries.places.internal;
import com.google.android.gms.clearcut.ClearcutLogger;
public final class zzt {
public static zzu zza(ClearcutLogger clearcutLogger, zzdb zzdb, zzdd zzdd) {
return new zzu(clearcutLogger, zzdb, zzdd);
}
}
| [
"developer@appzoc.com"
] | developer@appzoc.com |
f5192c1f05e4770b82c59a9c860b170681eaf43d | acf83e1dfae28aa85325922a3e9a2eb59dc93955 | /src/main/java/org/apache/camel/salesforce/dto/ContentDocumentFeed_TypeEnum.java | a245b6d3350dd202132b5bf06763d85f6d21f64e | [
"Apache-2.0"
] | permissive | anandlalvb/JBoss_Fuse_Salesforce | f00820609ea096dcc52b435950300bd3d9e411c6 | 40d2f48c255633c5408dadc313092bb47039407a | refs/heads/master | 2020-03-28T11:17:57.566856 | 2018-09-20T01:13:42 | 2018-09-20T01:13:42 | 148,199,022 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,759 | java | /*
* Salesforce DTO generated by camel-salesforce-maven-plugin
* Generated on: Thu Sep 06 16:51:28 IST 2018
*/
package org.apache.camel.salesforce.dto;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Salesforce Enumeration DTO for picklist Type
*/
@Generated("org.apache.camel.maven.CamelSalesforceMojo")
public enum ContentDocumentFeed_TypeEnum {
// ActivityEvent
ACTIVITYEVENT("ActivityEvent"),
// AdvancedTextPost
ADVANCEDTEXTPOST("AdvancedTextPost"),
// AnnouncementPost
ANNOUNCEMENTPOST("AnnouncementPost"),
// ApprovalPost
APPROVALPOST("ApprovalPost"),
// AttachArticleEvent
ATTACHARTICLEEVENT("AttachArticleEvent"),
// BasicTemplateFeedItem
BASICTEMPLATEFEEDITEM("BasicTemplateFeedItem"),
// CallLogPost
CALLLOGPOST("CallLogPost"),
// CanvasPost
CANVASPOST("CanvasPost"),
// CaseCommentPost
CASECOMMENTPOST("CaseCommentPost"),
// ChangeStatusPost
CHANGESTATUSPOST("ChangeStatusPost"),
// ChatTranscriptPost
CHATTRANSCRIPTPOST("ChatTranscriptPost"),
// CollaborationGroupCreated
COLLABORATIONGROUPCREATED("CollaborationGroupCreated"),
// CollaborationGroupUnarchived
COLLABORATIONGROUPUNARCHIVED("CollaborationGroupUnarchived"),
// ContentPost
CONTENTPOST("ContentPost"),
// CreateRecordEvent
CREATERECORDEVENT("CreateRecordEvent"),
// DashboardComponentSnapshot
DASHBOARDCOMPONENTSNAPSHOT("DashboardComponentSnapshot"),
// EmailMessageEvent
EMAILMESSAGEEVENT("EmailMessageEvent"),
// FacebookPost
FACEBOOKPOST("FacebookPost"),
// LinkPost
LINKPOST("LinkPost"),
// MilestoneEvent
MILESTONEEVENT("MilestoneEvent"),
// PollPost
POLLPOST("PollPost"),
// ProfileSkillPost
PROFILESKILLPOST("ProfileSkillPost"),
// QuestionPost
QUESTIONPOST("QuestionPost"),
// ReplyPost
REPLYPOST("ReplyPost"),
// RypplePost
RYPPLEPOST("RypplePost"),
// SocialPost
SOCIALPOST("SocialPost"),
// TextPost
TEXTPOST("TextPost"),
// TrackedChange
TRACKEDCHANGE("TrackedChange"),
// UserStatus
USERSTATUS("UserStatus");
final String value;
private ContentDocumentFeed_TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static ContentDocumentFeed_TypeEnum fromValue(String value) {
for (ContentDocumentFeed_TypeEnum e : ContentDocumentFeed_TypeEnum.values()) {
if (e.value.equals(value)) {
return e;
}
}
throw new IllegalArgumentException(value);
}
}
| [
"anandlalvb@gmail.com"
] | anandlalvb@gmail.com |
d11c112e05d907cafacf8e3a77c7df7a6ee3895b | ca88a99bd0c48359659d53c5a51374ed9a229887 | /Yamba/src/com/twitter/yamba/DetailsActivity.java | 034c535561d0f0b5058167ab55d6d86670a2e001 | [] | no_license | robertcambil/class-3177 | 34d1aec616c5cdad8b0ed9d8ea4340b74ed69986 | e487c586701962d15a18f62048d4ddc708a50725 | refs/heads/master | 2021-01-18T10:11:15.331443 | 2013-06-14T22:44:48 | 2013-06-14T22:44:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 525 | java | package com.twitter.yamba;
import android.os.Bundle;
public class DetailsActivity extends SubActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Check if this activity was created before
if (savedInstanceState == null) {
// Create a fragment
DetailsFragment fragment = new DetailsFragment();
getFragmentManager()
.beginTransaction()
.add(android.R.id.content, fragment,
fragment.getClass().getSimpleName()).commit();
}
}
}
| [
"marko@marakana.com"
] | marko@marakana.com |
70eeb9c00353e9c3a1aff10a40f4eeeca909b905 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes11.dex_source_from_JADX/com/facebook/composer/activity/TwoThirdsLinearLayout.java | cb1880ab06b8db0fc7864bed6467a9f8afb0d7ce | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,532 | java | package com.facebook.composer.activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.MeasureSpec;
import com.facebook.device.ScreenUtil;
import com.facebook.inject.FbInjector;
import com.facebook.widget.CustomLinearLayout;
import javax.inject.Inject;
/* compiled from: inline_sprouts_state */
public class TwoThirdsLinearLayout extends CustomLinearLayout {
@Inject
public ScreenUtil f6228a;
private static <T extends View> void m7704a(Class<T> cls, T t) {
m7705a((Object) t, t.getContext());
}
private static void m7705a(Object obj, Context context) {
((TwoThirdsLinearLayout) obj).f6228a = ScreenUtil.a(FbInjector.get(context));
}
public TwoThirdsLinearLayout(Context context) {
super(context);
m7702a();
}
public TwoThirdsLinearLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
m7702a();
}
public TwoThirdsLinearLayout(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
m7702a();
}
private void m7702a() {
m7704a(TwoThirdsLinearLayout.class, (View) this);
}
protected void onMeasure(int i, int i2) {
super.onMeasure(MeasureSpec.makeMeasureSpec(this.f6228a.c(), 1073741824), MeasureSpec.makeMeasureSpec((this.f6228a.d() * 2) / 3, 1073741824));
}
private void m7703a(ScreenUtil screenUtil) {
this.f6228a = screenUtil;
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
de85c8db21509fc23f4f2d7a196aa905c8fcc30f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/5/5_ae0913c9cbe354dfa991b098f0134035dc52a467/FormatContentTransformer/5_ae0913c9cbe354dfa991b098f0134035dc52a467_FormatContentTransformer_t.java | 91d3a4e47a1307df304886a8f47a0916905f9a8a | [] | 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,263 | java | package org.freeplane.features.text;
import java.util.List;
import org.freeplane.core.util.HtmlUtils;
import org.freeplane.features.format.FormatController;
import org.freeplane.features.format.PatternFormat;
import org.freeplane.features.map.NodeModel;
class FormatContentTransformer extends AbstractContentTransformer {
final private TextController textController;
public FormatContentTransformer(final TextController textController, final int priority) {
super(priority);
this.textController = textController;
}
public Object transformContent(TextController textController, Object obj, final NodeModel node, Object transformedExtension) {
if (obj == null || node.getUserObject() != transformedExtension)
return obj;
final String format = textController.getNodeFormat(node);
final boolean nodeNumbering = textController.getNodeNumbering(node);
return expandFormat(obj, node, format, nodeNumbering);
}
private Object expandFormat(Object obj, final NodeModel node, final String format, boolean nodeNumbering) {
final boolean hasFormat = format != null && format.length() != 0 && !PatternFormat.IDENTITY_PATTERN.equals(format);
if (!hasFormat && !nodeNumbering){
return obj;
}
// - if html: strip html header
// - if number or date format: Convertible.toObject(text)
// - format/expand
// - if error: use original text
// - if nodeNumbering add
// - if html: enclose in html tag
final boolean isHtml = (obj instanceof String) && HtmlUtils.isHtmlNode((String)obj);
if (isHtml) {
obj = HtmlUtils.extractRawBody((String)obj);
}
if (hasFormat)
obj = FormatController.format(obj, format);
if (nodeNumbering && !node.isRoot()){
StringBuilder builder = new StringBuilder(node.getNodeLevel(true) * 2);
getPathToRoot(builder, node);
builder.append(' ');
if (isHtml) {
obj = insertPrefix(obj.toString(), builder.toString());
}
else{
obj = builder.toString() + obj;
}
}
if (isHtml)
obj = "<html><head></head><body>" + obj + "</body></html>";
return obj.toString();
}
private String insertPrefix(String html, String prefix) {
StringBuilder sb = new StringBuilder(html.length() + prefix.length() + 1);
int i = 0;
int level = 0;
WHILE: while(i < html.length()){
final char c = html.charAt(i);
switch(c){
case '<': level++; break;
case '>': level--; break;
default:
if(level == 0 && ! Character.isWhitespace(c))
break WHILE;
}
i++;
}
sb.append(html.subSequence(0, i));
sb.append(prefix);
sb.append(html.subSequence(i, html.length()));
return sb.toString();
}
private void getPathToRoot(StringBuilder builder, NodeModel node) {
final NodeModel parentNode = node.getParentNode();
if(parentNode == null)
return;
if( textController.getNodeNumbering(parentNode)){
getPathToRoot(builder, parentNode);
if (builder.length() > 0)
builder.append('.');
}
final List<NodeModel> children = parentNode.getChildren();
int counter = 1;
for (NodeModel child : children) {
if(child.equals(node))
break;
if(textController.getNodeNumbering(child))
counter++;
}
builder.append(counter);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
ec8fdd5996e5e219f871b7f21f975709eaf6caff | fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4 | /callcenterj_sy/src/et/bo/sys/common/tree/parameter/build/service/BuildParamTreeService.java | ae8368393375742ac18d730f9e2b883f919fee89 | [] | no_license | sensui74/legacy-project | 4502d094edbf8964f6bb9805be88f869bae8e588 | ff8156ae963a5c61575ff34612c908c4ccfc219b | refs/heads/master | 2020-03-17T06:28:16.650878 | 2016-01-08T03:46:00 | 2016-01-08T03:46:00 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 827 | java | /**
* className TreePropertyService
*
* 创建日期 2008-1-4
*
* @version
*
* 版权所有 沈阳市卓越科技有限公司。
*/
package et.bo.sys.common.tree.parameter.build.service;
import java.util.List;
import excellence.common.tools.LabelValueBean;
import excellence.common.tree.base.service.TreeService;
/**
* 构建类型tree
*
* @version jan 01 2008
* @author 王文权
*/
public interface BuildParamTreeService {
/**
* 根据hql语句 根节点id rootId 构造一刻树返回
* @param rootId 根节点id
* @return TreeService 类型树
* @throws
*/
TreeService buildTree();
TreeService getParamTree();
List<LabelValueBean> getLabelValueBeanListByNickName(String nickName);
String getIdByNidkName(String nickName);
void reloadParamTree();
void setRootId(String rootId);
}
| [
"wow_fei@163.com"
] | wow_fei@163.com |
ba3febecb52af4c13bdcdb67543aa874316eb250 | 917f823dd390b93007393f05edae59070e07af97 | /mo-core-logic/src/main/java/com/karlchu/mo/core/business/UserRoleManagementLocalBean.java | e910506137af9df9e87881b7e983b181e5752cc2 | [] | no_license | saintkarl/medical_order_admin | 7b3fd400ff2aac68e456396d12457c7bbf145a3f | efece2eec67a04f760c45e2a2cee4d9e34328f40 | refs/heads/master | 2021-01-12T06:09:55.513872 | 2017-03-27T14:57:23 | 2017-03-27T14:57:23 | 77,321,783 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,186 | java | package com.karlchu.mo.core.business;
import com.karlchu.mo.core.dto.RoleDTO;
import com.karlchu.mo.core.dto.UserDTO;
import com.karlchu.mo.core.dto.UserRoleDTO;
import javax.ejb.DuplicateKeyException;
import javax.ejb.Local;
import javax.ejb.ObjectNotFoundException;
import java.util.List;
import java.util.Map;
/**
* Created with IntelliJ IDEA.
* User: ANHTAI
* Date: 2/18/16
* Time: 9:18 AM
* To change this template use File | Settings | File Templates.
*/
@Local
public interface UserRoleManagementLocalBean {
UserRoleDTO addItem(UserRoleDTO pojo) throws DuplicateKeyException;
UserRoleDTO updateItem(UserRoleDTO pojo) throws ObjectNotFoundException, DuplicateKeyException;
Map<Long, Long> findByUserId(Long userId);
void deleteByRoleIdUserId(Long roleId, Long userId);
List<RoleDTO> getRoleByUserId(Long userId);
List<UserDTO> findUsersWithRole(Long roleId);
Map<String,RoleDTO> findByUser(Long userId);
List<UserDTO> findUsersWithRoleCode(String code) throws ObjectNotFoundException;
Object[] searchByProperties(Map<String, Object> properties, String sortExpression, String sortDirection, int firstItem, int maxPageItems);
}
| [
"khanh.chu@hoanghoacgroup.com"
] | khanh.chu@hoanghoacgroup.com |
af4d09d1e686e159798aa57cc951872e75bfb484 | bbe34278f3ed99948588984c431e38a27ad34608 | /sources/de/danoeh/antennapod/core/util/-$$Lambda$QueueSorter$mzXKVfyKouyVMqSt_uBG3NeNUuY.java | 1bb04922de115463da68fceead549dd23a12cb7e | [] | no_license | sapardo10/parcial-pruebas | 7af500f80699697ab9b9291388541c794c281957 | 938a0ceddfc8e0e967a1c7264e08cd9d1fe192f0 | refs/heads/master | 2020-04-28T02:07:08.766181 | 2019-03-10T21:51:36 | 2019-03-10T21:51:36 | 174,885,553 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 656 | java | package de.danoeh.antennapod.core.util;
import de.danoeh.antennapod.core.feed.FeedItem;
import java.util.Comparator;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$QueueSorter$mzXKVfyKouyVMqSt_uBG3NeNUuY implements Comparator {
public static final /* synthetic */ -$$Lambda$QueueSorter$mzXKVfyKouyVMqSt_uBG3NeNUuY INSTANCE = new -$$Lambda$QueueSorter$mzXKVfyKouyVMqSt_uBG3NeNUuY();
private /* synthetic */ -$$Lambda$QueueSorter$mzXKVfyKouyVMqSt_uBG3NeNUuY() {
}
public final int compare(Object obj, Object obj2) {
return ((FeedItem) obj2).getPubDate().compareTo(((FeedItem) obj).getPubDate());
}
}
| [
"sa.pardo10@uniandes.edu.co"
] | sa.pardo10@uniandes.edu.co |
91fc5e4d2ddf7f75b8dd417218e8a9859437ded3 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a045/A045078.java | 6161096682e0370c0f815b83967117700effbf9e | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 681 | java | package irvine.oeis.a045;
// Generated by gen_seq4.pl basdig4 4 0 3 3 2 at 2019-07-04 09:18
// DO NOT EDIT here!
import irvine.math.z.Z;
import irvine.oeis.RunsBaseSequence;
/**
* A045078 Numbers n with property that in base 4 representation the numbers of <code>0</code>'s and <code>3</code>'s are 3 and 2, respectively.
* @author Georg Fischer
*/
public class A045078 extends RunsBaseSequence {
/** Construct the sequence. */
public A045078() {
super(1, -1);
}
@Override
protected boolean isOk() {
return getDigitCount(mK, 4, 0) == 3
&& getDigitCount(mK, 4, 3) == 2;
}
@Override
public Z next() {
return getNextWithProperty();
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
8ccbd00207c6ebe8c951156354d2d008a3479bd0 | 4c924e1e0b94d4d667cfd03a1ccaf18beb1d2e21 | /Downloads/wdj-game-sdk-3.1.2-20140909/MainActivity/app/src/main/java/com/anzhuoshoudiantong/music/MediaButtonHelper.java | 6e6b9b4127fe814eceb9eead0b18c6c255456fd7 | [] | no_license | linux86/bestgames | b27c7d96db29cc42caedbcd44c897c7630b78631 | c25585040cb75bc70508f0fb22ba1a7b36ec5ee0 | refs/heads/master | 2021-01-11T01:21:36.472880 | 2015-12-22T12:44:18 | 2015-12-22T12:44:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,609 | java | package com.anzhuoshoudiantong.music;
import android.content.ComponentName;
import android.media.AudioManager;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class MediaButtonHelper {
static {
initializeStaticCompatMethods();
}
static Method sMethodRegisterMediaButtonEventReceiver;
static Method sMethodUnregisterMediaButtonEventReceiver;
static void initializeStaticCompatMethods() {
try {
sMethodRegisterMediaButtonEventReceiver = AudioManager.class
.getMethod("registerMediaButtonEventReceiver",
new Class[] { ComponentName.class });
sMethodUnregisterMediaButtonEventReceiver = AudioManager.class
.getMethod("unregisterMediaButtonEventReceiver",
new Class[] { ComponentName.class });
} catch (NoSuchMethodException e) {
// Silently fail when running on an OS before API level 8.
}
}
public static void registerMediaButtonEventReceiverCompat(
AudioManager audioManager, ComponentName receiver) {
if (sMethodRegisterMediaButtonEventReceiver == null) return;
try {
sMethodRegisterMediaButtonEventReceiver.invoke(audioManager,
receiver);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;
} else {
throw new RuntimeException(e);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
@SuppressWarnings("unused")
public static void unregisterMediaButtonEventReceiverCompat(
AudioManager audioManager, ComponentName receiver) {
if (sMethodUnregisterMediaButtonEventReceiver == null) return;
try {
sMethodUnregisterMediaButtonEventReceiver.invoke(audioManager,
receiver);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;
} else {
throw new RuntimeException(e);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
| [
"huwei@wandoujia.com"
] | huwei@wandoujia.com |
f0f9958925ee661fd8c1e039503f67eee023651d | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/spring-projects--spring-framework/c7bd3b844012a9bb214ca7203f110979c0890c00/before/RequestResponseBodyMethodProcessor.java | c6aad84ff7bbf9de1fa241468720e216371024f1 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,975 | java | /*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.mvc.method.annotation;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.core.Conventions;
import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.HttpMessageNotWritableException;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.validation.BindingResult;
import org.springframework.web.HttpMediaTypeNotAcceptableException;
import org.springframework.web.HttpMediaTypeNotSupportedException;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.ModelAndViewContainer;
import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver;
/**
* Resolves method arguments annotated with {@code @RequestBody} and handles return
* values from methods annotated with {@code @ResponseBody} by reading and writing
* to the body of the request or response with an {@link HttpMessageConverter}.
*
* <p>An {@code @RequestBody} method argument is also validated if it is annotated
* with {@code @javax.validation.Valid}. In case of validation failure,
* {@link MethodArgumentNotValidException} is raised and results in an HTTP 400
* response status code if {@link DefaultHandlerExceptionResolver} is configured.
*
* @author Arjen Poutsma
* @author Rossen Stoyanchev
* @since 3.1
*/
public class RequestResponseBodyMethodProcessor extends AbstractMessageConverterMethodProcessor {
/**
* Basic constructor with converters only. Suitable for resolving
* {@code @RequestBody}. For handling {@code @ResponseBody} consider also
* providing a {@code ContentNegotiationManager}.
*/
public RequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters) {
super(converters);
}
/**
* Basic constructor with converters and {@code ContentNegotiationManager}.
* Suitable for resolving {@code @RequestBody} and handling
* {@code @ResponseBody} without {@code Request~} or
* {@code ResponseBodyAdvice}.
*/
public RequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager) {
super(converters, manager);
}
/**
* Complete constructor for resolving {@code @RequestBody} method arguments.
* For handling {@code @ResponseBody} consider also providing a
* {@code ContentNegotiationManager}.
* @since 4.2
*/
public RequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters,
List<Object> requestResponseBodyAdvice) {
super(converters, null, requestResponseBodyAdvice);
}
/**
* Complete constructor for resolving {@code @RequestBody} and handling
* {@code @ResponseBody}.
*/
public RequestResponseBodyMethodProcessor(List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager, List<Object> requestResponseBodyAdvice) {
super(converters, manager, requestResponseBodyAdvice);
}
@Override
public boolean supportsParameter(MethodParameter parameter) {
return parameter.hasParameterAnnotation(RequestBody.class);
}
@Override
public boolean supportsReturnType(MethodParameter returnType) {
return (AnnotationUtils.findAnnotation(returnType.getContainingClass(), ResponseBody.class) != null ||
returnType.getMethodAnnotation(ResponseBody.class) != null);
}
/**
* Throws MethodArgumentNotValidException if validation fails.
* @throws HttpMessageNotReadableException if {@link RequestBody#required()}
* is {@code true} and there is no body content or if there is no suitable
* converter to read the content with.
*/
@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
Object arg = readWithMessageConverters(webRequest, parameter, parameter.getGenericParameterType());
String name = Conventions.getVariableNameForParameter(parameter);
WebDataBinder binder = binderFactory.createBinder(webRequest, arg, name);
if (arg != null) {
validateIfApplicable(binder, parameter);
if (binder.getBindingResult().hasErrors() && isBindExceptionRequired(binder, parameter)) {
throw new MethodArgumentNotValidException(parameter, binder.getBindingResult());
}
}
mavContainer.addAttribute(BindingResult.MODEL_KEY_PREFIX + name, binder.getBindingResult());
return arg;
}
@Override
protected <T> Object readWithMessageConverters(NativeWebRequest webRequest, MethodParameter methodParam,
Type paramType) throws IOException, HttpMediaTypeNotSupportedException, HttpMessageNotReadableException {
HttpServletRequest servletRequest = webRequest.getNativeRequest(HttpServletRequest.class);
ServletServerHttpRequest inputMessage = new ServletServerHttpRequest(servletRequest);
Object arg = readWithMessageConverters(inputMessage, methodParam, paramType);
if (arg == null) {
if (checkRequired(methodParam)) {
throw new HttpMessageNotReadableException("Required request body is missing: " +
methodParam.getMethod().toGenericString());
}
}
return arg;
}
protected boolean checkRequired(MethodParameter methodParam) {
return methodParam.getParameterAnnotation(RequestBody.class).required();
}
@Override
public void handleReturnValue(Object returnValue, MethodParameter returnType,
ModelAndViewContainer mavContainer, NativeWebRequest webRequest)
throws IOException, HttpMediaTypeNotAcceptableException, HttpMessageNotWritableException {
mavContainer.setRequestHandled(true);
// Try even with null return value. ResponseBodyAdvice could get involved.
writeWithMessageConverters(returnValue, returnType, webRequest);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
3b8cc4fc6fbb1e9134710ae27d8abea7273c69cb | f88d7f9497851f013073181493f335f3ee7619a7 | /app/src/test/java/com/tlongdev/spicio/domain/interactor/SaveEpisodesInteractorTest.java | 4e274fe7899a798962794f9f74c4d4c6fe961a15 | [
"Apache-2.0"
] | permissive | lastbulletbender/spicio | 9581ddd2b13e08cafccd90698cae373be01a3231 | f7d596e64e4101d31bb47d273e4c4c7f6a55b674 | refs/heads/master | 2021-05-31T11:54:11.385133 | 2016-03-15T15:29:18 | 2016-03-15T15:29:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,319 | java | package com.tlongdev.spicio.domain.interactor;
import com.tlongdev.spicio.SpicioApplication;
import com.tlongdev.spicio.component.DaggerInteractorComponent;
import com.tlongdev.spicio.component.InteractorComponent;
import com.tlongdev.spicio.domain.interactor.impl.SaveEpisodesInteractorImpl;
import com.tlongdev.spicio.domain.model.Episode;
import com.tlongdev.spicio.module.FakeAppModule;
import com.tlongdev.spicio.module.FakeDaoModule;
import com.tlongdev.spicio.module.FakeNetworkRepositoryModule;
import com.tlongdev.spicio.module.FakeThreadingModule;
import com.tlongdev.spicio.storage.dao.EpisodeDao;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.LinkedList;
import java.util.List;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
/**
* @author Long
* @since 2016. 03. 10.
*/
@RunWith(MockitoJUnitRunner.class)
public class SaveEpisodesInteractorTest {
@Mock
private EpisodeDao mEpisodeDao;
@Mock
private SaveEpisodesInteractor.Callback mMockedCallback;
@Mock
private SpicioApplication mApp;
@Before
public void setUp() {
FakeDaoModule daoModule = new FakeDaoModule();
daoModule.setEpisodeDao(mEpisodeDao);
FakeNetworkRepositoryModule networkRepositoryModule = new FakeNetworkRepositoryModule();
InteractorComponent component = DaggerInteractorComponent.builder()
.spicioAppModule(new FakeAppModule(mApp))
.daoModule(daoModule)
.networkRepositoryModule(networkRepositoryModule)
.threadingModule(new FakeThreadingModule())
.build();
when(mApp.getInteractorComponent()).thenReturn(component);
}
@Test
public void testInsert(){
List<Episode> episodes = new LinkedList<>();
SaveEpisodesInteractorImpl interactor = new SaveEpisodesInteractorImpl(
mApp, episodes, mMockedCallback
);
interactor.run();
verify(mEpisodeDao).insertAllEpisodes(episodes);
verifyNoMoreInteractions(mEpisodeDao);
verify(mMockedCallback).onSaveEpisodesFinish();
}
}
| [
"lngtrn94@gmail.com"
] | lngtrn94@gmail.com |
38181be831ee9854de04065faa03d89381c6460f | 3c3ddb46de077dc1261537784695fbe54e3f8e15 | /cache2k-jcache/src/main/java/org/cache2k/jcache/provider/generic/storeByValueSimulation/RuntimeCopyTransformer.java | 368fc08201c1f7b4ee9e8d951b76ce9cf386154f | [
"Apache-2.0"
] | permissive | Rokia88/cache2k | 26b0dc481433182c79d2003dc1a87878965e36dc | b199fcd8a338d0c17f20be4ae4c31c9c23edbc75 | refs/heads/master | 2021-04-26T23:06:01.590025 | 2018-02-22T03:57:16 | 2018-02-22T03:57:16 | 123,931,989 | 0 | 0 | Apache-2.0 | 2018-03-05T14:32:14 | 2018-03-05T14:32:14 | null | UTF-8 | Java | false | false | 1,489 | java | package org.cache2k.jcache.provider.generic.storeByValueSimulation;
/*
* #%L
* cache2k JCache provider
* %%
* Copyright (C) 2000 - 2018 headissue GmbH, Munich
* %%
* 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.
* #L%
*/
import java.io.Serializable;
/**
* @author Jens Wilke
*/
public class RuntimeCopyTransformer extends CopyTransformer<Object> {
SerializableCopyTransformer serializableCopyTransformer;
public RuntimeCopyTransformer(final ClassLoader _classLoader) {
serializableCopyTransformer = new SerializableCopyTransformer(_classLoader);
}
@Override
public Object copy(Object obj) {
if (obj == null) {
return null;
}
if (SimpleObjectCopyFactory.isImmutable(obj.getClass())) {
return obj;
}
if (obj instanceof Serializable) {
return serializableCopyTransformer.copy(obj);
}
throw new IllegalArgumentException("Cannot determine copy / marshalling method for: " + obj.getClass().getName());
}
}
| [
"jw_github@headissue.com"
] | jw_github@headissue.com |
1ac52fb11a30ef727c575992f44a476355148bdd | 827b0c8e0a1d3b963b4cc4f5368a5af4f09302f9 | /org.archstudio.prolog.archstudio/src/org/archstudio/prolog/archstudio/ArchipelagoTreePlugin.java | 8df56ea1fba664ad49b7a23aa8643673e5cf5543 | [] | no_license | rastegariyousef/ArchStudio | 62e62e3b191800cd9a8daf2fbf7b15b71cd9e6ec | d1de2cf907909568561c9d04c75beeb5c28f008c | refs/heads/master | 2021-01-15T16:41:20.961759 | 2012-10-15T06:14:43 | 2012-10-15T06:14:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,793 | java | package org.archstudio.prolog.archstudio;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;
import org.archstudio.archipelago.core.IArchipelagoEditorFocuser;
import org.archstudio.archipelago.core.IArchipelagoEditorPane;
import org.archstudio.archipelago.core.IArchipelagoLabelProvider;
import org.archstudio.archipelago.core.IArchipelagoTreeContentProvider;
import org.archstudio.archipelago.core.IArchipelagoTreeContextMenuFiller;
import org.archstudio.archipelago.core.IArchipelagoTreeDoubleClickHandler;
import org.archstudio.archipelago.core.IArchipelagoTreePlugin;
import org.archstudio.filemanager.IFileManagerListener;
import org.archstudio.myx.fw.Services;
import org.archstudio.prolog.engine.MostGeneralUnifierEngine;
import org.archstudio.prolog.engine.ProofContext;
import org.archstudio.prolog.engine.ProofEngine;
import org.archstudio.prolog.engine.SingleThreadProofEngine;
import org.archstudio.prolog.engine.UnificationEngine;
import org.archstudio.prolog.parser.PrologParser;
import org.archstudio.prolog.term.ComplexTerm;
import org.archstudio.prolog.term.Term;
import org.archstudio.prolog.term.VariableTerm;
import org.archstudio.prolog.xadl.PrologUtils;
import org.archstudio.xarchadt.IXArchADT;
import org.archstudio.xarchadt.IXArchADTFileListener;
import org.archstudio.xarchadt.IXArchADTModelListener;
import org.archstudio.xarchadt.ObjRef;
import org.archstudio.xarchadt.XArchADTProxy;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.dnd.DragSourceListener;
import org.eclipse.ui.PlatformUI;
public class ArchipelagoTreePlugin implements IArchipelagoTreePlugin {
protected final Services services;
public ArchipelagoTreePlugin(TreeViewer viewer, Services services, ObjRef documentRootRef) {
this.services = services;
}
@Override
public IArchipelagoTreeContentProvider getContentProvider() {
return null;
}
@Override
public IArchipelagoTreeDoubleClickHandler getDoubleClickHandler() {
return null;
}
@Override
public IArchipelagoLabelProvider getLabelProvider() {
return null;
}
@Override
public IArchipelagoTreeContextMenuFiller[] getContextMenuFillers() {
return new IArchipelagoTreeContextMenuFiller[] { new IArchipelagoTreeContextMenuFiller() {
@Override
public void fillContextMenu(IMenuManager m, Object[] selectedNodes) {
if (selectedNodes != null && selectedNodes.length == 1) {
final Object selectedNode = selectedNodes[0];
if (selectedNode instanceof ObjRef) {
IAction newStructureAction = new Action("Generate Prolog Facts") {
@Override
public void run() {
process(XArchADTProxy.<EObject> proxy(services.get(IXArchADT.class),
(ObjRef) selectedNode));
}
};
m.add(newStructureAction);
}
}
}
} };
}
@Override
public IArchipelagoEditorFocuser getEditorFocuser() {
return null;
}
@Override
public void setEditor(IArchipelagoEditorPane editor) {
}
@Override
public ICellModifier[] getCellModifiers() {
return null;
}
@Override
public IXArchADTModelListener getXArchADTModelListener() {
return null;
}
@Override
public IXArchADTFileListener getXArchADTFileListener() {
return null;
}
@Override
public IFileManagerListener getFileManagerListener() {
return null;
}
@Override
public DragSourceListener getDragSourceListener() {
return null;
}
public void process(final EObject eObject) {
try {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
SubMonitor subMonitor = SubMonitor.convert(monitor, "Prolog", 1);
try {
ProofContext proofContext = new ProofContext();
UnificationEngine unifier = new MostGeneralUnifierEngine();
ProofEngine proofEngine = new SingleThreadProofEngine();
List<ComplexTerm> facts = PrologUtils.getFacts(subMonitor.newChild(1), eObject);
facts.addAll(PrologParser
.parseTerms(
proofContext,
"connectedInterfaces(XIfaceRef, YIfaceRef) :- link(L), link_point1(L, XIfaceRef), link_point2(L, YIfaceRef), interface(XIfaceRef), interface(YIfaceRef), XIfaceRef\\=YIfaceRef."
+ "connectedInterfaces(XIfaceRef, YIfaceRef) :- link(L), link_point2(L, XIfaceRef), link_point1(L, YIfaceRef), interface(XIfaceRef), interface(YIfaceRef), XIfaceRef\\=YIfaceRef."
+ "brick_interface(X, Y) :- component_interface(X, Y)."
+ "brick_interface(X, Y) :- connector_interface(X, Y)."
+ "connectedBricks(XBrickRef, YBrickRef) :- connectedInterfaces(X, Y), X\\=Y, brick_interface(XBrickRef, X), brick_interface(YBrickRef, Y)."));
proofContext.add(facts);
ComplexTerm goal = PrologParser.parseTerms(proofContext, "connectedBricks(X, Y).").get(0);
int total = 0;
for (Map<VariableTerm, Term> v : proofEngine.execute(proofContext, unifier, goal)) {
System.out.println(v);
total++;
if (subMonitor.isCanceled()) {
break;
}
}
System.out.println("Done. " + total + " result(s).");
}
catch (Throwable t) {
throw new InvocationTargetException(t);
}
}
});
}
catch (InvocationTargetException e) {
e.printStackTrace();
}
catch (InterruptedException e) {
e.printStackTrace();
}
}
}
| [
"sahendrickson@gmail.com"
] | sahendrickson@gmail.com |
288e08d3ea54f6585c8367b5f5f045ffbf5a522d | cdd32d68c4e58155559a9002224bfcd14ce4dfa7 | /Week_14/kmq-core/src/main/java/io/kimmking/kmq/core/KmqMessage.java | 1e609c51e0f4bbe64d0eb9f98a4cd3a834cd7974 | [] | no_license | yoshino1984/JAVA-000 | c32787252345efb23dfcd3bbb87aabd8d83a779d | c9b96cefa8d7066663d3f487f3c423023f8f93cb | refs/heads/main | 2023-03-01T02:36:24.722670 | 2021-02-05T18:08:52 | 2021-02-05T18:08:52 | 305,658,388 | 0 | 0 | null | 2020-10-20T09:35:13 | 2020-10-20T09:35:12 | null | UTF-8 | Java | false | false | 360 | java | package io.kimmking.kmq.core;
import io.kimmking.kmq.demo.Order;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.HashMap;
@AllArgsConstructor
@Data
public class KmqMessage<T> {
private HashMap<String,Object> headers;
private T body;
private int msgId;
public KmqMessage(T body) {
this.body = body;
}
}
| [
"wx18868831926@gmail.com"
] | wx18868831926@gmail.com |
043ce07a9a99f90bd95fa5ae0ae924aa2a7b17a8 | 04993ec330462593a8d64d3cbda0275053420ace | /JHPaymentChannelPro/src/main/java/com/jh/paymentchannel/pojo/BankNumCode.java | 2974be6cd86373834cba09aa3eea8b8f3788ba29 | [] | no_license | jsy579579/jh | 60af71fada0462c45f527943f22c1a9ccd8268fd | 44858ab7fbf461cd382efe436473d9581d4c067a | refs/heads/master | 2022-05-13T22:28:16.095115 | 2020-04-29T03:20:14 | 2020-04-29T03:20:14 | 259,813,186 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,336 | java | package com.jh.paymentchannel.pojo;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonFormat;
@Entity
@Table(name="t_bank_num_code")
public class BankNumCode implements Serializable{
private static final long serialVersionUID = 111L;
@Id
@Column(name="id")
private long id;
@Column(name="bank_num")
private String bankNum;
@Column(name="bank_code")
private String bankCode;
@Column(name="bank_name")
private String bankName;
@Column(name="bank_branchcode")
private String bankBranchcode;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getBankNum() {
return bankNum;
}
public void setBankNum(String bankNum) {
this.bankNum = bankNum;
}
public String getBankCode() {
return bankCode;
}
public void setBankCode(String bankCode) {
this.bankCode = bankCode;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getBankBranchcode() {
return bankBranchcode;
}
public void setBankBranchcode(String bankBranchcode) {
this.bankBranchcode = bankBranchcode;
}
}
| [
"593380806@qq.com"
] | 593380806@qq.com |
06ad67c3e021b06e9178c3fce295d110b679b684 | 72279284a121720a403ee232ae8aca9492212a7b | /07-restmvc-hibernate-boot/src/main/java/org/iproduct/spring/restmvc/service/ArticleService.java | 6b90470d7bdd21e8d8796ec01d04bc55583cc45e | [] | no_license | VTheodore/spring5-course | d0354aee7c96fa14b9ab5a7cb3a1aa80a17ecb94 | ed369e57211f963af5fe7861754fc5f771d3860c | refs/heads/main | 2023-03-14T15:48:50.176580 | 2021-03-10T11:47:08 | 2021-03-10T11:47:08 | 316,708,831 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 579 | java | package org.iproduct.spring.restmvc.service;
import org.iproduct.spring.restmvc.model.Article;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import java.util.Collection;
import java.util.List;
public interface ArticleService {
Collection<Article> getArticles();
Article addArticle(@Valid Article article);
Article updateArticle(Article article);
Article getArticleById(long id);
Article deleteArticle(long id);
List<Article> createArticlesBatch(List<Article> articles);
long getArticlesCount();
}
| [
"theodorevezenkov@gmail.com"
] | theodorevezenkov@gmail.com |
7efffd3912326d93f16f8d09e10d86d2b1f6cd68 | 9d18776fd39c8fd4546e496b59a4ae8491736abb | /034-project-seed-1/sys/src/main/java/com/keqi/seed/sys/domain/vo/AccountDetailVO.java | f333694212a7ac57f4e74932f1094d427222f3e9 | [
"Apache-2.0"
] | permissive | WendellTeam/code-java | 2da6d127fcd7ccbe59ec5b7d4b92904a43614f65 | 054aee871f7e25c0a5766ce5422e71be49dd543f | refs/heads/master | 2023-06-11T23:53:22.087548 | 2021-07-02T13:51:46 | 2021-07-02T13:51:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 455 | java | package com.keqi.seed.sys.domain.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
public class AccountDetailVO {
@ApiModelProperty(value = "用户ID", example = "1")
private Long id;
@ApiModelProperty(value = "用户名", example = "jack")
private String account;
@ApiModelProperty(value = "姓名", example = "杰克")
private String nickName;
}
| [
"iskeqi@126.com"
] | iskeqi@126.com |
33076866d44b491be2fa6a1890d4034089f98cf3 | 331a54444ea173841a87d8fe5fbff59a73e6f5fc | /jrpc-transport-mina/src/test/java/com/dinstone/jrpc/cases/SuperInterface.java | 6a165c61ea4ca35afe0885d342652b664650034f | [
"Apache-2.0"
] | permissive | dzdqfq/jrpc | 2c58e878c647c5d5967213b5ce9e7c15a34f6e8d | b830f206d578cc3a0580a6ac2b274040d25bc3c5 | refs/heads/master | 2021-10-09T06:51:43.595196 | 2018-12-23T02:22:00 | 2018-12-23T02:22:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 795 | java | /*
* Copyright (C) 2013~2017 dinstone<dinstone@163.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.dinstone.jrpc.cases;
/**
* @author guojf
* @version 1.0.0.2013-10-29
*/
public interface SuperInterface {
public String sayHello(String name, int age);
}
| [
"dinstone@163.com"
] | dinstone@163.com |
f33b19a3c148d5a8f013f83b3b440da8646a411b | 505a19fc922ded9425efbe84758120412b133096 | /j360-dubbo-apollo/src/main/java/me/j360/dubbo/apollo/annotation/ApplicationConfiguration.java | cb0392645a937a0a2bfdf45007caad7fc80379fa | [
"Apache-2.0"
] | permissive | quanoc/j360-dubbo-app-all | dd9892b56dc160e45da0eb3fd9a78c9813740459 | fc32b0b074177a30d558ae8f0714ae4c05a7e47f | refs/heads/master | 2021-09-20T23:58:23.933419 | 2018-08-17T06:48:50 | 2018-08-17T06:48:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 454 | java | package me.j360.dubbo.apollo.annotation;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
/**
* Package: cn.paomaintv.user.configuration
* User: min_xu
* Date: 2017/6/12 下午7:59
* 说明:
*/
@Configuration
@ImportResource({
"META-INF/spring/application-service.xml",
"META-INF/spring/application-dal.xml"})
public class ApplicationConfiguration {
}
| [
"xumin_wlt@163.com"
] | xumin_wlt@163.com |
2648ca6370af763b63fa7ef41f7e832ec9a6c46c | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project10/src/main/java/org/gradle/test/performance10_2/Production10_157.java | 90b16dcb4387ac504fff55ba10ffe90105fd504c | [] | 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 | 303 | java | package org.gradle.test.performance10_2;
public class Production10_157 extends org.gradle.test.performance6_2.Production6_157 {
private final String property;
public Production10_157() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
721c6b853129221fb93bb4202ed397e85346a44a | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /MY_REPOS/misc-experiments/_FIREBFIRE/netty/transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoop.java | 171e3ef2d2b2bccf545ee95299b2eccb59172c44 | [
"MIT",
"LGPL-2.1-only",
"CC-PDDC",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Java | false | false | 2,617 | java | /*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.channel;
/**
* {@link SingleThreadEventLoop} which is used to handle OIO {@link Channel}'s. So in general there will be
* one {@link ThreadPerChannelEventLoop} per {@link Channel}.
*
*/
public class ThreadPerChannelEventLoop extends SingleThreadEventLoop {
private final ThreadPerChannelEventLoopGroup parent;
private Channel ch;
public ThreadPerChannelEventLoop(ThreadPerChannelEventLoopGroup parent) {
super(parent, parent.executor, true);
this.parent = parent;
}
@Override
public ChannelFuture register(Channel channel, ChannelPromise promise) {
return super.register(channel, promise).addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (future.isSuccess()) {
ch = future.channel();
} else {
deregister();
}
}
});
}
@Override
protected void run() {
for (;;) {
Runnable task = takeTask();
if (task != null) {
task.run();
updateLastExecutionTime();
}
Channel ch = this.ch;
if (isShuttingDown()) {
if (ch != null) {
ch.unsafe().close(ch.unsafe().voidPromise());
}
if (confirmShutdown()) {
cleanupAndTerminate(true);
return;
}
} else {
if (ch != null) {
// Handle deregistration
if (!ch.isRegistered()) {
runAllTasks();
deregister();
}
}
}
}
}
protected void deregister() {
ch = null;
parent.activeChildren.remove(this);
parent.idleChildren.add(this);
}
}
| [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
f619999a2a3f861eaf4d526e61357ccfbf2540b6 | 9c3e8ffb6b80dc7795d37b2115c2985a080f7424 | /src/main/java/it/java858/todoapp/gui/Main.java | b6155211d9bce72a5d9c062f249671b552541431 | [] | no_license | JhonnyPala/ToDoAPP | 00021b07a9ec6931348e6683d62546f64772da6a | b5f7b1863b584fbf822712e5e0476235a612d466 | refs/heads/master | 2021-01-19T05:14:50.373564 | 2016-06-09T19:45:29 | 2016-06-09T19:45:29 | 60,802,483 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,487 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package it.java858.todoapp.gui;
/**
*
* @author tss
*/
public class Main extends javax.swing.JFrame {
/**
* Creates new form Main
*/
public Main() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
MainMenu = new javax.swing.JMenuBar();
mnFile = new javax.swing.JMenu();
mnEsci = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
mnFile.setText("File");
mnEsci.setText("Esci");
mnEsci.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mnEsciActionPerformed(evt);
}
});
mnFile.add(mnEsci);
MainMenu.add(mnFile);
setJMenuBar(MainMenu);
pack();
}// </editor-fold>//GEN-END:initComponents
// <editor-fold defaultstate="collapsed" desc="Gestione eventi del form">
private static Main f;
private void mnEsciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnEsciActionPerformed
//Esco dall'applicazione
f.setVisible(false);
f.dispose();
//System.exit(0);
}//GEN-LAST:event_mnEsciActionPerformed
// </editor-fold>
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
f = new Main();
f.setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JMenuBar MainMenu;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
private javax.swing.JMenuItem mnEsci;
private javax.swing.JMenu mnFile;
// End of variables declaration//GEN-END:variables
}
| [
"tss@debian-tss24"
] | tss@debian-tss24 |
3f66587fd78ef04008241f4b09ebeb72de51b862 | f2ab34c5c6c32c0f465f2af941fff911b2e0ff1f | /myGameLogic.java | 73d25fdfe8c65c987ceae8df1cc1251b9fc12e11 | [] | no_license | Viki4325/Connect-4 | 47c4258e6130e2494cb77354c115793596951775 | 2a3a82838f50c73c3005c3b0a2e8b645b512cff1 | refs/heads/master | 2022-04-18T16:54:25.977557 | 2020-04-19T00:51:13 | 2020-04-19T00:51:13 | 256,428,898 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,836 | java | import java.util.Random;
import java.util.Arrays;
public class myGameLogic implements GameLogic
{
final private int MAX=12;
final private int MIN=6;
//players
private Player AIPlayer;
private Player humanPLayer;
//pointer to hold the current player...who is playing currently
private Player currentPlayer;
//theBoard itself, 2D-array
private Status[][] board;
int size;
//Move made by the player
int currentPlayerMove=-1;
int row;
public myGameLogic()
{
size=boardSizeGenerator();
board=new Status[size][size];
fillBoard();
AIPlayer=new AI();
humanPLayer=new HumanPlayer();
randomizeFirstPlayer();
AIPlayer.setInfo(size,this);
humanPLayer.setInfo(size,this);
}
public void setAnswer(int col)
{
currentPlayerMove=col;
insertInBoard(currentPlayerMove);
if(isBoardFull())
{
humanPLayer.gameOver(Status.NEITHER);
AIPlayer.gameOver(Status.NEITHER);
}
if(gameOver())
{
humanPLayer.gameOver(getCurrentPlayerStatus());
AIPlayer.gameOver(getCurrentPlayerStatus());
}
alternatePlayer();
//call lastMove of on that player with lastMove being moveMade
currentPlayer.lastMove(currentPlayerMove);
}
private int boardSizeGenerator()
{
Random r= new Random();
return r.nextInt((MAX - MIN)+1)+MIN;
}
private void randomizeFirstPlayer()
{
Status[] participators={Status.ONE,Status.TWO};
int randomIndex=new Random().nextInt(participators.length);
if(participators[randomIndex]==Status.ONE)
{
currentPlayer=humanPLayer;
}else
{
currentPlayer=AIPlayer;
}
}
private void alternatePlayer()
{
if(currentPlayer.equals(humanPLayer))
{
currentPlayer = AIPlayer;
}else if(currentPlayer.equals(AIPlayer))
{
currentPlayer = humanPLayer;
}
}
private void fillBoard()
{
for (Status[] s : board) {
Arrays.fill(s, Status.NEITHER);
}
}
/**
* drop - a private helper method that finds the position of a marker
* when it is dropped in a column.
* @param col the column where the piece is dropped
* @return the row where the piece lands
*/
private int drop(int col) {
int posn = 0;
while (posn < board.length && board[posn][col] == Status.NEITHER) {
posn ++;
}
return posn-1;
}
private void insertInBoard(int col)
{
row=drop(col);
if(currentPlayer.equals(humanPLayer))
{
board[row][col]=Status.ONE;
}else if(currentPlayer.equals(AIPlayer))
{
board[row][col]=Status.TWO;
}
}
private int diagonalLowerRight()
{
int winCounter=0;
for(int row = 0; row < size -3; row++)
{
for(int col=0; col < size-3; col++)
{
if(board[row][col]==getCurrentPlayerStatus() &&board[row][col]==board[row+1][col+1] && board[row][col]==board[row+2][col+2] && board[row][col]==board[row+3][col+3])
{
winCounter=4;
}
}
}
return winCounter;
}
private int diagonalUpperRight()
{
int winCounter=0;
for(int row = 0; row < size -3; row++)
{
for(int col=3; col < size; col++)
{
if(board[row][col]==getCurrentPlayerStatus() &&board[row][col]==board[row+1][col-1] && board[row][col]==board[row+2][col-2] && board[row][col]==board[row+3][col-3])
{
winCounter=4;
}
}
}
return winCounter;
}
private int checkHorizontalWin(int latestRow, int latestCol, int rowOffset, int colOffset)
{
int winCounter=0;
if((!((size - latestCol) < 4)))
{//This is the only time we need a loop
for (int i = 1; i < 5; i++) {
if (board[latestRow][latestCol] == getCurrentPlayerStatus())
{
winCounter++;
}
latestRow += rowOffset;
latestCol += colOffset;
}
}
return (winCounter);
}
private int checkVerticalWin(int latestRow, int latestCol, int rowOffset, int colOffset)
{
int winCounter=0;
//don't need a for loop if
if(!((size-latestRow)<4))
{
for(int i=0; i < 4; i++)
{
if(board[latestRow][latestCol]==getCurrentPlayerStatus())
{
winCounter++;
}
latestRow+=rowOffset;
latestCol+=colOffset;
}
}
return (winCounter);
}
/**
* verifyCol - private helper method to determine if an integer is a valid
* column that still has spots left.
* @param col - integer (potential column number)
* @return - is the column valid?
*/
private boolean verifyCol(int col) {
return (col >= 0 && col < board[0].length && board[0][col] == Status.NEITHER);
}
private boolean isBoardFull()
{
int notVerified=0;
//If all the columns can't be verified,(The columns is full) then it means all of them is full
for(int i=0 ; i < board.length ; i++)
{
//the column should not be valid
if(!verifyCol(i))
{
notVerified++;
}
}
return (notVerified==board.length);
}
private boolean gameOver() {
//vertical check
if (checkVerticalWin(row, currentPlayerMove, 1, 0)==4)
{
return true;
}
//horizontal check
for(int offset=0; offset <= currentPlayerMove ; offset++)
{
if(checkHorizontalWin(row, currentPlayerMove - offset, 0, 1)==4)
{
return true;
}
}
//diagonal via lower right
if (diagonalLowerRight()==4)
{
return true;
}
//diagonal via upper right
if (diagonalUpperRight()==4)
{
return true;
}
return false;
}
private Status getCurrentPlayerStatus()
{
if(currentPlayer.equals(humanPLayer))
{
return Status.ONE;
}
else
{
return Status.TWO;
}
}
public void startGame()
{
currentPlayer.lastMove(currentPlayerMove);
}
}
| [
"you@example.com"
] | you@example.com |
a526d8433c1d8dc598bd5c8c9d745c3946217968 | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Spring/Spring558.java | 247fc8d5d3e0c70fff77f17cb0c6d0dc501575bf | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 295 | java | @Override
public void printStackTrace(PrintStream ps) {
synchronized (ps) {
super.printStackTrace(ps);
if (this.relatedCauses != null) {
for (Throwable relatedCause : this.relatedCauses) {
ps.println("Related cause:");
relatedCause.printStackTrace(ps);
}
}
}
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
a4d3deb42f2b6aeb98fee4fb763203aa1b7e90a5 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a150/A150387Test.java | 6e8d80aad4c168d547801e88e226989281c07231 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package irvine.oeis.a150;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A150387Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 10;
}
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
73c4638c840fd8db08ba55dd12a086e52f0314e9 | 4ecad8d306d95c6f83909623f7f64285d7676be5 | /tdd-eureka/src/test/java/com/liumapp/demo/tdd/eureka/package-info.java | e7ede3db63bf6f2d5bc0849c1e75993756673815 | [
"Apache-2.0"
] | permissive | liumapp/spring-cloud-test-driven-demo | 2f02968e470a7a522909f0bb53b3e21bad67d06b | 89a515b46b77f646df065c62893fe009f3435578 | refs/heads/master | 2020-03-06T17:00:50.883201 | 2018-03-30T07:04:12 | 2018-03-30T07:04:12 | 126,982,852 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 146 | java | /**
* Created by liumapp on 9/28/17.
* E-mail:liumapp.com@gmail.com
* home-page:http://www.liumapp.com
*/
package com.liumapp.demo.tdd.eureka; | [
"liumapp.com@gmail.com"
] | liumapp.com@gmail.com |
0b7ce8bc02723cb24d0e2e16655d73d5bf8c5f5f | 0ec2603a84e59b065ec9b567976371a7b2de8bfc | /Queue/src/Our5QueueIsFullException.java | 6f3886b23054aa68c6ec13d781e2f775af65e5af | [] | no_license | DenLilleMand/legacy_code | 9391c9145716f896dddd802645658d016d44a317 | a09936ea7ae4c82c76aa3a5f4baa1fc782e10203 | refs/heads/master | 2016-08-13T00:51:27.964654 | 2016-02-17T23:06:33 | 2016-02-17T23:06:33 | 51,962,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 196 | java |
public class Our5QueueIsFullException extends Exception {
private static final long serialVersionUID = 1L;
public Our5QueueIsFullException(String message)
{
super(message);
}
}
| [
"mattinielsen5@hotmail.com"
] | mattinielsen5@hotmail.com |
e4bbba2f01a05df57d849e0fec8fc27e24ae664e | fa02eaa873d5f3c3dcbfe7599e91dde86bd77358 | /thinkjoy-ams/thinkjoy-ams-dao/src/main/java/com/thinkjoy/ams/dao/mapper/AmsPerprojectAppMapper.java | 20dfbc650e1b16671d363919181eaea8a53947e1 | [
"MIT"
] | permissive | josephfourier/admin | 27942c8a1be8ac460201117b69d7df67ee3a887a | 1bcebbbedece08847ea83ed4910b50d964aec01c | refs/heads/master | 2021-04-06T06:34:21.841180 | 2018-03-10T07:07:33 | 2018-03-10T07:07:33 | 124,630,923 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,030 | java | package com.thinkjoy.ams.dao.mapper;
import com.thinkjoy.ams.dao.model.AmsPerprojectApp;
import com.thinkjoy.ams.dao.model.AmsPerprojectAppExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
public interface AmsPerprojectAppMapper {
long countByExample(AmsPerprojectAppExample example);
int deleteByExample(AmsPerprojectAppExample example);
int deleteByPrimaryKey(@Param("userId") Integer userId, @Param("usertypeId") Integer usertypeId, @Param("relationCode") String relationCode, @Param("appId") Integer appId);
int insert(AmsPerprojectApp record);
int insertSelective(AmsPerprojectApp record);
List<AmsPerprojectApp> selectByExample(AmsPerprojectAppExample example);
int updateByExampleSelective(@Param("record") AmsPerprojectApp record, @Param("example") AmsPerprojectAppExample example);
int updateByExample(@Param("record") AmsPerprojectApp record, @Param("example") AmsPerprojectAppExample example);
int updatePersonal(Map map);
} | [
"2779429237@qq.com"
] | 2779429237@qq.com |
7f83f08270636252bdd152835c8df0fa933f80b7 | 6bac1a560bf008cb2d898438050d720653ce628a | /telekom/Siebel/gensrc/com/siebel/ordermanagement/order/details/data/id/ListOfOrderItemXADetailId.java | c4d0c845bfe38dda269aeb55c8e53b45aff11e17 | [] | no_license | vkscorpio3/TelekomPOC | 8ff40774bbbfc6868b4a3f84a971d972b9dc9ab7 | c437ef7c30e93ea24c1d8acc0110b985401d049b | refs/heads/master | 2020-03-08T16:54:42.639312 | 2017-08-26T22:25:25 | 2017-08-26T22:25:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,165 | java |
package com.siebel.ordermanagement.order.details.data.id;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ListOfOrderItemXADetailId complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ListOfOrderItemXADetailId">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="OrderItemXADetail" type="{http://siebel.com/OrderManagement/Order/Details/Data/Id}OrderItemXADetailId" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ListOfOrderItemXADetailId", propOrder = {
"orderItemXADetail"
})
public class ListOfOrderItemXADetailId
implements Serializable
{
@XmlElement(name = "OrderItemXADetail")
protected List<OrderItemXADetailId> orderItemXADetail;
/**
* Gets the value of the orderItemXADetail property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the orderItemXADetail property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getOrderItemXADetail().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link OrderItemXADetailId }
*
*
*/
public List<OrderItemXADetailId> getOrderItemXADetail() {
if (orderItemXADetail == null) {
orderItemXADetail = new ArrayList<OrderItemXADetailId>();
}
return this.orderItemXADetail;
}
}
| [
"vivek.singh4@techmahindra.com"
] | vivek.singh4@techmahindra.com |
4c2ad66451439eb92d2d5e9c6764ce5b86fadaf2 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/java-design-patterns/learning/350/Task.java | e0e1cdd3d95dc98a1337aca645ff1b73f2390dd8 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,482 | java | /**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.callback;
/**
*
* Template-method class for callback hook execution
*
*/
public abstract class Task {
/**
* Execute with callback
*/
public final void executeWith(Callback callback) {
execute();
if (callback != null) {
callback.call();
}
}
public abstract void execute();
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
ed49649855dd5b21b67a972fb8eec64c35dde668 | 70123d8b25800e4a1743626822eb651c38513cd7 | /rdf/Semantics/src/com/rift/coad/rdf/semantic/persistance/jena/JenaModelWrapper.java | 76af302f5cbc49a9c13207f1c0bef2a7c88f1cad | [] | no_license | brettchaldecott/dipforge | bb9205cddaba60d61ab7f65b58c22a058264b698 | ca2fe194156754d142fc48fdb8b963f37aa7c6a3 | refs/heads/master | 2021-03-19T12:14:25.926735 | 2016-01-22T12:06:22 | 2016-01-22T12:06:22 | 1,043,676 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,045 | java | /*
* Semantics: The semantic library for dipforge
* Copyright (C) 2015 2015 Burntjam
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* JenaModelWrapper.java
*/
// package path
package com.rift.coad.rdf.semantic.persistance.jena;
// imports for the jena libraries
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.shared.Lock;
/**
* This object is a wrapper of the wrapped model. It acts as a visitor to the
* model for certain transaction methods.
*
* @author brett chaldecott
*/
public interface JenaModelWrapper {
/**
* This method is called to retrieve the wrapped model
* @return
*/
public Model getModel();
/**
* This method is called when entering a critical lock section
*
* @param lock The type of critical lock to apply.
*/
public void enterCriticalSection(boolean lock);
/**
* This method is used to begin the lock on the object
*/
public void begin();
/**
* This method is called to abort the changes
*/
public void abort();
/**
* The method to commit the changes.
*
* @return The commit method
*/
public void commit();
/**
* The method to leave the critcal section
*/
public void leaveCriticalSection();
}
| [
"brett.chaldecott@gmail.com"
] | brett.chaldecott@gmail.com |
460f1e66d2ca33f9c35f685506a2fb30021827b4 | 447520f40e82a060368a0802a391697bc00be96f | /apks/malware/app2/source/android/support/v4/util/TimeUtils.java | 086d97b2a0dacbd209aa89d7bc2197164fe2715c | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 6,956 | java | package android.support.v4.util;
import java.io.PrintWriter;
public class TimeUtils
{
public static final int HUNDRED_DAY_FIELD_LEN = 19;
private static final int SECONDS_PER_DAY = 86400;
private static final int SECONDS_PER_HOUR = 3600;
private static final int SECONDS_PER_MINUTE = 60;
private static char[] sFormatStr = new char[24];
private static final Object sFormatSync = new Object();
public TimeUtils() {}
private static int accumField(int paramInt1, int paramInt2, boolean paramBoolean, int paramInt3)
{
if ((paramInt1 > 99) || ((paramBoolean) && (paramInt3 >= 3))) {
return paramInt2 + 3;
}
if ((paramInt1 > 9) || ((paramBoolean) && (paramInt3 >= 2))) {
return paramInt2 + 2;
}
if ((paramBoolean) || (paramInt1 > 0)) {
return paramInt2 + 1;
}
return 0;
}
public static void formatDuration(long paramLong1, long paramLong2, PrintWriter paramPrintWriter)
{
if (paramLong1 == 0L)
{
paramPrintWriter.print("--");
return;
}
formatDuration(paramLong1 - paramLong2, paramPrintWriter, 0);
}
public static void formatDuration(long paramLong, PrintWriter paramPrintWriter)
{
formatDuration(paramLong, paramPrintWriter, 0);
}
public static void formatDuration(long paramLong, PrintWriter paramPrintWriter, int paramInt)
{
synchronized (sFormatSync)
{
paramInt = formatDurationLocked(paramLong, paramInt);
paramPrintWriter.print(new String(sFormatStr, 0, paramInt));
return;
}
}
public static void formatDuration(long paramLong, StringBuilder paramStringBuilder)
{
synchronized (sFormatSync)
{
int i = formatDurationLocked(paramLong, 0);
paramStringBuilder.append(sFormatStr, 0, i);
return;
}
}
private static int formatDurationLocked(long paramLong, int paramInt)
{
if (sFormatStr.length < paramInt) {
sFormatStr = new char[paramInt];
}
char[] arrayOfChar = sFormatStr;
if (paramLong == 0L)
{
while (paramInt - 1 < 0) {
arrayOfChar[0] = ' ';
}
arrayOfChar[0] = '0';
return 1;
}
int i;
int i4;
int k;
int m;
int j;
int n;
if (paramLong > 0L)
{
i = 43;
i4 = (int)(paramLong % 1000L);
k = (int)Math.floor(paramLong / 1000L);
m = 0;
j = k;
if (k > 86400)
{
m = k / 86400;
j = k - 86400 * m;
}
if (j <= 3600) {
break label570;
}
n = j / 3600;
j -= n * 3600;
}
for (;;)
{
int i1;
if (j > 60)
{
k = j / 60;
i1 = k;
}
for (k = j - k * 60;; k = j)
{
boolean bool;
if (paramInt != 0)
{
j = accumField(m, 1, false, 0);
if (j > 0)
{
bool = true;
label185:
j += accumField(n, 1, bool, 2);
if (j <= 0) {
break label321;
}
bool = true;
label207:
j += accumField(i1, 1, bool, 2);
if (j <= 0) {
break label327;
}
bool = true;
label229:
i2 = j + accumField(k, 1, bool, 2);
if (i2 <= 0) {
break label333;
}
}
label321:
label327:
label333:
for (j = 3;; j = 0)
{
i3 = accumField(i4, 2, true, j);
j = 0;
i2 = i3 + 1 + i2;
for (;;)
{
i3 = j;
if (i2 >= paramInt) {
break;
}
arrayOfChar[j] = ' ';
i2 += 1;
j += 1;
}
paramLong = -paramLong;
i = 45;
break;
bool = false;
break label185;
bool = false;
break label207;
bool = false;
break label229;
}
}
int i3 = 0;
arrayOfChar[i3] = i;
int i2 = i3 + 1;
if (paramInt != 0)
{
paramInt = 1;
m = printField(arrayOfChar, m, 'd', i2, false, 0);
if (m == i2) {
break label519;
}
bool = true;
label385:
if (paramInt == 0) {
break label525;
}
j = 2;
label392:
m = printField(arrayOfChar, n, 'h', m, bool, j);
if (m == i2) {
break label531;
}
bool = true;
label419:
if (paramInt == 0) {
break label537;
}
j = 2;
label426:
m = printField(arrayOfChar, i1, 'm', m, bool, j);
if (m == i2) {
break label543;
}
bool = true;
label453:
if (paramInt == 0) {
break label549;
}
j = 2;
label460:
j = printField(arrayOfChar, k, 's', m, bool, j);
if ((paramInt == 0) || (j == i2)) {
break label555;
}
}
label519:
label525:
label531:
label537:
label543:
label549:
label555:
for (paramInt = 3;; paramInt = 0)
{
paramInt = printField(arrayOfChar, i4, 'm', j, true, paramInt);
arrayOfChar[paramInt] = 's';
return paramInt + 1;
paramInt = 0;
break;
bool = false;
break label385;
j = 0;
break label392;
bool = false;
break label419;
j = 0;
break label426;
bool = false;
break label453;
j = 0;
break label460;
}
i1 = 0;
}
label570:
n = 0;
}
}
private static int printField(char[] paramArrayOfChar, int paramInt1, char paramChar, int paramInt2, boolean paramBoolean, int paramInt3)
{
int i;
int j;
if (!paramBoolean)
{
i = paramInt2;
if (paramInt1 <= 0) {}
}
else
{
if (((!paramBoolean) || (paramInt3 < 3)) && (paramInt1 <= 99)) {
break label142;
}
j = paramInt1 / 100;
paramArrayOfChar[paramInt2] = ((char)(j + 48));
i = paramInt2 + 1;
paramInt1 -= j * 100;
}
for (;;)
{
if (((!paramBoolean) || (paramInt3 < 2)) && (paramInt1 <= 9))
{
j = paramInt1;
paramInt3 = i;
if (paramInt2 == i) {}
}
else
{
paramInt2 = paramInt1 / 10;
paramArrayOfChar[i] = ((char)(paramInt2 + 48));
paramInt3 = i + 1;
j = paramInt1 - paramInt2 * 10;
}
paramArrayOfChar[paramInt3] = ((char)(j + 48));
paramInt1 = paramInt3 + 1;
paramArrayOfChar[paramInt1] = paramChar;
i = paramInt1 + 1;
return i;
label142:
i = paramInt2;
}
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
0eee080346258013a5f3f7bf8d0d5fece2d7d766 | b568015ac5670fbb747fe54f814f673256428fef | /br-order-redis-service/src/main/java/br/order/redis/impl/suite/OrgExamSuiteTypeRedisImpl.java | d877c59310b92487198448fada94b876779e2aa0 | [] | no_license | wangwenteng/br-order-redis-manager | 5ae1ff63764f991808f5787a4c0cf77b2d7f0c11 | f6f41b562540eadb3fd44271017ddf2d9ad665cf | refs/heads/master | 2022-03-07T19:30:16.686875 | 2017-05-05T08:59:52 | 2017-05-05T08:59:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,552 | java | package br.order.redis.impl.suite;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
import br.crm.common.utils.JsonUtils;
import br.crm.common.utils.RedisConstant;
import br.crm.pojo.suite.OrganizationExamSuiteType;
import br.crm.service.suite.OrgExamSuiteTypeService;
import br.order.redis.redis.RedisService;
import br.order.redis.suite.OrgExamSuiteTypeRedis;
@Service
public class OrgExamSuiteTypeRedisImpl implements OrgExamSuiteTypeRedis {
@Autowired
@Qualifier("RedisInnerService")
private RedisService redisService;
public RedisService getRedisService() {
return redisService;
}
public void setRedisService(RedisService redisService) {
this.redisService = redisService;
}
@Autowired
private OrgExamSuiteTypeService orgExamSuiteTypeService;
@Override
public void initData() {
List<OrganizationExamSuiteType> list = orgExamSuiteTypeService.getOrgExamSuiteTypeList(null);
if (CollectionUtils.isNotEmpty(list)) {
//缓存中间表id
for (OrganizationExamSuiteType organizationExamSuiteType : list) {
setOrgExamSuiteType(organizationExamSuiteType);
}
}
}
@Override
public int setOrgExamSuiteType(OrganizationExamSuiteType orgExamSuiteType) {
redisService.set(RedisConstant.br_order_orgExamSuiteType_id.concat(orgExamSuiteType.getExamSuiteTypeId()), JSONObject.toJSONString(orgExamSuiteType));
//缓存套餐id
List<String> typeList = new ArrayList<String>();
if (redisService.exists(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(orgExamSuiteType.getExamSuiteId()))) {
typeList = JSONObject.parseArray(redisService.get(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(orgExamSuiteType.getExamSuiteId())), String.class);
}
if (!typeList.contains(orgExamSuiteType.getExamTypeId())) {
typeList.add(orgExamSuiteType.getExamTypeId());
}
redisService.set(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(orgExamSuiteType.getExamSuiteId()), JSONObject.toJSONString(typeList));
//缓存类型id
List<String> suitList = new ArrayList<String>();
if (redisService.exists(RedisConstant.br_order_orgExamSuiteType_typeId.concat(orgExamSuiteType.getExamTypeId()))) {
suitList = JSONObject.parseArray(redisService.get(RedisConstant.br_order_orgExamSuiteType_typeId.concat(orgExamSuiteType.getExamTypeId())), String.class);
}
if (!suitList.contains(orgExamSuiteType.getExamSuiteId())) {
suitList.add(orgExamSuiteType.getExamSuiteId());
}
redisService.set(RedisConstant.br_order_orgExamSuiteType_typeId.concat(orgExamSuiteType.getExamTypeId()), JSONObject.toJSONString(suitList));
return 1;
}
@Override
public OrganizationExamSuiteType getOrgExamSuiteType(String examSuiteTypeId) {
if(redisService.exists(RedisConstant.br_order_orgExamSuiteType_id.concat(examSuiteTypeId))){
return JsonUtils.jsonToPojo(redisService.get(RedisConstant.br_order_orgExamSuiteType_id.concat(examSuiteTypeId)), OrganizationExamSuiteType.class);
}
return null;
}
@Override
public int deleteOrgExamSuiteType(String examSuiteTypeId) {
if(redisService.exists(RedisConstant.br_order_orgExamSuiteType_id.concat(examSuiteTypeId))){
OrganizationExamSuiteType suiteType=getOrgExamSuiteType(examSuiteTypeId);
if(suiteType!=null){
List<String> typeList = new ArrayList<String>();
if (redisService.exists(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(suiteType.getExamSuiteId()))) {
typeList = JSONObject.parseArray(redisService.get(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(suiteType.getExamSuiteId())), String.class);
}
if (typeList.contains(suiteType.getExamTypeId())) {
typeList.remove(suiteType.getExamTypeId());
}
redisService.set(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(suiteType.getExamSuiteId()), JSONObject.toJSONString(typeList));
//缓存类型id
List<String> suitList = new ArrayList<String>();
if (redisService.exists(RedisConstant.br_order_orgExamSuiteType_typeId.concat(suiteType.getExamTypeId()))) {
suitList = JSONObject.parseArray(redisService.get(RedisConstant.br_order_orgExamSuiteType_typeId.concat(suiteType.getExamTypeId())), String.class);
}
if (suitList.contains(suiteType.getExamSuiteId())) {
suitList.remove(suiteType.getExamSuiteId());
}
redisService.set(RedisConstant.br_order_orgExamSuiteType_typeId.concat(suiteType.getExamTypeId()), JSONObject.toJSONString(suitList));
}
return redisService.delete(RedisConstant.br_order_orgExamSuiteType_id.concat(examSuiteTypeId)).intValue();
}
return 0;
}
/**
* <p>Title:getSuiteTypeIdBySuite</p>
* <p>Description:根据套餐id获取套餐类型id集合 </p>
* @param suiteId 套餐id
* @return
* @see br.order.redis.dict.DictExamSuiteTypeRedis#getSuiteTypeIdBySuite(java.lang.String)
*/
@Override
public List<String> getSuiteTypeIdBySuite(String suiteId) {
String string = redisService.get(RedisConstant.br_order_orgExamSuiteType_suiteId.concat(suiteId));
List<String> suiteTypeList = JSONObject.parseArray(string, String.class);
return suiteTypeList;
}
/**
* <p>Title:getSuiteBySuiteType</p>
* <p>Description:根据用户选择套餐类型获取套餐</p>
* @param suiteType 套餐类型
* @return
* @see br.order.redis.dict.DictExamSuiteTypeRedis#getSuiteBySuiteType(java.lang.String)
*/
@Override
public List<String> getSuiteBySuiteType(String suiteType) {
String string = redisService.get(RedisConstant.br_order_orgExamSuiteType_typeId.concat(suiteType));
List<String> suiteList = JSONObject.parseArray(string, String.class);
return suiteList;
}
}
| [
"120591516@qq.com"
] | 120591516@qq.com |
21ec26129490c739c76d083da01456a35a566d37 | 6188ab71205eb5a746aff8e8611becceec7bf01a | /microservices/springconfig-server/src/main/java/com/sonal/springcloud/SpringConfigApplication.java | 06d260ae57b73f2eef81f2cf49d6849fc9a79f3b | [] | no_license | sinhasonalkumar/spring-cloud-demo | 2ba5b3f8cf47ac165d4f855614e1ab3febb9ab53 | 7ef2c51a8671484ccf236cab5390777fa17f2dc2 | refs/heads/master | 2021-01-21T02:27:27.023294 | 2016-09-19T20:00:42 | 2016-09-19T20:00:42 | 68,569,419 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 672 | java | package com.sonal.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@EnableAutoConfiguration
@EnableConfigServer
@EnableEurekaClient
@ComponentScan
public class SpringConfigApplication {
public static void main(String[] args) {
SpringApplication.run(SpringConfigApplication.class, args);
}
}
| [
"sinha.sonal.kumar@gmail.com"
] | sinha.sonal.kumar@gmail.com |
20e6043e572ed989d767e0d9a9cde62c37a3aacf | 5ecc9cf7bef5fa9d53a51a1950dae4a39d913b10 | /baseFrameKotlin/src/main/java/com/hzy/smartfield/test/thread/Main.java | 0068557441d39758092d57295afb0b88a7a7deb9 | [
"Apache-2.0"
] | permissive | ThornJuice/MySamples | 0094958bf0e0235feaaa96fcaf8a3ecee45c6d06 | fbc4f6e1905165ec0348f2856a4dc04c1010bb8e | refs/heads/master | 2021-06-17T05:58:24.186532 | 2021-06-09T04:11:23 | 2021-06-09T04:11:23 | 203,276,048 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 503 | java | package com.hzy.smartfield.test.thread;
public class Main {
public static void main(String[] strings){
Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
synchronized(this){
System.out.println("xxxx");
}
}
});
t1.start();
}
static class MyR implements MyRunnable{
@Override
public void run() {
System.out.println("xxxx");
}
}
}
| [
"1292571922@qq.com"
] | 1292571922@qq.com |
340627d45c1a6cebc0355b427f089807d4660202 | b97bc0706448623a59a7f11d07e4a151173b7378 | /src/main/java/radian/tcmis/server7/client/pge/servlets/PGEscannerDownload.java | 6a30e716646ac406121e23433b37bba66c106c07 | [] | no_license | zafrul-ust/tcmISDev | 576a93e2cbb35a8ffd275fdbdd73c1f9161040b5 | 71418732e5465bb52a0079c7e7e7cec423a1d3ed | refs/heads/master | 2022-12-21T15:46:19.801950 | 2020-02-07T21:22:50 | 2020-02-07T21:22:50 | 241,601,201 | 0 | 0 | null | 2022-12-13T19:29:34 | 2020-02-19T11:08:43 | Java | UTF-8 | Java | false | false | 1,149 | java | package radian.tcmis.server7.client.pge.servlets;
/**
* Title: Your Product Name
* Description: Your description
* Copyright: Copyright (c) 1998
* Company: Your Company
* @author Your Name
* @version
*/
import radian.tcmis.server7.share.helpers.*;
import radian.tcmis.server7.share.servlets.*;
import radian.tcmis.server7.client.pge.dbObjs.*;
import radian.tcmis.server7.client.pge.helpers.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class PGEscannerDownload extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PGETcmISDBModel db = null;
try {
db = new PGETcmISDBModel("PGE",(String)request.getHeader("logon-version"));
scannerDownload obj = new scannerDownload((ServerResourceBundle) new PGEServerResourceBundle(),db);
obj.doPost(request,response);
} catch (Exception e){
e.printStackTrace();
} finally {
db.close();
}
}
} | [
"julio.rivero@wescoair.com"
] | julio.rivero@wescoair.com |
e921d83a346458a0d1d57dc7d50e1b6cadaa5c54 | 6bb4a0663e864f7e58d22c2f5ad4b92b390933b2 | /saibz5base/src/main/java/net/ibizsys/psrt/srv/common/demodel/userroleres/dataset/UserRoleResDefaultDSModelBase.java | c04db2be868e3fb8849f4f9cc797a41e47a2de79 | [
"Apache-2.0"
] | permissive | bluebird88/iBizSysRuntime | 8a7de1a4e8acecac7f2056fd505aac5a3e4cdc38 | de18dbf57d6f55d64c225a182a34b7dd47c65b50 | refs/heads/master | 2022-03-03T00:31:11.050508 | 2017-07-20T07:34:59 | 2017-07-20T07:34:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 877 | java | /**
* iBizSys 5.0 机器人生产代码(不要直接修改当前代码)
* http://www.ibizsys.net
*/
package net.ibizsys.psrt.srv.common.demodel.userroleres.dataset;
import net.ibizsys.paas.core.DEDataSet;
import net.ibizsys.paas.core.DEDataSetQuery;
import net.ibizsys.paas.sysmodel.CodeListGlobal;
import net.ibizsys.paas.codelist.ICodeList;
import net.ibizsys.paas.demodel.DEDataSetGroupParamModel;
@DEDataSet(id="ee84bfb6e336a62bdcd671895549aebe",name="DEFAULT",queries= {
@DEDataSetQuery(queryid="1666E70A-5F02-4D25-AA47-8429338B76F9",queryname="DEFAULT")
})
/**
* 实体数据集合[DEFAULT]模型基类
*/
public abstract class UserRoleResDefaultDSModelBase extends net.ibizsys.paas.demodel.DEDataSetModelBase {
public UserRoleResDefaultDSModelBase() {
super();
this.initAnnotation(UserRoleResDefaultDSModelBase.class);
}
} | [
"dev@ibizsys.net"
] | dev@ibizsys.net |
579ed2f575a95f7522d059d74fc3292fa9e8e870 | 806f76edfe3b16b437be3eb81639d1a7b1ced0de | /src/com/google/android/gms/common/internal/C0420b.java | 57501ecaa01373dfc163d9923cf06f0528fa2b7e | [] | no_license | magic-coder/huawei-wear-re | 1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01 | 935ad32f5348c3d8c8d294ed55a5a2830987da73 | refs/heads/master | 2021-04-15T18:30:54.036851 | 2018-03-22T07:16:50 | 2018-03-22T07:16:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,314 | java | package com.google.android.gms.common.internal;
import android.accounts.Account;
import android.os.Binder;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.C0391p;
public class C0420b extends ap {
int f425a;
public static Account m638a(ao aoVar) {
Account account = null;
if (aoVar != null) {
long clearCallingIdentity = Binder.clearCallingIdentity();
try {
account = aoVar.mo1767a();
} catch (RemoteException e) {
Log.w("AccountAccessor", "Remote account accessor probably died");
} finally {
Binder.restoreCallingIdentity(clearCallingIdentity);
}
}
return account;
}
public Account mo1767a() {
int callingUid = Binder.getCallingUid();
if (callingUid != this.f425a) {
if (C0391p.m449a(null, callingUid)) {
this.f425a = callingUid;
} else {
throw new SecurityException("Caller is not GooglePlayServices");
}
}
return null;
}
public boolean equals(Object obj) {
Account account = null;
return this == obj ? true : !(obj instanceof C0420b) ? false : account.equals(account);
}
}
| [
"lebedev1537@gmail.com"
] | lebedev1537@gmail.com |
e9b2ea3d2dbd6c513137ded3758e5632932e34a1 | d1bdf72edbd227d7db8bf29df9f4092d18f7e6eb | /Code/java_assignment3/src/java_assignment3/ans_6_two_arrays_sum.java | 06d7d6ad243b8ca8998a94b2e9950d79692b4519 | [] | no_license | tanyag330/JavaCB | cc838e16624c3497cbdb06ef280b0f0653206d14 | 6bc19d17a48b365fb004fedff889784a6d5db7bf | refs/heads/master | 2021-01-01T20:09:51.494334 | 2017-07-30T07:52:04 | 2017-07-30T07:52:04 | 98,783,280 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 518 | java | package java_assignment3;
public class ans_6_two_arrays_sum {
public static void ArraySum(int a[],int b[]) {
double sum = 0, sum1 = 0;
for(int i = 0;i < a.length;i++) {
int n = 2;
sum = sum + a[i]*(Math.pow(10,n));
n--;
}
for(int j = 0;j < b.length;j++) {
int p = 2;
sum1 = sum1 + b[j]*(Math.pow(10,p));
p--;
}
int value = (int)(sum + sum1);
System.out.println(value);
}
public static void main(String[] args) {
int a[] = {1,2,4};
int b[] = {4,5,6};
ArraySum(a,b);
}
}
| [
"tanyag330@gmail.com"
] | tanyag330@gmail.com |
01dcb89248cac498c1f64592896b3663bb03246d | 81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13 | /src/bo/app/i.java | 4015fe4260e0f220af07f84030a339798515b06e | [] | no_license | reverseengineeringer/me.lyft.android | 48bb85e8693ce4dab50185424d2ec51debf5c243 | 8c26caeeb54ffbde0711d3ce8b187480d84968ef | refs/heads/master | 2021-01-19T02:32:03.752176 | 2016-07-19T16:30:00 | 2016-07-19T16:30:00 | 63,710,356 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 225 | java | package bo.app;
import java.util.Map;
public abstract interface i
{
public abstract Map<String, String> a();
}
/* Location:
* Qualified Name: bo.app.i
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
bf3c8e9c6bf09ec6021d608e5920f4cdf30cbfc7 | 5a11caaf8e5f792c6d7140067d10f174056827c4 | /src/com/utils/Constants.java | 94816cbd8d17321330906416c9dbcef5dcbbe4ef | [] | no_license | sushilsharma77/TestNGProject | f373bd58e7f3d71b4832197510573c08a8adf5f0 | 8a2c49437ad0e2cd9af683fd389957fbfccf0299 | refs/heads/master | 2022-09-21T08:06:24.145271 | 2020-06-02T21:47:58 | 2020-06-02T21:47:58 | 268,913,962 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package com.utils;
public class Constants {
public static final String CHROME_DRIVER_PATH=System.getProperty("user.dir")+"/drivers/chromedriver.exe";
public static final String GECKO_DRIVER_PATH=System.getProperty("user.dir")+"/drivers/geckodriver.exe";
public static final String CONFIGURATION_FILEPATH=System.getProperty("user.dir")+"/configs/configuration.properties";
public static final int IMPLICIT_WAIT_TIME=15;
public static final int EXPLICIT_WAIT_TIME=30;
} | [
"susarma54@gmail.com"
] | susarma54@gmail.com |
a890122bc78edc21a9f45a242d25a52c869c9143 | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/jaxrs-cxf-client/generated/src/gen/java/org/openapitools/model/OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo.java | 1768cd0233fd8990aa2963878ec63efbff10fa2a | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 4,632 | java | package org.openapitools.model;
import org.openapitools.model.OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreProperties;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo {
@ApiModelProperty(value = "")
private String pid = null;
@ApiModelProperty(value = "")
private String title = null;
@ApiModelProperty(value = "")
private String description = null;
@ApiModelProperty(value = "")
private OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreProperties properties = null;
@ApiModelProperty(value = "")
private String bundleLocation = null;
@ApiModelProperty(value = "")
private String serviceLocation = null;
/**
* Get pid
* @return pid
**/
@JsonProperty("pid")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo pid(String pid) {
this.pid = pid;
return this;
}
/**
* Get title
* @return title
**/
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo title(String title) {
this.title = title;
return this;
}
/**
* Get description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo description(String description) {
this.description = description;
return this;
}
/**
* Get properties
* @return properties
**/
@JsonProperty("properties")
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreProperties getProperties() {
return properties;
}
public void setProperties(OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreProperties properties) {
this.properties = properties;
}
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo properties(OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreProperties properties) {
this.properties = properties;
return this;
}
/**
* Get bundleLocation
* @return bundleLocation
**/
@JsonProperty("bundle_location")
public String getBundleLocation() {
return bundleLocation;
}
public void setBundleLocation(String bundleLocation) {
this.bundleLocation = bundleLocation;
}
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo bundleLocation(String bundleLocation) {
this.bundleLocation = bundleLocation;
return this;
}
/**
* Get serviceLocation
* @return serviceLocation
**/
@JsonProperty("service_location")
public String getServiceLocation() {
return serviceLocation;
}
public void setServiceLocation(String serviceLocation) {
this.serviceLocation = serviceLocation;
}
public OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo serviceLocation(String serviceLocation) {
this.serviceLocation = serviceLocation;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrgApacheJackrabbitOakPluginsBlobDatastoreFileDataStoreInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" bundleLocation: ").append(toIndentedString(bundleLocation)).append("\n");
sb.append(" serviceLocation: ").append(toIndentedString(serviceLocation)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
596f5f6c6bd604b2b73adb1cf53a55844355c372 | 61cf3109eaf4561e071d93f9daf0d3cf9155ca9f | /src/com/rbt/filter/KeyWordFilter.java | f929085fd78040a1f7e254f805542b3d4d909205 | [] | no_license | haoouwen/epf | b620fe05c93db178a122cfef778d31c036a2a822 | abe0f1ed564f33dcf766591c5f9b04ce2b5e8094 | refs/heads/master | 2021-01-19T13:46:10.278247 | 2017-08-20T10:40:12 | 2017-08-20T10:40:12 | 100,859,509 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,039 | java | /*
* Package:com.rbt.filter
* FileName: KeyWordFilter.java
*/
package com.rbt.filter;
import java.io.IOException;
import java.util.HashMap;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import com.rbt.function.FilterWordFuc;
import com.rbt.function.SysconfigFuc;
/**
* @function 功能 敏感字过滤-过滤器
* @author 创建人 HXK
* @date 创建日期 2014-09-21
*/
public class KeyWordFilter implements Filter {
// 过滤敏感字新增和修改请求
private final static String FILTER_PAGE = "admin_Filterword_insert.action|admin_Filterword_update.action|admin_Filterword_list.action|admin_Filterword_view.action|admin_Filterword_add.action";
public void init(FilterConfig filterConfig) throws ServletException {
}
//实施过滤
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
//是否开启敏感字过滤功能 0:是 1:否
String filter_switch = SysconfigFuc.getSysValue("cfg_filterword");
HttpSession session = req.getSession();
if(session.getAttribute("is_joinus")!=null&&session.getAttribute("is_joinus").toString().equals("1")){//注册不替换
filter_switch="1";
}
if(filter_switch.equals("0")){
String reqUrl = req.getRequestURI();
reqUrl = reqUrl.replace("/", "");
HashMap keyMap = (HashMap)FilterWordFuc.getFilterMap();
if (FILTER_PAGE.indexOf(reqUrl)==-1 && req.getMethod().equals("POST")) {
chain.doFilter(new KeyWordRequestWrapper(req, keyMap), response);
} else {
chain.doFilter(request, response);
}
}else{
chain.doFilter(request, response);
}
}
public void destroy() {
}
}
| [
"Administrator@USER-20170608NM"
] | Administrator@USER-20170608NM |
18d0a384ca46cca86b56a81c6192eb5842395b79 | 45a21dd44db2e2a2cbf7675cd9164e0d4f325b10 | /letv-crowdfund-core/src/main/java/com/fbd/core/util/HashCrypt.java | 80bdf165926b524c207e84fa378148b32d0d7816 | [
"Apache-2.0"
] | permissive | hyxiaohaiyang/N0018-Genesis-crowd-funding | f57e00fd37e7a1c5ff7e8a75626a72059a37656f | 78e5801ed9524b472203fbddc286cb0a68b359da | refs/heads/master | 2020-03-28T11:06:27.979994 | 2017-05-15T06:03:08 | 2017-05-15T06:03:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,315 | java | package com.fbd.core.util;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import org.springframework.security.authentication.encoding.PasswordEncoder;
import org.springframework.security.authentication.encoding.ShaPasswordEncoder;
public class HashCrypt {
public static String SHA = "SHA";
public static String MD5 = "MD5";
private final static PasswordEncoder shaPasswordEncoder = new ShaPasswordEncoder();
private final static PasswordEncoder md5PasswordEncoder = new Md5PasswordEncoder();
public static String getDigestHash(String str) {
return getDigestHash(str, "SHA");
}
public static String getDigestHash(String str, String hashType) {
if (str == null)
return null;
return getDigestHash(str, hashType, null);
}
public static String getDigestHash(String str, String hashType, Object salt) {
if (hashType == null) {
hashType = SHA;
}
if (hashType.equals(MD5)) {
return md5PasswordEncoder.encodePassword(str, salt);
}
return shaPasswordEncoder.encodePassword(str, salt);
}
public static void main(String[] args) {
System.out.println(getDigestHash("jhsx128710104"));
}
}
| [
"824659612@qq.com"
] | 824659612@qq.com |
17a928d1f8e0d7cfd18c9a923a1dcb6156fb1276 | 022980735384919a0e9084f57ea2f495b10c0d12 | /src/ext_cttdt_ca/ext-impl/src/com/nss/portlet/onedoor/service/impl/PmlPaintDocumentLocalServiceImpl.java | 4829fe055646cd3af78842db0d065ece86d85d38 | [] | no_license | thaond/nsscttdt | 474d8e359f899d4ea6f48dd46ccd19bbcf34b73a | ae7dacc924efe578ce655ddfc455d10c953abbac | refs/heads/master | 2021-01-10T03:00:24.086974 | 2011-02-19T09:18:34 | 2011-02-19T09:18:34 | 50,081,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 627 | java | package com.nss.portlet.onedoor.service.impl;
import java.util.List;
import com.liferay.portal.SystemException;
import com.nss.portlet.onedoor.model.PmlPaintDocument;
import com.nss.portlet.onedoor.service.base.PmlPaintDocumentLocalServiceBaseImpl;
public class PmlPaintDocumentLocalServiceImpl
extends PmlPaintDocumentLocalServiceBaseImpl {
public void removeByFileId(String fileId) throws SystemException {
pmlPaintDocumentPersistence.removeByFileId(fileId);
}
public List<PmlPaintDocument> findByFileId(String fileId) throws SystemException {
return pmlPaintDocumentPersistence.findByFileId(fileId);
}
}
| [
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] | nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e |
e799d6ad5aba5ca12b17497c98d6823b660f6d44 | e94a5b26a9aee4affa2c8ff3b62a13ca11b228ed | /app/src/main/java/com/haotang/easyshare/mvp/model/ChargeIngFragmentModel.java | 1138f964ff6c83f7ee4cffa0295c613e460ce4e0 | [] | no_license | xxxxxxxxxxj/Pet_New | 63a3563937a09253972e35b8f74326e68a6044de | 569422053dd56f1545d3fdb559d571f50bbb6d5c | refs/heads/master | 2021-06-25T01:26:56.943565 | 2018-10-15T02:15:40 | 2018-10-15T02:15:40 | 129,057,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,107 | java | package com.haotang.easyshare.mvp.model;
import com.haotang.easyshare.mvp.model.http.ChargeingFragmentApiService;
import com.haotang.easyshare.mvp.model.http.MyFragmentApiService;
import com.haotang.easyshare.mvp.model.imodel.IChargeIngFragmentModel;
import com.ljy.devring.DevRing;
import java.util.Map;
import io.reactivex.Observable;
import okhttp3.RequestBody;
/**
* <p>Title:${type_name}</p>
* <p>Description:</p>
* <p>Company:北京昊唐科技有限公司</p>
*
* @author 徐俊
* @date XJ on 2018/7/20 14:56
*/
public class ChargeIngFragmentModel implements IChargeIngFragmentModel {
/**
* 获取进行中的订单
*/
@Override
public Observable ing(Map<String, String> headers) {
return DevRing.httpManager().getService(ChargeingFragmentApiService.class).ing(headers);
}
/**
* 结束充电
*
* @param build
*/
@Override
public Observable stop(Map<String, String> headers,RequestBody build) {
return DevRing.httpManager().getService(ChargeingFragmentApiService.class).stop(headers,build);
}
/**
* 支付账单
*
* @param build
*/
@Override
public Observable pay(Map<String, String> headers,RequestBody build) {
return DevRing.httpManager().getService(ChargeingFragmentApiService.class).pay(headers,build);
}
/**
* 故障报修
*
* @param build
*/
@Override
public Observable save(Map<String, String> headers,RequestBody build) {
return DevRing.httpManager().getService(ChargeingFragmentApiService.class).save(headers,build);
}
/**
* 用户主页信息
*/
@Override
public Observable home(Map<String, String> headers) {
return DevRing.httpManager().getService(MyFragmentApiService.class).home(headers);
}
/**
* 取消订单
*
* @param build
*/
@Override
public Observable cancelOrder(Map<String, String> headers,RequestBody build) {
return DevRing.httpManager().getService(ChargeingFragmentApiService.class).cancelOrder(headers,build);
}
}
| [
"xvjun@haotang365.com.cn"
] | xvjun@haotang365.com.cn |
92220e459ce19d835d4738bf1f2e5c906798c662 | 071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495 | /corpus/class/sling/2710.java | ee50ba5c77826f32dee9cac61e7296844687d835 | [
"MIT"
] | permissive | masud-technope/ACER-Replication-Package-ASE2017 | 41a7603117f01382e7e16f2f6ae899e6ff3ad6bb | cb7318a729eb1403004d451a164c851af2d81f7a | refs/heads/master | 2021-06-21T02:19:43.602864 | 2021-02-13T20:44:09 | 2021-02-13T20:44:09 | 187,748,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,187 | 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.launchpad.installer.impl;
import org.apache.sling.installer.api.event.InstallationEvent;
import org.apache.sling.installer.api.event.InstallationListener;
import org.apache.sling.launchpad.api.StartupHandler;
public class LaunchpadListener implements InstallationListener {
private final StartupHandler startupHandler;
private volatile boolean started = false;
public LaunchpadListener(final StartupHandler startupHandler) {
this.startupHandler = startupHandler;
}
/**
* @see org.apache.sling.installer.api.event.InstallationListener#onEvent(org.apache.sling.installer.api.event.InstallationEvent)
*/
public void onEvent(final InstallationEvent event) {
if (event.getType() == InstallationEvent.TYPE.STARTED) {
this.start();
} else if (event.getType() == InstallationEvent.TYPE.SUSPENDED) {
this.stop();
}
}
/**
* Suspend the startup handler (if not already done so)
*/
public void start() {
if (!started) {
this.startupHandler.waitWithStartup(true);
started = true;
}
}
/**
* Make sure the startup handler is not in suspended state
*/
public void stop() {
if (started) {
this.startupHandler.waitWithStartup(false);
started = false;
}
}
}
| [
"masudcseku@gmail.com"
] | masudcseku@gmail.com |
bb3c89b9bf7be81fd8e29c0536e26ed545f7cc9d | 3c469b0f8944e70cb2ed573fd555651aae0c9ba9 | /bitms-rpc/bitms-rpc-hander/src/main/java/com/blocain/bitms/trade/fund/enums/FundEnums.java | 0c14cac41b2c5f5f92786f770a3fea45952b3a8f | [] | no_license | edby/backend | 05fe622889fa38dedc26b21c6cb39bf10cec9377 | 0b9e1799f68741f36a7797b85afd267d383b9327 | refs/heads/master | 2020-03-14T22:36:43.495367 | 2018-05-02T07:26:08 | 2018-05-02T07:26:08 | 131,824,956 | 3 | 5 | null | 2018-05-02T08:58:57 | 2018-05-02T08:58:57 | null | UTF-8 | Java | false | false | 2,497 | java | package com.blocain.bitms.trade.fund.enums;
import com.blocain.bitms.tools.bean.EnumDescribable;
import com.blocain.bitms.tools.enums.CommonEnums;
/**
* 证券信息枚举 介绍
* <p>File:StockInfoEnums.java </p>
* <p>Title: StockInfoEnums </p>
* <p>Description:StockInfoEnums </p>
* <p>Copyright: Copyright (c) 2017/7/10 </p>
* <p>Company: BloCain</p>
*
* @author Playguy
* @version 1.0
*/
public enum FundEnums implements EnumDescribable
{
ERROR_STOCKINFOID_NOT_EXIST(2010, "Security information ID cannot be empty"), // 证券信息ID不能为空
ERROR_ASSETTYPE_NOT_EXIST(2011, "The account type cannot be empty"), // 账户类型不能为空
ERROR_BUSINESSFLAG_NOT_EXIST(2012, "The business type cannot be empty"), // 业务类别不能为空
ERROR_WITHDRAW_ADDRESS_NOT_EXIST(2013, "Withdrawal address cannot be empty"), // 提现地址不能为空
ERROR_WITHDRAW_ADDRESS_DOESNOTTAKE(2020, "Withdrawal address is invalid"), // 提现地址未生效
ERROR_WITHDRAW_AMOUNT_GREATER_ZEOR(2014, "Withdrawal amount must more than zero"), // 提现金额必须大于0
ERROR_WITHDRAW_FEE_NOT_EXIST(2015, "Fee cannot be empty"), // 提现手续费不能为空
ERROR_WITHDRAW_FAIL(2016, "Withdraw failed"), // 提现失败
ERROR_CHARGE_AMOUNT_GREATER_ZEOR(2017, "Transfer amount must more than zero"), // 转帐金额必须大于0
ERROR_BUSINESSFLAG_ERROR(2018, "Type error"), // 业务类别错误
ERROR_CHARGE_FAIL(2019, "Transfer failed") // 转帐失败
;
public Integer code;
public String message;
private FundEnums(Integer code, String message)
{
this.code = code;
this.message = message;
}
/**
* 根据状态码获取状态码描述
* @param code 状态码
* @return String 状态码描述
*/
public static String getMessage(Integer code)
{
String result = null;
for (CommonEnums c : CommonEnums.values())
{
if (c.code.equals(code))
{
result = c.message;
break;
}
}
return result;
}
@Override
public Integer getCode()
{
return this.code;
}
public void setCode(Integer code)
{
this.code = code;
}
@Override
public String getMessage()
{
return this.message;
}
public void setMessage(String message)
{
this.message = message;
}
}
| [
"3042645110@qq.com"
] | 3042645110@qq.com |
328b6bfdbfbb97ecc747cf9b7569935be058280c | 09ef2687ffeeca6aeef6f515272ddd5d23e4c980 | /src/main/java/zh/learn/java/ch01inroduction/exercises/AverageSpeedInMiles.java | b6931a13f7c691f38e303afbca3dcefc190f0208 | [] | no_license | dzheleznyakov/Learning-Java | c4d9a972ebb43b759aaeefd339567b475260fcef | ce7fa558eb056ea9d6914d3dfd472c95c9fc85c3 | refs/heads/master | 2022-08-15T00:10:25.501464 | 2022-08-04T06:31:02 | 2022-08-04T06:31:02 | 226,674,344 | 0 | 0 | null | 2020-10-13T18:58:38 | 2019-12-08T13:46:07 | Java | UTF-8 | Java | false | false | 346 | java | // chapter 01 exercise 1.10
package zh.learn.java.ch01inroduction.exercises;
public class AverageSpeedInMiles {
public static void main(String[] args) {
System.out.println("A runner runs 15 kilometers in 50 minutes and 30 seconds");
System.out.println("The average speed is " + (15.0 * 60.0 / 50.5 / 1.6) + " mph");
}
}
| [
"zheleznyakov.dmitry@gmail.com"
] | zheleznyakov.dmitry@gmail.com |
546f7d60ef19bb549ddfa5a0647581c86c15a03d | f57001a92718a164fcc853d4a59dcfa4c17cae39 | /src/by/belhard/j26/lessons/lesson07/Person.java | 9bda96e9ab5d7ccda6a6a4112a4d2979c22fdf90 | [] | no_license | Rozenberg-jv/BH-J26 | a23e146dca25b1dd2eba90d5a48a0dc9d416b900 | 30c085e4dc1eb555ba9bf51797c263e1fb012cb2 | refs/heads/master | 2023-02-05T23:35:18.328773 | 2020-12-30T18:01:59 | 2020-12-30T18:01:59 | 313,393,909 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,173 | java | package by.belhard.j26.lessons.lesson07;
import java.util.Objects;
public abstract class Person implements Workable {
private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
/*public void doWork() {
System.out.println(this.name + " do nothing");
}*/
/*public abstract void doWork();*/
public void growOld() {
this.age++;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Person person = (Person) o;
return age == person.age && Objects.equals(name, person.name);
}
@Override
public int hashCode() {
return Objects.hash(name, age);
}
@Override
public String toString() {
return "Person{" +
"name='" + name + '\'' +
", age=" + age +
'}';
}
}
| [
"avangard.npaper@gmail.com"
] | avangard.npaper@gmail.com |
9e3d2c77491fa802a2257dd1b7a83fd5601d3e48 | 3baea3da39204e80291121539c9f9dc487c553fa | /app/src/main/java/net/oschina/app/improve/bean/Active.java | 0c7d1fbaa23c0c28658e87415709cc0360d1c32e | [
"MIT"
] | permissive | zhao331863874/oschina-android | 60cbb9f6742e3b2bb9881ecc1b8ac657355f0844 | 4a604c9f750350c8f8dcaa5723836595d2ba31db | refs/heads/master | 2020-07-19T13:38:18.515935 | 2019-09-05T03:51:41 | 2019-09-05T03:51:41 | 206,458,258 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,090 | java | package net.oschina.app.improve.bean;
import net.oschina.app.improve.bean.simple.Author;
import net.oschina.app.improve.bean.simple.Origin;
import java.io.Serializable;
/**
* Created by thanatos on 16/8/16.
*/
public class Active implements Serializable {
private long id;
private String content;
private String pubDate;
private Author author;
private Origin origin;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getPubDate() {
return pubDate;
}
public void setPubDate(String pubDate) {
this.pubDate = pubDate;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
public Origin getOrigin() {
return origin;
}
public void setOrigin(Origin origin) {
this.origin = origin;
}
}
| [
"331863874@qq.com"
] | 331863874@qq.com |
08bef83019da4eeee1e63cb87b624bba7816a793 | 8862f7c427e4aeb0b2648bfc04f239df6e1c0f9c | /src/main/java/org/thinkium/blockchain/web3j/codegen/unit/gen/CompilerClassLoader.java | 6781b615b5861e4c3ec397063712de521e4d3bd1 | [] | no_license | ThinkiumGroup/web3j | 7f35b98c9d472087ec052397fb0d135efb7d23d8 | ca411412acb9f0ed112c51abeb43f4a6e6e84d04 | refs/heads/master | 2023-05-30T10:20:35.635076 | 2021-06-25T11:24:51 | 2021-06-25T11:24:51 | 335,264,176 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,435 | java | /*
* Copyright 2019 Web3 Labs Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.thinkium.blockchain.web3j.codegen.unit.gen;
import javax.tools.JavaCompiler;
import javax.tools.JavaCompiler.CompilationTask;
import javax.tools.JavaFileObject;
import javax.tools.ToolProvider;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
/** Class loader with compilation capabilities. */
class CompilerClassLoader extends ClassLoader {
private final File outputDir;
private final URL[] urls;
/**
* Creates a class loader from the given source URLs.
*
* @param outputDir Directory where classes will be compiled.
* @param urls Classpath URLs to compile the Java sources.
*/
CompilerClassLoader(final File outputDir, final URL... urls) {
super(CompilerClassLoader.class.getClassLoader());
this.outputDir = outputDir;
this.urls = urls;
}
@Override
protected Class<?> findClass(final String name) throws ClassNotFoundException {
return compileClass(name)
.flatMap(this::readBytes)
.map(bytes -> defineClass(name, bytes, 0, bytes.length))
.orElseThrow(() -> new ClassNotFoundException(name));
}
private Optional<File> compileClass(final String name) {
final String path = name.replace(".", File.separator);
final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
File sourceFile = null;
for (final URL url : urls) {
File file;
try {
file = new File(URLDecoder.decode(url.getPath(), "UTF-8"), path + ".java");
} catch (Exception e) {
file = new File(url.getFile(), path + ".java");
}
if (file.exists()) {
sourceFile = file;
break;
}
}
if (sourceFile == null) {
// Try to find the Java file in newly generated files
sourceFile = new File(outputDir, path + ".java");
}
if (!sourceFile.exists()) {
return Optional.empty();
}
final Iterable<? extends JavaFileObject> javaFileObjects =
compiler.getStandardFileManager(null, null, null).getJavaFileObjects(sourceFile);
final List<String> options =
Arrays.asList(
"-d", outputDir.getAbsolutePath(),
"-cp", buildClassPath());
final CompilationTask task =
compiler.getTask(null, null, System.err::println, options, null, javaFileObjects);
final File classFile = new File(outputDir, path + ".class");
return task.call() ? Optional.of(classFile) : Optional.empty();
}
private String buildClassPath() {
return buildClassPath(urls)
+ getClassPathSeparator()
+ System.getProperty("java.class.path");
}
private String getClassPathSeparator() {
if (isWindows()) {
return ";";
} else {
return ":";
}
}
private boolean isWindows() {
return System.getProperty("os.name").toLowerCase().startsWith("windows");
}
private String buildClassPath(final URL... urls) {
return Arrays.stream(urls)
.map(URL::toExternalForm)
.map(url -> url.replaceAll("file:", ""))
.collect(Collectors.joining(getClassPathSeparator()));
}
private Optional<byte[]> readBytes(final File file) {
try {
return Optional.of(Files.readAllBytes(Paths.get(file.toURI())));
} catch (IOException e) {
return Optional.empty();
}
}
}
| [
"harry@potter.com"
] | harry@potter.com |
c04a25a87c782bc89c2d3c011750fe9b7c1e3636 | a17dd1e9f5db1c06e960099c13a5b70474d90683 | /core/src/main/java/jp/co/sint/webshop/data/dao/StockHolidayDao.java | 2c3035fe5feb5df948129b59a3ad13168daa54c8 | [] | no_license | giagiigi/ec_ps | 4e404afc0fc149c9614d0abf63ec2ed31d10bebb | 6eb19f4d14b6f3a08bfc2c68c33392015f344cdd | refs/heads/master | 2020-12-14T07:20:24.784195 | 2015-02-09T10:00:44 | 2015-02-09T10:00:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,254 | java | //
//Copyright(C) 2007-2008 System Integrator Corp.
//All rights reserved.
//
// このファイルはEDMファイルから自動生成されます。
// 直接編集しないで下さい。
//
package jp.co.sint.webshop.data.dao;
import java.util.Date;
import java.util.List;
import jp.co.sint.webshop.data.GenericDao;
import jp.co.sint.webshop.data.Query;
import jp.co.sint.webshop.data.dto.StockHoliday;
import jp.co.sint.webshop.service.LoginInfo;
public interface StockHolidayDao extends GenericDao<StockHoliday, Long> {
/**
* 找到对应行号
*/
StockHoliday loadByRowid(Long id);
/**
* 查询全部休息日数
*/
List<StockHoliday> loadAll();
/**
* id查询休息日数
*/
StockHoliday load(Long wid);
/**
* 增加休息日
* @param obj
* @param loginInfo
* @return
*/
Long insert(StockHoliday obj);
/**
* 修改休息日
* @param obj
* @param loginInfo
*/
void update(StockHoliday obj, LoginInfo loginInfo);
/**
* 删除休息日
* @param obj
* @param loginInfo
*/
void delete(Date shday);
/**
* 定义查询语句
*/
List<StockHoliday> findByQuery(Query query);
List<StockHoliday> findByQuery(String sqlString, Object... params);
}
| [
"fengperfect@126.com"
] | fengperfect@126.com |
7e8b284b5d2fbad3eda28a91d912364f4e958932 | f655b8dbc0bbae3b132c524edaa8a623e9177c5a | /drools-core/src/main/java/org/drools/core/xml/changeset/DecisionTableConfigurationHandler.java | e03c9bcd5ad7d29b95bf8b96aa48bbdfd445414f | [
"Apache-2.0"
] | permissive | ThomasLau/drools | ef602ebbc9934b281b567ee3b304be6ad7ea658a | ac4ef5dece1d9c57aa3d92c98ea76bc26c8a0239 | refs/heads/master | 2021-01-16T20:36:37.897954 | 2015-09-18T03:28:58 | 2015-09-18T03:28:58 | 42,590,860 | 1 | 0 | null | 2015-09-16T14:04:10 | 2015-09-16T14:04:10 | null | UTF-8 | Java | false | false | 3,153 | java | /*
* Copyright 2010 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.drools.core.xml.changeset;
import java.util.HashSet;
import org.drools.core.builder.conf.impl.DecisionTableConfigurationImpl;
import org.drools.core.util.StringUtils;
import org.drools.core.io.internal.InternalResource;
import org.drools.core.xml.BaseAbstractHandler;
import org.drools.core.xml.ExtensibleXmlParser;
import org.drools.core.xml.Handler;
import org.kie.internal.builder.DecisionTableConfiguration;
import org.kie.internal.builder.DecisionTableInputType;
import org.kie.api.io.Resource;
import org.kie.api.io.ResourceConfiguration;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
public class DecisionTableConfigurationHandler extends BaseAbstractHandler
implements
Handler {
public DecisionTableConfigurationHandler() {
if ( (this.validParents == null) && (this.validPeers == null) ) {
this.validParents = new HashSet( 1 );
this.validParents.add( Resource.class );
this.validPeers = new HashSet( 1 );
this.validPeers.add( null );
this.allowNesting = false;
}
}
public Object start(String uri,
String localName,
Attributes attrs,
ExtensibleXmlParser parser) throws SAXException {
parser.startElementBuilder( localName,
attrs );
String type = attrs.getValue( "input-type" );
String worksheetName = attrs.getValue( "worksheet-name" );
emptyAttributeCheck( localName,
"input-type",
type,
parser );
DecisionTableConfiguration dtConf = new DecisionTableConfigurationImpl();
dtConf.setInputType( DecisionTableInputType.valueOf( type ) );
if ( !StringUtils.isEmpty( worksheetName ) ) {
dtConf.setWorksheetName( worksheetName );
}
return dtConf;
}
public Object end(String uri,
String localName,
ExtensibleXmlParser parser) throws SAXException {
final Element element = parser.endElementBuilder();
final InternalResource resource = (InternalResource) parser.getParent();
ResourceConfiguration dtConf = (ResourceConfiguration) parser.getCurrent();
resource.setConfiguration( dtConf );
return dtConf;
}
public Class< ? > generateNodeFor() {
return ResourceConfiguration.class;
}
}
| [
"gds.geoffrey.de.smet@gmail.com"
] | gds.geoffrey.de.smet@gmail.com |
96927b489b58756cb03366cc2e9457cd094c793e | fb41c04a4ead3b79625d0eb30ca85f0fd1c2d4c9 | /main/boofcv-geo/src/main/java/boofcv/alg/distort/spherical/EquirectangularDistortBase_F64.java | 1e3296a4d70708c906ac4ebc5c4676bbfe23bdf6 | [
"Apache-2.0",
"LicenseRef-scancode-takuya-ooura"
] | permissive | thhart/BoofCV | 899dcf1b4302bb9464520c36a9e54c6fe35969c7 | 43f25488673dc27590544330323c676f61c1a17a | refs/heads/SNAPSHOT | 2023-08-18T10:19:50.269999 | 2023-07-15T23:13:25 | 2023-07-15T23:13:25 | 90,468,259 | 0 | 0 | Apache-2.0 | 2018-10-26T08:47:44 | 2017-05-06T14:24:01 | Java | UTF-8 | Java | false | false | 4,228 | java | /*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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 boofcv.alg.distort.spherical;
import boofcv.struct.distort.PixelTransform;
import georegression.geometry.ConvertRotation3D_F64;
import georegression.geometry.GeometryMath_F64;
import georegression.struct.EulerType;
import georegression.struct.point.Point2D_F64;
import georegression.struct.point.Point3D_F64;
import georegression.struct.point.Vector3D_F64;
import org.ejml.data.DMatrixRMaj;
import org.ejml.dense.row.CommonOps_DDRM;
/**
* Base class for all distortions from an equirectangular image. The output image precomputes pointing vectors from
* a canonical view. The source pixel is then computed by rotating each vector and computing the longitude and
* latitude.
*
* @author Peter Abeles
*/
public abstract class EquirectangularDistortBase_F64 implements PixelTransform<Point2D_F64> {
// function for doing match on equirectangular images
EquirectangularTools_F64 tools = new EquirectangularTools_F64();
int outWidth;
// rotation matrix
DMatrixRMaj R = CommonOps_DDRM.identity(3, 3);
// storage for intermediate variables
Vector3D_F64 n = new Vector3D_F64();
// storage for precomputed pointing vectors for each pixel in pinhole camera
Point3D_F64[] vectors = new Point3D_F64[0];
/**
* Specify the shame of the equirectangular image
*
* @param width equirectangular image width
* @param height equirectangular image height
*/
public void setEquirectangularShape( int width, int height ) {
tools.configure(width, height);
}
/**
* Set for concurrent code. Doesn't copy expensive model variables
*/
public void setConcurrent( EquirectangularDistortBase_F64 original ) {
this.outWidth = original.outWidth;
this.R.setTo(original.R);
this.n.setTo(original.n);
this.tools = original.tools;
this.vectors = original.vectors;
}
/**
* Specifies the rotation offset from the canonical location using yaw and pitch.
*
* @param yaw Radian from -pi to pi
* @param pitch Radian from -pi/2 to pi/2
* @param roll Radian from -pi to pi
*/
public void setDirection( double yaw, double pitch, double roll ) {
ConvertRotation3D_F64.eulerToMatrix(EulerType.YZX, pitch, yaw, roll, R);
}
/**
* Specifies direction using a rotation matrix
*
* @param R rotation matrix
*/
public void setDirection( DMatrixRMaj R ) {
this.R.setTo(R);
}
/**
* Declares storage for precomputed pointing vectors to output image
*
* @param width output image width
* @param height output image height
*/
protected void declareVectors( int width, int height ) {
this.outWidth = width;
if (vectors.length < width*height) {
Point3D_F64[] tmp = new Point3D_F64[width*height];
System.arraycopy(vectors, 0, tmp, 0, vectors.length);
for (int i = vectors.length; i < tmp.length; i++) {
tmp[i] = new Point3D_F64();
}
vectors = tmp;
}
}
/**
* Input is in pinhole camera pixel coordinates. Output is in equirectangular coordinates
*
* @param x Pixel x-coordinate in rendered pinhole camera
* @param y Pixel y-coordinate in rendered pinhole camera
*/
@Override
public void compute( int x, int y, Point2D_F64 out ) {
// grab precomputed normalized image coordinate at canonical location
Point3D_F64 v = vectors[y*outWidth + x];
// move to requested orientation
GeometryMath_F64.mult(R, v, n); // TODO make faster by not using an array based matrix
// compute pixel coordinate
tools.normToEquiFV(n.x, n.y, n.z, out);
}
public EquirectangularTools_F64 getTools() {
return tools;
}
public DMatrixRMaj getRotation() {
return R;
}
}
| [
"peter.abeles@gmail.com"
] | peter.abeles@gmail.com |
33aed5daaa5c6288ab21e1b0019920b0cb3a1810 | 800716457d784a802b0db302f68fdfebd37b8e08 | /src/ca/bevFacey/course/Course.java | 26b7414720f763ae4433226ba0ecafe3eac81e9b | [] | no_license | HelpMeJewishDeityInSky/Iforgetversioncontrolandnoweverythingisbroken | e524b2fc0b56a30f53cc88bcad4d0229e9960523 | 776acb40d7812d8fdd000e5fb7f9d53efe0f46c1 | refs/heads/master | 2023-02-16T03:52:59.068523 | 2021-01-08T18:32:08 | 2021-01-08T18:32:08 | 327,982,374 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,208 | java | package ca.bevFacey.course;
import java.util.ArrayList;
import ca.bevFacey.person.Student;
import ca.bevFacey.person.Teacher;
public class Course {
private Teacher teacher;
private ArrayList<Student> students = new ArrayList<Student>();
private int numStudents;
private String name;
private int room;
public Course(Teacher teacher, ArrayList<Student> students, String name, int room){
this.teacher = teacher;
this.students = students;
this.name = name;
this.room = room;
this.numStudents = students.size();
}
public Teacher getTeacher() {
return teacher;
}
public ArrayList<Student> getStudents() {
return students;
}
public void addStudent(Student student){
students.add(student);
}
public int classSize() {
return numStudents;
}
public String getName() {
return name;
}
public int getRoom() {
return room;
}
public String toString(){
return name + " is taught by " + teacher.getFirstName() + ' ' + teacher.getLastName() + " in room " + room + '\n'
+ "class size: " + numStudents;
}
public boolean equals(Course course){
return (course.getName().equals(name) && course.getTeacher().equals(teacher) && course.getRoom() == room);
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
adbd8429f07a365b0778a315e578785797ec747c | 2bc00c3d724a8ddbfc1ca7f57265cd459dc67467 | /eclipse-plugin/SuperCRM/src/superCRM/table/TableLabelProvider.java | 5b76cfaf2af348a1a0e2d6cac41ef8f85a03d719 | [] | no_license | renho-r/ongit | 1aed813a2d056b940f8de56e7fbdc739f0277de1 | 5b3d2dc16b3381ebe251868ce08872372a6f12a2 | refs/heads/master | 2021-10-07T17:05:07.269405 | 2020-04-07T13:15:57 | 2020-04-07T13:15:57 | 31,402,894 | 5 | 0 | null | 2020-12-09T08:18:51 | 2015-02-27T04:06:44 | HTML | GB18030 | Java | false | false | 2,137 | java | package superCRM.table;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;
import superCRM.model.ICustomerSerivce;
import superCRM.model.SuperFactory;
import superCRM.pojos.ContactEO;
import superCRM.pojos.CustomerEO;
public class TableLabelProvider implements ITableLabelProvider {
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
/** 设置表格显示的数据 */
public String getColumnText(Object element, int columnIndex) {
/** 如果输入的是客户对象,返回相应的数据值 */
if (element instanceof CustomerEO) {
CustomerEO c = (CustomerEO) element;
if (columnIndex == 0)
return c.getId() + "";
else if (columnIndex == 1)
return c.getDisplayName();
else if (columnIndex == 2)
return c.getWebSite();
else if (columnIndex == 3)
return c.getCategory();
else if (columnIndex == 4)
return c.getNumberEmployee();
/** 如果输入的是联系人对象,返回相应的数据值 */
} else if (element instanceof ContactEO) {
ContactEO c = (ContactEO) element;
if (columnIndex == 0)
return c.getId() + "";
else if (columnIndex == 1)
return c.getDisplayName();
else if (columnIndex == 2) {
/** 如果是客户的id,要查询该客户的名称,并将名称显示 */
ICustomerSerivce customerSerivce = SuperFactory.getSuperApplication().getCustomerSerivce();
CustomerEO customer = customerSerivce.getCustomer(c.getCustomerId());
if (customer != null)
return customer.getDisplayName();
return "";
} else if (columnIndex == 3)
return c.getCategory();
else if (columnIndex == 4)
return c.getSex();
else if (columnIndex == 5)
return c.getBirthDate();
else if (columnIndex == 6)
return c.getJobTitle();
}
return null;
}
public void addListener(ILabelProviderListener listener) {
}
public void dispose() {
}
public boolean isLabelProperty(Object element, String property) {
return false;
}
public void removeListener(ILabelProviderListener listener) {
}
}
| [
"rho_i_xx@163.com"
] | rho_i_xx@163.com |
18eb548ff535bcb7a3bf0efcee36ce7f29730539 | d5d3ff3359c234c010ae84ff40755394b209724e | /Clients/RCP/Core/plugins/gov.pnnl.cat.ui.rcp/src/gov/pnnl/cat/ui/rcp/security/SelectUsersGroupsDialog.java | f3b683c6b445462eb41003c75bbc936c93c88c43 | [] | no_license | purohitsumit/velo | 59f58f60f926d22af270e14c6362b26d9a3b3d59 | bd5ee6b395b2f48e1d8db613d92f567c55f9e736 | refs/heads/master | 2020-05-03T05:36:07.610106 | 2018-10-31T22:14:43 | 2018-10-31T22:14:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,505 | java | /**
*
*/
package gov.pnnl.cat.ui.rcp.security;
import gov.pnnl.cat.core.resources.security.IProfilable;
import java.util.List;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
/**
* Dialog to select users or groups
* @author D3K339
*
*/
public class SelectUsersGroupsDialog extends Dialog {
private UserGroupSelector groupsSelector;
private UserGroupSelector usersSelector;
private List<IProfilable> selectedUsers;
private List<IProfilable> selectedTeams;
protected SelectUsersGroupsDialog(Shell parentShell) {
super(parentShell);
}
/**
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
GridLayout gridLayout = (GridLayout) container.getLayout();
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
gridLayout.numColumns = 1;
gridLayout.makeColumnsEqualWidth = true;
TabFolder tabFolder = new TabFolder(container, SWT.NONE);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
tabFolder.setLayoutData(gridData);
tabFolder.setLayout(new GridLayout(1, true));
TabItem tbtmGroups = new TabItem(tabFolder, SWT.NONE);
tbtmGroups.setText("Teams");
groupsSelector = new UserGroupSelector(tabFolder, SWT.NONE, false);
groupsSelector.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
tbtmGroups.setControl(groupsSelector);
TabItem tbtmUsers = new TabItem(tabFolder, SWT.NONE);
tbtmUsers.setText("Users");
usersSelector = new UserGroupSelector(tabFolder, SWT.NONE, true);
usersSelector.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
tbtmUsers.setControl(usersSelector);
return container;
}
// overriding this methods allows you to set the
// title of the custom dialog
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Selection Users or Groups");
}
@Override
public boolean close() {
selectedUsers = usersSelector.getSelectedMembers();
selectedTeams = groupsSelector.getSelectedMembers();
return super.close();
}
public List<IProfilable> getSelectedTeams() {
return selectedTeams;
}
public List<IProfilable> getSelectedUsers() {
return selectedUsers;
}
/**
* Create contents of the button bar.
* @param parent
*/
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
/**
* Return the initial size of the dialog.
*/
@Override
protected Point getInitialSize() {
return new Point(500, 550);
}
@Override
protected boolean isResizable() {
return true;
}
}
| [
"timothy.stavenger@pnnl.gov"
] | timothy.stavenger@pnnl.gov |
92354696f32c675d84b927288e857774ec05124b | c4ca391ff5dc34b3552e5cbe31c55f6d16cfab21 | /external/demo/src/main/java/com/sf/demo/system/SystemShowActivity.java | d8cab2b91eb971cb10514d5225368d9bee3291cd | [] | no_license | JacksonNing/SofarMusic | 3ab31b32a198b0bf40bee5652c63d8275a1f4b78 | 1f1e74fb4145d92b81883214203811182833d631 | refs/heads/master | 2020-05-16T22:11:40.842638 | 2018-12-20T12:52:26 | 2018-12-20T12:52:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,035 | java | package com.sf.demo.system;
import android.Manifest;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import com.sf.base.UIRootActivity;
import com.sf.base.permission.PermissionUtil;
import com.sf.demo.Constant;
import com.sf.demo.R;
import com.sf.demo.system.contact.PhoneUtil;
import com.sf.demo.system.notification.NotifyContentActivity;
import com.sf.demo.system.smscode.SmsReceiver;
import com.sf.demo.window.alert.AlertUtil;
import com.sf.utility.ToastUtil;
import com.sf.widget.flowlayout.FlowTagList;
/**
* Created by sufan on 17/7/27.
*/
public class SystemShowActivity extends UIRootActivity {
private FlowTagList tag_fl;
private String[] mTags = {"获取通讯录电话号码", "截取短信验证码", "获取通知栏信息"};
private Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
super.handleMessage(msg);
switch (msg.what) {
case Constant.SMS_RECEIVED:
AlertUtil.showCommonErrorDialog(baseAt, "验证码:" + msg.obj);
break;
}
}
};
@Override
protected int getLayoutId() {
return R.layout.activity_demo_show;
}
@Override
protected void initTitle() {
head_title.setText("系统相关");
}
@Override
public void initView() {
tag_fl = (FlowTagList) findViewById(R.id.tag_fl);
dynamicAddView(tag_fl, "tagColor", R.color.themeColor);
}
@Override
public void initData() {
tag_fl.setTags(mTags);
showSMSCode();
}
@Override
public void initEvent() {
tag_fl.setOnTagClickListener(new FlowTagList.OnTagClickListener() {
@Override
public void OnTagClick(String text, int position) {
for (int i = 0; i < mTags.length; i++) {
if (i == position) {
tag_fl.setChecked(true, position);
} else {
tag_fl.setChecked(false, i);
}
}
tag_fl.notifyAllTag();
doTag(text, position);
}
});
}
private void doTag(String text, int position) {
if (mTags[0].equals(text)) {
PhoneUtil.getPhoneNumber(this, new PhoneUtil.PhoneCallback() {
@Override
public void onPhone(String phone) {
AlertUtil.showCommonErrorDialog(baseAt, phone);
}
});
} else if (mTags[1].equals(text)) {
}else if(mTags[2].equals(text)){
Intent intent=new Intent(this,NotifyContentActivity.class);
startActivity(intent);
}
}
private void showSMSCode() {
String des = "请求获取读取短信权限";
PermissionUtil.requestPermission(this, Manifest.permission.READ_SMS, des, "")
.subscribe(permission -> {
if (permission.granted) {
SmsReceiver.setHandler(mHandler);
} else {
ToastUtil.startShort(baseAt, "权限拒绝,无法截取验证码");
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();
SmsReceiver.removeHandler();
}
}
| [
"sofarsogood001@163.com"
] | sofarsogood001@163.com |
2880f2581bb1552808c68f05e8e3c8467911a736 | 51b4ac8cbe45ab43e7422bfd95fa58f87bda4d0e | /src/main/java/org/bhoopendra/learning/thread/callable/Result.java | be87d6e88ac41b45d6f540022e56bdf65ba72601 | [] | no_license | bhokumar/hacker-rank | a66dde656903aff4d5badeb56053b88875c99c58 | 0fa481d848bd3ec72588498cfd6d6183274c2710 | refs/heads/master | 2021-01-21T17:29:28.601779 | 2019-09-20T17:20:32 | 2019-09-20T17:20:32 | 91,955,918 | 0 | 0 | null | 2020-10-12T20:37:44 | 2017-05-21T12:38:43 | Java | UTF-8 | Java | false | false | 396 | java | package org.bhoopendra.learning.thread.callable;
public class Result {
private int code;
private String message;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"bhoopendra.akgec@gmail.com"
] | bhoopendra.akgec@gmail.com |
75ec5109162af8a91e7d02f86fe8338838c6d3f7 | 8b8ebc25758eaf21921f3620b95e5375ca89ab2c | /src/main/java/com/duggan/workflow/shared/model/DocumentLine.java | 2670fa1c35023a24b6acd6218245f7b76d1b046e | [] | no_license | duggankimani/WIRA | 5ac6c0660d8bc50737e77e2566b383712abcda26 | a9f332f0ee28a6860e14bf43491a248418f62ae8 | refs/heads/master | 2021-01-23T09:02:00.622134 | 2018-09-14T04:49:52 | 2018-09-14T04:49:52 | 11,315,924 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,985 | java | package com.duggan.workflow.shared.model;
import java.util.HashMap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import com.duggan.workflow.shared.model.form.Field;
import com.duggan.workflow.shared.model.form.KeyValuePair;
import com.duggan.workflow.shared.model.form.Property;
/**
*
* @author duggan
* Represents document lines/details (e.g invoice details)
*/
@XmlSeeAlso({KeyValuePair.class,Property.class,Field.class})
@XmlRootElement(name="docline")
@XmlAccessorType(XmlAccessType.FIELD)
public class DocumentLine extends IsDoc{
/**
*
*/
private static final long serialVersionUID = 1L;
private String docRefId;
@XmlTransient
private Long id;
@XmlTransient
private Long documentId;
private String name;
public DocumentLine(){
}
public DocumentLine(String name,Long id, Long documentId,Value ...valueEn){
this.name = name;
this.id = id;
this.documentId = documentId;
if(valueEn!=null){
for(Value v: valueEn){
if(v==null){
continue;
}
if(values.get(v.getKey())!=null){
v.setId(values.get(v.getKey()).getId());
}
values.put(v.getKey(), v);
}
}
}
public Long getDocumentId() {
return documentId;
}
public void setDocumentId(Long documentId) {
this.documentId = documentId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Override
public String toString() {
String s="{name:"+getName()+", lineId:"+getId()+", docId: "+getDocumentId()
+ ", [";
for(Value v: values.values()){
if(v!=null){
s=s.concat("{id:"+v.getId()+",key:"+v.getKey()+",value:"+v.getValue()+"},\n");
}
}
return s.concat("]}\n");
}
@Override
public boolean equals(Object obj) {
if(obj==null){
return false;
}
DocumentLine other = (DocumentLine)obj;
if(getRefId()!=null && other.getRefId()!=null){
return getRefId().equals(other.getRefId());
}
return super.equals(obj);
}
public DocumentLine clone(boolean fullClone){
DocumentLine line = new DocumentLine();
line.setDocumentId(documentId);
line.setName(name);
HashMap<String,Value> vals = new HashMap<String, Value>();
for(String key:values.keySet()){
Value val = values.get(key);
if(val!=null)
vals.put(key, val.clone(fullClone));
}
line.setValues(vals);
return line;
}
//frontend Id
private transient Long tempId=null;
public void setTempId(Long detailId) {
this.tempId = detailId;
}
public Long getTempId(){
return tempId;
}
public String getDocRefId() {
return docRefId;
}
public void setDocRefId(String docRefId) {
this.docRefId = docRefId;
}
public boolean isEmpty() {
return values.isEmpty();
}
}
| [
"mdkimani@gmail.com"
] | mdkimani@gmail.com |
f6597cf2bfa292ef6a8ac05008deaf9cd3f1061e | aeff8f32e7f63e8192e8cdc04a068d91c16b0a14 | /com/dataliance/kugou/loader/clickhouse/mapper/decode/DefaultRowRecordDecoder.java | b8269cfd748d66932885bec964f44179e0174eeb | [] | no_license | bondy123/CloudETL | b49805fba87fb3d4dac6ea19334a79216a5ef7cc | 4f28ffb683ddecea5aed3e7d38ede66e7df9162a | refs/heads/master | 2020-03-15T20:58:27.132685 | 2018-02-10T08:34:13 | 2018-02-10T08:34:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 405 | java | package com.dataliance.kugou.loader.clickhouse.mapper.decode;
import org.apache.hadoop.conf.Configuration;
/**
* Created by jaykelin on 2017/4/5.
*/
public class DefaultRowRecordDecoder<K, V> extends RowRecordDecoderConfigurable<K, V> {
public DefaultRowRecordDecoder(Configuration configuration, RecordDecoderConfigurable recordDecoder) {
super(configuration, recordDecoder);
}
}
| [
"theseusyang@gmail.com"
] | theseusyang@gmail.com |
1564efded17e61a19ce0179819476c8cce8496fd | 2a317cd5006075eeb8e9b282de69734aa6e2daf8 | /com.bodaboda_source_code/sources/com/google/android/gms/internal/zzkx.java | 30d0ad068b3901433035fdb58510d0af9b4474ad | [] | no_license | Akuku25/bodaapp | ee1ed22b0ad05c11aa8c8d4595f5b50da338fbe0 | c4f54b5325d035b54d0288a402558aa1592a165f | refs/heads/master | 2020-04-28T03:52:04.729338 | 2019-03-11T08:24:30 | 2019-03-11T08:24:30 | 174,954,616 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,622 | java | package com.google.android.gms.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
public class zzkx implements Creator<zzkw> {
static void zza(zzkw zzkw, Parcel parcel, int i) {
int zzK = zzb.zzK(parcel);
zzb.zzc(parcel, 1, zzkw.zzFG);
zzb.zza(parcel, 2, zzkw.zzQH, false);
zzb.zzc(parcel, 3, zzkw.zzQI);
zzb.zzH(parcel, zzK);
}
public /* synthetic */ Object createFromParcel(Parcel x0) {
return zzL(x0);
}
public /* synthetic */ Object[] newArray(int x0) {
return zzaR(x0);
}
public zzkw zzL(Parcel parcel) {
int i = 0;
int zzJ = zza.zzJ(parcel);
String str = null;
int i2 = 0;
while (parcel.dataPosition() < zzJ) {
int zzI = zza.zzI(parcel);
switch (zza.zzaP(zzI)) {
case 1:
i2 = zza.zzg(parcel, zzI);
break;
case 2:
str = zza.zzo(parcel, zzI);
break;
case 3:
i = zza.zzg(parcel, zzI);
break;
default:
zza.zzb(parcel, zzI);
break;
}
}
if (parcel.dataPosition() == zzJ) {
return new zzkw(i2, str, i);
}
throw new zza.zza("Overread allowed size end=" + zzJ, parcel);
}
public zzkw[] zzaR(int i) {
return new zzkw[i];
}
}
| [
"wanyama19@gmail.com"
] | wanyama19@gmail.com |
907d2bf66234d5e2eb18a4dccdb824f8c83f538d | b7eab1bc2c0ffd9d6689df9d803db375326baf56 | /tests/src/com/mediatek/camera/tests/v3/operator/PictureSizeOperator.java | 85e74966cc5526803f8a0b412784e935279183ba | [
"Apache-2.0"
] | permissive | cc-china/MTK_AS_Camera2 | 8e687aa319db7009faee103496a79bd60ffdadec | 9b3b73174047f0ea8d2f7860813c0a72f37a2d7a | refs/heads/master | 2022-03-09T08:21:11.948397 | 2019-11-14T09:37:30 | 2019-11-14T09:37:30 | 221,654,668 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,390 | java | package com.mediatek.camera.tests.v3.operator;
import com.mediatek.camera.common.debug.LogUtil;
import com.mediatek.camera.tests.v3.arch.TestContext;
import com.mediatek.camera.tests.v3.util.LogHelper;
import com.mediatek.camera.tests.v3.util.Utils;
public class PictureSizeOperator extends SettingRadioOptionsOneByOneOperator {
private static final LogUtil.Tag TAG = Utils.getTestTag(PictureSizeOperator.class
.getSimpleName());
public PictureSizeOperator() {
super("Picture size", false);
}
@Override
protected void doOperate(int index) {
super.doOperate(index);
String summary = mOptionSummaryArray[index];
if (summary != null && !summary.equals("")) {
String width = summary.substring(0, summary.indexOf("x"));
String height = summary.substring(summary.indexOf("x") + 1, summary.length());
TestContext.mLatestPictureSizeSettingWidth = Integer.valueOf(width);
TestContext.mLatestPictureSizeSettingHeight = Integer.valueOf(height);
LogHelper.d(TAG, "[doOperate] set TestContext.mLatestPictureSizeSettingWidth = " +
TestContext.mLatestPictureSizeSettingWidth);
LogHelper.d(TAG, "[doOperate] set TestContext.mLatestPictureSizeSettingHeight = " +
TestContext.mLatestPictureSizeSettingHeight);
}
}
}
| [
"com_caoyun@163.com"
] | com_caoyun@163.com |
6393c16426ab394ba8775fa479ed567ba7632729 | 713b87625a095dfb9b695ed2353c851557d8879f | /tuscany-cppt/commonbase/modules/commonbase-api/src/main/java/net/newcapec/sca/menubinding/MenuBinding.java | 955d2a3add6ee3464c9d5ae7c1b9d7c6449e98f0 | [] | no_license | 3203317/old | 5f5b94126d460bf71d396cc9ce4ae0c7feb31edd | 9befcaf8bfe772be31ae0705291fb72f26cdb431 | refs/heads/master | 2016-09-05T20:23:35.327153 | 2014-12-22T13:22:41 | 2014-12-22T13:22:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,120 | java | package net.newcapec.sca.menubinding;
import net.newcapec.sca.result.ResultMsg;
public class MenuBinding {
private String code;
private String menu_code;
private String type;
private String form_code;
private String limit;
private String memo;
private ResultMsg resultMsg;
public ResultMsg getResultMsg() {
return resultMsg;
}
public void setResultMsg(ResultMsg resultMsg) {
this.resultMsg = resultMsg;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMenu_code() {
return menu_code;
}
public void setMenu_code(String menu_code) {
this.menu_code = menu_code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getForm_code() {
return form_code;
}
public void setForm_code(String form_code) {
this.form_code = form_code;
}
public String getLimit() {
return limit;
}
public void setLimit(String limit) {
this.limit = limit;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
}
| [
"3203317@qq.com"
] | 3203317@qq.com |
191a5aeb6df30ea368a6a539e27170adb050f069 | 35b710e9bc210a152cc6cda331e71e9116ba478c | /tc-unused/src/main/java/com/topcoder/web/truveo/dao/hibernate/SubmissionReviewDAOHibernate.java | c38915d04d6d357486bbda24ba26423d9e881adf | [] | no_license | appirio-tech/tc1-tcnode | d17649afb38998868f9a6d51920c4fe34c3e7174 | e05a425be705aca8f530caac1da907d9a6c4215a | refs/heads/master | 2023-08-04T19:58:39.617425 | 2016-05-15T00:22:36 | 2016-05-15T00:22:36 | 56,892,466 | 1 | 8 | null | 2022-04-05T00:47:40 | 2016-04-23T00:27:46 | Java | UTF-8 | Java | false | false | 632 | java | package com.topcoder.web.truveo.dao.hibernate;
import com.topcoder.web.common.dao.hibernate.Base;
import com.topcoder.web.truveo.dao.SubmissionReviewDAO;
import com.topcoder.web.truveo.model.SubmissionReview;
/**
* @author dok
* @version $Revision: 70395 $ Date: 2005/01/01 00:00:00
* Create Date: Jul 17, 2006
*/
public class SubmissionReviewDAOHibernate extends Base implements SubmissionReviewDAO {
public SubmissionReview find(Long id) {
return (SubmissionReview) super.find(SubmissionReview.class, id);
}
public void saveOrUpdate(SubmissionReview s) {
super.saveOrUpdate(s);
}
}
| [
"dongzhengbin@winterflames-MacBook-Pro.local"
] | dongzhengbin@winterflames-MacBook-Pro.local |
a9e8f8264d1ba7aa2fb8ac9fd804d2429d7ef0b6 | 148100c6a5ac58980e43aeb0ef41b00d76dfb5b3 | /sources/com/facebook/ads/internal/p081a/C3765k.java | e2ecd56bd7538157bc591180019b2423cf80d2c0 | [] | no_license | niravrathod/car_details | f979de0b857f93efe079cd8d7567f2134755802d | 398897c050436f13b7160050f375ec1f4e05cdf8 | refs/heads/master | 2020-04-13T16:36:29.854057 | 2018-12-27T19:03:46 | 2018-12-27T19:03:46 | 163,325,703 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,262 | java | package com.facebook.ads.internal.p081a;
import android.content.Context;
import android.net.Uri;
import android.util.Log;
import com.facebook.ads.internal.p091j.C1812a.C1810a;
import com.facebook.ads.internal.p094m.C1827c;
import com.facebook.ads.internal.p101q.p104c.C1952g;
/* renamed from: com.facebook.ads.internal.a.k */
public class C3765k extends C1712b {
/* renamed from: d */
private static final String f15096d = "k";
/* renamed from: e */
private final Uri f15097e;
public C3765k(Context context, C1827c c1827c, String str, Uri uri) {
super(context, c1827c, str);
this.f15097e = uri;
}
/* renamed from: a */
public C1810a mo1329a() {
return C1810a.OPEN_LINK;
}
/* renamed from: b */
public void mo1328b() {
try {
Log.w("REDIRECTACTION: ", this.f15097e.toString());
C1952g.m7374a(new C1952g(), this.a, this.f15097e, this.c);
} catch (Throwable e) {
String str = f15096d;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Failed to open link url: ");
stringBuilder.append(this.f15097e.toString());
Log.d(str, stringBuilder.toString(), e);
}
}
}
| [
"niravrathod473@gmail.com"
] | niravrathod473@gmail.com |
468bcd22531bf6f31362a098081262a36e55cb87 | f33516ffd4ac82b741f936ae2f7ef974b5f7e2f9 | /changedPlugins/org.emftext.language.java.resource.java/src-gen/org/emftext/language/java/resource/java/IJavaQuickFix.java | 87e3a80b7c95b0447f91ba93d9878e06366047c0 | [] | no_license | ichupakhin/sdq | e8328d5fdc30482c2f356da6abdb154e948eba77 | 32cc990e32b761aa37420f9a6d0eede330af50e2 | refs/heads/master | 2023-01-06T13:33:20.184959 | 2020-11-01T13:29:04 | 2020-11-01T13:29:04 | 246,244,334 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,327 | java | /*******************************************************************************
* Copyright (c) 2006-2015
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Dresden, Amtsgericht Dresden, HRB 34001
*
* 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:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Dresden, Germany
* - initial API and implementation
******************************************************************************/
package org.emftext.language.java.resource.java;
import java.util.Collection;
import org.eclipse.emf.ecore.EObject;
public interface IJavaQuickFix {
/**
* <p>
* Returns a string that briefly describes the quick fix.
* </p>
*
* @return brief description to display
*/
public String getDisplayString();
/**
* <p>
* Returns an image key that references an image for the quick fix. This key will
* be passed to the ImageProvider class of the resource UI plug-in to obtain the
* image.
* </p>
*
* @return key of the image to display
*/
public String getImageKey();
/**
* Applies the fix and returns the new text for the resource. If the fix does not
* change the current resource, but others, null must be returned.
*/
public String apply(String currentText);
/**
* Returns a collection of objects the fix refers to. This collection is used to
* check whether the fix is can still be applied even after a workbench restart.
*/
public Collection<EObject> getContextObjects();
/**
* Returns a string representation of the context in which this quick fix can be
* used. Typically this is a list of the URIs of the EObjects the fix applies to
* concatenated with the type of the quick fix. This context string is used to
* find quick fixes when the quick fix wizard is invoked from the problems view.
* The context string must stay the same when resources are (re)loaded from disc.
* This is required to find quick fixes that have been created before (i.e., the
* last time the resource was loaded).
*/
public String getContextAsString();
}
| [
"bla@mail.com"
] | bla@mail.com |
885ffc6537f277d52b4c1c9efbc4082550636105 | c6d93152ab18b0e282960b8ff224a52c88efb747 | /安慧软件资料/gitRepository/ITMS-3.0/Code/cy.its.violation/cy.its.violation.domain/src/cy/its/violation/domain/model/violation/ViolationInputDigital.java | ff674bbe662f3783183ed7465aae00163515af7e | [] | no_license | BAT6188/company-database | adfe5d8b87b66cd51efd0355e131de164b69d3f9 | 40d0342345cadc51ca2555840e32339ca0c83f51 | refs/heads/master | 2023-05-23T22:18:22.702550 | 2018-12-25T00:58:15 | 2018-12-25T00:58:15 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,721 | java | package cy.its.violation.domain.model.violation;
import java.text.SimpleDateFormat;
import java.util.Date;
import cy.its.violation.domain.criteria.ConstantCode;
/**
* 采集数据录入 适应于:数码取证;视频监控取证;视频录像取证;
*
* @author STJ
*
*/
public class ViolationInputDigital extends ViolationInput {
/**
* 设备/区间编号
*/
private String deviceSysNbr;
/**
* 抓拍编号
*/
public String snapNbr;
/**
* 采集机构
*/
private String orgCode;
/**
* 采集人员
*/
public String collectionPolice;
/**
* 采集类型
*/
private String collectionType;
/**
* 行政区划
*/
private String districtCode;
/**
* 违法地点编码
*/
private String vioSiteCode;
/**
* 违法地点描述
*/
private String addressDesc;
/**
* 道路
*/
private String roadCode;
/**
* 路口路段
*/
private String roadSectionCode;
/**
* 米数
*/
public Short mileage;
/**
* 号牌号码
*/
private String plateNbr;
/**
* 号牌类型(002)
*/
private String plateType;
/**
* 号牌颜色
*/
private String plateColor;
/**
* 违法时间
*/
private Date violationTime;
/**
* 违法类型
*/
private String violationType;
/**
* 违法代码
*/
private String violationCode;
/**
* 违法描述
*/
private String violationDesc;
/**
* 车速
*/
public Integer speed;
/**
* 大车限速值
*/
public Long limitLarge;
/**
* 小车限速值
*/
public Long limitSmall;
/**
* 超速比
*/
public Integer overSpeedPercent;
/**
* 录入人
*/
public String entryBy;
/**
* 图片存储路径
*/
public String image;
/**
* 视频存储路径
*/
public String video;
static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSSS");
public ViolationInputDigital(String deviceNbr, String snapNbr, String orgCode, String collectionPolice,
String collectionType, String districtCode, String vioSiteCode, String addressDesc, String roadCode,
String roadSectionCode, Short mileage, String plateNbr, String plateType, String plateColor,
Date violationTime, String violationType, String violationCode, String violationDesc, Integer speed,
Long limitLarge, Long limitSmall, Integer limitLower, Integer overSpeedPercent, String entryBy,
Date entryTime, String uploadFlag, String uploadBy, String imageAddress) {
this.deviceSysNbr = deviceNbr;
this.snapNbr = snapNbr;
this.orgCode = orgCode;
this.collectionPolice = collectionPolice;
this.collectionType = collectionType;
this.districtCode = districtCode;
this.vioSiteCode = vioSiteCode;
this.addressDesc = addressDesc;
this.roadCode = roadCode;
this.roadSectionCode = roadSectionCode;
this.mileage = mileage;
this.plateNbr = plateNbr;
this.plateType = plateType;
this.plateColor = plateColor;
this.violationTime = violationTime;
this.violationType = violationType;
this.violationCode = violationCode;
this.violationDesc = violationDesc;
this.speed = speed;
this.limitLarge = limitLarge;
this.limitSmall = limitSmall;
this.overSpeedPercent = overSpeedPercent;
this.entryBy = entryBy;
this.image = imageAddress;
}
@Override
void ExcuteInput(Violation violation) throws Exception {
violation.setExportFlag("0");// 默认为未导出
violation.setLocalPunishFlag("1");// 默认为未处罚
violation.setLockFlag("0");
violation.uploadFlag = "0";
violation.setDeviceNbr(this.deviceSysNbr);
violation.setOrgCode(this.orgCode);
violation.setCollectionType(this.collectionType);
violation.setDistrictCode(this.districtCode);
violation.setVioSiteCode(this.vioSiteCode);
violation.setAddressDesc(this.addressDesc);
violation.setRoadCode(this.roadCode);
violation.setRoadSectionCode(this.roadSectionCode);
violation.setPlateNbr(this.plateNbr);
violation.setPlateType(this.plateType);
violation.setPlateColor(this.plateColor);
violation.setViolationTime(this.violationTime);
violation.setViolationType(this.violationType);
violation.setViolationCode(this.violationCode);
violation.setViolationDesc(this.violationDesc);
violation.snapNbr = this.snapNbr;
violation.collectionPolice = this.collectionPolice;
violation.mileage = this.mileage;
violation.speed = this.speed;
violation.limitLarge = this.limitLarge;
violation.limitSmall = this.limitSmall;
violation.overSpeedPercent = this.overSpeedPercent;
violation.entryBy = this.entryBy;
violation.entryTime = new Date();
violation.image = this.image;
violation.video = this.video;
violation.setStatusFlag(ConstantCode.StatusFlag.CONFIRMED);
}
@Override
protected boolean IsEmpty() {
return false;
}
}
| [
"729235023@qq.com"
] | 729235023@qq.com |
4d0d3892daf2f02f1481337c5d522a2b8d1f3858 | cca4b96aa473fc9a230b9052f94e36b2d767d37d | /SpringCore_Demos/Demos/10013_SpringsAutoWiring_ZByConstructor/src/com/accenture/lkm/UITester.java | 8fe6a0b0d2c1cababadd59155cb5ec3c554d1449 | [] | no_license | Gizmosoft/Spring-Framework-Java | 801b4fe4ad2f92d6dcccc770dc51d25551ffe426 | 10bb91cf0c25d2e20c4e191c04f5f055b446326f | refs/heads/master | 2023-04-20T09:32:46.462487 | 2021-05-08T13:09:32 | 2021-05-08T13:09:32 | 364,481,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 619 | java | package com.accenture.lkm;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class UITester {
public static void main(String[] args) {
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("com/accenture/lkm/resources/my_springbean.xml");
Employee employee = (Employee) applicationContext.getBean("empObject");
employee.display();
}
}
// autowisre by constructor is acutally autowire by type
// autowire="constructor
// but instead of injecting the object via setter it will inject the constructor
| [
"Kartikey.hebbar@gmail.com"
] | Kartikey.hebbar@gmail.com |
1ae2532c795b8203524a165361ab3b85fd4fa52d | e3780c806fdb6798abf4ad5c3a7cb49e3d05f67a | /src/main/java/com/hankcs/hanlp/model/perceptron/package-info.java | 5b170429e1ba7b6a04d815a3bd159c163676261a | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | AnyListen/HanLP | 7e3cf2774f0980d24ecab0568ad59774232a56d6 | 58e5f6cda0b894cad156b06ac75bd397c9e26de3 | refs/heads/master | 2021-01-22T04:23:14.514117 | 2018-12-11T01:27:36 | 2018-12-11T01:27:36 | 125,140,795 | 1 | 1 | Apache-2.0 | 2018-04-16T16:49:47 | 2018-03-14T02:04:04 | Java | UTF-8 | Java | false | false | 807 | java | /*
* <author>Hankcs</author>
* <email>me@hankcs.com</email>
* <create-date>2018-02-28 下午9:44</create-date>
*
* <copyright file="package-info.java" company="码农场">
* Copyright (c) 2018, 码农场. All Right Reserved, http://www.hankcs.com/
* This source is subject to Hankcs. Please contact Hankcs to get more information.
* </copyright>
*/
/**
* 感知机在线学习算法的线性序列标注模型。基于这套框架实现了一整套分词、词性标注和命名实体识别功能。
* 理论参考邓知龙 《基于感知器算法的高效中文分词与词性标注系统设计与实现》,
* 简介:http://www.hankcs.com/nlp/segment/implementation-of-word-segmentation-device-java-based-on-structured-average-perceptron.html
*/
package com.hankcs.hanlp.model.perceptron; | [
"jfservice@126.com"
] | jfservice@126.com |
62bd54641740338f0c6408f8901205ae0e9df121 | 3192b7a984ed59da652221d11bc2bdfaa1aede00 | /code/src/main/java/com/cmcu/mcc/five/service/FiveOaInstitutionCountSignService.java | 9c7f056e8f60b0400f7e0c04841b8700601639dd | [] | no_license | shanghaif/-wz- | e6f5eca1511f6d68c0cd6eb3c0f118e340d9ff50 | c7d6e8a000fbc4b6d8fed44cd5ffe483be45440c | refs/heads/main | 2023-06-08T22:35:30.125549 | 2021-04-30T07:03:21 | 2021-04-30T07:03:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,279 | java | package com.cmcu.mcc.five.service;
import com.cmcu.act.dto.CustomSimpleProcessInstance;
import com.cmcu.act.service.ProcessQueryService;
import com.cmcu.act.service.TaskHandleService;
import com.cmcu.common.service.CommonCodeService;
import com.cmcu.common.util.BeanValidator;
import com.cmcu.common.util.ModelUtil;
import com.cmcu.mcc.act.service.MyActService;
import com.cmcu.mcc.comm.EdConst;
import com.cmcu.mcc.comm.MccConst;
import com.cmcu.mcc.five.dao.FiveOaInstitutionCountSignMapper;
import com.cmcu.mcc.five.dto.FiveOaInstitutionCountSignDto;
import com.cmcu.mcc.five.entity.FiveOaInstitutionCountSign;
import com.cmcu.mcc.hr.dao.HrEmployeeMapper;
import com.cmcu.mcc.hr.dto.HrEmployeeDto;
import com.cmcu.mcc.hr.service.HrEmployeeSysService;
import com.cmcu.mcc.hr.service.SelectEmployeeService;
import com.cmcu.mcc.service.impl.HandleFormService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
public class FiveOaInstitutionCountSignService {
@Resource
FiveOaInstitutionCountSignMapper fiveOaInstitutionCountSignMapper;
@Resource
HrEmployeeMapper hrEmployeeMapper;
@Resource
CommonCodeService commonCodeService;
@Autowired
MyActService myActService;
@Autowired
ProcessQueryService processQueryService;
@Autowired
HrEmployeeSysService hrEmployeeSysService;
@Autowired
SelectEmployeeService selectEmployeeService;
@Autowired
TaskHandleService taskHandleService;
@Resource
HandleFormService handleFormService;
public void remove(int id,String userLogin){
FiveOaInstitutionCountSign item = fiveOaInstitutionCountSignMapper.selectByPrimaryKey(id);
Assert.state(item.getCreator().equals(userLogin),"该数据是用户"+item.getCreatorName()+"创建");
//流程作废
handleFormService.removeProcessInstance(item.getBusinessKey(),userLogin);
}
public void update(FiveOaInstitutionCountSignDto item){
FiveOaInstitutionCountSign model = fiveOaInstitutionCountSignMapper.selectByPrimaryKey(item.getId());
model.setDeptId(item.getDeptId());
model.setDeptName(item.getDeptName());
model.setFormNo(item.getFormNo());
model.setInstitutionType(item.getInstitutionType());
model.setInstitutionName(item.getInstitutionName());
model.setLawExamine(item.getLawExamine());
model.setProcessExamine(item.getProcessExamine());
model.setManagerProductExamine(item.getManagerProductExamine());
model.setDeptChargeMan(item.getDeptChargeMan());
model.setDeptChargeManName(item.getDeptChargeManName());
model.setAgent(item.getAgent());
model.setAgentName(item.getAgentName());
model.setSubmitTime(item.getSubmitTime());
model.setRemark(item.getRemark());
model.setGmtModified(item.getGmtModified());
BeanValidator.validateObject(model);
ModelUtil.setNotNullFields(model);
Map variables = Maps.newHashMap();
if (item.getDeptId()!=model.getId()){
variables.put("deptChargeMen",selectEmployeeService.getDeptChargeMen(model.getDeptId()));
model.setDeptName(item.getDeptName());
model.setDeptId(item.getDeptId());
}
fiveOaInstitutionCountSignMapper.updateByPrimaryKey(model);
variables.put("flag",1);//流程审查 法律审查标志 :1 启用 0 不启用
variables.put("text",1);//制度文本审查标志
variables.put("processDescription",item.getInstitutionName());
BeanValidator.check(model);
myActService.setVariables(model.getProcessInstanceId(),variables);
}
public FiveOaInstitutionCountSignDto getModelById(int id){
return getDto(fiveOaInstitutionCountSignMapper.selectByPrimaryKey(id));
}
public FiveOaInstitutionCountSignDto getDto(FiveOaInstitutionCountSign item) {
FiveOaInstitutionCountSignDto dto=FiveOaInstitutionCountSignDto.adapt(item);
dto.setProcessName("已完成");
if (!dto.getProcessEnd()) {
CustomSimpleProcessInstance customProcessInstance = processQueryService.getCustomSimpleProcessInstance(dto.getProcessInstanceId(), dto.getBusinessKey(), "");
if(customProcessInstance ==null || customProcessInstance.isFinished()){
dto.setProcessEnd(true);
fiveOaInstitutionCountSignMapper.updateByPrimaryKey(dto);
}
if(customProcessInstance!=null && StringUtils.isNotEmpty(customProcessInstance.getCurrentTaskName())){
dto.setProcessName(customProcessInstance.getCurrentTaskName());
}
}
dto.setBusinessKey(EdConst.FIVE_OA_DEPATRMENTPOST+ "_" + item.getId());
return dto;
}
public int getNewModel(String userLogin){
FiveOaInstitutionCountSign item=new FiveOaInstitutionCountSign();
HrEmployeeDto hrEmployeeDto = hrEmployeeMapper.selectByUserLoginOrNo(userLogin);
item.setDeptId(hrEmployeeDto.getDeptId());
item.setDeptName(hrEmployeeDto.getDeptName());
item.setCreator(hrEmployeeDto.getUserLogin());
item.setCreatorName(hrEmployeeDto.getUserName());
item.setDeleted(false);
item.setProcessEnd(false);
item.setCreator(userLogin);
item.setGmtModified(new Date());
item.setGmtCreate(new Date());
ModelUtil.setNotNullFields(item);
fiveOaInstitutionCountSignMapper.insert(item);
String businessKey= EdConst.FIVE_OA_INSTITUTIONCOUNTSIGN+ "_" + item.getId();
Map variables = Maps.newHashMap();
variables.put("userLogin", userLogin);
variables.put("deptChargeMen",selectEmployeeService.getDeptChargeMen(item.getDeptId()));
String processInstanceId = taskHandleService.startProcess(EdConst.FIVE_OA_INSTITUTIONCOUNTSIGN,businessKey, variables, MccConst.APP_CODE);
item.setProcessInstanceId(processInstanceId);
item.setBusinessKey(businessKey);
fiveOaInstitutionCountSignMapper.updateByPrimaryKey(item);
return item.getId();
}
public PageInfo<Object> listPagedData(Map<String,Object> params, String userLogin, String uiSref,int pageNum, int pageSize) {
params.put("deleted",false);
List<Integer> deptIdList=hrEmployeeSysService.getMyDeptListOa(userLogin,uiSref);
if (deptIdList.size()==0){
params.put("creator",userLogin);
}else {
params.put("deptIdList",deptIdList);
}
PageInfo<Object> pageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> fiveOaInstitutionCountSignMapper.selectAll(params));
List<Object> list = Lists.newArrayList();
pageInfo.getList().forEach(p -> {
FiveOaInstitutionCountSign item=(FiveOaInstitutionCountSign)p;
list.add(getDto(item));
});
pageInfo.setList(list);
return pageInfo;
}
}
| [
"1129913541@qq.com"
] | 1129913541@qq.com |
fc0bba199919251f25ce19b311a9bb9f88b51937 | 3c5b716b9a5b6e10d8f81caca27f7a95c3567ccf | /src/main/java/com/blog/service/core/entity/User.java | 0c99ce62ba17167b86baf644ec4438643cd7a85e | [] | no_license | hechaojie/hechaojie | c94aaa6c7e006535a59002f546a2c27ba15b983a | 34842829657bbd756fcb8b45742686094da05c22 | refs/heads/master | 2020-08-03T05:41:11.545963 | 2016-11-12T12:53:10 | 2016-11-12T12:53:10 | 73,552,353 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,439 | java | package com.blog.service.core.entity;
import java.io.Serializable;
/**
* 用户表
*/
public class User implements Serializable {
private static final long serialVersionUID = 1L;
private String id;
private String email;
private String username;
private String nickname;
private int sex;
private String password;
private Long createAt;
private Long updateAt;
public User() {
super();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Long getCreateAt() {
return createAt;
}
public void setCreateAt(Long createAt) {
this.createAt = createAt;
}
public Long getUpdateAt() {
return updateAt;
}
public void setUpdateAt(Long updateAt) {
this.updateAt = updateAt;
}
}
| [
"275070023@qq.com"
] | 275070023@qq.com |
c4b1bbc888c74567a67ec27a89673b50ad25176f | 7d0bf22140ccfb70b0524f88c2ba2207974b1b53 | /sort-algorithm/src/main/java/pers/husen/demo/BubbleSort.java | 09b95ea0e815b44748f2d5303243db0a5063a6ac | [] | no_license | wjbtt/java-demo-collection | 4eaa00b426b9965908b9b0e275602403e1d92280 | 729a91c64320fa9c7c9edb9955614aeb6fbe49bf | refs/heads/master | 2020-04-30T21:23:21.578035 | 2019-02-28T16:15:53 | 2019-02-28T16:15:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 834 | java | package pers.husen.demo;
import java.util.Arrays;
/**
* 冒泡排序
*
* @author 何明胜
* @version 1.0
* @since 2019年2月27日 下午7:48:00
*/
public class BubbleSort {
public static void main(String[] args) {
int[] array = new int[]{5, 4, 6, 9, 0, 7, 6, 8, 4, 3, 2, 7, 8};
bubbleSort(array);
System.out.println(Arrays.toString(array));
}
public static void bubbleSort(int[] array) {
int length = array.length;
// 排序次数
for (int i = 0; i < length - 1; i++) {
// 每次从0开始与右边一个数比较,如果比右边一个大,则交换(实现冒泡)
for (int j = 0; j < length - 1 - i; j++) {
if (array[j] <= array[j + 1]) {
continue;
}
int temp = array[j];
array[j] = array[j + 1];
array[j + 1] = temp;
}
}
}
}
| [
"husen@hemingsheng.cn"
] | husen@hemingsheng.cn |
a20415c26888991e599eadaa0aa9bc99468824bf | 760431162a8eb98a8bf4c7ba657a7278a389bc4c | /address/src/main/java/com/ericshenn/address/addresslist/AddressListActivity.java | c9b8845c2c99291c4e1ec480340f29c32619ac5c | [] | no_license | EricQianTW/Android-Component_development | 17aba6c9f6aa53f9c286f54f930dc6dc568123cc | 22957418c6e263706341cecb63aea3e4a98ea5ba | refs/heads/master | 2020-03-30T19:22:27.886413 | 2018-10-04T08:18:26 | 2018-10-04T08:18:26 | 151,539,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 892 | java | package com.ericshenn.address.addresslist;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.ericshenn.address.R;
import com.ericshenn.baselibrary.base.ActivityUtils;
import com.ericshenn.baselibrary.base.BaseActivity;
import com.ericshenn.baselibrary.helper.ToolbarHelper;
public class AddressListActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.x_clown_act_move);
try {
ToolbarHelper.addMiddleTitle(this, this.getTitle(), (Toolbar) findViewById(R.id.toolbar), R.color.gray_37);
ActivityUtils.addFragmentToActivity(getSupportFragmentManager(),
new AddressListFragment(), R.id.contentFrame);
} catch (Exception e) {
e.printStackTrace();
}
}
} | [
"pnt_twqian@163.com"
] | pnt_twqian@163.com |
d456163f9d50b50b68939dd44169a13296c185ba | 1cf1c4e00c4b7b2972d8c0b32b02a17e363d31b9 | /sources/com/google/android/gms/internal/ads/C1447ky.java | 9fc87d20cc21aa645dfea094b0adab1d4dd181f3 | [] | no_license | rootmelo92118/analysis | 4a66353c77397ea4c0800527afac85e06165fd48 | a9cd8bb268f54c03630de8c6bdff86b0e068f216 | refs/heads/main | 2023-03-16T10:59:50.933761 | 2021-03-05T05:36:43 | 2021-03-05T05:36:43 | 344,705,815 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 647 | java | package com.google.android.gms.internal.ads;
import android.os.Parcel;
/* renamed from: com.google.android.gms.internal.ads.ky */
public abstract class C1447ky extends azd implements C1446kx {
public C1447ky() {
super("com.google.android.gms.ads.internal.mediation.client.IMediationResponseMetadata");
}
/* access modifiers changed from: protected */
public final boolean dispatchTransaction(int i, Parcel parcel, Parcel parcel2, int i2) {
if (i != 1) {
return false;
}
int a = mo12672a();
parcel2.writeNoException();
parcel2.writeInt(a);
return true;
}
}
| [
"rootmelo92118@gmail.com"
] | rootmelo92118@gmail.com |
033ed55d6c3d0def98a7e4db13637d23f7b7822f | 188550fe299422895c748235e56d53b463ab5485 | /FUENTES/Utilidades/src/com/davivienda/utilidades/ws/cliente/solicitudNotaCreditoCtaAhorrosServiceATM/ParametrosSeguridadDTO.java | 97b9964a5f8db792a9449e286a3c89ed82578b4c | [] | no_license | NicolasMeloR/multifuncionales | e664edf0e63f13c9afc35418f6b5c868ee108641 | 9c01800e945916a6dd21c6c094179f2a5a169d03 | refs/heads/master | 2021-03-13T06:49:10.937067 | 2020-03-27T17:15:30 | 2020-03-27T17:15:30 | 246,649,979 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,010 | java |
package com.davivienda.utilidades.ws.cliente.solicitudNotaCreditoCtaAhorrosServiceATM;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for parametrosSeguridadDTO complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="parametrosSeguridadDTO">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="debeRevalidarToken" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="debeValidarSegundaClave" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="idSesionToken" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="usaToken" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "parametrosSeguridadDTO", propOrder = {
"debeRevalidarToken",
"debeValidarSegundaClave",
"idSesionToken",
"usaToken"
})
public class ParametrosSeguridadDTO {
protected boolean debeRevalidarToken;
protected boolean debeValidarSegundaClave;
protected String idSesionToken;
protected boolean usaToken;
/**
* Gets the value of the debeRevalidarToken property.
*
*/
public boolean isDebeRevalidarToken() {
return debeRevalidarToken;
}
/**
* Sets the value of the debeRevalidarToken property.
*
*/
public void setDebeRevalidarToken(boolean value) {
this.debeRevalidarToken = value;
}
/**
* Gets the value of the debeValidarSegundaClave property.
*
*/
public boolean isDebeValidarSegundaClave() {
return debeValidarSegundaClave;
}
/**
* Sets the value of the debeValidarSegundaClave property.
*
*/
public void setDebeValidarSegundaClave(boolean value) {
this.debeValidarSegundaClave = value;
}
/**
* Gets the value of the idSesionToken property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIdSesionToken() {
return idSesionToken;
}
/**
* Sets the value of the idSesionToken property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIdSesionToken(String value) {
this.idSesionToken = value;
}
/**
* Gets the value of the usaToken property.
*
*/
public boolean isUsaToken() {
return usaToken;
}
/**
* Sets the value of the usaToken property.
*
*/
public void setUsaToken(boolean value) {
this.usaToken = value;
}
}
| [
"nmelo@asesoftware.com"
] | nmelo@asesoftware.com |
1120048c8cbddadc3469d65699c92e8b0c30ec55 | 63ad493a11a1eb4be806f525fb604167bb1283f9 | /bootpay/src/main/java/practice/bootpay/model/request/Item.java | d3b22c4bf9470561e996e98724b1948d7933f6b9 | [] | no_license | BeomjunLee/bootpay | 0c51d1712309711b174279d0dd916a59ee8f3e19 | d6e61aa8e77ba21e35defc40d3cb08d5c350d104 | refs/heads/main | 2023-03-18T19:59:26.477938 | 2021-03-17T11:02:20 | 2021-03-17T11:02:20 | 347,728,974 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 281 | java | package practice.bootpay.model.request;
/**
* Created by ehowlsla on 2019. 8. 23..
*/
public class Item {
public String item_name;
public int qty;
public String unique;
public long price;
public String cat1;
public String cat2;
public String cat3;
}
| [
"qjawnswkd0717@gmail.com"
] | qjawnswkd0717@gmail.com |
7a615ceeb10ce99e61ee11a0737a26689892650f | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project27/src/main/java/org/gradle/test/performance27_2/Production27_198.java | 218a85da8727a76c5f30f66b3d527a5a1a845856 | [] | 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.performance27_2;
public class Production27_198 extends org.gradle.test.performance12_2.Production12_198 {
private final String property;
public Production27_198() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
7fd9e6c6c5d5665209264eed6ffabaa54d5ec1c7 | 31447899832d43eed4fe01b2d8c367bdc81b848c | /src/main/java/org/esupportail/publisher/domain/enums/PermissionClassDeserializer.java | d75d09858cd674779aac75cf88f127e0d1957cb4 | [
"Apache-2.0"
] | permissive | tolobial/esup-publisher | ec623ec6d924026294bbd29ef5586f1baf7b1078 | 0d23dca47a38dd2b4f6f02df5817d8011636fc15 | refs/heads/master | 2021-01-11T03:38:46.716454 | 2016-08-30T16:19:36 | 2016-08-30T16:19:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,007 | java | package org.esupportail.publisher.domain.enums;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonMappingException;
import java.io.IOException;
/**
* Created by jgribonvald on 01/04/15.
*/
public class PermissionClassDeserializer extends JsonDeserializer<PermissionClass> {
@Override
public PermissionClass deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
PermissionClass type = PermissionClass.fromName(jp.getValueAsString());
if (type != null) {
return type;
}
throw new JsonMappingException(String.format("Invalid value '%s' for %s, must be in range of %s", jp.getValueAsString(),
PermissionClass.class.getSimpleName(), PermissionClass.values().toString()));
}
}
| [
"julien.gribonvald@gmail.com"
] | julien.gribonvald@gmail.com |
fb887d8e462bfce9602c6b8a4fc95eb13d4d4df6 | f1f5734f383d227a8cebd553fe5d6e2b3b470633 | /net/divinerpg/blocks/overworld/BlockStationaryTar.java | 1df07295646b8e97a3b96b2ce5b3e244c466a519 | [
"MIT"
] | permissive | mazetar/Divine-Rpg | eec230de679b8187e9ecbef54d439e3287f219e1 | ed865743547265e8d085e9c370229be8a3d8789a | refs/heads/master | 2016-09-05T20:35:28.769169 | 2013-10-04T19:12:13 | 2013-10-04T19:12:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,998 | java | package net.divinerpg.blocks.overworld;
import java.util.ArrayList;
import java.util.Random;
import net.divinerpg.blocks.core.BlockDivineFluid;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class BlockStationaryTar extends BlockDivineFluid
{
public BlockStationaryTar(int par1, int par2, Material par3)
{
super(par1, par2, par3);
this.setTickRandomly(false);
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World var1, int var2, int var3, int var4, Random var5)
{
if (this.blockMaterial == Material.lava)
{
int var6 = var5.nextInt(3);
for (int var7 = 0; var7 < var6; ++var7)
{
var2 += var5.nextInt(3) - 1;
++var3;
var4 += var5.nextInt(3) - 1;
int var8 = var1.getBlockId(var2, var3, var4);
if (var8 == 0)
{
if (this.func_301_k(var1, var2 - 1, var3, var4) || this.func_301_k(var1, var2 + 1, var3, var4) || this.func_301_k(var1, var2, var3, var4 - 1) || this.func_301_k(var1, var2, var3, var4 + 1) || this.func_301_k(var1, var2, var3 - 1, var4) || this.func_301_k(var1, var2, var3 + 1, var4))
{
var1.setBlock(var2, var3, var4, Block.fire.blockID);
return;
}
}
else if (Block.blocksList[var8].blockMaterial.isSolid())
{
return;
}
}
}
}
private boolean func_301_k(World var1, int var2, int var3, int var4)
{
return var1.getBlockMaterial(var2, var3, var4).getCanBurn();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public void addCreativeItems(ArrayList var1)
{
var1.add(new ItemStack(this, 1));
}
}
| [
"admin@mazetar.com"
] | admin@mazetar.com |
4c836db3fe571c325e6e655cad4afefb435cf3f7 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/ipcinvoker/f/c.java | a32c06bbb2d83d0ebd7cc9cf7e26049e4f58b526 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 288 | java | package com.tencent.mm.ipcinvoker.f;
public abstract interface c
{
public abstract void recycle();
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.ipcinvoker.f.c
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
32f2ba7f9414356c76e690c9c4de6d648988f1ee | f6539477076aad7a37a18915531f6cae701d0484 | /java/tags/gateway-1.3/src/main/java/org/nhindirect/gateway/smtp/provider/DefaultSmtpAgentProvider.java | 0d58d691cb9d940ed686bc53add296deccc2dc1b | [] | no_license | ssavarala/nhin-d | bf3a4f4773479875972fb52f4b3aae434d7665f8 | 4208b12ba138d50c25d80849585d4b18dd5df491 | refs/heads/master | 2020-05-29T11:40:19.748872 | 2016-09-15T18:45:34 | 2016-09-15T18:45:34 | 67,622,081 | 1 | 1 | null | 2016-09-07T15:56:12 | 2016-09-07T15:56:12 | null | UTF-8 | Java | false | false | 2,304 | java | /*
Copyright (c) 2010, NHIN Direct Project
All rights reserved.
Authors:
Umesh Madan umeshma@microsoft.com
Greg Meyer gm2552@cerner.com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution. Neither the name of the The NHIN Direct Project (nhindirect.org).
nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.nhindirect.gateway.smtp.provider;
import org.nhindirect.gateway.smtp.DefaultSmtpAgent;
import org.nhindirect.gateway.smtp.SmtpAgent;
import org.nhindirect.gateway.smtp.SmtpAgentSettings;
import org.nhindirect.stagent.NHINDAgent;
import com.google.inject.Inject;
import com.google.inject.Provider;
public class DefaultSmtpAgentProvider implements Provider<SmtpAgent>
{
@Inject
private NHINDAgent agent; // provided by injection... assumes can be created
private final SmtpAgentSettings settings;
public DefaultSmtpAgentProvider(SmtpAgentSettings settings)
{
this.settings = settings;
}
public SmtpAgent get()
{
return new DefaultSmtpAgent(settings, agent);
}
}
| [
"marcusm@localhost"
] | marcusm@localhost |
d67cf8fcdd06b9e5bd25e922acd714bbb81ca03e | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0345_public/tests/unittests/src/java/module0345_public_tests_unittests/a/Foo3.java | f2eae35e532a18d61aa95f49c2cc1d4677a08354 | [
"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,745 | java | package module0345_public_tests_unittests.a;
import javax.naming.directory.*;
import javax.net.ssl.*;
import javax.rmi.ssl.*;
/**
* 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 javax.annotation.processing.Completion
* @see javax.lang.model.AnnotatedConstruct
* @see javax.management.Attribute
*/
@SuppressWarnings("all")
public abstract class Foo3<T> extends module0345_public_tests_unittests.a.Foo2<T> implements module0345_public_tests_unittests.a.IFoo3<T> {
javax.naming.directory.DirContext f0 = null;
javax.net.ssl.ExtendedSSLSession f1 = null;
javax.rmi.ssl.SslRMIClientSocketFactory f2 = null;
public T element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module0345_public_tests_unittests.a.Foo2.create(input);
}
public String getName() {
return module0345_public_tests_unittests.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module0345_public_tests_unittests.a.Foo2.getInstance().setName(getName());
return;
}
public T get() {
return (T)module0345_public_tests_unittests.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (T)element;
module0345_public_tests_unittests.a.Foo2.getInstance().set(this.element);
}
public T call() throws Exception {
return (T)module0345_public_tests_unittests.a.Foo2.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
b65c0523476e30f10a06a5c72b6df47befc7461a | c8688db388a2c5ac494447bac90d44b34fa4132c | /sources/com/google/android/gms/internal/ads/zzayh.java | 3793db93f3bfbe6ce70192346212bf9b5d1011a8 | [] | no_license | mred312/apk-source | 98dacfda41848e508a0c9db2c395fec1ae33afa1 | d3ca7c46cb8bf701703468ddc88f25ba4fb9d975 | refs/heads/master | 2023-03-06T05:53:50.863721 | 2021-02-23T13:34:20 | 2021-02-23T13:34:20 | 341,481,669 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,764 | java | package com.google.android.gms.internal.ads;
import android.text.TextUtils;
import androidx.core.app.NotificationCompat;
import com.google.android.gms.ads.internal.zzp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */
public final class zzayh {
/* renamed from: a */
private final long f12938a;
/* renamed from: b */
private final List<String> f12939b = new ArrayList();
/* renamed from: c */
private final List<String> f12940c = new ArrayList();
/* renamed from: d */
private final Map<String, zzanh> f12941d = new HashMap();
/* renamed from: e */
private String f12942e;
/* renamed from: f */
private String f12943f;
/* renamed from: g */
private JSONObject f12944g;
/* renamed from: h */
private boolean f12945h;
public zzayh(String str, long j) {
JSONObject optJSONObject;
this.f12945h = false;
this.f12943f = str;
this.f12938a = j;
if (!TextUtils.isEmpty(str)) {
try {
JSONObject jSONObject = new JSONObject(str);
this.f12944g = jSONObject;
if (jSONObject.optInt(NotificationCompat.CATEGORY_STATUS, -1) != 1) {
this.f12945h = false;
zzaza.zzfa("App settings could not be fetched successfully.");
return;
}
this.f12945h = true;
this.f12942e = this.f12944g.optString("app_id");
JSONArray optJSONArray = this.f12944g.optJSONArray("ad_unit_id_settings");
if (optJSONArray != null) {
for (int i = 0; i < optJSONArray.length(); i++) {
JSONObject jSONObject2 = optJSONArray.getJSONObject(i);
String optString = jSONObject2.optString("format");
String optString2 = jSONObject2.optString("ad_unit_id");
if (!TextUtils.isEmpty(optString)) {
if (!TextUtils.isEmpty(optString2)) {
if ("interstitial".equalsIgnoreCase(optString)) {
this.f12940c.add(optString2);
} else if ("rewarded".equalsIgnoreCase(optString) && (optJSONObject = jSONObject2.optJSONObject("mediation_config")) != null) {
this.f12941d.put(optString2, new zzanh(optJSONObject));
}
}
}
}
}
JSONArray optJSONArray2 = this.f12944g.optJSONArray("persistable_banner_ad_unit_ids");
if (optJSONArray2 != null) {
for (int i2 = 0; i2 < optJSONArray2.length(); i2++) {
this.f12939b.add(optJSONArray2.optString(i2));
}
}
} catch (JSONException e) {
zzaza.zzd("Exception occurred while processing app setting json", e);
zzp.zzku().zza(e, "AppSettings.parseAppSettingsJson");
}
}
}
public final long zzxd() {
return this.f12938a;
}
public final boolean zzxe() {
return this.f12945h;
}
public final String zzxf() {
return this.f12943f;
}
public final String zzxg() {
return this.f12942e;
}
public final Map<String, zzanh> zzxh() {
return this.f12941d;
}
public final JSONObject zzxi() {
return this.f12944g;
}
}
| [
"mred312@gmail.com"
] | mred312@gmail.com |
dba72e8678a456316a0e188cae4ee01a5401ae68 | 786d48794a9957d377aca967b8d95f80c5fa2120 | /jp.ac.nagoya_u.is.nces.a_rte.model/src/jp/ac/nagoya_u/is/nces/a_rte/model/rte/module/ModeType.java | 477a892994ac1ba1e96f209a476a848604f33fbf | [] | no_license | PizzaFactory/a-workflow-demo | 590dec0c1c3bed38394fca686cd798aebad60e7d | e98d95236bf78b7fe3ad8b64681b8594f3bdd4eb | refs/heads/master | 2020-06-13T17:47:15.225297 | 2016-12-05T00:30:24 | 2016-12-05T00:30:24 | 75,572,426 | 0 | 1 | null | 2016-12-05T00:30:26 | 2016-12-04T23:51:29 | Java | UTF-8 | Java | false | false | 5,526 | java | /*
* TOPPERS/A-RTEGEN
* Automotive Runtime Environment Generator
*
* Copyright (C) 2013-2016 by Eiwa System Management, Inc., JAPAN
*
* 上記著作権者は,以下の(1)〜(4)の条件を満たす場合に限り,本ソフトウェ
* ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
* 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
* (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
* 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
* スコード中に含まれていること.
* (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
* 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
* 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
* の無保証規定を掲載すること.
* (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
* 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
* と.
* (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
* 作権表示,この利用条件および下記の無保証規定を掲載すること.
* (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
* 報告すること.
* (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
* 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
* また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
* 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
* 免責すること.
*
* 本ソフトウェアは,AUTOSAR(AUTomotive Open System ARchitecture)仕
* 様に基づいている.上記の許諾は,AUTOSARの知的財産権を許諾するもので
* はない.AUTOSARは,AUTOSAR仕様に基づいたソフトウェアを商用目的で利
* 用する者に対して,AUTOSARパートナーになることを求めている.
*
* 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
* よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
* に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
* アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
* の責任を負わない.
*
* $Id $
*/
/**
*/
package jp.ac.nagoya_u.is.nces.a_rte.model.rte.module;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Mode Type</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModeType#getGuardName <em>Guard Name</em>}</li>
* <li>{@link jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModeType#getImplementationDataType <em>Implementation Data Type</em>}</li>
* </ul>
* </p>
*
* @see jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModulePackage#getModeType()
* @model
* @generated
*/
public interface ModeType extends Type {
/**
* Returns the value of the '<em><b>Guard Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Guard Name</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Guard Name</em>' attribute.
* @see #setGuardName(String)
* @see jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModulePackage#getModeType_GuardName()
* @model dataType="jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.CIdentifier" required="true"
* @generated
*/
String getGuardName();
/**
* Sets the value of the '{@link jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModeType#getGuardName <em>Guard Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Guard Name</em>' attribute.
* @see #getGuardName()
* @generated
*/
void setGuardName(String value);
/**
* Returns the value of the '<em><b>Implementation Data Type</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Implementation Data Type</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Implementation Data Type</em>' reference.
* @see #setImplementationDataType(Type)
* @see jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModulePackage#getModeType_ImplementationDataType()
* @model required="true"
* @generated
*/
Type getImplementationDataType();
/**
* Sets the value of the '{@link jp.ac.nagoya_u.is.nces.a_rte.model.rte.module.ModeType#getImplementationDataType <em>Implementation Data Type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Implementation Data Type</em>' reference.
* @see #getImplementationDataType()
* @generated
*/
void setImplementationDataType(Type value);
} // ModeType
| [
"monaka@monami-ya.com"
] | monaka@monami-ya.com |
a697aaa9c6952b4e5527e2e740179327711b025b | 83f4a71aee31911a73a2bb858e1669fe9ff9d87a | /redis-distributed-lock-demo-spring/src/test/java/com/snowalker/AppTest.java | adb27c8bee7b42764075297e3107021de67e194e | [
"Apache-2.0"
] | permissive | TaXueWWL/redis-distributed-lock | 10761f7d69a22827343281fc8ec7ccdca2accc8f | adeff499fda7b63c752b408648a2dff40d066728 | refs/heads/master | 2023-06-24T15:19:27.453800 | 2022-03-29T09:02:03 | 2022-03-29T09:02:03 | 140,507,748 | 328 | 133 | Apache-2.0 | 2023-06-14T22:32:46 | 2018-07-11T01:53:31 | Java | UTF-8 | Java | false | false | 285 | java | package com.snowalker;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* Unit test for simple App.
*/
public class AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue()
{
assertTrue( true );
}
}
| [
"1210812591@qq.com"
] | 1210812591@qq.com |
30fdaff0f0401b963625ab120b6654f65b201a87 | e010f83b9d383a958fc73654162758bda61f8290 | /src/main/java/com/alipay/api/domain/IotDevice.java | 4b601851ccac46bae001d193012a32043f547b76 | [
"Apache-2.0"
] | permissive | 10088/alipay-sdk-java | 3a7984dc591eaf196576e55e3ed657a88af525a6 | e82aeac7d0239330ee173c7e393596e51e41c1cd | refs/heads/master | 2022-01-03T15:52:58.509790 | 2018-04-03T15:50:35 | 2018-04-03T15:50:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,949 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* IoT设备对象
*
* @author auto create
* @since 1.0, 2017-09-14 22:22:29
*/
public class IotDevice extends AlipayObject {
private static final long serialVersionUID = 5714939126697575825L;
/**
* 蓝牙MAC地址
*/
@ApiField("bluetooth_mac")
private String bluetoothMac;
/**
* 设备控制面板地址
*/
@ApiField("control_url")
private String controlUrl;
/**
* 协议服务商用于唯一标识该设备的设备id(协议服务商定义)
*/
@ApiField("device_id")
private String deviceId;
/**
* 设备名称
*/
@ApiField("device_name")
private String deviceName;
/**
* 协议服务商用于唯一标识一个设备型号的型号id
*/
@ApiField("model_id")
private String modelId;
/**
* 设备序列号
*/
@ApiField("sn")
private String sn;
/**
* 设备WIFI的MAC地址
*/
@ApiField("wifi_mac")
private String wifiMac;
public String getBluetoothMac() {
return this.bluetoothMac;
}
public void setBluetoothMac(String bluetoothMac) {
this.bluetoothMac = bluetoothMac;
}
public String getControlUrl() {
return this.controlUrl;
}
public void setControlUrl(String controlUrl) {
this.controlUrl = controlUrl;
}
public String getDeviceId() {
return this.deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getDeviceName() {
return this.deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getModelId() {
return this.modelId;
}
public void setModelId(String modelId) {
this.modelId = modelId;
}
public String getSn() {
return this.sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getWifiMac() {
return this.wifiMac;
}
public void setWifiMac(String wifiMac) {
this.wifiMac = wifiMac;
}
}
| [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
c6249192c6ee5114d4333aac009af8499cdc3fec | 7ce370b237e933871e9d1c24aabe674e8e26659b | /project/giving-batch/src/main/com/virginmoneygiving/givingbatch/domain/CollectRegularDonationRequest.java | 438608c98a81e6030a3e8f889f49462f0ec34f6c | [] | no_license | ankurmitujjain/virginmoney | 16c21fb7ba03b70f8fab02f6543e6531c275cfab | 2355ea70b25ac00c212f8968f072365a53ef0cbc | refs/heads/master | 2020-12-31T04:42:42.191330 | 2009-09-18T06:40:02 | 2009-09-18T06:40:02 | 57,319,348 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,315 | java | package com.virginmoneygiving.givingbatch.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
/**
* The data object representing collect regular donation request.
*
* @author taruna
*/
public class CollectRegularDonationRequest implements Serializable {
/** Serial version uid. */
private static final long serialVersionUID = 1L;
/** The regular donation id. */
private Long regularDonationId;
/** Donor id. */
private Long donorId = null;
/** Charity id. */
private Long charityId = null;
/** Fundraiser Activity Id. */
private Long fundraiserActivityId = null;
/** Gross Amount. */
private BigDecimal grossAmount = null;
/** Eligible For GiftAid. */
private boolean eligibleForGiftAid = false;
/** Payment Frequency. */
private String paymentFrequency = null;
/** Payment Day. */
private Integer paymentDay = null;
/** Donor name. */
private String donorName = null;
/** Donor message. */
private String donorMessage = null;
/** Donor email address. */
private String donorEmailAddress = null;
/** Donation reference. */
private String donationReference = null;
/** GiftAid Amount. */
private BigDecimal giftAidAmount = null;
/** First payment date. */
private Date firstPaymentDate = null;
/** GiftAid Amount. */
private Long donationId = null;
/** First payment date. */
private Long personId = null;
/**
* Gets the donor id.
*
* @return the donorId
*/
public Long getDonorId() {
return donorId;
}
/**
* Sets the donor id.
*
* @param donorId the donorId to set
*/
public void setDonorId(Long donorId) {
this.donorId = donorId;
}
/**
* Gets the charity id.
*
* @return the charityId
*/
public Long getCharityId() {
return charityId;
}
/**
* Sets the charity id.
*
* @param charityId the charityId to set
*/
public void setCharityId(Long charityId) {
this.charityId = charityId;
}
/**
* Gets the fundraiser activity id.
*
* @return the fundraiserActivityId
*/
public Long getFundraiserActivityId() {
return fundraiserActivityId;
}
/**
* Sets the fundraiser activity id.
*
* @param fundraiserActivityId the fundraiserActivityId to set
*/
public void setFundraiserActivityId(Long fundraiserActivityId) {
this.fundraiserActivityId = fundraiserActivityId;
}
/**
* Gets the gross amount.
*
* @return the grossAmount
*/
public BigDecimal getGrossAmount() {
return grossAmount;
}
/**
* Sets the gross amount.
*
* @param grossAmount the grossAmount to set
*/
public void setGrossAmount(BigDecimal grossAmount) {
this.grossAmount = grossAmount;
}
/**
* Checks if is eligible for gift aid.
*
* @return the eligibleForGiftAid
*/
public boolean isEligibleForGiftAid() {
return eligibleForGiftAid;
}
/**
* Sets the eligible for gift aid.
*
* @param eligibleForGiftAid the eligibleForGiftAid to set
*/
public void setEligibleForGiftAid(boolean eligibleForGiftAid) {
this.eligibleForGiftAid = eligibleForGiftAid;
}
/**
* Gets the payment frequency.
*
* @return the paymentFrequency
*/
public String getPaymentFrequency() {
return paymentFrequency;
}
/**
* Sets the payment frequency.
*
* @param paymentFrequency the paymentFrequency to set
*/
public void setPaymentFrequency(String paymentFrequency) {
this.paymentFrequency = paymentFrequency;
}
/**
* Gets the payment day.
*
* @return the paymentDay
*/
public Integer getPaymentDay() {
return paymentDay;
}
/**
* Sets the payment day.
*
* @param paymentDay the paymentDay to set
*/
public void setPaymentDay(Integer paymentDay) {
this.paymentDay = paymentDay;
}
/**
* Gets the donor name.
*
* @return the donorName
*/
public String getDonorName() {
return donorName;
}
/**
* Sets the donor name.
*
* @param donorName the donorName to set
*/
public void setDonorName(String donorName) {
this.donorName = donorName;
}
/**
* Gets the donor message.
*
* @return the donorMessage
*/
public String getDonorMessage() {
return donorMessage;
}
/**
* Sets the donor message.
*
* @param donorMessage the donorMessage to set
*/
public void setDonorMessage(String donorMessage) {
this.donorMessage = donorMessage;
}
/**
* Gets the donor email address.
*
* @return the donorEmailAddress
*/
public String getDonorEmailAddress() {
return donorEmailAddress;
}
/**
* Sets the donor email address.
*
* @param donorEmailAddress the donorEmailAddress to set
*/
public void setDonorEmailAddress(String donorEmailAddress) {
this.donorEmailAddress = donorEmailAddress;
}
/**
* Gets the donation reference.
*
* @return the donationReference
*/
public String getDonationReference() {
return donationReference;
}
/**
* Sets the donation reference.
*
* @param donationReference the donationReference to set
*/
public void setDonationReference(String donationReference) {
this.donationReference = donationReference;
}
/**
* Gets the gift aid amount.
*
* @return the giftAidAmount
*/
public BigDecimal getGiftAidAmount() {
return giftAidAmount;
}
/**
* Sets the gift aid amount.
*
* @param giftAidAmount the giftAidAmount to set
*/
public void setGiftAidAmount(BigDecimal giftAidAmount) {
this.giftAidAmount = giftAidAmount;
}
/**
* Gets the first payment date.
*
* @return the firstPaymentDate
*/
public Date getFirstPaymentDate() {
return firstPaymentDate;
}
/**
* Sets the first payment date.
*
* @param firstPaymentDate the firstPaymentDate to set
*/
public void setFirstPaymentDate(Date firstPaymentDate) {
this.firstPaymentDate = firstPaymentDate;
}
/**
* Gets the regular donation id.
*
* @return the regularDonationId
*/
public Long getRegularDonationId() {
return regularDonationId;
}
/**
* Sets the regular donation id.
*
* @param regularDonationId the regularDonationId to set
*/
public void setRegularDonationId(Long regularDonationId) {
this.regularDonationId = regularDonationId;
}
}
| [
"ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47"
] | ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47 |
d0a4a07bd26390a2262f126b5776b10d17ccb130 | 03dafd319f0aa6ce24b1ede91f07eb63337947be | /kieker.architecture.visualization/model-gen/kieker/model/analysismodel/type/OperationType.java | 017f001bc0be652f4a43a446e70ddb0b3fc61eb9 | [] | no_license | kieker-monitoring/instrumentation-languages | 1cab3fd0f38b28a80efaabb8c74a819466d9cdde | d6c95049072bd89f66511ff0dffec8211a41d493 | refs/heads/master | 2023-06-09T03:08:01.357821 | 2023-03-08T08:44:28 | 2023-06-03T17:51:14 | 35,327,353 | 6 | 4 | null | 2023-03-29T08:25:06 | 2015-05-09T12:13:25 | Java | UTF-8 | Java | false | false | 4,020 | java | /**
*/
package kieker.model.analysismodel.type;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Operation Type</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link kieker.model.analysismodel.type.OperationType#getSignature <em>Signature</em>}</li>
* <li>{@link kieker.model.analysismodel.type.OperationType#getName <em>Name</em>}</li>
* <li>{@link kieker.model.analysismodel.type.OperationType#getReturnType <em>Return Type</em>}</li>
* <li>{@link kieker.model.analysismodel.type.OperationType#getModifiers <em>Modifiers</em>}</li>
* <li>{@link kieker.model.analysismodel.type.OperationType#getParameterTypes <em>Parameter Types</em>}</li>
* </ul>
*
* @see kieker.model.analysismodel.type.TypePackage#getOperationType()
* @model
* @generated
*/
public interface OperationType extends EObject {
/**
* Returns the value of the '<em><b>Signature</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Signature</em>' attribute.
* @see #setSignature(String)
* @see kieker.model.analysismodel.type.TypePackage#getOperationType_Signature()
* @model
* @generated
*/
String getSignature();
/**
* Sets the value of the '{@link kieker.model.analysismodel.type.OperationType#getSignature <em>Signature</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Signature</em>' attribute.
* @see #getSignature()
* @generated
*/
void setSignature(String value);
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see kieker.model.analysismodel.type.TypePackage#getOperationType_Name()
* @model
* @generated
*/
String getName();
/**
* Sets the value of the '{@link kieker.model.analysismodel.type.OperationType#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
void setName(String value);
/**
* Returns the value of the '<em><b>Return Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Return Type</em>' attribute.
* @see #setReturnType(String)
* @see kieker.model.analysismodel.type.TypePackage#getOperationType_ReturnType()
* @model
* @generated
*/
String getReturnType();
/**
* Sets the value of the '{@link kieker.model.analysismodel.type.OperationType#getReturnType <em>Return Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Return Type</em>' attribute.
* @see #getReturnType()
* @generated
*/
void setReturnType(String value);
/**
* Returns the value of the '<em><b>Modifiers</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Modifiers</em>' attribute list.
* @see kieker.model.analysismodel.type.TypePackage#getOperationType_Modifiers()
* @model
* @generated
*/
EList<String> getModifiers();
/**
* Returns the value of the '<em><b>Parameter Types</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Parameter Types</em>' attribute list.
* @see kieker.model.analysismodel.type.TypePackage#getOperationType_ParameterTypes()
* @model
* @generated
*/
EList<String> getParameterTypes();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation"
* @generated
*/
ComponentType getComponentType();
} // OperationType
| [
"reiner.jung@email.uni-kiel.de"
] | reiner.jung@email.uni-kiel.de |
27bbd04be6c7e618b82eed5748c044bf426ae14c | 6a7a3c200dd7a0fecd8690287b18fa96bde4994e | /src/main/java/com/fury/engine/task/impl/BonusExperienceTask.java | 3b607105401a87bb6b84c5efbe527d989ac24c66 | [] | no_license | GregHib/fury | 5d6c39a08bd05148076feb809ff26401e4d0d330 | 24fd71ebd515219d4d7ceca4bd2d5c6a96042cc1 | refs/heads/master | 2023-01-27T19:29:44.829658 | 2020-12-03T09:54:17 | 2020-12-03T09:54:17 | 318,140,865 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,243 | java | package com.fury.engine.task.impl;
import com.fury.core.task.Task;
import com.fury.core.model.node.entity.actor.figure.player.Player;
import com.fury.game.entity.character.player.content.PlayerPanel;
import com.fury.game.world.GameWorld;
import com.fury.util.Colours;
import com.fury.util.FontUtils;
public class BonusExperienceTask extends Task {
public BonusExperienceTask(final Player player) {
super(false, 100);this.player = player;
}
final Player player;
int msg;
@Override
public void run() {
if (player == null || !player.isRegistered()) {
stop();
return;
}
player.setMinutesBonusExp(-1, true);
int newMinutes = player.getMinutesBonusExp();
if (newMinutes < 0) {
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " Your bonus experience has run out.", Colours.BLUE);
player.setMinutesBonusExp(-1, false);
stop();
} else if (newMinutes == 10 || newMinutes == 5) {
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " You have " + player.getMinutesBonusExp() + " minutes of bonus experience left.", Colours.BLUE);
} else if (newMinutes == 1) {
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " You have " + player.getMinutesBonusExp() + " minute of bonus experience left!", Colours.BLUE);
}
PlayerPanel.refreshPanel(player);
msg++;
}
public static void addBonusXp(final Player player, int minutes) {
boolean startEvent = player.getMinutesBonusExp() == -1;
int bonus = startEvent ? minutes + 1 : minutes;
bonus = (bonus * 1000) / 600;
player.setMinutesBonusExp(bonus, true);
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " You gain a bonus " + minutes + " minutes bonus exp starting now. "+player.getMinutesBonusExp()+" minutes left.", Colours.BLUE);
if(startEvent) {
GameWorld.schedule(new Task( 100) {
int msg;
@Override
public void run() {
if (!player.isRegistered()) {
stop();
return;
}
player.setMinutesBonusExp(-1, true);
int newMinutes = player.getMinutesBonusExp();
if (newMinutes < 0) {
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " Your bonus experience has run out.", Colours.BLUE);
player.setMinutesBonusExp(-1, false);
stop();
} else if (newMinutes == 10 || newMinutes == 5) {
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " You have " + player.getMinutesBonusExp() + " minutes of bonus experience left.", Colours.BLUE);
} else if (newMinutes == 1) {
player.getPacketSender().sendMessage(FontUtils.imageTags(535) + " You have " + player.getMinutesBonusExp() + " minute of bonus experience left!", Colours.BLUE);
}
PlayerPanel.refreshPanel(player);
msg++;
}
});
}
}
}
| [
"greghib@users.noreply.github.com"
] | greghib@users.noreply.github.com |
2cb85b3b36c4be0fff097ee05c190e4211344f75 | cb2e0b45e47ebeb518f1c8d7d12dfa0680aed01c | /openbanking-api-server/src/main/gen/com/laegler/openbanking/model/OrganisationsGetFromSCIM200OKResponseSchema.java | 6036379444120edf4b53330f04329ce498170c85 | [
"MIT"
] | permissive | thlaegler/openbanking | 4909cc9e580210267874c231a79979c7c6ec64d8 | 924a29ac8c0638622fba7a5674c21c803d6dc5a9 | refs/heads/develop | 2022-12-23T15:50:28.827916 | 2019-10-30T09:11:26 | 2019-10-31T05:43:04 | 213,506,933 | 1 | 0 | MIT | 2022-11-16T11:55:44 | 2019-10-07T23:39:49 | HTML | UTF-8 | Java | false | false | 1,248 | java | package com.laegler.openbanking.model;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class OrganisationsGetFromSCIM200OKResponseSchema extends ArrayList<Object> {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrganisationsGetFromSCIM200OKResponseSchema {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"thomas.laegler@googlemail.com"
] | thomas.laegler@googlemail.com |
88359a2c5a128802f4eecdca3de05d59f29033b4 | 5f82aae041ab05a5e6c3d9ddd8319506191ab055 | /Projects/Cli/17/src/test/org/apache/commons/cli/OptionsTest.java | 5f7bad434cc779cc137b715c11049c04ed22d030 | [
"Apache-2.0"
] | permissive | lingming/prapr_data | e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc | be9ababc95df45fd66574c6af01122ed9df3db5d | refs/heads/master | 2023-08-14T20:36:23.459190 | 2021-10-17T13:49:39 | 2021-10-17T13:49:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,891 | 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.commons.cli;
import java.util.ArrayList;
import java.util.Collection;
import junit.framework.TestCase;
/**
* @author Rob Oxspring roxspring@apache.org
* @version $Revision$
*/
public class OptionsTest extends TestCase
{
public void testSimple()
{
Options opts = new Options();
opts.addOption("a", false, "toggle -a");
opts.addOption("b", true, "toggle -b");
assertTrue(opts.hasOption("a"));
assertTrue(opts.hasOption("b"));
}
public void testDuplicateSimple()
{
Options opts = new Options();
opts.addOption("a", false, "toggle -a");
opts.addOption("a", true, "toggle -a*");
assertEquals("last one in wins", "toggle -a*", opts.getOption("a").getDescription());
}
public void testLong()
{
Options opts = new Options();
opts.addOption("a", "--a", false, "toggle -a");
opts.addOption("b", "--b", true, "set -b");
assertTrue(opts.hasOption("a"));
assertTrue(opts.hasOption("b"));
}
public void testDuplicateLong()
{
Options opts = new Options();
opts.addOption("a", "--a", false, "toggle -a");
opts.addOption("a", "--a", false, "toggle -a*");
assertEquals("last one in wins", "toggle -a*", opts.getOption("a").getDescription());
}
public void testHelpOptions()
{
Option longOnly1 = OptionBuilder.withLongOpt("long-only1").create();
Option longOnly2 = OptionBuilder.withLongOpt("long-only2").create();
Option shortOnly1 = OptionBuilder.create("1");
Option shortOnly2 = OptionBuilder.create("2");
Option bothA = OptionBuilder.withLongOpt("bothA").create("a");
Option bothB = OptionBuilder.withLongOpt("bothB").create("b");
Options options = new Options();
options.addOption(longOnly1);
options.addOption(longOnly2);
options.addOption(shortOnly1);
options.addOption(shortOnly2);
options.addOption(bothA);
options.addOption(bothB);
Collection allOptions = new ArrayList();
allOptions.add(longOnly1);
allOptions.add(longOnly2);
allOptions.add(shortOnly1);
allOptions.add(shortOnly2);
allOptions.add(bothA);
allOptions.add(bothB);
Collection helpOptions = options.helpOptions();
assertTrue("Everything in all should be in help", helpOptions.containsAll(allOptions));
assertTrue("Everything in help should be in all", allOptions.containsAll(helpOptions));
}
public void testMissingOptionException() throws ParseException
{
Options options = new Options();
options.addOption(OptionBuilder.isRequired().create("f"));
try
{
new PosixParser().parse(options, new String[0]);
fail("Expected MissingOptionException to be thrown");
}
catch (MissingOptionException e)
{
assertEquals("Missing required option: f", e.getMessage());
}
}
public void testMissingOptionsException() throws ParseException
{
Options options = new Options();
options.addOption(OptionBuilder.isRequired().create("f"));
options.addOption(OptionBuilder.isRequired().create("x"));
try
{
new PosixParser().parse(options, new String[0]);
fail("Expected MissingOptionException to be thrown");
}
catch (MissingOptionException e)
{
assertEquals("Missing required options: f, x", e.getMessage());
}
}
public void testToString()
{
Options options = new Options();
options.addOption("f", "foo", true, "Foo");
options.addOption("b", "bar", false, "Bar");
String s = options.toString();
assertNotNull("null string returned", s);
assertTrue("foo option missing", s.toLowerCase().indexOf("foo") != -1);
assertTrue("bar option missing", s.toLowerCase().indexOf("bar") != -1);
}
}
| [
"2890268106@qq.com"
] | 2890268106@qq.com |
7381b46c16202ed4d8499aac6ecfbf56e0efbc22 | 9d2809ee4669e3701884d334c227c68a24c5787f | /distributioncenter/distribution-common/src/main/java/com/mockuai/distributioncenter/common/domain/qto/SellerUpgradeQTO.java | d45ae9ac76cdc5e445145935d68091d03ace3c62 | [] | no_license | vinfai/hy_project | 5370367876fe6bcb4109f2af9391b9d817c320b5 | 8fd99f23cf83b1b3f7bec9560fbd2edc46621d0b | refs/heads/master | 2021-01-19T00:58:26.436196 | 2017-03-01T16:47:22 | 2017-03-01T16:49:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 152 | java | package com.mockuai.distributioncenter.common.domain.qto;
/**
* Created by yeliming on 16/5/18.
*/
public class SellerUpgradeQTO extends BaseQTO {
}
| [
"1147478866@qq.com"
] | 1147478866@qq.com |
f538764e3b95f40996c5da08241d18daa2ac9563 | b83041942d92ead939b8f56318a13e3d82f20e48 | /src/com/wenyu/kaijiw/ContactsActivity.java | 084874a9635b748585b1a4bb35c7dda12e97b7cf | [
"Apache-2.0"
] | permissive | xingfeng2010/kai-ji-wang | cda7f9f032d09204cfe6d0deb9148154029999f4 | c4d5156551c0cb42fe313e7dd82b6ac57607d1d6 | refs/heads/master | 2021-01-10T01:19:38.470989 | 2015-10-17T19:12:21 | 2015-10-17T19:12:21 | 44,230,645 | 1 | 0 | null | null | null | null | GB18030 | Java | false | false | 974 | java | package com.wenyu.kaijiw;
import java.util.List;
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.wenyu.kjw.adapter.ClearEditText;
import com.wenyu.kjw.adapter.PinyinComparator;
import com.wenyu.kjw.adapter.SideBar;
import com.wenyu.kjw.adapter.SortAdapter;
public class ContactsActivity extends Activity {
// data
private List<String> mSortCustomUserIDsList;
// 根据拼音来排列ListView里面的数据类
private PinyinComparator mPinyinComparator;
// ui
private SortAdapter mAdapter;
private ListView mListView;
public ClearEditText mClearEditText;
private SideBar mSideBar;
private TextView mDialog;
private TextView mEmptyTextView;
private LinearLayout mLoadingLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.fragment_contacts);
}
}
| [
"583354000@qq.com"
] | 583354000@qq.com |
9c2df242a0276267813ada9f7cdeff96a1e735ec | c87fd6d93631a1a98e77fede930eb59702002a82 | /engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java | 610dd414e064bf9376945adca608d8b1c7e36dbb | [
"Apache-2.0"
] | permissive | Freakey17/teiid | 6a216d844b5f79993d6aca7b82225270fd3e3175 | 76d29a5580f018fa42c842c1ccb2f5ee6b4b9cdb | refs/heads/master | 2020-04-30T10:57:40.183351 | 2019-03-20T18:03:04 | 2019-03-20T18:03:04 | 176,790,018 | 0 | 0 | NOASSERTION | 2019-03-20T18:02:24 | 2019-03-20T18:02:24 | null | UTF-8 | Java | false | false | 8,003 | java | /*
* Copyright Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags and
* the COPYRIGHT.txt file distributed with this work.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.teiid.query.sql.lang;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.teiid.core.util.EquivalenceUtil;
import org.teiid.core.util.HashCodeUtil;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
/**
* This class represents a compound criteria for logical expressions. A logical
* expression involves one or more criteria and a logical operator. The valid
* operators are "AND" and "OR".
*/
public class CompoundCriteria extends LogicalCriteria {
/** Constant indicating the logical "or" of two or more criteria. */
public static final int OR = 1;
/** Constant indicating the logical "and" of two or more criteria.*/
public static final int AND = 0;
/** The criterias. */
private List<Criteria> criteria; // List<Criteria>
/** The logical operator. */
private int operator = 0;
/**
* Constructs a default instance of this class.
*/
public CompoundCriteria() {
criteria = new ArrayList<Criteria>(2);
}
/**
* Constructs an instance of this class given the criteria. Subclasses are
* responsible for defining how the criteria are inter-related in a logical
* expression.
* @param criteria List of {@link Criteria} being added
*/
public CompoundCriteria( List<? extends Criteria> criteria ) {
this();
Iterator<? extends Criteria> iter = criteria.iterator();
while ( iter.hasNext() ) {
addCriteria( iter.next() );
}
}
/**
* Constructs an instance of this class given a binary logical expression.
* The logical expression is constructed in terms of a left criteria clause,
* an operator (either OR or AND), and a right criteria clause.
*
* @param left The criteria left of the operator
* @param right The criteria right of the operator
* @param operator The logical operator
*
* @see #set(int,Criteria,Criteria)
*/
public CompoundCriteria( int operator, Criteria left, Criteria right ) {
this();
set(operator,left,right);
}
/**
* Constructs an instance of this class given a general logical expression.
* The logical expression is constructed in terms of an operator (either OR
* or AND), and a set of criteria clauses.
*
* @param operator The logical operator
* @param criteria The list of {@link Criteria}
*/
public CompoundCriteria( int operator, List criteria ) {
this();
set(operator,criteria);
}
/**
* Returns the operator used in the logical expression. The returned value
* can be compared to constants defined in this class.
* @return The operator
*/
public int getOperator() {
return this.operator;
}
/**
* Return true if the specified operator is a valid operator
* @param operator Operator to check
* @return True if valid
*/
private boolean isValidOperator(int operator) {
return (operator == OR || operator == AND);
}
/**
* Sets the operator used in the logical expression.
* @param operator The operator
* @throws IllegalArgumentException If operator is invalid
*/
public void setOperator(int operator) {
if (!isValidOperator(operator)) {
throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0002", operator)); //$NON-NLS-1$
}
this.operator = operator;
}
/**
* Returns the list of criteria.
* @return List of {@link Criteria}
*/
public List<Criteria> getCriteria() {
return this.criteria;
}
/**
* Sets the criteria.
* @param criteria The list of {@link Criteria}
*/
public void setCriteria(List<Criteria> criteria) {
this.criteria = criteria;
}
/**
* Returns the number of criteria in this clause.
* @return Criteria
*/
public int getCriteriaCount() {
return this.criteria.size();
}
/**
* Returns the criteria at the specified index.
* @return Criteria
* @throws IllegalArgumentException if no criteria have been specified
*/
public Criteria getCriteria( int index ) {
return this.criteria.get(index);
}
/**
* Add another criteria to the clause.
* @param criteria The criteria
*/
public void addCriteria( Criteria criteria ) {
this.criteria.add(criteria);
}
/**
* Reset criteria so there are no more. After this call, <code>
* getCriteriaCount</code> will return 0.
*/
protected void reset() {
criteria.clear();
}
/**
* Sets a "standard" operand-operator-operand criteria.
*
* @param operator The logical operator
* @param left The first criteria
* @param right The second criteria
*
* @see #set(int,List)
*/
public void set( int operator, Criteria left, Criteria right ) {
reset();
setOperator(operator);
addCriteria(left);
addCriteria(right);
}
/**
* Sets a "standard" unary criteria.
*
* @param operator The unary logical operator
* @param criteria The criteria
*
* @see #set(int,List)
*/
public void set( int operator, Criteria criteria) {
reset();
setOperator(operator);
addCriteria(criteria);
}
/**
* Sets the operator and an arbitrary set of criteria.
*
* @param operator The logical operator
* @param criteria The set of criteria
*
* @see #set(int,Criteria,Criteria)
*/
public void set( int operator, List criteria ) {
reset();
setOperator(operator);
Iterator iter = criteria.iterator();
while ( iter.hasNext() ) {
addCriteria( (Criteria)iter.next() );
}
}
public void acceptVisitor(LanguageVisitor visitor) {
visitor.visit(this);
}
/**
* Get hash code. WARNING: The hash code is based on data in the criteria.
* If data values are changed, the hash code will change - don't hash this
* object and change values.
*/
public int hashCode() {
int hc = 0;
hc = HashCodeUtil.hashCode(hc, getOperator());
hc = HashCodeUtil.hashCode(hc, getCriteria());
return hc;
}
/**
* Override equals() method.
*/
public boolean equals(Object obj) {
if(obj == this) {
return true;
}
if(!(obj instanceof CompoundCriteria)) {
return false;
}
CompoundCriteria cc = (CompoundCriteria)obj;
return cc.getOperator() == getOperator() &&
EquivalenceUtil.areEqual(cc.getCriteria(), getCriteria());
}
/**
* Deep clone. It returns a new LogicalCriteria with a new list of clones
* of the criteria objects.
*/
public Object clone() {
CompoundCriteria copy = new CompoundCriteria();
copy.setOperator(getOperator());
// Clone each sub-criteria
List crits = getCriteria();
for(int i=0; i<crits.size(); i++) {
Criteria crit = (Criteria) crits.get(i);
if(crit == null) {
copy.addCriteria(null);
} else {
copy.addCriteria( (Criteria) crit.clone() );
}
}
return copy;
}
} // END CLASS
| [
"shawkins@redhat.com"
] | shawkins@redhat.com |
73bdad0b3f20b759603d618ea892ff7fe22f4a86 | cec1602d23034a8f6372c019e5770773f893a5f0 | /sources/com/iwown/sport_module/contract/DataDownLoadListener.java | 7640157c55b5831c68daa1d29c2b8a9308f1db07 | [] | no_license | sengeiou/zeroner_app | 77fc7daa04c652a5cacaa0cb161edd338bfe2b52 | e95ae1d7cfbab5ca1606ec9913416dadf7d29250 | refs/heads/master | 2022-03-31T06:55:26.896963 | 2020-01-24T09:20:37 | 2020-01-24T09:20:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 202 | java | package com.iwown.sport_module.contract;
public interface DataDownLoadListener {
void downloadFinish();
void downloadProgress(int i);
void downloadStart();
void downloadTimeOut();
}
| [
"johan@sellstrom.me"
] | johan@sellstrom.me |
6ca2a88198dc0ca1bcacdd43b422d6f23686311c | 4ceb771643f205a0d97cdd4ce1472a0bd445f10b | /core/impl-base/src/main/java/org/jboss/arquillian/core/impl/loadable/ServiceRegistryLoader.java | ee53d45f17f87159604c8fd209d1b1e6b8aff2f8 | [
"Apache-2.0"
] | permissive | aspineon/smart-testing-dogfood-repo | 70f6411361825373aa168d5e327fe62226375308 | b180aada8a18ecae053817b619b4f5b1241b336b | refs/heads/master | 2022-04-13T17:12:28.129257 | 2019-02-19T19:44:07 | 2019-02-19T19:44:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,613 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.arquillian.core.impl.loadable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import org.jboss.arquillian.core.api.Injector;
import org.jboss.arquillian.core.spi.ServiceLoader;
/**
* MixedServiceLoader
*
* @author <a href="mailto:aslak@redhat.com">Aslak Knutsen</a>
* @version $Revision: $
*/
public class ServiceRegistryLoader implements ServiceLoader {
private Injector injector;
private ServiceRegistry registry;
public ServiceRegistryLoader(Injector injector, ServiceRegistry registry) {
this.injector = injector;
this.registry = registry;
}
/* (non-Javadoc)
* @see org.jboss.arquillian.core.spi.ServiceLoader#all(java.lang.Class)
*/
@Override
public <T> Collection<T> all(Class<T> serviceClass) {
List<T> serviceImpls = new ArrayList<T>();
Set<Class<? extends T>> serviceImplClasses = registry.getServiceImpls(serviceClass);
for (Class<? extends T> serviceImplClass : serviceImplClasses) {
T serviceImpl = createServiceInstance(serviceImplClass);
serviceImpls.add(serviceImpl);
}
return serviceImpls;
}
/* (non-Javadoc)
* @see org.jboss.arquillian.core.spi.ServiceLoader#onlyOne(java.lang.Class)
*/
@Override
public <T> T onlyOne(Class<T> serviceClass) {
Collection<T> all = all(serviceClass);
if (all.size() == 1) {
return all.iterator().next();
}
if (all.size() > 1) {
throw new IllegalStateException(
"Multiple service implementations found for " + serviceClass + ". " + toClassString(all));
}
return null;
}
/* (non-Javadoc)
* @see org.jboss.arquillian.core.spi.ServiceLoader#onlyOne(java.lang.Class, java.lang.Class)
*/
@Override
public <T> T onlyOne(Class<T> serviceClass, Class<? extends T> defaultServiceClass) {
T one = null;
try {
one = onlyOne(serviceClass);
} catch (Exception e) {
}
if (one == null) {
one = createServiceInstance(defaultServiceClass);
}
return one;
}
private <T> T createServiceInstance(Class<T> service) {
T serviceInst = SecurityActions.newInstance(
service,
new Class<?>[] {},
new Object[] {});
injector.inject(serviceInst);
return serviceInst;
}
private <T> String toClassString(Collection<T> providers) {
StringBuilder sb = new StringBuilder();
for (Object provider : providers) {
sb.append(provider.getClass().getName()).append(", ");
}
return sb.subSequence(0, sb.length() - 2).toString();
}
}
| [
"bartosz.majsak@gmail.com"
] | bartosz.majsak@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.