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
f493154a5b0341a0ee3378542328e2a8adfc1ce9
3c18b4ab3a20dab175dc48758835fb1a854a92c8
/probes/bctCPAll73.java
604a5204a6e4213179040df16808a56f9b7c65cb
[ "Apache-2.0" ]
permissive
lta-disco-unimib-it/BCT
2c6bcf52894db8798d8ad14c7ebe066262dd22e4
1c7fcb52f42bae9f5169c94032ded919cb1c42c4
refs/heads/master
2020-08-24T16:32:03.904958
2019-10-22T20:30:10
2019-10-22T20:30:10
216,863,231
0
0
null
null
null
null
UTF-8
Java
false
false
4,348
java
/******************************************************************************* * Copyright 2019 Fabrizio Pastore, Leonardo Mariani * * 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. *******************************************************************************/ //this probe monitor also internal component calls import probes.InteractionCheckerProbe; import probes.IoCheckerProbe; /** * BCT Checking Probe */ class bctCPAll73 { // Class for probe unnamed_probe public static class Probe_0 { // Fragment at class scope int id = 1; public static void _afterCall ( Object /*returnedObject*/ returnedObject, String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V // ------------------ begin user-written fragment code ---------------- try{ IoCheckerProbe.checkExit(className,methodName,methodSig,args,returnedObject); InteractionCheckerProbe.checkExit(className,methodName,methodSig,args,returnedObject); } catch ( Exception e ){ System.out.println("BCT COMPONENT LOGGER EXCEPTION: "+e.getMessage()); e.printStackTrace(); } // ------------------- end user-written fragment code ----------------- } public static void _beforeCall ( String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V // ------------------ begin user-written fragment code ---------------- try{ IoCheckerProbe.checkEnter(className,methodName,methodSig,args); InteractionCheckerProbe.checkEnter(className,methodName,methodSig,args); } catch ( Exception e ){ System.out.println("BCT COMPONENT LOGGER EXCEPTION: "+e.getMessage()); e.printStackTrace(); } // ------------------- end user-written fragment code ----------------- } } // Class for probe unnamed_probe public static class Probe_1 { // Fragment at class scope int id = 0; public static void _exit ( Object /*returnedObject*/ returnedObject, String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V // ------------------ begin user-written fragment code ---------------- try{ IoCheckerProbe.checkExit(className,methodName,methodSig,args,returnedObject); InteractionCheckerProbe.checkExit(className,methodName,methodSig,args,returnedObject); } catch ( Exception e ){ System.out.println("BCT COMPONENT LOGGER EXCEPTION: "+e.getMessage()); e.printStackTrace(); } // ------------------- end user-written fragment code ----------------- } public static void _entry ( String /*className*/ className, String /*methodName*/ methodName, String /*methodSig*/ methodSig, Object[] /*args*/ args ) { // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V // ------------------ begin user-written fragment code ---------------- try{ IoCheckerProbe.checkEnter(className,methodName,methodSig,args); InteractionCheckerProbe.checkEnter(className,methodName,methodSig,args); } catch ( Exception e ){ System.out.println("BCT COMPONENT LOGGER EXCEPTION: "+e.getMessage()); e.printStackTrace(); } // ------------------- end user-written fragment code ----------------- } } }
[ "fabrizio.pastore@gmail.com" ]
fabrizio.pastore@gmail.com
e82f76b2cccf90ba08af74cc15351614042b0507
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes9.dex_source_from_JADX/com/facebook/video/watchandbrowse/VideoWatchAndBrowseInflator.java
36ec5397cda8f7b827b9ba33e973c9e427138cfb
[]
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
860
java
package com.facebook.video.watchandbrowse; import android.app.Activity; import android.view.ViewGroup; import com.facebook.base.activity.FbRootViewUtil; import com.facebook.feed.video.ImmersiveVideoPlayer; import com.facebook.inject.InjectorLike; /* compiled from: should_support_tricky_bin */ public class VideoWatchAndBrowseInflator { public VideoWatchAndBrowseRootView f3377a; public static VideoWatchAndBrowseInflator m3211a(InjectorLike injectorLike) { return new VideoWatchAndBrowseInflator(); } public final ImmersiveVideoPlayer m3212a(Activity activity) { if (this.f3377a == null) { ViewGroup viewGroup = (ViewGroup) FbRootViewUtil.a(activity); this.f3377a = new VideoWatchAndBrowseRootView(activity); this.f3377a.f3409h = viewGroup; } return this.f3377a; } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
5c6c83ebb063e3a270f345a33810ccf5539ea3bf
25bd4702e2a20e30b89fcaf2d3082a1d904624c5
/src/com/freetymekiyan/algorithms/level/Medium/MinSizeSubarraySum.java
1bb808d932e65063d7c747b0e07aa956c0c993c4
[ "MIT" ]
permissive
yy4869/LeetCode-Sol-Res
50fa558bd219f85c25eb782703c2edf30850d0f1
e8a3dea152d4421ed5b90eb9ec66f53637cb7822
refs/heads/master
2021-01-15T15:04:05.814292
2016-07-20T17:39:09
2016-07-20T17:39:09
63,914,510
1
0
null
2016-07-22T01:42:43
2016-07-22T01:42:42
null
UTF-8
Java
false
false
1,849
java
/** * Given an array of n positive integers and a positive integer s, find the * minimal length of a subarray of which the sum ≥ s. If there isn't one, return * 0 instead. * * For example, given the array [2,3,1,2,4,3] and s = 7, * the subarray [4,3] has the minimal length under the problem constraint. * * More practice: * If you have figured out the O(n) solution, try coding another solution of * which the time complexity is O(n log n). * * Tags: Array, Two Pointers, Binary Search * * Similar Problems: (H) Minimum Window Substring, (E) Maximum Size Subarray Sum * Equals k */ class MinSizeSubarraySum { /** * O(n) */ public int minSubArrayLen(int s, int[] nums) { if (nums == null || nums.length == 0) return 0; int start = 0; int end = 0; int sum = 0; int min = Integer.MAX_VALUE; while (end < nums.length) { sum += nums[end++]; while (sum >= s) { min = Math.min(min, end - start); sum -= nums[start++]; } } return min == Integer.MAX_VALUE ? 0 : min; } /** * O(nlogn) */ public int minSubArrayLen2(int s, int[] nums) { int i = 1; int j = nums.length; int min = 0; while (i <= j) { int mid = (j - i) / 2 + i; if (isWindowExist(mid, nums, s)) { j = mid - 1; min = mid; } else i = mid + 1; } return min; } private boolean isWindowExist(int size, int[] nums, int s) { int sum = 0; for (int i = 0; i < nums.length; i++) { if (i >= size) sum -= nums[i - size]; sum += nums[i]; if (sum >= s) return true; } return false; } }
[ "freetymesunkiyan@gmail.com" ]
freetymesunkiyan@gmail.com
fa3aad4a2b9d0cb36d90cd50a965561f5a7fd0d4
39046f98b04471973b607edc20af7330fe30fec4
/jadx-decompile/rx/subjects/AsyncSubject.java
1d54cd525c51385a340e22788d14481d63f7f913
[]
no_license
riskyend/ThreeSeven
debb62c8f96c26bcd9d1510e60511704c484de92
58b1b4d8fc549c3f4c27aea3b1f55c1ac24140f3
refs/heads/master
2021-01-16T21:35:05.472707
2016-09-11T14:49:22
2016-09-11T14:49:22
68,145,881
1
0
null
null
null
null
UTF-8
Java
false
false
3,794
java
package rx.subjects; import java.util.ArrayList; import java.util.List; import rx.Observable.OnSubscribe; import rx.annotations.Beta; import rx.exceptions.Exceptions; import rx.functions.Action1; import rx.internal.operators.NotificationLite; import rx.internal.producers.SingleProducer; public final class AsyncSubject<T> extends Subject<T, T> { volatile Object lastValue; private final NotificationLite<T> nl; final SubjectSubscriptionManager<T> state; /* renamed from: rx.subjects.AsyncSubject.1 */ static class AnonymousClass1 implements Action1<SubjectObserver<T>> { final /* synthetic */ SubjectSubscriptionManager val$state; AnonymousClass1(SubjectSubscriptionManager subjectSubscriptionManager) { this.val$state = subjectSubscriptionManager; } public void call(SubjectObserver<T> o) { Object v = this.val$state.getLatest(); NotificationLite<T> nl = this.val$state.nl; if (v == null || nl.isCompleted(v)) { o.onCompleted(); } else if (nl.isError(v)) { o.onError(nl.getError(v)); } else { o.actual.setProducer(new SingleProducer(o.actual, nl.getValue(v))); } } } public static <T> AsyncSubject<T> create() { SubjectSubscriptionManager<T> state = new SubjectSubscriptionManager(); state.onTerminated = new AnonymousClass1(state); return new AsyncSubject(state, state); } protected AsyncSubject(OnSubscribe<T> onSubscribe, SubjectSubscriptionManager<T> state) { super(onSubscribe); this.nl = NotificationLite.instance(); this.state = state; } public void onCompleted() { if (this.state.active) { Object last = this.lastValue; if (last == null) { last = this.nl.completed(); } for (SubjectObserver<T> bo : this.state.terminate(last)) { if (last == this.nl.completed()) { bo.onCompleted(); } else { bo.actual.setProducer(new SingleProducer(bo.actual, this.nl.getValue(last))); } } } } public void onError(Throwable e) { if (this.state.active) { List<Throwable> errors = null; for (SubjectObserver<T> bo : this.state.terminate(this.nl.error(e))) { try { bo.onError(e); } catch (Throwable e2) { if (errors == null) { errors = new ArrayList(); } errors.add(e2); } } Exceptions.throwIfAny(errors); } } public void onNext(T v) { this.lastValue = this.nl.next(v); } public boolean hasObservers() { return this.state.observers().length > 0; } @Beta public boolean hasValue() { return !this.nl.isError(this.state.getLatest()) && this.nl.isNext(this.lastValue); } @Beta public boolean hasThrowable() { return this.nl.isError(this.state.getLatest()); } @Beta public boolean hasCompleted() { Object o = this.state.getLatest(); return (o == null || this.nl.isError(o)) ? false : true; } @Beta public T getValue() { Object v = this.lastValue; if (this.nl.isError(this.state.getLatest()) || !this.nl.isNext(v)) { return null; } return this.nl.getValue(v); } @Beta public Throwable getThrowable() { Object o = this.state.getLatest(); if (this.nl.isError(o)) { return this.nl.getError(o); } return null; } }
[ "will748@gmail.com" ]
will748@gmail.com
34f9f7e8eb09f4aec28b261a47f78bb02b5d4a10
68e19b75167f7eb4b0fe564d5b0c6c4ce2fbfdc1
/src/main/java/net/machpi/runelite/influxdb/write/Series.java
68e66d5f7703e1f17d788cc9cd35d28ca5b52bcd
[ "BSD-2-Clause" ]
permissive
while-loop/runelite-influxdb
a84bf0d0e0bc23f78c80d4f849e9ee324f741df9
f6e722e348fea56fe87a1804661fd0b80f857c3b
refs/heads/master
2022-08-20T17:53:43.452619
2020-05-25T06:41:20
2020-05-27T04:21:32
267,596,168
0
0
BSD-2-Clause
2020-05-28T13:22:57
2020-05-28T13:22:56
null
UTF-8
Java
false
false
246
java
package net.machpi.runelite.influxdb.write; import lombok.Builder; import lombok.Singular; import lombok.Value; import java.util.Map; @Value @Builder public class Series { String measurement; @Singular Map<String, String> tags; }
[ "equinoxscripts@gmail.com" ]
equinoxscripts@gmail.com
dd0a8261faa0bc6af1969b34234ba6169416b6d7
f17a8f4dd140532ee10730639f86b62683985c58
/src/main/java/com/cisco/axl/api/_8/XMobileVoiceAccess.java
ae29c6b30db48f3f94413533a09cf0ff97b7cc9c
[ "Apache-2.0" ]
permissive
alexpekurovsky/cucm-http-api
16f1b2f54cff4dcdc57cf6407c2a40ac8302a82a
a1eabf49cc9a05c8293ba07ae97f2fe724a6e24d
refs/heads/master
2021-01-15T14:19:10.994351
2013-04-04T15:32:08
2013-04-04T15:32:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,382
java
package com.cisco.axl.api._8; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for XMobileVoiceAccess complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="XMobileVoiceAccess"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence minOccurs="0"> * &lt;element name="pattern" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="routePartitionName" type="{http://www.cisco.com/AXL/API/8.0}XFkType" minOccurs="0"/> * &lt;element name="locales"> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{http://www.cisco.com/AXL/API/8.0}XCommonMembersExtension"> * &lt;sequence minOccurs="0"> * &lt;element name="locale" type="{http://www.cisco.com/AXL/API/8.0}XMobileVoiceMember" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "XMobileVoiceAccess", propOrder = { "pattern", "routePartitionName", "locales" }) public class XMobileVoiceAccess { protected String pattern; @XmlElementRef(name = "routePartitionName", type = JAXBElement.class) protected JAXBElement<XFkType> routePartitionName; protected XMobileVoiceAccess.Locales locales; /** * Gets the value of the pattern property. * * @return * possible object is * {@link String } * */ public String getPattern() { return pattern; } /** * Sets the value of the pattern property. * * @param value * allowed object is * {@link String } * */ public void setPattern(String value) { this.pattern = value; } /** * Gets the value of the routePartitionName property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link XFkType }{@code >} * */ public JAXBElement<XFkType> getRoutePartitionName() { return routePartitionName; } /** * Sets the value of the routePartitionName property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link XFkType }{@code >} * */ public void setRoutePartitionName(JAXBElement<XFkType> value) { this.routePartitionName = ((JAXBElement<XFkType> ) value); } /** * Gets the value of the locales property. * * @return * possible object is * {@link XMobileVoiceAccess.Locales } * */ public XMobileVoiceAccess.Locales getLocales() { return locales; } /** * Sets the value of the locales property. * * @param value * allowed object is * {@link XMobileVoiceAccess.Locales } * */ public void setLocales(XMobileVoiceAccess.Locales value) { this.locales = value; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;extension base="{http://www.cisco.com/AXL/API/8.0}XCommonMembersExtension"> * &lt;sequence minOccurs="0"> * &lt;element name="locale" type="{http://www.cisco.com/AXL/API/8.0}XMobileVoiceMember" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "locale" }) public static class Locales extends XCommonMembersExtension { protected List<XMobileVoiceMember> locale; /** * Gets the value of the locale 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 locale property. * * <p> * For example, to add a new item, do as follows: * <pre> * getLocale().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link XMobileVoiceMember } * * */ public List<XMobileVoiceMember> getLocale() { if (locale == null) { locale = new ArrayList<XMobileVoiceMember>(); } return this.locale; } } }
[ "martin@filliau.com" ]
martin@filliau.com
7b376977d5b0a7f74182c01f7c3361ca7e641a44
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/cpls/CPL2010U00VsvPaHandler.java
59fdd9ec41814005f976165ff40bc431937b5420
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package nta.med.service.ihis.handler.cpls; import nta.med.data.dao.medi.cpl.Cpl2010Repository; import nta.med.core.infrastructure.socket.handler.ScreenHandler; import nta.med.service.ihis.proto.CplsServiceProto; import nta.med.service.ihis.proto.CplsServiceProto.CPL2010U00VsvPaRequest; import nta.med.service.ihis.proto.CplsServiceProto.CPL2010U00VsvPaResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.vertx.java.core.Vertx; import javax.annotation.Resource; import java.util.List; @Service @Scope("prototype") public class CPL2010U00VsvPaHandler extends ScreenHandler<CplsServiceProto.CPL2010U00VsvPaRequest, CplsServiceProto.CPL2010U00VsvPaResponse> { private static final Log LOGGER = LogFactory.getLog(CPL2010U00VsvPaHandler.class); @Resource private Cpl2010Repository cpl2010Repository; @Override @Transactional(readOnly = true) public CPL2010U00VsvPaResponse handle(Vertx vertx, String clientId, String sessionId, long contextId, CPL2010U00VsvPaRequest request) throws Exception { CplsServiceProto.CPL2010U00VsvPaResponse.Builder response = CplsServiceProto.CPL2010U00VsvPaResponse.newBuilder(); //get SunameVsvPa List<String> sunameVsvPa = cpl2010Repository.getSunameVsvPa(getHospitalCode(vertx, sessionId), request.getBunho()); if(!CollectionUtils.isEmpty(sunameVsvPa)){ response.setSuName(sunameVsvPa.get(0)); } return response.build(); } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
4d0869c1d87e34b4128a78a6f95aff9b9d0c5ede
13dfd110df6cccc7ed5ce992ba5e7eadc56a42af
/sm-shop-model/src/main/java/com/salesmanager/shop/model/catalog/product/attribute/api/ReadableProductOptionList.java
c3999460ff3545d8faf96a71adf678534de69d64
[]
no_license
ajaytiwari000/Habbit
24ca9455f0200e648640079945a04b01918dac7b
1ccff760c0a17515748cdc7c9d133fae71b8d937
refs/heads/master
2023-03-21T11:32:26.708784
2021-03-12T07:38:02
2021-03-12T07:38:02
265,888,454
1
0
null
null
null
null
UTF-8
Java
false
false
588
java
package com.salesmanager.shop.model.catalog.product.attribute.api; import com.salesmanager.shop.model.entity.ReadableList; import java.util.ArrayList; import java.util.List; public class ReadableProductOptionList extends ReadableList { /** */ private static final long serialVersionUID = 1L; private List<ReadableProductOptionEntity> options = new ArrayList<ReadableProductOptionEntity>(); public List<ReadableProductOptionEntity> getOptions() { return options; } public void setOptions(List<ReadableProductOptionEntity> options) { this.options = options; } }
[ "ajaytiwari000@gmail.com" ]
ajaytiwari000@gmail.com
ee428ff88770b7baa52d435987d806083308dfe7
2da87d8ef7afa718de7efa72e16848799c73029f
/ikep4-collpack/src/main/java/com/lgcns/ikep4/collpack/kms/board/dao/impl/BoardItemVersionDaoImpl.java
7e9c76db7f1e3c406863f89b9ed2f8189b508b89
[]
no_license
haifeiforwork/ehr-moo
d3ee29e2cae688f343164384958f3560255e52b2
921ff597b316a9a0111ed4db1d5b63b88838d331
refs/heads/master
2020-05-03T02:34:00.078388
2018-04-05T00:54:04
2018-04-05T00:54:04
178,373,434
0
1
null
2019-03-29T09:21:01
2019-03-29T09:21:01
null
UTF-8
Java
false
false
3,059
java
/* * Copyright (C) 2011 LG CNS Inc. * All rights reserved. * * 모든 권한은 LG CNS(http://www.lgcns.com)에 있으며, * LG CNS의 허락없이 소스 및 이진형식으로 재배포, 사용하는 행위를 금지합니다. */ package com.lgcns.ikep4.collpack.kms.board.dao.impl; import java.util.List; import org.springframework.stereotype.Repository; import com.lgcns.ikep4.collpack.kms.board.dao.BoardItemVersionDao; import com.lgcns.ikep4.collpack.kms.board.model.BoardItemVersion; import com.lgcns.ikep4.collpack.kms.board.search.BoardItemVersionSearchCondition; import com.lgcns.ikep4.framework.core.dao.ibatis.GenericDaoSqlmap; /** * TODO Javadoc주석작성 * * @author happyi1018 * @version $Id: BoardItemVersionDaoImpl.java 16295 2011-08-19 07:49:49Z giljae $ */ @Repository("kmsBoardItemVersionDaoImpl") public class BoardItemVersionDaoImpl extends GenericDaoSqlmap<BoardItemVersion, String> implements BoardItemVersionDao { private static final String NAMESPACE = "collpack.kms.board.dao.boardItemVersion."; /** * 버전 게시물 조회 */ public BoardItemVersion get(String itemId) { return (BoardItemVersion) this.sqlSelectForObject(NAMESPACE + "get", itemId); } /** * 버전 게시물 조회 */ public BoardItemVersion getVersionItem(String versionId) { return (BoardItemVersion) this.sqlSelectForObject(NAMESPACE + "getVersionItem", versionId); } /** * 버전 게시물 조회 - 버전 최근 1개 */ public BoardItemVersion getMaxVersionId(String itemId) { return (BoardItemVersion) this.sqlSelectForObject(NAMESPACE + "getMaxVersionId", itemId); } /** * 버전 게시물 존재유무 */ public boolean exists(String itemId) { Integer count = (Integer)this.sqlSelectForObject(NAMESPACE + "exists", itemId); return count > 0; } /** * 버전 정보 등록 */ public String create(BoardItemVersion object) { this.sqlInsert(NAMESPACE + "create", object); return object.getVersionId(); } public void update(BoardItemVersion object) { // TODO Auto-generated method stub } /** * 버전 정보 삭제 */ public void physicalDelete(String itemId) { this.sqlDelete(NAMESPACE + "physicalDelete", itemId); } /** * 버전 게시물 하위 삭제 */ public void physicalDeleteThread(String itemId) { this.sqlDelete(NAMESPACE + "physicalDeleteThread", itemId); } /** * 버전 게시물 목록 */ public List<BoardItemVersion> listBySearchCondition(BoardItemVersionSearchCondition searchCondition) { return (List<BoardItemVersion>)this.sqlSelectForList(NAMESPACE + "listBySearchCondition", searchCondition); } /** * 버전 게시물 갯수 */ public Integer countBySearchCondition(BoardItemVersionSearchCondition searchCondition) { return (Integer)this.sqlSelectForObject(NAMESPACE + "countBySearchCondition", searchCondition); } /* (non-Javadoc) * @see com.lgcns.ikep4.framework.core.dao.GenericDao#remove(java.io.Serializable) */ public void remove(String id) { // TODO Auto-generated method stub } }
[ "haneul9@gmail.com" ]
haneul9@gmail.com
9cdf1e60a301fc72e53ee815a5514f516d49ff9e
737b0fc040333ec26f50409fc16372f5c64c7df6
/bus-gitlab/src/main/java/org/aoju/bus/gitlab/Oauth2LoginStreamingOutput.java
84551107c0679ec39e79692fd5374b05adc7aca3
[ "MIT" ]
permissive
sfg11/bus
1714cdc6c77f0042e3b80f32e1d9b7483c154e3e
d560ba4d3abd2e0a6c5dfda9faf7075da8e8d73e
refs/heads/master
2022-12-13T02:26:18.533039
2020-08-26T02:23:34
2020-08-26T02:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,123
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2020 aoju.org Greg Messner and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.gitlab; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.StreamingOutput; import java.io.*; import java.nio.charset.StandardCharsets; /** * This StreamingOutput implementation is utilized to send a OAuth2 token request * in a secure manner. The password is never copied to a String, instead it is * contained in a SecretString that is cleared when an instance of this class is finalized. * * @author Kimi Liu * @version 6.0.8 * @since JDK 1.8+ */ public class Oauth2LoginStreamingOutput implements StreamingOutput, AutoCloseable { private final String username; private final SecretString password; public Oauth2LoginStreamingOutput(String username, CharSequence password) { this.username = username; this.password = new SecretString(password); } public Oauth2LoginStreamingOutput(String username, char[] password) { this.username = username; this.password = new SecretString(password); } @Override public void write(OutputStream output) throws IOException, WebApplicationException { Writer writer = new BufferedWriter(new OutputStreamWriter(output, StandardCharsets.UTF_8)); writer.write("{ "); writer.write("\"grant_type\": \"password\", "); writer.write("\"username\": \"" + username + "\", "); writer.write("\"password\": "); // Output the quoted password writer.write('"'); for (int i = 0, length = password.length(); i < length; i++) { char c = password.charAt(i); if (c == '"' || c == '\\') { writer.write('\\'); } writer.write(c); } writer.write('"'); writer.write(" }"); writer.flush(); writer.close(); } /** * Clears the contained password's data. */ public void clearPassword() { password.clear(); } @Override public void close() { clearPassword(); } @Override public void finalize() throws Throwable { clearPassword(); super.finalize(); } }
[ "839536@qq.com" ]
839536@qq.com
994eade35987507771c797095c3fdc2b726b691c
81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13
/src/com/crashlytics/android/core/CrashlyticsMissingDependencyException.java
9b9629ca444f3cf31d9d6f4766e5d0ee5fded2b6
[]
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
592
java
package com.crashlytics.android.core; public class CrashlyticsMissingDependencyException extends RuntimeException { private static final long serialVersionUID = -1151536370019872859L; CrashlyticsMissingDependencyException(String paramString) { super(buildExceptionMessage(paramString)); } private static String buildExceptionMessage(String paramString) { return "\n" + paramString + "\n"; } } /* Location: * Qualified Name: com.crashlytics.android.core.CrashlyticsMissingDependencyException * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
280b8ee6279b4c8ebea89672205c8873a0bf9e9f
a1e49f5edd122b211bace752b5fb1bd5c970696b
/projects/org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/OpPlus.java
eb1f55c82ae9e33032aed88905d32e9a155fef51
[ "Apache-2.0" ]
permissive
savster97/springframework-3.0.5
4f86467e2456e5e0652de9f846f0eaefc3214cfa
34cffc70e25233ed97e2ddd24265ea20f5f88957
refs/heads/master
2020-04-26T08:48:34.978350
2019-01-22T14:45:38
2019-01-22T14:45:38
173,434,995
0
0
Apache-2.0
2019-03-02T10:37:13
2019-03-02T10:37:12
null
UTF-8
Java
false
false
3,867
java
/* * Copyright 2002-2009 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.expression.spel.ast; import org.springframework.expression.EvaluationException; import org.springframework.expression.Operation; import org.springframework.expression.TypedValue; import org.springframework.expression.spel.ExpressionState; /** * The plus operator will: * <ul> * <li>add doubles (floats are represented as doubles) * <li>add longs * <li>add integers * <li>concatenate strings * </ul> * It can be used as a unary operator for numbers (double/long/int). The standard promotions are performed * when the operand types vary (double+int=double). For other options it defers to the registered overloader. * * @author Andy Clement * @since 3.0 */ public class OpPlus extends Operator { public OpPlus(int pos, SpelNodeImpl... operands) { super("+", pos, operands); } @Override public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { SpelNodeImpl leftOp = getLeftOperand(); SpelNodeImpl rightOp = getRightOperand(); if (rightOp == null) { // If only one operand, then this is unary plus Object operandOne = leftOp.getValueInternal(state).getValue(); if (operandOne instanceof Number) { if (operandOne instanceof Double) { return new TypedValue(((Double) operandOne).doubleValue()); } else if (operandOne instanceof Long) { return new TypedValue(((Long) operandOne).longValue()); } else { return new TypedValue(((Integer) operandOne).intValue()); } } return state.operate(Operation.ADD, operandOne, null); } else { Object operandOne = leftOp.getValueInternal(state).getValue(); Object operandTwo = rightOp.getValueInternal(state).getValue(); if (operandOne instanceof Number && operandTwo instanceof Number) { Number op1 = (Number) operandOne; Number op2 = (Number) operandTwo; if (op1 instanceof Double || op2 instanceof Double) { return new TypedValue(op1.doubleValue() + op2.doubleValue()); } else if (op1 instanceof Long || op2 instanceof Long) { return new TypedValue(op1.longValue() + op2.longValue()); } else { // TODO what about overflow? return new TypedValue(op1.intValue() + op2.intValue()); } } else if (operandOne instanceof String && operandTwo instanceof String) { return new TypedValue(new StringBuilder((String) operandOne).append((String) operandTwo).toString()); } else if (operandOne instanceof String) { StringBuilder result = new StringBuilder((String)operandOne); result.append((operandTwo==null?"null":operandTwo.toString())); return new TypedValue(result.toString()); } else if (operandTwo instanceof String) { StringBuilder result = new StringBuilder((operandOne==null?"null":operandOne.toString())); result.append((String)operandTwo); return new TypedValue(result.toString()); } return state.operate(Operation.ADD, operandOne, operandTwo); } } @Override public String toStringAST() { if (children.length<2) { // unary plus return new StringBuilder().append("+").append(getLeftOperand().toStringAST()).toString(); } return super.toStringAST(); } public SpelNodeImpl getRightOperand() { if (children.length<2) {return null;} return children[1]; } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
e7fe072c6c7b60601bc0a5938f6e275250e729a6
c98ded3f6de5a1bb91c7930cd090208fbee0081f
/skWeiChatBaidu/src/main/java/com/sk/weichat/view/AllowTypeDialog.java
7f82a392e44108c13a0f0417ad2d32671e47dece
[]
no_license
GJF19981210/IM_Android
e628190bb504b52ec04e8beaf5449bd847904c84
7743586eac5ca07d1a7e9a2d4b2cc24d68a082ac
refs/heads/master
2023-01-01T11:15:42.085782
2020-10-19T07:10:43
2020-10-19T07:10:43
305,293,872
2
0
null
null
null
null
UTF-8
Java
false
false
2,873
java
package com.sk.weichat.view; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.TextView; import com.sk.weichat.R; import com.sk.weichat.Reporter; import com.sk.weichat.util.ScreenUtil; /** * 隐私设置里各种允许范围相关的设置使用的底部对话框, */ public class AllowTypeDialog extends Dialog implements View.OnClickListener { private TextView tv1, tv2, tv3, tv4; private OnAllowTypeClickListener listener; public AllowTypeDialog(Context context, OnAllowTypeClickListener onAllowTypeClickListener) { super(context, R.style.BottomDialog); this.listener = onAllowTypeClickListener; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.allow_type_dialog); setCanceledOnTouchOutside(true); initView(); } private void initView() { tv1 = (TextView) findViewById(R.id.tv1); tv2 = (TextView) findViewById(R.id.tv2); tv3 = (TextView) findViewById(R.id.tv3); tv4 = (TextView) findViewById(R.id.tv4); tv1.setOnClickListener(this); tv2.setOnClickListener(this); tv3.setOnClickListener(this); tv4.setOnClickListener(this); findViewById(R.id.tvAllow).setOnClickListener(this); findViewById(R.id.tvBlock).setOnClickListener(this); Window o = getWindow(); WindowManager.LayoutParams lp = o.getAttributes(); // x/y坐标 // lp.x = 100; // lp.y = 100; lp.width = ScreenUtil.getScreenWidth(getContext()); o.setAttributes(lp); this.getWindow().setGravity(Gravity.BOTTOM); this.getWindow().setWindowAnimations(R.style.BottomDialog_Animation); } @Override public void onClick(View v) { dismiss(); int value; switch (v.getId()) { case R.id.tv1: value = -1; break; case R.id.tv2: value = 1; break; case R.id.tv3: value = 2; break; case R.id.tv4: value = 3; break; case R.id.tvAllow: listener.onWhitelistClick(); return; case R.id.tvBlock: listener.onBlacklistClick(); return; default: Reporter.unreachable(); return; } listener.onNewValueClick(value); } public interface OnAllowTypeClickListener { void onNewValueClick(int value); void onWhitelistClick(); void onBlacklistClick(); } }
[ "2937717941@qq.com" ]
2937717941@qq.com
a659a4ab97af8cfc83ec443504e3da9dc4ce906d
00d71dc599df8d32c30271d1543526d4d538eef2
/processor/src/main/java/com/dslplatform/json/AnnotationCompiler.java
31e38a12709134d6cbc4218cd6cee3394042cb2a
[]
no_license
fabienrenaud/dsl-json
ba7ff78d2feb2e3a53a7fe61afbcc5f36417c1a9
9cfc123e1d6dce42d9ecd577c6c074d66347d920
refs/heads/master
2021-01-24T01:00:38.345176
2018-02-20T21:36:02
2018-02-21T19:14:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,865
java
package com.dslplatform.json; import com.dslplatform.compiler.client.*; import com.dslplatform.compiler.client.parameters.*; import javax.annotation.processing.Messager; import javax.tools.Diagnostic; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.List; abstract class AnnotationCompiler { static class CompileOptions { boolean useJodaTime; boolean useAndroid; String namespace; String compiler; } enum LogLevel { DEBUG(0), INFO(1), ERRORS(2), NONE(3); private final int level; LogLevel(int level) { this.level = level; } public boolean isVisible(LogLevel other) { return other.level <= this.level; } } private static class DslContext extends Context { private Messager messager; private LogLevel logLevel; DslContext(Messager messager, LogLevel logLevel) { this.messager = messager; this.logLevel = logLevel; } public void show(String... values) { if (LogLevel.INFO.isVisible(logLevel)) { for (String v : values) { messager.printMessage(Diagnostic.Kind.OTHER, v); } } } public void log(String value) { if (LogLevel.DEBUG.isVisible(logLevel)) { messager.printMessage(Diagnostic.Kind.OTHER, value); } } public void log(char[] value, int len) { if (LogLevel.DEBUG.isVisible(logLevel)) { messager.printMessage(Diagnostic.Kind.OTHER, new String(value, 0, len)); } } public void warning(String value) { if (LogLevel.INFO.isVisible(logLevel)) { messager.printMessage(Diagnostic.Kind.WARNING, value); } } public void warning(Exception ex) { if (LogLevel.INFO.isVisible(logLevel)) { messager.printMessage(Diagnostic.Kind.WARNING, ex.getMessage()); } } public void error(String value) { if (LogLevel.ERRORS.isVisible(logLevel)) { messager.printMessage(Diagnostic.Kind.ERROR, value); } } public void error(Exception ex) { if (LogLevel.ERRORS.isVisible(logLevel)) { messager.printMessage(Diagnostic.Kind.ERROR, ex.getMessage()); } } } static String buildExternalJson(String dsl, CompileOptions options, LogLevel logLevel, Messager messager) throws IOException { File temp = File.createTempFile("annotation-", ".dsl"); try { FileOutputStream fos = new FileOutputStream(temp); fos.write(dsl.getBytes()); fos.close(); DslContext ctx = new DslContext(messager, logLevel); Targets.Option target = options.useAndroid ? Targets.Option.ANDORID_EXTERNAL_JSON : Targets.Option.JAVA_EXTERNAL_JSON; ctx.put("library:" + Targets.Option.JAVA_EXTERNAL_JSON.toString(), "1.5.0"); ctx.put(target.toString(), null); ctx.put(DslPath.INSTANCE, temp.getAbsolutePath()); ctx.put(DisablePrompt.INSTANCE, null); ctx.put(Settings.Option.SOURCE_ONLY.toString(), null); ctx.put(Settings.Option.MANUAL_JSON.toString(), null); if (options.useJodaTime) { ctx.put(Settings.Option.JODA_TIME.toString(), null); } ctx.put(Namespace.INSTANCE, options.namespace); if (options.compiler != null && options.compiler.length() > 0) { File compiler = new File(options.compiler); if (!compiler.exists()) { throw new IOException("DSL compiler specified with dsljson.compiler option not found. Check used option: " + options.compiler); } else if (compiler.isDirectory()) { throw new IOException("DSL compiler specified with dsljson.compiler option is an folder. Please specify file instead: " + options.compiler); } } else { File compiler = new File("dsl-compiler.exe"); if (!compiler.exists()) { ctx.put(Download.INSTANCE, null); } } ctx.put(DslCompiler.INSTANCE, options.compiler); List<CompileParameter> parameters = Main.initializeParameters(ctx, "."); if (!Main.processContext(ctx, parameters)) { if (logLevel != LogLevel.DEBUG) { throw new IOException("Unable to setup DSL-JSON processing environment. Specify dsljson.loglevel=DEBUG for more information."); } else { throw new IOException("Unable to setup DSL-JSON processing environment. Inspect javac output log for more information."); } } File projectPath = TempPath.getTempProjectPath(ctx); File rootPackage = new File(new File(projectPath, target.name()), options.namespace); File jsonFolder = new File(rootPackage, "json"); Either<String> content = Utils.readFile(new File(jsonFolder, "ExternalSerialization.java")); if (!content.isSuccess()) { throw new IOException(content.whyNot()); } return content.get(); } finally { if (!temp.delete() && logLevel != LogLevel.NONE) { messager.printMessage(Diagnostic.Kind.WARNING, "Unable to delete temporary file: " + temp.getAbsolutePath()); } } } }
[ "rikard@ngs.hr" ]
rikard@ngs.hr
0d7a0164b81849014bb1949c3ca0e82a275eb297
447520f40e82a060368a0802a391697bc00be96f
/apks/playstore_apps/com_grppl_android_shell_halifax/source/com/google/android/gms/maps/Projection.java
26fa27688cc3f8f1e9880f2dbd9976301c886263
[ "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
1,449
java
package com.google.android.gms.maps; import android.graphics.Point; import android.os.RemoteException; import com.google.android.gms.dynamic.zze; import com.google.android.gms.maps.internal.IProjectionDelegate; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.RuntimeRemoteException; import com.google.android.gms.maps.model.VisibleRegion; public final class Projection { private final IProjectionDelegate zzbob; Projection(IProjectionDelegate paramIProjectionDelegate) { this.zzbob = paramIProjectionDelegate; } public LatLng fromScreenLocation(Point paramPoint) { try { paramPoint = this.zzbob.fromScreenLocation(zze.zzA(paramPoint)); return paramPoint; } catch (RemoteException paramPoint) { throw new RuntimeRemoteException(paramPoint); } } public VisibleRegion getVisibleRegion() { try { VisibleRegion localVisibleRegion = this.zzbob.getVisibleRegion(); return localVisibleRegion; } catch (RemoteException localRemoteException) { throw new RuntimeRemoteException(localRemoteException); } } public Point toScreenLocation(LatLng paramLatLng) { try { paramLatLng = (Point)zze.zzE(this.zzbob.toScreenLocation(paramLatLng)); return paramLatLng; } catch (RemoteException paramLatLng) { throw new RuntimeRemoteException(paramLatLng); } } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
91711c43efbb5da2640558ed92567171b48fd6f6
2148a0f14418ac28ea9780706173308d72a2ae2d
/src/protocol47/java/org/topdank/minenet/protocols/v47/packets/login/server/PacketLS01EncryptionRequest.java
b8808e84330029df3b27908347ef3ac81e2eb8c2
[]
no_license
t81lal/mcbot
85831a0a62c49c5142114bfdeaf85362b5d502a2
de6f8ca7879e3d83e253d2f6fbf9ecfb263462fb
refs/heads/master
2022-06-03T06:16:29.541751
2015-12-24T19:46:30
2015-12-24T19:46:30
229,469,980
0
0
null
2022-05-20T21:19:45
2019-12-21T18:53:48
Java
UTF-8
Java
false
false
1,350
java
package org.topdank.minenet.protocols.v47.packets.login.server; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.KeyFactory; import java.security.PublicKey; import java.security.spec.X509EncodedKeySpec; import org.topdank.bot.net.io.ReadableInput; import org.topdank.bot.net.packet.IdentifiableReadablePacket; public class PacketLS01EncryptionRequest implements IdentifiableReadablePacket { private String serverId; private PublicKey publicKey; private byte[] verifyToken; // called via reflection public PacketLS01EncryptionRequest() { } public String getServerId() { return serverId; } public PublicKey getPublicKey() { return publicKey; } public byte[] getVerifyToken() { return verifyToken; } @Override public void read(ReadableInput in) throws IOException { serverId = in.readString(); byte[] bytes = in.readBytes(in.readVarInt()); try { publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(bytes)); } catch (GeneralSecurityException e) { throw new IOException("Could not decrypt public key.", e); } verifyToken = in.readBytes(in.readVarInt()); } @Override public boolean isPriorityPacket() { return true; } @Override public int getId() { return 0x01; } }
[ "GenerallyCool@hotmail.com" ]
GenerallyCool@hotmail.com
e73754f60174fc0acbaf85129e6fbb8c438c371c
945a38d4fc4885a4db1c4e3a91cac07578d7dcfe
/g4-core/src/main/java/org/g4studio/core/orm/xibatis/common/io/ReaderInputStream.java
44bf45a7b17f0fe3ecdacdd168fc4f7b300d2878
[]
no_license
hongweichang/mg4
3b8a71809fb76193cb862a455fc2adc9d5804a72
edb9a3d56a35cb77abfcf650967c65f3338c3aee
refs/heads/master
2020-12-29T00:25:38.105899
2014-03-05T07:00:27
2014-03-05T07:00:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,724
java
package org.g4studio.core.orm.xibatis.common.io; import java.io.*; /** * An InputStream backed by a Reader */ public class ReaderInputStream extends InputStream { protected Reader reader; protected ByteArrayOutputStream byteArrayOut; protected Writer writer; protected char[] chars; protected byte[] buffer; protected int index, length; /** * Constructor to supply a Reader * * @param reader - the Reader used by the InputStream */ public ReaderInputStream(Reader reader) { this.reader = reader; byteArrayOut = new ByteArrayOutputStream(); writer = new OutputStreamWriter(byteArrayOut); chars = new char[1024]; } /** * Constructor to supply a Reader and an encoding * * @param reader - the Reader used by the InputStream * @param encoding - the encoding to use for the InputStream * @throws UnsupportedEncodingException if the encoding is not supported */ public ReaderInputStream(Reader reader, String encoding) throws UnsupportedEncodingException { this.reader = reader; byteArrayOut = new ByteArrayOutputStream(); writer = new OutputStreamWriter(byteArrayOut, encoding); chars = new char[1024]; } /** * @see java.io.InputStream#read() */ public int read() throws IOException { if (index >= length) fillBuffer(); if (index >= length) return -1; return 0xff & buffer[index++]; } protected void fillBuffer() throws IOException { if (length < 0) return; int numChars = reader.read(chars); if (numChars < 0) { length = -1; } else { byteArrayOut.reset(); writer.write(chars, 0, numChars); writer.flush(); buffer = byteArrayOut.toByteArray(); length = buffer.length; index = 0; } } /** * @see java.io.InputStream#read(byte[], int, int) */ public int read(byte[] data, int off, int len) throws IOException { if (index >= length) fillBuffer(); if (index >= length) return -1; int amount = Math.min(len, length - index); System.arraycopy(buffer, index, data, off, amount); index += amount; return amount; } /** * @see java.io.InputStream#available() */ public int available() throws IOException { return (index < length) ? length - index : ((length >= 0) && reader.ready()) ? 1 : 0; } /** * @see java.io.InputStream#close() */ public void close() throws IOException { reader.close(); } }
[ "javajiao@126.com" ]
javajiao@126.com
8ec01adc67bea26572b0645a1cc6cc08f6c353f2
0aba4095973d9b913d9ef1c887fedcd7d28b78a2
/bpms-deploy-automation/src/main/java/it/redhat/demo/model/MavenGavInfo.java
0502277d7a5be1591d2badb9c915fba6eef7bb55
[]
no_license
fax4ever/bpms-play
622a30b76959da7df8188ffd1a63cf612721f7b8
42ab4662707774dd8f2c6d40374e2d354f839aef
refs/heads/master
2021-01-20T18:52:36.626768
2018-01-17T11:07:39
2018-01-17T11:07:39
64,293,118
2
3
null
null
null
null
UTF-8
Java
false
false
2,822
java
package it.redhat.demo.model; import java.io.Serializable; import java.util.regex.Matcher; import java.util.regex.Pattern; public class MavenGavInfo implements Serializable { /** * */ private static final long serialVersionUID = 684583322034576559L; public final static String VERSION_REGEX = "(\\d+).(\\d+).(\\d+)(-SNAPSHOT)?"; public enum Affinity { DIFFERENT_ARTIFACT(0), DIFFERENT_MAJOR(1), DIFFERENT_MINOR(2), DIFFERNT_MINI(3), DIFFERNT_SNAPSHOT(4), EQUALS(5); private final int value; Affinity(int value) { this.value = value; } public int getValue() { return value; } public boolean isGreater(Affinity other) { return value > other.getValue(); } } private String groupId; private String artifactId; private String version; private int majorVersion; private int minorVersion; private int miniVersion; private boolean snapshot; public MavenGavInfo(String groupId, String artifactId, String version) { this.groupId = groupId; this.artifactId = artifactId; this.version = version; Pattern pattern = Pattern.compile(VERSION_REGEX); Matcher matcher = pattern.matcher(version); if (!matcher.matches()) { throw new RuntimeException("invalid maven version: " + version); } majorVersion = Integer.parseInt(matcher.group(1)); minorVersion = Integer.parseInt(matcher.group(2)); miniVersion = Integer.parseInt(matcher.group(3)); snapshot = (matcher.group(4) != null); } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public int getMajorVersion() { return majorVersion; } public int getMinorVersion() { return minorVersion; } public int getMiniVersion() { return miniVersion; } public boolean isSnapshot() { return snapshot; } public Affinity affinity(MavenGavInfo other) { if (!artifactId.equals(other.getArtifactId()) || !groupId.equals(other.getGroupId())) { return Affinity.DIFFERENT_ARTIFACT; } if (majorVersion != other.getMajorVersion()) { return Affinity.DIFFERENT_MAJOR; } if (minorVersion != other.getMinorVersion()) { return Affinity.DIFFERENT_MINOR; } if (miniVersion != other.getMiniVersion()) { return Affinity.DIFFERNT_MINI; } if (snapshot != other.isSnapshot()) { return Affinity.DIFFERNT_SNAPSHOT; } return Affinity.EQUALS; } public boolean greterMini(MavenGavInfo other) { return miniVersion > other.getMiniVersion(); } @Override public String toString() { return "MavenGavInfo [groupId=" + groupId + ", artifactId=" + artifactId + ", majorVersion=" + majorVersion + ", minorVersion=" + minorVersion + ", miniVersion=" + miniVersion + ", snapshot=" + snapshot + "]"; } public String getGav() { return groupId + ":" + artifactId + ":" + version; } }
[ "fabiomassimo.ercoli@gmail.com" ]
fabiomassimo.ercoli@gmail.com
aad6d48dc9064f6dbf61050d7374af5ab270fcca
5f6d246b5cad60e0fa90638bee814bd59c1585d8
/module_mvvm/src/main/java/com/bubing/mvvm/base/BaseFragment.java
890ea42ea9ea0ef01b9f8b205d254cdf221d4375
[]
no_license
General757/BubingMvvmAndroid
5b0d91c0fdbd10aa077f97e3c0e85a041cd55d73
4f9060904d918d6ec4d08fa2fb83695e26ed8922
refs/heads/master
2022-11-30T17:18:16.626612
2020-08-11T09:28:17
2020-08-11T09:28:17
286,701,962
0
0
null
null
null
null
UTF-8
Java
false
false
8,457
java
package com.bubing.mvvm.base; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.Nullable; import androidx.databinding.DataBindingUtil; import androidx.databinding.ViewDataBinding; import androidx.fragment.app.Fragment; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModel; import androidx.lifecycle.ViewModelProviders; import com.afollestad.materialdialogs.MaterialDialog; import com.bubing.mvvm.bus.Messenger; import com.bubing.mvvm.utils.MaterialDialogUtils; import com.trello.rxlifecycle2.components.support.RxFragment; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.Map; /** * @ClassName: BaseFragment * @Description: java类作用描述 * @Author: Bubing * @Date: 2020/8/3 1:39 PM */ public abstract class BaseFragment<V extends ViewDataBinding, VM extends BaseViewModel> extends RxFragment implements IBaseView { protected V binding; protected VM viewModel; private int viewModelId; private MaterialDialog dialog; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initParam(); } @Override public void onDestroy() { super.onDestroy(); } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, initContentView(inflater, container, savedInstanceState), container, false); return binding.getRoot(); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); //私有的初始化Databinding和ViewModel方法 initViewDataBinding(); //私有的ViewModel与View的契约事件回调逻辑 registorUIChangeLiveDataCallBack(); //页面数据初始化方法 initData(); //页面事件监听的方法,一般用于ViewModel层转到View层的事件注册 initViewObservable(); //注册RxBus viewModel.registerRxBus(); } @Override public void onDestroyView() { super.onDestroyView(); //解除Messenger注册 Messenger.getDefault().unregister(viewModel); if (viewModel != null) viewModel.removeRxBus(); if (binding != null) binding.unbind(); } /** * 注入绑定 */ private void initViewDataBinding() { viewModelId = initVariableId(); viewModel = initViewModel(); if (viewModel == null) { Class modelClass; Type type = getClass().getGenericSuperclass(); if (type instanceof ParameterizedType) modelClass = (Class) ((ParameterizedType) type).getActualTypeArguments()[1]; else //如果没有指定泛型参数,则默认使用BaseViewModel modelClass = BaseViewModel.class; viewModel = (VM) createViewModel(this, modelClass); } binding.setVariable(viewModelId, viewModel); //支持LiveData绑定xml,数据改变,UI自动会更新 binding.setLifecycleOwner(this); //让ViewModel拥有View的生命周期感应 getLifecycle().addObserver(viewModel); //注入RxLifecycle生命周期 viewModel.injectLifecycleProvider(this); } //刷新布局 public void refreshLayout() { if (viewModel != null) binding.setVariable(viewModelId, viewModel); } @Override public void initParam() { } /** * 初始化根布局 * * @return 布局layout的id */ public abstract int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState); /** * 初始化ViewModel的id * * @return BR的id */ public abstract int initVariableId(); /** * 初始化ViewModel * * @return 继承BaseViewModel的ViewModel */ public VM initViewModel() { return null; } @Override public void initData() { } @Override public void initViewObservable() { } public boolean isBackPressed() { return false; } /** * 创建ViewModel * * @param cls * @param <T> * @return */ public <T extends ViewModel> T createViewModel(Fragment fragment, Class<T> cls) { return ViewModelProviders.of(fragment).get(cls); } //================================================ //注册ViewModel与View的契约UI回调事件 protected void registorUIChangeLiveDataCallBack() { //加载对话框显示 viewModel.getUC().getShowDialogEvent().observe(this, new Observer<String>() { @Override public void onChanged(@Nullable String title) { showDialog(title); } }); //加载对话框消失 viewModel.getUC().getDismissDialogEvent().observe(this, new Observer<Void>() { @Override public void onChanged(@Nullable Void v) { dismissDialog(); } }); //跳入新页面 viewModel.getUC().getStartActivityEvent().observe(this, new Observer<Map<String, Object>>() { @Override public void onChanged(@Nullable Map<String, Object> params) { Class<?> clz = (Class<?>) params.get(BaseViewModel.ParameterField.CLASS); Bundle bundle = (Bundle) params.get(BaseViewModel.ParameterField.BUNDLE); startActivity(clz, bundle); } }); //跳入ContainerActivity viewModel.getUC().getStartContainerActivityEvent().observe(this, new Observer<Map<String, Object>>() { @Override public void onChanged(@Nullable Map<String, Object> params) { String canonicalName = (String) params.get(BaseViewModel.ParameterField.CANONICAL_NAME); Bundle bundle = (Bundle) params.get(BaseViewModel.ParameterField.BUNDLE); startContainerActivity(canonicalName, bundle); } }); //关闭界面 viewModel.getUC().getFinishEvent().observe(this, new Observer<Void>() { @Override public void onChanged(@Nullable Void v) { getActivity().finish(); } }); //关闭上一层 viewModel.getUC().getOnBackPressedEvent().observe(this, new Observer<Void>() { @Override public void onChanged(@Nullable Void v) { getActivity().onBackPressed(); } }); } public void showDialog(String title) { if (dialog != null) { dialog = dialog.getBuilder().title(title).build(); dialog.show(); } else { MaterialDialog.Builder builder = MaterialDialogUtils.showIndeterminateProgressDialog(getActivity(), title, true); dialog = builder.show(); } } public void dismissDialog() { if (dialog != null && dialog.isShowing()) dialog.dismiss(); } public void startActivity(Class<?> clz) { startActivity(new Intent(getContext(), clz)); } /** * 跳转页面 * * @param clz 所跳转的目的Activity类 * @param bundle 跳转所携带的信息 */ public void startActivity(Class<?> clz, Bundle bundle) { Intent intent = new Intent(getContext(), clz); if (bundle != null) intent.putExtras(bundle); startActivity(intent); } public void startContainerActivity(String canonicalName) { startContainerActivity(canonicalName, null); } /** * 跳转容器页面 * * @param canonicalName 规范名 : Fragment.class.getCanonicalName() * @param bundle 跳转所携带的信息 */ public void startContainerActivity(String canonicalName, Bundle bundle) { Intent intent = new Intent(getContext(), ContainerActivity.class); intent.putExtra(ContainerActivity.FRAGMENT, canonicalName); if (bundle != null) intent.putExtra(ContainerActivity.BUNDLE, bundle); startActivity(intent); } }
[ "1183561804@qq.com" ]
1183561804@qq.com
a0cc01107ee1ad89ceb6a3d5b07589abca64520f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-39b-2-12-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/lang3/StringUtils_ESTest.java
db3340d254ade386ebd9777b451cad29075186f3
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
808
java
/* * This file was automatically generated by EvoSuite * Mon Apr 06 05:53:26 UTC 2020 */ package org.apache.commons.lang3; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.lang3.StringUtils; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class StringUtils_ESTest extends StringUtils_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { String[] stringArray0 = new String[9]; stringArray0[4] = "EJaO-G"; // Undeclared exception! StringUtils.replaceEach("EJaO-G", stringArray0, stringArray0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3f6de0956f99544e4916d095c5da286b5b33fb3d
2df7f8a87e9557616fa8b7ecd10895c4c05c93e8
/src/Third/ThirdMath.java
ec93e9b2cc08319dc09ccef5d420d7917227f3af
[]
no_license
YouYoungDon/JavaBasic
78af12a822ac961d4da6f0576280b93b299bd45b
f5ee079001206f61529ab4af335c974a13e03185
refs/heads/master
2022-12-25T22:44:56.656479
2020-08-28T09:23:16
2020-08-28T09:23:16
291,004,955
0
0
null
null
null
null
UTF-8
Java
false
false
504
java
package Third; public class ThirdMath { public static void main(String[] args) { int width = 3; int height = 4; int diag; // 피타고라스 정리 3, 4, 5비율의 프로그램 증명 // Math.sqrt()는 루트 // Math.pow(x, n)는 x의 n승 // Math.pow()는 멱급수를 표현함 diag = (int)Math.sqrt( Math.pow(width, 2) + Math.pow(height, 2) ); System.out.println("대각선 길이 = " + diag); } }
[ "gcccompil3r@gmail.com" ]
gcccompil3r@gmail.com
4f1273d196836a40fb6263dad690e3a77604f9c2
de7b67d4f8aa124f09fc133be5295a0c18d80171
/workspace_specialSoldier/chapter01/src/main/java/com/lin/java/chapter5/suspend/SuspendAndResume.java
0336fabde7c66ef1043252ca01a0b5fb7524afc5
[]
no_license
lin-lee/eclipse_workspace_test
adce936e4ae8df97f7f28965a6728540d63224c7
37507f78bc942afb11490c49942cdfc6ef3dfef8
refs/heads/master
2021-05-09T10:02:55.854906
2018-01-31T07:19:02
2018-01-31T07:19:02
119,460,523
0
1
null
null
null
null
UTF-8
Java
false
false
677
java
package com.lin.java.chapter5.suspend; @SuppressWarnings("deprecation") public class SuspendAndResume { private static final Object object = new Object(); static class ThreadA extends Thread{ @Override public void run(){ synchronized(object){ System.out.println("start..."); Thread.currentThread().suspend(); System.out.println("thread end..."); } } } public static void main(String [] args) throws InterruptedException{ ThreadA t1 = new ThreadA(); ThreadA t2 = new ThreadA(); t1.start(); t2.start(); Thread.sleep(100); System.out.println(t1.getState()); System.out.println(t2.getState()); t1.resume(); t2.resume(); } }
[ "lilin@lvmama.com" ]
lilin@lvmama.com
6c8210bd3216496b5088fbde7f4dae2a8169bca9
49c4e2048956b6c2f88e5359c85574496b67edba
/CAB_SERVICE_COMMON/src/lk/ijse/rmi/cab/dto/ReciptionDTO.java
80ddf93c7d8a34f4384d68c144c60f51727119e7
[]
no_license
AmilaWasantha/Cab-Service-System
1e82697f38a263fb72932556eae8d1e3a963937f
94426d74c8bc9a2b8909409e894f90bddf8befe9
refs/heads/master
2020-04-06T19:45:41.704230
2018-11-15T17:34:53
2018-11-15T17:34:53
157,748,654
1
1
null
null
null
null
UTF-8
Java
false
false
1,243
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 lk.ijse.rmi.cab.dto; /** * * @author user */ public class ReciptionDTO extends SuperDTO{ private int reciptionId; private String reciptionName; public ReciptionDTO() { } public ReciptionDTO(String reciptionName) { this.reciptionName = reciptionName; } public ReciptionDTO(int reciptionId, String reciptionName) { this.reciptionId = reciptionId; this.reciptionName = reciptionName; } /** * @return the reciptionId */ public int getReciptionId() { return reciptionId; } /** * @param reciptionId the reciptionId to set */ public void setReciptionId(int reciptionId) { this.reciptionId = reciptionId; } /** * @return the reciptionName */ public String getReciptionName() { return reciptionName; } /** * @param reciptionName the reciptionName to set */ public void setReciptionName(String reciptionName) { this.reciptionName = reciptionName; } }
[ "amilawasantha20@gmail.com" ]
amilawasantha20@gmail.com
ed08646f660ce6de0693ae853f2d66882ae83ba5
ba90ba9bcf91c4dbb1121b700e48002a76793e96
/com-gameportal-web/src/main/java/com/gameportal/web/user/service/IXimaFlagService.java
29c08313e3f48a50dee3fe9cf5270cd4e784735c
[]
no_license
portalCMS/xjw
1ab2637964fd142f8574675bd1c7626417cf96d9
f1bdba0a0602b8603444ed84f6d7afafaa308b63
refs/heads/master
2020-04-16T13:33:21.792588
2019-01-18T02:29:40
2019-01-18T02:29:40
165,632,513
0
9
null
null
null
null
UTF-8
Java
false
false
706
java
package com.gameportal.web.user.service; import java.util.List; import java.util.Map; import com.gameportal.web.user.model.XimaFlag; public interface IXimaFlagService { public boolean update(XimaFlag entity); public boolean save(XimaFlag entity); public XimaFlag getObject(Map<String, Object> params); public List<XimaFlag> getList(Map<String, Object> params,int thisPage,int pageSize); public Long getCount(Map<String, Object> params); /** * 查询用户洗码记录数。 * @param params * @return */ Long queryUserClearingFlagCount(Map<String, Object> params); /** * 查询最新洗码状态。 * @param uiid * @return */ public XimaFlag getNewestXimaFlag(long uiid); }
[ "sunny@gmail.com" ]
sunny@gmail.com
d68030c5e60ddc30c8405efe797e853c9e6e6c19
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/coffee_mud/Abilities/Fighter/Fighter_BlindFighting.java
0e38f2fc1b2ee745557429292d59875d6b5e46af
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,184
java
package com.planet_ink.coffee_mud.Abilities.Fighter; import com.planet_ink.coffee_mud.Abilities.StdAbility; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2014 Bo Zimmerman 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. */ public class Fighter_BlindFighting extends FighterSkill { @Override public String ID() { return "Fighter_BlindFighting"; } private final static String localizedName = CMLib.lang().L("Blind Fighting"); @Override public String name() { return localizedName; } @Override public String displayText(){ return "";} @Override public int abstractQuality(){return Ability.QUALITY_BENEFICIAL_SELF;} @Override protected int canAffectCode(){return Ability.CAN_MOBS;} @Override protected int canTargetCode(){return 0;} @Override public boolean isAutoInvoked(){return true;} @Override public boolean canBeUninvoked(){return false;} @Override public int classificationCode(){ return Ability.ACODE_SKILL|Ability.DOMAIN_MARTIALLORE;} protected boolean seeEnabled = false; @Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected,affectableStats); if(affected==null) return; if(!(affected instanceof MOB)) return; if(seeEnabled) affectableStats.setSensesMask(affectableStats.sensesMask()|PhyStats.CAN_SEE_VICTIM); } @Override public boolean tick(Tickable ticking, int tickID) { if(!super.tick(ticking, tickID)) return false; seeEnabled = false; if(!(ticking instanceof MOB)) return true; final MOB mob=(MOB)ticking; if(!mob.isInCombat()) return true; if((!CMLib.flags().canBeSeenBy(mob.getVictim(),mob)) &&(CMLib.flags().canBeHeardMovingBy(mob.getVictim(),mob)) &&((mob.fetchAbility(ID())==null)||proficiencyCheck(mob,0,false))) { seeEnabled=true; if(CMLib.dice().rollPercentage()<10) helpProficiency(mob, 0); } return true; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
91404ba1ae340383ef11ffbeac6376c4806395ba
1b3872696201df0b99e493abaa84200fdc0a1190
/src/wikiGroundTruth/server/ServerWikisauras.java
8464e9e6ac55a27b91398a9c7af1095ffc410f13
[]
no_license
vishwajeetkumar93/entity-disamb
eb80f4b44118c54ab89864ad6b82fde5d278ad59
b44818b27050e91de6e879a1bed1f4279e094df8
refs/heads/master
2021-01-12T15:58:12.031349
2015-07-30T02:49:48
2015-07-30T02:49:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,917
java
package wikiGroundTruth.server; import java.io.DataInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.ObjectOutputStream; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import java.util.StringTokenizer; import org.wikipedia.miner.model.Article; import org.wikipedia.miner.model.Label; import org.wikipedia.miner.model.Redirect; import spotting.Wikisaurus; import util.DisambProperties; public class ServerWikisauras { private static int port = 4448, maxConnections = 0; static public String ganchor = "GETANCHOR"; static public String gTitle = "GETTITLE"; static public String gSenses = "GETSENSES"; static public String garticle = "GETARTICLE"; public ServerWikisauras() { Wikisaurus dummy = new Wikisaurus(); System.out.println("STORE LOADED"); } public static void main(String[] args) { String propsFile = args[0]; try { DisambProperties.init(propsFile); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } ServerWikisauras loadData = new ServerWikisauras(); int i = 0; try { ServerSocket listener = new ServerSocket(port, 0, InetAddress .getLocalHost()); Socket server; while ((i++ < maxConnections) || (maxConnections == 0)) { server = listener.accept(); doComms5 conn_c = new doComms5(server); Thread t = new Thread(conn_c); t.start(); } } catch (IOException ioe) { System.out.println("IOException on socket listen: " + ioe); ioe.printStackTrace(); } } } class doComms5 implements Runnable { private Socket server; private String line; doComms5(Socket server) { this.server = server; } public void run() { try { // Get input from the client DataInputStream in = new DataInputStream(server.getInputStream()); ObjectOutputStream out = new ObjectOutputStream(server .getOutputStream()); line = in.readLine(); out.writeObject(process(line)); server.close(); } catch (IOException ioe) { System.out.println("IOException on socket listen: " + ioe); ioe.printStackTrace(); } } public Object process(String command) { StringTokenizer st = new StringTokenizer(command, "\t"); String curr = null; while (st.hasMoreTokens()) { curr = st.nextToken(); if (curr.equals(ServerWikisauras.ganchor)) { if (st.hasMoreTokens()) { String page_title = st.nextToken(); return Wikisaurus.getAnchorText(page_title); } } else if (curr.equals(ServerWikisauras.gTitle)) { if (st.hasMoreTokens()) { String page_title = st.nextToken(); // return Wikisaurus.getAnchor(page_title); } } else if (curr.equals(ServerWikisauras.garticle)) { if (st.hasMoreTokens()) { String page_title = st.nextToken(); ArrayList<String> redirectNames = new ArrayList<String>(); redirectNames.add(page_title); Article article = Wikisaurus._wikipedia .getArticleByTitle(page_title); Redirect[] redirects = null; if (article != null) redirects = article.getRedirects(); if (redirects != null) { for (int j = 0; j < redirects.length; j++) { redirectNames.add(redirects[j].getTitle() .replaceAll("_", " ")); } } return redirectNames; } } else if (curr.equals(ServerWikisauras.gSenses)) { if (st.hasMoreTokens()) { String term = st.nextToken(); try { Label.Sense[] label = Wikisaurus.getAllSenses(term); if (label == null) return null; else { // System.out.println("in server ### " + // label.length); LabelSense temp = new LabelSense(label); // System.out.println("in server " // + temp.wikiMinerCandidate.length); return temp; } } catch (Exception e) { e.printStackTrace(); } } } } return null; } }
[ "kulashish@gmail.com" ]
kulashish@gmail.com
f5fb1f260ea798e94036582ce331a10c98992d45
104cda8eafe0617e2a5fa1e2b9f242d78370521b
/aliyun-java-sdk-vs/src/main/java/com/aliyuncs/vs/model/v20181212/DescribeVsStreamsNotifyUrlConfigRequest.java
1681545d4836fefc7e49d618921b6c811a9497cc
[ "Apache-2.0" ]
permissive
SanthosheG/aliyun-openapi-java-sdk
89f9b245c1bcdff8dac0866c36ff9a261aa40684
38a910b1a7f4bdb1b0dd29601a1450efb1220f79
refs/heads/master
2020-07-24T00:00:59.491294
2019-09-09T23:00:27
2019-09-11T04:29:56
207,744,099
2
0
NOASSERTION
2019-09-11T06:55:58
2019-09-11T06:55:58
null
UTF-8
Java
false
false
1,877
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.vs.model.v20181212; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.vs.Endpoint; /** * @author auto create * @version */ public class DescribeVsStreamsNotifyUrlConfigRequest extends RpcAcsRequest<DescribeVsStreamsNotifyUrlConfigResponse> { public DescribeVsStreamsNotifyUrlConfigRequest() { super("vs", "2018-12-12", "DescribeVsStreamsNotifyUrlConfig", "vs"); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } private String domainName; private Long ownerId; public String getDomainName() { return this.domainName; } public void setDomainName(String domainName) { this.domainName = domainName; if(domainName != null){ putQueryParameter("DomainName", domainName); } } public Long getOwnerId() { return this.ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; if(ownerId != null){ putQueryParameter("OwnerId", ownerId.toString()); } } @Override public Class<DescribeVsStreamsNotifyUrlConfigResponse> getResponseClass() { return DescribeVsStreamsNotifyUrlConfigResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
addb0f1a7e3cd04ffea2abe867b74ae4f18fe5b6
ba3b25d6cf9be46007833ce662d0584dc1246279
/droidsafe_modified/modeling/api/java/security/KeyPair.java
a764d7ef6e87ea7df43e35c84710c23af8a06008
[]
no_license
suncongxd/muDep
46552d4156191b9dec669e246188080b47183a01
b891c09f2c96ff37dcfc00468632bda569fc8b6d
refs/heads/main
2023-03-20T20:04:41.737805
2021-03-01T19:52:08
2021-03-01T19:52:08
326,209,904
8
0
null
null
null
null
UTF-8
Java
false
false
4,759
java
/* * Copyright (C) 2015, Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Please email droidsafe@lists.csail.mit.edu if you need additional * information or have any questions. * * * This file incorporates work covered by the following copyright and * permission notice: * * 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. */ /***** THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL BY THE DROIDSAFE PROJECT. *****/ package java.security; // Droidsafe Imports import droidsafe.runtime.*; import droidsafe.helpers.*; import droidsafe.annotations.*; import java.io.Serializable; public final class KeyPair implements Serializable { @DSGeneratedField(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:00.981 -0500", hash_original_field = "023CECE5F37B287B37A790157CE63873", hash_generated_field = "07AAFE09296E79DE4CD9DDFF85CB5BFC") private static final long serialVersionUID = -7565189502268009837L; @DSGeneratedField(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:00.983 -0500", hash_original_field = "E343478F4FCDDE86054B291B9794F31B", hash_generated_field = "0BDA09A35A184B3500330A0D915760C1") private PrivateKey privateKey; @DSGeneratedField(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:00.986 -0500", hash_original_field = "B73719A7AAE8E737607C294F86B7D620", hash_generated_field = "597E676F0E34E7523D486C2FEA821479") private PublicKey publicKey; /** * Constructs a new instance of {@code KeyPair} with a public key and the * corresponding private key. * * @param publicKey * the public key. * @param privateKey * the private key. */ @DSComment("no suspicious activity, just creates object") @DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:00.988 -0500", hash_original_method = "283304EE488E7CC511471A1BB564958E", hash_generated_method = "86C254513ECA923A9F08846838AF5892") public KeyPair(PublicKey publicKey, PrivateKey privateKey) { this.privateKey = privateKey; this.publicKey = publicKey; } /** * Returns the private key. * * @return the private key. */ @DSComment("no suspicious activity, just creates object") @DSSafe(DSCat.DATA_STRUCTURE) @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:00.990 -0500", hash_original_method = "3FFC913C725561B27B9684931E08C69F", hash_generated_method = "84368FE1E2A592A7742CA323B46771F5") public PrivateKey getPrivate() { return privateKey; } /** * Returns the public key. * * @return the public key. */ @DSComment("no suspicious activity") @DSSafe(DSCat.DATA_STRUCTURE) @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:00.993 -0500", hash_original_method = "6C6DB8409915627C7F2AEC2B5C46974F", hash_generated_method = "96498FAE112785B7A14D5367EC416CAF") public PublicKey getPublic() { return publicKey; } }
[ "suncong@xidian.edu.cn" ]
suncong@xidian.edu.cn
4d7baa0a8630d5ad6c16d0cbddd9a1106eb57b50
a0f2c11b4dbe52541262081a1da9bcf8ac1db8fe
/structure/src/main/java/com/note/zuo/左程云/class11/Code06_ConvertToLetterString.java
48beac2643094c0620df25e9f5c09315d9fa71fe
[]
no_license
thinkal01/java-base
e95fdfd57f0dd671e1ca40d6f21f1796c57d7410
53a93f67b29adf915fff6c365166d2ba8c66b78d
refs/heads/master
2023-03-29T21:47:59.761528
2021-04-03T08:27:12
2021-04-03T08:27:12
298,568,787
0
0
null
null
null
null
UTF-8
Java
false
false
2,299
java
package com.note.zuo.左程云.class11; public class Code06_ConvertToLetterString { public static int number(String str) { if (str == null || str.length() == 0) { return 0; } return process(str.toCharArray(), 0); } // str[0...i-1]已经转化完了,固定了 // i之前的位置,如何转化已经做过决定了, 不用再关心 // i... 有多少种转化的结果 public static int process(char[] str, int i) { if (i == str.length) { // base case return 1; } if (str[i] == '0') { return 0; } if (str[i] == '1') { int res = process(str, i + 1); if (i + 1 < str.length) { res += process(str, i + 2); } return res; } if (str[i] == '2') { int res = process(str, i + 1); if (i + 1 < str.length && (str[i + 1] >= '0' && str[i + 1] <= '6')) { res += process(str, i + 2); // (i和i+1)作为单独的部分,后续有多少种方法 } return res; } return process(str, i + 1); } public static int dpWays2(String s) { if (s == null || s.length() == 0) { return 0; } char[] str = s.toCharArray(); int N = str.length; int[] dp = new int[N+1]; dp[N] = 1; for(int i = N-1; i >= 0; i--) { if (str[i] == '0') { dp[i] = 0; } if (str[i] == '1') { dp[i] = dp[i + 1]; if (i + 1 < str.length) { dp[i] += dp[i + 2]; } } if (str[i] == '2') { dp[i] = dp[i + 1]; if (i + 1 < str.length && (str[i + 1] >= '0' && str[i + 1] <= '6')) { dp[i] += dp[i + 2]; // (i和i+1)作为单独的部分,后续有多少种方法 } } } return dp[0]; } public static int dpWays(String s) { if (s == null || s.length() == 0) { return 0; } char[] str = s.toCharArray(); int N = str.length; int[] dp = new int[N + 1]; dp[N] = 1; for (int i = N - 1; i >= 0; i--) { if (str[i] == '0') { dp[i] = 0; } else if (str[i] == '1') { dp[i] = dp[i + 1]; if (i + 1 < N) { dp[i] += dp[i + 2]; } } else if (str[i] == '2') { dp[i] = dp[i + 1]; if (i + 1 < str.length && (str[i + 1] >= '0' && str[i + 1] <= '6')) { dp[i] += dp[i + 2]; } } else { dp[i] = dp[i + 1]; } } return dp[0]; } public static void main(String[] args) { System.out.println(number("11111")); System.out.println(dpWays2("11111")); } }
[ "875535828@qq.com" ]
875535828@qq.com
7aac5e63fa50f92b585fb25cf21f59026755878b
7b922bb6bfa838b9d26dc2b34289889a08aae32b
/mind-map/mind-map-annotation-processor-it/src/test/java/com/igormaznitsa/mindmap/annoit/AbstractMmdTest.java
44e468d5362191cc7126701b377345ec0124b888
[ "Apache-2.0" ]
permissive
raydac/netbeans-mmd-plugin
55bffcda44acc5a8fc84df79aeab3f5ebf7c3502
4457a316fcdb29690b21e391063f045716c65bac
refs/heads/master
2023-09-04T23:37:36.001828
2023-08-26T06:59:27
2023-08-26T06:59:27
38,935,102
405
67
Apache-2.0
2023-08-23T17:54:24
2015-07-11T17:53:41
Java
UTF-8
Java
false
false
4,797
java
package com.igormaznitsa.mindmap.annoit; import static com.igormaznitsa.mindmap.model.StandardTopicAttributes.MMD_TOPIC_ATTRIBUTE_COLOR_BORDER; import static com.igormaznitsa.mindmap.model.StandardTopicAttributes.MMD_TOPIC_ATTRIBUTE_COLOR_FILL; import static com.igormaznitsa.mindmap.model.StandardTopicAttributes.MMD_TOPIC_ATTRIBUTE_COLOR_TEXT; import static com.igormaznitsa.mindmap.model.StandardTopicAttributes.MMD_TOPIC_ATTRIBUTE_EMOTICON; import static com.igormaznitsa.mindmap.model.StandardTopicAttributes.MMD_TOPIC_ATTRIBUTE_LINK_UID; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static org.apache.commons.io.FileUtils.readFileToString; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import com.igormaznitsa.mindmap.annotations.MmdColor; import com.igormaznitsa.mindmap.annotations.MmdEmoticon; import com.igormaznitsa.mindmap.model.Extra; import com.igormaznitsa.mindmap.model.ExtraTopic; import com.igormaznitsa.mindmap.model.MindMap; import com.igormaznitsa.mindmap.model.Topic; import java.io.File; import java.io.IOException; import java.io.StringReader; import java.nio.file.Files; import java.nio.file.Path; import java.util.Arrays; import org.apache.commons.io.FilenameUtils; public abstract class AbstractMmdTest { protected static void assertTopicJumpTo(final Topic source, final Topic target) { final ExtraTopic extraLinkTo = (ExtraTopic) source.getExtras().get(Extra.ExtraType.TOPIC); assertNotNull("Can't find any link in source", extraLinkTo); final String targetTopicLinkUid = target.getAttribute(MMD_TOPIC_ATTRIBUTE_LINK_UID); assertNotNull("Can't find any link uid in target", targetTopicLinkUid); assertEquals(extraLinkTo.getValue(), targetTopicLinkUid); } protected static void assertTopicEmoticon(final Topic topic, final MmdEmoticon emoticon) { assertEquals(topic.getAttribute(MMD_TOPIC_ATTRIBUTE_EMOTICON), emoticon.getId()); } protected static Topic findForPath(final MindMap mindMap, final String... path) { assertNotEquals("Empty path", 0, path.length); Topic topic = null; for (final String s : path) { if (topic == null) { topic = mindMap.getRoot(); } else { topic = topic.getChildren().stream().filter(x -> s.equals(x.getText())).findFirst() .orElse(null); } assertNotNull("Can't find for path: " + Arrays.toString(path), topic); } return requireNonNull(topic); } protected static void assertTopicPath(final Topic topic, final String... path) { final String[] detectedPath = Arrays.stream(topic.getPath()).map(Topic::getText).toArray( String[]::new); assertArrayEquals(path, detectedPath); } protected static void assertTopicColors( final Topic topic, final MmdColor colorText, final MmdColor colorFill, final MmdColor colorBorder) { if (colorText != MmdColor.Default) { assertEquals(colorText.getHtmlColor(), topic.getAttribute(MMD_TOPIC_ATTRIBUTE_COLOR_TEXT)); } if (colorFill != MmdColor.Default) { assertEquals(colorFill.getHtmlColor(), topic.getAttribute(MMD_TOPIC_ATTRIBUTE_COLOR_FILL)); } if (colorBorder != MmdColor.Default) { assertEquals(colorBorder.getHtmlColor(), topic.getAttribute(MMD_TOPIC_ATTRIBUTE_COLOR_BORDER)); } } protected Path getBaseDir() { final String baseDir = System.getProperty("mmd.basedir", null); assertNotNull("Can't find MMD base folder", baseDir); return new File(baseDir).toPath(); } protected Path getSrcDir() { final String srcDir = System.getProperty("mmd.src.dir", null); assertNotNull("Can't find MMD source folder", srcDir); return new File(srcDir).toPath(); } protected static Topic findForTitle(final MindMap mindMap, final String title) { for (final Topic t : mindMap) { if (t.getText().equals(title)) { return t; } } fail("Can't find any topic for title: " + title); throw new Error("Must not be called"); } protected MindMap loadMindMap(final String path) throws IOException { final Path asPath = new File(FilenameUtils.normalizeNoEndSeparator(path)).toPath(); assertFalse("path must be relative one", asPath.isAbsolute()); final Path mindMapFile = this.getSrcDir().resolve(asPath); assertTrue("Can't find mind map file: " + mindMapFile, Files.isRegularFile(mindMapFile)); return new MindMap(new StringReader(readFileToString(mindMapFile.toFile(), UTF_8))); } }
[ "rrg4400@gmail.com" ]
rrg4400@gmail.com
bbb9ea03b9e04ebc205e0acfba016eeaa9ad7048
8052e7e594905370c6c415237b55ab4f636ee427
/fxb-module/src/test/java/org/spring/aop/JavaBasedAspectConfigurationTest.java
b48fc446fba54c7ff0e6d4812d794355ef1a2345
[]
no_license
syakuis/fxb
86fccf3cad2745e73a479cc97c6e5879f1a85dcb
d4e2394af43a23c181c951d49167eb09d860e52e
refs/heads/master
2021-10-25T12:28:36.815996
2017-08-09T14:43:08
2018-04-05T13:51:17
126,314,931
1
0
null
2021-10-16T07:16:18
2018-03-22T09:58:24
Java
UTF-8
Java
false
false
2,211
java
package org.spring.aop; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.Advisor; import org.springframework.aop.AfterReturningAdvice; import org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author Seok Kyun. Choi. 최석균 (Syaku) * @since 2018. 4. 3. */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = AspectConfiguration.class) public class JavaBasedAspectConfigurationTest { @Autowired Employ employ; @Test public void test() { employ.nameUpdate("good"); } } @Configuration @EnableAspectJAutoProxy class AspectConfiguration { @Bean public Employ employ() { return new Employ(); } @Bean public Advisor basicAdvisor() { AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression("@annotation(org.spring.aop.TargetAOP)"); advisor.setAdvice(new AfterReturningAdviceInterceptor()); return advisor; } } class AfterReturningAdviceInterceptor implements AfterReturningAdvice { private final Logger logger = LoggerFactory.getLogger(AfterReturningAdviceInterceptor.class); @Override public void afterReturning(Object returnValue, Method method, Object[] args, Object target) { logger.debug("-------------------> after interceptor : {}", returnValue); } } class Employ { private String name; @TargetAOP public String nameUpdate(String name) { this.name = name; return name; } } @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @interface TargetAOP { }
[ "syaku@naver.com" ]
syaku@naver.com
c2ecc479b977b3f1bd7ea59e679cb255e18ba20f
4daec9de0522ef8551772e90440da1b55491c2ec
/micronaut-ioc/src/main/java/com/laibao/micronaut/iocapp/qualify/byannotation/Bus.java
894981a9aa9d0c5cf25853a478374f32fdd42dd3
[]
no_license
wanglaibao/micronaut-in-action
964c4a7fc6bd0d58551ff5ce060d585512bf4917
6a990a3ec29208f2d6eb20e35c67fd0056d76961
refs/heads/master
2020-04-01T17:46:32.205733
2018-12-30T06:17:22
2018-12-30T06:17:22
153,449,470
1
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.laibao.micronaut.iocapp.qualify.byannotation; import com.laibao.micronaut.iocapp.qualify.byname.Engine; import javax.inject.Inject; import javax.inject.Singleton; @Singleton public class Bus { private com.laibao.micronaut.iocapp.qualify.byname.Engine engine; @Inject public void setEngine(@V8 Engine engine) { this.engine = engine; } public String start() { return engine.start(); } }
[ "wanglaibao2010@gmail.com" ]
wanglaibao2010@gmail.com
b0785601c29fcecd3e7538164cc20cae7e6bd06c
48248a3d304dea1b45375207274a1779fe0b5b1f
/nalu-processor/src/main/java/com/github/nalukit/nalu/processor/model/intern/ControllerCompositeModel.java
85c1ba2b34e136977afcc6fae9f3d387164c4d2f
[ "Apache-2.0" ]
permissive
Hossam45/nalu
a6c2ed3e3864b93e7a50964470c89cc668e67450
dfe3817662793d82c43ce22a4f7f3c802278429d
refs/heads/master
2020-06-23T14:03:59.066633
2019-07-21T08:32:30
2019-07-21T08:32:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,485
java
/* * Copyright (c) 2018 - 2019 - Frank Hossfeld * * 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.github.nalukit.nalu.processor.model.intern; public class ControllerCompositeModel { public ClassNameModel condition; private String name; private ClassNameModel composite; private String selector; public ControllerCompositeModel() { } public ControllerCompositeModel(String name, ClassNameModel composite, String selector, ClassNameModel condition) { this.name = name; this.composite = composite; this.selector = selector; this.condition = condition; } public String getName() { return name; } public ClassNameModel getComposite() { return composite; } public String getSelector() { return selector; } public ClassNameModel getCondition() { return condition; } }
[ "frank.hossfeld@googlemail.com" ]
frank.hossfeld@googlemail.com
a0e2ab385fc4e1fb19456ebd6c62f23d29ed5b2d
128da67f3c15563a41b6adec87f62bf501d98f84
/com/emt/proteus/duchampopt/__tcf_20208.java
ab1f44fa7197d234b95709f6ce2e71d60832ea13
[]
no_license
Creeper20428/PRT-S
60ff3bea6455c705457bcfcc30823d22f08340a4
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
refs/heads/master
2020-03-26T03:59:25.725508
2018-08-12T16:05:47
2018-08-12T16:05:47
73,244,383
0
0
null
null
null
null
UTF-8
Java
false
false
1,638
java
/* */ package com.emt.proteus.duchampopt; /* */ /* */ import com.emt.proteus.runtime.api.Env; /* */ import com.emt.proteus.runtime.api.Frame; /* */ import com.emt.proteus.runtime.api.Function; /* */ import com.emt.proteus.runtime.api.ImplementedFunction; /* */ import com.emt.proteus.runtime.library.strings._ZNSsD1Ev; /* */ /* */ public final class __tcf_20208 extends ImplementedFunction /* */ { /* */ public static final int FNID = 107; /* 12 */ public static final Function _instance = new __tcf_20208(); /* 13 */ public final Function resolve() { return _instance; } /* */ /* 15 */ public __tcf_20208() { super("__tcf_20208", 1, false); } /* */ /* */ public int execute(int paramInt) /* */ { /* 19 */ call(paramInt); /* 20 */ return 0; /* */ } /* */ /* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4) /* */ { /* 25 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 26 */ paramInt4 += 2; /* 27 */ paramInt3--; /* 28 */ call(i); /* 29 */ return paramInt4; /* */ } /* */ /* */ /* */ /* */ /* */ public static void call(int paramInt) /* */ { /* */ try /* */ { /* 39 */ _ZNSsD1Ev.call(460808); /* 40 */ return; /* */ } /* */ finally {} /* */ } /* */ } /* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/__tcf_20208.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "kimjoey79@gmail.com" ]
kimjoey79@gmail.com
8ceaec80ab0464d333ac9fe460fd5d54272bf735
55bf3cf97644af0bcbec091532fe83c99ba592f6
/org/w3c/css/properties/css/CssSpeakPunctuation.java
4bb378ebe7fd543034514574fe871dc0cb331d0c
[ "W3C-20150513", "W3C" ]
permissive
w3c/css-validator
dda4f191ff839b392440d91f9012ba2d2d63d0c6
6874d1990af57d3260fdc2a9420b09077cf2ed06
refs/heads/main
2023-09-03T12:40:19.427371
2023-03-13T13:59:56
2023-03-13T13:59:56
40,552,697
223
124
NOASSERTION
2023-09-13T17:38:37
2015-08-11T16:28:14
Java
UTF-8
Java
false
false
2,960
java
// $Id$ // Author: Yves Lafon <ylafon@w3.org> // // (c) COPYRIGHT MIT, ERCIM and Keio University, 2012. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css; import org.w3c.css.parser.CssStyle; import org.w3c.css.properties.css2.Css2Style; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; /** * @version $Revision$ * @since CSS2 */ public class CssSpeakPunctuation extends CssProperty { /** * Create a new CssSpeakPunctuation */ public CssSpeakPunctuation() { } /** * Creates a new CssSpeakPunctuation * * @param expression The expression for this property * @throws org.w3c.css.util.InvalidParamException * Expressions are incorrect */ public CssSpeakPunctuation(ApplContext ac, CssExpression expression, boolean check) throws InvalidParamException { throw new InvalidParamException("value", expression.getValue().toString(), getPropertyName(), ac); } public CssSpeakPunctuation(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } /** * Returns the value of this property */ public Object get() { return value; } /** * Returns the name of this property */ public final String getPropertyName() { return "speak-punctuation"; } /** * Returns true if this property is "softly" inherited * e.g. his value is equals to inherit */ public boolean isSoftlyInherited() { return value.equals(inherit); } /** * Returns a string representation of the object. */ public String toString() { return value.toString(); } /** * Add this property to the CssStyle. * * @param style The CssStyle */ public void addToStyle(ApplContext ac, CssStyle style) { if (((Css2Style) style).cssSpeakPunctuation != null) style.addRedefinitionWarning(ac, this); ((Css2Style) style).cssSpeakPunctuation = this; } /** * Compares two properties for equality. * * @param property The other property. */ public boolean equals(CssProperty property) { return (property instanceof CssSpeakPunctuation && value.equals(((CssSpeakPunctuation) property).value)); } /** * Get this property in the style. * * @param style The style where the property is * @param resolve if true, resolve the style to find this property */ public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) { if (resolve) { return ((Css2Style) style).getSpeakPunctuation(); } else { return ((Css2Style) style).cssSpeakPunctuation; } } }
[ "ylafon@w3.org" ]
ylafon@w3.org
b91c3007a4fd28d17767a329960442e0d9db2d3b
b91899c17b4b64e51614667bad56eaf2df9e348a
/src/main/java/org/cuwy1/model1/Department.java
738d3180de760267e1b33c61acde30bccc25bb17
[]
no_license
romanm/cuwy_sb2w_3_develop
e055feb98a75d15e693d0480812cfbb8e04e105d
28c889910f8b7fbafb7ca853ea47ca5a248ff4fd
refs/heads/master
2020-08-09T20:20:32.880257
2015-03-22T21:22:03
2015-03-22T21:22:03
21,891,762
0
0
null
null
null
null
UTF-8
Java
false
false
477
java
package org.cuwy1.model1; import java.util.List; public class Department { private String name; private List<PatientDiagnosis> patientesDiagnoses; public String getName() { return name; } public void setName(String name) { this.name = name; } public List<PatientDiagnosis> getPatientesDiagnoses() { return patientesDiagnoses; } public void setPatientesDiagnoses(List<PatientDiagnosis> patientesDiagnoses) { this.patientesDiagnoses = patientesDiagnoses; } }
[ "roman.mishchenko@gmail.com" ]
roman.mishchenko@gmail.com
f069f634c003ae5346f581d4c32ebe82ebc9583b
e108d65747c07078ae7be6dcd6369ac359d098d7
/org/apache/poi/hssf/util/HSSFCellUtil.java
c453fa084f83f0fb9cf596b28edf7d31d8e87c77
[ "MIT" ]
permissive
kelu124/pyS3
50f30b51483bf8f9581427d2a424e239cfce5604
86eb139d971921418d6a62af79f2868f9c7704d5
refs/heads/master
2020-03-13T01:51:42.054846
2018-04-24T21:03:03
2018-04-24T21:03:03
130,913,008
1
0
null
null
null
null
UTF-8
Java
false
false
1,928
java
package org.apache.poi.hssf.util; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFFont; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.util.CellUtil; import org.apache.poi.util.Removal; @Deprecated @Removal(version = "3.17") public final class HSSFCellUtil { private HSSFCellUtil() { } public static HSSFRow getRow(int rowIndex, HSSFSheet sheet) { return (HSSFRow) CellUtil.getRow(rowIndex, sheet); } public static HSSFCell getCell(HSSFRow row, int columnIndex) { return (HSSFCell) CellUtil.getCell(row, columnIndex); } public static HSSFCell createCell(HSSFRow row, int column, String value, HSSFCellStyle style) { return (HSSFCell) CellUtil.createCell(row, column, value, style); } public static HSSFCell createCell(HSSFRow row, int column, String value) { return createCell(row, column, value, null); } public static void setAlignment(HSSFCell cell, HSSFWorkbook workbook, short align) { setAlignment(cell, HorizontalAlignment.forInt(align)); } public static void setAlignment(HSSFCell cell, HorizontalAlignment align) { CellUtil.setAlignment(cell, align); } public static void setFont(HSSFCell cell, HSSFWorkbook workbook, HSSFFont font) { CellUtil.setFont(cell, font); } public static void setCellStyleProperty(HSSFCell cell, HSSFWorkbook workbook, String propertyName, Object propertyValue) { CellUtil.setCellStyleProperty(cell, propertyName, propertyValue); } public static HSSFCell translateUnicodeValues(HSSFCell cell) { CellUtil.translateUnicodeValues(cell); return cell; } }
[ "kelu124@gmail.com" ]
kelu124@gmail.com
d3569430f18d39eb90ef5b195253abdd9c16ee61
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Ibotta_com.ibotta.android/javafiles/bo/app/fl.java
6e3209a854ea6ed949a840d757a2657727d7b826
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
508
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package bo.app; import com.appboy.models.IPutIntoJson; // Referenced classes of package bo.app: // fk public interface fl extends IPutIntoJson { public abstract long a(); public abstract long b(); public abstract int c(); public abstract int d(); public abstract int e(); public abstract fk f(); public abstract int g(); }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
9c99fc1c68268b69279878302699f2c5ef5776d8
b1cc49145df28dc6172e5180f02e8f39e7ab2fe3
/public/transactions-api/src/main/java/com/atomikos/icatch/CompositeCoordinator.java
53400478620c8cc94f162c1f43e69351e723d671
[]
no_license
opensagres/transactions-essentials
d1cda1897bcd11fad104d8067979bb8b9f4a3501
163a5d017f79e7f4a4560537e11ab4f26db8fdcf
refs/heads/master
2023-06-10T14:00:45.512383
2015-02-06T14:48:33
2015-02-06T14:48:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,478
java
/** * Copyright (C) 2000-2011 Atomikos <info@atomikos.com> * * This code ("Atomikos TransactionsEssentials"), by itself, * is being distributed under the * Apache License, Version 2.0 ("License"), a copy of which may be found at * http://www.atomikos.com/licenses/apache-license-2.0.txt . * You may not use this file except in compliance with the License. * * While the License grants certain patent license rights, * those patent license rights only extend to the use of * Atomikos TransactionsEssentials by itself. * * This code (Atomikos TransactionsEssentials) contains certain interfaces * in package (namespace) com.atomikos.icatch * (including com.atomikos.icatch.Participant) which, if implemented, may * infringe one or more patents held by Atomikos. * It should be appreciated that you may NOT implement such interfaces; * licensing to implement these interfaces must be obtained separately from Atomikos. * * 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. */ package com.atomikos.icatch; /** * Represents the per-server work done * as part of the same global (root) transaction scope. */ public interface CompositeCoordinator extends java.io.Serializable { /** * @return String The coordinatorId. For imported transactions, this will be the * id of the top-level or root transaction. * For subtransactions, this will be an independent id. */ public String getCoordinatorId(); /** * *@return RecoveryCoordinator. */ public RecoveryCoordinator getRecoveryCoordinator(); /** * * @return HeuristicMessage[] Any tags set by the application. * * These serve as a summary of the local work * towards remote client TMs (that way, these * do not have to see ALL local heuristic messages, * but rather get a relevant summary). * * The participant proxy for a local coordinator * returns these tags as its heuristic messages. */ public HeuristicMessage[] getTags(); /** * Checks whether the instance is recoverable * in the active state. Although active recoverability requires * more logging overhead, some protocols may need this capability. * * @return Boolean True if the instance is recoverable in active state, * or null if this information is not available (e.g., for imported instances). * */ public Boolean isRecoverableWhileActive(); /** * Sets this coordinator to be recoverable * while active. Ideally, this method is called * before any participants are added * (otherwise, some participants may have been added * and not recovered due to an intermediate crash). * * This operation may not be unavailable for imported * coordinators, but it should always work for * locally created (sub)transactions. * * Calling this method is optional, and it defaults to false. * * <br> * <b>NOTE: active recoverability is inherited by * any subtransactions that are created afterwards.</b> */ public void setRecoverableWhileActive() throws UnsupportedOperationException; }
[ "guy@atomikos.com" ]
guy@atomikos.com
a8bd66037a37f69673d45da45b2517147d8c9ea0
52d3bda66c22815cfaf2f2e4364bf481453c877b
/drone-webdriver/src/test/java/org/jboss/arquillian/drone/webdriver/factory/remote/reusable/TestReusedSessionStoreImpl.java
f6d97b28637e73b0f235aa3558b243f9acaedcff
[]
no_license
lfryc/arquillian-extension-drone
2770ca966ccb1548447ef7e6e42a54ede270065b
18a8e83135f0d8e9e75a57755fcadaaa39aa8be9
refs/heads/master
2021-01-15T20:39:10.023248
2012-06-22T08:29:09
2012-06-22T08:32:01
1,739,229
0
0
null
2012-06-22T08:32:28
2011-05-12T16:34:27
Java
UTF-8
Java
false
false
3,057
java
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Middleware LLC, and individual contributors * by the @authors tag. 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.drone.webdriver.factory.remote.reusable; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; /** * @author Lukas Fryc */ @RunWith(MockitoJUnitRunner.class) public class TestReusedSessionStoreImpl { @Mock InitializationParameter mockKey1; @Mock InitializationParameter mockKey2; @Mock ReusedSession mockSession1; @Mock ReusedSession mockSession2; @Test public void when_session_is_stored_then_it_can_be_pulled() { // given ReusedSessionStoreImpl store = new ReusedSessionStoreImpl(); // when store.store(mockKey1, mockSession1); ReusedSession pulled = store.pull(mockKey1); // then assertSame(mockSession1, pulled); } @Test public void when_session_pulled_then_it_is_removed_from_store() { // given ReusedSessionStoreImpl store = new ReusedSessionStoreImpl(); // when store.store(mockKey1, mockSession1); store.pull(mockKey1); // then assertNull(store.pull(mockKey1)); } @Test public void when_store_does_not_contain_any_session_for_key_then_null_value_is_pulled() { // given ReusedSessionStoreImpl store = new ReusedSessionStoreImpl(); // when // then assertNull(store.pull(mockKey1)); } @Test public void when_session_is_stored_under_key_then_another_key_pulls_nothing() { // given ReusedSessionStoreImpl store = new ReusedSessionStoreImpl(); // when store.store(mockKey1, mockSession1); // then assertNull(store.pull(mockKey2)); } @Test public void when_two_session_are_stored_under_different_keys_then_each_pulls_associated_session_for_given_key() { // given ReusedSessionStoreImpl store = new ReusedSessionStoreImpl(); // when store.store(mockKey1, mockSession1); store.store(mockKey2, mockSession2); // then assertSame(mockSession2, store.pull(mockKey2)); assertSame(mockSession1, store.pull(mockKey1)); } }
[ "lfryc@redhat.com" ]
lfryc@redhat.com
1018cbbddd4bbb0d256e28241fb4ae7793ed345d
bcdede91c7e9d4d941199405f46439c2b7092e41
/src/main/java/com/dounine/clouddisk360/parser/FileHistoryParser.java
d1add57c4541bff327586924263ee485fb01a908
[ "MIT" ]
permissive
13567370952/clouddisk
b7c7d42f7537dd53f06f6b1b0745911be3119674
b10c67d308a0f6fa41995acfdc69193a67f070a4
refs/heads/master
2021-06-16T03:09:42.075132
2017-05-08T15:15:08
2017-05-08T15:15:08
108,284,447
1
0
null
2017-10-25T14:50:29
2017-10-25T14:50:29
null
UTF-8
Java
false
false
1,738
java
package com.dounine.clouddisk360.parser; import com.dounine.clouddisk360.annotation.Dependency; import com.dounine.clouddisk360.annotation.Parse; import com.dounine.clouddisk360.parser.deserializer.file.history.*; import com.dounine.clouddisk360.parser.deserializer.login.LoginUserToken; import org.apache.commons.lang3.StringUtils; import org.apache.http.Consts; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.message.BasicNameValuePair; import java.util.ArrayList; import java.util.List; @Parse("文件历史版本") @Dependency(depends={AuthTokenParser.class}) public class FileHistoryParser extends BaseParser<HttpPost, FileHistory, FileHistoryConst, FileHistoryParameter, FileHistoryRequestInterceptor, FileHistoryResponseHandle, FileHistoryParser> { public FileHistoryParser() { super(); } public FileHistoryParser(final LoginUserToken loginUser) { super(loginUser); } @Override public HttpPost initRequest(final FileHistoryParameter parameter) { final HttpPost request = new HttpPost(getRequestUri()); final List<NameValuePair> data = new ArrayList<>(6); data.add(new BasicNameValuePair(CONST.NID_NAME, parameter.getNid())); data.add(new BasicNameValuePair(CONST.HIS_NID_NAME, parameter.getHis_nid())); data.add(new BasicNameValuePair(CONST.START_NAME, parameter.getStart())); data.add(new BasicNameValuePair(CONST.NUM_NAME, parameter.getNum())); data.add(new BasicNameValuePair(CONST.SOURCE_NAME, StringUtils.EMPTY)); data.add(new BasicNameValuePair(CONST.AJAX_KEY, CONST.AJAX_VAL)); request.setEntity(new UrlEncodedFormEntity(data, Consts.UTF_8)); return request; } }
[ "102535481@qq.com" ]
102535481@qq.com
aead04605264aac97a2587012ed8e826f526eb87
a08d7307a73d77987d8d987444dd88719ed057d7
/java/src/top/sea521/design/creational/factorymethod/Test.java
35f48d4129c5274cd9a6e0ec7d932fe0d6dc83e9
[]
no_license
oweson/java--basic
4a5f419645b03373fc8174173a74e65984640661
31a827b6b3ca369b604d6ae52bc5de4acf7af33d
refs/heads/master
2021-06-12T13:17:19.357280
2021-04-12T13:57:24
2021-04-12T13:57:24
128,645,622
2
0
null
null
null
null
UTF-8
Java
false
false
598
java
package top.sea521.design.creational.factorymethod; /** * Created by geely */ public class Test { public static void main(String[] args) { VideoFactory videoFactory = new PythonVideoFactory(); VideoFactory videoFactory2 = new JavaVideoFactory(); VideoFactory videoFactory3 = new FEVideoFactory(); Video video = videoFactory.getVideo(); video.produce(); Video factory2Video = videoFactory2.getVideo(); factory2Video.produce(); Video videoFactory3Video = videoFactory3.getVideo(); videoFactory3Video.produce(); } }
[ "570347720@qq.com" ]
570347720@qq.com
1b03611d73472025b883329dc26fa8cfeeae7e7d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_35a67c56cead1e16695f84cf33f8fa8783fd9631/ResponseMessage/33_35a67c56cead1e16695f84cf33f8fa8783fd9631_ResponseMessage_t.java
a49721fa2fc3d5569cc6b7ebac730e985ce5b7cc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,175
java
import java.io.UnsupportedEncodingException; /** Response message; represents a response to an RPC. * * Wire format: (<offset> <size in bytes> <field name>) * - 0x00 1 Message type. * - 0x01 1 Response code (unsigned int) * - 0x02 ? Additional data, specific to RPC or response code */ public class ResponseMessage extends DFSMessage{ private int errorCode; private String data; public ResponseMessage() { super(MessageWireType.Response); } public ResponseMessage(int errorCode) { this(errorCode, null); } public ResponseMessage(int errorCode, String data) { this(); this.errorCode = errorCode; this.data = data; } @Override public boolean fromByteStream(byte[] msg) { if (msg.length < 2) return false; errorCode = BinaryUtils.byteToUint(msg, 1); if (msg.length == 2) return true; try { data = new String(msg, 2, msg.length - 2, DFSMessage.kStringCharset); } catch (UnsupportedEncodingException e) { assert false : "should not get here"; throw new RuntimeException("Unexpectedly could not serialize to UTF-8!"); } return true; } @Override public byte[] pack() { int packedSizeBytes = 2; byte[] encodedData; byte[] packed; if (data != null) { try { encodedData = data.getBytes(DFSMessage.kStringCharset); } catch (UnsupportedEncodingException e) { assert false : "should not get here"; throw new RuntimeException("Unexpectedly could not serialize to UTF-8!"); } packedSizeBytes += encodedData.length; packed = new byte[packedSizeBytes]; writeMessageType(packed); BinaryUtils.uintToByte(errorCode, packed, 1); System.arraycopy(encodedData, 0, packed, 0, encodedData.length); } else { packed = new byte[packedSizeBytes]; writeMessageType(packed); BinaryUtils.uintToByte(errorCode, packed, 1); } return packed; } public int getCode() { return errorCode; } public String getData() { return data; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f49ede5002438a71321137e0ebf8ac64f65c6f2f
fbd8a8c6ddd67a49762a3f5916cdf61755738097
/java02/src/step05/ex02/Test00.java
9bb394d745560942f8cea357b3c496b02af180b6
[]
no_license
MoonSungRyong/Java85-1
ae340ecb7be9662ef50f3a9be3872363c5f2d7b9
b8fbd6803c8e0dcf8a1ae2e01b3a4e38918bec97
refs/heads/master
2021-01-11T22:12:34.455940
2016-10-21T08:47:28
2016-10-21T08:47:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package step05.ex02; public class Test00 { public static void main(String[] args) { int no = 1; float kor = 95f; float eng = 100f; float math = 97.5f; int bonusScore = 5; kor += bonusScore; eng += bonusScore; math += bonusScore; float sum = kor + eng + math; float aver = sum / 3; System.out.printf("총점: %f\n", sum); System.out.printf("평균: %f\n", aver); } } /* */
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
b19ecbc763d8aca0c7ba9dc7b7274601552d649c
1d11d02630949f18654d76ed8d5142520e559b22
/TolwebUtils/src/org/tolweb/misc/MetaNode.java
cdc98e6e68aa73c1604a2bb8498f7305b26e2b22
[]
no_license
tolweb/tolweb-app
ca588ff8f76377ffa2f680a3178351c46ea2e7ea
3a7b5c715f32f71d7033b18796d49a35b349db38
refs/heads/master
2021-01-02T14:46:52.512568
2012-03-31T19:22:24
2012-03-31T19:22:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,203
java
package org.tolweb.misc; import java.io.Serializable; import java.util.List; import java.util.Map; import java.util.Set; import org.tolweb.hibernate.MappedAccessoryPage; import org.tolweb.hibernate.MappedNode; import org.tolweb.hibernate.MappedOtherName; import org.tolweb.hibernate.MappedPage; import org.tolweb.treegrow.main.Contributor; import org.tolweb.treegrow.main.NodeImage; /** * * @author lenards * */ public class MetaNode implements Serializable { /** */ private static final long serialVersionUID = 8322295462304399971L; private MappedNode node; private MappedPage page; private List<MappedAccessoryPage> accessoryPages; private Map<Long, String> otherNameIds; private List<NodeImage> media; private Set<Contributor> contributors; public String toString() { StringBuilder retVal = new StringBuilder(); retVal.append("["); retVal.append("node-name: " + getNodeName()); retVal.append(" synonyms: " + getSynonymInfo()); retVal.append(" other-name-info: " + otherNameIds.toString()); retVal.append("]"); return retVal.toString(); } private int getSynonymInfo() { return (getNode() != null && getNode().getSynonyms() != null ? getNode().getSynonyms().size() : 0); } private String getNodeName() { return getNode() != null ? getNode().getName() : "[null]"; } public boolean getHasAttachments() { return page != null || (accessoryPages != null && !accessoryPages.isEmpty()) || (otherNameIds != null && !otherNameIds.isEmpty()) || (media != null && !media.isEmpty()) || (contributors != null && !contributors.isEmpty()); } public boolean getHasPageAttached() { return page != null; } /** * @return the node this meta-object relates to */ public MappedNode getNode() { return node; } /** * @param node the node to relate to */ public void setNode(MappedNode node) { this.node = node; } /** * @return the page attached to node */ public MappedPage getPage() { return page; } /** * @param page the page to set */ public void setPage(MappedPage page) { this.page = page; } /** * @return the accessory pages attached to node */ public List<MappedAccessoryPage> getAccessoryPages() { return accessoryPages; } /** * @param accessoryPages the accessoryPages to set */ public void setAccessoryPages(List<MappedAccessoryPage> accessoryPages) { this.accessoryPages = accessoryPages; } /** * @return the other names attached to node */ public Map<Long, String> getOtherNameIds() { return otherNameIds; } /** * @param otherNames the otherNames to set */ public void setOtherNameIds(Map<Long, String> otherNameIds) { this.otherNameIds = otherNameIds; } /** * @return the media objects attached to node */ public List<NodeImage> getMedia() { return media; } /** * @param media the media to set */ public void setMedia(List<NodeImage> media) { this.media = media; } /** * @return the contributors attached to node */ public Set<Contributor> getContributors() { return contributors; } /** * @param contributors the contributors to set */ public void setContributors(Set<Contributor> contributors) { this.contributors = contributors; } }
[ "lenards@iplantcollaborative.org" ]
lenards@iplantcollaborative.org
22ca31f4f4d2bd931e126dcd5b40a989559c99fd
a33aac97878b2cb15677be26e308cbc46e2862d2
/data/libgdx/LwjglGL20_glFramebufferTexture2D.java
2e6abb8b49b2900cf89dfceba7fb0e082bb0fae7
[]
no_license
GabeOchieng/ggnn.tensorflow
f5d7d0bca52258336fc12c9de6ae38223f28f786
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
refs/heads/master
2022-05-30T11:17:42.278048
2020-05-02T11:33:31
2020-05-02T11:33:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
205
java
public void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) { EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
f2398f417eaf1c507d601e48926066c9a23d2778
bd729ef9fcd96ea62e82bb684c831d9917017d0e
/AlarmStatistics/src/com/ctfo/statistics/alarm/model/DriverOnoffline.java
6594de738e48c83023660e398b7d5ecf8ebe88f6
[]
no_license
shanghaif/workspace-kepler
849c7de67b1f3ee5e7da55199c05c737f036780c
ac1644be26a21f11a3a4a00319c450eb590c1176
refs/heads/master
2023-03-22T03:38:55.103692
2018-03-24T02:39:41
2018-03-24T02:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
package com.ctfo.statistics.alarm.model; public class DriverOnoffline implements Comparable<DriverOnoffline>{ /** 驾驶员编号 */ private String driverId; /** 上线时间 */ private long onlineUtc; /** 离线时间 */ private long offlineUtc; /** 上线时间(秒) */ private int onlineSecond; public DriverOnoffline(){ } public DriverOnoffline(String id, long online, long offline) { this.driverId = id; this.onlineUtc = online; if(online > 100000000000l ){ this.onlineSecond = Integer.parseInt(String.valueOf(online).substring(0, 10)); } this.offlineUtc = offline; } /** * 获取[驾驶员编号]值 */ public String getDriverId() { return driverId; } /** * 设置[驾驶员编号] 值 */ public void setDriverId(String driverId) { this.driverId = driverId; } /** * 获取[上线时间]值 */ public long getOnlineUtc() { return onlineUtc; } /** * 设置[上线时间] 值 */ public void setOnlineUtc(long onlineUtc) { this.onlineUtc = onlineUtc; } /** * 获取[离线时间]值 */ public long getOfflineUtc() { return offlineUtc; } /** * 设置[离线时间] 值 */ public void setOfflineUtc(long offlineUtc) { this.offlineUtc = offlineUtc; } /** * 获取[上线时间(秒)]值 */ public int getOnlineSecond() { return onlineSecond; } /** * 设置[上线时间(秒)] 值 */ public void setOnlineSecond(int onlineSecond) { this.onlineSecond = onlineSecond; } @Override public int compareTo(DriverOnoffline driverOnoffline) { return driverOnoffline.getOnlineSecond() - this.onlineSecond; } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
9ba8b7db949e1c125a885226c137048eebb50b4c
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava15/Foo713Test.java
f4a790b1a630949470021cec3c11a1ec8a114bb5
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package applicationModulepackageJava15; import org.junit.Test; public class Foo713Test { @Test public void testFoo0() { new Foo713().foo0(); } @Test public void testFoo1() { new Foo713().foo1(); } @Test public void testFoo2() { new Foo713().foo2(); } @Test public void testFoo3() { new Foo713().foo3(); } @Test public void testFoo4() { new Foo713().foo4(); } @Test public void testFoo5() { new Foo713().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
209c922f07387b74d85f72663aac2cb7b55d36fd
797fb4de63aba66c32a5e0436dbab47ec97180cd
/src/ca/evermal/comments/CommentAnalyzer.java
e21cbac1e669d0f85b6ef462dc86ff6fe955f16e
[]
no_license
maldonado/eclipse.commandline
11fde643b9405bc06d984bd4fd281afdf8383ad8
95a581c1f92850b9b332bbdcffbc59c4036d6a7a
refs/heads/master
2021-01-10T22:01:29.562252
2015-08-14T03:41:56
2015-08-14T03:41:56
26,254,361
0
0
null
null
null
null
UTF-8
Java
false
false
6,909
java
package ca.evermal.comments; import gr.uom.java.ast.ClassObject; import gr.uom.java.ast.Standalone; import gr.uom.java.ast.SystemObject; import gr.uom.java.distance.ExtractClassCandidateGroup; import gr.uom.java.distance.ExtractClassCandidateRefactoring; import gr.uom.java.distance.MoveMethodCandidateRefactoring; import gr.uom.java.distance.MyMethod; import gr.uom.java.jdeodorant.refactoring.manipulators.ASTSlice; import gr.uom.java.jdeodorant.refactoring.manipulators.ASTSliceGroup; import gr.uom.java.jdeodorant.refactoring.manipulators.TypeCheckElimination; import gr.uom.java.jdeodorant.refactoring.manipulators.TypeCheckEliminationGroup; import java.util.List; import java.util.Set; import org.eclipse.jdt.core.IJavaProject; import ca.evermal.util.ConnectionFactory; public class CommentAnalyzer { private static final int TRUE = 1; private static Set<TypeCheckEliminationGroup> typeCheckEliminationRefactoringOpportunities; private static Set<ExtractClassCandidateGroup> extractClassRefactoringOpportunities; private static List<MoveMethodCandidateRefactoring> moveMethodRefactoringOpportunities; private static Set<ASTSliceGroup> extractMethodRefactoringOpportunities ; public static void start(SystemObject systemObject, IJavaProject jproject, CommentClass commentClass ) { System.out.println("processing:" + commentClass.getClassName()); ClassObject classObject = systemObject.getClassObject(commentClass.getClassName()); moveMethodRefactoringOpportunities = Standalone.getMoveMethodRefactoringOpportunities(jproject, classObject); for(Comment comment : commentClass.getCommentList()){ System.out.println("found comment located in the method level: " + comment.getDescription()); checkMoveMethodRefactorings(jproject, classObject, comment); } moveMethodRefactoringOpportunities = null; System.out.println("processed move method"); typeCheckEliminationRefactoringOpportunities = Standalone.getTypeCheckEliminationRefactoringOpportunities(jproject, classObject); for(Comment comment : commentClass.getCommentList()){ System.out.println("found comment located in the method level: " + comment.getDescription()); checkTypeCheckingRefactorings(jproject, classObject, comment); } typeCheckEliminationRefactoringOpportunities = null; System.out.println("processed type check"); extractClassRefactoringOpportunities = Standalone.getExtractClassRefactoringOpportunities(jproject, classObject); for(Comment comment : commentClass.getCommentList()){ System.out.println("found comment located in the method level: " + comment.getDescription()); checkForExtractClassRefactorings(jproject, classObject, comment); } extractClassRefactoringOpportunities = null; System.out.println("processed extract class"); extractMethodRefactoringOpportunities = Standalone.getExtractMethodRefactoringOpportunities(jproject, classObject); for(Comment comment : commentClass.getCommentList()){ System.out.println("found comment located in the method level: " + comment.getDescription()); checkExtractMethodsRefactorings(jproject, comment, classObject); } extractMethodRefactoringOpportunities = null; System.out.println("processed extract method"); } private static void checkForExtractClassRefactorings(IJavaProject jproject, ClassObject classObject, Comment comment) { System.out.println("searching extract class refactoring opportunities"); // Set<ExtractClassCandidateGroup> extractClassRefactoringOpportunities = Standalone.getExtractClassRefactoringOpportunities(jproject, classObject); // extractClassRefactoringOpportunities = Standalone.getExtractClassRefactoringOpportunities(jproject, classObject); for(ExtractClassCandidateGroup group : extractClassRefactoringOpportunities){ for(ExtractClassCandidateRefactoring candidate : group.getCandidates()){ for(MyMethod oldMethods : candidate.getMyMethodsFromOldEntities()){ String signature = oldMethods.getMethodObject().getSignature(); if(comment.getDescription().equals(signature)){ comment.setJdeodorantHit(TRUE); comment.setRefactoringListName("CHANGED METHOD IN GOD CLASS"); comment.updateProcessed(ConnectionFactory.getPostgresql()); break; } } } } // extractClassRefactoringOpportunities = null; } // TODO: COMPARISON IS NOT PERFECT YET. METHODS CAN HAVE THE SAME NAME, HAVE TO TAKE IN CONSIDERATION THE PARAMETERS ALSO private static void checkTypeCheckingRefactorings(IJavaProject jproject, ClassObject classObject, Comment comment) { System.out.println("searching type checking opportunities"); // Set<TypeCheckEliminationGroup> typeCheckEliminationRefactoringOpportunities = Standalone.getTypeCheckEliminationRefactoringOpportunities(jproject, classObject); // typeCheckEliminationRefactoringOpportunities = Standalone.getTypeCheckEliminationRefactoringOpportunities(jproject, classObject); for(TypeCheckEliminationGroup eliminationGroup : typeCheckEliminationRefactoringOpportunities){ for(TypeCheckElimination candidate : eliminationGroup.getCandidates()){ if(comment.getDescription().contains(candidate.getTypeCheckMethod().getName().toString())){ comment.setJdeodorantHit(TRUE); comment.setRefactoringListName("MOVE METHOD"); comment.updateProcessed(ConnectionFactory.getPostgresql()); break; } } } // typeCheckEliminationRefactoringOpportunities = null; } private static void checkExtractMethodsRefactorings(IJavaProject jproject, Comment comment, ClassObject classObject) { System.out.println("searching extract method opportunities"); // Set<ASTSliceGroup> extractMethodRefactoringOpportunities = Standalone.getExtractMethodRefactoringOpportunities(jproject, classObject); // extractMethodRefactoringOpportunities = Standalone.getExtractMethodRefactoringOpportunities(jproject, classObject); for (ASTSliceGroup sliceGroup : extractMethodRefactoringOpportunities){ for(ASTSlice candidate : sliceGroup.getCandidates()){ if(comment.getDescription().equals(candidate.getExtractedMethodSignature())){ comment.setJdeodorantHit(TRUE); comment.setRefactoringListName("EXTRACT METHOD"); comment.updateProcessed(ConnectionFactory.getPostgresql()); break; } } } // extractMethodRefactoringOpportunities = null; } private static void checkMoveMethodRefactorings(IJavaProject jproject, ClassObject classObject, Comment comment) { System.out.println("searching move method opportunities"); for (MoveMethodCandidateRefactoring candidate : moveMethodRefactoringOpportunities){ String signature = candidate.getSourceMethod().getMethodObject().getSignature(); if(comment.getDescription().equals(signature)){ comment.setJdeodorantHit(TRUE); comment.setRefactoringListName("MOVE METHOD"); comment.updateProcessed(ConnectionFactory.getPostgresql()); break; } } } }
[ "everton.maldonado@gmail.com" ]
everton.maldonado@gmail.com
37ff48f9367467120e5180cadc7a1b8b0df3cfc3
16244f3724c622f995c0c0cc5a72d8f6feb2bbdb
/app/src/main/java/app/witkey/live/activities/DeepLinkActivity.java
4311a2c5e48bc5ddc11ca408a838d6f635625462
[]
no_license
JitendraKumar7/WitKey_Android_V1-2.8.1
1abbdead466393048b234058a5d673854a2b5910
0b39dbe6218d9f28f5b6b6b33e3ce413ce0548ef
refs/heads/master
2020-03-13T08:40:17.754334
2018-04-25T18:32:17
2018-04-25T18:32:17
131,048,197
0
0
null
null
null
null
UTF-8
Java
false
false
3,391
java
package app.witkey.live.activities; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.google.gson.Gson; import org.json.JSONException; import org.json.JSONObject; import app.witkey.live.items.StreamBO; import app.witkey.live.utils.EnumUtils; public class DeepLinkActivity extends AppCompatActivity { static String string = "Hey check out my streaming at: http://witkeyapp.com/witkey/api/share/"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { Intent intent = getIntent(); Uri data = intent.getData(); assert data != null; Log.d("JKS", "DATA " + data.toString()); //Toast.makeText(getApplicationContext(), "Deep Linking Working", Toast.LENGTH_SHORT).show(); String url = data.toString(); StringRequest ExampleStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() { @Override public void onResponse(String response) { //This code is executed if the server responds, whether or not the response contains data. //The String 'response' contains the server's response. try { Log.d("JKS", "DATA " + response); JSONObject jsonObject = new JSONObject(response); if (jsonObject.getInt("Response") == 200) { String result = String.valueOf(jsonObject.getJSONObject("Result")); StreamBO streamBO = new Gson().fromJson(result, StreamBO.class); startActivity(new Intent(DeepLinkActivity.this, EnumUtils.getCurrentGoLiveViewType()) .putExtra(GoLiveActivity.ARG_TYPE, GoLiveActivity.ARG_PARAM_2) .putExtra(GoLiveActivity.ARG_PARAM_3, streamBO)); finish(); } } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { //Create an error listener to handle errors appropriately. @Override public void onErrorResponse(VolleyError error) { //This code is executed if there is an error. } }); RequestQueue ExampleRequestQueue = Volley.newRequestQueue(this); ExampleRequestQueue.add(ExampleStringRequest); } catch (NullPointerException e) { e.printStackTrace(); } } public static void share(Context context, String uid) { Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, string + uid); sendIntent.setType("text/plain"); context.startActivity(sendIntent); } }
[ "jitendrasoam90@gmail.com" ]
jitendrasoam90@gmail.com
482eac49369df3597b22b50b2016a5fc0b10319e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_59120e4fe03c0ec305456b0fa33e74a55b464918/XhtmlTest/5_59120e4fe03c0ec305456b0fa33e74a55b464918_XhtmlTest_s.java
98c06d8408098a06c6fd7444d4f43ba68389d200
[]
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
1,754
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. 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. For additional information regarding * copyright in this work, please see the NOTICE file in the top level * directory of this distribution. */ package org.apache.abdera.test.parser.stax; import org.apache.abdera.Abdera; import org.apache.abdera.model.Content; import org.apache.abdera.model.Div; import org.apache.abdera.model.Entry; import junit.framework.TestCase; public class XhtmlTest extends TestCase { public void testXhtml() throws Exception { Abdera abdera = new Abdera(); Entry entry = abdera.newEntry(); entry.setContentAsXhtml("<p>Test</p>"); assertNotNull(entry.getContent()); assertEquals(entry.getContentType(), Content.Type.XHTML); assertTrue(entry.getContentElement().getValueElement() instanceof Div); entry = abdera.newEntry(); entry.setContent("<a><b><c/></b></a>", Content.Type.XML); assertNotNull(entry.getContent()); assertEquals(entry.getContentType(), Content.Type.XML); assertNotNull(entry.getContentElement().getValueElement()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
59460c176d65bf6cc26a1aedb56feb6d65d68d42
ac880b9d947c272cbb4620f6317c56ef5c3ae9f9
/backend/iBlogConfigService/src/main/java/iblog/IBlogConfigServiceApplication.java
f624f98a17e6dbedccd8658b30536f81f8871eac
[]
no_license
sqzaman/iBlog
a5401e38e4d9176f27a83c0f9d9a46aec008c3ca
31816ad48106503b00749e5807340efe4b8e2b3a
refs/heads/master
2020-03-28T19:14:53.934435
2018-09-27T23:35:37
2018-09-27T23:35:37
148,958,448
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package iblog; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.config.server.EnableConfigServer; @SpringBootApplication @EnableConfigServer public class IBlogConfigServiceApplication { public static void main(String[] args) { SpringApplication.run(IBlogConfigServiceApplication.class, args); } }
[ "sqzaman@gmail.com" ]
sqzaman@gmail.com
a4c376bc1c2f2e72fc146e9b00b435bcdfb4a728
7fdc7740a7b4958e26f4bdd0c67e2f33c9d032ab
/SpringBoot/learn-spring-boot/learn-spring-boot-chapter4/src/main/java/com/learn/springboot/chapter4/componet/CustomScheduling.java
458467a0ed6b6c112e1851fec4234f2bbd2406d7
[]
no_license
lysjava1992/javabase
9290464826d89c0415bb7c6084aa649de1496741
9d403aae8f20643fe1bf370cabcdd93164ea604b
refs/heads/master
2023-06-22T02:25:21.573301
2021-12-12T03:35:36
2021-12-12T03:35:36
216,582,761
0
0
null
null
null
null
UTF-8
Java
false
false
2,632
java
package com.learn.springboot.chapter4.componet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.SchedulingConfigurer; import org.springframework.scheduling.concurrent.CustomizableThreadFactory; import org.springframework.scheduling.config.ScheduledTaskRegistrar; import org.springframework.scheduling.support.CronTrigger; import org.springframework.util.StringUtils; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; @Configuration public abstract class CustomScheduling implements SchedulingConfigurer { /** * 定时任务周期表达式 */ private String cron; @Override public void configureTasks(ScheduledTaskRegistrar registrar) { //设置任务注册器的调度器 registrar.setScheduler(taskScheduler()); registrar.addTriggerTask( //定时任务要执行的方法 () -> { processTask(); }, //调度实现的时间控制 triggerContext -> { if (StringUtils.isEmpty(cron)) { cron = getCron(); } CronTrigger trigger = new CronTrigger(cron); return trigger.nextExecutionTime(triggerContext); } ); } /** * 用于注册计划任务 * 每一个被调度的任务都会由线程池中一个线程去执行, * 因此任务是并发执行的,相互之间不会受到干扰。 * 需要注意的是,只有当任务的执行时间到来时, * ScheduedExecutor 才会真正启动一个线程, * 其余时间 ScheduledExecutor 都是在轮询任务的状态 * @return */ @Bean() public Executor taskScheduler() { ThreadFactory factory = new CustomizableThreadFactory("TaskScheduler"); //创建线程池 //当调度器shutdown被调用时等待当前被调度的任务完成 return Executors.newScheduledThreadPool(5, factory); } /** * 任务的处理函数 * 本函数需要由派生类根据业务逻辑来实现 */ protected abstract void processTask(); /** * @return String * 获取定时任务周期表达式 * 本函数由派生类实现,从配置文件,数据库等方式获取参数值 */ protected abstract String getCron(); }
[ "763644568@qq.com" ]
763644568@qq.com
4e02da6f93a0b5a2abbc2275db70a000fa62d196
6383cd21a8ea83aacf8f096cf6efaba9880eda0f
/gen/org/intellij/erlang/psi/impl/ErlangMultiplicativeExpressionImpl.java
8c7ee1d200979a38cd3cfdab5ff6ba7b86acce8f
[ "Apache-2.0" ]
permissive
ashneyderman/intellij-erlang
055f2a48ec59eaed450b816a4bb9929a0036b8dc
dec3d10150ce6ba6f6607b5fa6a21a625354652a
refs/heads/master
2021-01-20T23:17:49.365398
2012-08-25T19:29:14
2012-08-25T19:29:14
5,558,939
0
1
null
null
null
null
UTF-8
Java
false
true
1,355
java
// This is a generated file. Not intended for manual editing. package org.intellij.erlang.psi.impl; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static org.intellij.erlang.ErlangTypes.*; import org.intellij.erlang.psi.*; public class ErlangMultiplicativeExpressionImpl extends ErlangExpressionImpl implements ErlangMultiplicativeExpression { public ErlangMultiplicativeExpressionImpl(ASTNode node) { super(node); } @Override @NotNull public List<ErlangExpression> getExpressionList() { return PsiTreeUtil.getChildrenOfTypeAsList(this, ErlangExpression.class); } @Override @Nullable public PsiElement getAnd() { return findChildByType(ERL_AND); } @Override @Nullable public PsiElement getBand() { return findChildByType(ERL_BAND); } @Override @Nullable public PsiElement getDiv() { return findChildByType(ERL_DIV); } @Override @Nullable public PsiElement getRem() { return findChildByType(ERL_REM); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof ErlangVisitor) ((ErlangVisitor)visitor).visitMultiplicativeExpression(this); else super.accept(visitor); } }
[ "sergey.ignatov@jetbrains.com" ]
sergey.ignatov@jetbrains.com
6343a9e4b69e3b36f8399c9baa5352a3d5c2d7a9
a18e976b806116aec38b9534862a4aa81673586d
/jpa/test/src/test/java/org/wildfly/swarm/jpa/JPAInVmTest.java
54fbce558cd237cb498a63ec2d7d0a8a0c02bd47
[ "Apache-2.0" ]
permissive
bbrowning/wildfly-swarm
8825e15809d43b381d6b37d0324695ae8828d9a3
4a6c452b975c780ec3e9283f5e4ef3bc1d01e5d2
refs/heads/master
2021-01-18T08:32:24.257954
2015-09-21T15:48:05
2015-09-21T15:48:41
42,935,215
0
0
null
2015-09-22T13:25:23
2015-09-22T13:25:23
null
UTF-8
Java
false
false
359
java
package org.wildfly.swarm.jpa; import org.junit.Test; import org.wildfly.swarm.container.Container; /** * @author Bob McWhirter */ public class JPAInVmTest { @Test public void testSimple() throws Exception { Container container = new Container(); container.fraction( new JPAFraction() ); container.start().stop(); } }
[ "bob@mcwhirter.org" ]
bob@mcwhirter.org
269156548e33175cb7075b2dc6b27cb19e7ed4b2
ac0c1deafd5726eb958fa7186a681c44b2b042a3
/app/src/main/java/com/digitalcashbag/utilities/dmt/addmoney/AddMoneyContainer.java
c49fca8619d719218e048e81d31998ff2e7fc2bd
[]
no_license
MohammadFaizan007/kkmShopping
c87260f77f8ac802a50b95a7e727fb23df3f3bad
629028c758054e9b9d3fb9ab7a75d5dd16f737b9
refs/heads/master
2022-11-01T10:41:53.957959
2020-06-17T06:59:07
2020-06-17T06:59:07
272,901,055
0
3
null
null
null
null
UTF-8
Java
false
false
3,230
java
package com.digitalcashbag.utilities.dmt.addmoney; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.PagerTabStrip; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.digitalcashbag.R; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; import kkm.com.core.constants.BaseFragment; public class AddMoneyContainer extends BaseFragment { @BindView(R.id.add_money_pager_header) PagerTabStrip add_money_pager_header; @BindView(R.id.add_money_pager) ViewPager add_money_pager; Unbinder unbinder; MyPagerAdapter adapterViewPager; Fragment currentFragment; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_add_money, null); unbinder = ButterKnife.bind(this, view); return view; } @Override public void onViewCreatedStuff(View view, @Nullable Bundle savedInstanceState) { adapterViewPager = new MyPagerAdapter(getChildFragmentManager()); add_money_pager.setAdapter(adapterViewPager); currentFragment = adapterViewPager.getItem(0); } @Override public void onDestroyView() { super.onDestroyView(); unbinder.unbind(); } class MyPagerAdapter extends FragmentPagerAdapter { Fragment addBeneficiary = new AddBeneficiary(); Fragment beneficiaryList = new BeneficiaryList(); // Fragment transaction = new Transaction(); private int NUM_ITEMS = 2; MyPagerAdapter(FragmentManager fragmentManager) { super(fragmentManager); } // Returns total number of pages @Override public int getCount() { return NUM_ITEMS; } // Returns the fragment to display for that page @Override public Fragment getItem(int position) { switch (position) { case 0: // Fragment # 0 - This will show FirstFragment return addBeneficiary; case 1: // Fragment # 1 - This will show SecondFragment different title return beneficiaryList; // case 2: // Fragment # 1 - This will show SecondFragment different title // return transaction; default: return null; } } // Returns the page title for the top indicator @Override public CharSequence getPageTitle(int position) { switch (position) { case 0: return getString(R.string.add_beneficiary); case 1: return getString(R.string.beneficiary_list); // case 2: // return "Transaction"; } return ""; } } }
[ "faizanmohd106@gmail.com" ]
faizanmohd106@gmail.com
f6ca8c12c17a146ddfdba1cbfaaa8f0fba62487f
9a7ec216a1deeab63e5bf293381d06cf25419251
/batch13022014/core/EventProcessing/src/com/ep/beans/EditCityController.java
ccf48a2bff367342baa5ddf82fef23375bbf439f
[]
no_license
Mallikarjun0535/Spring
63b2fb705af3477402639557dbda1378fe20b538
041f538c7ae2eca113df7cb9277e438ec6221c08
refs/heads/master
2020-06-04T00:22:21.910592
2019-06-20T19:18:09
2019-06-20T19:18:09
191,792,835
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.ep.beans; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; public class EditCityController implements ApplicationEventPublisherAware { private ApplicationEventPublisher publisher; public void editCity(int cityId, String cityName) { ReloadEvent re = null; System.out.println("updated db with city as : " + cityName); re = new ReloadEvent("tblCities", this); publisher.publishEvent(re); } @Override public void setApplicationEventPublisher(ApplicationEventPublisher publisher) { this.publisher = publisher; } }
[ "mallik.mitta@outlook.com" ]
mallik.mitta@outlook.com
d5e0b74ac52b1b3a434770045d440a648b789a42
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_914591179886be94de2ba28a9d2ae36f6345f353/SAXWrapper/2_914591179886be94de2ba28a9d2ae36f6345f353_SAXWrapper_s.java
943626497b710b969d18b68e6bcda8edf5a111f5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,218
java
package org.basex.build.xml; import static org.basex.core.Text.*; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.sax.SAXSource; import org.basex.build.FileParser; import org.basex.core.ProgressException; import org.basex.core.Prop; import org.basex.io.IO; import org.basex.io.IOFile; import org.basex.util.Util; import org.xml.sax.InputSource; import org.xml.sax.SAXParseException; import org.xml.sax.XMLReader; /** * This class parses an XML document with Java's default SAX parser. Note that * large file cannot be parsed with the default parser due to entity handling * (e.g. the DBLP data). * * @author BaseX Team 2005-11, BSD License * @author Christian Gruen */ public final class SAXWrapper extends FileParser { /** File counter. */ long counter; /** Current line. */ int line = 1; /** SAX handler reference. */ private SAXHandler sax; /** Optional XML reader. */ private final SAXSource src; /** File length. */ private long length; /** Properties. */ private final Prop prop; /** * Constructor. * @param s sax source * @param pr Properties */ public SAXWrapper(final SAXSource s, final Prop pr) { this(s, IO.get(s.getSystemId()).name(), "", pr); } /** * Constructor. * @param s sax source * @param n name * @param ta target to insert into * @param pr Properties */ public SAXWrapper(final SAXSource s, final String n, final String ta, final Prop pr) { super(io(s, n), ta); src = s; prop = pr; } /** * Returns IO reference. * @param s sax source * @param n name * @return io */ private static IO io(final SAXSource s, final String n) { final IO io = IO.get(s.getSystemId()); io.name(n); return io; } @Override public void parse() throws IOException { final InputSource is = wrap(src.getInputSource()); final String input = src.getSystemId() == null ? "..." : src.getSystemId(); try { XMLReader r = src.getXMLReader(); if(r == null) { final SAXParserFactory f = SAXParserFactory.newInstance(); f.setNamespaceAware(true); f.setValidating(false); r = f.newSAXParser().getXMLReader(); } sax = new SAXHandler(builder); final String cat = prop.get(Prop.CATFILE); if(!cat.isEmpty()) CatalogResolverWrapper.set(r, cat); r.setDTDHandler(sax); r.setContentHandler(sax); r.setProperty("http://xml.org/sax/properties/lexical-handler", sax); r.setErrorHandler(sax); if(is != null) r.parse(is); else r.parse(src.getSystemId()); } catch(final SAXParseException ex) { final String msg = Util.info(SCANPOS, input, ex.getLineNumber(), ex.getColumnNumber()) + ": " + ex.getMessage(); final IOException ioe = new IOException(msg); ioe.setStackTrace(ex.getStackTrace()); throw ioe; } catch(final ProgressException ex) { throw ex; } catch(final Exception ex) { // occurs, e.g. if document encoding is invalid: // prefix message with source id String msg = ex.getMessage(); if(input != null) msg = "\"" + input + "\": " + msg; // wrap and return original message final IOException ioe = new IOException(msg); ioe.setStackTrace(ex.getStackTrace()); throw ioe; } finally { try { final InputStream in = is.getByteStream(); if(in != null) in.close(); final Reader r = is.getCharacterStream(); if(r != null) in.close(); } catch(final IOException ex) { Util.debug(ex); } } } /** * Wraps the input source with a stream which counts the number of read bytes. * @param is input source * @return resulting stream * @throws IOException I/O exception */ private InputSource wrap(final InputSource is) throws IOException { if(!(file instanceof IOFile) || is == null || is.getByteStream() != null || is.getSystemId() == null || is.getSystemId().isEmpty()) return is; final InputSource in = new InputSource(new FileInputStream(file.path()) { @Override public int read(final byte[] b, final int off, final int len) throws IOException { final int i = super.read(b, off, len); for(int o = off; o < len; ++o) if(b[off + o] == '\n') ++line; counter += i; return i; } }); src.setInputSource(in); src.setSystemId(is.getSystemId()); length = file.length(); return in; } @Override public String det() { return length == 0 ? super.det() : Util.info(SCANPOS, file.name(), line); } @Override public double prog() { return length == 0 ? sax == null ? 0 : sax.nodes / 3000000d % 1 : (double) counter / length; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ed0e360dc3f08f50b7de158b1fc03c4355475ec7
a3c07385553254453e7a0d23e47e684d41057f8d
/src/main/java/org/cxml/invoicedetail/DueAmount.java
82e33eedce193abe521736ec64d3a0d5c54bc9bb
[]
no_license
Effie/cxml-api
1011d1a89c2bee2c9ecbd2bc2db7a58cf9fb6049
6dde4f1f80ac9821060eca113faf0cb369d83590
refs/heads/master
2020-12-25T12:41:21.334993
2016-01-23T10:26:26
2016-01-23T10:26:26
50,233,787
0
0
null
2016-01-23T10:23:00
2016-01-23T10:23:00
null
UTF-8
Java
false
false
1,286
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.08.06 at 12:54:05 AM EDT // package org.cxml.invoicedetail; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "money" }) @XmlRootElement(name = "DueAmount") public class DueAmount { @XmlElement(name = "Money", required = true) protected Money money; /** * Gets the value of the money property. * * @return * possible object is * {@link Money } * */ public Money getMoney() { return money; } /** * Sets the value of the money property. * * @param value * allowed object is * {@link Money } * */ public void setMoney(Money value) { this.money = value; } }
[ "bradsdavis@gmail.com" ]
bradsdavis@gmail.com
9051e6a45225bdd6a2314b324a94a86f4c701843
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/110_firebird-org.firebirdsql.encodings.Encoding_ISO8859_4-1.0-3/org/firebirdsql/encodings/Encoding_ISO8859_4_ESTest_scaffolding.java
3de11ebd4f0eb8fc653d6dc9071f6078af0329da
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 16:41:14 GMT 2019 */ package org.firebirdsql.encodings; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class Encoding_ISO8859_4_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
5cde21b0b1c24cd556e19e0324df88e2e5c64c32
39b208bc5aed7ff144035a7a2c19ad032d49651f
/icardea-consenteditor/src/main/java/tr/com/srdc/icardea/consenteditor/controller/message/ConsentError.java
9a781c433abbfdbeb3e46d3fca8c2cc3df0fca0c
[]
no_license
coderunner4/icardea
8f28864aaa7993dd71ac100f43a54af0b146133a
de50d91b8ede37acc6aaf48eea62bdda47710c4f
refs/heads/master
2021-01-10T13:04:54.315708
2013-02-27T13:27:24
2013-02-27T13:27:24
46,989,557
0
0
null
null
null
null
UTF-8
Java
false
false
655
java
package tr.com.srdc.icardea.consenteditor.controller.message; public class ConsentError { private int errorCode; private String errorDescription; private int errorScope; public ConsentError() { } public void setErrorCode(int errorCode) { this.errorCode = errorCode; } public int getErrorCode() { return errorCode; } public void setErrorDescription(String errorDescription) { this.errorDescription = errorDescription; } public String getErrorDescription() { return errorDescription; } public void setErrorScope(int errorScope) { this.errorScope = errorScope; } public int getErrorScope() { return errorScope; } }
[ "yildiraykabak@gmail.com" ]
yildiraykabak@gmail.com
921c4dbce8c1be79ddef34a0b3d4f1cc287b50da
75c4712ae3f946db0c9196ee8307748231487e4b
/src/main/java/com/alipay/api/response/KoubeiCateringOrderPayDisburseResponse.java
928be2aae77d9b88534b6655f56964351383bd25
[ "Apache-2.0" ]
permissive
yuanbaoMarvin/alipay-sdk-java-all
70a72a969f464d79c79d09af8b6b01fa177ac1be
25f3003d820dbd0b73739d8e32a6093468d9ed92
refs/heads/master
2023-06-03T16:54:25.138471
2021-06-25T14:48:21
2021-06-25T14:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,250
java
package com.alipay.api.response; import java.util.Date; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.PosDiscountDetail; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.catering.order.pay.disburse response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiCateringOrderPayDisburseResponse extends AlipayResponse { private static final long serialVersionUID = 7128234214956869689L; /** * 优惠明细列表 */ @ApiListField("discount_details") @ApiField("pos_discount_detail") private List<PosDiscountDetail> discountDetails; /** * 外部支付订单号,唯一标识本次支付的requestID */ @ApiField("out_pay_no") private String outPayNo; /** * 买家实付金额 */ @ApiField("pay_amount") private String payAmount; /** * 口碑内部支付订单号,和外部支付订单号一一映射 */ @ApiField("pay_no") private String payNo; /** * 买家交易支付成功时间 */ @ApiField("pay_time") private Date payTime; /** * 商家实收金额 */ @ApiField("receipt_amount") private String receiptAmount; /** * PROCESS-支付中,PAY-已支付。 如果是支付中状态,需要做支付结果轮询 */ @ApiField("status") private String status; /** * 订单付款金额,以元为单位,精确到分 */ @ApiField("total_amount") private String totalAmount; /** * 支付宝交易号 */ @ApiField("trade_no") private String tradeNo; /** * 买家支付宝账号 */ @ApiField("user_id") private String userId; public void setDiscountDetails(List<PosDiscountDetail> discountDetails) { this.discountDetails = discountDetails; } public List<PosDiscountDetail> getDiscountDetails( ) { return this.discountDetails; } public void setOutPayNo(String outPayNo) { this.outPayNo = outPayNo; } public String getOutPayNo( ) { return this.outPayNo; } public void setPayAmount(String payAmount) { this.payAmount = payAmount; } public String getPayAmount( ) { return this.payAmount; } public void setPayNo(String payNo) { this.payNo = payNo; } public String getPayNo( ) { return this.payNo; } public void setPayTime(Date payTime) { this.payTime = payTime; } public Date getPayTime( ) { return this.payTime; } public void setReceiptAmount(String receiptAmount) { this.receiptAmount = receiptAmount; } public String getReceiptAmount( ) { return this.receiptAmount; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } public void setTotalAmount(String totalAmount) { this.totalAmount = totalAmount; } public String getTotalAmount( ) { return this.totalAmount; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } public String getTradeNo( ) { return this.tradeNo; } public void setUserId(String userId) { this.userId = userId; } public String getUserId( ) { return this.userId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8c905c2dd832117b09b43d520dc0ade7f6ae4c85
285ccba2f5b68a16aa6e216a8efdcf4438cbf2cc
/java/16-Override/src/Salary.java
a64643b390b96d95e9393a5ad22e1f4ab19b9966
[]
no_license
azqazq195/Academy
84dcf6a052cfb79416be758688ced2958373944c
69c584c8152fce7e4188099f63a68bc9d0ea3c75
refs/heads/master
2023-01-23T06:58:00.261884
2020-11-26T09:26:07
2020-11-26T09:26:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
public class Salary { String name; int salary; public Salary(String name, int salary) { super(); this.name = name; this.salary = salary; } void viewInformation() { System.out.println("이름 : " + name); System.out.println("연봉 : " + salary); } }
[ "45132207+azqazq195@users.noreply.github.com" ]
45132207+azqazq195@users.noreply.github.com
3f3619bbd5999c7048a4025477df38defd0a8e8d
7e9cb0b3a29dbd7d241640c0dda30b620dae52b9
/bank/bank-client/src/main/java/com/cts/fasttack/bank/client/ws/client/cardPT/SetCardDailyLimitsResponse.java
1637be8f66ebf4b7a2e374b769e3ad68c58e691d
[]
no_license
ilemobayo/FASTTACK
f8705ae0b2f5a41487410016756a1b26b0bc5e22
85487890b9e5597f9b2b9690713ece2a5c1aff9f
refs/heads/master
2020-05-26T15:00:06.553982
2018-11-30T11:32:39
2018-11-30T11:32:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,041
java
package com.cts.fasttack.bank.client.ws.client.cardPT; 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.XmlType; /** * <p>Java class for setCardDailyLimitsResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="setCardDailyLimitsResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="setCardDailyLimitsItem" type="{http://sab/}setCardDailyLimitsItem" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "setCardDailyLimitsResponse", propOrder = { "setCardDailyLimitsItem" }) public class SetCardDailyLimitsResponse { protected List<SetCardDailyLimitsItem> setCardDailyLimitsItem; /** * Gets the value of the setCardDailyLimitsItem 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 setCardDailyLimitsItem property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSetCardDailyLimitsItem().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SetCardDailyLimitsItem } * * */ public List<SetCardDailyLimitsItem> getSetCardDailyLimitsItem() { if (setCardDailyLimitsItem == null) { setCardDailyLimitsItem = new ArrayList<SetCardDailyLimitsItem>(); } return this.setCardDailyLimitsItem; } }
[ "a.lazarchuk@cartsys.com.ua" ]
a.lazarchuk@cartsys.com.ua
12ae188d8813a4a6c38a09a69aee7117bef3dff0
a0e5858528a288b97aa32fb0f2170d6ed9226885
/emp-nangang/web/src/main/java/com/taiji/emp/screenShow/feign/CmdExpertClient.java
790e86a5c3f6eb95ad32acfd4b742368a16c307d
[]
no_license
rauldoblem/nangang
f0a0f0c816c7de915c352cc467b2e6716c87a310
e48cadeaf5245c42b7e9a21f28903f4f4e8b6996
refs/heads/master
2020-08-11T04:01:12.891437
2019-06-25T13:42:57
2019-06-25T13:42:57
214,486,888
0
0
null
2019-10-11T16:51:17
2019-10-11T16:51:17
null
UTF-8
Java
false
false
308
java
package com.taiji.emp.screenShow.feign; import com.taiji.emp.event.cmd.feign.ICmdExpertRestService; import org.springframework.cloud.netflix.feign.FeignClient; @FeignClient(value="base-server-zuul/micro-emp-event",path = "api/cmd/experts") public interface CmdExpertClient extends ICmdExpertRestService{ }
[ "18151950796@163.com" ]
18151950796@163.com
e428419129961a7f738da058bc64c51e2e6af3b0
58f4d3de8e264d1e00d70a19caefd452f824a328
/wx/wx_dao/src/main/java/org/yelp/dao/register/RegisterDaoI.java
499c3df044c644fab5043846ad8f30523864ba3e
[]
no_license
ndboy2012/wechat
cad20f54aedba081d36cc5ec10664f126e0a4486
82367e3bf088c36a5d6373fd056eba5c798b8de5
refs/heads/master
2021-04-12T04:37:32.857904
2015-07-30T04:27:46
2015-07-30T11:40:44
37,120,698
1
1
null
null
null
null
UTF-8
Java
false
false
632
java
package org.yelp.dao.register; import org.jeecgframework.core.common.service.CommonServiceI; import org.yelp.entity.register.RegisterEntity; public interface RegisterDaoI extends CommonServiceI{ public void saveRegisterEntity(RegisterEntity register); //检查电话号码是否已经登记过了 public boolean checkTelephoneExit(String telephone) throws Exception; //检查open_id是否已经是登记过了 public boolean checkOpenIdExit(String open_id) throws Exception; public String getOpenIdByTel(String telephone) throws Exception; public String getPhoneByOpenId(String openId) throws Exception; }
[ "yelp1022@163.com" ]
yelp1022@163.com
ef5fa28afd50a2685dce86d703cf3eee82f9d663
456171d9e9c729dee313b0a9ab1382c25eb06ace
/src/main/java/unquietcode/tools/flapi/graph/BlockMethodTracker.java
d260835aa9f6fbcf7178469a2ce6c710bff0052b
[ "Apache-2.0" ]
permissive
ramtej/Flapi
8d996f49995219070566e3e9bd36304296312f8a
293161cff77c28c6694220280f2dc5698be8da5b
refs/heads/master
2020-02-26T16:36:34.459520
2013-10-31T02:41:48
2013-10-31T02:41:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,832
java
/******************************************************************************* Copyright 2013 Benjamin Fagin 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. Read the included LICENSE.TXT for more information. ******************************************************************************/ package unquietcode.tools.flapi.graph; import unquietcode.tools.flapi.graph.components.Transition; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * @author Ben Fagin * @version 2013-06-29 */ public class BlockMethodTracker { private final Map<String, Set<String>> seenMethods = new HashMap<String, Set<String>>(); private final boolean useMethodKey; public BlockMethodTracker() { this(false); } public BlockMethodTracker(boolean useMethodKey) { this.useMethodKey = useMethodKey; } public boolean seen(Transition transition) { String name = transition.getOwner().getName(); String key = transition.getMethodSignature(); if (useMethodKey) { key = transition.info().keyString(); } Set<String> methods = seenMethods.get(name); if (methods == null) { methods = new HashSet<String>(); seenMethods.put(name, methods); } if (methods.contains(key)) { return true; } else { methods.add(key); return false; } } }
[ "blouis@unquietcode.com" ]
blouis@unquietcode.com
50e5ad9f65199dafb4d56ade4f7dfe881e23ced1
91297ffb10fb4a601cf1d261e32886e7c746c201
/php.editor/test/unit/src/org/netbeans/modules/php/editor/PHPCodeTemplateFilterTest.java
c1b52208d197b5291b4189e7fcc5f5dbd0e74264
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
7,433
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2012 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. * * Contributor(s): * * Portions Copyrighted 2012 Sun Microsystems, Inc. */ package org.netbeans.modules.php.editor; import java.io.File; import java.util.Collection; import java.util.Collections; import java.util.Map; import javax.swing.text.Document; import org.netbeans.api.java.classpath.ClassPath; import org.netbeans.lib.editor.codetemplates.api.CodeTemplate; import org.netbeans.lib.editor.codetemplates.api.CodeTemplateManager; import org.netbeans.modules.php.project.api.PhpSourcePath; import org.netbeans.spi.java.classpath.support.ClassPathSupport; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import static org.netbeans.modules.php.api.util.FileUtils.PHP_MIME_TYPE; /** * * @author Ondrej Brejla <obrejla@netbeans.org> */ public class PHPCodeTemplateFilterTest extends PHPCodeCompletionTestBase { public PHPCodeTemplateFilterTest(String testName) { super(testName); } private void checkAllTemplates(String source, boolean expected) throws Exception { assertNotNull(source); int sourcePos = source.indexOf('^'); assertNotNull(sourcePos); String modifiedSource = source.substring(0, sourcePos) + source.substring(sourcePos+1); Document document = getDocument(modifiedSource, PHP_MIME_TYPE); assertNotNull(document); Collection<? extends CodeTemplate> codeTemplates = getCodeTemplates(document); PHPCodeTemplateFilter filter = new PHPCodeTemplateFilter(document, sourcePos); assertNotNull(filter); for (CodeTemplate codeTemplate : codeTemplates) { assertEquals("Code template: " + codeTemplate.toString(), expected, filter.accept(codeTemplate)); } } private void checkTemplate(String source, boolean expected, String abbreviation) throws Exception { assertNotNull(source); int sourcePos = source.indexOf('^'); assertNotNull(sourcePos); String modifiedSource = source.substring(0, sourcePos) + source.substring(sourcePos+1); Document document = getDocument(modifiedSource, PHP_MIME_TYPE); assertNotNull(document); Collection<? extends CodeTemplate> codeTemplates = getCodeTemplates(document); PHPCodeTemplateFilter filter = new PHPCodeTemplateFilter(document, sourcePos); assertNotNull(filter); for (CodeTemplate codeTemplate : codeTemplates) { if (codeTemplate.getAbbreviation().equals(abbreviation)) { assertEquals("Code template: " + codeTemplate.toString(), expected, filter.accept(codeTemplate)); } } } private void checkNoContextTemplate(String source, boolean expected) { assertNotNull(source); int sourcePos = source.indexOf('^'); assertNotNull(sourcePos); String modifiedSource = source.substring(0, sourcePos) + source.substring(sourcePos+1); Document document = getDocument(modifiedSource, PHP_MIME_TYPE); assertNotNull(document); CodeTemplateManager templateManager = CodeTemplateManager.get(document); assertNotNull(templateManager); CodeTemplate codeTemplate = templateManager.createTemporary("no conext template"); PHPCodeTemplateFilter filter = new PHPCodeTemplateFilter(document, sourcePos); assertEquals("Code template: " + codeTemplate.toString(), expected, filter.accept(codeTemplate)); } private Collection<? extends CodeTemplate> getCodeTemplates(Document document) { CodeTemplateManager templateManager = CodeTemplateManager.get(document); assertNotNull(templateManager); return templateManager.getCodeTemplates(); } public void testAllDefaultTemplatesInClass() throws Exception { String source = "<?php\n^ \n?>"; checkAllTemplates(source, true); } public void testClsInCls() throws Exception { String source = "<?php\nclass Foo {^} \n?>"; checkTemplate(source, false, "cls"); } public void testNoContextTemplateInClass() throws Exception { String source = "<?php\n class Foo {^} \n?>"; checkNoContextTemplate(source, true); } public void testFcomInsideClass() throws Exception { String source = "<?php\nclass Foo {^} \n?>"; checkTemplate(source, true, "fcom"); } public void testFcomOutsideClass() throws Exception { String source = "<?php\nclass Foo {} \n^ \n?>"; checkTemplate(source, true, "fcom"); } public void testFcomInsideFunction() throws Exception { String source = "<?php\nclass Foo { \n function foo() { ^ } \n} \n?>"; checkTemplate(source, true, "fcom"); } public void testIfncInIface() throws Exception { String source = "<?php\ninterface IFace { \n ^ \n} \n?>"; checkTemplate(source, true, "ifnc"); } public void testIfncInCls() throws Exception { String source = "<?php\nclass MyCls { \n ^ \n} \n?>"; checkTemplate(source, false, "ifnc"); } @Override protected Map<String, ClassPath> createClassPathsForTest() { return Collections.singletonMap( PhpSourcePath.SOURCE_CP, ClassPathSupport.createClassPath(new FileObject[] { FileUtil.toFileObject(new File(getDataDir(), "/testfiles/completion/lib/codeTemplateFilter")) }) ); } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
2394bfafa58b49f2294c000fd8047891a07c558b
1148b6ee683b0c4591981a759481c98433a4d472
/src/main/java/aero/aixm/DesignatedPointPropertyType.java
d6b9b9375cc0dfc1c54ebddab6eafce7b2ce70f0
[]
no_license
khoeflm/SemNotam_WebApp
78c9f6ea8a640f98c033c94d5dfdfec6f3b35b80
3bbceaebfd6b9534c4fb81664a9d65c37ec156a1
refs/heads/master
2021-01-20T08:25:30.884165
2018-06-19T17:19:39
2018-06-19T17:19:39
90,143,773
0
0
null
null
null
null
ISO-8859-1
Java
false
false
7,420
java
package aero.aixm; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import org.w3.xlink.v1999.ActuateType; import org.w3.xlink.v1999.ShowType; import org.w3.xlink.v1999.TypeType; /** * <p>Java-Klasse für DesignatedPointPropertyType complex type. * * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * &lt;complexType name="DesignatedPointPropertyType"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;attGroup ref="{http://www.opengis.net/gml/3.2}AssociationAttributeGroup"/&gt; * &lt;attGroup ref="{http://www.opengis.net/gml/3.2}OwnershipAttributeGroup"/&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DesignatedPointPropertyType") public class DesignatedPointPropertyType { @XmlAttribute(name = "nilReason") protected List<String> nilReason; @XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml/3.2") @XmlSchemaType(name = "anyURI") protected String remoteSchema; @XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink") protected TypeType type; @XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink") protected String href; @XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink") protected String role; @XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink") protected String arcrole; @XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink") protected String titleAttribute; @XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink") protected ShowType show; @XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink") protected ActuateType actuate; @XmlAttribute(name = "owns") protected Boolean owns; /** * Gets the value of the nilReason property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nilReason property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNilReason().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNilReason() { if (nilReason == null) { nilReason = new ArrayList<String>(); } return this.nilReason; } /** * Ruft den Wert der remoteSchema-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getRemoteSchema() { return remoteSchema; } /** * Legt den Wert der remoteSchema-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setRemoteSchema(String value) { this.remoteSchema = value; } /** * Ruft den Wert der type-Eigenschaft ab. * * @return * possible object is * {@link TypeType } * */ public TypeType getType() { if (type == null) { return TypeType.SIMPLE; } else { return type; } } /** * Legt den Wert der type-Eigenschaft fest. * * @param value * allowed object is * {@link TypeType } * */ public void setType(TypeType value) { this.type = value; } /** * Ruft den Wert der href-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getHref() { return href; } /** * Legt den Wert der href-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setHref(String value) { this.href = value; } /** * Ruft den Wert der role-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getRole() { return role; } /** * Legt den Wert der role-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setRole(String value) { this.role = value; } /** * Ruft den Wert der arcrole-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getArcrole() { return arcrole; } /** * Legt den Wert der arcrole-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setArcrole(String value) { this.arcrole = value; } /** * Ruft den Wert der titleAttribute-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getTitleAttribute() { return titleAttribute; } /** * Legt den Wert der titleAttribute-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setTitleAttribute(String value) { this.titleAttribute = value; } /** * Ruft den Wert der show-Eigenschaft ab. * * @return * possible object is * {@link ShowType } * */ public ShowType getShow() { return show; } /** * Legt den Wert der show-Eigenschaft fest. * * @param value * allowed object is * {@link ShowType } * */ public void setShow(ShowType value) { this.show = value; } /** * Ruft den Wert der actuate-Eigenschaft ab. * * @return * possible object is * {@link ActuateType } * */ public ActuateType getActuate() { return actuate; } /** * Legt den Wert der actuate-Eigenschaft fest. * * @param value * allowed object is * {@link ActuateType } * */ public void setActuate(ActuateType value) { this.actuate = value; } /** * Ruft den Wert der owns-Eigenschaft ab. * * @return * possible object is * {@link Boolean } * */ public boolean isOwns() { if (owns == null) { return false; } else { return owns; } } /** * Legt den Wert der owns-Eigenschaft fest. * * @param value * allowed object is * {@link Boolean } * */ public void setOwns(Boolean value) { this.owns = value; } }
[ "k.hoeflmeier@gmx.at" ]
k.hoeflmeier@gmx.at
9e72973bcbe8e7bfda68552965bbd3a91e74ebb0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_d7df77d204d6dcdabc347de5448f491d84e43086/LoggerFactory/2_d7df77d204d6dcdabc347de5448f491d84e43086_LoggerFactory_t.java
09fa9d489c1a6b8fe38ff2a8dfca5ca925b18aff
[]
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
1,755
java
/** * * * Copyright 2002 NCHELP * * Author: Al Locklear, Priority Technologies, Inc. * * * This code is part of the Meteor system as defined and specified * by the National Council of Higher Education Loan Programs, Inc. * (NCHELP) and the Meteor Sponsors, and developed by Priority * Technologies, Inc. (PTI). * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ****************************************************************************/ package org.nchelp.meteor.logging; /** * A custom category factory that returns Logger instances used to guarantee * log is initialized. * * @version $Revision$ $Date$ * @since Meteor 1.0 * @author Alfred Locklear * @author Tim Bornholtz * @author Priority Technologies, Inc. * */ public class LoggerFactory implements org.apache.log4j.spi.LoggerFactory { /** * @see LoggerFactory#makeNewLoggerInstance(String) */ public org.apache.log4j.Logger makeNewLoggerInstance(String name) { return new Logger(name); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
120ee89bc2a81be18322225ae24c99d048143a53
0013a10ff59696a7122cc7c3ba78e21efab0d267
/bus-socket/src/main/java/org/aoju/bus/socket/origin/AioSSLQuickServer.java
ac7891d0df10bb67d128923d600022cdb0f6e8ea
[ "MIT" ]
permissive
smile2049/bus
3ce28ab6631f5a26394b9370658e1b761a73ae68
9f95d736f23a40a3463a59f0b41b6ad6d7b0c129
refs/heads/master
2022-11-18T09:05:04.318261
2020-07-07T06:40:36
2020-07-07T06:40:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,771
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.socket.origin; import org.aoju.bus.socket.origin.plugins.ssl.ClientAuth; import org.aoju.bus.socket.origin.plugins.ssl.SSLConfig; import org.aoju.bus.socket.origin.plugins.ssl.SSLService; import java.io.IOException; /** * AIO服务端 * * @author Kimi Liu * @version 6.0.2 * @since JDK 1.8+ */ public class AioSSLQuickServer<T> extends AioQuickServer<T> { private SSLConfig sslConfig = new SSLConfig(); private SSLService sslService; /** * @param port 绑定服务端口号 * @param protocol 协议编解码 * @param messageProcessor 消息处理器 */ public AioSSLQuickServer(int port, Protocol<T> protocol, Message<T> messageProcessor) { super(port, protocol, messageProcessor); } @Override public void start() throws IOException { sslService = new SSLService(sslConfig); start0(channel -> new SSLAioSession<>(channel, config, aioReadCompletionHandler, aioWriteCompletionHandler, sslService, bufferPool.allocateBufferPage())); } public AioSSLQuickServer<T> setKeyStore(String keyStoreFile, String keystorePassword) { sslConfig.setKeyFile(keyStoreFile); sslConfig.setKeystorePassword(keystorePassword); return this; } public AioSSLQuickServer<T> setKeyPassword(String keyPassword) { sslConfig.setKeyPassword(keyPassword); return this; } public AioSSLQuickServer<T> setTrust(String trustFile, String trustPassword) { sslConfig.setTrustFile(trustFile); sslConfig.setTrustPassword(trustPassword); return this; } public AioSSLQuickServer<T> setClientAuth(ClientAuth clientAuth) { sslConfig.setClientAuth(clientAuth); return this; } }
[ "839536@qq.com" ]
839536@qq.com
da14a3fd79eb0e2c1c69f9b82d47b3032c6326ec
ac1e2ef7ab9cfb412c103e87a25917b4a9da47a7
/src/main/java/org/elasticsearch/util/yaml/snakeyaml/util/Base64Coder.java
9c6d38302afa9c30f701c982d6c61fd504b70683
[]
no_license
877867559/elasticsearch06
05a9917a559134bad75619f7b1aa7af94df461d9
749779c3582f8bf6061e080973072264adac3c1f
refs/heads/master
2020-04-29T23:33:11.860335
2019-03-21T10:35:15
2019-03-21T10:35:15
176,479,780
0
1
null
null
null
null
UTF-8
Java
false
false
4,475
java
/* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search 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.elasticsearch.util.yaml.snakeyaml.util; import org.elasticsearch.util.yaml.snakeyaml.error.YAMLException; public abstract class Base64Coder { // Mapping table from 6-bit nibbles to Base64 characters. private final static char[] map1 = new char[64]; static { int i = 0; for (char c = 'A'; c <= 'Z'; c++) map1[i++] = c; for (char c = 'a'; c <= 'z'; c++) map1[i++] = c; for (char c = '0'; c <= '9'; c++) map1[i++] = c; map1[i++] = '+'; map1[i++] = '/'; } // Mapping table from Base64 characters to 6-bit nibbles. private final static byte[] map2 = new byte[128]; static { for (int i = 0; i < map2.length; i++) map2[i] = -1; for (int i = 0; i < 64; i++) map2[map1[i]] = (byte) i; } /** * Encodes a byte array into Base64 format. No blanks or line breaks are * inserted. * * @param in an array containing the data bytes to be encoded. * @return A character array with the Base64 encoded data. */ public static char[] encode(byte[] in) { int iLen = in.length; int oDataLen = (iLen * 4 + 2) / 3; // output length without padding int oLen = ((iLen + 2) / 3) * 4; // output length including padding char[] out = new char[oLen]; int ip = 0; int op = 0; while (ip < iLen) { int i0 = in[ip++] & 0xff; int i1 = ip < iLen ? in[ip++] & 0xff : 0; int i2 = ip < iLen ? in[ip++] & 0xff : 0; int o0 = i0 >>> 2; int o1 = ((i0 & 3) << 4) | (i1 >>> 4); int o2 = ((i1 & 0xf) << 2) | (i2 >>> 6); int o3 = i2 & 0x3F; out[op++] = map1[o0]; out[op++] = map1[o1]; out[op] = op < oDataLen ? map1[o2] : '='; op++; out[op] = op < oDataLen ? map1[o3] : '='; op++; } return out; } /** * Decodes Base64 data. No blanks or line breaks are allowed within the * Base64 encoded data. * * @param in a character array containing the Base64 encoded data. * @return An array containing the decoded data bytes. * @throws IllegalArgumentException if the input is not valid Base64 encoded data. */ public static byte[] decode(char[] in) { int iLen = in.length; if (iLen % 4 != 0) throw new YAMLException("Length of Base64 encoded input string is not a multiple of 4."); while (iLen > 0 && in[iLen - 1] == '=') iLen--; int oLen = (iLen * 3) / 4; byte[] out = new byte[oLen]; int ip = 0; int op = 0; while (ip < iLen) { int i0 = in[ip++]; int i1 = in[ip++]; int i2 = ip < iLen ? in[ip++] : 'A'; int i3 = ip < iLen ? in[ip++] : 'A'; if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127) throw new YAMLException("Illegal character in Base64 encoded data."); int b0 = map2[i0]; int b1 = map2[i1]; int b2 = map2[i2]; int b3 = map2[i3]; if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0) throw new YAMLException("Illegal character in Base64 encoded data."); int o0 = (b0 << 2) | (b1 >>> 4); int o1 = ((b1 & 0xf) << 4) | (b2 >>> 2); int o2 = ((b2 & 3) << 6) | b3; out[op++] = (byte) o0; if (op < oLen) out[op++] = (byte) o1; if (op < oLen) out[op++] = (byte) o2; } return out; } }
[ "liushuaishuai@xforceplus.com" ]
liushuaishuai@xforceplus.com
3ebc393f024912af0063117d991440ac67429655
3fb8acf2d6eaf3d458c00d1cfd5518bfc8847a54
/liquibase-common/src/main/java/liquibase/parser/mapping/core/ActionNodeMapping.java
68ef4960dfcf6d543510767039fa30b48117c651
[]
no_license
liquibase/liquibase4
b6df61f2b20c92e8fee21c37076685a9c70b5466
b868890e2ab093d61b55ef0c9b7819da2d4204e1
refs/heads/master
2023-06-30T01:31:46.329261
2016-05-27T16:36:48
2016-05-27T16:36:48
50,212,230
3
2
null
2016-05-05T15:08:07
2016-01-22T22:45:58
Java
UTF-8
Java
false
false
1,556
java
package liquibase.parser.mapping.core; import liquibase.Scope; import liquibase.action.Action; import liquibase.action.ActionFactory; import liquibase.exception.ParseException; import liquibase.parser.ParsedNode; import liquibase.parser.mapping.AbstractParsedNodeMapping; import liquibase.parser.mapping.ParsedNodeMapping; import java.lang.reflect.Type; /** * {@link ParsedNodeMapping} for {@link Action} objects. * It will create the correct action implementation based on the node name using {@link ActionFactory}. */ public class ActionNodeMapping extends AbstractParsedNodeMapping<Action> { public ActionNodeMapping() { } @Override protected String getNodeName(Action object, Class containerType, String containerAttribute, Scope scope) { return object.getName(); } @Override public int getPriority(ParsedNode parsedNode, Class objectType, Type containerType, String containerAttribute, Scope scope) { if (Action.class.isAssignableFrom(objectType)) { return PRIORITY_SPECIALIZED; } return PRIORITY_NOT_APPLICABLE; } @Override protected Action createObject(ParsedNode parsedNode, Class<Action> objectType, Class containerType, String containerAttribute, Scope scope) throws ParseException { Action action = scope.getSingleton(ActionFactory.class).getAction(parsedNode.getName(), scope); if (action == null) { throw new ParseException("Unknown action: " + parsedNode.getName(), parsedNode); } return action; } }
[ "nathan@voxland.net" ]
nathan@voxland.net
f076752fd3f5bc729603eea033bc3d80c2939e10
45fae03aa16bbdb6246771fe3846c85ba7a2ca03
/MSc_CompSc/2nd_sem/graphics/workspacce/myjogl/src/com/cu/jogl/JOGLTest.java
20c259e140e3ccbe26d1078b80e633ec53c60358
[]
no_license
dipendughosh/programs
4ae1e350bb90c000a1056ef1f3f37d78a989187c
ce3149dcd4c6925c79deac356f7eea66f29b61aa
refs/heads/master
2023-03-17T06:52:05.638866
2023-03-07T20:31:40
2023-03-07T20:31:40
130,804,144
0
0
null
null
null
null
UTF-8
Java
false
false
3,012
java
package com.cu.jogl; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.media.opengl.GL; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLCanvas; import javax.media.opengl.GLEventListener; import javax.swing.JFrame; import javax.swing.JLabel; import com.sun.opengl.util.Animator; public class JOGLTest extends JFrame implements KeyListener, MouseListener, GLEventListener{ double sx = 1; double tx = 0; double rx = 0; double ty = 0; public static void main(String[] args) { JOGLTest frame = new JOGLTest(); frame.setTitle("My JOGL..."); frame.setSize(450,450); frame.setDefaultCloseOperation(EXIT_ON_CLOSE); GLCanvas canvas = new GLCanvas(); frame.add(canvas); canvas.addGLEventListener(frame); frame.addKeyListener(frame); Animator animator = new Animator(canvas); animator.start(); frame.setVisible(true); } @Override public void keyPressed(KeyEvent ke) { if(ke.getKeyCode() == KeyEvent.VK_LEFT){ tx -= .02; }else if(ke.getKeyCode() == KeyEvent.VK_RIGHT){ tx += .02; } else if(ke.getKeyCode() == KeyEvent.VK_UP){ ty += .02; } else if(ke.getKeyCode() == KeyEvent.VK_DOWN){ ty -= .02; } } @Override public void keyReleased(KeyEvent arg0) { // TODO Auto-generated method stub } @Override public void keyTyped(KeyEvent ke) { System.out.println("Key Typed : "+ke.getKeyChar()); } @Override public void display(GLAutoDrawable drawable) { GL gl = drawable.getGL(); gl.glClear(GL.GL_COLOR_BUFFER_BIT); gl.glLoadIdentity(); gl.glTranslated(tx, 0, 0); gl.glTranslated(0, ty, 0); gl.glRotated(rx, .3, .3, .3); rx += .01; gl.glScaled(sx, sx, 1); /* if(sx > .5) sx -= .002; */ drawTriangle(gl); } private void drawTriangle(GL gl) { gl.glBegin(GL.GL_TRIANGLES); gl.glColor3d(1, 0, 0); gl.glVertex3d(0, .3, 0); gl.glColor3d(0, 1, 0); gl.glVertex3d(-.3, -.3,0); gl.glColor3d(0, 0, 1); gl.glVertex3d(.3, -.3,0); gl.glEnd(); } @Override public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { // TODO Auto-generated method stub } @Override public void init(GLAutoDrawable drawable) { // TODO Auto-generated method stub } @Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { // TODO Auto-generated method stub } @Override public void mouseClicked(MouseEvent mo) { // TODO Auto-generated method stub } @Override public void mouseEntered(MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseExited(MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mousePressed(MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseReleased(MouseEvent arg0) { // TODO Auto-generated method stub } }
[ "dipendughosh@gmail.com" ]
dipendughosh@gmail.com
5f4c2acbab4c3501a303851588d5381d28954e1b
c0071d8e003177fac32f5ba6b85eb31c7096bbda
/dvdrental/src/main/java/com/fastcode/dvdrental/application/core/address/dto/GetCityOutput.java
cd051aa1b4682eb9e8db7509c8a92784e6533557
[]
no_license
fastcoderepos/dbolshov-sampleApplication1
a5b34a88830b1b536362dd93cc7568e5b0c9d12f
6fb494e6febaeb42e3defb26c9cd8d7e5d4643d9
refs/heads/master
2023-03-06T01:43:19.991927
2021-02-22T14:30:52
2021-02-22T14:30:52
341,228,269
0
0
null
null
null
null
UTF-8
Java
false
false
266
java
package com.fastcode.dvdrental.application.core.address.dto; import java.time.*; import lombok.Getter; import lombok.Setter; @Getter @Setter public class GetCityOutput { private String city; private Integer cityId; private Integer addressAddressId; }
[ "info@nfinityllc.com" ]
info@nfinityllc.com
672149a7a3f81becfc9372c8fd66a99b8987ee90
cc12d28b4a41ddb2acb4a44bdc6b216adbb0a530
/radixdlt/src/test/java/com/radixdlt/consensus/epoch/GetEpochResponseTest.java
3f151824322405d49423ccf64c3797759782d101
[ "Apache-2.0" ]
permissive
radixdlt/radixdlt-core
4c26d72d272e5dc927d5542daa24dc0196edb525
a92d1f4698c02a2f84f50c6cd591273fd79de067
refs/heads/release/1.0-beta.21
2023-02-16T19:59:47.285829
2020-12-16T11:34:45
2020-12-16T11:34:45
236,957,176
33
14
Apache-2.0
2021-01-06T13:48:00
2020-01-29T10:30:48
Java
UTF-8
Java
false
false
1,552
java
/* * (C) Copyright 2020 Radix DLT Ltd * * Radix DLT Ltd licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ package com.radixdlt.consensus.epoch; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.mockito.Mockito.mock; import com.radixdlt.consensus.VerifiedLedgerHeaderAndProof; import com.radixdlt.consensus.bft.BFTNode; import org.junit.Before; import org.junit.Test; public class GetEpochResponseTest { private BFTNode sender; private VerifiedLedgerHeaderAndProof ancestor; private GetEpochResponse response; @Before public void setUp() { this.sender = mock(BFTNode.class); this.ancestor = mock(VerifiedLedgerHeaderAndProof.class); this.response = new GetEpochResponse(this.sender, this.ancestor); } @Test public void testGetters() { assertThat(this.response.getEpochProof()).isEqualTo(this.ancestor); assertThat(this.response.getAuthor()).isEqualTo(this.sender); } @Test public void testToString() { assertThat(this.response.toString()).isNotNull(); } }
[ "josh@radixdlt.com" ]
josh@radixdlt.com
bab36a0c05dfdab8cc6796e043c1687a276cfc94
967502523508f5bb48fdaac93b33e4c4aca20a4b
/aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/transform/GitHubLocationJsonMarshaller.java
5f72db6d835d3d5927a1d4d11367002d579ed497
[ "Apache-2.0", "JSON" ]
permissive
hanjk1234/aws-sdk-java
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
07da997c6b05ae068230401921860f5e81086c58
refs/heads/master
2021-01-17T18:25:34.913778
2015-10-23T03:20:07
2015-10-23T03:20:07
44,951,249
1
0
null
2015-10-26T06:53:25
2015-10-26T06:53:24
null
UTF-8
Java
false
false
2,445
java
/* * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.codedeploy.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Map; import java.util.List; import com.amazonaws.AmazonClientException; import com.amazonaws.services.codedeploy.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.json.*; /** * GitHubLocationMarshaller */ public class GitHubLocationJsonMarshaller { /** * Marshall the given parameter object, and output to a JSONWriter */ public void marshall(GitHubLocation gitHubLocation, JSONWriter jsonWriter) { if (gitHubLocation == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } try { jsonWriter.object(); if (gitHubLocation.getRepository() != null) { jsonWriter.key("repository").value( gitHubLocation.getRepository()); } if (gitHubLocation.getCommitId() != null) { jsonWriter.key("commitId").value(gitHubLocation.getCommitId()); } jsonWriter.endObject(); } catch (Throwable t) { throw new AmazonClientException( "Unable to marshall request to JSON: " + t.getMessage(), t); } } private static GitHubLocationJsonMarshaller instance; public static GitHubLocationJsonMarshaller getInstance() { if (instance == null) instance = new GitHubLocationJsonMarshaller(); return instance; } }
[ "aws@amazon.com" ]
aws@amazon.com
4bcf8d673b93b16aaec956e0c96874f4bb6a719b
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties.java
c0276ffbbf10703199e3b8684fcacef0a3c8304c
[ "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
3,561
java
package com.prokarma.pkmst.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.prokarma.pkmst.model.ConfigNodePropertyArray; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Response class to be returned by Api * @author pkmst * */ /** * ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPKMSTServerCodegen", date = "2019-08-05T00:55:06.958Z[GMT]") public class ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties { @JsonProperty("fieldWhitelist") private ConfigNodePropertyArray fieldWhitelist = null; @JsonProperty("attachmentTypeBlacklist") private ConfigNodePropertyArray attachmentTypeBlacklist = null; public ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties fieldWhitelist(ConfigNodePropertyArray fieldWhitelist) { this.fieldWhitelist = fieldWhitelist; return this; } /** * Get fieldWhitelist * @return fieldWhitelist **/ @ApiModelProperty(value = "") public ConfigNodePropertyArray getFieldWhitelist() { return fieldWhitelist; } public void setFieldWhitelist(ConfigNodePropertyArray fieldWhitelist) { this.fieldWhitelist = fieldWhitelist; } public ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties attachmentTypeBlacklist(ConfigNodePropertyArray attachmentTypeBlacklist) { this.attachmentTypeBlacklist = attachmentTypeBlacklist; return this; } /** * Get attachmentTypeBlacklist * @return attachmentTypeBlacklist **/ @ApiModelProperty(value = "") public ConfigNodePropertyArray getAttachmentTypeBlacklist() { return attachmentTypeBlacklist; } public void setAttachmentTypeBlacklist(ConfigNodePropertyArray attachmentTypeBlacklist) { this.attachmentTypeBlacklist = attachmentTypeBlacklist; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties comAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties = (ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties) o; return Objects.equals(this.fieldWhitelist, comAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties.fieldWhitelist) && Objects.equals(this.attachmentTypeBlacklist, comAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties.attachmentTypeBlacklist); } @Override public int hashCode() { return Objects.hash(fieldWhitelist, attachmentTypeBlacklist); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeCqSocialFilelibraryClientEndpointsImplFileLibraryOperaProperties {\n"); sb.append(" fieldWhitelist: ").append(toIndentedString(fieldWhitelist)).append("\n"); sb.append(" attachmentTypeBlacklist: ").append(toIndentedString(attachmentTypeBlacklist)).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 String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
58c1f10d3b5fde8b139493c698caec24beff2254
5c57e1a2ce74589eec563e26d362da54eb907ea2
/src/main/java/org/polycreo/jackson/encryption/EncryptingJsonDeserializer.java
2d3b1b95829a86ec3dc15e35ea39cd34f2884911
[ "Apache-2.0" ]
permissive
polycreo/polycreo-jackson-encryption
8c852d27d07b97fc2274bde54f4ed2e62884f05a
f8f005ee3876e2c4d1bf2f4c04cf7b09a52f1ba3
refs/heads/master
2021-08-22T14:24:23.415752
2020-01-25T10:15:30
2020-01-25T10:15:30
187,055,338
0
0
Apache-2.0
2021-07-22T20:26:22
2019-05-16T15:32:40
Java
UTF-8
Java
false
false
1,813
java
/* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.polycreo.jackson.encryption; import java.io.IOException; import lombok.RequiredArgsConstructor; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.TreeNode; import com.fasterxml.jackson.databind.BeanProperty; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.deser.ContextualDeserializer; /** * TODO miyamoto.daisuke. */ @RequiredArgsConstructor class EncryptingJsonDeserializer extends JsonDeserializer<Object> implements ContextualDeserializer { private final TextEncryptor encryptor; @Override public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { TreeNode tree = p.readValueAsTree(); return encryptor.encrypt(tree.toString()); } @Override public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { return this; } @Override public Object getNullValue(DeserializationContext ctxt) throws JsonMappingException { return encryptor.encrypt("null"); } }
[ "dai.0304@gmail.com" ]
dai.0304@gmail.com
740f0ebf08fe0df6700e23a401c521ff64e44d00
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-service/src/main/java/nta/med/service/ihis/handler/nuro/JapanDateInfoHandler.java
80575d5ee07575605bdfc9bdd2449a5c02c9b048
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,701
java
package nta.med.service.ihis.handler.nuro; import javax.annotation.Resource; import nta.med.data.dao.medi.bas.Bas0102Repository; import nta.med.core.infrastructure.socket.handler.ScreenHandler; import nta.med.service.ihis.proto.NuroModelProto; import nta.med.service.ihis.proto.NuroServiceProto; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.vertx.java.core.Vertx; @Service @Scope("prototype") public class JapanDateInfoHandler extends ScreenHandler<NuroServiceProto.JapanDateInfoRequest, NuroServiceProto.JapanDateInfoResponse>{ private static final Log logger = LogFactory.getLog(JapanDateInfoHandler.class); @Resource private Bas0102Repository bas0102Repository; @Override @Transactional(readOnly = true) public NuroServiceProto.JapanDateInfoResponse handle(Vertx vertx, String clientId, String sessionId, long contextId, NuroServiceProto.JapanDateInfoRequest request) throws Exception { NuroServiceProto.JapanDateInfoResponse.Builder response = NuroServiceProto.JapanDateInfoResponse.newBuilder(); String result = bas0102Repository.getJapanDateInfo(getHospitalCode(vertx, sessionId), getLanguage(vertx, sessionId), request.getNaewonDate()); if(!StringUtils.isEmpty(result)) { NuroModelProto.JapanDateInfo.Builder builder = NuroModelProto.JapanDateInfo.newBuilder(); builder.setNaewonDateJp(result); response.addJpDateInfo(builder); } return response.build(); } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
0d85421df8a6f1467ea9b8f6236211b21de167e9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_d6f99f1bee747a0f8ec948d7a702bf004045ce92/YahooPresenceContainer/13_d6f99f1bee747a0f8ec948d7a702bf004045ce92_YahooPresenceContainer_s.java
9de1d62130e8ce214a4f9752efba51896f536259
[]
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
8,094
java
/** * Copyright (c) 2002-2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * - Initial API and implementation * - Chris Aniszczyk <zx@us.ibm.com> * - Borna Safabakhsh <borna@us.ibm.com> * * $Id$ */ package org.eclipse.ecf.provider.yahoo.container; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Vector; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.identity.IDFactory; import org.eclipse.ecf.core.user.IUser; import org.eclipse.ecf.core.util.ECFException; import org.eclipse.ecf.internal.provider.yahoo.Activator; import org.eclipse.ecf.presence.AbstractPresenceContainer; import org.eclipse.ecf.presence.IIMMessageListener; import org.eclipse.ecf.presence.IPresence; import org.eclipse.ecf.presence.IPresenceListener; import org.eclipse.ecf.presence.IPresenceSender; import org.eclipse.ecf.presence.Presence; import org.eclipse.ecf.presence.im.ChatMessage; import org.eclipse.ecf.presence.im.ChatMessageEvent; import org.eclipse.ecf.presence.im.IChatManager; import org.eclipse.ecf.presence.im.IChatMessage; import org.eclipse.ecf.presence.im.IChatMessageSender; import org.eclipse.ecf.presence.im.IHistory; import org.eclipse.ecf.presence.im.IHistoryManager; import org.eclipse.ecf.presence.im.ITypingMessageSender; import org.eclipse.ecf.presence.im.IChatMessage.Type; import org.eclipse.ecf.presence.roster.IRoster; import org.eclipse.ecf.presence.roster.IRosterEntry; import org.eclipse.ecf.presence.roster.IRosterManager; import org.eclipse.ecf.presence.roster.IRosterSubscriptionListener; import org.eclipse.ecf.presence.roster.IRosterSubscriptionSender; import org.eclipse.ecf.presence.roster.IRosterUpdateListener; import org.eclipse.ecf.presence.roster.Roster; import ymsg.network.Session; import ymsg.network.StatusConstants; import ymsg.network.YahooUser; import ymsg.network.event.SessionEvent; import ymsg.network.event.SessionFriendEvent; public class YahooPresenceContainer extends AbstractPresenceContainer { private Session session; List listeners = new ArrayList(); public YahooPresenceContainer(Session session) { this.session = session; } IChatMessageSender chatSender = new IChatMessageSender() { public void sendChatMessage(ID toID, ID threadID, Type type, String subject, String body, Map properties) throws ECFException { try { session.sendMessage(toID.getName(), body); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public void sendChatMessage(ID toID, String body) throws ECFException { sendChatMessage(toID, null, IChatMessage.Type.CHAT, null, body, null); } }; protected IHistoryManager historyManager = new IHistoryManager() { /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IHistoryManager#getHistory(org.eclipse.ecf.core.identity.ID, java.util.Map) */ public IHistory getHistory(ID partnerID, Map options) { // XXX TODO provide local storage (with some return null; } /* (non-Javadoc) * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) */ public Object getAdapter(Class adapter) { return null; } public boolean isActive() { return false; } public void makeActive(boolean active, Map options) { } }; IChatManager chatManager = new IChatManager() { public void addMessageListener(IIMMessageListener listener) { listeners.add(listener); } public IChatMessageSender getChatMessageSender() { return chatSender; } public ITypingMessageSender getTypingMessageSender() { return null; } public void removeMessageListener(IIMMessageListener listener) { listeners.remove(listener); } public IHistoryManager getHistoryManager() { return historyManager; } }; /** * Notifies any listeners that a message has been received from a yahoo user * * @param event */ public void handleMessageReceived(SessionEvent event) { for(Iterator i=listeners.iterator(); i.hasNext(); ) { IIMMessageListener l = (IIMMessageListener) i.next(); ID fromID = makeIDFromName(event.getFrom()); l.handleMessageEvent(new ChatMessageEvent(fromID, new ChatMessage(fromID,event.getMessage()))); } } Vector presenceListeners = new Vector(); protected List getPresenceListeners() { return presenceListeners; } /** * Notifies any listeners that a friends status has changed * * @param event */ public void handleFriendsUpdateReceived(SessionFriendEvent event) { for(int i = 0; i < getPresenceListeners().size(); i++) { IPresenceListener l = (IPresenceListener) getPresenceListeners().get(i); ID from = makeIDFromName(event.getFrom()); IPresence presence = createPresence(from.getName()); l.handlePresence(from, presence); } } /** * @param name * @return A proper ID based on a yahoo name */ protected ID makeIDFromName(String name) { ID result = null; try { result = IDFactory.getDefault().createID( IDFactory.getDefault().getNamespaceByName(Activator.NAMESPACE_IDENTIFIER), new Object[] { name }); return result; } catch (Exception e) { e.printStackTrace(); return null; } } protected void fireRosterEntry(IRosterEntry entry) { for (int i = 0; i < getPresenceListeners().size(); i++) { IPresenceListener l = (IPresenceListener) getPresenceListeners().get(i); l.handleRosterEntryAdd(entry); } } /** * Note: This method is simplistic * * @param userID * @return Determines the presence of a YMSG user */ public IPresence createPresence(String userID) { YahooUser user = session.getUser(userID); long status = user.getStatus(); Presence presence = new Presence(IPresence.Type.UNAVAILABLE); if(status == StatusConstants.STATUS_AVAILABLE) { presence = new Presence(IPresence.Type.AVAILABLE); } else if(status == StatusConstants.STATUS_BRB || status == StatusConstants.STATUS_BUSY) { presence = new Presence(IPresence.Type.UNAVAILABLE, "User is away", IPresence.Mode.AWAY); } return presence; } IRoster roster = new Roster(); IRosterManager rosterManger = new IRosterManager() { public void addPresenceListener(IPresenceListener listener) { presenceListeners.add(listener); } public void addRosterSubscriptionListener( IRosterSubscriptionListener listener) { } public void addRosterUpdateListener(IRosterUpdateListener listener) { } public IPresenceSender getPresenceSender() { return null; } public IRoster getRoster() { return roster; } public IRosterSubscriptionSender getRosterSubscriptionSender() { return null; } public void removePresenceListener(IPresenceListener listener) { presenceListeners.remove(listener); } public void removeRosterSubscriptionListener( IRosterSubscriptionListener listener) { } public void removeRosterUpdateListener(IRosterUpdateListener listener) { } public Object getAdapter(Class adapter) { return null; } }; public IRosterManager getRosterManager() { return rosterManger; } public IUser getUser() { // TODO Auto-generated method stub return null; } /* (non-Javadoc) * @see org.eclipse.ecf.presence.IPresenceContainerAdapter#getChatManager() */ public IChatManager getChatManager() { return chatManager; } /** * @return */ protected IRoster getRoster() { return roster; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
2001d56e200a0326b94a979b7b681b2fc2332dcc
2887b7ec6dd764a018ba7f946aa868d5d44f74ef
/iblog-test/src/main/java/jsontest/ResultReference.java
1073e86a87d07a26165eb365ed83dd1508b91e03
[]
no_license
f981545521/iblog2
fa97c3ccb2d14b609d195686393c0d7859901e4f
8bbee3e19bdbd5906da6f6c2462cd9d0d5e313ba
refs/heads/master
2022-12-25T11:28:10.475877
2020-09-07T13:50:58
2020-09-07T13:50:58
119,843,714
3
0
null
2022-12-16T07:58:45
2018-02-01T14:04:16
JavaScript
UTF-8
Java
false
false
1,049
java
package jsontest; import java.io.Serializable; /** * Result 泛型类 * @author youfang * @version [1.0.0, 2018-09-30 下午 03:57] **/ public class ResultReference<T> implements Serializable { private static final long serialVersionUID = 110183987538722791L; /** 时间戳. */ private Long timestamp; /** 返回码. */ private String status = ""; /** 结果信息. */ private String message = ""; /** 结果信息. */ private T data; public Long getTimestamp() { return timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
[ "981545521@qq.com" ]
981545521@qq.com
831a5e5b48adce21dab2139ecf36902e08563d35
63d9e7683582b52fd1edbee460f35f797e892ad4
/src/main/java/gw/lang/reflect/java/IJavaParameterDescriptor.java
d054106a211f97c7fb5a7e639c9387fdbbff64d9
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
driedtoast/gosu-lang
2f1c9c08b7c2fdb10554645ee9634ec65281c60b
eb1b962b723adfe198d4e41e089add039646519b
refs/heads/master
2023-07-31T12:25:17.094738
2011-08-22T20:48:30
2011-08-22T20:48:30
2,251,131
0
1
null
null
null
null
UTF-8
Java
false
false
341
java
package gw.lang.reflect.java; import gw.lang.reflect.IType; import java.io.Serializable; /** * Copyright 2010 Guidewire Software, Inc. */ public interface IJavaParameterDescriptor extends Serializable { String getName(); String getDisplayName(); String getShortDescription(); boolean isHidden(); IType getFeatureType(); }
[ "driedtoast@gmail.com" ]
driedtoast@gmail.com
a292190033d3a2dc82826ae3a8cd27ca153ffe4d
42e94aa09fe8d979f77449e08c67fa7175a3e6eb
/src/net/ak6.java
eca63d50adba89f6195796915c27461e083f2c60
[ "Unlicense" ]
permissive
HausemasterIssue/novoline
6fa90b89d5ebf6b7ae8f1d1404a80a057593ea91
9146c4add3aa518d9aa40560158e50be1b076cf0
refs/heads/main
2023-09-05T00:20:17.943347
2021-11-26T02:35:25
2021-11-26T02:35:25
432,312,803
1
0
Unlicense
2021-11-26T22:12:46
2021-11-26T22:12:45
null
UTF-8
Java
false
false
4,170
java
package net; import java.awt.image.BufferedImage; import java.util.List; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.resources.data.AnimationMetadataSection; import net.minecraft.util.ResourceLocation; public class ak6 { private static String b; public static int[][] d(TextureAtlasSprite var0, int var1) { return var0.getFrameTextureData(var1); } public static float c(TextureAtlasSprite var0) { return var0.getMinU(); } public static float d(TextureAtlasSprite var0) { return var0.getMaxU(); } public static float m(TextureAtlasSprite var0) { return var0.getMinV(); } public static float l(TextureAtlasSprite var0) { return var0.getMaxV(); } public static int e(TextureAtlasSprite var0) { return var0.getIconWidth(); } public static int k(TextureAtlasSprite var0) { return var0.getIconHeight(); } public static float d(TextureAtlasSprite var0, float var1) { return var0.toSingleU(var1); } public static float b(TextureAtlasSprite var0, float var1) { return var0.toSingleV(var1); } public static float b(TextureAtlasSprite var0, double var1) { return var0.getInterpolatedU(var1); } public static float a(TextureAtlasSprite var0, double var1) { return var0.getInterpolatedV(var1); } public static int i(TextureAtlasSprite var0) { return var0.getFrameCount(); } public static String h(TextureAtlasSprite var0) { return var0.getIconName(); } public static int p(TextureAtlasSprite var0) { return var0.getIndexInMap(); } public static double c(TextureAtlasSprite var0, float var1) { return var0.getSpriteU16(var1); } public static double a(TextureAtlasSprite var0, float var1) { return var0.getSpriteV16(var1); } public static void d(String var0) { TextureAtlasSprite.setLocationNameCompass(var0); } public static void c(String var0) { TextureAtlasSprite.setLocationNameClock(var0); } public static boolean b(TextureAtlasSprite var0) { return var0.hasAnimationMetadata(); } public static void j(TextureAtlasSprite var0) { var0.clearFramesTextureData(); } public static void b(TextureAtlasSprite var0, int var1) { var0.setIconWidth(var1); } public static void e(TextureAtlasSprite var0, int var1) { var0.setIconHeight(var1); } public static void a(TextureAtlasSprite var0, List var1) { var0.setFramesTextureData(var1); } public static void a(TextureAtlasSprite var0, int var1) { var0.setIndexInMap(var1); } public static void o(TextureAtlasSprite var0) { var0.deleteSpriteTexture(); } public static boolean b(TextureAtlasSprite var0, IResourceManager var1, ResourceLocation var2) { return var0.hasCustomLoader(var1, var2); } public static void a(TextureAtlasSprite var0, BufferedImage[] var1, AnimationMetadataSection var2) { var0.loadSprite(var1, var2); } public static boolean a(TextureAtlasSprite var0, IResourceManager var1, ResourceLocation var2) { return var0.load(var1, var2); } public static void c(TextureAtlasSprite var0, int var1) { var0.generateMipmaps(var1); } public static int f(TextureAtlasSprite var0) { return var0.getOriginX(); } public static int a(TextureAtlasSprite var0) { return var0.getOriginY(); } public static void a(TextureAtlasSprite var0, TextureAtlasSprite var1) { var0.copyFrom(var1); } public static void g(TextureAtlasSprite var0) { var0.bindSpriteTexture(); } public static void n(TextureAtlasSprite var0) { var0.updateAnimation(); } public static void a(TextureAtlasSprite var0, int var1, int var2, int var3, int var4, boolean var5) { var0.initSprite(var1, var2, var3, var4, var5); } public static void b(String var0) { b = var0; } public static String b() { return b; } static { if(b() == null) { b("w2SGwc"); } } }
[ "91408199+jeremypelletier@users.noreply.github.com" ]
91408199+jeremypelletier@users.noreply.github.com
34472fc0a2ce31908c32f298d5edb395b09bab8d
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_252/Productionnull_25181.java
031564d74231a1e1583b16e2e1887e542fc8f2f3
[]
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
588
java
package org.gradle.test.performancenull_252; public class Productionnull_25181 { private final String property; public Productionnull_25181(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
94e22ac0bd5e2579c9d2dd45578600ba36e819ee
51db23f10d3d1209fba403e45e6ac9619617a61d
/projectcore/src/main/java/com/example/net/rx/RxRetrofitClient.java
67b08d00296baf81f14a21d8c46da7e9c2c28521
[]
no_license
3441242166/LibaryModel
2d454262a407411a4a674b08f73117ca5ecb2e90
7b2b6e12d4aecb4fd8c752cfe496eb6fda69eafe
refs/heads/master
2020-04-13T01:12:36.353517
2018-12-23T06:18:17
2018-12-23T06:18:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,903
java
package com.example.net.rx; import android.content.Context; import com.example.net.HttpMethod; import com.example.net.RetrofitCreator; import com.example.ui.Loader; import com.example.ui.LoaderStyle; import java.io.File; import java.util.Map; import io.reactivex.Observable; import okhttp3.MediaType; import okhttp3.MultipartBody; import okhttp3.RequestBody; import okhttp3.ResponseBody; import retrofit2.Callback; public class RxRetrofitClient { private final String URL; private final Map<String,Object> PARAMS; private final RequestBody BODY; private final File FILE; private final LoaderStyle LOADER_STYLE; private final Context CONTEXT; RxRetrofitClient(String url, Map<String, Object> params, RequestBody body, File file, Context context, LoaderStyle loaderStyle) { URL = url; PARAMS = params; BODY = body; FILE = file; CONTEXT = context; LOADER_STYLE = loaderStyle; } public static RxRetrofitClientBuilder builder(){ return new RxRetrofitClientBuilder(); } private Observable<String> request(HttpMethod method){ final RxRetrofitService service = RetrofitCreator.getRxRetrofitService(); Observable<String> observable= null; if(LOADER_STYLE != null){ Loader.showLoading(CONTEXT,LOADER_STYLE); }else { Loader.showLoading(CONTEXT); } switch (method){ case GET: observable = service.get(URL,PARAMS); break; case POST: observable = service.post(URL,PARAMS); break; case POST_RAW: observable = service.postRaw(URL, BODY); break; case PUT: observable = service.put(URL,PARAMS); break; case PUT_RAW: observable = service.putRaw(URL, BODY); break; case DELETE: observable = service.delete(URL,PARAMS); break; case UPLOAD: final RequestBody requestBody = RequestBody.create(MediaType.parse(MultipartBody.FORM.toString()),FILE); final MultipartBody.Part body = MultipartBody.Part.createFormData("file",FILE.getName(),requestBody); observable = RetrofitCreator.getRxRetrofitService().upload(URL, body); break; } return observable; } //---------------------------------------------------------------------------------------------- public final Observable<String> get(){ return request((HttpMethod.GET)); } public final Observable<String> post(){ if(BODY == null){ return request((HttpMethod.POST)); }else { if(!PARAMS.isEmpty()){ throw new RuntimeException("params must be null"); } return request(HttpMethod.POST_RAW); } } public final Observable<String> delete(){ return request((HttpMethod.DELETE)); } public final Observable<String> put(){ if(BODY == null){ return request((HttpMethod.PUT)); }else { if(!PARAMS.isEmpty()){ throw new RuntimeException("params must be null"); } return request(HttpMethod.PUT_RAW); } } public final Observable<String> upload(){ return request(HttpMethod.UPLOAD); } public final Observable<ResponseBody> download(){ final Observable<ResponseBody> responseBodyObservable = RetrofitCreator.getRxRetrofitService().download(URL,PARAMS); return responseBodyObservable; } //---------------------------------------------------------------------------------------------- }
[ "3441242166@qq.com" ]
3441242166@qq.com
9a417a916df3385288d1d962b3a814c35cc861e6
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/scanner/util/o.java
ae51be34a9c8332b5d469a90fa1ed4134fa3dac4
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
package com.tencent.mm.plugin.scanner.util; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; import android.graphics.BitmapFactory; import com.tencent.mm.R; import com.tencent.mm.platformtools.w; import com.tencent.mm.platformtools.w$b; import com.tencent.mm.platformtools.w.a; import com.tencent.mm.plugin.scanner.c; import com.tencent.mm.sdk.platformtools.ad; import com.tencent.mm.sdk.platformtools.x; public final class o implements w { private String mPicUrl = null; public o(String str) { this.mPicUrl = str; } public final String Vv() { return c.brY().eq(this.mPicUrl, "@S"); } public final String Vw() { return this.mPicUrl; } public final String Vx() { return this.mPicUrl; } public final String getCacheKey() { return this.mPicUrl; } public final boolean Vy() { return false; } public final boolean Vz() { return false; } public final Bitmap a(Bitmap bitmap, a aVar, String str) { if (a.evZ == aVar) { try { com.tencent.mm.sdk.platformtools.c.a(bitmap, 100, CompressFormat.PNG, Vv(), false); } catch (Throwable e) { x.printErrStackTrace("MicroMsg.ScannerGetPicStrategy", e, "", new Object[0]); } } return bitmap; } public final void VB() { } public final void P(String str, boolean z) { } public final void a(a aVar, String str) { } public final Bitmap VA() { if (ad.getContext() == null) { return null; } return BitmapFactory.decodeResource(ad.getContext().getResources(), R.g.nosdcard_chatting_bg); } public final w$b Vu() { return null; } }
[ "707194831@qq.com" ]
707194831@qq.com
598051ee8cbdbbb3045a8c2c8dab3c4113f3c21a
95cd04bc9043734031590eaf2bdae6ac4f4f3dad
/cobranzaElfecMobile/src/main/java/com/elfec/cobranza/model/interfaces/OnceRequiredDataImportCaller.java
9a06799b484a723066d54392a11032420678b489
[]
no_license
diegoRodriguezAguila/Cobranza.Elfec.Mobile
5d5f4693ae881458e690979455fee4cfe3a273a1
11fe3fd1ac5d4acba26323493d9449db8feb5be2
refs/heads/master
2021-06-23T22:17:47.099270
2017-04-12T18:31:34
2017-04-12T18:31:34
31,078,904
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.elfec.cobranza.model.interfaces; /** * Interfaz que sirve para llamar a los diferentes importers de la * información que solo se requiere una vez * @author drodriguez * */ public interface OnceRequiredDataImportCaller extends ImportCaller{ /** * Función que indica si la información solicitada ya se había importado * @return */ public boolean isAlreadyImported(); /** * Asigna si es que se importó correctamente la información * @param successfullyImport */ public void setImportationResult(boolean successfullyImport); }
[ "diroag@gmail.com" ]
diroag@gmail.com
518d77107681b5b8bc6a387706f395f6068154ae
5fe70f7634032cb77cc57cba778d18d47a764b6c
/openbp-common-swing/src/test/java/org/openbp/swing/components/wizard/test/TestWizard.java
ee8399e7f4829f0a59ca763be6988f041e517def
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
cleancode1116/OpenBP
cab222b3e336f1c81d6bc832e3c0d53244c13746
460a09c2f396ed1f77add70637644d254326d350
refs/heads/master
2020-07-11T06:07:24.821569
2016-11-18T07:43:22
2016-11-18T07:43:22
74,003,934
0
0
null
null
null
null
UTF-8
Java
false
false
3,036
java
/* * Copyright 2007 skynamics AG * * 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.openbp.swing.components.wizard.test; import java.awt.BorderLayout; import java.net.URL; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.UIManager; import org.openbp.common.ExceptionUtil; import org.openbp.swing.components.wizard.WizardImpl; /** * Wizard test. * * @author Heiko Erhardt */ public class TestWizard extends JFrame { ////////////////////////////////////////////////// // @@ Construction ////////////////////////////////////////////////// /** * Private constructor. */ private TestWizard() { super("Wizard Test"); setBounds(100, 100, 479, 357); ImageIcon image = null; URL url = getClass().getClassLoader().getResource("org/openbp/swing/components/wizard/test/Wizard.png"); if (url != null) { image = new ImageIcon(url); } ImageIcon backgroundImage = null; url = getClass().getClassLoader().getResource("org/openbp/swing/components/wizard/test/Background.png"); if (url != null) { backgroundImage = new ImageIcon(url); } WizardImpl wizard = new WizardImpl(null, image, backgroundImage); wizard.addAndLinkPage("info", new TestInformationPanel(wizard)); wizard.addAndLinkPage("favorites", new TestFavoritesPanel(wizard)); wizard.addAndLinkPage("java", new TestResultPanel(wizard, "Java", "100% Pure Genius!")); wizard.addAndLinkPage("cpp", new TestResultPanel(wizard, "C/C++", "You'll see...")); wizard.addAndLinkPage("pascal", new TestResultPanel(wizard, "Pascal", "Oh well...")); wizard.addAndLinkPage("smalltalk", new TestResultPanel(wizard, "SmallTalk", "Object Oriented")); wizard.addAndLinkPage("cobol", new TestResultPanel(wizard, "Cobol", "Year 2k problems?")); wizard.addAndLinkPage("fortran", new TestResultPanel(wizard, "Fortran", "Try Mathematica!")); wizard.displayFirst(); getContentPane().setLayout(new BorderLayout()); getContentPane().add("Center", wizard); } public static void main(String [] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); // UIManager.setLookAndFeel (UIManager.getCrossPlatformLookAndFeelClassName ()); // UIManager.setLookAndFeel ("org.openbp.swing.plaf.sky.SkyLookAndFeel"); } catch (Exception e) { ExceptionUtil.printTrace(e); } TestWizard wiz = new TestWizard(); wiz.setVisible(true); } }
[ "stephan@blackbuild.com" ]
stephan@blackbuild.com
84d7424d5c6b736971917b9bce5897370c34fab2
ffee96d08ef70627194dcb8b73a2fdabbe6aa4f9
/src/main/java/de/ropemc/api/wrapper/net/minecraft/profiler/IPlayerUsage.java
e41952a26ab9c1575395ea1a36e823cdeeb2a35b
[ "MIT" ]
permissive
RopeMC/RopeMC
0db2b4dd78a1842708de69e2455b7e0f60e9b9c9
b464fb9a67e410355a6a498f2d6a2d3b0d022b3d
refs/heads/master
2021-07-09T18:04:37.632199
2019-01-02T21:48:17
2019-01-02T21:48:17
103,042,886
11
1
MIT
2018-11-24T16:06:35
2017-09-10T16:07:39
Java
UTF-8
Java
false
false
339
java
package de.ropemc.api.wrapper.net.minecraft.profiler; import de.ropemc.api.wrapper.WrappedClass; @WrappedClass("net.minecraft.profiler.IPlayerUsage") public interface IPlayerUsage { void addServerStatsToSnooper(PlayerUsageSnooper var0); void addServerTypeToSnooper(PlayerUsageSnooper var0); boolean isSnooperEnabled(); }
[ "jan@bebendorf.eu" ]
jan@bebendorf.eu
6f9104de6aab1596698f302308d1333264e2628e
82bce8947b4a3d454fff2ca6ba46f8f4d89492b6
/ShunJianMei_Hairdresser/shunJianMei_Hairdresser/src/main/java/cc/ruit/shunjianmei/net/api/H_UpdateOrderStateApi.java
95adc9af3262606e84f368534e3e97c4a955eefe
[]
no_license
hubangmao/ShunJian
5e2301618561cc08a168fa13e8e7fbe190a01380
d4ee7725da0723cbff132dd0c9c9d8095400b8ad
refs/heads/master
2020-12-25T13:33:25.710633
2016-10-12T15:59:25
2016-10-12T15:59:25
69,206,184
1
0
null
null
null
null
UTF-8
Java
false
false
988
java
package cc.ruit.shunjianmei.net.api; import java.io.UnsupportedEncodingException; import cc.ruit.shunjianmei.constants.Constant; import cc.ruit.shunjianmei.net.request.H_UpdateOrderStateRequest; import cc.ruit.utils.sdk.http.HttpHelper; import com.lidroid.xutils.http.callback.RequestCallBack; /** * * @ClassName: H_UpdateOrderStateApi * @Description: 更新订单状态 * @author: 欧阳 * @date: 2015年10月21日 下午9:55:02 */ public class H_UpdateOrderStateApi { /** * * @ClassName: H_UpdateOrderStateApi * @Description: 更新订单状态 * @author: 欧阳 * @date: 2015年10月21日 下午9:55:02 */ public static void H_UpdateOrderState(H_UpdateOrderStateRequest request, RequestCallBack<String> callBack) { try { String json = request.toJsonString(request); HttpHelper.postJSON(Constant.HOSTURL, json, callBack); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } }
[ "1414430109@qq.com" ]
1414430109@qq.com
633d4b5ed5a2beeff6f902668f176759cce80d30
7aa02f902ad330c70b0b34ec2d4eb3454c7a3fc1
/p007b/p010e/C0273g.java
bf92aab5d3b5f4b9ce82337fa5e4312dd01058ec
[]
no_license
hisabimbola/andexpensecal
5e42c7e687296fae478dfd39abee45fae362bc5b
c47e6f0a1a6e24fe1377d35381b7e7e37f1730ee
refs/heads/master
2021-01-19T15:20:25.262893
2016-08-11T16:00:49
2016-08-11T16:00:49
100,962,347
1
0
null
2017-08-21T14:48:33
2017-08-21T14:48:33
null
UTF-8
Java
false
false
363
java
package p007b.p010e; import p007b.C0272k; import p007b.p010e.p017a.bp; import p007b.p011c.C0183d; /* renamed from: b.e.g */ public class C0273g extends bp implements C0151j, C0272k { public C0273g(int i, int i2, double d) { super(i, i2, d); } public C0273g(int i, int i2, double d, C0183d c0183d) { super(i, i2, d, c0183d); } }
[ "m.ravinther@yahoo.com" ]
m.ravinther@yahoo.com
7e1d156ede7a154e58a8b0eaca1bd4ca286f6649
2c140a0632890ce2a28a9025b493cbc67fab3bd5
/src/main/java/org/hl7/v3/PRPAMT201302UV02PatientOfOtherProvider.java
8c999b4b941826affa3f92bc205e7d3dde2f3d6e
[]
no_license
darkxi/hl7-Edition2012
cf5d475e06464c776b8b39676953835aae1fb3f5
add3330c499fd0491fd18a2f71be04a3c1efb391
refs/heads/master
2020-06-07T01:21:19.768327
2017-07-18T03:23:43
2017-08-18T09:03:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,035
java
// // 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的 // 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // 在重新编译源模式时, 对此文件的所有修改都将丢失。 // 生成时间: 2017.08.10 时间 10:45:02 AM CST // package org.hl7.v3; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>PRPA_MT201302UV02.PatientOfOtherProvider complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="PRPA_MT201302UV02.PatientOfOtherProvider"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;group ref="{urn:hl7-org:v3}InfrastructureRootElements"/> * &lt;element name="subjectOf" type="{urn:hl7-org:v3}PRPA_MT201302UV02.Subject3"/> * &lt;/sequence> * &lt;attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/> * &lt;attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" /> * &lt;attribute name="classCode" use="required" type="{urn:hl7-org:v3}RoleClassPatient" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PRPA_MT201302UV02.PatientOfOtherProvider", propOrder = { "realmCode", "typeId", "templateId", "subjectOf" }) public class PRPAMT201302UV02PatientOfOtherProvider { protected DSETCS realmCode; protected II typeId; protected LISTII templateId; @XmlElement(required = true) protected PRPAMT201302UV02Subject3 subjectOf; @XmlAttribute(name = "nullFlavor") protected NullFlavor nullFlavor; @XmlAttribute(name = "classCode", required = true) protected RoleClassPatient classCode; /** * 获取realmCode属性的值。 * * @return * possible object is * {@link DSETCS } * */ public DSETCS getRealmCode() { return realmCode; } /** * 设置realmCode属性的值。 * * @param value * allowed object is * {@link DSETCS } * */ public void setRealmCode(DSETCS value) { this.realmCode = value; } /** * 获取typeId属性的值。 * * @return * possible object is * {@link II } * */ public II getTypeId() { return typeId; } /** * 设置typeId属性的值。 * * @param value * allowed object is * {@link II } * */ public void setTypeId(II value) { this.typeId = value; } /** * 获取templateId属性的值。 * * @return * possible object is * {@link LISTII } * */ public LISTII getTemplateId() { return templateId; } /** * 设置templateId属性的值。 * * @param value * allowed object is * {@link LISTII } * */ public void setTemplateId(LISTII value) { this.templateId = value; } /** * 获取subjectOf属性的值。 * * @return * possible object is * {@link PRPAMT201302UV02Subject3 } * */ public PRPAMT201302UV02Subject3 getSubjectOf() { return subjectOf; } /** * 设置subjectOf属性的值。 * * @param value * allowed object is * {@link PRPAMT201302UV02Subject3 } * */ public void setSubjectOf(PRPAMT201302UV02Subject3 value) { this.subjectOf = value; } /** * 获取nullFlavor属性的值。 * * @return * possible object is * {@link NullFlavor } * */ public NullFlavor getNullFlavor() { return nullFlavor; } /** * 设置nullFlavor属性的值。 * * @param value * allowed object is * {@link NullFlavor } * */ public void setNullFlavor(NullFlavor value) { this.nullFlavor = value; } /** * 获取classCode属性的值。 * * @return * possible object is * {@link RoleClassPatient } * */ public RoleClassPatient getClassCode() { return classCode; } /** * 设置classCode属性的值。 * * @param value * allowed object is * {@link RoleClassPatient } * */ public void setClassCode(RoleClassPatient value) { this.classCode = value; } }
[ "2319457455@qq.com" ]
2319457455@qq.com
305238ed03223cf936b3b796d70d9651027b06c5
31f4cab278d83a755f1e434f35273223b049d172
/repositories/jackrabbit-oak/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/CoreValueMapper.java
ab84619376a63b71d7d79265ba8359aa98afcf2c
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference" ]
permissive
JenniferJohnson89/bugs_dot_jar_dissection
2a017f5f77772ddb2b9a5e45423ae084fa1bd7a0
7012cccce9a3fdbfc97a0ca507420c24650f6bcf
refs/heads/main
2022-12-28T16:38:18.039203
2020-10-20T09:45:47
2020-10-20T09:45:47
305,639,612
0
1
null
null
null
null
UTF-8
Java
false
false
7,392
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.jackrabbit.oak.kernel; import org.apache.jackrabbit.mk.json.JsonBuilder; import org.apache.jackrabbit.mk.json.JsopReader; import org.apache.jackrabbit.mk.json.JsopTokenizer; import org.apache.jackrabbit.oak.api.CoreValue; import org.apache.jackrabbit.oak.api.CoreValueFactory; import javax.jcr.PropertyType; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * CoreValueUtil provides methods to convert {@code CoreValue}s to the JSON * representation passed to MicroKernel and vice versa. */ class CoreValueMapper { private static final Map<Integer, String> TYPE2HINT = new HashMap<Integer, String>(); private static final Map<String, Integer> HINT2TYPE = new HashMap<String, Integer>(); static { for (int type = PropertyType.UNDEFINED; type <= PropertyType.DECIMAL; type++) { String hint = PropertyType.nameFromValue(type).substring(0,3).toLowerCase(); TYPE2HINT.put(type, hint); HINT2TYPE.put(hint, type); } } /** * Avoid instantiation. */ private CoreValueMapper() { } /** * Returns the internal JSON representation of the specified {@code value} * that is stored in the MicroKernel. All property types that are not * reflected as JSON types are converted to strings and get a type prefix. * * @param value The core value to be converted. * @return The encoded JSON string. * @see JsonBuilder#encode(String) * @see JsonBuilder#encode(long) * @see JsonBuilder#encode(long) */ public static String toJsonValue(CoreValue value) { String jsonString; switch (value.getType()) { case PropertyType.BOOLEAN: jsonString = JsonBuilder.encode(value.getBoolean()); break; case PropertyType.LONG: jsonString = JsonBuilder.encode(value.getLong()); break; case PropertyType.STRING: String str = value.getString(); if (startsWithHint(str)) { jsonString = buildJsonStringWithHint(value); } else { jsonString = JsonBuilder.encode(value.getString()); } break; default: // any other type jsonString = buildJsonStringWithHint(value); } return jsonString; } /** * Returns an JSON array containing the JSON representation of the * specified values. * * @param values The values to be converted to a JSON array. * @return JSON array containing the JSON representation of the specified * values. * @see #toJsonValue(org.apache.jackrabbit.oak.api.CoreValue) */ public static String toJsonArray(Iterable<CoreValue> values) { StringBuilder sb = new StringBuilder(); sb.append('['); for (CoreValue cv : values) { sb.append(toJsonValue(cv)); sb.append(','); } if (sb.length() > 1) { sb.deleteCharAt(sb.length() - 1); } sb.append(']'); return sb.toString(); } /** * Read a single value from the specified reader and convert it into a * {@code CoreValue}. This method takes type-hint prefixes into account. * * @param reader The JSON reader. * @param valueFactory The factory used to create the value. * @return The value such as defined by the token obtained from the reader. */ public static CoreValue fromJsopReader(JsopReader reader, CoreValueFactory valueFactory) { CoreValue value; if (reader.matches(JsopTokenizer.NUMBER)) { String number = reader.getToken(); value = valueFactory.createValue(Long.valueOf(number)); } else if (reader.matches(JsopTokenizer.TRUE)) { value = valueFactory.createValue(true); } else if (reader.matches(JsopTokenizer.FALSE)) { value = valueFactory.createValue(false); } else if (reader.matches(JsopTokenizer.STRING)) { String jsonString = reader.getToken(); if (startsWithHint(jsonString)) { int type = HINT2TYPE.get(jsonString.substring(0,3)); value = valueFactory.createValue(jsonString.substring(4), type); } else { value = valueFactory.createValue(jsonString); } } else { throw new IllegalArgumentException("Unexpected token: " + reader.getToken()); } return value; } /** * Read the list of values from the specified reader and convert them into * {@link CoreValue}s. This method takes type-hint prefixes into account. * * @param reader The JSON reader. * @param valueFactory The factory used to create the values. * @return A list of values such as defined by the reader. */ public static List<CoreValue> listFromJsopReader(JsopReader reader, CoreValueFactory valueFactory) { List<CoreValue> values = new ArrayList<CoreValue>(); while (!reader.matches(']')) { values.add(fromJsopReader(reader, valueFactory)); reader.matches(','); } return values; } //-------------------------------------------------------------------------- /** * Build the JSON representation of the specified value consisting of * a leading type hint, followed by ':" and the String conversion of this * value. * * @param value The value to be serialized. * @return The string representation of the specified value including a * leading type hint. */ private static String buildJsonStringWithHint(CoreValue value) { StringBuilder sb = new StringBuilder(); sb.append(TYPE2HINT.get(value.getType())); sb.append(':'); sb.append(value.getString()); return JsonBuilder.encode(sb.toString()); } /** * Returns {@code true} if the specified JSON String represents a value * serialization that includes a leading type hint. * * @param jsonString The JSON String representation of a {@code CoreValue} * @return {@code true} if the {@code jsonString} starts with a type * hint; {@code false} otherwise. * @see #buildJsonStringWithHint(org.apache.jackrabbit.oak.api.CoreValue) */ private static boolean startsWithHint(String jsonString) { return jsonString.length() >= 4 && jsonString.charAt(3) == ':'; } }
[ "JenniferJonhnson89@163.com" ]
JenniferJonhnson89@163.com
9d29c21c9e137236cbbd946bf8074231567bd7d8
a7f2bc2900c5a9842348a0b9aa6b099d93a888e8
/sample/source/blah/concurrency/second/JobRunner.java
e0afbba1b97b35ae087b6023dca19e437856f19f
[ "Apache-2.0" ]
permissive
Skullabs/tRip
452adb1a4f8001123e168e718f5aa0e5c92e72c2
0dc4407e69201ead84bd6886c037b536aca77796
refs/heads/master
2023-03-16T05:16:05.194912
2016-08-17T20:55:01
2016-08-17T20:55:01
19,279,270
1
1
null
2015-08-08T23:48:27
2014-04-29T14:25:50
Java
UTF-8
Java
false
false
625
java
package blah.concurrency.second; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor public class JobRunner implements Runnable { final JobQueue buffer; final JobDispatcher dispatcher; Job currentJob; @Override public void run() { while( true ) if ( hasMoreJobsToRun() ) tryRunCurrentJob(); } void tryRunCurrentJob() { try { currentJob.run( dispatcher ); } catch (InterruptedException e) { e.printStackTrace(); } } boolean hasMoreJobsToRun(){ try { currentJob = buffer.get(); return currentJob != null; } catch (InterruptedException e) { return false; } } }
[ "miere00@gmail.com" ]
miere00@gmail.com
97a17a2652f3b230565554a85e6895f8f27972e9
b241fd6f57c16613404500719c59ba398d6e3d4a
/swagger-codegen/src/main/java/io/swagger/client/ProgressResponseBody.java
75e6c2b622429115b768b03ab964dc53f5b4a850
[]
no_license
thanospan/ngsiv2-sdk-java-auto
05337d3a97750fa72f078e05e4df6979ca9a47bb
5e46cf765cc9367b11bba17bfe50527f068a9525
refs/heads/master
2022-06-17T23:34:56.060967
2022-06-12T12:19:59
2022-06-12T12:19:59
255,984,757
0
0
null
null
null
null
UTF-8
Java
false
false
2,115
java
/* * FIWARE-NGSI v2 Specification * TODO: Add a description * * OpenAPI spec version: 1.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package io.swagger.client; import com.squareup.okhttp.MediaType; import com.squareup.okhttp.ResponseBody; import java.io.IOException; import okio.Buffer; import okio.BufferedSource; import okio.ForwardingSource; import okio.Okio; import okio.Source; public class ProgressResponseBody extends ResponseBody { public interface ProgressListener { void update(long bytesRead, long contentLength, boolean done); } private final ResponseBody responseBody; private final ProgressListener progressListener; private BufferedSource bufferedSource; public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { this.responseBody = responseBody; this.progressListener = progressListener; } @Override public MediaType contentType() { return responseBody.contentType(); } @Override public long contentLength() throws IOException { return responseBody.contentLength(); } @Override public BufferedSource source() throws IOException { if (bufferedSource == null) { bufferedSource = Okio.buffer(source(responseBody.source())); } return bufferedSource; } private Source source(Source source) { return new ForwardingSource(source) { long totalBytesRead = 0L; @Override public long read(Buffer sink, long byteCount) throws IOException { long bytesRead = super.read(sink, byteCount); // read() returns the number of bytes read, or -1 if this source is exhausted. totalBytesRead += bytesRead != -1 ? bytesRead : 0; progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); return bytesRead; } }; } }
[ "thanospan@users.noreply.github.com" ]
thanospan@users.noreply.github.com
a461a82c83394c33f6fdc5f7b887011ee985d3f8
8cfa204a8d04a6496d9f79f018460b76a6d939d0
/yara-app-infra-apigateway/src/main/java/com/nagarro/nagp/yara/GatewayConfiguration.java
097a17774b43b0def740861a86a8d417d4eca2ce
[]
no_license
nagarro-osheen/YaraApp
bc607cc65a51e30e04c1853cf488af0d5668742a
887cdea7c6d3a8b9312e02fd7aa8062c0b9a0606
refs/heads/main
2023-04-06T17:29:18.873294
2021-04-10T19:04:21
2021-04-10T19:04:21
356,539,060
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
/* * */ package com.nagarro.nagp.yara; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; import org.springframework.context.annotation.Configuration; /** * The gateway to YaraApp application. Primary responsibility of this would be to * route incoming requests to the destined microservice. */ @Configuration @EnableZuulProxy public class GatewayConfiguration { }
[ "osheen.gulati@nagarro.com" ]
osheen.gulati@nagarro.com
d1685e217990e67af1d0c23c4856ed3b0977d84b
e6d8ca0907ff165feb22064ca9e1fc81adb09b95
/src/main/java/com/vmware/vim25/DuplicateIpDetectedEvent.java
db6de9935efd5808c63cc5545340a3d9d24a643d
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
incloudmanager/incloud-vijava
5821ada4226cb472c4e539643793bddeeb408726
f82ea6b5db9f87b118743d18c84256949755093c
refs/heads/inspur
2020-04-23T14:33:53.313358
2019-07-02T05:59:34
2019-07-02T05:59:34
171,236,085
0
1
BSD-3-Clause
2019-02-20T02:08:59
2019-02-18T07:32:26
Java
UTF-8
Java
false
false
2,205
java
/*================================================================================ Copyright (c) 2013 Steve Jin. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the names of copyright holders 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 COPYRIGHT HOLDERS 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 com.vmware.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ @SuppressWarnings("all") public class DuplicateIpDetectedEvent extends HostEvent { public String duplicateIP; public String macAddress; public String getDuplicateIP() { return this.duplicateIP; } public String getMacAddress() { return this.macAddress; } public void setDuplicateIP(String duplicateIP) { this.duplicateIP=duplicateIP; } public void setMacAddress(String macAddress) { this.macAddress=macAddress; } }
[ "sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1" ]
sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1
32027a44ef863496b343273d2899b9cd05ba7c70
a92adf2c39ea3abd0dd8674701435213d096dc37
/08-facade-pattern/src/main/java/szu/vander/hometheater/HomeTheaterFacade.java
c540348f63713e5eb31f0ba8c1842b1ffea630ad
[]
no_license
Vander1991/head-first-design-pattern
a083fd747eb311f501002f49d7ad50a54cb7ecd4
e94fc76043bbd51827226a0966cbfc74e53d5c66
refs/heads/master
2020-03-09T18:53:23.249605
2018-10-13T07:44:06
2018-10-13T07:44:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,480
java
package szu.vander.hometheater; /** * @author : Vander Choi * @date : 2018-07-08 * @description : */ public class HomeTheaterFacade { private Amplifier amp; private DvdPlayer dvd; private AirCondition airCondition; private Projector projector; private Screen screen; private TheaterLight theaterLight; private Television television; public HomeTheaterFacade(Amplifier amp, DvdPlayer dvd, AirCondition airCondition, Projector projector, Screen screen, TheaterLight theaterLight, Television television) { super(); this.amp = amp; this.dvd = dvd; this.airCondition = airCondition; this.projector = projector; this.screen = screen; this.theaterLight = theaterLight; this.television = television; } public void watchMoive(String moive) { theaterLight.on(); theaterLight.dim(); screen.down(); airCondition.on(); projector.on(); projector.wideScreenMode(); amp.on(); amp.setDvdPlayer(dvd); dvd.setAmplifier(amp); dvd.on(); dvd.setVolume(10); dvd.play(moive); } public void endMoive() { screen.up(); airCondition.off(); projector.off(); amp.off(); dvd.off(); theaterLight.off(); } public void watchTv() { theaterLight.on(); airCondition.on(); amp.on(); amp.setTelevision(television); television.on(); } public void closeTv() { television.off(); theaterLight.off(); airCondition.off(); amp.off(); } }
[ "398284823@qq.com" ]
398284823@qq.com
d1c295409c3d1eeac3d69d0a4cdefc9333256fc9
237d8913c8486f6553f012414593a369e4b9ea79
/wear/src/main/java/com/amsu/wear/fragment/running/BaseDataFragment.java
d9d9b3219999fc6f8f56e035ec44a6d91de99e7d
[]
no_license
cmFodWx5YWRhdjEyMTA5/Healthy
d513fda167cbed8a9b5d86fada0e17aec112c70d
bd2f57fc21371c1900b4cbf04a51a817fe988f7e
refs/heads/master
2020-04-03T12:59:24.782404
2018-04-19T09:26:01
2018-04-19T09:26:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,164
java
package com.amsu.wear.fragment.running; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.amap.api.location.AMapLocation; import com.amsu.wear.R; import com.amsu.wear.activity.RunningActivity; import com.amsu.wear.bean.RunningData; import com.amsu.wear.fragment.BaseFragment; import com.amsu.wear.myinterface.Function; import com.amsu.wear.myinterface.ObservableManager; import com.amsu.wear.util.LogUtil; import java.util.Arrays; import java.util.List; import butterknife.BindView; /** * @anthor haijun * @project name: Healthy-master * @class name:com.amsu.wear.fragment.running * @time 2018-03-08 6:23 PM * @describe */ public abstract class BaseDataFragment extends BaseFragment implements Function { private static final String TAG = BaseDataFragment.class.getSimpleName(); @BindView(R.id.sportStop) ImageView sportStop; @BindView(R.id.sportValue) TextView sportValue; @BindView(R.id.sportTypeTxt) TextView sportTypeTxt; @BindView(R.id.sportContent) TextView sportContent; @BindView(R.id.sportSignal) ImageView sportSignal; public static final String FUNCTION_WITH_PARAM_AND_RESULT = "FUNCTION_WITH_PARAM_AND_RESULT_FRAGMENT_DETAIL_DATA"; public static final int TIMEFRAGMENT_STOP = 1; public static final int TIMEFRAGMENT_DATA = 2; @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initView(); } private void initView() { sportTypeTxt.setText(setLableText()); sportStop.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ObservableManager.newInstance().notify(RunningActivity.FUNCTION_WITH_PARAM_AND_RESULT,TIMEFRAGMENT_STOP); } }); ObservableManager.newInstance().registerObserver(FUNCTION_WITH_PARAM_AND_RESULT, this); ObservableManager.newInstance().notify(RunningActivity.FUNCTION_WITH_PARAM_AND_RESULT,TIMEFRAGMENT_DATA); } @Override public Object function(Object[] data) { List<Object> objects = Arrays.asList(data); if (objects.size()>0){ Object o = objects.get(0); if (o instanceof RunningData){ final RunningData runningData = (RunningData) o; getActivity().runOnUiThread(new Runnable() { @Override public void run() { sportContent.setText(runningData.getHeartRate()); onDataReceive(runningData,sportValue); } }); } else if (o instanceof Integer){ final int gpsState = (int) o; LogUtil.i(TAG,"gpsState:"+gpsState); getActivity().runOnUiThread(new Runnable() { @Override public void run() { switch (gpsState){ case AMapLocation.GPS_ACCURACY_GOOD: sportSignal.setImageResource(R.drawable.gps5); break; case AMapLocation.GPS_ACCURACY_BAD: sportSignal.setImageResource(R.drawable.gps2); break; case AMapLocation.GPS_ACCURACY_UNKNOWN: sportSignal.setImageResource(R.drawable.gps1); break; } } }); } } return null; } @Override protected int attachLayoutRes() { return R.layout.layout_running_basedata; } protected abstract void onDataReceive(RunningData runningData,TextView view); protected abstract String setLableText(); @Override public void onDestroy() { super.onDestroy(); ObservableManager.newInstance().removeObserver(this); } }
[ "1812507678@qq.com" ]
1812507678@qq.com