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
f42a59e8679c0e9a6f33fc46c37cbea793144488
bc67bd70aaa83b0c8c902defbb928838f5e9b668
/java/1.x/nanocontainer/tags/nanocontainer-1_0-RC-3/container/src/test/org/nanocontainer/aop/Entity.java
810b860ada2700702f79f4013ee4f58e5915efdf
[ "BSD-3-Clause" ]
permissive
codehaus/picocontainer
b07475fe034384926579e2b4f6f25e68f057cae2
7be6b8b0eb33421dc7a755817628e06b79bd879d
refs/heads/master
2023-07-20T01:30:02.348980
2014-10-08T04:44:44
2014-10-08T04:44:44
36,501,409
2
2
null
null
null
null
UTF-8
Java
false
false
831
java
/***************************************************************************** * Copyright (c) PicoContainer Organization. All rights reserved. * * ------------------------------------------------------------------------- * * The software in this package is published under the terms of the BSD * * style license a copy of which has been included with this distribution in * * the LICENSE.txt file. * * * * Idea by Rachel Davies, Original code by various * *****************************************************************************/ package org.nanocontainer.aop; /** * @author Stephen Molitor * @version $Revision$ */ public interface Entity { }
[ "mauro@ac66bb80-72f5-0310-8d68-9f556cfffb23" ]
mauro@ac66bb80-72f5-0310-8d68-9f556cfffb23
a51f1a1411db3415e325329620f2366df094d1d4
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/y/b.java
e206419bd1532d3cf676bd5443ef4dbb1319cffa
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
2,227
java
package com.tencent.mm.y; import com.tencent.mm.modelcdntran.keep_SceneResult; import com.tencent.mm.sdk.platformtools.bi; import java.util.Map; public class b extends d { public String bXu; public String dvN; public String dvO; public String dvP; public String dvQ; public String dvR; public String dvS; public String dvT; public String dvU; public String dvV; public String dvW; public String dvX; public String dvY; public String dvZ; public String dwa; public String dwb; public String dwc; public String dwd; public String dwe; public String dwf; private static String e(Map<String, String> paramMap, String paramString) { return bi.oV((String)paramMap.get(".msg.appmsg.wcpaythirdinfo." + paramString)); } public final d FD() { return new b(); } public final void a(StringBuilder paramStringBuilder, g.a parama, String paramString, keep_SceneResult paramkeep_SceneResult, int paramInt1, int paramInt2) {} public final void a(Map<String, String> paramMap, g.a parama) { if (parama.type == 2002) { this.dvN = e(paramMap, "templateid"); this.dvO = e(paramMap, "senderurl"); this.dvP = e(paramMap, "sendernativeurl"); this.dvQ = e(paramMap, "receiverurl"); this.dvR = e(paramMap, "receivernativeurl"); this.dvS = e(paramMap, "iconurl"); this.dvT = e(paramMap, "miniiconurl"); this.dvU = e(paramMap, "backgroundurl"); this.dvV = e(paramMap, "backgroundname"); this.dvW = e(paramMap, "backgroundcolor"); this.dvX = e(paramMap, "receivertitle"); this.dvY = e(paramMap, "sendertitle"); this.dvZ = e(paramMap, "titlecolor"); this.dwa = e(paramMap, "senderscenetext"); this.dwb = e(paramMap, "receiverscenetext"); this.dwc = e(paramMap, "senderdes"); this.dwd = e(paramMap, "receiverdes"); this.dwe = e(paramMap, "descolor"); this.dwf = e(paramMap, "sceneid"); this.bXu = e(paramMap, "paymsgid"); } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes-dex2jar.jar!/com/tencent/mm/y/b.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
656a6640abf2a201b14f1f6f408e92b4fc105965
5f63a60fd029b8a74d2b1b4bf6992f5e4c7b429b
/com/planet_ink/coffee_mud/Commands/Cloak.java
c17d30261d364b58c7e0ee1290bf7770de3ead15
[ "Apache-2.0" ]
permissive
bozimmerman/CoffeeMud
5da8b5b98c25b70554ec9a2a8c0ef97f177dc041
647864922e07572b1f6c863de8f936982f553288
refs/heads/master
2023-09-04T09:17:12.656291
2023-09-02T00:30:19
2023-09-02T00:30:19
5,267,832
179
122
Apache-2.0
2023-04-30T11:09:14
2012-08-02T03:22:12
Java
UTF-8
Java
false
false
3,254
java
package com.planet_ink.coffee_mud.Commands; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2004-2023 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Cloak extends StdCommand { public Cloak() { } private final String[] access=I(new String[]{"CLOAK"}); @Override public String[] getAccessWords() { return access; } @Override public boolean execute(final MOB mob, final List<String> commands, final int metaFlags) throws java.io.IOException { String str=commands.get(0); if(Character.toUpperCase(str.charAt(0))!='C') commands.add(1,"OFF"); commands.remove(0); final int abilityCode=PhyStats.IS_CLOAKED; str=L("Prop_WizInvis"); Ability A=mob.fetchEffect(str); if(CMParms.combine(commands,0).trim().equalsIgnoreCase("OFF")) { if(A!=null) A.unInvoke(); else mob.tell(L("You are not cloaked!")); return false; } else if(A!=null) { if(CMath.bset(A.abilityCode(),abilityCode)&&(!CMath.bset(A.abilityCode(),PhyStats.IS_NOT_SEEN))) { mob.tell(L("You are already cloaked!")); return false; } } if(A==null) A=CMClass.getAbility(str); if(A!=null) { mob.location().show(mob,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> become(s) cloaked!")); if(mob.fetchEffect(A.ID())==null) mob.addPriorityEffect((Ability)A.copyOf()); A=mob.fetchEffect(A.ID()); if(A!=null) A.setAbilityCode(abilityCode); mob.recoverPhyStats(); mob.location().recoverRoomStats(); mob.tell(L("You may uninvoke CLOAK with 'CLOAK OFF' or 'WIZINV OFF'.")); return false; } mob.tell(L("Cloaking is not available!")); return false; } @Override public boolean canBeOrdered() { return true; } @Override public boolean securityCheck(final MOB mob) { return CMSecurity.isAllowed(mob,mob.location(),CMSecurity.SecFlag.CLOAK); } }
[ "bo@zimmers.net" ]
bo@zimmers.net
d2e3f133728564fd073064955c459267fe2727eb
3b9cf2936abe0bb4d5507853a79d98f2d91af870
/vividus-plugin-excel/src/main/java/org/vividus/bdd/transformer/ExcelTableTransformer.java
24ad1f2727783740a5ccd3c56caf3676a7653537
[ "Apache-2.0" ]
permissive
ALegchilov/vividus
ef8a4906efb0c2ff68fd624fde4d2e6d743bae9b
55bce7d2a7bcf5c43f17d34eb2c190dd6142f552
refs/heads/master
2020-09-08T16:50:21.014816
2019-11-12T10:40:45
2019-11-15T10:10:52
221,188,634
0
0
Apache-2.0
2019-11-12T10:15:40
2019-11-12T10:15:39
null
UTF-8
Java
false
false
4,584
java
/* * Copyright 2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 org.vividus.bdd.transformer; import static java.util.Map.entry; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; import javax.inject.Named; import org.apache.poi.ss.usermodel.Sheet; import org.jbehave.core.model.ExamplesTableProperties; import org.vividus.bdd.util.ExamplesTableProcessor; import org.vividus.excel.ExcelSheetParser; import org.vividus.excel.ExcelSheetsExtractor; import org.vividus.excel.IExcelSheetParser; import org.vividus.excel.IExcelSheetsExtractor; import org.vividus.excel.WorkbookParsingException; @Named("FROM_EXCEL") public class ExcelTableTransformer implements ExtendedTableTransformer { @Override public String transform(String tableAsString, ExamplesTableProperties properties) { checkTableEmptiness(tableAsString); String path = ExtendedTableTransformer.getMandatoryNonBlankProperty(properties, "path"); String sheetName = ExtendedTableTransformer.getMandatoryNonBlankProperty(properties, "sheet"); List<String> result; try { IExcelSheetsExtractor excelSheetsExtractor = new ExcelSheetsExtractor(path); Optional<Sheet> sheet = excelSheetsExtractor.getSheet(sheetName); if (sheet.isEmpty()) { throw new IllegalArgumentException("Sheet with name '" + sheetName + "' does not exist"); } IExcelSheetParser excelSheetParser = new ExcelSheetParser(sheet.get()); String lineBreakReplacementPropertyValue = properties.getProperties().getProperty("lineBreakReplacement"); String lineBreakReplacement = lineBreakReplacementPropertyValue == null ? "" : lineBreakReplacementPropertyValue; result = extractData(excelSheetParser, properties) .stream() .map(e -> e.replace("\n", lineBreakReplacement)) .collect(Collectors.toList()); } catch (WorkbookParsingException e) { throw new IllegalStateException("Error during parsing excel workbook", e); } return build(result, properties); } private List<String> extractData(IExcelSheetParser sheetParser, ExamplesTableProperties properties) { return processCompetingMandatoryProperties(properties, entry("range", range -> extractDataFromRage(sheetParser, properties, range)), entry("addresses", addresses -> extractDataFromAddresses(sheetParser, addresses))); } private List<String> extractDataFromRage(IExcelSheetParser sheetParser, ExamplesTableProperties properties, String range) { List<String> data = sheetParser.getDataFromRange(range); String incrementAsString = properties.getProperties().getProperty("increment"); if (incrementAsString != null) { return IntStream.range(0, data.size()) .filter(n -> n % Integer.parseInt(incrementAsString) == 0) .mapToObj(data::get) .collect(Collectors.toList()); } return data; } private List<String> extractDataFromAddresses(IExcelSheetParser sheetParser, String addresses) { return Stream.of(addresses.split(";")).map(sheetParser::getDataFromCell).collect(Collectors.toList()); } private String build(List<String> data, ExamplesTableProperties properties) { String columnName = ExtendedTableTransformer.getMandatoryNonBlankProperty(properties, "column"); String joinValues = properties.getProperties().getProperty("joinValues"); List<String> columnData = Boolean.parseBoolean(joinValues) ? List.of(String.join(" ", data)) : data; return ExamplesTableProcessor.buildExamplesTableFromColumns(List.of(columnName), List.of(columnData), properties); } }
[ "valfirst@yandex.ru" ]
valfirst@yandex.ru
4f13e105fffb0affe69fef322baca8e7a8b8a60d
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/21/org/apache/commons/math3/transform/FastCosineTransformer_transform_97.java
24896cb40e6c03788ddea5c3ebb1ba0f8157620f
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,366
java
org apach common math3 transform implement fast cosin transform transform dimension real data set refer jame walker fast fourier transform chapter isbn variant discret cosin transform present implement correspond dct normal convent paramet link dct normal dctnormal dct equival dft extens data seri precis hellip data set cosin transform extend data set hellip defin standard dct hellip real data set hellip equal half element dft extend data set hellip sum exp nbsp nbsp nbsp nbsp hellip present implement discret cosin transform fast cosin transform requir length data set power nbsp nbsp nbsp nbsp implicitli assum sampl function version fast cosin transform fastcosinetransform real transform realtransform serializ inherit doc inheritdoc math illeg argument except mathillegalargumentexcept length data arrai power transform transform type transformtyp type math illeg argument except mathillegalargumentexcept type transform type transformtyp forward normal dct normal dctnormal orthogon dct fast math fastmath sqrt length transform util transformutil scale arrai scalearrai fct fct length normal dct normal dctnormal orthogon dct fast math fastmath sqrt transform util transformutil scale arrai scalearrai fct
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
11fd5ad8dd71b37de6f2705a89e53d000010c27b
1358072379743cb0abdc61d6c4cc9de3afbd3889
/IM/src/main/java/test/grs/com/ims/IMApp.java
c2b9625efa9360276224d36be1bf74ebcce73151
[]
no_license
gaoruishan/APP_v1.0
6263d300c0789546c9def4cdda5c1136933a13e4
81d9639b3bcbc7e20192f9df677fb907ebc30a8f
refs/heads/master
2021-04-12T07:49:14.849539
2016-07-22T06:29:38
2016-07-22T06:29:38
63,929,088
2
1
null
null
null
null
UTF-8
Java
false
false
6,924
java
package test.grs.com.ims; import android.app.Application; import android.content.Context; import android.content.Intent; import android.util.Log; import android.widget.Toast; import com.lidroid.xutils.DbUtils; import com.littlec.sdk.CMChatConfig; import com.littlec.sdk.manager.CMIMHelper; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import java.io.File; import test.grs.com.ims.message.BackgroundService; import test.grs.com.ims.message.IMConst; import test.grs.com.ims.message.IMSharedPreferences; /** * Created by gaoruishan on 15/9/25. */ public class IMApp extends Application { private static IMApp mAppInstance; public static Context mContext; private static DbUtils dbUtils; public static boolean isBackGroundServiceRunning = false; public static String currentUserName = ""; public static String currentUserPsw = ""; public static String currentUserAvataUrl=""; public static String currentUserNick=""; public synchronized static IMApp getInstance() { if (mAppInstance == null) { mAppInstance = new IMApp(); } return mAppInstance; } public static void initToIM(Context context) { mContext = context; // mAppInstance = (IMApp) context; //初始化 888877VV 139948en CMIMHelper.getCmAccountManager().init(context, IMConst.APPKEY); initImageLoader(); // NetworkStateReceiver.registerNetworkStateReceiver(this); String string= CMChatConfig.ServerConfig.getIM_HOST()+","+CMChatConfig.ServerConfig.getServerConfigAddress()+","+CMChatConfig.ServerConfig.xmppServiceName+","+CMChatConfig.ServerConfig.getAdapterHost(); Log.e("==initToIM",string+","); } public static void initImageLoader() { //创建默认的ImageLoader配置参数 ImageLoaderConfiguration configuration = ImageLoaderConfiguration .createDefault(mContext); ImageLoader.getInstance().init(configuration); } public synchronized static DbUtils geDbUtils() { //创建数据库 if (dbUtils == null) { File file; if (currentUserName != null) { file = new File(IMConst.GLOBALSTORAGE_DB_PATH); } else { file = new File(IMConst.GLOBALSTORAGE_DB_DEFAULT_PATH); } try { if(!file.exists()){//如果不存在,创建一个; file.mkdirs(); //这里不注释掉以前,三星机器会android java.io.ioexceptionopen failed: ENOTDIR // file.createNewFile(); } DbUtils.DaoConfig config = new DbUtils.DaoConfig(mContext); config.setDbDir(file.getPath()); config.setDbName(currentUserName + "_" + IMConst.APPKEY); //db名 config.setDbVersion(1); //db版本 dbUtils = DbUtils.create(config);//db还有其他的一些构造方法,比如含有更新表版本的监听器的 // dbUtils = DbUtils.create(mContext, file.getPath(), currentUserName + "_" + IMConst.APPKEY); } catch (Exception e) { Log.e("==geDbUtils", ":" + e.toString()); } } return dbUtils; } public void setCurrentUserName(String userName) { this.currentUserName = userName; } public String getCurrentUserName() { return this.currentUserName; } public static void setCurrentAvataUrl(String avataUrl) { currentUserAvataUrl = avataUrl; if (avataUrl!=null&&!avataUrl.isEmpty()){ IMSharedPreferences.putString( IMSharedPreferences.AVATARURL, avataUrl); } } public static String getCurrentAvataUrl() { if (currentUserAvataUrl==null||currentUserAvataUrl.isEmpty()||currentUserAvataUrl.equals(" ")){ currentUserAvataUrl = IMSharedPreferences.getString( IMSharedPreferences.AVATARURL, ""); } return currentUserAvataUrl; } public static void setCurrentUserNick(String avataUrl) { currentUserNick = avataUrl; Log.e("==setCurrentUserNick",currentUserNick+""); if (avataUrl!=null&&!avataUrl.isEmpty()){ IMSharedPreferences.putString( IMSharedPreferences.NICKNAME, avataUrl); } } public static String getCurrentUserNick() { if (currentUserNick==null||currentUserNick.isEmpty()||currentUserNick.equals(" ")){ currentUserNick = IMSharedPreferences.getString( IMSharedPreferences.NICKNAME, ""); } Log.e("==getCurrentUserNick",currentUserNick+""); return currentUserNick; } public void doLogin(String userName, String passWord) { //取保存的数据 if (passWord == null || userName == null) { userName = IMSharedPreferences.getString( IMSharedPreferences.ACCOUNT, null); passWord = IMSharedPreferences.getString( IMSharedPreferences.PASSWORD, null); } Intent serviceIntent = new Intent(mContext, BackgroundService.class); serviceIntent.putExtra("userName", userName.toLowerCase()); serviceIntent.putExtra("passWord", passWord); Log.e("doLogin", userName + "==" + passWord); if (userName != null) { IMApp.currentUserName = userName; IMApp.currentUserPsw = passWord; dbUtils = geDbUtils(); mContext.startService(serviceIntent); } else { Toast.makeText(mContext, "请检查输入的内容", Toast.LENGTH_SHORT).show(); } } public void RedoLogin(){ //和服务器断开连接,重新登录, // BackgroundService.mIsLoginSuccess = false; if (IMApp.currentUserName!=null&&!IMApp.currentUserName.equals("")&&IMApp.currentUserPsw!=null&&!IMApp.currentUserPsw.equals("")){ doLogin(IMApp.currentUserName,IMApp.currentUserPsw); }else { String userName = IMSharedPreferences.getString( IMSharedPreferences.ACCOUNT, null); String passWord = IMSharedPreferences.getString( IMSharedPreferences.PASSWORD, null); if (userName!=null&&passWord!=null){ doLogin(userName,passWord); } } } public void doRegister(){ //退出登录,和服务器断开连接 CMIMHelper.getCmAccountManager().doLogOut(); IMSharedPreferences.deleteString(IMSharedPreferences.ACCOUNT); mContext.stopService(new Intent(mContext, BackgroundService.class)); } @Override public void onTerminate() { super.onTerminate(); Log.e("==IM onTerminate","stopService"); doRegister();//注销 } }
[ "grs0515@163.com" ]
grs0515@163.com
ae77ec4c7c526ce370e7fc4ed55c0fd0d329b5ba
7bbebaffd9e3f5417859d041ad8d341610294d6a
/src/main/java/com/zk/demo/rm/zkclient/idmaker/IDMaker.java
479f977c9b8655495cc51bf3dc57924211671708
[]
no_license
gittgo/ZooKeeper_Demo
c106e98da0556a05d3bd69272b621f44b8ae87e6
49dc7a04645f16be71691ab8331b132a5a4b0308
refs/heads/master
2020-05-17T19:43:38.640564
2019-04-28T15:08:16
2019-04-28T15:08:16
183,923,437
0
0
null
null
null
null
UTF-8
Java
false
false
4,852
java
package com.zk.demo.rm.zkclient.idmaker; import org.I0Itec.zkclient.ZkClient; import org.I0Itec.zkclient.exception.ZkNodeExistsException; import org.I0Itec.zkclient.serialize.BytesPushThroughSerializer; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; /** * 分布式ID生成器 * * @author Gerry * @date 2019/01/06 10:41 */ public class IDMaker { /** ZkClient客户端 */ private ZkClient zkClient = null; /** 客户端要连接的zookeeper地址和端口 */ private final String IPAndPort; /** 创建有序节点的父节点位置 */ private final String ROOT_NODE_PATH = "/idmarker"; /** 创建有序节点的前缀名 */ private final String NODE_PREFIX_NAME = "id-"; /** * 当前客户端的运行状态 * true - 正在运行 * false - 未运行 */ private volatile boolean running = false; /** * 线程池 * 注:引入此变量的目的是为了:异步删除创建的有序节点, * 因为我们只需要得到其名字就行了,并不需要保留创建的节点, * 所以在得到名字后,需要删除创建的节点 */ private ExecutorService executorService = null; /** * 枚举定义,删除节点的方式 */ public enum DeleteNodeWay { /** 不删除 */ NONE, /** 立即删除 */ IMMEDIATELY, /** 使用线程池异步删除(因为异步,所以会有延迟,所以取名为DELAY) */ DELAY } /** * 构造器 */ public IDMaker(String zkServer) { this.IPAndPort = zkServer; } /** * start */ public void start() throws Exception { if (running) throw new Exception("server has stated..."); running = true; init(); } /** * stop */ public void stop() throws Exception { if (!running) throw new Exception("server has stopped..."); running = false; releaseResource(); } /** * 生成ID */ public String generateId(DeleteNodeWay removeMethod) throws Exception { checkRunning(); // 节点路径分隔符 final String SPERATOR = "/"; final String fullNodePath = ROOT_NODE_PATH.concat(SPERATOR).concat(NODE_PREFIX_NAME); final String ourPath = zkClient.createPersistentSequential(fullNodePath, null); if (removeMethod.equals(DeleteNodeWay.IMMEDIATELY)) { System.out.println("立即删除此次创建的持久有序节点!"); zkClient.delete(ourPath); } else if (removeMethod.equals(DeleteNodeWay.DELAY)) { System.out.println("使用线程池异步删除此次创建的持久有序节点!"); executorService.execute(() -> zkClient.delete(ourPath)); } else if (removeMethod.equals(DeleteNodeWay.NONE)) { System.out.println("不删除此次创建的持久有序节点!"); } return ExtractId(ourPath); } /** * 初始化 */ private void init() { // 会话超时时间 final int SESSION_TIMEOUT = 5000; // 连接超时时间 final int CONNECTION_TIMEOUT = 5000; zkClient = new ZkClient(IPAndPort, SESSION_TIMEOUT, CONNECTION_TIMEOUT, new BytesPushThroughSerializer()); executorService = Executors.newFixedThreadPool(5); try { // 初始化时,创建一个节点;后续会在此节点下创建有序节点 zkClient.createPersistent(ROOT_NODE_PATH, true); } catch (ZkNodeExistsException e) { //ignore; } } /** * 释放资源 */ private void releaseResource() { // 关闭线城市 executorService.shutdown(); try { executorService.awaitTermination(2, TimeUnit.SECONDS); } catch (InterruptedException e) { e.printStackTrace(); } finally { executorService = null; } if (zkClient != null) { zkClient.close(); zkClient = null; } } /** * 检查当前客户端是否正在运行 */ private void checkRunning() throws Exception { if (!running) throw new Exception("请先调用start"); } /** * 将形如“/idmarker/id-0000000009”的节点路径提取出形如“0000000009"”的序号 */ private String ExtractId(String str) { System.out.println("要提取ID的原始字符串为:" + str); int index = str.lastIndexOf(NODE_PREFIX_NAME); if (index >= 0) { index += NODE_PREFIX_NAME.length(); return index <= str.length() ? str.substring(index) : ""; } return str; } }
[ "332860608@qq.com" ]
332860608@qq.com
41ff28b75580bf86d9653fdeeee707f13ad801d9
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/84_ifx-framework-org.sourceforge.ifx.framework.pain004.simpletype.BICIdentifier-1.0-5/org/sourceforge/ifx/framework/pain004/simpletype/BICIdentifier_ESTest_scaffolding.java
b49c87e8fe512c38aaf7a1b16236c10119a06d42
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 25 20:20:01 GMT 2019 */ package org.sourceforge.ifx.framework.pain004.simpletype; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class BICIdentifier_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
82c9275b352c380f8f1749cf2e3d28e749ec4d34
6cef7fc78cc935f733f3707fca94776effb94875
/network/kraken-ice/src/main/java/Ice/Callback_Locator_findAdapterById.java
97bb2fd93dd7595decdf168aa303c27233610934
[]
no_license
xeraph/kraken
1a5657d837caeaa8c6c045b24cd309d7184fd5b5
a2b6fe120b5c7d7cde0309ec1d4c3335abef17a1
refs/heads/master
2021-01-20T23:36:48.613826
2013-01-15T01:03:44
2013-01-15T01:03:44
7,766,261
1
0
null
null
null
null
UTF-8
Java
false
false
1,369
java
// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.1 package Ice; // <auto-generated> // // Generated from file `Locator.ice' // // Warning: do not edit this file. // // </auto-generated> /** * Find an adapter by id and return its proxy (a dummy direct * proxy created by the adapter). * **/ public abstract class Callback_Locator_findAdapterById extends Ice.TwowayCallback { public abstract void response(Ice.ObjectPrx __ret); public abstract void exception(Ice.UserException __ex); public final void __completed(Ice.AsyncResult __result) { LocatorPrx __proxy = (LocatorPrx)__result.getProxy(); Ice.ObjectPrx __ret = null; try { __ret = __proxy.end_findAdapterById(__result); } catch(Ice.UserException __ex) { exception(__ex); return; } catch(Ice.LocalException __ex) { exception(__ex); return; } response(__ret); } }
[ "devnull@localhost" ]
devnull@localhost
4e48344ae417535c0a2df510f179fffc70c2556d
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
/Variant Programs/4-4/15/Culpability.java
139941e1e78b45891caa0e7eb678a05577e483c3
[ "MIT" ]
permissive
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
42e4c2061c3f8da0dfce760e168bb9715063645f
a42ced1d5a92963207e3565860cac0946312e1b3
refs/heads/master
2020-08-09T08:10:08.888384
2019-11-25T01:14:23
2019-11-25T01:14:23
214,041,532
0
0
null
null
null
null
UTF-8
Java
false
false
807
java
public class Culpability { private int failuresJuncture; public Culpability(int carelessnessHour, Formalities procedure) { this.failuresJuncture = carelessnessHour; this.preparesOpportunity = carelessnessHour + PermutationYear; this.method = procedure; } private int preparesOpportunity; static double samuelParts = 0.3628136482952087; private static final int PermutationYear = 6; public synchronized int fetchDefectiveBeginning() { double fukkianese = 0.841601595405903; return failuresJuncture; } public synchronized Formalities developProceeding() { double logic = 0.20253761353459188; return method; } private Formalities method; public synchronized int fixPreparingChance() { int thick = -1541079435; return preparesOpportunity; } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
10c5679a5be9fe41e79bf8bab6e90c77c86ffddb
e0e2b50412bdc5742af17607688df722f2359891
/main-silver/lib.profiler/src/org/netbeans/lib/profiler/results/memory/DiffObjAllocCCTNode.java
fe16c8ed7626108b112ad32470bdb2ef5f74552d
[]
no_license
redporrot/nbp-resources
faf4b4662779d038bc8770d3cea38b4f1653d70c
ef8a41ae6ab18dd1cd1460fa99a52757bf98916b
refs/heads/master
2020-04-01T17:24:22.481434
2015-06-12T21:37:01
2015-06-12T21:37:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,926
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2015 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * The Original Software is NetBeans. The Initial Developer of the Original * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun * Microsystems, Inc. All Rights Reserved. * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. */ package org.netbeans.lib.profiler.results.memory; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.netbeans.lib.profiler.results.FilterSortSupport; /** * * @author Jiri Sedlacek */ class DiffObjAllocCCTNode extends PresoObjAllocCCTNode { private final PresoObjAllocCCTNode node1; private final PresoObjAllocCCTNode node2; DiffObjAllocCCTNode(PresoObjAllocCCTNode node1, PresoObjAllocCCTNode node2) { this.node1 = node1; this.node2 = node2; long nCalls1 = node1 == null ? 0 : node1.nCalls; long nCalls2 = node2 == null ? 0 : node2.nCalls; nCalls = nCalls2 - nCalls1; long totalObjSize1 = node1 == null ? 0 : node1.totalObjSize; long totalObjSize2 = node2 == null ? 0 : node2.totalObjSize; totalObjSize = totalObjSize2 - totalObjSize1; PresoObjAllocCCTNode[] children1 = node1 == null ? null : (PresoObjAllocCCTNode[])node1.getChildren(); if (children1 == null) children1 = new PresoObjAllocCCTNode[0]; PresoObjAllocCCTNode[] children2 = node2 == null ? null : (PresoObjAllocCCTNode[])node2.getChildren(); if (children2 == null) children2 = new PresoObjAllocCCTNode[0]; setChildren(computeChildren(children1, children2, this)); } public DiffObjAllocCCTNode createFilteredNode() { DiffObjAllocCCTNode filtered = new DiffObjAllocCCTNode(node1, node2); setupFilteredNode(filtered); return filtered; } public String getNodeName() { if (isFiltered()) return FilterSortSupport.FILTERED_OUT_LBL; return node1 == null ? node2.getNodeName() : node1.getNodeName(); } public String[] getMethodClassNameAndSig() { return node1 == null ? node2.getMethodClassNameAndSig() : node1.getMethodClassNameAndSig(); } public boolean isLeaf() { boolean leaf1 = node1 == null || node1.isLeaf(); boolean leaf2 = node2 == null || node2.isLeaf(); return leaf1 && leaf2; } private static PresoObjAllocCCTNode[] computeChildren(PresoObjAllocCCTNode[] children1, PresoObjAllocCCTNode[] children2, PresoObjAllocCCTNode parent) { Map<String, PresoObjAllocCCTNode> nodes1 = new HashMap(); for (PresoObjAllocCCTNode node : children1) { String name = node.getNodeName(); PresoObjAllocCCTNode sameNode = nodes1.get(name); if (sameNode == null) nodes1.put(name, node); else sameNode.merge(node); } Map<String, PresoObjAllocCCTNode> nodes2 = new HashMap(); for (PresoObjAllocCCTNode node : children2) { String name = node.getNodeName(); PresoObjAllocCCTNode sameNode = nodes2.get(name); if (sameNode == null) nodes2.put(name, node); else sameNode.merge(node); // Merge same-named items } List<PresoObjAllocCCTNode> children = new ArrayList(); for (PresoObjAllocCCTNode node1 : nodes1.values()) { PresoObjAllocCCTNode node2 = nodes2.get(node1.getNodeName()); if (node2 != null) children.add(new DiffObjAllocCCTNode(node1, node2)); else children.add(new DiffObjAllocCCTNode(node1, null)); } for (PresoObjAllocCCTNode node2 : nodes2.values()) { if (!nodes1.containsKey(node2.getNodeName())) children.add(new DiffObjAllocCCTNode(null, node2)); } return children.toArray(new PresoObjAllocCCTNode[children.size()]); } }
[ "doriancuentas@gmail.com" ]
doriancuentas@gmail.com
92328a550f06eb5e39332e779e0ad2894d28eb86
db6e498dd76a6ce78d83e1e7801674783230a90d
/thirdlib/base-protocol/protocol/src/main/java/pb4client/AllianceExchangeRtOrBuilder.java
9a686d562a44c4a6d3648805e83c0ccf0f0b9b4e
[]
no_license
daxingyou/game-4
3d78fb460c4b18f711be0bb9b9520d3e8baf8349
2baef6cebf5eb0991b1f5c632c500b522c41ab20
refs/heads/master
2023-03-19T15:57:56.834881
2018-10-10T06:35:57
2018-10-10T06:35:57
null
0
0
null
null
null
null
UTF-8
Java
false
true
2,260
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: client2server.proto package pb4client; public interface AllianceExchangeRtOrBuilder extends // @@protoc_insertion_point(interface_extends:client2server.AllianceExchangeRt) com.google.protobuf.MessageOrBuilder { /** * <pre> *返回值 * </pre> * * <code>required int32 rt = 1;</code> */ boolean hasRt(); /** * <pre> *返回值 * </pre> * * <code>required int32 rt = 1;</code> */ int getRt(); /** * <pre> *下次可发布需求的时间戳 * </pre> * * <code>optional int32 nextTime = 2;</code> */ boolean hasNextTime(); /** * <pre> *下次可发布需求的时间戳 * </pre> * * <code>optional int32 nextTime = 2;</code> */ int getNextTime(); /** * <pre> *玩家的需求信息 * </pre> * * <code>repeated .client2server.AllianceExchangeDemandInfo demandInfos = 3;</code> */ java.util.List<pb4client.AllianceExchangeDemandInfo> getDemandInfosList(); /** * <pre> *玩家的需求信息 * </pre> * * <code>repeated .client2server.AllianceExchangeDemandInfo demandInfos = 3;</code> */ pb4client.AllianceExchangeDemandInfo getDemandInfos(int index); /** * <pre> *玩家的需求信息 * </pre> * * <code>repeated .client2server.AllianceExchangeDemandInfo demandInfos = 3;</code> */ int getDemandInfosCount(); /** * <pre> *玩家的需求信息 * </pre> * * <code>repeated .client2server.AllianceExchangeDemandInfo demandInfos = 3;</code> */ java.util.List<? extends pb4client.AllianceExchangeDemandInfoOrBuilder> getDemandInfosOrBuilderList(); /** * <pre> *玩家的需求信息 * </pre> * * <code>repeated .client2server.AllianceExchangeDemandInfo demandInfos = 3;</code> */ pb4client.AllianceExchangeDemandInfoOrBuilder getDemandInfosOrBuilder( int index); /** * <pre> *玩家本日已捐赠次数 * </pre> * * <code>optional int32 todayGiveNum = 4;</code> */ boolean hasTodayGiveNum(); /** * <pre> *玩家本日已捐赠次数 * </pre> * * <code>optional int32 todayGiveNum = 4;</code> */ int getTodayGiveNum(); }
[ "weiwei.witch@gmail.com" ]
weiwei.witch@gmail.com
62c60b9a43d806c7ecdf9af429659e5fa64c6fcf
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/51/116.java
3dc37c295852448cbfbafce89cb803e32591cc4e
[ "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,207
java
package <missing>; public class GlobalMembers { public static int Main() { String a = new String(new char[500]); char[][] b = new char[500][6]; String c = new String(new char[6]); int[] m = new int[500]; int n; int i; int j; int k; int e = 0; int f; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { a = tempVar2.charAt(0); } for (i = 0;i <= a.length() - n;i++) { for (j = 0;j < n;j++) { b[i][j] = a.charAt(i + j); } b[i][j] = '\0'; } for (i = 0;i <= a.length() - n;i++) { for (j = 0;j < i;j++) { if (strcmp(b[j],b[i]) == 0) { break; } } if (j == i) { for (k = i + 1;k <= a.length() - n;k++) { if (strcmp(b[k],b[i]) == 0) { m[i] += 1; } } } } for (i = 0;i <= a.length() - n;i++) { if (e < m[i]) { e = m[i]; } } if (e == 0) { System.out.print("NO"); } else { System.out.printf("%d\n",e+1); for (i = 0;i <= a.length() - n;i++) { if (e == m[i]) { System.out.printf("%s\n",b[i]); } } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
5799016e9975c022ce34ff4ed2ba8459c0f8ee3b
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/JX.java
7581583434340b325a3efba92258ddd0de369c95
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
394
java
package defpackage; /* renamed from: JX reason: default package */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public final /* synthetic */ class JX { /* renamed from: a reason: collision with root package name */ public final MX f8294a; public final C4241pV0 b; public JX(MX mx, C4241pV0 pv0) { this.f8294a = mx; this.b = pv0; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
3b33cf243641776f8e8468227e19c17c0ab66ece
621a865f772ccbab32471fb388e20b620ebba6b0
/GameServer/java/net/sf/l2j/loginserver/loginserverpackets/InitLS.java
773f6a30449e686c2870d3261ee98a391355319f
[]
no_license
BloodyDawn/Scions_of_Destiny
5257de035cdb7fe5ef92bc991119b464cba6790c
e03ef8117b57a1188ba80a381faff6f2e97d6c41
refs/heads/master
2021-01-12T00:02:47.744333
2017-04-24T06:30:39
2017-04-24T06:30:39
78,662,280
0
1
null
null
null
null
UTF-8
Java
false
false
1,258
java
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.loginserver.loginserverpackets; import net.sf.l2j.loginserver.LoginServer; import net.sf.l2j.loginserver.serverpackets.ServerBasePacket; /** * @author -Wooden- */ public class InitLS extends ServerBasePacket { // ID 0x00 // format // d proto rev // d key size // b key public InitLS(byte[] publickey) { writeC(0x00); writeD(LoginServer.PROTOCOL_REV); writeD(publickey.length); writeB(publickey); } @Override public byte[] getContent() { return getBytes(); } }
[ "psv71@yandex.ru" ]
psv71@yandex.ru
9fd61a04415e3651fc6ca64a153c8fa2a806c288
2b92302fc02f8034961beb841f13d7d96c1d21d7
/SelfPay-hotel/StaticData/tops-hotel-elong-mongo/src/main/java/com/travelzen/tops/hotel/elong/mongo/entity/staticfile/Image.java
40e5cd8a85cddbfb73de68b5f0c5e69d7232c7c2
[]
no_license
fangleu/tops-hotel
6761fbbaa4984d6e8ea7c9df9a992bf90fd25e3f
6dae9939ab672d920dad7a7f33adbb3ab2fa20ef
refs/heads/master
2021-01-21T04:39:52.045526
2016-07-15T05:24:30
2016-07-15T05:25:38
34,242,862
1
4
null
null
null
null
UTF-8
Java
false
false
758
java
package com.travelzen.tops.hotel.elong.mongo.entity.staticfile; import java.util.List; import com.github.jmkgreen.morphia.annotations.Embedded; @Embedded public class Image { /** * 关联的房型 */ private String roomId; /** * 图片类型 */ private String type; /** * 图片地址 * */ @Embedded private List<ImageLocation> locations; public String getRoomId() { return roomId; } public void setRoomId(String roomId) { this.roomId = roomId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public List<ImageLocation> getLocations() { return locations; } public void setLocations(List<ImageLocation> locations) { this.locations = locations; } }
[ "fanglei.lou@travelzen.com" ]
fanglei.lou@travelzen.com
5b3b68b15e6542494d07787f8301a29642836d20
c79a207f5efdc03a2eecea3832b248ca8c385785
/com.googlecode.jinahya/ocap-api/1.0.1/src/main/java/javax/tv/service/selection/PresentationTerminatedEvent.java
bb611495a737a44a04d747fa6814827d2ed1afe6
[]
no_license
jinahya/jinahya
977e51ac2ad0af7b7c8bcd825ca3a576408f18b8
5aef255b49da46ae62fb97bffc0c51beae40b8a4
refs/heads/master
2023-07-26T19:08:55.170759
2015-12-02T07:32:18
2015-12-02T07:32:18
32,245,127
2
1
null
2023-07-12T19:42:46
2015-03-15T04:34:19
Java
UTF-8
Java
false
false
3,312
java
/* * @(#)PresentationTerminatedEvent.java 1.14 00/08/28 * * Copyright 1998-2000 by Sun Microsystems, Inc., * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. * All rights reserved. * * This software is the confidential and proprietary information * of Sun Microsystems, Inc. ("Confidential Information"). You * shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement * you entered into with Sun. */ package javax.tv.service.selection; /** * <code>PresentationTerminatedEvent</code> is generated when the * presentation of a service terminates. This includes both normal * termination (e.g., due to an application calling the <code>stop()</code> * method) and abnormal termination (e.g., due to some change in the * environment). Examples of abnormal termination include: * * <ul> * <li>a tuning operation making the service unavailable </li> * * <li>removal of fundamental resources required to present the * service</li> * * <li>withdrawal of CA authorization</li> * </ul> * * <code>PresentationTerminatedEvent</code> is also generated * following a <code>SelectionFailedEvent</code> either if the service * context was not previously in the <em>presenting</em> state or if * recovery of what was being presented previously is not possible. * <code>PresentationTerminatedEvent</code> is only generated when no * components of the requested service can be presented. <p> * * Once this event has been generated, a <code>ServiceContext</code> * will be in the <em>not presenting</em> state until a call to a * <code>select()</code> method succeeds. When this event is * generated, all resources used for the presentation have been * released, and <code>ServiceContentHandler</code> instances * presviously associated with the <code>ServiceContext</code> will * have ceased presentation of their content. * * @see SelectionFailedEvent */ public class PresentationTerminatedEvent extends ServiceContextEvent { /** * Reason code : The service vanished from the network. */ public final static int SERVICE_VANISHED = 1; /** * Reason code : Tuning made the service unavailable. */ public final static int TUNED_AWAY = 2; /** * Reason code : Resources needed to present the service have been removed. */ public final static int RESOURCES_REMOVED = 3; /** * Reason code : Access to the service or some component of it has been * withdrawn by the system. An example of this is the end of a free * preview period for IPPV content. */ public final static int ACCESS_WITHDRAWN = 4; /** * Reason code : The user requested that the presentation be stopped. */ public final static int USER_STOP = 5; /** * Constructs the event with a reason code. * * @param source The <code>ServiceContext</code> that generated the event. * @param reason The reason for which the presentation was terminated. * */ public PresentationTerminatedEvent(ServiceContext source, int reason) { super(null); } /** * Reports the reason for which the presentation was terminated. * * @return A reason code for why the presentation was terminated. */ public int getReason() { return 0; } }
[ "onacit@e3df469a-503a-0410-a62b-eff8d5f2b914" ]
onacit@e3df469a-503a-0410-a62b-eff8d5f2b914
c244289399da7d5615536cb4c68427dfe0f21a5d
1efd789f2f4a4e8e280789f95c59afa5426cc4b9
/src/main/java/stu/napls/boostimcenter/service/impl/MessageServiceImpl.java
7f0763d0f423890dab32dd2db890dd6640b34ee1
[ "Apache-2.0" ]
permissive
teimichael/BoostimCenter
faf1d677137ee2d3ed4fabceec4ffc69fced3424
14330881618ac89f2ce8a4996559f26a0d394ae2
refs/heads/master
2021-07-22T18:57:33.132136
2021-01-02T14:17:09
2021-01-02T14:17:09
232,578,493
1
0
null
null
null
null
UTF-8
Java
false
false
867
java
package stu.napls.boostimcenter.service.impl; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import stu.napls.boostimcenter.model.Message; import stu.napls.boostimcenter.repository.MessageRepository; import stu.napls.boostimcenter.service.MessageService; import javax.annotation.Resource; import java.util.List; @Service("messageService") public class MessageServiceImpl implements MessageService { @Resource private MessageRepository messageRepository; @Override public List<Message> findByConversationUuidOrderByTimestamp(String conversationUuid, Pageable pageable) { return messageRepository.findByConversationUuidOrderByTimestampDesc(conversationUuid, pageable); } @Override public Message update(Message message) { return messageRepository.save(message); } }
[ "teimichael@outlook.com" ]
teimichael@outlook.com
aafee08f8bbd3e92db530ef8d44d9ae6e92690fb
f4d96737586cc66a37f2ed0943bf2d36ef56634d
/spring-data-mongodb-processor-shared/src/main/java/net/exacode/spring/data/mongodb/processor/shared/MetaModelExclude.java
ca9529f2e42537838038f20c87f623412160691e
[]
no_license
exacode/spring-data-mongodb-processor
175de3a13ef2b96f8687ed05677444203389a6d5
2b852f1fafaa4757ee12eac8b339285107c3537c
refs/heads/master
2020-03-25T09:16:07.630698
2014-03-15T15:26:37
2014-03-15T15:26:37
12,548,978
2
1
null
null
null
null
UTF-8
Java
false
false
518
java
package net.exacode.spring.data.mongodb.processor.shared; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Identifies a field in a domain object that should not be included in it's * meta model. * */ @Inherited @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.FIELD }) public @interface MetaModelExclude { boolean pathOnly() default false; }
[ "mendelski.pawel@gmail.com" ]
mendelski.pawel@gmail.com
9ebe100ed6b2df607b93cecb96a25585861239ac
1bad8b29b661cde256be8a425f4dfa54b434cf1b
/app/src/main/java/com/zhangwan/app/ui/recommend/mouth/MouthContract.java
0a5f80b10c7eff903e00245f1fe62a67d62d51e1
[]
no_license
EvlinLee/BookProject
78cc99080886356118b8ae551d7d15541a9c3f0d
718dcbf87ac85e4bd0ed826cb9bf25c81a891e2a
refs/heads/master
2020-04-01T13:40:53.900566
2018-06-16T12:31:48
2018-06-16T12:31:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package com.zhangwan.app.ui.recommend.mouth; import com.gxtc.commlibrary.BasePresenter; import com.gxtc.commlibrary.BaseUiView; import com.zhangwan.app.bean.BookBean; import java.util.List; /** * Created by zzg on 2018/3/23. */ public class MouthContract { public interface View extends BaseUiView<Presenter> { public void showMouthData(List<BookBean> datas); public void showCommomData(List<BookBean> datas); } public interface Presenter extends BasePresenter { public void getMouthData(int number, int size); public void getCommomData(int number, int size); } }
[ "17301673845@163.com" ]
17301673845@163.com
28857203a614c5e06f4c58bfdf04c0b27c9302a5
b52fa223f54b51cc271e1cbfc4c28aa76e734718
/flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/ConstantArgumentCount.java
4ea2df7a27e7ec192a151f3f32c6d40ec626476a
[ "ISC", "Apache-2.0", "BSD-3-Clause", "OFL-1.1" ]
permissive
itharavi/flink
1d0b7e711df93d3a13eae42da71a08dc45aaf71f
f0f9343a35ff21017e2406614b34a9b1f2712330
refs/heads/master
2023-08-03T02:53:12.278756
2020-01-08T05:58:54
2020-01-10T15:51:31
233,090,272
3
1
Apache-2.0
2023-07-23T02:28:35
2020-01-10T16:47:58
null
UTF-8
Java
false
false
2,814
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.types.inference; import org.apache.flink.annotation.Internal; import org.apache.flink.util.Preconditions; import java.util.Objects; import java.util.Optional; /** * Helper class for {@link ArgumentCount} with constant boundaries. * * <p>Note: All boundaries of this class are inclusive. */ @Internal public final class ConstantArgumentCount implements ArgumentCount { private static final int OPEN_INTERVAL = -1; private final int minCount; private final int maxCount; private ConstantArgumentCount(int minCount, int maxCount) { this.minCount = minCount; this.maxCount = maxCount; } public static ArgumentCount of(int count) { Preconditions.checkArgument(count >= 0); return new ConstantArgumentCount(count, count); } public static ArgumentCount between(int minCount, int maxCount) { Preconditions.checkArgument(minCount <= maxCount); Preconditions.checkArgument(minCount >= 0); return new ConstantArgumentCount(minCount, maxCount); } public static ArgumentCount from(int minCount) { Preconditions.checkArgument(minCount >= 0); return new ConstantArgumentCount(minCount, OPEN_INTERVAL); } public static ArgumentCount any() { return new ConstantArgumentCount(0, OPEN_INTERVAL); } @Override public boolean isValidCount(int count) { return count >= minCount && (maxCount == OPEN_INTERVAL || count <= maxCount); } @Override public Optional<Integer> getMinCount() { return Optional.of(minCount); } @Override public Optional<Integer> getMaxCount() { if (maxCount == OPEN_INTERVAL) { return Optional.empty(); } return Optional.of(maxCount); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ConstantArgumentCount that = (ConstantArgumentCount) o; return minCount == that.minCount && maxCount == that.maxCount; } @Override public int hashCode() { return Objects.hash(minCount, maxCount); } }
[ "twalthr@apache.org" ]
twalthr@apache.org
3abbda81a808ba3f04a56670ee63018b52213451
d7cc062d6582c6830d425622538275a89eeaa3ba
/kie-wb-tests/kie-wb-tests-rest/src/test/java/org/kie/wb/test/rest/AccessRestTestBase.java
0eaf8d2171b470a6cc18e0905e3fed024a867436
[ "Apache-2.0" ]
permissive
Raxa/kie-wb-distributions
b35afb7e8a8a3f6a4d23930570f1c4099cb5a71b
ac25723d3aa6e8ae445d92d28a247cb00f2cc2f8
refs/heads/master
2021-09-05T11:09:15.617378
2018-01-23T19:25:13
2018-01-23T19:25:13
119,361,907
0
1
null
2018-01-29T09:33:46
2018-01-29T09:33:46
null
UTF-8
Java
false
false
2,447
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.kie.wb.test.rest; import java.util.Arrays; import java.util.Collection; import org.guvnor.rest.client.JobRequest; import org.guvnor.rest.client.JobStatus; import org.junit.runners.Parameterized; import org.kie.wb.test.rest.client.RestWorkbenchClient; import org.kie.wb.test.rest.client.WorkbenchClient; import static org.assertj.core.api.Assertions.*; public abstract class AccessRestTestBase extends RestTestBase { protected final WorkbenchClient roleClient; protected final User user; @Parameterized.Parameters(name = "user: {0}") public static Collection<Object[]> remoteController() { return Arrays.asList(new Object[][]{{User.NO_REST}, {User.REST_PROJECT}}); } public AccessRestTestBase(User user) { this.user = user; roleClient = RestWorkbenchClient.createWorkbenchClient(URL, user.getUserName(), user.getPassword()); } private void assertOperationDoesNotFail(Operation operation) { Object result = operation.execute(); if (result instanceof JobRequest) { JobRequest request = (JobRequest) result; assertThat(request.getStatus()).isIn(JobStatus.ACCEPTED, JobStatus.APPROVED, JobStatus.SUCCESS); } } private void assertOperationFails(Operation operation) { try { operation.execute(); fail("Operation should have failed"); } catch (Exception ex) { assertThat(ex).hasMessageContaining("Forbidden"); } } protected void assertOperation(Operation operation) { if (user.isAuthorized()) { assertOperationDoesNotFail(operation); } else { assertOperationFails(operation); } } @FunctionalInterface protected interface Operation { Object execute(); } }
[ "christian.sadilek@gmail.com" ]
christian.sadilek@gmail.com
196736fd077b2957679db316d32c4631802d6976
fa6a055cfa3e850685fafdd99e1726e57c94b43e
/ws-scim-old/src/main/java/com/wession/scim/test/DemoGWSCIM.java
8ea9d0a387778ff1258edd0360572790012520f8
[]
no_license
sol7442/ws-scim
30c62361a71253ebab53c81c2ccb2244f248e841
4dd4ce0c2e4bc634ca42e4b0b162c7c04657366a
refs/heads/master
2023-01-23T19:45:37.245340
2019-07-05T12:06:45
2019-07-05T12:06:45
149,589,826
0
0
null
2023-01-04T14:56:06
2018-09-20T10:06:44
Java
UTF-8
Java
false
false
3,667
java
package com.wession.scim.test; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import com.wession.common.RESTClient; import com.wession.common.ScimUtils; import com.wession.scim.intf.schemas_name; import com.wession.scim.resource.Group; import com.wession.scim.resource.User; import net.minidev.json.JSONArray; import net.minidev.json.JSONObject; public class DemoGWSCIM implements schemas_name { RESTClient client = new RESTClient(); String URL = "http://localhost:5000/scim/v2.0/"; String Resource = "Users"; String params = "attributes=externalId"; JSONObject json_app_gw = new JSONObject(); JSONObject json_app_bo = new JSONObject(); { // 이부분은 SCIM 서버에서 받아와서 처리될 수 있도록 json_app_gw.put("display", "Groupware"); json_app_gw.put("value", "ce9c1b4e-6993-4558-a5a8-0f79b26cb7b3"); json_app_gw.put("$ref", "http://localhost:5000/scim/v2.0/Groups/ce9c1b4e-6993-4558-a5a8-0f79b26cb7b3"); json_app_bo.put("display", "BuddyOne"); json_app_bo.put("value", "8752fc15-5519-4ff3-af07-1198b0516f90"); json_app_bo.put("$ref", "http://localhost:5000/scim/v2.0/Groups/8752fc15-5519-4ff3-af07-1198b0516f90"); } public static void main(String[] args) { } public void Sync() { ArrayList <String> scim_member_list = new ArrayList <String> (); System.out.println("START Groupware Provisioning"); JSONObject group_gw_json = client.get(URL + "/Groups/" + json_app_gw.getAsString("value")); Group Groupware = new Group(group_gw_json); JSONArray group_members = (JSONArray) Groupware.get("members"); if (group_members == null) group_members = new JSONArray(); Iterator itor_members = group_members.iterator(); ArrayList<HashMap<String, String>> gw_user = new ArrayList<HashMap<String, String>>(); int cnt = 0; while (itor_members.hasNext()) { if (cnt % 50 == 0) System.out.print("."); JSONObject member = (JSONObject) itor_members.next(); String link = member.getAsString("$ref"); link = link.replaceAll("yoursite.com:8080", "localhost:5000"); User scim_user = new User(client.get(link)); String gw_id = ScimUtils.findArray((JSONArray) scim_user.get("emails"), "value"); // System.out.println("Groupware USER : " + scim_user.getAsString("userName") + " - " + gw_id); scim_member_list.add(gw_id); DemoGWBean gw_user_bean = new DemoGWBean( gw_id, scim_user.getAsString(_user_name_display), scim_user.getAsString(_user_title), scim_user.getPhoneNumbers() == null || scim_user.getPhoneNumbers().size() == 0 ? null : scim_user.getPhoneNumbers().get(0), scim_user.getAsString("deptname"), scim_user.getAsString(_user_external_id) ); // 기존에 있는지 확인 DemoGWBean gw_user_db = new DemoGW().getAccount(gw_id); if (gw_user_db != null) { // 기존 계정은 비교해서 변경처리 new DemoGW().updateAccount(gw_user_bean); } else { // 신규 계정은 insert 처리 new DemoGW().insertAccount(gw_user_bean); } cnt++; } // 없어진 계정을 별도로 정리함 ArrayList<DemoGWBean> ghost_account = new DemoGW().findGhostAccount(scim_member_list); // System.out.println(); // System.out.println("Ghost Account ================================="); // System.out.println(); for (int i=0; i<ghost_account.size(); i++) { DemoGWBean g_user = ghost_account.get(i); System.out.println(i + ") " + g_user.getCompanyID() + " / " + g_user.getName() + " / " + g_user.getEmail()); } } }
[ "yongsung.kim@gmail.com" ]
yongsung.kim@gmail.com
af1cab367144b206c618c15a54e057545edbae03
89bedf3e111cdfd7b80f39b2eca3791a0dda276f
/activity_argouml01/org/argouml/uml/notation/java/AttributeNotationJava.java
3be537b006c8089a6a1ad4db482cb1736168e1d9
[ "LicenseRef-scancode-other-permissive", "BSD-3-Clause" ]
permissive
TheProjecter/plea-spl
b80b622fcf4dee6a73ae72db4fc7f4826bef0549
c28b308160c6ef8e68440d90a7710bff270f22c3
refs/heads/master
2020-05-28T14:14:30.727459
2014-10-03T18:43:35
2014-10-03T18:43:35
42,946,066
0
0
null
null
null
null
UTF-8
Java
false
false
4,199
java
// $Id: AttributeNotationJava.java 10514 2006-04-30 16:59:55Z mvw $ // Copyright (c) 2006 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.uml.notation.java; import org.argouml.model.Model; import org.argouml.ui.ProjectBrowser; import org.argouml.uml.notation.AttributeNotation; /** * @author michiel */ public class AttributeNotationJava extends AttributeNotation { /** * The constructor. * * @param attribute the attribute that is represented */ public AttributeNotationJava(Object attribute) { super(attribute); } /** * @see org.argouml.notation.NotationProvider4#getParsingHelp() */ public String getParsingHelp() { // return "parsing.java.help.attribute"; return "Parsing in Java not yet supported"; } /** * @see org.argouml.notation.NotationProvider4#parse(java.lang.String) */ public String parse(String text) { ProjectBrowser.getInstance().getStatusBar().showStatus( "Parsing in Java not yet supported"); return toString(); } /** * @see java.lang.Object#toString() */ public String toString() { StringBuffer sb = new StringBuffer(80); sb.append(NotationUtilityJava.generateVisibility(myAttribute)); sb.append(NotationUtilityJava.generateScope(myAttribute)); sb.append(NotationUtilityJava.generateChangeability(myAttribute)); Object type = Model.getFacade().getType(myAttribute); Object multi = Model.getFacade().getMultiplicity(myAttribute); // handle multiplicity here since we need the type // actually the API of generator is buggy since to generate // multiplicity correctly we need the attribute too if (type != null && multi != null) { if (Model.getFacade().getUpper(multi) == 1) { sb.append(NotationUtilityJava.generateClassifierRef(type)) .append(' '); } else if (Model.getFacade().isADataType(type)) { sb.append(NotationUtilityJava.generateClassifierRef(type)) .append("[] "); } else { sb.append("java.util.Vector "); } } sb.append(Model.getFacade().getName(myAttribute)); Object init = Model.getFacade().getInitialValue(myAttribute); if (init != null) { String initStr = NotationUtilityJava.generateExpression(init).trim(); if (initStr.length() > 0) { sb.append(" = ").append(initStr); } } return sb.toString(); } }
[ "demost@gmail.com" ]
demost@gmail.com
a565adc5f6b6e289431392d4b88fafd827a3a3c4
89904f6c80aab728d197f879b5a0167f7198ea96
/integration-tests/gradle/src/test/java/io/quarkus/gradle/devmode/ImplementationFilesDevModeTest.java
699d9c59aecece954b89118b3864224fd3073ccc
[ "Apache-2.0" ]
permissive
loicmathieu/quarkus
54b27952bbdbf16772ce52086bed13165a6c0aec
f29b28887af4b50e7484dd1faf252b15f1a9f61a
refs/heads/main
2023-08-30T23:58:38.586507
2022-11-10T15:01:09
2022-11-10T15:01:09
187,598,844
3
1
Apache-2.0
2023-03-02T20:56:56
2019-05-20T08:23:48
Java
UTF-8
Java
false
false
881
java
package io.quarkus.gradle.devmode; import static org.assertj.core.api.Assertions.assertThat; import com.google.common.collect.ImmutableMap; public class ImplementationFilesDevModeTest extends QuarkusDevGradleTestBase { @Override protected String projectDirectoryName() { return "implementation-files"; } @Override protected String[] buildArguments() { return new String[] { "clean", ":common:build", ":application:quarkusDev", "-s" }; } protected void testDevMode() throws Exception { assertThat(getHttpResponse("/hello")).contains("hello common"); replace("application/src/main/java/org/acme/quarkus/sample/HelloResource.java", ImmutableMap.of("return \"hello \" + common.getName();", "return \"hi \" + common.getName();")); assertUpdatedResponseContains("/hello", "hi common"); } }
[ "olubyans@redhat.com" ]
olubyans@redhat.com
4c623d7742088e5aa424654bd22d16070084db1d
6722a5dedccb83bebd3568c690e95b84bde587db
/java_0731/MergeTwoLists.java
972f6d38b6655c3bcdeb6e6ee4ca4492fc53e406
[]
no_license
YYxxxiiii/JavaSE2
7d36c91b467ea340fdc3d68672425ef1521c4b7b
452f32fac1b953bb9c3a1e4993da46fa477c85c1
refs/heads/master
2023-04-17T21:57:49.224979
2021-04-20T14:19:25
2021-04-20T14:19:25
280,579,496
0
0
null
null
null
null
UTF-8
Java
false
false
1,243
java
package java_0731; /** * 21. 合并两个有序链表 * 将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 * 示例: * 输入:1->2->4, 1->3->4 * 输出:1->1->2->3->4->4 */ public class MergeTwoLists { public ListNode mergeTwoLists(ListNode l1, ListNode l2) { if (l1 == null && l2 == null) { return null; } if (l1 == null) { return l2; } if (l2 == null) { return l1; } ListNode newHead = new ListNode(-1); ListNode newTail = newHead; ListNode cur1 = l1; ListNode cur2 = l2; while (cur1 != null && cur2 != null) { if (cur1.val < cur2.val) { newTail.next = new ListNode(cur1.val); newTail = newTail.next; cur1 = cur1.next; } else { newTail.next = new ListNode(cur2.val); newTail = newTail.next; cur2 = cur2.next; } } if (cur1 == null) { newTail.next = cur2; } else { newTail.next = cur1; } return newHead.next; } }
[ "axii_@outlook.com" ]
axii_@outlook.com
d6a8e15990f55f4333163257c806a49d3688013e
2c42d04cba77776514bc15407cd02f6e9110b554
/src/org/processmining/analysis/epc/FinalEventSetSelectorPanel.java
df3ecf328305c9102c82db5895721cd96bd38fe5
[]
no_license
pinkpaint/BPMNCheckingSoundness
7a459b55283a0db39170c8449e1d262e7be21e11
48cc952d389ab17fc6407a956006bf2e05fac753
refs/heads/master
2021-01-10T06:17:58.632082
2015-06-22T14:58:16
2015-06-22T14:58:16
36,382,761
0
1
null
2015-06-14T10:15:32
2015-05-27T17:11:29
null
UTF-8
Java
false
false
7,447
java
/*********************************************************** * This software is part of the ProM package * * http://www.processmining.org/ * * * * Copyright (c) 2003-2006 TU/e Eindhoven * * and is licensed under the * * Common Public License, Version 1.0 * * by Eindhoven University of Technology * * Department of Information Systems * * http://is.tm.tue.nl * * * **********************************************************/ package org.processmining.analysis.epc; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTable; import javax.swing.ListSelectionModel; import org.processmining.framework.models.ModelGraphPanel; import org.processmining.framework.models.epcpack.EPCEvent; import org.processmining.framework.models.petrinet.Place; import org.processmining.framework.models.petrinet.State; import org.processmining.framework.ui.DoubleClickTable; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class FinalEventSetSelectorPanel extends JPanel { private ArrayList finalStatesToKeep; private ArrayList finalStatesToRemove; private ModelGraphPanel graphPanel; protected HashMap setToState; private SetTableModel keepGridModel; private SetTableModel removeGridModel; private JButton keepShowButton; private JButton keepTransferButton; private JButton removeShowButton; private JButton removeTransferButton; JSplitPane jSplitPaneMain = new JSplitPane(); public FinalEventSetSelectorPanel(ArrayList finalStatesToKeep, ArrayList finalStatesToRemove, ModelGraphPanel panel) { this.finalStatesToKeep = finalStatesToKeep; this.finalStatesToRemove = finalStatesToRemove; this.graphPanel = panel; try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { keepGridModel = new SetTableModel("<html>Final states <br>to keep</html>"); removeGridModel = new SetTableModel("<html>Final states <br>to ignore</html>"); setToState = new HashMap(); // Fill the keep table int i = 0; Iterator it = finalStatesToKeep.iterator(); while (it.hasNext()) { State s = (State) it.next(); HashSet set = new HashSet(); int tokens = 0; Iterator it2 = s.iterator(); while (it2.hasNext()) { Place p = (Place) it2.next(); if (p.getIdentifier().startsWith(EPCCorrectnessCheckerUI.COUNTER)) { continue; } tokens += s.getOccurances(p); EPCEvent e = ((EPCEvent) p.object); if (e != null) { set.add(((HashSet) e.object2).iterator().next()); } } if (!set.isEmpty()) { set.add(new Integer(i)); keepGridModel.add(set, "Set " + i++ +" e: " + (set.size() - 1) + " t: " + tokens); setToState.put(set, s); } } // Fill the remove table it = finalStatesToRemove.iterator(); while (it.hasNext()) { State s = (State) it.next(); HashSet set = new HashSet(); int tokens = 0; Iterator it2 = s.iterator(); while (it2.hasNext()) { Place p = (Place) it2.next(); if (p.getIdentifier().startsWith(EPCCorrectnessCheckerUI.COUNTER)) { continue; } tokens += s.getOccurances(p); EPCEvent e = ((EPCEvent) p.object); if (e != null) { set.add(((HashSet) e.object2).iterator().next()); } } if (!set.isEmpty()) { set.add(new Integer(i)); removeGridModel.add(set, "Set " + i++ +" e: " + set.size() + " t: " + tokens); setToState.put(set, s); } } setLayout(new BorderLayout()); jSplitPaneMain.setOrientation(JSplitPane.HORIZONTAL_SPLIT); // Start the right panel JPanel rightPanel = new JPanel(new BorderLayout()); keepShowButton = new JButton("Show"); JTable keepGrid = new DoubleClickTable(keepShowButton); keepGrid.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); keepGrid.setModel(keepGridModel); keepShowButton.addActionListener(new ShowStateButtonActionListener(keepGrid, graphPanel)); JPanel keepButtonPanel = new JPanel(new GridLayout(2, 1)); keepButtonPanel.add(keepShowButton); JScrollPane keepGridScrollPane = new JScrollPane(keepGrid); removeShowButton = new JButton("Show"); JTable removeGrid = new DoubleClickTable(removeShowButton); removeGrid.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); removeGrid.setModel(removeGridModel); keepTransferButton = new JButton("<<<"); keepTransferButton.addActionListener(new TransferButtonActionListener(keepGrid, removeGrid)); keepButtonPanel.add(keepTransferButton); rightPanel.add(keepGridScrollPane, BorderLayout.CENTER); rightPanel.add(keepButtonPanel, BorderLayout.SOUTH); jSplitPaneMain.add(rightPanel, JSplitPane.RIGHT); // Finished the right panel // Start the right panel JPanel leftPanel = new JPanel(new BorderLayout()); JScrollPane removeGridScrollPane = new JScrollPane(removeGrid); JPanel removeButtonPanel = new JPanel(new GridLayout(2, 1)); removeShowButton.addActionListener(new ShowStateButtonActionListener(removeGrid, graphPanel)); removeButtonPanel.add(removeShowButton); removeTransferButton = new JButton(">>>"); removeTransferButton.addActionListener(new TransferButtonActionListener(removeGrid, keepGrid)); removeButtonPanel.add(removeTransferButton); leftPanel.add(removeGridScrollPane, BorderLayout.CENTER); leftPanel.add(removeButtonPanel, BorderLayout.SOUTH); jSplitPaneMain.add(leftPanel, JSplitPane.LEFT); jSplitPaneMain.setResizeWeight(0.5); // Finished the right panel add(jSplitPaneMain, BorderLayout.CENTER); } public ArrayList getCorrectFinalStates() { ArrayList r = new ArrayList(); for (int i = 0; i < keepGridModel.getRowCount(); i++) { r.add(setToState.get(keepGridModel.getSet(i))); } return r; } } class TransferButtonActionListener implements ActionListener { private JTable source; private JTable target; private SetTableModel sourceModel; private SetTableModel targetModel; public TransferButtonActionListener(JTable source, JTable target) { this.source = source; this.target = target; this.sourceModel = (SetTableModel) source.getModel(); this.targetModel = (SetTableModel) target.getModel(); } public void actionPerformed(ActionEvent e) { int i = source.getSelectedRow(); if (i != -1) { targetModel.add(sourceModel.getSet(i), sourceModel.getName(i)); sourceModel.remove(i); } } } class ShowStateButtonActionListener implements ActionListener { private JTable table; private ModelGraphPanel panel; public ShowStateButtonActionListener(JTable table, ModelGraphPanel panel) { this.table = table; this.panel = panel; } public void actionPerformed(ActionEvent e) { panel.unSelectAll(); if (table.getSelectedRow() != -1) { panel.selectElements(((SetTableModel) table.getModel()).getSet(table.getSelectedRow())); } } }
[ "pinkpaint.ict@gmail.com" ]
pinkpaint.ict@gmail.com
da70e9688386033e3409ef7fc5659ef132873b0c
1be6e27b6ad97d3b3559d815140426018335dcc1
/gajigaksek-backend/src/main/java/com/gjgs/gjgs/infra/config/db/DbProperty.java
becf6bb85b26987eb49079adc8a5d261d7157332
[]
no_license
JoeCP17/gjgs
0711cff1f19193e07a5500891a4d65410e504834
5c5365de794e9bfc20257dc436161b8bd42ce119
refs/heads/master
2023-08-29T04:55:38.010327
2021-11-08T08:08:13
2021-11-08T08:08:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package com.gjgs.gjgs.infra.config.db; import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; import java.util.List; @Getter @Setter @Component @ConfigurationProperties("spring.datasource") @Profile("prod") public class DbProperty { private String url; private List<Slave> slaveList; private String driverClassName; private String username; private String password; @Getter @Setter public static class Slave { private String name; private String url; } }
[ "cjs1863@gmail.com" ]
cjs1863@gmail.com
92ce2f60b940923025d13e1da2f523bbf405e1bd
45c221ad829c8a848dd889338e7a9394c6e29f83
/src/main/java/com/igomall/service/impl/AdminServiceImpl.java
ff2db299cee27e596a79509795b139c159fb2d26
[]
no_license
wyxhd2008/shop_v6_index
ac2c7bc229237f2c05afa36aa0d877bd8c52658f
94d44931af80535eb98d1cf8d49a2d3ec8a7ad82
refs/heads/master
2022-11-06T06:38:29.410277
2020-06-21T23:36:19
2020-06-21T23:36:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,975
java
package com.igomall.service.impl; import java.util.HashSet; import java.util.Set; import javax.annotation.Resource; import org.apache.commons.lang3.StringUtils; import org.springframework.cache.annotation.CacheEvict; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import com.igomall.dao.AdminDao; import com.igomall.entity.Admin; import com.igomall.entity.Role; import com.igomall.entity.User; import com.igomall.service.AdminService; /** * Service - 管理员 * * @author 好源++ Team * @version 6.1 */ @Service public class AdminServiceImpl extends BaseServiceImpl<Admin, Long> implements AdminService { @Resource private AdminDao adminDao; @Override @Transactional(readOnly = true) public Admin getUser(Object principal) { Assert.notNull(principal, "[Assertion failed] - principal is required; it must not be null"); Assert.isInstanceOf(String.class, principal); return findByUsername(String.valueOf(principal)); } @Override @Transactional(readOnly = true) public Set<String> getPermissions(User user) { Assert.notNull(user, "[Assertion failed] - user is required; it must not be null"); Assert.isInstanceOf(Admin.class, user); Admin admin = adminDao.find(user.getId()); Set<String> result = new HashSet<>(); if (admin != null && admin.getRoles() != null) { for (Role role : admin.getRoles()) { if (role.getPermissions() != null) { result.addAll(role.getPermissions()); } } } return result; } @Override @Transactional(readOnly = true) public boolean supports(Class<?> userClass) { return userClass != null && Admin.class.isAssignableFrom(userClass); } @Override @Transactional(readOnly = true) public boolean usernameExists(String username) { return adminDao.exists("username", StringUtils.lowerCase(username)); } @Override @Transactional(readOnly = true) public Admin findByUsername(String username) { return adminDao.find("username", StringUtils.lowerCase(username)); } @Override @Transactional(readOnly = true) public boolean emailExists(String email) { return adminDao.exists("email", StringUtils.lowerCase(email)); } @Override @Transactional(readOnly = true) public boolean emailUnique(Long id, String email) { return adminDao.unique(id, "email", StringUtils.lowerCase(email)); } @Override @Transactional(readOnly = true) public Admin findByEmail(String email) { return adminDao.find("email", StringUtils.lowerCase(email)); } @Override @Transactional(readOnly = true) public boolean mobileExists(String mobile) { return adminDao.exists("mobile", StringUtils.lowerCase(mobile)); } @Override @Transactional(readOnly = true) public boolean mobileUnique(Long id, String mobile) { return adminDao.unique(id, "mobile", StringUtils.lowerCase(mobile)); } @Override @Transactional(readOnly = true) public Admin findByMobile(String mobile) { return adminDao.find("mobile", StringUtils.lowerCase(mobile)); } @Override @Transactional @CacheEvict(value = "authorization", allEntries = true) public Admin save(Admin admin) { return super.save(admin); } @Override @Transactional @CacheEvict(value = "authorization", allEntries = true) public Admin update(Admin admin) { return super.update(admin); } @Override @Transactional @CacheEvict(value = "authorization", allEntries = true) public Admin update(Admin admin, String... ignoreProperties) { return super.update(admin, ignoreProperties); } @Override @Transactional @CacheEvict(value = "authorization", allEntries = true) public void delete(Long id) { super.delete(id); } @Override @Transactional @CacheEvict(value = "authorization", allEntries = true) public void delete(Long... ids) { super.delete(ids); } @Override @Transactional @CacheEvict(value = "authorization", allEntries = true) public void delete(Admin admin) { super.delete(admin); } }
[ "a12345678" ]
a12345678
924a353da14d87cc500c37b419e4cf7a522ea620
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/86/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateRealOptimizer_setConvergenceChecker_151.java
04d21b1f34e56af088a1de4663e41b71ef2d688e
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
714
java
org apach common math optim special implement link differenti multivari real optim differentiablemultivariaterealoptim ad multi start featur exist optim wrap classic optim time turn start point order avoid trap local extremum global version revis date multi start differenti multivari real optim multistartdifferentiablemultivariaterealoptim inherit doc inheritdoc set converg checker setconvergencecheck real converg checker realconvergencecheck checker optim set converg checker setconvergencecheck checker
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
088a304d714163972eb7b2f7599ac1b8d7725261
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-39b-1-21-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/StringUtils_ESTest_scaffolding.java
43b0cef92b7fae5213f797a2325a1eee49563aa6
[]
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
1,920
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 08 08:18:36 UTC 2020 */ package org.apache.commons.lang3; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class StringUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.StringUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StringUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang3.StringUtils" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
89a723581e8d1cd5e63555edd117b9fbb0d969e1
114fb922fda1a339a452c3e1a4ba031e81aabd7e
/src/main/java/no/ica/fraf/dao/hibernate/SpeiletKostnadDAOHibernate.java
2b8a7f6a34c837383aa655fcfbc3e0e94546683b
[]
no_license
abrekka/fraf
bfb788b0db784925c998dcc844957657efa79fae
f8995ff2b0fece657017224a112f79cf3eb11e7d
refs/heads/master
2021-01-22T14:45:09.740555
2015-07-31T09:07:00
2015-07-31T09:07:00
39,994,857
0
0
null
null
null
null
UTF-8
Java
false
false
5,608
java
package no.ica.fraf.dao.hibernate; import java.util.Date; import java.util.List; import no.ica.fraf.dao.SpeiletKostnadDAO; import no.ica.fraf.model.Avdeling; import no.ica.fraf.model.SpeiletBetingelse; import no.ica.fraf.model.SpeiletKostnad; import org.hibernate.Criteria; import org.hibernate.Hibernate; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.criterion.Restrictions; import org.springframework.orm.ObjectRetrievalFailureException; import org.springframework.orm.hibernate3.HibernateCallback; /** * Implementasjon av SpeiletKostnadDAO for Hibernate * * @author abr99 * */ public class SpeiletKostnadDAOHibernate extends BaseDAOHibernate<SpeiletKostnad> implements SpeiletKostnadDAO { public SpeiletKostnadDAOHibernate() { super(SpeiletKostnad.class); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#findFakturaPostIdBySpeiletBetingelse(no.ica.fraf.model.SpeiletBetingelse) */ public List findFakturaPostIdBySpeiletBetingelse( final SpeiletBetingelse speiletBetingelse) { return (List) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { return session .createQuery( "select speiletKostnad.fakturaPostId from SpeiletKostnad speiletKostnad where speiletKostnad.speiletBetingelse = :speiletBetingelse") .setParameter("speiletBetingelse", speiletBetingelse) .list(); } }); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#saveSpeiletKostnad(no.ica.fraf.model.SpeiletKostnad) */ public void saveSpeiletKostnad(final SpeiletKostnad speiletKostnad) { getHibernateTemplate().saveOrUpdate(speiletKostnad); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#findByAvdnrDate(java.lang.Integer, * java.util.Date) */ @SuppressWarnings("unchecked") public List<SpeiletKostnad> findByAvdnrDate(final Integer avdnr, final Date date) { return (List) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { Criteria crit = session.createCriteria(SpeiletKostnad.class); if (date != null) { crit.add(Restrictions.le("fraDato", date)).add( Restrictions.ge("tilDato", date)); } if (avdnr != null) { crit.createCriteria("speiletBetingelse").createCriteria( "avdeling").add(Restrictions.like("avdnr", avdnr)); } return crit.list(); } }); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#findByBunt(java.lang.Integer) */ @SuppressWarnings("unchecked") public List<SpeiletKostnad> findByBunt(final Integer buntId) { return (List) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { return session.createCriteria(SpeiletKostnad.class) .createCriteria("innlesBunt").add( Restrictions.like("buntId", buntId)).list(); } }); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#findByDepartment(no.ica.fraf.model.Avdeling) */ @SuppressWarnings("unchecked") public List<SpeiletKostnad> findByDepartment(final Avdeling avdeling) { return (List<SpeiletKostnad>) getHibernateTemplate().execute( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { List<SpeiletKostnad> list =session.createCriteria(SpeiletKostnad.class) .createCriteria("speiletBetingelse") .add(Restrictions.like("avdeling", avdeling)) .list(); if(list!=null){ for(SpeiletKostnad speiletKostnad:list){ //speiletKostnad.getFakturaBunt(); Hibernate.initialize(speiletKostnad.getFakturaBunt()); } } return list; } }); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#removeSpeiletKostnad(java.lang.Integer) */ public void removeSpeiletKostnad(final Integer kostnadId) { final SpeiletKostnad temp = getSpeiletKostnad(kostnadId); getHibernateTemplate().delete(temp); } /** * @see no.ica.fraf.dao.SpeiletKostnadDAO#getSpeiletKostnad(java.lang.Integer) */ public SpeiletKostnad getSpeiletKostnad(final Integer kostnadId) { final SpeiletKostnad speiletKostnad = (SpeiletKostnad) getHibernateTemplate() .get(SpeiletKostnad.class, kostnadId); if (speiletKostnad == null) { throw new ObjectRetrievalFailureException(SpeiletKostnad.class, kostnadId); } return speiletKostnad; } }
[ "atle@brekka.no" ]
atle@brekka.no
a3472c8d33b91a67a0707904e1ce23e06620248f
017578d7fd1d0f64b7c61815d788b418c47ea319
/flyway-core/src/main/java/org/flywaydb/core/internal/dbsupport/oracle/OracleDbSupport.java
6cec6a06b975875ce53712a7b31cd4f6df587f97
[ "Apache-2.0" ]
permissive
rajithd/flyway
32e918cdd725d47af1d99794ae7cc55d5971a614
77a15e5132cc412bb894e5977413d709f084c821
refs/heads/master
2021-01-24T15:52:45.935975
2015-10-27T19:49:46
2015-10-27T19:49:46
45,093,916
0
1
null
2015-10-28T06:39:54
2015-10-28T06:39:54
null
UTF-8
Java
false
false
2,391
java
/** * Copyright 2010-2015 Axel Fontaine * * 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.flywaydb.core.internal.dbsupport.oracle; import org.flywaydb.core.internal.dbsupport.DbSupport; import org.flywaydb.core.internal.dbsupport.JdbcTemplate; import org.flywaydb.core.internal.dbsupport.Schema; import org.flywaydb.core.internal.dbsupport.SqlStatementBuilder; import java.sql.Connection; import java.sql.SQLException; import java.sql.Types; /** * Oracle-specific support. */ public class OracleDbSupport extends DbSupport { /** * Creates a new instance. * * @param connection The connection to use. */ public OracleDbSupport(Connection connection) { super(new JdbcTemplate(connection, Types.VARCHAR)); } public String getDbName() { return "oracle"; } public String getCurrentUserFunction() { return "USER"; } @Override protected String doGetCurrentSchemaName() throws SQLException { return jdbcTemplate.queryForString("SELECT USER FROM dual"); } @Override protected void doChangeCurrentSchemaTo(String schema) throws SQLException { jdbcTemplate.execute("ALTER SESSION SET CURRENT_SCHEMA=" + schema); } public boolean supportsDdlTransactions() { return false; } public String getBooleanTrue() { return "1"; } public String getBooleanFalse() { return "0"; } public SqlStatementBuilder createSqlStatementBuilder() { return new OracleSqlStatementBuilder(); } @Override public String doQuote(String identifier) { return "\"" + identifier + "\""; } @Override public Schema getSchema(String name) { return new OracleSchema(jdbcTemplate, this, name); } @Override public boolean catalogIsSchema() { return false; } }
[ "business@axelfontaine.com" ]
business@axelfontaine.com
ee26ada1535243200c344aaf46f66a8afea94262
5d76b555a3614ab0f156bcad357e45c94d121e2d
/src-v2/com/google/android/gms/internal/ie.java
c8998655718dd7ee64e74f773acfc4fe31bf5e23
[]
no_license
BinSlashBash/xcrumby
8e09282387e2e82d12957d22fa1bb0322f6e6227
5b8b1cc8537ae1cfb59448d37b6efca01dded347
refs/heads/master
2016-09-01T05:58:46.144411
2016-02-15T13:23:25
2016-02-15T13:23:25
51,755,603
5
1
null
null
null
null
UTF-8
Java
false
false
5,163
java
/* * Decompiled with CFR 0_110. * * Could not load the following classes: * android.os.Parcel */ package com.google.android.gms.internal; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.internal.ga; import com.google.android.gms.internal.ic; import com.google.android.gms.internal.if; import com.google.android.gms.plus.model.moments.ItemScope; import com.google.android.gms.plus.model.moments.Moment; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public final class ie extends ga implements SafeParcelable, Moment { public static final if CREATOR = new if(); private static final HashMap<String, ga.a<?, ?>> UI = new HashMap(); private String Rd; private final Set<Integer> UJ; private ic VE; private ic VF; private String Vw; private String wp; private final int xH; static { UI.put("id", ga.a.j("id", 2)); UI.put("result", ga.a.a("result", 4, ic.class)); UI.put("startDate", ga.a.j("startDate", 5)); UI.put("target", ga.a.a("target", 6, ic.class)); UI.put("type", ga.a.j("type", 7)); } public ie() { this.xH = 1; this.UJ = new HashSet<Integer>(); } ie(Set<Integer> set, int n2, String string2, ic ic2, String string3, ic ic3, String string4) { this.UJ = set; this.xH = n2; this.wp = string2; this.VE = ic2; this.Vw = string3; this.VF = ic3; this.Rd = string4; } public ie(Set<Integer> set, String string2, ic ic2, String string3, ic ic3, String string4) { this.UJ = set; this.xH = 1; this.wp = string2; this.VE = ic2; this.Vw = string3; this.VF = ic3; this.Rd = string4; } @Override protected boolean a(ga.a a2) { return this.UJ.contains(a2.ff()); } @Override protected Object aq(String string2) { return null; } @Override protected boolean ar(String string2) { return false; } @Override protected Object b(ga.a a2) { switch (a2.ff()) { default: { throw new IllegalStateException("Unknown safe parcelable id=" + a2.ff()); } case 2: { return this.wp; } case 4: { return this.VE; } case 5: { return this.Vw; } case 6: { return this.VF; } case 7: } return this.Rd; } public int describeContents() { if if_ = CREATOR; return 0; } @Override public HashMap<String, ga.a<?, ?>> eY() { return UI; } public boolean equals(Object object) { if (!(object instanceof ie)) { return false; } if (this == object) { return true; } object = (ie)object; for (ga.a a2 : UI.values()) { if (this.a(a2)) { if (object.a(a2)) { if (this.b(a2).equals(object.b(a2))) continue; return false; } return false; } if (!object.a(a2)) continue; return false; } return true; } @Override public /* synthetic */ Object freeze() { return this.jt(); } @Override public String getId() { return this.wp; } @Override public ItemScope getResult() { return this.VE; } @Override public String getStartDate() { return this.Vw; } @Override public ItemScope getTarget() { return this.VF; } @Override public String getType() { return this.Rd; } int getVersionCode() { return this.xH; } @Override public boolean hasId() { return this.UJ.contains(2); } @Override public boolean hasResult() { return this.UJ.contains(4); } @Override public boolean hasStartDate() { return this.UJ.contains(5); } @Override public boolean hasTarget() { return this.UJ.contains(6); } @Override public boolean hasType() { return this.UJ.contains(7); } public int hashCode() { Iterator iterator = UI.values().iterator(); int n2 = 0; while (iterator.hasNext()) { ga.a a2 = iterator.next(); if (!this.a(a2)) continue; int n3 = a2.ff(); n2 = this.b(a2).hashCode() + (n2 + n3); } return n2; } @Override public boolean isDataValid() { return true; } Set<Integer> ja() { return this.UJ; } ic jr() { return this.VE; } ic js() { return this.VF; } public ie jt() { return this; } public void writeToParcel(Parcel parcel, int n2) { if if_ = CREATOR; if.a(this, parcel, n2); } }
[ "binslashbash@otaking.top" ]
binslashbash@otaking.top
e0cb41c8cb1727dab19bb646dd0c48f3dfa86eb0
6954bfa848c1cd64acf51b074cbce67d798d697a
/src/test/java/com/github/vindell/jmxutils/JMXInfo_Test.java
4f04847b2c4ada08d28d6d0761aacd5b5fe7458a
[ "Apache-2.0" ]
permissive
hiwepy/jmxutils
53a722a22be14204010815c3e0f955a2c21cb427
c60a9a11b82c5eb02c79315002f93563040713ea
refs/heads/master
2020-03-11T13:49:37.596731
2018-04-18T11:36:21
2018-04-18T11:36:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,182
java
/* * Copyright (c) 2010-2020, vindell (https://github.com/vindell). * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.github.vindell.jmxutils; import java.util.List; import java.util.Map; import com.github.vindell.jmxutils.CapacityUtils.Unit; import com.github.vindell.jmxutils.property.MemoryInfo; import junit.framework.TestCase; public class JMXInfo_Test extends TestCase { public void testOs() throws Exception { System.out.println("======================OS============================="); Map<String, Object> infoMap = JmxInfoUtils.osAttributes(); for (String key : infoMap.keySet()) { System.out.println(key + " : " + infoMap.get(key)); } } public void testRuntime() throws Exception { System.out.println("======================runtime============================="); Map<String, Object> infoMap = JmxInfoUtils.runtimeAttributes(); for (String key : infoMap.keySet()) { System.out.println(key + " : " + infoMap.get(key)); } } public void testMemory() throws Exception { System.out.println("======================memory============================="); List<MemoryInfo> infoList = JmxInfoUtils.memoryAttributes(Unit.KB); for (MemoryInfo memoryMap : infoList) { System.out.println( memoryMap.getType() + ":" + memoryMap.toMap()); System.out.println( memoryMap.getType() + ":" +memoryMap.toString()); System.out.println("==================================================="); } } public void testMemoryPool() throws Exception { System.out.println("======================memoryPool============================="); List<MemoryInfo> infoList = JmxInfoUtils.memoryPoolAttributes(Unit.KB); for (MemoryInfo memoryMap : infoList) { System.out.println( memoryMap.getType() + ":" + memoryMap.toMap()); System.out.println( memoryMap.getType() + ":" +memoryMap.toString()); System.out.println("==================================================="); } } public void testCompilation() throws Exception { System.out.println("==========================Compilation========================="); Map<String, Object> infoMap = JmxInfoUtils.compilationAttributes(); for (String key : infoMap.keySet()) { System.out.println(key + " : " + infoMap.get(key)); } } public void testGc() throws Exception { System.out.println("==========================GarbageCollector========================="); Map<String, Object> infoMap = JmxInfoUtils.gcAttributes(); for (String key : infoMap.keySet()) { System.out.println(key + " : " + infoMap.get(key)); } } }
[ "hnxyhcwdl1003@163.com" ]
hnxyhcwdl1003@163.com
a7ea21dd2d19f0d828ecf2a1a0e4a77fa056c721
221ba5d328f3468d27c15a91b20b69004340a821
/jme/src/com/jme/scene/state/StippleState.java
f5db8cfac355704dc59cd29ed5e638cc3dac4531
[]
no_license
cjbush/burriswarehouse
49db0685163c8dbd43c3dbbbc6e17cb505b413f1
23bd43484387b7ccd5259c69cb9491bf8875b3f5
refs/heads/master
2016-09-06T11:17:03.659594
2015-04-04T22:42:39
2015-04-04T22:42:39
33,420,363
0
1
null
null
null
null
UTF-8
Java
false
false
4,014
java
/* * Copyright (c) 2003-2009 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'jMonkeyEngine' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.jme.scene.state; import java.io.IOException; import java.nio.ByteBuffer; import java.util.logging.Logger; import com.jme.util.export.InputCapsule; import com.jme.util.export.JMEExporter; import com.jme.util.export.JMEImporter; import com.jme.util.export.OutputCapsule; /** * <code>StippleState</code> maintains a ByteBuffer containing the stipple mask * which is applied by <code>glPolygonStipple(mask)</code>.<br> * The ByteBuffer needs to be 1024 Bytes big (32x32).<br> * * @author Christoph Luder */ public abstract class StippleState extends RenderState { private static final Logger log = Logger.getLogger(StippleState.class.getName()); /** * The ByteBuffer containing the stipple pattern. */ private ByteBuffer stippleMask; /** * <code>getStateType</code> returns {@link RenderState.StateType#Stipple} * @return {@link RenderState.StateType#Stipple} * @see RenderState#getStateType() */ @Override public StateType getStateType() { return RenderState.StateType.Stipple; } @Deprecated @Override public int getType() { log.severe("getType() is deprecated and not supported by Stipplestate," + "use getStateType()"); return 0; } /** * Returns the ByteBuffer containing the stipple mask. * @return the stipple mask */ public ByteBuffer getStippleMask() { return stippleMask; } /** * Sets the stipple mask to be used.<br> * The ByteBuffer needs to be 1024 byte big. * * @param stippleMask * ByteBuffer containing the stipple mask. */ public void setStippleMask(ByteBuffer stippleMask) { this.stippleMask = stippleMask; setNeedsRefresh(true); } @Override public Class<?> getClassTag() { return StippleState.class; } @Override public void write(JMEExporter e) throws IOException { super.write(e); OutputCapsule capsule = e.getCapsule(this); capsule.write(stippleMask, "stippleMask", null); } @Override public void read(JMEImporter e) throws IOException { super.read(e); InputCapsule capsule = e.getCapsule(this); stippleMask = capsule.readByteBuffer("stippleMask", stippleMask); } }
[ "cjbush77" ]
cjbush77
eea451e6ad3a2249724bd305fc0381590146e53e
335f36dd744a9d21e3202ae7c9c372d1fea96fc8
/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/1-hello-world/org/apache/jsp/member_jsp.java
f77a18d6d113d200b0b4fc30fd3f19547f1fbc4f
[]
no_license
SongSooJin/JSP
4841f3c026c730c78bc8bafa6cedfc38d62597f4
698b3a3a7749eac8c2031e7f58b7e17b47cb89bd
refs/heads/master
2020-03-31T21:25:37.984831
2018-10-11T11:42:28
2018-10-11T11:42:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,012
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/8.0.53 * Generated at: 2018-10-04 06:55:06 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class member_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent, org.apache.jasper.runtime.JspSourceImports { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private static final java.util.Set<java.lang.String> _jspx_imports_packages; private static final java.util.Set<java.lang.String> _jspx_imports_classes; static { _jspx_imports_packages = new java.util.HashSet<>(); _jspx_imports_packages.add("javax.servlet"); _jspx_imports_packages.add("javax.servlet.http"); _jspx_imports_packages.add("javax.servlet.jsp"); _jspx_imports_classes = null; } private volatile javax.el.ExpressionFactory _el_expressionfactory; private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public java.util.Set<java.lang.String> getPackageImports() { return _jspx_imports_packages; } public java.util.Set<java.lang.String> getClassImports() { return _jspx_imports_classes; } public javax.el.ExpressionFactory _jsp_getExpressionFactory() { if (_el_expressionfactory == null) { synchronized (this) { if (_el_expressionfactory == null) { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); } } } return _el_expressionfactory; } public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() { if (_jsp_instancemanager == null) { synchronized (this) { if (_jsp_instancemanager == null) { _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } } } return _jsp_instancemanager; } public void _jspInit() { } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final java.lang.String _jspx_method = request.getMethod(); if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) { response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD"); return; } final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write(" "); out.write("\r\n"); out.write(" <!DOCTYPE html>\r\n"); out.write(" <html>\r\n"); out.write(" <head>\r\n"); out.write(" <meta charset=\"UTF-8\">\r\n"); out.write(" <title>Insert title here</title>\r\n"); out.write(" </head>\r\n"); out.write(" <body>\r\n"); out.write(" <h1>member.jsp</h1>\r\n"); out.write(" \r\n"); out.write(" </body>\r\n"); out.write(" </html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "thdtnwls93@naver.com" ]
thdtnwls93@naver.com
8497e078a52f6aec300c4d6c71933069dd75b596
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project93/src/test/java/org/gradle/test/performance93_1/Test93_22.java
5b8d841c3423272715a83a7f3337226e517b007f
[]
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
289
java
package org.gradle.test.performance93_1; import static org.junit.Assert.*; public class Test93_22 { private final Production93_22 production = new Production93_22("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
4cc62cc1a216be4ef161e951108814beae54abf0
28e251deccab6c7ce2674d662e5a6a6047a97f86
/fabric/spi/src/main/java/io/fabric8/spi/process/ProcessFuture.java
5b4ef2bdae6a6052f1d10a591d5d03c4b6fc1a2e
[ "Apache-2.0" ]
permissive
chirino/fabric8poc
9617bbdb5f61d2c3a0d4756ea2934e3553cb2149
6285c213dbb7a723e414cff9c079522f5b2ecaf0
refs/heads/master
2023-07-13T06:34:34.088094
2014-06-10T00:57:35
2014-06-10T00:57:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,541
java
package io.fabric8.spi.process; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; public final class ProcessFuture implements Future<ManagedProcess> { private final MutableManagedProcess process; private final CountDownLatch latch; public ProcessFuture(MutableManagedProcess process) { this.process = process; this.latch = new CountDownLatch(0); } public ProcessFuture(MutableManagedProcess process, CountDownLatch latch) { this.process = process; this.latch = latch; } @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; } @Override public boolean isCancelled() { return false; } @Override public boolean isDone() { return true; } @Override public ManagedProcess get() { try { latch.await(); } catch (InterruptedException ex) { throw new IllegalStateException(ex); } return new ImmutableManagedProcess(process); } @Override public ManagedProcess get(long timeout, TimeUnit unit) throws TimeoutException { try { if (latch.await(timeout, unit)) return new ImmutableManagedProcess(process); else throw new TimeoutException(); } catch (InterruptedException ex) { throw new IllegalStateException(ex); } } }
[ "thomas.diesler@jboss.com" ]
thomas.diesler@jboss.com
ceb33d02b4630431d886070ff7935034ba23c951
0ab885138cfd13c0fb6507bfaab90cf4adb2ecc0
/fr/lemonadd/hubcore/events/Interact.java
75524c1548f0a75719cefb5a21d2dde33978bd60
[]
no_license
borisjacquot/HUBCore
dded2dd5b55b96dac6dd0f5433e021cdacb7dd1d
d758d4c0d46c91140c50840c290924d3b42add77
refs/heads/master
2022-11-22T16:34:13.850268
2020-07-06T14:50:41
2020-07-06T14:50:41
276,871,976
0
0
null
null
null
null
UTF-8
Java
false
false
1,903
java
package fr.lemonadd.hubcore.events; import fr.lemonadd.hubcore.utils.ItemBuilder; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; public class Interact implements Listener { @EventHandler public void onInteract(PlayerInteractEvent event) { Player player = event.getPlayer(); if (!event.hasItem()) return; if (event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { if (player.getItemInHand().getType() == Material.GRAY_DYE) { event.setCancelled(true); ItemStack item = new ItemBuilder(Material.LIME_DYE, 1) .setName("§a§lJoueurs affichés") .setLore("§9Permet de cacher les joueurs", "§a§lJoueurs actuellement affichés") .toItemStack(); player.getInventory().setItem(7,item); for (Player online : Bukkit.getOnlinePlayers()) { player.showPlayer(online); } } else if (player.getItemInHand().getType() == Material.LIME_DYE) { event.setCancelled(true); ItemStack item = new ItemBuilder(Material.GRAY_DYE, 1) .setName("§8§lJoueurs cachés") .setLore("§9Permet d'afficher les joueurs", "§8§lJoueurs actuellement cachés") .toItemStack(); player.getInventory().setItem(7,item); for (Player online : Bukkit.getOnlinePlayers()) { player.hidePlayer(online); } } } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
2959d862edaef90213ff5e18005cf09e37169edc
03630b4fe023bbc022554d43a19c2cf649711d21
/common/src/main/java/com/router/common/interceptor/LoginInterceptorImpl.java
384e1ed6c5fd2152f67ccc1d577d556c4389f371
[]
no_license
bingoloves/ARouterFrame
0ff8fcb940cc283961a1741ceeba3a7138e2ad7c
3d691f6183589de341f0139791c5f689779c23a7
refs/heads/master
2022-12-04T18:45:40.502390
2020-08-28T09:29:10
2020-08-28T09:29:10
289,886,169
0
0
null
null
null
null
UTF-8
Java
false
false
1,861
java
package com.router.common.interceptor; import android.content.Context; import com.alibaba.android.arouter.facade.Postcard; import com.alibaba.android.arouter.facade.annotation.Interceptor; import com.alibaba.android.arouter.facade.callback.InterceptorCallback; import com.alibaba.android.arouter.facade.template.IInterceptor; import com.router.common.RouteHelper; import com.router.common.utils.ToastUtils; import com.router.common.utils.Utils; /** * Created by bingo on 2020/8/25 0025. * 全局跳转拦截器 登录校验 注意:只有通过navigation跳转的页面才会捕获到 */ @Interceptor(name = "login", priority = 6) public class LoginInterceptorImpl implements IInterceptor { @Override public void process(Postcard postcard, InterceptorCallback callback) { final String path = postcard.getPath(); RouteHelper.getInstance().addToHistory(path); ToastUtils.showMessage(Utils.getApp(),path); callback.onContinue(postcard); // LogUtils.d(path); // boolean isLogin = false; // if (isLogin) { //如果已经登录不拦截 // callback.onContinue(postcard); // } else { // 如果没有登录 // switch (path) { // // 不需要登录的直接进入这个页面 //// case ConfigConstants.LOGIN_PATH: //// case ConfigConstants.FIRST_PATH: //// callback.onContinue(postcard); //// break; // default: // //需要登录的直接拦截下来 // callback.onInterrupt(null); // break; // } // } } @Override public void init(Context context) { // LogUtils.v("路由登录拦截器初始化成功"); //只会走一次 } }
[ "657952166@qq.com" ]
657952166@qq.com
04869c1c8ed738eee6dadd893a37e9ca8296d7b4
154a885ad39ece031e5224f99b2f8a3082fcb000
/Day_0121/src/jslhrd3/Exam_03.java
c6403cfba8ea11450945430bb6cc58f520d21fc9
[]
no_license
moonhwan123/moonhwan
1b1e2fbc5589ac24d0806029465cdc232f5b9b29
84aa4dd9ca1a2f373d91ccbabce154f05c45c3c6
refs/heads/master
2021-07-05T04:46:46.814625
2021-04-01T09:21:19
2021-04-01T09:21:19
228,724,072
0
0
null
null
null
null
UTF-8
Java
false
false
834
java
package jslhrd3; /* [3.지역중첩 클래스] 메소드 안에서 정의된 클래스 선언위치 : 외부클래스의 메서드나 초기화 블럭 사용 : 선언된 영역 내부에서만 사용가능 */ class Outer2{ int x = 10; int y = 20; void disp() { // 메서드 내에 정의된 클래스 class Inner2{ int a = 100; int b = 200; void disp_in() { System.out.println("x = "+x); System.out.println("y = "+y); System.out.println("a = "+a); System.out.println("b = "+b); } } // Inner2 끝 // 여기서 객체가 생성 되어야한다. // 독자적으로 호출 불가 Inner2 in2 = new Inner2(); in2.disp_in(); }//disp() 메서드 끝 } public class Exam_03 { public static void main(String[] args) { Outer2 ot = new Outer2(); ot.disp(); } }
[ "58998949+moonhwan123@users.noreply.github.com" ]
58998949+moonhwan123@users.noreply.github.com
a2a3a735613c32c05182fea90849f5f47ed7a672
7f42cd8c28c8542fd3c6a8c824f7a950c4641255
/src/main/java/games/bevs/survivalgames/commons/entityengine/NetworkEntityTypes.java
c772ba5ddca7d0e0daa297ea6797d08516e14651
[]
no_license
HeathLoganCampbell/SurvivalGames
18ba29245ff90b41b38948bcd160574a95f4f905
78b241c485a094128b621829ddf33ae5e1687863
refs/heads/master
2022-06-04T04:35:34.259290
2020-05-11T12:50:23
2020-05-11T12:50:23
209,241,896
4
0
null
2021-06-04T02:38:10
2019-09-18T07:08:42
Java
UTF-8
Java
false
false
4,210
java
package games.bevs.survivalgames.commons.entityengine; import org.bukkit.entity.EntityType; /** * ref * https://github.com/Bukkit/mc-dev/blob/c1627dc9cc7505581993eb0fa15597cb36e94244/net/minecraft/server/EntityTrackerEntry.java */ public class NetworkEntityTypes { public static int getNetworkEntityFromEntityType(EntityType entityType) { int id = -1; switch (entityType) { case DROPPED_ITEM: break; case EXPERIENCE_ORB: break; case LEASH_HITCH: break; case PAINTING: break; case ARROW: id = 60; break; case SNOWBALL: id = 61; break; case FIREBALL: break; case SMALL_FIREBALL: break; case ENDER_PEARL: id = 65; break; case ENDER_SIGNAL: id = 72; break; case THROWN_EXP_BOTTLE: break; case ITEM_FRAME: break; case WITHER_SKULL: break; case PRIMED_TNT: id = 50; break; case FALLING_BLOCK: id = 70; break; case FIREWORK: id = 76; break; case ARMOR_STAND: id = 78; break; case BOAT: id = 1; break; case MINECART_FURNACE: case MINECART_CHEST: case MINECART_COMMAND: case MINECART_TNT: case MINECART_HOPPER: case MINECART_MOB_SPAWNER: case MINECART: id = 10; break; case CREEPER: break; case SKELETON: break; case SPIDER: break; case GIANT: break; case ZOMBIE: id = 54; break; case SLIME: break; case GHAST: break; case PIG_ZOMBIE: break; case ENDERMAN: break; case CAVE_SPIDER: break; case SILVERFISH: break; case BLAZE: break; case MAGMA_CUBE: break; case ENDER_DRAGON: break; case WITHER: id = 83; break; case BAT: break; case WITCH: break; case ENDERMITE: break; case GUARDIAN: break; case PIG: break; case SHEEP: break; case COW: break; case CHICKEN: break; case SQUID: break; case WOLF: break; case MUSHROOM_COW: break; case SNOWMAN: break; case OCELOT: break; case IRON_GOLEM: break; case HORSE: break; case RABBIT: break; case VILLAGER: break; case ENDER_CRYSTAL: id = 51; break; case SPLASH_POTION: break; case EGG: id = 62; break; case FISHING_HOOK: id = 90; break; case LIGHTNING: break; case WEATHER: break; case PLAYER: break; case COMPLEX_PART: break; case UNKNOWN: break; } return id; } }
[ "github@heathlogancampbell.com" ]
github@heathlogancampbell.com
ba331ccbb541e01fffd69e7ee9cc446654aba27e
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
/src/main/java/com/alipay/api/domain/FengdieTemplate.java
7c4f17ab40d21ba211d9ac38dd47e15b2d240caa
[ "Apache-2.0" ]
permissive
weizai118/payment-alipay
042898e172ce7f1162a69c1dc445e69e53a1899c
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
refs/heads/master
2020-04-05T06:29:57.113650
2018-11-06T11:03:05
2018-11-06T11:03:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,854
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 通过凤蝶开发者工具开发的模板 * * @author auto create * @since 1.0, 2017-03-20 10:29:23 */ public class FengdieTemplate extends AlipayObject { private static final long serialVersionUID = 4568982685718742921L; /** * 模板包唯一id,上传模板时自动生成 */ @ApiField("id") private Long id; /** * 模板包开发者,由开发者在package.json中指定 */ @ApiListField("maintainer") @ApiField("string") private List<String> maintainer; /** * 模板包名称,开发模板时由开发者在package.json里指定 */ @ApiField("name") private String name; /** * 模板包预览图,开发者在模板根目录放置的一张命名为snapshot.png的图片 */ @ApiField("snapshot") private String snapshot; /** * 模板包描述,开发者在package.json里指定 */ @ApiField("summary") private String summary; /** * 模板包中文标题,开发者在fengdie.config.js里指定 */ @ApiField("title") private String title; /** * Gets id. * * @return the id */ public Long getId() { return this.id; } /** * Sets id. * * @param id the id */ public void setId(Long id) { this.id = id; } /** * Gets maintainer. * * @return the maintainer */ public List<String> getMaintainer() { return this.maintainer; } /** * Sets maintainer. * * @param maintainer the maintainer */ public void setMaintainer(List<String> maintainer) { this.maintainer = maintainer; } /** * Gets name. * * @return the name */ public String getName() { return this.name; } /** * Sets name. * * @param name the name */ public void setName(String name) { this.name = name; } /** * Gets snapshot. * * @return the snapshot */ public String getSnapshot() { return this.snapshot; } /** * Sets snapshot. * * @param snapshot the snapshot */ public void setSnapshot(String snapshot) { this.snapshot = snapshot; } /** * Gets summary. * * @return the summary */ public String getSummary() { return this.summary; } /** * Sets summary. * * @param summary the summary */ public void setSummary(String summary) { this.summary = summary; } /** * Gets title. * * @return the title */ public String getTitle() { return this.title; } /** * Sets title. * * @param title the title */ public void setTitle(String title) { this.title = title; } }
[ "hanley@thlws.com" ]
hanley@thlws.com
85ccfad851882525c6e933d67d8e4c853eb6b86e
3047f4cebdfbd40114c95e94efaedbd651283ba6
/src/main/java/io/devfactory/example/refactoring/_11_primitive_obsession/_32_replace_conditional_with_polymorphism/variation/ChinaExperiencedVoyageRating.java
b525531ade6b1458f4fecbab9de9a2fe096e3455
[ "MIT" ]
permissive
mvmaniac/basic-java
d40b97cc1db51a16b5b8ff051e6d1effa72d486b
5e7614b48c20ea8aa2f36530528e02cb95bc041f
refs/heads/master
2023-08-04T15:24:27.087103
2023-07-18T02:43:51
2023-08-01T13:05:59
146,252,162
0
0
null
null
null
null
UTF-8
Java
false
false
835
java
package io.devfactory.example.refactoring._11_primitive_obsession._32_replace_conditional_with_polymorphism.variation; import java.util.List; public class ChinaExperiencedVoyageRating extends VoyageRating { public ChinaExperiencedVoyageRating(Voyage voyage, List<VoyageHistory> history) { super(voyage, history); } @Override protected int captainHistoryRisk() { return Math.max(super.captainHistoryRisk() - 2, 0); } @Override protected int voyageProfitFactor() { return super.voyageProfitFactor() + 3; } @Override protected int voyageLengthFactor() { int result = 0; if (this.voyage.length() > 12) result += 1; if (this.voyage.length() > 18) result -= 1; return result; } @Override protected int historyLengthFactor() { return (this.history.size() > 10) ? 1 : 0; } }
[ "mvmaniaz@gmail.com" ]
mvmaniaz@gmail.com
ecd58260120ee9529306b70a9bf9eae109e466b3
0beddcee807f0d794ace86e5100e0ee4c988941a
/src/java/us/temerity/plconfig/JCanonicalDirComp.java
bb6d6b14e79632207233fe267d9ec1e26a58cda4
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
JimCallahan/PipelineConfig
9d49b9344b7cafcf69ddf8b5cfef4bf2521a1547
dbc00b54426b55e1c4cf087e744e782d3e4f2225
refs/heads/master
2016-09-05T19:51:33.632634
2015-10-26T21:08:42
2015-10-26T21:08:42
21,285,539
1
0
null
null
null
null
UTF-8
Java
false
false
4,886
java
// $Id: JCanonicalDirComp.java,v 1.1 2006/02/20 20:12:04 jim Exp $ package us.temerity.plconfig; import us.temerity.plconfig.ui.*; import java.io.*; import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; /*------------------------------------------------------------------------------------------*/ /* C A N O N I C A L D I R C O M P */ /*------------------------------------------------------------------------------------------*/ /** * The UI components for setting an existing directory in canonical form. */ class JCanonicalDirComp extends JPanel implements ActionListener { /*----------------------------------------------------------------------------------------*/ /* C O N S T R U C T O R */ /*----------------------------------------------------------------------------------------*/ /** * Construct a new panel. */ public JCanonicalDirComp ( String title, int width ) { super(); pTitle = title; setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(UIFactory.createPanelLabel(pTitle + ":")); add(Box.createRigidArea(new Dimension(0, 3))); { JComponent[] comps = UIFactory.createBrowsablePathField(null, width, JTextField.LEFT, this, "browse"); pField = (JPathField) comps[0]; pField.addActionListener(this); pField.setActionCommand("entered"); add(comps[2]); } pBrowseDialog = new JFileSelectDialog("Select Directory", "Select " + pTitle + ":", "Select"); } /*----------------------------------------------------------------------------------------*/ /* A C C E S S */ /*----------------------------------------------------------------------------------------*/ /** * Set the directory. */ public void setDir ( File file ) { File dir = new File("/"); if(file != null) { try { File canon = file.getCanonicalFile(); if(canon.isDirectory()) dir = canon; else dir = canon.getParentFile(); } catch(IOException ex) { } } pField.setText(dir.getPath()); pBrowseDialog.updateTargetFile(dir); } public void setDir ( String path ) { if(path != null) setDir(new File(path)); else setDir((File) null); } /** * Get the validated canonical directory path. */ public File validateDir ( ConfigApp app ) throws IllegalConfigException { return app.validateCanonicalDir(pField.getText(), pTitle); } /*----------------------------------------------------------------------------------------*/ /* J C O M P O N E N T O V E R R I D E S */ /*----------------------------------------------------------------------------------------*/ /** * Sets whether or not this component is enabled. */ public void setEnabled ( boolean enabled ) { pField.setEnabled(enabled); } /*----------------------------------------------------------------------------------------*/ /* L I S T E N E R S */ /*----------------------------------------------------------------------------------------*/ /*-- ACTION LISTENER METHODS -------------------------------------------------------------*/ /** * Invoked when an action occurs. */ public void actionPerformed ( ActionEvent e ) { String cmd = e.getActionCommand(); if(cmd.equals("browse")) { pBrowseDialog.setVisible(true); if(pBrowseDialog.wasConfirmed()) setDir(pBrowseDialog.getSelectedFile()); } else if(cmd.equals("entered")) { setDir(pField.getText()); } } /*----------------------------------------------------------------------------------------*/ /* S T A T I C I N T E R N A L S */ /*----------------------------------------------------------------------------------------*/ private static final long serialVersionUID = 1653079151673968324L; /*----------------------------------------------------------------------------------------*/ /* I N T E R N A L S */ /*----------------------------------------------------------------------------------------*/ /** * The title of the setting. */ private String pTitle; /** * The directory path field. */ private JPathField pField; /** * The directory browsing dialog. */ private JFileSelectDialog pBrowseDialog; }
[ "jim@temerity.us" ]
jim@temerity.us
f9bda44b8a0303f360400bcc8bb2bdd96d4d2f6f
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/plugin/wallet_core/model/p.java
5805ec3ae994fe00618f6000864c919bd0e1f2ae
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,339
java
package com.tencent.mm.plugin.wallet_core.model; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Vector; public abstract class p<K> { Map<String, Integer> tzB = new HashMap(); List<K> tzC = new LinkedList(); public Vector<b> tzD = new Vector(); List<String> tzE = new LinkedList(); public enum a { DISABLED, CHECKED, UNCHECKED; static { AppMethodBeat.o(46789); } } public class b { public K tzK; public a tzL; } /* renamed from: com.tencent.mm.plugin.wallet_core.model.p$1 */ public static /* synthetic */ class AnonymousClass1 { public static final /* synthetic */ int[] tzF = new int[a.values().length]; static { AppMethodBeat.i(46786); try { tzF[a.UNCHECKED.ordinal()] = 1; } catch (NoSuchFieldError e) { } try { tzF[a.CHECKED.ordinal()] = 2; } catch (NoSuchFieldError e2) { } try { tzF[a.DISABLED.ordinal()] = 3; AppMethodBeat.o(46786); } catch (NoSuchFieldError e3) { AppMethodBeat.o(46786); } } } public abstract String a(Vector<b> vector, int i); public final void d(List<K> list, List<K> list2, List<String> list3) { int i; this.tzE = list3; this.tzC = list2; this.tzD.clear(); this.tzD = new Vector(list.size()); for (i = 0; i < list.size(); i++) { b bVar = new b(); Object obj = list.get(i); bVar.tzK = obj; if (this.tzC.contains(obj)) { bVar.tzL = a.CHECKED; } else { bVar.tzL = a.DISABLED; } this.tzD.add(bVar); } this.tzB.clear(); for (i = 0; i < list3.size(); i++) { this.tzB.put(list3.get(i), Integer.valueOf(0)); } cPC(); } public final void a(int i, a aVar) { ((b) this.tzD.get(i)).tzL = aVar; } private void cPC() { for (int i = 0; i < this.tzD.size(); i++) { if (((b) this.tzD.get(i)).tzL != a.CHECKED) { String a = a(this.tzD, i); if (!this.tzB.containsKey(a)) { Object obj; String[] acV = com.tencent.mm.plugin.wallet_core.ui.b.acV(a); for (int i2 = 0; i2 < this.tzE.size(); i2++) { for (CharSequence contains : acV) { if (!((String) this.tzE.get(i2)).contains(contains)) { obj = null; break; } } int obj2 = 1; if (obj2 != null) { obj2 = 1; break; } } obj2 = null; if (obj2 == null) { a(i, a.DISABLED); } } a(i, a.UNCHECKED); } } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
35e17878cfc6e8df8bce8030bdbcd22cc193c03c
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.ocms-OCMS/sources/com/facebook/common/collectlite/IntStack.java
83302b25bd89a123e238f45ad7a9ccb0d2b7dafe
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,269
java
package com.facebook.common.collectlite; import com.facebook.infer.annotation.Nullsafe; import java.util.EmptyStackException; @Nullsafe(Nullsafe.Mode.LOCAL) public class IntStack { private int mCount = 0; private final ManagedIntArray mDelegate; public IntStack(int i) { this.mDelegate = ManagedIntArray.createWithInitialCapacity(i); } public void push(int i) { if (this.mCount < this.mDelegate.mLength) { this.mDelegate.mArray[this.mCount] = i; } else { this.mDelegate.add(i); } this.mCount++; } public int pop() { int i = this.mCount; if (i != 0) { this.mCount--; return this.mDelegate.get(i - 1); } throw new EmptyStackException(); } public int peek() { int i = this.mCount; if (i != 0) { return this.mDelegate.get(i - 1); } throw new EmptyStackException(); } public int size() { return this.mCount; } public int getAt(int i) { if (i >= 0 && i < this.mCount) { return this.mDelegate.get(i); } throw new IndexOutOfBoundsException(); } public void reset() { this.mCount = 0; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
be4d30a5b10d285bf94686ed639cb69727614e69
da59fb56dddd27b1ca4bd95ef7498fb811b1fe6e
/src/main/java/control/WhileTest.java
2454bced16eea4370ef3c92e4544fe53c80fe12b
[]
no_license
kenshin579/books-thinking-in-java-4
7c36b8c2b4a4c589cc808ec4aa16ea5f49f49306
a6eaa45f69248008a74ddf07426b21e1c259e7f2
refs/heads/master
2020-04-11T12:38:28.671366
2018-12-15T07:21:46
2018-12-15T07:21:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
//: control/WhileTest.java // Demonstrates the while loop. package control; public class WhileTest { static boolean condition() { boolean result = Math.random() < 0.99; System.out.print(result + ", "); return result; } public static void main(String[] args) { while (condition()) System.out.println("Inside 'while'"); System.out.println("Exited 'while'"); } } /* (Execute to see output) *///:~
[ "frankyoh@tmon.co.kr" ]
frankyoh@tmon.co.kr
1a622bd4bea4b6b76e87c1f8498b27b2a1d4a231
30b86c7a3fe6513a8003b5157dffd1f5dda08b38
/core/src/main/java/org/openstack4j/openstack/compute/internal/ComputeServiceImpl.java
71a35348915937d79205073f7a2c192900151561
[ "Apache-2.0" ]
permissive
tanjin861117/openstack4j
c098a25529398855a1391f4d51fc28b687cb8cb6
b58da68654fc7570a3aee3f1eabdf9aef499a607
refs/heads/master
2020-04-06T17:29:04.079837
2018-11-13T13:17:20
2018-11-13T13:17:20
157,660,728
0
0
null
null
null
null
UTF-8
Java
false
false
3,601
java
package org.openstack4j.openstack.compute.internal; import java.util.List; import org.openstack4j.api.Apis; import org.openstack4j.api.compute.ComputeFloatingIPService; import org.openstack4j.api.compute.ComputeImageService; import org.openstack4j.api.compute.ComputeSecurityGroupService; import org.openstack4j.api.compute.ComputeService; import org.openstack4j.api.compute.FlavorService; import org.openstack4j.api.compute.HostAggregateService; import org.openstack4j.api.compute.HostService; import org.openstack4j.api.compute.KeypairService; import org.openstack4j.api.compute.QuotaSetService; import org.openstack4j.api.compute.ServerGroupService; import org.openstack4j.api.compute.ServerService; import org.openstack4j.api.compute.ServerTagService; import org.openstack4j.api.compute.ext.FloatingIPDNSService; import org.openstack4j.api.compute.ext.HypervisorService; import org.openstack4j.api.compute.ext.MigrationService; import org.openstack4j.api.compute.ext.ServicesService; import org.openstack4j.api.compute.ext.ZoneService; import org.openstack4j.model.common.Extension; import org.openstack4j.openstack.common.ExtensionValue.Extensions; /** * Compute (Nova) Operations API implementation * * @author Jeremy Unruh */ public class ComputeServiceImpl extends BaseComputeServices implements ComputeService { /** * {@inheritDoc} */ @Override public FlavorService flavors() { return Apis.get(FlavorService.class); } /** * {@inheritDoc} */ @Override public ComputeImageService images() { return Apis.get(ComputeImageService.class); } /** * {@inheritDoc} */ @Override public ServerService servers() { return Apis.get(ServerService.class); } /** * {@inheritDoc} */ @Override public QuotaSetService quotaSets() { return Apis.get(QuotaSetService.class); } /** * {@inheritDoc} */ @Override public HostService host() { return Apis.get(HostService.class); } /** * {@inheritDoc} */ @Override public List<? extends Extension> listExtensions() { return get(Extensions.class, uri("/extensions")).execute().getList(); } /** * {@inheritDoc} */ @Override public ComputeFloatingIPService floatingIps() { return Apis.get(ComputeFloatingIPService.class); } /** * {@inheritDoc} */ @Override public ComputeSecurityGroupService securityGroups() { return Apis.get(ComputeSecurityGroupService.class); } /** * {@inheritDoc} */ @Override public KeypairService keypairs() { return Apis.get(KeypairService.class); } /** * {@inheritDoc} */ @Override public HypervisorService hypervisors() { return Apis.get(HypervisorService.class); } /** * {@inheritDoc} */ @Override public ZoneService zones() { return Apis.get(ZoneService.class); } /** * {@inheritDoc} */ @Override public MigrationService migrations() { return Apis.get(MigrationService.class); } @Override public ServerGroupService serverGroups() { return Apis.get(ServerGroupService.class); } @Override public FloatingIPDNSService floatingIPDNS() { return Apis.get(FloatingIPDNSService.class); } @Override public HostAggregateService hostAggregates() { return Apis.get(HostAggregateService.class); } @Override public ServerTagService serverTags() { return Apis.get(ServerTagService.class); } @Override public ServicesService services() { return Apis.get(ServicesService.class); } }
[ "tanjin@szzt.com.cn" ]
tanjin@szzt.com.cn
41b6b5df4de0999ee63dd0165861425c44497548
031882972460a497477c694db71018c01d1bd31c
/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FfwyShopTypeServiceImpl.java
a81de0ab9810d05e05dc679d6073716496b4ab63
[]
no_license
jackjzy/msbstydy
77393bff92ea14845f015fc0b8998586f64949a4
78781c65769c4a163db47c1617d8e1d13488a4c6
refs/heads/master
2023-06-23T14:20:25.459222
2021-07-26T07:07:33
2021-07-26T07:07:33
389,536,535
0
0
null
null
null
null
UTF-8
Java
false
false
2,241
java
package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.shop.FfwyShopTypeMapper; import com.ruoyi.system.domain.shop.FfwyShopType; import com.ruoyi.system.service.IFfwyShopTypeService; /** * 店铺类型Service业务层处理 * * @author ruoyi * @date 2021-04-20 */ @Service public class FfwyShopTypeServiceImpl implements IFfwyShopTypeService { @Autowired private FfwyShopTypeMapper ffwyShopTypeMapper; /** * 查询店铺类型 * * @param shopType 店铺类型ID * @return 店铺类型 */ @Override public FfwyShopType selectFfwyShopTypeById(Integer shopType) { return ffwyShopTypeMapper.selectFfwyShopTypeById(shopType); } /** * 查询店铺类型列表 * * @param ffwyShopType 店铺类型 * @return 店铺类型 */ @Override public List<FfwyShopType> selectFfwyShopTypeList(FfwyShopType ffwyShopType) { return ffwyShopTypeMapper.selectFfwyShopTypeList(ffwyShopType); } /** * 新增店铺类型 * * @param ffwyShopType 店铺类型 * @return 结果 */ @Override public int insertFfwyShopType(FfwyShopType ffwyShopType) { return ffwyShopTypeMapper.insertFfwyShopType(ffwyShopType); } /** * 修改店铺类型 * * @param ffwyShopType 店铺类型 * @return 结果 */ @Override public int updateFfwyShopType(FfwyShopType ffwyShopType) { return ffwyShopTypeMapper.updateFfwyShopType(ffwyShopType); } /** * 批量删除店铺类型 * * @param shopTypes 需要删除的店铺类型ID * @return 结果 */ @Override public int deleteFfwyShopTypeByIds(Integer[] shopTypes) { return ffwyShopTypeMapper.deleteFfwyShopTypeByIds(shopTypes); } /** * 删除店铺类型信息 * * @param shopType 店铺类型ID * @return 结果 */ @Override public int deleteFfwyShopTypeById(Integer shopType) { return ffwyShopTypeMapper.deleteFfwyShopTypeById(shopType); } }
[ "你的邮箱" ]
你的邮箱
1ed5ea9ab6fe5b61f04ae7d377d8e23e34fc1f0d
0e32884f88ca83c1ad87c35e8e5c0078ebf18771
/component-runtime-beam/src/main/java/org/talend/sdk/component/runtime/beam/spi/record/SchemaIdGenerator.java
bc405690917401f7d06e97e70e043b1649e91851
[ "Apache-2.0" ]
permissive
echauchot/component-runtime
2f34724e90718a1c8915ceae4b8ac5cd9b1b26e5
846f4311e577aeea61f50b43fd28a2686110aa99
refs/heads/master
2021-09-27T02:35:08.163577
2018-11-05T11:00:33
2018-11-05T11:00:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,661
java
/** * Copyright (C) 2006-2018 Talend Inc. - www.talend.com * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.talend.sdk.component.runtime.beam.spi.record; import static java.util.Comparator.comparing; import static java.util.stream.Collectors.joining; import static lombok.AccessLevel.PRIVATE; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; import java.util.List; import org.apache.avro.Schema; import lombok.NoArgsConstructor; @NoArgsConstructor(access = PRIVATE) // todo: don't keep it static, make it pluggable and Record based (not avro) public class SchemaIdGenerator { public static String generateRecordName(final List<Schema.Field> fields) { return "org.talend.sdk.component.schema.generated.Record" + new XXHash64(0/* always the same output */) .id(fields .stream() .sorted(comparing(org.apache.avro.Schema.Field::pos) .thenComparing(org.apache.avro.Schema.Field::name)) // surely not enough but "ok" to start .map(f -> mapField(f.name(), f.schema().getType().name(), extractNestedName(f))) .collect(joining("\n"))); } private static String extractNestedName(final Schema.Field f) { if (f.schema().getType() == Schema.Type.RECORD) { return f.schema().getName(); } if (f.schema().getType() == Schema.Type.ARRAY) { return f.schema().getElementType().getName(); } return null; } private static String mapField(final String fieldName, final String type, final String recordName) { return "_" + fieldName + "::" + type + (recordName == null ? "" : ("::" + recordName)) + "_"; } // from kanzi (asf v2 license) private static class XXHash64 { private final static long PRIME64_1 = 0x9E3779B185EBCA87L; private final static long PRIME64_2 = 0xC2B2AE3D27D4EB4FL; private final static long PRIME64_3 = 0x165667B19E3779F9L; private final static long PRIME64_4 = 0x85EBCA77C2b2AE63L; private final static long PRIME64_5 = 0x27D4EB2F165667C5L; private static final int SHIFT64_0 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 56 : 0; private static final int SHIFT64_1 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 48 : 8; private static final int SHIFT64_2 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 40 : 16; private static final int SHIFT64_3 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 32 : 24; private static final int SHIFT64_4 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 24 : 32; private static final int SHIFT64_5 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 16 : 40; private static final int SHIFT64_6 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 8 : 48; private static final int SHIFT64_7 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 0 : 56; private static final int SHIFT32_0 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 24 : 0; private static final int SHIFT32_1 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 16 : 8; private static final int SHIFT32_2 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 8 : 16; private static final int SHIFT32_3 = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 0 : 24; private final long seed; private XXHash64(final long seed) { this.seed = seed; } private String id(final String data) { return Long.toHexString(hash(data.getBytes(StandardCharsets.UTF_8))); } private long hash(final byte[] data) { return this.hash(data, data.length); } private long hash(final byte[] data, final int length) { long h64; int idx = 0; if (length >= 32) { final int end32 = length - 32; long v1 = this.seed + PRIME64_1 + PRIME64_2; long v2 = this.seed + PRIME64_2; long v3 = this.seed; long v4 = this.seed - PRIME64_1; do { v1 = round(v1, readLong64(data, idx)); v2 = round(v2, readLong64(data, idx + 8)); v3 = round(v3, readLong64(data, idx + 16)); v4 = round(v4, readLong64(data, idx + 24)); idx += 32; } while (idx <= end32); h64 = ((v1 << 1) | (v1 >>> 31)); h64 += ((v2 << 7) | (v2 >>> 25)); h64 += ((v3 << 12) | (v3 >>> 20)); h64 += ((v4 << 18) | (v4 >>> 14)); h64 = mergeRound(h64, v1); h64 = mergeRound(h64, v2); h64 = mergeRound(h64, v3); h64 = mergeRound(h64, v4); } else { h64 = this.seed + PRIME64_5; } h64 += length; while (idx + 8 <= length) { h64 ^= round(0, readLong64(data, idx)); h64 = ((h64 << 27) | (h64 >>> 37)) * PRIME64_1 + PRIME64_4; idx += 8; } while (idx + 4 <= length) { h64 ^= (readInt32(data, idx) * PRIME64_1); h64 = ((h64 << 23) | (h64 >>> 41)) * PRIME64_2 + PRIME64_3; idx += 4; } while (idx < length) { h64 ^= ((data[idx] & 0xFF) * PRIME64_5); h64 = ((h64 << 11) | (h64 >>> 53)) * PRIME64_1; idx++; } // Finalize h64 ^= (h64 >>> 33); h64 *= PRIME64_2; h64 ^= (h64 >>> 29); h64 *= PRIME64_3; return h64 ^ (h64 >>> 32); } private static long readLong64(final byte[] buf, final int offset) { return ((((long) buf[offset + 7]) & 0xFF) << SHIFT64_7) | ((((long) buf[offset + 6]) & 0xFF) << SHIFT64_6) | ((((long) buf[offset + 5]) & 0xFF) << SHIFT64_5) | ((((long) buf[offset + 4]) & 0xFF) << SHIFT64_4) | ((((long) buf[offset + 3]) & 0xFF) << SHIFT64_3) | ((((long) buf[offset + 2]) & 0xFF) << SHIFT64_2) | ((((long) buf[offset + 1]) & 0xFF) << SHIFT64_1) | ((((long) buf[offset]) & 0xFF) << SHIFT64_0); } private static int readInt32(final byte[] buf, final int offset) { return (((buf[offset + 3]) & 0xFF) << SHIFT32_3) | (((buf[offset + 2]) & 0xFF) << SHIFT32_2) | (((buf[offset + 1]) & 0xFF) << SHIFT32_1) | (((buf[offset]) & 0xFF) << SHIFT32_0); } private static long round(final long acc, final long val) { final long v = acc + (val * PRIME64_2); return ((v << 13) | (v >>> 19)) * PRIME64_1; } private static long mergeRound(final long acc, final long val) { return (acc ^ round(0, val)) * PRIME64_1 + PRIME64_4; } } }
[ "rmannibucau@gmail.com" ]
rmannibucau@gmail.com
09384d5e93107d1e60b3a0e8c3ce560604168a60
a38de65c34f95d8866415053a32c4b5975eef06e
/aswb/sdkcompat/as35/com/google/idea/blaze/android/run/ApplyChangesCompat.java
c2dec1156405c31b797b1e08bd1b3e39c6ca6daf
[ "Apache-2.0" ]
permissive
drudim/intellij
c379d175120109d58a8c72c777f161a4cb8c1e98
d2eb8590bcc39cbc9f957642458dfb97ef6ec4a2
refs/heads/master
2020-05-21T16:00:42.912409
2019-05-10T15:58:16
2019-05-10T15:58:52
186,104,111
1
0
null
2019-05-11T07:54:20
2019-05-11T07:54:20
null
UTF-8
Java
false
false
1,785
java
/* * Copyright 2018 The Bazel Authors. 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.google.idea.blaze.android.run; import com.android.tools.idea.deploy.DeploymentConfiguration; import com.android.tools.idea.run.tasks.ApplyChangesTask; import com.android.tools.idea.run.tasks.ApplyCodeChangesTask; import com.google.common.collect.ImmutableMap; import com.intellij.openapi.project.Project; import java.io.File; import java.util.List; /** Compat for apply changes related tasks. #api as3.4 */ public class ApplyChangesCompat { /** * Creates a new {@link ApplyChangesTask}. * * <p>#api3.4 */ public static ApplyChangesTask newApplyChangesTask( Project project, ImmutableMap<String, List<File>> packages) { return new ApplyChangesTask( project, packages, DeploymentConfiguration.getInstance().APPLY_CHANGES_FALLBACK_TO_RUN); } /** * Creates a new {@link ApplyCodeChangesTask}. * * <p>#api3.4 */ public static ApplyCodeChangesTask newApplyCodeChangesTask( Project project, ImmutableMap<String, List<File>> packages) { return new ApplyCodeChangesTask( project, packages, DeploymentConfiguration.getInstance().APPLY_CODE_CHANGES_FALLBACK_TO_RUN); } }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
ad7b562522ac896c92a36de4d7031c5d50869cb1
4dd22e45d6216df9cd3b64317f6af953f53677b7
/LMS/src/main/java/com/ulearning/ulms/admin/post/dao/PostDAO.java
aa6e5f87adc04abfcbb5cfa8b9e208846b9cb27e
[]
no_license
tianpeijun198371/flowerpp
1325344032912301aaacd74327f24e45c32efa1e
169d3117ee844594cb84b2114e3fd165475f4231
refs/heads/master
2020-04-05T23:41:48.254793
2008-02-16T18:03:08
2008-02-16T18:03:08
40,278,397
0
0
null
null
null
null
GB18030
Java
false
false
3,469
java
/** * PostDAO.java. * User: shid Date: 2005-7-21 10:40:25 * * Copyright (c) 2000-2004.Huaxia Dadi Distance Learning Services Co.,Ltd. * All rights reserved. */ package com.ulearning.ulms.admin.post.dao; import com.ulearning.ulms.admin.post.exceptions.PostDAOSysException; import com.ulearning.ulms.admin.post.model.PostDirModel; import com.ulearning.ulms.admin.post.model.PostModel; import com.ulearning.ulms.admin.post.model.PostTutorialModel; import java.util.List; public interface PostDAO { //----------------------------PostModel-------------------------// public void addPost(PostModel pm) throws PostDAOSysException; public void updatePost(PostModel pm) throws PostDAOSysException; public void removePost(List lt) throws PostDAOSysException; /** * 删除相应目录下的Post * * @param lt * @throws PostDAOSysException */ public void removePostByParentID(List lt) throws PostDAOSysException; public PostModel getPost(int postID) throws PostDAOSysException; /** * 得到某个目录下的Post * * @param parentID * @return * @throws PostDAOSysException */ public List getPostByParentID(int parentID) throws PostDAOSysException; //-------------------------PostTutorialModel--------------------// public void addPostTutorial(PostTutorialModel ptm) throws PostDAOSysException; public void updatePostTutorial(PostTutorialModel ptm) throws PostDAOSysException; public void removePostTutorial(List lt) throws PostDAOSysException; public PostTutorialModel getPostTutorial(int PostTutorialID) throws PostDAOSysException; /** * 删除条件为type和relationID或tutorialID或sort的值,如果tutorialID或sort值为-1,则忽略此条件 * * @param relationID * @param type * @param tutorialID * @param sort * @throws PostDAOSysException */ public void removePostTutorial(int relationID, int type, int tutorialID, int sort) throws PostDAOSysException; /** * 根据type和relationID或tutorialID或sort得到相关的list,如果tutorialID或sort值为-1,则忽略此条件 * * @param relationID * @param type * @param tutorialID * @param sort * @return * @throws PostDAOSysException */ public List getPostTutorial(int relationID, int type, int tutorialID, int sort) throws PostDAOSysException; //----------------------PostDirModel---------------------------// public void addPostDir(PostDirModel pdm) throws PostDAOSysException; public void updatePostDir(PostDirModel pdm) throws PostDAOSysException; public void removePostDir(List lt) throws PostDAOSysException; public PostDirModel getRootPostDir(int type) throws PostDAOSysException; public PostDirModel getPostDir(int DirID) throws PostDAOSysException; public List getSubPostDir(int DirID, int type) throws PostDAOSysException; public List getPostTree(int parentID, int level) throws PostDAOSysException; }
[ "flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626" ]
flowerpp@aeb45441-6f43-0410-8555-aba96bfc7626
5307860ec1f65ff5c418b451d6528118a7f613b8
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/12/ConcurrentAccessIT.java
26f55dc5a93d5acb1a107d63193e0931ad913596
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
7,254
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.bolt.v1.transport.integration; import org.hamcrest.CoreMatchers; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import org.neo4j.bolt.v1.messaging.message.InitMessage; import org.neo4j.bolt.v1.transport.socket.client.SecureSocketConnection; import org.neo4j.bolt.v1.transport.socket.client.SecureWebSocketConnection; import org.neo4j.bolt.v1.transport.socket.client.SocketConnection; import org.neo4j.bolt.v1.transport.socket.client.TransportConnection; import org.neo4j.bolt.v1.transport.socket.client.WebSocketConnection; import org.neo4j.function.Factory; import org.neo4j.graphdb.factory.GraphDatabaseSettings; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonList; import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasKey; import static org.neo4j.bolt.v1.messaging.message.PullAllMessage.pullAll; import static org.neo4j.bolt.v1.messaging.message.RunMessage.run; import static org.neo4j.bolt.v1.messaging.util.MessageMatchers.msgSuccess; import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.acceptedVersions; import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.chunk; import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.eventuallyReceives; /** * Multiple concurrent users should be able to connect simultaneously. We test this with multiple users running * load that they roll back, asserting they don't see each others changes. */ @RunWith( Parameterized.class ) public class ConcurrentAccessIT { @Rule public Neo4jWithSocket server = new Neo4jWithSocket( getClass(), settings -> settings.put( GraphDatabaseSettings.auth_enabled.name(), "false" ) ); @Parameterized.Parameter public Factory<TransportConnection> cf; @Parameterized.Parameters public static Collection<Factory<TransportConnection>> transports() { return asList( SocketConnection::new, WebSocketConnection::new, SecureSocketConnection::new, SecureWebSocketConnection::new ); } @Test public void shouldRunSimpleStatement() throws Throwable { // Given int numWorkers = 5; int numRequests = 1_000; List<Callable<Void>> workers = createWorkers( numWorkers, numRequests ); ExecutorService exec = Executors.newFixedThreadPool( numWorkers ); try { // When & then for ( Future<Void> f : exec.invokeAll( workers ) ) { f.get( 60, TimeUnit.SECONDS ); } } finally { exec.shutdownNow(); exec.awaitTermination( 30, TimeUnit.SECONDS ); } } private List<Callable<Void>> createWorkers( int numWorkers, int numRequests ) throws Exception { List<Callable<Void>> workers = new LinkedList<>(); for ( int i = 0; i < numWorkers; i++ ) { workers.add( newWorker( numRequests ) ); } return workers; } private Callable<Void> newWorker( final int iterationsToRun ) throws Exception { return new Callable<Void>() { private final byte[] init = chunk( InitMessage.init( "TestClient", emptyMap() ) ); private final byte[] createAndRollback = chunk( run( "BEGIN" ), pullAll(), run( "CREATE (n)" ), pullAll(), run( "ROLLBACK" ), pullAll() ); private final byte[] matchAll = chunk( run( "MATCH (n) RETURN n" ), pullAll() ); @Override public Void call() throws Exception { // Connect TransportConnection client = cf.newInstance(); client.connect( server.lookupDefaultConnector() ).send( acceptedVersions( 1, 0, 0, 0 ) ); assertThat( client, eventuallyReceives( new byte[]{0, 0, 0, 1} ) ); init( client ); for ( int i = 0; i < iterationsToRun; i++ ) { createAndRollback( client ); } return null; } private void init( TransportConnection client ) throws Exception { client.send( init ); assertThat( client, eventuallyReceives( msgSuccess() ) ); } private void createAndRollback( TransportConnection client ) throws Exception { client.send( createAndRollback ); assertThat( client, eventuallyReceives( msgSuccess( CoreMatchers.<Map<? extends String,?>>allOf( hasEntry( is( "fields" ), equalTo( emptyList() ) ), hasKey( "result_available_after" ) ) ), msgSuccess(), msgSuccess( CoreMatchers.<Map<? extends String,?>>allOf( hasEntry( is( "fields" ), equalTo( emptyList() ) ), hasKey( "result_available_after" ) ) ), msgSuccess(), msgSuccess( CoreMatchers.<Map<? extends String,?>>allOf( hasEntry( is( "fields" ), equalTo( emptyList() ) ), hasKey( "result_available_after" ) ) ), msgSuccess() ) ); // Verify no visible data client.send( matchAll ); assertThat( client, eventuallyReceives( msgSuccess(CoreMatchers.<Map<? extends String,?>>allOf( hasEntry( is( "fields" ), equalTo( singletonList( "n" ) ) ), hasKey( "result_available_after" ) ) ), msgSuccess() ) ); } }; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
68e5ba576510c452c3180e7ba91d34b97691f2fe
92400ffd9cfa03c701f9ef901b7802c4ae130950
/src/com/yihaodian/mobile/vo/order/OrderItemVO.java
51dcdfac1010b0dcdaf090e60adbcaf59e0e8356
[]
no_license
zhengyouxiang/yihaodian_android
2e56177ea12e78dfcfd93fc563d036ca105d0469
79af41a99a824f8eed130ecb559fc9fbc1aa0db8
refs/heads/master
2020-12-29T02:54:17.718722
2012-03-07T06:25:40
2012-03-07T06:25:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
756
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package com.yihaodian.mobile.vo.order; import com.yihaodian.mobile.vo.product.ProductVO; public class OrderItemVO { public OrderItemVO() { product = null; buyQuantity = null; } public Integer getBuyQuantity() { return buyQuantity; } public ProductVO getProduct() { return product; } public void setBuyQuantity(Integer integer) { buyQuantity = integer; } public void setProduct(ProductVO productvo) { product = productvo; } private Integer buyQuantity; private ProductVO product; }
[ "flychen50@gmail.com" ]
flychen50@gmail.com
bd88281b3a56b3be252fe7ead7902f412669f8ba
f3aec68bc48dc52e76f276fd3b47c3260c01b2a4
/core/referencebook/src/main/java/ru/korus/tmis/pix/COCTMT260003UVManagement.java
3ac4f0cd64a07f14ca05adce438375b7e2af1077
[]
no_license
MarsStirner/core
c9a383799a92e485e2395d81a0bc95d51ada5fa5
6fbf37af989aa48fabb9c4c2566195aafd2b16ab
refs/heads/master
2020-12-03T00:39:51.407573
2016-04-29T12:28:32
2016-04-29T12:28:32
96,041,573
0
1
null
null
null
null
UTF-8
Java
false
false
7,715
java
package ru.korus.tmis.pix; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for COCT_MT260003UV.Management complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="COCT_MT260003UV.Management"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;group ref="{urn:hl7-org:v3}InfrastructureRootElements"/> * &lt;element name="code" type="{urn:hl7-org:v3}CS"/> * &lt;element name="author" type="{urn:hl7-org:v3}COCT_MT260003UV.Author" minOccurs="0"/> * &lt;/sequence> * &lt;attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/> * &lt;attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" /> * &lt;attribute name="classCode" use="required" type="{urn:hl7-org:v3}ActClassRoot" /> * &lt;attribute name="moodCode" use="required" type="{urn:hl7-org:v3}ActMood" fixed="EVN" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "COCT_MT260003UV.Management", propOrder = { "realmCode", "typeId", "templateId", "code", "author" }) public class COCTMT260003UVManagement { protected List<CS> realmCode; protected II typeId; protected List<II> templateId; @XmlElement(required = true) protected CS code; @XmlElementRef(name = "author", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false) protected JAXBElement<COCTMT260003UVAuthor> author; @XmlAttribute(name = "nullFlavor") protected List<String> nullFlavor; @XmlAttribute(name = "classCode", required = true) protected List<String> classCode; @XmlAttribute(name = "moodCode", required = true) protected List<String> moodCode; /** * Gets the value of the realmCode property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the realmCode property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRealmCode().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CS } * * */ public List<CS> getRealmCode() { if (realmCode == null) { realmCode = new ArrayList<CS>(); } return this.realmCode; } /** * Gets the value of the typeId property. * * @return * possible object is * {@link II } * */ public II getTypeId() { return typeId; } /** * Sets the value of the typeId property. * * @param value * allowed object is * {@link II } * */ public void setTypeId(II value) { this.typeId = value; } /** * Gets the value of the templateId property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the templateId property. * * <p> * For example, to add a new item, do as follows: * <pre> * getTemplateId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link II } * * */ public List<II> getTemplateId() { if (templateId == null) { templateId = new ArrayList<II>(); } return this.templateId; } /** * Gets the value of the code property. * * @return * possible object is * {@link CS } * */ public CS getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link CS } * */ public void setCode(CS value) { this.code = value; } /** * Gets the value of the author property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link COCTMT260003UVAuthor }{@code >} * */ public JAXBElement<COCTMT260003UVAuthor> getAuthor() { return author; } /** * Sets the value of the author property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link COCTMT260003UVAuthor }{@code >} * */ public void setAuthor(JAXBElement<COCTMT260003UVAuthor> value) { this.author = value; } /** * Gets the value of the nullFlavor property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nullFlavor property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNullFlavor().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNullFlavor() { if (nullFlavor == null) { nullFlavor = new ArrayList<String>(); } return this.nullFlavor; } /** * Gets the value of the classCode property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the classCode property. * * <p> * For example, to add a new item, do as follows: * <pre> * getClassCode().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getClassCode() { if (classCode == null) { classCode = new ArrayList<String>(); } return this.classCode; } /** * Gets the value of the moodCode property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the moodCode property. * * <p> * For example, to add a new item, do as follows: * <pre> * getMoodCode().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getMoodCode() { if (moodCode == null) { moodCode = new ArrayList<String>(); } return this.moodCode; } }
[ "szgrebelny@korusconsulting.ru" ]
szgrebelny@korusconsulting.ru
bb1f7bd71ff1c04d57c04a4088a4bb5ed304d863
a5a1f6d45a3f8e602501fddd6c86d9bd61877e6a
/ch4/spring-bean-context-factory-bean/src/main/java/jun/prospring5/ch4/MessageDigestFactoryBean.java
ed0aad4ad0276a7b9e6d2a79a0d02d930b8bfe02
[ "MIT" ]
permissive
jdcsma/prospring5
8318c9e7510462ab40079e8da1e45eed600e036d
3ee9d91f91b0a2fc6e1fc78b770f5c6f1f5f33b4
refs/heads/master
2022-12-22T12:36:20.430682
2019-06-28T10:07:00
2019-06-28T10:07:00
185,557,154
0
0
MIT
2022-12-16T00:37:09
2019-05-08T07:42:15
JavaScript
UTF-8
Java
false
false
935
java
package jun.prospring5.ch4; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import java.security.MessageDigest; public class MessageDigestFactoryBean implements FactoryBean<MessageDigest>, InitializingBean { private String algorithmName = "MD5"; private MessageDigest messageDigest; @Override public MessageDigest getObject() throws Exception { return this.messageDigest; } @Override public Class<MessageDigest> getObjectType() { return MessageDigest.class; } @Override public boolean isSingleton() { return true; } @Override public void afterPropertiesSet() throws Exception { this.messageDigest = MessageDigest.getInstance(this.algorithmName); } public void setAlgorithmName(String algorithmName) { this.algorithmName = algorithmName; } }
[ "jdcsma@163.com" ]
jdcsma@163.com
51738d12d48b4dfae239ce3faa86f78c0d67729f
1023c8e6703914c3623b8c1c12138de2672bdcc9
/Java-Servlets-and-JSPs-Some-Useful-Objects__28/src/demo/Session.java
b3e45223af8d3c220ca6031ab88c07f5670af200
[]
no_license
j4sysiak/Java-Servlets-and-JSPs-Some-Useful-Objects__28
ff2fb3d10cb2790824f4169c85bc3576b12bd210
01dc5554f835190804b58b3391e11c9d15f701d1
refs/heads/master
2020-04-28T01:05:29.347039
2019-03-10T15:17:14
2019-03-10T15:17:14
174,841,340
0
0
null
null
null
null
UTF-8
Java
false
false
1,483
java
package demo; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * Servlet implementation class Session */ public class Session extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public Session() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); Cart cart = (Cart)session.getAttribute("cart"); if(cart==null){ cart = new Cart(); } cart.setTotalItems(7); session.setAttribute("cart", cart); getServletContext().getRequestDispatcher("/showcart.jsp").forward(request, response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub } }
[ "j4sysiak@gmail.com" ]
j4sysiak@gmail.com
6c5dd43fae7e27c498c4e097af692a73498cd997
66cb91f6f1e465c2d56ab6557e6fba51440c4d66
/src/main/java/com/selectica/rcfdev/definitions/CNDABO/CNDASignature/scripts/SetCpPrimSignerTitleValueScript.java
0a763e14aba762fb14c72e57e474fc83ea2657f7
[]
no_license
pkoptilin/RCFDemo
a2aabcf4181ebf7e14e4baf032a0bd8b73a4a343
bc94ac77391f2e3f141069659b30f606925d7eeb
refs/heads/master
2021-01-19T06:53:22.999497
2015-06-19T09:35:41
2015-06-19T09:35:41
37,709,631
1
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.selectica.rcfdev.definitions.CNDABO.CNDASignature.scripts; import com.selectica.rcfdev.eclm.definitions.CNDABO.CNDASignature.scripts.SetDefaultCpPrimSignerTitle; import com.selectica.rcfscripts.AbstractDataWriteScript; /**SetCpPrimSignerTitle*/ public class SetCpPrimSignerTitleValueScript extends SetDefaultCpPrimSignerTitle { }
[ "user@rcfproj.aws.selectica.net" ]
user@rcfproj.aws.selectica.net
e9b5d5a70a9c45affadf9c9c47be3aa4fff1508f
18ff500be79ac689bd8523ff992ff8e7769379c7
/core/src/main/java/com/mochi/deeppixeldungeon/levels/rooms/connection/ConnectionRoom.java
d5a0126f4ac9ee8a547017b4820560d42cbcb0cf
[]
no_license
Mochiee/deep-pixel-dungeon
457894e5eeaed7dbb58b884317d5786adae7d107
d85ea5047f6914d56279a1e7ddb33c0f524c8300
refs/heads/master
2020-06-25T22:02:02.310604
2017-07-12T09:46:37
2017-07-12T09:46:37
96,987,477
1
0
null
null
null
null
UTF-8
Java
false
false
3,036
java
/* * Pixel Dungeon * Copyright (C) 2012-2015 Oleg Dolya * * Shattered Pixel Dungeon * Copyright (C) 2014-2017 Evan Debenham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/> */ package com.mochi.deeppixeldungeon.levels.rooms.connection; import com.mochi.deeppixeldungeon.Dungeon; import com.mochi.deeppixeldungeon.DeepPixelDungeon; import com.mochi.deeppixeldungeon.levels.rooms.Room; import com.watabou.utils.Point; import com.watabou.utils.Random; import java.util.ArrayList; public abstract class ConnectionRoom extends Room { @Override public int minWidth() { return 3; } public int maxWidth() { return 10; } @Override public int minHeight() { return 3; } public int maxHeight() { return 10; } @Override public int minConnections(int direction) { if (direction == ALL) return 2; else return 0; } @Override public int maxConnections(int direction) { if (direction == ALL) return 16; else return 4; } @Override public boolean canPlaceTrap(Point p) { //traps cannot appear in connection rooms on floor 1 return super.canPlaceTrap(p) && Dungeon.depth > 1; } //FIXME this is a very messy way of handing variable connection rooms private static ArrayList<Class<?extends ConnectionRoom>> rooms = new ArrayList<>(); static { rooms.add(TunnelRoom.class); rooms.add(BridgeRoom.class); rooms.add(PerimeterRoom.class); rooms.add(WalkwayRoom.class); rooms.add(MazeConnectionRoom.class); } private static float[][] chances = new float[27][]; static { chances[1] = new float[]{10, 1, 0, 1, 0}; chances[4] = chances[3] = chances[2] = chances[1]; chances[5] = new float[]{1, 0, 0, 0, 0}; chances[6] = new float[]{0, 0, 10, 2, 0}; chances[10] = chances[9] = chances[8] = chances[7] = chances[6]; chances[11] = new float[]{10, 0, 0, 5, 0}; chances[15] = chances[14] = chances[13] = chances[12] = chances[11]; chances[16] = new float[]{0, 1, 10, 1, 0}; chances[20] = chances[19] = chances[18] = chances[17] = chances[16]; chances[21] = chances[5]; chances[22] = new float[]{10, 3, 0, 2, 0}; chances[26] = chances[25] = chances[24] = chances[23] = chances[22]; } public static ConnectionRoom createRoom(){ try { return rooms.get(Random.chances(chances[Dungeon.depth])).newInstance(); } catch (Exception e) { DeepPixelDungeon.reportException(e); return null; } } }
[ "keithloh1004@gmail.com" ]
keithloh1004@gmail.com
4fbd5747353cbb3581adf549e9b026f80163e5c5
c40efb977101232d91e99af0b78778bad3e0950a
/game_server/src/com/hifun/soul/gameserver/legionmine/LegionBuf.java
2c7cceeec77c2f2bde988370eb72af7014d961b9
[]
no_license
cietwwl/server
2bca79a17be6d5e6fee65e57d0df1fc753fb35e3
d18804f8c182eaa2509666aec10a2212ababc13c
refs/heads/master
2020-06-14T15:12:16.679591
2014-11-19T14:48:04
2014-11-19T14:48:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
546
java
package com.hifun.soul.gameserver.legionmine; public class LegionBuf { private int legionBufType; private String bufDesc; private int bufIcon; public int getLegionBufType() { return legionBufType; } public void setLegionBufType(int legionBufType) { this.legionBufType = legionBufType; } public String getBufDesc() { return bufDesc; } public void setBufDesc(String bufDesc) { this.bufDesc = bufDesc; } public int getBufIcon() { return bufIcon; } public void setBufIcon(int bufIcon) { this.bufIcon = bufIcon; } }
[ "magicstoneljg@163.com" ]
magicstoneljg@163.com
376ba0157ff9fdfa354f1a7b64fc5762f04cb185
b5bfcb30e612f78d74006ef7ef2b6c103bbe9cf1
/src/osmedile/intellij/stringmanip/increment/CreateSequenceAction.java
528882ec5c6711d73c9d0b9d30ef93745b8fed76
[ "Apache-2.0" ]
permissive
barseghyanartur/StringManipulation
fabe9798c7b00de0fe373aef3f8e8b2b8ee5b351
3228bcbb33aaeab851d056d7d9d32aa7fffac9f5
refs/heads/master
2020-04-03T20:41:03.153770
2018-10-31T23:50:41
2018-10-31T23:50:41
155,553,904
0
0
null
2018-10-31T12:29:19
2018-10-31T12:29:19
null
UTF-8
Java
false
false
2,409
java
package osmedile.intellij.stringmanip.increment; import com.intellij.openapi.actionSystem.DataContext; import com.intellij.openapi.editor.Caret; import com.intellij.openapi.editor.CaretAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler; import osmedile.intellij.stringmanip.MyApplicationComponent; import osmedile.intellij.stringmanip.MyEditorAction; import osmedile.intellij.stringmanip.utils.DuplicatUtils; import osmedile.intellij.stringmanip.utils.StringUtil; import osmedile.intellij.stringmanip.utils.StringUtils; import java.util.concurrent.atomic.AtomicReference; public class CreateSequenceAction extends MyEditorAction { public CreateSequenceAction() { this(true); } public CreateSequenceAction(boolean setupHandler) { super(null); if (setupHandler) { this.setupHandler(new EditorWriteActionHandler(false) { @Override public void executeWriteAction(final Editor editor, DataContext dataContext) { MyApplicationComponent.setAction(getActionClass()); final AtomicReference<String> lastValue = new AtomicReference<String>(); editor.getCaretModel().runForEachCaret(new CaretAction() { @Override public void perform(Caret caret) { if (caret.isValid()) { processCaret(editor, caret, lastValue); } } }); } private void processCaret(Editor editor, Caret caret, AtomicReference<String> lastValue) { if (!caret.hasSelection()) { caret.selectLineAtCaret(); } final String newText = processSelection(caret.getSelectedText(), lastValue); editor.getDocument().replaceString(caret.getSelectionStart(), caret.getSelectionEnd(), newText); } }); } } protected String processSelection(String selectedText, AtomicReference<String> lastValue) { String[] textParts = StringUtil.splitPreserveAllTokens(selectedText, DuplicatUtils.SIMPLE_NUMBER_REGEX); for (int i = 0; i < textParts.length; i++) { textParts[i] = processTextPart(lastValue, textParts[i]); } return StringUtils.join(textParts); } private String processTextPart(AtomicReference<String> lastValue, String textPart) { String s = textPart; if (DuplicatUtils.getNumber(s) != null) { String last = lastValue.get(); if (last != null) { s = DuplicatUtils.simpleInc(last); } lastValue.set(s); } return s; } }
[ "vojta.krasa@gmail.com" ]
vojta.krasa@gmail.com
1d8dc3ad3b346faff8811210510424da447d918c
ff90aedaff2b3adab50e68b2f3eef3a74f3f2b0d
/src/com/bumptech/glide/util/FixedPreloadSizeProvider.java
ec4e82525acd4534324d1e68068dce69555bd086
[]
no_license
rrabit42/Malware_Project_EWHA
cf81ab0d6cdc64cf0fb722e9427f7307da3689ab
3865c1c393a9873915ec07389afb799573d5d135
refs/heads/master
2020-11-24T06:42:17.435890
2019-12-16T20:48:04
2019-12-16T20:48:04
228,010,763
0
1
null
null
null
null
UTF-8
Java
false
false
511
java
package com.bumptech.glide.util; import com.bumptech.glide.ListPreloader; import java.util.Arrays; public class FixedPreloadSizeProvider<T> extends Object implements ListPreloader.PreloadSizeProvider<T> { private final int[] size; public FixedPreloadSizeProvider(int paramInt1, int paramInt2) { this.size = new int[] { paramInt1, paramInt2 }; } public int[] getPreloadSize(T paramT, int paramInt1, int paramInt2) { paramT = (T)this.size; return Arrays.copyOf(paramT, paramT.length); } }
[ "gegiraffe@gmail.com" ]
gegiraffe@gmail.com
b9739111cf717b675b59fb3236b935dfb20e6a65
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--fastjson/151092ebaa04f3d76fbd59deddc184867cd3e0d2/after/MapResetTest.java
8298c693bc6e5fc54d41e460449a1ad03f14ed57
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,179
java
package com.alibaba.json.bvt.parser; import junit.framework.TestCase; import com.alibaba.fastjson.JSON; public class MapResetTest extends TestCase { public void test_0() throws Exception { Book book = new Book(); // book.setMetadata(new MetaData()); String text = JSON.toJSONString(book); System.out.println(text); Book book2 = JSON.parseObject(text, Book.class); System.out.println(JSON.toJSONString(book2)); } public static class Book { private int id; private int pageCountNum; private MetaData metadata; public int getPageCountNum() { return pageCountNum; } public void setPageCountNum(int pageCountNum) { this.pageCountNum = pageCountNum; } public int getId() { return id; } public void setId(int id) { this.id = id; } public MetaData getMetadata() { return metadata; } public void setMetadata(MetaData metadata) { this.metadata = metadata; } } public static class MetaData { } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
bd0d4f69f60a00bbe5d68576f6ea678c170dc8f4
0e4a7d38a8ec2fc11db9f95aebd270406db2f1d8
/lotr/common/entity/npc/LOTREntityHuornBase.java
6575ff4dacc8e04869e4800db63805bfdc0438d0
[]
no_license
KyberJeffHason/FA-help
fe07812a24b3295e8ca21ab2cbe948dd54e650fe
0f0775a429fa1751fe699d8a7072f92e83dca101
refs/heads/main
2022-07-29T20:25:24.836228
2021-04-28T19:53:52
2021-04-28T19:53:52
356,083,269
0
0
null
null
null
null
UTF-8
Java
false
false
4,671
java
package lotr.common.entity.npc; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import lotr.client.LOTRTickHandlerClient; import lotr.common.entity.ai.*; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.culling.Frustrum; import net.minecraft.entity.*; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.world.World; public abstract class LOTREntityHuornBase extends LOTREntityTree { public boolean ignoringFrustumForRender = false; public LOTREntityHuornBase(World world) { super(world); this.setSize(1.5f, 4.0f); this.getNavigator().setAvoidsWater(true); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new LOTREntityAIHiredRemainStill(this)); this.tasks.addTask(2, new LOTREntityAIAttackOnCollide(this, 1.5, false)); this.tasks.addTask(3, new LOTREntityAIFollowHiringPlayer(this)); } @Override protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(17, (byte) 0); } public boolean isHuornActive() { return this.dataWatcher.getWatchableObjectByte(17) == 1; } public void setHuornActive(boolean flag) { this.dataWatcher.updateObject(17, flag ? (byte) 1 : 0); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(60.0); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(24.0); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3); this.getEntityAttribute(npcAttackDamage).setBaseValue(4.0); } @SideOnly(value = Side.CLIENT) @Override public boolean isInRangeToRender3d(double d, double d1, double d2) { EntityLivingBase viewer = Minecraft.getMinecraft().renderViewEntity; float f = LOTRTickHandlerClient.renderTick; double viewX = viewer.lastTickPosX + (viewer.posX - viewer.lastTickPosX) * f; double viewY = viewer.lastTickPosY + (viewer.posY - viewer.lastTickPosY) * f; double viewZ = viewer.lastTickPosZ + (viewer.posZ - viewer.lastTickPosZ) * f; Frustrum camera = new Frustrum(); camera.setPosition(viewX, viewY, viewZ); AxisAlignedBB expandedBB = this.boundingBox.expand(2.0, 3.0, 2.0); if(camera.isBoundingBoxInFrustum(expandedBB)) { this.ignoringFrustumForRender = true; this.ignoreFrustumCheck = true; } return super.isInRangeToRender3d(d, d1, d2); } @Override public void onLivingUpdate() { super.onLivingUpdate(); if(!this.worldObj.isRemote) { boolean active = !this.getNavigator().noPath() || this.getAttackTarget() != null && this.getAttackTarget().isEntityAlive(); this.setHuornActive(active); } } @Override protected int decreaseAirSupply(int i) { return i; } @Override public void applyEntityCollision(Entity entity) { if(this.isHuornActive()) { super.applyEntityCollision(entity); } else { double x = this.motionX; double y = this.motionY; double z = this.motionZ; super.applyEntityCollision(entity); this.motionX = x; this.motionY = y; this.motionZ = z; } } @Override public void collideWithEntity(Entity entity) { if(this.isHuornActive()) { super.collideWithEntity(entity); } else { double x = this.motionX; double y = this.motionY; double z = this.motionZ; super.collideWithEntity(entity); this.motionX = x; this.motionY = y; this.motionZ = z; } } @Override public boolean attackEntityFrom(DamageSource damagesource, float f) { boolean flag = super.attackEntityFrom(damagesource, f); if(flag && !this.worldObj.isRemote && !this.isHuornActive()) { this.setHuornActive(true); } return flag; } @Override protected String getHurtSound() { return Blocks.log.stepSound.getBreakSound(); } @Override protected String getDeathSound() { return Blocks.log.stepSound.getBreakSound(); } @Override protected float getSoundPitch() { return super.getSoundPitch() * 0.75f; } }
[ "67012500+KyberJeffHason@users.noreply.github.com" ]
67012500+KyberJeffHason@users.noreply.github.com
9ba0b4bce3be7ae73a17777865ac527fd09e3f6b
7215ff5b80f57ec641773c10823adabb38f425c2
/Chapter_10/P248_SpringPostCommit/src/main/java/modern/challenge/service/BookstoreService.java
8a9e1633305c632a77cc340da1ee0aeefab2b23d
[ "MIT" ]
permissive
urantialife/The-Modern-Java-Challenge
656312cce08c9b2d9ddca86bdaf141ea59803703
f59d342c5eebf2cee7b5ff9af1caec7ac9ef014e
refs/heads/master
2020-06-16T04:35:03.384667
2019-06-27T15:19:49
2019-06-27T15:19:49
195,481,124
2
0
MIT
2019-07-06T00:35:31
2019-07-06T00:35:31
null
UTF-8
Java
false
false
1,982
java
package modern.challenge.service; import modern.challenge.repository.AuthorRepository; import java.util.logging.Logger; import modern.challenge.entity.Author; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionSynchronizationAdapter; import org.springframework.transaction.support.TransactionSynchronizationManager; @Service public class BookstoreService { private static final Logger logger = Logger.getLogger(BookstoreService.class.getName()); private final AuthorRepository authorRepository; public BookstoreService(AuthorRepository authorRepository) { this.authorRepository = authorRepository; } @Transactional public void updateAuthor() { TransactionSynchronizationManager.registerSynchronization( new TransactionSynchronizationAdapter() { @Override public void afterCommit() { logger.info(() -> "Long running task right after commit ..."); // Right after commit do other stuff but // keep in mind that the connection will not // return to pool connection until this code is done // So, avoid time-consuming tasks here try { // This sleep() is just a prove that the connection is not released // Check HikariCP log () Thread.sleep(60 * 1000); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); logger.severe(() -> "Exception: " + ex); } logger.info(() -> "Long running task done ..."); } }); logger.info(() -> "Update the author age and commit ..."); Author author = authorRepository.findById(1L).get(); author.setAge(40); } }
[ "leoprivacy@yahoo.com" ]
leoprivacy@yahoo.com
ce8fbefc6509cf4476da00433dc9e3000dfa912e
36b3dd585b149a48f0f6f6bf130734820dbf93d2
/mall-uaa/src/main/java/com/mallplus/UaaServerApp.java
d7b70a90ad0864702e08d268119f2ae3b6657b41
[ "Apache-2.0" ]
permissive
shenzhuan/zscat-me
5d391e00bb2864bbf4aaca82b845f9f8bacfd38d
23ac9ab9e97d7d63433887168961881a011f217c
refs/heads/master
2023-07-23T12:41:19.688624
2022-10-18T02:26:50
2022-10-18T02:26:50
102,570,841
218
95
Apache-2.0
2023-07-16T05:02:47
2017-09-06T06:23:37
PLpgSQL
UTF-8
Java
false
false
702
java
package com.mallplus; import com.mallplus.common.annotation.EnableLoginArgResolver; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; /** * @author mall */ @EnableFeignClients @EnableDiscoveryClient @EnableRedisHttpSession @EnableLoginArgResolver @SpringBootApplication public class UaaServerApp { public static void main(String[] args) { SpringApplication.run(UaaServerApp.class, args); } }
[ "shen@913656048" ]
shen@913656048
04e3c950173737fd7fe0e427da947fa025e6ed88
209e908242c201544e62990243decc08e8e7e415
/jmetal-core/src/main/java/org/uma/jmetal/util/point/util/comparator/LexicographicalPointComparator.java
690fd58f556b81354c7a750a127df5748f110ace
[]
no_license
weaponhe/CMOEACD
7d3a9f7b6a908339f11adc5f20648d4920d854b9
6be561ed689f1eb17a28856079ddffe79ddbe9f4
refs/heads/master
2021-09-10T23:16:02.460594
2018-04-04T04:48:22
2018-04-04T04:48:22
110,501,459
1
2
null
null
null
null
UTF-8
Java
false
false
2,408
java
// This program 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 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package org.uma.jmetal.util.point.util.comparator; import org.uma.jmetal.util.JMetalException; import org.uma.jmetal.util.point.Point; import java.util.Comparator; /** * This class implements the Comparator interface for comparing tow points. * The order used is lexicographical order. * * @author Antonio J. Nebro <antonio@lcc.uma.es> * @author Juan J. Durillo */ public class LexicographicalPointComparator implements Comparator<Point> { /** * The compare method compare the objects o1 and o2. * * @param pointOne An object that reference a double[] * @param pointTwo An object that reference a double[] * @return The following value: -1 if point1 < point2, 1 if point1 > point2 or 0 in other case. */ @Override public int compare(Point pointOne, Point pointTwo) { if (pointOne == null) { throw new JMetalException("PointOne is null") ; } else if (pointTwo == null) { throw new JMetalException("PointTwo is null"); } // Determine the first i such as pointOne[i] != pointTwo[i]; int index = 0; while ((index < pointOne.getNumberOfDimensions()) && (index < pointTwo.getNumberOfDimensions()) && pointOne.getDimensionValue(index) == pointTwo.getDimensionValue(index)) { index++; } int result = 0 ; if ((index >= pointOne.getNumberOfDimensions()) || (index >= pointTwo.getNumberOfDimensions())) { result = 0; } else if (pointOne.getDimensionValue(index) < pointTwo.getDimensionValue(index)) { result = -1; } else if (pointOne.getDimensionValue(index) > pointTwo.getDimensionValue(index)) { result = 1; } return result ; } }
[ "weaponhe@126.com" ]
weaponhe@126.com
78b3ea0a13ed8c9c9774bbcefad36694cfa1e0ab
ba320183b687d230146e448bf0eb45669bdc2b46
/apis/api-core/api-core-common/src/main/java/org/hoteia/qalingo/core/domain/Menu.java
072c6db8452edaad32708c338110855e934a00c0
[ "Apache-2.0" ]
permissive
FingolfinTEK/qalingo-b2c-engine
40061b679b7969831782f12958a2768a3e033210
a55503bf4c34cee3396a6183f8f1b60ee0e4a3de
refs/heads/master
2021-01-16T20:31:37.697995
2014-02-18T06:22:09
2014-02-18T06:22:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,905
java
/** * Most of the code in the Qalingo project is copyrighted Hoteia and licensed * under the Apache License Version 2.0 (release version 0.7.0) * http://www.apache.org/licenses/LICENSE-2.0 * * Copyright (c) Hoteia, 2012-2013 * http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com * */ package org.hoteia.qalingo.core.domain; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.UniqueConstraint; import javax.persistence.Version; @Entity @Table(name="TBO_MENU", uniqueConstraints = {@UniqueConstraint(columnNames= {"CODE"})}) public class Menu extends AbstractEntity { /** * Generated UID */ private static final long serialVersionUID = 4941716986199595500L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name="ID", nullable=false) private Long id; @Version @Column(name="VERSION", nullable=false, columnDefinition="int(11) default 1") private int version; @Column(name="CODE") private String code; @Column(name="NAME") private String name; @Column(name="POSITION") private int position; @Column(name="IS_ACTIVE", nullable=false, columnDefinition="tinyint(1) default 1") private boolean active; @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name="MENU_ID") @OrderBy("POSITION") private Set<Menu> subMenus = new HashSet<Menu>(); @ManyToMany( fetch = FetchType.LAZY, targetEntity=org.hoteia.qalingo.core.domain.UserGroup.class, cascade={CascadeType.PERSIST, CascadeType.MERGE} ) @JoinTable( name="TBO_MENU_GROUP_REL", joinColumns=@JoinColumn(name="MENU_ID"), inverseJoinColumns=@JoinColumn(name="GROUP_ID") ) private Set<UserGroup> userGroups = new HashSet<UserGroup>(); @ManyToMany( fetch = FetchType.LAZY, targetEntity=org.hoteia.qalingo.core.domain.UserRole.class, cascade={CascadeType.PERSIST, CascadeType.MERGE} ) @JoinTable( name="TBO_MENU_ROLE_REL", joinColumns=@JoinColumn(name="MENU_ID"), inverseJoinColumns=@JoinColumn(name="ROLE_ID") ) private Set<UserRole> groupRoles = new HashSet<UserRole>(); @Temporal(TemporalType.TIMESTAMP) @Column(name="DATE_CREATE") private Date dateCreate; @Temporal(TemporalType.TIMESTAMP) @Column(name="DATE_UPDATE") private Date dateUpdate; public Menu(){ } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public int getVersion() { return version; } public void setVersion(int version) { this.version = version; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getPosition() { return position; } public void setPosition(int position) { this.position = position; } public boolean isActive() { return active; } public void setActive(boolean active) { this.active = active; } public Set<Menu> getSubMenus() { return subMenus; } public void setSubMenus(Set<Menu> subMenus) { this.subMenus = subMenus; } public Set<UserGroup> getUserGroups() { return userGroups; } public void setUserGroups(Set<UserGroup> userGroups) { this.userGroups = userGroups; } public Set<UserRole> getGroupRoles() { return groupRoles; } public void setGroupRoles(Set<UserRole> groupRoles) { this.groupRoles = groupRoles; } public Date getDateCreate() { return dateCreate; } public void setDateCreate(Date dateCreate) { this.dateCreate = dateCreate; } public Date getDateUpdate() { return dateUpdate; } public void setDateUpdate(Date dateUpdate) { this.dateUpdate = dateUpdate; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((code == null) ? 0 : code.hashCode()); result = prime * result + ((dateCreate == null) ? 0 : dateCreate.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Menu other = (Menu) obj; if (code == null) { if (other.code != null) return false; } else if (!code.equals(other.code)) return false; if (dateCreate == null) { if (other.dateCreate != null) return false; } else if (!dateCreate.equals(other.dateCreate)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } @Override public String toString() { return "Menu [id=" + id + ", version=" + version + ", code=" + code + ", name=" + name + ", position=" + position + ", active=" + active + ", dateCreate=" + dateCreate + ", dateUpdate=" + dateUpdate + "]"; } }
[ "denis@Hoteia-Laptop.home" ]
denis@Hoteia-Laptop.home
23bf5ff2f72265d5686ea58f487899b63e3b0da3
9f10ae2158d4cbefc58e96fd1671eedde88e2b94
/common-core/src/main/java/com/lingdonge/core/thirdparty/shorturl/stores/MapStoreServiceImpl.java
9ccd70b2d38dedd971bb605a9cc171dd6adb32fd
[]
no_license
shimaomao/java-utility
f8e322397938d83fcf3bde4f7f60bb157ee146f7
8fe3b197c6e94aacfcea8f6eebe9bd327b70d7b3
refs/heads/master
2020-06-19T22:44:54.139947
2019-06-12T06:34:03
2019-06-12T06:34:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,795
java
package com.lingdonge.core.thirdparty.shorturl.stores; import com.lingdonge.core.thirdparty.shorturl.StoreService; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; public class MapStoreServiceImpl implements StoreService { private Map<String, String> longShortUrlMap = new ConcurrentHashMap<String, String>(); private Map<String, String> shortLongUrlMap = new ConcurrentHashMap<String, String>(); private ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); @Override public Boolean saveShortUrl(String longUrl, String shortUrl) { Lock writeLock = readWriteLock.writeLock(); try { writeLock.lock(); longShortUrlMap.put(longUrl, shortUrl); shortLongUrlMap.put(shortUrl, longUrl); } catch (Exception e) { } finally { writeLock.unlock(); } return true; } @Override public String getDataByShortUrl(String shortUrl) { String longUrl = null; Lock readLock = readWriteLock.readLock(); try { readLock.lock(); longUrl = shortLongUrlMap.get(shortUrl); } catch (Exception e) { } finally { readLock.unlock(); } return longUrl; } @Override public String getDataByLongUrl(String longUrl) { String shortUrl = null; Lock readLock = readWriteLock.readLock(); try { readLock.lock(); shortUrl = longShortUrlMap.get(longUrl); } catch (Exception e) { } finally { readLock.unlock(); } return shortUrl; } }
[ "hackerpayne@gmail.com" ]
hackerpayne@gmail.com
51460e2e240e8a001ea3993d07f4c099bb15d411
2183c2c0b5e2c973de5b8eef415ed427649f32ac
/src/com/lnpdit/chatuidemo/activity/PeixunDataContentActivity.java
952d9d73efbd0996d33f6a199781f9984ae610ee
[ "Apache-2.0" ]
permissive
yinbingqian/cydldt
88a2be32b953e195797facc098f1cb368541f873
f51273f4ceda927ee8b888bc4b351c600c6a2fb7
refs/heads/master
2021-01-10T20:43:04.295195
2015-04-22T08:21:51
2015-04-22T08:21:51
27,161,798
0
1
null
null
null
null
UTF-8
Java
false
false
5,912
java
package com.lnpdit.chatuidemo.activity; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import lnpdit.stategrid.informatization.data.MessengerService; import lnpdit.stategrid.informatization.data.ToDoDB; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import org.xmlpull.v1.XmlPullParserException; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.View; import android.webkit.WebView; import android.webkit.WebSettings.LayoutAlgorithm; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.lnpdit.chatuidemo.R; public class PeixunDataContentActivity extends Activity { Context context; Button return_bt; WebView webview; String title; String id; protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_peixun_materials_content); context = this; Intent intent = this.getIntent(); id = intent.getStringExtra("id"); title = intent.getStringExtra("title"); mGetPeixunListDataThread runnable = new mGetPeixunListDataThread(); Thread thread = new Thread(runnable); thread.start(); viewInit(); } private void viewInit(){ TextView title_tv = (TextView)this.findViewById(R.id.title_tv); webview = (WebView) this.findViewById(R.id.content_tv); title_tv.setText(title); return_bt = (Button) findViewById(R.id.return_bt); return_bt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub finish(); } }); } Handler threadMessageHandler = new Handler() { @Override public void handleMessage(Message msg) { try { webview.getSettings().setSupportZoom(true); webview.clearCache(true); webview.getSettings().setDefaultTextEncodingName("utf-8"); webview.getSettings().setLayoutAlgorithm( LayoutAlgorithm.SINGLE_COLUMN); webview.loadDataWithBaseURL(null, msg.obj.toString(), "text/html", "utf-8", null); // Toast.makeText(context, msg.obj.toString(), Toast.LENGTH_SHORT).show(); } catch (Exception e) { // TODO: handle exception Log.e("peixun error:", e.toString()); } } }; private class mGetPeixunListDataThread implements Runnable { @Override public void run() { // TODO Auto-generated method stub String curl = MessengerService.URL_WITHOUT_WSDL; String cmethodname = MessengerService.METHOD_GetReaderItems; String cnamespace = MessengerService.NAMESPACE; String csoapaction = cnamespace + "/" + cmethodname; SoapObject rpc = new SoapObject(cnamespace, cmethodname); rpc.addProperty("id", id); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.bodyOut = rpc; envelope.dotNet = true; envelope.setOutputSoapObject(rpc); HttpTransportSE ht = new HttpTransportSE(curl); ht.debug = true; try { ht.call(csoapaction, envelope); SoapObject peixunlist = (SoapObject) envelope.bodyIn; SoapObject soapchilds = (SoapObject) peixunlist .getProperty(0); // SoapObject soapchildsson = (SoapObject) soapchilds // .getProperty(0); String content = soapchilds.getProperty("content") .toString(); // ArrayList<HashMap<String, Object>> remoteWindowItem = new ArrayList<HashMap<String, Object>>(); // for (int i = 0; i < peixunlist.getPropertyCount(); i++) { // SoapObject soapchilds = (SoapObject) peixunlist // .getProperty(i); // for (int j = 0; j < soapchilds.getPropertyCount(); j++) { // SoapObject soapchildsson = (SoapObject) soapchilds // .getProperty(j); // // String id = soapchildsson.getProperty("id").toString(); // String colid = soapchildsson.getProperty("colid") // .toString(); // String title = soapchildsson.getProperty("title") // .toString(); // String content = soapchildsson.getProperty("content") // .toString(); // String orders = soapchildsson.getProperty("orders") // .toString(); // String important = soapchildsson.getProperty("important") // .toString(); // String remark1 = soapchildsson.getProperty("remark1") // .toString(); // String remark2 = soapchildsson.getProperty("remark2") // .toString(); // String remark3 = soapchildsson.getProperty("remark3") // .toString(); // String crtime = soapchildsson.getProperty("crtime") // .toString(); // // HashMap<String, Object> mapdevinfo = new HashMap<String, Object>(); // mapdevinfo.put("id", id); // mapdevinfo.put("colid", colid); // mapdevinfo.put("title", title); // mapdevinfo.put("content", content); // mapdevinfo.put("orders", orders); // mapdevinfo.put("important", important); // mapdevinfo.put("remark1", remark1); // mapdevinfo.put("remark2", remark2); // mapdevinfo.put("remark3", remark3); // mapdevinfo.put("crtime", crtime); // remoteWindowItem.add(mapdevinfo); // // } // } Message msg = new Message(); msg.arg1 = 0; msg.obj = content; threadMessageHandler.sendMessage(msg); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (XmlPullParserException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
[ "857952812@qq.com" ]
857952812@qq.com
1f87252d60b06f632a68a2ab9b911c1fe2826a25
3a5985651d77a31437cfdac25e594087c27e93d6
/ojc-core/dcombc/dcombcimpl/src/com/sun/jbi/dcombc/extensions/DCOMInput.java
9ff05241840c7b2ae75667358113e1f200ce3cf5
[]
no_license
vitalif/openesb-components
a37d62133d81edb3fdc091abd5c1d72dbe2fc736
560910d2a1fdf31879e3d76825edf079f76812c7
refs/heads/master
2023-09-04T14:40:55.665415
2016-01-25T13:12:22
2016-01-25T13:12:33
48,222,841
0
5
null
null
null
null
UTF-8
Java
false
false
1,449
java
/* ************************************************************************* * * Copyright (c) 2005, Sun Microsystems, * All Rights Reserved * * This program, and all the routines referenced herein, * are the proprietary properties and trade secrets of * Sun Microsystems. * * Except as provided for by license agreement, this * program shall not be duplicated, used, or disclosed * without written consent signed by an officer of * Sun Microsystems. * ***************************************************************************/ package com.sun.jbi.dcombc.extensions; import java.io.Serializable; /** * Represents dcom:input extensibility element of dcom:operation element * * @author Chandrakanth Belde */ public class DCOMInput implements Serializable { /** * */ private static final long serialVersionUID = 1L; private DCOMMessage dcomMessage = null; /** * Get dcom message from dcom:input extensiblity element * * @return DCOMMessage representing the message of dcom:input element */ public DCOMMessage getDCOMMessage() { return dcomMessage; } /** * Set dcom message for dcom:input extensibility element * * @param DCOMMessage representing the message part of dcom:input element */ public void setDCOMMessage(DCOMMessage dcomMessage) { this.dcomMessage = dcomMessage; } }
[ "bitbucket@bitbucket02.private.bitbucket.org" ]
bitbucket@bitbucket02.private.bitbucket.org
18fce06cf243462c77f1d2bcd23f5cdb18b8e737
b09fca9eff75703249233d34f344ab02b39bd4bf
/cds-base/cds-base-service/src/main/java/gov/nist/healthcare/cds/service/impl/data/ImportExportHandler.java
47a86c75c9b6c0f28147b82466ef7dc1bf09c377
[]
no_license
usnistgov/cds-base
96d99bf865ff70b455abcbde0f2f250a0aa2047a
37b265ca9fe5165095532cf08f64ff4ee30166f7
refs/heads/master
2023-06-08T19:33:07.516338
2023-06-02T14:05:29
2023-06-02T14:05:29
71,465,565
0
1
null
2023-05-08T20:00:37
2016-10-20T13:24:22
Java
UTF-8
Java
false
false
255
java
package gov.nist.healthcare.cds.service.impl.data; import java.io.InputStream; import gov.nist.healthcare.cds.domain.wrapper.ImportResult; public abstract class ImportExportHandler { public abstract ImportResult importFromFile(InputStream file); }
[ "hossam.tamri@nist.gov" ]
hossam.tamri@nist.gov
43caac01585c0ee84b50ed0e126c8cc8316ed75f
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/julypersistence2EJB/ejbModule/com/hps/july/persistence2/Etap2HopAccessBeanTable.java
2506b4741b8cdd41ef2043bedd61510ccdd3a161
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
UTF-8
Java
false
false
1,726
java
/** * This class was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ package com.hps.july.persistence2; import javax.ejb.*; public class Etap2HopAccessBeanTable extends com.ibm.ivj.ejb.runtime.AbstractAccessBeanTable { static final long serialVersionUID = 3206093459760846163L; /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public Etap2HopAccessBeanTable () { super(); } /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public java.util.Enumeration getEtap2HopAccessBean() { return super.getTable(); } /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public Etap2HopAccessBean getEtap2HopAccessBean( int i ) { return (Etap2HopAccessBean) super.getRow(i); } ; /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public void setEtap2HopAccessBean( java.util.Enumeration e ) { super.setTable(e); } /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public void setEtap2HopAccessBean ( int i, Etap2HopAccessBean e ) { super.setRow(i, e); } ; }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
3f403f174dfb57a312b1eb911b439eec0c96166a
c4c3b0973d2ab28982b08f96f5de74574552aad8
/material-core/src/main/java/cn/enilu/material/shiro/check/PermissionCheckManager.java
c5e886c91836e106ae72ad263ee1dc3dfef5173f
[ "MIT" ]
permissive
jackwiy/material-admin
af6ea8e7ef6675e68fdc72d563cae1082e2e4030
6e3d71ce0bedade8c45a70ae6a87e27680d55368
refs/heads/master
2020-08-03T05:48:30.862938
2020-03-18T08:13:27
2020-03-18T08:13:27
211,642,998
0
0
MIT
2020-03-18T09:20:28
2019-09-29T10:04:43
JavaScript
UTF-8
Java
false
false
1,560
java
/** * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package cn.enilu.material.shiro.check; import cn.enilu.material.bean.vo.SpringContextHolder; /** * 权限检查工厂 */ public class PermissionCheckManager { private final static PermissionCheckManager me = new PermissionCheckManager(); private ICheck defaultCheckFactory = SpringContextHolder.getBean(ICheck.class); public static PermissionCheckManager me() { return me; } private PermissionCheckManager() { } public PermissionCheckManager(ICheck checkFactory) { this.defaultCheckFactory = checkFactory; } public void setDefaultCheckFactory(ICheck defaultCheckFactory) { this.defaultCheckFactory = defaultCheckFactory; } public static boolean check(Object[] permissions) { return me.defaultCheckFactory.check(permissions); } public static boolean checkAll() { return me.defaultCheckFactory.checkAll(); } }
[ "82552623@qq.com" ]
82552623@qq.com
73b90a3651c807055a528024e032a2e6d3913567
f14ce268dff09a090aa2e8c5616ff569fe2289e5
/designPattern/src/main/java/com/lxl/tiger/designpattern/decorator/HouseBlend.java
e734519a671c0ecd7ebede369a84b4e8dcce7e03
[]
no_license
lxltiger/Android_Basic
104bc6299afe09107e1c739a6c427f99865120fd
8df7f2c90b6f865b85cbe78e99a6da01635b0731
refs/heads/master
2022-08-18T13:41:38.632459
2020-05-26T09:29:38
2020-05-26T09:29:38
112,807,364
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package com.lxl.tiger.designpattern.decorator; public class HouseBlend extends Beverage { @Override public float cost() { return 0.89f; } @Override public String getDescription() { return HouseBlend.class.getSimpleName(); } }
[ "1220289215@qq.com" ]
1220289215@qq.com
b8632cfec5f4cb980ce8a4cdfee954a615f863d2
6925337bc74e9f80527859651b9771cf33bc7d99
/input/code-fracz-645/sources/Class00000287Worse.java
4f71f7d84215d0ebb67d3e8d04251c80223a5cae
[]
no_license
fracz/code-quality-tensorflow
a58bb043aa0a6438d7813b0398d12c998d70ab49
50dac5459faf44f1b7fa8321692a8c7c44f0d23c
refs/heads/master
2018-11-14T15:28:03.838106
2018-09-07T11:09:28
2018-09-07T11:09:28
110,887,549
0
0
null
null
null
null
UTF-8
Java
false
false
432
java
// original filename: 00001628.txt // before public class Class00000287Worse { public void step(@NotNull JsonSchemaObject parent, @NotNull TransitionResultConsumerI resultConsumer, boolean acceptAdditionalPropertiesSchemas) { if (myName != null) { propertyStep(parent, resultConsumer, acceptAdditionalPropertiesSchemas); } else { assert myIdx >= 0; arrayElementStep(parent, resultConsumer); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
4408f172a2bd071cc2a439bde4e245d14dd7484f
9fce01d889bf907b87b618c97c4b83cd3a69155d
/ea/ea09/chart/demo2draw/src/demo2draw/model/SavingsAccount.java
ff1d631f1b0738f84446d1d9302c494ab624da9a
[]
no_license
8emi95/elte-ik-pt1
c235dea0f11f90f96487f232ff9122497c86d4a6
45c24fe8436c29054b7a8ffecb2f55dbd3cb3f42
refs/heads/master
2020-04-29T09:16:14.310592
2019-03-16T19:48:50
2019-03-16T19:48:50
176,018,106
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
package demo2draw.model; public class SavingsAccount extends BankAccount { private int interest; public SavingsAccount(int accountNumber, int balance, int interest) { super(accountNumber, balance); this.interest = interest; } public SavingsAccount(int accountNumber, int interest) { this(accountNumber, 0, interest); } public int getInterest() { return interest; } }
[ "8emi95@inf.elte.hu" ]
8emi95@inf.elte.hu
f680894f6f3afe3c3ee43abde5c130c2eaa28c7d
732ac04a2f64fb72c16408b8b980260ad806a74d
/src/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java
b3ec06493b5985ce1338585de674bea7e6872b4c
[ "Apache-2.0" ]
permissive
Golde-nchow/jdk1.8-source-analysis
bb45a4d659ab02de37422b2fefbf452712de3b9e
e30ab95df7f147c261cc2f0c5723b6c530197ad2
refs/heads/master
2022-07-03T01:29:57.438319
2022-06-12T14:20:25
2022-06-12T14:20:25
210,581,079
0
0
Apache-2.0
2019-09-24T11:00:27
2019-09-24T11:00:26
null
UTF-8
Java
false
false
934
java
package org.omg.PortableInterceptor.ORBInitInfoPackage; /** * org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u151/9699/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl * Tuesday, September 5, 2017 7:35:45 PM PDT */ public final class DuplicateName extends org.omg.CORBA.UserException { /** * The name for which there was already an interceptor registered. */ public String name = null; public DuplicateName () { super(DuplicateNameHelper.id()); } // ctor public DuplicateName (String _name) { super(DuplicateNameHelper.id()); name = _name; } // ctor public DuplicateName (String $reason, String _name) { super(DuplicateNameHelper.id() + " " + $reason); name = _name; } // ctor } // class DuplicateName
[ "793514387@qq.com" ]
793514387@qq.com
d937b3ccc0390fe8472daf4925cf1545ed2d9ecb
882d3591752a93792bd8c734dd91b1e5439c5ffe
/android/QNLiveShow/liveshowApp/src/main/java/com/qpidnetwork/livemodule/liveshow/flowergift/mycart/MyCartListActivity.java
ede173b7af2052bba87cc39155dc67175d70f61d
[]
no_license
KingsleyYau/LiveClient
f4d4d2ae23cbad565668b1c4d9cd849ea5ca2231
cdd2694ddb4f1933bef40c5da3cc7d1de8249ae2
refs/heads/master
2022-10-15T13:01:57.566157
2022-09-22T07:37:05
2022-09-22T07:37:05
93,734,517
27
14
null
null
null
null
UTF-8
Java
false
false
2,497
java
package com.qpidnetwork.livemodule.liveshow.flowergift.mycart; import android.content.Context; import android.content.Intent; import android.os.Bundle; import com.qpidnetwork.livemodule.R; import com.qpidnetwork.livemodule.framework.base.BaseActionBarFragmentActivity; import com.qpidnetwork.livemodule.liveshow.personal.mycontact.MyContactListFragment; import com.qpidnetwork.qnbridgemodule.util.FragmentUtils; import com.qpidnetwork.qnbridgemodule.util.Log; import com.qpidnetwork.qnbridgemodule.view.keyboardLayout.SoftKeyboardSizeWatchLayout; /** * 2019/10/8 Jagger * My Carts 列表 */ public class MyCartListActivity extends BaseActionBarFragmentActivity implements MyCartListFragment.onCartEventListener, SoftKeyboardSizeWatchLayout.OnResizeListener { private SoftKeyboardSizeWatchLayout sl_root; /** * 启动方式 */ public static void startAct(Context context) { Intent intent = new Intent(context, MyCartListActivity.class); context.startActivity(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setCustomContentView(R.layout.activity_fl_mycart); initView(); initData(); } private void initView() { setOnlyTitle(getString(R.string.my_cart_title)); sl_root = findViewById(R.id.sl_root); sl_root.addOnResizeListener(this); // add fragment MyCartListFragment fragment = new MyCartListFragment(); FragmentUtils.addFragment(getSupportFragmentManager(), fragment, R.id.activity_fl_content); fragment.setOnCartEventListener(this); } private void initData() { } @Override protected void onDestroy() { super.onDestroy(); //解绑监听器,防止泄漏 if (sl_root != null) { sl_root.removeOnResizeListener(this); } } @Override public void onGroupsSumRefresh(int sum) { //更新 标题 // setOnlyTitle(getString(R.string.my_cart_title) + "(" + sum + ")"); } @Override public void OnSoftPop(int height) { } @Override public void OnSoftClose() { // sl_root布局中加入android:focusable="true" android:focusableInTouchMode="true", // 配合MyCartItemAdapter中EditText焦点改变事件,判断是否输入完成 sl_root.requestFocus(); } }
[ "Kingsleyyau@gmail.com" ]
Kingsleyyau@gmail.com
806c68b2f87bb11b9ee0941b4c138d24f91b4dae
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2006-07-26/seasar2-2.4.0-beta-4/s2-framework/src/main/java/org/seasar/framework/autodetector/ClassAutoDetector.java
134bec1dc7c7d70f730707894782407d7b94a659
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
791
java
/* * Copyright 2004-2006 the Seasar Foundation and the Others. * * 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.seasar.framework.autodetector; /** * * @author taedium */ public interface ClassAutoDetector { Class[] detect(); }
[ "higa@319488c0-e101-0410-93bc-b5e51f62721a" ]
higa@319488c0-e101-0410-93bc-b5e51f62721a
d3a0eadc9f5899f559ed71dec30ed607ddd59e34
29196e2d4adfb14ddd7c2ca8c1e60f8c10c26dad
/src/main/java/it/csi/siac/siacfinser/frontend/webservice/msg/RegolarizzaCartaContabile.java
c2881255a48ca94df60afc9db4f5da0dd345b454
[]
no_license
unica-open/siacbilitf
bbeef5ceca40e9fb83d5b1176e7f54e8d84592bf
85f3254c05c719a0016fe55cea1a105bcb6b89b2
refs/heads/master
2021-01-06T14:51:17.786934
2020-03-03T13:27:47
2020-03-03T13:27:47
241,366,581
0
0
null
null
null
null
UTF-8
Java
false
false
1,677
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siacfinser.frontend.webservice.msg; import javax.xml.bind.annotation.XmlType; import it.csi.siac.siaccorser.model.Bilancio; import it.csi.siac.siaccorser.model.Ente; import it.csi.siac.siaccorser.model.ServiceRequest; import it.csi.siac.siacfinser.frontend.webservice.FINSvcDictionary; import it.csi.siac.siacfinser.model.carta.CartaContabile; /** * * @author andrea.colombo * */ @XmlType(namespace = FINSvcDictionary.NAMESPACE) public class RegolarizzaCartaContabile extends ServiceRequest { private Ente ente; private Bilancio bilancio; private CartaContabile cartaContabileDaRegolarizzare; // private List<PreDocumentoCarta> listaPreDocumentiCartaDaRegolarizzare; public Ente getEnte() { return ente; } public void setEnte(Ente ente) { this.ente = ente; } public Bilancio getBilancio() { return bilancio; } public void setBilancio(Bilancio bilancio) { this.bilancio = bilancio; } // public List<PreDocumentoCarta> getListaPreDocumentiCartaDaRegolarizzare() { // return listaPreDocumentiCartaDaRegolarizzare; // } // public void setListaPreDocumentiCartaDaRegolarizzare( // List<PreDocumentoCarta> listaPreDocumentiCartaDaRegolarizzare) { // this.listaPreDocumentiCartaDaRegolarizzare = listaPreDocumentiCartaDaRegolarizzare; // } public CartaContabile getCartaContabileDaRegolarizzare() { return cartaContabileDaRegolarizzare; } public void setCartaContabileDaRegolarizzare( CartaContabile cartaContabileDaRegolarizzare) { this.cartaContabileDaRegolarizzare = cartaContabileDaRegolarizzare; } }
[ "barbara.malano@csi.it" ]
barbara.malano@csi.it
ac99e4119f881c193efe591b56f453d5ffd383b9
75c09fc02ff4eb1cd8af6ecdc88c0947bd12bbae
/lshop_web/src/main/java/com/lshop/common/util/JDBCUtils.java
416c4a4c77a03f7fb7c8a294792325b6e5c5eac7
[]
no_license
apollo2099/lshop
f8372a3d80ef92958acf403f13d4ee3425b66452
4130d32ce54814b46473380c25c967ded20d2157
refs/heads/master
2020-03-13T15:10:43.574187
2018-05-05T03:45:28
2018-05-05T03:45:28
131,172,292
0
0
null
null
null
null
UTF-8
Java
false
false
1,691
java
package com.lshop.common.util; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource; import org.apache.log4j.Logger; import com.gv.base.model.spring.ApplicationContextHolder; public class JDBCUtils { private static final Logger logger = Logger.getLogger(JDBCUtils.class); private static JDBCUtils jdbcUtils = null; /** * 创建JDBC工具类实例 * * @return */ public static synchronized JDBCUtils getInstance() { if (jdbcUtils == null) { jdbcUtils = new JDBCUtils(); } return jdbcUtils; } /** * 获取主库数据库连接 * * @return * @throws SQLException */ public Connection getConnectionForMaster() throws SQLException { DataSource dataSource = (DataSource) ApplicationContextHolder.getBean("lvlogicWritedataSource"); return dataSource.getConnection(); } /** * 获取从库数据库连接 * * @return * @throws SQLException */ public Connection getConnectionForSlave() throws SQLException { DataSource dataSource = (DataSource) ApplicationContextHolder.getBean("lvlogicReaddataSource"); return dataSource.getConnection(); } /** * 关闭数据库相关连接 * * @param connection */ public void close(ResultSet rs, Statement st, Connection conn) { try { if (rs != null) { rs.close(); } } catch (SQLException e) { logger.error(e.getMessage(), e); } try { if (st != null) { st.close(); } } catch (SQLException e) { logger.error(e.getMessage(), e); } try { if (conn != null) { conn.close(); } } catch (SQLException e) { logger.error(e.getMessage(), e); } } }
[ "liaoxiongjian@globalegrow.com" ]
liaoxiongjian@globalegrow.com
dd493781842c95c3f2199de3eb95391baf5a9b8e
eda08004f3a18505c3f5d1f7fc4a0a5ec7c9ecd1
/src/main/java/com/vsked/service/SysMenuSer.java
fcd3cf2821e92618cf2dafe4bd204883005d672d
[ "MIT" ]
permissive
brucevsked/rbacmysql
c35542575de257c510ab71cf018a5c1cc8df879f
5c4598f93c5a619c267bd8ace8b3359b9e1a637c
refs/heads/master
2021-01-22T19:25:46.057737
2018-03-23T08:45:34
2018-03-23T08:45:34
102,419,319
0
0
null
null
null
null
UTF-8
Java
false
false
3,799
java
package com.vsked.service; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.github.pagehelper.PageHelper; import com.vsked.common.BaseJson; import com.vsked.common.Page; import com.vsked.dao.SysMenuDao; @Service @Transactional public class SysMenuSer extends BaseService { private static final Logger log = Logger.getLogger(SysMenuSer.class); @Autowired SysMenuDao sysMenuDao; public int getSysMenuCount(Map<String, Object> m) { int count = 0; try { count = sysMenuDao.getSysMenuCount(m); } catch (Exception e) { log.error(e); } return count; } public String sysMenuList(HttpServletRequest req){ StringBuilder sb=new StringBuilder(); try{ Map<String, Object> m=getMaps(req); //封装前台参数为map Page p=getPage(m);//提取分页参数 int total=getSysMenuCount(m); p.setCount(total); int pageNum=p.getCurrentPage(); int pageSize=p.getPageSize(); sb.append("{"); sb.append(""+getKey("total")+":"+total+","); sb.append(""+getKey("rows")+":"+""); PageHelper.startPage(pageNum, pageSize);//mybatis分页插件 List<Map<String, Object>> dataList=sysMenuDao.getSysMenuList(m); String dataListJson=BaseJson.listToJson(dataList); sb.append(dataListJson); sb.append("}"); }catch(Exception e){ log.error(e); } return sb.toString(); } public String sysMenuList(){ StringBuilder sb=new StringBuilder(); try{ Map<String, Object> m=new HashMap<String, Object>(); List<Map<String, Object>> dataList=sysMenuDao.getSysMenuList(m); String dataListJson=BaseJson.listToJson(dataList); sb.append(dataListJson); }catch(Exception e){ log.error(e); } return sb.toString(); } public String menuAddProc(HttpServletRequest req){ String result=""; try{ Map<String, Object> data=getMaps(req); int effectLine=sysMenuDao.sysMenuAdd(data); if(effectLine<=0){ result="菜单添加失败。"; }else{ result="菜单:"+data.get("smName")+"添加成功."; } }catch(Exception e){ log.error(e); result="菜单添加出现异常,请联系管理员."; } return result; } public String menuEditProc(HttpServletRequest req){ String result=""; try{ Map<String, Object> data=getMaps(req); int effectLine=sysMenuDao.sysMenuEdit(data); if(effectLine<=0){ result="菜单修改失败。"; }else{ result="菜单:"+data.get("smName")+"修改成功."; } }catch(Exception e){ log.error(e); result="菜单修改出现异常,请联系管理员."; } return result; } public String menuEditPage(HttpServletRequest req){ String result="menuListPage"; try{ Map<String, Object> parMap=getMaps(req); if(parMap.containsKey("smId")){ Map<String, Object> data=sysMenuDao.getSysMenuBySmId((String) parMap.get("smId")); getSession().setAttribute("data", data); result="menuEdit"; } }catch(Exception e){ log.error(e); } return result; } /** * 获取当前用户菜单列表 * @return */ public String getUserMenu(){ StringBuilder sb=new StringBuilder(); try{ Map<String, Object> curUser=getCurrentUser(); String suId=(String) curUser.get("suId"); List<Map<String, Object>> dataList=sysMenuDao.getSysUserMenuBySuId(suId); String dataListJson=BaseJson.listToJson(dataList); sb.append(dataListJson); }catch(Exception e){ log.error(e); } return sb.toString(); } }
[ "vsked@163.com" ]
vsked@163.com
fd6ca8e908afd8096b2f37c92d39b21e0e968971
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/aq/c$1.java
bfc0573db7a8bd922351c8e764c8ed9460db117e
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
5,796
java
package com.tencent.mm.aq; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.g.a.hk; import com.tencent.mm.g.a.hk.a; import com.tencent.mm.g.c.cy; import com.tencent.mm.j.a.a.d; import com.tencent.mm.kernel.g; import com.tencent.mm.plugin.messenger.foundation.a.a.h; import com.tencent.mm.plugin.messenger.foundation.a.j; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.storage.bi; import com.tencent.mm.storage.w; import java.util.LinkedList; final class c$1 extends com.tencent.mm.sdk.b.c<hk> { c$1(c paramc) { AppMethodBeat.i(16456); this.xxI = hk.class.getName().hashCode(); AppMethodBeat.o(16456); } private static boolean a(hk paramhk) { AppMethodBeat.i(16457); long l1 = System.currentTimeMillis(); while (true) { bi localbi; try { Object localObject1 = ((j)g.K(j.class)).bOm(); if (!((com.tencent.mm.plugin.messenger.foundation.a.a.b)localObject1).QL(paramhk.cCg.username)) { localObject2 = new com/tencent/mm/storage/w; ((w)localObject2).<init>(); ((w)localObject2).field_username = paramhk.cCg.username; if (paramhk.cCg.cCh <= paramhk.cCg.cCj) { l2 = paramhk.cCg.cCj; ((w)localObject2).field_lastPushSeq = l2; ((w)localObject2).field_lastLocalSeq = paramhk.cCg.cCj; ((w)localObject2).field_lastPushCreateTime = paramhk.cCg.cCi; ((w)localObject2).field_lastLocalCreateTime = paramhk.cCg.cCk; l2 = ((com.tencent.mm.plugin.messenger.foundation.a.a.b)localObject1).a((w)localObject2, true); localObject1 = com.tencent.mm.ui.chatting.j.b.yZH; com.tencent.mm.ui.chatting.j.b.dGX(); ab.i("MicroMsg.GetChatroomMsgReceiver", "[GetChatRoomWrapEvent#callback] ret:%s,chatRoomId:%s lastPushSeq:%s lastPushCreateTime:%s lastLocalSeq:%s lastLocalCreateTime:%s", new Object[] { Long.valueOf(l2), paramhk.cCg.username, Long.valueOf(paramhk.cCg.cCh), Long.valueOf(paramhk.cCg.cCi), Long.valueOf(paramhk.cCg.cCj), Long.valueOf(paramhk.cCg.cCk) }); return true; } l2 = paramhk.cCg.cCh; continue; } Object localObject2 = paramhk.cCg.username; localbi = ((j)g.K(j.class)).bOr().Rc((String)localObject2); long l3 = paramhk.cCg.cCh; long l4 = paramhk.cCg.cCi; paramhk = ((com.tencent.mm.plugin.messenger.foundation.a.a.b)localObject1).QN((String)localObject2); long l5 = paramhk.field_lastLocalSeq; l2 = paramhk.field_lastLocalCreateTime; long l6 = paramhk.field_lastPushSeq; long l7 = paramhk.field_lastPushCreateTime; ab.i("MicroMsg.GetChatroomMsgReceiver", "[GetChatRoomWrapEvent#callback] isGetChatroom! %s conPushSeq:%s conPushCreateTime:%s localSeq:%s localCreateTime:%s pushSeq:%s pushCreateTime:%s", new Object[] { localObject2, Long.valueOf(l3), Long.valueOf(l4), Long.valueOf(l5), Long.valueOf(l2), Long.valueOf(l6), Long.valueOf(l7) }); if ((localbi != null) && (localbi.field_msgId != 0L)) { long l8 = localbi.field_msgSeq; if (l8 > l5) { paramhk.field_lastLocalSeq = l8; paramhk.field_lastLocalCreateTime = localbi.field_createTime; com.tencent.mm.j.a.a.c localc = new com/tencent/mm/j/a/a/c; localc.<init>(); localc.eoC = (1L + l5); localc.eoE = (l2 + 1L); localc.eoD = (l8 - 1L); localc.eoF = (l7 - 1L); if (paramhk.field_seqBlockInfo == null) { d locald = new com/tencent/mm/j/a/a/d; locald.<init>(); paramhk.field_seqBlockInfo = locald; } paramhk.field_seqBlockInfo.eoG.addLast(localc); ab.i("MicroMsg.GetChatroomMsgReceiver", "[GetChatRoomWrapEvent#callback] fix chatroomMsgSeqStorage local seq is smaller than MsgInfoStg local seq! ret:[%s]", new Object[] { Long.valueOf(((com.tencent.mm.plugin.messenger.foundation.a.a.b)localObject1).b(paramhk)) }); } if (l6 < l3) ab.i("MicroMsg.GetChatroomMsgReceiver", "[GetChatRoomWrapEvent#callback] fix chatroomMsgSeqStorage push seq is smaller than conversation seq! ret:[%s,%s] [%s,%s]", new Object[] { Boolean.valueOf(((com.tencent.mm.plugin.messenger.foundation.a.a.b)localObject1).I((String)localObject2, l3)), Boolean.valueOf(((com.tencent.mm.plugin.messenger.foundation.a.a.b)localObject1).K((String)localObject2, l4)), Long.valueOf(localbi.field_msgSeq), Long.valueOf(l5) }); ab.i("MicroMsg.GetChatroomMsgReceiver", "handle GetChatRoomWrapEvent cost:%d", new Object[] { Long.valueOf(System.currentTimeMillis() - l1) }); AppMethodBeat.o(16457); continue; } if (localbi == null) { bool = true; if (localbi != null) break label758; l2 = -1L; ab.w("MicroMsg.GetChatroomMsgReceiver", "lastMsgInfo is null? %s lastMsgInfo id:%s", new Object[] { Boolean.valueOf(bool), Long.valueOf(l2) }); continue; } } finally { ab.i("MicroMsg.GetChatroomMsgReceiver", "handle GetChatRoomWrapEvent cost:%d", new Object[] { Long.valueOf(System.currentTimeMillis() - l1) }); AppMethodBeat.o(16457); } boolean bool = false; continue; label758: long l2 = localbi.field_msgId; } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar * Qualified Name: com.tencent.mm.aq.c.1 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
be6c6da7aab8b0d0b8bf4ce5a245ce99ad0f76e0
962a6192bbbadcd1a314026406670d8e87db83f5
/talkTV30/src/main/java/com/sumavision/talktv2/bean/RecommendPageNewData.java
f5186a74ca596c7cbf085e2c281f43fd7fd78970
[]
no_license
sharpayzara/TalkTV3.0_Studio_yy
1aa09c1b5ba697514535a507fd017faf1db81b06
801afa091aa41835873f466655872190745a9d93
refs/heads/master
2021-01-19T16:04:12.195817
2017-04-13T21:00:19
2017-04-13T21:00:19
88,245,487
0
1
null
null
null
null
UTF-8
Java
false
false
772
java
package com.sumavision.talktv2.bean; import java.util.List; /** * * @author guopeng * */ public class RecommendPageNewData { private List<RecommendData> recommend; private List<ColumnData> column; private List<AppData> apps; public int activityPicType;//1=第一条数据有大横图,2=第一条数据有大竖图,3=都是普通图 public List<AppData> getApps() { return apps; } public void setApps(List<AppData> apps) { this.apps = apps; } public List<RecommendData> getRecommend() { return recommend; } public void setRecommend(List<RecommendData> recommend) { this.recommend = recommend; } public void setColumn(List<ColumnData> column) { this.column = column; } public List<ColumnData> getColumn() { return column; } }
[ "864064269@qq.com" ]
864064269@qq.com
1d96705e2dae5496421c58a15edbe14f52128349
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-task1/src/main/java/com/smate/center/task/v8pub/pdwh/po/BaseJournal2.java
996a3026530036ee309340d9a53c73f077a19abe
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
2,257
java
package com.smate.center.task.v8pub.pdwh.po; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import org.apache.commons.lang.builder.ToStringBuilder; /** * cwli基础期刊主表. */ @Entity @Table(name = "BASE_JOURNAL") public class BaseJournal2 implements Serializable { /** * */ private static final long serialVersionUID = -8803813149791756689L; // 主键 private Long jouId; // 英文刊名 private String titleEn; // 原始刊名 private String titleXx; // Print ISSN private String pissn; // Electric ISSN private String eissn; public BaseJournal2() { super(); } public BaseJournal2(Long jouId, String titleEn, String titleXx) { super(); this.jouId = jouId; this.titleXx = titleXx; this.titleEn = titleEn; } public BaseJournal2(Long jouId, String titleEn, String titleXx, String pissn) { super(); this.jouId = jouId; this.titleEn = titleEn; this.titleXx = titleXx; this.pissn = pissn; } @Id @Column(name = "JNL_ID") @SequenceGenerator(name = "SEQ_STORE", sequenceName = "SEQ_BASE_JOU", allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE") public Long getJouId() { return jouId; } public void setJouId(Long jouId) { this.jouId = jouId; } @Column(name = "TITLE_EN") public String getTitleEn() { return titleEn; } public void setTitleEn(String titleEn) { this.titleEn = titleEn; } @Column(name = "TITLE_XX") public String getTitleXx() { return titleXx; } public void setTitleXx(String titleXx) { this.titleXx = titleXx; } @Column(name = "PISSN") public String getPissn() { return pissn; } public void setPissn(String pissn) { this.pissn = pissn; } @Column(name = "EISSN") public String getEissn() { return eissn; } public void setEissn(String eissn) { this.eissn = eissn; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
2b9756ec945d4bf8dfe9abc3f36fc9b277969026
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_f835c67c3c0a96d0e9e23f5bd7152c64b0390afa/QueuetimeFragment/26_f835c67c3c0a96d0e9e23f5bd7152c64b0390afa_QueuetimeFragment_s.java
90c8dd5af480c0c0ad7d1ba6273b4b9f4e31b6fd
[]
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
974
java
package se.chalmers.krogkollen.list; import android.support.v4.app.ListFragment; import android.widget.AdapterView; import android.widget.ListView; import se.chalmers.krogkollen.R; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import se.chalmers.krogkollen.search.SortByQueueTime; public class QueuetimeFragment extends ListFragment { private PubListAdapter adapter; private ListModel model; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { model = new ListModel(); View rootView = inflater.inflate(R.layout.fragment_queue_list, container, false); adapter = new PubListAdapter(getActivity(), R.layout.listview_item, model.getSortedArray(new SortByQueueTime())); setListAdapter(adapter); return rootView; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e262a0d9b6aa7f6b57fcaefa152a3f56da1ff3ae
088ebe12094464daa0584dcbfafb2b2d22de6a12
/mysite2/src/main/java/kr/co/itcen/mysite/action/user/LoginAction.java
d4d934046dbd24c929e0b57434801685fe4f56ca
[]
no_license
xjvmdutl/mysite
e733c8f4b2c2c85792ac337b874895683d80bd52
037dae751633af8db8aeb0b39bc3dd043ee65d89
refs/heads/master
2023-03-01T16:17:48.047612
2022-07-08T10:40:28
2022-07-08T10:40:28
211,245,325
1
1
null
2023-02-22T08:03:45
2019-09-27T05:50:02
Java
UTF-8
Java
false
false
1,381
java
package kr.co.itcen.mysite.action.user; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import kr.co.itcen.mysite.dao.UserDao; import kr.co.itcen.mysite.vo.UserVo; import kr.co.itcen.web.WebUtils; import kr.co.itcen.web.mvc.Action; public class LoginAction implements Action { @Override public void excute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String email =request.getParameter("email"); String password=request.getParameter("password"); UserVo uservo = new UserDao().get(email,password); if(uservo==null) { request.setAttribute("result", "fail");//로그인을 실패했을떄 그 값을 저장 WebUtils.forward(request, response, "/WEB-INF/views/user/loginform.jsp"); //종료를 해주어야한다, //밑 코드를 실행 시켜주면 안된다. return;//코드도 끊어 주어야한다.*** } //인증 처리(session 처리) HttpSession session=request.getSession(true);//false를 넣으면 없을경우 null,true를 넣으면 없을경우 만들어서 리턴//default=false session.setAttribute("authUser", uservo); WebUtils.redirect(request, response, request.getContextPath()); } }
[ "widn45@naver.com" ]
widn45@naver.com
9c27983a5d5a9511de587c1487c35307348a809d
33c9d42d6bea6d10fc99dd868c4f45cc0e9432ec
/Fence-jsf1.2/fence-core/src/main/java/com/abner/fence/viewroot/RerenderContextCallback.java
86820edfebc776cdf7fe3518097f03aff0cd9ce1
[]
no_license
Jorik2015/fence
1bb7ec08bd28ad68f6232891b7cfee25a902c411
6d8261aaad27f9cd8fd5f14973c260b98a6a1f93
refs/heads/master
2021-01-10T16:39:26.633049
2012-08-13T13:28:30
2012-08-13T13:28:30
45,328,232
0
0
null
null
null
null
UTF-8
Java
false
false
2,363
java
package com.abner.fence.viewroot; import java.io.IOException; import javax.faces.component.ContextCallback; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.convert.ConverterException; import javax.faces.event.PhaseId; import com.abner.fence.lifecycle.AsyncResponse; import com.abner.fence.util.Ext; import ext.base.ExtComponentMetaData; import ext.base.IExt; import ext.util.ComponentUtil; class RerenderContextCallback implements ContextCallback { private PhaseId curPhase = null; protected RerenderContextCallback(PhaseId curPhase) { this.curPhase = curPhase; } private PhaseId getPhaseId() { return curPhase; } public void invokeContextCallback(FacesContext facesContext, UIComponent comp) { try { if (getPhaseId() == PhaseId.RENDER_RESPONSE) { if (comp instanceof IExt) { ExtComponentMetaData metadata = ComponentUtil .getMetadata((IExt) comp); if (metadata != null && !metadata.isUi()) { comp.encodeAll(facesContext); return; } } if (comp.isRendered()) { AsyncResponse async = AsyncResponse.getInstance(); ResponseWriter writer = async.getResponseWriter(); writer.startElement("render", comp); String id = comp.getClientId(facesContext); // 如果root是IExt组件,则输出的html元素加_html后缀 if (IExt.class.isAssignableFrom(comp.getClass())) { id = id + Ext.SUFFIX_HTML_ID; } writer.writeAttribute("id", id, "id"); try { writer.startElement("markup", comp); writer.write("<![CDATA["); EscapeCDATAWriter cdataWriter = new EscapeCDATAWriter(writer); facesContext.setResponseWriter(facesContext.getResponseWriter().cloneWithWriter(cdataWriter)); comp.encodeAll(facesContext); facesContext.setResponseWriter(writer); writer.write("]]>"); writer.endElement("markup"); } catch (ConverterException ce) { throw ce; } writer.endElement("render"); } } else { throw new IllegalStateException("I18N: Unexpected " + "PhaseId passed to " + " PhaseAwareContextCallback: " + curPhase.toString()); } } catch (IOException ex) { ex.printStackTrace(); } } }
[ "wu.arron@gmail.com" ]
wu.arron@gmail.com
9a2f0dada99538618107a03b54b3df64221794e8
8d9c809a138f29aa3806ecca2f1a90d0e57fff86
/loginservlet003-03-page/src/edu/hebeu/util/ConectPoolFactory.java
3271e251474e8b4127b3610f1ce28ed8620404f1
[]
no_license
Tyong1365137828/stu-java
e9fe76586749e06e41f55edab0001d2c245fccfd
39b452da284e0a80520359bf2dcf655c2c3d72fb
refs/heads/main
2023-04-06T11:25:18.794632
2021-04-25T07:05:14
2021-04-25T07:05:14
353,631,034
0
0
null
null
null
null
UTF-8
Java
false
false
1,121
java
package edu.hebeu.util; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.util.Properties; import org.logicalcobwebs.proxool.configuration.PropertyConfigurator; /** * 连接池创建、连接 * @author think * */ public class ConectPoolFactory { private static ConectPoolFactory connectPoolFactory = null; private ConectPoolFactory() { init(); } public void init(){ InputStream is=ConectPoolFactory.class.getResourceAsStream("/proxool.properties"); Properties properties=new Properties(); try{ properties.load(is); PropertyConfigurator.configure(properties); }catch(Exception e){ } } //创建连接池 public static ConectPoolFactory getInstance(){ if(null==connectPoolFactory){ connectPoolFactory=new ConectPoolFactory();//生成连接池 } return connectPoolFactory; } //创建连接 public Connection getConnection(){ Connection conn=null; try{ Class.forName("org.logicalcobwebs.proxool.ProxoolDriver"); conn=DriverManager.getConnection("proxool.DB"); }catch(Exception e){ } return conn; } }
[ "1365137828@qq.com" ]
1365137828@qq.com
eb1d1e6a0b40a8a9ade6a4d88fb6ff6a0f44e5c2
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/huawei/pluginkidwatch/plugin/setting/activity/C1917h.java
a9b8bb973d61864cdf80c396bc372dbe2fe43d58
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package com.huawei.pluginkidwatch.plugin.setting.activity; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import com.huawei.p190v.C2538c; /* compiled from: BindbyQrActivity */ class C1917h implements OnClickListener { final /* synthetic */ BindbyQrActivity f6682a; C1917h(BindbyQrActivity bindbyQrActivity) { this.f6682a = bindbyQrActivity; } public void onClick(DialogInterface dialogInterface, int i) { C2538c.m12674b(this.f6682a.f6266b, "matb showVirifyInfoExpiredDialog setPositiveButton... i = " + i); this.f6682a.m9769i(); } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
2c2fa3dc9cf129231c93a149700a9725db4be1d2
34f8d4ba30242a7045c689768c3472b7af80909c
/JDK-18.0.2.1/src/jdk.localedata/sun/util/resources/cldr/ext/CurrencyNames_ff_Adlm_BF.java
2646f4c2df3cf08828a2d2886b45c686458e5a08
[ "Apache-2.0" ]
permissive
lovelycheng/JDK
5b4cc07546f0dbfad15c46d427cae06ef282ef79
19a6c71e52f3ecd74e4a66be5d0d552ce7175531
refs/heads/master
2023-04-08T11:36:22.073953
2022-09-04T01:53:09
2022-09-04T01:53:09
227,544,567
0
0
null
2019-12-12T07:18:30
2019-12-12T07:18:29
null
UTF-8
Java
false
false
3,402
java
/* * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * COPYRIGHT AND PERMISSION NOTICE * * Copyright (c) 1991-2020 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in https://www.unicode.org/copyright.html. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of the Unicode data files and any associated documentation * (the "Data Files") or Unicode software and any associated documentation * (the "Software") to deal in the Data Files or Software * without restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, and/or sell copies of * the Data Files or Software, and to permit persons to whom the Data Files * or Software are furnished to do so, provided that either * (a) this copyright and permission notice appear with all copies * of the Data Files or Software, or * (b) this copyright and permission notice appear in associated * Documentation. * * THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THE DATA FILES OR SOFTWARE. * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, * use or other dealings in these Data Files or Software without prior * written authorization of the copyright holder. */ package sun.util.resources.cldr.ext; import sun.util.resources.OpenListResourceBundle; public class CurrencyNames_ff_Adlm_BF extends OpenListResourceBundle { @Override protected final Object[][] getContents() { final Object[][] data = new Object[][] { { "GNF", "GNF" }, }; return data; } }
[ "zeng255@163.com" ]
zeng255@163.com
719710f5ff38f07744f7587f72551f51be3f270c
690a38aec36ee6f645c803f6b463680bf4bdcf14
/src/test/java/fr/magnolia/dsi/signaturemanager/security/SecurityUtilsUnitTest.java
f1a02e9a287095fe989651ca3502e93cb9ddb14f
[]
no_license
abargougui/signature-manager
6c5f27d8b68bf75a286e930c756898a5579e41e8
63a52e7c0105a7f636dea05980d33db9085f60e9
refs/heads/master
2022-11-06T14:55:53.711695
2020-06-27T09:07:06
2020-06-27T09:07:06
275,336,001
0
0
null
2020-06-27T09:07:07
2020-06-27T09:04:54
null
UTF-8
Java
false
false
3,214
java
package fr.magnolia.dsi.signaturemanager.security; import org.junit.jupiter.api.Test; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import java.util.ArrayList; import java.util.Collection; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; /** * Test class for the {@link SecurityUtils} utility class. */ public class SecurityUtilsUnitTest { @Test public void testGetCurrentUserLogin() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); SecurityContextHolder.setContext(securityContext); Optional<String> login = SecurityUtils.getCurrentUserLogin(); assertThat(login).contains("admin"); } @Test public void testgetCurrentUserJWT() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token")); SecurityContextHolder.setContext(securityContext); Optional<String> jwt = SecurityUtils.getCurrentUserJWT(); assertThat(jwt).contains("token"); } @Test public void testIsAuthenticated() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); SecurityContextHolder.setContext(securityContext); boolean isAuthenticated = SecurityUtils.isAuthenticated(); assertThat(isAuthenticated).isTrue(); } @Test public void testAnonymousIsNotAuthenticated() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); Collection<GrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities)); SecurityContextHolder.setContext(securityContext); boolean isAuthenticated = SecurityUtils.isAuthenticated(); assertThat(isAuthenticated).isFalse(); } @Test public void testIsCurrentUserInRole() { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); Collection<GrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER)); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities)); SecurityContextHolder.setContext(securityContext); assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue(); assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
41ca097a66d413b8ec300e262bdfcc393ddae6e3
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/dms-enterprise-20181101/src/main/java/com/aliyun/dms_enterprise20181101/models/ChangeLhDagOwnerResponse.java
b8c6de944f0903917502963fdd334b3f08239e4a
[ "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
1,388
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dms_enterprise20181101.models; import com.aliyun.tea.*; public class ChangeLhDagOwnerResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public ChangeLhDagOwnerResponseBody body; public static ChangeLhDagOwnerResponse build(java.util.Map<String, ?> map) throws Exception { ChangeLhDagOwnerResponse self = new ChangeLhDagOwnerResponse(); return TeaModel.build(map, self); } public ChangeLhDagOwnerResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ChangeLhDagOwnerResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public ChangeLhDagOwnerResponse setBody(ChangeLhDagOwnerResponseBody body) { this.body = body; return this; } public ChangeLhDagOwnerResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
e7e3292a10c85918377bac030231f32fe688f878
1cc6988da857595099e52dd9dd2e6c752d69f903
/ZimbraSoap/src/wsdl-test/generated/zcsclient/account/testAccountRssDataSource.java
a5acc89376d4c3136f602995118bc074b4a81937
[]
no_license
mmariani/zimbra-5682-slapos
e250d6a8d5ad4ddd9670ac381211ba4b5075de61
d23f0f8ab394d3b3e8a294e10f56eaef730d2616
refs/heads/master
2021-01-19T06:58:19.601688
2013-03-26T16:30:38
2013-03-26T16:30:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,326
java
/* * ***** BEGIN LICENSE BLOCK ***** * * Zimbra Collaboration Suite Server * Copyright (C) 2011, 2012 VMware, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * * ***** END LICENSE BLOCK ***** */ package generated.zcsclient.account; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for accountRssDataSource complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="accountRssDataSource"> * &lt;complexContent> * &lt;extension base="{urn:zimbraAccount}accountDataSource"> * &lt;all> * &lt;/all> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "accountRssDataSource") public class testAccountRssDataSource extends testAccountDataSource { }
[ "marco.mariani@nexedi.com" ]
marco.mariani@nexedi.com
2c67b074fe88cdbf48c1d5d4d727b9a45524fbc2
96047384a0270e920451402b05433e20d7f7c12a
/core/src/main/java/org/fakereplace/server/FakereplaceProtocol.java
b4bcb28cc58ade928cad37bf85a11d57c9b08d83
[ "Apache-2.0" ]
permissive
sparkoo/fakereplace
bce30e6f93987dcf4a78f67b633b05ba1bc008fb
615a7af91e9fd870ce29fb19355e194423052579
refs/heads/master
2021-01-22T02:53:17.946242
2016-09-30T20:58:58
2016-09-30T20:58:58
81,078,678
0
0
null
2017-02-06T11:06:18
2017-02-06T11:06:18
null
UTF-8
Java
false
false
7,028
java
/* * Copyright 2016, Stuart Douglas, and individual contributors as indicated * by the @authors tag. * * 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.fakereplace.server; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.lang.instrument.ClassDefinition; import java.net.Socket; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.fakereplace.api.environment.ChangedClasses; import org.fakereplace.api.environment.CurrentEnvironment; import org.fakereplace.core.Agent; import org.fakereplace.logging.Logger; import org.fakereplace.replacement.AddedClass; /** * An implementation of the fakereplace client server protocol. * <p> * The basic protocol is as follows: * <p> * Client - * Magic no 0xCAFEDEAF * no classes (int) * class data (1 per class) * class name length (int) * class name * timestamp (long) * <p> * Server - * no classes (int) * class data (1 per class) * class name length * class name * <p> * Client - * no classes (int) * class data * class name length * class name * class bytes length * class bytes * * @author Stuart Douglas */ public class FakereplaceProtocol { private static final Logger log = Logger.getLogger(FakereplaceProtocol.class); public static void run(Socket socket) { DataOutputStream output = null; try { log.trace("Fakereplace update is running"); final DataInputStream input = new DataInputStream(socket.getInputStream()); output = new DataOutputStream(socket.getOutputStream()); final Map<String, Long> classes = new HashMap<String, Long>(); final Map<String, Long> resources = new HashMap<String, Long>(); int magic = input.readInt(); if (magic != 0xCAFEDEAF) { System.err.println("Fakereplace server error, wrong magic number"); return; } final String archiveName = readString(input); readAvailable(input, classes); readAvailable(input, resources); final ChangedClasses classesToReplace = CurrentEnvironment.getEnvironment().getUpdatedClasses(archiveName, classes); log.info("Fakereplace is checking for updates classes. Client sent " + classes.size() + " classes, " + classesToReplace.getChanged().size() + " need to be replaced"); final Map<String, Class> classMap = new HashMap<String, Class>(); output.writeInt(classesToReplace.getChanged().size() + classesToReplace.getNewClasses().size()); for (Class clazz : classesToReplace.getChanged()) { final String cname = clazz.getName(); output.writeInt(cname.length()); output.write(cname.getBytes()); classMap.put(cname, clazz); } for (String cname : classesToReplace.getNewClasses()) { output.writeInt(cname.length()); output.write(cname.getBytes()); } final Set<String> resourcesToReplace = CurrentEnvironment.getEnvironment().getUpdatedResources(archiveName, resources); output.writeInt(resourcesToReplace.size()); for (String cname : resourcesToReplace) { output.writeInt(cname.length()); output.write(cname.getBytes()); } output.flush(); final Set<ClassDefinition> classDefinitions = new HashSet<ClassDefinition>(); final Set<Class<?>> replacedClasses = new HashSet<Class<?>>(); final List<AddedClass> addedClassList = new ArrayList<AddedClass>(); int noClasses = input.readInt(); for (int i = 0; i < noClasses; ++i) { final String className = readString(input); int length = input.readInt(); byte[] buffer = new byte[length]; for (int j = 0; j < length; ++j) { buffer[j] = (byte) input.read(); } final Class theClass = classMap.get(className); if (theClass != null) { classDefinitions.add(new ClassDefinition(theClass, buffer)); replacedClasses.add(theClass); } else { addedClassList.add(new AddedClass(className, buffer, classesToReplace.getClassLoader())); } } final Map<String, byte[]> replacedResources = new HashMap<String, byte[]>(); int noResources = input.readInt(); for (int i = 0; i < noResources; ++i) { final String resourceName = readString(input); int length = input.readInt(); byte[] buffer = new byte[length]; for (int j = 0; j < length; ++j) { buffer[j] = (byte) input.read(); } replacedResources.put(resourceName, buffer); } Agent.redefine(classDefinitions.toArray( new ClassDefinition[classDefinitions.size()]), addedClassList.toArray(new AddedClass[addedClassList.size()])); CurrentEnvironment.getEnvironment().updateResource(archiveName, replacedResources); output.writeInt(0); } catch (Exception e) { try { output.writeInt(1); } catch (IOException e1) { //ignore } e.printStackTrace(); } finally { try { //write the result to socket.close(); } catch (IOException e) { e.printStackTrace(); } } } private static void readAvailable(final DataInputStream input, final Map<String, Long> resources) throws IOException { int noResources = input.readInt(); for (int i = 0; i < noResources; ++i) { final String resourceName = readString(input); long ts = input.readLong(); resources.put(resourceName, ts); } } private static String readString(final DataInputStream input) throws IOException { int toread = input.readInt(); byte[] buf = new byte[toread]; int read = 0; while (toread > 0 && (read = input.read(buf, read, toread)) != -1) { toread -= read; } return new String(buf); } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
22af318b454c0c6b5e2fb7b0acb79b4a6f50768b
d0f9d64dfac124533cf99ec85dc8755303ef50d8
/trunk/explib/src/com/netwander/explib/entity/TabPanel.java
f7ef2eedb26f52a742b80fc0b4d77972f6934b36
[]
no_license
BGCX262/zsxm-svn-to-git
238e4bbe09a399c01b200124e95bd5be681edbcf
be42414be6264b99067dc78b7d96609354bf6dd9
refs/heads/master
2016-09-05T21:32:29.506559
2015-08-23T06:57:08
2015-08-23T06:57:08
41,250,847
0
1
null
null
null
null
UTF-8
Java
false
false
766
java
package com.netwander.explib.entity; public class TabPanel { private Integer tkey; private Integer tid; private String mc; private String action; private String selected; public Integer getTkey() { return tkey; } public void setTkey(Integer tkey) { this.tkey = tkey; } public Integer getTid() { return tid; } public void setTid(Integer tid) { this.tid = tid; } public String getMc() { return mc; } public void setMc(String mc) { this.mc = mc; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getSelected() { return selected; } public void setSelected(String selected) { this.selected = selected; } }
[ "you@example.com" ]
you@example.com
d364467bf37b64cbc3f238b6cbb15682f76cd954
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/TemperatureController3500.java
0b9a22d3277a3665464353848272112e543bf4f8
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
371
java
package syncregions; public class TemperatureController3500 { public int execute(int temperature3500, int targetTemperature3500) { //sync _bfpnFUbFEeqXnfGWlV3500, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2