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
a5fdc8ad24ed7709068179630264243d3b7632be
56adea945b27ccaf880decadb7f7cb86de450a8d
/core/ep-core/src/main/java/com/elasticpath/csvimport/impl/ImportCouponUsageDtoRunnerCsvImpl.java
a63d91b15eee0f9ba947d0e834c5e14b08d5abf1
[]
no_license
ryanlfoster/ep-commerce-engine-68
89b56878806ca784eca453d58fb91836782a0987
7364bce45d25892e06df2e1c51da84dbdcebce5d
refs/heads/master
2020-04-16T04:27:40.577543
2013-12-10T19:31:52
2013-12-10T20:01:08
40,164,760
1
1
null
2015-08-04T05:15:25
2015-08-04T05:15:25
null
UTF-8
Java
false
false
1,532
java
package com.elasticpath.csvimport.impl; import org.apache.commons.lang.StringUtils; import com.elasticpath.domain.rules.CouponConfig; import com.elasticpath.domain.rules.CouponUsage; import com.elasticpath.base.exception.EpServiceException; import com.elasticpath.service.rules.CouponConfigService; /** * * ImportDtoJobRUnnerCsvImpl for CouponUsage and CouponConfig. * */ public class ImportCouponUsageDtoRunnerCsvImpl extends ImportDtoJobRunnerCsvImpl<CouponUsage, CouponConfig> { // This class is just for generic declaration // how can make it by spring configuration? private CouponConfigService couponConfigService; /** * Set the couponConfigService. * * @param couponConfigService the couponConfigService */ public void setCouponConfigService(final CouponConfigService couponConfigService) { this.couponConfigService = couponConfigService; } /** * Get the dependent object. * * @return the couponConfig object. */ protected CouponConfig getDependentObjectGuid() { String parameterStr = getImportJobRequest().getParameter(); String[] parameterNameAndValue = StringUtils.split(parameterStr, "="); String parameterName = parameterNameAndValue[0]; String parameterValue = parameterNameAndValue[1]; if ("COUPON_CONFIG_GUID".equals(parameterName)) { String couponConfigGuid = parameterValue; return couponConfigService.findByCode(couponConfigGuid); } throw new EpServiceException("Import parameter error, the parameter COUPON_CONFIG_GUID cannot be found"); } }
[ "chris.gomes@pearson.com" ]
chris.gomes@pearson.com
dffc8f566b9e546f135698b4e0db9af52881623b
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/4/org/jfree/chart/renderer/xy/XYBarRenderer_getBase_363.java
7fc2e881ea358eab0e01ca48b61cec4036d2d9d2
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,726
java
org jfree chart render render draw bar link plot xyplot requir link interv dataset intervalxydataset shown gener code bar chart demo1 xybarchartdemo1 java code program includ free chart jfreechart demo collect img src imag bar render sampl xybarrenderersampl png alt bar render sampl xybarrenderersampl png bar render xybarrender abstract item render abstractxyitemrender return base bar base bar set base setbas base getbas base
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
97beb1f6624ee150d7f4d9b5fb4c8dc5bfc2b32b
012e9bd5bfbc5ceca4e36af55a7ddf4fce98b403
/code/app/src/main/java/com/yzb/card/king/ui/transport/presenter/ShuttlePlanePersenter.java
1dee2e87c12068581d011fa8a288696590defc67
[]
no_license
litliang/ms
a7152567c2f0e4d663efdda39503642edd33b4b6
d7483bc76d43e060906c47acc1bc2c3179838249
refs/heads/master
2021-09-01T23:51:50.934321
2017-12-29T07:30:49
2017-12-29T07:30:49
115,697,248
1
0
null
null
null
null
UTF-8
Java
false
false
1,407
java
package com.yzb.card.king.ui.transport.presenter; import com.yzb.card.king.http.HttpConstant; import com.yzb.card.king.ui.base.BaseViewLayerInterface; import com.yzb.card.king.http.DataCallBack; import com.yzb.card.king.ui.transport.model.IShuttlePlane; import com.yzb.card.king.ui.transport.model.impl.ShuttlePlaneImpl; import java.util.Map; /** * 类名: ShuttlePlanePersenter * 作者: Lei Chao. * 日期: 2016-09-05 * 描述: */ public class ShuttlePlanePersenter implements DataCallBack { private BaseViewLayerInterface view; private IShuttlePlane plane; public ShuttlePlanePersenter(BaseViewLayerInterface shuttleView) { this.view = shuttleView; plane = new ShuttlePlaneImpl(); plane.setOnDataLoadFinish(this); } public void sendCardTypeRequest(Map<String, Object> params, String serviceName) { plane.sendCardTypeRequest(params, serviceName); } @Override public void requestSuccess(Object o, int type) { view.callSuccessViewLogic(o,1); } @Override public void requestFailedDataCall(Object o, int type) { if (type == 1) { if (o != null && o instanceof Map) { Map<String, String> map = (Map<String, String>) o; view.callFailedViewLogic(map.get(HttpConstant.SERVER_ERROR),1); } } } }
[ "864631546@qq.com" ]
864631546@qq.com
66788cbdfb535990534d2fd8eee378a55dec24d7
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/com/google/gson/internal/ConstructorConstructor.java
a7c92de8221151a0f2bed8fd3729375cc3bdd750
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,525
java
package com.google.gson.internal; import com.google.gson.InstanceCreator; import com.google.gson.JsonIOException; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Queue; import java.util.Set; import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap; public final class ConstructorConstructor { private final Map<Type, InstanceCreator<?>> instanceCreators; public ConstructorConstructor(Map<Type, InstanceCreator<?>> instanceCreators2) { this.instanceCreators = instanceCreators2; } public <T> ObjectConstructor<T> get(TypeToken<T> typeToken) { final Type type = typeToken.getType(); Class<? super T> rawType = typeToken.getRawType(); final InstanceCreator<T> typeCreator = this.instanceCreators.get(type); if (typeCreator != null) { return new ObjectConstructor<T>() { public T construct() { return typeCreator.createInstance(type); } }; } final InstanceCreator<T> rawTypeCreator = this.instanceCreators.get(rawType); if (rawTypeCreator != null) { return new ObjectConstructor<T>() { public T construct() { return rawTypeCreator.createInstance(type); } }; } ObjectConstructor<T> defaultConstructor = newDefaultConstructor(rawType); if (defaultConstructor != null) { return defaultConstructor; } ObjectConstructor<T> defaultImplementation = newDefaultImplementationConstructor(type, rawType); if (defaultImplementation != null) { return defaultImplementation; } return newUnsafeAllocator(type, rawType); } private <T> ObjectConstructor<T> newDefaultConstructor(Class<? super T> rawType) { try { final Constructor<? super T> constructor = rawType.getDeclaredConstructor(new Class[0]); if (!constructor.isAccessible()) { constructor.setAccessible(true); } return new ObjectConstructor<T>() { public T construct() { try { return constructor.newInstance(null); } catch (InstantiationException e) { throw new RuntimeException("Failed to invoke " + constructor + " with no args", e); } catch (InvocationTargetException e2) { throw new RuntimeException("Failed to invoke " + constructor + " with no args", e2.getTargetException()); } catch (IllegalAccessException e3) { throw new AssertionError(e3); } } }; } catch (NoSuchMethodException e) { return null; } } private <T> ObjectConstructor<T> newDefaultImplementationConstructor(final Type type, Class<? super T> rawType) { if (Collection.class.isAssignableFrom(rawType)) { if (SortedSet.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { return new TreeSet(); } }; } if (EnumSet.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { if (type instanceof ParameterizedType) { Type elementType = ((ParameterizedType) type).getActualTypeArguments()[0]; if (elementType instanceof Class) { return EnumSet.noneOf((Class) elementType); } throw new JsonIOException("Invalid EnumSet type: " + type.toString()); } throw new JsonIOException("Invalid EnumSet type: " + type.toString()); } }; } if (Set.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { return new LinkedHashSet(); } }; } if (Queue.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { return new ArrayDeque(); } }; } return new ObjectConstructor<T>() { public T construct() { return new ArrayList(); } }; } else if (!Map.class.isAssignableFrom(rawType)) { return null; } else { if (ConcurrentNavigableMap.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { return new ConcurrentSkipListMap(); } }; } if (ConcurrentMap.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { return new ConcurrentHashMap(); } }; } if (SortedMap.class.isAssignableFrom(rawType)) { return new ObjectConstructor<T>() { public T construct() { return new TreeMap(); } }; } if (!(type instanceof ParameterizedType) || String.class.isAssignableFrom(TypeToken.get(((ParameterizedType) type).getActualTypeArguments()[0]).getRawType())) { return new ObjectConstructor<T>() { public T construct() { return new LinkedTreeMap(); } }; } return new ObjectConstructor<T>() { public T construct() { return new LinkedHashMap(); } }; } } private <T> ObjectConstructor<T> newUnsafeAllocator(final Type type, final Class<? super T> rawType) { return new ObjectConstructor<T>() { private final UnsafeAllocator unsafeAllocator = UnsafeAllocator.create(); public T construct() { try { return this.unsafeAllocator.newInstance(rawType); } catch (Exception e) { throw new RuntimeException("Unable to invoke no-args constructor for " + type + ". Registering an InstanceCreator with Gson for this type may fix this problem.", e); } } }; } public String toString() { return this.instanceCreators.toString(); } }
[ "dstmath@163.com" ]
dstmath@163.com
23d520e3a2ab49cd3ed01e70dddcf862adde980c
8c8c53b84851e130822079186a9a5dfc181f4f58
/lingshi/src/lingshi/web/model/RequestHolder.java
f42b2ce96ddd8cb6d6487a1e7a32883bdacc4e64
[]
no_license
pptoon/lingshiframework
b3a4cf4985d23bcbabb2ab49b8303b92d6801014
3319d6285233daa9e0afa7b8342231a35b2e1366
refs/heads/master
2020-03-09T06:44:32.748431
2018-03-26T02:41:18
2018-03-26T02:41:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,693
java
package lingshi.web.model; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.springframework.web.context.ContextLoader; import com.alibaba.fastjson.JSON; import lingshi.model.LingShiConfig; import lingshi.valid.StringValid; public class RequestHolder { private HttpServletResponse response; private HttpServletRequest request; private HttpSession session; private String token; private RequestFile requestFile; private LingShiConfig config; private static LingShiTokenAndUserPool pool; private RequestHolder(HttpServletRequest request, HttpServletResponse response) { this.response = response; this.request = request; this.session = request.getSession(); this.config = (LingShiConfig) ContextLoader.getCurrentWebApplicationContext().getBean(LingShiConfig.class); pool = LingShiTokenAndUserPool.getLingShiTokenAndUserPool(); this.token = request.getHeader("AccessToken"); } public static RequestHolder get(HttpServletRequest request, HttpServletResponse response) { RequestHolder requestHolder = new RequestHolder(request, response); return requestHolder; } public HttpSession getSession() { return this.session; } public HttpServletRequest getRequest() { return request; } public HttpServletResponse getResponse() { return response; } public RequestFile getRequestFile() { if (requestFile == null) { try { requestFile = new RequestFile(this.request); } catch (Exception e) { requestFile = null; Logger.getRootLogger().info(e); } } return requestFile; } /** * 设置用户 * * @throws Exception */ public void addClientUser(Object user) throws Exception { LingShiToken token = null; if (config.getUseSSO() == true) { // 判断是否启用了单点登陆 token = pool.addTokenUser(user, config.getAppKey()); } else { token = pool.updateTokenUser(user); } if(token==null){ //当不存在时需要执行添加 token = pool.addTokenUser(user, config.getAppKey()); } Cookie cookie = new Cookie("LingShi_Token", token.getToken()); cookie.setMaxAge(60 * 60 * 24 * 15); cookie.setPath("/"); if (!StringValid.isNullOrEmpty(config.getDomain())) { cookie.setDomain(config.getDomain()); } response.addCookie(cookie); response.setHeader("AccessToken", token.getToken()); } /** * 修改token中的User * * @param user * @throws Exception */ public void updateClientUser(Object user)throws Exception{ LingShiToken token = pool.updateTokenUser(user); if(token==null){ //当不存在时需要执行添加 token = pool.addTokenUser(user, config.getAppKey()); } Cookie cookie = new Cookie("LingShi_Token", token.getToken()); cookie.setMaxAge(60 * 60 * 24 * 15); cookie.setPath("/"); if (!StringValid.isNullOrEmpty(config.getDomain())) { cookie.setDomain(config.getDomain()); } response.addCookie(cookie); response.setHeader("AccessToken", token.getToken()); } /** * 移除登陆用户 */ public void removeClientUser() { pool.removeTokenUser(token); } /** * 获取用户 * * @return * @throws Exception */ public Object getClientUser() { LingShiToken result = pool.getToken(token); return result == null ? null : result.getData(); } public void fail(String msg) { fail(msg, null, null); } public void fail(Object data) { fail(null, data, null); } public void fail() { fail(null, null, null); } public void fail(String msg, Object data) { fail(msg, data, null); } public void fail(String msg, Object data, String msgcode) { ResponseData responseData = new ResponseData(); responseData.fail(msg, data, msgcode); try { String json = JSON.toJSONString(responseData); Logger.getRootLogger().info("return json : " + json); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(json); response.getWriter().close(); } catch (Exception e) { Logger.getRootLogger().error(e); } } public void err(String msg, Exception e) { err(msg, null, null, e); } public void err(Object data, Exception e) { err(null, data, null, e); } public void err(Exception e) { err(null, null, null, e); } public void err(String msg, Object data, Exception e) { err(msg, data, null, e); } public void err(String msg, Object data, String msgcode, Exception err) { Logger.getRootLogger().error(err); ResponseData responseData = new ResponseData(); responseData.fail(msg, data, msgcode); try { String json = JSON.toJSONString(responseData); Logger.getRootLogger().info("return json : " + json); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(json); response.getWriter().close(); } catch (Exception e) { Logger.getRootLogger().error(e); } } public void success(String msg) { success(msg, null, null); } public void success() { success(null, null, null); } public void success(Object obj) { success(null, obj, null); } public void success(String msg, Object obj) { success(msg, obj, null); } public void success(String msg, Object obj, String msgcode) { ResponseData responseData = new ResponseData(); responseData.success(msg, obj, msgcode); try { String json = JSON.toJSONString(responseData); Logger.getRootLogger().info("return json : " + json); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(json); response.getWriter().close(); } catch (Exception e) { Logger.getRootLogger().error(e); } } public void entity(Object object) { try { String json = JSON.toJSONString(object); Logger.getRootLogger().info("return json : " + json); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(json); response.getWriter().close(); } catch (Exception e) { Logger.getRootLogger().error(e); } } /** * 获取当前Web根目录物理路径 * * @return */ public String getRealPathPath(String path) { if (path != null && path.length() > 0 && path.substring(0, 1).equals("/")) { path = path.substring(1); } return this.request.getServletContext().getRealPath("/") + path; } }
[ "1126670571@qq.com" ]
1126670571@qq.com
68136e0b0e7c1b62cfd1108709465f1cce7175a4
ac9abcb25dfeb41df2dffb4608d0d69795526d1a
/src/com/toolbox/cms/entity/assist/CmsVoteSubTopic.java
a6b50d3783c1ff90ebfbf3dcd0adb1ce5afe7647
[]
no_license
nextflower/toolbox
d7716f1a1b838b217aba08c76eac91005f56092a
d002c6db442fb1078ae5356fe577d4ec63309b19
refs/heads/master
2016-09-05T13:04:34.875755
2015-05-12T10:47:40
2015-05-12T10:47:40
35,481,909
1
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
package com.toolbox.cms.entity.assist; import com.toolbox.cms.entity.assist.base.BaseCmsVoteSubTopic; import com.toolbox.common.hibernate3.PriorityInterface; @SuppressWarnings("unchecked") public class CmsVoteSubTopic extends BaseCmsVoteSubTopic implements PriorityInterface,Comparable{ private static final long serialVersionUID = 1L; public boolean getIsRadio(){ if(getType()==1){ return true; }else{ return false; } } public boolean getIsMulti(){ if(getType()==2){ return true; }else{ return false; } } public boolean getIsText(){ if(getType()==3){ return true; }else{ return false; } } public int compareTo(Object o) { return getPriority(); } /*[CONSTRUCTOR MARKER BEGIN]*/ public CmsVoteSubTopic () { super(); } /** * Constructor for primary key */ public CmsVoteSubTopic (java.lang.Integer id) { super(id); } /** * Constructor for required fields */ public CmsVoteSubTopic ( java.lang.Integer id, com.toolbox.cms.entity.assist.CmsVoteTopic voteTopic, java.lang.String title, java.lang.Integer type, java.lang.Integer priority) { super ( id, voteTopic, title, type, priority); } /*[CONSTRUCTOR MARKER END]*/ }
[ "dv3333@163.com" ]
dv3333@163.com
41550880bc539fdfef6bb0ff549932da97beddb9
f404f7198c91a0f91ed6d6dd0a1cda9adf3edbb1
/com/planet_ink/coffee_mud/core/intermud/cm1/commands/Monitor.java
65773b6d73e91257f85b14506f23d1562bd72526
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bbailey/ewok
1f1d35b219a6ebd33fd3ad3d245383d075ef457d
b4fcf4ba90c7460b19d0af56a3ecabbc88470f6f
refs/heads/master
2020-04-05T08:27:05.904034
2017-02-01T04:14:19
2017-02-01T04:14:19
656,100
0
0
null
null
null
null
UTF-8
Java
false
false
3,783
java
package com.planet_ink.coffee_mud.core.intermud.cm1.commands; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.intermud.cm1.RequestHandler; import com.planet_ink.coffee_mud.core.intermud.cm1.commands.Listen.ListenCriterium; import com.planet_ink.coffee_mud.core.intermud.cm1.commands.Listen.Listener; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.ChannelsLibrary; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.channels.SocketChannel; import java.nio.channels.spi.SelectorProvider; import java.io.*; import java.util.concurrent.atomic.*; /* Copyright 2010-2016 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Monitor extends Listen { @Override public String getCommandWord() { return "MONITOR"; } public Monitor(RequestHandler req, String parameters) { super(req, parameters); } @Override protected void sendMsg(Listener listener, String msg) throws IOException { synchronized(listener) { listener.msgs.add(listener.channelName+": "+msg); } } @Override public void run() { try { String name; String rest=""; final int x=parameters.indexOf(' '); if(x>0) { name=parameters.substring(0,x).trim(); if(name.trim().length()==0) name=null; else rest=parameters.substring(x+1).trim(); } else name=null; if(name==null) { req.sendMsg("[FAIL No "+getCommandWord()+"ER name given]"); return; } final List<ListenCriterium> crit=getCriterium(rest); if(crit==null) return; else if(crit.size()==0) { final List<String> msgs=new LinkedList<String>(); for(final Listener l : listeners) { if(l.channelName.equalsIgnoreCase(name)) { synchronized(l) { for(final Iterator<String> i = l.msgs.iterator();i.hasNext();) { final String s=i.next(); msgs.add(s); i.remove(); } } } } if(msgs.size()==0) req.sendMsg("[FAIL NONE]"); else { req.sendMsg("[OK /MESSAGES:"+msgs.size()+"]"); for(final String s : msgs) req.sendMsg("[MESSAGE "+s+"]"); } } else { final Listener newListener = new Listener(name,crit.toArray(new ListenCriterium[0])); CMLib.commands().addGlobalMonitor(newListener); req.addDependent(newListener.channelName, newListener); listeners.add(newListener); req.sendMsg("[OK]"); } } catch(final Exception ioe) { Log.errOut(className,ioe); req.close(); } } }
[ "nosanity79@gmail.com" ]
nosanity79@gmail.com
b543e509c0b772e3361198d9cdc8a6fb0bd5ae4e
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
/hl7/model/V2_51/table/Table0341.java
8e404e232a3869f9834f6913adc887415e083c99
[]
no_license
nlp-lap/Version_Compatible_HL7_Parser
8bdb307aa75a5317265f730c5b2ac92ae430962b
9977e1fcd1400916efc4aa161588beae81900cfd
refs/heads/master
2021-03-03T15:05:36.071491
2020-03-09T07:54:42
2020-03-09T07:54:42
245,967,680
0
0
null
null
null
null
UTF-8
Java
false
false
356
java
package hl7.model.V2_51.table; import hl7.bean.table.Table; public class Table0341 extends Table{ private static final String VERSION = "2.5.1"; public static Table getInstance(){ if(table==null) new Table0341(); return table; } private Table0341(){ setTableName("Guarantor Credit Rating Code"); setOID("2.16.840.1.113883.12.341"); } }
[ "terminator800@hanmail.net" ]
terminator800@hanmail.net
f052736500e27567ceb416ead07815b8911a71b5
98db62fb49fffe151933dc94978ae171f65ffe5b
/src/share/classes/java/util/UUID.java
2be56e83205711396b1cdc2ce518c5ca620c66f8
[]
no_license
isaacreath/jdk8
07a16ec6d142a6c72a5498259efe83587616e08a
4d793f9a7a165aea5fc3c599baf74cf97ba08fe5
refs/heads/master
2023-04-25T21:48:42.166290
2017-08-14T01:14:52
2017-08-14T01:14:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,389
java
package java.util; import java.security.*; public final class UUID implements java.io.Serializable, Comparable<UUID> { private static final long serialVersionUID = -4856846361193249489L; private final long mostSigBits; private final long leastSigBits; private static class Holder { static final SecureRandom numberGenerator = new SecureRandom(); } // Constructors and Factories private UUID(byte[] data) { long msb = 0; long lsb = 0; assert data.length == 16 : "data must be 16 bytes in length"; for (int i=0; i<8; i++) msb = (msb << 8) | (data[i] & 0xff); for (int i=8; i<16; i++) lsb = (lsb << 8) | (data[i] & 0xff); this.mostSigBits = msb; this.leastSigBits = lsb; } public UUID(long mostSigBits, long leastSigBits) { this.mostSigBits = mostSigBits; this.leastSigBits = leastSigBits; } public static UUID randomUUID() { SecureRandom ng = Holder.numberGenerator; byte[] randomBytes = new byte[16]; ng.nextBytes(randomBytes); randomBytes[6] &= 0x0f; randomBytes[6] |= 0x40; randomBytes[8] &= 0x3f; randomBytes[8] |= 0x80; return new UUID(randomBytes); } public static UUID nameUUIDFromBytes(byte[] name) { MessageDigest md; try { md = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException nsae) { throw new InternalError("MD5 not supported", nsae); } byte[] md5Bytes = md.digest(name); md5Bytes[6] &= 0x0f; md5Bytes[6] |= 0x30; md5Bytes[8] &= 0x3f; md5Bytes[8] |= 0x80; return new UUID(md5Bytes); } public static UUID fromString(String name) { String[] components = name.split("-"); if (components.length != 5) throw new IllegalArgumentException("Invalid UUID string: "+name); for (int i=0; i<5; i++) components[i] = "0x"+components[i]; long mostSigBits = Long.decode(components[0]).longValue(); mostSigBits <<= 16; mostSigBits |= Long.decode(components[1]).longValue(); mostSigBits <<= 16; mostSigBits |= Long.decode(components[2]).longValue(); long leastSigBits = Long.decode(components[3]).longValue(); leastSigBits <<= 48; leastSigBits |= Long.decode(components[4]).longValue(); return new UUID(mostSigBits, leastSigBits); } // Field Accessor Methods public long getLeastSignificantBits() { return leastSigBits; } public long getMostSignificantBits() { return mostSigBits; } public int version() { // Version is bits masked by 0x000000000000F000 in MS long return (int)((mostSigBits >> 12) & 0x0f); } public int variant() { // This field is composed of a varying number of bits. // 0 - - Reserved for NCS backward compatibility // 1 0 - The IETF aka Leach-Salz variant (used by this class) // 1 1 0 Reserved, Microsoft backward compatibility // 1 1 1 Reserved for future definition. return (int) ((leastSigBits >>> (64 - (leastSigBits >>> 62))) & (leastSigBits >> 63)); } public long timestamp() { if (version() != 1) { throw new UnsupportedOperationException("Not a time-based UUID"); } return (mostSigBits & 0x0FFFL) << 48 | ((mostSigBits >> 16) & 0x0FFFFL) << 32 | mostSigBits >>> 32; } public int clockSequence() { if (version() != 1) { throw new UnsupportedOperationException("Not a time-based UUID"); } return (int)((leastSigBits & 0x3FFF000000000000L) >>> 48); } public long node() { if (version() != 1) { throw new UnsupportedOperationException("Not a time-based UUID"); } return leastSigBits & 0x0000FFFFFFFFFFFFL; } // Object Inherited Methods public String toString() { return (digits(mostSigBits >> 32, 8) + "-" + digits(mostSigBits >> 16, 4) + "-" + digits(mostSigBits, 4) + "-" + digits(leastSigBits >> 48, 4) + "-" + digits(leastSigBits, 12)); } private static String digits(long val, int digits) { long hi = 1L << (digits * 4); return Long.toHexString(hi | (val & (hi - 1))).substring(1); } public int hashCode() { long hilo = mostSigBits ^ leastSigBits; return ((int)(hilo >> 32)) ^ (int) hilo; } public boolean equals(Object obj) { if ((null == obj) || (obj.getClass() != UUID.class)) return false; UUID id = (UUID)obj; return (mostSigBits == id.mostSigBits && leastSigBits == id.leastSigBits); } // Comparison Operations public int compareTo(UUID val) { // The ordering is intentionally set up so that the UUIDs // can simply be numerically compared as two numbers return (this.mostSigBits < val.mostSigBits ? -1 : (this.mostSigBits > val.mostSigBits ? 1 : (this.leastSigBits < val.leastSigBits ? -1 : (this.leastSigBits > val.leastSigBits ? 1 : 0)))); } }
[ "3200601@qq.com" ]
3200601@qq.com
e87d6a4c7a1cd23694c8d1e596706bddc770f27c
b77bf23ba60db5794445b8204317ed8b7388a2fd
/gg/sulfur/client/impl/events/StrafeEvent.java
e78f33456a761e832bb9a321c6b2aa26121e8a39
[]
no_license
SulfurClient/Sulfur
f41abb5335ae9617a629ced0cde4703ef7cc5f2c
e54efe14bb52d09752f9a38d7282f0d1cd81e469
refs/heads/main
2022-07-29T03:18:53.078298
2022-02-02T15:09:34
2022-02-02T15:09:34
426,418,356
2
0
null
null
null
null
UTF-8
Java
false
false
2,643
java
package gg.sulfur.client.impl.events; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import gg.sulfur.client.api.event.Event; public class StrafeEvent extends Event { private final State state; private double strafe; private double forward; private double friction; private double jumpHeight; private boolean silent; private float yaw; private float pitch; private double multi; public StrafeEvent(double strafe, double forward, double friction, float yaw, float pitch, State state) { this.strafe = strafe; this.forward = forward; this.friction = friction; this.yaw = yaw; this.pitch = pitch; this.state = state; } public StrafeEvent(float rotationYaw, double forward, double height) { this(0, forward, 0, rotationYaw, 0, State.JUMP); this.jumpHeight = height; } public double getStrafe() { return strafe; } public void setStrafe(double strafe) { this.strafe = strafe; } public double getForward() { return forward; } public void setForward(double forward) { this.forward = forward; } public double getFriction() { return friction; } public void setFriction(double friction) { this.friction = friction; } public float getYaw() { return yaw; } public void setYaw(float yaw) { this.yaw = yaw; } public State getState() { return state; } public double getJumpHeight() { return jumpHeight; } public void setJumpHeight(double jumpHeight) { this.jumpHeight = jumpHeight; } public boolean isSilent() { return silent; } public void setSilent(boolean silent) { this.silent = silent; } public float getPitch() { return pitch; } public void setPitch(float pitch) { this.pitch = pitch; } public void setHorizontalBoost(double multi) { this.multi = multi; } public double getHorizontalBoost() { return multi; } public void doJump(Entity entity) { entity.motionY = jumpHeight; if (entity.isSprinting()) { double var1 = entity.rotationYaw * 0.017453292F; entity.motionX -= Math.sin(var1) * multi; entity.motionZ += Math.cos(var1) * multi; } } public void removeMotion() { Minecraft.getMinecraft().thePlayer.motionX = 0; Minecraft.getMinecraft().thePlayer.motionZ = 0; } public enum State { JUMP, STRAFE } }
[ "45654930+Kansioo@users.noreply.github.com" ]
45654930+Kansioo@users.noreply.github.com
08e2642c37d7763773029d17d9d6c685bb4507fc
6f45503a19da3e0dbd9a12c1b2f022671f1926e8
/src/SearchHelloWorld.java
45b5ebc239030cd461c12556678ab7ff5d94baa5
[]
no_license
kermek/selenium-hello-world
115bd7184bbe325ac539a87f31f422a0e26f7cad
79a56d096d86891e6bb351b5b3fdb38b09141bfe
refs/heads/master
2020-08-09T20:00:45.618210
2019-10-10T11:33:08
2019-10-10T11:33:08
214,162,613
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.Test; public class SearchHelloWorld { private WebDriver driver; @Test public void helloWorld() { ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("w3c", true); options.setHeadless(false); driver = new ChromeDriver(options); driver.get("http://www.google.com"); WebElement search = driver.findElement(By.name("q")); search.sendKeys("Hello World" + Keys.ENTER); Assert.assertTrue(driver.getTitle().contains("Hello World"), "Search failed"); } @AfterTest public void tearDown() { driver.close(); } }
[ "user@mail.com" ]
user@mail.com
ae3857d5dd2b78a67c6f78473600801800145184
c38c47ad9e9cd9f87404ef1e5260799cfe2fc8d0
/android-sample/app/src/main/java/vn/edu/techkids/mahr/activity/MainActivity.java
419829d78d3105647a7b0182d7670e05afec7987
[]
no_license
qhuydtvt/techkids-intern
b7b93e19ea865602b22835f6767e31868b878fb2
b730f53f814e01b4501b594f5bf09d2d7c3d08c1
refs/heads/master
2021-01-01T05:30:08.354324
2016-05-27T09:25:05
2016-05-27T09:25:05
58,451,262
0
0
null
null
null
null
UTF-8
Java
false
false
6,852
java
package vn.edu.techkids.mahr.activity; import android.app.DialogFragment; import android.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Gravity; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.TextView; import android.widget.Toast; import vn.edu.techkids.mahr.R; import vn.edu.techkids.mahr.adapter.AgencyRecyclerViewAdapter; import vn.edu.techkids.mahr.enitity.Agency; import vn.edu.techkids.mahr.enitity.Cloud; import vn.edu.techkids.mahr.fragment.BaseDialogFragment; import vn.edu.techkids.mahr.fragment.NationalitySelectionFragment; import vn.edu.techkids.mahr.fragment.ScreenManager; public class MainActivity extends AppCompatActivity implements ScreenManager, AgencyRecyclerViewAdapter.OnAgencyListFragmentInteractionListener { private FragmentManager mFragmentManager; private Menu menu; private MenuItem mShareMenuItem; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setTheme(R.style.AppTheme_NoActionBar); this.setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); //getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#29B6F6"))); /*hideActionBar();*/ getIntances(); // Worker worker = new Worker(); // worker.setId(0); // worker.setExcel_path(""); // openFragment(new NationalitySelectionFragment(), true); BaseDialogFragment.setScreenManager(this); //openFragment(new WorkerDetailFragment(), true); } private void getIntances() { mFragmentManager = getFragmentManager(); } @Override public boolean onOptionsItemSelected(MenuItem item) { if(item.getItemId() != R.id.action_share){ onBackPressed(); overridePendingTransition(R.anim.trans_right_in, R.anim.trans_right_out); } else if (item.getItemId() == R.id.action_share) { Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); sharingIntent.setType("text/plain"); sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here"); sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Cloud.getInstance().getUrlLink()); startActivity(Intent.createChooser(sharingIntent, Cloud.getInstance().getUrlLink())); //openFragment(new WorkerListFragment(), true); overridePendingTransition(R.anim.trans_right_in, R.anim.trans_right_out); } return true; } @Override /** * Open new screen * @param fragment * @param addToBackStack */ public void openFragment(Fragment fragment, boolean addToBackStack) { FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.trans_left_in, R.anim.trans_left_out); fragmentTransaction.replace(R.id.fl_job_list, fragment) .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); if (addToBackStack) { fragmentTransaction.addToBackStack(fragment.getClass().getName()); } fragmentTransaction.commit(); } @Override public boolean back() { if (mFragmentManager.getBackStackEntryCount() > 1) { mFragmentManager.popBackStack(); return true; } else { return false; } } @Override public void showActionBar() { getSupportActionBar().show(); } @Override public void hideDisplayHomeButton() { getSupportActionBar().setDisplayHomeAsUpEnabled(false); } @Override public void showDisplayHomeButton() { getSupportActionBar().setDisplayHomeAsUpEnabled(true); } @Override public void hideActionBar() { getSupportActionBar().hide(); } @Override public void setActionBarColor(String color) { getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(color))); } @Override public void showDialogFragment(DialogFragment dialogFragment, String tag) { dialogFragment.show(mFragmentManager, tag); } @Override public void setTitleOfActionBar(String titles) { ActionBar actionBar = getSupportActionBar(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); View view = getLayoutInflater().inflate(R.layout.action_bar_home, null); TextView title = (TextView) view.findViewById(R.id.ma_action_bar_title); actionBar.setCustomView(view, new ActionBar.LayoutParams( ActionBar.LayoutParams.WRAP_CONTENT, ActionBar.LayoutParams.WRAP_CONTENT, Gravity.CENTER ) ); title.setText(titles); actionBar.setDisplayHomeAsUpEnabled(true); } @Override public void showShareButtonOnRightActionBar() { // MenuItem item = (MenuItem)this.menu.findItem(R.id.action_share); // item.setVisible(true); mShareMenuItem.setVisible(true); this.invalidateOptionsMenu(); } @Override public void hidenButtonActionBar() { MenuItem itemShare = (MenuItem) menu.findItem(R.id.action_share); itemShare.setVisible(false); } @Override public Context getContext() { return this; } @Override public void showMessage(String text) { Context context = getApplicationContext(); int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); } public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu_list_jobs, menu); this.menu = menu; mShareMenuItem = (MenuItem) menu.findItem(R.id.action_share); mShareMenuItem.setVisible(false); return super.onCreateOptionsMenu(menu); } @Override public void onBackPressed() { if(!back()) super.onBackPressed(); } @Override public void onListFragmentInteraction(Agency item) { } }
[ "qhuydtvt@gmail.com" ]
qhuydtvt@gmail.com
a8b935edba4d1c8e42b2d1789d5a13b4ac3fa7d0
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project31/src/test/java/org/gradle/test/performance31_2/Test31_127.java
bf3f4ee2c0e9b994b6e6c719832b6592a8c06aa5
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance31_2; import static org.junit.Assert.*; public class Test31_127 { private final Production31_127 production = new Production31_127("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c33735210052c9e166c758ce6ed3b7899f4bc2af
70d838e359599899e303dcabf83de8721748e186
/Imagine/image-editor-api/src/main/java/org/imagine/editor/api/PaintingStyle.java
14ae58b49ce148bda429b281d45d9d3cdddbd829
[]
no_license
timboudreau/imagine
b30fd24351a2cb6473db00e4a4b04b844a79445b
294317a0a4ae7cf1db2d423c2974bef237147650
refs/heads/master
2023-08-31T09:38:52.324126
2023-06-12T04:16:59
2023-06-12T04:16:59
95,410,344
5
0
null
2023-08-23T17:54:31
2017-06-26T05:07:57
Java
UTF-8
Java
false
false
1,439
java
package org.imagine.editor.api; import org.openide.util.NbBundle; /** * * @author Tim Boudreau */ public enum PaintingStyle { OUTLINE_AND_FILL, OUTLINE, FILL; @Override public String toString() { return NbBundle.getMessage(PaintingStyle.class, name()); } public static PaintingStyle forDrawAndFill(boolean draw, boolean fill) { if (!draw && !fill) { return OUTLINE_AND_FILL; } if (draw && fill) { return OUTLINE_AND_FILL; } else if (draw && !fill) { return OUTLINE; } else { return FILL; } } public PaintingStyle andDrawn() { return forDrawAndFill(true, isFill()); } public PaintingStyle andFilled() { return forDrawAndFill(isOutline(), true); } public PaintingStyle notDrawn() { return forDrawAndFill(false, isFill()); } public PaintingStyle notFilled() { return forDrawAndFill(isOutline(), false); } public boolean isOutline() { switch (this) { case OUTLINE: case OUTLINE_AND_FILL: return true; default: return false; } } public boolean isFill() { switch (this) { case FILL: case OUTLINE_AND_FILL: return true; default: return false; } } }
[ "tim@timboudreau.com" ]
tim@timboudreau.com
650fd54e4196712790b32b43e942d831ac2e25b7
4bbfa242353fe0485fb2a1f75fdd749c7ee05adc
/ims-core/framework/com/ailk/openbilling/persistence/imsintf/entity/BillItem.java
06e0e72190ab3e8c28110fd06f431e8849c17aab
[]
no_license
859162000/infosystem
88b23a5b386600503ec49b14f3b4da4df7a6d091
96d4d50cd9964e713bb95520d6eeb7e4aa32c930
refs/heads/master
2021-01-20T04:39:24.383807
2017-04-01T10:59:24
2017-04-01T10:59:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,652
java
package com.ailk.openbilling.persistence.imsintf.entity; import javax.persistence.Entity; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessType; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.builder.HashCodeBuilder; import com.ailk.easyframe.web.common.dal.IComplexEntity; import jef.codegen.support.NotModified; /** * This class is generated automatically by Asiainfo-Linkage EasyFrame. */ @NotModified @Entity @XmlAccessorType(XmlAccessType.FIELD) @XmlType(propOrder={"bill_item","unpay_fee","discount_fee","adjust_fee","prim_fee","billDetaillist"}) public class BillItem implements IComplexEntity{ @XmlElement(name="billDetaillist") private BillDetailList billDetaillist; @XmlElement(name="bill_item") private Integer bill_item; @XmlElement(name="unpay_fee") private long unpay_fee; @XmlElement(name="discount_fee") private Long discount_fee; @XmlElement(name="adjust_fee") private Long adjust_fee; @XmlElement(name="prim_fee") private Long prim_fee; public void setBillDetaillist(BillDetailList obj){ this.billDetaillist = obj; } public BillDetailList getBillDetaillist(){ return billDetaillist; } public void setBill_item(Integer obj){ this.bill_item = obj; } public Integer getBill_item(){ return bill_item; } public void setUnpay_fee(long obj){ this.unpay_fee = obj; } public long getUnpay_fee(){ return unpay_fee; } public void setDiscount_fee(Long obj){ this.discount_fee = obj; } public Long getDiscount_fee(){ return discount_fee; } public void setAdjust_fee(Long obj){ this.adjust_fee = obj; } public Long getAdjust_fee(){ return adjust_fee; } public void setPrim_fee(Long obj){ this.prim_fee = obj; } public Long getPrim_fee(){ return prim_fee; } public boolean equals(final Object rhs0){ if (rhs0 == null)return false; BillItem rhs=(BillItem)rhs0; if(!ObjectUtils.equals(billDetaillist, rhs.billDetaillist)) return false; if(!ObjectUtils.equals(bill_item, rhs.bill_item)) return false; if(!ObjectUtils.equals(unpay_fee, rhs.unpay_fee)) return false; if(!ObjectUtils.equals(discount_fee, rhs.discount_fee)) return false; if(!ObjectUtils.equals(adjust_fee, rhs.adjust_fee)) return false; if(!ObjectUtils.equals(prim_fee, rhs.prim_fee)) return false; return true; } public int hashCode(){ return new HashCodeBuilder() .append(billDetaillist) .append(bill_item) .append(unpay_fee) .append(discount_fee) .append(adjust_fee) .append(prim_fee) .toHashCode(); } }
[ "ljyshiqian@126.com" ]
ljyshiqian@126.com
32433b613dbb547949b506419ecdb190680c056e
5211a5dfeaad7499f15e73347a9945840d174e01
/src/main/java/com/aplos/common/BackingPageUrl.java
ba98c0559365103c9ef1be3552af6b79a7451bd6
[]
no_license
aplossystems/aplos-common
f406a5633480dfdb354a6de070facd9c5d2bf4bc
6a08a5acb1509ac9b033031c0f4ed60e7ad6cb92
refs/heads/master
2022-09-25T11:38:31.300861
2021-07-18T22:07:01
2021-07-18T22:07:01
38,530,563
0
2
null
2022-09-01T22:42:57
2015-07-04T10:36:40
Java
UTF-8
Java
false
false
2,726
java
package com.aplos.common; import com.aplos.common.backingpage.BackingPage; import com.aplos.common.beans.Website; import com.aplos.common.utils.CommonUtil; public class BackingPageUrl extends AplosUrl { private Class<? extends BackingPage> backingPageClass; private String sitePackageName; private boolean isAddingExtension; public BackingPageUrl(Class<? extends BackingPage> backingPageClass) { this( Website.getCurrentWebsiteFromTabSession(), backingPageClass, true ); } public BackingPageUrl(Class<? extends BackingPage> backingPageClass, String queryParameters) { this( Website.getCurrentWebsiteFromTabSession(), backingPageClass, true ); addQueryParameters(queryParameters); } public BackingPageUrl( Class<? extends BackingPage> backingPageClass, boolean addExtension ) { this( Website.getCurrentWebsiteFromTabSession(), backingPageClass, addExtension ); } public BackingPageUrl( Website site, Class<? extends BackingPage> backingPageClass, boolean addExtension ) { this( (String) null, backingPageClass, addExtension ); if( site != null ) { setSitePackageName( site.getPackageName() ); } } public BackingPageUrl( String sitePackageName, Class<? extends BackingPage> backingPageClass, boolean addExtension ) { setSitePackageName(sitePackageName); setBackingPageClass(backingPageClass); setAddingExtension(addExtension); } @Override public String getPath() { if( getBackingPageClass() != null ) { String viewName = CommonUtil.firstLetterToLowerCase( getBackingPageClass().getSimpleName() ); String viewUrl = getBackingPageClass().getName().replace( getBackingPageClass().getSimpleName(), viewName ); viewUrl = "/" + viewUrl.replaceFirst( "^(com\\.aplos\\.)(.*)(backingpage.)(.*)(Page)$", "$2$4" ).replace(".", "/"); String returnString; if( CommonUtil.isNullOrEmpty( getSitePackageName() ) || viewUrl.startsWith( "/" + getSitePackageName() + "/" ) ) { returnString = viewUrl; } else { returnString = "/" + getSitePackageName() + viewUrl; } if (isAddingExtension()) { returnString += ".jsf"; } return returnString; } else { return null; } } public Class<? extends BackingPage> getBackingPageClass() { return backingPageClass; } public void setBackingPageClass(Class<? extends BackingPage> backingPageClass) { this.backingPageClass = backingPageClass; } public boolean isAddingExtension() { return isAddingExtension; } public void setAddingExtension(boolean isAddingExtension) { this.isAddingExtension = isAddingExtension; } public String getSitePackageName() { return sitePackageName; } public void setSitePackageName(String sitePackageName) { this.sitePackageName = sitePackageName; } }
[ "info@aplossystems.co.uk" ]
info@aplossystems.co.uk
d68a7f3d7e542ce9585a94e14cbbcc05e57ef6a7
50313190a25e7fe65fa4be9b78e1c655d28bb0d6
/tests/org.eclipse.wazaabi.engine.swt.tests/src/org/eclipse/wazaabi/engine/swt/tests/widgets/TestLabel.java
61baae1f91cf5c9a97cc9b64ecbacf05628cd9e8
[]
no_license
isabella232/wazaabi
9fbf7a35bdee6d3871d7e42bced66d32ac0d39c4
88ea8973a5520a9ebab94b75a192889390df5355
refs/heads/master
2023-03-26T20:41:17.339903
2013-07-04T22:06:32
2013-07-04T22:06:32
352,057,534
0
0
null
2021-03-27T11:39:17
2021-03-27T11:38:33
null
UTF-8
Java
false
false
2,406
java
/******************************************************************************* * Copyright (c) 2008 Olivier Moises * * 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: * Olivier Moises- initial API and implementation *******************************************************************************/ package org.eclipse.wazaabi.engine.swt.tests.widgets; import org.eclipse.wazaabi.engine.swt.tests.AbstractCommandTest; import org.eclipse.wazaabi.engine.swt.tests.SWTUtils; import org.eclipse.wazaabi.mm.core.styles.CoreStylesFactory; import org.eclipse.wazaabi.mm.core.styles.StringRule; import org.eclipse.wazaabi.mm.core.widgets.CoreWidgetsFactory; import org.eclipse.wazaabi.mm.core.widgets.Label; import org.junit.Assert; import org.junit.Test; public class TestLabel extends AbstractCommandTest { private static final String TEXT = "Hello World"; //$NON-NLS-1$ private Label label; @Override public void before() { super.before(); // create the PushButton label = CoreWidgetsFactory.eINSTANCE.createLabel(); } @Override public void after() { mainShell.open(); super.after(); } @Test public void testModelLabelTextSetBeforeViewerSetContentsEqualsSWTButtonText() { // set the PushButton's text StringRule textRule = CoreStylesFactory.eINSTANCE.createStringRule(); textRule.setPropertyName("text"); //$NON-NLS-1$ textRule.setValue(TEXT); label.getStyleRules().add(textRule); // render the content viewer.setContents(label); org.eclipse.swt.widgets.Label swtLabel = (org.eclipse.swt.widgets.Label) SWTUtils.getWidget(viewer, label); Assert.assertEquals(TEXT, swtLabel.getText()); } @Test public void testModelLabelTextSetAfterViewerSetContentsEqualsSWTButtonText() { // Set the content viewer.setContents(label); org.eclipse.swt.widgets.Label swtLabel = (org.eclipse.swt.widgets.Label) SWTUtils.getWidget(viewer, label); // set the PushButton's text StringRule textRule = CoreStylesFactory.eINSTANCE.createStringRule(); textRule.setPropertyName("text"); //$NON-NLS-1$ textRule.setValue(TEXT); label.getStyleRules().add(textRule); Assert.assertEquals(TEXT, swtLabel.getText()); } }
[ "olivier@generic-concept.com" ]
olivier@generic-concept.com
5d209b08fffa2a1cdbaff705c11db9b8e91f559b
bf744ba24a594529fc2e6729afe19a20b70d6fde
/Proj-supergenius-XO/Usweb/src/main/java/com/supergenius/xo/usweb/serviceimpl/ContentSOImpl.java
10c3d8f5e466b407441013a3fffb3e3180b9af66
[]
no_license
greatgy/Code
4e3fc647999d0ff94933c0ff85bf08228de62a1f
e198b7cf90a40e531235fa9e88df211e1978e177
refs/heads/master
2021-10-27T16:27:19.551730
2019-04-18T09:43:07
2019-04-18T09:43:07
182,007,387
0
0
null
null
null
null
UTF-8
Java
false
false
1,209
java
package com.supergenius.xo.usweb.serviceimpl; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.genius.core.base.utils.StrUtil; import com.genius.xo.base.dao.BaseDao; import com.genius.xo.base.serviceimpl.BaseSOImpl; import com.supergenius.xo.common.constants.MapperDict; import com.supergenius.xo.usweb.dao.ContentDao; import com.supergenius.xo.usweb.entity.Content; import com.supergenius.xo.usweb.service.ContentSO; /** * 内容SO实现 * * @author JiaShitao * @date 2018年9月19日09:47:55 */ @Service("uswebContentSOImpl") public class ContentSOImpl extends BaseSOImpl<Content> implements ContentSO { @Autowired private ContentDao dao; @Override protected BaseDao<Content> getDao() { return dao; } @Override public boolean add(Content content) { return dao.insert(content); } @Override public boolean update(Content content) { return dao.update(content); } @Override public Content getContentByName(String name) { if (!StrUtil.isEmpty(name)) { Map<String, Object> map = getParamMap(); map.put(MapperDict.name, name); return dao.getOne(map); } return null; } }
[ "18519764453@163.com" ]
18519764453@163.com
f18373d7501b9e4e15840753771702b3b83a0ede
d19cab4b4a09c275b86e3340f55e191152a23156
/src/main/java/com/yalmon/agent/app/ext/provider/CommandListProvider.java
22efe4cf8a2e253ced6e66d365fc5f31e3eae897
[ "MIT" ]
permissive
canmogol/yalmon-agent
eb895c251be12b471e311ea653db5e1068f7195f
b3b669c483b1f5766238b364be7363d2d24c781b
refs/heads/master
2020-08-23T18:36:03.976245
2019-11-25T23:04:09
2019-11-25T23:04:09
216,683,473
1
1
MIT
2020-01-31T18:24:14
2019-10-21T23:29:55
Java
UTF-8
Java
false
false
546
java
package com.yalmon.agent.app.ext.provider; import java.util.Map; /** * Provides a list of commands for a given distribution. */ public interface CommandListProvider { /** * Returns the commands and their labels for a given distribution. * * @param distribution distro name, such as 'ubuntu' or 'rhel' * @throws CommandListProviderException on read/find/get commands errors. * @return label and command map. */ Map<String, String> getCommands(String distribution) throws CommandListProviderException; }
[ "canmogol@gmail.com" ]
canmogol@gmail.com
776cbf0f8e7ee49e1f46f6469c397b21912fa6d2
e9a9ebd570dba2d6bc19514dcf9c9c1f9f1de879
/src/main/java/com/yinzhiwu/yiwu/zhangkaitao/common/utils/security/Base32.java
62f6bfe9231decd175895273ac4a887796f09041
[]
no_license
ping-0123/yiwu
b868f4b31ee5591e10cfd2818364bb38d0e0a7bd
eeaa6981b0836555f76b8528382e7d461cdacbed
refs/heads/master
2021-01-19T10:52:52.386288
2017-12-08T05:24:36
2017-12-08T05:24:36
87,905,504
0
1
null
null
null
null
UTF-8
Java
false
false
6,289
java
package com.yinzhiwu.yiwu.zhangkaitao.common.utils.security; // package com.bitzi.util; /* (PD) 2001 The Bitzi Corporation * Please see http://bitzi.com/publicdomain for more info. * * Base32.java * */ /** * Added by jonelo@jonelo.de: * * From http://www.gnu.org/licenses/license-list.html: * Being in the public domain is not a license--rather, it means the material is * not copyrighted and no license is needed. Practically speaking, though, if a * work is in the public domain, it might as well have an all-permissive non-copyleft * free software license. Public domain status is compatible with the GNU GPL. * * As this class has been released under the public domain, * it has been corporated into the sugar package which is released under the LGPL * */ /** * Base32 - encodes and decodes 'Canonical' Base32 * * @author Robert Kaye & Gordon Mohr */ public class Base32 { private static final String base32Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; private static final int[] base32Lookup = {0xFF, 0xFF, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, // '0', '1', '2', '3', '4', '5', '6', '7' 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // '8', '9', ':', ';', '<', '=', '>', '?' 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, // '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G' 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, // 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, // 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W' 0x17, 0x18, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 'X', 'Y', 'Z', '[', '\', ']', '^', '_' 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, // '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g' 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, // 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o' 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, // 'p', 'q', 'r', 's', 't', 'u', 'v', 'w' 0x17, 0x18, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF // 'x', 'y', 'z', '{', '|', '}', '~', 'DEL' }; static public String encode(final byte[] bytes) { int i = 0, index = 0, digit = 0; int currByte, nextByte; // begin fix // added by jonelo@jonelo.de, Feb 13, 2005 // according to RFC 3548, the encoding must also contain paddings in some cases int add = 0; switch (bytes.length) { case 1: add = 6; break; case 2: add = 4; break; case 3: add = 3; break; case 4: add = 1; break; } // end fix StringBuffer base32 = new StringBuffer(((bytes.length + 7) * 8 / 5) + add); while (i < bytes.length) { currByte = (bytes[i] >= 0) ? bytes[i] : (bytes[i] + 256); // unsign /* Is the current digit going to span a byte boundary? */ if (index > 3) { if ((i + 1) < bytes.length) nextByte = (bytes[i + 1] >= 0) ? bytes[i + 1] : (bytes[i + 1] + 256); else nextByte = 0; digit = currByte & (0xFF >> index); index = (index + 5) % 8; digit <<= index; digit |= nextByte >> (8 - index); i++; } else { digit = (currByte >> (8 - (index + 5))) & 0x1F; index = (index + 5) % 8; if (index == 0) i++; } base32.append(base32Chars.charAt(digit)); } // begin fix // added by jonelo@jonelo.de, Feb 13, 2005 // according to RFC 3548, the encoding must also contain paddings in some cases switch (bytes.length) { case 1: base32.append("======"); break; case 2: base32.append("===="); break; case 3: base32.append("==="); break; case 4: base32.append("="); break; } // end fix return base32.toString(); } static public byte[] decode(final String base32) { int i, index, lookup, offset, digit; byte[] bytes = new byte[base32.length() * 5 / 8]; for (i = 0, index = 0, offset = 0; i < base32.length(); i++) { lookup = base32.charAt(i) - '0'; /* Skip chars outside the lookup table */ if (lookup < 0 || lookup >= base32Lookup.length) continue; digit = base32Lookup[lookup]; /* If this digit is not in the table, ignore it */ if (digit == 0xFF) continue; if (index <= 3) { index = (index + 5) % 8; if (index == 0) { bytes[offset] |= digit; offset++; if (offset >= bytes.length) break; } else bytes[offset] |= digit << (8 - index); } else { index = (index + 5) % 8; bytes[offset] |= (digit >>> index); offset++; if (offset >= bytes.length) break; bytes[offset] |= digit << (8 - index); } } return bytes; } /** * For testing, take a command-line argument in Base32, decode, print in hex, * encode, print */ static public void main(String[] args) { if (args.length == 0) { System.out.println("Supply a Base32-encoded argument."); return; } System.out.println(" Original: " + args[0]); byte[] decoded = Base32.decode(args[0]); System.out.print(" Hex: "); for (int i = 0; i < decoded.length; i++) { int b = decoded[i]; if (b < 0) b += 256; System.out.print((Integer.toHexString(b + 256)).substring(1)); } System.out.println(); System.out.println("Reencoded: " + Base32.encode(decoded)); } }
[ "wild_ghost@yeah.net" ]
wild_ghost@yeah.net
db6509bb5cd203ab4bb9ba48369ae19c53152fe9
89be44270846bd4f32ca3f51f29de4921c1d298a
/bitcamp-java/src/main/java/com/eomcs/generic/ex01/Exam0112.java
7743a30e8ab8c99ee111c46a2a91c4d31f3ad9d4
[]
no_license
nayoung00/bitcamp-study
931b439c40a8fe10bdee49c0aaf449399d8fe801
b3d3c9135114cf17c7afd3ceaee83b5c2cedff29
refs/heads/master
2020-09-28T17:39:04.332086
2020-04-30T23:57:45
2020-04-30T23:57:45
226,825,309
0
0
null
null
null
null
UTF-8
Java
false
false
1,919
java
// 제네릭(Generic) - 사용 전: 다형적 변수 활용의 문제점 package com.eomcs.generic.ex01; public class Exam0112 { // 다양한 객체를 저장하는 Box를 만들기 위해 // 인스턴스의 변수 타입을 Object로 선언한다. // => 그러면 다음과 같이 한 개의 Box 클래스만 정의하면 된다. // static class ObjectBox { Object value; public void set(Object value) { this.value = value; } public Object get() { return value; } } public static void main(String[] args) { // Member 객체를 저장하기 위해 다음과 같이 Box를 준비했다고 가정하자! ObjectBox box1 = new ObjectBox(); // 원래는 다음과 같이 Member 객체를 넣으려고 box1을 준비한 것이다. box1.set(new Member("홍길동", 20)); // 원래의 목적과 다르게 다음과 같이 Member가 아닌 String 객체를 넣어도 막을 방법이 없다. box1.set(new String("Helllo")); // 이유? // => set()의 파라미터 타입은 Object 이기 때문이다. // => Object는 모든 자바 객체를 받을 수 있다. // // 이렇게 Box 클래스의 인스턴스 변수를 Object로 선언하면 // 다양한 객체를 보관할 수는 있지만, // MemberBox나 StringBox, IntegerBox 처럼 특정 타입의 객체로 제한할 수 없다. // 그렇다고 이전처럼 각 타입 별로 Box 클래스를 정의하는 것은 바람직하지 않다. // // 이런 문제점을 해결하기 위해 나온 문법이 "제네릭(Generic)"이다. // 제네릭 문법을 이용하면 한 개의 클래스가 다양한 타입의 객체를 제한적으로 다룰 수 있다. // 즉 각 타입 별로 클래스를 정의해야 하는 것을 한 개의 클래스로 만들 수 있다. // => Exam0113.java 를 확인해보라! } }
[ "invin1201@gmail.com" ]
invin1201@gmail.com
f2094f18aeffe2286236374dd37f5557343e19be
7f7cb7388a57b066b04ec863df7fe681515854c5
/src/main/java/com/klzan/core/util/IOUtils.java
0ac5225fb1a7ae5bc57a4cb292ee99a94b65f822
[]
no_license
ybak/karazam-santian
9541fc0e02774ee5c5a27218a2639fbcb078ca93
dbd905913b9b6273d2028853d14396b0adc01ccc
refs/heads/master
2021-03-24T01:10:59.376527
2018-05-27T03:45:28
2018-05-27T03:45:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,222
java
package com.klzan.core.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; public final class IOUtils extends org.apache.commons.io.IOUtils { private static final Logger LOGGER = LoggerFactory.getLogger(IOUtils.class); public static void close(InputStream stream) { try { if (stream != null) stream.close(); } catch (IOException e) { LOGGER.error(e.getMessage(), e); } } public static void close(OutputStream stream) { try { if (stream != null) stream.close(); } catch (IOException e) { LOGGER.error(e.getMessage(), e); } } public static void close(Reader reader) { try { if (reader != null) reader.close(); } catch (IOException e) { LOGGER.error(e.getMessage(), e); } } public static void close(Writer writer) { try { if (writer != null) writer.close(); } catch (IOException e) { LOGGER.error(e.getMessage(), e); } } public static String getTempFolderPath() { return System.getProperty("java.io.tmpdir"); } private IOUtils() { } }
[ "1922448115@qq.com" ]
1922448115@qq.com
2dc576ec726c78ae3c10bb060a29c71eef491643
fb87e9195288d8baef4ae9e86604cf14e0720c4f
/dsl/eu.ttc.dataflow.model.edit/src/eu/ttc/dataflow/model/dataflow/provider/FieldReferenceItemProvider.java
40824e63837014fd68d6b29d329530b4b319e975
[]
no_license
TransformationToolContest/ttc2016-live
4cc58fbff3e1e6dd5686ec087d406cdee0013168
9c98777da117d91070a7f6175ced30f29b6bdd00
refs/heads/master
2023-04-11T01:08:09.762649
2021-04-24T10:40:08
2021-04-24T10:40:08
62,516,121
0
0
null
null
null
null
UTF-8
Java
false
false
3,846
java
/** */ package eu.ttc.dataflow.model.dataflow.provider; import eu.ttc.dataflow.model.dataflow.DataflowPackage; import eu.ttc.dataflow.model.dataflow.FieldReference; import java.util.Collection; import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; /** * This is the item provider adapter for a {@link eu.ttc.dataflow.model.dataflow.FieldReference} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class FieldReferenceItemProvider extends ExpressionItemProvider { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FieldReferenceItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addFieldPropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the Field feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addFieldPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FieldReference_field_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FieldReference_field_feature", "_UI_FieldReference_type"), DataflowPackage.Literals.FIELD_REFERENCE__FIELD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This returns FieldReference.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/FieldReference")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getText(Object object) { String label = ((FieldReference)object).getField(); return label == null || label.length() == 0 ? getString("_UI_FieldReference_type") : getString("_UI_FieldReference_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(FieldReference.class)) { case DataflowPackage.FIELD_REFERENCE__FIELD: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } }
[ "nyoescape@gmail.com" ]
nyoescape@gmail.com
ef5e1c38392a26db9ff5294516f6bdad42cc7fa7
9254e7279570ac8ef687c416a79bb472146e9b35
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/CreateGWAppResponse.java
6ae19501a611baf8c3b4d3ce6150b3777ccb45ea
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sofa20190815.models; import com.aliyun.tea.*; public class CreateGWAppResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public CreateGWAppResponseBody body; public static CreateGWAppResponse build(java.util.Map<String, ?> map) throws Exception { CreateGWAppResponse self = new CreateGWAppResponse(); return TeaModel.build(map, self); } public CreateGWAppResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public CreateGWAppResponse setBody(CreateGWAppResponseBody body) { this.body = body; return this; } public CreateGWAppResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f606ec9af4c7152e88a309b0bff8c48de1b6be72
b3a8c7df28a7a3b298b1e8da8df6082b42cbb8be
/kemika-root/kemika-security/src/main/java/com/kemika/security/support/KemikaUserDetailsService.java
280b257b4cbb841ecad10bf36bb1f45f6dd97a76
[]
no_license
lordmarkm/kemika
e3e34904194b02e5e78774d5af29944ab277da5f
22953e6eeae7615d67e51fad32c4bea0d980719e
refs/heads/master
2021-01-10T00:54:05.860872
2013-06-05T09:21:08
2013-06-05T09:21:08
9,626,908
1
0
null
null
null
null
UTF-8
Java
false
false
1,384
java
package com.kemika.security.support; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Component; import com.kemika.security.models.Account; import com.kemika.security.services.AccountService; @Component public class KemikaUserDetailsService implements UserDetailsService { @Resource private AccountService accounts; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { Account account = accounts.findByUsername(username); if(null == account) { throw new UsernameNotFoundException("User " + username + " not found."); } List<SimpleGrantedAuthority> authorities = new ArrayList<SimpleGrantedAuthority>(); String[] authStrings = account.getAuthorities().split(", "); for(String authString : authStrings) { authorities.add(new SimpleGrantedAuthority(authString)); } UserDetails ud = new User(account.getUsername(), account.getPassword(), authorities); return ud; } }
[ "mbmartinez@exist.com" ]
mbmartinez@exist.com
acc25ba7a3eec923e8d1d261b7e750ca2b01e78a
a2f5602302e14213112e23724b0353f2380bc910
/JDBCExample1/src/com/kanhav/jdbc/Test.java
f8bd25145cad37c6d5718b4dc795f3325be5f0a8
[]
no_license
kanhavmathur05/School-of-Fintech-CoreJava
9b08b7a8ae0a05636b27fcd1bf5ef185c41abd48
b70162325cba7e0dbf9ab9f6fe7ec5afcb39fd3c
refs/heads/main
2023-03-30T08:14:39.578156
2021-03-25T17:54:28
2021-03-25T17:54:28
348,427,917
0
0
null
null
null
null
UTF-8
Java
false
false
717
java
package com.kanhav.jdbc; import java.sql.Connection; import java.sql.DriverManager; public class Test { static final String DB_URL = "jdbc:mysql://localhost:3306/world"; static final String USERNAME = "root"; static final String PASSWORD = "Root@1234"; public static void main(String args[]) { Connection connection = null; try { Class.forName("com.mysql.cj.jdbc.Driver"); connection = DriverManager.getConnection(DB_URL, USERNAME, PASSWORD); System.out.println("Connected to database..."); } catch (Exception e) { System.out.println("Error in connection"); e.printStackTrace(); } } //Comment Test }
[ "kanhavmathur05@gmail.com" ]
kanhavmathur05@gmail.com
83ad5ea97693021e1f0cfdf2f551cd159ae172cf
7ce60ae831a4afcefe30b149ad5aa2a01c61280d
/Test Data/Comp401F17/Assignment4/Correct, Skeleton(skeleton)/Submission attachment(s)/Skeleton/Skeleton/src/grail/tokenBeans/PlusToken.java
09860c138bb0b86ba901cc756e3bcb11cac2c006
[]
no_license
pdewan/Comp401AllChecks
ed967cb535f1bf8c6d7777b7ca53bd6e810e5ba1
86d995defcdde2766329a6db37fdb7a54c70da4a
refs/heads/master
2023-06-26T13:01:27.009697
2023-06-12T06:05:01
2023-06-12T06:05:01
66,742,312
0
0
null
2022-06-30T14:43:42
2016-08-28T00:49:37
Java
UTF-8
Java
false
false
374
java
package grail.tokenBeans; import grail.interfaces.Token; import util.annotations.EditablePropertyNames; import util.annotations.StructurePattern; import util.annotations.StructurePatternNames; import util.annotations.Tags; @Tags({"Plus"}) @StructurePattern(StructurePatternNames.BEAN_PATTERN) @EditablePropertyNames({"Input"}) public class PlusToken implements Token { }
[ "avitkus7@gmail.com" ]
avitkus7@gmail.com
557b5f38b4a2bcf72808c5a982ac0b7dc1e5b178
23749b673ff50cfb3bd09eb9662715e09da17dc8
/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsview_gslbservice_binding.java
0579c83102158745309b9daf7e930ba9a4201338
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
netscaler/nitro
20f0499200478b971f6c11a8f77ab44113bfe1a5
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
refs/heads/master
2016-08-04T20:02:53.344531
2013-11-22T04:04:18
2013-11-22T04:04:18
8,279,932
0
0
null
null
null
null
UTF-8
Java
false
false
6,550
java
/* * Copyright (c) 2008-2015 Citrix Systems, 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.citrix.netscaler.nitro.resource.config.dns; import com.citrix.netscaler.nitro.resource.base.*; import com.citrix.netscaler.nitro.service.nitro_service; import com.citrix.netscaler.nitro.service.options; import com.citrix.netscaler.nitro.util.*; import com.citrix.netscaler.nitro.exception.nitro_exception; class dnsview_gslbservice_binding_response extends base_response { public dnsview_gslbservice_binding[] dnsview_gslbservice_binding; } /** * Binding class showing the gslbservice that can be bound to dnsview. */ public class dnsview_gslbservice_binding extends base_resource { private String gslbservicename; private String ipaddress; private String viewname; private Long __count; /** * <pre> * Service name of the service using this view. * </pre> */ public void set_gslbservicename(String gslbservicename) throws Exception{ this.gslbservicename = gslbservicename; } /** * <pre> * Service name of the service using this view. * </pre> */ public String get_gslbservicename() throws Exception { return this.gslbservicename; } /** * <pre> * Name of the view to display.<br> Minimum length = 1 * </pre> */ public void set_viewname(String viewname) throws Exception{ this.viewname = viewname; } /** * <pre> * Name of the view to display.<br> Minimum length = 1 * </pre> */ public String get_viewname() throws Exception { return this.viewname; } /** * <pre> * IP of the service corresponding to the given view. * </pre> */ public String get_ipaddress() throws Exception { return this.ipaddress; } /** * <pre> * converts nitro response into object and returns the object array in case of get request. * </pre> */ protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception{ dnsview_gslbservice_binding_response result = (dnsview_gslbservice_binding_response) service.get_payload_formatter().string_to_resource(dnsview_gslbservice_binding_response.class, response); if(result.errorcode != 0) { if (result.errorcode == 444) { service.clear_session(); } if(result.severity != null) { if (result.severity.equals("ERROR")) throw new nitro_exception(result.message,result.errorcode); } else { throw new nitro_exception(result.message,result.errorcode); } } return result.dnsview_gslbservice_binding; } /** * <pre> * Returns the value of object identifier argument * </pre> */ protected String get_object_name() { return this.viewname; } /** * Use this API to fetch dnsview_gslbservice_binding resources of given name . */ public static dnsview_gslbservice_binding[] get(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service); return response; } /** * Use this API to fetch filtered set of dnsview_gslbservice_binding resources. * filter string should be in JSON format.eg: "port:80,servicetype:HTTP". */ public static dnsview_gslbservice_binding[] get_filtered(nitro_service service, String viewname, String filter) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_filter(filter); dnsview_gslbservice_binding[] response = (dnsview_gslbservice_binding[]) obj.getfiltered(service, option); return response; } /** * Use this API to fetch filtered set of dnsview_gslbservice_binding resources. * set the filter parameter values in filtervalue object. */ public static dnsview_gslbservice_binding[] get_filtered(nitro_service service, String viewname, filtervalue[] filter) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_filter(filter); dnsview_gslbservice_binding[] response = (dnsview_gslbservice_binding[]) obj.getfiltered(service, option); return response; } /** * Use this API to count dnsview_gslbservice_binding resources configued on NetScaler. */ public static long count(nitro_service service, String viewname) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_count(true); dnsview_gslbservice_binding response[] = (dnsview_gslbservice_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; } /** * Use this API to count the filtered set of dnsview_gslbservice_binding resources. * filter string should be in JSON format.eg: "port:80,servicetype:HTTP". */ public static long count_filtered(nitro_service service, String viewname, String filter) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_count(true); option.set_filter(filter); dnsview_gslbservice_binding[] response = (dnsview_gslbservice_binding[]) obj.getfiltered(service, option); if (response != null) { return response[0].__count; } return 0; } /** * Use this API to count the filtered set of dnsview_gslbservice_binding resources. * set the filter parameter values in filtervalue object. */ public static long count_filtered(nitro_service service, String viewname, filtervalue[] filter) throws Exception{ dnsview_gslbservice_binding obj = new dnsview_gslbservice_binding(); obj.set_viewname(viewname); options option = new options(); option.set_count(true); option.set_filter(filter); dnsview_gslbservice_binding[] response = (dnsview_gslbservice_binding[]) obj.getfiltered(service, option); if (response != null) { return response[0].__count; } return 0; } }
[ "vijay.venkatachalam@citrix.com" ]
vijay.venkatachalam@citrix.com
1ffe8ffb8b58eba01eb1ba21786aaf82f00a89f7
de665d60428a831300c905391c5db9986fe6eb76
/src/com/uniubi/common/oldlogic/weekend/AttendanceLogicCommonTest2AssertWeekend16.java
3a33433f3c55a110906a97d5af40f63f37fb6a1a
[]
no_license
FeeLzheng/SmartStageLogic
0346c70c357b8c0377ab39e4c474b8ab96b43714
15115c4885c3060d1b71a67d93dd244b09793d5e
refs/heads/master
2021-01-11T10:23:16.205413
2017-06-14T07:17:01
2017-06-14T07:17:01
78,097,324
0
0
null
null
null
null
UTF-8
Java
false
false
1,608
java
package com.uniubi.common.oldlogic.weekend; import static org.junit.Assert.*; public class AttendanceLogicCommonTest2AssertWeekend16 extends AttendanceLogicCommonTest2AssertBaseWeekend { @Override public void Testx_x_1_all() { assertEquals(employeeDay.getWorkDur(),convertMsToMinutes(t1_1.getTime()-t1_1.getTime())); assertEquals(employeeDay.getDelayDur(),0); assertEquals(employeeDay.getLeaveDur(),0); assertEquals(employeeDay.getAllLeaveDur(),0); assertEquals(employeeDay.getEmployeeid(),100000004); assertEquals(employeeDay.getUserid(),52); } @Override public void Testx_x_2_all() { assertEquals(employeeNextDay.getWorkDur(),convertMsToMinutes(t2_1.getTime()-t2_1.getTime())); assertEquals(employeeNextDay.getDelayDur(),0); assertEquals(employeeNextDay.getLeaveDur(),0); assertEquals(employeeNextDay.getAllLeaveDur(),0); assertEquals(employeeDay.getEmployeeid(),100000004); assertEquals(employeeNextDay.getEmployeeid(),100000004); assertEquals(employeeDay.getUserid(),52); assertEquals(employeeNextDay.getUserid(),52); } @Override public void Textx_x_last() { assertEquals(employeeDay.getDelayDur(),0); assertEquals(employeeDay.getLeaveDur(),0); assertEquals(employeeDay.getAllLeaveDur(),0); assertEquals(employeeNextDay.getDelayDur(),0); assertEquals(employeeNextDay.getLeaveDur(),0); assertEquals(employeeNextDay.getAllLeaveDur(),0); assertEquals(employeeDay.getEmployeeid(),100000004); assertEquals(employeeNextDay.getEmployeeid(),100000004); assertEquals(employeeDay.getUserid(),52); assertEquals(employeeNextDay.getUserid(),52); } }
[ "zhengxiaolong@uni-ubi.com" ]
zhengxiaolong@uni-ubi.com
dc8f7a4867aa7371c7e3514640b5fa6988f6a045
249af7d4b0eea36cdc771536eed2943b01361a59
/Server/plugins/com/wk/server/plugins/npcs/ardougne/east/CaptainBarnaby.java
dbcf4ea738f40aa26eb0217517c955ec342bdb13
[]
no_license
Cleako/Wolf-Kingdom-Game
015450231a93402b6add2f2a608b5a77f6ad5286
bf0fd3fe960599604284628736e5541948051322
refs/heads/master
2023-04-26T11:30:51.749162
2018-08-24T14:06:41
2018-08-24T14:06:41
127,455,490
1
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package com.wk.server.plugins.npcs.ardougne.east; import static com.wk.server.plugins.Functions.message; import static com.wk.server.plugins.Functions.npcTalk; import static com.wk.server.plugins.Functions.playerTalk; import static com.wk.server.plugins.Functions.showMenu; import static com.wk.server.plugins.Functions.sleep; import com.wk.server.model.entity.npc.Npc; import com.wk.server.model.entity.player.Player; import com.wk.server.plugins.listeners.action.TalkToNpcListener; import com.wk.server.plugins.listeners.executive.TalkToNpcExecutiveListener; public class CaptainBarnaby implements TalkToNpcExecutiveListener, TalkToNpcListener { @Override public void onTalkToNpc(Player p, Npc n) { npcTalk(p, n, "Do you want to go on a trip to Karamja?", "The trip will cost you 30 gold"); int karamja = showMenu(p, n, "Yes please", "No thankyou"); if (karamja == 0) { if (p.getInventory().remove(10, 30) > -1) { // enough money message(p, "You pay 30 gold", "You board the ship"); p.teleport(467, 651, false); sleep(1000); p.message("The ship arrives at Karamja"); } else { playerTalk(p, n, "Oh dear I don't seem to have enough money"); } } } @Override public boolean blockTalkToNpc(Player p, Npc n) { return n.getID() == 316; } }
[ "cleako@gmail.com" ]
cleako@gmail.com
07b194d1902fffe602cf9f301b5e5dced4492a9b
6e5af60d4dc67df8524e788f985d1b8024ddd085
/common/common-io/src/main/java/com/twelvemonkeys/io/FileSystem.java
81668a88350719322099f13dd792d8db29b1eb59
[ "BSD-3-Clause" ]
permissive
haraldk/TwelveMonkeys
75c8dbf9490524aaf7d5a2ff4235c29770627c59
e72255805e45b55120c9f32e1a115cb4a89a42f0
refs/heads/master
2023-09-05T09:33:09.855954
2023-08-29T08:50:48
2023-08-29T08:50:48
296,658
1,631
312
BSD-3-Clause
2023-09-14T08:37:10
2009-09-03T17:44:28
Java
UTF-8
Java
false
false
3,506
java
/* * Copyright (c) 2008, Harald Kuhr * 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 copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.twelvemonkeys.io; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; /** * FileSystem * * @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a> * @version $Id: FileSystem.java#1 $ */ abstract class FileSystem { abstract long getFreeSpace(File pPath); abstract long getTotalSpace(File pPath); abstract String getName(); static BufferedReader exec(String[] pArgs) throws IOException { Process cmd = Runtime.getRuntime().exec(pArgs); return new BufferedReader(new InputStreamReader(cmd.getInputStream())); } static FileSystem get() { String os = System.getProperty("os.name"); //System.out.println("os = " + os); os = os.toLowerCase(); if (os.contains("windows")) { return new Win32FileSystem(); } else if (os.contains("linux") || os.contains("sun os") || os.contains("sunos") || os.contains("solaris") || os.contains("mpe/ix") || os.contains("hp-ux") || os.contains("aix") || os.contains("freebsd") || os.contains("irix") || os.contains("digital unix") || os.contains("unix") || os.contains("mac os x")) { return new UnixFileSystem(); } else { return new UnknownFileSystem(os); } } private static class UnknownFileSystem extends FileSystem { private final String osName; UnknownFileSystem(String pOSName) { osName = pOSName; } long getFreeSpace(File pPath) { return 0l; } long getTotalSpace(File pPath) { return 0l; } String getName() { return "Unknown (" + osName + ")"; } } }
[ "harald.kuhr@gmail.com" ]
harald.kuhr@gmail.com
37262c259d7001338c5c1793262f8e60d4d3cff1
6452d328c9a70f23a037a9226e79d6f5820a44e4
/org/sintef/edap_aspects/smartadapters4MODERATES.resource.edap_aspect/src-gen/smartadapters4MODERATES/resource/edap_aspect/grammar/Edap_aspectTerminal.java
63eda0fa42713b6eba733ae25795b3758b0c32be
[]
no_license
manualem/moderates
2132bf76b7f540c1fa4d74b78154a71070ef0fff
ad8d74667c3532cee44e572ca3d8d8ca316451bd
refs/heads/master
2020-12-29T01:42:11.865055
2011-06-21T09:03:28
2011-06-21T09:03:28
38,399,699
0
0
null
null
null
null
UTF-8
Java
false
false
903
java
/** * <copyright> * </copyright> * * */ package smartadapters4MODERATES.resource.edap_aspect.grammar; public class Edap_aspectTerminal extends smartadapters4MODERATES.resource.edap_aspect.grammar.Edap_aspectSyntaxElement { private final org.eclipse.emf.ecore.EStructuralFeature feature; private final int mandatoryOccurencesAfter; public Edap_aspectTerminal(org.eclipse.emf.ecore.EStructuralFeature feature, smartadapters4MODERATES.resource.edap_aspect.grammar.Edap_aspectCardinality cardinality, int mandatoryOccurencesAfter) { super(cardinality, null); this.feature = feature; this.mandatoryOccurencesAfter = mandatoryOccurencesAfter; } public org.eclipse.emf.ecore.EStructuralFeature getFeature() { return feature; } public int getMandatoryOccurencesAfter() { return mandatoryOccurencesAfter; } public String toString() { return feature.getName() + "[]"; } }
[ "fleurey@18f204b0-11dd-0995-6934-10920bfec807" ]
fleurey@18f204b0-11dd-0995-6934-10920bfec807
03d9db9ad572d4ee6ce15039b16de0df03621e2f
614d50b567c426046515e976a44a005814aa0580
/core/src/main/java/net/hydromatic/optiq/Parameter.java
b0af0a4e8ce24d028061aae3ff9c7ed7b3788f9e
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
guilhermejccavalcanti/optiq
76b7f117a582d1f3fa284047a4cda7b9ae396d3b
b8022e45c9ef6e8c3ac792511b247816c4d6e929
refs/heads/master
2020-03-25T05:47:53.781191
2018-08-07T03:40:16
2018-08-07T03:40:16
143,466,381
0
0
Apache-2.0
2018-08-03T19:36:32
2018-08-03T19:36:32
null
UTF-8
Java
false
false
1,313
java
/* // Licensed to Julian Hyde under one or more contributor license // agreements. See the NOTICE file distributed with this work for // additional information regarding copyright ownership. // // Julian Hyde 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 net.hydromatic.optiq; import org.eigenbase.reltype.RelDataType; /** * Parameter to a {@link TableFunction}. */ public interface Parameter { /** * Zero-based ordinal of this parameter within the member's parameter * list. * * @return Parameter ordinal */ int getOrdinal(); /** * Name of the parameter. * * @return Parameter name */ String getName(); /** * Returns the type of this parameter. * * @return Parameter type. */ RelDataType getType(); } // End Parameter.java
[ "julianhyde@gmail.com" ]
julianhyde@gmail.com
2032d58defc6276d95fa375ebdbeb20e2c0306ba
cf67b9b50230935695abb45a4ba9cedb8c55005f
/src/main/java/com/lakitchen/LA/Kitchen/api/dto/ProductGeneralDTO.java
3a23eb4bf6dcabf5a903c5f4a91c2f3a852ca01f
[]
no_license
albertkur145/LAKitchen_Backend
c9cbc9945338fe3143ffcc4105a2a3cfdb1cc5a9
7dbea62e737ff7c6ea201c7d4c6dbd81d25ec711
refs/heads/main
2023-03-20T00:46:49.128301
2021-03-10T15:35:26
2021-03-10T15:35:26
325,999,094
1
0
null
null
null
null
UTF-8
Java
false
false
299
java
package com.lakitchen.LA.Kitchen.api.dto; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class ProductGeneralDTO { Integer id; String name; Integer price; String photo_link; Double rating; Integer evaluators; Integer isActive; }
[ "=" ]
=
c8fdfc328703bb6fe8b280da186d69398dc72aa5
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_70/Testnull_6987.java
b44a0198f601675344006de179e2feb062fed304
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
304
java
package org.gradle.test.performancenull_70; import static org.junit.Assert.*; public class Testnull_6987 { private final Productionnull_6987 production = new Productionnull_6987("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
d9d7f02d55442bda9b7f2c8fd5d88e90f948e317
54fc340f6c58721c9eec0fa788649d3dcebe2185
/src/main/java/com/tangshengbo/design/memento/Memento.java
e96b2f0683c5d360b63d40cbd51d1d0496045637
[]
no_license
tangshengbo/myproject-design
e3850783a3881db74273171ae9922eb517738ae2
20414c29d62f1846d01685f0613f1aa42ceaa061
refs/heads/master
2021-05-14T18:51:41.593919
2018-11-22T02:52:12
2018-11-22T02:52:12
116,090,048
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package com.tangshengbo.design.memento; /** * Created by TangShengBo on 2017-10-16. */ public class Memento { private String state; public Memento(String state) { this.state = state; } public String getState() { return state; } public void setState(String state) { this.state = state; } }
[ "867850520tangbo@sina.com" ]
867850520tangbo@sina.com
02410924882b36ede532c7960e422f09e95148b6
7eeca47f77bb8b28e43063a4c810105def32d463
/compulsive-traders/src/main/java/io/vertx/workshop/trader/impl/RXEventBusService.java
1216e6e2489f4c901d079f2faf2d37710fcde451
[ "Apache-2.0" ]
permissive
tarunaz/vertx-kubernetes-workshop
313ddfe85203d8b697a7e628baa4e6d18790709f
64384af9d52707ded8613d84a6f96d234f3fc85b
refs/heads/master
2020-03-23T13:12:44.591229
2018-09-09T16:59:49
2018-09-09T16:59:49
141,606,023
0
1
Apache-2.0
2019-03-14T08:15:13
2018-07-19T16:36:03
Java
UTF-8
Java
false
false
700
java
package io.vertx.workshop.trader.impl; import io.reactivex.Single; import io.vertx.reactivex.servicediscovery.ServiceDiscovery; import io.vertx.reactivex.servicediscovery.types.EventBusService; import io.vertx.servicediscovery.Record; import java.util.function.Function; /** * @author <a href="http://escoffier.me">Clement Escoffier</a> */ public class RXEventBusService { public static <T> Single<T> rxGetProxy(ServiceDiscovery discovery, Class<T> clientClass, Function<Record, Boolean> filter) { return new io.vertx.reactivex.core.impl.AsyncResultSingle<>(handler -> EventBusService.getServiceProxy(discovery, filter, clientClass, handler) ); } }
[ "clement.escoffier@gmail.com" ]
clement.escoffier@gmail.com
fc495fa98e4cebe22bf5cb4f453dcea34c4b9817
23b09162ad1ec682132efd39ce49767c64c6c10d
/samples/java-mule/src/main/java/com/wordnik/swagger/sample/model/Pet.java
cb05d3bdde53a748ab12ea2dbdd693ba88fc875e
[ "Apache-2.0" ]
permissive
sobngwi/swagger-core
f289bcf031477bb498b8f3daf1e314b10f972cfb
116dc6f096d1f40552e5b35132aee83e22539de8
refs/heads/master
2020-12-25T03:52:23.446214
2016-02-19T20:58:07
2016-02-19T20:58:07
32,315,800
0
0
null
2015-03-16T09:55:40
2015-03-16T09:55:39
null
UTF-8
Java
false
false
2,165
java
/** * Copyright 2014 Reverb Technologies, 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.wordnik.swagger.sample.model; import com.wordnik.swagger.annotations.*; import java.util.List; import java.util.ArrayList; import javax.xml.bind.annotation.*; @XmlRootElement(name = "Pet") public class Pet { private long id; private Category category; private String name; private List<String> photoUrls = new ArrayList<String>(); private List<Tag> tags = new ArrayList<Tag>(); private String status; @XmlElement(name = "id") public long getId() { return id; } public void setId(long id) { this.id = id; } @XmlElement(name = "category") public Category getCategory() { return category; } public void setCategory(Category category) { this.category = category; } @XmlElement(name = "name") public String getName() { return name; } public void setName(String name) { this.name = name; } @XmlElementWrapper(name = "photoUrls") @XmlElement(name = "photoUrl") public List<String> getPhotoUrls() { return photoUrls; } public void setPhotoUrls(List<String> photoUrls) { this.photoUrls = photoUrls; } @XmlElementWrapper(name = "tags") @XmlElement(name = "tag") public List<Tag> getTags() { return tags; } public void setTags(List<Tag> tags) { this.tags = tags; } @XmlElement(name = "status") @ApiModelProperty(value = "pet status in the store", allowableValues = "available,pending,sold") public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
[ "fehguy@gmail.com" ]
fehguy@gmail.com
32f1acc540de37a2df4b38b48331e923795b8105
fa51687f6aa32d57a9f5f4efc6dcfda2806f244d
/jdk8-src/src/main/java/javax/xml/bind/annotation/XmlIDREF.java
a65a27993761d8968513f27b4e196c2be0fae443
[]
no_license
yida-lxw/jdk8
44bad6ccd2d81099bea11433c8f2a0fc2e589eaa
9f69e5f33eb5ab32e385301b210db1e49e919aac
refs/heads/master
2022-12-29T23:56:32.001512
2020-04-27T04:14:10
2020-04-27T04:14:10
258,988,898
0
1
null
2020-10-13T21:32:05
2020-04-26T09:21:22
Java
UTF-8
Java
false
false
7,502
java
/* * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.xml.bind.annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * <p> * Maps a JavaBean property to XML IDREF. * * <p> * To preserve referential integrity of an object graph across XML * serialization followed by a XML deserialization, requires an object * reference to be marshalled by reference or containment * appropriately. Annotations <tt>&#64;XmlID</tt> and <tt>&#64;XmlIDREF</tt> * together allow a customized mapping of a JavaBean property's * type by containment or reference. * * <p><b>Usage</b> </p> * The <tt>&#64;XmlIDREF</tt> annotation can be used with the following * program elements: * <ul> * <li> a JavaBean property </li> * <li> non static, non transient field </li> * </ul> * * <p>See "Package Specification" in javax.xml.bind.package javadoc for * additional common information.</p> * * <p> The usage is subject to the following constraints: * <ul> * * <li> If the type of the field or property is a collection type, * then the collection item type must contain a property or * field annotated with <tt>&#64;XmlID</tt>. </li> * <li> If the field or property is single valued, then the type of * the property or field must contain a property or field * annotated with <tt>&#64;XmlID</tt>. * <p>Note: If the collection item type or the type of the * property (for non collection type) is java.lang.Object, then * the instance must contain a property/field annotated with * <tt>&#64;XmlID</tt> attribute. * </li> * <li> This annotation can be used with the following annotations: * {@link XmlElement}, {@link XmlAttribute}, {@link XmlList}, * and {@link XmlElements}.</li> * * </ul> * <p><b>Example:</b> Map a JavaBean property to <tt>xs:IDREF</tt> * (i.e. by reference rather than by containment)</p> * <pre> * * //EXAMPLE: Code fragment * public class Shipping { * &#64;XmlIDREF public Customer getCustomer(); * public void setCustomer(Customer customer); * .... * } * * &lt;!-- Example: XML Schema fragment --> * &lt;xs:complexType name="Shipping"> * &lt;xs:complexContent> * &lt;xs:sequence> * &lt;xs:element name="customer" type="xs:IDREF"/> * .... * &lt;/xs:sequence> * &lt;/xs:complexContent> * &lt;/xs:complexType> * * </pre> * * * <p><b>Example 2: </b> The following is a complete example of * containment versus reference. * * <pre> * // By default, Customer maps to complex type <tt>xs:Customer</tt> * public class Customer { * * // map JavaBean property type to <tt>xs:ID</tt> * &#64;XmlID public String getCustomerID(); * public void setCustomerID(String id); * * // .... other properties not shown * } * * * // By default, Invoice maps to a complex type <tt>xs:Invoice</tt> * public class Invoice { * * // map by reference * &#64;XmlIDREF public Customer getCustomer(); * public void setCustomer(Customer customer); * * // .... other properties not shown here * } * * // By default, Shipping maps to complex type <tt>xs:Shipping</tt> * public class Shipping { * * // map by reference * &#64;XmlIDREF public Customer getCustomer(); * public void setCustomer(Customer customer); * } * * // at least one class must reference Customer by containment; * // Customer instances won't be marshalled. * &#64;XmlElement(name="CustomerData") * public class CustomerData { * // map reference to Customer by containment by default. * public Customer getCustomer(); * * // maps reference to Shipping by containment by default. * public Shipping getShipping(); * * // maps reference to Invoice by containment by default. * public Invoice getInvoice(); * } * * &lt;!-- XML Schema mapping for above code frament --> * * &lt;xs:complexType name="Invoice"> * &lt;xs:complexContent> * &lt;xs:sequence> * &lt;xs:element name="customer" type="xs:IDREF"/> * .... * &lt;/xs:sequence> * &lt;/xs:complexContent> * &lt;/xs:complexType> * * &lt;xs:complexType name="Shipping"> * &lt;xs:complexContent> * &lt;xs:sequence> * &lt;xs:element name="customer" type="xs:IDREF"/> * .... * &lt;/xs:sequence> * &lt;/xs:complexContent> * &lt;/xs:complexType> * * &lt;xs:complexType name="Customer"> * &lt;xs:complexContent> * &lt;xs:sequence> * .... * &lt;/xs:sequence> * &lt;xs:attribute name="CustomerID" type="xs:ID"/> * &lt;/xs:complexContent> * &lt;/xs:complexType> * * &lt;xs:complexType name="CustomerData"> * &lt;xs:complexContent> * &lt;xs:sequence> * &lt;xs:element name="customer" type="xs:Customer"/> * &lt;xs:element name="shipping" type="xs:Shipping"/> * &lt;xs:element name="invoice" type="xs:Invoice"/> * &lt;/xs:sequence> * &lt;/xs:complexContent> * &lt;/xs:complexType> * * &lt;xs:element name"customerData" type="xs:CustomerData"/> * * &lt;!-- Instance document conforming to the above XML Schema --> * &lt;customerData> * &lt;customer customerID="Alice"> * .... * &lt;/customer> * * &lt;shipping customer="Alice"> * .... * &lt;/shipping> * * &lt;invoice customer="Alice"> * .... * &lt;/invoice> * &lt;/customerData> * * </pre> * * <p><b>Example 3: </b> Mapping List to repeating element of type IDREF * <pre> * // Code fragment * public class Shipping { * &#64;XmlIDREF * &#64;XmlElement(name="Alice") * public List customers; * } * * &lt;!-- XML schema fragment --> * &lt;xs:complexType name="Shipping"> * &lt;xs:sequence> * &lt;xs:choice minOccurs="0" maxOccurs="unbounded"> * &lt;xs:element name="Alice" type="xs:IDREF"/> * &lt;/xs:choice> * &lt;/xs:sequence> * &lt;/xs:complexType> * </pre> * * <p><b>Example 4: </b> Mapping a List to a list of elements of type IDREF. * <pre> * //Code fragment * public class Shipping { * &#64;XmlIDREF * &#64;XmlElements( * &#64;XmlElement(name="Alice", type="Customer.class") * &#64;XmlElement(name="John", type="InternationalCustomer.class") * public List customers; * } * * &lt;!-- XML Schema fragment --> * &lt;xs:complexType name="Shipping"> * &lt;xs:sequence> * &lt;xs:choice minOccurs="0" maxOccurs="unbounded"> * &lt;xs:element name="Alice" type="xs:IDREF"/> * &lt;xs:element name="John" type="xs:IDREF"/> * &lt;/xs:choice> * &lt;/xs:sequence> * &lt;/xs:complexType> * </pre> * * @author Sekhar Vajjhala, Sun Microsystems, Inc. * @see XmlID * @since JAXB2.0 */ @Retention(RUNTIME) @Target({FIELD, METHOD}) public @interface XmlIDREF { }
[ "yida@caibeike.com" ]
yida@caibeike.com
29c467bbbf52c1881d43ea3290f8cb90d6723142
f577eb1bbc98a6363e81d0b637e03626e226f104
/Auxiliary/RecipeManagers/CastingRecipes/Items/LumenCoreRecipe.java
9371d0ad7a8c46ca79852bbaf7285b74e5c5ec0d
[]
no_license
RedNicStone/ChromatiCraft
d75227fff74ed4e824c5ab4e0c2c7a6e6b7ffe58
0376a3d4ade3b5eca6041ae213ef0e49725cf755
refs/heads/master
2020-03-09T18:06:47.041957
2017-11-14T04:48:21
2017-11-14T04:48:21
128,923,799
1
0
null
2018-04-10T11:43:34
2018-04-10T11:43:34
null
UTF-8
Java
false
false
1,429
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2017 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.ChromatiCraft.Auxiliary.RecipeManagers.CastingRecipes.Items; import net.minecraft.item.ItemStack; import Reika.ChromatiCraft.Auxiliary.ChromaStacks; import Reika.ChromatiCraft.Auxiliary.Interfaces.ShardGroupingRecipe; import Reika.ChromatiCraft.Auxiliary.RecipeManagers.CastingRecipe.PylonCastingRecipe; import Reika.ChromatiCraft.Registry.CrystalElement; public class LumenCoreRecipe extends PylonCastingRecipe implements ShardGroupingRecipe { public LumenCoreRecipe(ItemStack out, ItemStack main) { super(out, main); for (int i = -4; i <= 4; i += 2) { for (int k = -4; k <= 4; k += 2) { if (i != 0 || k != 0) this.addAuxItem(ChromaStacks.glowChunk, i, k); } } this.addAuxItem(ChromaStacks.purityDust, 0, -2); this.addAuxItem(ChromaStacks.purityDust, 0, 2); this.addAuxItem(ChromaStacks.purityDust, -2, 0); this.addAuxItem(ChromaStacks.purityDust, 2, 0); this.addAuraRequirement(CrystalElement.BLACK, 60000); this.addAuraRequirement(CrystalElement.YELLOW, 60000); this.addAuraRequirement(CrystalElement.BLUE, 60000); } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
ce58b08798dcc50d0d18eb04ee0f1782ebfcbd2f
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/webview/ui/tools/WebViewUI$16$6.java
1d832f33c8ab9928482bbdf80bd08029e0e98aee
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
695
java
package com.tencent.mm.plugin.webview.ui.tools; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import com.tencent.mm.plugin.webview.ui.tools.WebViewUI.16; import com.tencent.mm.pointers.PBool; import com.tencent.xweb.f; class WebViewUI$16$6 implements OnClickListener { final /* synthetic */ f mZO; final /* synthetic */ 16 tBh; final /* synthetic */ PBool tBi; WebViewUI$16$6(16 16, PBool pBool, f fVar) { this.tBh = 16; this.tBi = pBool; this.mZO = fVar; } public final void onClick(DialogInterface dialogInterface, int i) { this.tBi.value = true; this.mZO.confirm(); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
42bdbc53dcb6c1fd3eda2b348b2beb283a483a36
a0728a167e1cb883255a34e055cac4ac60309f20
/docu/rbm (2)/src/snis/rbm/business/rbs3020/activity/SaveSupplReqSign.java
8f326d07f7f2bfd36d58a24e87e3f82f68e10f7f
[]
no_license
jingug1004/pythonBasic
3d3c6c091830215c8be49cc6280b7467fd19dc76
554e3d1a9880b4f74872145dc4adaf0b099b0845
refs/heads/master
2023-03-06T06:24:05.671015
2022-03-09T08:16:58
2022-03-09T08:16:58
179,009,504
0
0
null
2023-03-03T13:09:01
2019-04-02T06:02:44
Java
UHC
Java
false
false
5,237
java
package snis.rbm.business.rbs3020.activity; import com.posdata.glue.biz.constants.PosBizControlConstants; import com.posdata.glue.context.PosContext; import com.posdata.glue.dao.vo.PosParameter; import com.posdata.glue.dao.vo.PosRow; import com.posdata.glue.dao.vo.PosRowSet; import com.posdata.glue.miplatform.vo.PosDataset; import com.posdata.glue.miplatform.vo.PosRecord; import snis.rbm.common.util.SnisActivity; import snis.rbm.common.util.Util; public class SaveSupplReqSign extends SnisActivity { public SaveSupplReqSign(){ } /** * <p> SaveStates Activity를 실행시키기 위한 메소드 </p> * @param ctx PosContext 저장소 * @return SUCCESS String sucess 문자열 * @throws none */ public String runActivity(PosContext ctx) { // 사용자 정보 확인 if ( !setUserInfo(ctx).equals(PosBizControlConstants.SUCCESS) ) { Util.setSvcMsgCode(ctx, "L_COM_ALT_0028"); return PosBizControlConstants.SUCCESS; } saveState(ctx); return PosBizControlConstants.SUCCESS; } /** * <p> 하나의 데이타셋을 가져와 한 레코드씩 looping하면서 DML 메소드를 호출하기 위한 메소드 </p> * @param ctx PosContext 저장소 * @return none * @throws none */ protected void saveState(PosContext ctx) { int nSaveCount = 0; int nDeleteCount = 0; String sDsName = ""; PosDataset ds; int nSize = 0; int nTempCnt = 0; String sSeq = ""; String sChk = ""; int nSignDtCheck = -1; String sSignDt = (String)ctx.get("SIGN_DT"); //서명일자 String sRealReciId = (String)ctx.get("USER_ID"); //서명자ID //소모품대장 저장 sDsName = "dsSupplRegi"; if ( ctx.get(sDsName) != null ) { ds = (PosDataset) ctx.get(sDsName); nSize = ds.getRecordCount(); for ( int i = 0; i < nSize; i++ ) { PosRecord record = ds.getRecord(i); sChk = (String)record.getAttribute("CHK"); if ( sChk.equals("1") ) { nSignDtCheck = selectSignDt(record); if( nSignDtCheck == 1 ) { //서명일자가 없을 경우 record.setAttribute("SIGN_DT", sSignDt); record.setAttribute("USER_ID", sRealReciId); nSaveCount += saveSupplRegi(record); } else { //서명일자가 이미 존재할 경우 Util.setSvcMsgCode(ctx, "SNIS_RBM_E011"); } } } } Util.setSaveCount (ctx, nSaveCount ); Util.setDeleteCount(ctx, nDeleteCount); Util.setSaveCount (ctx, nSaveCount); } /** * <p> 소모품대장 수정 </p> * @param record PosRecord 데이타셋에 대한 하나의 레코드 * @return dmlcount int update 레코드 개수 * @throws none */ protected int saveSupplRegi(PosRecord record) { PosParameter param = new PosParameter(); int i = 0; param.setValueParamter(i++, record.getAttribute("USER_ID")); //실수령인사번 param.setValueParamter(i++, record.getAttribute("SIGN_DT")); //서명일자 param.setValueParamter(i++, SESSION_USER_ID); //사용자ID(수정자) i = 0; param.setWhereClauseParameter(i++, record.getAttribute("REQ_DT")); //신청일자 param.setWhereClauseParameter(i++, record.getAttribute("REQ_ID" )); //신청자사번 param.setWhereClauseParameter(i++, record.getAttribute("SEQ" )); //순번 param.setWhereClauseParameter(i++, record.getAttribute("SUPPL_CD" )); //소모품코드 int dmlcount = this.getDao("rbmdao").update("rbs3040_u01", param); return dmlcount; } /** * <p> 소모품대장 서명일자 조회 </p> * @param record PosRecord 데이타셋에 대한 하나의 레코드 * @return dmlcount int update 레코드 개수 * @throws none */ protected int selectSignDt(PosRecord record) { PosParameter param = new PosParameter(); int i = 0; param.setWhereClauseParameter(i++, record.getAttribute("REQ_DT")); //신청일자 param.setWhereClauseParameter(i++, record.getAttribute("REQ_ID" )); //신청자ID param.setWhereClauseParameter(i++, record.getAttribute("SEQ" )); //순번 param.setWhereClauseParameter(i++, record.getAttribute("SUPPL_CD" )); //소모품코드 PosRowSet rtnRecord = this.getDao("rbmdao").find("rbs3040_s02", param); PosRow pr[] = rtnRecord.getAllRow(); String rtnQty = String.valueOf(pr[0].getAttribute("CNT")); if( rtnQty == null ) rtnQty = "-1"; return Integer.valueOf(rtnQty).intValue(); } }
[ "jingug1004@gmail.com" ]
jingug1004@gmail.com
b2a475c33225783a4f8eca8701a53dcb41a4ba38
d7dac2dc5b4910b293cce7e2d9ff0113328f90c5
/AndroidAsyncTest/src/com/koushikdutta/async/test/StreamUtility.java
096d47c398c335bafa6609c53479708a61531ffc
[ "Apache-2.0" ]
permissive
checko/AndroidAsync
4aa363c0b7338d47b8077e9f0b1ff71c41a83434
92df46553a0c15e281194ac8d33253a4376e073d
refs/heads/master
2021-01-17T23:07:37.803711
2013-06-30T22:26:26
2013-06-30T22:26:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,377
java
package com.koushikdutta.async.test; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.json.JSONException; import org.json.JSONObject; import android.net.http.AndroidHttpClient; class StreamUtility { public static void fastChannelCopy(final ReadableByteChannel src, final WritableByteChannel dest) throws IOException { final ByteBuffer buffer = ByteBuffer.allocateDirect(16 * 1024); while (src.read(buffer) != -1) { // prepare the buffer to be drained buffer.flip(); // write to the channel, may block dest.write(buffer); // If partial transfer, shift remainder down // If buffer is empty, same as doing recycle() buffer.compact(); } // EOF will leave buffer in fill state buffer.flip(); // make sure the buffer is fully drained. while (buffer.hasRemaining()) { dest.write(buffer); } } public static void copyStream(InputStream input, OutputStream output) throws IOException { // final ReadableByteChannel inputChannel = Channels.newChannel(input); // final WritableByteChannel outputChannel = Channels.newChannel(output); // // copy the channels // fastChannelCopy(inputChannel, outputChannel); // // closing the channels //// inputChannel.close(); //// outputChannel.close(); byte[] stuff = new byte[65536]; int read = 0; int total = 0; while ((read = input.read(stuff)) != -1) { output.write(stuff, 0, read); total += read; } // return total; } public static String downloadUriAsString(String uri) throws IOException { HttpGet get = new HttpGet(uri); return downloadUriAsString(get); } public static String downloadUriAsString(final HttpUriRequest req) throws IOException { AndroidHttpClient client = AndroidHttpClient.newInstance("Android"); try { HttpResponse res = client.execute(req); return readToEnd(res.getEntity().getContent()); } finally { client.close(); } } public static JSONObject downloadUriAsJSONObject(String uri) throws IOException, JSONException { return new JSONObject(downloadUriAsString(uri)); } public static JSONObject downloadUriAsJSONObject(HttpUriRequest req) throws IOException, JSONException { return new JSONObject(downloadUriAsString(req)); } public static byte[] readToEndAsArray(InputStream input) throws IOException { DataInputStream dis = new DataInputStream(input); byte[] stuff = new byte[1024]; ByteArrayOutputStream buff = new ByteArrayOutputStream(); int read = 0; while ((read = dis.read(stuff)) != -1) { buff.write(stuff, 0, read); } dis.close(); return buff.toByteArray(); } public static String readToEnd(InputStream input) throws IOException { return new String(readToEndAsArray(input)); } static public String readFile(String filename) throws IOException { return readFile(new File(filename)); } static public String readFile(File file) throws IOException { byte[] buffer = new byte[(int) file.length()]; DataInputStream input = new DataInputStream(new FileInputStream(file)); input.readFully(buffer); return new String(buffer); } public static void writeFile(File file, String string) throws IOException { file.getParentFile().mkdirs(); DataOutputStream dout = new DataOutputStream(new FileOutputStream(file)); dout.write(string.getBytes()); dout.close(); } public static void writeFile(String file, String string) throws IOException { writeFile(new File(file), string); } }
[ "koushd@gmail.com" ]
koushd@gmail.com
b1ec1a7ab2f2ebbaf1200441cc177fb2040e4c13
7eb6525f18d157fab7cc27962a879dec4858f211
/src/main/java/au/org/emii/portal/util/PortalSessionUtilities.java
0fa2c779cf9613848c64b08051f9c0d6b84c41df
[]
no_license
linaizhong/spatial-portal
6a4e1e5b96d5fbfcbbb07fa4a77cfe0942b4cd12
1c3fc6e5f334ec7cc9467ed92dbaaee43381484f
refs/heads/master
2020-04-07T21:44:02.268176
2014-07-16T23:56:26
2014-07-16T23:56:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,651
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package au.org.emii.portal.util; import au.org.emii.portal.lang.LanguagePack; import au.org.emii.portal.menu.MapLayer; import au.org.emii.portal.session.PortalSession; import au.org.emii.portal.settings.Settings; import au.org.emii.portal.value.BoundingBox; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Required; import java.util.Properties; /** * @author geoff */ public class PortalSessionUtilities { private static Logger logger = Logger.getLogger(PortalSessionUtilities.class); private LanguagePack languagePack = null; private Settings settings = null; /** * Enumeration IDs as used in the config file xml schema - to allow * conversion between strings used in config file and ints used at runtime */ private final static String LAYER_TAB = "LAYER"; private final static String LINK_TAB = "LINK"; private final static String SEARCH_TAB = "SEARCH"; private final static String AREA_TAB = "AREA"; private final static String MAP_TAB = "MAP"; private final static String START_TAB = "START"; private final static String LAYER_FACILITY_TAB = "FACILITY"; private final static String LAYER_REGION_TAB = "REGION"; private final static String LAYER_REALTIME_TAB = "REALTIME"; private final static String LAYER_USER_TAB = "USER"; public MapLayer getUserDefinedById(PortalSession portalSession, String id) { for (MapLayer map : portalSession.getUserDefinedLayers()) { if (map != null && map.getId() != null && map.getId().equals(id)) { return map; } } return null; } /** * return the current bounding box - either the default bounding box or the * regional bounding box if a region has been selected * * @return */ public BoundingBox getCurrentBoundingBox(PortalSession portalSession) { return portalSession.getDefaultBoundingBox(); } public LanguagePack getLanguagePack() { return languagePack; } @Required public void setLanguagePack(LanguagePack languagePack) { this.languagePack = languagePack; } public int convertTab(String str) { int tab; if (str.equals(LAYER_TAB)) { tab = PortalSession.LAYER_TAB; } else if (str.equals(LINK_TAB)) { tab = PortalSession.START_TAB; } else if (str.equals(SEARCH_TAB)) { tab = PortalSession.SEARCH_TAB; } else if (str.equals(AREA_TAB)) { tab = PortalSession.AREA_TAB; } else if (str.equals(MAP_TAB)) { tab = PortalSession.MAP_TAB; } else if (str.equals(START_TAB)) { tab = PortalSession.START_TAB; } else { tab = PortalSession.UNKNOWN; } return tab; } public int convertLayerView(String str) { int tab; if (str.equals(LAYER_FACILITY_TAB)) { tab = PortalSession.LAYER_FACILITY_TAB; } else if (str.equals(LAYER_REALTIME_TAB)) { tab = PortalSession.LAYER_REALTIME_TAB; } else if (str.equals(LAYER_REGION_TAB)) { tab = PortalSession.LAYER_REGION_TAB; } else if (str.equals(LAYER_USER_TAB)) { tab = PortalSession.LAYER_USER_TAB; } else { tab = PortalSession.UNKNOWN; } return tab; } public Settings getSettings() { return settings; } public void setSettings(Settings settings) { this.settings = settings; } }
[ "adam.collins832@gmail.com" ]
adam.collins832@gmail.com
6d9db5b6b0cd6473d2a74bc97cd927a24d4a5db3
624963ba9efa686e64198c2eace14055f4e0f80a
/hmtpdamw-api/src/main/java/net/shopin/hmtpdamw/interceptor/WebMvcConfigurer.java
a615a65bb7f7b599bc2a59a6fcfd8f2ea7138b96
[]
no_license
pengweiqiang/huamengtong_java
55929e839aacdc91af9f23747bd3dc8a712f8faf
dc68bbd0a3aa42e36cf97ea21d82801e26bf5955
refs/heads/master
2021-01-20T04:16:13.456884
2017-05-03T03:10:23
2017-05-03T03:10:23
89,666,626
0
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
package net.shopin.hmtpdamw.interceptor; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration public class WebMvcConfigurer extends WebMvcConfigurerAdapter { public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new UserInterceptor()) // .addPathPatterns("/user/**") // .excludePathPatterns("/order/*") ;//要拦截的请求 // registry.addInterceptor(new UserInterceptor()).addPathPatterns("/xx/**")//要拦截的请求 // // .excludePathPatterns("/xxx/*");//不拦截的请求 // registry.addInterceptor(xxxInterceptor).addPathPatterns("xxx/xx")//推荐 // registry.addInterceptor(new HandlerInterceptorAdapter() { // // @Override // public boolean preHandle(HttpServletRequest request, HttpServletResponse response, // Object handler) throws Exception { // System.out.println("interceptor====222"); // return true; // } // }).addPathPatterns("/*"); } }
[ "pengweiqiang@shopin.cn" ]
pengweiqiang@shopin.cn
54d65d8919d0d0dca9da4a0843171379359d6422
36b3dd585b149a48f0f6f6bf130734820dbf93d2
/mall-commons/mall-pay-spring-boot-starter/src/main/java/com/mallplus/unionpay/UnionPayApi.java
61bb238eb80da2457449aa0597c1a3492f779b78
[ "Apache-2.0" ]
permissive
shenzhuan/zscat-me
5d391e00bb2864bbf4aaca82b845f9f8bacfd38d
23ac9ab9e97d7d63433887168961881a011f217c
refs/heads/master
2023-07-23T12:41:19.688624
2022-10-18T02:26:50
2022-10-18T02:26:50
102,570,841
218
95
Apache-2.0
2023-07-16T05:02:47
2017-09-06T06:23:37
PLpgSQL
UTF-8
Java
false
false
6,006
java
package com.mallplus.unionpay; import com.mallplus.core.kit.HttpKit; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * <p>IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付常用的支付方式以及各种常用的接口。</p> * * <p>不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。 </p> * * <p>IJPay 交流群: 723992875</p> * * <p>Node.js 版: https://gitee.com/javen205/TNW</p> * * <p>银联支付相关接口</p> * * @author Javen */ public class UnionPayApi { /** * PC网关支付、WAP支付 * * @param resp HttpServletResponse * @param reqData 请求参数 * @throws IOException 异常 */ @Deprecated public static void frontConsume(HttpServletResponse resp, Map<String, String> reqData) throws IOException { String html = AcpService.createAutoFormHtml(SDKConfig.getConfig().getFrontRequestUrl(), reqData, "UTF-8"); resp.getWriter().write(html); } /** * 前端请求 * * @param resp HttpServletResponse * @param reqData 请求参数 * @throws IOException 异常 */ public static void frontRequest(HttpServletResponse resp, Map<String, String> reqData) throws IOException { String html = AcpService.createAutoFormHtml(SDKConfig.getConfig().getFrontRequestUrl(), reqData, "UTF-8"); resp.getWriter().write(html); } /** * 退货交易、撤销交易 * * @param reqData 请求参数 * @return {String} */ @Deprecated public static String refund(Map<String, String> reqData) { return doPost(SDKConfig.getConfig().getBackRequestUrl(), reqData); } /** * 退货交、撤销交易 * * @param reqData 请求参数 * @return 转化后的 Map */ @Deprecated public static Map<String, String> refundByMap(Map<String, String> reqData) { return SDKUtil.convertResultStringToMap(refund(reqData)); } /** * 后台请求返回String * * @param reqData 请求参数 * @return {String} */ public static String backRequest(Map<String, String> reqData) { return doPost(SDKConfig.getConfig().getBackRequestUrl(), reqData); } /** * 后台请求返回Map * * @param reqData 请求参数 * @return 转化后的 Map */ public static Map<String, String> backRequestByMap(Map<String, String> reqData) { return SDKUtil.convertResultStringToMap(backRequest(reqData)); } /** * 单订单查询返回String * * @param reqData 请求参数 * @return {String} */ public static String singleQuery(Map<String, String> reqData) { return doPost(SDKConfig.getConfig().getSingleQueryUrl(), reqData); } /** * 单订单查询返回Map * * @param reqData 请求参数 * @return 转化后的 Map */ public static Map<String, String> singleQueryByMap(Map<String, String> reqData) { return SDKUtil.convertResultStringToMap(singleQuery(reqData)); } /** * 文件传输类接口 * * @param reqData 请求参数 * @return {String} */ public static String fileTransfer(Map<String, String> reqData) { return doPost(SDKConfig.getConfig().getFileTransUrl(), reqData); } /** * 文件传输类接口 * * @param reqData 请求参数 * @return 转化后的 Map */ public static Map<String, String> fileTransferByMap(Map<String, String> reqData) { return SDKUtil.convertResultStringToMap(fileTransfer(reqData)); } /** * APP控件支付 * * @param reqData 请求参数 * @return {String} */ public static String AppConsume(Map<String, String> reqData) { return doPost(SDKConfig.getConfig().getAppRequestUrl(), reqData); } /** * APP控件支付 * * @param reqData 请求参数 * @return 转化后的 Map */ public static Map<String, String> AppConsumeByMap(Map<String, String> reqData) { return SDKUtil.convertResultStringToMap(AppConsume(reqData)); } /** * 网关缴费 * * @param resp HttpServletResponse * @param reqData 请求参数 * @throws IOException 异常 */ public static void jfFrontConsume(HttpServletResponse resp, Map<String, String> reqData) throws IOException { String html = AcpService.createAutoFormHtml(SDKConfig.getConfig().getJfFrontRequestUrl(), reqData, "UTF-8"); resp.getWriter().write(html); } /** * APP缴费 * * @param reqData 请求参数 * @return {String} */ public static String jfAppTrans(Map<String, String> reqData) { return doPost(SDKConfig.getConfig().getAppRequestUrl(), reqData); } /** * APP缴费 * * @param reqData 请求参数 * @return 转化后的 Map */ public static Map<String, String> jfAppTransByMap(Map<String, String> reqData) { return SDKUtil.convertResultStringToMap(jfAppTrans(reqData)); } /** * 获取地区列表 * * @return {String} */ public static String getAllAreas() { return doGet("https://gateway.95516.com/jiaofei/config/s/areas"); } /** * 获取业务目录 * * @return {String} */ public static String getAllCategories() { return doGet("https://gateway.95516.com/jiaofei/config/s/categories/00"); } public static String doGet(String url) { return HttpKit.getDelegate().get(url); } public static String doPost(String url, Map<String, String> params) { Map<String, Object> temp = new HashMap<String, Object>(params.size()); temp.putAll(params); return HttpKit.getDelegate().post(url, temp); } }
[ "shen@913656048" ]
shen@913656048
048dff45cf383b9249d0355aaa971cd0e394b853
a9ec3d73156ef46f0a46b4b755c41bb090ea67ce
/src/main/java/io/github/mjhipster/application/MjhipsterSampleApplicationApp.java
f1e84324c4a7e2bf6096bddc7596f61cfc61de71
[]
no_license
tomazst/mjhipster-sample-application
d8ec23c0ab941a0158ed7072b119debee07face8
a6ecc293bdafab3a86bc48483429d9feaec141aa
refs/heads/master
2020-05-07T09:08:38.687030
2019-04-09T12:40:41
2019-04-09T12:40:41
180,363,953
0
0
null
null
null
null
UTF-8
Java
false
false
4,102
java
package io.github.mjhipster.application; import io.github.mjhipster.application.config.ApplicationProperties; import io.github.mjhipster.application.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterConstants; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.core.env.Environment; import javax.annotation.PostConstruct; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; @SpringBootApplication @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) public class MjhipsterSampleApplicationApp { private static final Logger log = LoggerFactory.getLogger(MjhipsterSampleApplicationApp.class); private final Environment env; public MjhipsterSampleApplicationApp(Environment env) { this.env = env; } /** * Initializes mjhipsterSampleApplication. * <p> * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>. */ @PostConstruct public void initApplication() { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { log.error("You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."); } if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { log.error("You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."); } } /** * Main method, used to run the application. * * @param args the command line arguments */ public static void main(String[] args) { SpringApplication app = new SpringApplication(MjhipsterSampleApplicationApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); logApplicationStartup(env); } private static void logApplicationStartup(Environment env) { String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } String serverPort = env.getProperty("server.port"); String contextPath = env.getProperty("server.servlet.context-path"); if (StringUtils.isBlank(contextPath)) { contextPath = "/"; } String hostAddress = "localhost"; try { hostAddress = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.warn("The host name could not be determined, using `localhost` as fallback"); } log.info("\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}{}\n\t" + "External: \t{}://{}:{}{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, serverPort, contextPath, protocol, hostAddress, serverPort, contextPath, env.getActiveProfiles()); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f0e37f46956ba1d4337d1edb5bad90ccb4c33825
1e194aa41e80c9ac433615bb0b08a00fbeaa4ac1
/app/src/main/java/com/hywy/publichzt/task/GetMyXcTask.java
eddb60755ec2ae4a2039ab2b8dd83d887969d286
[]
no_license
Sususuperman/-app
b88ce5c01ae0e3f66d3ced81fda73f61652af733
909a81ea30932427113f5735581618e9fd56abca
refs/heads/master
2020-03-30T06:12:13.370937
2018-09-29T08:58:35
2018-09-29T08:58:35
150,845,026
0
0
null
null
null
null
UTF-8
Java
false
false
1,931
java
package com.hywy.publichzt.task; import android.content.Context; import android.util.Log; import com.cs.common.utils.StringUtils; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.hywy.publichzt.HttpUrl; import com.hywy.publichzt.adapter.item.InspectionItem; import com.hywy.publichzt.entity.Inspection; import com.hywy.publichzt.key.Key; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; /** * @author Superman */ public class GetMyXcTask extends BaseRequestTask { private int index; public GetMyXcTask(Context context, int index) { super(context); this.index = index; } public GetMyXcTask(Context context) { super(context); } @Override public String url() { return HttpUrl.getUrl(HttpUrl.RMS_APP_PATROL_LOG_LIST); } @Override public boolean isPost() { return false; } @Override public Object request(String json) throws Exception { Type type = new TypeToken<List<Inspection>>() { }.getType(); List<Inspection> list = new Gson().fromJson(json, type); List<InspectionItem> items = new ArrayList<>(); if (StringUtils.isNotNullList(list)) { int size = list.size(); for (int i = 0; i < size; i++) { Inspection r = list.get(i); Log.i("points", r.getPoints().size() + ""); InspectionItem item = new InspectionItem(r); items.add(item); } } List<InspectionItem> start_items; if (items.size() > 5) { start_items = items.subList(0, 5);//截取前五条数据 } else { start_items = items; } if (index != 0) { result.put(Key.ITEMS, start_items); } else { result.put(Key.ITEMS, items); } return result; } }
[ "chaoisgoodman@163.com" ]
chaoisgoodman@163.com
bf408961ceb908d17bf732c6cec0f712766d1ce0
ef0c1514e9af6de3ba4a20e0d01de7cc3a915188
/sdk/cognitiveservices/ms-azure-cs-luis-runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/models/Sentiment.java
50715631d55f3a7ab022ef7868c17de330773e84
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "CC0-1.0", "BSD-3-Clause", "UPL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
Azure/azure-sdk-for-java
0902d584b42d3654b4ce65b1dad8409f18ddf4bc
789bdc6c065dc44ce9b8b630e2f2e5896b2a7616
refs/heads/main
2023-09-04T09:36:35.821969
2023-09-02T01:53:56
2023-09-02T01:53:56
2,928,948
2,027
2,084
MIT
2023-09-14T21:37:15
2011-12-06T23:33:56
Java
UTF-8
Java
false
false
1,528
java
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.cognitiveservices.language.luis.runtime.models; import com.fasterxml.jackson.annotation.JsonProperty; /** * Sentiment of the input utterance. */ public class Sentiment { /** * The polarity of the sentiment, can be positive, neutral or negative. */ @JsonProperty(value = "label") private String label; /** * Score of the sentiment, ranges from 0 (most negative) to 1 (most * positive). */ @JsonProperty(value = "score") private Double score; /** * Get the label value. * * @return the label value */ public String label() { return this.label; } /** * Set the label value. * * @param label the label value to set * @return the Sentiment object itself. */ public Sentiment withLabel(String label) { this.label = label; return this; } /** * Get the score value. * * @return the score value */ public Double score() { return this.score; } /** * Set the score value. * * @param score the score value to set * @return the Sentiment object itself. */ public Sentiment withScore(Double score) { this.score = score; return this; } }
[ "jianghaolu@users.noreply.github.com" ]
jianghaolu@users.noreply.github.com
b7d84fc5615122585b97b171b861f97128875758
546535d586d8e11f746f5af5faa4724e02e117c9
/src/main/java/net/socialhub/core/action/callback/user/FollowUserCallback.java
02ed5a36f17b8b4c4c766a56d84a4391279a3591
[ "MIT" ]
permissive
uakihir0/SocialHub
84521d9efebbbdf546048f81f6e255dc61417c25
0c88f29abc7014158cac6a6499b7fe8beb796f6c
refs/heads/master
2023-07-07T09:10:35.661951
2023-06-26T13:19:38
2023-06-26T13:19:38
140,700,591
50
4
MIT
2023-06-26T13:19:40
2018-07-12T10:51:13
Java
UTF-8
Java
false
false
256
java
package net.socialhub.core.action.callback.user; import net.socialhub.core.action.callback.EventCallback; import net.socialhub.core.model.event.UserEvent; public interface FollowUserCallback extends EventCallback { void onFollow(UserEvent event); }
[ "a.urusihara@gmail.com" ]
a.urusihara@gmail.com
53d709383d5c58b871c79afd617606165139f762
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_2a0507caf0b7671a7ce2801b266f41346c444679/DocumentEvent/16_2a0507caf0b7671a7ce2801b266f41346c444679_DocumentEvent_s.java
c71a0ff96a6fec1d0c998f54b581f2f99dbf4e2f
[]
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,117
java
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jface.text; import org.eclipse.core.runtime.Assert; /** * Specification of changes applied to documents. All changes are represented as * replace commands, i.e. specifying a document range whose text gets replaced * with different text. In addition to this information, the event also contains * the changed document. * * @see org.eclipse.jface.text.IDocument */ public class DocumentEvent { /** The changed document */ public IDocument fDocument; /** The document offset */ public int fOffset; /** Length of the replaced document text */ public int fLength; /** Text inserted into the document */ public String fText; /** * The modification stamp of the document when firing this event. * @since 3.1 */ protected long fModificationStamp; /** * Creates a new document event. * * @param doc the changed document * @param offset the offset of the replaced text * @param length the length of the replaced text * @param text the substitution text */ public DocumentEvent(IDocument doc, int offset, int length, String text) { Assert.isNotNull(doc); Assert.isTrue(offset >= 0); Assert.isTrue(length >= 0); fDocument= doc; fOffset= offset; fLength= length; fText= text; if (fDocument instanceof IDocumentExtension4) fModificationStamp= ((IDocumentExtension4)fDocument).getModificationStamp(); else fModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP; } /** * Creates a new, not initialized document event. */ public DocumentEvent() { } /** * Returns the changed document. * * @return the changed document */ public IDocument getDocument() { return fDocument; } /** * Returns the offset of the change. * * @return the offset of the change */ public int getOffset() { return fOffset; } /** * Returns the length of the replaced text. * * @return the length of the replaced text */ public int getLength() { return fLength; } /** * Returns the text that has been inserted. * * @return the text that has been inserted */ public String getText() { return fText; } /** * Returns the document's modification stamp at the * time when this event was sent. * * @return the modification stamp or {@link IDocumentExtension4#UNKNOWN_MODIFICATION_STAMP}. * @see IDocumentExtension4#getModificationStamp() * @since 3.1 */ public long getModificationStamp() { return fModificationStamp; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ae3e159869eea757a0a85b58d634de113541c7cf
739da6da00a1213b640671916107c7d79c1612e0
/src/com/wuyg/task/TaskConstant.java
8477339c7c048992bf50ea533ec6f18eb3336886
[]
no_license
missingu924/shenqi
cff0bf3c58dbd7f7033d9ecd3fdc50b0490e2770
181707bfde9d65eb1a38635e7d13dd26528d5b24
refs/heads/master
2021-01-10T06:45:51.306646
2016-01-04T06:37:43
2016-01-04T06:37:43
48,972,469
0
0
null
null
null
null
GB18030
Java
false
false
3,653
java
package com.wuyg.task; import java.util.ArrayList; import java.util.List; public class TaskConstant { // 工单环节 public static final String TP_DRAFT = "编辑草稿"; public static final String TP_SUBMIT = "提交审批"; public static final String TP_AUDIT = "派单审批"; // public static final String TP_PROCESS = "TP_PROCESS"; public static final String TP_FEEDBACK = "阶段反馈"; public static final String TP_FORWRD = "工单转派"; public static final String TP_REJECT = "驳回"; public static final String TP_REVERT = "工单回复"; public static final String TP_ARCHIVE_VERIFY = "归档审核"; public static final String TP_ARCHIVE = "归档"; // 工单状态 public static final String STATUS_NEED_SUBMIT = "待提交"; public static final String STATUS_NEED_AUDIT = "待审批"; public static final String STATUS_NEED_REVERT = "待处理"; public static final String STATUS_NEED_ARCHIVE_VERIFY = "待归档审核"; public static final String STATUS_FEEDBACKED = "已阶段反馈"; public static final String STATUS_FORWRDED = "已转派"; public static final String STATUS_REJECTED = "已驳回"; public static final String STATUS_ARCHIVED = "已归档"; public static final String RESULT_AGREED = "同意"; public static final String RESULT_REJECT = "驳回"; public static final String RESULT_FAILED = "处理失败"; public static final String RESULT_SUCCESS = "处理成功"; public static final String CRITICAL_LEVEL_COMMON = "一般"; public static final String CRITICAL_LEVEL_URGENT = "紧急"; public static final String CRITICAL_LEVEL_VERY_URGENT = "非常紧急"; // 处理主体类型 public static final String SUBJECT_TYPE_PERSON = "SUBJECT_TYPE_PERSON"; public static final String SUBJECT_TYPE_DEPARTMENT = "SUBJECT_TYPE_DEPARTMENT"; public static final String SUBJECT_TYPE_GROUP = "SUBJECT_TYPE_GROUP"; // 当前用户与工单的关系 public static final String RELATIONSHITP_NEED_PROCESS = "NEED_PROCESS";// 待处理 public static final String RELATIONSHITP_PROCESSED = "PROCESSED";// 已处理未归档 public static final String RELATIONSHITP_ARCHIVED = "ARCHIVED";// 已归档 public static final String RELATIONSHITP_RELEATED = "RELEATED";// 有关系(包括处理过的、待处理的、本部门相关的) // 定制化字段的最大数量 public static final int MAX_CUST_COL_COUNT = 50; public static final String CUST_COL_PLACEHOLDER = "占位"; public static String CUST_COLNAME_WIDTH = "20%"; public static String CUST_COLVAUE_WIDTH = "30%"; // 号码预约状态 public static final String TEL_REVERSE_STATUS_REVERSING = "预约中"; public static final String TEL_REVERSE_STATUS_TIMEOUT = "预约超时"; public static final String TEL_REVERSE_STATUS_SUCCESS = "预约成功"; public static final String TEL_REVERSE_STATUS_FAILED = "预约失败"; // 号码等级 public static final String TEL_LEVEL_NONE = "非吉祥号码"; public static final String TEL_LEVEL_1 = "一类号码"; public static final String TEL_LEVEL_2 = "二类号码"; public static final String TEL_LEVEL_3 = "三类号码"; public static final String TEL_LEVEL_4 = "四类号码"; public static final String TEL_LEVEL_5 = "五类号码"; public static String getProcessEnName(String processCnName) { if (TP_DRAFT.equals(processCnName) || TP_SUBMIT.equals(processCnName)) { return "draft"; } else if (TP_AUDIT.equals(processCnName)) { return "audit"; } else if (TP_REVERT.equals(processCnName)) { return "revert"; } else if (TP_ARCHIVE_VERIFY.equals(processCnName)) { return "archiveVerify"; } return processCnName; } }
[ "missingu924@163.com" ]
missingu924@163.com
7c544be916d24e07a83d9e7c5632962f977fac47
83102fa84a465b769b010437af28fdb91730d438
/src/JavaBasics/IncreamentaAndDecremental.java
044d9d7c4dcb00c8f0e86fd63acf6309623b6ab9
[]
no_license
sasmita-art/sasmita-art
b55dbe9331830b0b7cef319e5ede5e98742328e2
84fe0c85ad391a38620f5a4be99563d6a70e2867
refs/heads/master
2021-05-24T15:59:54.383839
2020-04-07T20:06:08
2020-04-07T20:06:08
253,646,005
0
0
null
2020-04-07T20:06:09
2020-04-07T00:17:39
Java
UTF-8
Java
false
false
637
java
package JavaBasics; public class IncreamentaAndDecremental { public static void main(String[] args) { //post increment int i=1; int j=i++; System.out.println(i); System.out.println(j); // pre increament int a=1; int b=++a; System.out.println(a); System.out.println(b); //post decrement int x=1; int y=x--; System.out.println(x); System.out.println(y); //pre dcrement int c=1; int d=--c; System.out.println(c); System.out.println(d); } }
[ "you@example.com" ]
you@example.com
40c9e1f88dce30f8a61644b0b62805726a428b94
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/pluginsdk/ui/preference/a.java
013a0ba8195059a4b1f9be124310941390e90175
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,249
java
package com.tencent.mm.pluginsdk.ui.preference; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import com.tencent.mm.am.f; import com.tencent.mm.am.h; import com.tencent.mm.am.k; import com.tencent.mm.model.ah; import com.tencent.mm.r.d; import com.tencent.mm.r.m; import com.tencent.mm.sdk.platformtools.ay; import com.tencent.mm.sdk.platformtools.u; import com.tencent.mm.storage.ag.e; import com.tencent.mm.ui.MMActivity; import com.tencent.mm.ui.base.p; import com.tencent.mm.ui.tools.a.c; public final class a extends LinearLayout implements d { private static a iOc; p coc; private Context context; private TextView cqK; private Button iOd; public a(Context paramContext) { super(paramContext); context = paramContext; paramContext = View.inflate(context, 2131363029, this); cqK = ((TextView)paramContext.findViewById(2131169014)); iOd = ((Button)paramContext.findViewById(2131169015)); iOd.setOnClickListener(new View.OnClickListener() { public final void onClick(View paramAnonymousView) { paramAnonymousView = View.inflate(a.a(a.this), 2131363000, null); ((TextView)paramAnonymousView.findViewById(2131168974)).setVisibility(8); final TextView localTextView = (TextView)paramAnonymousView.findViewById(2131165331); localTextView.setVisibility(0); localTextView.setText("50"); final EditText localEditText = (EditText)paramAnonymousView.findViewById(2131168975); localEditText.setSingleLine(false); c.a(localEditText).rZ(100).a(null); localEditText.addTextChangedListener(new TextWatcher() { public final void afterTextChanged(Editable paramAnonymous2Editable) { int i = com.tencent.mm.ui.tools.i.ai(100, paramAnonymous2Editable.toString()); if (localTextView != null) { localTextView.setText(String.valueOf(i)); } } public final void beforeTextChanged(CharSequence paramAnonymous2CharSequence, int paramAnonymous2Int1, int paramAnonymous2Int2, int paramAnonymous2Int3) {} public final void onTextChanged(CharSequence paramAnonymous2CharSequence, int paramAnonymous2Int1, int paramAnonymous2Int2, int paramAnonymous2Int3) {} }); com.tencent.mm.ui.base.g.a(a.a(a.this), a.a(a.this).getString(2131430905), paramAnonymousView, new DialogInterface.OnClickListener() { public final void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) { paramAnonymous2DialogInterface = localEditText.getText().toString().trim(); if ((paramAnonymous2DialogInterface != null) && (paramAnonymous2DialogInterface.length() > 0)) { a.a(a.this, paramAnonymous2DialogInterface); } } }, null); localEditText.post(new Runnable() { public final void run() { if ((a.a(a.this) instanceof MMActivity)) { ((MMActivity)a.a(a.this)).apz(); } } }); } }); } private static int AM(String paramString) { if (paramString == null) { u.d("!44@/B4Tb64lLpISOYcLaKm7W1V6z9KICjQJp9PXDQLaAGg=", "getOpCodeFromVerify fail, xml is null"); return 6; } switch (ETaxL) { case 2: case 5: case 3: case 4: default: return 6; } return 5; } public static void setFMessageArgs(a parama) { iOc = parama; } public final void a(int paramInt1, int paramInt2, String paramString, com.tencent.mm.r.j paramj) { if (paramj.getType() != 30) { return; } u.d("!44@/B4Tb64lLpISOYcLaKm7W1V6z9KICjQJp9PXDQLaAGg=", "onSceneEnd, errType = " + paramInt1 + ", errCode = " + paramInt2); if (coc != null) { coc.dismiss(); } if ((paramInt1 == 0) && (paramInt2 == 0)) { paramInt1 = axL; paramString = iAp; u.d("!44@/B4Tb64lLpISOYcLaKm7W1V6z9KICjQJp9PXDQLaAGg=", "onSceneEnd, pre insert fmsg, opcode = " + paramInt1 + ", verifyContent = " + paramString); u.d("!44@/B4Tb64lLpISOYcLaKm7W1V6z9KICjQJp9PXDQLaAGg=", "onSceneEnd, type = " + iOctype); switch (iOctype) { default: paramj = new f(); field_createTime = com.tencent.mm.am.e.d(iOcapb, 0L); field_isSend = 1; field_msgContent = paramString; field_talker = iOcapb; if (paramInt1 != 5) { break; } } for (paramInt1 = 2;; paramInt1 = 3) { field_type = paramInt1; boolean bool = com.tencent.mm.am.l.DK().a(paramj); u.d("!44@/B4Tb64lLpISOYcLaKm7W1V6z9KICjQJp9PXDQLaAGg=", "onSceneEnd, insert fmsg, ret = " + bool); for (;;) { ah.tE().b(30, this); return; paramj = new h(); field_createtime = com.tencent.mm.am.i.jE(iOcapb); field_isSend = 1; field_content = paramString; field_talker = "fmessage"; field_sayhiuser = iOcapb; field_svrid = System.currentTimeMillis(); field_status = 4; com.tencent.mm.am.l.DM().a(paramj); continue; paramj = new com.tencent.mm.am.j(); field_createtime = k.jE(iOcapb); field_isSend = 1; field_content = paramString; field_talker = "fmessage"; field_sayhiuser = iOcapb; field_svrid = System.currentTimeMillis(); field_status = 4; bool = com.tencent.mm.am.l.DN().a(paramj); u.d("!44@/B4Tb64lLpISOYcLaKm7W1V6z9KICjQJp9PXDQLaAGg=", "onSceneEnd, insert shake, ret = " + bool); } } } if ((paramInt1 == 4) && (paramInt2 == -34)) { paramj = context.getString(2131431093); } for (;;) { Toast.makeText(context, paramj, 1).show(); break; if ((paramInt1 == 4) && (paramInt2 == -94)) { paramj = context.getString(2131431094); } else if ((paramInt1 == 4) && (paramInt2 == -24)) { paramj = paramString; if (!ay.kz(paramString)) {} } else { paramj = context.getString(2131431089); } } } public final void setBtnVisibility(int paramInt) { if (iOd != null) { iOd.setVisibility(paramInt); } } public final void setContentText(String paramString) { cqK.setText(com.tencent.mm.pluginsdk.ui.d.e.a(context, ay.ky(paramString), cqK.getTextSize())); } public static final class a { public String apb; public int asc; public String fvG; public int type; } } /* Location: * Qualified Name: com.tencent.mm.pluginsdk.ui.preference.a * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
e7c8f52ff93a84cd4d262fe0f4e190c418ce2d4e
7aeda9a71d098d9ebcd0d4c8bca6ecbd3b281574
/spring-boot-demo-war/src/main/java/com/xkcoding/war/SpringBootDemoWarApplication.java
1cd8917035309761212454e8ef99e0a517f4e7b5
[ "MIT" ]
permissive
Portg/spring-boot-demo
f455a1eda05cf15d05d92adee9389406f8847958
47063675b7ca7147ae7688f54b85a749204b1c6d
refs/heads/master
2020-04-03T11:24:38.335391
2018-10-29T10:39:00
2018-10-29T10:39:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package com.xkcoding.war; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootDemoWarApplication { public static void main(String[] args) { SpringApplication.run(SpringBootDemoWarApplication.class, args); } }
[ "237497819@qq.com" ]
237497819@qq.com
b19b61e2d9904166f5297e21ec13bd1568b5b613
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/4/FloatProperty.java
26c3fd59e8a73a9ba238c776be86f2af8429db43
[]
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
1,215
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.api.properties; final class FloatProperty extends FloatingPointNumberProperty { private final float value; FloatProperty( int propertyKeyId, float value ) { super( propertyKeyId ); this.value = value; } @Override public double doubleValue() { return value; } @Override public Float value() { return value; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
50ae6b368e06e3e8a2281b84265844538af4f9bd
16c378359041a053502ca7a2dcbbd5bf721f3515
/app/src/main/java/com/app/pixstory/ui/dashboard/you/navigator/HomeYouNavigator.java
de7f5381b6669f9fdcd397e997a2336437e9d9b3
[ "Apache-2.0" ]
permissive
Arvindo9/Pixstory
8fc982e05a43b16598a1f8c7d4da4a936828060d
9d90dee647b434f00e1ea913a0a326dc073ea717
refs/heads/master
2023-01-22T05:01:27.226201
2020-11-21T20:13:47
2020-11-21T20:13:47
314,895,519
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package com.app.pixstory.ui.dashboard.you.navigator; import com.app.pixstory.base.BaseNavigator; import com.app.pixstory.data.model.get_story_user.Story; import com.app.pixstory.data.model.get_story_user.StoryUserData; import com.app.pixstory.data.model.page_list.PageListData; import com.app.pixstory.data.model.upload.Data; import java.util.List; /** * Created by Kamlesh Yadav on 06-04-2020. * Eighteen Pixels India Private Limited Lucknow U.P * kamlesh@18pixels.com */ public interface HomeYouNavigator extends BaseNavigator { void onStoryUserResponse(Boolean success, StoryUserData data, List<Story> story); void onPageResponse(Boolean success, List<PageListData> data); void onMyPhotoResponse(boolean b, List<Data> data, String type); }
[ "arvindomondal@gmail.com" ]
arvindomondal@gmail.com
c9617be2b234e63b0d18d63b3005a7d197bf0548
2a522e99613089c961ecee0190cb1fff39aa6a44
/app/src/main/java/br/com/questv/model/series/SeriesListAdapter.java
ddf0720c2a6073f93cd04b2f5524f4b22323a2e5
[ "MIT" ]
permissive
GersonSales/questv-android
f90a31f174c8499daaf23196a843db1fd181a643
5d05722cd91dd1ea1a674fe0f8a962e869d822d1
refs/heads/master
2022-01-15T07:37:12.162026
2019-05-15T04:54:52
2019-05-15T04:54:52
167,698,687
0
0
null
null
null
null
UTF-8
Java
false
false
1,814
java
package br.com.questv.model.series; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.recyclerview.widget.RecyclerView; import br.com.questv.R; import br.com.questv.contract.OnItemClickListener; import java.util.ArrayList; import java.util.List; public class SeriesListAdapter extends RecyclerView.Adapter<SeriesListViewHolder> { private final List<String> seriesCategories; private final OnItemClickListener<SeriesModel> onItemClickListener; public SeriesListAdapter(final OnItemClickListener<SeriesModel> onItemClickListener) { this.seriesCategories = new ArrayList<>(); this.onItemClickListener = onItemClickListener; this.seriesCategories.add("none");//TODO('remove') this.seriesCategories.addAll(SeriesRepositoryImpl.getInstance().findAllCategories()); } @Override public SeriesListViewHolder onCreateViewHolder(final ViewGroup viewGroup, final int viewType) { final LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext()); final View view = inflateView(viewGroup, inflater); return new SeriesListViewHolder(view); } private View inflateView(final ViewGroup viewGroup, final LayoutInflater inflater) { return inflater.inflate(R.layout.series_list, viewGroup, false); } @Override public void onBindViewHolder(final SeriesListViewHolder seriesListViewHolder, final int position) { if (position == 0) { seriesListViewHolder.bindViewPager(onItemClickListener); } else { final String category = this.seriesCategories.get(position); seriesListViewHolder.bindRecyclerView(category, onItemClickListener); } } @Override public int getItemCount() { return this.seriesCategories.size(); } }
[ "gerson.junior@ccc.ufcg.edu.br" ]
gerson.junior@ccc.ufcg.edu.br
d2ac6d9b7ba6437a75580b5a33ec6d26c8cb024e
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.alpenglow-EnterpriseServer/sources/X/C05600k5.java
3fd242916fce0f1a5128e677a97914003c3a966c
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
2,408
java
package X; import com.facebook.infer.annotation.Nullsafe; import com.facebook.tigon.iface.AppNetSessionId; import com.facebook.tigon.iface.FacebookLoggingRequestInfo; import com.facebook.tigon.iface.RedirectRequestInfo; import com.facebook.tigon.iface.RestrictiveLoggingStatus; import com.facebook.tigon.iface.TigonBackupHostServiceInfo; import com.facebook.tigon.iface.TigonLigerRequestInfo; import com.facebook.tigon.iface.TigonSamplingConfigInfo; import com.facebook.tigon.iface.TigonXProcessTrafficShapingCommunication; import com.facebook.tigon.iface.TransientAnalyzerTracingInfo; import com.facebook.tigon.iface.TriggeredLoggingInfo; @Nullsafe(Nullsafe.Mode.LOCAL) /* renamed from: X.0k5 reason: invalid class name and case insensitive filesystem */ public final class C05600k5 { public static final C05590k4<?>[] A00; public static final C05590k4<AppNetSessionId> A01; public static final C05590k4<TigonBackupHostServiceInfo> A02; public static final C05590k4<FacebookLoggingRequestInfo> A03; public static final C05590k4<TigonLigerRequestInfo> A04; public static final C05590k4<RedirectRequestInfo> A05; public static final C05590k4<RestrictiveLoggingStatus> A06; public static final C05590k4<TigonSamplingConfigInfo> A07; public static final C05590k4<TransientAnalyzerTracingInfo> A08; public static final C05590k4<TriggeredLoggingInfo> A09; public static final C05590k4<TigonXProcessTrafficShapingCommunication> A0A; static { C05590k4<FacebookLoggingRequestInfo> r0 = new C05590k4<>(); A03 = r0; C05590k4<TigonLigerRequestInfo> r1 = new C05590k4<>(); A04 = r1; C05590k4<RedirectRequestInfo> r2 = new C05590k4<>(); A05 = r2; C05590k4<TigonSamplingConfigInfo> r3 = new C05590k4<>(); A07 = r3; C05590k4<TigonXProcessTrafficShapingCommunication> r4 = new C05590k4<>(); A0A = r4; C05590k4<TigonBackupHostServiceInfo> r5 = new C05590k4<>(); A02 = r5; C05590k4<TransientAnalyzerTracingInfo> r6 = new C05590k4<>(); A08 = r6; C05590k4<TriggeredLoggingInfo> r7 = new C05590k4<>(); A09 = r7; C05590k4<AppNetSessionId> r8 = new C05590k4<>(); A01 = r8; C05590k4<RestrictiveLoggingStatus> r9 = new C05590k4<>(); A06 = r9; A00 = new C05590k4[]{r0, r1, r2, r3, r4, r5, r6, r7, r8, r9}; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
16c816ce59bf0b68eda3f5e4148c67bd3dd331aa
407a3cbecc2e2996a6ec998040344d5baf3e9f86
/generators/src/main/java/com/pholser/junit/quickcheck/generator/java/lang/IntegerGenerator.java
09b7614f3e7e4dc67344906ac17633507e87a0e4
[ "MIT" ]
permissive
gabeki/junit-quickcheck
95b58d70ca0de3a3fdcf0fa697145b0c76f12354
7466777c5b2f621b3735d17df0107ce745c40be5
refs/heads/master
2021-01-23T07:17:02.498410
2015-07-13T11:58:36
2015-07-13T11:58:36
34,024,446
0
0
null
2015-04-15T23:51:08
2015-04-15T23:51:08
null
UTF-8
Java
false
false
2,452
java
/* The MIT License Copyright (c) 2010-2014 Paul R. Holser, Jr. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.pholser.junit.quickcheck.generator.java.lang; import com.pholser.junit.quickcheck.generator.GenerationStatus; import com.pholser.junit.quickcheck.generator.Generator; import com.pholser.junit.quickcheck.generator.InRange; import com.pholser.junit.quickcheck.random.SourceOfRandomness; import static java.lang.Integer.*; import static java.util.Arrays.*; /** * Produces values for theory parameters of type {@code int} or {@link Integer}. */ public class IntegerGenerator extends Generator<Integer> { private int min = MIN_VALUE; private int max = MAX_VALUE; @SuppressWarnings("unchecked") public IntegerGenerator() { super(asList(int.class, Integer.class)); } /** * Tells this generator to produce values within a specified {@linkplain InRange#min() minimum} and/or * {@linkplain InRange#max()} maximum}, inclusive, with uniform distribution. * * @param range annotation that gives the range's constraints */ public void configure(InRange range) { if (!range.min().isEmpty()) min = Integer.parseInt(range.min()); if (!range.max().isEmpty()) max = Integer.parseInt(range.max()); } @Override public Integer generate(SourceOfRandomness random, GenerationStatus status) { return random.nextInt(min, max); } }
[ "pholser@alumni.rice.edu" ]
pholser@alumni.rice.edu
e1e1f236aaf3d562462af80969980854c677df00
43c012a9cdea1df74ddeaf16f7850ccaaedf0782
/CER/library/api/fermat-cer-api/src/main/java/com/bitdubai/fermat_cer_api/layer/provider/exceptions/CantSaveExchangeRateException.java
f07fd101bc08e78eecedd19989bed74b7eb929f9
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
franklinmarcano1970/fermat
ef08d8c46740ac80ebeec96eca85936ce36d3ee8
c5239a0d4c97414881c9baf152243e6311c9afd5
refs/heads/develop
2020-04-07T04:12:39.745585
2016-05-23T21:20:37
2016-05-23T21:20:37
52,887,265
1
22
null
2016-08-23T12:58:03
2016-03-01T15:26:55
Java
UTF-8
Java
false
false
1,191
java
package com.bitdubai.fermat_cer_api.layer.provider.exceptions; import com.bitdubai.fermat_api.FermatException; /** * Created by Alejandro Bicelis on 12/7/2015. */ public class CantSaveExchangeRateException extends FermatException { public static final String DEFAULT_MESSAGE = "Cannot save Exchange Rate into Database"; public CantSaveExchangeRateException(final String message, final Exception cause, final String context, final String possibleReason) { super(message, cause, context, possibleReason); } public CantSaveExchangeRateException(final String message, final Exception cause) { this(message, cause, "", ""); } public CantSaveExchangeRateException(final String context, final String possibleReason) { this(DEFAULT_MESSAGE, null, context, possibleReason); } public CantSaveExchangeRateException(final String message) { this(message, null, null, null); } public CantSaveExchangeRateException(final Exception exception) { this(exception.getMessage()); setStackTrace(exception.getStackTrace()); } public CantSaveExchangeRateException() { this(DEFAULT_MESSAGE); } }
[ "abicelis@gmail.com" ]
abicelis@gmail.com
ec2839d27b17ad53049d5ce412ef631a3d872f55
1b9ce87c6215ecad4a7f40837297b639476171e3
/pax-transx-jdbc/src/test/java/org/ops4j/pax/transx/jdbc/stubs/StubDriver.java
66eca407d17f3c9a7ee2431a4b8e91a3f7ba423f
[ "Apache-2.0" ]
permissive
klebeer/org.ops4j.pax.transx
a644866b9eeebf6ff9589d0741f99994126c5073
aafb73f6505c3c6758eebc47ab41bb760f1085c7
refs/heads/master
2021-03-27T15:59:13.115798
2017-08-03T12:26:48
2017-08-03T12:26:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,525
java
/* * Copyright (C) 2014 Brett Wooldridge * * 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.ops4j.pax.transx.jdbc.stubs; import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.sql.DriverPropertyInfo; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.Properties; import java.util.logging.Logger; /** * @author Brett Wooldridge */ public class StubDriver implements Driver { private static final Driver driver; private static long connectionDelay; static { driver = new StubDriver(); try { DriverManager.registerDriver(driver); } catch (SQLException e) { e.printStackTrace(); } } public static void setConnectDelayMs(final long delay) { connectionDelay = delay; //MILLISECONDS.toNanos(delay); } /** {@inheritDoc} */ public Connection connect(String url, Properties info) throws SQLException { if (connectionDelay > 0) { // final long start = nanoTime(); // do { // // spin // } while (nanoTime() - start < connectionDelayNs); try { Thread.sleep(connectionDelay); } catch (InterruptedException var3) { Thread.currentThread().interrupt(); } } return new StubConnection(); } /** {@inheritDoc} */ public boolean acceptsURL(String url) throws SQLException { return true; } /** {@inheritDoc} */ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { return null; } /** {@inheritDoc} */ public int getMajorVersion() { return 0; } /** {@inheritDoc} */ public int getMinorVersion() { return 0; } /** {@inheritDoc} */ public boolean jdbcCompliant() { return true; } /** {@inheritDoc} */ public Logger getParentLogger() throws SQLFeatureNotSupportedException { return null; } }
[ "gnodet@apache.org" ]
gnodet@apache.org
6efa0ded2933d30d1a583fc8d2cafca112505af2
3692d866107ed4e90e2ddbfad6a4489be9f8042a
/src/main/java/nablarch/fw/dicontainer/Init.java
b5d4856818e940b13829a5ea2e026ff663ffdab1
[ "Apache-2.0" ]
permissive
nablarch/nablarch-fw-scoped-dicontainer
07ac1a1cd532fcd779037cb69289075c582fd568
540f2c5279d18460150bfa8575fe40510132e259
refs/heads/master
2021-06-23T04:36:15.270792
2020-09-28T07:22:27
2020-09-28T07:22:27
200,568,314
0
1
Apache-2.0
2020-11-06T10:05:41
2019-08-05T02:28:01
Java
UTF-8
Java
false
false
815
java
package nablarch.fw.dicontainer; 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; /** * コンポーネントの初期化を行うライフサイクルメソッドであることを表すアノテーション。 * * <p>{@code @Init}を付与するメソッドは次の制約を守らなければならない。</p> * <ul> * <li>staticメソッドではないこと</li> * <li>引数がないこと</li> * </ul> * * <p>また、1つのコンポーネント内で{@code @Init}を付与できるメソッドは1つだけに限られる。</p> * */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Init { }
[ "backpaper0@gmail.com" ]
backpaper0@gmail.com
6184be83b8e38883e13b01f1f61d4596a63363c5
4b0cdc84fe1330eb1ad602669c2735ce995139d3
/webfx-stack-ui-controls/src/main/java/dev/webfx/stack/ui/controls/alert/AlertUtil.java
84979526076a39a0fd2ee11dd023f851f342d160
[ "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
webfx-project/webfx-stack
8f991a1552336dcad4a05883429ebe2c38aca2d1
0deeffe2509dcc6b24b776cbf2635f8605643f6c
refs/heads/main
2023-08-17T00:13:43.321212
2023-08-14T16:33:40
2023-08-14T16:33:40
513,490,539
0
2
Apache-2.0
2023-08-31T10:13:59
2022-07-13T11:15:37
Java
UTF-8
Java
false
false
2,319
java
package dev.webfx.stack.ui.controls.alert; import dev.webfx.stack.ui.controls.dialog.DialogContent; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.layout.GridPane; import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; import javafx.stage.Window; import dev.webfx.stack.ui.controls.dialog.DialogUtil; import static dev.webfx.extras.util.layout.LayoutUtil.setMaxSizeToInfinite; import static dev.webfx.extras.util.layout.LayoutUtil.setMaxWidthToInfinite; /** * @author Bruno Salmon */ public final class AlertUtil { public static void showExceptionAlert(Throwable e, Window owner) { Label label = new Label("The exception stacktrace was:"); StringBuilder sb = new StringBuilder(e.getMessage()); for (StackTraceElement element : e.getStackTrace()) sb.append('\n').append(element); String exceptionText = sb.toString(); TextArea stackTraceArea = new TextArea(exceptionText); stackTraceArea.setEditable(false); stackTraceArea.setMinWidth(400); stackTraceArea.setMinHeight(300); //stackTraceArea.setWrapText(true); // Not implemented yet by WebFX setMaxSizeToInfinite(stackTraceArea); GridPane.setVgrow(stackTraceArea, Priority.ALWAYS); GridPane.setHgrow(stackTraceArea, Priority.ALWAYS); GridPane expContent = setMaxWidthToInfinite(new GridPane()); expContent.add(label, 0, 0); expContent.add(stackTraceArea, 0, 1); DialogContent dialogContent = new DialogContent() .setTitle("An error occurred") //.setHeaderText(e.getMessage()) .setContent(expContent); DialogUtil.showModalNodeInGoldLayout(dialogContent, (Pane) owner.getScene().getRoot()); DialogUtil.armDialogContentButtons(dialogContent, null); /* Version using Alert (not working yet with WebFX) Alert alert = new Alert(Alert.AlertType.ERROR); alert.initOwner(owner); alert.setTitle("An error occurred"); alert.setHeaderText("Look, an Exception Dialog"); alert.setContentText(e.getMessage()); // Set expandable Exception into the dialog pane. alert.getDialogPane().setExpandableContent(expContent); alert.show(); */ } }
[ "dev.salmonb@gmail.com" ]
dev.salmonb@gmail.com
50df17576b01c44bbba05bd68e21857ff0331a16
388acb222aa683dbeaec49fafe1d63cf942fb004
/sbes/src/sbes/ast/ArrayCellDeclarationVisitor.java
92eea53bef62dcadf274e16bf307465bf7bc9720
[]
no_license
andreamattavelli/sbes
ffc3bbeef210c1ddb620f9630355127f69db88b3
2ab8a31c0bec909ce614bcb438248a8a75073039
refs/heads/master
2021-03-27T19:06:14.964145
2016-07-11T22:12:22
2017-11-11T16:57:28
62,493,534
0
0
null
null
null
null
UTF-8
Java
false
false
936
java
package sbes.ast; import japa.parser.ast.expr.ArrayAccessExpr; import japa.parser.ast.expr.AssignExpr; import japa.parser.ast.expr.Expression; import japa.parser.ast.visitor.VoidVisitorAdapter; import sbes.util.ASTUtils; public class ArrayCellDeclarationVisitor extends VoidVisitorAdapter<Void> { private String variableId; private String index; private Expression value; public ArrayCellDeclarationVisitor(final String variableId, final String index) { this.variableId = variableId; this.index = index; this.value = null; } public Expression getValue() { return value; } @Override public void visit(final AssignExpr n, final Void arg) { if (n.getTarget() instanceof ArrayAccessExpr) { ArrayAccessExpr aae = (ArrayAccessExpr) n.getTarget(); if (ASTUtils.getName(aae.getName()).equals(variableId) && aae.getIndex().toString().equals(index)) { value = n.getValue(); } } super.visit(n, arg); } }
[ "andreamattavelli@gmail.com" ]
andreamattavelli@gmail.com
8a0a82b3313b024cee3da1d40c6c40797361ae8a
ec1821602e059e58a3509ac528201cbf5470b377
/eclipse/portal/plugins/com.liferay.ide.eclipse.theme.core/src/com/liferay/ide/eclipse/theme/core/ThemeCore.java
08d793df3d3130297fc2b7d10d9ace0da6e8d00d
[]
no_license
adrianrm/liferay-ide
058ef2c3b4c2088bb01b38b84bba8c789c022337
1b88e31e08c38f95aae6e014f59a7093a5e14123
refs/heads/master
2021-01-16T22:47:35.590720
2011-08-12T08:37:39
2011-08-12T08:37:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,121
java
/******************************************************************************* * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * *******************************************************************************/ package com.liferay.ide.eclipse.theme.core; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plugin life cycle */ public class ThemeCore extends AbstractUIPlugin { // The plugin ID public static final String PLUGIN_ID = "com.liferay.ide.eclipse.theme.core"; // The shared instance private static ThemeCore plugin; private static ThemeDiffResourceListener themeDiffResourceListener; public static IStatus createErrorStatus(Exception ex) { return new Status(IStatus.ERROR, PLUGIN_ID, ex.getMessage(), ex); } public static IStatus createErrorStatus(String msg) { return new Status(IStatus.ERROR, PLUGIN_ID, msg); } public static IStatus createErrorStatus(String msg, Exception e) { return new Status(IStatus.ERROR, PLUGIN_ID, msg, e); } public static IStatus createWarningStatus(String msg) { return new Status(IStatus.WARNING, PLUGIN_ID, msg); } /** * Returns the shared instance * * @return the shared instance */ public static ThemeCore getDefault() { return plugin; } public static void logError(Exception ex) { getDefault().getLog().log(createErrorStatus(ex)); } /** * The constructor */ public ThemeCore() { //themeDiffResourceListener = new ThemeDiffResourceListener(); } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; //ResourcesPlugin.getWorkspace().addResourceChangeListener( // themeDiffResourceListener, IResourceChangeEvent.POST_CHANGE); } /* * (non-Javadoc) * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); if (themeDiffResourceListener != null) { ResourcesPlugin.getWorkspace().removeResourceChangeListener(themeDiffResourceListener); } } public static void logError(String msg, Exception e) { getDefault().getLog().log(createErrorStatus(msg, e)); } }
[ "gregory.amerson@liferay.com" ]
gregory.amerson@liferay.com
b3a631073a3054a255ffa3ee8bf3b8423f63bc8f
5dfafe256376318c628f7cc7c3df96b919352897
/collections/src/main/java/com/wildbeeslabs/jentle/collections/tree/RedBlackTree.java
8e43395d7992bddce9000d83ff79afad3ef3a2f4
[ "MIT" ]
permissive
AlexRogalskiy/jentle
e5cf9ea30ee4896cc275edae2d4ab5f2502ed68b
5d6f9feee02902cb0a330c7359c0c268feed2015
refs/heads/master
2022-12-21T15:42:20.627784
2020-06-27T07:54:11
2020-06-27T07:54:11
99,516,907
0
0
MIT
2022-12-14T20:39:26
2017-08-06T22:30:41
Java
UTF-8
Java
false
false
9,647
java
package com.wildbeeslabs.jentle.collections.tree; /** * Created by byhieg on 2017/6/24. * Mail to byhieg@gmail.com */ /** * 红黑树,一种通过红黑两种节点来维持二叉搜索树的一种树 * 这样树比原先的BST而言,不会出现最坏的查找情况是o(N)的情况 * 但是对于插入和删除的节点而言,就需要调整树的平衡,也就是维持红黑树的定义 * <p> * 红黑树的定义如下: * 1. 任何节点要不是黑色要不是红色 * 2. 根节点是黑色节点 * 3. 红节点的两个子节点都是黑色节点 * 4. 空节点是黑色节点 * 5. 任何一个节点下面遍历其子孙的叶子节点,经过的黑色节点的个数必须相等。 * <p> * 红黑树也是通过第5点进行维持平衡的,而为了维持平衡,需要对树进行调整,即进行左旋,右旋。 */ public class RedBlackTree { Node root; public RedBlackTree() { } public RedBlackTree(int value) { root = new Node(value); } public Node find(int value) { if (root == null) { throw new RuntimeException("树是空的"); } Node currentNode = root; while (currentNode != null && currentNode.getValue() != value) { if (currentNode.getValue() < value) { currentNode = currentNode.getLeft(); } else { currentNode = currentNode.getRight(); } } return currentNode; } public void insertNode(int value) { Node node = new Node(value); insertNode(node); } /** * 插入节点 * 该方法首先找到要插入的位置,然后设置插入的节点为红色节点 * 然后因为可能会破坏平衡,因此需要进行平衡调整 * * @param node */ public void insertNode(Node node) { int cmp; Node y = null; Node x = this.root; while (x != null) { y = x; cmp = node.getValue() - x.getValue(); if (cmp < 0) { x = x.left; } else { x = x.right; } } node.parent = y; if (y != null) { cmp = node.getValue() - y.getValue(); if (cmp < 0) { y.left = node; } else { y.right = node; } } else { this.root = node; } node.isRed = true; insertFixUp(node); } /** * 插入修复: 新插入的节点是红色节点,插入修复操作如果遇到父节点的颜色为黑色则修复结束 * 也就是说只有在父节点为红色节点的时候才需要插入修复操作 * 插入修复操作分为3种情况, * 1. 叔叔节点也为红色节点 * 2. 叔叔节点为空,且祖父节点,父节点与新节点在一个斜线上 * 3. 叔叔节点为空,且祖父节点,父节点与新节点不在一个斜线上 * <p> * <p> * 解决办法:对于第一种,只需要将祖父节点与父节点以及叔叔节点的颜色对调即可。 * 即原祖父节点是黑色,现在变成红色,父节点与叔叔节点都变成黑色。 * 对于第二种,我们将新插入的节点为C,父节点为B,祖父节点为A. * 如果BC都是左节点,要现将A右旋,然后调整B与A的颜色,即B变成黑色,A变成红色 * 如果BC都是右节点,要现将A左旋,然后调整B与A的颜色,即B变成黑色,A变成红色 * 对于第三种,我们将新插入的节点为C,父节点为B,祖父节点为A. * 如果C为右节点,B为左节点,要先将B左旋,然后就变成第二种的情况 * 如果C为左节点,B为右节点,要先B右旋,然后就变成第二种的情况 * * @param node */ private void insertFixUp(Node node) { Node parent, grandParent, uncle; while ((parent = parentOf(node)) != null && parent.isRed()) { grandParent = parentOf(node); //如果父节点是祖父节点的左孩子 if (parent == grandParent.left) { uncle = grandParent.right; //第一种情况 if ((uncle != null) && uncle.isRed()) { uncle.makeBlack(); parent.makeBlack(); grandParent.makeRed(); node = grandParent; continue; } //将第三种情况变成第二种情况 if (parent.right == node) { Node tmp; rotateLeft(parent); tmp = parent; parent = node; node = tmp; } parent.makeBlack(); grandParent.makeRed(); rotateRight(grandParent); } else { uncle = grandParent.left; if ((uncle != null) && uncle.isRed()) { uncle.makeBlack(); parent.makeBlack(); grandParent.makeRed(); node = grandParent; continue; } if (parent.left == node) { Node tmp; rotateRight(parent); tmp = parent; parent = node; node = tmp; } parent.makeBlack(); grandParent.makeRed(); rotateLeft(grandParent); } } root.makeBlack(); } /** * 对红黑树的节点(y)进行右旋转 * * 右旋示意图(对节点y进行左旋): * py py * / / * y x * / \ --(右旋)-. / \ # * x ry lx y * / \ / \ # * lx rx rx ry * * @param y 待旋转的节点 */ private void rotateRight(Node y) { Node x = y.left; // 将 “x的右孩子” 设为 “y的左孩子”; // 如果"x的右孩子"不为空的话,将 “y” 设为 “x的右孩子的父亲” y.left = x.right; if (x.right != null) x.right.parent = y; // 将 “y的父亲” 设为 “x的父亲” x.parent = y.parent; if (y.parent == null) { this.root = x; // 如果 “y的父亲” 是空节点,则将x设为根节点 } else { if (y == y.parent.right) y.parent.right = x; // 如果 y是它父节点的右孩子,则将x设为“y的父节点的右孩子” else y.parent.left = x; // (y是它父节点的左孩子) 将x设为“x的父节点的左孩子” } // 将 “y” 设为 “x的右孩子” x.right = y; // 将 “y的父节点” 设为 “x” y.parent = x; } /** * * 对红黑树的节点(x)进行左旋转 * * 左旋示意图(对节点x进行左旋): * px px * / / * x y * / \ --(左旋)-. / \ # * lx y x ry * / \ / \ * ly ry lx ly * * @param x 待旋转的节点 */ private void rotateLeft(Node x) { Node y = x.getRight(); x.right = y.left; if (y.left != null) { y.left.parent = x; } y.parent = x.parent; if (x.parent == null) { root = y; }else{ if (x.parent.left == x) { x.parent.left = y; }else{ x.parent.right = y; } } y.left = x; x.parent = y; } private Node parentOf(Node node) { return node != null ? node.parent : null; } static class Node { private int value; private Node parent; private boolean isRed; private Node left; private Node right; public Node() { } public Node(int value) { this.value = value; } public Node(int value, boolean isRed) { this.value = value; this.isRed = isRed; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } public Node getParent() { return parent; } public void setParent(Node parent) { this.parent = parent; } public boolean isRed() { return isRed; } public boolean isBlack() { return !isRed(); } public Node getLeft() { return left; } public void setLeft(Node left) { this.left = left; } public Node getRight() { return right; } public void setRight(Node right) { this.right = right; } public void makeRed() { isRed = true; } public void makeBlack() { isRed = false; } } }
[ "alexander.rogalsky@yandex.ru" ]
alexander.rogalsky@yandex.ru
46bb38cad7128638ed238bbee134bc6c4783a10f
0fb111daa10ab63d7a2d1de3987e8a2a4cc49408
/040-quarkus-sample-kafka-streams/src/main/java/com/iiit/quarkus/sample/kafka/stream/ProjectService.java
a3c667a8e8ac2083be6846535254f980e476379d
[ "Apache-2.0" ]
permissive
rainsun-sxy/iiit.quarkus.sample
db4bc7da2cb742d68f15624e4c1678669f098e70
3e40f67634d7927d3a62192f2d9ea4b9b7d176d4
refs/heads/master
2023-08-22T12:35:37.537292
2021-07-01T07:36:56
2021-07-01T07:36:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,912
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.iiit.quarkus.sample.kafka.stream; import java.util.Properties; import java.util.Arrays; import java.time.Duration; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import javax.inject.Singleton; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerRecord; import org.jboss.logging.Logger; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.KafkaConsumer; @Singleton public class ProjectService { private static final Logger LOGGER = Logger.getLogger(ProjectService.class); @Inject Startup startup; private boolean is_startup = false; public void config() { if ( !is_startup ){ startup.Streams(); is_startup = true; } } public void producer( String content) { LOGGER.info("生产数据"); Producer<String, String> producer = new KafkaProducer<String, String>( getProducerProperties()); producer.send(new ProducerRecord<String, String>(Startup.INPUT_TOPIC, content)); System.out.println("Message sent successfully"); producer.close(); } public void commit() { LOGGER.info("提交批量数据"); Producer<String, String> producer = new KafkaProducer<String, String>( getProducerProperties()); String tempString = "this is send content;"; producer.send(new ProducerRecord<String, String>(Startup.INPUT_TOPIC, tempString)); System.out.println("Message sent successfully"); producer.close(); } public void consumer() { LOGGER.info("消费数据"); KafkaConsumer<String, String> kafkaConsumer = new KafkaConsumer<String, String>(getConsumerProperties()); kafkaConsumer.subscribe(Arrays.asList(Startup.OUTPUT_TOPIC)); while (true) { ConsumerRecords<String, String> records = kafkaConsumer.poll(Duration.ofMillis(100)); for (ConsumerRecord<String, String> record : records) { // print the offset,key and value for the consumer records. System.out.printf("offset = %d, key = %s, value = %s\n", record.offset(), record.key(), record.value()); } } } private Properties getProducerProperties(){ Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("acks", "all"); props.put("retries", 0); props.put("batch.size", 16384); props.put("linger.ms", 1); props.put("buffer.memory", 33554432); props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); return props; } private Properties getConsumerProperties(){ Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("group.id", "test"); props.put("enable.auto.commit", "true"); props.put("auto.commit.interval.ms", "1000"); props.put("session.timeout.ms", "30000"); props.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"); //props.put("value.deserializer", "org.apache.kafka.common.serialization.LongDeserializer"); props.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"); return props; } }
[ "rengang66@sina.com" ]
rengang66@sina.com
ce195b2b30a7e93113277efc81154acc1ef054ac
cc0458b38bf6d7bac7411a9c6fec9bc3b8282d3f
/thirdParty/CSharpParser/src/csmc/javacc/generated/syntaxtree/DefaultArgumentOpt.java
0c96628d2da53ce32e9e92fc0f8bdf0ebd0e5b0d
[]
no_license
RinatGumarov/Code-metrics
62f99c25b072dd56e9c953d40dac7076a4376180
2005b6671c174e09e6ea06431d4711993a33ecb6
refs/heads/master
2020-07-12T04:01:47.007860
2017-08-08T07:19:26
2017-08-08T07:19:26
94,275,456
1
0
null
null
null
null
UTF-8
Java
false
false
758
java
// // Generated by JTB 1.3.2 // package csmc.javacc.generated.syntaxtree; /** * Grammar production: * f0 -> [ DefaultArgument() ] */ public class DefaultArgumentOpt implements Node { public NodeOptional f0; public DefaultArgumentOpt(NodeOptional n0) { f0 = n0; } public void accept(csmc.javacc.generated.visitor.Visitor v) { v.visit(this); } public <R,A> R accept(csmc.javacc.generated.visitor.GJVisitor<R,A> v, A argu) { return v.visit(this,argu); } public <R> R accept(csmc.javacc.generated.visitor.GJNoArguVisitor<R> v) { return v.visit(this); } public <A> void accept(csmc.javacc.generated.visitor.GJVoidVisitor<A> v, A argu) { v.visit(this,argu); } }
[ "tiran678@icloud.com" ]
tiran678@icloud.com
3678cd5135ce8637652c8c851d0aca50b371fe02
f92baaada2c976cb169c2e73468a25c3c551c8d2
/easybatch-core/src/main/java/org/easybatch/core/reader/FileRecordReader.java
412a829b8443d2a0b1269e1e4873fc488fa4ab98
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
accelad-com/easybatch
1c86e43b340f944eeac05c533d505989e6b78641
e777a3dd7b3a7b0a32f60fa82b654ab9e4988251
refs/heads/master
2020-02-26T16:29:04.018055
2016-10-18T16:46:59
2016-10-18T16:47:15
71,269,907
1
0
null
null
null
null
UTF-8
Java
false
false
4,818
java
/* * The MIT License * * Copyright (c) 2016, Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com) * * 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.easybatch.core.reader; import org.easybatch.core.record.FileRecord; import org.easybatch.core.record.Header; import java.io.File; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import static java.lang.String.format; import static org.easybatch.core.util.Utils.checkArgument; /** * A convenient {@link RecordReader} that recursively reads files in a directory. * <p/> * This reader produces {@link FileRecord} instances. * * @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com) */ public class FileRecordReader implements RecordReader { /** * The directory to read files from. */ private File directory; /** * The array of files in the directory. */ private List<File> files; /** * The data source iterator. */ private Iterator<File> iterator; /** * The current record number. */ private long currentRecordNumber; /** * Create a {@link FileRecordReader} to read files recursively from a given directory. * * @param directory the directory to read files from. */ public FileRecordReader(File directory) { this.directory = directory; } /** * Open the reader. */ @Override public void open() { checkDirectory(); files = getFiles(directory); iterator = files.listIterator(); currentRecordNumber = 0; } private List<File> getFiles(final File directory) { List<File> files = new ArrayList<>(); File[] filesList = directory.listFiles(); if (filesList != null) { for (File file : filesList) { if (file.isFile()) { files.add(file); } else { files.addAll(getFiles(file)); } } } return files; } private void checkDirectory() { checkArgument(directory.exists(), format("Directory %s does not exist.", directory.getAbsolutePath())); checkArgument(directory.isDirectory(), format("%s is not a directory.", directory.getAbsolutePath())); checkArgument(directory.canRead(), format("Unable to read files from directory %s. Permission denied.", directory.getAbsolutePath())); } /** * Check if the directory has a next file. * * @return true if the reader has a next record, false else. */ @Override public boolean hasNextRecord() { return iterator.hasNext(); } /** * Read next record from the data source. * * @return the next record from the data source. */ @Override public FileRecord readNextRecord() { Header header = new Header(++currentRecordNumber, getDataSourceName(), new Date()); return new FileRecord(header, iterator.next()); } /** * Get the total record number in the data source. This is useful to calculate execution progress. * * @return the total record number in the data source or null if the total records number cannot be * calculated in advance */ @Override public Long getTotalRecords() { return (long) files.size(); } /** * This method returns a human readable data source name to be shown in the batch report. * * @return the data source name this reader is reading data from */ @Override public String getDataSourceName() { return directory.getAbsolutePath(); } /** * Close the reader. */ @Override public void close() { // no op } }
[ "frederic.boisguerin@gmail.com" ]
frederic.boisguerin@gmail.com
c3a10ef2dd01a1b543c99bf096b42ecc1cc6cfa5
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Framework/System.Activities,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/activities/validation/ValidationContext.java
e56a1c3b9c35a06977181e0fb329d4f82476279a
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,041
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.activities.validation; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section /** * The base .NET class managing System.Activities.Validation.ValidationContext, System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Activities.Validation.ValidationContext" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Activities.Validation.ValidationContext</a> */ public class ValidationContext extends NetObject { /** * Fully assembly qualified name: System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: System.Activities */ public static final String assemblyShortName = "System.Activities"; /** * Qualified class name: System.Activities.Validation.ValidationContext */ public static final String className = "System.Activities.Validation.ValidationContext"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ValidationContext(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link ValidationContext}, a cast assert is made to check if types are compatible. */ public static ValidationContext cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new ValidationContext(from.getJCOInstance()); } // Constructors section public ValidationContext() throws Throwable { } // Methods section // Properties section // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
c3cbbd7ad98a803718a6b88b508290e26a79aab2
89f0034faac613f49edce7d86e1ca1bdffe2fbdd
/myerpGWT/src/main/java/org/adempiere/model/AdDesktopworkbench.java
c0073f9a70b8b1f73ad49fc09bcde58d38606598
[]
no_license
qq122343779/myerpGXT
3263cbb688f92839a8354bcba87e57fba73d937d
2173e093b74c7a3699027eb7776789477699a137
refs/heads/master
2021-01-17T11:44:50.496141
2014-02-17T00:20:54
2014-02-17T00:20:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,166
java
package org.adempiere.model; import javax.persistence.*; /** * Auto-generated by: * org.adempiere.AdempiereCustomizer */ @Entity @Table(name="ad_desktopworkbench") public class AdDesktopworkbench extends org.adempiere.common.ADEntityBase { private static final long serialVersionUID = 1L; private Integer adClientId; private Integer adDesktopId; private Integer adDesktopworkbenchId; private Integer adOrgId; private Integer adWorkbenchId; private String created; private Integer createdby; private Boolean isactive; private Integer seqno; private String updated; private Integer updatedby; public AdDesktopworkbench() { } public AdDesktopworkbench(Integer adDesktopworkbenchId) { this.adDesktopworkbenchId = adDesktopworkbenchId; } @Basic @Column(name="AD_CLIENT_ID", columnDefinition="INT", nullable=false) public Integer getAdClientId() { return adClientId; } public void setAdClientId(Integer adClientId) { this.adClientId = adClientId; } @Basic @Column(name="AD_DESKTOP_ID", columnDefinition="INT", nullable=false) public Integer getAdDesktopId() { return adDesktopId; } public void setAdDesktopId(Integer adDesktopId) { this.adDesktopId = adDesktopId; } @Id @Column(name="AD_DESKTOPWORKBENCH_ID", columnDefinition="INT") public Integer getAdDesktopworkbenchId() { return adDesktopworkbenchId; } public void setAdDesktopworkbenchId(Integer adDesktopworkbenchId) { this.adDesktopworkbenchId = adDesktopworkbenchId; } @Basic @Column(name="AD_ORG_ID", columnDefinition="INT", nullable=false) public Integer getAdOrgId() { return adOrgId; } public void setAdOrgId(Integer adOrgId) { this.adOrgId = adOrgId; } @Basic @Column(name="AD_WORKBENCH_ID", columnDefinition="INT", nullable=false) public Integer getAdWorkbenchId() { return adWorkbenchId; } public void setAdWorkbenchId(Integer adWorkbenchId) { this.adWorkbenchId = adWorkbenchId; } @Basic @Column(columnDefinition="TIMESTAMP", nullable=false) public String getCreated() { return created; } public void setCreated(String created) { this.created = created; } @Basic @Column(columnDefinition="INT", nullable=false) public Integer getCreatedby() { return createdby; } public void setCreatedby(Integer createdby) { this.createdby = createdby; } @Basic @Column(nullable=false) public Boolean isIsactive() { return isactive; } public void setIsactive(Boolean isactive) { this.isactive = isactive; } @Basic @Column(columnDefinition="INT", nullable=false) public Integer getSeqno() { return seqno; } public void setSeqno(Integer seqno) { this.seqno = seqno; } @Basic @Column(columnDefinition="TIMESTAMP", nullable=false) public String getUpdated() { return updated; } public void setUpdated(String updated) { this.updated = updated; } @Basic @Column(columnDefinition="INT", nullable=false) public Integer getUpdatedby() { return updatedby; } public void setUpdatedby(Integer updatedby) { this.updatedby = updatedby; } }
[ "Administrator@Natural" ]
Administrator@Natural
e5f23b8c84c9a5c7d5f122f9374771351074cb9f
b1896610e8186b82b43e8dbd04df3a64b4a528ab
/src/main/java/org/tempuri/MarkForArchiveResponse.java
64fd4b8cf7b9840eb8522d581dc621db1d79c48c
[]
no_license
CleverDomeGit/jClient
920a2d0285b6686331929081faf5ff846daa2a6c
d1900c3e979d6a41c433d11d5e09ad5c67fbe29e
refs/heads/master
2021-01-10T18:17:26.121919
2015-06-02T16:51:48
2015-06-02T16:51:48
36,786,425
0
0
null
null
null
null
UTF-8
Java
false
false
4,259
java
/** * MarkForArchiveResponse.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package org.tempuri; public class MarkForArchiveResponse implements java.io.Serializable { private org.datacontract.schemas._2004._07.CleverDomeDocumentManagement_Data.OperationResultOfanyType markForArchiveResult; public MarkForArchiveResponse() { } public MarkForArchiveResponse( org.datacontract.schemas._2004._07.CleverDomeDocumentManagement_Data.OperationResultOfanyType markForArchiveResult) { this.markForArchiveResult = markForArchiveResult; } /** * Gets the markForArchiveResult value for this MarkForArchiveResponse. * * @return markForArchiveResult */ public org.datacontract.schemas._2004._07.CleverDomeDocumentManagement_Data.OperationResultOfanyType getMarkForArchiveResult() { return markForArchiveResult; } /** * Sets the markForArchiveResult value for this MarkForArchiveResponse. * * @param markForArchiveResult */ public void setMarkForArchiveResult(org.datacontract.schemas._2004._07.CleverDomeDocumentManagement_Data.OperationResultOfanyType markForArchiveResult) { this.markForArchiveResult = markForArchiveResult; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof MarkForArchiveResponse)) return false; MarkForArchiveResponse other = (MarkForArchiveResponse) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.markForArchiveResult==null && other.getMarkForArchiveResult()==null) || (this.markForArchiveResult!=null && this.markForArchiveResult.equals(other.getMarkForArchiveResult()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getMarkForArchiveResult() != null) { _hashCode += getMarkForArchiveResult().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(MarkForArchiveResponse.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://tempuri.org/", ">MarkForArchiveResponse")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("markForArchiveResult"); elemField.setXmlName(new javax.xml.namespace.QName("http://tempuri.org/", "MarkForArchiveResult")); elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.datacontract.org/2004/07/CleverDomeDocumentManagement.Data", "OperationResultOfanyType")); elemField.setMinOccurs(0); elemField.setNillable(true); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "sanyo.gorbunov@gmail.com" ]
sanyo.gorbunov@gmail.com
a99edbc83e6bf6310c0fb264f25148b22227d039
eb71e782cebec26969623bb5c3638d6f62516290
/src/com/rs/game/player/actions/skills/firemaking/Firemaking.java
6b8e9d8c920b4d9c273bf35ddedfbfbadfb15169
[]
no_license
DukeCharles/revision-718-server
0fe7230a4c7da8de6f7de289ef1b4baec81fbd8b
cc69a0ab6e139d5cc7e2db9a73ec1eeaf76fd6e3
refs/heads/main
2023-06-25T05:50:04.376413
2021-07-25T19:38:35
2021-07-25T19:38:35
387,924,360
0
0
null
null
null
null
UTF-8
Java
false
false
6,301
java
package com.rs.game.player.actions.skills.firemaking; import com.rs.game.Animation; import com.rs.game.Region; import com.rs.game.World; import com.rs.game.WorldObject; import com.rs.game.WorldTile; import com.rs.game.item.FloorItem; import com.rs.game.item.Item; import com.rs.game.minigames.duel.DuelArena; import com.rs.game.minigames.duel.DuelControler; import com.rs.game.npc.familiar.Familiar; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.player.actions.Action; import com.rs.game.player.content.tasksystem.TaskManager.Tasks; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; import com.rs.net.decoders.handlers.InventoryOptionsHandler; import com.rs.utils.Utils; /** * * @Improved Andreas - AvalonPK * */ public class Firemaking extends Action { public static enum Fire { NORMAL(1511, 1, 300, 70755, 40, 20), ACHEY(2862, 1, 300, 70756, 40, 1), OAK(1521, 15, 450, 70757, 60, 1), WILLOW(1519, 30, 450, 70758, 90, 1), TEAK(6333, 35, 450, 70759, 105, 1), ARCTIC_PINE(10810, 42, 500, 70760, 125, 1), MAPLE(1517, 45, 500, 70761, 135, 1), MAHOGANY(6332, 50, 700, 70762, 157.5, 1), EUCALYPTUS( 12581, 58, 700, 70763, 193.5, 1), YEW(1515, 60, 800, 70764, 202.5, 1), MAGIC(1513, 75, 900, 70765, 303.8, 1), CURSED_MAGIC(13567, 82, 1000, 70766, 303.8, 1); private int logId; private int level; private int life; private int fireId; private int time; private double xp; Fire(int logId, int level, int life, int fireId, double xp, int time) { this.logId = logId; this.level = level; this.life = life; this.fireId = fireId; this.xp = xp; this.time = time; } public int getLogId() { return logId; } public int getLevel() { return level; } public int getLife() { return (life * 600); } public int getFireId() { return fireId; } public double getExperience() { return xp; } public int getTime() { return time; } } private Fire fire; public Firemaking(Fire fire) { this.fire = fire; } @Override public boolean start(Player player) { if (!checkAll(player)) return false; player.getPackets().sendGameMessage("You attempt to light the logs.", true); player.getInventory().deleteItem(fire.getLogId(), 1); World.addGroundItem(new Item(fire.getLogId(), 1), new WorldTile(player), player, true, 60, 0); Long time = (Long) player.temporaryAttribute().remove("Fire"); boolean quickFire = time != null && time > Utils.currentTimeMillis(); setActionDelay(player, quickFire ? 1 : 2); if (!quickFire) player.animate(new Animation(16700)); return true; } public static boolean isFiremaking(Player player, Item item1, Item item2) { Item log = InventoryOptionsHandler.contains(590, item1, item2); if (log == null) return false; return isFiremaking(player, log.getId()); } public static boolean isFiremaking(Player player, int logId) { for (Fire fire : Fire.values()) { if (fire.getLogId() == logId) { player.getActionManager().setAction(new Firemaking(fire)); return true; } } return false; } public static void startFamiliarFire(Player player, Familiar familiar, Fire fire) { if (player.getFamiliar().getId() == 7378 || player.getFamiliar().getId() == 7377) { } } public boolean checkAll(Player player) { if (!player.getInventory().containsItem(590, 1) && !player.getToolbelt().contains(590)) { player.getPackets().sendGameMessage("You don't have any tinderbox."); return false; } if (player.getSkills().getLevel(Skills.FIREMAKING) < fire.getLevel()) { player.getPackets().sendGameMessage("You do not have the required level to light this."); return false; } if (!World.isTileFree(player.getPlane(), player.getX(), player.getY(), 1) // cliped || World.getObjectWithSlot(player, Region.OBJECT_SLOT_FLOOR) != null // fix // for // updated // api || player.getControlerManager().getControler() instanceof DuelArena || player.getControlerManager().getControler() instanceof DuelControler) { // contains // object player.getPackets().sendGameMessage("You can't light a fire here."); return false; } return true; } @Override public boolean process(Player player) { return checkAll(player); } public static double increasedExperience(Player player, double totalXp) { int chance = 6 + player.getPlayerMode() * 2; if (Utils.getRandom(100) <= chance && player.getPlayerMode() > 0) { player.getPackets().sendGameMessage("You managed to light fire on an extra log."); totalXp *= 2; } if (player.getEquipment().getGlovesId() == 13660) totalXp *= 1.025; if (player.getEquipment().getRingId() == 13659) totalXp *= 1.025; return totalXp; } @Override public int processWithDelay(final Player player) { final WorldTile tile = new WorldTile(player); if (!player.addWalkSteps(player.getX() - 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX() + 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX(), player.getY() + 1, 1)) player.addWalkSteps(player.getX(), player.getY() - 1, 1); player.getPackets().sendGameMessage("The fire catches and the logs begin to burn.", true); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { final FloorItem item = World.getRegion(tile.getRegionId()).getGroundItem(fire.getLogId(), tile, player); if (item == null) return; if (!World.removeGroundItem(player, item, false)) return; World.spawnTempGroundObject( new WorldObject(fire.getFireId(), 10, 0, tile.getX(), tile.getY(), tile.getPlane()), 592, fire.getLife(), true); player.getSkills().addXp(Skills.FIREMAKING, increasedExperience(player, fire.getExperience())); player.setNextFaceWorldTile(tile); if (fire == Fire.MAPLE) player.getTaskManager().checkComplete(Tasks.LIGHT_MAPLE_LOG); if (fire == Fire.YEW) player.getTaskManager().checkComplete(Tasks.LIGHT_YEW_LOGS); if (fire == Fire.MAGIC) player.getTaskManager().checkComplete(Tasks.LIGHT_MAGIC_LOG); } }, 1); player.temporaryAttribute().put("Fire", Utils.currentTimeMillis() + 1800); return -1; } @Override public void stop(final Player player) { setActionDelay(player, 3); } }
[ "charles.simon.morin@gmail.com" ]
charles.simon.morin@gmail.com
5fec948c54ade8131a543f0eb7e62756ee988292
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_ed10cc750f329f234fa7cbe5135bd7b1097e556c/LearnAlgSimple/15_ed10cc750f329f234fa7cbe5135bd7b1097e556c_LearnAlgSimple_t.java
e52975318f51e4c5488ae0f3dfde76ef0ccd2cb8
[]
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,592
java
package com.kpro.algorithm; import java.util.Properties; import com.kpro.dataobjects.Case; import com.kpro.dataobjects.PolicyObject; import com.kpro.dataobjects.Purpose; import com.kpro.dataobjects.Recipient; import com.kpro.dataobjects.Retention; import com.kpro.main.Gio; /** * A very slow learning algorithm that goes through every case in every * PolicyObject in the whole database. * * @author Nesha * */ public class LearnAlgSimple extends LearnAlgorithm{ /** * constructor * @param weightsConfig the weights */ public LearnAlgSimple(Properties weightsConfig) { super(weightsConfig); } /** * For every case it checks if it contains any of the purposes, retentions * or recipients, and if it does it checks whether the action of the * PolicyObject it is in, was accepted. And if it was accepted a counter(yes) * is incremented, and another counter (total) is incremented always. * The new weight is then value(yes/total) * * @param theIO the GIO * @return Property a new weights Property * */ @Override protected Properties applyML(Gio theIO) { theIO.getWeights(); double sum = 0; double weights[] = new double[23]; for (int i = 0; i < 23; i++) { int total = 0; int yes = 0; for (PolicyObject po : theIO.getPDB() ) { for(Case ca : po.getCases()){ switch (i){ //the 12 first are Purposes case 0: //ca.getPurpose(0); for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.CURRENT){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 1: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.ADMIN){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 2: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.DEVELOP){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 3: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.TAILORING){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 4: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.PSEUDO_ANALYSIS){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 5: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.PSEUDO_DECISION){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 6: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.INDIVIDUAL_ANALYSIS){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 7: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.INDIVIDUAL_DECISION){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 8: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.CONTACT){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 9: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.HISTORICAL){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 10: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.TELEMARKETING){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 11: for(Purpose purp : ca.getPurposes()){ if(purp == Purpose.OTHER_PURPOSE){ total++; } if(po.getAction().getAccepted()){ yes++; } } //the 6 next are Recipients case 12: for(Recipient recip : ca.getRecipients()){ if(recip == Recipient.OURS){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 13: for(Recipient recip : ca.getRecipients()){ if(recip == Recipient.DELIVERY){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 14: for(Recipient recip : ca.getRecipients()){ if(recip == Recipient.SAME){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 15: for(Recipient recip : ca.getRecipients()){ if(recip == Recipient.OTHER_RECIPIENT){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 16: for(Recipient recip : ca.getRecipients()){ if(recip == Recipient.UNRELATED){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 17: for(Recipient recip : ca.getRecipients()){ if(recip == Recipient.PUBLIC){ total++; } if(po.getAction().getAccepted()){ yes++; } } //the last 5 cases are Retetntion case 18: for(Retention ret : ca.getRetentions()){ if(ret == Retention.NO_RETENTION){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 19: for(Retention ret : ca.getRetentions()){ if(ret == Retention.STATED_PURPOSE){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 20: for(Retention ret : ca.getRetentions()){ if(ret == Retention.LEGAL_REQUIREMENT){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 21: for(Retention ret : ca.getRetentions()){ if(ret == Retention.BUSINESS_PRACTICES){ total++; } if(po.getAction().getAccepted()){ yes++; } } case 22: for(Retention ret : ca.getRetentions()){ if(ret == Retention.INDEFINITELY){ total++; } if(po.getAction().getAccepted()){ yes++; } } } } } weights[i] = value(yes/total); sum += weights[i]; } for(int i = 0; i<23; i++){ weights[i] = weights[i]/sum; } Properties prop = new Properties(); String[] arr = { "current", "admin", "develop", "tailoring", "pseudo_analysis", "pseudo_decision", "individual analysis", "individual_decision", "contact", "historical", "telemarketing", "other_purpose", "ours", "delivery", "same", "other_recipient", "unrelated", "public", "no_retention", "stated purpose", "legal_requirement", "business_practices", "indefinitely"}; for(int i = 0; i<23; i++){ prop.put(arr[i], weights[i]); } //theIO.setWeights(prop); return prop; } /** * Called by applyML() * * @param x double value between [0,1] which is yes/total from applyML() * @return double value [0,5] that represents a new weights value */ private double value(double x){ /* if(x>=0 && x<=50){ return 100-2*x; } return 2*x-100; */ return 10*Math.abs(x-0.5); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0309ab6548e3963ead7a4193b5f527bf2879ea59
b4edccc4cc966c066e8811b8b748803db7b45e67
/sgre/src/main/java/com/sgre/service/riesgo/CaracterDelRiesgoService.java
6bf9526e037621750af6269c73d5c38dde4a9de2
[]
no_license
ozzman02/SGRE
af1a808893bf0e8692b1eeb2948f6b5cc7d232b5
d992aef2bb3754de1340e224cebdd80784d5fc94
refs/heads/master
2021-01-25T13:05:25.302097
2019-04-19T23:04:34
2019-04-19T23:04:34
123,525,778
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
package com.sgre.service.riesgo; import java.util.List; import org.springframework.stereotype.Service; import com.sgre.model.riesgo.CaracterDelRiesgo; @Service public interface CaracterDelRiesgoService { List<CaracterDelRiesgo> listar(); CaracterDelRiesgo buscarCaracterPorId(Long id); }
[ "osantamaria@gmail.com" ]
osantamaria@gmail.com
0dc7b85f13d9ffa7f032f46ec97146b63d30cd8a
67cc6446f33b5a6d004e261e78040f88f5661e2c
/java/timaxa007/rotating_block/universal/ItemBlockRotatingObj.java
541af2b51800d476b18e46287261bb2a604de3b0
[]
no_license
timaxa007/rotating_block
61c3fd8cfc173d0f7d8ef748d9394523d6ef36c3
4c59d1734fd1ddfae4fbe135ea62021fc26ac3de
refs/heads/master
2020-03-18T14:52:36.457044
2018-05-27T22:49:24
2018-05-27T22:49:24
134,872,548
0
0
null
null
null
null
UTF-8
Java
false
false
1,553
java
package timaxa007.rotating_block.universal; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class ItemBlockRotatingObj extends ItemBlock { public ItemBlockRotatingObj(Block block) { super(block); } @Override public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if (super.onItemUse(itemStack, player, world, x, y, z, side, hitX, hitY, hitZ)) { switch(side) { case 0:--y;break; case 1:++y;break; case 2:--z;break; case 3:++z;break; case 4:--x;break; case 5:++x;break; default:break; } TileEntity te = world.getTileEntity(x, y, z); if (te instanceof TileEntityRotatingObj) { TileEntityRotatingObj tile = (TileEntityRotatingObj)te; float rot = 0; switch(side){ case 0: case 1: rot = player.rotationYaw; break; case 2: case 3: rot = (float)(Math.atan2(0.5F - hitY, 0.5F - hitX) * (180D / Math.PI)); break; case 4: case 5: rot = (float)(Math.atan2(0.5F - hitY, 0.5F - hitZ) * (180D / Math.PI)); break; } int l = MathHelper.floor_float((rot * tile.getDirections() / 360.0F) + 0.5F) & (tile.getDirections() - 1); tile.rotate_side = (byte)(l << 3 | side); } return true; } else return false; } }
[ "timaxa007@gmail.com" ]
timaxa007@gmail.com
d718a012231bdfbd0697b611cd1a6f6fd27e7b18
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/17389235.java
fbd15031e368ba3eea35201273ded88a13871d91
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,587
java
class c17389235 { public boolean PrintPage(String page, String url_addr, String charset) { File parent_path = new File(new File(page).getParent()); if (!parent_path.exists()) { parent_path.mkdirs(); } String r_line = null; BufferedReader bReader = null; FileOutputStream out = null; OutputStreamWriter writer = null; PrintWriter fileOut = null; File file = null; try { InputStream ins = new URL(url_addr).openStream(); file = new File(page); if (!file.exists()) { file.createNewFile(); } bReader = new BufferedReader(new InputStreamReader(ins, charset)); out = new FileOutputStream(page); writer = new OutputStreamWriter(out, charset); fileOut = new PrintWriter(writer); while ((r_line = bReader.readLine()) != null) { r_line = r_line.trim(); int str_len = r_line.length(); if (str_len > 0) { fileOut.println(r_line); fileOut.flush(); } } ins.close(); ins = null; fileOut.close(); writer.close(); out.close(); bReader.close(); fileOut = null; writer = null; out = null; bReader = null; parent_path = null; file = null; r_line = null; return true; } catch (IOException ioe) { log.error(ioe.getMessage()); ioe.printStackTrace(); return false; } catch (Exception es) { es.printStackTrace(); log.error("static----------" + es.getMessage()); return false; } finally { try { if (fileOut != null) { fileOut.close(); fileOut = null; } if (writer != null) { writer.close(); writer = null; } if (out != null) { out.close(); out = null; } if (bReader != null) { bReader.close(); bReader = null; } } catch (IOException ioe) { log.error(ioe.getMessage()); } catch (Exception e) { log.error(e.getMessage()); } } } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
b15471e32761304eca6af9c45be9e19052e36176
85659db6cd40fcbd0d4eca9654a018d3ac4d0925
/packages/CheckIn/DataCollection/DataCollection/src/com/motorola/datacollection/perfstats/PerformanceStatsSettingsWriter.java
eb1100aed2d786447cc6f36ef450592b138f0237
[]
no_license
qwe00921/switchui
28e6e9e7da559c27a3a6663495a5f75593f48fb8
6d859b67402fb0cd9f7e7a9808428df108357e4d
refs/heads/master
2021-01-17T06:34:05.414076
2014-01-15T15:40:35
2014-01-15T15:40:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,005
java
/* * Copyright (C) 2011 Motorola Mobility, Inc. * All Rights Reserved. * Motorola Mobility Confidential Restricted. * * Revision History: * Author Date CR Number Brief Description * ------------------------- ---------- ------------- ------------------------------ * w04917 (Brian Lee) 2012/02/07 IKCTXTAW-359 Initial version * */ package com.motorola.datacollection.perfstats; import java.util.ArrayList; import android.content.ContentProvider; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.util.Log; /** * @author w04917 (Brian Lee) * Writes performance settings to syncable settings. */ public class PerformanceStatsSettingsWriter extends ContentProvider { private static final String TAG = "PerfStatsSettingWR"; /* syncable settings provider */ private static final Uri SETTINGS_URI = Uri.parse("content://com.motorola.blur.setupprovider/app_settings"); private static final String COL_NAME = "name"; private static final String COL_VALUE = "value"; static final String SETTING_KEY = "key"; static final String SETTING_VALUE = "value"; /* call method identifiers */ static final String CALL_SET_SINGLE_SETTING = "SET_SINGLE_SETTING"; static final String CALL_SET_BULK_SETTINGS = "SET_BULK_SETTINGS"; static final String CALL_DELETE_SETTINGS = "DELETE_SETTINGS"; @Override public int delete(Uri arg0, String arg1, String[] arg2) { /* not used */ return 0; } @Override public String getType(Uri uri) { /* not used */ return null; } @Override public Uri insert(Uri uri, ContentValues values) { /* not used */ return null; } @Override public boolean onCreate() { return true; } @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { /* not used */ return null; } @Override public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { /* not used */ return 0; } @Override public Bundle call(String method, String arg, Bundle extras) { if (PerformanceStatsService.LOGD && Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "call method: " + method + ", arg: " + arg); } Bundle bundle = null; if (CALL_SET_SINGLE_SETTING.equals(method)) { setSingleSetting(extras); } else if (CALL_SET_BULK_SETTINGS.equals(method)) { setBulkSettings(extras); } else if (CALL_DELETE_SETTINGS.equals(method) && arg != null && !arg.isEmpty()) { deleteSettings(arg); } return bundle; } private void deleteSettings(String basicKey) { if (PerformanceStatsService.LOGD && Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "clearSettings() key: " + formatKey(basicKey)); } if (basicKey != null && !basicKey.isEmpty()) { String where = COL_NAME + " = ?"; String[] selectionArgs = { formatKey(basicKey) }; getContext().getContentResolver().delete(SETTINGS_URI, where, selectionArgs); } } private void setSingleSetting(Bundle extras) { if (extras != null) { String key = extras.getString(SETTING_KEY); String value = extras.getString(SETTING_VALUE); if (key != null && !key.isEmpty() && value != null && !value.isEmpty()) { key = formatKey(key); if (PerformanceStatsService.LOGD && Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "setSettings() key: " + key + ", value: " + value); } ContentValues cv = new ContentValues(); cv.put(COL_NAME, key); cv.put(COL_VALUE, value); //syncable settings already takes care of duplicates by using replace for APP_SETTINGS getContext().getContentResolver().insert(SETTINGS_URI, cv); } } } private void setBulkSettings(Bundle extras) { if (extras != null) { String[] keys = extras.getStringArray(SETTING_KEY); String[] values = extras.getStringArray(SETTING_VALUE); if (keys != null && keys.length > 0 && values != null && values.length > 0 && keys.length == values.length) { ArrayList<ContentValues> valuesList = new ArrayList<ContentValues>(keys.length); for (int i = 0; i < keys.length; i++) { if (keys[i] != null && !keys[i].isEmpty() && values[i] != null && !values[i].isEmpty()) { String key = formatKey(keys[i]); ContentValues cv = new ContentValues(); cv.put(COL_NAME, key); cv.put(COL_VALUE, values[i]); valuesList.add(cv); if (PerformanceStatsService.LOGD && Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "setBulkSettings: " + key + ", " + values[i]); } } } if (!valuesList.isEmpty()) { //syncable settings already takes care of duplicates by using replace for APP_SETTINGS getContext().getContentResolver().bulkInsert(SETTINGS_URI, valuesList.toArray(new ContentValues[valuesList.size()])); } } } } /** * @param basicKey key used for syncable settings db look up * @return basicKey prepended with perfstats header */ private String formatKey(String basicKey) { return PerformanceStatsSettingsCache.formatKey(basicKey); } }
[ "cheng.carmark@gmail.com" ]
cheng.carmark@gmail.com
e4a5bf318385d7dafce105188f65ed6f6238eeee
b057a9827f44c289c15557121b7189c7b4baa2a0
/jpabook/ch6-various/src/main/java/start/entity/Order.java
e9ae6364efe45f3a13440481e04db1bde7ef09eb
[]
no_license
cocagolau/STUDY_JPA
3c2dd4af840674117ffb54b79afdc326a36a6bc1
060ea244068439ce60a5d239b3f0e82f9f3c925e
refs/heads/master
2020-03-26T19:33:39.904167
2018-09-26T11:13:27
2018-09-26T11:13:27
145,271,484
0
0
null
null
null
null
UTF-8
Java
false
false
655
java
package start.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; @Entity @Table(name = "ord") @Data @NoArgsConstructor @AllArgsConstructor public class Order { @Id @GeneratedValue @Column(name = "order_id") private Long id; @ManyToOne @JoinColumn(name = "member_id") private Member member; @ManyToOne @JoinColumn(name = "item_id") private Item item; private int orderAmount; public Order(Member member, Item item, int amount) { this.member = member; this.item = item; this.orderAmount = amount; } }
[ "cocagolau@gmail.com" ]
cocagolau@gmail.com
1606aa53aac799b7ebe5e913c7dcea2185464741
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_379/Productionnull_37818.java
879bdc2fa7b02af8b25479c38d8abd5dfb8e9285
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.test.performancenull_379; public class Productionnull_37818 { private final String property; public Productionnull_37818(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
65fb9daab0396587bb45bdde7c81a2f7d2b64f07
c83ae1e7ef232938166f7b54e69f087949745e0d
/sources/kotlinx/coroutines/ExecutorsKt.java
30f1f3d797b52221c6b52db39c5b1e709ea443ee
[]
no_license
FL0RlAN/android-tchap-1.0.35
7a149a08a88eaed31b0f0bfa133af704b61a7187
e405f61db55b3bfef25cf16103ba08fc2190fa34
refs/heads/master
2022-05-09T04:35:13.527984
2020-04-26T14:41:37
2020-04-26T14:41:37
259,030,577
0
1
null
null
null
null
UTF-8
Java
false
false
1,547
java
package kotlinx.coroutines; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import kotlin.Metadata; import kotlin.TypeCastException; import kotlin.jvm.internal.Intrinsics; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u001a\u0011\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u0007¢\u0006\u0002\b\u0003\u001a\u0011\u0010\u0000\u001a\u00020\u0004*\u00020\u0005H\u0007¢\u0006\u0002\b\u0003¨\u0006\u0006"}, d2 = {"asCoroutineDispatcher", "Lkotlinx/coroutines/CoroutineDispatcher;", "Ljava/util/concurrent/Executor;", "from", "Lkotlinx/coroutines/ExecutorCoroutineDispatcher;", "Ljava/util/concurrent/ExecutorService;", "kotlinx-coroutines-core"}, k = 2, mv = {1, 1, 13}) /* compiled from: Executors.kt */ public final class ExecutorsKt { public static final ExecutorCoroutineDispatcher from(ExecutorService executorService) { Intrinsics.checkParameterIsNotNull(executorService, "receiver$0"); CoroutineDispatcher from = from((Executor) executorService); if (from != null) { return (ExecutorCoroutineDispatcher) from; } throw new TypeCastException("null cannot be cast to non-null type kotlinx.coroutines.ExecutorCoroutineDispatcher"); } public static final CoroutineDispatcher from(Executor executor) { Intrinsics.checkParameterIsNotNull(executor, "receiver$0"); return new ExecutorCoroutineDispatcherImpl(executor); } }
[ "M0N5T3R159753@nym.hush.com" ]
M0N5T3R159753@nym.hush.com
7e7ed6c1441bafce024cb128f6648f3979dcf051
f5590d98bada46ab6cf8aa64ecff7f2fb9a59373
/EncogAdvanced/src/drosa/experimental/tickAnalysis/TickTests.java
1f2f93c317d01063f832b7e65c3115264a0f7f4a
[]
no_license
davidautentico/FXEncog
8d4be710ef8e9b8f417b33779ef41f258e41d2d8
0d5615df3daa232381428b315a9672e34551dc41
refs/heads/master
2022-04-10T04:33:46.670742
2020-02-22T00:17:42
2020-02-22T00:17:42
195,586,516
0
0
null
null
null
null
UTF-8
Java
false
false
2,536
java
package drosa.experimental.tickAnalysis; import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import drosa.data.DataUtils; import drosa.data.TickQuote; import drosa.utils.PrintUtils; public class TickTests { public static void main(String[] args) { String fileName12 ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2012.01.01_2012.12.31.csv"; String fileName13 ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2013.01.01_2013.12.31.csv"; String fileName14 ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2014.01.01_2014.12.31.csv"; String fileName15 ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2015.01.01_2015.12.31.csv"; String fileName36 ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2013.01.01_2016.12.31.csv"; String fileName56 ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2015.01.01_2016.12.31.csv"; String currencyStr = "eurusd"; HashMap<Integer,ArrayList<Double>> spreadsDict = new HashMap<Integer,ArrayList<Double>>(); for (int h=0;h<=23;h++) spreadsDict.put(h,new ArrayList<Double>()); for (int y1=2012;y1<=2019;y1++) { String fileName ="c:\\fxdata\\"+currencyStr+"_Ticks_"+y1+".09.01_"+y1+".11.21.csv"; //String fileName ="c:\\fxdata\\EURUSD_UTC_Ticks_Bid_2016.10.01_2016.11.01.csv"; ArrayList<TickQuote> data = DataUtils.retrieveTickQuotes(fileName,1); System.out.println(fileName+" "+data.size()); Calendar cal = Calendar.getInstance(); ArrayList<Integer> spreads = new ArrayList<Integer>(); ArrayList<Integer> counts = new ArrayList<Integer>(); for (int i=0;i<=23;i++){ spreads.add(0); counts.add(0); } for (int i=0;i<data.size();i++){ TickQuote t = data.get(i); TickQuote.getCalendar(cal, t); int h = cal.get(Calendar.HOUR_OF_DAY); int min = cal.get(Calendar.MINUTE); min=0; int spreadDiff = Math.abs(t.getAsk()-t.getBid()); spreads.set(h, spreads.get(h)+spreadDiff); counts.set(h, counts.get(h)+1); } for (int h=0;h<=23;h++){ int hour = h/60; int min = h-hour*60; double avg = spreads.get(h)*0.1/counts.get(h); int hreal = (h+3)%24; //System.out.println(hreal+" "+h+" "+PrintUtils.Print2dec(avg,false)+" "+counts.get(h)); ArrayList<Double> arr = spreadsDict.get(hreal); arr.add(avg); } }//y1 for (int h=0;h<=23;h++){ ArrayList<Double> arr = spreadsDict.get(h); String str =""; for (int j=0;j<arr.size();j++) { str += PrintUtils.Print2dec(arr.get(j),false)+" "; } System.out.println(h+" || "+str); } } }
[ "davidautentico@gmail.com" ]
davidautentico@gmail.com
7c7738c360e3aee9537251884c0a79f206e15f99
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
/src/yelpInterview/_Array21TwoElementsZeroSum.java
8316fef6fd99103d49f129fb3daeb5109bec8eeb
[ "MIT" ]
permissive
darshanhs90/Java-Coding
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
da76ccd7851f102712f7d8dfa4659901c5de7a76
refs/heads/master
2023-05-27T03:17:45.055811
2021-06-16T06:18:08
2021-06-16T06:18:08
36,981,580
3
3
null
null
null
null
UTF-8
Java
false
false
589
java
package yelpInterview; import java.util.Arrays; public class _Array21TwoElementsZeroSum { public static void main(String a[]){ int inputArray[] ={1, 60, -10, 70, -80, 85}; findPair(inputArray); } private static void findPair(int[] inputArray) { Arrays.sort(inputArray); int left=0; int right=inputArray.length-1; int sum=0; int minSum=Integer.MAX_VALUE; while(left<right) { sum=inputArray[left]+inputArray[right]; minSum=Math.min(Math.abs(sum), minSum); if(sum>0) { right--; } else{ left++; } } System.out.println(minSum); } }
[ "hsdars@gmail.com" ]
hsdars@gmail.com
940dc76e42707af6adaf6b429af39fbed49a7323
780e13b7c76f078f89d21df4aef5ebf8a187b75e
/spring-functionaltest-web/src/main/java/jp/co/ntt/fw/spring/functionaltest/app/vldt/DefineNotAsciiMessageByValidationMessagesForm.java
80e72d291e8c5386e1ab71d273eb49ada72d7b4d
[]
no_license
phoenix110/spring-functionaltest
dba4e64b5f188a8d276315c20938cee76b949961
2671a07e211ceab4ccd925e21f647dfc0586a809
refs/heads/master
2020-04-16T07:38:23.180197
2018-03-08T01:32:35
2018-03-09T06:21:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
/* * Copyright 2014-2018 NTT Corporation. * * 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 jp.co.ntt.fw.spring.functionaltest.app.vldt; import java.io.Serializable; import javax.validation.constraints.Size; import org.hibernate.validator.constraints.Email; public class DefineNotAsciiMessageByValidationMessagesForm implements Serializable { private static final long serialVersionUID = 1L; @Size(min = 1, max = 20) private String userName; @Email private String email; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
[ "macchinetta.fw@gmail.com" ]
macchinetta.fw@gmail.com
132b11e05684089e460cee0aede18c32296b356d
45940f73e4ec4b09da24842f2ee176368e7e14eb
/impl/src/main/java/org/apache/myfaces/application/viewstate/StateTokenProcessorClientSide.java
c7c0cfa30e13476b876fda952bcea94e75d94922
[ "Apache-2.0" ]
permissive
gdiazs/myfaces
de6e369e993327d3ceec79f86ff5296897eab685
f2ace1a1288b52bc9d647f3f9a1eef3e5433ee8f
refs/heads/master
2022-12-29T20:58:34.562308
2020-10-20T09:13:05
2020-10-20T09:13:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,819
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.application.viewstate; import javax.faces.context.FacesContext; /** * * @author Thomas Andraschko */ public class StateTokenProcessorClientSide extends StateTokenProcessor { @Override public Object decode(FacesContext facesContext, String token) { if (STATELESS_TOKEN.equals(token)) { // Should not happen, because ResponseStateManager.isStateless(context,viewId) should // catch it first return null; } Object savedStateObject = StateUtils.reconstruct((String)token, facesContext.getExternalContext()); return savedStateObject; } @Override public String encode(FacesContext facesContext, Object savedStateObject) { if (facesContext.getViewRoot().isTransient()) { return STATELESS_TOKEN; } String serializedState = StateUtils.construct(savedStateObject, facesContext.getExternalContext()); return serializedState; } }
[ "tandraschko@apache.org" ]
tandraschko@apache.org
43916ab47a8f63b43fd0d97b2e90413fd07e4f20
605b6e800c0449736d7dfe86793b1c07bb0617b6
/src/minecraft/net/minecraft/entity/boss/EntityDragonPart.java
3bbe308f1d71b7e829d45a7f0ff505434db44540
[]
no_license
HaxDevsClub/WordStorm
20f07737942cbda2cd8e7002c4c971ade0725461
79323e0848830016429307e76042844204cbed5f
refs/heads/master
2020-12-24T10:14:57.662136
2016-11-07T17:36:41
2016-11-07T17:36:41
73,095,787
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package net.minecraft.entity.boss; import net.minecraft.entity.Entity; import net.minecraft.entity.IEntityMultiPart; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; public class EntityDragonPart extends Entity { /** The dragon entity this dragon part belongs to */ public final IEntityMultiPart entityDragonObj; public final String partName; private static final String __OBFID = "CL_00001657"; public EntityDragonPart(IEntityMultiPart parent, String partName, float base, float sizeHeight) { super(parent.getWorld()); this.setSize(base, sizeHeight); this.entityDragonObj = parent; this.partName = partName; } protected void entityInit() {} /** * (abstract) Protected helper method to read subclass entity data from NBT. */ protected void readEntityFromNBT(NBTTagCompound tagCompund) {} /** * (abstract) Protected helper method to write subclass entity data to NBT. */ protected void writeEntityToNBT(NBTTagCompound tagCompound) {} /** * Returns true if other Entities should be prevented from moving through this Entity. */ public boolean canBeCollidedWith() { return true; } /** * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource source, float amount) { return this.isEntityInvulnerable(source) ? false : this.entityDragonObj.attackEntityFromPart(this, source, amount); } /** * Returns true if Entity argument is equal to this Entity */ public boolean isEntityEqual(Entity entityIn) { return this == entityIn || this.entityDragonObj == entityIn; } }
[ "jaspersmit2801@gmail.com" ]
jaspersmit2801@gmail.com
6e98b932f08e8060a2f2591251f3f3464ff37960
e8e058c9a2b372935135cbe71fa35de9d608e467
/gulimall-coupon/src/main/java/com/guigu/gulimall/coupon/GulimallCouponApplication.java
a08e9d8f5e17da3e65fba79fb08316de87d2dacd
[ "MIT" ]
permissive
mylovehaveadream/gulimall
8e12b3c3c768b9179fcf40b321cbb97f98d7e11f
6072071b4c9c0890daeedbee5c021a410e28cab5
refs/heads/master
2023-01-14T10:16:43.421420
2020-11-14T12:41:28
2020-11-14T12:41:28
290,230,456
0
0
null
null
null
null
UTF-8
Java
false
false
2,689
java
package com.guigu.gulimall.coupon; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; //这个服务就能注册到注册中心了 /** *如何使用Nacos作为配置中心统一管理配置 * 1.引入依赖 * <dependency> * <groupId>com.alibaba.cloud</groupId> * <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> * </dependency> * * 2.创建一个bootstrap.properties(固定) * spring.application.name=gulimall-coupon * #配置中心的地址 * spring.cloud.nacos.config.server-addr=127.0.0.1:8848 * * 3.需要给配置中默认添加一个叫数据集(Data Id) gulimall-coupon.properties * 默认规则:应用名.properties * * 4.给应用名.properties添加任何配置 * 5.动态获取配置 * @RefreshScope:动态获取并刷新配置 * @Value("${配置项的名}"):获取到配置 * * 6.如果配置中心和当前应用的配置文件中都配置了相同的项,优先使用配置中心的配置 * * * 细节: * 1.命名空间:配置隔离; * 默认:public(保留空间);默认新增的所有配置都在public空间下 * 1.开发、测试、生产:利用命名空间来做环境隔离,不同环境下的不同配置 * 注意:在bootstrap.properties配置上,需要使用哪个命名空间下的配置 * spring.cloud.nacos.config.namespace=059c6e53-4ad1-42f6-9d55-96e0040660fc(唯一id) * 2.每一个微服务之间互相隔离配置,每一个微服务都创建自己的命名空间,只加载自己命名空间下的所有配置 * * 2.配置集:所有的配置的集合 * * 3.配置集ID:类似于文件名 * Data ID:类似于文件名 * * 4.配置分组 * 默认所有的配置集都属于:DEFAULT_GROUP; * 可以基于业务来随意定制组名 * * 每个微服务创建自己的命名空间,使用配置分组区分环境,dev、test、prod * * * * 同时加载多个配置集 * 1.微服务任何配置信息,任何配置文件都可以放在配置中心中 * 2.只需要在bootstrap.properties说明加载配置中心那些配置文件即可 * 3.@Value、@ConfigurationProperties... * 以前SpringBoot任何方法从配置文件中获取值,都能使用。 * 配置中心有优先使用配置中心中的值。 */ @EnableDiscoveryClient @SpringBootApplication public class GulimallCouponApplication { public static void main(String[] args) { SpringApplication.run(GulimallCouponApplication.class, args); } }
[ "goodMorning_glb@atguigu.com" ]
goodMorning_glb@atguigu.com
d1c0746ecd17ae0bd9431059b080669b691b78d6
df134b422960de6fb179f36ca97ab574b0f1d69f
/org/apache/commons/lang/time/StopWatch.java
b33f0a807d34c4f95a5e98bfc4b86769af444d55
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
6,976
java
/* */ package org.apache.commons.lang.time; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class StopWatch /* */ { /* */ private static final int STATE_UNSTARTED = 0; /* */ private static final int STATE_RUNNING = 1; /* */ private static final int STATE_STOPPED = 2; /* */ private static final int STATE_SUSPENDED = 3; /* */ private static final int STATE_UNSPLIT = 10; /* */ private static final int STATE_SPLIT = 11; /* 78 */ private int runningState = 0; /* */ /* */ /* */ /* */ /* 83 */ private int splitState = 10; /* */ /* */ /* */ /* */ /* 88 */ private long startTime = -1L; /* */ /* */ /* */ /* */ /* 93 */ private long stopTime = -1L; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void start() { /* 117 */ if (this.runningState == 2) { /* 118 */ throw new IllegalStateException("Stopwatch must be reset before being restarted. "); /* */ } /* 120 */ if (this.runningState != 0) { /* 121 */ throw new IllegalStateException("Stopwatch already started. "); /* */ } /* 123 */ this.stopTime = -1L; /* 124 */ this.startTime = System.currentTimeMillis(); /* 125 */ this.runningState = 1; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void stop() { /* 141 */ if (this.runningState != 1 && this.runningState != 3) { /* 142 */ throw new IllegalStateException("Stopwatch is not running. "); /* */ } /* 144 */ if (this.runningState == 1) { /* 145 */ this.stopTime = System.currentTimeMillis(); /* */ } /* 147 */ this.runningState = 2; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void reset() { /* 160 */ this.runningState = 0; /* 161 */ this.splitState = 10; /* 162 */ this.startTime = -1L; /* 163 */ this.stopTime = -1L; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void split() { /* 180 */ if (this.runningState != 1) { /* 181 */ throw new IllegalStateException("Stopwatch is not running. "); /* */ } /* 183 */ this.stopTime = System.currentTimeMillis(); /* 184 */ this.splitState = 11; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void unsplit() { /* 201 */ if (this.splitState != 11) { /* 202 */ throw new IllegalStateException("Stopwatch has not been split. "); /* */ } /* 204 */ this.stopTime = -1L; /* 205 */ this.splitState = 10; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void suspend() { /* 222 */ if (this.runningState != 1) { /* 223 */ throw new IllegalStateException("Stopwatch must be running to suspend. "); /* */ } /* 225 */ this.stopTime = System.currentTimeMillis(); /* 226 */ this.runningState = 3; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void resume() { /* 243 */ if (this.runningState != 3) { /* 244 */ throw new IllegalStateException("Stopwatch must be suspended to resume. "); /* */ } /* 246 */ this.startTime += System.currentTimeMillis() - this.stopTime; /* 247 */ this.stopTime = -1L; /* 248 */ this.runningState = 1; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public long getTime() { /* 264 */ if (this.runningState == 2 || this.runningState == 3) /* 265 */ return this.stopTime - this.startTime; /* 266 */ if (this.runningState == 0) /* 267 */ return 0L; /* 268 */ if (this.runningState == 1) { /* 269 */ return System.currentTimeMillis() - this.startTime; /* */ } /* 271 */ throw new RuntimeException("Illegal running state has occured. "); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public long getSplitTime() { /* 290 */ if (this.splitState != 11) { /* 291 */ throw new IllegalStateException("Stopwatch must be split to get the split time. "); /* */ } /* 293 */ return this.stopTime - this.startTime; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public long getStartTime() { /* 305 */ if (this.runningState == 0) { /* 306 */ throw new IllegalStateException("Stopwatch has not been started"); /* */ } /* 308 */ return this.startTime; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public String toString() { /* 323 */ return DurationFormatUtils.formatDurationHMS(getTime()); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public String toSplitString() { /* 339 */ return DurationFormatUtils.formatDurationHMS(getSplitTime()); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\org\apache\commons\lang\time\StopWatch.class * Java compiler version: 3 (47.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
422c13b22ddb9d661fb397eb7872c2d02e4ad2b3
6e9f5f7db5c6779bc6da59f577e01c1cd923b7d0
/src/main/java/org/xmlcml/graphics/html/HtmlI.java
8054e7b2c82d25100b6236c5ceac01334aef91fa
[ "Apache-2.0" ]
permissive
petermr/svghtml
b9f11b382be9764da33cafb3557284d712982dfa
5049773d447ad0c3dc9332d3aa4bbdc762b17fc7
refs/heads/master
2021-05-11T06:47:48.702461
2018-04-01T17:22:06
2018-04-01T17:22:06
117,999,368
0
0
null
2018-01-18T15:17:29
2018-01-18T15:17:28
null
UTF-8
Java
false
false
1,822
java
/** * Copyright 2011 Peter Murray-Rust et. al. * * 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.xmlcml.graphics.html; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import org.xmlcml.graphics.html.util.HtmlUtil; import org.xmlcml.xml.XMLConstants; /** * @author pm286 */ public class HtmlI extends HtmlElement { private final static Logger LOG = Logger.getLogger(HtmlSpan.class); public final static String TAG = "i"; public final static String ALL_I_XPATH = ".//h:i"; /** constructor. * */ public HtmlI() { super(TAG); } /** convenience method to extract list of HtmlI in element * * @param htmlElement * @return */ public static List<HtmlI> extractSelfAndDescendantIs(HtmlElement htmlElement) { return HtmlI.extractIs(HtmlUtil.getQueryHtmlElements(htmlElement, ALL_I_XPATH)); } /** makes a new list composed of the is in the list * * @param elements * @return */ public static List<HtmlI> extractIs(List<HtmlElement> elements) { List<HtmlI> iList = new ArrayList<HtmlI>(); for (HtmlElement element : elements) { if (element instanceof HtmlI) { iList.add((HtmlI) element); } } return iList; } }
[ "peter.murray.rust@googlemail.com" ]
peter.murray.rust@googlemail.com
c175ee37a33bc635153e60ed02b4d4fad00c39c0
7b12f67da8c10785efaebe313547a15543a39c77
/jjg-online/src/main/java/com/xdl/jjg/web/service/feign/member/MemberDepositService.java
265ec3dc07d13147a46bc3b3b5be3a87f0f7ef35
[]
no_license
liujinguo1994/xdl-jjg
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
051da0a0dba18e6e5021ecb4ef3debca16b01a93
refs/heads/master
2023-01-06T09:11:30.487559
2020-11-06T14:42:45
2020-11-06T14:42:45
299,525,315
1
3
null
null
null
null
UTF-8
Java
false
false
1,098
java
package com.xdl.jjg.web.service.feign.member; import com.jjg.member.model.domain.EsMemberDepositDO; import com.jjg.member.model.dto.EsMemberDepositDTO; import com.xdl.jjg.response.service.DubboPageResult; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; @FeignClient(value = "jjg-member") public interface MemberDepositService { /** * 根据查询条件查询列表 * * @param memberDepositDTO 会员余额明细DTO * @param pageSize 行数 * @param pageNum 页码 * @auther: lins 1220316142@qq.com * @date: 2019/06/03 13:42:53 * @return: com.shopx.common.model.result.DubboPageResult<EsMemberDepositDO> */ @GetMapping("/getMemberDepositList") DubboPageResult<EsMemberDepositDO> getMemberDepositList(@RequestBody EsMemberDepositDTO memberDepositDTO, @RequestParam("pageSize") int pageSize, @RequestParam("pageNum") int pageNum); }
[ "344009799@qq.com" ]
344009799@qq.com
d36d931bfac0e39277dd986a09ff4cf64d7e7ea4
69dd87c4443e011e161cc1a5d9014e37406ccdf7
/src/com/lefuyun/ui/ShareActivity.java
5eb7f6f663d5e12f21cb01cd5d1aa1ee39be0a8e
[]
no_license
afailer/lefuPerson
11736c34d1f989e780726faae8e2fc9c090cbab4
6554d922d5b66d238103ef8db1ec1b90f88b2fee
refs/heads/master
2020-05-15T11:06:31.948660
2019-04-19T06:14:30
2019-04-19T06:14:30
182,211,890
0
0
null
null
null
null
UTF-8
Java
false
false
3,171
java
package com.lefuyun.ui; import android.content.Intent; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import cn.sharesdk.framework.ShareSDK; import com.lefuyun.R; import com.lefuyun.api.remote.LefuApi; import com.lefuyun.base.BaseActivity; import com.lefuyun.util.ShareUtils; import com.lefuyun.util.ToastUtils; public class ShareActivity extends BaseActivity { private TextView mWeChatFriendShare, mWeChatFriendCircleShare, mWechatCollect; private TextView mQQZoneShare, mQQShare, mSinaShare; private TextView mBackBtn; private String mTitle; // 分享条目标题 private String mDes; // 分享条目描述 private String mDesImgUrl; // 分享条目描述图片URL private String mUrl; // 分享详细内容URL private boolean isTitle; // 分享详细内容URL @Override protected int getLayoutId() { return R.layout.activity_share; } @Override protected void initView() { setActionBarTitle("分享"); mWeChatFriendShare = (TextView) findViewById(R.id.wechat_friend); mWeChatFriendCircleShare = (TextView) findViewById(R.id.wechat_friend_circle); mWechatCollect = (TextView) findViewById(R.id.wechat_friend_history); mQQZoneShare = (TextView) findViewById(R.id.qzone); mQQShare = (TextView) findViewById(R.id.qq); mSinaShare=(TextView) findViewById(R.id.sina); mBackBtn = (TextView) findViewById(R.id.back); mWeChatFriendShare.setOnClickListener(this); mWeChatFriendCircleShare.setOnClickListener(this); mWechatCollect.setOnClickListener(this); mQQZoneShare.setOnClickListener(this); mQQShare.setOnClickListener(this); mSinaShare.setOnClickListener(this); mBackBtn.setOnClickListener(this); } @Override protected void initData() { Intent intent = getIntent(); mTitle = intent.getStringExtra("title"); mDes = intent.getStringExtra("des"); mDesImgUrl = intent.getStringExtra("imgUrl"); mUrl = intent.getStringExtra("url"); isTitle = intent.getBooleanExtra("isTitle", true); if(TextUtils.isEmpty(mDesImgUrl)) { mDesImgUrl = LefuApi.IMG_URL + LefuApi.LEFU_IMG_URL; } } @Override public void onClick(View view) { ShareSDK.initSDK(getApplicationContext()); switch (view.getId()) { case R.id.wechat_friend: shareMessage(ShareUtils.WECHAT_FRIEND); break; case R.id.wechat_friend_circle: shareMessage(ShareUtils.WECHAT_FRIEND_CIRCLE); break; case R.id.wechat_friend_history: shareMessage(ShareUtils.WECHAT_COLLECT); break; case R.id.qq: shareMessage(ShareUtils.QQ_FRIEND); break; case R.id.qzone: shareMessage(ShareUtils.QQ_ZONE); break; case R.id.sina: shareMessage(ShareUtils.SINA_WEIBO); break; case R.id.back: finish(); break; default: break; } } /** * 分享 * @param type 分享到的应用类型 */ private void shareMessage(String type) { ShareUtils.shareMessage(type, mTitle, mDes, mDesImgUrl, mUrl, isTitle); } @Override protected boolean hasActionBar() { return true; } @Override protected boolean hasBackButton() { return true; } }
[ "liuting@chuangxin.com" ]
liuting@chuangxin.com
816601704bb1943e36bfb69848b857718dd1082c
fbf95d693ad5beddfb6ded0be170a9e810a10677
/business-services/egf-instrument/src/main/java/org/egov/egf/instrument/web/requests/InstrumentResponse.java
433291b7cc6670c04e98bbe1bfd7627a427b8085
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
egovernments/DIGIT-OSS
330cc364af1b9b66db8914104f64a0aba666426f
bf02a2c7eb783bf9fdf4b173faa37f402e05e96e
refs/heads/master
2023-08-15T21:26:39.992558
2023-08-08T10:14:31
2023-08-08T10:14:31
353,807,330
25
91
MIT
2023-09-10T13:23:31
2021-04-01T19:35:55
Java
UTF-8
Java
false
false
589
java
package org.egov.egf.instrument.web.requests; import java.util.List; import org.egov.common.contract.response.ResponseInfo; import org.egov.common.web.contract.PaginationContract; import org.egov.egf.instrument.web.contract.InstrumentContract; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import lombok.Data; @JsonInclude(value = Include.NON_NULL) public @Data class InstrumentResponse { private ResponseInfo responseInfo; private List<InstrumentContract> instruments; private PaginationContract page; }
[ "36623418+nithindv@users.noreply.github.com" ]
36623418+nithindv@users.noreply.github.com
296904a4d1198d24d429f8517aa02bb974093a96
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/9/org/jfree/chart/annotations/CategoryPointerAnnotation_setArrowWidth_290.java
813f978c3311c5f6e9618efc4625a9a9accadd15
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,091
java
org jfree chart annot arrow label link categori plot categoryplot arrow drawn user defin angl point categori locat annot arrow length offset categori locat control tip radiu base radiu attribut imagin circl categori coordin circl defin tip radiu outer circl defin base radiu draw arrow start point outer circl point determin angl arrow tip drawn point circl categori pointer annot categorypointerannot categori text annot categorytextannot set arrow width param width width java2 java2d unit arrow width getarrowwidth set arrow width setarrowwidth width arrow width arrowwidth width
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
74e347be660d1f01a14359989c3b66c18fcd3ccd
10378c580b62125a184f74f595d2c37be90a5769
/com/github/steveice10/netty/handler/codec/socks/UnknownSocksResponse.java
79a5a18a5dd81fd7bec31c89fcd9c03dd424bde0
[]
no_license
ClientPlayground/Melon-Client
4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb
afc9b11493e15745b78dec1c2b62bb9e01573c3d
refs/heads/beta-v2
2023-04-05T20:17:00.521159
2021-03-14T19:13:31
2021-03-14T19:13:31
347,509,882
33
19
null
2021-03-14T19:13:32
2021-03-14T00:27:40
null
UTF-8
Java
false
false
305
java
package com.github.steveice10.netty.handler.codec.socks; import com.github.steveice10.netty.buffer.ByteBuf; public final class UnknownSocksResponse extends SocksResponse { public UnknownSocksResponse() { super(SocksResponseType.UNKNOWN); } public void encodeAsByteBuf(ByteBuf byteBuf) {} }
[ "Hot-Tutorials@users.noreply.github.com" ]
Hot-Tutorials@users.noreply.github.com
c0f0e60e11e039a8f8565fbe84070e411497dd61
5c8d97feb7dd2d318ef1185ccedce4e6bb016835
/app/src/main/java/zeller/com/opencvexample/ProductReturnCountAdapter.java
fd4819b3d1df255000adb6e8ea1a2720c0adfd08
[]
no_license
shangdinvxu/FactoryToy
207cfde48b86ba1a5115fff0f1c506b427a2b5a2
c12d611e2824140ac02555a4d8987176008143bf
refs/heads/master
2020-12-02T00:02:42.321058
2020-03-31T02:56:53
2020-03-31T02:56:53
230,822,707
0
0
null
null
null
null
UTF-8
Java
false
false
968
java
package zeller.com.opencvexample; import android.support.annotation.Nullable; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; public class ProductReturnCountAdapter extends BaseQuickAdapter<ProductReturnDataBean.DataBean.ProductDataBean, BaseViewHolder> { private ProductReturnDataBean.DataBean body; public ProductReturnCountAdapter(int layoutResId,List<ProductReturnDataBean.DataBean.ProductDataBean> data,ProductReturnDataBean.DataBean body) { super(layoutResId, data); this.body = body; } @Override protected void convert(BaseViewHolder helper, ProductReturnDataBean.DataBean.ProductDataBean item) { helper.setText(R.id.tv_name,item.getName()+"("+body.getProductSeriesCode()+item.getCode()+")"); helper.setText(R.id.returnTv,""+item.getReturnCount()); helper.setText(R.id.rejectTv,""+item.getRejectCount()); } }
[ "997399759@qq.com" ]
997399759@qq.com
b33636e85da19e6032536a6a0290d26fff278f47
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/baeldung/migration/junit4/ExceptionAssertionUnitTest.java
3ec74689e1ce97cc912cebbc5013ed2b969e28a1
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
652
java
package com.baeldung.migration.junit4; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; public class ExceptionAssertionUnitTest { @Rule public ExpectedException exceptionRule = ExpectedException.none(); @Test(expected = NullPointerException.class) public void whenExceptionThrown_thenExpectationSatisfied() { String test = null; test.length(); } @Test public void whenExceptionThrown_thenRuleIsApplied() { exceptionRule.expect(NumberFormatException.class); exceptionRule.expectMessage("For input string"); Integer.parseInt("1a"); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
2c2c348f667ddbac4b1ae41d400674bb4bf0c55d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/trello--RxLifecycle/2c4666bf6101e9bf38267cfd7841216fb41c39b2/after/RxLifecycleTest.java
f1f27c8b703c9243b7fef3aafafc317804fe70ba
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,617
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.trello.rxlifecycle; import io.reactivex.Observable; import io.reactivex.observers.TestObserver; import io.reactivex.subjects.BehaviorSubject; import io.reactivex.subjects.PublishSubject; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class RxLifecycleTest { private Observable<Object> observable; @Before public void setup() { // Simulate an actual lifecycle (hot Observable that does not end) observable = PublishSubject.create().hide(); } @Test public void testBindLifecycle() { BehaviorSubject<Object> lifecycle = BehaviorSubject.create(); TestObserver<Object> testObserver = observable.compose(RxLifecycle.bind(lifecycle)).test(); assertFalse(testObserver.isDisposed()); lifecycle.onNext(new Object()); assertTrue(testObserver.isDisposed()); } @Test public void testBindLifecycleOtherObject() { // Ensures it works with other types as well, and not just "Object" BehaviorSubject<String> lifecycle = BehaviorSubject.create(); TestObserver<Object> testObserver = observable.compose(RxLifecycle.bind(lifecycle)).test(); assertFalse(testObserver.isDisposed()); lifecycle.onNext(""); assertTrue(testObserver.isDisposed()); } // Null checks @Test(expected=NullPointerException.class) public void testBindThrowsOnNullLifecycle() { //noinspection ResourceType RxLifecycle.bind((Observable) null); } @Test(expected = NullPointerException.class) public void testBindUntilThrowsOnNullLifecycle() { //noinspection ResourceType RxLifecycle.bindUntilEvent(null, new Object()); } @Test(expected = NullPointerException.class) public void testBindUntilThrowsOnNullEvent() { BehaviorSubject<Object> lifecycle = BehaviorSubject.create(); //noinspection ResourceType RxLifecycle.bindUntilEvent(lifecycle, null); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
58b35d22ea52b4e67ae129cdebeab4a3506c2780
ff2683777d02413e973ee6af2d71ac1a1cac92d3
/src/main/java/com/alipay/api/domain/CommodityPublicExtInfos.java
5dab48a300d6c1ef51c83a1c75cdf6f3128cce6e
[ "Apache-2.0" ]
permissive
weizai118/alipay-sdk-java-all
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
ec977bf06276e8b16c4b41e4c970caeaf21e100b
refs/heads/master
2020-05-31T21:01:16.495008
2019-05-28T13:14:39
2019-05-28T13:14:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,702
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-11-30 21:06:38 */ public class CommodityPublicExtInfos extends AlipayObject { private static final long serialVersionUID = 2318654587591422644L; /** * 前置url */ @ApiField("action_url") private String actionUrl; /** * 应用展台id */ @ApiField("app_id") private String appId; /** * 类目 */ @ApiField("category_name") private String categoryName; /** * 城市名称 */ @ApiField("city_name") private String cityName; /** * 服务插件ID */ @ApiField("commodity_id") private String commodityId; /** * 创建者ID */ @ApiField("create_user_id") private String createUserId; /** * 挂载ID,用于确认唯一记录的主键对象 */ @ApiField("displayapp_id") private String displayappId; /** * 城市服务说明 */ @ApiField("displayapp_memo") private String displayappMemo; /** * 服务别名 */ @ApiField("displayapp_name") private String displayappName; /** * 状态 1:上架;0:下架;2:维护中 */ @ApiField("displayapp_status") private String displayappStatus; /** * 用户访问地址 */ @ApiField("displayapp_url") private String displayappUrl; /** * 外部展示地址 */ @ApiField("export_url") private String exportUrl; /** * 属性ID */ @ApiField("property_id") private String propertyId; public String getActionUrl() { return this.actionUrl; } public void setActionUrl(String actionUrl) { this.actionUrl = actionUrl; } public String getAppId() { return this.appId; } public void setAppId(String appId) { this.appId = appId; } public String getCategoryName() { return this.categoryName; } public void setCategoryName(String categoryName) { this.categoryName = categoryName; } public String getCityName() { return this.cityName; } public void setCityName(String cityName) { this.cityName = cityName; } public String getCommodityId() { return this.commodityId; } public void setCommodityId(String commodityId) { this.commodityId = commodityId; } public String getCreateUserId() { return this.createUserId; } public void setCreateUserId(String createUserId) { this.createUserId = createUserId; } public String getDisplayappId() { return this.displayappId; } public void setDisplayappId(String displayappId) { this.displayappId = displayappId; } public String getDisplayappMemo() { return this.displayappMemo; } public void setDisplayappMemo(String displayappMemo) { this.displayappMemo = displayappMemo; } public String getDisplayappName() { return this.displayappName; } public void setDisplayappName(String displayappName) { this.displayappName = displayappName; } public String getDisplayappStatus() { return this.displayappStatus; } public void setDisplayappStatus(String displayappStatus) { this.displayappStatus = displayappStatus; } public String getDisplayappUrl() { return this.displayappUrl; } public void setDisplayappUrl(String displayappUrl) { this.displayappUrl = displayappUrl; } public String getExportUrl() { return this.exportUrl; } public void setExportUrl(String exportUrl) { this.exportUrl = exportUrl; } public String getPropertyId() { return this.propertyId; } public void setPropertyId(String propertyId) { this.propertyId = propertyId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
7ba423a97cb7b38edf9c64520f7e134cd96e3f69
9db6efa2f14baa0f4172272e361e1ed0c9940065
/aliyun-java-sdk-alidns/src/main/java/com/aliyuncs/alidns/model/v20150109/ChangeDomainGroupResponse.java
81bc6586ed9bd40ddd5e0ad352166d724fccc61d
[ "Apache-2.0" ]
permissive
ResetFull/aliyun-openapi-java-sdk
31fb2c2f7c2b939df4c9067f7a221c3f2c7cef2e
e299d1778d514cd555c870a3b1de117ae3b34474
refs/heads/master
2021-08-31T04:50:07.771585
2017-12-20T12:28:50
2017-12-20T12:28:50
114,978,860
1
0
null
2017-12-21T07:57:54
2017-12-21T07:57:54
null
UTF-8
Java
false
false
1,829
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.aliyuncs.alidns.model.v20150109; import com.aliyuncs.AcsResponse; import com.aliyuncs.alidns.transform.v20150109.ChangeDomainGroupResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ChangeDomainGroupResponse extends AcsResponse { private String requestId; private String groupId; private String groupName; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getGroupId() { return this.groupId; } public void setGroupId(String groupId) { this.groupId = groupId; } public String getGroupName() { return this.groupName; } public void setGroupName(String groupName) { this.groupName = groupName; } @Override public ChangeDomainGroupResponse getInstance(UnmarshallerContext context) { return ChangeDomainGroupResponseUnmarshaller.unmarshall(this, context); } }
[ "ling.wu@alibaba-inc.com" ]
ling.wu@alibaba-inc.com