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
5dbaceed40e2fd903573f9827b68123ecb837f25
8fd0f9a0a29a0d1fa4e03342f8ba3bf5833b11dd
/FEOP/FEOPServer/FEOPServerBlog/src/main/java/org/personal/mason/feop/server/blog/domain/model/Subscribe.java
629910f0c48b6f935296c4546a8117e1fd7eafa7
[]
no_license
freeedu/service
abaa772676e4d23684d3bedf7b8e32da164e1b22
56a758ddc45a1aaf369d18a730cd601d5fd33719
refs/heads/master
2016-09-06T12:43:42.516484
2014-01-26T18:22:03
2014-01-26T18:22:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,163
java
package org.personal.mason.feop.server.blog.domain.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import java.sql.Timestamp; /** * The persistent class for the subscribe database table. */ @Entity @Table(name = "subscribe") public class Subscribe extends BlogPersistable { private static final long serialVersionUID = -5377859563284098288L; @Column(name = "create_date") private Timestamp createDate; @Column(name = "enable") private boolean enable; @Column(name = "subscriber_uid", unique = true) private String subscriberUid; @Column(name = "update_time") private Timestamp updateTime; @Column(name = "blog_ids") private String blogIds; @Column(name = "category_ids") private String categoryIds; @Column(name = "sery_ids") private String seryIds; public Subscribe() { } public Timestamp getCreateDate() { return this.createDate; } public void setCreateDate(Timestamp createDate) { this.createDate = createDate; } public boolean isEnable() { return enable; } public void setEnable(boolean enable) { this.enable = enable; } public String getSubscriberUid() { return this.subscriberUid; } public void setSubscriberUid(String subscriberUid) { this.subscriberUid = subscriberUid; } public Timestamp getUpdateTime() { return this.updateTime; } public void setUpdateTime(Timestamp updateTime) { this.updateTime = updateTime; } public String getBlogIds() { return blogIds; } public void setBlogIds(String blogIds) { this.blogIds = blogIds; } public String getCategoryIds() { return categoryIds; } public void setCategoryIds(String categoryIds) { this.categoryIds = categoryIds; } public String getSeryIds() { return seryIds; } public void setSeryIds(String seryIds) { this.seryIds = seryIds; } }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com
f10f206cb1dd5f19335b2ba96b6b713084504f14
072216667ef59e11cf4994220ea1594538db10a0
/xiaomi/yellowpages/com/miui/yellowpage/ui/cp.java
b7576d7d493dffc2e4518b531789e3d754b81f57
[]
no_license
jackTang11/REMIUI
896037b74e90f64e6f7d8ddfda6f3731a8db6a74
48d65600a1b04931a510e1f036e58356af1531c0
refs/heads/master
2021-01-18T05:43:37.754113
2015-07-03T04:01:06
2015-07-03T04:01:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,573
java
package com.miui.yellowpage.ui; import android.content.Loader; import android.database.Cursor; import android.os.Bundle; import com.miui.yellowpage.a.g; import com.miui.yellowpage.a.k; import com.miui.yellowpage.a.p; import com.miui.yellowpage.base.model.YellowPage; import com.miui.yellowpage.model.YellowPagePhonesEntry; import com.miui.yellowpage.request.BaseResult; import com.miui.yellowpage.utils.e; import java.util.ArrayList; import java.util.List; import miui.yellowpage.YellowPagePhone; /* compiled from: YellowPagePhonesFragment */ class cp implements k { final /* synthetic */ ap Dy; private cp(ap apVar) { this.Dy = apVar; } public /* bridge */ /* synthetic */ void onLoadFinished(Loader loader, Object obj) { a(loader, (BaseResult) obj); } public BaseResult a(int i, Object obj, BaseResult baseResult, boolean z) { if (i == 0 && obj != null) { dg dgVar = (dg) baseResult; Cursor cursor = (Cursor) obj; try { if (cursor.moveToNext()) { this.Dy.lh = YellowPage.fromJson(cursor.getString(0)); dgVar.list = YellowPagePhonesEntry.a(this.Dy.mActivity, this.Dy.lh); } cursor.close(); List<YellowPagePhone> c = e.c(this.Dy.mActivity, this.Dy.ld); if (c != null) { if (dgVar.list == null) { dgVar.list = new ArrayList(); } for (YellowPagePhone yellowPagePhone : c) { if (this.Dy.lh.getPhoneInfo(this.Dy.mActivity, yellowPagePhone.getNumber()) == null) { dgVar.list.add(YellowPagePhonesEntry.a(this.Dy.mActivity, yellowPagePhone)); } } } } catch (Throwable th) { cursor.close(); } } return baseResult; } public BaseResult r() { return new dg(this.Dy); } public g s() { return null; } public Loader onCreateLoader(int i, Bundle bundle) { if (i == 0) { this.Dy.mLoader = new p(this.Dy.mActivity, this.Dy.nj); this.Dy.mLoader.a(this.Dy.bR()); } return this.Dy.mLoader; } public void a(Loader loader, BaseResult baseResult) { dg dgVar = (dg) baseResult; if (dgVar.hasData()) { this.Dy.ni.updateData(dgVar.list); } } public void onLoaderReset(Loader loader) { } }
[ "songjd@putao.com" ]
songjd@putao.com
88b37354b0933416af3920757b010e054aa26282
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1011651.java
18f7b5019f69aa0a1d0558df1ff99a84ad91f048
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
@Override public SNode wrap(SNode sourceNode){ SNode result=SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xa5e4de5346a344daL,0xaab368fdf1c34ed0L,0x1cf75b72b0b3962bL,"jetbrains.mps.console.ideCommands.structure.SubtreeStatisticsTarget")); SLinkOperations.setTarget(result,MetaAdapterFactory.getContainmentLink(0xa5e4de5346a344daL,0xaab368fdf1c34ed0L,0x1cf75b72b0b3962bL,0x1cf75b72b0b396c6L,"target"),sourceNode); return result; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
9f74fbcd72a9b3185179297605395cb82a0de214
fb12e7dee8ab8f714c2ce7c51f46f2943c1e2546
/glarimy-zuul-server/src/main/java/com/glarimy/zuul/AccessLogFilter.java
20558142933538a3cf3d570d0a382288f5032e74
[]
no_license
imbatfleck/apigateway
1c51206df8824dee60df27a90fc1f86f5135473b
a3f283efcd69e3cd20f05bdbd614c2cb56f85db8
refs/heads/master
2020-06-18T02:07:21.577419
2019-07-10T05:37:26
2019-07-10T05:37:26
196,131,376
0
0
null
null
null
null
UTF-8
Java
false
false
1,119
java
package com.glarimy.zuul; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Component; import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.context.RequestContext; @Component public class AccessLogFilter extends ZuulFilter { @Override public String filterType() { return "post"; } @Override public int filterOrder() { return 0; } @Override public boolean shouldFilter() { return true; } @Override public Object run() { HttpServletRequest request = RequestContext.getCurrentContext().getRequest(); HttpServletResponse response = RequestContext.getCurrentContext().getResponse(); System.out.println("REQUEST :: < " + request.getScheme() + " " + request.getLocalAddr() + ":" + request.getLocalPort()); System.out.println("REQUEST :: < " + request.getMethod() + " " + request.getRequestURI() + " " + request.getProtocol()); System.out.println("RESPONSE:: > HTTP:" + response.getStatus()); return null; } }
[ "krishna@glarimy.com" ]
krishna@glarimy.com
f11270d8251931d55424ee181a3ee5ae2a9415a9
f1572d3a826ced3a778dd378ab52fa22d1ec3ec9
/democode/xsd2java/src/com/beyondbit/smartbox/response/serialization/QuerySubOrgsResponseSerializer.java
542353ebcca9252dc79f3cd663356779a351742f
[]
no_license
txc1223/helloworld
0a3ae2cdf675e940816bcfba8a611de2b3aa4434
c0db8c4a9eaa923c995e7aec239db35ef6ed498a
refs/heads/master
2021-01-25T10:29:11.002995
2015-12-15T03:26:14
2015-12-15T03:26:14
31,292,917
0
0
null
null
null
null
UTF-8
Java
false
false
2,016
java
package com.beyondbit.smartbox.response.serialization; import java.io.StringWriter; import java.io.ByteArrayInputStream; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; import java.util.HashMap; import java.util.List; import java.util.ArrayList; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NamedNodeMap; import util.MyNode; import util.UtilTextContent; import android.util.Base64; import com.beyondbit.smartbox.response.QuerySubOrgsResponse; import com.beyondbit.smartbox.common.CalOrg; import com.beyondbit.smartbox.common.serialization.CalOrgSerializer; public class QuerySubOrgsResponseSerializer { public static QuerySubOrgsResponse parseChildElement(QuerySubOrgsResponse querySubOrgsResponse,String typeName,MyNode node,String typeNameSpace) { ArrayList<CalOrg> calOrgListData=new ArrayList<CalOrg> (); if (querySubOrgsResponse == null) querySubOrgsResponse = new QuerySubOrgsResponse(); List<MyNode> nodeList=node.getMyNodeList(); int len=nodeList.size(); for (int i = 0; i < len; i++) { MyNode n = nodeList.get(i); //CalOrg; if (n.equalsName("CalOrg") && n.equalsNameSpace("http://www.beyondbit.com/smartbox/response")) { calOrgListData.add((CalOrg)CalOrgSerializer.parseChildElement(null,"CalOrg",n,"http://www.beyondbit.com/smartbox/common")); continue; } } querySubOrgsResponse.setCalOrg(calOrgListData.toArray(new CalOrg[calOrgListData.size()])); return querySubOrgsResponse; } }
[ "tangxucheng@shbeyondbit.com" ]
tangxucheng@shbeyondbit.com
a6deaff3c0ff55880f39ef8077da0f8b4d8f0895
328bb970a709a9d83b213f9e424248fc9076a046
/src/ocaStudyGuide/methodsencapsulation/Classroom.java
9f45520d6f709e467ea2a450318cc54ffe52e5b0
[]
no_license
Arasefe/OCAPreperation
0c74430b421328d41a4d4644b4033a621b7ac672
e1d693521540e9ba45f78c5b47ceb7f23e26a6b9
refs/heads/master
2023-01-06T16:17:18.662190
2020-11-07T00:14:56
2020-11-07T00:14:56
301,600,658
0
0
null
null
null
null
UTF-8
Java
false
false
306
java
package ocaStudyGuide.methodsencapsulation; public class Classroom { private int roomNumber; protected String teacherName; static int globalKey=54321; public int floor=3; Classroom(int r, String t){ // default accessibility roomNumber=r; teacherName=t; } }
[ "ismail_yildirim69@yahoo.com" ]
ismail_yildirim69@yahoo.com
d82f98ddc674b38169cb83aa0e8f5f17dbeae7bc
11ed60aa1693607c5c3f8aaf6f89dbd0c787df20
/app/src/main/java/com/cdqf/dire_state/MD5Utils.java
484bfb0def4df9e41174953c0a24bdcde6f92baa
[]
no_license
1181247328/Directional-master
c267973ec3db4fd5a5d2e5b8adba342687af0880
9db56e1d5b2b7c7bffd3c86a057f1dc79327770d
refs/heads/master
2021-03-17T20:05:27.706094
2020-04-11T02:53:10
2020-04-11T02:53:10
247,014,047
0
0
null
null
null
null
UTF-8
Java
false
false
1,266
java
package com.cdqf.dire_state; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * MD5加密 * Created by XinAiXiaoWen on 2017/4/21. */ public class MD5Utils { private static String codeEncryption = "qifengkeji2017-4:zmgx2.0"; public static String getMD5() { return getMDTEncryption(codeEncryption); } public static String getMD5(String code) { code += codeEncryption; return getMDTEncryption(code); } /** * 加密 * * @param code * @return */ private static String getMDTEncryption(String code) { try { MessageDigest instance = MessageDigest.getInstance("MD5"); byte[] digest = instance.digest(code.getBytes()); StringBuffer sb = new StringBuffer(); for (byte b : digest) { int i = b & 0xFF; String hexString = Integer.toHexString(i); if (hexString.length() < 2) { hexString = "0" + hexString; } sb.append(hexString); } return sb.toString(); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); return ""; } } }
[ "179292126@qq.com" ]
179292126@qq.com
3e7841d143807139d9f44b712e7c6a1db827af43
3d5c738a6d73a3be516bb1c486350d24ec7775d9
/famous-battle/src/main/java/com/noseparte/battle/battle/CState.java
685cec9546917dda0fea8afde7ef9bd442cc5594
[ "MIT" ]
permissive
ly774508966/Almost-Famous
62ccd10df450c5a777b513e8b6278a8bfbefbb1a
680d858e9a01c2aa79e2f74497db22272983d9c7
refs/heads/master
2022-03-05T11:29:26.799759
2019-10-04T11:13:01
2019-10-04T11:13:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,159
java
package com.noseparte.battle.battle; import LockstepProto.C2SState; import LockstepProto.State; import com.noseparte.battle.BattleServerConfig; import com.noseparte.battle.asynchttp.BattleStartRequest; import com.noseparte.battle.server.Protocol; import com.noseparte.battle.utils.JobEntity; import com.noseparte.battle.utils.JobUtil; import com.noseparte.common.bean.Actor; import com.noseparte.common.utils.SpringContextUtils; import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; import java.util.List; @Slf4j public class CState extends Protocol { @Override protected void process() throws Exception { C2SState req = C2SState.parseFrom(this.msg); if (log.isInfoEnabled()) { log.info("request protocol sid={}, type={}, msg={}", getSid(), type, req.toString()); } int state = req.getState(); long roleId = getRoleId(); if (log.isDebugEnabled()) { log.debug("准备完毕roleId={}, state={}", roleId, state); } BattleRoomMgr battleMgr = SpringContextUtils.getBean("battleRoomMgr", BattleRoomMgr.class); // 验证是否有存在的房间 if (!battleMgr.isHaveRoom(roleId)) { log.error("不能准备开始,玩家有未结束的战斗房间。role={}", roleId); return; } BattleRoom battleRoom = battleMgr.getBattleRoomByRoleId(roleId); List<Actor> actors = battleRoom.getActors(); int ready_go = 0; for (Actor actor : actors) { if (roleId == actor.getRoleId()) { actor.setState(state); } ready_go += actor.getState(); } if (log.isDebugEnabled()) { log.debug("对战开始前准备人数与状态{}", ready_go); } // 准备状态相加数和匹配人数相等代表都准备好了 BattleServerConfig battleServerConfig = SpringContextUtils.getBean("battleServerConfig", BattleServerConfig.class); if (ready_go == battleServerConfig.getMatchers()) { Long roomId = battleRoom.getRoomId(); battleRoom.setState(State.BATTLE_READY_GO_VALUE); // 战斗开始 JobEntity quartzEntity = new JobEntity(); quartzEntity.setQuartzId(roomId); quartzEntity.setJobName("BattleRoomTask:" + roomId); quartzEntity.setJobGroup("WatchBattleRoomJob"); quartzEntity.getInvokeParam().put("roomId", roomId); quartzEntity.getInvokeParam().put("startTime", System.currentTimeMillis()); JobUtil jobUtil = SpringContextUtils.getBean("jobUtil", JobUtil.class); jobUtil.addJob(quartzEntity); // 保存定时器引用 battleRoom.setQuartzEntity(quartzEntity); log.debug("开站了创建房间定时器===>>>>" + quartzEntity.getJobName()); //向gamecore服务器发送战斗开始 List<Long> rids = new ArrayList<>(); for (Actor actor : actors) { rids.add(actor.getRoleId()); } new BattleStartRequest(rids, roomId).execute(); } } }
[ "noseparte@aliyun.com" ]
noseparte@aliyun.com
5eb10974b892276673756a86dc741f13708d9705
365b59229710d5b387e00f924ac0087102cb97c9
/jcompany_fcls_parent/jcompany_fcls_model/src/main/java/br/com/plc/jcompany_fcls/model/uf/UfManager.java
42668d8653d44a1b12402127a298aba5ee8e0631
[]
no_license
iecker/jaguar615
a8045ad4729b8fe572d13cb91239b9cca81d5383
4b2658738dac4fb93dd52489de640c7f3de4e782
refs/heads/master
2020-04-21T15:20:20.126020
2018-05-25T15:14:03
2018-05-25T15:14:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,083
java
/* Jaguar-jCompany Developer Suite. Powerlogic 2010-2014. Please read licensing information in your installation directory.Contact Powerlogic for more information or contribute with this project: suporte@powerlogic.com.br - www.powerlogic.com.br */ /* Jaguar-jCompany Developer Suite. Powerlogic 2010-2014. Please read licensing information in your installation directory.Contact Powerlogic for more information or contribute with this project: suporte@powerlogic.com.br - www.powerlogic.com.br */ package br.com.plc.jcompany_fcls.model.uf; import br.com.plc.jcompany_fcls.model.AppManager; import com.powerlogic.jcompany.commons.config.stereotypes.SPlcRepository; /** * jcompany_fcls . Classe de Negócio da Aplicação. */ @SPlcRepository public class UfManager extends AppManager { }
[ "josivan.silva@castgroup.com.br" ]
josivan.silva@castgroup.com.br
eaccdde915c1e6dce06877050178898aab17ce10
bd5580d2110f89c17ca21c0f798b536231a5545e
/src/main/java/io/lettuce/core/RedisAsyncCommandsImpl.java
4d3b4882a11e45ade69ed25539a1d80a6e5246c1
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
dengliming/lettuce-core
5de501889bb74e6fcb1cec364898ed1af48127bb
0e2649fefd560dd5146a74065437fef0593d75cc
refs/heads/master
2022-07-24T11:38:54.981473
2020-02-15T00:53:52
2020-02-15T00:53:52
240,516,093
2
0
Apache-2.0
2020-05-27T08:34:54
2020-02-14T13:37:35
Java
UTF-8
Java
false
false
1,644
java
/* * Copyright 2011-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.lettuce.core; import io.lettuce.core.api.StatefulRedisConnection; import io.lettuce.core.api.async.RedisAsyncCommands; import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands; import io.lettuce.core.codec.RedisCodec; /** * An asynchronous and thread-safe API for a Redis connection. * * @param <K> Key type. * @param <V> Value type. * @author Mark Paluch */ public class RedisAsyncCommandsImpl<K, V> extends AbstractRedisAsyncCommands<K, V> implements RedisAsyncCommands<K, V>, RedisClusterAsyncCommands<K, V> { /** * Initialize a new instance. * * @param connection the connection to operate on * @param codec the codec for command encoding * */ public RedisAsyncCommandsImpl(StatefulRedisConnection<K, V> connection, RedisCodec<K, V> codec) { super(connection, codec); } @Override public StatefulRedisConnection<K, V> getStatefulConnection() { return (StatefulRedisConnection<K, V>) super.getConnection(); } }
[ "mpaluch@paluch.biz" ]
mpaluch@paluch.biz
feaf872c34c9e734fc6c2d38007baa09abe066ea
80f6fc80507fa9d23c1a7a2e26f4a0e8db0b59b6
/base/branch/RMBase/0.1/src/net/form105/rm/base/BackgroundThread.java
c836f75606bc7a267f97cf9d15daa673bd00f904
[]
no_license
BackupTheBerlios/rmframework-svn
433ef7ea147ddb888092689b9d16ac3b8908f40e
062e95e247275365ecf612a92e792927d30d9d96
refs/heads/master
2021-03-12T20:14:26.065677
2011-10-18T17:41:57
2011-10-18T17:41:57
40,801,991
0
0
null
null
null
null
UTF-8
Java
false
false
989
java
/* * BackgroundThread.java, Oct 28, 2007, 4:58:11 PM * * Copyright (c) 2007, form105 Heiko Kundlacz * Licensed under the GNU GPL Version 3. For full terms see the file license.txt */ package net.form105.rm.base; import org.apache.log4j.Logger; public class BackgroundThread implements Runnable { private static Logger logger = Logger.getLogger(BackgroundThread.class); private boolean running = false; public void run() { running = true; while (running) { try { logger.info("Start waiting"); synchronized (this) { wait(); } //wait(); logger.info("Thread notified"); } catch (InterruptedException ex) { logger.error("Thread interrupted. ", ex); } } logger.info("Main thread stopped ..."); } public void stop() { running = false; this.notifyAll(); logger.info("notified"); } }
[ "pusteblume@ee2c9ef0-5c3b-0410-85e1-eabd887c3043" ]
pusteblume@ee2c9ef0-5c3b-0410-85e1-eabd887c3043
34f5bdefb87b601c05dc384852b6c53eeddb5cd5
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-16b-3-21-FEMO-WeightedSum:TestLen:CallDiversity/org/mockito/internal/MockitoCore_ESTest.java
9a785e62ca04fa44a80c86a3e676c3fe8a573b78
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 09:44:54 UTC 2020 */ package org.mockito.internal; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.internal.MockitoCore; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class MockitoCore_ESTest extends MockitoCore_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { MockitoCore mockitoCore0 = new MockitoCore(); // Undeclared exception! mockitoCore0.when((Object) null); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d3c329f89ecc5f259ec7765426904d2193b1213b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_146dc2975b8dfdec740156cbde904d2c7a3860c2/ChatRoomResource/7_146dc2975b8dfdec740156cbde904d2c7a3860c2_ChatRoomResource_t.java
34ff80e0f7ce24609fd16de0bc62f83b59d575d9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,974
java
package ch.windmobile.server.resource; import java.net.HttpURLConnection; import java.security.MessageDigest; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Request; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import javax.xml.bind.JAXBElement; import org.springframework.security.core.context.SecurityContextHolder; import ch.windmobile.server.datasourcemodel.DataSourceException; import ch.windmobile.server.datasourcemodel.xml.Error; import ch.windmobile.server.security.SecurityHelper; import ch.windmobile.server.security.WindMobileAuthenticationProvider; import ch.windmobile.server.socialmodel.ChatService; import ch.windmobile.server.socialmodel.ServiceLocator; import ch.windmobile.server.socialmodel.UserService; import ch.windmobile.server.socialmodel.xml.Messages; import ch.windmobile.server.socialmodel.xml.ObjectFactory; import ch.windmobile.server.socialmodel.xml.User; public class ChatRoomResource { private ServiceLocator serviceLocator; private String chatRoomId; UriInfo uriInfo; Request request; HttpServletRequest servletRequest; String stationId; public ChatRoomResource(UriInfo uriInfo, Request request, HttpServletRequest servletRequest, ServiceLocator serviceLocator, String chatRoomId) { this.uriInfo = uriInfo; this.request = request; this.servletRequest = servletRequest; this.serviceLocator = serviceLocator; this.chatRoomId = chatRoomId; } @POST @Path("postmessage") @Consumes(MediaType.TEXT_PLAIN) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public void postMessage(String message) { try { String email; String pseudo; String emailHash; ChatService chatService = serviceLocator.getService(ChatService.class); if (SecurityHelper.hasRole(WindMobileAuthenticationProvider.roleUser) == false) { if (chatService.allowAnonymousMessages(chatRoomId) == false) { Error error = new Error(); error.setCode(DataSourceException.Error.UNAUTHORIZED.getCode()); error.setMessage("Chat room '" + chatRoomId + "' does not allow anonymous message"); throw new WebApplicationException(Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(error).build()); } String ip = servletRequest.getRemoteAddr(); email = "anonymous@" + ip; pseudo = "@" + ip; } else { email = SecurityContextHolder.getContext().getAuthentication().getName(); UserService userService = serviceLocator.getService(UserService.class); User user = userService.findByEmail(email); pseudo = user.getPseudo(); } MessageDigest md = MessageDigest.getInstance("MD5"); byte[] emailHashBytes = md.digest(email.trim().toLowerCase().getBytes()); StringBuffer hexBuffer = new StringBuffer(); for (int i = 0; i < emailHashBytes.length; i++) { String hex = Integer.toHexString(0xFF & emailHashBytes[i]); if (hex.length() == 1) { hexBuffer.append("0" + hex); } else { hexBuffer.append(hex); } } emailHash = hexBuffer.toString(); chatService.postMessage(chatRoomId, pseudo, message, emailHash); } catch (Exception e) { ExceptionHandler.treatException(e); } } @GET @Path("lastmessages/{maxCount}") @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON + ";charset=UTF-8" }) public Messages getMessages(@PathParam("maxCount") int maxCount) { try { ChatService chatService = serviceLocator.getService(ChatService.class); return chatService.findMessages(chatRoomId, maxCount); } catch (Exception e) { ExceptionHandler.treatException(e); return null; } } @GET @Path("lastmessage") @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public JAXBElement<Long> getLastMessageId() { try { ChatService chatService = serviceLocator.getService(ChatService.class); return new ObjectFactory().createMessageId(chatService.getLastMessageId(chatRoomId)); } catch (Exception e) { ExceptionHandler.treatException(e); return null; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4379c780825d804f61e6cae354be693af7c429fb
225011bbc304c541f0170ef5b7ba09b967885e95
/com/google/android/gms/maps/zzr.java
1e1ccd4a81096ae37fbdec915525f2dff182ab21
[]
no_license
sebaudracco/bubble
66536da5367f945ca3318fecc4a5f2e68c1df7ee
e282cda009dfc9422594b05c63e15f443ef093dc
refs/heads/master
2023-08-25T09:32:04.599322
2018-08-14T15:27:23
2018-08-14T15:27:23
140,444,001
1
1
null
null
null
null
UTF-8
Java
false
false
819
java
package com.google.android.gms.maps; import android.graphics.Bitmap; import android.os.RemoteException; import com.google.android.gms.dynamic.IObjectWrapper; import com.google.android.gms.dynamic.ObjectWrapper; import com.google.android.gms.maps.internal.zzbt; final class zzr extends zzbt { private final /* synthetic */ GoogleMap$SnapshotReadyCallback zzz; zzr(GoogleMap googleMap, GoogleMap$SnapshotReadyCallback googleMap$SnapshotReadyCallback) { this.zzz = googleMap$SnapshotReadyCallback; } public final void onSnapshotReady(Bitmap bitmap) throws RemoteException { this.zzz.onSnapshotReady(bitmap); } public final void zzb(IObjectWrapper iObjectWrapper) throws RemoteException { this.zzz.onSnapshotReady((Bitmap) ObjectWrapper.unwrap(iObjectWrapper)); } }
[ "sebaudracco@gmail.com" ]
sebaudracco@gmail.com
bcab4cd06c894b228481375dded1411e7de851a2
d9382e5d9122a64ac7171fd1a13d92bb02d43597
/src/main/java/com/xioq/dasacumen/web/config/DateToStringConverter.java
5dda756dcbcaf861d7667e06277bc339627b5d10
[]
no_license
bronwen-cassidy/ams
c386175c6d008cbe6c2cef16e6e484891022fb01
0c0611f903a0e40fc03ca10851923c82d5fc4e69
refs/heads/master
2021-04-30T22:08:52.960129
2015-11-03T15:28:35
2015-11-03T15:28:35
45,262,783
0
0
null
null
null
null
UTF-8
Java
false
false
1,307
java
package com.xioq.dasacumen.web.config; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.springframework.core.convert.converter.Converter; /** * This class implements the Spring converter interface effectively overriding the default converter method with * our own below which is used to specify our own date conversions based on a local date format * that will be selected by the user. * This is registered in the spring-servlet as a custom Converter with a Spring ConversionService bean. * * Every date returned from the DB will automatically call this converter to convert it to a string for the * jsp's to display. * * XXX - Currently just uses a hard coded date format as this will change once the system has something in * place to allow the user to choose the local date format. * * @author Mark Walsh */ public class DateToStringConverter implements Converter<Date, String> { //@TODO XXX: This format will be replaced with the locale user date format. private DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); @Override public String convert(Date date) { String strDate = null; if (null!=date) { strDate = formatter.format(date); } return strDate; } }
[ "bronwen.cassidy@gmail.com" ]
bronwen.cassidy@gmail.com
d62b317706953230844461ee3cd2b862b2ba5308
490760964f9bd28c31abba385e6cc37c9891e919
/roth-lib-java-api-digitalocean/src/main/java/roth/lib/java/api/digitalocean/DigitalOceanException.java
24b830a512ff45ccd546550a27acfb04e38addbd
[ "MIT" ]
permissive
roth-source/roth-lib-java-api
dd79984094a9b8034d57b2e0ebebbaa8c49c7aff
fbd1e7815c81e3ed067e3754d436a48fa75da731
refs/heads/master
2021-01-19T03:16:56.192264
2018-01-19T19:33:19
2018-01-19T19:33:19
44,627,128
0
0
null
null
null
null
UTF-8
Java
false
false
374
java
package roth.lib.java.api.digitalocean; @SuppressWarnings("serial") public class DigitalOceanException extends RuntimeException { public DigitalOceanException(String message) { super(message); } public DigitalOceanException(Throwable cause) { super(cause); } public DigitalOceanException(String message, Throwable cause) { super(message, cause); } }
[ "jaredrowell@gmail.com" ]
jaredrowell@gmail.com
b880a90fe8006398341a0a3a048b0582809c903e
b8724b65520e7e85464118be6f90ea5534097f52
/bosphorus-core/src/main/java/org/bosphorus/core/expression/scalar/factory/logical/InExecutorFactory.java
11bddb72b1ff78722162ada8131d6a51aa3c541e
[ "Apache-2.0" ]
permissive
unluonur/bosphorus
fe4e5633230cc3a289942edb20c1eb3666b5fe6f
9ec2f473872b1ca822d6cc900c3626507bd4e617
refs/heads/master
2021-01-25T10:29:07.191550
2015-01-18T21:33:52
2015-01-18T21:33:52
25,727,556
0
0
null
null
null
null
ISO-8859-2
Java
false
false
1,290
java
/** * Copyright (c) Onur Ünlü * * 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. * * The latest version of this file can be found at https://github.com/unluonur/bosphorus */ package org.bosphorus.core.expression.scalar.factory.logical; import java.util.List; import org.bosphorus.core.expression.scalar.executor.IScalarExecutor2; import org.bosphorus.core.expression.scalar.executor.logical.InExecutor; import org.bosphorus.core.expression.scalar.factory.IScalarExecutorFactory2; public class InExecutorFactory<TType extends Comparable<TType>> implements IScalarExecutorFactory2<TType, List<TType>, Boolean> { private InExecutor<TType> instance = new InExecutor<TType>(); @Override public IScalarExecutor2<TType, List<TType>, Boolean> create() { return instance; } }
[ "unluonur@gmail.com" ]
unluonur@gmail.com
731ab6cfffa456fd700296b67946f5c32247b998
0697eb1fe5f5118b0293ca4582ca28627aab9fc6
/grails-datastore-gorm-hibernate-core/src/main/groovy/org/grails/orm/hibernate/datasource/MultipleDataSourceSupport.java
8ebbb9319395ece3229bc84185f8fecc748aadf0
[ "Apache-2.0" ]
permissive
eugene-kamenev/grails-data-mapping
1e7fc2008ecac84c483c8940af29a6731d2bd8f1
c7d3c7c44656aba6a342f313f37ff0045df172cc
refs/heads/master
2020-12-01T11:48:24.139179
2016-06-27T11:23:02
2016-06-27T11:23:02
49,337,192
6
1
null
2016-01-19T12:58:45
2016-01-09T18:59:01
Groovy
UTF-8
Java
false
false
2,236
java
/* Copyright 2016 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.grails.orm.hibernate.datasource; import org.grails.datastore.mapping.config.Entity; import org.grails.datastore.mapping.model.PersistentEntity; import org.grails.orm.hibernate.cfg.Mapping; import java.util.Collections; import java.util.List; /** * Support methods for Multiple data source handling * * @author Graeme Rocher * @since 5.0.2 */ public class MultipleDataSourceSupport { /** * If a domain class uses more than one datasource, we need to know which one to use * when calling a method without a namespace qualifier. * * @param domainClass the domain class * @return the default datasource name */ public static String getDefaultDataSource(PersistentEntity domainClass) { List<String> names = getDatasourceNames(domainClass); if (names.size() == 1 && Mapping.ALL_DATA_SOURCES.equals(names.get(0))) { return Mapping.DEFAULT_DATA_SOURCE; } return names.get(0); } public static List<String> getDatasourceNames(PersistentEntity domainClass) { final Entity mappedForm = domainClass.getMapping().getMappedForm(); if(mappedForm instanceof Mapping) { Mapping mapping = (Mapping) mappedForm; return mapping.getDatasources(); } return Collections.singletonList(Mapping.DEFAULT_DATA_SOURCE); } public static boolean usesDatasource(PersistentEntity domainClass, String dataSourceName) { List<String> names = getDatasourceNames(domainClass); return names.contains(dataSourceName) || names.contains(Mapping.ALL_DATA_SOURCES); } }
[ "graeme.rocher@gmail.com" ]
graeme.rocher@gmail.com
755fd614c30166203451f9870a9f2829ba18f002
c3fb0de236cbc75612398673b94a54f9270867bf
/zprj-Sc2gears-parsing-engine/src-sc2gearspluginapi/hu/belicza/andras/sc2gearspluginapi/api/sc2replay/action/ITrainAction.java
720be9049645fb86cfa749f00cb6313b47c22d01
[ "Apache-2.0" ]
permissive
icza/sc2gears
a6897bf88fd54e06104d121408780e7a89786323
402e050fc3767dd44e00326607d9a9353d082519
refs/heads/master
2022-08-24T02:51:34.565837
2022-08-12T13:43:28
2022-08-12T13:43:28
46,019,270
36
5
null
null
null
null
UTF-8
Java
false
false
787
java
/* * Project Sc2gears * * Copyright (c) 2010 Andras Belicza <iczaaa@gmail.com> * * This software is the property of Andras Belicza. * Copying, modifying, distributing, refactoring without the authors permission * is prohibited and protected by Law. */ package hu.belicza.andras.sc2gearspluginapi.api.sc2replay.action; import hu.belicza.andras.sc2gearspluginapi.api.sc2replay.IGameEvents; import hu.belicza.andras.sc2gearspluginapi.api.sc2replay.ReplayConsts.Unit; /** * Represents a Train action. * * @since "2.0" * * @author Andras Belicza * * @see IGameEvents */ public interface ITrainAction extends IBaseUseAbilityAction { /** * Returns the issued unit. * @return the issued unit * @see Unit */ Unit getUnit(); }
[ "iczaaa@gmail.com" ]
iczaaa@gmail.com
9292e672956a110a42ed1ca84205106a8e2be5ad
a97313154ff67d48c20b2f35b38af4677a60fbaa
/src/main/java/com/ms/ews/MailboxStatisticsSearchResultType.java
c2f12986061d1c7822aed4c1f0d6d54710e28417
[]
no_license
okydiuk-tt/connector2.0-tests
0adcb595f7e80e51d7956f75a9dc8adaf2df0481
d2ed9e946d8e552f38a95627cc2e873f89ce8f08
refs/heads/master
2020-04-01T23:55:29.888697
2018-11-05T14:25:43
2018-11-05T14:25:43
153,779,655
0
0
null
2018-10-25T13:05:05
2018-10-19T12:31:04
Java
UTF-8
Java
false
false
3,050
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.12.07 at 08:14:05 PM EET // package com.ms.ews; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Mailbox statistics search result. * * <p>Java class for MailboxStatisticsSearchResultType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MailboxStatisticsSearchResultType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="UserMailbox" type="{http://schemas.microsoft.com/exchange/services/2006/types}UserMailboxType"/> * &lt;element name="KeywordStatisticsSearchResult" type="{http://schemas.microsoft.com/exchange/services/2006/types}KeywordStatisticsSearchResultType" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MailboxStatisticsSearchResultType", propOrder = { "userMailbox", "keywordStatisticsSearchResult" }) public class MailboxStatisticsSearchResultType { @XmlElement(name = "UserMailbox", required = true) protected UserMailboxType userMailbox; @XmlElement(name = "KeywordStatisticsSearchResult") protected KeywordStatisticsSearchResultType keywordStatisticsSearchResult; /** * Gets the value of the userMailbox property. * * @return * possible object is * {@link UserMailboxType } * */ public UserMailboxType getUserMailbox() { return userMailbox; } /** * Sets the value of the userMailbox property. * * @param value * allowed object is * {@link UserMailboxType } * */ public void setUserMailbox(UserMailboxType value) { this.userMailbox = value; } /** * Gets the value of the keywordStatisticsSearchResult property. * * @return * possible object is * {@link KeywordStatisticsSearchResultType } * */ public KeywordStatisticsSearchResultType getKeywordStatisticsSearchResult() { return keywordStatisticsSearchResult; } /** * Sets the value of the keywordStatisticsSearchResult property. * * @param value * allowed object is * {@link KeywordStatisticsSearchResultType } * */ public void setKeywordStatisticsSearchResult(KeywordStatisticsSearchResultType value) { this.keywordStatisticsSearchResult = value; } }
[ "okydiuk@timetrade.com" ]
okydiuk@timetrade.com
4a99f328c7bb22c790a8251a8fecf28d1c667b71
eaadbbf75cefd3896ed93c45f23c30d9c4b80ff9
/sources/com/google/android/gms/internal/zzbty.java
6c72e75036fccd6e224691482e8a889d7bbff400
[]
no_license
Nicholas1771/Mighty_Monkey_Android_Game
2bd4db2951c6d491f38da8e5303e3c004b4331c7
042601e568e0c22f338391c06714fa104dba9a5b
refs/heads/master
2023-03-09T00:06:01.492150
2021-02-27T04:02:42
2021-02-27T04:02:42
342,766,422
0
0
null
null
null
null
UTF-8
Java
false
false
1,381
java
package com.google.android.gms.internal; import android.os.Parcel; import android.os.Parcelable; import com.google.android.gms.common.internal.safeparcel.zzb; public final class zzbty implements Parcelable.Creator<zzbtx> { public final /* synthetic */ Object createFromParcel(Parcel parcel) { int i = 0; int zzd = zzb.zzd(parcel); String str = null; int i2 = 0; int i3 = 0; int i4 = 0; while (parcel.dataPosition() < zzd) { int readInt = parcel.readInt(); switch (65535 & readInt) { case 2: i4 = zzb.zzg(parcel, readInt); break; case 3: i3 = zzb.zzg(parcel, readInt); break; case 4: i2 = zzb.zzg(parcel, readInt); break; case 5: str = zzb.zzq(parcel, readInt); break; case 6: i = zzb.zzg(parcel, readInt); break; default: zzb.zzb(parcel, readInt); break; } } zzb.zzF(parcel, zzd); return new zzbtx(i4, i3, i2, str, i); } public final /* synthetic */ Object[] newArray(int i) { return new zzbtx[i]; } }
[ "nicholasiozzo17@gmail.com" ]
nicholasiozzo17@gmail.com
78c7ac8bcfc28cebb7fa168617893843830d1e14
6d8c06d1dcb2af678197a8eaa90d84ee51f34c8b
/UU/src/com/huiyoumall/uu/activity/SuggestionActivity.java
11bd777bc7b143722cc6f4165184d11f54de8bd5
[]
no_license
heshicaihao/UU
0a37abdba8aba1eb2afdf451d77f1ae9adb4a5e6
91840eada68bfe0f8529ab1ec206509c45652e19
refs/heads/master
2021-05-14T03:20:09.562782
2018-01-08T02:48:50
2018-01-08T02:48:50
116,616,515
0
0
null
null
null
null
GB18030
Java
false
false
2,098
java
package com.huiyoumall.uu.activity; import android.content.SharedPreferences; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; import android.widget.TextView; import com.huiyoumall.uu.R; import com.huiyoumall.uu.base.BaseActivity; import com.huiyoumall.uu.util.StringUtils; /** * 意见反馈 界面 * * @author ASUS * */ public class SuggestionActivity extends BaseActivity implements OnClickListener { private TextView vTitle; private TextView vRight_btn; private EditText vPerson_signature_edit; private String Person_signature; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_suggestion); } @Override public void findViewById() { vTitle = (TextView) findViewById(R.id.title); vRight_btn = (TextView) findViewById(R.id.right_btn); vPerson_signature_edit = (EditText) findViewById(R.id.person_signature_edit); } @Override public void initView() { vTitle.setText("意见反馈"); vRight_btn.setText("确定"); vRight_btn.setOnClickListener(this); } @Override public void activitybackview(View view) { super.activitybackview(view); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { finish(); return true; } return super.onKeyDown(keyCode, event); } @Override public void onClick(View v) { int id = v.getId(); switch (id) { case R.id.right_btn: if (!StringUtils.isEmpty(vPerson_signature_edit.getText() .toString())) { Person_signature = vPerson_signature_edit.getText().toString(); } SharedPreferences mySharedPreferences = getSharedPreferences( "Person_Info", this.MODE_PRIVATE); SharedPreferences.Editor editor = mySharedPreferences.edit(); editor.putString("Person_signature", Person_signature); editor.commit(); break; default: break; } } }
[ "heshicaihao@163.com" ]
heshicaihao@163.com
dee50bbeba28f908df36e147aea9b989090f0a72
4dee0cfde42a0780476d5684d5fdb376a4936f36
/src/main/java/uk/ac/ebi/pride/toolsuite/gui/component/table/renderer/OpenPTMRenderer.java
697c3609544f6c52aa4c6f3508b9e14a758f4355
[ "Apache-2.0" ]
permissive
fawnshao/pride-inspector
51d4dd9da9044c6a325452efc03fc9cc53e9413b
113adb4ab46d4ea29f45db92ebdc16e387e44171
refs/heads/master
2020-06-15T00:33:53.813236
2016-11-29T14:28:11
2016-11-29T14:28:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,877
java
package uk.ac.ebi.pride.toolsuite.gui.component.table.renderer; import javax.swing.*; import javax.swing.table.TableCellRenderer; import java.awt.*; /** * Cell renderer used for drawing number of ptms column * <p/> * User: rwang * Date: 05/07/2011 * Time: 10:11 */ public class OpenPTMRenderer extends JLabel implements TableCellRenderer { private ImageIcon icon; private int value; public OpenPTMRenderer(ImageIcon icon) { if (icon == null) { throw new IllegalArgumentException("Input icon cannot be NULL"); } this.icon = icon; setOpaque(true); } @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { this.value = value == null ? 0 : Integer.parseInt(value.toString()); return this; } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); // create graphics 2d Graphics2D g2 = (Graphics2D) g.create(); // rendering hints g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // get size int height = this.getHeight(); int xPos = 0; int yPos; // font metrics FontMetrics fontMetrics = g2.getFontMetrics(); int fontDescent = fontMetrics.getDescent(); int fontAscent = fontMetrics.getAscent(); // draw text String str = value + ""; g2.drawString(str, xPos, height - fontDescent); // draw icon if (value > 0) { xPos += fontMetrics.stringWidth(str)+ 2; yPos = height - fontAscent - fontDescent - 2; // draw icon g2.drawImage(icon.getImage(), xPos, yPos, null); } // remove g2.dispose(); } }
[ "ypriverol@gmail.com" ]
ypriverol@gmail.com
e234874969f06088f47dab4d0a9eacc4076e5abe
60282a55340d75325bb96e95e86381a12d66c006
/src/main/java/io/webfolder/cdp/type/css/MediaQuery.java
64ee4671beddd01f88a4ed992d28487d6bbba01b
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
Billesper/cdp4j
f7aee808f5d1833d83b113bd63f2ed61cbb3abb9
d94a69195b4e8874f42e30dc69b97b61dade4015
refs/heads/master
2022-11-25T16:23:51.822342
2020-08-03T18:34:41
2020-08-03T18:34:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,814
java
/** * cdp4j Commercial License * * Copyright 2017, 2020 WebFolder OÜ * * Permission is hereby granted, to "____" 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 and sublicense of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following conditions: * * 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 io.webfolder.cdp.type.css; import java.util.List; /** * Media query descriptor */ public class MediaQuery { private List<MediaQueryExpression> expressions; private Boolean active; /** * Array of media query expressions. */ public List<MediaQueryExpression> getExpressions() { return expressions; } /** * Array of media query expressions. */ public void setExpressions(List<MediaQueryExpression> expressions) { this.expressions = expressions; } /** * Whether the media query condition is satisfied. */ public Boolean isActive() { return active; } /** * Whether the media query condition is satisfied. */ public void setActive(Boolean active) { this.active = active; } }
[ "support@webfolder.io" ]
support@webfolder.io
815e68c95e335c0f770203b146c43ad12e96a82d
fc657cf25c89bf7ba262389b2c3468f457ed4b06
/modules/citrus-maven/plugins/citrus-maven-plugin/src/main/java/com/consol/citrus/mvn/plugin/CreateTestMojo.java
37e6a9fdeef41dc5feaabc66dcb1156a70869b18
[ "Apache-2.0" ]
permissive
tuhinsubhramitra/citrus
d47859dd0bfd10b20d547d051e246e1a4d239973
e44457fb6e53623754fe582cfc9c2c253f42df61
refs/heads/master
2021-01-22T13:07:52.270471
2014-10-23T12:18:53
2014-10-23T12:18:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,731
java
/* * Copyright 2006-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.consol.citrus.mvn.plugin; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.codehaus.plexus.components.interactivity.Prompter; import org.codehaus.plexus.components.interactivity.PrompterException; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import com.consol.citrus.util.TestCaseCreator; import com.consol.citrus.util.TestCaseCreator.UnitFramework; /** * Creates new Citrus test cases with empty XML test file and executable Java class. * * Mojo offers an interactive mode, where the plugin prompts for parameters during execution. In * non-interactive mode the parameters are given as command line arguments. * * @author Christoph Deppisch * @goal create-test */ public class CreateTestMojo extends AbstractMojo { /** * The name of the test case (must start with upper case letter). * @parameter * expression="${name}" * default-value="" */ private String name; /** * The test author * @parameter * expression="${author}" * default-value="Unknown" */ private String author; /** * Describes the test case and its actions * @parameter * expression="${description}" * default-value="TODO: Description" */ private String description; /** * Which package (folder structure) is assigned to this test. Defaults to "com.consol.citrus" * @parameter * expression="${targetPackage}" * default-value="com.consol.citrus" */ private String targetPackage; /** * Whether to run this command in interactive mode. Defaults to "true". * @parameter * expression="${interactiveMode}" * default-value="true" */ private boolean interactiveMode; /** * Which unit test framework to use for test execution (default: testng; options: testng, junit) * @parameter * expression="${framework}" * default-value="testng" */ private String framework; /** @component * @required */ private Prompter prompter; /** * @see org.apache.maven.plugin.AbstractMojo#execute() */ public void execute() throws MojoExecutionException { try { while (interactiveMode && !StringUtils.hasText(name)) { name = prompter.prompt("Enter test name"); } if (!StringUtils.hasText(name)) { throw new MojoExecutionException("Please provide proper test name! Test name must not be empty starting with uppercase letter!"); } if (interactiveMode) { author = prompter.prompt("Enter test author:", author); description = prompter.prompt("Enter test description:", description); targetPackage = prompter.prompt("Enter test package:", targetPackage); framework = prompter.prompt("Choose unit test framework", framework); String confirm = prompter.prompt("Confirm test creation:\n" + "framework: " + framework + "\n" + "name: " + name + "\n" + "author: " + author + "\n" + "description: " + description + "\n" + "package: " + targetPackage + "\n", CollectionUtils.arrayToList(new String[] {"y", "n"}), "y"); if (confirm.equalsIgnoreCase("n")) { return; } } TestCaseCreator creator = getTestCaseCreator() .withFramework(UnitFramework.fromString(framework)) .withName(name) .withAuthor(author) .withDescription(description) .usePackage(targetPackage); creator.createTestCase(); getLog().info("Successfully created new test case " + targetPackage + "." + name); } catch (ArrayIndexOutOfBoundsException e) { getLog().info("Wrong parameter usage! See citrus:help for usage details (mvn citrus:help -Ddetail=true -Dgoal=create-test)."); } catch (PrompterException e) { getLog().info(e); getLog().info("Failed to create test! See citrus:help for usage details (mvn citrus:help -Ddetail=true -Dgoal=create-test)."); } } /** * Method provides test creator instance. Basically introduced for better mocking capabilities in unit tests but * also useful for subclasses to provide customized creator instance. * . * @return test creator. */ public TestCaseCreator getTestCaseCreator() { return TestCaseCreator.build(); } /** * Sets the interactiveMode. * @param interactiveMode the interactiveMode to set */ public void setInteractiveMode(boolean interactiveMode) { this.interactiveMode = interactiveMode; } /** * Sets the prompter. * @param prompter the prompter to set */ public void setPrompter(Prompter prompter) { this.prompter = prompter; } }
[ "deppisch@consol.de" ]
deppisch@consol.de
1c73ddfd9dfda842498bf54a6ddc819eb1f8c34d
c05907c45dd58fbae878ea5fc1d977baa60785d7
/src/gr/uom/java/ast/ClassInstanceCreationObject.java
6f7f6dfc2895647622a520b5739981e7aac33e2e
[]
no_license
maldonado/jdeodorant
4e9aefc442262846a81cfcb2f9b5d1fa6f6dacf2
20a0b14a86b9d8172fe0bdc4ea676941f8eed259
refs/heads/master
2020-03-30T07:57:02.174731
2015-05-04T14:01:11
2015-05-04T14:01:11
27,881,007
0
0
null
null
null
null
UTF-8
Java
false
false
1,656
java
package gr.uom.java.ast; import java.util.ArrayList; import java.util.List; import java.util.ListIterator; import org.eclipse.jdt.core.dom.ClassInstanceCreation; public class ClassInstanceCreationObject extends CreationObject { private List<TypeObject> parameterList; public ClassInstanceCreationObject(TypeObject type) { super(type); this.parameterList = new ArrayList<TypeObject>(); } public ClassInstanceCreation getClassInstanceCreation() { return (ClassInstanceCreation)this.creation.recoverASTNode(); } public void setClassInstanceCreation(ClassInstanceCreation creation) { this.creation = ASTInformationGenerator.generateASTInformation(creation); } public boolean addParameter(TypeObject parameterType) { return parameterList.add(parameterType); } public ListIterator<TypeObject> getParameterListIterator() { return parameterList.listIterator(); } public List<TypeObject> getParameterTypeList() { return this.parameterList; } public List<String> getParameterList() { List<String> list = new ArrayList<String>(); for(TypeObject typeObject : parameterList) list.add(typeObject.toString()); return list; } public String toString() { StringBuilder sb = new StringBuilder(); sb.append("new "); sb.append(getType().toString()); sb.append("("); if(!parameterList.isEmpty()) { for(int i=0; i<parameterList.size()-1; i++) sb.append(parameterList.get(i)).append(", "); sb.append(parameterList.get(parameterList.size()-1)); } sb.append(")"); return sb.toString(); } }
[ "everton.maldonado@gmail.com" ]
everton.maldonado@gmail.com
c830794d58af1a2a38fc5472660bd1e32f991242
a3694a5abce7e1444e67108cd46b3455b01a7c06
/mobile2/android/support/v4/view/VelocityTrackerCompat.java
bae7506925e404468ee57e9869980f657405375c
[]
no_license
Hong5489/TrendMicroCTF2020
04de207d9e68b9db351805e7aa749846c0273c78
8beb5ff24cb118c3f4bae7957c316ea40248aa17
refs/heads/main
2022-12-24T21:50:39.493180
2020-10-09T05:21:18
2020-10-09T05:21:18
301,678,079
2
0
null
null
null
null
UTF-8
Java
false
false
669
java
package android.support.v4.view; import android.view.VelocityTracker; @Deprecated public final class VelocityTrackerCompat { @Deprecated public static float getXVelocity(VelocityTracker paramVelocityTracker, int paramInt) { return paramVelocityTracker.getXVelocity(paramInt); } @Deprecated public static float getYVelocity(VelocityTracker paramVelocityTracker, int paramInt) { return paramVelocityTracker.getYVelocity(paramInt); } } /* Location: /root/Downloads/trendmicro/mobile2/test/classes-dex2jar.jar!/android/support/v4/view/VelocityTrackerCompat.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "hongwei5489@gmail.com" ]
hongwei5489@gmail.com
4db2aee4c2fb0b7b6dd8450df76185ad2e2d9734
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a042/A042132Test.java
2115e0d2bc76198a7b6a6c03a31dbc9b736ff3e8
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a042; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A042132Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
867a706c62eebca3e0ca65f6afb8d5d3e5682bf3
a91421e56ad04fb37bdf7e490c789a774d2c75f6
/src/main/java/ch/ethz/matsim/baseline_scenario/analysis/transit/TransitTripItem.java
8ba8e70e4cdc614869a3f54765d1eaa41fa0a961
[]
no_license
matsim-eth/baseline_scenario
d514878b3534fb35548a7cdf631cc428737810c0
4ae427bdfb62f0722ff834762ee97f8e3b023458
refs/heads/0.3.x
2021-06-04T16:57:00.000733
2019-02-04T10:02:10
2019-02-04T10:02:10
102,973,630
2
9
null
2020-05-15T21:07:16
2017-09-09T17:43:22
Java
UTF-8
Java
false
false
1,663
java
package ch.ethz.matsim.baseline_scenario.analysis.transit; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.population.Person; public class TransitTripItem { public Id<Person> personId = null; public int personTripId = -1; public Coord origin = null; public Coord destination = null; public double crowflyDistance; public double startTime = 0.0; public double inVehicleTime = 0.0; public double waitingTime = 0.0; public double transferTime = 0.0; public double inVehicleDistance = 0.0; public double inVehicleCrowflyDistance = 0.0; public double transferDistance = 0.0; public double transferCrowflyDistance = 0.0; public int numberOfTransfers = -1; public double firstWaitingTime = Double.NaN; public TransitTripItem() { } public TransitTripItem(Id<Person> personId, int personTripId, Coord origin, Coord destination, double startTime, double inVehicleTime, double waitingTime, double inVehicleDistance, double inVehicleCrowflyDistance, double transferDistance, double transferCrowflyDistance, int numberOfTransfers, double firstWaitingTime) { this.personId = personId; this.personTripId = personTripId; this.origin = origin; this.destination = destination; this.startTime = startTime; this.inVehicleTime = inVehicleTime; this.waitingTime = waitingTime; this.inVehicleDistance = inVehicleDistance; this.inVehicleCrowflyDistance = inVehicleCrowflyDistance; this.transferDistance = transferDistance; this.transferCrowflyDistance = transferCrowflyDistance; this.numberOfTransfers = numberOfTransfers; this.firstWaitingTime = firstWaitingTime; } }
[ "hoerl.sebastian@gmail.com" ]
hoerl.sebastian@gmail.com
8d318e5761ad80aadf9fa48913a755a9aad9641d
4ad17f7216a2838f6cfecf77e216a8a882ad7093
/clbs/src/main/java/com/zw/platform/domain/other/protocol/jl/xml/DataElement.java
bf0a232d82138ffb62441619115c52b647da205b
[ "MIT" ]
permissive
djingwu/hybrid-development
b3c5eed36331fe1f404042b1e1900a3c6a6948e5
784c5227a73d1e6609b701a42ef4cdfd6400d2b7
refs/heads/main
2023-08-06T22:34:07.359495
2021-09-29T02:10:11
2021-09-29T02:10:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package com.zw.platform.domain.other.protocol.jl.xml; import lombok.Data; import lombok.NoArgsConstructor; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import java.util.List; /** * @author penghj * @version 1.0 * @date 2020/6/11 11:11 */ @Data @NoArgsConstructor @XmlAccessorType(value = XmlAccessType.FIELD) public class DataElement<T> { @XmlAttribute private String type; @XmlAttribute private String typename; @XmlAnyElement(lax = true) private List<T> content; /** * 如果这个参数不为空, 调用三方平台异常, 从里面获取 */ @XmlElement(name = "ETBase") private EtBaseElement etBase; }
[ "wuxuetao@zwlbs.com" ]
wuxuetao@zwlbs.com
42151dd2e1c3732a2980bf64a8e6d017c039a134
4d1eb142285d09cb563834951e9c82999bd91f74
/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/CreateTrack.java
c11dcba75dd31d60d41145cf8acbb2e5f3306454
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
dotRun/LuckPerms
166c289551621e96021495f8008111618f69c7f2
597f2f7b1b01c135746a49ee303511933538ea8e
refs/heads/master
2021-07-14T11:53:58.014443
2017-10-14T21:54:54
2017-10-14T21:54:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,345
java
/* * This file is part of LuckPerms, licensed under the MIT License. * * Copyright (c) lucko (Luck) <luck@lucko.me> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.actionlog.ExtendedLogEntry; import me.lucko.luckperms.common.commands.CommandResult; import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.CommandPermission; import me.lucko.luckperms.common.constants.DataConstraints; import me.lucko.luckperms.common.locale.CommandSpec; import me.lucko.luckperms.common.locale.LocaleManager; import me.lucko.luckperms.common.locale.Message; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; public class CreateTrack extends SingleCommand { public CreateTrack(LocaleManager locale) { super(CommandSpec.CREATE_TRACK.spec(locale), "CreateTrack", CommandPermission.CREATE_TRACK, Predicates.not(1)); } @Override public CommandResult execute(LuckPermsPlugin plugin, Sender sender, List<String> args, String label) { if (args.size() == 0) { sendUsage(sender, label); return CommandResult.INVALID_ARGS; } String trackName = args.get(0).toLowerCase(); if (!DataConstraints.TRACK_NAME_TEST.test(trackName)) { Message.TRACK_INVALID_ENTRY.send(sender, trackName); return CommandResult.INVALID_ARGS; } if (plugin.getStorage().loadTrack(trackName).join()) { Message.ALREADY_EXISTS.send(sender, trackName); return CommandResult.INVALID_ARGS; } if (!plugin.getStorage().createAndLoadTrack(trackName, CreationCause.COMMAND).join()) { Message.CREATE_ERROR.send(sender, trackName); return CommandResult.FAILURE; } Message.CREATE_SUCCESS.send(sender, trackName); ExtendedLogEntry.build().actor(sender).actedName(trackName).type('T').action("create").build().submit(plugin, sender); return CommandResult.SUCCESS; } }
[ "git@lucko.me" ]
git@lucko.me
5de3be4bad14af362cccfa460f34ea4429a9611f
478106dd8b16402cc17cc39b8d65f6cd4e445042
/l2junity-gameserver/src/main/java/org/l2junity/gameserver/network/client/send/ExPutEnchantTargetItemResult.java
e61f5ea8aa720a0fe37b8b48f21ea5c15e3d7360
[]
no_license
czekay22/L2JUnderGround
9f014cf87ddc10d7db97a2810cc5e49d74e26cdf
1597b28eab6ec4babbf333c11f6abbc1518b6393
refs/heads/master
2020-12-30T16:58:50.979574
2018-09-28T13:38:02
2018-09-28T13:38:02
91,043,466
1
0
null
null
null
null
UTF-8
Java
false
false
1,269
java
/* * Copyright (C) 2004-2015 L2J Unity * * This file is part of L2J Unity. * * L2J Unity 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. * * L2J Unity 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.l2junity.gameserver.network.client.send; import org.l2junity.gameserver.network.client.OutgoingPackets; import org.l2junity.network.PacketWriter; /** * @author nBd */ public class ExPutEnchantTargetItemResult implements IClientOutgoingPacket { private final int _result; public ExPutEnchantTargetItemResult(int result) { _result = result; } @Override public boolean write(PacketWriter packet) { OutgoingPackets.EX_PUT_ENCHANT_TARGET_ITEM_RESULT.writeId(packet); packet.writeD(_result); return true; } }
[ "unafraid89@gmail.com" ]
unafraid89@gmail.com
629e687ffb07e33d79d5dccde8c24c085e651ede
d29c17afc617e4c6a2c63d778ae573b2a931edde
/src/Day13/StringMethods.java
3c900e96a435f1e4a1d1296df7b7dee66343afba
[]
no_license
AnastasiyaTiu/MyFirstJavaProject
53b2cf067b8231ee3572994f6160a312ff2dfe73
25d472391d499fb3a64c608ca21bf268b775f530
refs/heads/master
2021-01-14T04:31:41.481239
2020-02-23T22:22:22
2020-02-23T22:22:22
242,600,415
0
0
null
null
null
null
UTF-8
Java
false
false
709
java
package Day13; public class StringMethods { public static void main(String[] args) { // String actions that we already know so far // equals String s1 = "hello"; System.out.println( s1.equals("abc") ); // equalsIgnoreCase System.out.println( s1.equalsIgnoreCase("HELLO") ); // toUpperCase method of String is used to make String all character uppercase System.out.println( s1 ); System.out.println( s1.toUpperCase()); //---> () generating the result Hello // toLowerCase method od String is used to //make String all character lowercase System.out.println( s1.toLowerCase() ); } }
[ "58127530+AnastasiyaTiu@users.noreply.github.com" ]
58127530+AnastasiyaTiu@users.noreply.github.com
c12833349c8c23df6b76cd23006b860b36fadbe4
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/4/1984.java
3e5afd6e68c0cbef4f4e4a07d914734191407c73
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,411
java
package <missing>; public class GlobalMembers { public static int Main() { int row; int col; int k; int i; int j; int[][] a = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { row = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { col = Integer.parseInt(tempVar2); } for (i = 0;i < row;i++) { for (j = 0;j < col;j++) { String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { a[i][j] = Integer.parseInt(tempVar3); } } } for (k = 0;k < row + col - 1;) { for (i = 0;i < row;i++) { for (j = 0;j < col;j++) { if (i + j == k) { System.out.printf("%d\n",a[i][j]); } } } k++; } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
a28be7c1d8d24dbb94d25a136bc32cda331c7434
7b4fd58090aa7013137ba2734d7f256b812861e1
/src/Ellias/rm/com/tencent/component/ui/widget/l.java
e767195a0297184c4a0c3ad79ae10e02f413bec0
[]
no_license
daihuabin/Ellias
e37798a6a2e63454f80de512319ece885b6a2237
fd010991a5677e6aa104b927b82fc3d6da801887
refs/heads/master
2023-03-16T21:12:33.908495
2020-02-10T15:42:22
2020-02-10T15:42:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.tencent.component.ui.widget; import android.os.Handler; import android.os.Message; class l { public static final int a = 16; private static final int b = 1000; private static final Handler c = new m(null); private l() { throw new UnsupportedOperationException(); } public static void a(Runnable paramRunnable) { Message localMessage = new Message(); localMessage.what = 1000; localMessage.obj = paramRunnable; c.sendMessageDelayed(localMessage, 16L); } public static void a(Runnable paramRunnable, long paramLong) { Message localMessage = new Message(); localMessage.what = 1000; localMessage.obj = paramRunnable; c.sendMessageDelayed(localMessage, paramLong); } } /* Location: D:\rm_src\classes_dex2jar\ * Qualified Name: com.tencent.component.ui.widget.l * JD-Core Version: 0.6.0 */
[ "sevarsti@sina.com" ]
sevarsti@sina.com
496e5e027799178d6b06bf01185b6e8125eb059c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_485a11f8d74498f21d80f4e854569cd8ddd53b8e/CivilopediaHtmlHelper/4_485a11f8d74498f21d80f4e854569cd8ddd53b8e_CivilopediaHtmlHelper_t.java
a8ac4953dc8b92575546e6dd9c15361c8fb426eb
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,203
java
package name.davidfischer.civilopedia.helpers; import java.util.HashMap; import java.util.Iterator; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; public final class CivilopediaHtmlHelper { private static final char DELIMETER = '$'; private static final String [][] REPLACEMENTS = new String [][] { new String [] {"[TAB]", ""}, new String [] {"[NEWLINE]", "<br />"}, new String [] {"[COLOR_POSITIVE_TEXT]", "<em class='positive-text'>"}, new String [] {"[ENDCOLOR]", "</em>"}, // Icons new String [] {"[ICON_FOOD]", "<span class='icon icon-food'></span>"}, new String [] {"[ICON_PRODUCTION]", "<span class='icon icon-production'></span>"}, new String [] {"[ICON_GOLD]", "<span class='icon icon-gold'></span>"}, new String [] {"[ICON_CULTURE]", "<span class='icon icon-culture'></span>"}, new String [] {"[ICON_RESEARCH]", "<span class='icon icon-research'></span>"}, new String [] {"[ICON_GOLDEN_AGE]", "<span class='icon icon-golden-age'></span>"}, new String [] {"[ICON_GREAT_PEOPLE]", "<span class='icon icon-great-people'></span>"}, new String [] {"[ICON_STRENGTH]", "<span class='icon icon-defense'></span>"}, new String [] {"[ICON_HAPPINESS_1]", "<span class='icon icon-happiness'></span>"}, // Note name difference new String [] {"[ICON_HAPPINESS_4]", "<span class='icon icon-unhappiness'></span>"}, // Note name difference new String [] {"[ICON_PEACE]", "<span class='icon icon-faith'></span>"}, // Note name difference new String [] {"[ICON_OCCUPIED]", "<span class='icon icon-occupied'></span>"}, new String [] {"[ICON_DIPLOMAT]", "<span class='icon icon-diplomat'></span>"}, new String [] {"[ICON_TOURISM]", "<span class='icon icon-tourism'></span>"}, new String [] {"[ICON_RES_SHEEP]", "<span class='icon icon-sheep'></span>"}, new String [] {"[ICON_RES_COW]", "<span class='icon icon-cow'></span>"}, new String [] {"[ICON_RES_HORSE]", "<span class='icon icon-horse'></span>"}, new String [] {"[ICON_RES_IRON]", "<span class='icon icon-iron'></span>"}, new String [] {"[ICON_RES_FISH]", "<span class='icon icon-fish'></span>"}, new String [] {"[ICON_RES_PEARLS]", "<span class='icon icon-pearls'></span>"}, new String [] {"[ICON_RES_DEER]", "<span class='icon icon-deer'></span>"}, new String [] {"[ICON_RES_IVORY]", "<span class='icon icon-ivory'></span>"}, new String [] {"[ICON_RES_FUR]", "<span class='icon icon-fur'></span>"}, new String [] {"[ICON_RES_TRUFFLES]", "<span class='icon icon-truffles'></span>"}, new String [] {"[ICON_RES_MARBLE]", "<span class='icon icon-marble'></span>"}, new String [] {"[ICON_RES_COAL]", "<span class='icon icon-coal'></span>"}, new String [] {"[ICON_RES_OIL]", "<span class='icon icon-oil'></span>"}, new String [] {"[ICON_RES_ALUMINUM]", "<span class='icon icon-aluminum'></span>"}, new String [] {"[ICON_RES_URANIUM]", "<span class='icon icon-uranium'></span>"}, }; private CivilopediaHtmlHelper() { // Intentionally left empty } /** * Render the passed HTML `template` with the `params`. * * @param template the HTML to escape with params * @param params key/value pairs to apply HTML escaping * @return the escaped HTML output */ public static String format(String template, HashMap<String, String> params) { String [] searchList = new String [params.size()]; String key, val; String [] replacementList = new String [params.size()]; if (null != params) { int index = 0; Iterator<String> iter = params.keySet().iterator(); while (iter.hasNext()) { key = iter.next(); val = CivilopediaHtmlHelper.civilopediaFormatter(StringEscapeUtils.escapeHtml4(params.get(key))); searchList[index] = DELIMETER + key + DELIMETER; replacementList[index] = val; index += 1; } } return StringUtils.replaceEach(template, searchList, replacementList); } /** * Should be run after HTML escaping. * @param html * @return a copy of `html` with Civilopedia specific replacements performed */ public static String civilopediaFormatter(String html) { // This method could be more performant by pre-allocating two // arrays since they never change, but then the code is harder // to maintain. String [] searchList = new String [REPLACEMENTS.length]; String [] replacementList = new String [REPLACEMENTS.length]; for (int i = 0; i < CivilopediaHtmlHelper.REPLACEMENTS.length; i += 1) { searchList[i] = CivilopediaHtmlHelper.REPLACEMENTS[i][0]; replacementList[i] = CivilopediaHtmlHelper.REPLACEMENTS[i][1]; } return StringUtils.replaceEach(html, searchList, replacementList); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a85b9edca4e329bc1ced8e02b119a58d937c1475
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/55/571.java
1641f3f652437ae5c98c7a3adcc32404d535acc9
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,221
java
package <missing>; public class GlobalMembers { public static final int maxL = 100; public static int a; public static int b; public static String str = new String(new char[maxL + 1]); public static int[] ans = new int[maxL + 1]; public static int Main() { int i; int l; int x; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { a = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { str = tempVar2.charAt(0); } String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { b = Integer.parseInt(tempVar3); } l = str.length(); x = 0; for (i = 0;i < l;i++) { x *= a; if (str.charAt(i) >= '0' && str.charAt(i) <= '9') { x += str.charAt(i) - '0'; } else if (str.charAt(i) >= 'a' && str.charAt(i) <= 'z') { x += str.charAt(i) - 'a' + 10; } else { x += str.charAt(i) - 'A' + 10; } } l = 0; while (x > 0) { ans[l] = x % b; x /= b; l++; } if (l == 0) { ans[++l] = 0; } for (i = l - 1;i >= 0;i--) { if (ans[i] < 10) { System.out.printf("%ld",ans[i]); } else { System.out.printf("%c",ans[i] - 10 + 'A'); } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
03af88c67c14e95a988502aef9261f3eddada83a
bf640d825debde2b8b3fd993b80d1f30c69db6af
/model/src/main/java/com/cezarykluczynski/stapi/model/location/repository/LocationRepositoryImpl.java
c19fedc4a2cbfdf9cbb093a94d824aa9cf7107a6
[ "MIT" ]
permissive
mastermind1981/stapi
6b8395a18a0097312d33780f6cd5e203f20acf99
5e9251e0ca800c6b5d607a7977554675231d785c
refs/heads/master
2021-01-20T12:49:17.620368
2017-05-05T17:18:53
2017-05-05T17:18:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,243
java
package com.cezarykluczynski.stapi.model.location.repository; import com.cezarykluczynski.stapi.model.common.query.QueryBuilder; import com.cezarykluczynski.stapi.model.location.dto.LocationRequestDTO; import com.cezarykluczynski.stapi.model.location.entity.Location; import com.cezarykluczynski.stapi.model.location.entity.Location_; import com.cezarykluczynski.stapi.model.location.query.LocationQueryBuilderFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Repository; import javax.inject.Inject; @Repository public class LocationRepositoryImpl implements LocationRepositoryCustom { private LocationQueryBuilderFactory locationQueryBuilderFactory; @Inject public LocationRepositoryImpl(LocationQueryBuilderFactory locationQueryBuilderFactory) { this.locationQueryBuilderFactory = locationQueryBuilderFactory; } @Override public Page<Location> findMatching(LocationRequestDTO criteria, Pageable pageable) { QueryBuilder<Location> locationQueryBuilder = locationQueryBuilderFactory.createQueryBuilder(pageable); locationQueryBuilder.equal(Location_.uid, criteria.getUid()); locationQueryBuilder.like(Location_.name, criteria.getName()); locationQueryBuilder.equal(Location_.earthlyLocation, criteria.getEarthlyLocation()); locationQueryBuilder.equal(Location_.fictionalLocation, criteria.getFictionalLocation()); locationQueryBuilder.equal(Location_.religiousLocation, criteria.getReligiousLocation()); locationQueryBuilder.equal(Location_.geographicalLocation, criteria.getGeographicalLocation()); locationQueryBuilder.equal(Location_.bodyOfWater, criteria.getBodyOfWater()); locationQueryBuilder.equal(Location_.country, criteria.getCountry()); locationQueryBuilder.equal(Location_.subnationalEntity, criteria.getSubnationalEntity()); locationQueryBuilder.equal(Location_.settlement, criteria.getSettlement()); locationQueryBuilder.equal(Location_.usSettlement, criteria.getUsSettlement()); locationQueryBuilder.equal(Location_.bajoranSettlement, criteria.getBajoranSettlement()); locationQueryBuilder.equal(Location_.colony, criteria.getColony()); locationQueryBuilder.equal(Location_.landform, criteria.getLandform()); locationQueryBuilder.equal(Location_.landmark, criteria.getLandmark()); locationQueryBuilder.equal(Location_.road, criteria.getRoad()); locationQueryBuilder.equal(Location_.structure, criteria.getStructure()); locationQueryBuilder.equal(Location_.shipyard, criteria.getShipyard()); locationQueryBuilder.equal(Location_.buildingInterior, criteria.getBuildingInterior()); locationQueryBuilder.equal(Location_.establishment, criteria.getEstablishment()); locationQueryBuilder.equal(Location_.medicalEstablishment, criteria.getMedicalEstablishment()); locationQueryBuilder.equal(Location_.ds9Establishment, criteria.getDs9Establishment()); locationQueryBuilder.equal(Location_.school, criteria.getSchool()); locationQueryBuilder.equal(Location_.mirror, criteria.getMirror()); locationQueryBuilder.equal(Location_.alternateReality, criteria.getAlternateReality()); locationQueryBuilder.setSort(criteria.getSort()); return locationQueryBuilder.findPage(); } }
[ "cezary.kluczynski@gmail.com" ]
cezary.kluczynski@gmail.com
0843897d8dbeaf871ad278bcdf23369fef3df485
5b5f90c99f66587cea981a640063a54b6ea75185
/src/main/java/com/coxandkings/travel/operations/enums/mailroomanddispatch/WorkflowEnums.java
a8066bd34bbc1ee379d738abc3d227cacb1043c9
[]
no_license
suyash-capiot/operations
02558d5f4c72a895d4a7e7e743495a118b953e97
b6ad01cbdd60190e3be1f2a12d94258091fec934
refs/heads/master
2020-04-02T06:22:30.589898
2018-10-26T12:11:11
2018-10-26T12:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
352
java
package com.coxandkings.travel.operations.enums.mailroomanddispatch; public enum WorkflowEnums { PENDING_APPROVAL("Pending_Approval"), APPROVED("Approved"), REJECTED("Rejected"); private String value; WorkflowEnums(String value) { this.value = value; } public String getValue() { return value; } }
[ "sahil@capiot.com" ]
sahil@capiot.com
6620eebeea66f2af7cffcb6ddd0f8707eb5731a2
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
/orchestrator/common/config/auth/eu.agno3.orchestrator.config.auth/src/main/java/eu/agno3/orchestrator/config/auth/krb5/KerberosAuthenticatorConfigImpl.java
013be2d44d36cd84135d2b5224f8d1b36ad39507
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AgNO3/code
d17313709ee5db1eac38e5811244cecfdfc23f93
b40a4559a10b3e84840994c3fd15d5f53b89168f
refs/heads/main
2023-07-28T17:27:53.045940
2021-09-17T14:25:01
2021-09-17T14:31:41
407,567,058
0
2
null
null
null
null
UTF-8
Java
false
false
6,880
java
/** * © 2015 AgNO3 Gmbh & Co. KG * All right reserved. * * Created: 29.06.2015 by mbechler */ package eu.agno3.orchestrator.config.auth.krb5; import java.util.HashSet; import java.util.Set; import javax.persistence.CollectionTable; import javax.persistence.DiscriminatorValue; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.ManyToMany; import javax.persistence.PersistenceUnit; import javax.persistence.Table; import javax.persistence.Transient; import org.eclipse.jdt.annotation.NonNull; import org.hibernate.envers.Audited; import eu.agno3.orchestrator.config.auth.AbstractAuthenticatorConfigImpl; import eu.agno3.orchestrator.config.auth.AuthenticatorConfig; import eu.agno3.orchestrator.config.auth.PatternRoleMapEntry; import eu.agno3.orchestrator.config.auth.PatternRoleMapEntryImpl; import eu.agno3.runtime.xml.binding.MapAs; /** * @author mbechler * */ @MapAs ( KerberosAuthenticatorConfig.class ) @Entity @PersistenceUnit ( unitName = "config" ) @Table ( name = "config_auth_krb5" ) @Audited @DiscriminatorValue ( "auth_krb5" ) public class KerberosAuthenticatorConfigImpl extends AbstractAuthenticatorConfigImpl<KerberosAuthenticatorConfig> implements KerberosAuthenticatorConfig, KerberosAuthenticatorConfigMutable { /** * */ private static final long serialVersionUID = -387717594593898647L; private String kerberosRealm; private String keytabAlias; private String serviceName; private Boolean allowPasswordFallback; private Set<String> acceptPrincipalPatterns = new HashSet<>(); private Set<String> rejectPrincipalPatterns = new HashSet<>(); private Set<String> alwaysAddRoles = new HashSet<>(); private Set<PatternRoleMapEntry> principalAddRoles = new HashSet<>(); /** * {@inheritDoc} * * @see eu.agno3.orchestrator.config.model.realm.AbstractConfigurationObject#getType() */ @Override @Transient public @NonNull Class<KerberosAuthenticatorConfig> getType () { return KerberosAuthenticatorConfig.class; } /** * {@inheritDoc} * * @see eu.agno3.orchestrator.config.auth.krb5.KerberosAuthenticatorConfig#getKerberosRealm() */ @Override public String getKerberosRealm () { return this.kerberosRealm; } /** * {@inheritDoc} * * @see eu.agno3.orchestrator.config.auth.krb5.KerberosAuthenticatorConfigMutable#setKerberosRealm(java.lang.String) */ @Override public void setKerberosRealm ( String krbRealm ) { this.kerberosRealm = krbRealm; } /** * @return the keytabAlias */ @Override public String getKeytabAlias () { return this.keytabAlias; } /** * @param keytabAlias * the keytabAlias to set */ @Override public void setKeytabAlias ( String keytabAlias ) { this.keytabAlias = keytabAlias; } /** * @return the serviceName */ @Override public String getServiceName () { return this.serviceName; } /** * @param serviceName * the serviceName to set */ @Override public void setServiceName ( String serviceName ) { this.serviceName = serviceName; } /** * @return the allowPasswordFallback */ @Override public Boolean getAllowPasswordFallback () { return this.allowPasswordFallback; } /** * @param allowPasswordFallback * the allowPasswordFallback to set */ @Override public void setAllowPasswordFallback ( Boolean allowPasswordFallback ) { this.allowPasswordFallback = allowPasswordFallback; } /** * @return the acceptPrincipalPatterns */ @Override @ElementCollection @CollectionTable ( name = "config_auth_krb5_accept" ) public Set<String> getAcceptPrincipalPatterns () { return this.acceptPrincipalPatterns; } /** * @param acceptPrincipalPatterns * the acceptPrincipalPatterns to set */ @Override public void setAcceptPrincipalPatterns ( Set<String> acceptPrincipalPatterns ) { this.acceptPrincipalPatterns = acceptPrincipalPatterns; } /** * @return the rejectPrincipalPatterns */ @Override @ElementCollection @CollectionTable ( name = "config_auth_krb5_reject" ) public Set<String> getRejectPrincipalPatterns () { return this.rejectPrincipalPatterns; } /** * @param rejectPrincipalPatterns * the rejectPrincipalPatterns to set */ @Override public void setRejectPrincipalPatterns ( Set<String> rejectPrincipalPatterns ) { this.rejectPrincipalPatterns = rejectPrincipalPatterns; } /** * @return the alwaysAddRoles */ @Override @ElementCollection @CollectionTable ( name = "config_auth_krb5_roles" ) public Set<String> getAlwaysAddRoles () { return this.alwaysAddRoles; } /** * @param alwaysAddRoles * the alwaysAddRoles to set */ @Override public void setAlwaysAddRoles ( Set<String> alwaysAddRoles ) { this.alwaysAddRoles = alwaysAddRoles; } /** * @return the principalAddRoles */ @Override @ManyToMany ( fetch = FetchType.LAZY, targetEntity = PatternRoleMapEntryImpl.class ) public Set<PatternRoleMapEntry> getPrincipalAddRoles () { return this.principalAddRoles; } /** * @param principalAddRoles * the principalAddRoles to set */ @Override public void setPrincipalAddRoles ( Set<PatternRoleMapEntry> principalAddRoles ) { this.principalAddRoles = principalAddRoles; } /** * {@inheritDoc} * * @see eu.agno3.orchestrator.config.auth.AbstractAuthenticatorConfigImpl#doClone(eu.agno3.orchestrator.config.auth.AuthenticatorConfig) */ @Override public void doClone ( AuthenticatorConfig obj ) { if ( ! ( obj instanceof KerberosAuthenticatorConfig ) ) { throw new IllegalArgumentException(); } KerberosAuthenticatorConfig kc = (KerberosAuthenticatorConfig) obj; super.doClone(obj); this.kerberosRealm = kc.getKerberosRealm(); this.keytabAlias = kc.getKeytabAlias(); this.serviceName = kc.getServiceName(); this.allowPasswordFallback = kc.getAllowPasswordFallback(); this.acceptPrincipalPatterns = new HashSet<>(kc.getAcceptPrincipalPatterns()); this.rejectPrincipalPatterns = new HashSet<>(kc.getRejectPrincipalPatterns()); this.alwaysAddRoles = new HashSet<>(kc.getAlwaysAddRoles()); this.principalAddRoles = PatternRoleMapEntryImpl.clone(kc.getPrincipalAddRoles()); } }
[ "bechler@agno3.eu" ]
bechler@agno3.eu
f555b02663d234922e73f873638a7d9de5a4fab7
dc0afaa5b63e1bf4ee195fa1bf56629a32d8d57a
/java/my-rxjava/src/test/java/me/test/rxjava/flowable/Maybe01.java
e02af44e0b6f5873ec13d3f456c0173865ddacf1
[]
no_license
btpka3/btpka3.github.com
370e6954af485bd6aee35fa5944007aab131e416
e5435d201641a2f21c632a28eae5ef408d2e799c
refs/heads/master
2023-08-23T18:37:31.643843
2023-08-16T11:48:38
2023-08-16T11:48:38
8,571,000
19
19
null
2021-04-12T10:01:13
2013-03-05T03:08:08
Java
UTF-8
Java
false
false
450
java
package me.test.rxjava.flowable; import io.reactivex.Maybe; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author dangqian.zll * @date 2019-05-24 */ public class Maybe01 { Logger logger = LoggerFactory.getLogger(Maybe01.class); @Test public void test01() { Object result = Maybe.empty() .blockingGet(); logger.info("result = " + result); } }
[ "btpka3@163.com" ]
btpka3@163.com
1f5cad0fd8153d1a23da919bafa303d9aee99e62
5d6c374a2518d469d674a1327d21d8e0cf2b54f7
/thirdparty/javax.media.jai.osgi/src/main/java/com/sun/media/jai/iterator/RectIterCSMFloat.java
151963fcfefb2f6a509b049c32e2e6d67027f78e
[]
no_license
HGitMaster/geotools-osgi
648ebd9343db99a1e2688d9aefad857f6521898d
09f6e327fb797c7e0451e3629794a3db2c55c32b
refs/heads/osgi
2021-01-19T08:33:56.014532
2014-03-19T18:04:03
2014-03-19T18:04:03
4,750,321
3
0
null
2014-03-19T13:50:54
2012-06-22T11:21:01
Java
UTF-8
Java
false
false
2,634
java
/* * $RCSfile: RectIterCSMFloat.java,v $ * * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * * Use is subject to license terms. * * $Revision: 1.1 $ * $Date: 2005/02/11 04:55:43 $ * $State: Exp $ */ package com.sun.media.jai.iterator; import java.awt.Rectangle; import java.awt.image.RenderedImage; import com.sun.media.jai.util.DataBufferUtils; /** */ public class RectIterCSMFloat extends RectIterCSM { float[][] bankData; float[] bank; public RectIterCSMFloat(RenderedImage im, Rectangle bounds) { super(im, bounds); this.bankData = new float[numBands + 1][]; dataBufferChanged(); } protected final void dataBufferChanged() { if (bankData == null) { return; } float[][] bd = DataBufferUtils.getBankDataFloat(dataBuffer); for (int i = 0; i < numBands; i++) { bankData[i] = bd[bankIndices[i]]; } bank = bankData[b]; adjustBandOffsets(); } public void startBands() { super.startBands(); bank = bankData[0]; } public void nextBand() { super.nextBand(); bank = bankData[b]; } public final int getSample() { return (int)bank[offset + bandOffset]; } public final int getSample(int b) { return (int)bankData[b][offset + bandOffsets[b]]; } public final float getSampleFloat() { return bank[offset + bandOffset]; } public final float getSampleFloat(int b) { return bankData[b][offset + bandOffsets[b]]; } public final double getSampleDouble() { return (double)bank[offset + bandOffset]; } public final double getSampleDouble(int b) { return (double)bankData[b][offset + bandOffsets[b]]; } public int[] getPixel(int[] iArray) { if (iArray == null) { iArray = new int[numBands]; } for (int b = 0; b < numBands; b++) { iArray[b] = (int)bankData[b][offset + bandOffsets[b]]; } return iArray; } public float[] getPixel(float[] fArray) { if (fArray == null) { fArray = new float[numBands]; } for (int b = 0; b < numBands; b++) { fArray[b] = bankData[b][offset + bandOffsets[b]]; } return fArray; } public double[] getPixel(double[] dArray) { if (dArray == null) { dArray = new double[numBands]; } for (int b = 0; b < numBands; b++) { dArray[b] = (double)bankData[b][offset + bandOffsets[b]]; } return dArray; } }
[ "devnull@localhost" ]
devnull@localhost
21c6e33f21798f94407470f575a53ae9836d618d
df48debeec544fc9e750587f68311ce06ea968c5
/NewMixin/hmspush/src/main/java/com/huawei/android/hms/agent/push/handler/GetTokenHandler.java
ea2d9ed36e08c37c046f8cfc077e8ee34a1a1b0d
[ "Apache-2.0" ]
permissive
tshi71080/NewMixin-invitations
5d0994705ec191fc33afdc5f50fbb287e030c64c
ec1438a2ae04f08ab91b668ece99fb5fb8fd5d1a
refs/heads/master
2020-05-09T16:26:41.653574
2019-03-31T09:54:01
2019-03-31T09:54:01
181,268,401
1
0
null
null
null
null
UTF-8
Java
false
false
214
java
package com.huawei.android.hms.agent.push.handler; import com.huawei.android.hms.agent.common.ICallbackCode; /** * 获取 pushtoken 回调 */ public interface GetTokenHandler extends ICallbackCode { }
[ "jettang@jetdeMacBook-Pro.local" ]
jettang@jetdeMacBook-Pro.local
6e11c55fdc62c7357a1bc702afd537fb137c1de8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_d4dc996326347842a02434c96b6ca48d8ef05e75/PermissionsProvider/23_d4dc996326347842a02434c96b6ca48d8ef05e75_PermissionsProvider_s.java
e367a80666b025a106d537b1db4df5f919dcceeb
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,270
java
package de.deepamehta.plugins.accesscontrol.provider; import de.deepamehta.core.util.JavaUtils; import de.deepamehta.plugins.accesscontrol.model.Permissions; import org.codehaus.jettison.json.JSONObject; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.logging.Logger; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.MessageBodyReader; import javax.ws.rs.ext.Provider; @Provider public class PermissionsProvider implements MessageBodyReader<Permissions> { // ---------------------------------------------------------------------------------------------- Instance Variables private Logger logger = Logger.getLogger(getClass().getName()); // -------------------------------------------------------------------------------------------------- Public Methods // **************************************** // *** MessageBodyReader Implementation *** // **************************************** @Override public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { // logger.info("### mediaType=" + mediaType); // Note: unlike equals() isCompatible() ignores parameters like "charset" in "application/json;charset=UTF-8" return type == Permissions.class && mediaType.isCompatible(MediaType.APPLICATION_JSON_TYPE); } @Override public Permissions readFrom(Class<Permissions> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException { try { // logger.info("Reading Permissions object from request stream"); String json = JavaUtils.readText(entityStream); return new Permissions(new JSONObject(json)); } catch (Exception e) { throw new IOException("Error while reading a Permissions object from request stream", e); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
adc8cb616bc22ca5ea646ae007adcced2bc18847
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
/src/main/java/com/google/firebase/messaging/SendException.java
ca6421ced9cc49969e354a0985e8f66693954bef
[]
no_license
TL148/gorkiy
b6ac8772587e9e643d939ea399bf5e7a42e89f46
da8fbd017277cf72020c8c800326954bb1a0cee3
refs/heads/master
2021-05-21T08:24:39.286900
2020-04-03T02:57:49
2020-04-03T02:57:49
252,618,229
0
0
null
2020-04-03T02:54:39
2020-04-03T02:54:39
null
UTF-8
Java
false
false
2,105
java
package com.google.firebase.messaging; import java.util.Locale; /* compiled from: com.google.firebase:firebase-messaging@@20.1.2 */ public final class SendException extends Exception { public static final int ERROR_INVALID_PARAMETERS = 1; public static final int ERROR_SIZE = 2; public static final int ERROR_TOO_MANY_MESSAGES = 4; public static final int ERROR_TTL_EXCEEDED = 3; public static final int ERROR_UNKNOWN = 0; private final int zza; SendException(String str) { super(str); int i = 0; if (str != null) { String lowerCase = str.toLowerCase(Locale.US); char c = 65535; switch (lowerCase.hashCode()) { case -1743242157: if (lowerCase.equals("service_not_available")) { c = 3; break; } break; case -1290953729: if (lowerCase.equals("toomanymessages")) { c = 4; break; } break; case -920906446: if (lowerCase.equals("invalid_parameters")) { c = 0; break; } break; case -617027085: if (lowerCase.equals("messagetoobig")) { c = 2; break; } break; case -95047692: if (lowerCase.equals("missing_to")) { c = 1; break; } break; } if (c == 0 || c == 1) { i = 1; } else if (c == 2) { i = 2; } else if (c == 3) { i = 3; } else if (c == 4) { i = 4; } } this.zza = i; } public final int getErrorCode() { return this.zza; } }
[ "itaysontesterlab@gmail.com" ]
itaysontesterlab@gmail.com
db6e38d602505199e039ebbb32b4826391bd5aa5
2a0b5df31c675070761dca0d3d719733fc2ea187
/java/oreilly/graph-databases-use-cases/queries/src/main/java/org/neo4j/graphdatabases/queries/LogisticsQueries.java
1e3f39dfb0214c54b322140ecf21f8b48d5a1914
[]
no_license
oussamad-blip/bookcode-compile-lang
55ff480d50f6101fd727bbfedb60587cb9930b60
87a959cf821624765df34eff506faf28ae429b4c
refs/heads/master
2023-05-05T00:05:49.387277
2019-02-17T10:08:17
2019-02-17T10:08:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,333
java
package org.neo4j.graphdatabases.queries; import java.util.HashMap; import java.util.Map; import org.joda.time.Interval; import org.neo4j.cypher.javacompat.ExecutionResult; import org.neo4j.graphdatabases.queries.helpers.ExecutionEngineWrapper; import org.neo4j.graphdatabases.queries.traversals.ParcelRouteCalculator; import org.neo4j.graphdatabases.queries.traversals.SimpleParcelRouteCalculator; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; public class LogisticsQueries { private final ExecutionEngineWrapper executionEngineWrapper; private final ParcelRouteCalculator parcelRouteCalculator; private final SimpleParcelRouteCalculator simpleParcelRouteCalculator; public LogisticsQueries( GraphDatabaseService db, ExecutionEngineWrapper executionEngineWrapper ) { this.executionEngineWrapper = executionEngineWrapper; this.parcelRouteCalculator = new ParcelRouteCalculator( db ); this.simpleParcelRouteCalculator = new SimpleParcelRouteCalculator( db ); } public Iterable<Node> findShortestPathWithParcelRouteCalculator( String start, String end, Interval interval ) { return parcelRouteCalculator.calculateRoute( start, end, interval ); } public Iterable<Node> findShortestPathWithSimpleParcelRouteCalculator( String start, String end, Interval interval ) { return simpleParcelRouteCalculator.calculateRoute( start, end, interval ); } public ExecutionResult findShortestPathWithCypherReduce( String start, String end, Interval interval ) { String query = "MATCH (s:Location {name:{startLocation}}),\n" + " (e:Location {name:{endLocation}})\n" + "MATCH upLeg = (s)<-[:DELIVERY_ROUTE*1..2]-(db1)\n" + "WHERE all(r in relationships(upLeg)\n" + " WHERE r.start_date <= {intervalStart}\n" + " AND r.end_date >= {intervalEnd})\n" + "WITH e, upLeg, db1\n" + "MATCH downLeg = (db2)-[:DELIVERY_ROUTE*1..2]->(e)\n" + "WHERE all(r in relationships(downLeg)\n" + " WHERE r.start_date <= {intervalStart}\n" + " AND r.end_date >= {intervalEnd})\n" + "WITH db1, db2, upLeg, downLeg\n" + "MATCH topRoute = (db1)<-[:CONNECTED_TO]-()-[:CONNECTED_TO*1..3]-(db2)\n" + "WHERE all(r in relationships(topRoute)\n" + " WHERE r.start_date <= {intervalStart}\n" + " AND r.end_date >= {intervalEnd})\n" + "WITH upLeg, downLeg, topRoute,\n" + " reduce(weight=0, r in relationships(topRoute) | weight+r.cost) AS score\n" + " ORDER BY score ASC\n" + " LIMIT 1\n" + "RETURN (nodes(upLeg) + tail(nodes(topRoute)) + tail(nodes(downLeg))) AS n"; Map<String, Object> params = new HashMap<String, Object>(); params.put( "startLocation", start ); params.put( "endLocation", end ); params.put( "intervalStart", interval.getStartMillis() ); params.put( "intervalEnd", interval.getEndMillis() ); return executionEngineWrapper.execute( query, params ); } }
[ "jimagile@gmail.com" ]
jimagile@gmail.com
a650fbf405914e193d64fe282dda393d02b3fa75
f28dce60491e33aefb5c2187871c1df784ccdb3a
/src/main/java/okio/Timeout$1.java
103c25db523ca51fa50473d9db0aa9f2b8b19203
[ "Apache-2.0" ]
permissive
JackChan1999/boohee_v5.6
861a5cad79f2bfbd96d528d6a2aff84a39127c83
221f7ea237f491e2153039a42941a515493ba52c
refs/heads/master
2021-06-11T23:32:55.977231
2017-02-14T18:07:04
2017-02-14T18:07:04
81,962,585
8
6
null
null
null
null
UTF-8
Java
false
false
378
java
package okio; import java.io.IOException; import java.util.concurrent.TimeUnit; class Timeout$1 extends Timeout { Timeout$1() { } public Timeout timeout(long timeout, TimeUnit unit) { return this; } public Timeout deadlineNanoTime(long deadlineNanoTime) { return this; } public void throwIfReached() throws IOException { } }
[ "jackychan2040@gmail.com" ]
jackychan2040@gmail.com
df2fb79f5159d0b9b4959fa6240b430544bafdc3
7a21ff93edba001bef328a1e927699104bc046e5
/project-pipe-parent/module-parent/core-module-parent/pipe-core/src/main/java/com/dotop/pipe/core/vo/device/DevicePropertyFieldVo.java
c9db5bb180a2ab9461d0a8d66e0a28e64a92a304
[]
no_license
150719873/zhdt
6ea1ca94b83e6db2012080f53060d4abaeaf12f5
c755dacdd76b71fd14aba5e475a5862a8d92c1f6
refs/heads/master
2022-12-16T06:59:28.373153
2020-09-14T06:57:16
2020-09-14T06:57:16
299,157,259
1
0
null
2020-09-28T01:45:10
2020-09-28T01:45:10
null
UTF-8
Java
false
false
445
java
package com.dotop.pipe.core.vo.device; import lombok.Data; /** * 设备上传数据属性类 * * * */ @Data public class DevicePropertyFieldVo { private String name; private String field; private String tag; private String unit; DevicePropertyFieldVo() { } public DevicePropertyFieldVo(String name, String field, String tag, String unit) { this.name = name; this.field = field; this.tag = tag; this.unit = unit; } }
[ "2216502193@qq.com" ]
2216502193@qq.com
18b45816d8e9799dff2c6c74f34ab216a78cf988
e62e0ddb1a593eb082f62b159c96449e5845e6c4
/entities/src/main/java/com/ofss/fcubs/service/fcubsaccservice/MudrabahSweepLiquidateIOType.java
523f8dd7ebf8e29f93230b6e99446a5be650b1e1
[]
no_license
pwcfstech/CustomerOnboarding_WhiteLabel_Backend
68adb8b4640b0b468bd02e8fb8a6fa699c78dfa8
2265801768d4f68e3e92a3ceb624aa179e6f60f6
refs/heads/master
2021-08-11T07:41:18.970465
2017-11-13T09:52:19
2017-11-13T09:52:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,196
java
package com.ofss.fcubs.service.fcubsaccservice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for MudrabahSweep-Liquidate-IO-Type complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MudrabahSweep-Liquidate-IO-Type"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="BRANCH_CODE" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="CUST_AC_NO" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MudrabahSweep-Liquidate-IO-Type", propOrder = { "branchcode", "custacno" }) public class MudrabahSweepLiquidateIOType { @XmlElement(name = "BRANCH_CODE") protected String branchcode; @XmlElement(name = "CUST_AC_NO") protected String custacno; /** * Gets the value of the branchcode property. * * @return * possible object is * {@link String } * */ public String getBRANCHCODE() { return branchcode; } /** * Sets the value of the branchcode property. * * @param value * allowed object is * {@link String } * */ public void setBRANCHCODE(String value) { this.branchcode = value; } /** * Gets the value of the custacno property. * * @return * possible object is * {@link String } * */ public String getCUSTACNO() { return custacno; } /** * Sets the value of the custacno property. * * @param value * allowed object is * {@link String } * */ public void setCUSTACNO(String value) { this.custacno = value; } }
[ "kousik70@gmail.com" ]
kousik70@gmail.com
705cd3325c65ba724b24329e55fa1fdd967e8778
ad16b02210b41d5c5c49108d4ee3860d745328b8
/sample/src/main/java/la/xiong/androidquick/demo/module/image/glide/GlideFragment.java
bd8bed4cab741c075be34c9e2528e925e8b01061
[ "Apache-2.0", "MIT" ]
permissive
evilmose/AndroidQuick
69a68a66f1d6463d8f0aee104b4254f75c287c9d
537fdf97ce917aa1f4a2a7641e26db78322e72b0
refs/heads/master
2020-05-04T21:16:20.546216
2019-04-02T02:05:36
2019-04-02T02:05:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,077
java
package la.xiong.androidquick.demo.module.image.glide; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import butterknife.BindView; import butterknife.OnClick; import la.xiong.androidquick.demo.R; import la.xiong.androidquick.demo.base.BaseTFragment; /** * @author ddnosh * @website http://blog.csdn.net/ddnosh */ public class GlideFragment extends BaseTFragment { public static final String TAG = "GreenDaoFragment"; @BindView(R.id.btn_glide1) Button btn1; @BindView(R.id.iv_glide1) ImageView imageView1; @Override protected void initViewsAndEvents(Bundle savedInstanceState) { } @Override protected int getContentViewLayoutID() { return R.layout.fragment_image_glide; } @OnClick({R.id.btn_glide1}) public void onClick(View view) { switch (view.getId()) { case R.id.btn_glide1: GlideUtils.loadImageView("https://www.baidu.com/img/bd_logo1.png", imageView1); break; } } }
[ "cage.hung@gmail.com" ]
cage.hung@gmail.com
ca21783a3fb8307262b8959171efdf3eb1ce919b
c46945eecb3735f78efe2369332d3c69fde86d43
/app/src/main/java/zhou/com/vpn/utils/StartService.java
dbf9856c4dd2aad3c035c5d6e87af6373aea7875
[]
no_license
zhengjinzhou/Vpn
ea0350f45686a8a89199b12c3553007adb7bacfb
deba31197532b1699d17ef204d7205ff6e42d990
refs/heads/master
2020-04-19T09:57:37.858051
2019-01-29T09:18:42
2019-01-29T09:18:42
152,057,741
1
0
null
null
null
null
UTF-8
Java
false
false
3,519
java
package zhou.com.vpn.utils; import android.app.Service; import android.content.ComponentName; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.IBinder; import android.util.Log; import java.util.List; /** * Created by zhou * on 2018/7/26. */ public class StartService extends Service implements Runnable { private Thread thread; public StartService() { } @Override public IBinder onBind(Intent intent) { // TODO: Return the communication channel to the service. throw new UnsupportedOperationException("Not yet implemented"); } //创建服务时候调用,第一次创建 @Override public void onCreate() { super.onCreate(); Log.d("MyServer", "onCreate: 创建服务"); //onCreate的时候创建初始化 thread = new Thread( this); thread.start(); } //每次服务启动调用,每次启动 @Override public int onStartCommand(Intent intent, int flags, int startId) { Log.d("MyServer", "onCreate: 启动服务"); //如果服务并停止了,重新生成一个新的 if(thread.isInterrupted()){ thread = new Thread(this); thread.start(); } return Service.START_STICKY; // return super.onStartCommand(intent, flags, startId); } @Override public void run() { int i=0; while (true){ try { //每10秒钟进行一次输出 Thread.sleep(10000); //Toast.makeText(getApplicationContext(),"服务启动"+i++,Toast.LENGTH_LONG).show(); Log.d("MyServer", "服务启动"+i++); //openApp("zhou.com.myapplication"); BadgeNumUtil.setBadgeNum(getApplicationContext(),i); } catch (InterruptedException e) { e.printStackTrace(); } } } // private void openApp(View v, String packageName) { private void openApp(String packageName) { //Context context = v.getContext(); PackageInfo pi = null; //PackageManager pm = context.getPackageManager(); PackageManager pm = getPackageManager(); try { pi = pm.getPackageInfo(packageName, 0); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null); resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER); resolveIntent.setPackage(pi.packageName); List<ResolveInfo> apps = pm.queryIntentActivities(resolveIntent, 0); ResolveInfo ri = apps.iterator().next(); if (ri != null ) { packageName = ri.activityInfo.packageName; String className = ri.activityInfo.name; Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); ComponentName cn = new ComponentName(packageName, className); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setComponent(cn); startActivity(intent); } } //服务销毁的时候 @Override public void onDestroy() { super.onDestroy(); Log.d("MyServer", "onCreate: 销毁服务"); Intent intent = new Intent("com.zhou.service.destroy"); sendBroadcast(intent); } }
[ "1457594845@qq.com" ]
1457594845@qq.com
230e42c935e07b7749d06710715766a4ea63d550
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new22069.java
763fd53731bb57c300dacb34ecff5e3d54757573
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
511
java
// clone pairs:9851:90% // 13428:beam/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateUnique.java public class Nicad_t1_beam_new22069 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } LargestUnique that = (LargestUnique) o; return sampleSize == that.sampleSize && Iterables.elementsEqual(heap, that.heap); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
6d89b7507850589b6bd85d2695a381197a118fcf
06418ffe256664e0633de3cb1088260b7db8a1b7
/Source_GameKimcuong_NoServer_temp/collection/CandyBlast/src/com/mobilepuzzle/candyblast/actor/Actor.java
d6471c5c82cb096046dba695793e6599d4f00547
[]
no_license
hoangwin/pi-cac-chu-old-version
7472b04cedbfad2465a969e5efa6ff2d4b26100a
0857a97225f99e5d62cda54f75b3dcf13ea1938c
refs/heads/master
2016-09-05T19:09:34.300481
2015-05-27T04:19:39
2015-05-27T04:19:39
33,906,095
0
0
null
null
null
null
UTF-8
Java
false
false
3,294
java
package com.mobilepuzzle.candyblast.actor; import java.util.Random; import com.mobilepuzzle.candyblast.CandyPop; import com.mobilepuzzle.candyblast.GameLayer; import com.mobilepuzzle.candyblast.GameLib; import com.mobilepuzzle.candyblast.Sprite; import android.graphics.Color; public class Actor { //type of Actor public static Random random = new Random(); public int m_x = 100; public int m_y = 100; public int m_Width = 12; public int m_Height = 12; public int m_Speed = 6; public static final int DIRECTION_UP = 0; public static final int DIRECTION_RIGHT = 1; public static final int DIRECTION_DOWN = 2; public static final int DIRECTION_LEFT = 3; // state public int mstate = 0; public int mdirection; public int m_Target_x = -1; public int m_Target_y = -1; public int m_Target_Pos_Rows = -1; public int m_Target_Pos_Cols = -1; public int m_pos_rows = -1; public int m_pos_cols = -1; public static Sprite sprite; // int currentFrame; // int currentAnimation; public int angle = 0; public int state = -1; public int _currentFrame = -1; public int _waitDelay = -1; public int _currentAnimation = -1; public int _xpos = -1; public int _ypos = -1; public boolean _canLoop = false; public boolean _ShowLastFrame = true; public Actor() { } public Actor(int x, int y, int w, int h, String Name, String Type) { // sprite = new Sprite(pathSprite, true); m_x = x; m_y = y; m_Width = w; m_Height = h; } public void setPostion(int x, int y) { m_x = x; m_y = y; } public void drawRect(int x, int y, int w, int h) { GameLib.mainPaint.setColor(Color.RED); GameLib.mainCanvas.drawRect(x, y, x + w, y + h, GameLib.mainPaint); } public void render() { GameLib.mainCanvas.drawRect((m_x + GameLayer.screenOffsetX), (m_y + GameLayer.screenOffsetY), (m_x + GameLayer.screenOffsetX) + m_Width, (m_y + GameLayer.screenOffsetY) + m_Height, GameLib.mainPaint); CandyPop.mainCanvas.drawText( "Object", (m_x + GameLayer.screenOffsetX), (m_y + GameLayer.screenOffsetY),CandyPop.android_FontSmall); //TapTapZooCrush.fontsmall_White.drawString(GameLib.mainCanvas, "Object", (m_x + GameLayer.screenOffsetX), (m_y + GameLayer.screenOffsetY), 0); //sprite.drawAnim(GameLib.mainCanvas, m_x, m_y); } //ACTOR TYPE public static final int ACTOR_TYPE_MAINMC = 0; public static final int ACTOR_TYPE_DOOR = 1; public static Actor createActor(int x, int y, int w, int h, String Name, String type) { int typeInt = getActorTypeFromString(type); switch (typeInt) { case ACTOR_TYPE_MAINMC: return null; //case ACTOR_TYPE_DOOR: // return new Door(x, y, w, h, Name, type); default: break; } return null; } public static int getActorTypeFromString(String type) { if (type.equals("mainmc")) { return ACTOR_TYPE_MAINMC; } else if (type.equals("door")) { return ACTOR_TYPE_DOOR; } return -1; } public static boolean checkCollision(Actor actor1, Actor actor2) { //true when it have collition return !(actor1.m_x > actor2.m_x + actor2.m_Width || actor1.m_x + actor1.m_Width < actor2.m_x || actor1.m_y > actor2.m_y + actor2.m_Height || actor1.m_y + actor1.m_Height < actor2.m_y); } public void update() { //it will overide in child class // TODO Auto-generated method stub } }
[ "hoang.nguyenmau@hotmail.com" ]
hoang.nguyenmau@hotmail.com
aa3acd37ef16d10e7db74101e21bb2a42a26fd93
3e059d2542c0593127c23f88d79a9570cc3538c8
/manage/src/main/java/com/kinth/frame/manage/web/model/UserAuthorizeModel.java
8650d1458b55a74935f3f2b404344c62ab222da3
[]
no_license
jadewoo8888/kinth-frame-manage
294d8c33cf354b54746a58356c3c625f4aa0ce32
0a56f12f20f7972212eedcdda04e2c0f5dcffb3f
refs/heads/master
2021-01-10T10:31:22.559619
2016-01-18T08:47:15
2016-01-18T08:47:15
48,489,487
0
0
null
null
null
null
UTF-8
Java
false
false
874
java
package com.kinth.frame.manage.web.model; import java.util.List; import com.kinth.frame.manage.domain.Role; public class UserAuthorizeModel { private String id; private String loginName; private String realName; private String[] roleIds; private String orgId; public String getLoginName() { return loginName; } public void setLoginName(String loginName) { this.loginName = loginName; } public String getRealName() { return realName; } public void setRealName(String realName) { this.realName = realName; } public String[] getRoleIds() { return roleIds; } public void setRoleIds(String[] roleIds) { this.roleIds = roleIds; } public String getOrgId() { return orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } public String getId() { return id; } public void setId(String id) { this.id = id; } }
[ "313388925@qq.com" ]
313388925@qq.com
aaf3035ca374af0e4268302aed7f842295e620bb
c2c8a8066a567b273e7cc7a47de59663d0f0ed43
/hub-detect/src/main/groovy/com/blackducksoftware/integration/hub/detect/detector/maven/MavenExecutableFinder.java
a8439ffb70249143f9c971c22145dae6be17f8e0
[ "Apache-2.0" ]
permissive
bryonglodencissp/hub-detect
ba586f5f976a5ff2cb10587e4b1a4e3f481a6992
8aacf2b737ca549996ccdc9e647a278917239569
refs/heads/master
2020-04-07T03:51:44.113593
2018-11-17T22:49:40
2018-11-17T22:49:40
158,031,402
1
0
null
null
null
null
UTF-8
Java
false
false
2,902
java
/** * hub-detect * * Copyright (C) 2018 Black Duck Software, Inc. * http://www.blackducksoftware.com/ * * 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.blackducksoftware.integration.hub.detect.detector.maven; import org.apache.commons.lang3.StringUtils; import com.blackducksoftware.integration.hub.detect.configuration.DetectConfiguration; import com.blackducksoftware.integration.hub.detect.configuration.DetectProperty; import com.blackducksoftware.integration.hub.detect.configuration.PropertyAuthority; import com.blackducksoftware.integration.hub.detect.detector.DetectorEnvironment; import com.blackducksoftware.integration.hub.detect.type.ExecutableType; import com.blackducksoftware.integration.hub.detect.util.executable.ExecutableFinder; public class MavenExecutableFinder { private final ExecutableFinder executableFinder; private final DetectConfiguration detectConfiguration; private String systemMaven = null; private boolean hasLookedForSystemMaven = false; public MavenExecutableFinder(final ExecutableFinder executableFinder, final DetectConfiguration detectConfiguration) { this.executableFinder = executableFinder; this.detectConfiguration = detectConfiguration; } public String findMaven(final DetectorEnvironment environment) { String resolvedMaven = null; final String providedMavenPath = detectConfiguration.getProperty(DetectProperty.DETECT_MAVEN_PATH, PropertyAuthority.None); final String mavenPath = executableFinder.getExecutablePathOrOverride(ExecutableType.MVNW, false, environment.getDirectory(), providedMavenPath); if (StringUtils.isNotBlank(mavenPath)) { resolvedMaven = mavenPath; } else { if (!hasLookedForSystemMaven) { systemMaven = executableFinder.getExecutablePathOrOverride(ExecutableType.MVN, true, environment.getDirectory(), providedMavenPath); hasLookedForSystemMaven = true; } resolvedMaven = systemMaven; } return resolvedMaven; } }
[ "jordanp@synopsys.com" ]
jordanp@synopsys.com
48f832b69f678f6445d08fd7465b5c4130de21e9
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/MOCKITO-21b-1-18-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/org/mockito/internal/creation/instance/ConstructorInstantiator_ESTest.java
21230e3339c7a60021776db9e44bc4dee1ed7a41
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
/* * This file was automatically generated by EvoSuite * Tue May 19 08:24:03 UTC 2020 */ package org.mockito.internal.creation.instance; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.internal.creation.instance.ConstructorInstantiator; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ConstructorInstantiator_ESTest extends ConstructorInstantiator_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Object object0 = new Object(); ConstructorInstantiator constructorInstantiator0 = new ConstructorInstantiator(object0); Class<Object> class0 = Object.class; // Undeclared exception! constructorInstantiator0.newInstance((Class<?>) class0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
870e5fada5a6ef153a4811f8dd92a5437e44e4d9
1225e10afed26287f2e55f826a87cea348e401af
/src/test/java/com/apostit/client/UnderwearTest.java
801a47fb340844d59871ec062e8202cb20b95a2c
[]
no_license
stden/ruletka_maven
67ca5de4c1d4cf0f18d692ed0a2c6f678d1f0a93
8b35097e572d3eee0ddaa325c930258876e14250
refs/heads/master
2021-01-02T22:16:15.409005
2016-12-09T13:34:46
2016-12-09T13:34:46
10,689,556
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
package com.apostit.client; import org.junit.Test; /** * Нижнее бельё */ public class UnderwearTest { @Test public void test() { //Assert.assertEquals(Underwear.); } }
[ "super.denis@gmail.com" ]
super.denis@gmail.com
0fbb5d4d5a824aa043109fc7891a48b9c4a08a56
3712788ce9db5f87338cf6321cae08de0f85bd38
/lib/src/main/java/com/sd/lib/imggetter/ImageGetter.java
cdd26cc5faa0f661eaba3beb01891607702c254b
[ "MIT" ]
permissive
zj565061763/image-getter
e85b5d821bf4f53bb6f4efc445e8fe17c19829f9
81330b3108d84b0d4b11b7818d0ad066e951ef04
refs/heads/master
2021-06-14T03:22:12.681989
2021-05-24T14:50:53
2021-05-24T14:50:53
196,846,878
0
1
null
null
null
null
UTF-8
Java
false
false
879
java
package com.sd.lib.imggetter; public interface ImageGetter<T extends ImageGetter> { /** * 设置成功回调 * * @param callback * @return */ T onSuccess(SuccessCallback callback); /** * 设置失败回调 * * @param callback * @return */ T onError(ErrorCallback callback); /** * 设置取消回调 * * @param callback * @return */ T onCancel(CancelCallback callback); /** * 开始 */ void start(); interface SuccessCallback { void onSuccess(String file); } interface ErrorCallback { void onError(Error error, String desc); } interface CancelCallback { void onCancel(); } enum Error { Start, CreateCameraFile, ResultEmpty, Result, Other, } }
[ "565061763@qq.com" ]
565061763@qq.com
95a012407e82b4b15c01d01ca563ea6b55da259b
52102f111fe16da0ca4e60878f611399d5d7df70
/code/app/src/main/java/cn/hwh/sports/adapter/WorkoutIndoorPagerAdapter.java
01cf2d60a5e0b6d5e88fa9ddb5a3bbaaf84aff97
[]
no_license
RaulFan2019/FizzoSport
dbbc0c4819cbe74bb37ad6caef45ee836f0e7f5c
692eab6a3a9025c6045cf1a5ea6f230718c81c9a
refs/heads/master
2022-11-16T20:39:02.723417
2020-07-09T02:32:02
2020-07-09T02:32:02
183,580,051
1
1
null
null
null
null
UTF-8
Java
false
false
3,347
java
package cn.hwh.sports.adapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import java.lang.reflect.Field; import java.util.ArrayList; import cn.hwh.sports.fragment.workout.WorkoutIndoorChartFragment; import cn.hwh.sports.fragment.workout.WorkoutIndoorHrFragment; import cn.hwh.sports.fragment.workout.WorkoutRunningOutdoorChartFragment; import cn.hwh.sports.fragment.workout.WorkoutRunningOutdoorHrFragment; import cn.hwh.sports.fragment.workout.WorkoutRunningOutdoorMapFragment; import cn.hwh.sports.fragment.workout.WorkoutRunningOutdoorPaceFragment; import cn.hwh.sports.fragment.workout.WorkoutRunningOutdoorSummaryFragment; /** * Created by machenike on 2017/6/5 0005. */ public class WorkoutIndoorPagerAdapter extends FragmentStatePagerAdapter { public enum Tab { HEARTRATE("效果"), CHART("趋势"); private final String name; private Tab(String s) { name = s; } public boolean equalsName(String otherName) { return (otherName != null) && name.equals(otherName); } public String toString() { return name; } } Fragment[] mFragments; Tab[] mTabs; private static final Field sActiveField; static { Field f = null; try { Class<?> c = Class.forName("android.support.v4.app.FragmentManagerImpl"); f = c.getDeclaredField("mActive"); f.setAccessible(true); } catch (Exception e) { } sActiveField = f; } public WorkoutIndoorPagerAdapter(FragmentManager fm, Tab[] tabs , Fragment[] Fragments) { super(fm); mTabs = tabs; // mFragments = new Fragment[mTabs.length]; mFragments = Fragments; //dirty way to get reference of cached fragment try { ArrayList<Fragment> mActive = (ArrayList<Fragment>) sActiveField.get(fm); if (mActive != null) { for (Fragment fragment : mActive) { if (fragment instanceof WorkoutIndoorHrFragment) setFragment(Tab.HEARTRATE, fragment); else if (fragment instanceof WorkoutIndoorChartFragment) setFragment(Tab.CHART, fragment); } } } catch (Exception e) { } } private void setFragment(Tab tab, Fragment f) { for (int i = 0; i < mTabs.length; i++) if (mTabs[i] == tab) { mFragments[i] = f; break; } } @Override public Fragment getItem(int position) { if (mFragments[position] == null) { switch (mTabs[position]) { case HEARTRATE: mFragments[position] = WorkoutIndoorHrFragment.newInstance(); break; case CHART: mFragments[position] = WorkoutIndoorChartFragment.newInstance(); break; } } return mFragments[position]; } @Override public CharSequence getPageTitle(int position) { return mTabs[position].toString(); } @Override public int getCount() { return mFragments.length; } }
[ "raul.fan@fizzo.cn" ]
raul.fan@fizzo.cn
3b66a7f505b886732f2d620a3bea354fed189881
969854e3b88738b52eea02dab9a7d92b97797c97
/src/main/java/gxt/visual/ui/client/implementations/VField.java
1e52cd53164aede30ea91835343fe726a498eb94
[]
no_license
bbai/gxt-interfaces
1b130b301fc31444dae103c7d17a4bbace5ef9c3
4bb0fc716e4a45525fc31a39647669f30e69d2b8
refs/heads/master
2021-01-21T19:35:09.393173
2010-06-08T21:56:07
2010-06-08T21:56:07
42,747,579
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package gxt.visual.ui.client.implementations; import gxt.visual.ui.client.interfaces.IField; import com.extjs.gxt.ui.client.widget.form.Field; /** * @author eugenp */ public class VField< D > extends Field< D > implements IField< D >{ public VField(){ super(); } /** mine */ public Field< D > getComponent(){ return this; } }
[ "hanriseldon@gmail.com" ]
hanriseldon@gmail.com
2ece3bb53fc5e27f8dbbed5418acc1bb49c2c402
1d51f9fb91a8febaec677438214c354f4ae72a4c
/src/com/dj/invoi/test/CookieTest.java
ee71275d1975ac57b8e400545850d8775e7f982d
[]
no_license
hj050771/Invoicing
72e326e56b7c9debac7739dbce44d8e1f46e05a1
ae8db4b5bfafc07c694255541301b8e96ac82d45
refs/heads/master
2020-04-27T20:33:15.608979
2019-03-09T09:00:40
2019-03-09T09:00:40
174,662,218
0
0
null
null
null
null
UTF-8
Java
false
false
1,003
java
package com.dj.invoi.test; import org.junit.Test; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class CookieTest { public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName,String cookieValue) { Cookie cookie = new Cookie(cookieName,cookieValue); response.addCookie(cookie); } public static String getCookieValue(HttpServletRequest request,String cookieName){ Cookie[] cookies = request.getCookies(); String retValue = null; for (int i = 0; i <cookies.length ; i++) { retValue = cookies[i].getValue(); System.out.println(retValue); } return retValue; } @Test public void test(){ // setCookie(request,response,"test","hello"); } @Test public void test1(){ // getCookieValue(request,"test"); } }
[ "12345@qq.com" ]
12345@qq.com
8b8643f56ac42605d161e9cc295e15d71ec5bc7c
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/baas-20181221/src/main/java/com/aliyun/baas20181221/models/DescribeFabricOrganizationSpecsResponseBody.java
bdad25feaebbc46aade5bb490d5f39ccd5835a77
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
3,172
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.baas20181221.models; import com.aliyun.tea.*; public class DescribeFabricOrganizationSpecsResponseBody extends TeaModel { @NameInMap("ErrorCode") public Integer errorCode; @NameInMap("RequestId") public String requestId; @NameInMap("Result") public java.util.List<DescribeFabricOrganizationSpecsResponseBodyResult> result; @NameInMap("Success") public Boolean success; public static DescribeFabricOrganizationSpecsResponseBody build(java.util.Map<String, ?> map) throws Exception { DescribeFabricOrganizationSpecsResponseBody self = new DescribeFabricOrganizationSpecsResponseBody(); return TeaModel.build(map, self); } public DescribeFabricOrganizationSpecsResponseBody setErrorCode(Integer errorCode) { this.errorCode = errorCode; return this; } public Integer getErrorCode() { return this.errorCode; } public DescribeFabricOrganizationSpecsResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public DescribeFabricOrganizationSpecsResponseBody setResult(java.util.List<DescribeFabricOrganizationSpecsResponseBodyResult> result) { this.result = result; return this; } public java.util.List<DescribeFabricOrganizationSpecsResponseBodyResult> getResult() { return this.result; } public DescribeFabricOrganizationSpecsResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } public static class DescribeFabricOrganizationSpecsResponseBodyResult extends TeaModel { @NameInMap("Enable") public Boolean enable; @NameInMap("OrganizationSpecsName") public String organizationSpecsName; @NameInMap("Title") public String title; public static DescribeFabricOrganizationSpecsResponseBodyResult build(java.util.Map<String, ?> map) throws Exception { DescribeFabricOrganizationSpecsResponseBodyResult self = new DescribeFabricOrganizationSpecsResponseBodyResult(); return TeaModel.build(map, self); } public DescribeFabricOrganizationSpecsResponseBodyResult setEnable(Boolean enable) { this.enable = enable; return this; } public Boolean getEnable() { return this.enable; } public DescribeFabricOrganizationSpecsResponseBodyResult setOrganizationSpecsName(String organizationSpecsName) { this.organizationSpecsName = organizationSpecsName; return this; } public String getOrganizationSpecsName() { return this.organizationSpecsName; } public DescribeFabricOrganizationSpecsResponseBodyResult setTitle(String title) { this.title = title; return this; } public String getTitle() { return this.title; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
c575ffd3bfb1ba3f3fabac43531f566bb5240d9e
7888f7ae87d4ad2bb90bfbc3bd4e8ebde180677a
/optaplanner-core/src/main/java/org/optaplanner/core/impl/score/director/drools/testgen/reproducer/TestGenDroolsExceptionReproducer.java
85c17808ac5da5887417da941c77ece4cc4a84b6
[ "Apache-2.0" ]
permissive
and7000/optaplanner
e8d52a4e821d7871a968ca62c72a45b9165311e8
870c285afffe0707883e8e960a4d15be944e782f
refs/heads/master
2020-06-27T08:50:24.412328
2016-11-18T19:54:43
2016-11-18T19:54:43
74,527,821
1
0
null
2016-11-23T01:16:22
2016-11-23T01:16:22
null
UTF-8
Java
false
false
3,926
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * 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.optaplanner.core.impl.score.director.drools.testgen.reproducer; import java.util.Objects; import org.optaplanner.core.impl.score.director.drools.testgen.TestGenDroolsScoreDirector; import org.optaplanner.core.impl.score.director.drools.testgen.TestGenKieSessionJournal; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TestGenDroolsExceptionReproducer implements TestGenOriginalProblemReproducer { private static final Logger logger = LoggerFactory.getLogger(TestGenDroolsExceptionReproducer.class); private final RuntimeException originalException; private final TestGenDroolsScoreDirector<?> scoreDirector; public TestGenDroolsExceptionReproducer(RuntimeException originalException, TestGenDroolsScoreDirector<?> scoreDirector) { this.originalException = originalException; this.scoreDirector = scoreDirector; } @Override public boolean isReproducible(TestGenKieSessionJournal journal) { try { journal.replay(scoreDirector.createKieSession()); return false; } catch (RuntimeException reproducedException) { if (areEqual(originalException, reproducedException)) { return true; } else { if (reproducedException.getMessage().startsWith("No fact handle for ")) { // this is common when removing insert of a fact that is later updated - not interesting logger.debug(" Can't remove insert: {}", reproducedException.toString()); } else { logger.info("Unexpected exception", reproducedException); } return false; } } } @Override public void assertReproducible(TestGenKieSessionJournal journal, String message) { try { journal.replay(scoreDirector.createKieSession()); throw new IllegalStateException(message + " No exception thrown."); } catch (RuntimeException reproducedException) { if (!areEqual(originalException, reproducedException)) { throw new IllegalStateException(message + "\nExpected [" + originalException + "]" + "\nCaused [" + reproducedException + "]", reproducedException); } } } private static boolean areEqual(RuntimeException originalException, RuntimeException reproducedException) { if (!originalException.getClass().equals(reproducedException.getClass())) { return false; } if (!Objects.equals(originalException.getMessage(), reproducedException.getMessage())) { return false; } if (reproducedException.getStackTrace().length == 0) { throw new IllegalStateException("Caught exception with empty stack trace => can't compare to the original. " + "Use '-XX:-OmitStackTraceInFastThrow' to turn off this optimization.", reproducedException); } // TODO check all org.drools elements? return originalException.getStackTrace()[0].equals(reproducedException.getStackTrace()[0]); } @Override public String toString() { return originalException.toString(); } }
[ "gds.geoffrey.de.smet@gmail.com" ]
gds.geoffrey.de.smet@gmail.com
ed758c91f74297d7040c8e2936ddf3a22cc68572
269bce0bf0e23f5e5f7b5d31167c8a804b62ae52
/comparator-tools/modagame/MODAGAME_hppc_0.6.1/src.main.java/com/carrotsearch/hppc/FloatByteAssociativeContainer.java
71646cb63d58d65a00b5956f1b40367bc39e8ac2
[]
no_license
acapulco-spl/acapulco_replication_package
5c4378b7662d6aa10f11f52a9fa8793107b34d6d
7de4d9a96c11977f0cd73d761a4f8af1e0e064e0
refs/heads/master
2023-04-15T17:40:14.003166
2022-04-13T08:37:11
2022-04-13T08:37:11
306,005,002
3
1
null
2022-04-11T17:35:06
2020-10-21T11:39:59
Java
UTF-8
Java
false
false
4,153
java
package com.carrotsearch.hppc; import java.util.Iterator; import com.carrotsearch.hppc.cursors.*; import com.carrotsearch.hppc.predicates.*; import com.carrotsearch.hppc.procedures.*; /** * An associative container (alias: map, dictionary) from keys to (one or possibly more) values. * Object keys must fulfill the contract of {@link Object#hashCode()} and {@link Object#equals(Object)}. * * <p>Note that certain associative containers (like multimaps) may return the same key-value pair * multiple times from iterators.</p> * * @see FloatContainer */ @javax.annotation.Generated(date = "2014-09-08T10:42:29+0200", value = "HPPC generated from: FloatByteAssociativeContainer.java") public interface FloatByteAssociativeContainer extends Iterable<FloatByteCursor> { /** * Returns a cursor over the entries (key-value pairs) in this map. The iterator is * implemented as a cursor and it returns <b>the same cursor instance</b> on every * call to {@link Iterator#next()}. To read the current key and value use the cursor's * public fields. An example is shown below. * <pre> * for (IntShortCursor c : intShortMap) * { * System.out.println(&quot;index=&quot; + c.index * + &quot; key=&quot; + c.key * + &quot; value=&quot; + c.value); * } * </pre> * * <p>The <code>index</code> field inside the cursor gives the internal index inside * the container's implementation. The interpretation of this index depends on * to the container. */ @Override public Iterator<FloatByteCursor> iterator(); /** * Returns <code>true</code> if this container has an association to a value for * the given key. */ public boolean containsKey(float key); /** * @return Returns the current size (number of assigned keys) in the container. */ public int size(); /** * @return Return <code>true</code> if this hash map contains no assigned keys. */ public boolean isEmpty(); /** * Removes all keys (and associated values) present in a given container. An alias to: * <pre> * keys().removeAll(container) * </pre> * but with no additional overhead. * * @return Returns the number of elements actually removed as a result of this call. */ public int removeAll(FloatContainer container); /** * Removes all keys (and associated values) for which the predicate returns <code>true</code>. * An alias to: * <pre> * keys().removeAll(container) * </pre> * but with no additional overhead. * * @return Returns the number of elements actually removed as a result of this call. */ public int removeAll(FloatPredicate predicate); /** * Applies a given procedure to all keys-value pairs in this container. Returns the argument (any * subclass of {@link FloatByteProcedure}. This lets the caller to call methods of the argument * by chaining the call (even if the argument is an anonymous type) to retrieve computed values, * for example. */ public <T extends FloatByteProcedure> T forEach(T procedure); /** * Clear all keys and values in the container. */ public void clear(); /** * Returns a collection of keys of this container. The returned collection is a view * over the key set and any modifications (if allowed) introduced to the collection will * propagate to the associative container immediately. */ public FloatCollection keys(); /** * Returns a container view of all values present in this container. The returned collection is a view * over the key set and any modifications (if allowed) introduced to the collection will * propagate to the associative container immediately. */ public ByteContainer values(); }
[ "daniel_str@gmx.de" ]
daniel_str@gmx.de
c2952560ee564340ccbaae73797d63cb2c180a9e
964601fff9212bec9117c59006745e124b49e1e3
/matos-android/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java
ef42a929ca9c44295538d96367b30757853ebf41
[ "Apache-2.0" ]
permissive
vadosnaprimer/matos-profiles
bf8300b04bef13596f655d001fc8b72315916693
fb27c246911437070052197aa3ef91f9aaac6fc3
refs/heads/master
2020-05-23T07:48:46.135878
2016-04-05T13:14:42
2016-04-05T13:14:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,991
java
package org.xmlpull.v1; /* * #%L * Matos * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2010 - 2014 Orange SA * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ public class XmlPullParserFactory { // Fields public static final java.lang.String PROPERTY_NAME = "org.xmlpull.v1.XmlPullParserFactory"; protected java.util.ArrayList parserClasses; protected java.lang.String classNamesLocation; protected java.util.ArrayList serializerClasses; protected java.util.HashMap features; // Constructors protected XmlPullParserFactory(){ } // Methods public static XmlPullParserFactory newInstance() throws XmlPullParserException{ return (XmlPullParserFactory) null; } public static XmlPullParserFactory newInstance(java.lang.String arg1, java.lang.Class arg2) throws XmlPullParserException{ return (XmlPullParserFactory) null; } public boolean getFeature(java.lang.String arg1){ return false; } public void setFeature(java.lang.String arg1, boolean arg2) throws XmlPullParserException{ } public void setNamespaceAware(boolean arg1){ } public boolean isNamespaceAware(){ return false; } public boolean isValidating(){ return false; } public void setValidating(boolean arg1){ } public XmlPullParser newPullParser() throws XmlPullParserException{ return (XmlPullParser) null; } public XmlSerializer newSerializer() throws XmlPullParserException{ return (XmlSerializer) null; } }
[ "pierre.cregut@orange.com" ]
pierre.cregut@orange.com
0daa87a1160bd711484055b1e1ad7f19689dee6c
141b4b70ee6f49e399f2121271471466f43bd71c
/springboot-basic/springboot-config/src/main/java/com/hz/learnboot/config/controller/BookController.java
781ab5639bebfb9926078521b9979ff3dd0b2304
[ "MIT" ]
permissive
mainul35/springboot-examples
fa852e623a8f36aaba0f9afa9ad77ccd91d2ecaa
9e6770f348e923d9c29c3f423ca79cc5fb20863f
refs/heads/master
2023-04-14T11:51:06.375571
2019-06-26T02:25:16
2019-06-26T02:25:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
862
java
package com.hz.learnboot.config.controller; import com.hz.learnboot.config.domain.BookComponent; import com.hz.learnboot.config.domain.BookProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** 书籍控制器 * * @Author hezhao * @Time 2018-06-28 23:07 */ @RestController @RequestMapping("/api/book") public class BookController { @Autowired private BookProperties bookProperties; @Autowired private BookComponent bookComponent; @GetMapping("/a") public BookProperties getBookA() { return bookProperties; } @GetMapping("/b") public BookComponent getBookB() { return bookComponent; } }
[ "1439293823@qq.com" ]
1439293823@qq.com
048a17df4c658a710754cba7b37f7477a22c7d51
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project64/src/main/java/org/gradle/test/performance64_5/Production64_419.java
809d0c31c9e4e9f9d1cbb4e27eb13d9f41848275
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance64_5; public class Production64_419 extends org.gradle.test.performance15_5.Production15_419 { private final String property; public Production64_419() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c6e559790c600c0dac8e1cf9fd60109162379454
196496c8aee6392670ed4d6bea410ca4f0f663a5
/modules/m001/src/main/java/org/rapidpm/vaadin/MyUI.java
4dfc3abde92d9ca18e3b8d0e556711b19a2d127a
[ "Apache-2.0" ]
permissive
dve/testbench-jumpstart
f95513d6e286ae92e85986a706bb1da48c0dc572
e38a3a68acf90f356d4221bb33aa2c739b7c6647
refs/heads/master
2021-05-06T03:23:15.592361
2017-12-20T10:34:48
2017-12-20T10:34:48
114,890,508
0
0
null
2017-12-20T13:28:48
2017-12-20T13:28:48
null
UTF-8
Java
false
false
3,228
java
package org.rapidpm.vaadin; import java.util.List; import javax.servlet.annotation.WebServlet; import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.server.FontAwesome; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.shared.ui.ValueChangeMode; import com.vaadin.ui.Button; import com.vaadin.ui.CssLayout; import com.vaadin.ui.Grid; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.TextField; import com.vaadin.ui.UI; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.themes.ValoTheme; /** * This UI is the application entry point. A UI may either represent a browser window * (or tab) or some part of a html page where a Vaadin application is embedded. * <p> * The UI is initialized using {@link #init(VaadinRequest)}. This method is intended to be * overridden to add component to the user interface and initialize non-component functionality. */ public class MyUI extends UI { private final Grid<Customer> grid = new Grid<>(); private final TextField filterText = new TextField(); private final CustomerForm form = new CustomerForm(this); private CustomerService service = CustomerService.getInstance(); @Override protected void init(VaadinRequest vaadinRequest) { final VerticalLayout layout = new VerticalLayout(); filterText.setPlaceholder("filter by name..."); filterText.addValueChangeListener(e -> updateList()); filterText.setValueChangeMode(ValueChangeMode.LAZY); Button clearFilterTextBtn = new Button(FontAwesome.TIMES); clearFilterTextBtn.setDescription("Clear the current filter"); clearFilterTextBtn.addClickListener(e -> filterText.clear()); CssLayout filtering = new CssLayout(); filtering.addComponents(filterText , clearFilterTextBtn); filtering.setStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP); Button addCustomerBtn = new Button("Add new customer"); addCustomerBtn.addClickListener(e -> { grid.asSingleSelect().clear(); form.setCustomer(new Customer()); }); HorizontalLayout toolbar = new HorizontalLayout(filtering , addCustomerBtn); grid.addColumn(Customer::getFirstName).setCaption("First Name"); grid.addColumn(Customer::getLastName).setCaption("Last Name"); grid.addColumn(Customer::getEmail).setCaption("Email"); HorizontalLayout main = new HorizontalLayout(grid , form); main.setSizeFull(); grid.setSizeFull(); main.setExpandRatio(grid , 1); layout.addComponents(toolbar , main); // fetch list of Customers from service and assign it to Grid updateList(); setContent(layout); form.setVisible(false); grid.asSingleSelect().addValueChangeListener(event -> { if (event.getValue() == null) { form.setVisible(false); } else { form.setCustomer(event.getValue()); } }); } public void updateList() { List<Customer> customers = service.findAll(filterText.getValue()); grid.setItems(customers); } @WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true) @VaadinServletConfiguration(ui = MyUI.class, productionMode = false) public static class MyUIServlet extends VaadinServlet { } }
[ "sven.ruppert@gmail.com" ]
sven.ruppert@gmail.com
bad31907164d48f6095443f05a8ef27f154bb4ff
7e551e651755889dbbd7a78280005de762d0e442
/arms/src/main/java/com/jess/arms/utils/StatusBarUtil.java
5d4e25aefdb29e9b21fda21acaf29c24dfcb4fcd
[]
no_license
danielguomin/enjoy
876c58a3c3c30a0cfd632579473e4ea4da005eb7
29d1a65908f2f37234520dd0f675c0aa570f9087
refs/heads/master
2020-03-22T17:42:49.306766
2018-08-01T02:55:14
2018-08-01T02:55:14
140,410,987
0
0
null
null
null
null
UTF-8
Java
false
false
7,333
java
package com.jess.arms.utils; import android.annotation.TargetApi; import android.app.Activity; import android.graphics.Color; import android.os.Build; import android.view.View; import android.view.Window; import android.view.WindowManager; import java.lang.reflect.Field; import java.lang.reflect.Method; /** * 状态栏工具类 * 作者: JairusTse * 日期: 17/12/19 */ public class StatusBarUtil { /** * 设置状态栏为透明 * * @param activity */ @TargetApi(19) public static void setTranslucentStatus(Activity activity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = activity.getWindow(); window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor(Color.TRANSPARENT); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window window = activity.getWindow(); window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); } } /** * 修改状态栏颜色,支持4.4以上版本 * * @param activity * @param colorId */ public static void setStatusBarColor(Activity activity, int colorId) { //Android6.0(API 23)以上,系统方法 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = activity.getWindow(); window.setStatusBarColor(activity.getResources().getColor(colorId)); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { //使用SystemBarTint库使4.4版本状态栏变色,需要先将状态栏设置为透明 setTranslucentStatus(activity); //设置状态栏颜色 SystemBarTintManager tintManager = new SystemBarTintManager(activity); tintManager.setStatusBarTintEnabled(true); tintManager.setStatusBarTintResource(colorId); } } /** * 设置状态栏模式 * * @param activity * @param isTextDark 文字、图标是否为黑色 (false为默认的白色) * @param colorId 状态栏颜色 * @return */ public static void setStatusBarMode(Activity activity, boolean isTextDark, int colorId) { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT && Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { return; } if (!isTextDark) { //文字、图标颜色不变,只修改状态栏颜色 setStatusBarColor(activity, colorId); } else { //修改状态栏颜色和文字图标颜色 setStatusBarColor(activity, colorId); //4.4以上才可以改文字图标颜色 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { if (OSUtil.isMIUI()) { //小米MIUI系统 setMIUIStatusBarTextMode(activity, isTextDark); } else if (OSUtil.isFlyme()) { //魅族flyme系统 setFlymeStatusBarTextMode(activity, isTextDark); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //6.0以上,调用系统方法 Window window = activity.getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } else { //4.4以上6.0以下的其他系统,暂时没有修改状态栏的文字图标颜色的方法,有可以加上 } } } } /** * 设置Flyme系统状态栏的文字图标颜色 * * @param activity * @param isDark 状态栏文字及图标是否为深色 * @return */ public static boolean setFlymeStatusBarTextMode(Activity activity, boolean isDark) { Window window = activity.getWindow(); boolean result = false; if (window != null) { try { WindowManager.LayoutParams lp = window.getAttributes(); Field darkFlag = WindowManager.LayoutParams.class .getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON"); Field meizuFlags = WindowManager.LayoutParams.class .getDeclaredField("meizuFlags"); darkFlag.setAccessible(true); meizuFlags.setAccessible(true); int bit = darkFlag.getInt(null); int value = meizuFlags.getInt(lp); if (isDark) { value |= bit; } else { value &= ~bit; } meizuFlags.setInt(lp, value); window.setAttributes(lp); result = true; } catch (Exception e) { } } return result; } /** * 设置MIUI系统状态栏的文字图标颜色(MIUIV6以上) * * @param activity * @param isDark 状态栏文字及图标是否为深色 * @return */ public static boolean setMIUIStatusBarTextMode(Activity activity, boolean isDark) { boolean result = false; Window window = activity.getWindow(); if (window != null) { Class clazz = window.getClass(); try { int darkModeFlag = 0; Class layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams"); Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE"); darkModeFlag = field.getInt(layoutParams); Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class); if (isDark) { extraFlagField.invoke(window, darkModeFlag, darkModeFlag);//状态栏透明且黑色字体 } else { extraFlagField.invoke(window, 0, darkModeFlag);//清除黑色字体 } result = true; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //开发版 7.7.13 及以后版本采用了系统API,旧方法无效但不会报错,所以两个方式都要加上 if (isDark) { activity.getWindow().getDecorView().setSystemUiVisibility(View .SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View .SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } else { activity.getWindow().getDecorView().setSystemUiVisibility(View .SYSTEM_UI_FLAG_VISIBLE); } } } catch (Exception e) { } } return result; } }
[ "guomin@mapbar.com" ]
guomin@mapbar.com
390afb59d9609985ac1c7ad1436c600ed8739ef6
a4ed3b1f3ab045bf5e3a1e6bf0694e51e51f7233
/sldparser/src/main/geotools/geometry/coordinatesequence/CSBuilder.java
ba36b63f077bee5ae0e4a6eb5dba23c6bef76b78
[ "Apache-2.0" ]
permissive
TerraMobile/TerraMobile
7ffd2d6a2e4f04e59fb5b71badb00a962998d46d
6380b6c3730294947c8d70d6f3b3a06dce12aa92
refs/heads/master
2021-07-15T08:23:50.581870
2016-04-13T20:43:00
2016-04-13T20:43:00
32,412,196
2
2
Apache-2.0
2020-07-12T09:50:30
2015-03-17T18:26:56
Java
UTF-8
Java
false
false
1,026
java
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2004-2008, Open Source Geospatial Foundation (OSGeo) * * 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; * version 2.1 of the License. * * 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. * * Created on 31-dic-2004 */ package org.geotools.geometry.coordinatesequence; /** * A Builder for JTS CoordinateSequences. * * @author wolf * * * @deprecated Moved to {@link org.geotools.geometry.jts.coordinatesequence.CSBuilder}. * * * * @source $URL$ */ public interface CSBuilder extends org.geotools.geometry.jts.coordinatesequence.CSBuilder { }
[ "claudio.bogossian@gmail.com" ]
claudio.bogossian@gmail.com
613175407d9340fc281d749b562133038a0d5a86
80bdd9dd64a03f3844c15dbee9e0662be891cca1
/vertigo-orchestra/src/test/java/io/vertigo/orchestra/services/execution/engine/TestJob2.java
dca3f4252e10b6885c8d415a90111a849d4a1a48
[ "Apache-2.0" ]
permissive
cmazereau/vertigo-extensions
b656a304a7591b3d23635dfa1983a2dff2b6760f
55c18d1da5cd935c25c05c923543c08751cb76f3
refs/heads/master
2022-07-17T05:08:18.096905
2020-02-28T09:46:01
2020-02-28T09:46:01
264,216,857
0
0
NOASSERTION
2020-05-15T14:36:31
2020-05-15T14:36:31
null
UTF-8
Java
false
false
1,487
java
/** * vertigo - simple java starter * * Copyright (C) 2013-2019, vertigo-io, KleeGroup, direction.technique@kleegroup.com (http://www.kleegroup.com) * KleeGroup, Centre d'affaire la Boursidiere - BP 159 - 92357 Le Plessis Robinson Cedex - France * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.vertigo.orchestra.services.execution.engine; import io.vertigo.orchestra.services.execution.RunnableActivityEngine; public final class TestJob2 extends RunnableActivityEngine { private static int count = 0; @Override public void run() { try { //On simule une attente qui correspond à un traitement métier de 100 ms Thread.sleep(100); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); //si interrupt on relance } incCount(); } private static synchronized void incCount() { count++; } public static synchronized int getCount() { return count; } public static synchronized void reset() { count = 0; } }
[ "matthieu.laroche@telecom-bretagne.eu" ]
matthieu.laroche@telecom-bretagne.eu
8a3fdd311d37152e99231aacaeb7583c90ff82d8
ff2a1b6ce410d58b2268187837856b4a36d00946
/jvCodeBank/JVCodebase/work/workSAX/dom/samples/DomEcho01.java
b1243e04f8fb361fd1403cbe51238759d7ce168a
[]
no_license
johnvincentio/repo-codebank
5ce4ec3bb4efcad7f32bdfdc867889eff1ca9532
5055d1f53ec69e2e537aac3f4bec9de2953a90f0
refs/heads/master
2023-03-17T18:05:03.748283
2023-03-05T19:22:13
2023-03-05T19:22:13
84,678,871
0
0
null
null
null
null
UTF-8
Java
false
false
3,316
java
/* * @(#)DomEcho01.java 1.9 98/11/10 * * Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. U.S. * Government Rights - Commercial software. Government users are subject * to the Sun Microsystems, Inc. standard license agreement and * applicable provisions of the FAR and its supplements. Use is subject * to license terms. * * This distribution may include materials developed by third parties. * Sun, Sun Microsystems, the Sun logo, Java and J2EE are trademarks * or registered trademarks of Sun Microsystems, Inc. in the U.S. and * other countries. * * Copyright (c) 2004 Sun Microsystems, Inc. Tous droits reserves. * * Droits du gouvernement americain, utilisateurs gouvernementaux - logiciel * commercial. Les utilisateurs gouvernementaux sont soumis au contrat de * licence standard de Sun Microsystems, Inc., ainsi qu'aux dispositions * en vigueur de la FAR (Federal Acquisition Regulations) et des * supplements a celles-ci. Distribue par des licences qui en * restreignent l'utilisation. * * Cette distribution peut comprendre des composants developpes par des * tierces parties. Sun, Sun Microsystems, le logo Sun, Java et J2EE * sont des marques de fabrique ou des marques deposees de Sun * Microsystems, Inc. aux Etats-Unis et dans d'autres pays. */ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.FactoryConfigurationError; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; import java.io.File; import java.io.IOException; import org.w3c.dom.Document; import org.w3c.dom.DOMException; public class DomEcho01{ // Global value so it can be ref'd by the tree-adapter static Document document; public static void main(String argv[]) { if (argv.length != 1) { System.err.println("Usage: java DomEcho filename"); System.exit(1); } DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); //factory.setValidating(true); //factory.setNamespaceAware(true); try { DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.parse( new File(argv[0]) ); } catch (SAXParseException spe) { // Error generated by the parser System.out.println("\n** Parsing error" + ", line " + spe.getLineNumber() + ", uri " + spe.getSystemId()); System.out.println(" " + spe.getMessage() ); // Use the contained exception, if any Exception x = spe; if (spe.getException() != null) x = spe.getException(); x.printStackTrace(); } catch (SAXException sxe) { // Error generated during parsing) Exception x = sxe; if (sxe.getException() != null) x = sxe.getException(); x.printStackTrace(); } catch (ParserConfigurationException pce) { // Parser with specified options can't be built pce.printStackTrace(); } catch (IOException ioe) { // I/O error ioe.printStackTrace(); } } // main }
[ "john@johnvincent.io" ]
john@johnvincent.io
dea8de00c718c5a96b5fa2bf0f75a079f3c836cd
6893a81ef31a11dfe8fbacba242aec975fcbe62a
/app/src/main/java/com/jaja/timeline/MainActivity.java
78d13d8ba2a05cc9820e68f91c5ede025783ab11
[]
no_license
2223512468/TimeLine
74745267566b3054a9731664d4a8785faaefbed1
381e6e00ac85f163d9ab5259edbb0cae84697bd5
refs/heads/master
2021-09-02T15:38:01.889231
2018-01-03T12:38:26
2018-01-03T12:38:26
116,135,304
0
0
null
null
null
null
UTF-8
Java
false
false
2,695
java
package com.jaja.timeline; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.View; import android.widget.ExpandableListView; import android.widget.ExpandableListView.OnGroupClickListener; import com.jaja.timeline.adapter.StatusExpandAdapter; import com.jaja.timeline.entity.ChildStatusEntity; import com.jaja.timeline.entity.GroupStatusEntity; public class MainActivity extends Activity { private ExpandableListView expandlistView; private StatusExpandAdapter statusAdapter; private Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); context = this; expandlistView = (ExpandableListView) findViewById(R.id.expandlist); initExpandListView(); } /** * 初始化可拓展列表 */ private void initExpandListView() { statusAdapter = new StatusExpandAdapter(context, getListData()); expandlistView.setAdapter(statusAdapter); expandlistView.setGroupIndicator(null); // 去掉默认带的箭头 expandlistView.setSelection(0);// 设置默认选中项 // 遍历所有group,将所有项设置成默认展开 int groupCount = expandlistView.getCount(); for (int i = 0; i < groupCount; i++) { expandlistView.expandGroup(i); } expandlistView.setOnGroupClickListener(new OnGroupClickListener() { @Override public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) { // TODO Auto-generated method stub return true; } }); } private List<GroupStatusEntity> getListData() { List<GroupStatusEntity> groupList; String[] strArray = new String[] { "10月22日", "10月23日", "10月25日" }; String[][] childTimeArray = new String[][] { { "俯卧撑十次", "仰卧起坐二十次", "大喊我爱紫豪二十次", "每日赞紫豪一次" }, { "亲,快快滴点赞哦~" }, { "没有赞的,赶紧去赞哦~" } }; groupList = new ArrayList<GroupStatusEntity>(); for (int i = 0; i < strArray.length; i++) { GroupStatusEntity groupStatusEntity = new GroupStatusEntity(); groupStatusEntity.setGroupName(strArray[i]); List<ChildStatusEntity> childList = new ArrayList<ChildStatusEntity>(); for (int j = 0; j < childTimeArray[i].length; j++) { ChildStatusEntity childStatusEntity = new ChildStatusEntity(); childStatusEntity.setCompleteTime(childTimeArray[i][j]); childStatusEntity.setIsfinished(true); childList.add(childStatusEntity); } groupStatusEntity.setChildList(childList); groupList.add(groupStatusEntity); } return groupList; } }
[ "2223512468@qq.com" ]
2223512468@qq.com
d199fadefc1a0766e771292724f735ad79090f82
be41b0d417594c4c1ed0a6325a00d546a1246180
/DayArrayError/src/Day.java
f2177ef63f940490af93d48a4d31f3d326c3530d
[]
no_license
anomie7/JavaPractice02
d3ea46dce65f3e01d4a1ece0a5503be59104c5a9
44cef26799683049f508f1095226bdc8390267d1
refs/heads/master
2021-01-20T02:30:49.766435
2017-07-21T13:23:56
2017-07-21T13:23:56
89,418,287
0
0
null
2017-06-24T03:41:02
2017-04-26T00:09:22
Java
UHC
Java
false
false
770
java
public class Day { private int year; private int month; private int date; Day(int year, int month, int date){ this.year = year; this.month = month; this.date = date; } int getYear(){ return year; } int getMonth(){ return month; } int getDate(){ return date; } void setYear(int year){ this.year = year; } void setMonth(int month){ this.month = month; } void setDate(int date){ this.date = date; } void set(int year, int month, int date){ this.year = year; this.month = month; this.date = date; } //--- 요일을 계산한다. ---// int dayOfWeek(){ int y = year; int m = month; if (m == 1 || m == 2){ y--; m += 12; } return (y + y / 4 - y / 100 + y / 400 + (13 * m + 8) / 5 + date) % 7; } }
[ "anomie7777@gmail.com" ]
anomie7777@gmail.com
ad2d060ea227fb8252490e36a0e0353948122756
cd9ee762fbf44783dca09767564fcfc8953a55d1
/src/day12_JavaRecap/Switch_Practice.java
d190464bea678e8015a6c16b0437757a5402a919
[]
no_license
SolmazCh/JavaSprintPractice2019
e85ee7e392d23f7361b92679d6cf0744faadeefe
764b332d9f34bee6cbde53eb5ed183e3e41afd07
refs/heads/master
2022-07-18T08:54:53.268006
2020-05-18T21:43:24
2020-05-18T21:43:24
257,899,445
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
package day12_JavaRecap; public class Switch_Practice { public static void main(String[] args) { switch(3){ default: System.out.println("Invalid Case"); break; case 1: System.out.println("Case 1"); break; case 2: System.out.println("Case 2"); } System.out.println("==========================================================================="); int statusCode = 201; String result = " "; switch(statusCode){ case 200: // System.out.println("Ok"); result ="Ok"; break; case 201: //System.out.println("Created"); result= "Created"; break; case 202: // System.out.println("Accepted"); result = "Accepted"; break; default: // System.out.println("Invalid Status Code"); result = "Invalid Status Code"; } System.out.println(result); } }
[ "solmaz.chiraqova@gmail.com" ]
solmaz.chiraqova@gmail.com
22f2421737ab6e052e3c614f8a32a31498ba5c81
338d2d974291ef4ba404cfe091ef294f1018498b
/java/revenj-test/src/test/java/gen/model/binaries/converters/WritableDocumentConverter.java
0bc240132ff76c7253a44a74539c94785f8b0342
[]
no_license
marinehero/revenj
2e24373c32025ebad4b87f05eb7b38a42e04adfb
e302426c08d6a04cde819e4cf17972ccae87edd4
refs/heads/master
2020-12-11T08:01:59.603440
2015-11-07T09:05:14
2015-11-07T09:05:14
45,755,912
4
0
null
2015-11-07T21:42:30
2015-11-07T21:42:28
null
UTF-8
Java
false
false
3,793
java
package gen.model.binaries.converters; import java.io.*; import java.util.*; import java.util.stream.*; import org.revenj.postgres.*; import org.revenj.postgres.converters.*; public class WritableDocumentConverter implements ObjectConverter<gen.model.binaries.WritableDocument> { @SuppressWarnings("unchecked") public WritableDocumentConverter(List<ObjectConverter.ColumnInfo> allColumns) throws java.io.IOException { Optional<ObjectConverter.ColumnInfo> column; final java.util.List<ObjectConverter.ColumnInfo> columns = allColumns.stream().filter(it -> "binaries".equals(it.typeSchema) && "WritableDocument".equals(it.typeName)) .collect(Collectors.toList()); columnCount = columns.size(); readers = new ObjectConverter.Reader[columnCount]; for (int i = 0; i < readers.length; i++) { readers[i] = (instance, rdr, ctx) -> StringConverter.skip(rdr, ctx); } column = columns.stream().filter(it -> "ID".equals(it.columnName)).findAny(); if (!column.isPresent()) throw new java.io.IOException("Unable to find 'ID' column in binaries WritableDocument. Check if DB is in sync"); __index___id = (int)column.get().order - 1; column = columns.stream().filter(it -> "name".equals(it.columnName)).findAny(); if (!column.isPresent()) throw new java.io.IOException("Unable to find 'name' column in binaries WritableDocument. Check if DB is in sync"); __index___name = (int)column.get().order - 1; } public void configure(org.revenj.patterns.ServiceLocator locator) { gen.model.binaries.WritableDocument.__configureConverter(readers, __index___id, __index___name); } @Override public String getDbName() { return "\"binaries\".\"Document\""; } @Override public gen.model.binaries.WritableDocument from(PostgresReader reader) throws java.io.IOException { return from(reader, 0); } private gen.model.binaries.WritableDocument from(PostgresReader reader, int outerContext, int context, ObjectConverter.Reader<gen.model.binaries.WritableDocument>[] readers) throws java.io.IOException { reader.read(outerContext); gen.model.binaries.WritableDocument instance = new gen.model.binaries.WritableDocument(reader, context, readers); reader.read(outerContext); return instance; } @Override public PostgresTuple to(gen.model.binaries.WritableDocument instance) { if (instance == null) return null; PostgresTuple[] items = new PostgresTuple[columnCount]; items[__index___id] = org.revenj.postgres.converters.UuidConverter.toTuple(instance.getId()); items[__index___name] = org.revenj.postgres.converters.StringConverter.toTuple(instance.getName()); return RecordTuple.from(items); } private final int columnCount; private final ObjectConverter.Reader<gen.model.binaries.WritableDocument>[] readers; public gen.model.binaries.WritableDocument from(PostgresReader reader, int context) throws java.io.IOException { int cur = reader.read(); if (cur == ',' || cur == ')') return null; gen.model.binaries.WritableDocument instance = from(reader, context, context == 0 ? 1 : context << 1, readers); reader.read(); return instance; } public gen.model.binaries.WritableDocument from(PostgresReader reader, int outerContext, int context) throws java.io.IOException { return from(reader, outerContext, context, readers); } public static String buildURI(org.revenj.postgres.PostgresBuffer _sw, gen.model.binaries.WritableDocument instance) throws java.io.IOException { _sw.initBuffer(); String _tmp; org.revenj.postgres.converters.UuidConverter.serializeURI(_sw, instance.getId()); return _sw.bufferToString(); } private final int __index___id; private final int __index___name; }
[ "rikard@ngs.hr" ]
rikard@ngs.hr
df62003aef617feb420b70c5aa430702bb0bdbd1
6a08f139bf1c988740dfa0e311d17711ba123d01
/org/lwjgl/opengl/EXTPackedPixels.java
6be91d3c6e1b33f68b909607cb0cad35ff50884a
[ "NAIST-2003", "LicenseRef-scancode-unicode", "ICU", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
IceCruelStuff/badlion-src
61e5b927e75ed5b895cb2fff2c2b95668468c7f7
18e0579874b8b55fd765be9c60f2b17d4766d504
refs/heads/master
2022-12-31T00:30:26.246407
2020-06-30T16:50:49
2020-06-30T16:50:49
297,207,115
0
0
NOASSERTION
2020-10-15T06:27:58
2020-09-21T02:23:57
null
UTF-8
Java
false
false
392
java
package org.lwjgl.opengl; public final class EXTPackedPixels { public static final int GL_UNSIGNED_BYTE_3_3_2_EXT = 32818; public static final int GL_UNSIGNED_SHORT_4_4_4_4_EXT = 32819; public static final int GL_UNSIGNED_SHORT_5_5_5_1_EXT = 32820; public static final int GL_UNSIGNED_INT_8_8_8_8_EXT = 32821; public static final int GL_UNSIGNED_INT_10_10_10_2_EXT = 32822; }
[ "50463419+routerabfrage@users.noreply.github.com" ]
50463419+routerabfrage@users.noreply.github.com
1782003240e49a30300b455c19c11498ffbb798c
7033d33d0ce820499b58da1d1f86f47e311fd0e1
/org/java_websocket/WebSocket.java
302ff4561e026f7b5b6195415ba090ace4633ba9
[ "MIT" ]
permissive
gabrielvicenteYT/melon-client-src
1d3f1f65c5a3bf1b6bc3e1cb32a05bf1dd56ee62
e0bf34546ada3afa32443dab838b8ce12ce6aaf8
refs/heads/master
2023-04-04T05:47:35.053136
2021-04-19T18:34:36
2021-04-19T18:34:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
package org.java_websocket; import java.nio.*; import org.java_websocket.framing.*; import java.util.*; import java.net.*; import org.java_websocket.drafts.*; import org.java_websocket.enums.*; import javax.net.ssl.*; public interface WebSocket { void close(final int p0, final String p1); void close(final int p0); void close(); void closeConnection(final int p0, final String p1); void send(final String p0); void send(final ByteBuffer p0); void send(final byte[] p0); void sendFrame(final Framedata p0); void sendFrame(final Collection<Framedata> p0); void sendPing(); void sendFragmentedFrame(final Opcode p0, final ByteBuffer p1, final boolean p2); boolean hasBufferedData(); InetSocketAddress getRemoteSocketAddress(); InetSocketAddress getLocalSocketAddress(); boolean isOpen(); boolean isClosing(); boolean isFlushAndClose(); boolean isClosed(); Draft getDraft(); ReadyState getReadyState(); String getResourceDescriptor(); <T> void setAttachment(final T p0); <T> T getAttachment(); boolean hasSSLSupport(); SSLSession getSSLSession() throws IllegalArgumentException; }
[ "haroldthesenpai@gmail.com" ]
haroldthesenpai@gmail.com
e6c549e90ce95151120d1fbb9a8c31ec446bb515
fd9ad28913caf29206c974c913ee207d535936d5
/Lab08/Solution/Q6/Triangle.java
deff15a4c2b03cc6ea3dc0b2db74f20a991ee5c9
[ "MIT" ]
permissive
Beaconsyh08/COMP90041-2020SEM1
7b9051f8cb07c225ce5eaf9b34fd2b9e45c46cd4
d9b1fdc1daee000b01f5afd53daf62406a968ee6
refs/heads/master
2022-11-29T05:06:21.529187
2020-08-09T10:47:55
2020-08-09T10:47:55
248,934,561
6
0
null
null
null
null
UTF-8
Java
false
false
683
java
package Q6; /** * Triangle.java * * * Created: Tue Jan 13 19:44:15 2004 * * @author Adrienne Decker * @version */ public class Triangle extends Figure{ private int height; public Triangle () { height = 0; } public Triangle(Triangle other) { super(other); this.height = other.height; } public Triangle(int height) { this.height = height; } public void draw() { for ( int i = 1; i <= height; i++ ) { for ( int j = 0; j < i; j++) { System.out.print("*"); } // end of for () System.out.println(); } // end of for () } public void erase() { super.erase(); } }// Triangle
[ "songyuhao2008@gmail.com" ]
songyuhao2008@gmail.com
01f4cf39a8e793dd776f194dc3e58ab1bd00cb9d
26ebbbcb1d758555b7fc691876325d51a266aeb9
/src/main/java/com/chaochaogu/design/pattern/bridge/common/ConcreteImplementor1.java
f1b96cef517b7546b2cc69ca56d80507fee8866d
[]
no_license
chaochaogu/design-pattern
6102ee0fe671ac2c0d4d316aa16342740d2db464
33815d29a5a46048ad3de553884e7594716b97a0
refs/heads/master
2021-06-22T01:47:11.354200
2021-03-30T08:37:31
2021-03-30T08:37:31
201,429,211
0
0
null
2021-03-31T22:21:42
2019-08-09T08:48:46
Java
UTF-8
Java
false
false
359
java
package com.chaochaogu.design.pattern.bridge.common; /** * 具体实现化角色1 * * @author chaochao Gu * @date 2020/9/27 */ public class ConcreteImplementor1 implements Implementor { @Override public void doSomething() { // 业务逻辑处理 } @Override public void doAnything() { // 业务逻辑处理 } }
[ "723454695@qq.com" ]
723454695@qq.com
220c7a8ac1dbb83191595d779cbae566c3d265ad
93a6b2c07966de09b3383616a9c55e6825139a27
/src/main/java/org/edu/dao/IF_BoardDAO.java
505e70b3ea7555541be2f81b241ccda122ce0a58
[]
no_license
hyimang/yangheemang
0f33f37375960f9ad1cf15b600cd11b91ec0cf6b
bbd3772439b5681dfd1f679f4c946af36189128d
refs/heads/master
2023-02-19T14:14:47.534844
2021-01-18T08:43:20
2021-01-18T08:43:20
312,148,415
0
0
null
null
null
null
UTF-8
Java
false
false
1,160
java
package org.edu.dao; import java.util.HashMap; import java.util.List; import org.edu.vo.AttachVO; import org.edu.vo.BoardVO; import org.edu.vo.PageVO; public interface IF_BoardDAO { public List<BoardVO> selectBoard(PageVO pageVO) throws Exception; public int countBoard(PageVO pageVO) throws Exception; //게시물 상세조회 시작 public BoardVO readBoard(Integer bno) throws Exception; public List<AttachVO> readAttach(Integer bno) throws Exception; public List<HashMap<String, Object>> readAttach_noUse(Integer bno) throws Exception; public void updateViewCount(Integer bno) throws Exception; //게시물 상세조회 끝 public void insertBoard(BoardVO boardVO) throws Exception; public void deleteBoard(Integer bno) throws Exception; public void updateBoard(BoardVO boardVO) throws Exception; //첨부파일 관련 public void insertAttach(String save_file_name, String real_file_name) throws Exception; public void deleteAttach(String save_file_name) throws Exception; public void deleteAttachAll(Integer bno) throws Exception; public void updateAttach(String save_file_name, String real_file_name, Integer bno) throws Exception; }
[ "Administrator@MSDN-SPECIAL" ]
Administrator@MSDN-SPECIAL
98802437e5e206ccf597721d49308fefe22ad95b
f8b95e2a2c82a8b8a76c8de10d1faa6c831818ab
/src/main/java/com/yuonetoy/Entitiy/Stock/CompanyStock/CompanyProductStock.java
6b1b9343a277af6a7404e75136e5f7ee945bcebc
[]
no_license
Barcode36/yuonetoy-company-management-program
b38f69209c5dff5193d891702369fc99de197e45
06a8fa8e265278001914893045441b096af0a176
refs/heads/master
2022-04-24T21:54:10.224326
2020-04-27T12:44:40
2020-04-27T12:44:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
835
java
package com.yuonetoy.Entitiy.Stock.CompanyStock; import com.yuonetoy.Entitiy.Company; import com.yuonetoy.Entitiy.Product; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.*; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Entity @Table(name = "company_ProductStock") public class CompanyProductStock { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "CPS_ID") private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "C_FK", referencedColumnName = "C_ID") private Company company; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "P_FK", referencedColumnName = "P_ID") private Product product; @Column(name = "COUNT") private Integer count; }
[ "lcy960729@gmail.com" ]
lcy960729@gmail.com
10e7da15b90290e5de8b408fe89aa1a3acad94dc
44fb1e7fe52a1609115170f50cbd5a1385de88c2
/GL/hazelcast/Current/hazelcast-client/src/test/java/com/hazelcast/client/semaphore/ClientSemaphoreTest.java
abb78ca0039abbc38be1dd5bc691deb50014fdee
[ "Apache-2.0" ]
permissive
JLLeitschuh/Corpus
64d69507ac9a49490fca3d2c1b0cc3592a807120
7186ac8dab669b6791cf8b5373f3e4fbbe152838
refs/heads/master
2021-01-02T15:28:02.789111
2017-06-04T05:35:31
2017-06-04T05:35:31
239,679,322
0
0
null
2020-02-11T04:54:30
2020-02-11T04:54:29
null
UTF-8
Java
false
false
8,040
java
/* * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.client.semaphore; import com.hazelcast.client.HazelcastClient; import com.hazelcast.core.*; import com.hazelcast.test.HazelcastParallelClassRunner; import com.hazelcast.test.HazelcastSerialClassRunner; import com.hazelcast.test.HazelcastTestSupport; import com.hazelcast.test.annotation.QuickTest; import org.junit.*; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import java.io.IOException; import java.util.Random; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import static com.hazelcast.test.HazelcastTestSupport.randomString; import static org.junit.Assert.*; /** * @author ali 5/24/13 */ @RunWith(HazelcastParallelClassRunner.class) @Category(QuickTest.class) public class ClientSemaphoreTest { static HazelcastInstance client; static HazelcastInstance server; @BeforeClass public static void init(){ server = Hazelcast.newHazelcastInstance(); client = HazelcastClient.newHazelcastClient(); } @AfterClass public static void destroy() { client.shutdown(); Hazelcast.shutdownAll(); } @Test public void testSemaphoreInit() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); assertTrue(semaphore.init(10)); } @Test(expected = IllegalArgumentException.class) public void testSemaphoreNegInit() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(-1); } @Test public void testRelease() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); semaphore.release(); assertEquals(1, semaphore.availablePermits()); } @Test public void testdrainPermits() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); assertEquals(10, semaphore.drainPermits()); } @Test public void testAvailablePermits_AfterDrainPermits() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); semaphore.drainPermits(); assertEquals(0, semaphore.availablePermits()); } @Test public void testTryAcquire_whenDrainPermits() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); semaphore.drainPermits(); assertFalse(semaphore.tryAcquire()); } @Test public void testAvailablePermits() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); assertEquals(10, semaphore.availablePermits()); } @Test public void testAvailableReducePermits() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); semaphore.reducePermits(5); assertEquals(5, semaphore.availablePermits()); } @Test public void testAvailableReducePermits_WhenZero() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); semaphore.reducePermits(1); assertEquals(0, semaphore.availablePermits()); } @Test public void testTryAcquire_whenAvailable() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(1); assertTrue(semaphore.tryAcquire()); } @Test public void testTryAcquire_whenUnAvailable() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); assertFalse(semaphore.tryAcquire()); } @Test public void testTryAcquire_whenAvailableWithTimeOut() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(1); assertTrue(semaphore.tryAcquire(1, TimeUnit.MILLISECONDS)); } @Test public void testTryAcquire_whenUnAvailableWithTimeOut() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); assertFalse(semaphore.tryAcquire(1, TimeUnit.MILLISECONDS)); } @Test public void testTryAcquireMultiPermits_whenAvailable() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); assertTrue(semaphore.tryAcquire(5)); } @Test public void testTryAcquireMultiPermits_whenUnAvailable() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(5); assertFalse(semaphore.tryAcquire(10)); } @Test public void testTryAcquireMultiPermits_whenAvailableWithTimeOut() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(10); assertTrue(semaphore.tryAcquire(5, 1, TimeUnit.MILLISECONDS)); } @Test public void testTryAcquireMultiPermits_whenUnAvailableWithTimeOut() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(5); assertFalse(semaphore.tryAcquire(10, 1, TimeUnit.MILLISECONDS)); } @Test public void testTryAcquire_afterRelease() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); semaphore.release(); assertTrue(semaphore.tryAcquire()); } @Test public void testMulitReleaseTryAcquire() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); semaphore.release(5); assertTrue(semaphore.tryAcquire(5)); } @Test public void testAcquire_Threaded() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); final CountDownLatch latch = new CountDownLatch(1); new Thread(){ public void run() { try { semaphore.acquire(); latch.countDown(); } catch (InterruptedException e) { e.printStackTrace(); } } }.start(); Thread.sleep(1000); semaphore.release(2); assertTrue(latch.await(5, TimeUnit.SECONDS)); assertEquals(1, semaphore.availablePermits()); } @Test public void tryAcquire_Threaded() throws Exception { final ISemaphore semaphore = client.getSemaphore(randomString()); semaphore.init(0); final CountDownLatch latch = new CountDownLatch(1); new Thread(){ public void run() { try { if(semaphore.tryAcquire(1, 5, TimeUnit.SECONDS)){ latch.countDown(); } } catch (InterruptedException e) { e.printStackTrace(); } } }.start(); semaphore.release(2); assertTrue(latch.await(5, TimeUnit.SECONDS)); assertEquals(1, semaphore.availablePermits()); } }
[ "dor.d.ma@gmail.com" ]
dor.d.ma@gmail.com
991b0675489df79b6f71054d21bff961b3983ee2
98c2782811b01af598fdb166e262ee47f7a359d1
/microservice-security-core/src/main/java/com/thtf/security/core/validate/code/ValidateCodeProcessorHolder.java
2196496321b0ae46d1759883e41517e508191204
[]
no_license
pyygithub/microservice-platform
e228399843dd7619a2948cb86f1866d308ba8f54
93206ef8d5754df9595a19aee840b245ab8ba815
refs/heads/master
2020-06-24T10:27:47.453704
2019-08-09T03:32:58
2019-08-09T03:32:58
198,938,973
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package com.thtf.security.core.validate.code; import com.thtf.security.core.support.ResponseCode; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Map; /** * ======================== * 校验码处理器持有者 处理类 - 依赖搜索 * Created with IntelliJ IDEA. * User:pyy * Date:2019/8/1 11:08 * Version: v1.0 * ======================== */ @Component public class ValidateCodeProcessorHolder { @Autowired private Map<String, ValidateCodeProcessor> validateCodeProcessors; public ValidateCodeProcessor findValidateCodeProcessor(ValidateCodeType type) { return findValidateCodeProcessor(type.toString().toLowerCase()); } public ValidateCodeProcessor findValidateCodeProcessor(String type) { String name = type.toLowerCase() + ValidateCodeProcessor.class.getSimpleName(); ValidateCodeProcessor processor = validateCodeProcessors.get(name); if (processor == null) { throw new ValidateCodeException(ResponseCode.VALIDATE_CODE_NOT_EXISTS); } return processor; } }
[ "panyangyang@thtf.com.cn" ]
panyangyang@thtf.com.cn
c85c6bac4cb9dc8d8b60a95cd17b4852abf16173
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
/services/apig/src/main/java/com/huaweicloud/sdk/apig/v2/model/PluginOperApiInfo.java
94eb8ad264bd7863233f72e83e47f762103dcbe7
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-java-v3
51b32a451fac321a0affe2176663fed8a9cd8042
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
refs/heads/master
2023-08-29T06:50:15.642693
2023-08-24T08:34:48
2023-08-24T08:34:48
262,207,545
91
57
NOASSERTION
2023-09-08T12:24:55
2020-05-08T02:27:00
Java
UTF-8
Java
false
false
2,841
java
package com.huaweicloud.sdk.apig.v2.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; /** * PluginOperApiInfo */ public class PluginOperApiInfo { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "env_id") private String envId; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value = "api_ids") private List<String> apiIds = null; public PluginOperApiInfo withEnvId(String envId) { this.envId = envId; return this; } /** * 绑定API的环境编码。 * @return envId */ public String getEnvId() { return envId; } public void setEnvId(String envId) { this.envId = envId; } public PluginOperApiInfo withApiIds(List<String> apiIds) { this.apiIds = apiIds; return this; } public PluginOperApiInfo addApiIdsItem(String apiIdsItem) { if (this.apiIds == null) { this.apiIds = new ArrayList<>(); } this.apiIds.add(apiIdsItem); return this; } public PluginOperApiInfo withApiIds(Consumer<List<String>> apiIdsSetter) { if (this.apiIds == null) { this.apiIds = new ArrayList<>(); } apiIdsSetter.accept(this.apiIds); return this; } /** * 绑定的API编码列表。 * @return apiIds */ public List<String> getApiIds() { return apiIds; } public void setApiIds(List<String> apiIds) { this.apiIds = apiIds; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } PluginOperApiInfo that = (PluginOperApiInfo) obj; return Objects.equals(this.envId, that.envId) && Objects.equals(this.apiIds, that.apiIds); } @Override public int hashCode() { return Objects.hash(envId, apiIds); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PluginOperApiInfo {\n"); sb.append(" envId: ").append(toIndentedString(envId)).append("\n"); sb.append(" apiIds: ").append(toIndentedString(apiIds)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
99dd8aa364eb26e96a4534a136b19b2528ba28a6
af516779dc80a659053d5f17e0e0cd7d9e832b18
/libraries/BridJ/Examples/BasicExample/src/test/java/com/nativelibs4java/bridj/example/ExampleTest.java
19a1706cb089c2b0f54f5cc8e81e7d00a8c7d83b
[]
no_license
topikachu/nativelibs4java
de4069d12a0e5cc9b93c18221417d0080d13a090
190ef43b793a4594b93d4876462b8f57ce5257e7
refs/heads/master
2020-12-25T13:51:22.874495
2013-09-19T01:08:05
2013-09-19T01:08:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package com.nativelibs4java.bridj.example; import org.junit.Test; import static org.junit.Assert.*; import org.bridj.*; import static org.bridj.Pointer.*; import static com.nativelibs4java.bridj.example.ExampleLibrary.*; public class ExampleTest { @Test public void testMessages() { Pointer<Byte> message = pointerToCString("Message from Java"); someFunction(message); SomeClass c = new SomeClass(1234); int value = c.someMethod(message); assertEquals(1234, value); } }
[ "olivier.chafik@gmail.com" ]
olivier.chafik@gmail.com
78d0943953807b4921f9af94a3f6a919a3f751bc
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/TIME-10b-2-25-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/org/joda/time/field/PreciseDurationDateTimeField_ESTest.java
0f2393923ca7db32e9f4a7aea3fdc2e3dbdd67b1
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
/* * This file was automatically generated by EvoSuite * Mon May 18 04:08:28 UTC 2020 */ package org.joda.time.field; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.joda.time.field.TestPreciseDurationDateTimeField; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class PreciseDurationDateTimeField_ESTest extends PreciseDurationDateTimeField_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { TestPreciseDurationDateTimeField.MockStandardBaseDateTimeField testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0 = new TestPreciseDurationDateTimeField.MockStandardBaseDateTimeField(); testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.getType(); int int0 = (-2479); // Undeclared exception! testPreciseDurationDateTimeField_MockStandardBaseDateTimeField0.set((-3931L), (-2479)); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
9b41c10584b8ffbf8b6e2453a038543671b9af39
e7e497b20442a4220296dea1550091a457df5a38
/java_workplace/renren_web_framework/lab/xoa/branches/xoa-commons/src/main/java/com/renren/xoa/commons/spdy/frame/control/DefaultSynReply.java
10a84c79161310cc1194c477a778a3f55926b8f1
[]
no_license
gunner14/old_rr_code
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
bb047dc88fa7243ded61d840af0f8bad22d68dee
refs/heads/master
2021-01-17T18:23:28.154228
2013-12-02T23:45:33
2013-12-02T23:45:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,834
java
package com.renren.xoa.commons.spdy.frame.control; import java.util.Arrays; import java.util.Map; import com.renren.xoa.commons.spdy.Utils; import com.renren.xoa.commons.spdy.datastructure.NameValueBlock; /** * <pre> * +----------------------------------+ * |1| 1 | 2 | * +----------------------------------+ * | Flags (8) | Length (24 bits) | * +----------------------------------+ * |X| Stream-ID (31bits) | * +----------------------------------+ * | Unused | NV entries | * +----------------------------------| * | Name/value header block | * | ... | * </pre> * * @author Lookis (lookisliu@gmail.com) * @author Li Weibo (weibo.leo@gmail.com) //I believe spring-brother */ public class DefaultSynReply extends SynReply { private static final long serialVersionUID = 1L; //private int unused; private NameValueBlock nameValueEntries; // public SynReply(byte flags, int streamID) { // super(ControlFrame.ControlFrameType.SYN_REPLY, flags); // Utils.checkLength(streamID, 31); // this.streamID = streamID; // } DefaultSynReply(byte flags, byte[] dataInByte) { super(flags, dataInByte); } DefaultSynReply(byte flags, int streamId) { super(flags, null); setStreamId(streamId); nameValueEntries = new NameValueBlock(); } public String putNV(String name, String value) { return nameValueEntries.put(name, value); } public Map<String, String> getNVMap() { return nameValueEntries; } @Override public byte[] getData() { byte[] idByte = Utils.intToByte(streamId); //这里忽略了NV前的unused字段 byte[] nvEntriesCountInByte = Utils.intToByte(nameValueEntries.size()); byte[] nvByte = nameValueEntries.toByteStructure(); byte[] data = Utils.mergeBytes(idByte, nvEntriesCountInByte, nvByte); return data; } //TODO 实现getLength方法 /*@Override public int getLength() { return 0; }*/ @Override protected void buildDataFromByte(byte[] dataInByte) { if (dataInByte == null || dataInByte.length == 0) { //采用第二种构造方式,自己setXXX return; } //streamId部分 this.streamId = Utils.streamId(dataInByte); //unused,NVCount部分,无用 //byte[] unusedAndNVCount = Utils.copyBytesFromHighPos(dataInByte, 4, 8); //NV部分 byte[] nvData = Arrays.copyOfRange(dataInByte, 8, dataInByte.length); this.nameValueEntries = new NameValueBlock(nvData); } }
[ "liyong19861014@gmail.com" ]
liyong19861014@gmail.com
0c5370f7e48e5e89269d2344dcf2c606918c9cc2
606dfea969fdd4a0604737edf7beaaba42f74b29
/populi-mob/Populi/src/main/java/net/canang/populi/mob/EventListActivity.java
84c9fbc5e68a0918463df545e6600cc2a1795808
[]
no_license
rafizanbaharum/populi
a32eb3f1ab869cd7b4782078f97b282760e4af22
189583850c827d591a9d2f0656cf72223e4cb407
refs/heads/master
2021-01-23T13:37:20.580173
2013-12-17T05:37:34
2013-12-17T05:37:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,107
java
package net.canang.populi.mob; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.FragmentActivity; /** * An activity representing a list of Events. This activity * has different presentations for handset and tablet-size devices. On * handsets, the activity presents a list of items, which when touched, * lead to a {@link EventDetailActivity} representing * item details. On tablets, the activity presents the list of items and * item details side-by-side using two vertical panes. * <p> * The activity makes heavy use of fragments. The list of items is a * {@link EventListFragment} and the item details * (if present) is a {@link EventDetailFragment}. * <p> * This activity also implements the required * {@link EventListFragment.Callbacks} interface * to listen for item selections. */ public class EventListActivity extends FragmentActivity implements EventListFragment.Callbacks { /** * Whether or not the activity is in two-pane mode, i.e. running on a tablet * device. */ private boolean mTwoPane; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_event_list); if (findViewById(R.id.event_detail_container) != null) { // The detail container view will be present only in the // large-screen layouts (res/values-large and // res/values-sw600dp). If this view is present, then the // activity should be in two-pane mode. mTwoPane = true; // In two-pane mode, list items should be given the // 'activated' state when touched. ((EventListFragment) getSupportFragmentManager() .findFragmentById(R.id.event_list)) .setActivateOnItemClick(true); } // TODO: If exposing deep links into your app, handle intents here. } /** * Callback method from {@link EventListFragment.Callbacks} * indicating that the item with the given ID was selected. */ @Override public void onItemSelected(String id) { if (mTwoPane) { // In two-pane mode, show the detail view in this activity by // adding or replacing the detail fragment using a // fragment transaction. Bundle arguments = new Bundle(); arguments.putString(EventDetailFragment.ARG_ITEM_ID, id); EventDetailFragment fragment = new EventDetailFragment(); fragment.setArguments(arguments); getSupportFragmentManager().beginTransaction() .replace(R.id.event_detail_container, fragment) .commit(); } else { // In single-pane mode, simply start the detail activity // for the selected item ID. Intent detailIntent = new Intent(this, EventDetailActivity.class); detailIntent.putExtra(EventDetailFragment.ARG_ITEM_ID, id); startActivity(detailIntent); } } }
[ "rafizan.baharum@gmail.com" ]
rafizan.baharum@gmail.com
3d452816fb2ce979b20dd75c1697751f8cd4c0c8
2a3f19a4a2b91d9d715378aadb0b1557997ffafe
/sources/com/mcdonalds/app/nutrition/OrderPagerAdapter.java
5b07fb6d483a2df54c8d8e870f8488124f92f687
[]
no_license
amelieko/McDonalds-java
ce5062f863f7f1cbe2677938a67db940c379d0a9
2fe00d672caaa7b97c4ff3acdb0e1678669b0300
refs/heads/master
2022-01-09T22:10:40.360630
2019-04-21T14:47:20
2019-04-21T14:47:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,374
java
package com.mcdonalds.app.nutrition; import android.support.p000v4.app.Fragment; import android.support.p000v4.app.FragmentManager; import android.support.p000v4.app.FragmentStatePagerAdapter; import com.ensighten.Ensighten; import com.mcdonalds.sdk.modules.models.Order; import java.util.ArrayList; import java.util.List; public class OrderPagerAdapter extends FragmentStatePagerAdapter { private List<Order> mOrders = new ArrayList(); public OrderPagerAdapter(FragmentManager fm) { super(fm); } public void setOrders(List<Order> orders) { Ensighten.evaluateEvent(this, "setOrders", new Object[]{orders}); this.mOrders = new ArrayList(orders); notifyDataSetChanged(); } public Fragment getItem(int position) { Ensighten.evaluateEvent(this, "getItem", new Object[]{new Integer(position)}); Order order = (Order) this.mOrders.get(position); RecentsOrderFragment fragment = new RecentsOrderFragment(); fragment.setOrder(order); return fragment; } public int getCount() { Ensighten.evaluateEvent(this, "getCount", null); int size = this.mOrders.size(); return size > 3 ? 3 : size; } public int getItemPosition(Object object) { Ensighten.evaluateEvent(this, "getItemPosition", new Object[]{object}); return -2; } }
[ "makfc1234@gmail.com" ]
makfc1234@gmail.com
f56017a4679735f4f2a1265b4d60e83e5fbf8c1c
f84c8f032925bc70ed9f50dd99c22e82e9edb19a
/Week_3/day_1/src/reverse_string/TesReverseString.java
77c5cf6a14b3df8ec5341e8a6dc18b203b4b0ec5
[]
no_license
maulong305/Module_2
36a063137037453b79f480d127ae7afb7233ca20
21f856ca99da2d80e85688cb4d4200a07afdde90
refs/heads/master
2022-11-19T01:17:07.885824
2020-07-15T13:26:34
2020-07-15T13:26:34
270,557,940
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
package reverse_string; public class TesReverseString { public static void main(String[] args) throws Exception { String arrString[] = new String[]{"long", "Vinh", "Hiếu", "Thành" }; for (String i: arrString){ System.out.print(i + "\t"); } System.out.println("\n"); StackString stackString = new StackString(4); for (String i : arrString){ stackString.push(i); } for (int i = 0; i < arrString.length; i++){ arrString[i] = stackString.pop(); } // for (String i : arrString) { // i = stackString.pop(); // } for (String i : arrString) { System.out.print(i + "\t"); } } }
[ "maulong305@gmail.com" ]
maulong305@gmail.com
ca20c6fa9965f44248d6a3e2db06ff3eb00d9933
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/135/643/CWE369_Divide_by_Zero__float_connect_tcp_modulo_51a.java
09d862b7bcf7a741d5637ff36f244c8b6785a9e0
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
7,489
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE369_Divide_by_Zero__float_connect_tcp_modulo_51a.java Label Definition File: CWE369_Divide_by_Zero__float.label.xml Template File: sources-sinks-51a.tmpl.java */ /* * @description * CWE: 369 Divide by zero * BadSource: connect_tcp Read data using an outbound tcp connection * GoodSource: A hardcoded non-zero number (two) * Sinks: modulo * GoodSink: Check for zero before modulo * BadSink : Modulo by a value that may be zero * Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package * * */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.Socket; import java.util.logging.Level; public class CWE369_Divide_by_Zero__float_connect_tcp_modulo_51a extends AbstractTestCase { public void bad() throws Throwable { float data; data = -1.0f; /* Initialize data */ /* Read data using an outbound tcp connection */ { Socket socket = null; BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { /* Read data using an outbound tcp connection */ socket = new Socket("host.example.org", 39544); /* read input from socket */ readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data using an outbound tcp connection */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Float.parseFloat(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } /* clean up socket objects */ try { if (socket != null) { socket.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO); } } } (new CWE369_Divide_by_Zero__float_connect_tcp_modulo_51b()).badSink(data ); } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { float data; /* FIX: Use a hardcoded number that won't a divide by zero */ data = 2.0f; (new CWE369_Divide_by_Zero__float_connect_tcp_modulo_51b()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { float data; data = -1.0f; /* Initialize data */ /* Read data using an outbound tcp connection */ { Socket socket = null; BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { /* Read data using an outbound tcp connection */ socket = new Socket("host.example.org", 39544); /* read input from socket */ readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data using an outbound tcp connection */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Float.parseFloat(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } /* clean up socket objects */ try { if (socket != null) { socket.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO); } } } (new CWE369_Divide_by_Zero__float_connect_tcp_modulo_51b()).goodB2GSink(data ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
3d7678daf0d1871f3837eb6d25d15088f85c9883
30daa061cdc3081d31cea3f90660e696b9399038
/NTSCUserManagermentServer/src/com/vn/ntsc/usermanagementserver/server/respond/impl/account/RegisterByAdminApi.java
a60e75c58b42bd6623b970736c5a381ec23e1a72
[]
no_license
PhanHuy247/coreGVN
7ce7c9d4bcd1f9f95f228aed296efa934a45c594
383e35019fc884420e6c4398b74e03d8f05a4d0f
refs/heads/master
2020-03-07T13:37:53.513725
2018-03-31T10:03:04
2018-03-31T10:03:04
127,506,076
0
0
null
null
null
null
UTF-8
Java
false
false
4,364
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.vn.ntsc.usermanagementserver.server.respond.impl.account; import com.vn.ntsc.usermanagementserver.server.pointaction.ActionManager; import com.vn.ntsc.usermanagementserver.server.pointaction.ActionType; import com.vn.ntsc.usermanagementserver.dao.impl.LoginTrackingDAO; import com.vn.ntsc.usermanagementserver.dao.impl.UserDAO; import eazycommon.util.DateFormat; import eazycommon.util.Util; import java.util.Date; import eazycommon.constant.Constant; import eazycommon.constant.ErrorCode; import eazycommon.constant.ParamKey; import eazycommon.exception.EazyException; import org.json.simple.JSONObject; import com.vn.ntsc.usermanagementserver.entity.impl.datarespond.LoginData; import com.vn.ntsc.usermanagementserver.entity.impl.user.User; import com.vn.ntsc.usermanagementserver.server.respond.IApiAdapter; import com.vn.ntsc.usermanagementserver.server.respond.Respond; import com.vn.ntsc.usermanagementserver.server.respond.common.UserInforValidator; import com.vn.ntsc.usermanagementserver.server.respond.result.EntityRespond; import com.vn.ntsc.usermanagementserver.server.tool.Tool; import com.vn.ntsc.usermanagementserver.server.userinformanager.UserInforManager; /** * * @author RuAc0n */ public class RegisterByAdminApi implements IApiAdapter { @Override public Respond execute(JSONObject obj, Date time) { EntityRespond result = new EntityRespond(); try { User inputUser = User.getRegisterUserByAdmin(obj); if (!UserInforValidator.validateGender(inputUser)) { return new EntityRespond(ErrorCode.WRONG_DATA_FORMAT); } if (!UserInforValidator.validateBirthday(inputUser, Constant.FLAG.ON)) { return new EntityRespond(ErrorCode.INVALID_BIRTHDAY); } if ( inputUser.username == null || inputUser.username.trim().isEmpty() || !Tool.checkUserName(null, inputUser.username)) { result.code = ErrorCode.INVALID_USER_NAME; return result; } if(inputUser.region == null || !UserInforValidator.validateRegion(inputUser, null)){ return new EntityRespond(ErrorCode.WRONG_DATA_FORMAT); } if(inputUser.email != null){ if (!Util.validateEmail(inputUser.email)) { result.code = ErrorCode.INVALID_EMAIL; return result; }else{ if (UserDAO.checkEmail(inputUser.email, null)) { result.code = ErrorCode.EMAIL_REGISTED; return result; } } } else if(inputUser.fbId != null){ if (UserDAO.checkFacebookId(inputUser.fbId, null)) { result.code = ErrorCode.EMAIL_REGISTED; return result; } } if(!UserInforValidator.validate(inputUser)){ return new EntityRespond(ErrorCode.WRONG_DATA_FORMAT); } inputUser.lastUpdate = DateFormat.format(time); inputUser.registerDate = DateFormat.format(time); // inputUser.point = new Long(regPoint); User respondData = UserDAO.insertUser(inputUser); LoginData data = new LoginData(); data.user = respondData; //add user point and user infor UserInforManager.add(respondData.userId, inputUser.gender.intValue()); // UserInforManager.add(respondData); String ip = Util.getStringParam(obj, ParamKey.IP); ActionManager.doAction(ActionType.register, respondData.userId, null, Util.getGMTTime(), null, null, ip); LoginTrackingDAO.initialize(respondData.userId, respondData.gender.intValue()); result = new EntityRespond(ErrorCode.SUCCESS, data); } catch (EazyException ex) { Util.addErrorLog(ex); result.code = ex.getErrorCode(); } catch (Exception ex) { Util.addErrorLog(ex); } return result; } }
[ "phandinhhuy95@gmail.com" ]
phandinhhuy95@gmail.com
c9af991662cb7cc2a43c4658a4c53266e49784dd
e5b97b5a79ba5cd9fab9f88dd7d725792af58816
/ireport/src/net/sf/jasperreports/engine/base/JRBaseBoxBottomPen.java
2eeda4418d609679088759766c0cac91c957409c
[]
no_license
boyranger/lmireport
fa2721bb31c85dea27d15d9a210ef47a788123ca
65244e644ca72fcab72d8e9f64c17004d5dbdf9f
refs/heads/master
2021-01-23T08:10:33.679305
2009-10-30T05:59:38
2009-10-30T05:59:38
33,232,678
0
0
null
null
null
null
UTF-8
Java
false
false
1,897
java
/* * ============================================================================ * GNU Lesser General Public License * ============================================================================ * * JasperReports - Free Java report-generating library. * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * JasperSoft Corporation * 303 Second Street, Suite 450 North * San Francisco, CA 94107 * http://www.jaspersoft.com */ package net.sf.jasperreports.engine.base; import net.sf.jasperreports.engine.JRLineBox; import net.sf.jasperreports.engine.JRConstants; import net.sf.jasperreports.engine.JRPen; /** * @author Teodor Danciu (teodord@users.sourceforge.net) * @version $Id: JRBaseBox.java 1924 2007-10-25 13:31:38Z lucianc $ */ public class JRBaseBoxBottomPen extends JRBaseBoxPen { /** * */ private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; /** * */ public JRBaseBoxBottomPen(JRLineBox box) { super(box); } /** * */ public JRPen getPen(JRLineBox box) { return box.getBottomPen(); } }
[ "maodie007@163.com@b94ed7a6-887a-11de-8f56-7b2e0289298d" ]
maodie007@163.com@b94ed7a6-887a-11de-8f56-7b2e0289298d
1808469c99eacb5e94321ad356ab054a71240a42
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/xbmc_Kore/app/src/androidTest/java/org/xbmc/kore/tests/ui/movies/RestoreSearchQueryListFragmentTest.java
3f9296d7db610b514329fbee598d69b4f830b7ec
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,833
java
// isComment package org.xbmc.kore.tests.ui.movies; import android.content.Context; import android.support.test.espresso.Espresso; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import android.test.suitebuilder.annotation.LargeTest; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.xbmc.kore.R; import org.xbmc.kore.host.HostInfo; import org.xbmc.kore.testhelpers.EspressoTestUtils; import org.xbmc.kore.tests.ui.AbstractTestClass; import org.xbmc.kore.ui.sections.video.MoviesActivity; @RunWith(AndroidJUnit4.class) @LargeTest public class isClassOrIsInterface extends AbstractTestClass<MoviesActivity> { private final String isVariable = "isStringConstant"; private final int isVariable = isIntegerConstant; private final int isVariable = isIntegerConstant; @Rule public ActivityTestRule<MoviesActivity> isVariable = new ActivityTestRule<>(MoviesActivity.class); @Override protected ActivityTestRule<MoviesActivity> isMethod() { return isNameExpr; } @Override protected void isMethod(Context isParameter) { } @Override protected void isMethod(HostInfo isParameter) { } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr, isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr, isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isIntegerConstant, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr, isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isIntegerConstant, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr, isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isIntegerConstant, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(isIntegerConstant, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr.isMethod(); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isIntegerConstant, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr.isMethod(); isNameExpr.isMethod(); isNameExpr.isMethod("isStringConstant", isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(); isNameExpr.isMethod(); isNameExpr.isMethod("isStringConstant", isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(isIntegerConstant, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr.isMethod(); isNameExpr.isMethod(); isNameExpr.isMethod("isStringConstant", isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } /** * isComment */ @Test public void isMethod() { isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr); isNameExpr.isMethod(); isNameExpr.isMethod(); isNameExpr.isMethod("isStringConstant", isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
fe78892cbceff63059c7ce095e144ba73d3febb0
10d77fabcbb945fe37e15ae438e360a89a24ea05
/graalvm/transactions/fork/narayana/qa/tests/src/org/jboss/jbossts/qa/CrashRecovery09Clients/Client02a.java
59720099c25499185aba3cbc3dcc0e7b1adb70f3
[ "Apache-2.0", "LGPL-2.1-or-later", "LGPL-2.1-only", "LicenseRef-scancode-other-copyleft" ]
permissive
nmcl/scratch
1a881605971e22aa300487d2e57660209f8450d3
325513ea42f4769789f126adceb091a6002209bd
refs/heads/master
2023-03-12T19:56:31.764819
2023-02-05T17:14:12
2023-02-05T17:14:12
48,547,106
2
1
Apache-2.0
2023-03-01T12:44:18
2015-12-24T15:02:58
Java
UTF-8
Java
false
false
2,891
java
/* * JBoss, Home of Professional Open Source * Copyright 2007, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * (C) 2005-2006, * @author JBoss Inc. */ // // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 // // Arjuna Technologies Ltd., // Newcastle upon Tyne, // Tyne and Wear, // UK. // package org.jboss.jbossts.qa.CrashRecovery09Clients; /* * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved. * * HP Arjuna Labs, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: Client02a.java,v 1.2 2003/06/26 11:43:43 rbegg Exp $ */ /* * Try to get around the differences between Ansi CPP and * K&R cpp with concatenation. */ /* * Copyright (C) 1999-2001 by HP Bluestone Software, Inc. All rights Reserved. * * HP Arjuna Labs, * Newcastle upon Tyne, * Tyne and Wear, * UK. * * $Id: Client02a.java,v 1.2 2003/06/26 11:43:43 rbegg Exp $ */ import org.jboss.jbossts.qa.CrashRecovery09.*; import org.jboss.jbossts.qa.Utils.*; import org.omg.CORBA.IntHolder; public class Client02a { public static void main(String[] args) { try { ORBInterface.initORB(args, null); OAInterface.initOA(); String serviceIOR = ServerIORStore.loadIOR(args[args.length - 1]); Service service = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR)); CrashRecoveryDelays.awaitRecoveryCR09(); boolean correct = true; OTS.current().begin(); IntHolder valueHolder = new IntHolder(); service.get(valueHolder); correct = correct && (valueHolder.value == 0); OTS.current().commit(true); if (correct) { System.out.println("Passed"); } else { System.out.println("Failed"); } } catch (Exception exception) { System.out.println("Failed"); System.err.println("Client02a.main: " + exception); exception.printStackTrace(System.err); } try { OAInterface.shutdownOA(); ORBInterface.shutdownORB(); } catch (Exception exception) { System.err.println("Client02a.main: " + exception); exception.printStackTrace(System.err); } } }
[ "mlittle@redhat.com" ]
mlittle@redhat.com
a73ee8c2aade9c710efae28ef9968bc9bd0e53dc
73f4033884a8d897f6e942f8fe2536268278b904
/src/main/java/com/cummins/bims/controller/DealToolPersonController.java
45dd0b38de0ff6c4c03a9675f697f97b614663e3
[]
no_license
arvinzhao88/bims
dbdd11668418d30d790042aa42d783f16634bcf4
fae46a5ee399240b38204292fa618bff2d1d74c0
refs/heads/master
2022-12-09T20:07:24.363864
2019-09-29T03:19:16
2019-09-29T03:19:16
211,595,547
0
0
null
2022-12-05T23:32:05
2019-09-29T03:11:53
Java
UTF-8
Java
false
false
4,298
java
package com.cummins.bims.controller; import com.cummins.bims.dto.DealTool; import com.cummins.bims.dto.DealToolPerson; import com.cummins.bims.dto.Dict; import com.cummins.bims.dto.ToolLog; import com.cummins.bims.enums.DictEnum; import com.cummins.bims.enums.ToolEnum; import com.cummins.bims.service.DealToolPersonService; import com.cummins.permission.model.BimsPerson; import com.cummins.sevenstepscar.service.SevenStepsService; import com.cummins.util.JsonResult; import com.cummins.util.ToolLogUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @Controller @RequestMapping("back/dealToolPerson") public class DealToolPersonController { @Autowired private DealToolPersonService dealToolPersonService; @Autowired private SevenStepsService sevenStepsService; @PostMapping("addToolBatch") @ResponseBody public JsonResult addToolBatch(String jsonArr, HttpServletRequest request) { //获取登录 BimsPerson person = (BimsPerson) request.getSession().getAttribute("person"); List<DealToolPerson> dealTools = dealToolPersonService.addToolBatch(jsonArr, person); return JsonResult.success(dealTools); } /** * 删除处理工具 * @param dealTool * @return */ @RequestMapping(value = "delTool", method = RequestMethod.POST) @ResponseBody public JsonResult delTool(DealToolPerson dealTool){ Integer integer = dealToolPersonService.delTool(dealTool); /** * 删除7步/scar 数据 */ sevenStepsService.deleteSevenStepandScar(Integer.parseInt(dealTool.getToolNo())); return JsonResult.success(integer); } /** * 动态加载工具标签 根据account查询自己可以看到的工具 * @param dealTool * @return */ @RequestMapping(value = "getToolTabs", method = RequestMethod.POST) @ResponseBody public JsonResult getToolTabs(DealToolPerson dealTool, HttpServletRequest request, Model model){ BimsPerson person = (BimsPerson) request.getSession().getAttribute("person"); // /*String[] split = person.getBelongRole().split(","); List<String> roleList = Arrays.asList(split); if(roleList.contains("") && !person.getBelongRole().contains("2")) { }*/ //dealTool.setProcessPersonAccount(person.getAccount()); List<DealToolPerson> tools = dealToolPersonService.getToolTabs(dealTool,person); int step = 1 ; //循环 List<DealToolPerson> newTools = new ArrayList<>(); for(DealToolPerson toolPerson : tools){ /** 四种工具 1.car 2.scar 3.7 step 4.notification **/ //car if((int)toolPerson.getToolType() == ToolEnum.CAR.getCode()) { toolPerson.setPathUrl("car/toCarByToolPerson"); //scar } else if((int)toolPerson.getToolType() == ToolEnum.SCAR.getCode()) { toolPerson.setPathUrl("Scar/jumpSevenStepsUrl"); //STEP7 } else if((int)toolPerson.getToolType() == ToolEnum.STEP7.getCode()) { toolPerson.setPathUrl("toolsSevenSteps/jumpSevenStepsUrl"); //Notification } else if((int)toolPerson.getToolType() == ToolEnum.Notification.getCode()) { toolPerson.setPathUrl("back/toolNotification"); } else if((int)toolPerson.getToolType() == ToolEnum.PQC.getCode()) { toolPerson.setPathUrl("back/toPqc"); } newTools.add(toolPerson); } return JsonResult.success(newTools); } @RequestMapping("getTools") @ResponseBody public JsonResult getTools(DealToolPerson dealTool){ List<DealToolPerson> tools = dealToolPersonService.getTools(dealTool); return JsonResult.success(tools); } }
[ "admin@example.com" ]
admin@example.com
854aff365801b5b521b6a30707a2ea5bd3fc63cb
e2019f83287e7385192c6ab495bd95bdbf9f22ea
/sources/com/hmdglobal/app/camera/provider/InfoProvider.java
2de101de95654e64330ff4f3a7f144aa47c8fdeb
[]
no_license
carleewang/nokia_deadpool_camera
a7e2163eb5a3cd5792e6563a88f3f0586b1092c3
f56013056c397a1e6132c061356ce66ea48d3130
refs/heads/master
2022-01-05T22:29:58.359079
2019-05-17T05:42:30
2019-05-17T05:42:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,365
java
package com.hmdglobal.app.camera.provider; import android.content.ContentProvider; import android.content.ContentValues; import android.content.UriMatcher; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; public class InfoProvider extends ContentProvider { public static final int VIDETAIL_DIR = 0; public static final int VIDETAIL_ITEM = 1; private static UriMatcher mUriMacher = new UriMatcher(-1); private InfoDatabaseHelper mDbHelper; static { mUriMacher.addURI(ProviderUtil.AUTHORITY, InfoDatabaseHelper.TABLE_NAME, 0); mUriMacher.addURI(ProviderUtil.AUTHORITY, "videtail/#", 1); } public boolean onCreate() { this.mDbHelper = new InfoDatabaseHelper(getContext()); return true; } public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { SQLiteDatabase db = this.mDbHelper.getReadableDatabase(); Uri uri2 = uri; switch (mUriMacher.match(uri2)) { case 0: return db.query(InfoDatabaseHelper.TABLE_NAME, projection, selection, selectionArgs, null, null, sortOrder); case 1: String videtailId = (String) uri2.getPathSegments().get(1); String[] strArr = new String[]{videtailId}; return db.query(InfoDatabaseHelper.TABLE_NAME, projection, "id = ?", strArr, null, null, sortOrder); default: return null; } } public Uri insert(Uri uri, ContentValues values) { SQLiteDatabase db = this.mDbHelper.getWritableDatabase(); switch (mUriMacher.match(uri)) { case 0: case 1: long newVidetailId = db.insert(InfoDatabaseHelper.TABLE_NAME, null, values); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(ProviderUtil.VIDETAIL_URI); stringBuilder.append(newVidetailId); return Uri.parse(stringBuilder.toString()); default: return null; } } public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { SQLiteDatabase db = this.mDbHelper.getReadableDatabase(); switch (mUriMacher.match(uri)) { case 0: return db.update(InfoDatabaseHelper.TABLE_NAME, values, selection, selectionArgs); case 1: String videtailId = (String) uri.getPathSegments().get(1); return db.update(InfoDatabaseHelper.TABLE_NAME, values, "id = ?", new String[]{videtailId}); default: return 0; } } public int delete(Uri uri, String selection, String[] selectionArgs) { SQLiteDatabase db = this.mDbHelper.getWritableDatabase(); switch (mUriMacher.match(uri)) { case 0: return db.delete(InfoDatabaseHelper.TABLE_NAME, selection, selectionArgs); case 1: String videtailId = (String) uri.getPathSegments().get(1); return db.delete(InfoDatabaseHelper.TABLE_NAME, "id = ?", new String[]{videtailId}); default: return 0; } } public String getType(Uri uri) { return "video/mp4"; } }
[ "akilesh.t.15@gmail.com" ]
akilesh.t.15@gmail.com
73a837f389c341caad025e24bc3dcc1301a90bcc
005553bcc8991ccf055f15dcbee3c80926613b7f
/generated/pcftest/ProfilerResultsCV.java
870bf1d885756aee400528b51f987967d13a8ccd
[]
no_license
azanaera/toggle-isbtf
5f14209cd87b98c123fad9af060efbbee1640043
faf991ec3db2fd1d126bc9b6be1422b819f6cdc8
refs/heads/master
2023-01-06T22:20:03.493096
2020-11-16T07:04:56
2020-11-16T07:04:56
313,212,938
0
0
null
2020-11-16T08:48:41
2020-11-16T06:42:23
null
UTF-8
Java
false
false
618
java
package pcftest; import gw.lang.SimplePropertyProcessing; import gw.smoketest.platform.web.PCFElement; import gw.smoketest.platform.web.PCFElementId; import gw.testharness.ISmokeTest; import javax.annotation.processing.Generated; @SimplePropertyProcessing @Generated(comments = "FakePathForModalBase.pcf", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator") public class ProfilerResultsCV extends PCFElement { public final static String CHECKSUM = "5ba93bc35bfb372c794cb6f74dc03df7"; public ProfilerResultsCV(ISmokeTest helper, PCFElementId componentId) { super(helper, componentId); } }
[ "azanaera691@gmail.com" ]
azanaera691@gmail.com
faac2b5e43cae88feb413ccb880e0d2bc991b51e
e6a8d9d26f8ade2acbcebaca351018b5ae3ae614
/WebLogin/src/LoginInfo.java
2cca81c9521cc76c67cffbc06978cdd5ec24b9a1
[]
no_license
ruicao93/Java
4e23df14dfa78778d7156bfd59de53dbf52135ee
08c119a3060ace5dac2020ccbc61d24e1ff247e7
refs/heads/master
2021-05-27T08:53:19.422015
2014-08-01T12:57:24
2014-08-01T12:57:24
null
0
0
null
null
null
null
GB18030
Java
false
false
3,873
java
/** * <p>Title: LoginInfo.java</p> * <p>Description: 记录用户的登陆信息,包括txt_LoginID,txt_Password,cookie,__VIEWSTATE,__EVENTVALIDATION</p> * <p>Copyright: Copyright (c) 2011-2012 茗人居</p> * <p>Company: 茗人居</p> * @author CR * @version 1.0 创建时间:2014年4月9日 下午4:43:43 */ public class LoginInfo { private String txt_LoginID; private String txt_Password; private String Cookie; //登陆参数 private String __VIEWSTATE = "/wEPDwUKMTQzNzIwMTA1OA9kFgICAQ9kFgICBw8QZA8WCWYCAQICAgMCBAIFAgYCBwIIFgkQBREt6K+36YCJ5o" + "up5a2m5qChLQUCLTFnEAUU5bGx5Lic5aSn5a2mKOWogea1tykFAjE1ZxAFEueUteWtkOenkeaKgOWkp+WtpgUCMTZnEAUM5Y6m6Zeo5aSn5a2mB" + "QIxN2cQBRLkuK3lm73kurrmsJHlpKflraYFAjIwZxAFEuWMl+S6rOS6pOmAmuWkp+WtpgUCNjBnEAUS5q2m5" + "rGJ55CG5bel5aSn5a2mBQI2M2cQBQ/kuIrmtbfllYblrabpmaIFAjY1ZxAFEuS4reWbveaUv+azleWkp+WtpgUCNjlnZGQYAQUeX19Db250cm9sc1" + "JlcXVpcmVQb3N0QmFja0tleV9fFgEFEGNoa19SZW1QYXNzcHdvcmTyQA+m3XEu7EgOHHNGOfjBnJzW15MsRNz4IPcR1Oc38Q=="; private String __EVENTVALIDATION = "/wEWBQKnxYuLBAK1lMLgCgLS9cL8AgKA8vrfDwKXzJ6eDz8aY9rKClbofNI6IytLG+5MakTIbQ9gVRkvIkLkN6DJ"; //阅览室座位列表参数 private String __VIEWSTATE2 = "/wEPDwUKLTgxNTcwOTg4OQ9kFgICAw9kFgYCBw8QZA8WD2YCAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOFg8QBR/kuJzp" + "maLkuInmpbzljZfoh6rkuaDlrqQzMTYvMzE3BQYxMDEwMDFnEAUb5Lic6Zmi5Zub5qW85oql5YiK6ZiF6KeI5a6kBQYxMDEwMDJnEAUb5Lic6Zmi5L" + "qM5qW85YyX6Ieq5Lmg5a6kMjA5BQYxMDEwMDNnEAUh6KW/6Zmi5LiJ5qW85Lit5paH5Zu+5Lmm6ZiF6KeI5a6kBQYyMDEwMDFnEAUT6KW/6Zmi5YWt5" + "qW85Y2XUzYwOAUGMjAxMDAyZxAFE+ilv+mZouWFrealvOWNl1M2MDcFBjIwMTAwM2cQBRPopb/pmaLlha3mpbzljZdTNjA2BQYyMDEwMDRnEAUT6K" + "W/6Zmi5LiA5qW85Y2XUzEwMQUGMjAxMDA1ZxAFIeilv+mZouWbm+alvOacn+WIiuaKpeWIiumYheiniOWupAUGMjAxMDA2ZxAFE+ilv+mZouS6lOalv" + "OWNl1M1MDcFBjIwMTAwN2cQBRPopb/pmaLlha3mpbzljZdTNjA1BQYyMDEwMDhnEAUV5L2Z5Yy65LqM5qW86ZiF6KeI5a6kBQYzMDEwMDFnEAUV5L2Z" + "5Yy65LiJ5qW86ZiF6KeI5a6kBQYzMDEwMDJnEAUV5L2Z5Yy65Zub5qW86ZiF6KeI5a6kBQYzMDEwMDNnEAUV5L2Z5Yy65LqU5qW86ZiF6KeI5a6kBQYz" + "MDEwMDRnZGQCCQ8WBB4JaW5uZXJodG1sZR4HVmlzaWJsZWhkAgsPPCsACQBkZDf6uZceYdwnaZ4yn76ETPEqcyrS+UqYNyt7oRm/vhXf"; private String __EVENTVALIDATION2 = "/wEWBQLa2MTqDQKP25+PBwKozKffBwKe8pjrCQLbhOG0Ak9zNOyU4XDTa7e7DmnRENXCd3rBAs5BjuKYEzstvJJC"; //预约座位参数 private String __VIEWSTATE3 = "/wEPDwUKLTg4NjQwNjU4Mw9kFgICAw9kFgQCAQ9kFggCAQ8WAh4JaW5uZXJodG1sBRXkvZnljLrkuozmpbzpmIXop4jlrqRkAgMPFgIfAAUDMDAxZAIFDxYCHwAFCTIwMTQvNC8xMWQCBw8WAh8ABQQ4OjAwZAIDD2QWAgIDDxYCHwAFAzAwMWRkaP26z/jxKz1TnXiJ80trfmnoC+dTXZ1Vjd+ryFBHFHU="; private String __EVENTVALIDATION3 = "/wEWAgLlq/jUAgLCi9reA3Qp22av3g52FJmXvsxrYo1ZekiSb90qqKH56q+N1649"; private String selSchool = "63"; //getter and setter public void setTxt_LoginID(String txt_LoginID){ this.txt_LoginID = txt_LoginID; } public void setTxt_Password(String txt_Password){ this.txt_Password = txt_Password; } public void setCookie(String Cookie){ this.Cookie = Cookie; } public void set__VIEWSTATE(String __VIEWSTATE){ this.__VIEWSTATE = __VIEWSTATE; } public void set__EVENTVALIDATION(String __EVENTVALIDATION){ this.__EVENTVALIDATION = __EVENTVALIDATION; } public void setSelSchool(String selSchool){ this.selSchool = selSchool; } public String getTxt_LoginID(){ return txt_LoginID; } public String getTxt_Password(){ return txt_Password; } public String getCookie(){ return Cookie; } public String get__VIEWSTATE(){ return __VIEWSTATE; } public String get__EVENTVALIDATION(){ return __EVENTVALIDATION; } public String get__VIEWSTATE2(){ return __VIEWSTATE; } public String get__EVENTVALIDATION2(){ return __EVENTVALIDATION; } public String get__VIEWSTATE3(){ return __VIEWSTATE; } public String get__EVENTVALIDATION3(){ return __EVENTVALIDATION; } public String getSelSchool(){ return selSchool; } }
[ "704645806@qq.com" ]
704645806@qq.com