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
62d6be417ffa613e6b73b74ae04faa21cbba7b07
e7cb38a15026d156a11e4cf0ea61bed00b837abe
/groundwork-gw-vijava/vijava/src/main/java/com/doublecloud/vim25/mo/PropertyCollector.java
2b45042b8b5fa2c6b5608f91cff7891f0fb371d0
[ "BSD-3-Clause" ]
permissive
wang-shun/groundwork-trunk
5e0ce72c739fc07f634aeefc8f4beb1c89f128af
ea1ca766fd690e75c3ee1ebe0ec17411bc651a76
refs/heads/master
2020-04-01T08:50:03.249587
2018-08-20T21:21:57
2018-08-20T21:21:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,191
java
/*================================================================================ Copyright (c) 2008 VMware, Inc. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of VMware, Inc. 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 VMWARE, INC. 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.doublecloud.vim25.mo; import java.rmi.RemoteException; import com.doublecloud.vim25.InvalidCollectorVersion; import com.doublecloud.vim25.InvalidProperty; import com.doublecloud.vim25.ManagedObjectReference; import com.doublecloud.vim25.ObjectContent; import com.doublecloud.vim25.PropertyFilterSpec; import com.doublecloud.vim25.RetrieveOptions; import com.doublecloud.vim25.RetrieveResult; import com.doublecloud.vim25.RuntimeFault; import com.doublecloud.vim25.UpdateSet; import com.doublecloud.vim25.WaitOptions; /** * The managed object class corresponding to the one defined in VI SDK API reference. * @author Steve JIN (http://www.doublecloud.org) */ public class PropertyCollector extends ManagedObject { public PropertyCollector(ServerConnection serverConnection, ManagedObjectReference mor) { super(serverConnection, mor); } public PropertyFilter[] getFilters() { return getFilter("filter"); } /** @since SDK4.1 */ public void cancelRetrievePropertiesEx(String token) throws InvalidProperty, RuntimeFault, RemoteException { getVimService().cancelRetrievePropertiesEx(getMOR(), token); } public void cancelWaitForUpdates() throws RuntimeFault, RemoteException { getVimService().cancelWaitForUpdates(getMOR()); } /** @since SDK4.1 */ public RetrieveResult continueRetrievePropertiesEx(String token) throws InvalidProperty, RuntimeFault, RemoteException { return getVimService().continueRetrievePropertiesEx(getMOR(), token); } public UpdateSet checkForUpdates(String version) throws InvalidCollectorVersion, RuntimeFault, RemoteException { return getVimService().checkForUpdates(getMOR(), version); } public PropertyFilter createFilter(PropertyFilterSpec spec, boolean partialUpdates) throws InvalidProperty, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().createFilter(getMOR(), spec, partialUpdates); return new PropertyFilter(getServerConnection(), mor); } /** @since SDK4.1 */ public PropertyCollector createPropertyCollector() throws RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().createPropertyCollector(getMOR()); return new PropertyCollector(getServerConnection(), mor); } /** @since SDK4.1 */ public void destroyPropertyCollector() throws RuntimeFault, RemoteException { getVimService().destroyPropertyCollector(getMOR()); } /** @deprecated as of SDK4.1 */ public ObjectContent[] retrieveProperties(PropertyFilterSpec[] specSet) throws InvalidProperty, RuntimeFault, RemoteException { return getVimService().retrieveProperties(getMOR(), specSet); } /** @since SDK4.1 */ public RetrieveResult retrievePropertiesEx(PropertyFilterSpec[] specSet, RetrieveOptions options) throws InvalidProperty, RuntimeFault, RemoteException { return getVimService().retrievePropertiesEx(getMOR(), specSet, options); } /** @deprecated as of SDK4.1 */ public UpdateSet waitForUpdates(String version) throws InvalidCollectorVersion, RuntimeFault, RemoteException { return getVimService().waitForUpdates(getMOR(), version); } /** @since SDK4.1 */ public UpdateSet waitForUpdatesEx(String version, WaitOptions options) throws InvalidCollectorVersion, RuntimeFault, RemoteException { return getVimService().waitForUpdatesEx(getMOR(), version, options); } }
[ "gibaless@gmail.com" ]
gibaless@gmail.com
d75308f818e2b60431de2ac59f0dadcad26b0b2d
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-data/src/main/java/nta/med/data/dao/phr/MailRepository.java
0d6f13dadd941f5bec974de0f6405e6a6d9f0d43
[]
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
664
java
package nta.med.data.dao.phr; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import nta.med.core.domain.phr.PhrMail; @Repository public interface MailRepository extends JpaRepository<PhrMail, Integer> { @Modifying @Query("SELECT a FROM PhrMail a WHERE type = :f_type and locale = :f_locale") public List<PhrMail> findByTypeAndLocale(@Param("f_type") String type, @Param("f_locale") String locale); }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
352ff59238d1519c0db032d51e6d817622bfe7e0
d2ec57598c338498027c2ecbcbb8af675667596b
/src/myfaces-core-module-2.1.10/impl/src/main/java/org/apache/myfaces/config/element/Redirect.java
e34b0a9f42fc55f2fc2806c6531090b2a0074fb5
[ "Apache-2.0" ]
permissive
JavaQualitasCorpus/myfaces_core-2.1.10
abf6152e3b26d905eff87f27109e9de1585073b5
10c9f2d038dd91c0b4f78ba9ad9ed44b20fb55c3
refs/heads/master
2023-08-12T09:29:23.551395
2020-06-02T18:06:36
2020-06-02T18:06:36
167,005,005
0
0
Apache-2.0
2022-07-01T21:24:07
2019-01-22T14:08:49
Java
UTF-8
Java
false
false
1,102
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.myfaces.config.element; import java.io.Serializable; import java.util.List; import java.util.Map; public abstract class Redirect implements Serializable { public abstract Map<String, List<String>> getViewParams(); public abstract String getIncludeViewParams(); }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
276798bce095238615e27846e0bb62e4abf8bcfb
63e36d35f51bea83017ec712179302a62608333e
/OnePlusCamera/com/amap/api/maps2d/model/Polyline.java
dc4ca88b32e5f14b4d7bda5beab5bbbae50d2e53
[]
no_license
hiepgaf/oneplus_blobs_decompiled
672aa002fa670bdcba8fdf34113bc4b8e85f8294
e1ab1f2dd111f905ff1eee18b6a072606c01c518
refs/heads/master
2021-06-26T11:24:21.954070
2017-08-26T12:45:56
2017-08-26T12:45:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,305
java
package com.amap.api.maps2d.model; import android.os.RemoteException; import com.amap.api.mapcore2d.af; import com.amap.api.mapcore2d.cj; import java.util.List; public class Polyline { private final af a; public Polyline(af paramaf) { this.a = paramaf; } public boolean equals(Object paramObject) { if ((paramObject instanceof Polyline)) {} try { if (this.a != null) { boolean bool = this.a.a(((Polyline)paramObject).a); return bool; return false; } return false; } catch (RemoteException paramObject) { cj.a((Throwable)paramObject, "Polyline", "equals"); throw new RuntimeRemoteException((RemoteException)paramObject); } } public int getColor() { try { if (this.a != null) { int i = this.a.h(); return i; } return 0; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "getColor"); throw new RuntimeRemoteException(localRemoteException); } } public String getId() { try { if (this.a != null) { return this.a.c(); } return ""; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "getId"); throw new RuntimeRemoteException(localRemoteException); } } public List<LatLng> getPoints() { try { if (this.a != null) { List localList = this.a.i(); return localList; } return null; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "getPoints"); throw new RuntimeRemoteException(localRemoteException); } } public float getWidth() { try { if (this.a != null) { float f = this.a.g(); return f; } return 0.0F; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "getWidth"); throw new RuntimeRemoteException(localRemoteException); } } public float getZIndex() { try { if (this.a != null) { float f = this.a.d(); return f; } return 0.0F; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "getZIndex"); throw new RuntimeRemoteException(localRemoteException); } } public int hashCode() { try { if (this.a != null) { int i = this.a.f(); return i; } return 0; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "hashCode"); throw new RuntimeRemoteException(localRemoteException); } } public boolean isDottedLine() { if (this.a != null) { return this.a.j(); } return false; } public boolean isGeodesic() { if (this.a != null) { return this.a.k(); } return false; } public boolean isVisible() { try { if (this.a != null) { boolean bool = this.a.e(); return bool; } return false; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "isVisible"); throw new RuntimeRemoteException(localRemoteException); } } public void remove() { try { if (this.a != null) { this.a.b(); return; } return; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "remove"); throw new RuntimeRemoteException(localRemoteException); } } public void setColor(int paramInt) { try { if (this.a != null) { this.a.a(paramInt); return; } return; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "setColor"); throw new RuntimeRemoteException(localRemoteException); } } public void setDottedLine(boolean paramBoolean) { if (this.a != null) { this.a.b(paramBoolean); return; } } public void setGeodesic(boolean paramBoolean) { try { if (this.a != null) { if (this.a.k() == paramBoolean) { return; } List localList = getPoints(); this.a.c(paramBoolean); setPoints(localList); return; } } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "setGeodesic"); throw new RuntimeRemoteException(localRemoteException); } } public void setPoints(List<LatLng> paramList) { try { if (this.a != null) { this.a.a(paramList); return; } return; } catch (RemoteException paramList) { cj.a(paramList, "Polyline", "setPoints"); throw new RuntimeRemoteException(paramList); } } public void setVisible(boolean paramBoolean) { try { if (this.a != null) { this.a.a(paramBoolean); return; } return; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "setVisible"); throw new RuntimeRemoteException(localRemoteException); } } public void setWidth(float paramFloat) { try { if (this.a != null) { this.a.b(paramFloat); return; } return; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "setWidth"); throw new RuntimeRemoteException(localRemoteException); } } public void setZIndex(float paramFloat) { try { if (this.a != null) { this.a.a(paramFloat); return; } return; } catch (RemoteException localRemoteException) { cj.a(localRemoteException, "Polyline", "setZIndex"); throw new RuntimeRemoteException(localRemoteException); } } } /* Location: /Users/joshua/Desktop/system_framework/classes-dex2jar.jar!/com/amap/api/maps2d/model/Polyline.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "joshuous@gmail.com" ]
joshuous@gmail.com
3ba72823991de04724f469b5c998b7469caaec63
28adcde875c60b752ede090d4675b36cd7db98db
/src/net/wit/util/SettingUtils.java
3bc28a8d7a1792d48938001a9380d609e37e6aca
[]
no_license
rzico/mp-java
95f1dc0acd889d455fd23cd32c3b11842b51754d
980afd1a264b2f24fcbac508b116cd4dab4aa4a5
refs/heads/master
2021-09-27T13:49:31.257550
2018-05-10T10:53:47
2018-05-10T10:53:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,428
java
/* * Copyright 2005-2013 rsico. All rights reserved. * Support: http://www.rsico.cn * License: http://www.rsico.cn/license */ package net.wit.util; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.Date; import java.util.List; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Ehcache; import net.wit.CommonAttributes; import net.wit.EnumConverter; import net.wit.Setting; import org.apache.commons.beanutils.BeanUtilsBean; import org.apache.commons.beanutils.ConvertUtilsBean; import org.apache.commons.beanutils.Converter; import org.apache.commons.beanutils.converters.ArrayConverter; import org.apache.commons.beanutils.converters.DateConverter; import org.apache.commons.io.IOUtils; import org.dom4j.Attribute; import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.OutputFormat; import org.dom4j.io.SAXReader; import org.dom4j.io.XMLWriter; import org.springframework.core.io.ClassPathResource; /** * Utils - 系统设置 * * @author rsico Team * @version 3.0 */ @SuppressWarnings("unchecked") public final class SettingUtils { /** CacheManager */ private static final CacheManager cacheManager = CacheManager.create(); /** BeanUtilsBean */ private static final BeanUtilsBean beanUtils; static { ConvertUtilsBean convertUtilsBean = new ConvertUtilsBean() { @Override public String convert(Object value) { if (value != null) { Class<?> type = value.getClass(); if (type.isEnum() && super.lookup(type) == null) { super.register(new EnumConverter(type), type); } else if (type.isArray() && type.getComponentType().isEnum()) { if (super.lookup(type) == null) { ArrayConverter arrayConverter = new ArrayConverter(type, new EnumConverter(type.getComponentType()), 0); arrayConverter.setOnlyFirstToString(false); super.register(arrayConverter, type); } Converter converter = super.lookup(type); return ((String) converter.convert(String.class, value)); } } return super.convert(value); } @SuppressWarnings("rawtypes") @Override public Object convert(String value, Class clazz) { if (clazz.isEnum() && super.lookup(clazz) == null) { super.register(new EnumConverter(clazz), clazz); } return super.convert(value, clazz); } @SuppressWarnings("rawtypes") @Override public Object convert(String[] values, Class clazz) { if (clazz.isArray() && clazz.getComponentType().isEnum() && super.lookup(clazz.getComponentType()) == null) { super.register(new EnumConverter(clazz.getComponentType()), clazz.getComponentType()); } return super.convert(values, clazz); } @SuppressWarnings("rawtypes") @Override public Object convert(Object value, Class targetType) { if (super.lookup(targetType) == null) { if (targetType.isEnum()) { super.register(new EnumConverter(targetType), targetType); } else if (targetType.isArray() && targetType.getComponentType().isEnum()) { ArrayConverter arrayConverter = new ArrayConverter(targetType, new EnumConverter(targetType.getComponentType()), 0); arrayConverter.setOnlyFirstToString(false); super.register(arrayConverter, targetType); } } return super.convert(value, targetType); } }; DateConverter dateConverter = new DateConverter(); dateConverter.setPatterns(CommonAttributes.DATE_PATTERNS); convertUtilsBean.register(dateConverter, Date.class); beanUtils = new BeanUtilsBean(convertUtilsBean); } /** * 不可实例化 */ private SettingUtils() { } /** * 获取系统设置 * * @return 系统设置 */ public static Setting get() { Ehcache cache = cacheManager.getEhcache(Setting.CACHE_NAME); net.sf.ehcache.Element cacheElement = cache.get(Setting.CACHE_KEY); Setting setting; if (cacheElement != null) { setting = (Setting) cacheElement.getObjectValue(); } else { setting = new Setting(); try { File witXmlFile = new ClassPathResource(CommonAttributes.WIT_XML_PATH).getFile(); Document document = new SAXReader().read(witXmlFile); List<Element> elements = document.selectNodes("/wit/setting"); for (Element element : elements) { String name = element.attributeValue("name"); String value = element.attributeValue("value"); try { beanUtils.setProperty(setting, name, value); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } catch (Exception e) { e.printStackTrace(); } cache.put(new net.sf.ehcache.Element(Setting.CACHE_KEY, setting)); } return setting; } /** * 设置系统设置 * * @param setting * 系统设置 */ public static void set(Setting setting) { try { File witXmlFile = new ClassPathResource(CommonAttributes.WIT_XML_PATH).getFile(); Document document = new SAXReader().read(witXmlFile); List<Element> elements = document.selectNodes("/wit/setting"); for (Element element : elements) { try { String name = element.attributeValue("name"); String value = beanUtils.getProperty(setting, name); Attribute attribute = element.attribute("value"); attribute.setValue(value); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } } FileOutputStream fileOutputStream = null; XMLWriter xmlWriter = null; try { OutputFormat outputFormat = OutputFormat.createPrettyPrint(); outputFormat.setEncoding("UTF-8"); outputFormat.setIndent(true); outputFormat.setIndent(" "); outputFormat.setNewlines(true); fileOutputStream = new FileOutputStream(witXmlFile); xmlWriter = new XMLWriter(fileOutputStream, outputFormat); xmlWriter.write(document); } catch (Exception e) { e.printStackTrace(); } finally { if (xmlWriter != null) { try { xmlWriter.close(); } catch (IOException e) { } } IOUtils.closeQuietly(fileOutputStream); } Ehcache cache = cacheManager.getEhcache(Setting.CACHE_NAME); cache.put(new net.sf.ehcache.Element(Setting.CACHE_KEY, setting)); } catch (Exception e) { e.printStackTrace(); } } }
[ "zhangsr@tiaohuo.com" ]
zhangsr@tiaohuo.com
2fb8640d10bbf61e3bc418b67507ae6be96f6211
5673d6a11c78eda9e3dc7b81b708448aa2579bbd
/api/swings-ws/trunk/src/org/jdesktop/swingx/mapviewer/Waypoint.java
86958a4006bc15dfeb50c202bca6a0cfd6320533
[]
no_license
BGCX261/zonetrak-svn-to-git
2a7d37c2472ff945d58edf47c535171531ae1623
52be55c94c5f87203e286642a95d93ce891476bc
refs/heads/master
2016-09-06T09:58:14.559256
2015-08-25T15:19:02
2015-08-25T15:19:02
41,590,597
0
0
null
null
null
null
UTF-8
Java
false
false
1,684
java
/* * Waypoint.java * * Created on March 30, 2006, 5:22 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package org.jdesktop.swingx.mapviewer; import org.jdesktop.beans.AbstractBean; /** * A Waypoint is a GeoPosition that can be drawn on a may using * a WaypointPainter. * @author joshy */ public class Waypoint extends AbstractBean { private GeoPosition position; /** * Creates a new instance of Waypoint at lat/long 0,0 */ public Waypoint() { this(new GeoPosition(0, 0)); } /** * Creates a new instance of Waypoint at the specified * latitude and longitude * @param latitude new latitude * @param longitude new longitude */ public Waypoint(double latitude, double longitude) { this(new GeoPosition(latitude,longitude)); } /** * Creates a new instance of Waypoint at the specified * GeoPosition * @param coord a GeoPosition to initialize the new Waypoint */ public Waypoint(GeoPosition coord) { this.position = coord; } /** * Get the current GeoPosition of this Waypoint * @return the current position */ public GeoPosition getPosition() { return position; } /** * Set a new GeoPosition for this Waypoint * @param coordinate a new position */ public void setPosition(GeoPosition coordinate) { GeoPosition old = getPosition(); this.position = coordinate; firePropertyChange("position", old, getPosition()); } }
[ "you@example.com" ]
you@example.com
3eb50ce3bb57fde60652d8b32a5841fe5096e315
e69a23f836eaa3cffe6bb59bb8e0935c969fa9f5
/xiamu-user-server/src/main/java/com/umpay/rms/gpd/user/util/code/ImageCode.java
e0b94e1185c9692bacd30ec8421fa704a41aa86f
[]
no_license
Appetence/xiamu
97ba5a18a43692050aeef1bf336f11245ba5cfb9
a3ee93cec07da34f9a656907d6a947d0be020950
refs/heads/master
2023-03-18T02:43:11.343072
2021-03-17T08:23:44
2021-03-17T08:23:44
347,047,795
0
0
null
null
null
null
UTF-8
Java
false
false
787
java
package com.umpay.rms.gpd.user.util.code; /** * @program: rms-gpd * @description: * @author: xiamu * @create: 2020-08-06 11:38 */ public class ImageCode { private String jId; private byte[] data; private String key; private StringBuffer code; public StringBuffer getCode() { return code; } public void setCode(StringBuffer code) { this.code = code; } public String getjId() { return jId; } public void setjId(String jId) { this.jId = jId; } public byte[] getData() { return data; } public void setData(byte[] data) { this.data = data; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } }
[ "15834260040@163.com" ]
15834260040@163.com
a34e2c9dc1332bfd39404122c944aa7a98345ac0
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/RxJava/2016/12/MaybeFromActionTest.java
4f62a0e18ad75ae734cca30c7d1ac400344ca21a
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
4,358
java
/** * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See * the License for the specific language governing permissions and limitations under the License. */ package io.reactivex.internal.operators.maybe; import static org.junit.Assert.*; import java.util.List; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Test; import io.reactivex.*; import io.reactivex.functions.Action; import io.reactivex.observers.TestObserver; import io.reactivex.plugins.RxJavaPlugins; import io.reactivex.schedulers.Schedulers; public class MaybeFromActionTest { @Test(expected = NullPointerException.class) public void fromActionNull() { Maybe.fromAction(null); } @Test public void fromAction() { final AtomicInteger atomicInteger = new AtomicInteger(); Maybe.fromAction(new Action() { @Override public void run() throws Exception { atomicInteger.incrementAndGet(); } }) .test() .assertResult(); assertEquals(1, atomicInteger.get()); } @Test public void fromActionTwice() { final AtomicInteger atomicInteger = new AtomicInteger(); Action run = new Action() { @Override public void run() throws Exception { atomicInteger.incrementAndGet(); } }; Maybe.fromAction(run) .test() .assertResult(); assertEquals(1, atomicInteger.get()); Maybe.fromAction(run) .test() .assertResult(); assertEquals(2, atomicInteger.get()); } @Test public void fromActionInvokesLazy() { final AtomicInteger atomicInteger = new AtomicInteger(); Maybe<Object> maybe = Maybe.fromAction(new Action() { @Override public void run() throws Exception { atomicInteger.incrementAndGet(); } }); assertEquals(0, atomicInteger.get()); maybe .test() .assertResult(); assertEquals(1, atomicInteger.get()); } @Test public void fromActionThrows() { Maybe.fromAction(new Action() { @Override public void run() throws Exception { throw new UnsupportedOperationException(); } }) .test() .assertFailure(UnsupportedOperationException.class); } @SuppressWarnings("unchecked") @Test public void callable() throws Exception { final int[] counter = { 0 }; Maybe<Void> m = Maybe.fromAction(new Action() { @Override public void run() throws Exception { counter[0]++; } }); assertTrue(m.getClass().toString(), m instanceof Callable); assertNull(((Callable<Void>)m).call()); assertEquals(1, counter[0]); } @Test public void noErrorLoss() throws Exception { List<Throwable> errors = TestHelper.trackPluginErrors(); try { final CountDownLatch cdl1 = new CountDownLatch(1); final CountDownLatch cdl2 = new CountDownLatch(1); TestObserver<Object> to = Maybe.fromAction(new Action() { @Override public void run() throws Exception { cdl1.countDown(); cdl2.await(); } }).subscribeOn(Schedulers.single()).test(); assertTrue(cdl1.await(5, TimeUnit.SECONDS)); to.cancel(); cdl2.countDown(); int timeout = 10; while (timeout-- > 0 && errors.isEmpty()) { Thread.sleep(100); } TestHelper.assertError(errors, 0, InterruptedException.class); } finally { RxJavaPlugins.reset(); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
76a59457182f83570f55d7df9cf38e99e9bb9c8b
42966754e0f64b9a4e6a120bda08ca0aa42278e0
/concurrency/src/Drop/Producer.java
094cc029e2fc57f67ea7e64efb6132cdc2c81f19
[]
no_license
lotockijj/workspace
238b266fd6968ea81732242332a922f6db64dab5
684b2af7f4f8b2202136b34f085c5532de243858
refs/heads/master
2020-05-21T23:00:37.481715
2017-11-10T12:15:18
2017-11-10T12:15:18
64,556,994
0
0
null
null
null
null
UTF-8
Java
false
false
626
java
package Drop; import java.util.Random; public class Producer implements Runnable { private Drop drop; public Producer(Drop drop) { this.drop = drop; } public void run() { String importantInfo[] = {"Mares eat oats", "Does eat oats", "Little lambs eat ivy", "A kid will eat ivy too"}; Random random = new Random(); for (int i = 0; i < importantInfo.length; i++) { drop.put(importantInfo[i]); try { Thread.sleep(random.nextInt(5000)); } catch (InterruptedException e) {} } drop.put("DONE"); } }
[ "https://github.com/lotockijj/java-courses" ]
https://github.com/lotockijj/java-courses
b2378998d632192838418fd70d58f1dae81145a5
8ddb02f927921e40097811a9d152f0eb07894f1b
/greetgo.depinject.gen/test_src/kz/greetgo/depinject/gen/test_beans005/sub_beans_4/BeanConfig005_04.java
50040801a9d6699431c58bf5db063e0420ffbfba
[]
no_license
yuliashefer/greetgo.depinject
f6f4c2b21edd61e5c78794850ce60c4a071f8ce4
62af4755e4dc8348d8257b7a0d7674805acf511d
refs/heads/master
2021-04-29T19:24:06.990896
2018-02-16T10:15:05
2018-02-16T10:15:05
121,713,422
0
0
null
2018-02-16T04:06:08
2018-02-16T04:06:08
null
UTF-8
Java
false
false
253
java
package kz.greetgo.depinject.gen.test_beans005.sub_beans_4; import kz.greetgo.depinject.core.BeanConfig; import kz.greetgo.depinject.core.BeanScanner; @BeanScanner @BeanConfig(defaultFactoryClass = BeanFactory4.class) public class BeanConfig005_04 {}
[ "ekolpakov@greet-go.com" ]
ekolpakov@greet-go.com
8a5c9e07c70b9a6c395268b2c2581bb72023ebb9
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/ExceptionReporter.java
56e8fdabe5aeccd78cf8f521785628117a073fed
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
268
java
package org.apache.hadoop.mapreduce.task.reduce; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; @InterfaceAudience.LimitedPrivate() @InterfaceStability.Unstable public interface ExceptionReporter
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
548266df749c6aa10dc98693d3d03317a7e06106
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
/src/main/java/com/magento/test/service/InventorySourceStockLinkService.java
a1a54b2bc3fd09628268067090bd1993cb86bd07
[]
no_license
gmai2006/magentotest
819201760b720a90d55ef853be964651ace125ac
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
refs/heads/main
2023-09-03T05:14:27.788984
2021-10-17T06:25:09
2021-10-17T06:25:09
418,040,494
0
0
null
null
null
null
UTF-8
Java
false
false
2,020
java
/** * %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. #L% * * <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or * function or changes please update the templates then submit the template through our web * interface. */ package com.magento.test.service; import java.util.List; import com.magento.test.entity.InventorySourceStockLink; import com.magento.test.entity.InventorySourceStockLinkId; public interface InventorySourceStockLinkService { public InventorySourceStockLink find(InventorySourceStockLinkId id); /** * Select a list of InventorySourceStockLink based on a given maximum number of returning records. * * @param maxResult : a specified maximum number of returned records. * @return InventorySourceStockLink records. */ public List<InventorySourceStockLink> select(int maxResult); /** * Select all InventorySourceStockLink. * * @return all InventorySourceStockLink records. */ public List<InventorySourceStockLink> selectAll(); /** * Create InventorySourceStockLink. * * @param bean The InventorySourceStockLink. * @return The InventorySourceStockLink. */ public InventorySourceStockLink create(InventorySourceStockLink bean); /** * Update a InventorySourceStockLink. * * @param bean - The InventorySourceStockLink. * @return InventorySourceStockLink. */ public InventorySourceStockLink update(InventorySourceStockLink bean); }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
e1584a604b7660e360ac31a6fdd0fd4a250dc6e5
022980735384919a0e9084f57ea2f495b10c0d12
/src/ext-cttdt-lltnxp/ext-service/src/com/sgs/portlet/document/receipt/service/PmlEdmDocumentRecordToServiceUtil.java
c4ba8d1650dc2cefc9362d4ddbcef45fd89329b6
[]
no_license
thaond/nsscttdt
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
ae7dacc924efe578ce655ddfc455d10c953abbac
refs/heads/master
2021-01-10T03:00:24.086974
2011-02-19T09:18:34
2011-02-19T09:18:34
50,081,202
0
0
null
null
null
null
UTF-8
Java
false
false
1,269
java
package com.sgs.portlet.document.receipt.service; /** * <a href="PmlEdmDocumentRecordToServiceUtil.java.html"><b><i>View Source</i></b></a> * * <p> * ServiceBuilder generated this class. Modifications in this class will be * overwritten the next time is generated. * </p> * * <p> * This class provides static methods for the * <code>com.sgs.portlet.document.receipt.service.PmlEdmDocumentRecordToService</code> * bean. The static methods of this class calls the same methods of the bean * instance. It's convenient to be able to just write one line to call a method * on a bean instead of writing a lookup call and a method call. * </p> * * @author Brian Wing Shun Chan * * @see com.sgs.portlet.document.receipt.service.PmlEdmDocumentRecordToService * */ public class PmlEdmDocumentRecordToServiceUtil { private static PmlEdmDocumentRecordToService _service; public static PmlEdmDocumentRecordToService getService() { if (_service == null) { throw new RuntimeException( "PmlEdmDocumentRecordToService is not set"); } return _service; } public void setService(PmlEdmDocumentRecordToService service) { _service = service; } }
[ "nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e" ]
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
a0bcb9643a6097338562496b799554fb64466ee8
d9dd3e37298e740822bec789449b68760333b2dd
/AmtMedia/src/com/android/media/model/MenuItem.java
8fd8242e59a8f80b8888b6c9fa6e8ee52f10ad03
[]
no_license
zhangweihust/amusic
2831257b2c751cf0dcef6f8560fed1c60c08ed4c
69a9e97356018533cfd312833dacff19655f50db
refs/heads/master
2016-09-05T14:25:12.562243
2013-04-01T12:47:54
2013-04-01T12:47:54
8,694,266
1
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.android.media.model; public class MenuItem { private int resId; private String resName; public MenuItem(){ } public MenuItem(int resId,String resName){ this.resId=resId; this.resName=resName; } public void setResId(int resId) { this.resId = resId; } public int getResId(){ return this.resId; } public void setResName(String resName) { this.resName = resName; } public String getResName(){ return this.resName; } }
[ "zhangweihust@gmail.com" ]
zhangweihust@gmail.com
0615fd8e4e6324733ca5c3c3d1a38fd0e21f0085
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_a4a59ff055f3b7414ae2c0162c31b0dce50faa72/XSDSchemaEditPart/4_a4a59ff055f3b7414ae2c0162c31b0dce50faa72_XSDSchemaEditPart_t.java
98a03d0f0f0eb0f82112d2ae49276381a0e024ab
[]
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
6,066
java
/******************************************************************************* * Copyright (c) 2001, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.wst.xsd.ui.internal.design.editparts; import java.util.ArrayList; import java.util.List; import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.LineBorder; import org.eclipse.draw2d.MarginBorder; import org.eclipse.draw2d.RectangleFigure; import org.eclipse.draw2d.ToolbarLayout; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.gef.EditPart; import org.eclipse.wst.xsd.ui.internal.adapters.CategoryAdapter; import org.eclipse.wst.xsd.ui.internal.adapters.XSDSchemaAdapter; import org.eclipse.wst.xsd.ui.internal.adt.design.editparts.BaseEditPart; import org.eclipse.wst.xsd.ui.internal.adt.typeviz.design.figures.HeadingFigure; import org.eclipse.wst.xsd.ui.internal.design.layouts.FillLayout; import org.eclipse.wst.xsd.ui.internal.editor.XSDEditorPlugin; import org.eclipse.xsd.XSDSchema; public class XSDSchemaEditPart extends BaseEditPart { protected Label label; protected Figure outer, contentFigure; protected HeadingFigure headingFigure; public IFigure getContentPane() { return contentFigure; } protected IFigure createFigure() { outer = new Figure(); // outer.setBorder(new RoundedLineBorder(1, 6)); outer.setBorder(new LineBorder(1)); FillLayout fillLayout = new FillLayout(4); outer.setLayoutManager(fillLayout); headingFigure = new HeadingFigure(); outer.add(headingFigure); final int theMinHeight = 200; FillLayout outerLayout = new FillLayout() { protected Dimension calculatePreferredSize(IFigure parent, int width, int height) { Dimension d = super.calculatePreferredSize(parent, width, height); d.union(new Dimension(250, theMinHeight)); return d; } }; outerLayout.setHorizontal(false); outer.setLayoutManager(outerLayout); RectangleFigure line = new RectangleFigure() { public Dimension getPreferredSize(int wHint, int hHint) { Dimension d = super.getPreferredSize(wHint, hHint); d.width += 20; d.height = 1; return d; } }; ToolbarLayout lineLayout = new ToolbarLayout(false); lineLayout.setVertical(true); lineLayout.setStretchMinorAxis(true); line.setLayoutManager(lineLayout); outer.add(line); contentFigure = new Figure(); contentFigure.setBorder(new MarginBorder(4, 4, 4, 4)); fillLayout = new FillLayout(4); contentFigure.setLayoutManager(fillLayout); outer.add(contentFigure); return outer; } protected List getModelChildren() { XSDSchemaAdapter schemaAdapter = (XSDSchemaAdapter) getModel(); List list = new ArrayList(); List templist = new ArrayList(); templist.add(schemaAdapter.getCategory(CategoryAdapter.DIRECTIVES)); Holder holder = new Holder(templist); list.add(holder); templist = new ArrayList(); templist.add(schemaAdapter.getCategory(CategoryAdapter.ELEMENTS)); templist.add(schemaAdapter.getCategory(CategoryAdapter.TYPES)); holder = new Holder(templist); list.add(holder); templist = new ArrayList(); templist.add(schemaAdapter.getCategory(CategoryAdapter.ATTRIBUTES)); templist.add(schemaAdapter.getCategory(CategoryAdapter.GROUPS)); holder = new Holder(templist); list.add(holder); return list; } protected EditPart createChild(Object model) { CategoryRowEditPart result = new CategoryRowEditPart(); result.setModel(model); result.setParent(this); return result; } protected void refreshVisuals() { super.refreshVisuals(); String targetNamespaceValue = ((XSDSchema) ((XSDSchemaAdapter) getModel()).getTarget()).getTargetNamespace(); if (targetNamespaceValue == null || targetNamespaceValue.length() == 0) { targetNamespaceValue = XSDEditorPlugin.getXSDString("_UI_GRAPH_XSDSCHEMA_NO_NAMESPACE"); } headingFigure.getLabel().setText(XSDEditorPlugin.getXSDString("_UI_GRAPH_XSDSCHEMA") + " : " + targetNamespaceValue); } protected void createEditPolicies() { // TODO Auto-generated method stub } protected class Holder { List list; public Holder(List list) { this.list = list; } public List getList() { return list; } } protected class CategoryRowEditPart extends BaseEditPart { protected XSDSchema schema; protected Figure contentPane; protected IFigure createFigure() { Figure containerFigure = new Figure(); containerFigure.setBorder(new MarginBorder(4, 4, 4, 4)); // containerFigure.setBorder(new LineBorder(1)); // containerFigure.setBackgroundColor(ColorConstants.green); FillLayout fillLayout = new FillLayout(4); fillLayout.setHorizontal(true); containerFigure.setLayoutManager(fillLayout); return containerFigure; } /* * (non-Javadoc) * * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#getContentPane() */ public IFigure getContentPane() { return super.getContentPane(); } protected List getModelChildren() { Holder holder = (Holder) getModel(); return holder.getList(); } protected void createEditPolicies() { // TODO Auto-generated method stub } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
148f61590a7c0b6748d7fe0cbecce831e5d6d8db
d8946a76bf529a711bd2f0f6edbff554a00bfe09
/live-service/src/main/java/com/xq/live/web/controllerForWeb/OrderInvoiceForWebController.java
f11b527e4dd847d023e4203d75258d26c021fbf6
[]
no_license
bs-debugger/ShoppingMall
d126b027cb0d4c7818a8fda1020669dbfe2aa5cd
a23303268ffec5f598b4608d6dcbe760ba8b2470
refs/heads/master
2022-12-23T12:19:49.928887
2019-07-11T10:18:43
2019-07-11T10:18:43
196,370,705
0
0
null
2022-12-16T02:23:13
2019-07-11T10:11:35
Java
UTF-8
Java
false
false
2,837
java
package com.xq.live.web.controllerForWeb; import com.xq.live.common.BaseResp; import com.xq.live.common.Pager; import com.xq.live.common.ResultStatus; import com.xq.live.model.OrderInvoice; import com.xq.live.model.User; import com.xq.live.service.OrderInvoiceService; import com.xq.live.vo.in.OrderInvoiceInVo; import com.xq.live.vo.out.OrderInvoiceOut; import com.xq.live.web.utils.UserContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.BindingResult; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; import java.util.List; /** * 订单发票相关接口 * Created by lipeng on 2018/12/22. */ @RestController @RequestMapping(value = "/website/orderInvoice") public class OrderInvoiceForWebController { @Autowired private OrderInvoiceService orderInvoiceService; /** * 查看发票列表 * page,rows * @param inVo * @return */ @RequestMapping(value = "/list",method = RequestMethod.GET) public BaseResp<Pager<OrderInvoiceOut>> list(OrderInvoiceInVo inVo){ User user = UserContext.getUserSession(); if(user==null||user.getId()==null){ return new BaseResp<Pager<OrderInvoiceOut>>(ResultStatus.error_param_empty); } inVo.setUserId(user.getId()); Pager<OrderInvoiceOut> list = orderInvoiceService.list(inVo); return new BaseResp<Pager<OrderInvoiceOut>>(ResultStatus.SUCCESS,list); } /** * 发票申请 * 入参:orderCode,sourceType,initialType,invoiceAmount,invoiceOpen * (email)--电子发票,(dutyParagraph)--企业,(orderAddressId)--纸质发票 * @param inVo * @param result * @return */ @RequestMapping(value = "/add",method = RequestMethod.POST) public BaseResp<Long> add(@Valid OrderInvoice inVo, BindingResult result){ if (result.hasErrors()) { List<ObjectError> list = result.getAllErrors(); return new BaseResp<Long>(ResultStatus.FAIL.getErrorCode(), list.get(0).getDefaultMessage(), null); } User user = UserContext.getUserSession(); if(user==null||user.getMobile()==null){ return new BaseResp<Long>(ResultStatus.error_param_empty); } Boolean re = orderInvoiceService.checkOrderInvoice(inVo); if(re==true){ return new BaseResp<Long>(ResultStatus.error_order_invoice_apply); } inVo.setUserId(user.getId()); inVo.setMobile(user.getMobile()); Long id = orderInvoiceService.add(inVo); return new BaseResp<Long>(ResultStatus.SUCCESS,id); } }
[ "hbxfbs@126.com" ]
hbxfbs@126.com
82ab669aec6787c6f838a302842fb9f02915e669
1fbf6bb143fd2694ea74521c9b234813403771ab
/game-utils/src/main/java/com/wjybxx/fastjgame/dsl/CoordinateSystem2D.java
69e8401ac41d4f6c4707b5a5f3d747ddcdc11997
[ "Apache-2.0" ]
permissive
taojhlwkl/fastjgame
8b14eda105ca36e0a9583ff803f03412821999e3
281f8aa2ea53ea600614508ad6e45f47deab39da
refs/heads/master
2021-01-01T13:58:45.848664
2020-02-09T04:30:55
2020-02-09T04:30:55
239,309,885
1
0
null
2020-02-09T13:33:15
2020-02-09T13:33:14
null
UTF-8
Java
false
false
8,870
java
/* * Copyright 2019 wjybxx * * 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.wjybxx.fastjgame.dsl; import com.wjybxx.fastjgame.shape.Point2D; import com.wjybxx.fastjgame.shape.RectangleVertexHolder; import com.wjybxx.fastjgame.shape.shape2d.Rectangle; import com.wjybxx.fastjgame.utils.MathUtils; import javax.annotation.concurrent.ThreadSafe; /** * 2D坐标系,采用左下角为(0,0), 右方为x轴正方向,上方为y轴正方向; * 涉及到方向的(上下左右,顺时针,逆时针)的东西都需要在这里处理; * 因为在不同的坐标系下,左右和顺逆时针不一样; * * @author wjybxx * @version 1.0 * date - 2019/6/3 17:30 * github - https://github.com/hl845740757 */ @ThreadSafe public final class CoordinateSystem2D { /** * 原点 */ public static final Point2D origin = Point2D.newPoint2D(0, 0).unmodifiable(); /** * x轴正方向单位向量 */ public static final Point2D xPositiveDirection = Point2D.newPoint2D(1, 0).unmodifiable(); /** * y轴正方向单位向量 */ public static final Point2D yPositiveDirection = Point2D.newPoint2D(0, 1).unmodifiable(); /** * a是否在b的上面 * * @param a * @param b * @return */ public static boolean isHigher(Point2D a, Point2D b) { return a.getY() > b.getY(); } /** * a是否在b的右边 * * @param a * @param b * @return */ public static boolean isMoreRight(Point2D a, Point2D b) { return a.getX() > b.getX(); } /** * a到b是否顺时针 * <p> * 假设坐标系x向右,y向上,那么叉乘方向朝向本人。 * 二维向量的叉乘:cross(a,b) = ax * by - ay * bx = norm(a)* norm(b) * sin<a, b> * 叉乘的结果是正数,说明a到b是逆时针,反之顺时针; * 结果若是0,则说明a,b共线。 * - https://blog.csdn.net/hy3316597/article/details/52732963 * * @param a 起始向量 * @param b 目标向量 * @return true/false */ public static boolean isClockwise(Point2D a, Point2D b) { return MathUtils.crossProductValue(a, b) < 0; } /** * a到b是否顺时针或共线 * * @param a 起始向量 * @param b 目标向量 * @return */ public static boolean isClockwiseOrCollinear(Point2D a, Point2D b) { return MathUtils.crossProductValue(a, b) <= 0; } /** * a到b是否逆时针方向 * * @param a 起始向量 * @param b 目标向量 * @return true/false */ public static boolean isCounterClockwise(Point2D a, Point2D b) { return MathUtils.crossProductValue(a, b) > 0; } /** * a到b是否逆时针或共线 * * @param a 起始向量 * @param b 目标向量 * @return */ public static boolean isCounterClockwiseOrOrCollinear(Point2D a, Point2D b) { return MathUtils.crossProductValue(a, b) >= 0; } /** * compareDirection 是否在 centerDirection 右边; * 换句话说:顺时针夹角 (0,180),开区间; * (顺时针是减少方向,逆时针是增加方向) * * @param compareDirection 比较向量弧度角 * @param centerDirection 基准向量弧度角 * @return 顺时针方向返回true (重合返回false) */ public static boolean isMoreRight(float compareDirection, float centerDirection) { if (centerDirection >= 0) { return compareDirection < centerDirection && compareDirection > (centerDirection - MathUtils.PI); } else { return compareDirection < centerDirection || compareDirection > (centerDirection + MathUtils.PI); } } /** * compareDirection 是否在 centerDirection 右边 或共线 * * @param compareDirection 比较向量弧度角 * @param centerDirection 基准向量弧度角 * @return */ public static boolean isMoreRightOrCollinear(float compareDirection, float centerDirection) { return isMoreRight(compareDirection, centerDirection) || Float.compare(compareDirection, centerDirection) == 0; } /** * 向右旋转一定角度 * (顺时针旋转) * * @param angle 当前弧度角 * @param delta Δ用来表示增量 * @return float (-PI,PI] */ public static float turnRight(float angle, float delta) { return clockwise(angle, delta); } /** * 向左旋转一定角度 * (逆时针旋转) * * @param angle 当前弧度角 * @param delta Δ用来表示增量 * @return float (-PI,PI] */ public static float turnLeft(float angle, float delta) { return counterClockwise(angle, delta); } /** * 顺时针旋转 * (加) * * @param angle 当前弧度角 * @param delta Δ用来表示增量 * @return */ public static float clockwise(float angle, float delta) { return MathUtils.radAngleSub(angle, delta); } /** * 逆时针旋转 * (加) * * @param angle 当前弧度角 * @param delta Δ用来表示增量 * @return float (-PI,PI] */ public static float counterClockwise(float angle, float delta) { return MathUtils.radAngleAdd(angle, delta); } /** * 计算矩形的四个顶点。 * (为何方这里?因为上下左右和坐标系有关系.....) * <pre> * d......direction....c * | | | * | | | * | | | * a......bottom.......b * </pre> * 实现上两种方式,一种可读性好,一种性能好 * <pre> * {@code * // 左右旋转90° 获得 a b两点 左加右减(可读性是很好的) * Point2D a = MathUtils.directionPoint(bottomCenter,MathUtils.radAngleAdd(direction,MathUtils.HALF_PI),width/2); * Point2D b = MathUtils.directionPoint(bottomCenter,MathUtils.radAngleSub(direction,MathUtils.HALF_PI),width/2); * * // 由b得到c a得到d * Point2D c = MathUtils.directionPoint(b,direction,height); * Point2D d = MathUtils.directionPoint(a,direction,height); * } * </pre> * <p> * 通过弧度角朝向创建矩形 * * @param bottomCenter 矩形底部中心点 * @param direction 矩形朝向(底部边的高所在方向),弧度角 * @param width 矩形的宽 * @param height 矩形的高 * @return */ public static RectangleVertexHolder calRectangleVertex(Point2D bottomCenter, float direction, float width, float height) { // 减少MathUtils.directionPoint调用,计算cos和sin的消耗 // 最好拿纸画一下图,这个理解难度高不少 double cos = Math.cos(direction); double sin = Math.sin(direction); float widthDX = (float) (width / 2 * sin); float widthDY = (float) (width / 2 * cos); Point2D a = Point2D.newPoint2D(bottomCenter.getX() - widthDX, bottomCenter.getY() + widthDY); Point2D b = Point2D.newPoint2D(bottomCenter.getX() + widthDX, bottomCenter.getY() - widthDY); float heightDX = (float) (height * cos); float heightDY = (float) (height * sin); // 由b得到c a得到d Point2D c = Point2D.newPoint2D(b.getX() + heightDX, b.getY() + heightDY); Point2D d = Point2D.newPoint2D(a.getX() + heightDX, a.getY() + heightDY); return new RectangleVertexHolder(a, b, c, d); } /** * 构建矩形(正方形)格子的区域 * * @param rowIndex 行索引 * @param colIndex 列索引 * @param gridWidth 格子宽高 * @return Rectangle */ public static Rectangle buildGridRegion(int rowIndex, int colIndex, int gridWidth) { Point2D a = MathUtils.gridVertexLocation(rowIndex, colIndex, gridWidth); // ab 同y Point2D b = Point2D.newPoint2D(a.getX() + gridWidth, a.getY()); // bc 同x Point2D c = Point2D.newPoint2D(b.getX(), b.getY() + gridWidth); // ad同x cd同y Point2D d = Point2D.newPoint2D(a.getX(), c.getY()); return new Rectangle(a, b, c, d); } }
[ "845740757@qq.com" ]
845740757@qq.com
1946cd9d883aa35eaa5ba3d2a0663a3878976449
5e9ddebb724c7f460fbc3c0d25fb5db93f4bdc4d
/src/main/java/thaumicenergistics/network/handlers/HandlerServerAspectSlot.java
834b8a8c96ce22c46d6fe1860a8eea3d1a285d54
[ "MIT" ]
permissive
sb023612/ThaumicEnergistics
acf0c61119be5c0e6efef717d683823acd0bb2b4
4c134d230f2094279ca2a140625b5ad0e9e07f06
refs/heads/master
2021-01-15T13:43:41.127375
2014-10-25T08:32:26
2014-10-25T08:32:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
539
java
package thaumicenergistics.network.handlers; import thaumicenergistics.network.packet.server.PacketServerAspectSlot; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class HandlerServerAspectSlot implements IMessageHandler<PacketServerAspectSlot, IMessage> { @Override public IMessage onMessage( PacketServerAspectSlot message, MessageContext ctx ) { message.execute(); return null; } }
[ "Nividica@gmail.com" ]
Nividica@gmail.com
f9ef9d7d3f9638aaf76f86e5931d87432105152e
73d87fd42cf2d2cc92ba541ee9d4e07d9677911e
/src/main/java/net/malisis/doors/renderer/font/FontGeneratorOptions.java
0c4fb7216fca9a28b93a36e6b1b760426d9fa7c6
[ "MIT" ]
permissive
ferreusveritas/MalisisDoorsLean
8f2f050bc6e99251d8cd4daec0a47ffb9789694b
e062ff00a08f54933aa2c15332287ca4559f7043
refs/heads/main
2023-01-22T16:12:21.250827
2020-11-26T04:22:26
2020-11-26T04:22:26
316,119,873
0
0
null
null
null
null
UTF-8
Java
false
false
1,902
java
/* * The MIT License (MIT) * * Copyright (c) 2014 Ordinastie * * 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 net.malisis.doors.renderer.font; import java.awt.Font; /** * @author Ordinastie * */ public class FontGeneratorOptions { public static FontGeneratorOptions DEFAULT = new FontGeneratorOptions(); /** Type of font **/ public int fontType = Font.TRUETYPE_FONT; /** Size of font **/ public float fontSize = 128F; /** Whether to use AA for the rendering of the font **/ public boolean antialias = false; /** Offset on the left of characters **/ public float mx = 0; /** Offset on the right of characters **/ public float px = 0; /** Offset on the top of characters **/ public float my = 0; /** Offset on the bottom of characters **/ public float py = 0; /** Whether to generate debug data in the texture **/ public boolean debug; }
[ "ferreusveritas@gmail.com" ]
ferreusveritas@gmail.com
61e702e33e0694eead97f3cf7f6443b2c231c3c1
ca26d7880ccaefc725cb0eb0df57c76748cc788d
/jiabian-parent/jiabian-io/src/main/java/com/jiabian/dada/request/DadaUserReq.java
e84594ee92bb4797c4cfc4f6483b0e9584d51feb
[]
no_license
LuQinghua/hanbaoge
81dda1a3637f51d40481ab0db29e758c0827447b
a2163d6fa2700e21bb1635a01a64220bb492ec08
refs/heads/master
2020-03-22T17:10:39.467439
2018-07-10T05:03:14
2018-07-10T05:03:14
140,378,577
0
0
null
2018-07-10T04:49:49
2018-07-10T04:49:49
null
UTF-8
Java
false
false
1,024
java
package com.jiabian.dada.request; import java.io.Serializable; import com.jiabian.base.BaseReq; public class DadaUserReq extends BaseReq implements Serializable { /** * 用户编号 */ private Long id; /** * 用户名 */ private String name; /** * openId */ private String openId; /** * 积分 */ private Integer score; private static final long serialVersionUID = 1L; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name == null ? null : name.trim(); } public String getOpenId() { return openId; } public void setOpenId(String openId) { this.openId = openId == null ? null : openId.trim(); } public Integer getScore() { return score; } public void setScore(Integer score) { this.score = score; } }
[ "2463663579@qq.com" ]
2463663579@qq.com
afdaa87b322de4c8c357a6e727d6a3d15b8bde91
0387c5473495a0c0d9542f208a6c6f827d4747cd
/uiengine/src/main/java/com/axway/ats/uiengine/elements/html/HtmlAlert.java
7d475ed1b52bb2db8fec276de109be4a386201dd
[ "Apache-2.0" ]
permissive
radokostadinov/ats-framework
fd1c02dc5776bfa1dfc66400d357a05c19581c24
78b154de004aa61fee5769b7cdaaa03945a9b37d
refs/heads/master
2021-05-07T07:38:00.646735
2017-11-01T13:32:04
2017-11-01T13:33:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
/* * Copyright 2017 Axway Software * * 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.axway.ats.uiengine.elements.html; import com.axway.ats.common.PublicAtsApi; import com.axway.ats.uiengine.UiDriver; import com.axway.ats.uiengine.elements.UiAlert; /** * An HTML Alert. Only one alert can be present at a time. */ @PublicAtsApi public abstract class HtmlAlert extends UiAlert { public HtmlAlert( UiDriver uiDriver ) { super( uiDriver ); } @PublicAtsApi public abstract void clickOk( String expectedAlertText ); @PublicAtsApi public abstract void verifyProcessed(); }
[ "rslavchev@axway.com" ]
rslavchev@axway.com
79a0312a9e4917e13419dd3fe901f4bea5514b05
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes8.dex_source_from_JADX/com/facebook/nearby/v2/resultlist/NearbyPlacesResultListAdapterProvider.java
1abfa14fd05e302dd58b7481ae250f7ac31b38d4
[]
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
255
java
package com.facebook.nearby.v2.resultlist; import com.facebook.inject.AbstractAssistedProvider; /* compiled from: deletePageReview */ public class NearbyPlacesResultListAdapterProvider extends AbstractAssistedProvider<NearbyPlacesResultListAdapter> { }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
c335361dbc8476c637be78995950a2a1249588cc
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/org/apache/commons/p029io/input/ObservableInputStream.java
57d5a7f576247757f9c44e5a03d52506d464b03f
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
4,392
java
package org.apache.commons.p029io.input; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; /* renamed from: org.apache.commons.io.input.ObservableInputStream */ public class ObservableInputStream extends ProxyInputStream { private final List<Observer> observers = new ArrayList(); /* renamed from: org.apache.commons.io.input.ObservableInputStream$Observer */ public static abstract class Observer { /* access modifiers changed from: package-private */ public void closed() throws IOException { } /* access modifiers changed from: package-private */ public void data(int i) throws IOException { } /* access modifiers changed from: package-private */ public void data(byte[] bArr, int i, int i2) throws IOException { } /* access modifiers changed from: package-private */ public void finished() throws IOException { } /* access modifiers changed from: package-private */ public void error(IOException iOException) throws IOException { throw iOException; } } public ObservableInputStream(InputStream inputStream) { super(inputStream); } public void add(Observer observer) { this.observers.add(observer); } public void remove(Observer observer) { this.observers.remove(observer); } public void removeAllObservers() { this.observers.clear(); } public int read() throws IOException { int i; try { i = super.read(); e = null; } catch (IOException e) { e = e; i = 0; } if (e != null) { noteError(e); } else if (i == -1) { noteFinished(); } else { noteDataByte(i); } return i; } public int read(byte[] bArr) throws IOException { int i; try { i = super.read(bArr); e = null; } catch (IOException e) { e = e; i = 0; } if (e != null) { noteError(e); } else if (i == -1) { noteFinished(); } else if (i > 0) { noteDataBytes(bArr, 0, i); } return i; } public int read(byte[] bArr, int i, int i2) throws IOException { int i3; try { i3 = super.read(bArr, i, i2); e = null; } catch (IOException e) { e = e; i3 = 0; } if (e != null) { noteError(e); } else if (i3 == -1) { noteFinished(); } else if (i3 > 0) { noteDataBytes(bArr, i, i3); } return i3; } /* access modifiers changed from: protected */ public void noteDataBytes(byte[] bArr, int i, int i2) throws IOException { for (Observer data : getObservers()) { data.data(bArr, i, i2); } } /* access modifiers changed from: protected */ public void noteFinished() throws IOException { for (Observer finished : getObservers()) { finished.finished(); } } /* access modifiers changed from: protected */ public void noteDataByte(int i) throws IOException { for (Observer data : getObservers()) { data.data(i); } } /* access modifiers changed from: protected */ public void noteError(IOException iOException) throws IOException { for (Observer error : getObservers()) { error.error(iOException); } } /* access modifiers changed from: protected */ public void noteClosed() throws IOException { for (Observer closed : getObservers()) { closed.closed(); } } /* access modifiers changed from: protected */ public List<Observer> getObservers() { return this.observers; } public void close() throws IOException { try { super.close(); e = null; } catch (IOException e) { e = e; } if (e == null) { noteClosed(); } else { noteError(e); } } public void consume() throws IOException { do { } while (read(new byte[8192]) != -1); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
cdc0caae0ecea660a6f9993992687e6687e79e8c
93e4a334b3559dfcff2843d271396c5b0f66815a
/src/main/java/com/gargoylesoftware/htmlunit/svg/SvgCircle.java
2996f77dc2b40b0475aa29d37a8d5bb50646b0f0
[ "Apache-2.0" ]
permissive
sudami/htmlunit-android
39e5074150911327cfc4d406dd2922341333ea64
9032c4c667d7db9f7b444658f7acb0b15b998d97
refs/heads/master
2021-09-10T17:03:38.493362
2018-03-29T21:58:57
2018-03-29T21:58:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,516
java
/* * Copyright (c) 2002-2017 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.svg; import java.util.Map; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.html.DomAttr; /** * Wrapper for the SVG element "circle". * * @author Ahmed Ashour */ public class SvgCircle extends SvgElement { /** The tag represented by this element. */ public static final String TAG_NAME = "circle"; /** * Creates a new instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ SvgCircle(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); } }
[ "sermojohn@gmail.com" ]
sermojohn@gmail.com
e4007487e03db9a7b439487341d9e02861538cbe
edf4f46f7b473ce341ba292f84e3d1760218ebd1
/third_party/android/platform-libcore/android-platform-libcore/luni/src/test/java/org/apache/harmony/nio/tests/java/nio/DuplicateWrappedByteBufferTest.java
ce15ff4dfeb2140588811cbb25da94ef539e7893
[ "LicenseRef-scancode-proprietary-license", "Apache-2.0", "LicenseRef-scancode-unicode", "MIT", "ICU", "W3C", "CPL-1.0", "W3C-19980720", "LicenseRef-scancode-newlib-historical", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-generic-cla" ]
permissive
openweave/openweave-core
7e7e6f6c089e2e8015a8281f74fbdcaf4aca5d2a
e3c8ca3d416a2e1687d6f5b7cec0b7d0bf1e590e
refs/heads/master
2022-11-01T17:21:59.964473
2022-08-10T16:36:19
2022-08-10T16:36:19
101,915,019
263
125
Apache-2.0
2022-10-17T18:48:30
2017-08-30T18:22:10
C++
UTF-8
Java
false
false
1,226
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.harmony.nio.tests.java.nio; import dalvik.annotation.TestTargetClass; @TestTargetClass(java.nio.ByteBuffer.class) public class DuplicateWrappedByteBufferTest extends WrappedByteBufferTest { protected void setUp() throws Exception { super.setUp(); buf = buf.duplicate(); baseBuf = buf; } protected void tearDown() throws Exception { super.tearDown(); } }
[ "rszewczyk@nestlabs.com" ]
rszewczyk@nestlabs.com
ab34ece584fd99e43f6a7a406829e84965fe44c3
716f1806596b93c3737f2de3e69c2b0a8053c8ca
/src/com/gm/hrsystem/dao/impl/PaymentDaoH4.java
05c9855be0eb93ae03e7f29dad649a6f1a9a0529
[]
no_license
gongmi/HRSystem
3d81b8c6ea1fda316f6acec6b6e91fbfc2e78405
3d9f2a94490e46a555e8bb6cf8d24c885f704ebb
refs/heads/master
2021-01-15T14:19:47.933838
2017-08-08T12:17:45
2017-08-08T12:17:45
99,689,054
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
package com.gm.hrsystem.dao.impl; import java.util.List; import org.springframework.stereotype.Component; import com.gm.common.dao.impl.BaseDaoHibernate4; import com.gm.hrsystem.dao.*; import com.gm.hrsystem.domain.*; @Component(value="payDao") public class PaymentDaoH4 extends BaseDaoHibernate4<Payment> implements PaymentDao { @Override public Payment findByEmpAndMonth(Employee emp, String month) { List<Payment> payment = find( "from Payment p where p.employee=?0 and p.payMonth=?1", emp, month); if (payment == null) return null; else return payment.get(0); } @Override public List<Payment> findByEmp(Employee emp) { return find("from Payment p where p.employee=?0", emp); } }
[ "450989123@qq.com" ]
450989123@qq.com
1dc4f06a44196093d7cc666db642766b26c81706
f9b9b154b2e3f89af48b2844ae8147dd5a997f06
/src/atcoder/ABC039/ABC039C.java
cf68067149663913c4e0a0b53ea7812c58f90918
[]
no_license
YutaNishino/competitive_programming
610116fb2d6b3bc32c4e3a33defc5ba948e1a7d4
bc01870c3ce47f04b77cd9add5d03f2746f1c7fd
refs/heads/master
2018-09-10T09:37:45.656683
2018-06-23T11:55:33
2018-06-23T11:55:33
119,142,962
0
0
null
null
null
null
UTF-8
Java
false
false
2,098
java
package atcoder.ABC039; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class ABC039C { String s; public static void main(String args[]) { new ABC039C().run(); } void run() { FastReader sc = new FastReader(); s = sc.next(); solve(); } void solve() { String ans = ""; if (s.startsWith("WBWBWWBWBWB")) { ans = "Do"; } else if (s.startsWith("WBWWBWBWBWW")) { ans = "Re"; } else if (s.startsWith("WWBWBWBWW")) { ans = "Mi"; } else if (s.startsWith("WBWBWBWW")) { ans = "Fa"; } else if (s.startsWith("WBWBWWBWBWW")) { ans = "So"; } else if (s.startsWith("WBWWBWBWW")) { ans = "La"; } else { ans = "Si"; } System.out.println(ans); } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ "ynishino.omoikane@gmail.com" ]
ynishino.omoikane@gmail.com
1daab5c9fc5b139f52807c03803848f6c19dbda9
6bf826e205752cd346fa4dc364da58ed20df8734
/intermediate-project/OnlineProfileUpdation/src/main/java/com/vilas/fullstackjava/repository/UserDetailsRepository.java
c5c13d8028876962e800a3891cdd60cfc17a2e55
[]
no_license
vilasvarghese/JavaFullStack
a73dcd3dcee5e6d201b069537aa114434da994f7
6600a64075cfd2757e067fa784914839ecf6746d
refs/heads/master
2023-06-06T08:36:44.397707
2021-06-16T23:09:34
2021-06-16T23:09:34
336,170,566
0
1
null
null
null
null
UTF-8
Java
false
false
536
java
package com.vilas.fullstackjava.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.vilas.fullstackjava.entity.UserDetails; /** * User Details Repository to perform the database operations * on user_details table * * @author vilas * @version 2.0 * @since 2018-06-05 */ @Repository public interface UserDetailsRepository extends JpaRepository<UserDetails, String> { UserDetails findByUserIdAndPassword(String userId, String password); }
[ "vilas.varghese@gmail.com" ]
vilas.varghese@gmail.com
d1a6af27c6221028ff24231a2960b136763a7270
15f15808fc58eafb35d2e3935a6e1f05aabce2ee
/api/src/test/java/org/apache/maven/plugin/event/api/EventBuilder.java
ba4a3d56d6cf0cedb97a67a927a2ce652206f049
[ "Apache-2.0" ]
permissive
born2snipe/maven-plugin-build-listener
db2cea3045828832e99e7ac25b582e6faedb3699
56854281050cc67bbab59f21fbfcd9e9f2e0417f
refs/heads/master
2020-12-24T17:45:14.851132
2012-12-08T03:26:35
2012-12-08T03:26:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,210
java
/** * * Copyright to 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.apache.maven.plugin.event.api; import org.apache.maven.execution.ExecutionEvent; import org.apache.maven.plugin.logging.Log; import org.apache.maven.project.MavenProject; import java.util.Properties; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class EventBuilder { private MavenSessionBuilder sessionBuilder = new MavenSessionBuilder(); private Log log = mock(Log.class); private Properties listenerProperties = new Properties(); public BuildListener.Event toEvent() { ExecutionEvent event = mock(ExecutionEvent.class); when(event.getSession()).thenReturn(sessionBuilder.toSession()); return new BuildListener.Event(event, listenerProperties, log); } public EventBuilder expectLog(Log log) { this.log = log; return this; } public EventBuilder expectProperty(String name, String value) { listenerProperties.put(name, value); return this; } public EventBuilder expectProjects(MavenProject... projects) { sessionBuilder.expectProjects(projects); return this; } public EventBuilder expectToFail(MavenProject... projects) { for (MavenProject project : projects) { sessionBuilder.expectToFail(project); } return this; } public EventBuilder expectToPass(MavenProject... projects) { for (MavenProject project : projects) { sessionBuilder.expectToPass(project); } return this; } }
[ "born2snipe@gmail.com" ]
born2snipe@gmail.com
aa129026feabbfddbe029e26a2c3fdb76f9f5077
159d7ba6968d3d3ea2decce92cb48aa9170221ff
/src/main/java/com/thingtek/beanServiceDao/point/dao/PointDao.java
68a10b873280ab2f7b85186480112879f2855f00
[]
no_license
chosoma/TheUnknowServerClient20181115
7028668d1a291930955e24224ebeaac158c24822
8748ace12cddd48500c37519a64205dbac3ce1eb
refs/heads/master
2020-04-20T05:41:16.595375
2019-02-01T07:57:05
2019-02-01T07:57:05
168,662,281
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package com.thingtek.beanServiceDao.point.dao; import com.thingtek.beanServiceDao.point.entity.PointBean; import com.thingtek.beanServiceDao.user.entity.UserBean; import java.util.List; public interface PointDao { List<PointBean> findAll() throws Exception; }
[ "446717806@qq.com" ]
446717806@qq.com
e8b5eed2c2a9e57fac1c489dfdff5c5c013da0f8
7c14e265e975cb0a714a385a896b106fd136eabb
/src/test/java/com/ynz/pdf/extractpdf/parser/ARKInvestmentParserTest.java
c0854b79a58c7242be7478640524275fd5dc5490
[]
no_license
yichunzhao/extract-pdf
cb899cbf4f2f1d70329c776b54a214ef25486650
d44e6311790ee5e24d1050aa5fae42d3003f5071
refs/heads/master
2023-02-07T22:01:58.620895
2020-12-28T22:44:48
2020-12-28T22:44:48
320,938,654
0
0
null
null
null
null
UTF-8
Java
false
false
3,323
java
package com.ynz.pdf.extractpdf.parser; import com.ynz.pdf.extractpdf.model.ARKDataModel; import org.junit.jupiter.api.Test; import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.api.Assertions.assertAll; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; class ARKInvestmentParserTest { private ARKInvestmentParser parser = new ARKInvestmentParser(); @Test void parse() { } @Test void givenLineWithCompletedStates_ParserCanFillALLAttributes() { String line = "9/14/2020 Sell CBMG $18.39 $18.16 $18.49 $18.38 $18.38"; parser.processLine(line); ARKDataModel model = parser.getModel(); assertAll( () -> assertThat(model.getDate(), is("9/14/2020")), () -> assertThat(model.getDirection(), is("Sell")), () -> assertThat(model.getTicker(), is("CBMG")), () -> assertThat(model.getPrice(), is("$18.39")), () -> assertThat(model.getLowPrice(), is("$18.16")), () -> assertThat(model.getHighPrice(), is("$18.49")), () -> assertThat(model.getClosingPrice(), is("$18.38")), () -> assertThat(model.getRecentMarketPrice(), is("$18.38")) ); } @Test void givenCompleteARKReportLine_DetermineIfValid() { String target = "9/14/2020 Sell CBMG $18.39 $18.16 $18.49 $18.38 $18.38"; assertTrue(parser.isValidLine(target)); } @Test void givenIncompleteARKReportLine_DetermineInvalid() { String target = "9/15/2020"; assertFalse(parser.isValidLine(target)); } @Test void givenNotARKReportLine_DetermineInvalid() { String target = "Page 5 of 86\n"; assertFalse(parser.isValidLine(target)); } @Test void givenReportLines_ParserDetermines() { String lines = "Recent Market Price\r\n" + "Date Direction Ticker Price Low Price High Price Closing Price Last Price As of \r\n" + "9/15/2020\r\n" + "9/14/2020 Sell CBMG $18.39 $18.16 $18.49 $18.38 $18.38\r\n" + "9/14/2020 Buy EXAS $77.79 $76.75 $79.14 $77.60 $77.60\r\n"; List<ARKDataModel> models = parser.parse(lines); assertAll( () -> assertThat(models, hasSize(2)), () -> assertThat(models.get(0).getDate(), is("9/14/2020")), () -> assertThat(models.get(1).getDirection(), is("Buy")) ); } @Test void givenSpecificReportLine_ParseDetermine() { String lines = "9/10/2020 Buy WDI GR $0.91 $0.89 $0.95 $0.91 $0.91\r\n" + "9/10/2020 Buy 6060 HK $45.17 $43.40 $45.60 $43.40 $43.40\r\n" + "9/10/2020 Buy 9923 HK $48.77 $47.50 $49.50 $48.30 $48.30\r\n"; List<ARKDataModel> models = parser.parse(lines); assertAll( () -> assertThat(models, hasSize(3)), () -> assertThat(models.get(0).getDate(), is("9/10/2020")), () -> assertThat(models.get(1).getDirection(), is("Buy")) ); } }
[ "zhaoyichun@hotmail.com" ]
zhaoyichun@hotmail.com
6b82c305c39ca77a213ac5a933899d37b59778e7
7363ecce70cefcb089a9ea6574e5a6ad04eda7eb
/src/main/java/at/favre/lib/crypto/HkdfMacFactory.java
7855f3ebd2012b0505725673a946cd4a84a14f08
[ "Apache-2.0" ]
permissive
sudhakarvenkatesh/hkdf
397604a8504e0f7ff803319f1810d9d3ed510536
0fcbf0bb654e00ffcf0815a13a73597ca41eb9ec
refs/heads/master
2020-04-20T01:57:41.049536
2019-01-26T20:02:31
2019-01-26T20:02:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,839
java
/* * Copyright 2017 Patrick Favre-Bulle * * 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 at.favre.lib.crypto; import javax.crypto.Mac; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import java.security.Key; import java.security.NoSuchAlgorithmException; import java.security.Provider; /** * Factory class for creating {@link Mac} hashers */ public interface HkdfMacFactory { /** * Creates a new instance of Hmac with given key, i.e. it must already be initialized * with {@link Mac#init(Key)}. * * @param key the key used, must not be null * @return a new mac instance */ Mac createInstance(byte[] key); /** * Default implementation */ @SuppressWarnings("WeakerAccess") final class Default implements HkdfMacFactory { private final String macAlgorithmName; private final Provider provider; /** * Creates a factory creating HMAC with SHA-256 * * @return factory */ public static HkdfMacFactory hmacSha256() { return new Default("HmacSHA256", null); } /** * Creates a factory creating HMAC with SHA-512 * * @return factory */ public static HkdfMacFactory hmacSha512() { return new Default("HmacSHA512", null); } /** * Creates a factory creating HMAC with SHA-1 * * @return factory * @deprecated sha1 with HMAC should be fine, but not recommended for new protocols; see https://crypto.stackexchange.com/questions/26510/why-is-hmac-sha1-still-considered-secure */ @Deprecated public static HkdfMacFactory hmacSha1() { return new Default("HmacSHA1", null); } /** * Creates a mac factory * * @param macAlgorithmName as used by {@link Mac#getInstance(String)} */ public Default(String macAlgorithmName) { this(macAlgorithmName, null); } /** * Creates a mac factory * * @param macAlgorithmName as used by {@link Mac#getInstance(String)} * @param provider what security provider, see {@link Mac#getInstance(String, Provider)}; may be null to use default */ public Default(String macAlgorithmName, Provider provider) { this.macAlgorithmName = macAlgorithmName; this.provider = provider; } @Override public Mac createInstance(byte[] key) { try { SecretKey secretKey = new SecretKeySpec(key, macAlgorithmName); Mac hmacInstance; if (provider == null) { hmacInstance = Mac.getInstance(macAlgorithmName); } else { hmacInstance = Mac.getInstance(macAlgorithmName, provider); } hmacInstance.init(secretKey); return hmacInstance; } catch (NoSuchAlgorithmException e) { throw new IllegalStateException("defined mac algorithm was not found", e); } catch (Exception e) { throw new IllegalStateException("could not make hmac hasher in hkdf", e); } } } }
[ "patrick.favrebulle@gmail.com" ]
patrick.favrebulle@gmail.com
e1624681604df4e15e198024ab7003fc5cf72564
25f7be2a13a2648a7150a6d6538806ae0eed22bd
/aliyun-java-sdk-cdn/src/main/java/com/aliyuncs/cdn/model/v20141111/BatchSetCdnDomainConfigRequest.java
25f2ebbcfdb906d70d38299b532f911b9bbd848c
[ "Apache-2.0" ]
permissive
llCnll/aliyun-openapi-java-sdk
4d5ddb34e672a4188cdfe7dc1463b5d89e26569c
6400549026014f1ffc2ffd22b7f29c29b37cccc6
refs/heads/master
2020-04-22T02:53:28.836935
2019-01-31T08:31:36
2019-02-01T09:15:01
170,066,708
1
0
NOASSERTION
2019-02-11T04:16:11
2019-02-11T04:16:11
null
UTF-8
Java
false
false
2,372
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.cdn.model.v20141111; import com.aliyuncs.RpcAcsRequest; /** * @author auto create * @version */ public class BatchSetCdnDomainConfigRequest extends RpcAcsRequest<BatchSetCdnDomainConfigResponse> { public BatchSetCdnDomainConfigRequest() { super("Cdn", "2014-11-11", "BatchSetCdnDomainConfig"); } private String functions; private String securityToken; private String domainNames; private String ownerAccount; private Long ownerId; public String getFunctions() { return this.functions; } public void setFunctions(String functions) { this.functions = functions; if(functions != null){ putQueryParameter("Functions", functions); } } public String getSecurityToken() { return this.securityToken; } public void setSecurityToken(String securityToken) { this.securityToken = securityToken; if(securityToken != null){ putQueryParameter("SecurityToken", securityToken); } } public String getDomainNames() { return this.domainNames; } public void setDomainNames(String domainNames) { this.domainNames = domainNames; if(domainNames != null){ putQueryParameter("DomainNames", domainNames); } } public String getOwnerAccount() { return this.ownerAccount; } public void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; if(ownerAccount != null){ putQueryParameter("OwnerAccount", ownerAccount); } } public Long getOwnerId() { return this.ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; if(ownerId != null){ putQueryParameter("OwnerId", ownerId.toString()); } } @Override public Class<BatchSetCdnDomainConfigResponse> getResponseClass() { return BatchSetCdnDomainConfigResponse.class; } }
[ "yixiong.jxy@alibaba-inc.com" ]
yixiong.jxy@alibaba-inc.com
e7a4a0e4991fb216181a99bdded92ee30f59b222
104ace4eca68e903d5b5a21e7d4831c9342d9f6a
/Monitoring/MonitoringTool/PacketTracking/ipfix4java/ipfix-api/src/main/java/de/fhg/fokus/net/ipfix/model/ie/IpfixIeNotSentPacketTotalCount.java
4c9bf433d3d56e70590fe077c56f6cb09a86d3b8
[ "BSD-3-Clause" ]
permissive
vitorsfarias/novi-public
136c8822acaf1c34c42cdc07090fa3c41ad4113c
0932550a42ba1ca634225ccb3a4748336e69e022
refs/heads/master
2020-04-06T04:40:51.874424
2013-04-04T17:33:56
2013-04-04T17:33:56
68,409,912
0
0
null
null
null
null
UTF-8
Java
false
false
2,683
java
/** * * Copyright (c) 2012, NOVI Consortium, European FP7 NOVI Project * Copyright according to BSD License * For full text of the license see: ./novi/Software/Monitoring/MonitoringTool/PacketTracking/license.txt * * @author <a href="mailto:ramon.masek@fokus.fraunhofer.de">Ramon Masek</a>, Fraunhofer FOKUS * @author <a href="mailto:c.henke@tu-berlin.de">Christian Henke</a>, Technical University Berlin * @author <a href="mailto:carsten.schmoll@fokus.fraunhofer.de">Carsten Schmoll</a>, Fraunhofer FOKUS * @author <a href="mailto:Julian.Vetter@campus.tu-berlin.de">Julian Vetter</a>, Fraunhofer FOKUS * @author <a href="mailto:">Jens Krenzin</a>, Fraunhofer FOKUS * @author <a href="mailto:">Michael Gehring</a>, Fraunhofer FOKUS * @author <a href="mailto:">Tacio Grespan Santos</a>, Fraunhofer FOKUS * @author <a href="mailto:">Fabian Wolff</a>, Fraunhofer FOKUS * */ package de.fhg.fokus.net.ipfix.model.ie; import de.fhg.fokus.net.ipfix.api.IpfixFieldSpecifier; import de.fhg.fokus.net.ipfix.api.IpfixIe; import de.fhg.fokus.net.ipfix.api.IpfixIeSemantics; import de.fhg.fokus.net.ipfix.api.IpfixIeStatus; import de.fhg.fokus.net.ipfix.api.IpfixIeUnits; import de.fhg.fokus.net.ipfix.api.codec.IpfixIeCodecUnsigned64; /** * <pre> notSentPacketTotalCount:{ elementId:167, dataType:unsigned64, dataTypeSemantis:totalCounter, units:packets status:current en: 0 } </pre> * */ public final class IpfixIeNotSentPacketTotalCount extends IpfixIeCodecUnsigned64 implements IpfixIe { // -- model -- private final IpfixFieldSpecifier fieldSpecifier; @Override public IpfixFieldSpecifier getFieldSpecifier() { return fieldSpecifier; } public IpfixIeNotSentPacketTotalCount() { this.fieldSpecifier = new IpfixFieldSpecifier(0).setId(167) .setFieldLength(this.fieldLength); } public IpfixIeNotSentPacketTotalCount( int length ) { this.fieldLength = length; this.fieldSpecifier = new IpfixFieldSpecifier(0).setId(167) .setFieldLength(this.fieldLength); } public IpfixIeNotSentPacketTotalCount( int length, long enterpriseNumber, boolean isScope ) { this.fieldLength = length; this.fieldSpecifier = new IpfixFieldSpecifier(enterpriseNumber).setId(167) .setFieldLength(this.fieldLength).setScope(isScope); } @Override public IpfixIeSemantics getSemantics() { return IpfixIeSemantics.TOTALCOUNTER; } @Override public IpfixIeStatus getStatus() { return IpfixIeStatus.CURRENT; } @Override public String getName() { return "notSentPacketTotalCount"; } @Override public int getLength() { return fieldSpecifier.getIeLength(); } @Override public IpfixIeUnits getUnits() { return IpfixIeUnits.PACKETS; } }
[ "pikusa@man.poznan.pl" ]
pikusa@man.poznan.pl
4b0d57d7d67d93658be6c40b60c225d8e1a1ca32
7683e7c39ddaa3ee41dcd6070ee057cc3e224c3c
/src/test/java/com/fwtai/webflux/LauncherTests.java
c26f6ed69613bb1854531d50d27d07ba394a89b4
[]
no_license
gzstyp/webflux-r2dbc-mysql
ec4b447380e882d1dcee856578fd54297c312376
8a3c3a2e4a73a81c544b8e1c92bad34bfe5716de
refs/heads/master
2023-05-12T21:25:34.140952
2021-05-21T10:12:17
2021-05-21T10:12:17
369,490,295
0
0
null
null
null
null
UTF-8
Java
false
false
199
java
package com.fwtai.webflux; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class LauncherTests{ @Test void contextLoads() { } }
[ "444141300@qq.com" ]
444141300@qq.com
993a6e0cbc89281d37a1863a63f4f1134326b81f
c68686e1277ba97c6ffcc18acb2af5e10e9b50ac
/Tmall_demo/src/main/java/com/xq/tmall/service/PropertyValueService.java
c2d882e37e16464f28c2cd393dbfaaf112fbc31c
[ "LicenseRef-scancode-mulanpsl-1.0-en", "MulanPSL-1.0", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
cjeanGitHub/exercies
e9e3e705f915e44c727875b61e2d1a48b86b8765
44db3df4333dce0bdbb0e3c534e3c306d8b21061
refs/heads/master
2022-12-23T00:28:40.796680
2020-02-02T15:51:48
2020-02-02T15:51:48
218,790,416
1
1
Apache-2.0
2022-12-16T08:52:10
2019-10-31T14:52:09
Java
UTF-8
Java
false
false
570
java
package com.xq.tmall.service; import com.xq.tmall.entity.PropertyValue; import com.xq.tmall.util.PageUtil; import java.util.List; public interface PropertyValueService { boolean add(PropertyValue propertyValue); boolean addList(List<PropertyValue> propertyValueList); boolean update(PropertyValue propertyValue); boolean deleteList(Integer[] propertyValue_id_list); List<PropertyValue> getList(PropertyValue propertyValue, PageUtil pageUtil); PropertyValue get(Integer propertyValue_id); Integer getTotal(PropertyValue propertyValue); }
[ "1417261875@qq.com" ]
1417261875@qq.com
ae3988d79e4968739df2e52a7f1d4d361534db72
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_1647b823a8c74f3e1dce820d53fd3888961ce736/RubyPlugin/11_1647b823a8c74f3e1dce820d53fd3888961ce736_RubyPlugin_t.java
885c834f015995a339cec72be79ff4c39f37f236
[]
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,998
java
package org.eclipse.dltk.ruby.core; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Plugin; import org.eclipse.core.runtime.Status; import org.eclipse.dltk.core.DLTKCore; import org.eclipse.dltk.ruby.internal.parser.mixin.RubyMixinModel; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class RubyPlugin extends Plugin { // The plug-in ID public static final String PLUGIN_ID = "org.eclipse.dltk.ruby.core"; public static final boolean DUMP_EXCEPTIONS_TO_CONSOLE = Boolean.valueOf( Platform.getDebugOption("org.eclipse.dltk.ruby.core/dumpErrorsToConsole")) .booleanValue(); // The shared instance private static RubyPlugin plugin; /** * The constructor */ public RubyPlugin() { plugin = this; } /* * (non-Javadoc) * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); } /* * (non-Javadoc) * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); RubyMixinModel.getRawInstance().stop(); } /** * Returns the shared instance * * @return the shared instance */ public static RubyPlugin getDefault() { return plugin; } public static void log(Exception ex) { if (DLTKCore.DEBUG || DUMP_EXCEPTIONS_TO_CONSOLE) ex.printStackTrace(); String message = ex.getMessage(); if (message == null) message = "(no message)"; getDefault().getLog().log(new Status(Status.ERROR, PLUGIN_ID, 0, message, ex)); } public static void log(String message) { if (DLTKCore.DEBUG || DUMP_EXCEPTIONS_TO_CONSOLE) System.out.println(message); getDefault().getLog().log(new Status(Status.WARNING, PLUGIN_ID, 0, message, null)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
75049c2be87794b84fec4fdd2473439538be88ab
fb40144fea6b68b672721937ef116ab56a63b232
/fluentlenium-core/src/test/java/org/fluentlenium/core/action/FillSelectTest.java
1448069ea1d6ebca373ebb1a3e919137319d38e2
[ "Apache-2.0" ]
permissive
PascalSchumacher/FluentLenium
d159be4779984b388caa2817c883909eaf504026
3afb6668d41a4d8b4ddab7641116834723e68db6
refs/heads/master
2021-01-14T14:11:25.747029
2016-08-16T07:38:30
2016-08-16T07:38:30
65,938,029
0
0
null
2016-08-17T20:03:07
2016-08-17T20:03:07
null
UTF-8
Java
false
false
5,411
java
package org.fluentlenium.core.action; import org.assertj.core.api.Assertions; import org.assertj.core.api.ThrowableAssert; import org.fluentlenium.adapter.FluentAdapter; import org.fluentlenium.core.FluentDriver; import org.fluentlenium.core.domain.FluentListImpl; import org.fluentlenium.core.domain.FluentWebElement; import org.fluentlenium.core.search.SearchControl; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import java.util.Arrays; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; public class FillSelectTest { @Mock private WebDriver driver; @Mock private SearchControl search; @Mock private WebElement element1; @Mock private WebElement element2; @Mock private WebElement element3; @Mock private WebElement element4; @Before public void before() { MockitoAnnotations.initMocks(this); when(element1.getTagName()).thenReturn("select"); when(element2.getTagName()).thenReturn("span"); when(element3.getTagName()).thenReturn("select"); when(element4.getTagName()).thenReturn("select"); } @After public void after() { reset(driver, search, element1, element2, element3, element4); } @Test public void testFillCss() { FluentListImpl<FluentWebElement> list = new FluentListImpl<>(Arrays.asList(new FluentWebElement(element1), new FluentWebElement(element2), new FluentWebElement(element3), new FluentWebElement(element4))); final FillSelect fillConstructor = new FillSelect(list); WebElement option1 = mock(WebElement.class); WebElement option2 = mock(WebElement.class); WebElement option3 = mock(WebElement.class); WebElement option4 = mock(WebElement.class); when(element1.findElements(any(By.class))).thenReturn(Arrays.asList(option1)); when(element2.findElements(any(By.class))).thenReturn(Arrays.asList(option2)); when(element3.findElements(any(By.class))).thenReturn(Arrays.asList(option3)); when(element4.findElements(any(By.class))).thenReturn(Arrays.asList(option4)); when(option1.getAttribute("index")).thenReturn("1"); when(option3.getAttribute("index")).thenReturn("1"); when(option4.getAttribute("index")).thenReturn("2"); fillConstructor.withIndex(1); verify(option1).click(); verify(option2, never()).click(); verify(option3).click(); verify(option4, never()).click(); Assertions.assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() throws Throwable { fillConstructor.withIndex(5); } }).isExactlyInstanceOf(NoSuchElementException.class).withFailMessage("No select element found with option index=5"); } @Test public void testFillList() { FluentListImpl<FluentWebElement> list = new FluentListImpl<>(Arrays.asList(new FluentWebElement(element1), new FluentWebElement(element2), new FluentWebElement(element3), new FluentWebElement(element4))); FillSelect fillConstructor = new FillSelect(list); WebElement option1 = mock(WebElement.class); WebElement option2 = mock(WebElement.class); WebElement option3 = mock(WebElement.class); WebElement option4 = mock(WebElement.class); when(element1.findElements(any(By.class))).thenReturn(Arrays.asList(option1)); when(element2.findElements(any(By.class))).thenReturn(Arrays.asList(option2)); when(element3.findElements(any(By.class))).thenReturn(Arrays.asList(option3)); when(element4.findElements(any(By.class))).thenReturn(Arrays.asList(option4)); fillConstructor.withText("text"); verify(option1).click(); verify(option2, never()).click(); verify(option3).click(); verify(option4).click(); Assertions.assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() throws Throwable { new FillSelect(new FluentListImpl<FluentWebElement>()).withText("text"); } }).isExactlyInstanceOf(NoSuchElementException.class).withFailMessage("No select element found"); } @Test public void testFillElement() { FillSelect fillConstructor = new FillSelect(new FluentWebElement(element1)); WebElement option1 = mock(WebElement.class); when(element1.findElements(any(By.class))).thenReturn(Arrays.asList(option1)); fillConstructor.withValue("1"); verify(option1).click(); Assertions.assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() throws Throwable { new FillSelect(new FluentListImpl<FluentWebElement>()).withValue("1"); } }).isExactlyInstanceOf(NoSuchElementException.class).withFailMessage("No select element found"); } }
[ "toilal.dev@gmail.com" ]
toilal.dev@gmail.com
d55a333a8d835f3424e4177e0be1ce3a26f2f714
a3f08254f48839cc469d48fe35f7dc754782a0e0
/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/FulfillmentInfoUrl.java
191df104abe58f168adf130eb90329d657ac0301
[ "MIT" ]
permissive
lsendel/mozu-java
baea9a43a407ced0e2ead50fda17b7212b8eb835
e72f5efa96d53e6b1e851f1dd6c9fced67101da6
refs/heads/master
2021-01-16T22:04:59.657160
2014-08-22T14:44:10
2014-08-22T14:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,388
java
/** * This code was auto-generated by a Codezu. * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. */ package com.mozu.api.urls.commerce.orders; import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; public class FulfillmentInfoUrl { /** * Get Resource Url for GetFulfillmentInfo * @param draft If true, retrieve the draft version of the order's fulfillment information, which might include uncommitted changes. * @param orderId Unique identifier of the order. * @return String Resource Url */ public static MozuUrl getFulfillmentInfoUrl(Boolean draft, String orderId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/fulfillmentinfo?draft={draft}"); formatter.formatUrl("draft", draft); formatter.formatUrl("orderId", orderId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } /** * Get Resource Url for SetFulFillmentInfo * @param orderId Unique identifier of the order. * @param updateMode Specifies whether to set the fulfillment information by updating the original order, updating the order in draft mode, or updating the order in draft mode and then committing the changes to the original. Draft mode enables users to make incremental order changes before committing the changes to the original order. Valid values are "ApplyToOriginal," "ApplyToDraft," or "ApplyAndCommit." * @param version System-supplied integer that represents the current version of the order, which prevents users from unintentionally overriding changes to the order. When a user performs an operation for a defined order, the system validates that the version of the updated order matches the version of the order on the server. After the operation completes successfully, the system increments the version number by one. * @return String Resource Url */ public static MozuUrl setFulFillmentInfoUrl(String orderId, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/fulfillmentinfo?updatemode={updateMode}&version={version}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("updateMode", updateMode); formatter.formatUrl("version", version); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } }
[ "bob_hewett@volusion.com" ]
bob_hewett@volusion.com
00865e7c0416aa31f7c60b800d0086aa4ea634ac
cd00093e4b5e5682ed23615faa52742dd807382c
/kie-api/src/main/java/org/kie/api/runtime/Channel.java
35bd79cb93dc41c2b0075e9095656161a3994086
[ "Apache-2.0" ]
permissive
okacky/droolsjbpm-knowledge
17b77f7acb1f21faa62d23b7351671b53e1483f5
4aa425b40e4b73da57b55490ba7cc32c8a2b7542
refs/heads/master
2021-01-18T06:35:19.154727
2015-11-19T15:02:06
2015-11-19T16:19:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,381
java
/* * Copyright 2010 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.api.runtime; /** * <p> * A channel provides a mechanism to send objects from the working memory to some external process * or function. For instance, a channel can be used to inform some piece of code that an object * matches a rule. * </p> * * <p> * To create a channel, implement the interface and register it with the KnowledgeRuntime: * </p> * <pre> * ... * ksession.registerChannel("my-channel", new MyChannelImpl()); * </pre> * * <p> * Channels are invoked from the consequence side of a rule: * </p> * <pre> * when * ... * then * channels["my-channel"].send(...); * </pre> */ public interface Channel { /** * Sends the given object to this channel. * * @param object */ void send(Object object); }
[ "gds.geoffrey.de.smet@gmail.com" ]
gds.geoffrey.de.smet@gmail.com
2758d8bf0ff35ce082325e215133c2fe625f1ceb
f1058222053e03e1047f166896f4b1214863c200
/src/main/java/fr/strykerz/kelaxfaction/block/BlockAntesFlowerStage4.java
37bf521adbcf7a926237ad06fc095af05527111e
[]
no_license
JLSkyzer/KelaxFaction
fbf4392dfd0203f81ce99d2e19183087a4f32279
adb82217ce1e5975a36eb523d20eabcf00f9036a
refs/heads/master
2023-01-22T22:51:22.068704
2020-11-20T19:42:33
2020-11-20T19:42:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,817
java
package fr.strykerz.kelaxfaction.block; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraft.world.World; import net.minecraft.world.IBlockAccess; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.NonNullList; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemBlock; import net.minecraft.item.Item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.block.state.IBlockState; import net.minecraft.block.SoundType; import net.minecraft.block.BlockFlower; import net.minecraft.block.Block; import java.util.Random; import java.util.Map; import java.util.HashMap; import fr.strykerz.kelaxfaction.procedure.ProcedureAntesFlowerStage4UpdateTick; import fr.strykerz.kelaxfaction.item.ItemAntesSeed; import fr.strykerz.kelaxfaction.ElementsKelaxfactionofficialMod; @ElementsKelaxfactionofficialMod.ModElement.Tag public class BlockAntesFlowerStage4 extends ElementsKelaxfactionofficialMod.ModElement { @GameRegistry.ObjectHolder("kelaxfactionofficial:antes_flower_stage_4") public static final Block block = null; public BlockAntesFlowerStage4(ElementsKelaxfactionofficialMod instance) { super(instance, 23); } @Override public void initElements() { elements.blocks.add(() -> new BlockCustomFlower()); elements.items.add(() -> new ItemBlock(block).setRegistryName(block.getRegistryName())); } @SideOnly(Side.CLIENT) @Override public void registerModels(ModelRegistryEvent event) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation("kelaxfactionofficial:antes_flower_stage_4", "inventory")); } public static class BlockCustomFlower extends BlockFlower { public BlockCustomFlower() { setSoundType(SoundType.PLANT); setCreativeTab(null); setHardness(0F); setResistance(0F); setLightLevel(0F); setUnlocalizedName("antes_flower_stage_4"); setRegistryName("antes_flower_stage_4"); } @Override public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { drops.add(new ItemStack(ItemAntesSeed.block, (int) (1))); } @Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { return new ItemStack(ItemAntesSeed.block, (int) (1)); } @Override public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) { return EnumPlantType.Plains; } @Override public BlockFlower.EnumFlowerColor getBlockType() { return BlockFlower.EnumFlowerColor.YELLOW; } @SideOnly(Side.CLIENT) @Override public void getSubBlocks(CreativeTabs tab, net.minecraft.util.NonNullList<ItemStack> list) { for (BlockFlower.EnumFlowerType blockflower$enumflowertype : BlockFlower.EnumFlowerType.getTypes(this.getBlockType())) { list.add(new ItemStack(this, 1, blockflower$enumflowertype.getMeta())); } } @Override public void updateTick(World world, BlockPos pos, IBlockState state, Random random) { int x = pos.getX(); int y = pos.getY(); int z = pos.getZ(); { Map<String, Object> $_dependencies = new HashMap<>(); $_dependencies.put("x", x); $_dependencies.put("y", y); $_dependencies.put("z", z); $_dependencies.put("world", world); ProcedureAntesFlowerStage4UpdateTick.executeProcedure($_dependencies); } } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
0365e1ca4abe36c396a7f0630d49dc1d62c472bf
69be0bc7af8a0c5656c1540fe23c6e209d29a601
/src/battle/spells/offensive/Shock.java
fe00fa2e6a9169f4a3d5cc3f9f097588ec3c34af
[]
no_license
ABK7997/Ark-Original
65dfaf91eef153d7568e2750f6c19f25fd14d621
ba45d049b4f085b4ed5b5bb12f6a117229662eb1
refs/heads/master
2021-01-20T22:55:00.054467
2017-08-30T02:43:41
2017-08-30T02:43:41
101,829,177
0
0
null
null
null
null
UTF-8
Java
false
false
2,174
java
package battle.spells.offensive; import java.awt.Color; import java.awt.Graphics; import battle.Spell; import characters.Playable; import characters.Playable.STATE; import entity.mobs.enemies.Enemy; import entity.mobs.enemies.Enemy.STATES; public class Shock extends Spell { private int eRes; private int res; public Shock(Playable p) { this.p = p; x = w/2; y = 0; name = "Shock"; cost = 10; dmg = p.getMag() * 3; type = "Offensive"; description = "Strike one opponent with electricity; can cause Paralysis"; } public void attack(Enemy e) { this.e = e; dmg = p.getMag() * 3; dmg = (((dmg / e.getMagDef())) * e.getMagMod()) / 100; eRes = e.getRes(); p.setMP(-cost); animating = true; } public void animate(Graphics g) { anim++; g.setColor(Color.YELLOW); if (anim >= 32) { g.fillOval(x-40, y-40, 20, 20); g.fillOval(x-40, y-40, 20, 20); g.fillOval(x, y, 20, 20); } if (anim >= 82) { if (anim == 100) { int chance = random.nextInt(25); e.setHP(-dmg); e.setDP(dmg); e.changeState(STATES.HIT); if (chance + eRes < 30) { e.setParalyzed(true); e.setMessage("Paralyzed"); } } x += 8; y += 10; if (x > w) { x = w / 2; y = 0; animating = false; anim = 0; } } } public Shock(Enemy e) { this.e = e; x = w/2; y = 0; cost = 10; dmg = e.getMag() * 3; type = "Offensive"; } public void attack(Playable p) { this.p = p; dmg = e.getMag() * 3; dmg = (((dmg / p.getMagDef()) * p.getMagMod())) / 100; res = p.getRes(); e.setMP(-cost); animating = true; } public void animate2(Graphics g) { anim++; g.setColor(Color.YELLOW); if (anim >= 32) { g.fillOval(x+40, y-40, 20, 20); g.fillOval(x+40, y-40, 20, 20); g.fillOval(x, y, 20, 20); } if (anim >= 82) { if (anim == 100) { int chance = random.nextInt(25); p.setHP(-dmg); p.setDP(dmg); p.changeState(STATE.HIT); if (chance + res < 30) { p.setParalyzed(true); p.setMessage("Paralyzed"); } } x -= 8; y += 10; } if (anim > 132) { x = w / 2; y = 0; animating = false; anim = 0; } } }
[ "=" ]
=
99dc6a95369424288c2d0b4337a6c8fd37ed4be2
5a058e406600b514fd730e1efc8a15fc1fa7e84e
/src/main/java/de/kisner/jxhml/model/xml/jxhml/Type.java
304b6fb2b30c6bb428dfbee97439a38c69a56de9
[]
no_license
thorsten-k/jxhml
80687c7fd9029537c63779fdaf31df9c571a0d3b
4df27905d330e21ca733e8405136424cb12daef0
refs/heads/master
2023-08-06T09:42:26.424794
2023-07-31T06:49:43
2023-07-31T06:49:43
198,061,377
0
0
null
2022-11-11T11:00:25
2019-07-21T13:43:29
Java
UTF-8
Java
false
false
1,560
java
package de.kisner.jxhml.model.xml.jxhml; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;attribute name="code" type="{http://www.w3.org/2001/XMLSchema}string" /&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "type") public class Type implements Serializable { private final static long serialVersionUID = 1L; @XmlAttribute(name = "code") protected String code; /** * Gets the value of the code property. * * @return * possible object is * {@link String } * */ public String getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link String } * */ public void setCode(String value) { this.code = value; } public boolean isSetCode() { return (this.code!= null); } }
[ "t.kisner@web.de" ]
t.kisner@web.de
81dd4a4f9c90b6932e5d9946baf7d41f252a3b0f
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/domain/InsMktPreUseCouponDTO.java
63b62488783462d9dd601be913a881ff80b55a41
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,723
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 保险营销预核销权益 * * @author auto create * @since 1.0, 2016-10-26 17:43:38 */ public class InsMktPreUseCouponDTO extends AlipayObject { private static final long serialVersionUID = 3786766957421523344L; /** * 资产Id */ @ApiField("asset_id") private String assetId; /** * 权益id */ @ApiField("coupon_id") private String couponId; /** * 权益类型 */ @ApiField("coupon_type") private String couponType; /** * 权益值 */ @ApiField("coupon_value") private String couponValue; /** * 是否支持预核销 */ @ApiField("pre_use") private Boolean preUse; /** * 预核销失败原因 */ @ApiField("reason") private String reason; public String getAssetId() { return this.assetId; } public void setAssetId(String assetId) { this.assetId = assetId; } public String getCouponId() { return this.couponId; } public void setCouponId(String couponId) { this.couponId = couponId; } public String getCouponType() { return this.couponType; } public void setCouponType(String couponType) { this.couponType = couponType; } public String getCouponValue() { return this.couponValue; } public void setCouponValue(String couponValue) { this.couponValue = couponValue; } public Boolean getPreUse() { return this.preUse; } public void setPreUse(Boolean preUse) { this.preUse = preUse; } public String getReason() { return this.reason; } public void setReason(String reason) { this.reason = reason; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
16044b101da471cfafcb1447882839ae34d682f2
c22f661a9698de8a8c1dc15c3d0d6b8292c5d2f1
/demo-app/src/main/java/com/sincetimes/website/app/security/vo/redis/UserProvider.java
5b0f5f243655f4197244df557fcba765c6d2a271
[]
no_license
blameswood/demo
0a0fa8d93c775c1fd34d93206607b206fba7c96e
2edae947e982fc883ed9bb60b753c5d3d59795e3
refs/heads/master
2021-01-19T04:28:43.854630
2017-04-02T08:08:20
2017-04-02T08:08:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package com.sincetimes.website.app.security.vo.redis; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; import org.springframework.stereotype.Component; import com.sincetimes.website.app.security.vo.UserVO; import com.sincetimes.website.core.spring.manger.SpringManager; import com.sincetimes.website.redis.jedis.interfaces.JedisWrapper; import com.sincetimes.website.redis.jedis.spring.JedisWrapperBase; /*** * sorted set<name,0> * dict <id, user>可用dict id,hash>扩展 * <br> */ @Component public class UserProvider extends JedisWrapperBase{ private static final String USERS_SET = "users^set"; private static final String USER_LATEST_ID_KEY = "users_latest_id";//用户自增ID键 public static UserProvider inst() { return SpringManager.inst().getBean(UserProvider.class); } public void saveOrUpdateUser(UserVO user) { zadd(USERS_SET, 0, user.getName()); set(user.getName(), user.toJSONString()); } public UserVO getUserByName(String name) { String json= get(name); return UserVO.parseObject(json, UserVO.class); } /** * @see JedisWrapper#zcard */ public Long getUsersNum(){ return zcard(USERS_SET); } public Map<String, UserVO> getAllUsers() { Set<String> _set = zrange(USERS_SET, 0, -1); return _set.stream() .map(this::getUserByName) .filter(Objects::nonNull) .collect(Collectors.toMap(UserVO::getName, Function.identity())); } public void deleteUser(String name) { zrem(USERS_SET, name); del(name); } public Boolean existUserByName(String name) { return exist(name); } public Integer applyNewUserId() { return incr(USER_LATEST_ID_KEY).intValue(); } }
[ "346126185@qq.com" ]
346126185@qq.com
e1f2a747e6e467e3c1204c5debfb81bcb735c70d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_a24a2e33329b592a856ab1f9ff126da063c54803/Animation/6_a24a2e33329b592a856ab1f9ff126da063c54803_Animation_s.java
3a0921f5c82a1bd2e844cdc6b059e3f71e55ce9d
[]
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
7,213
java
/******************************************************************************* * Copyright 2011 See AUTHORS file. * * 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.badlogic.gdx.graphics.g2d; import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.utils.Array; /** <p> * An Animation stores a list of {@link TextureRegion}s representing an animated sequence, e.g. for running or jumping. Each * region of an Animation is called a key frame, multiple key frames make up the animation. * </p> * * @author mzechner */ public class Animation { public static final int NORMAL = 0; public static final int REVERSED = 1; public static final int LOOP = 2; public static final int LOOP_REVERSED = 3; public static final int LOOP_PINGPONG = 4; public static final int LOOP_RANDOM = 5; final TextureRegion[] keyFrames; public final float frameDuration; public final float animationDuration; private int playMode = NORMAL; /** Constructor, storing the frame duration and key frames. * * @param frameDuration the time between frames in seconds. * @param keyFrames the {@link TextureRegion}s representing the frames. */ public Animation (float frameDuration, Array<? extends TextureRegion> keyFrames) { this.frameDuration = frameDuration; this.animationDuration = keyFrames.size * frameDuration; this.keyFrames = new TextureRegion[keyFrames.size]; for (int i = 0, n = keyFrames.size; i < n; i++) { this.keyFrames[i] = keyFrames.get(i); } this.playMode = NORMAL; } /** Constructor, storing the frame duration, key frames and play type. * * @param frameDuration the time between frames in seconds. * @param keyFrames the {@link TextureRegion}s representing the frames. * @param playType the type of animation play (NORMAL, REVERSED, LOOP, LOOP_REVERSED, LOOP_PINGPONG, LOOP_RANDOM) */ public Animation (float frameDuration, Array<? extends TextureRegion> keyFrames, int playType) { this.frameDuration = frameDuration; this.animationDuration = keyFrames.size * frameDuration; this.keyFrames = new TextureRegion[keyFrames.size]; for (int i = 0, n = keyFrames.size; i < n; i++) { this.keyFrames[i] = keyFrames.get(i); } this.playMode = playType; } /** Constructor, storing the frame duration and key frames. * * @param frameDuration the time between frames in seconds. * @param keyFrames the {@link TextureRegion}s representing the frames. */ public Animation (float frameDuration, TextureRegion... keyFrames) { this.frameDuration = frameDuration; this.animationDuration = keyFrames.length * frameDuration; this.keyFrames = keyFrames; this.playMode = NORMAL; } /** Returns a {@link TextureRegion} based on the so called state time. This is the amount of seconds an object has spent in the * state this Animation instance represents, e.g. running, jumping and so on. The mode specifies whether the animation is * looping or not. * * @param stateTime the time spent in the state represented by this animation. * @param looping whether the animation is looping or not. * @return the TextureRegion representing the frame of animation for the given state time. */ public TextureRegion getKeyFrame (float stateTime, boolean looping) { // we set the play mode by overriding the previous mode based on looping // parameter value if (looping && (playMode == NORMAL || playMode == REVERSED)) { if (playMode == NORMAL) playMode = LOOP; else playMode = LOOP_REVERSED; } else if (!looping && !(playMode == NORMAL || playMode == REVERSED)) { if (playMode == LOOP_REVERSED) playMode = REVERSED; else playMode = LOOP; } return getKeyFrame(stateTime); } /** Returns a {@link TextureRegion} based on the so called state time. This is the amount of seconds an object has spent in the * state this Animation instance represents, e.g. running, jumping and so on using the mode specified by * {@link #setPlayMode(int)} method. * * @param stateTime * @return the TextureRegion representing the frame of animation for the given state time. */ public TextureRegion getKeyFrame (float stateTime) { int frameNumber = getKeyFrameIndex (stateTime); return keyFrames[frameNumber]; } /** Returns the current frame number. * @param stateTime * @return current frame number */ public int getKeyFrameIndex (float stateTime) { int frameNumber = (int)(stateTime / frameDuration); if(keyFrames.length == 1) return 0; switch (playMode) { case NORMAL: frameNumber = Math.min(keyFrames.length - 1, frameNumber); break; case LOOP: frameNumber = frameNumber % keyFrames.length; break; case LOOP_PINGPONG: frameNumber = frameNumber % ((keyFrames.length * 2) - 2); if (frameNumber >= keyFrames.length) frameNumber = keyFrames.length - 2 - (frameNumber - keyFrames.length); break; case LOOP_RANDOM: frameNumber = MathUtils.random(keyFrames.length - 1); break; case REVERSED: frameNumber = Math.max(keyFrames.length - frameNumber - 1, 0); break; case LOOP_REVERSED: frameNumber = frameNumber % keyFrames.length; frameNumber = keyFrames.length - frameNumber - 1; break; default: // play normal otherwise frameNumber = Math.min(keyFrames.length - 1, frameNumber); break; } return frameNumber; } /** Returns the animation play mode. Will be one of the following: Animation.NORMAL, Animation.REVERSED, Animation.LOOP, * Animation.LOOP_REVERSED, Animation.LOOP_PINGPONG, Animation.LOOP_RANDOM */ public int getPlayMode() { return playMode; } /** Sets the animation play mode. * * @param playMode can be one of the following: Animation.NORMAL, Animation.REVERSED, Animation.LOOP, Animation.LOOP_REVERSED, * Animation.LOOP_PINGPONG, Animation.LOOP_RANDOM */ public void setPlayMode (int playMode) { this.playMode = playMode; } /** Whether the animation would be finished if played without looping (PlayMode Animation#NORMAL), given the state time. * @param stateTime * @return whether the animation is finished. */ public boolean isAnimationFinished (float stateTime) { int frameNumber = (int)(stateTime / frameDuration); return keyFrames.length - 1 < frameNumber; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
592621f18d2df5ddaf517ff230e7d2f3ac4b129a
85cfc652459ca2f015aa8c8dc55240721632cee0
/bin/custom/cartridge/cartridgefulfilmentprocess/src/com/hybris/cartridge/fulfilmentprocess/actions/consignment/ConfirmConsignmentPickupAction.java
3cdc5f0ba93a836c721fabd2800ba509f5b43c53
[]
no_license
varshadhamal/Hybris-test
43e5479b9909e41e6276dfde6b4f4ff1cdae9b0e
a29c6090680110ab733e2077772c9c477d497df6
refs/heads/master
2020-03-18T06:31:01.940494
2018-05-22T11:58:12
2018-05-22T11:58:12
134,400,503
0
1
null
null
null
null
UTF-8
Java
false
false
1,765
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 SAP SE or an SAP affiliate company. * All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package com.hybris.cartridge.fulfilmentprocess.actions.consignment; import de.hybris.platform.basecommerce.enums.ConsignmentStatus; import de.hybris.platform.ordersplitting.model.ConsignmentModel; import de.hybris.platform.ordersplitting.model.ConsignmentProcessModel; import de.hybris.platform.processengine.action.AbstractAction; import java.util.HashSet; import java.util.Set; import org.apache.log4j.Logger; public class ConfirmConsignmentPickupAction extends AbstractAction<ConsignmentProcessModel> { private static final Logger LOG = Logger.getLogger(ConfirmConsignmentPickupAction.class); public enum Transition { OK, CANCEL, ERROR; public static Set<String> getStringValues() { final Set<String> res = new HashSet<String>(); for (final Transition transition : Transition.values()) { res.add(transition.toString()); } return res; } } @Override public String execute(final ConsignmentProcessModel process) { final ConsignmentModel consignment = process.getConsignment(); if (consignment != null) { consignment.setStatus(ConsignmentStatus.PICKUP_COMPLETE); getModelService().save(consignment); return Transition.OK.toString(); } LOG.error("Process has no consignment"); return Transition.ERROR.toString(); } @Override public Set<String> getTransitions() { return Transition.getStringValues(); } }
[ "varsha.d.saste@accenture.com" ]
varsha.d.saste@accenture.com
f3db9a15d6b6de54e8211e02d9a4294fb5445fd1
fb00336ee1ade56389ac7b3bdd87c1c2713dc062
/shopwt/src/main/java/top/yokey/shopwt/view/slide/ActivityStackManager.java
0d04ff5d18e6bf33d0e38d9b42fa785e6e0e618d
[ "MIT" ]
permissive
jwillber/ShopWt-Android
db69861a280f923a009a8909be42c2db1f90ce25
1ef6b2a62d696c2dc8d59223d509a517f86979f8
refs/heads/master
2023-03-04T13:09:28.046966
2021-02-18T12:19:52
2021-02-18T12:19:52
340,042,030
0
0
null
null
null
null
UTF-8
Java
false
false
1,699
java
package top.yokey.shopwt.view.slide; import android.app.Activity; import java.util.LinkedList; /** * 滑动返回 * * @author MapleStory * @ qq 1002285057 * @ project https://gitee.com/MapStory/Shopwt-Android */ @SuppressWarnings("ALL") final class ActivityStackManager { private static LinkedList<Activity> mActivityStack = new LinkedList<>(); public static Activity getPreviousActivity(Activity curActivity) { final LinkedList<Activity> activities = mActivityStack; Activity preActivity = null; for (int cur = activities.size() - 1; cur >= 0; cur--) { Activity activity = activities.get(cur); if (activity == curActivity) { int pre = cur - 1; if (pre >= 0) { preActivity = activities.get(pre); } } } return preActivity; } public static synchronized void removeFromStack(Activity activity) { mActivityStack.remove(activity); } public static synchronized void addToStack(Activity activity) { mActivityStack.remove(activity); mActivityStack.add(activity); } public static synchronized void clearTask() { int size = mActivityStack.size(); if (size > 0) { Activity[] activities = new Activity[size]; mActivityStack.toArray(activities); for (Activity activity : activities) { activity.finish(); } } } public static synchronized Activity[] getActivityStack() { Activity[] activities = new Activity[mActivityStack.size()]; return mActivityStack.toArray(activities); } }
[ "1727143740@qq.com" ]
1727143740@qq.com
d914caca0ce333eccd6245b80f0e6f472c533315
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/protocal/c/mo.java
5a79ef3fdc5d8b48ab8f709726df767866f01367
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
5,683
java
package com.tencent.mm.protocal.c; import a.a.a.b; import a.a.a.c.a; import java.util.LinkedList; public final class mo extends avp { public String tkL; public atb tkR; public int tsV; public ss tsW; public gx tsX; protected final int a(int i, Object... objArr) { if (i == 0) { a aVar = (a) objArr[0]; if (this.tZe == null) { throw new b("Not all required fields were included: BaseResponse"); } else if (this.tkR == null) { throw new b("Not all required fields were included: qy_base_resp"); } else { if (this.tZe != null) { aVar.eQ(1, this.tZe.aUk()); this.tZe.a(aVar); } if (this.tkR != null) { aVar.eQ(2, this.tkR.aUk()); this.tkR.a(aVar); } if (this.tkL != null) { aVar.e(3, this.tkL); } aVar.eO(4, this.tsV); if (this.tsW != null) { aVar.eQ(5, this.tsW.aUk()); this.tsW.a(aVar); } if (this.tsX == null) { return 0; } aVar.eQ(6, this.tsX.aUk()); this.tsX.a(aVar); return 0; } } else if (i == 1) { if (this.tZe != null) { r0 = a.a.a.a.eN(1, this.tZe.aUk()) + 0; } else { r0 = 0; } if (this.tkR != null) { r0 += a.a.a.a.eN(2, this.tkR.aUk()); } if (this.tkL != null) { r0 += a.a.a.b.b.a.f(3, this.tkL); } r0 += a.a.a.a.eL(4, this.tsV); if (this.tsW != null) { r0 += a.a.a.a.eN(5, this.tsW.aUk()); } if (this.tsX != null) { r0 += a.a.a.a.eN(6, this.tsX.aUk()); } return r0; } else if (i == 2) { a.a.a.a.a aVar2 = new a.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (r0 = com.tencent.mm.bd.a.a(aVar2); r0 > 0; r0 = com.tencent.mm.bd.a.a(aVar2)) { if (!super.a(aVar2, this, r0)) { aVar2.cid(); } } if (this.tZe == null) { throw new b("Not all required fields were included: BaseResponse"); } else if (this.tkR != null) { return 0; } else { throw new b("Not all required fields were included: qy_base_resp"); } } else if (i != 3) { return -1; } else { a.a.a.a.a aVar3 = (a.a.a.a.a) objArr[0]; mo moVar = (mo) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); LinkedList En; int size; byte[] bArr; com.tencent.mm.bd.a enVar; a.a.a.a.a aVar4; boolean z; switch (intValue) { case 1: En = aVar3.En(intValue); size = En.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) En.get(intValue); enVar = new en(); aVar4 = new a.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = enVar.a(aVar4, enVar, com.tencent.mm.bd.a.a(aVar4))) { } moVar.tZe = enVar; } return 0; case 2: En = aVar3.En(intValue); size = En.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) En.get(intValue); enVar = new atb(); aVar4 = new a.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = enVar.a(aVar4, enVar, com.tencent.mm.bd.a.a(aVar4))) { } moVar.tkR = enVar; } return 0; case 3: moVar.tkL = aVar3.xmD.readString(); return 0; case 4: moVar.tsV = aVar3.xmD.mL(); return 0; case 5: En = aVar3.En(intValue); size = En.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) En.get(intValue); enVar = new ss(); aVar4 = new a.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = enVar.a(aVar4, enVar, com.tencent.mm.bd.a.a(aVar4))) { } moVar.tsW = enVar; } return 0; case 6: En = aVar3.En(intValue); size = En.size(); for (intValue = 0; intValue < size; intValue++) { bArr = (byte[]) En.get(intValue); enVar = new gx(); aVar4 = new a.a.a.a.a(bArr, unknownTagHandler); for (z = true; z; z = enVar.a(aVar4, enVar, com.tencent.mm.bd.a.a(aVar4))) { } moVar.tsX = enVar; } return 0; default: return -1; } } } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
a5f13f5abc07c663018695d2ff3efea62189ca38
9cc234a2f795cd7ac2c4146b99e0477faa3b61d7
/lightadmin-core/src/main/java/org/lightadmin/core/rest/binary/DeleteFileRestOperation.java
6b5da577177ad1dcf1dfb42679eb40c958b622d7
[ "Apache-2.0" ]
permissive
sundapeng/light-admin
59ef534754ad8c5b89f1da881e2a51ac1bcf0081
a9635de9d0bc3e8cb4c5de8ba0976eaf241a16ff
refs/heads/master
2021-01-18T13:21:49.870114
2013-10-01T14:18:57
2013-10-01T14:18:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,625
java
package org.lightadmin.core.rest.binary; import org.lightadmin.core.config.annotation.FileReference; import org.lightadmin.core.config.domain.GlobalAdministrationConfiguration; import org.lightadmin.core.context.WebContext; import org.lightadmin.core.persistence.metamodel.DomainTypeAttributeMetadata; import org.springframework.data.rest.repository.AttributeMetadata; import static org.apache.commons.io.FileUtils.deleteQuietly; public class DeleteFileRestOperation extends AbstractFileRestOperation { public DeleteFileRestOperation(GlobalAdministrationConfiguration configuration, WebContext webContext, Object entity) { super(configuration, webContext, entity); } public void perform(AttributeMetadata attrMeta) { if (fileStorageModeDisabled() || fileStorageDisabledOnFieldLevel(attrMeta)) { resetAttrValue(attrMeta); repository().save(entity); return; } if (attrMeta.hasAnnotation(FileReference.class)) { FileReference fileReference = attrMeta.annotation(FileReference.class); DomainTypeAttributeMetadata referenceDomainAttribute = referenceDomainAttribute(fileReference); if (isOfStringType(referenceDomainAttribute)) { resetAttrValue(attrMeta); resetAttrValue(referenceDomainAttribute); repository().save(entity); deleteQuietly(referencedFile(fileReference)); } return; } resetAttrValue(attrMeta); repository().save(entity); deleteQuietly(fileStorageFile(attrMeta)); } }
[ "kharchenko.max@gmail.com" ]
kharchenko.max@gmail.com
650bfdb639291418606f424fe976012a78964c97
272abb5beddea6fa5eabd375f7aa3a310584d09b
/src/test/java/com/hawaiki/uim/security/DomainUserDetailsServiceIntTest.java
7bb8bfe31b6072f055b0be34b9c43a10401c14f6
[]
no_license
BulkSecurityGeneratorProject/HawaikiPortal
33c3741afbbf158da3135b29b5227119fc21d074
0a789ec2e1669627a62be546c80b33caf24c9322
refs/heads/master
2022-12-14T17:25:24.839469
2018-02-13T08:34:25
2018-02-13T08:34:25
296,636,804
0
0
null
2020-09-18T13:59:50
2020-09-18T13:59:49
null
UTF-8
Java
false
false
4,645
java
package com.hawaiki.uim.security; import com.hawaiki.uim.HawaikiPortalApp; import com.hawaiki.uim.domain.User; import com.hawaiki.uim.repository.UserRepository; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.util.Locale; import static org.assertj.core.api.Assertions.assertThat; /** * Test class for DomainUserDetailsService. * * @see DomainUserDetailsService */ @RunWith(SpringRunner.class) @SpringBootTest(classes = HawaikiPortalApp.class) @Transactional public class DomainUserDetailsServiceIntTest { private static final String USER_ONE_LOGIN = "test-user-one"; private static final String USER_ONE_EMAIL = "test-user-one@localhost"; private static final String USER_TWO_LOGIN = "test-user-two"; private static final String USER_TWO_EMAIL = "test-user-two@localhost"; private static final String USER_THREE_LOGIN = "test-user-three"; private static final String USER_THREE_EMAIL = "test-user-three@localhost"; @Autowired private UserRepository userRepository; @Autowired private UserDetailsService domainUserDetailsService; private User userOne; private User userTwo; private User userThree; @Before public void init() { userOne = new User(); userOne.setLogin(USER_ONE_LOGIN); userOne.setPassword(RandomStringUtils.random(60)); userOne.setActivated(true); userOne.setEmail(USER_ONE_EMAIL); userOne.setFirstName("userOne"); userOne.setLastName("doe"); userOne.setLangKey("en"); userRepository.save(userOne); userTwo = new User(); userTwo.setLogin(USER_TWO_LOGIN); userTwo.setPassword(RandomStringUtils.random(60)); userTwo.setActivated(true); userTwo.setEmail(USER_TWO_EMAIL); userTwo.setFirstName("userTwo"); userTwo.setLastName("doe"); userTwo.setLangKey("en"); userRepository.save(userTwo); userThree = new User(); userThree.setLogin(USER_THREE_LOGIN); userThree.setPassword(RandomStringUtils.random(60)); userThree.setActivated(false); userThree.setEmail(USER_THREE_EMAIL); userThree.setFirstName("userThree"); userThree.setLastName("doe"); userThree.setLangKey("en"); userRepository.save(userThree); } @Test @Transactional public void assertThatUserCanBeFoundByLogin() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); } @Test @Transactional public void assertThatUserCanBeFoundByLoginIgnoreCase() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN.toUpperCase(Locale.ENGLISH)); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); } @Test @Transactional public void assertThatUserCanBeFoundByEmail() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN); } @Test @Transactional public void assertThatUserCanBeFoundByEmailIgnoreCase() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL.toUpperCase(Locale.ENGLISH)); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN); } @Test @Transactional public void assertThatEmailIsPrioritizedOverLogin() { UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_EMAIL.toUpperCase(Locale.ENGLISH)); assertThat(userDetails).isNotNull(); assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); } @Test(expected = UserNotActivatedException.class) @Transactional public void assertThatUserNotActivatedExceptionIsThrownForNotActivatedUsers() { domainUserDetailsService.loadUserByUsername(USER_THREE_LOGIN); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
b36699cd7cb46ad84e7d04d0ec11f47235016fd6
6b67dd878ddcd0899f17fb7655ae6f7df1e3e963
/interfaces/src/sueldoEmpleados/Ventana.java
bdb0b7b15ac7fe8593b2e21cdef1577618d4584b
[]
no_license
likendero/programacionDamEclipse
3a90e7ad0bb1a7b7c93616fb57f0b90c79583d59
d29b885ac78f7e348e9457cc13eba5a54dc59ef7
refs/heads/master
2021-09-15T04:50:04.789981
2018-05-26T15:34:01
2018-05-26T15:34:01
111,780,738
0
0
null
2017-12-01T08:26:30
2017-11-23T08:03:54
Java
UTF-8
Java
false
false
5,106
java
/* * Copyright (C) 2018 liken * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package sueldoEmpleados; import com.sun.prism.j2d.J2DPipeline; import java.awt.TextField; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Locale; import javax.swing.*; import javax.swing.colorchooser.AbstractColorChooserPanel; /** * * @author liken */ public class Ventana extends JFrame implements ActionListener{ /* nombre: nombre del empleado salario: cantidad por hora horas: horas trabajadas resultado: total a pagar */ JTextField nombre,salario,horas,resultado; JButton boton; /** * cosntructor de la ventana con todos los parametros, * en esta implementa todos los paneles */ public Ventana () { super("estimacion Empleados"); // tamaño y posicion setSize(500,125); setLocation(200, 200); // no redimensionable setResizable(false); // cambio de distribucion setLayout(new BoxLayout(this.getContentPane(),BoxLayout.Y_AXIS)); // en caso de cierre setDefaultCloseOperation(EXIT_ON_CLOSE); //boton boton = new JButton("calcular"); boton.addActionListener(this); // definicion paneles JPanel pNombre = panelNombreEmpl(); JPanel pSalario = PanelSueldo(); JPanel pHoras = panelHoras(); JPanel pResultado = panelResultado(); // paneles contenedores de paneles JPanel superior = new JPanel(); JPanel inferior = new JPanel(); // add paneles // sup superior.add(pNombre); superior.add(pSalario); // inf inferior.add(pHoras); inferior.add(boton); inferior.add(pResultado); //add ventana add(superior); add(inferior); } /** * metodo que define las caracteristicas y elementos del panel superior * de la ventana con etiquetas * * @return */ private JPanel panelNombreEmpl(){ JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); // etiqueta JLabel etiqueta = new JLabel("nombre del empleado:"); //cuadro introductor nombre = new JTextField(30); //adds panel.add(etiqueta); panel.add(nombre); return panel; } /** * metodo que define los atributos del panel para introducir el sueldo * @return */ private JPanel PanelSueldo(){ JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); // etiqueta JLabel etiqueta = new JLabel("sueldo/hora:"); //cuadro introductor salario = new JTextField(10); //adds panel.add(etiqueta); panel.add(salario); return panel; } /** * metodo que define los atributos del panel que contiene los elementos sobre las horas * @return */ private JPanel panelHoras(){ JPanel panel = new JPanel(); // layout panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS)); // etiqueta JLabel etiqueta = new JLabel("Horas/mes:"); // intro texto horas = new JTextField(10); // adds panel.add(etiqueta); panel.add(horas); // vuelta return panel; } /** * panel que contiene los elementos donde se muestra el * resultado * @return */ private JPanel panelResultado(){ JPanel panel = new JPanel(); // distro panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); // etiqueta JLabel etiqueta = new JLabel("Sueldo:"); // texto salida resultado = new JTextField(10); resultado.setEditable(false); // adds panel.add(etiqueta); panel.add(resultado); // vuelta return panel; } private void calculoSueldo(){ double numHoras,canSueldo; try{ numHoras = Double.parseDouble(horas.getText()); canSueldo = Double.parseDouble(salario.getText()); resultado.setText("" + (numHoras*canSueldo) + " €"); }catch(NumberFormatException num){ resultado.setText("error"); } } @Override public void actionPerformed(ActionEvent e) { if(e.getSource() == boton){ calculoSueldo(); } } }
[ "likendero11@gmail.com" ]
likendero11@gmail.com
04577a015e6ed60c32cc6c2aba35319b28652525
c94f888541c0c430331110818ed7f3d6b27b788a
/baasdt/java/src/main/java/com/antgroup/antchain/openapi/baasdt/models/PagequeryIpCodeResponse.java
5d06d7f0ff49d8b3cd82bf0ca37e486e966905e3
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
4,790
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.baasdt.models; import com.aliyun.tea.*; public class PagequeryIpCodeResponse extends TeaModel { // 请求唯一ID,用于链路跟踪和问题排查 @NameInMap("req_msg_id") public String reqMsgId; // 结果码,一般OK表示调用成功 @NameInMap("result_code") public String resultCode; // 异常信息的文本描述 @NameInMap("result_msg") public String resultMsg; // 数字凭证列表(小程序扫描不可跳转的码) // 注意: 这个接口查到的码为原始编码, 小程序扫描无法跳转, IPMart不适用!!! @NameInMap("code_list") public java.util.List<String> codeList; // 展示码列表(和code_list一一对应) @NameInMap("show_code_list") public java.util.List<String> showCodeList; // 交易订单ID @NameInMap("order_id") public String orderId; // IP商家的链上账户ID @NameInMap("buyer_account_id") public String buyerAccountId; // IP版权方的链上账户ID @NameInMap("seller_account_id") public String sellerAccountId; // IPID @NameInMap("ip_id") public String ipId; // IP名称 @NameInMap("ip_name") public String ipName; // IP主图的OSS地址 @NameInMap("ip_image") public String ipImage; // IP描述 @NameInMap("ip_desc") public String ipDesc; // 该批次数字凭证的过期时间戳(毫秒) @NameInMap("expired_date") public Long expiredDate; // 已经申请的总数量 @NameInMap("total_count") public Long totalCount; public static PagequeryIpCodeResponse build(java.util.Map<String, ?> map) throws Exception { PagequeryIpCodeResponse self = new PagequeryIpCodeResponse(); return TeaModel.build(map, self); } public PagequeryIpCodeResponse setReqMsgId(String reqMsgId) { this.reqMsgId = reqMsgId; return this; } public String getReqMsgId() { return this.reqMsgId; } public PagequeryIpCodeResponse setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public PagequeryIpCodeResponse setResultMsg(String resultMsg) { this.resultMsg = resultMsg; return this; } public String getResultMsg() { return this.resultMsg; } public PagequeryIpCodeResponse setCodeList(java.util.List<String> codeList) { this.codeList = codeList; return this; } public java.util.List<String> getCodeList() { return this.codeList; } public PagequeryIpCodeResponse setShowCodeList(java.util.List<String> showCodeList) { this.showCodeList = showCodeList; return this; } public java.util.List<String> getShowCodeList() { return this.showCodeList; } public PagequeryIpCodeResponse setOrderId(String orderId) { this.orderId = orderId; return this; } public String getOrderId() { return this.orderId; } public PagequeryIpCodeResponse setBuyerAccountId(String buyerAccountId) { this.buyerAccountId = buyerAccountId; return this; } public String getBuyerAccountId() { return this.buyerAccountId; } public PagequeryIpCodeResponse setSellerAccountId(String sellerAccountId) { this.sellerAccountId = sellerAccountId; return this; } public String getSellerAccountId() { return this.sellerAccountId; } public PagequeryIpCodeResponse setIpId(String ipId) { this.ipId = ipId; return this; } public String getIpId() { return this.ipId; } public PagequeryIpCodeResponse setIpName(String ipName) { this.ipName = ipName; return this; } public String getIpName() { return this.ipName; } public PagequeryIpCodeResponse setIpImage(String ipImage) { this.ipImage = ipImage; return this; } public String getIpImage() { return this.ipImage; } public PagequeryIpCodeResponse setIpDesc(String ipDesc) { this.ipDesc = ipDesc; return this; } public String getIpDesc() { return this.ipDesc; } public PagequeryIpCodeResponse setExpiredDate(Long expiredDate) { this.expiredDate = expiredDate; return this; } public Long getExpiredDate() { return this.expiredDate; } public PagequeryIpCodeResponse setTotalCount(Long totalCount) { this.totalCount = totalCount; return this; } public Long getTotalCount() { return this.totalCount; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
93576d5f92a528d743d93a3091b3509ad7158dea
cc32a64afed91f7186c009d3d1247370a904be1c
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/SearchModifierCode.java
179e9123c37e830d52e8637c498daf1c474727b8
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
rmoult01/hapi_fhir_mir_1
5dc5966ce06738872d8e0ddb667d513df76bb3d1
93270786e2d30185c41987038f878943cd736e34
refs/heads/master
2021-07-20T15:58:24.384813
2017-10-30T14:36:18
2017-10-30T14:36:18
106,035,744
1
0
null
null
null
null
UTF-8
Java
false
false
7,445
java
package org.hl7.fhir.dstu3.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 import org.hl7.fhir.exceptions.FHIRException; public enum SearchModifierCode { /** * The search parameter returns resources that have a value or not. */ MISSING, /** * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). */ EXACT, /** * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. */ CONTAINS, /** * The search parameter returns resources that do not contain a match. */ NOT, /** * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. */ TEXT, /** * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. */ IN, /** * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. */ NOTIN, /** * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). */ BELOW, /** * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). */ ABOVE, /** * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). */ TYPE, /** * added to help the parsers */ NULL; public static SearchModifierCode fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; if ("missing".equals(codeString)) return MISSING; if ("exact".equals(codeString)) return EXACT; if ("contains".equals(codeString)) return CONTAINS; if ("not".equals(codeString)) return NOT; if ("text".equals(codeString)) return TEXT; if ("in".equals(codeString)) return IN; if ("not-in".equals(codeString)) return NOTIN; if ("below".equals(codeString)) return BELOW; if ("above".equals(codeString)) return ABOVE; if ("type".equals(codeString)) return TYPE; throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); } public String toCode() { switch (this) { case MISSING: return "missing"; case EXACT: return "exact"; case CONTAINS: return "contains"; case NOT: return "not"; case TEXT: return "text"; case IN: return "in"; case NOTIN: return "not-in"; case BELOW: return "below"; case ABOVE: return "above"; case TYPE: return "type"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/search-modifier-code"; } public String getDefinition() { switch (this) { case MISSING: return "The search parameter returns resources that have a value or not."; case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents)."; case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched."; case NOT: return "The search parameter returns resources that do not contain a match."; case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text."; case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set."; case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set."; case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships)."; case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships)."; case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.)."; default: return "?"; } } public String getDisplay() { switch (this) { case MISSING: return "Missing"; case EXACT: return "Exact"; case CONTAINS: return "Contains"; case NOT: return "Not"; case TEXT: return "Text"; case IN: return "In"; case NOTIN: return "Not In"; case BELOW: return "Below"; case ABOVE: return "Above"; case TYPE: return "Type"; default: return "?"; } } }
[ "moultonr@mir.wustl.edu" ]
moultonr@mir.wustl.edu
5458917994138b610b212f73844a42aa2f2511f0
8e70ee2479dcc1c4515012295e98730f8aa7db52
/src/java/com/opgea/cms/domain/entities/Opening.java
f3f4305e3be82504fb7a0d95ec9e9943a3f0f53e
[]
no_license
shekharkumargupta/Cms
a92585e89837ef16d810a59f5f3a7b069990aeed
76f8242efbc0fb8a508b36801f5be781a887aa82
refs/heads/master
2020-07-01T17:44:36.564277
2019-08-08T11:25:27
2019-08-08T11:25:27
201,243,403
0
0
null
null
null
null
UTF-8
Java
false
false
7,527
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.opgea.cms.domain.entities; import com.opgea.cms.domain.qualifiers.OpeningStatus; import com.opgea.cms.domain.qualifiers.SalaryBasis; import java.io.Serializable; import java.util.Date; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.xml.bind.annotation.XmlRootElement; /** * * @author Ramesh */ @Entity @Table(name = "opening") @XmlRootElement @NamedQueries({ @NamedQuery(name = "Opening.findById", query = "SELECT o FROM Opening o WHERE o.id = :id"), @NamedQuery(name = "Opening.findAll", query = "SELECT o FROM Opening o"), @NamedQuery(name = "Opening.findAllByBranchId", query = "SELECT o FROM Opening o WHERE o.branch.id = :branchId"), @NamedQuery(name = "Opening.findAllByClientId", query = "SELECT o FROM Opening o WHERE o.client.id = :clientId"), @NamedQuery(name = "Opening.findAllByCompanyId", query = "SELECT o FROM Opening o WHERE o.branch.company.id = :companyId")} ) public class Opening implements Serializable { @Id @GeneratedValue(strategy= GenerationType.AUTO) private Long id; private String positionName; private String qualification; private OpeningStatus openingStatus; private Float minimumExperience; private Float maximumExperience; private Float minimumSalary; private Float maximumSalary; private String location; private SalaryBasis salaryBasis; private String keySkills; @ManyToOne private Currency currency; @ManyToOne private Client client; @ManyToMany(fetch= FetchType.LAZY, mappedBy="openings") private List<Team> teams; @ManyToMany(cascade= CascadeType.ALL) private List<Employee> employees; @ManyToMany private List<Resume> resumes; @ManyToOne private Branchh branch; @OneToOne private OpeningDetails openingDetails; @OneToMany private List<TeamAndOpening> teamAndOpenings; @OneToMany private List<EmployeeAndOpening> employeeAndOpenings; @Temporal(javax.persistence.TemporalType.TIMESTAMP) private Date createdDate; @ManyToOne private Employee createdBy; //openingdetails public Opening() { } public void addTeam(Team team){ this.teams.add(team); } public void addResume(Resume resume){ this.resumes.add(resume); } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getPositionName() { return positionName; } public void setPositionName(String positionName) { this.positionName = positionName; } public String getQualification() { return qualification; } public void setQualification(String qualification) { this.qualification = qualification; } public Branchh getBranch() { return branch; } public void setBranch(Branchh branch) { this.branch = branch; } public Client getClient() { return client; } public void setClient(Client client) { this.client = client; } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } public Currency getCurrency() { return currency; } public void setCurrency(Currency currency) { this.currency = currency; } public List<Employee> getEmployees() { return employees; } public void setEmployees(List<Employee> employees) { this.employees = employees; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Float getMaximumSalary() { return maximumSalary; } public void setMaximumSalary(Float maximumSalary) { this.maximumSalary = maximumSalary; } public Float getMaximumExperience() { return maximumExperience; } public void setMaximumExperience(Float maximumExperience) { this.maximumExperience = maximumExperience; } public Float getMinimumExperience() { return minimumExperience; } public void setMinimumExperience(Float minimumExperience) { this.minimumExperience = minimumExperience; } public Float getMinimumSalary() { return minimumSalary; } public void setMinimumSalary(Float minimumSalary) { this.minimumSalary = minimumSalary; } public OpeningStatus getOpeningStatus() { return openingStatus; } public void setOpeningStatus(OpeningStatus openingStatus) { this.openingStatus = openingStatus; } public SalaryBasis getSalaryBasis() { return salaryBasis; } public void setSalaryBasis(SalaryBasis salaryBasis) { this.salaryBasis = salaryBasis; } public List<Team> getTeams() { return teams; } public void setTeams(List<Team> teams) { this.teams = teams; } public List<TeamAndOpening> getTeamAndOpenings() { return teamAndOpenings; } public void setTeamAndOpenings(List<TeamAndOpening> teamAndOpenings) { this.teamAndOpenings = teamAndOpenings; } public List<Resume> getResumes() { return resumes; } public void setResumes(List<Resume> resumes) { this.resumes = resumes; } public OpeningDetails getOpeningDetails() { return openingDetails; } public void setOpeningDetails(OpeningDetails openingDetails) { this.openingDetails = openingDetails; } public Employee getCreatedBy() { return createdBy; } public void setCreatedBy(Employee createdBy) { this.createdBy = createdBy; } public List<EmployeeAndOpening> getEmployeeAndOpenings() { return employeeAndOpenings; } public void setEmployeeAndOpenings(List<EmployeeAndOpening> employeeAndOpenings) { this.employeeAndOpenings = employeeAndOpenings; } public String getKeySkills() { return keySkills; } public void setKeySkills(String keySkills) { this.keySkills = keySkills; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Opening other = (Opening) obj; if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) { return false; } return true; } @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.id != null ? this.id.hashCode() : 0); return hash; } @Override public String toString() { return "Opening{" + "id=" + id + ", positionName=" + positionName + '}'; } }
[ "shekharkumargupta@gmail.com" ]
shekharkumargupta@gmail.com
497de716ddc9d4d0b3544d9930fd756c550480ab
afcc736dcb3bb07ac8f75e1c1246bd2953e91a70
/mall-product/src/main/java/com/sour/mall/product/controller/ProductAttrValueController.java
d460e15a51178ca1684c0ee15aa02675b7b0a160
[]
no_license
Sourlun/mail-springCloud
2b94ad5b1cb384f349c43fa5c1c71e36d5bf7555
6770cf3c93e50f2ba799ad5df7f9e77b7a0fa38a
refs/heads/master
2023-04-18T14:10:53.724733
2021-05-09T12:06:24
2021-05-09T12:06:24
339,382,321
0
0
null
null
null
null
UTF-8
Java
false
false
2,402
java
package com.sour.mall.product.controller; import java.util.Arrays; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.sour.mall.product.entity.ProductAttrValueEntity; import com.sour.mall.product.service.IProductAttrValueService; import com.sour.mall.common.utils.PageUtils; import com.sour.mall.common.utils.R; /** * spu属性值 * * @author SourLun * @email 1141837289@qq.com * @date 2021-03-27 15:57:53 */ @RestController @RequestMapping("product/productattrvalue") public class ProductAttrValueController { @Autowired private IProductAttrValueService productAttrValueService; /** * 列表 */ @RequestMapping("/list") // @RequiresPermissions("product:productattrvalue:list") public R list(@RequestParam Map<String, Object> params){ PageUtils page = productAttrValueService.queryPage(params); return R.ok().put("page", page); } /** * 信息 */ @RequestMapping("/info/{id}") // @RequiresPermissions("product:productattrvalue:info") public R info(@PathVariable("id") Long id){ ProductAttrValueEntity productAttrValue = productAttrValueService.getById(id); return R.ok().put("productAttrValue", productAttrValue); } /** * 保存 */ @RequestMapping("/save") // @RequiresPermissions("product:productattrvalue:save") public R save(@RequestBody ProductAttrValueEntity productAttrValue){ productAttrValueService.save(productAttrValue); return R.ok(); } /** * 修改 */ @RequestMapping("/update") // @RequiresPermissions("product:productattrvalue:update") public R update(@RequestBody ProductAttrValueEntity productAttrValue){ productAttrValueService.updateById(productAttrValue); return R.ok(); } /** * 删除 */ @RequestMapping("/delete") // @RequiresPermissions("product:productattrvalue:delete") public R delete(@RequestBody Long[] ids){ productAttrValueService.removeByIds(Arrays.asList(ids)); return R.ok(); } }
[ "1141837289@qq.com" ]
1141837289@qq.com
8b898d687c482341e0c3163dffea521b83d2e08c
96d71f73821cfbf3653f148d8a261eceedeac882
/external/decompiled/android/WhatsApp-2.8.4278_dex2jar.src/com/whatsapp/se.java
578d6d079662d8257b7ac60796e0fbe7d06b8b18
[]
no_license
JaapSuter/Niets
9a9ec53f448df9b866a8c15162a5690b6bcca818
3cc42f8c2cefd9c3193711cbf15b5304566e08cb
refs/heads/master
2020-04-09T19:09:40.667155
2012-09-28T18:11:33
2012-09-28T18:11:33
5,751,595
2
1
null
null
null
null
UTF-8
Java
false
false
6,690
java
package com.whatsapp; import android.graphics.Typeface; import android.util.Pair; import android.util.SparseArray; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView.ScaleType; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; import android.widget.TextView; import java.util.ArrayList; import java.util.Iterator; import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; public class se extends BaseAdapter { private static final String z; private int a = 0; private SparseArray<aab> b = new SparseArray(); final MediaGallery c; static { char[] arrayOfChar = "\032z0q\034\020~8t\030\005f{j\022��?7w\b\031kn".toCharArray(); int i = arrayOfChar.length; int j = 0; if (i <= j) { z = new String(arrayOfChar).intern(); return; } int k = arrayOfChar[j]; int m; switch (j % 5) { default: m = 125; case 0: case 1: case 2: case 3: } while (true) { arrayOfChar[j] = (char)(m ^ k); j++; break; m = 119; continue; m = 31; continue; m = 84; continue; m = 24; } } public se(MediaGallery paramMediaGallery) { } private Pair<Integer, ArrayList<sz>> a(int paramInt) { boolean bool = DialogToastListActivity.f; ArrayList localArrayList = null; Iterator localIterator = MediaGallery.c(this.c).entrySet().iterator(); do { if (!localIterator.hasNext()) break; localArrayList = (ArrayList)((Map.Entry)localIterator.next()).getValue(); int i = 1 + (-1 + (localArrayList.size() + MediaGallery.d(this.c))) / MediaGallery.d(this.c); if ((paramInt <= i) && (!bool)) break; paramInt -= i; } while (!bool); return new Pair(Integer.valueOf(paramInt - 1), localArrayList); } public void a() { boolean bool = DialogToastListActivity.f; this.a = 0; this.b.clear(); Iterator localIterator = MediaGallery.c(this.c).entrySet().iterator(); do { if (!localIterator.hasNext()) break; Map.Entry localEntry = (Map.Entry)localIterator.next(); aab localaab = (aab)localEntry.getKey(); ArrayList localArrayList = (ArrayList)localEntry.getValue(); this.b.put(this.a, localaab); this.a += 1 + (-1 + (localArrayList.size() + MediaGallery.d(this.c))) / MediaGallery.d(this.c); } while (!bool); g5.b(z + this.a); } public int getCount() { if (this.a == 0) a(); return this.a; } public Object getItem(int paramInt) { return null; } public long getItemId(int paramInt) { return 0L; } public int getItemViewType(int paramInt) { if (this.b.get(paramInt, null) != null); for (int i = 1; ; i = 0) return i; } public View getView(int paramInt, View paramView, ViewGroup paramViewGroup) { boolean bool = DialogToastListActivity.f; LinearLayout localLinearLayout; if (getItemViewType(paramInt) == 1) { if (paramView != null) localLinearLayout = (LinearLayout)paramView; TextView localTextView; for (Object localObject = (TextView)localLinearLayout.getChildAt(0); ; localObject = localTextView) { ((TextView)localObject).setText(((aab)this.b.get(paramInt)).toString()); return localLinearLayout; localLinearLayout = new LinearLayout(this.c); localLinearLayout.setPadding(MediaGallery.d().db, MediaGallery.d().cb, 0, MediaGallery.d().cb); localLinearLayout.setClickable(false); localTextView = new TextView(this.c); LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(-1, -2); localLayoutParams2.topMargin = MediaGallery.d().gb; localLayoutParams2.bottomMargin = MediaGallery.d().gb; localTextView.setLayoutParams(localLayoutParams2); localTextView.setTypeface(Typeface.DEFAULT_BOLD); localTextView.setPadding(MediaGallery.d().eb, MediaGallery.d().fb, MediaGallery.d().fb, MediaGallery.d().fb); localTextView.setTextColor(-16777216); localTextView.setBackgroundColor(-2039584); localLinearLayout.addView(localTextView); localLinearLayout.setPadding(0, 0, 0, 0); } } label239: int i; int k; label297: int m; sz localsz; MediaGalleryImageView localMediaGalleryImageView; if (paramView != null) { localLinearLayout = (LinearLayout)paramView; localLinearLayout.setTag(Integer.valueOf(paramInt)); i = localLinearLayout.getChildCount(); Pair localPair = a(paramInt); ArrayList localArrayList = (ArrayList)localPair.second; int j = ((Integer)localPair.first).intValue(); k = j * MediaGallery.d(this.c); if (k < (j + 1) * MediaGallery.d(this.c)) { m = k - j * MediaGallery.d(this.c); if (k < localArrayList.size()) { localsz = (sz)localArrayList.get(-1 + (localArrayList.size() - k)); if (i > m) break label578; localMediaGalleryImageView = new MediaGalleryImageView(this.c); localMediaGalleryImageView.setScaleType(ImageView.ScaleType.CENTER_CROP); LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(MediaGallery.e(this.c), MediaGallery.e(this.c)); localMediaGalleryImageView.setLayoutParams(localLayoutParams1); localLayoutParams1.rightMargin = (int)MediaGallery.d().ab; localMediaGalleryImageView.setOnClickListener(MediaGallery.f(this.c)); localMediaGalleryImageView.setBackgroundResource(2130838549); localLinearLayout.addView(localMediaGalleryImageView); } } } while (true) { MediaGallery.a(this.c, localsz, paramInt, localMediaGalleryImageView); localMediaGalleryImageView.setTag(Integer.valueOf(localsz.b.hashCode())); localMediaGalleryImageView.position = paramInt; if (bool) if (i > m) localLinearLayout.getChildAt(m).setVisibility(4); int n = k + 1; if (bool) break; k = n; break label297; break; localLinearLayout = new LinearLayout(this.c); localLinearLayout.setPadding(MediaGallery.d().db, MediaGallery.d().cb, 0, MediaGallery.d().cb); localLinearLayout.setClickable(false); break label239; label578: localMediaGalleryImageView = (MediaGalleryImageView)localLinearLayout.getChildAt(m); localMediaGalleryImageView.setVisibility(0); } } public int getViewTypeCount() { return 2; } }
[ "git@jaapsuter.com" ]
git@jaapsuter.com
5cf1da4e681d3269e5b44702ba13e5bd92d009e8
35632ad905d8f7057fafd811613e0f2383305e3c
/subgrade-impl/src/main/java/com/dwarfeng/subgrade/impl/handler/ConnectionDatabaseHandler.java
269e8f2ec773a79ff67b336653a1eb1ef9210f40
[ "Apache-2.0" ]
permissive
DwArFeng/subgrade
82a1589863676598701525e4deb80b5ae014e0cb
b41da26629b1d3b46e549784cc4786a4a2ca03ea
refs/heads/master
2023-08-22T17:51:16.659855
2023-08-07T05:20:05
2023-08-07T06:44:49
235,097,227
2
0
Apache-2.0
2023-09-01T16:00:49
2020-01-20T12:32:41
Java
UTF-8
Java
false
false
1,071
java
package com.dwarfeng.subgrade.impl.handler; import com.dwarfeng.subgrade.stack.exception.DatabaseException; import com.dwarfeng.subgrade.stack.handler.DatabaseHandler; import com.dwarfeng.subgrade.stack.handler.DatabaseTask; import javax.annotation.Nonnull; import java.sql.Connection; /** * 使用原生连接实现的数据库执行器。 * * @author DwArFeng * @since 1.2.0 */ public class ConnectionDatabaseHandler<T> implements DatabaseHandler<T> { private Connection connection; public ConnectionDatabaseHandler(@Nonnull Connection connection) { this.connection = connection; } @Override public T executeTask(@Nonnull DatabaseTask<? extends T> databaseTask) throws DatabaseException { try { return databaseTask.todo(connection); } catch (Exception e) { throw new DatabaseException(e); } } public Connection getConnection() { return connection; } public void setConnection(@Nonnull Connection connection) { this.connection = connection; } }
[ "915724865@qq.com" ]
915724865@qq.com
0e070aa72d88703cb734ca000da53f54fcff8627
c36e1f2f1712f71cd11c829588ef8e82b09b7ef1
/java/monkey_foxwan_web/src/com/stang/game/service/impl/GameChLevelServiceImpl.java
93e5abd5f0cc4158309923934b93dbbd94762614
[]
no_license
CJSDCQS/Monkey-Web-Game
8b5645c7d5278708679827b956e9ca17d60a93e0
c2e93001db22df775c9638651d84d9bb2dcdb52a
refs/heads/master
2021-12-04T08:15:23.863743
2014-10-24T09:10:44
2014-10-24T09:10:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,307
java
package com.stang.game.service.impl; import java.util.List; import java.util.Map; import com.stang.game.dao.IGameChLevelDao; import com.stang.game.dao.impl.GameChLevelDaoImpl; import com.stang.game.entity.detail.GameChLevelDetail; import com.stang.game.service.IGameChLevelService; public class GameChLevelServiceImpl extends BaseServiceImpl<GameChLevelDetail> implements IGameChLevelService { protected IGameChLevelDao getBaseDao() { if (baseDao == null) { baseDao = new GameChLevelDaoImpl(); } return (IGameChLevelDao) baseDao; } public List<GameChLevelDetail> findAllChlevel(Map<String, Object> param) { // TODO Auto-generated method stub return getBaseDao().findAllChlevel(param); } public List<GameChLevelDetail> findGameChlevelByid(int id) { // TODO Auto-generated method stub return getBaseDao().findGameChlevelByid(id); } public List<GameChLevelDetail> getGameChlevel() { // TODO Auto-generated method stub return getBaseDao().getGameChlevel(); } public boolean insertGameCHLevel(GameChLevelDetail model) { // TODO Auto-generated method stub return getBaseDao().insertGameCHLevel(model); } public boolean updateGameGameCHLevel(Map<String, Object> param) { // TODO Auto-generated method stub return getBaseDao().updateGameGameCHLevel(param); } }
[ "lavenwl@gmail.com" ]
lavenwl@gmail.com
a2a9e7a3683982a5414ee645f0913dbb55ae8a40
eafae636c22b5d95db19e5271d58796bd7be4a66
/app-release-unsigned/sources/kotlin/jvm/Synchronized.java
1405fb20c3c33372a710eaa6dfb11b3990ca013d
[]
no_license
agustrinaldokurniawan/News_Kotlin_Native
5fb97e9c9199c464e64a6ef901b133c88da3db55
411f2ae0c01f2cc490f9b80a6b8f40196bc74176
refs/heads/main
2023-05-31T20:59:44.356059
2021-06-15T14:43:42
2021-06-15T14:43:42
377,077,236
0
0
null
2021-06-15T07:44:11
2021-06-15T07:38:27
null
UTF-8
Java
false
false
963
java
package kotlin.jvm; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import kotlin.Metadata; import kotlin.annotation.AnnotationRetention; import kotlin.annotation.AnnotationTarget; import kotlin.annotation.MustBeDocumented; @Target({ElementType.METHOD}) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER}) @Retention(RetentionPolicy.SOURCE) @kotlin.annotation.Retention(AnnotationRetention.SOURCE) @MustBeDocumented @Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b‡\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Lkotlin/jvm/Synchronized;", "", "kotlin-stdlib"}, k = 1, mv = {1, 5, 1}) @Documented /* compiled from: JvmFlagAnnotations.kt */ public @interface Synchronized { }
[ "agust.kurniawan@Agust-Rinaldo-Kurniawan.local" ]
agust.kurniawan@Agust-Rinaldo-Kurniawan.local
857367175ab12c70fa2711dcd2387d94f3e9f125
8553367f97586cfb9e878fcaffe7a11b912dbc96
/jdk-source/jdk1.7/src/main/java/org/omg/PortableInterceptor/ForwardRequestHelper.java
8ccb5b7c1993dccb5ffe878933e38542eac39af9
[]
no_license
GoldWater16/GoldWater
92abb6b4f2e448469408771d8aad96a9b412aa0a
8180d5689c8059c0fe9fbbe2770e8f6947d35c73
refs/heads/master
2023-07-20T12:30:06.481550
2022-05-21T15:27:09
2022-05-21T15:27:09
174,562,633
2
3
null
2023-07-13T17:02:44
2019-03-08T15:36:04
Java
UTF-8
Java
false
false
2,557
java
package org.omg.PortableInterceptor; /** * org/omg/PortableInterceptor/ForwardRequestHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl * Friday, June 21, 2013 12:58:27 PM PDT */ abstract public class ForwardRequestHelper { private static String _id = "IDL:omg.org/PortableInterceptor/ForwardRequest:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.PortableInterceptor.ForwardRequest that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.PortableInterceptor.ForwardRequest extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1]; org.omg.CORBA.TypeCode _tcOf_members0 = null; _tcOf_members0 = org.omg.CORBA.ObjectHelper.type (); _members0[0] = new org.omg.CORBA.StructMember ( "forward", _tcOf_members0, null); __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.PortableInterceptor.ForwardRequestHelper.id (), "ForwardRequest", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.PortableInterceptor.ForwardRequest read (org.omg.CORBA.portable.InputStream istream) { org.omg.PortableInterceptor.ForwardRequest value = new org.omg.PortableInterceptor.ForwardRequest (); // read and discard the repository ID istream.read_string (); value.forward = org.omg.CORBA.ObjectHelper.read (istream); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableInterceptor.ForwardRequest value) { // write the repository ID ostream.write_string (id ()); org.omg.CORBA.ObjectHelper.write (ostream, value.forward); } }
[ "huzewu@lecloudpay.com" ]
huzewu@lecloudpay.com
0baf33318a8a18e4a358ef2fd11c0ba8622fd305
6b568c6f42c8909b30bb69e992c6527695c1fd15
/dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/converter/xsd/PeriodTypeXSDConverter.java
1c254704cf963bb3ba18b24af336bc065e2d3a61
[ "BSD-3-Clause" ]
permissive
onaio/dhis2
7f156f2b015b7b3683527c044c9ec6fd52c9bc66
2b4da26297dd6b27fd75babc743cf6b3be14aec0
refs/heads/master
2020-04-28T15:09:21.763055
2013-12-20T17:13:46
2013-12-20T17:14:38
15,343,468
0
2
null
null
null
null
UTF-8
Java
false
false
3,982
java
package org.hisp.dhis.importexport.dhis14.xml.converter.xsd; /* * Copyright (c) 2004-2013, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import org.amplecode.staxwax.reader.XMLReader; import org.amplecode.staxwax.writer.XMLWriter; import org.hisp.dhis.importexport.ExportParams; import org.hisp.dhis.importexport.ImportParams; /** * @author Lars Helge Overland * @version $Id: PeriodTypeXSDConverter.java 6455 2008-11-24 08:59:37Z larshelg $ */ public class PeriodTypeXSDConverter extends AbstractXSDConverter { // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- /** * Constructor for write operations. */ public PeriodTypeXSDConverter() { } // ------------------------------------------------------------------------- // XMLConverter implementation // ------------------------------------------------------------------------- public void write( XMLWriter writer, ExportParams params ) { writer.openElement( "xsd:element", "name", "DataPeriodType" ); writeAnnotation( writer ); writer.openElement( "xsd:complexType" ); writer.openElement( "xsd:sequence" ); writeInteger( writer, "DataPeriodTypeID", 1, true ); writeText( writer, "DataPeriodTypeNameEng", 1, false, 25 ); writeText( writer, "DataPeriodTypeName", 1, true, 25 ); writeInteger( writer, "SortOrder", 1, true ); writeText( writer, "DataPeriodFormat", 0, false, 230 ); writeDouble( writer, "AnnualisationFactor", 0, false ); writeInteger( writer, "UpperRangeDayCount", 0, false ); writeText( writer, "DataPeriodIntervalSetting", 0, false, 10 ); writeInteger( writer, "FirstDayOfWeekID", 0, false ); writeInteger( writer, "FirstWeekOfYearID", 0, false ); writeInteger( writer, "Supported", 1, true ); writeText( writer, "BasePeriodPart", 0, false, 8 ); writer.closeElement(); writer.closeElement(); writer.closeElement(); } public void read( XMLReader reader, ImportParams params ) { // Not implemented } }
[ "peter@helioid.com" ]
peter@helioid.com
6ccab1d2ab4341ece7529d5b189ce4bca33a74ed
5b8c2dd9fcd176f5c77b959c8357402e7ce0474d
/lambda-workflow-core/src/main/java/com/yatop/lambda/workflow/core/richmodel/workflow/execution/ExecutionTask.java
814b54ec098778587d7be9abefcb07fd0fab8969
[]
no_license
ruhengChen/lambda-mls
6cbfc5804193f68bbc98a5900d7e3fa91cf6ef00
2450c25c25c91bb3af1946fbf21206a6636d71d0
refs/heads/master
2020-04-20T05:45:30.853959
2019-02-13T02:36:57
2019-02-13T02:36:57
168,664,310
1
0
null
null
null
null
UTF-8
Java
false
false
5,665
java
package com.yatop.lambda.workflow.core.richmodel.workflow.execution; import com.yatop.lambda.base.model.WfExecutionTask; import com.yatop.lambda.core.enums.TaskStateEnum; import com.yatop.lambda.core.utils.DataUtil; import com.yatop.lambda.workflow.core.richmodel.RichModel; import com.yatop.lambda.workflow.core.richmodel.workflow.node.Node; import com.yatop.lambda.workflow.core.richmodel.workflow.value.CharValue; import com.yatop.lambda.workflow.core.utils.CollectionUtil; import java.util.ArrayList; import java.util.List; import java.util.TreeMap; public class ExecutionTask extends RichModel<WfExecutionTask> { private Node node; //操作关联节点 private TreeMap<String, ExecutionTaskOutput> outputs = new TreeMap<String, ExecutionTaskOutput>(); //任务输出内容 public ExecutionTask(WfExecutionTask data, Node node) { super(data); this.node = node; } @Override public void clear() { node = null; CollectionUtil.enhancedClear(outputs); super.clear(); } public void flush(String operId) { if (this.taskOutputCount() > 0) { for (ExecutionTaskOutput taskOutput : this.getOutputs()) { taskOutput.flush(operId); } } if (this.isColoured()) ;//NodeHelper.updateNode(this, operId); } public boolean isStatePreparing() { return this.data().getTaskState() == TaskStateEnum.PREPARING.getState(); } public boolean isStateReady() { return this.data().getTaskState() == TaskStateEnum.READY.getState(); } public boolean isStateRunning() { return this.data().getTaskState() == TaskStateEnum.RUNNING.getState(); } public boolean isStateSuccess() { return this.data().getTaskState() == TaskStateEnum.SUCCESS.getState(); } public boolean isStateErrorTerminated() { return this.data().getTaskState() == TaskStateEnum.ERROR_TERMINATED.getState(); } public boolean isStateUserTerminated() { return this.data().getTaskState() == TaskStateEnum.USER_TERMINATED.getState(); } public void changeState2Ready() { this.changeTaskState(TaskStateEnum.READY); } public void changeState2Running() { this.changeTaskState(TaskStateEnum.RUNNING); } public void changeState2Success() { this.changeTaskState(TaskStateEnum.SUCCESS); } private void changeState2ErrorTerminated() { this.changeTaskState(TaskStateEnum.ERROR_TERMINATED); } public void changeState2UserTerminated() { this.changeTaskState(TaskStateEnum.USER_TERMINATED); } private void changeTaskState(TaskStateEnum taskState) { if(this.data().getTaskState() == taskState.getState()) return; this.data().setTaskState(taskState.getState()); this.syncTaskState2Node(taskState); } public void syncTaskState2Node() { this.syncTaskState2Node(TaskStateEnum.valueOf(this.data().getTaskState())); } private void syncTaskState2Node(TaskStateEnum taskState) { switch (taskState) { case PREPARING: case READY: this.node.changeState2Preparing(); this.syncTaskId2Node(); break; case RUNNING: this.node.changeState2Running(); this.syncTaskId2Node(); break; case SUCCESS: this.node.changeState2Success(); this.syncTaskId2Node(); break; case ERROR_TERMINATED: this.node.changeState2Error(); this.syncTaskId2Node(); break; case USER_TERMINATED: this.node.downgradeState2Ready(); this.syncTaskId2Node(); break; default: break; } } private void syncTaskId2Node() { Long lastTaskId = this.node.data().getLastTaskId(); if(DataUtil.isNull(lastTaskId) || !lastTaskId.equals(this.data().getTaskId())) this.node.data().setLastTaskId(this.data().getTaskId()); } /*private void clearTaskId2Node() { Long lastTaskId = this.node.data().getLastTaskId(); if(DataUtil.isNotNull(lastTaskId) || lastTaskId.equals(this.data().getTaskId())) this.node.data().setLastTaskId(null); }*/ public Node getNode() { return this.node; } public int taskOutputCount() { return outputs.size(); } public List<ExecutionTaskOutput> getOutputs() { return CollectionUtil.toList(outputs); } public ExecutionTaskOutput getOutput(String charId) { return CollectionUtil.get(outputs, charId); } public CharValue getOutputCharValue(String charId) { return CollectionUtil.get(outputs, charId).getCharValue(); } public List<CharValue> getOutputCharValues() { if(taskOutputCount() == 0) return null; List<CharValue> charValues = new ArrayList<CharValue>(); for(ExecutionTaskOutput output : getOutputs()) { charValues.add(output.getCharValue()); } return charValues; } public void putTaskOutput(ExecutionTaskOutput taskOutput) { CollectionUtil.put(outputs, taskOutput.data().getCharId(), taskOutput); } public boolean isOccuredWarning() { return DataUtil.isNotEmpty(this.data().getWarningMsg()); } public void setOccuredWarning(String warningMsg) { this.data().setWarningMsg(warningMsg); changeState2ErrorTerminated(); } }
[ "tomlee714@126.com" ]
tomlee714@126.com
72e2772ae87ac940120067030b8758d031589270
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/80/878.java
e4299fdf298a33a63f61a76267be40fe914a9fb6
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
package <missing>; public class GlobalMembers { public static int Main() { int ans = 0; int anstemp1 = 0; int anstemp2 = 0; int i; int[] a = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int[] b = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int x1; int y1; int z1; int x2; int y2; int z2; x1 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); y1 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); z1 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); x2 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); y2 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); z2 = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); for (int x = x1; x <= x2 - 1; x++) { if ((x % 4 == 0 && x % 100 != 0) || (x % 400 == 0)) { ans += 366; } else { ans += 365; } } if ((x1 % 4 == 0 && x1 % 100 != 0) || (x1 % 400 == 0)) { for (i = 1; i <= y1 - 1; i++) { anstemp1 += b[i]; } anstemp1 += z1; } else { for (i = 1; i <= y1 - 1; i++) { anstemp1 += a[i]; } anstemp1 += z1; } if ((x2 % 4 == 0 && x2 % 100 != 0) || (x2 % 400 == 0)) { for (i = 1; i <= y2 - 1; i++) { anstemp2 += b[i]; } anstemp2 += z2; } else { for (i = 1; i <= y2 - 1; i++) { anstemp2 += a[i]; } anstemp2 += z2; } System.out.print(ans - anstemp1 + anstemp2); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
ebfb1fb0aae7602e99136db0d68edd3554eed365
21815b0a6e7741b6a5ed3293575d801a97b918de
/jmx/plugins/org.jboss.tools.jmx.jvmmonitor.core/src/org/jboss/tools/jmx/jvmmonitor/core/cpu/CpuModelFactory.java
68af2d3ba1842ebb27bc1940e3c095e1557049d3
[]
no_license
jbosstools/jbosstools-server
f7beec8346fdae37556531e36e3af51df09a9872
4d8a5bb01ddec48347fddfc94c76168861b771e8
refs/heads/main
2023-08-02T10:42:56.991445
2023-07-14T15:34:36
2023-07-14T16:29:23
6,308,291
4
42
null
2023-09-08T20:01:00
2012-10-20T11:23:04
Java
UTF-8
Java
false
false
747
java
/******************************************************************************* * Copyright (c) 2010 JVM Monitor project. All rights reserved. * * This code is distributed under the terms of the Eclipse Public License v1.0 * which is available at http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.jboss.tools.jmx.jvmmonitor.core.cpu; import org.jboss.tools.jmx.jvmmonitor.internal.core.cpu.CpuModel; /** * The CPU model factory. */ public class CpuModelFactory { /** * Creates the CPU model. * * @return The CPU model */ public ICpuModel createCpuModel() { return new CpuModel(); } }
[ "rob@oxbeef.net" ]
rob@oxbeef.net
252356f27810083733fcd76612b34fcfcec1b3f8
7f20b1bddf9f48108a43a9922433b141fac66a6d
/csplugins/trunk/ucsd/pwang/cyprovision/org.eclipse.equinox.p2.ui2/src/org/eclipse/equinox/internal/provisional/p2/ui2/dialogs/UpdateSoftwareWizard.java
239d732ba5f4c50ae2fefdfd2987fd7545374263
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,868
java
package org.eclipse.equinox.internal.provisional.p2.ui2.dialogs; import java.awt.Rectangle; import java.util.Map; import java.util.Vector; import javax.swing.JOptionPane; //import org.eclipse.equinox.internal.provisional.p2.ui2.dialogs.InstallNewSoftwareWizard.MyResultProducer; import org.eclipse.equinox.internal.provisional.p2.ui2.model.InstalledIUElement; import org.netbeans.api.wizard.WizardDisplayer; import org.netbeans.spi.wizard.Wizard; import org.netbeans.spi.wizard.WizardException; import org.netbeans.spi.wizard.WizardPage; import org.netbeans.spi.wizard.WizardPage.WizardResultProducer; public class UpdateSoftwareWizard { public UpdateSoftwareWizard(InstallationInformationDialog parent, String profileId, Vector<InstalledIUElement> ius){ parent.dispose(); WizardPage[] pages = new WizardPage[2]; AvailableUpdatesPage page1 = new AvailableUpdatesPage(profileId, ius); UpdateDetailsPage page2 = new UpdateDetailsPage(profileId, ius); pages[0] = page1; pages[1] = page2; //Use the utility method to compose a Wizard Wizard wizard = WizardPage.createWizard("Available Updates", pages, new MyResultProducer()); //And show it on screen Map gatherSettings = (Map) WizardDisplayer.showWizard (wizard, new Rectangle(20,20,800,600)); } class MyResultProducer implements WizardResultProducer { public Object finish(Map wizardData) throws WizardException { //String nameForThing = (String) wizardData.get ("name"); return new BackgroundUpdate(wizardData); } //Called when the user presses the cancel button public boolean cancel(Map settings) { //boolean dialogShouldClose = JOptionPane.showConfirmDialog (null, // "Are you sure you want to cancel the installation?!!") == JOptionPane.OK_OPTION; return true; //dialogShouldClose; } } }
[ "pwang@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
pwang@0ecc0d97-ab19-0410-9704-bfe1a75892f5
d28e75a436b2064c63e98e56069b1e88136d76f0
5ac2fb4db63c9383abad7931025d5ac9bc7259d3
/Tama_app/src/main/java/com/tama/chat/tamaAccount/entry/historyPojos/UpdatedAt.java
517bff627e6baea046fcef3b5112f1a3fa455d6a
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
Testtaccount/TamaAndroid
097f48f913c23449c983fa1260a1696b06742cc8
82912bd3cb80c9fc274c0c23adc005bba85b7fb7
refs/heads/master
2021-09-19T08:26:09.108350
2018-07-25T12:33:20
2018-07-25T12:35:42
139,688,915
0
0
null
null
null
null
UTF-8
Java
false
false
2,322
java
package com.tama.chat.tamaAccount.entry.historyPojos; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class UpdatedAt implements Parcelable { @SerializedName("date") @Expose private String date; @SerializedName("timezone_type") @Expose private long timezoneType; @SerializedName("timezone") @Expose private String timezone; public final static Parcelable.Creator<UpdatedAt> CREATOR = new Creator<UpdatedAt>() { @SuppressWarnings({ "unchecked" }) public UpdatedAt createFromParcel(Parcel in) { return new UpdatedAt(in); } public UpdatedAt[] newArray(int size) { return (new UpdatedAt[size]); } }; protected UpdatedAt(Parcel in) { this.date = ((String) in.readValue((String.class.getClassLoader()))); this.timezoneType = ((long) in.readValue((long.class.getClassLoader()))); this.timezone = ((String) in.readValue((String.class.getClassLoader()))); } /** * No args constructor for use in serialization */ public UpdatedAt() { } /** * * @param timezone * @param timezoneType * @param date */ public UpdatedAt(String date, long timezoneType, String timezone) { super(); this.date = date; this.timezoneType = timezoneType; this.timezone = timezone; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public UpdatedAt withDate(String date) { this.date = date; return this; } public long getTimezoneType() { return timezoneType; } public void setTimezoneType(long timezoneType) { this.timezoneType = timezoneType; } public UpdatedAt withTimezoneType(long timezoneType) { this.timezoneType = timezoneType; return this; } public String getTimezone() { return timezone; } public void setTimezone(String timezone) { this.timezone = timezone; } public UpdatedAt withTimezone(String timezone) { this.timezone = timezone; return this; } public void writeToParcel(Parcel dest, int flags) { dest.writeValue(date); dest.writeValue(timezoneType); dest.writeValue(timezone); } public int describeContents() { return 0; } }
[ "avetik.avetik@gmail.com" ]
avetik.avetik@gmail.com
f7a3fe593430cfa865d0586435d18a6893138638
8df0553905ff0503e705c29e37a7fe588e7e332d
/hlj_android_customer/src/me/suncloud/marrymemo/api/event/EventService.java
88d9e304f8acf004012280cccd378ba1a9b616a6
[]
no_license
Catfeeds/myWorkspace
9cd0af10597af9d28f8d8189ca0245894d270feb
3c0932e626e72301613334fd19c5432494f198d2
refs/heads/master
2020-04-11T12:19:27.141598
2018-04-04T08:14:31
2018-04-04T08:14:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,709
java
package me.suncloud.marrymemo.api.event; import com.google.gson.JsonElement; import com.hunliji.hljcommonlibrary.models.event.EventInfo; import com.hunliji.hljcommonlibrary.models.event.SignUpInfo; import com.hunliji.hljhttplibrary.entities.HljHttpData; import com.hunliji.hljhttplibrary.entities.HljHttpResult; import java.util.List; import java.util.Map; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Query; import rx.Observable; /** * Created by chen_bin on 2016/9/9 0009. */ public interface EventService { /** * 首页和发现页活动列表 * * @param position 1首页 2发现页 * @return */ @GET("/p/wedding/index.php/Home/APIFinderActivity/rand_activity_result") Observable<HljHttpResult<HljHttpData<List<EventInfo>>>> getEventRandom( @Query("position") int position); /** * 活动列表 * * @param page * @param perPage * @return */ @GET("p/wedding/index.php/Home/APIFinderActivity/index") Observable<HljHttpResult<HljHttpData<List<EventInfo>>>> getEventList( @Query("page") int page, @Query("per_page") int perPage); /** * 活动详情 * * @param id * @return */ @GET("p/wedding/index.php/Home/APIFinderActivity/detail") Observable<HljHttpResult<EventInfo>> getEventDetail(@Query("id") long id); /** * 我参加的活动列表 * * @param page * @param perPage * @return */ @GET("p/wedding/index.php/home/APIFinderActivity/myActivities") Observable<HljHttpResult<HljHttpData<List<EventInfo>>>> getMyEventList( @Query("page") int page, @Query("per_page") int perPage); /** * 活动报名 * * @param map * @return */ @POST("p/wedding/index.php/Home/APIFinderActivity/signUp") Observable<HljHttpResult<SignUpInfo>> signUp(@Body Map<String, Object> map); /** * 中奖列表 * * @return */ @GET("p/wedding/index.php/home/APIFinderActivity/winners") Observable<HljHttpResult<HljHttpData<List<SignUpInfo>>>> getWinnerList( @Query("id") long id, @Query("page") int page, @Query("per_page") int perPage); /** * 投诉 * * @param map * @return */ @POST("p/wedding/index.php/home/APIFinderActivity/report") Observable<HljHttpResult> report(@Body Map<String, Object> map); /** * 检测手机号是否真实 * * @param map * @return */ @POST("p/wedding/index.php/Home/APIUser/check_phone_is_real") Observable<HljHttpResult<JsonElement>> checkPhoneIsReal(@Body Map<String, Object> map); }
[ "hdwhhc@sina.cn" ]
hdwhhc@sina.cn
4dc109f67fa9ee4e207365d1c5ce1efff70341bf
b2cc658b42d97981938b0fe062adf88ce6564edd
/s4/B193301/Frequencer.java
5510f4e8ba57af4f88d3f335d570b1b4b9aeadc8
[]
no_license
tut183341/2019informationQuantity
7492bbf3672f268c550a9da26321061bba012e47
b9ec6b39d210cf72d4c7b9b4c3a5f5a5049d3872
refs/heads/master
2020-11-25T07:18:23.905660
2020-02-18T08:57:50
2020-02-18T08:57:50
228,554,001
0
0
null
2019-12-17T07:02:12
2019-12-17T07:02:11
null
UTF-8
Java
false
false
2,286
java
package s4.B193301; // Please modify to s4.Bnnnnnn, where nnnnnn is your student ID. import java.lang.*; import s4.specification.*; /* interface FrequencerInterface { // This interface provides the design for frequency counter. void setTarget(byte[] target); // set the data to search. void setSpace(byte[] space); // set the data to be searched target from. int frequency(); //It return -1, when TARGET is not set or TARGET's length is zero //Otherwise, it return 0, when SPACE is not set or Space's length is zero //Otherwise, get the frequency of TAGET in SPACE int subByteFrequency(int start, int end); // get the frequency of subByte of taget, i.e target[start], taget[start+1], ... , target[end-1]. // For the incorrect value of START or END, the behavior is undefined. */ public class Frequencer implements FrequencerInterface{ // Code to Test, *warning: This code contains intentional problem* byte [] myTarget; byte [] mySpace; public void setTarget(byte [] target) { myTarget = target;} public void setSpace(byte []space) { mySpace = space; } public int frequency() { int targetLength = myTarget.length; int spaceLength = mySpace.length; int count = 0; for(int start = 0; start<spaceLength; start++) { // Is it OK? boolean abort = false; for(int i = 0; i<targetLength; i++) { if(myTarget[i] != mySpace[start+i]) { abort = true; break; } } if(abort == false) { count++; } } return count; } // I know that here is a potential problem in the declaration. public int subByteFrequency(int start, int length) { // Not yet, but it is not currently used by anyone. return -1; } public static void main(String[] args) { Frequencer myObject; int freq; try { System.out.println("checking my Frequencer"); myObject = new Frequencer(); myObject.setSpace("Hi Ho Hi Ho".getBytes()); myObject.setTarget("H".getBytes()); freq = myObject.frequency(); System.out.print("\"H\" in \"Hi Ho Hi Ho\" appears "+freq+" times. "); if(4 == freq) { System.out.println("OK"); } else {System.out.println("WRONG"); } } catch(Exception e) { System.out.println("Exception occurred: STOP"); } } }
[ "tut.umemura.lab@gmail.com" ]
tut.umemura.lab@gmail.com
8324d2b1a73f1e9fc9e989283824951dc368d491
995e655293513d0b9f93d62e28f74b436245ae74
/src/android/support/v4/view/u.java
65b831d947264515c63fd45b266696a68ecb1f0e
[]
no_license
JALsnipe/HTC-RE-YouTube-Live-Android
796e7c97898cac41f0f53120e79cde90d3f2fab1
f941b64ad6445c0a0db44318651dc76715291839
refs/heads/master
2021-01-17T09:46:50.725810
2015-01-09T23:32:14
2015-01-09T23:32:14
29,039,855
3
0
null
null
null
null
UTF-8
Java
false
false
599
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package android.support.v4.view; import android.view.VelocityTracker; // Referenced classes of package android.support.v4.view: // v, w class u implements v { u() { } public float a(VelocityTracker velocitytracker, int i) { return w.a(velocitytracker, i); } public float b(VelocityTracker velocitytracker, int i) { return w.b(velocitytracker, i); } }
[ "josh.lieberman92@gmail.com" ]
josh.lieberman92@gmail.com
aeb2531f910a0dea968b79af27104a59da48a527
c10792907346756ab025f4586b6f34a40568df5c
/app/src/main/java/org/andengine/examples/adt/ZoomState.java
50077dcd3aeb2bb09f73fb205984893bdca3d1b4
[ "Apache-2.0" ]
permissive
triplesky/AndEngineExample
1753f5f663e2e2a3532f8f5960c3f8c3258309a1
c4478e45f6554faf415af23c38961961f4c0950f
refs/heads/master
2023-03-15T14:27:18.853722
2020-10-25T01:44:38
2020-10-25T01:44:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package org.andengine.examples.adt; public enum ZoomState { // =========================================================== // Elements // =========================================================== IN, OUT, NONE; }
[ "731620591@qq.com" ]
731620591@qq.com
fd9cd824717ac44c7f7c3ec9f43f78f5647806da
a63f369b98dfcd3284e4dd51d909b20d49c40d50
/java1Acurs2/Exemplu4.java
8426ddbb1350dec5481f7b8eab29d73e3bf420e8
[]
no_license
alexandrutopala/java1A_MON_JUL_2019
025318bd6eaaaa6785d6de5354e45e5ac87c9ed2
3dc3db8c13f74ad653ee2e340a6672e8b30d90eb
refs/heads/master
2020-06-13T17:10:30.923124
2019-08-26T18:54:48
2019-08-26T18:54:48
194,726,605
0
0
null
null
null
null
UTF-8
Java
false
false
667
java
public class Exemplu4 { public static void main(String [] args) { Pisica p1; p1 = new Pisica(); p1.nume = "Tom"; p1.culoare = "negru"; p1.greutate = 5; System.out.println(p1.nume); Pisica p2 = p1; p2.nume = "Mitzi"; System.out.println(p1.nume); Pisica p3 = new Pisica(); p3.nume = "Sutzy"; System.out.println(p3.nume); System.out.println(p1.nume); p1 = null; //System.out.println(p1.nume); // NullPointerException p2.sayHello(); } }
[ "alexandru.top98@gmail.com" ]
alexandru.top98@gmail.com
f2945fd774ba4ec4af4cb20634634e8f2f9eb422
b1f5e5160f64c0c158692a5da95b1ab10088fd37
/chapter_01_04/src/main/java/ch4/messagesource/MessageSourceDemo.java
21d772f427d29dcefc1a7b96669f2aded805fed0
[]
no_license
antey1988/SpringLearn
6e480e2639aa10dbc7f7ced23e5ce19e0f80dad1
442433e876bcd6d6f1ac7d10e3a460408f1adb87
refs/heads/master
2023-03-13T18:05:59.944291
2021-03-07T13:16:49
2021-03-07T13:17:29
312,569,842
0
0
null
null
null
null
UTF-8
Java
false
false
811
java
package ch4.messagesource; import org.springframework.context.support.GenericXmlApplicationContext; import java.util.Locale; public class MessageSourceDemo { public static void main(String[] args) { GenericXmlApplicationContext ctx = new GenericXmlApplicationContext(); ctx.load("/spring/messagesource/app-config-01.xml"); ctx.refresh(); Locale english = Locale.ENGLISH; Locale german = new Locale("de", "DE"); System.out.println(ctx.getMessage("msg", null, english)); System.out.println(ctx.getMessage("msg", null, german)); System.out.println(ctx.getMessage("nameMsg", new Object[] {"John", "Mayer"}, english)); System.out.println(ctx.getMessage("nameMsg", new Object[] {"John", "Mayer"}, german)); ctx.close(); } }
[ "antey1988@gmail.com" ]
antey1988@gmail.com
246a37b4135ad9c24c96fbd977416e0100867340
8d8fb4dfd7be299076651e02d26eba6cd879428c
/instrumentation-test/src/main/java/com/newrelic/agent/introspec/SpanEventsHelper.java
567f45be41a30e2ec3b23fa7bcd76a0334b67fad
[ "Apache-2.0" ]
permissive
newrelic/newrelic-java-agent
db6dd20f6ba3f43909b004ce4a058f589dd4b017
eb298ecd8d31f93622388aa12d3ba1e68a58f912
refs/heads/main
2023-08-31T05:14:44.428903
2023-08-29T10:37:35
2023-08-30T18:08:38
275,016,355
177
150
Apache-2.0
2023-09-11T14:50:06
2020-06-25T21:13:42
Java
UTF-8
Java
false
false
728
java
/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ package com.newrelic.agent.introspec; import com.newrelic.agent.model.SpanCategory; import java.util.Collection; import java.util.LinkedList; import java.util.List; public class SpanEventsHelper { public static Collection<SpanEvent> getSpanEventsByCategory(final SpanCategory category) { List<SpanEvent> spanEvents = new LinkedList<>(); for (SpanEvent event : InstrumentationTestRunner.getIntrospector().getSpanEvents()) { if (event.category().equals(category.name())) { spanEvents.add(event); } } return spanEvents; } }
[ "49817386+jeffalder@users.noreply.github.com" ]
49817386+jeffalder@users.noreply.github.com
5bca79c9070749075c77a7aa1802e686ab12e2af
bc3498a3d4b680e12a85e4a3845cb8cd578aa0d6
/app/src/test/java/io/github/hidroh/materialistic/data/AlgoliaClientTest.java
dc7a32aaeec56fdf00df78f0e68c8c5e683d2947
[ "Apache-2.0" ]
permissive
balao7/materialistic
f731ce0e134c347494ea4a5eb21ff85897c0a429
3e232ee8f2e61a3f84d510a372124cd6530ca4ad
refs/heads/master
2021-01-15T14:42:44.952275
2016-01-11T06:10:21
2016-01-11T06:10:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,295
java
package io.github.hidroh.materialistic.data; import com.google.gson.GsonBuilder; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.MockitoAnnotations; import org.robolectric.RobolectricGradleTestRunner; import org.robolectric.RuntimeEnvironment; import javax.inject.Inject; import javax.inject.Singleton; import dagger.Module; import dagger.ObjectGraph; import dagger.Provides; import retrofit.Call; import retrofit.Callback; import retrofit.Response; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @RunWith(RobolectricGradleTestRunner.class) public class AlgoliaClientTest { @Inject RestServiceFactory factory; private ItemManager hackerNewsClient = mock(ItemManager.class); @Captor ArgumentCaptor<Callback<AlgoliaClient.Item>> getItemCallback; @Captor ArgumentCaptor<Callback<AlgoliaClient.AlgoliaHits>> getStoriesCallback; @Captor ArgumentCaptor<ItemManager.Item[]> getStoriesResponse; private AlgoliaClient client; private ResponseListener<ItemManager.Item> itemListener; private ResponseListener<ItemManager.Item[]> storiesListener; private Call call; @Before public void setUp() { MockitoAnnotations.initMocks(this); ObjectGraph.create(new TestModule()).inject(this); reset(TestRestServiceFactory.algoliaRestService); client = new AlgoliaClient(RuntimeEnvironment.application, factory); client.mHackerNewsClient = hackerNewsClient; client.sSortByTime = true; itemListener = mock(ResponseListener.class); storiesListener = mock(ResponseListener.class); call = mock(Call.class); when(TestRestServiceFactory.algoliaRestService.search(anyString())).thenReturn(call); when(TestRestServiceFactory.algoliaRestService.searchByDate(anyString())).thenReturn(call); } @Test public void testGetItem() { client.getItem("1", itemListener); verify(hackerNewsClient).getItem(eq("1"), eq(itemListener)); } @Test public void testGetStoriesNoListener() { client.getStories("filter", null); verify(TestRestServiceFactory.algoliaRestService, never()).searchByDate(eq("filter")); verify(call, never()).enqueue(any(Callback.class)); } @Test public void testGetStoriesSuccess() { client.getStories("filter", storiesListener); verify(TestRestServiceFactory.algoliaRestService).searchByDate(eq("filter")); verify(call).enqueue(getStoriesCallback.capture()); AlgoliaClient.AlgoliaHits hits = new GsonBuilder().create().fromJson( "{\"hits\":[{\"objectID\":\"1\"}]}", AlgoliaClient.AlgoliaHits.class); getStoriesCallback.getValue().onResponse(Response.success(hits), null); verify(storiesListener).onResponse(getStoriesResponse.capture()); assertThat(getStoriesResponse.getValue()).hasSize(1); } @Test public void testGetStoriesSuccessSortByPopularity() { client.sSortByTime = false; client.getStories("filter", storiesListener); verify(TestRestServiceFactory.algoliaRestService).search(eq("filter")); verify(call).enqueue(any(Callback.class)); } @Test public void testGetStoriesEmpty() { client.getStories("filter", storiesListener); verify(TestRestServiceFactory.algoliaRestService).searchByDate(eq("filter")); verify(call).enqueue(getStoriesCallback.capture()); AlgoliaClient.AlgoliaHits hits = new GsonBuilder().create().fromJson("{\"hits\":[]}", AlgoliaClient.AlgoliaHits.class); getStoriesCallback.getValue().onResponse(Response.success(hits), null); verify(storiesListener).onResponse(getStoriesResponse.capture()); assertThat(getStoriesResponse.getValue()).isEmpty(); } @Test public void testGetStoriesFailure() { client.getStories("filter", storiesListener); verify(TestRestServiceFactory.algoliaRestService).searchByDate(eq("filter")); verify(call).enqueue(getStoriesCallback.capture()); getStoriesCallback.getValue().onFailure(new Throwable("message")); verify(storiesListener).onError(eq("message")); } @Test public void testGetStoriesFailureNoMessage() { client.getStories("filter", storiesListener); verify(TestRestServiceFactory.algoliaRestService).searchByDate(eq("filter")); verify(call).enqueue(getStoriesCallback.capture()); getStoriesCallback.getValue().onFailure(null); verify(storiesListener).onError(eq("")); } @Module( injects = AlgoliaClientTest.class, overrides = true ) static class TestModule { @Provides @Singleton public RestServiceFactory provideRestServiceFactory() { return new TestRestServiceFactory(); } } }
[ "haduytrung@gmail.com" ]
haduytrung@gmail.com
c0c57663a3b4b51a1f491693494cbcf2d895c3e5
b2da118b560452ded51c53fe943ddc16650fa8d4
/server/src/main/java/com/hengyi/japp/sap/server/application/decorator/SapServiceLogDecorator.java
9f56dee42e338c51143c0260314f2c63a7368bd9
[]
no_license
HengYi-JAPP/japp-sap
5ce5a08518278c3faef7b117bf557d4085327984
9b3f281737dcb8ae8096d043043e96009d531400
refs/heads/master
2021-08-31T23:07:35.627697
2017-12-23T09:46:57
2017-12-23T09:46:57
114,345,400
1
0
null
null
null
null
UTF-8
Java
false
false
2,207
java
package com.hengyi.japp.sap.server.application.decorator; import com.hengyi.japp.sap.ExeRfcResult; import com.hengyi.japp.sap.RfcExeCommand; import com.hengyi.japp.sap.server.application.ApplicationEvents; import com.hengyi.japp.sap.server.application.SapService; import org.slf4j.Logger; import javax.annotation.Resource; import javax.decorator.Decorator; import javax.decorator.Delegate; import javax.ejb.Stateless; import javax.enterprise.concurrent.ManagedScheduledExecutorService; import javax.enterprise.inject.Any; import javax.inject.Inject; import javax.transaction.SystemException; import javax.transaction.UserTransaction; import java.security.Principal; /** * Created by jzb on 17-7-11. */ @Stateless @Decorator public abstract class SapServiceLogDecorator implements SapService { @Inject @Delegate @Any private SapService sapService; @Inject private Logger log; @Resource private ManagedScheduledExecutorService ses; @Inject private ApplicationEvents applicationEvents; @Inject private UserTransaction userTransaction; @Override public ExeRfcResult exeRfc(Principal principal, String rfcName, RfcExeCommand command) throws Exception { long startTimeMillis = System.currentTimeMillis(); try { ExeRfcResult result = sapService.exeRfc(principal, rfcName, command); applicationEvents.rfcSuccessLog(principal, startTimeMillis, rfcName, command, result); return result; } catch (Exception e) { ses.submit(() -> rfcFailLog(principal, startTimeMillis, rfcName, command, e)); throw e; } } private void rfcFailLog(Principal principal, long startTimeMillis, String rfcName, RfcExeCommand command, Exception exception) { try { userTransaction.begin(); applicationEvents.rfcFailLog(principal, startTimeMillis, rfcName, command, exception); userTransaction.commit(); } catch (Exception e) { log.error("", e); try { userTransaction.rollback(); } catch (SystemException e1) { log.error("", e1); } } } }
[ "ixtf1984@gmail.com" ]
ixtf1984@gmail.com
85c097087d13f97874c84521685ae536c8efcbad
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_d366e82ed3607add14d26112d4eb0ae5310f3d97/Document/25_d366e82ed3607add14d26112d4eb0ae5310f3d97_Document_t.java
355ea4c331315fa5c221e1f4929af8088c2f2e60
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,679
java
/** * ****************************************************************************************** * Copyright (C) 2012 - Food and Agriculture Organization of the United Nations (FAO). * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice,this list * of conditions and the following disclaimer. * 2. 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. * 3. Neither the name of FAO nor the names of its contributors may be used to endorse or * promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY,OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ********************************************************************************************* */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.sola.services.digitalarchive.repository.entities; import javax.persistence.Column; import javax.persistence.Id; import javax.persistence.Table; import org.sola.services.common.repository.entities.AbstractVersionedEntity; /** * Entity representing the document.document table. * @author soladev */ @Table(name = "document", schema = "document") public class Document extends AbstractVersionedEntity { public static final String QUERY_WHERE_BYID = "id = #{id}"; public static final String QUERY_ALLOCATENR = "nextval('document.document_nr_seq')"; @Id @Column(name = "id") private String id; @Column(name = "nr") private String nr; @Column(name = "extension") private String extension; @Column(name = "description") private String description; @Column(name = "body") private byte[] body; public Document() { super(); } public String getId() { id = id == null ? generateId() : id; return id; } public void setId(String id) { this.id = id; } public byte[] getBody() { return body; } public void setBody(byte[] body) { //NOSONAR this.body = body; //NOSONAR } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getExtension() { return extension; } public void setExtension(String extension) { this.extension = extension; } public String getNr() { return nr; } public void setNr(String nr) { this.nr = nr; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c4982b8cab547508427d158ffd33573d9c9fcf37
b09fc9f5fd0dc385a0c5157340e30f03b885cbe5
/target/generated-sources/axis2/wsdl2code/src/org/xmlsoap/schemas/soap/encoding/Base64.java
2d8434906956791c654db7e50c8c54c17f035074
[]
no_license
captabhi/FinalSoapRunning
269ec1e68f16ff38b643065959063dfae019c0d4
a5449abaaf677dc7a211a58c3d02d9f67731e904
refs/heads/master
2020-12-20T07:21:14.793835
2020-01-24T12:33:00
2020-01-24T12:33:00
235,999,421
0
0
null
null
null
null
UTF-8
Java
false
false
8,130
java
/* * XML Type: base64 * Namespace: http://schemas.xmlsoap.org/soap/encoding/ * Java type: org.xmlsoap.schemas.soap.encoding.Base64 * * Automatically generated - do not modify. */ package org.xmlsoap.schemas.soap.encoding; /** * An XML base64(@http://schemas.xmlsoap.org/soap/encoding/). * * This is an atomic type that is a restriction of org.xmlsoap.schemas.soap.encoding.Base64. */ public interface Base64 extends org.apache.xmlbeans.XmlBase64Binary { public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType) org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Base64.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.s2E63A6D34488CC503B5176E37E47E568").resolveHandle("base64c455type"); /** * A factory class with static methods for creating instances * of this type. */ public static final class Factory { public static org.xmlsoap.schemas.soap.encoding.Base64 newValue(java.lang.Object obj) { return (org.xmlsoap.schemas.soap.encoding.Base64) type.newValue( obj ); } public static org.xmlsoap.schemas.soap.encoding.Base64 newInstance() { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 newInstance(org.apache.xmlbeans.XmlOptions options) { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); } /** @param xmlAsString the string value to parse */ public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); } /** @param file the file from which to load an xml document */ public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); } public static org.xmlsoap.schemas.soap.encoding.Base64 parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.xmlsoap.schemas.soap.encoding.Base64 parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.xmlsoap.schemas.soap.encoding.Base64 parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return (org.xmlsoap.schemas.soap.encoding.Base64) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); } /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */ public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); } private Factory() { } // No instance of this class allowed } }
[ "abhishek@ipropal.com" ]
abhishek@ipropal.com
44e9636f885c54f9acfb9467d14321d3eef71e83
ed865190ed878874174df0493b4268fccb636a29
/PuridiomRequestForQuotes/src/com/tsa/puridiom/rfqquestion/tasks/RfqQuestionUpdateEntityList.java
11f4f15f83d85b72aaf1b7f22ca8d179b8729713
[]
no_license
zach-hu/srr_java8
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
9b6096ba76e54da3fe7eba70989978edb5a33d8e
refs/heads/master
2021-01-10T00:57:42.107554
2015-11-06T14:12:56
2015-11-06T14:12:56
45,641,885
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package com.tsa.puridiom.rfqquestion.tasks; import com.tsa.puridiom.entity.*; import com.tsagate.foundation.processengine.*; import java.util.*; public class RfqQuestionUpdateEntityList extends Task { public Object executeTask (Object object) throws Exception { Map incomingRequest = (Map)object; Object result = null; try { List rfqQuestionList = (List) incomingRequest.get("rfqQuestionList"); RfqQuestionUpdateById rfqQuestionUpdateTask = new RfqQuestionUpdateById(); for (int i=0; i < rfqQuestionList.size(); i++) { RfqQuestion rfqQuestion = (RfqQuestion) rfqQuestionList.get(i); Map updateParameters = new HashMap(); updateParameters.put("userId", incomingRequest.get("userId")); updateParameters.put("organizationId", incomingRequest.get("organizationId")); updateParameters.put("dbsession", incomingRequest.get("dbsession")); updateParameters.put("rfqQuestion", rfqQuestion); rfqQuestionUpdateTask.executeTask(updateParameters); if (rfqQuestionUpdateTask.getStatus() < Status.SUCCEEDED) { throw new Exception("RfqQuestionUpdateById failed."); } } result = rfqQuestionList; this.setStatus(Status.SUCCEEDED) ; } catch (Exception e) { this.setStatus(Status.FAILED); throw e; } return result; } }
[ "brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466" ]
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
aab96205afa6c6970eb8a28fdf06a042bb854797
9f907527f44fdfc33b5add9f8d313bbeb96d1192
/src/codeforces/contests1301_1400/problemset1360/BuyingShovels.java
10975150e8af956f5170ac943b68716b5cd2b52c
[]
no_license
kocko/algorithms
7af7052b13a080992dcfbff57171a2cac7c50c67
382b6b50538220a26e1af1644e72a4e1796374b6
refs/heads/master
2023-08-03T21:15:27.070471
2023-08-03T14:39:45
2023-08-03T14:39:45
45,342,667
5
0
null
null
null
null
UTF-8
Java
false
false
2,007
java
package codeforces.contests1301_1400.problemset1360; import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class BuyingShovels implements Closeable { private InputReader in = new InputReader(System.in); private PrintWriter out = new PrintWriter(System.out); public void solve() { int t = in.ni(); while (t-- > 0) { int n = in.ni(), k = in.ni(); int result = n; if (n <= k) { result = 1; } else { for (int count = 2; count * count <= n; count++) { if (n % count == 0) { int type = n / count; if (type <= k) { result = Math.min(result, count); } if (count <= k) { result = Math.min(result, type); } } } } out.println(result); } } @Override public void close() throws IOException { in.close(); out.close(); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int ni() { return Integer.parseInt(next()); } public long nl() { return Long.parseLong(next()); } public void close() throws IOException { reader.close(); } } public static void main(String[] args) throws IOException { try (BuyingShovels instance = new BuyingShovels()) { instance.solve(); } } }
[ "konstantin.yovkov@gmail.com" ]
konstantin.yovkov@gmail.com
0857a21143c41d7c993cdbea8c01b0624a42f540
3ade9c0c63f8c7aa5efcd1fc32365200146b8605
/src/main/java/com/ruisitech/ext/service/ExtLoginChecker.java
7da38d65ad1896504d1e3c3c8d72dfcb4c5f1368
[ "Apache-2.0" ]
permissive
ziapple/rsbi
27751c181bc39ed11cddcc445abf31f430d91304
0fb31d7ad28bb1c8fda8fd81e320bf0bda13ee14
refs/heads/master
2022-12-24T01:40:10.868654
2020-01-22T06:56:31
2020-01-22T06:56:31
235,511,663
1
1
Apache-2.0
2022-12-16T09:43:23
2020-01-22T06:18:57
JavaScript
UTF-8
Java
false
false
622
java
package com.ruisitech.ext.service; import javax.servlet.ServletContext; import com.ruisi.ext.engine.control.sys.LoginSecurityAdapter; import com.ruisi.ext.engine.dao.DaoHelper; import com.ruisi.ext.engine.wrapper.ExtRequest; import com.ruisi.ext.engine.wrapper.ExtResponse; public class ExtLoginChecker implements LoginSecurityAdapter { public boolean loginChk(ExtRequest req, ExtResponse arg1, ServletContext ctx, DaoHelper arg2) { /** User user = (User)req.getSession().getAttribute(VdopConstant.USER_KEY_IN_SESSION); if(user == null){ return false; }else{ return true; } **/ return true; } }
[ "ziapple@126.com" ]
ziapple@126.com
e723808b8e8076b81da28cd55092873329172eb4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_5b5b5f836259acb2b918fee8da7061802c1345e8/EventHandler/18_5b5b5f836259acb2b918fee8da7061802c1345e8_EventHandler_s.java
6173fb4af3693a65e33db7ad313a0b30a0fc22bf
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,772
java
package com.ubicomp.iseesomethingyoudont; import java.util.ArrayList; import java.util.Timer; import java.util.TimerTask; import com.h5n1.eventsys.EventSystem; import com.h5n1.eventsys.JsonRequester; import com.h5n1.eventsys.events.ApplicationEvent; import com.h5n1.eventsys.events.ApplicationEvent.ApplicationEventType; import com.h5n1.eventsys.events.CompanionEvent; import com.h5n1.eventsys.events.EventState; import com.h5n1.eventsys.events.GPSEvent; import com.h5n1.eventsys.events.MotionEvent; import com.h5n1.eventsys.events.NavigationEvent; import com.h5n1.eventsys.events.NavigationEvent.NavigationEventType; import com.h5n1.eventsys.events.RFIDEvent; import com.h5n1.eventsys.listener.ApplicationEventListener; import com.h5n1.eventsys.listener.CompanionEventListener; import com.h5n1.eventsys.listener.GPSEventListener; import com.h5n1.eventsys.listener.MotionEventListener; import com.h5n1.eventsys.listener.NavigationEventListener; import com.h5n1.eventsys.listener.RFIDEventListener; public class EventHandler { private GPSEventListener gpsEventListener; private RFIDEventListener rfidEventListener; private MotionEventListener motionEventListener; private CompanionEventListener companionEventListener; private ApplicationEventListener applicationEventListener; private NavigationEventListener navigationEventListener; private ArrayList<Integer> focusedEventIds = new ArrayList<Integer>(); private Timer timer = null; private TimerTask eventsystemTask = null; private ApplicationEvent getAllEvents; public EventHandler(final EventSystem system, final EventToSpeechSynthesis eventToSpeechSynthesis) { // register device ApplicationEvent registerDevice = new ApplicationEvent(JsonRequester.getDeviceID(), ApplicationEventType.CREATE_DEVICE_TABLE); registerDevice.setState(EventState.CREATE_DEVICE_TABLE); EventSystem.pushEvent(registerDevice); // create device table ApplicationEvent createTable = new ApplicationEvent(JsonRequester.getDeviceID(), ApplicationEventType.CREATE_DEVICE_TABLE); createTable.setState(EventState.CREATE_DEVICE_TABLE); EventSystem.pushEvent(createTable); // delete all previous events ApplicationEvent deleteAllEvents = new ApplicationEvent(JsonRequester.getDeviceID(), ApplicationEventType.DELETE_ALL_EVENTS); deleteAllEvents.setState(EventState.DELETE_ALL_EVENTS); EventSystem.pushEvent(deleteAllEvents); // test event double[] val = { 1, 2, 3 }; NavigationEvent nav = new NavigationEvent(JsonRequester.getDeviceID(), NavigationEventType.OBSTACLE_HUMAN, val); nav.setReceiverId(JsonRequester.getDeviceID()); EventSystem.pushEvent(nav); // get all events for this device getAllEvents = new ApplicationEvent("0", ApplicationEventType.GET_ALL_EVENTS); getAllEvents.setState(EventState.GET_ALL_EVENTS); getAllEvents.setReceiverId(JsonRequester.getDeviceID()); gpsEventListener = new GPSEventListener() { @Override public void fired(GPSEvent event) { } }; rfidEventListener = new RFIDEventListener() { @Override public void fired(RFIDEvent event) { } }; motionEventListener = new MotionEventListener() { @Override public void fired(MotionEvent event) { } }; companionEventListener = new CompanionEventListener() { @Override public void fired(CompanionEvent event) { } }; applicationEventListener = new ApplicationEventListener() { @Override public void fired(ApplicationEvent event) { } }; navigationEventListener = new NavigationEventListener() { @Override public void fired(NavigationEvent event) { event.setState(EventState.DELETE_EVENT); eventToSpeechSynthesis.speakNavigaionEvent(event); EventSystem.pushEvent(event); } }; system.addCompanionListener(companionEventListener); system.addGPSListener(gpsEventListener); system.addMotionListener(motionEventListener); system.addRFIDListener(rfidEventListener); system.addApplicationListener(applicationEventListener); system.addNavigationListener(navigationEventListener); timer = new Timer("eventTimer", false); final float timeGap = 1; eventsystemTask = new TimerTask() { @Override public void run() { EventSystem.pushEvent(getAllEvents); system.update(timeGap); // LinkedList<Event> in = system.updateInEvents(timeGap); // HashMap<Event, JSONArray> out = // system.updateOutEvents(timeGap); } }; timer.schedule(eventsystemTask, 2000, (long) (timeGap * 1000)); } public ArrayList<Integer> getFocusedEventIds() { return focusedEventIds; } public void addFocusedEvent(Integer id) { focusedEventIds.add(id); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
41bed946594cae4cb208fcd53edec980ee702469
23c26499c88e74b98909a85d47d302a64f289175
/example/src/main/java/luj/config/example/Main.java
848fcc345210bc8717bdb1bc23cd746ce6aeff6b
[]
no_license
lowZoom/lujconfig
4e4e7b73ee18f7212f26d3d6bef5c43f2c041380
2527a8e52ea1b55baa93b655e231ece2589a5927
refs/heads/master
2022-12-10T06:25:31.970453
2022-12-08T02:32:13
2022-12-08T02:32:13
150,424,284
0
0
null
2022-11-24T09:51:00
2018-09-26T12:37:36
Java
UTF-8
Java
false
false
241
java
package luj.config.example; import luj.config.example.business.m03.ui.SceneUi; final class Main { public static void main(String[] args) { new Main().start(); } private void start() { SceneUi.Factory.create().show(); } }
[ "david_lu_st@163.com" ]
david_lu_st@163.com
ef4dff6b769f8580f968024357c02ee3057649af
3953a0fdfc7da2b47b81c48df0a398850f17da4a
/src/main/java/br/inf/portalfiscal/xsd/cte/evRegMultimodal_v300/ObjectFactory.java
52851fb0b8761d6d13523bc8ff635ce2499da904
[]
no_license
tlmacedo/xsd_Nfe_Cte
83d34088ad063e04906c6c910ac4d501d560d65d
6b3eea5027cf2927323c4247c7c3c7a3349c8be0
refs/heads/main
2023-01-27T14:58:48.453452
2020-12-02T22:53:14
2020-12-02T22:53:14
318,008,134
0
0
null
null
null
null
UTF-8
Java
false
false
5,473
java
// // Este arquivo foi gerado pela Arquitetura JavaTM para Implementaxe7xe3o de Referxeancia (JAXB) de Bind XML, v2.3.1-b171012.0423 // Consulte <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> // Todas as modificaxe7xf5es neste arquivo serxe3o perdidas apxf3s a recompilaxe7xe3o do esquema de origem. // Gerado em: 2020.06.27 xe0s 02:47:10 PM AMT // package br.inf.portalfiscal.xsd.cte.evRegMultimodal_v300; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the br.inf.portalfiscal.xsd.cte.evRegMultimodal_v300 package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { private final static QName _Signature_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Signature"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: br.inf.portalfiscal.xsd.cte.evRegMultimodal_v300 * */ public ObjectFactory() { } /** * Create an instance of {@link ReferenceType } * */ public ReferenceType createReferenceType() { return new ReferenceType(); } /** * Create an instance of {@link SignedInfoType } * */ public SignedInfoType createSignedInfoType() { return new SignedInfoType(); } /** * Create an instance of {@link TRetEvento } * */ public TRetEvento createTRetEvento() { return new TRetEvento(); } /** * Create an instance of {@link TEvento } * */ public TEvento createTEvento() { return new TEvento(); } /** * Create an instance of {@link TEvento.InfEvento } * */ public TEvento.InfEvento createTEventoInfEvento() { return new TEvento.InfEvento(); } /** * Create an instance of {@link EvRegMultimodal } * */ public EvRegMultimodal createEvRegMultimodal() { return new EvRegMultimodal(); } /** * Create an instance of {@link TProcEvento } * */ public TProcEvento createTProcEvento() { return new TProcEvento(); } /** * Create an instance of {@link SignatureType } * */ public SignatureType createSignatureType() { return new SignatureType(); } /** * Create an instance of {@link SignatureValueType } * */ public SignatureValueType createSignatureValueType() { return new SignatureValueType(); } /** * Create an instance of {@link TransformsType } * */ public TransformsType createTransformsType() { return new TransformsType(); } /** * Create an instance of {@link TransformType } * */ public TransformType createTransformType() { return new TransformType(); } /** * Create an instance of {@link KeyInfoType } * */ public KeyInfoType createKeyInfoType() { return new KeyInfoType(); } /** * Create an instance of {@link X509DataType } * */ public X509DataType createX509DataType() { return new X509DataType(); } /** * Create an instance of {@link ReferenceType.DigestMethod } * */ public ReferenceType.DigestMethod createReferenceTypeDigestMethod() { return new ReferenceType.DigestMethod(); } /** * Create an instance of {@link SignedInfoType.CanonicalizationMethod } * */ public SignedInfoType.CanonicalizationMethod createSignedInfoTypeCanonicalizationMethod() { return new SignedInfoType.CanonicalizationMethod(); } /** * Create an instance of {@link SignedInfoType.SignatureMethod } * */ public SignedInfoType.SignatureMethod createSignedInfoTypeSignatureMethod() { return new SignedInfoType.SignatureMethod(); } /** * Create an instance of {@link TRetEvento.InfEvento } * */ public TRetEvento.InfEvento createTRetEventoInfEvento() { return new TRetEvento.InfEvento(); } /** * Create an instance of {@link TEvento.InfEvento.DetEvento } * */ public TEvento.InfEvento.DetEvento createTEventoInfEventoDetEvento() { return new TEvento.InfEvento.DetEvento(); } /** * Create an instance of {@link JAXBElement }{@code <}{@link SignatureType }{@code >} * * @param value * Java instance representing xml element's value. * @return * the new instance of {@link JAXBElement }{@code <}{@link SignatureType }{@code >} */ @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Signature") public JAXBElement<SignatureType> createSignature(SignatureType value) { return new JAXBElement<SignatureType>(_Signature_QNAME, SignatureType.class, null, value); } }
[ "tl.macedo@hotmail.com" ]
tl.macedo@hotmail.com
a5b0961d59a7eb35bdc7b224486a9dd4079455e9
7bd91222d410aa2178bdf10f5aef6114b6e1897f
/Nfc/src/com/android/nfc/cardemulation/EnabledNfcFServices.java
1d2acb58c18eb93feb95d2385a615ea5aaf72dfc
[]
no_license
huimingli/androidsourccode
657c53c26dbdf7e22754e8e8634f5899bf45edb7
74eeb77e12de91e1f14f582a64b550c5f7c33a19
refs/heads/master
2021-04-29T09:48:29.403003
2016-12-30T02:55:09
2016-12-30T02:55:09
77,655,025
3
0
null
null
null
null
UTF-8
Java
false
false
7,865
java
/* * Copyright (C) 2015 The Android Open Source Project * * 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.android.nfc.cardemulation; import java.io.FileDescriptor; import java.io.PrintWriter; import com.android.nfc.ForegroundUtils; import android.app.ActivityManager; import android.content.ComponentName; import android.content.Context; import android.nfc.cardemulation.NfcFServiceInfo; import android.os.Handler; import android.os.Looper; import android.util.Log; public class EnabledNfcFServices implements com.android.nfc.ForegroundUtils.Callback { static final String TAG = "EnabledNfcFCardEmulationServices"; static final boolean DBG = false; final Context mContext; final RegisteredNfcFServicesCache mNfcFServiceCache; final RegisteredT3tIdentifiersCache mT3tIdentifiersCache; final Callback mCallback; final ForegroundUtils mForegroundUtils = ForegroundUtils.getInstance(); final Handler mHandler = new Handler(Looper.getMainLooper()); final Object mLock = new Object(); // Variables below synchronized on mLock ComponentName mForegroundComponent = null; // The computed enabled foreground component ComponentName mForegroundRequested = null; // The component requested to be enabled by fg app int mForegroundUid = -1; // The UID of the fg app, or -1 if fg app didn't request boolean mComputeFgRequested = false; boolean mActivated = false; public interface Callback { void onEnabledForegroundNfcFServiceChanged(ComponentName service); } public EnabledNfcFServices(Context context, RegisteredNfcFServicesCache nfcFServiceCache, RegisteredT3tIdentifiersCache t3tIdentifiersCache, Callback callback) { if (DBG) Log.d(TAG, "EnabledNfcFServices"); mContext = context; mNfcFServiceCache = nfcFServiceCache; mT3tIdentifiersCache = t3tIdentifiersCache; mCallback = callback; } void computeEnabledForegroundService() { if (DBG) Log.d(TAG, "computeEnabledForegroundService"); ComponentName foregroundRequested = null; boolean changed = false; synchronized (mLock) { if (mActivated) { Log.d(TAG, "configuration will be postponed until deactivation"); mComputeFgRequested = true; return; } mComputeFgRequested = false; foregroundRequested = mForegroundRequested; if (mForegroundRequested != null && (mForegroundComponent == null || !mForegroundRequested.equals(mForegroundComponent))) { mForegroundComponent = mForegroundRequested; changed = true; } else if (mForegroundRequested == null && mForegroundComponent != null){ mForegroundComponent = mForegroundRequested; changed = true; } } // Notify if anything changed if (changed) { mCallback.onEnabledForegroundNfcFServiceChanged(foregroundRequested); } } public void onServicesUpdated() { if (DBG) Log.d(TAG, "onServicesUpdated"); // If enabled foreground service is set, remove it boolean changed = false; synchronized (mLock) { if (mForegroundComponent != null) { Log.d(TAG, "Removing foreground enabled service because of service update."); mForegroundRequested = null; mForegroundUid = -1; changed = true; } } if (changed) { computeEnabledForegroundService(); } } public boolean registerEnabledForegroundService(ComponentName service, int callingUid) { if (DBG) Log.d(TAG, "registerEnabledForegroundService"); boolean success = false; synchronized (mLock) { NfcFServiceInfo serviceInfo = mNfcFServiceCache.getService( ActivityManager.getCurrentUser(), service); if (serviceInfo == null) { return false; } else { if (serviceInfo.getSystemCode().equalsIgnoreCase("NULL") || serviceInfo.getNfcid2().equalsIgnoreCase("NULL")) { return false; } } if (service.equals(mForegroundRequested)) { Log.e(TAG, "The servcie is already requested to the foreground service."); return true; } if (mForegroundUtils.registerUidToBackgroundCallback(this, callingUid)) { mForegroundRequested = service; mForegroundUid = callingUid; success = true; } else { Log.e(TAG, "Calling UID is not in the foreground, ignorning!"); } } if (success) { computeEnabledForegroundService(); } return success; } boolean unregisterForegroundService(int uid) { if (DBG) Log.d(TAG, "unregisterForegroundService"); boolean success = false; synchronized (mLock) { if (mForegroundUid == uid) { mForegroundRequested = null; mForegroundUid = -1; success = true; } // else, other UID in foreground } if (success) { computeEnabledForegroundService(); } return success; } public boolean unregisteredEnabledForegroundService(int callingUid) { if (DBG) Log.d(TAG, "unregisterEnabledForegroundService"); // Verify the calling UID is in the foreground if (mForegroundUtils.isInForeground(callingUid)) { return unregisterForegroundService(callingUid); } else { Log.e(TAG, "Calling UID is not in the foreground, ignorning!"); return false; } } @Override public void onUidToBackground(int uid) { if (DBG) Log.d(TAG, "onUidToBackground"); unregisterForegroundService(uid); } public void onHostEmulationActivated() { if (DBG) Log.d(TAG, "onHostEmulationActivated"); synchronized (mLock) { mActivated = true; } } public void onHostEmulationDeactivated() { if (DBG) Log.d(TAG, "onHostEmulationDeactivated"); boolean needComputeFg = false; synchronized (mLock) { mActivated = false; if (mComputeFgRequested) { needComputeFg = true; } } if (needComputeFg) { Log.d(TAG, "do postponed configuration"); computeEnabledForegroundService(); } } public void onNfcDisabled() { synchronized (mLock) { mForegroundComponent = null; mForegroundRequested = null; mActivated = false; mComputeFgRequested = false; mForegroundUid = -1; } } public void onUserSwitched(int userId) { synchronized (mLock) { mForegroundComponent = null; mForegroundRequested = null; mActivated = false; mComputeFgRequested = false; mForegroundUid = -1; } } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { } }
[ "1573717522@qq.com" ]
1573717522@qq.com
ecdebb3cefc715f62dc87d721f2c975e70c729b0
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_35066.java
595965072dd55e130cd4e6701e59c4de8db08e73
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
private Single<Result<Parsed>> fetchAndPersistResult(@Nonnull final Key key){ try { return inFlightRequests.get(key,() -> responseResult(key)); } catch ( ExecutionException e) { return Single.error(e); } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
102beb414da19e03eee6444547b171a012672cf1
435892d084d14b79b6f0da4bcc5b7d67852709e8
/promobackend/src/test/java/br/edu/ifpb/pweb/promobackend/PromobackendApplicationTests.java
1eb254dfaa49ee74c0566f0a3c565069d89ef470
[]
no_license
Wanderfel/promoGames
d46c7da45bf79f9e3b6ee267486bca049c99321a
f6ac5d349eeb19e1b79ba65b0e28e2bd6169d66a
refs/heads/master
2023-08-15T02:29:22.924843
2021-09-30T14:41:21
2021-09-30T14:41:21
395,136,464
0
0
null
null
null
null
UTF-8
Java
false
false
227
java
package br.edu.ifpb.pweb.promobackend; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class PromobackendApplicationTests { @Test void contextLoads() { } }
[ "you@example.com" ]
you@example.com
797d38d0fdbb49330d190091f8272fb99d286ba9
176e6d0562489a13487c55a1153a384487b6c6a6
/sources/org/apache/sanselan/formats/tiff/fieldtypes/FieldTypeByte.java
3d4a3408328af8d4fb08cadf4f7dcc7024ac7173
[]
no_license
Robust-Binaries/PlantNetPlantIdentification_v3.0.2-Extracted
068be5bc2c8b7c0a7c1e37bf46d7dd5638803cb6
bb7b435367232b864aa3b2e96740a4900c91d6ff
refs/heads/master
2020-12-23T22:55:00.284246
2020-01-30T20:34:16
2020-01-30T20:34:16
237,298,297
1
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
package org.apache.sanselan.formats.tiff.fieldtypes; import org.apache.sanselan.ImageWriteException; import org.apache.sanselan.formats.tiff.TiffField; import org.apache.sanselan.util.Debug; public class FieldTypeByte extends FieldType { public FieldTypeByte(int i, String str) { super(i, 1, str); } public Object getSimpleValue(TiffField tiffField) { if (tiffField.length == 1) { return new Byte(tiffField.valueOffsetBytes[0]); } return getRawBytes(tiffField); } public byte[] writeData(Object obj, int i) throws ImageWriteException { if (obj instanceof Byte) { return new byte[]{((Byte) obj).byteValue()}; } else if (obj instanceof byte[]) { return (byte[]) obj; } else { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("Invalid data: "); stringBuffer.append(obj); stringBuffer.append(" ("); stringBuffer.append(Debug.getType(obj)); stringBuffer.append(")"); throw new ImageWriteException(stringBuffer.toString()); } } }
[ "ingale2273@gmail.com" ]
ingale2273@gmail.com
125c69cf67306f4c602a458713168128cae6c351
237347ce23b691c803c7194a6be24089c6f09a52
/src/main/java/com/webflux/study/router/HelloRouter.java
3f48f7e43ba34a0d93ac5d54244cc6d37a9f5545
[]
no_license
whdals7337/spring-webflux-study
8e8f6094e2d9d790167ef97a45d2b1ddf12d0af4
5806f7e74706e6e98f9677d4d43d69cd8bf2847e
refs/heads/master
2023-06-11T15:43:27.225804
2021-06-23T14:43:01
2021-06-23T14:43:01
379,235,186
1
0
null
null
null
null
UTF-8
Java
false
false
719
java
package com.webflux.study.router; import com.webflux.study.handler.HelloHandler; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.web.reactive.function.server.*; @Configuration @RequiredArgsConstructor public class HelloRouter { private final HelloHandler helloHandler; @Bean public RouterFunction<ServerResponse> helloRoute() { return RouterFunctions .route(RequestPredicates.GET("/hello/{name}") .and(RequestPredicates.accept(MediaType.TEXT_PLAIN)), helloHandler::hello); } }
[ "uok02018496@naver.com" ]
uok02018496@naver.com
85de72210a9e037c53463da75533dfec6b926dfa
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
/Core/fi-webgate/src/main/java/com/pay/gateway/validate/crosspay/rule/OrderAmountCheckRule.java
e2f260a038f0a896a922e9bbe11a3b5a7a8396d1
[]
no_license
happyjianguo/pay-1
8631906be62707316f0ed3eb6b2337c90d213bc0
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
refs/heads/master
2020-07-27T19:51:54.958859
2016-12-19T07:34:24
2016-12-19T07:34:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,421
java
/** * File: * Description: * Copyright 2006-2011 pay Corporation. All rights reserved. * Date Author Changes * 2011-9-12 terry Create * */ package com.pay.gateway.validate.crosspay.rule; import org.apache.commons.lang.StringUtils; import com.pay.gateway.dto.CrosspayRequest; import com.pay.gateway.dto.CrosspayResponse; import com.pay.inf.rule.MessageRule; import com.pay.util.StringUtil; /** * 验证网关金额 */ public class OrderAmountCheckRule extends MessageRule { /* * (non-Javadoc) * * @see com.pay.ruleengine.AbstractRule#makeDecision(java.lang.Object) */ @Override protected boolean makeDecision(Object validateBean) throws Exception { CrosspayRequest crosspayApiRequest = (CrosspayRequest) validateBean; CrosspayResponse crosspayApiResponse = crosspayApiRequest.getCrosspayResponse(); String orderAmount = crosspayApiRequest.getOrderAmount(); if(!StringUtil.isEmpty(orderAmount) && orderAmount.trim().length() > 18) { crosspayApiResponse.setResultCode(getMessageId()); crosspayApiResponse.setResultMsg(getMessage()); return false; } if (!StringUtil.isEmpty(orderAmount) && StringUtils.isNumeric(orderAmount) &&Long.valueOf(orderAmount)>0 && orderAmount.length() <= 11) { return true; } else { crosspayApiResponse.setResultCode(getMessageId()); crosspayApiResponse.setResultMsg(getMessage()); return false; } } }
[ "stanley.zou@hrocloud.com" ]
stanley.zou@hrocloud.com
8d2c0a73b4a2ce3a27679d4edbb9e763ce16b7c8
1faf3d7f807cb75f575232693868a1107b7b2d15
/bus-health/src/main/java/org/aoju/bus/health/common/unix/freebsd/FreeBsdLibc.java
89eed1b684fecbc411dde9f2ccce833d3db3f29a
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
yangheqingvip/bus
77f14ffa5637fd139eeb03134b038f6f4cd41502
e90e890e3706747561454d4aa238a8db67a35a29
refs/heads/master
2020-09-22T18:33:06.154944
2019-12-01T15:26:46
2019-12-01T15:26:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,116
java
/* * The MIT License * * Copyright (c) 2017 aoju.org All rights reserved. * * 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.health.common.unix.freebsd; import com.sun.jna.Native; import com.sun.jna.Pointer; import com.sun.jna.Structure; import com.sun.jna.Structure.FieldOrder; import com.sun.jna.ptr.IntByReference; import org.aoju.bus.health.common.unix.CLibrary; /** * C library. This class should be considered non-API as it may be removed * if/when its code is incorporated into the JNA project. * * @author Kimi Liu * @version 5.2.9 * @since JDK 1.8+ */ public interface FreeBsdLibc extends CLibrary { /** * Constant <code>INSTANCE</code> */ FreeBsdLibc INSTANCE = Native.load("libc", FreeBsdLibc.class); /* * Data size */ /** * Constant <code>UINT64_SIZE=Native.getNativeSize(long.class)</code> */ int UINT64_SIZE = Native.getNativeSize(long.class); /** * Constant <code>INT_SIZE=Native.getNativeSize(int.class)</code> */ int INT_SIZE = Native.getNativeSize(int.class); /* * CPU state indices */ /** * Constant <code>CPUSTATES=5</code> */ int CPUSTATES = 5; /** * Constant <code>CP_USER=0</code> */ int CP_USER = 0; /** * Constant <code>CP_NICE=1</code> */ int CP_NICE = 1; /** * Constant <code>CP_SYS=2</code> */ int CP_SYS = 2; /** * Constant <code>CP_INTR=3</code> */ int CP_INTR = 3; /** * Constant <code>CP_IDLE=4</code> */ int CP_IDLE = 4; /** * The sysctl() function retrieves system information and allows processes with * appropriate privileges to set system information. The information available * from sysctl() consists of integers, strings, and tables. * <p> * The state is described using a "Management Information Base" (MIB) style * name, listed in name, which is a namelen length array of integers. * <p> * The information is copied into the buffer specified by oldp. The size of the * buffer is given by the location specified by oldlenp before the call, and * that location gives the amount of data copied after a successful call and * after a call that returns with the error code ENOMEM. If the amount of data * available is greater than the size of the buffer supplied, the call supplies * as much data as fits in the buffer provided and returns with the error code * ENOMEM. If the old value is not desired, oldp and oldlenp should be set to * NULL. * <p> * The size of the available data can be determined by calling sysctl() with the * NULL argument for oldp. The size of the available data will be returned in * the location pointed to by oldlenp. For some operations, the amount of space * may change often. For these operations, the system attempts to round up so * that the returned size is large enough for a call to return the data shortly * thereafter. * <p> * To set a new value, newp is set to point to a buffer of length newlen from * which the requested value is to be taken. If a new value is not to be set, * newp should be set to NULL and newlen set to 0. * * @param name MIB array of integers * @param namelen length of the MIB array * @param oldp Information retrieved * @param oldlenp Size of information retrieved * @param newp Information to be written * @param newlen Size of information to be written * @return 0 on success; sets errno on failure */ int sysctl(int[] name, int namelen, Pointer oldp, IntByReference oldlenp, Pointer newp, int newlen); /** * The sysctlbyname() function accepts an ASCII representation of the name and * internally looks up the integer name vector. Apart from that, it behaves the * same as the standard sysctl() function. * * @param name ASCII representation of the MIB name * @param oldp Information retrieved * @param oldlenp Size of information retrieved * @param newp Information to be written * @param newlen Size of information to be written * @return 0 on success; sets errno on failure */ int sysctlbyname(String name, Pointer oldp, IntByReference oldlenp, Pointer newp, int newlen); /** * The sysctlnametomib() function accepts an ASCII representation of the name, * looks up the integer name vector, and returns the numeric representation in * the mib array pointed to by mibp. The number of elements in the mib array is * given by the location specified by sizep before the call, and that location * gives the number of entries copied after a successful call. The resulting mib * and size may be used in subsequent sysctl() calls to get the data associated * with the requested ASCII name. This interface is intended for use by * applications that want to repeatedly request the same variable (the sysctl() * function runs in about a third the time as the same request made via the * sysctlbyname() function). * <p> * The number of elements in the mib array can be determined by calling * sysctlnametomib() with the NULL argument for mibp. * <p> * The sysctlnametomib() function is also useful for fetching mib prefixes. If * size on input is greater than the number of elements written, the array still * contains the additional elements which may be written programmatically. * * @param name ASCII representation of the name * @param mibp Integer array containing the corresponding name vector. * @param size On input, number of elements in the returned array; on output, the * number of entries copied. * @return 0 on success; sets errno on failure */ int sysctlnametomib(String name, Pointer mibp, IntByReference size); @FieldOrder({"cpu_ticks"}) class CpTime extends Structure { public long[] cpu_ticks = new long[CPUSTATES]; } }
[ "839536@qq.com" ]
839536@qq.com
11d63bc1e8aba28ae93d0d68aff8bf77c9392ea0
4a19037e1a7dbfcb5f76126875e592777682e03b
/SYNCCrowdTracker.v.09.1/src/com/google/appinventor/components/annotations/UsesAssets.java
f9e994de8d518e2266d52e30dce1e82a14c3a784
[]
no_license
jcbacong/SYNCCrowdTracker
405a99d4070fcbfa29b423703c04cecadde3a328
58d71c547b1c18b9529764db2fe144d8c9f78dcf
refs/heads/master
2021-01-10T08:57:33.052247
2016-02-11T15:04:55
2016-02-11T15:04:55
51,518,827
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package com.google.appinventor.components.annotations; import java.lang.annotation.Annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({java.lang.annotation.ElementType.TYPE}) public @interface UsesAssets { String fileNames() default ""; } /* Location: /home/nelmntrx/Desktop/SYNCCrowdTracker/dex2jar-2.0/classes-dex2jar.jar!/com/google/appinventor/components/annotations/UsesAssets.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "bacong.junelle@gmail.com" ]
bacong.junelle@gmail.com
a49e27db84a17d3a722bf7212edf3beec7f91770
7f4f2e506af249ad3b6fc0cd0f32198631b7d946
/src/Atos/Utilities/ShellUtils.java
b30fc42be1b7f913d931955d64a0415ead701bd5
[]
no_license
Javonet-io-user/a2783759-f541-4143-b9a5-8af280fb8ccb
99ebcf2763a72e09fc20a80325f2f4e4837c8b63
f0d5bdf0482ca6ed6967397246a2fd5cbad1a46b
refs/heads/master
2020-05-31T09:24:50.345214
2019-06-04T13:45:20
2019-06-04T13:45:20
190,210,272
0
0
null
null
null
null
UTF-8
Java
false
false
2,084
java
package Atos.Utilities; import Common.Activation; import static Common.JavonetHelper.Convert; import static Common.JavonetHelper.getGetObjectName; import static Common.JavonetHelper.getReturnObjectName; import static Common.JavonetHelper.ConvertToConcreteInterfaceImplementation; import Common.JavonetHelper; import Common.MethodTypeAnnotation; import com.javonet.Javonet; import com.javonet.JavonetException; import com.javonet.JavonetFramework; import com.javonet.api.NObject; import com.javonet.api.NEnum; import com.javonet.api.keywords.NRef; import com.javonet.api.keywords.NOut; import com.javonet.api.NControlContainer; import java.util.concurrent.atomic.AtomicReference; import java.util.Iterator; import java.lang.*; import Atos.Utilities.*; public abstract class ShellUtils { protected NObject javonetHandle; public ShellUtils(NObject handle) { this.javonetHandle = handle; } public void setJavonetHandle(NObject handle) { this.javonetHandle = handle; } /** Method */ @MethodTypeAnnotation(type = "Method") public static void ExecuteCommand(java.lang.String command) { try { Javonet.getType("Atos.Utilities.ShellUtils").invoke("ExecuteCommand", command); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } /** Method */ @MethodTypeAnnotation(type = "Method") public static void ExecuteCommand( java.lang.String command, java.lang.String workingdir, AtomicReference<java.lang.String> output) { try { Javonet.getType("Atos.Utilities.ShellUtils") .invoke( "ExecuteCommand", command, workingdir, new NOut(output, JavonetHelper.JavaToDotnetType.get(java.lang.String.class))); } catch (JavonetException _javonetException) { _javonetException.printStackTrace(); } } static { try { Activation.initializeJavonet(); } catch (java.lang.Exception e) { e.printStackTrace(); } } }
[ "support@javonet.com" ]
support@javonet.com
cafa037c83aed6bf69e5f1336ec567699a42595d
54470d260beea688240be7262955f8f27c81536a
/format-api/src/main/java/com/btmatthews/maven/plugins/ldap/AbstractFormatHandler.java
3fc0184362191e8723021a9a24c202a87aa122b2
[ "Apache-2.0" ]
permissive
cdelmas/ldap-maven-plugin
526ef664b41ace3a39e6213f00a64d901f1ec027
1f5a219f4b765084732746af66033e6fb1df77cb
refs/heads/master
2021-01-24T20:25:43.282963
2015-06-30T15:38:53
2015-06-30T15:38:53
38,294,371
1
0
null
2015-06-30T07:27:31
2015-06-30T07:27:30
null
UTF-8
Java
false
false
6,434
java
/* * Copyright 2013 Brian Thomas Matthews * * 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.btmatthews.maven.plugins.ldap; import com.unboundid.ldap.sdk.*; import com.unboundid.ldif.LDIFChangeRecord; import com.unboundid.ldif.LDIFException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.List; /** * Abstract base class for {@link FormatHandler} objects that import/export directory entries to/from LDAP directory * servers in LDIF and DSML format. * * @author <a href="mailto:brian@btmatthews.com">Brian Matthews</a> * @since 1.2.0 */ public abstract class AbstractFormatHandler implements FormatHandler { /** * Reads directory entries from the input stream and loads them in the LDAP directory server. * * @param connection The connection to the LDAP directory server. * @param inputStream The input stream from which directory entries will be read. * @param ignoreErrors If {@code true} then loading will continue if an error occurs. * @param logger Used to log information or error messages. */ @Override public final void load(final LDAPInterface connection, final InputStream inputStream, final boolean ignoreErrors, final FormatLogger logger) { final FormatReader reader = openReader(inputStream, logger); if (reader != null) { try { boolean keepReading = true; do { try { final LDIFChangeRecord record = reader.nextRecord(); if (record == null) { keepReading = false; } else { record.processChange(connection); } } catch (final LDIFException e) { if (!ignoreErrors || !e.mayContinueReading()) { logger.logError("Error parsing directory entry read from the input stream", e); keepReading = false; } } catch (final LDAPException e) { if (!ignoreErrors) { logger.logError("Error loading directory entry into the LDAP directory server", e); keepReading = false; } } } while (keepReading); } catch (final IOException e) { logger.logError("I/O error reading directory entry from input stream", e); } finally { try { reader.close(); } catch (final IOException e) { logger.logError("I/O error closing the input stream reader", e); } } } } /** * Dump the results of a search against the LDAP directory server to an output stream. * * @param connection The connection to the LDAP directory server. * @param base The base DN from which to start the search. * @param filter Query used to filter the directory entries. * @param outputStream The output stream to which the directory entries are to be written. * @param logger Used to log information or error messages. */ @Override public final void dump(final LDAPInterface connection, final String base, final String filter, final OutputStream outputStream, final FormatLogger logger) { final FormatWriter ldapWriter = createWriter(outputStream, logger); if (ldapWriter == null) { logger.logError("Error creating writer for output stream"); } else { try { try { final SearchRequest request = new SearchRequest(base, SearchScope.SUB, Filter.create(filter)); final SearchResult result = connection.search(request); if (result.getResultCode() == ResultCode.SUCCESS) { final List<SearchResultEntry> entries = result.getSearchEntries(); if (entries != null) { for (final SearchResultEntry entry : entries) { ldapWriter.printEntry(entry); } } else { logger.logInfo("Search did not return any directory entries"); } } else { logger.logError("Search operation failed"); } } catch (final LDAPException e) { logger.logError("Error searching the LDAP directory", e); } finally { ldapWriter.close(); } } catch (final IOException e) { logger.logError("Error writing directory entry to the output stream", e); } } } /** * Create a writer that formats the directory entry before writing it to the output stream. * * @param outputStream The target output stream. * @param logger Used to log information or error messages. * @return A {@link FormatWriter} object. */ protected abstract FormatWriter createWriter(OutputStream outputStream, FormatLogger logger); /** * Create a reader to parse the directory entries as they are read from the input stream. * * @param inputStream The source input stream. * @param logger Used to log information or error messages. * @return A {@link FormatReader} object. */ protected abstract FormatReader openReader(InputStream inputStream, FormatLogger logger); }
[ "brian@btmatthews.com" ]
brian@btmatthews.com
d1849d96705addd7c7d5d2308191c0496adec02e
91db9fb27edda8096979eee4e3dae566ad33543e
/src/main/java/com/github/java/base/concurrency/Consumer.java
fcc5994c0e5f748ff97942619c775f4c0a19fd83
[]
no_license
wenxuejiang610/Java365
0dcfab7b58c05946b5045e2b39caa247fc576f2c
be8efd1c1af7210eb015c03f4db3c5f51b2542a0
refs/heads/master
2023-01-31T04:57:00.702029
2020-11-22T06:50:45
2020-11-22T06:50:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package com.github.java.concurrency; import java.util.Random; /** * @author pengfei.zhao * @date 2020/10/17 13:06 */ public class Consumer implements Runnable{ private Drop drop; public Consumer(Drop drop) { this.drop = drop; } @Override public void run() { Random random = new Random(); for (String message = drop.take(); !message.equals("DONE"); message = drop.take()){ System.out.format("Receive message: %s%n", message); try { Thread.sleep(random.nextInt(5000)); } catch (InterruptedException ignored) { } } } }
[ "1027926875@qq.com" ]
1027926875@qq.com
d606f47e169ccf0b774caae2bbe8e563f07b0436
e695e1be11f912da1265088d07dd4b3ce6dcfef7
/src/f_OOP2/InheritanceBasic.java
8b39acca560179c603ffe3b8a2d4add4970f4700
[]
no_license
so0487/basicJava
3acfeba4b14612d48836da22d3962c4ae64886dd
d0e2b624c8aff9bddbb689590b6023ebe6aa02e9
refs/heads/main
2023-02-08T07:26:35.605450
2020-12-26T05:34:32
2020-12-26T05:34:32
324,489,008
0
0
null
null
null
null
UTF-8
Java
false
false
10,817
java
package f_OOP2; public class InheritanceBasic { public static void main(String[] args) { /* 1.상속(~은 ~이다.) - 기존의 클래스를 재사용하여 새로운 클래스를 작성한다. - 적은 양의 코드로 새로운 클래스를 작성할 수 있다. - 새로 작성하고자 하는 클래스의 뒤에 상속받고자 하는 클래스의 이름을 키워드 'extends'와 함께 써주기만 하면 된다. class Child extends Parent{} - 상속을 해주는 클래스를 '조상클래스', 상속받는 클래스를 '자손클래스'라고 한다. : 조상클래스 = 부모클래스, 상위클래스, 기반클래스 : 자손크래스 = 자식클래스, 하위클래스, 파생된 클래스 - 멤버만 상속된다.(멤버변수와 메서드만 상속) - 자손클래스의 멤버의 개수는 부모클래스 보다 같거나 많다. 2. 포함(~은 ~을 포함하고 있다.) - 상속 이외에 클래스를 재사용하는 또다른 방법 - 한 클래스의 멤버변수로 다른 클래스를 선언하는 방식 3. 단일상속 - 자바에서는 단일상속(2개 이상은 불가능)만 가능하다. - class TVCR extends Tv,VCR{ //VCR은 동시에 쓸 수 없다. } - Tv와 VCR에 동일한 메서드가 존재한다면 어떤 메서드를 상속받을지 알 수 없다. - VCR의 메서드 명을 바꾼다면---> 다중상속은 가능해지겠지만, 지금까지 VCR의 메서드를 사용한 부분들을 모두 바꿔 주어야 한다. 4. Object클래스(모든 클래스의 조상) - 모든 클래스 상속 계층도의 제일 위에 위치하는 조상 클래스 이다. - 다른 클래스로 부터 상속을 받지 않는 모든 클래스는 Object클래스를 자동적으로 상속받게 된다. //컴파일 전 class Tv{ } //컴파일 후 : class Tv extends Object{ Tv(){ super(); } } - 모든 클래스는 Object클래스를 상속 받는다. - equals(). toString()같은 메서드를 따로 정의하지 않고 사용하는 것은 Object클래스를 상속 받기 때문이다. 5. toString() - 인스턴스의 정보를 문자열로 반환할 목적으로 정의되었다. - system.out.println(c) ----->system.out.println(c.toString) (참조형변수.toString)이 포함되어있다. 6. 오버라이드(Override) - 조상클래스로 부터 상속받은 메서드의 내용을 변경(재정의)하는 것 - 오버라이드가 되기 위한 조건 : 자손클래스에서 오버라이드하는 메서드는 조상 클래스의 메서드와 이름은 같아야 한다. 매개변수의 갯수는 같아야 한다. 매개변수의 타입은 같아야 한다. 반환타입은 같아야 한다. => 선언부가 같아야 한다. : 접근제어자는 조상클래스보다 넓은 범위로 변경할 수 없다. : 예외는 부모클래스의 메서드보다 많이 선언할 수 없다. : 인스턴스 메서드를 클래스메서드로 변경할 수 없다. 7. super - 조상클래스의 멤버와 자손클래스의 멤버가 중복정의되어 있을 때 구분할 용도로 만들어 준다. - this.과 근본적으로 같다. 조상의 멤버와 자식의 멤버를 구분한다. - static멤버에는 사용할 수 없다.(인스턴스멤버 간에만 사용가능) --> this. : 인스턴스변수와 지역변수의 이름이 같을 때 구분 용도 8. super() - this() : 생성자 안에서 다른 생성자를 호출----> 생성자의 가장 첫줄에 적어야 한다. - this()와 마찬가지로 생성자 호출 - this()는 같은 클래스의 다른 생성자를 호출 super()조상클래스의 생성자를 호출 - 생성자의 첫줄에서는 항상 조상클래스의 생성자를 호출해야 한다. - 모든 생성자의 첫줄에 super()가 숨어있다. 9. 제어자 - 클래스, 변수 또는 메서드에 선언부에 사용한다. - 접근제어자, 그 외 제어자로 구분 - 접근제어자 : public, protected, default, private 그외 제어자 : static, final, abstract, native......... - static(클래스의, 공통적인) : 멤버변수, 메서드, 초기화 블럭에 사용가능 : static 변수 --> 모든 인스턴스에서 공통적으로 사용된다. --> 인스턴스를 생성하지 않고 호출 가능(클래스명.변수명) --> 클래스가 메모리에 로드될 때 같이 생성된다. - final(마지막의, 변경할 수 없는 : 클래스, 변수, 메서드 사용 가능 : 변수에 사용 시 상수가 된다. : 메서드에 사용 시 오버라이드가 불가능한 메서드가 된다. : 클래스에 사용 시 확장할 수 없는 클래스 즉, 상속이 불가능한 클래스가 된다. - abstract(추상의, 미완성의) : 클래스, 메서드에 사용가능 10. 접근제어자 - public : 접근제한이 없다. - protected : 같은패키지 + 다른 패키지의 자손 클래스 - default : 같은 패키지 내에서 호출가능 - private : 같은 클래스 내에서만 호출가능 - 클래스 : public, default만 클래스 앞에서 사용가능 - 변수와 메서드에는 전부 사용이 가능 11. 생성자의 접근제어자 - 인스턴스의 생성을 제한할 수 있다. - 생성자의 접근제어자를 private으로 지정 : 외부에서 생성자에 접근할 수 없으므로 인스턴스를 생성할 수 없다. : 다른 클래스의 조상이 될 수 없다. : 조상이 될 수 없는 클래스 임으로 final을 추가하여 상속할 수 없는 클래스임을 알려주는 것이 좋다. 12. 다형성(polymorphism) - 여러가지 형태를 가질 수 있는 능력 - 한 타입의 참조변수로 여러타입의 인스턴스를 참조할 수 있다. - 부모타입의 참조변수로 자식타입의 인스턴스를 참조할 수 있다. ※ 데이터관리에 수월 13. 참조변수의 형변환 - 서로 상속관계에 있는 클래스에서만 형변환이 가능하다. - 자손타입->조상타입(up-casting) : 형변환 생략 가능 - 조상타입->자손타입(down-casting) : 형변환 생략 불가 14. instanceof연산자 - 참조하고 있는 인스턴스의 실제타입을 알아보기 위해 사용 - 연산결과가 true라면 참조변수가 검사한 타입으로 형변환이 가능하다. - 클래스메서드 클래스변스처럼 참조변수의 타입에 영향을 받는다. - 참조변수의 타입에 영향을 받지 않는 것은 인스턴스메서드 뿐이다. 15. 매개변수의 다형성 - 참조변수의 다형적인 특징은 메서드의 매개변수에도 적용된다. 16. 여러객체배열, Vector - 배열을 사용할 경우 전체 크기를 한 번 정하면 확장할 수 없다. - 동적으로 관리되는 객체배열이라고 생각하면 된다. Vector() : 10개의 객체를 저장할 수 있는 Vector인스턴스를 생성한다. add() : Vector에 객체를 추가할 때 사용한다. remove() : Vector에서 객체를 제거한다. isEmpty() : Vector가 비어있는지 검사한다. get(int index) : index번째 객체를 반환한다. int size() : 저장된 객체의 갯수를 반환 17. 추상클래스(abstract class) - 미완성된 클래스 : 미완성된 메서드를 포함하고 있다. abstract class 클래스명{ } - 추상메서드 : 메서드는 선언부와 구현부로 구성되어 있다. : 선언부만 작성되고 구현부는 작성되지 않은 메서드 abstract 반환타입 메서드명(변수타입 변수명,....); 18. 인터페이스 - 일종의 추상클래스이지만 추상메서드와 상수만을 멤버로 가진다. - 인터페이스의 작성 interface 인터페이스명{ (public static final) 변수타입 변수명 = 값; (상수형태) (public abstract) 반환타입 메서드명(변수타입 변수명,...); } : 모든 멤버변수는 public static final 이어야 한다. ==> 생략가능 : 모든 메서드는 public abstract이여야 한다. ==> 생략가능 - 인터페이스의 상속 : 인터페이스는 인터페이스만 상속받을 수 있다. : 클래스와 달리 다중상속이 가능하다. : 인터페이스는 클래스와 달리 Object와 같은 최고 조상은 없다. - 인터페이스의 구현 : 인터페이스는 객체 생성이 불가능하다. : 자신에 정의된 추상 메서드의 몸통을 만들어주는 클래스를 작성해야 한다. : 클래스의 상속(extends), 인터페이스의 구현(implements) : 인터페이스의 일부 메서드만 구현하였다면 그 클래스는 추상 클래스가 되어야 한다. : ~able(~을 할 수 있는) 필요한 메서드를 제공한다는 의미를 가지고 있다. - 인터페이스의 다형성 : 인터페이스 타입의 참조변수로 그를 구현한 구현체의 인스턴스를 참조할 수 있다. - 인터페이스의 장점 : 개발시간을 단축 시킬 수 있다. : 표준화가 가능해 진다. : 서로 관계없는 클래스들에게 관계를 맺어줄 수 있다. : 독립적인 프로그래밍이 가능하다. - 인터페이스의 이해 : 클래스를 사용하는 쪽(user)과 제공하는 쪽(provider) : 메서드를 사용하는 쪽에서는 메서드의 선언부만 알면 된다. : A - Interface - B : 인터페이스를 통한 간접적인 접근 19. 내부 클래스(Inner Class) - 내부클래스란? : 클래스내에 선언된 클래스이다. : 서로 쉽게 접근할 수 있고 외부에서 볼 때 불필요한 클래스를 감춤으로 복잡성을 줄일 수 있다. - 인스턴스클래스(Instance class) : 외부클래스의 인스턴스 멤버들과 관련된 작업을 수행한다. - 스태틱클래스(Static class) : 외부클래스의 클래스 멤버들과 관련된 작업을 수행한다.(클래스메서드) - 지역클래스(local class) : 외부클래스의 메서드 또는 초기화블럭안에 선언, 선언영역 내에서만 사용가능 - 익명클래스(Anonymous class) : 클래스의 선언과 객체의 생성을 동시에 하는 이름 없는 클래스 */ } }
[ "so04876725@gmail.com" ]
so04876725@gmail.com
2ce62fc0315171e425f448ce38dc461cb3b6cbf5
087feb78ac7f1529ac84f0549d4bf28e32e27896
/app/src/main/java/com/app/soccerveteranv/KakaoSDKAdapter.java
c8abaf23c6da91a47927184b33c80736f998f5d0
[]
no_license
ishimsungbo/SoccerVeteranv
7f834039477a57c3441920d946e957c08380ed58
ab03e839a525f3bb112313b6f5fe8eca24875dc1
refs/heads/master
2021-01-10T18:37:13.269368
2016-05-11T11:07:38
2016-05-11T11:07:38
57,943,898
0
0
null
null
null
null
UTF-8
Java
false
false
1,633
java
package com.app.soccerveteranv; import android.app.Activity; import android.content.Context; import com.kakao.auth.ApprovalType; import com.kakao.auth.AuthType; import com.kakao.auth.IApplicationConfig; import com.kakao.auth.ISessionConfig; import com.kakao.auth.KakaoAdapter; /** * @author leoshin on 15. 9. 15. */ public class KakaoSDKAdapter extends KakaoAdapter { /** * Session Config에 대해서는 default값들이 존재한다. * 필요한 상황에서만 override해서 사용하면 됨. * @return Session의 설정값. */ @Override public ISessionConfig getSessionConfig() { return new ISessionConfig() { @Override public AuthType[] getAuthTypes() { return new AuthType[] {AuthType.KAKAO_LOGIN_ALL}; } @Override public boolean isUsingWebviewTimer() { return false; } @Override public ApprovalType getApprovalType() { return ApprovalType.INDIVIDUAL; } @Override public boolean isSaveFormData() { return true; } }; } @Override public IApplicationConfig getApplicationConfig() { return new IApplicationConfig() { @Override public Activity getTopActivity() { return GlobalApplication.getCurrentActivity(); } @Override public Context getApplicationContext() { return GlobalApplication.getGlobalApplicationContext(); } }; } }
[ "ishimsungbo@gmail.com" ]
ishimsungbo@gmail.com
5f2c404c5cb88301997ccc8b59abdb0e2524ea83
4aec95860d19548b8784ebd49264bf53b1d0ca63
/src/结构型模式/装饰器模式/Main.java
7dc25143685e54d846a4e0c0aecb80639965b0bf
[]
no_license
Simplehippo/GOF
5e0a018ecf464673c85e1c49fcf706a82a2a9781
8faa123813d85b0fec510729255b50a7f45327bc
refs/heads/master
2021-05-16T19:25:56.418653
2020-03-27T05:16:31
2020-03-27T05:16:31
250,437,907
0
0
null
null
null
null
UTF-8
Java
false
false
757
java
package 结构型模式.装饰器模式; import 结构型模式.装饰器模式.decorator.Lemon; import 结构型模式.装饰器模式.decorator.Mongo; /** * 装饰器模式:类似于代理模式,都是对原始对象增强。 * 与代理模式的区别点:装饰出来的对象可能会增强出新的方法,例如LineNumberInputStream会多出获取行号的方法,但也会导致损坏面向接口的模式。 */ public class Main { public static void main(String[] args) { Beverage beverage = new GreenTea(); beverage = new Lemon(beverage); beverage = new Lemon(beverage); beverage = new Mongo(beverage); System.out.println(beverage.getDescription() + " cost: " + beverage.cost()); } }
[ "you@example.com" ]
you@example.com
5e254d04a5c77c2f8789ef4be8f6ff027f2a1fe8
0ab68d4fa2f45d928d4e2147ffa94d2ebb30bf5d
/uberfire-workbench/src/main/java/org/uberfire/client/workbench/widgets/panel/SimpleFocusedResizePanel.java
8413b2155d02812030b0a8998f45877adc1ee059
[ "Apache-2.0" ]
permissive
lucasponce/uberfire
5c003309b9bfe8da39017b159cba686614e71372
304550072367081d3a3cab5aeede65f4d509eef7
refs/heads/master
2021-01-17T22:13:33.963937
2013-07-11T04:48:15
2013-07-11T04:48:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,328
java
package org.uberfire.client.workbench.widgets.panel; import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.SpanElement; import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.dom.client.HasFocusHandlers; import com.google.gwt.event.logical.shared.HasSelectionHandlers; import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.RequiresResize; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; import org.uberfire.client.workbench.part.WorkbenchPartPresenter; import org.uberfire.client.workbench.widgets.dnd.DragArea; import org.uberfire.client.workbench.widgets.dnd.WorkbenchDragAndDropManager; import org.uberfire.workbench.model.PartDefinition; public class SimpleFocusedResizePanel extends Composite implements RequiresResize, HasSelectionHandlers<PartDefinition>, HasFocusHandlers { interface SimpleFocusedResizePanelBinder extends UiBinder<FlowPanel, SimpleFocusedResizePanel> { } private static SimpleFocusedResizePanelBinder uiBinder = GWT.create( SimpleFocusedResizePanelBinder.class ); @UiField SimplePanel title; @UiField FlowPanel header; @UiField SimplePanel content; private PartDefinition partDefinition; private boolean isDndEnabled = false; private WorkbenchDragAndDropManager dndManager; public SimpleFocusedResizePanel() { initWidget( uiBinder.createAndBindUi( this ) ); // container.addClickHandler( new ClickHandler() { // @Override // public void onClick( final ClickEvent event ) { // SelectionEvent.fire( SimpleFocusedResizePanel.this, partDefinition ); // } // } ); } public void setDndManager( WorkbenchDragAndDropManager dndManager ) { this.dndManager = dndManager; } public void enableDnd() { this.isDndEnabled = true; } public void setPart( final WorkbenchPartPresenter.View part ) { this.partDefinition = part.getPresenter().getDefinition(); content.setWidget( part ); final Widget _title = buildTitle( part.getPresenter().getTitle() ); title.add( _title ); if ( isDndEnabled ) { dndManager.makeDraggable( part, _title ); } } private Widget buildTitle( final String title ) { final SpanElement spanElement = Document.get().createSpanElement(); spanElement.setInnerText( title ); return new DragArea() {{ add( spanElement ); }}; } public void clear() { partDefinition = null; content.clear(); title.clear(); } public void setFocus( boolean hasFocus ) { if ( hasFocus ) { //style } else { //style } } public void changeTitle( final String title, final IsWidget titleDecoration ) { //this.title.setText( title ); } @Override public HandlerRegistration addSelectionHandler( final SelectionHandler<PartDefinition> handler ) { return addHandler( handler, SelectionEvent.getType() ); } @Override public HandlerRegistration addFocusHandler( FocusHandler handler ) { // return container.addFocusHandler( handler ); return null; } @Override public void onResize() { if ( isAttached() ) { final int width = getParent().getOffsetWidth(); final int height = getParent().getOffsetHeight(); setPixelSize( width, height ); content.setPixelSize( width, height - title.getOffsetHeight() ); if ( content.getWidget() != null ) { content.getWidget().setPixelSize( width, height - title.getOffsetHeight() ); } } } }
[ "alexandre.porcelli@gmail.com" ]
alexandre.porcelli@gmail.com
58e521f2b46c08bd485457103d4140d84ebd4e4a
804e36c3ab9daeb10ca82cd9e045bf38a170ed0f
/troy-trade-exchange-api/src/main/java/com/troy/trade/exchange/api/model/dto/out/market/OpenOrdersListResDto.java
74034aff92a583f67ce4743dc0afdc9c6a2e98d7
[]
no_license
troyproject/troy-trade-exchange-public
40785c503c9745d0fcc04745e7a75789cb4e55ee
1e290561297205f9a61160ba767a78754dc72034
refs/heads/master
2021-07-06T10:01:01.794215
2020-01-10T09:04:26
2020-01-10T09:04:26
232,982,678
2
3
null
2021-04-26T19:52:14
2020-01-10T06:38:05
Java
UTF-8
Java
false
false
509
java
package com.troy.trade.exchange.api.model.dto.out.market; import com.troy.commons.dto.out.ResData; import lombok.Data; import lombok.Getter; import lombok.Setter; import java.util.List; @Setter @Getter public class OpenOrdersListResDto extends ResData { private List<OpenOrdersResDto> myTradeResDtoList; public OpenOrdersListResDto() { super(); } public OpenOrdersListResDto(List<OpenOrdersResDto> myTradeResDtoList) { this.myTradeResDtoList = myTradeResDtoList; } }
[ "376704341@qq.com" ]
376704341@qq.com