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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fb9c12bc1f6439bcb788bd30286b9f765c4ce782 | be0e7aaf8795a8484a564e462bd72a7df504727c | /src/main/java/com/group/renshi/action/share/CollectionInfoAction.java | a1fa52ca4347a30cbdb00e8dbd3b8ea4b3eba0a6 | [] | no_license | water-fu/renshi | ff88f977b4383f9df519d254335eec1105fed0c4 | 7dc87ea8c7e7cf2ee856998833550f5b9011e15b | refs/heads/master | 2021-01-19T11:32:33.521431 | 2016-03-26T09:36:48 | 2016-03-26T09:36:48 | 35,823,524 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,698 | java | package com.group.renshi.action.share;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.group.renshi.bean.share.CollectionInfoBean;
import com.group.renshi.bean.share.PersonInfoBean;
import com.group.renshi.bean.share.ShareInfoBean;
import com.group.renshi.service.share.CollectionInfoService;
import com.group.renshi.service.share.PersonInfoService;
import com.group.webFramework.annotation.LoginFilter;
import com.group.webFramework.common.BaseController;
import com.group.webFramework.uitl.PageQueryResult;
import com.group.webFramework.uitl.ResponseMessage;
import com.group.webFramework.uitl.SessionControl;
/**
* 总体说明
*
* <p>
* 具体说明
* </p>
*
* @author Administrator
* @version $Id: CollectionInfoAction.java,v 0.1 2015-06-23 下午09:56:44 Exp $
*/
@Controller
@RequestMapping("/blog")
@Scope("prototype")
public class CollectionInfoAction extends BaseController {
@Resource
private CollectionInfoService collectionInfoService;
@Resource
private PersonInfoService personInfoService;
/**
* 收藏
*
* @param shareId
* @param type
* @return
*/
@RequestMapping(value = "addCollection", method = RequestMethod.POST)
@ResponseBody
@LoginFilter(needLogin = true)
public ResponseMessage addCollection(
@ModelAttribute CollectionInfoBean collectionInfoBean) {
try {
// 设置当前登录用户
collectionInfoBean.setAccountId(SessionControl.getOpId(request));
collectionInfoService.insertCollectionInfo(collectionInfoBean);
return responseAjaxResult("");
} catch (Exception e) {
return responseErrorResult(e);
}
}
/**
* 收藏
*
* @param shareId
* @param type
* @return
*/
@RequestMapping(value = "addCollection2", method = RequestMethod.POST)
@ResponseBody
@LoginFilter(needLogin = true)
public ResponseMessage addCollection2(
@ModelAttribute CollectionInfoBean collectionInfoBean) {
try {
// 设置当前登录用户
collectionInfoBean.setAccountId(SessionControl.getOpId(request));
CollectionInfoBean collectionInfoBeanCond = new CollectionInfoBean();
collectionInfoBeanCond
.setAccountId(SessionControl.getOpId(request));
collectionInfoBeanCond.setShareId(collectionInfoBean.getShareId());
int data = 1;
List<CollectionInfoBean> list = collectionInfoService
.listCollectionInfo(collectionInfoBeanCond);
if (list.isEmpty()) {
collectionInfoService.insertCollectionInfo(collectionInfoBean);
data = 1;
} else {
collectionInfoService.deleteCollectionInfo(collectionInfoBean);
data = -1;
}
return responseAjaxResult(data);
} catch (Exception e) {
return responseErrorResult(e);
}
}
/**
* 取消收藏
*
* @param shareId
* @param type
* @return
*/
@RequestMapping(value = "delCollection", method = RequestMethod.POST)
@ResponseBody
@LoginFilter(needLogin = true)
public ResponseMessage delCollection(
@ModelAttribute CollectionInfoBean collectionInfoBean) {
try {
// 设置当前登录用户
collectionInfoBean.setAccountId(SessionControl.getOpId(request));
collectionInfoService.deleteCollectionInfo(collectionInfoBean);
return responseAjaxResult("");
} catch (Exception e) {
return responseErrorResult(e);
}
}
// /**
// * 获取我收藏的分享内容 原来
// *
// * @return
// */
// @RequestMapping(value = "{accountId}/collection")
// @LoginFilter(needLogin = true)
// public ModelAndView getCollection(@PathVariable("accountId") int
// accountId
// // @ModelAttribute PageQueryResult<ShareInfoBean> pageQueryResult
// ) {
// // 获取个人信息
// PersonInfoBean personInfoBean = personInfoService
// .findByAccountId(accountId);
//
// // // 获取收藏列表
// // CollectionInfoBean collectionInfoBean = new CollectionInfoBean();
// // collectionInfoBean.setAccountId(accountId);
// //
// // pageQueryResult = collectionInfoService.pageCollectionInfo(
// // collectionInfoBean, pageQueryResult);
//
// // 结果返回
// Map<String, Object> resultMap = new HashMap<String, Object>();
// resultMap.put("personInfoBean", personInfoBean);
// // resultMap.put("pageQueryResult", pageQueryResult);
//
// return responseResult("/share/person/collect", resultMap);
// }
/**
* 获取我收藏的分享内容 新 jty 8/6
*
* @return
*/
@RequestMapping(value = "{accountId}/collection")
@LoginFilter(needLogin = true)
public ModelAndView getCollection(@PathVariable("accountId") int accountId
) {
// 获取个人信息
PersonInfoBean personInfoBean = personInfoService
.findByAccountId(accountId);
// 结果返回 id
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("personInfoBean", personInfoBean);
return responseResult("/share/person/collect", resultMap);
}
/**
* 根据标题 搜索 收藏记录
*
* @param shareId
* @param type
* @return
*/
@RequestMapping(value = "collectionForSearch", method = RequestMethod.POST)
@ResponseBody
@LoginFilter(needLogin = true)
public ModelAndView searchCollection(
int accountId, int pageNo,
String queryCondition, String collectTitle) {
PageQueryResult<ShareInfoBean> pageQueryResult = new PageQueryResult<ShareInfoBean>();
pageQueryResult.setPageNo(pageNo);
// 获取收藏列表
CollectionInfoBean collectionInfoBean = new CollectionInfoBean();
collectionInfoBean.setAccountId(accountId);
pageQueryResult = collectionInfoService.pageCollectionSearch(
collectionInfoBean, pageQueryResult, collectTitle, request);
List<ShareInfoBean> list = pageQueryResult.getList();
for (ShareInfoBean shareInfo : list) {
// 标题长度过长时,截取前20个字符
if (shareInfo.getShareTitle().length() >= 30)
shareInfo.setShareTitle(shareInfo.getShareTitle().substring(0, 20) + "...");
// 内容过长时 截取前两百个字符
if (shareInfo.getShareDesc().length() >= 200)
shareInfo.setShareDesc(shareInfo.getShareDesc().substring(0, 200) + "...");
}
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("pageQueryResult", pageQueryResult);
return responseResult("/share/person/collectionList", resultMap);
}
} | [
"fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1"
] | fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1 |
6d8582620d15a32e8cd36fbfb0f6c4e437e4c0e7 | 160a34361073a54d39ffa14fdae6ce3cbc7d6e6b | /src/main/java/com/alipay/api/domain/AlipayDataDataserviceBillDownloadurlQueryModel.java | 6103fcffccbca34f8fccf74ceb8a182f31bd5b1c | [
"Apache-2.0"
] | permissive | appbootup/alipay-sdk-java-all | 6a5e55629b9fc77e61ee82ea2c4cdab2091e0272 | 9ae311632a4053b8e5064b83f97cf1503a00147b | refs/heads/master | 2020-05-01T09:45:44.940180 | 2019-03-15T09:52:14 | 2019-03-15T09:52:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,169 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 无授权模式的查询对账单下载地址
*
* @author auto create
* @since 1.0, 2018-08-08 15:18:41
*/
public class AlipayDataDataserviceBillDownloadurlQueryModel extends AlipayObject {
private static final long serialVersionUID = 7895614779682311284L;
/**
* 账单时间:日账单格式为yyyy-MM-dd,月账单格式为yyyy-MM。
*/
@ApiField("bill_date")
private String billDate;
/**
* 账单类型,商户通过接口或商户经开放平台授权后其所属服务商通过接口可以获取以下账单类型:trade、signcustomer;trade指商户基于支付宝交易收单的业务账单;signcustomer是指基于商户支付宝余额收入及支出等资金变动的帐务账单;
*/
@ApiField("bill_type")
private String billType;
public String getBillDate() {
return this.billDate;
}
public void setBillDate(String billDate) {
this.billDate = billDate;
}
public String getBillType() {
return this.billType;
}
public void setBillType(String billType) {
this.billType = billType;
}
}
| [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
3d20c4257e5f2f7e3eae2226982464381c0064d5 | 89723541f3a2cc7087d49dcee592694c5c0513c3 | /hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentScope.java | 809d22f8c0bcd02e8f11335c27d32e09a33143bf | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | rkorytkowski/hapi-fhir | 7207ae68ff8ef6e876f53b51bbdbd0312ae0daa7 | 9f45c2bcfa00349ce17e191899581f4fc6e8c0d6 | refs/heads/master | 2021-07-13T01:06:12.674713 | 2020-06-16T09:11:38 | 2020-06-16T09:12:23 | 145,406,752 | 0 | 2 | Apache-2.0 | 2018-08-20T11:08:35 | 2018-08-20T11:08:35 | null | UTF-8 | Java | false | false | 4,208 | java | package org.hl7.fhir.r4.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
import org.hl7.fhir.exceptions.FHIRException;
public enum ConsentScope {
/**
* Actions to be taken if they are no longer able to make decisions for themselves
*/
ADR,
/**
* Consent to participate in research protocol and information sharing required
*/
RESEARCH,
/**
* Agreement to collect, access, use or disclose (share) information
*/
PATIENTPRIVACY,
/**
* Consent to undergo a specific treatment
*/
TREATMENT,
/**
* added to help the parsers
*/
NULL;
public static ConsentScope fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("adr".equals(codeString))
return ADR;
if ("research".equals(codeString))
return RESEARCH;
if ("patient-privacy".equals(codeString))
return PATIENTPRIVACY;
if ("treatment".equals(codeString))
return TREATMENT;
throw new FHIRException("Unknown ConsentScope code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case ADR: return "adr";
case RESEARCH: return "research";
case PATIENTPRIVACY: return "patient-privacy";
case TREATMENT: return "treatment";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/consentscope";
}
public String getDefinition() {
switch (this) {
case ADR: return "Actions to be taken if they are no longer able to make decisions for themselves";
case RESEARCH: return "Consent to participate in research protocol and information sharing required";
case PATIENTPRIVACY: return "Agreement to collect, access, use or disclose (share) information";
case TREATMENT: return "Consent to undergo a specific treatment";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case ADR: return "Advanced Care Directive";
case RESEARCH: return "Research";
case PATIENTPRIVACY: return "Privacy Consent";
case TREATMENT: return "Treatment";
default: return "?";
}
}
}
| [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
2fc1a202a5d5147e3bdc1608c7d7140832a35413 | bfc659a2a9ab21124a6e02a7a3186d1a0888b250 | /app/src/main/java/com/sds/acube/app/appcom/util/FileUtil.java | c73c16f840fa5a456f91dca941d022851955b48d | [] | no_license | seoyoungrag/byucksan_app | 45d116c6bea396c04c7fc2fece7882065e875a6f | 6fe93f3915afdc0fa395cff7e85591d1efa956c6 | refs/heads/master | 2021-03-27T17:22:08.498608 | 2017-07-24T08:18:33 | 2017-07-24T08:18:33 | 83,017,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,493 | java | package com.sds.acube.app.appcom.util;
import java.io.File;
import java.util.List;
import com.sds.acube.app.appcom.vo.FileVO;
import com.sds.acube.app.appcom.vo.StorFileVO;
/**
* Class Name : FileUtil.java <br>
* Description : 설명 <br>
* Modification Information <br>
* <br>
* 수 정 일 : 2011. 3. 28. <br>
* 수 정 자 : Timothy <br>
* 수정내용 : <br>
*
* @author Timothy
* @since 2011. 3. 28.
* @version 1.0
* @see com.sds.acube.app.appcom.util.FileUtil.java
*/
public final class FileUtil {
public static boolean validateBodyList(List<List<StorFileVO>> storFileVOsList) {
boolean result = true;
int listCount = storFileVOsList.size();
for (int loop = 0; loop < listCount; loop++) {
List<StorFileVO> storFileVOs = storFileVOsList.get(loop);
result = validateBody(storFileVOs);
if (!result) {
break;
}
}
return result;
}
public static boolean validateBody(List<StorFileVO> storFileVOs) {
boolean result = true;
boolean existHwp = false;
if (storFileVOs == null) {
result = false;
} else {
int storFileCount = storFileVOs.size();
for (int loop = 0; loop < storFileCount; loop++) {
StorFileVO storFileVO = storFileVOs.get(loop);
String filePath = storFileVO.getFilepath();
File file = new File(filePath);
if (file.exists()) {
int pos = filePath.lastIndexOf(".");
if (pos != -1 && pos < (filePath.length() - 1)) {
String extension = (filePath.substring(pos + 1)).toLowerCase();
if ("hwp".equals(extension) || "doc".equals(extension)) {//added by jkkim word 추가 작업 관련 작업 2013.04.14
existHwp = true;
long fileSize = file.length() / 1024;
if (fileSize < 6) {
result = false;
break;
}
} else if ("html".equals(extension)) {
existHwp = true;
}
}
} else {
result = false;
break;
}
}
}
return (result && existHwp);
}
public static boolean validateBody(StorFileVO storFileVO) {
boolean result = true;
boolean existHwp = false;
if (storFileVO == null) {
result = false;
} else {
String filePath = storFileVO.getFilepath();
File file = new File(filePath);
if (file.exists()) {
int pos = filePath.lastIndexOf(".");
if (pos != -1 && pos < (filePath.length() - 1)) {
String extension = (filePath.substring(pos + 1)).toLowerCase();
if ("hwp".equals(extension)) {
existHwp = true;
long fileSize = file.length() / 1024;
if (fileSize < 6) {
result = false;
}
}
}
} else {
result = false;
}
}
return (result && existHwp);
}
public static boolean validateBodyFile(List<FileVO> fileVOs) {
boolean result = true;
boolean existHwp = false;
if (fileVOs == null) {
result = false;
} else {
int storFileCount = fileVOs.size();
for (int loop = 0; loop < storFileCount; loop++) {
FileVO fileVO = fileVOs.get(loop);
String filePath = fileVO.getFilePath();
File file = new File(filePath);
if (file.exists()) {
int pos = filePath.lastIndexOf(".");
if (pos != -1 && pos < (filePath.length() - 1)) {
String extension = (filePath.substring(pos + 1)).toLowerCase();
if ("hwp".equals(extension) || "doc".equals(extension)) {
existHwp = true;
long fileSize = file.length() / 1024;
if (fileSize < 6) {
result = false;
break;
}
}else if ("html".equals(extension)) {
existHwp = true;
}
}
} else {
result = false;
break;
}
}
}
return (result && existHwp);
}
public static boolean validateBodyFile(FileVO fileVO) {
boolean result = true;
boolean existHwp = false;
if (fileVO == null) {
result = false;
} else {
String filePath = fileVO.getFilePath();
File file = new File(filePath);
if (file.exists()) {
int pos = filePath.lastIndexOf(".");
if (pos != -1 && pos < (filePath.length() - 1)) {
String extension = (filePath.substring(pos + 1)).toLowerCase();
if ("hwp".equals(extension)) {
existHwp = true;
long fileSize = file.length() / 1024;
if (fileSize < 6) {
result = false;
}
}
}
} else {
result = false;
}
}
return (result && existHwp);
}
}
| [
"truezure@gmail.com"
] | truezure@gmail.com |
5684211e5152c211430828259ebd28116b93dda6 | a04dc99445d32c01c0dffa28cf41cba40059f5fc | /qigsaw-android/splitloader/src/main/java/com/iqiyi/android/qigsaw/core/splitload/SplitLibraryLoaderHelper.java | 8f261d7024e4c30f90594807ff43e1f1771d78e2 | [
"MIT"
] | permissive | will-android/Qigsaw | f53e9d38d8e093a8a36e15e3e6cb0e3d5034ab48 | 657b3838bf9c906da51b5b11845cb9940d52337b | refs/heads/master | 2020-06-17T19:29:37.488190 | 2020-05-02T23:58:14 | 2020-05-02T23:58:14 | 196,025,356 | 1 | 0 | NOASSERTION | 2020-05-02T23:58:15 | 2019-07-09T14:30:44 | Java | UTF-8 | Java | false | false | 4,384 | java | /*
* MIT License
*
* Copyright (c) 2019-present, iQIYI, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.iqiyi.android.qigsaw.core.splitload;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import androidx.annotation.RestrictTo;
import com.iqiyi.android.qigsaw.core.splitrequest.splitinfo.SplitInfo;
import com.iqiyi.android.qigsaw.core.splitrequest.splitinfo.SplitInfoManager;
import com.iqiyi.android.qigsaw.core.splitrequest.splitinfo.SplitInfoManagerService;
import com.iqiyi.android.qigsaw.core.splitrequest.splitinfo.SplitPathManager;
import java.io.File;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.List;
import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP;
@RestrictTo(LIBRARY_GROUP)
public class SplitLibraryLoaderHelper {
@SuppressLint("UnsafeDynamicallyLoadedCode")
public static boolean loadSplitLibrary(Context context, String libraryName) {
if (!SplitLoadManagerService.hasInstance()) {
return false;
}
if (SplitLoadManagerService.getInstance().splitLoadMode() != SplitLoad.MULTIPLE_CLASSLOADER) {
return false;
}
SplitInfoManager manager = SplitInfoManagerService.getInstance();
assert manager != null;
Collection<SplitInfo> splits = manager.getAllSplitInfo(context);
if (splits == null) {
return false;
}
for (SplitInfo info : splits) {
if (info.hasLibs()) {
List<SplitInfo.LibInfo.Lib> libs = info.getLibInfo().getLibs();
for (SplitInfo.LibInfo.Lib lib : libs) {
if (lib.getName().equals(System.mapLibraryName(libraryName))) {
if (context instanceof Application) {
String libPath = SplitPathManager.require().getSplitLibDir(info).getAbsolutePath() + File.separator + lib.getName();
try {
System.load(libPath);
return true;
} catch (UnsatisfiedLinkError error) {
return false;
}
} else {
SplitDexClassLoader classLoader = SplitApplicationLoaders.getInstance().getClassLoader(info.getSplitName());
if (classLoader != null) {
return loadSplitLibrary0(classLoader, info.getSplitName(), libraryName);
}
}
break;
}
}
}
}
return false;
}
private static boolean loadSplitLibrary0(ClassLoader classLoader, String splitName, String name) {
try {
Class<?> splitLoaderCl = classLoader.loadClass("com.iqiyi.android.qigsaw.core.splitlib." + splitName + "SplitLibraryLoader");
Object splitLoader = splitLoaderCl.newInstance();
Method method = HiddenApiReflection.findMethod(splitLoaderCl, "loadSplitLibrary", String.class);
method.invoke(splitLoader, name);
return true;
} catch (Throwable ignored) {
}
return false;
}
}
| [
"kisson_cjw@hotmail.com"
] | kisson_cjw@hotmail.com |
17d322d167c77d160234a88a9ffe4476979ccc2d | afaf042d23dbb871503f9e075ec749bd89052ff6 | /administrator/src/camp/controller/CampSubmitResultServlet.java | 1fb0d2bc125f74c864474e98ca4e1237971c77df | [] | no_license | ottocamp/newnewOtto | cb2f28b88500b1367f2c91cd4e2e0aec69bc86c0 | 56fcfc6984a77660260d00647741bfb39abc0ce3 | refs/heads/master | 2020-09-08T11:49:43.046850 | 2019-11-13T06:00:37 | 2019-11-13T06:00:37 | 221,124,454 | 0 | 0 | null | 2019-11-12T23:55:26 | 2019-11-12T03:45:24 | JavaScript | UTF-8 | Java | false | false | 1,706 | java | package camp.controller;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import camp.model.service.CampService;
import camp.model.vo.Attachment;
import camp.model.vo.CampInfo;
import user.model.vo.User;
/**
* Servlet implementation class CampSubmitResultServlet
*/
@WebServlet("/submitresult.ca")
public class CampSubmitResultServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public CampSubmitResultServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
User loginUser = (User)request.getSession().getAttribute("loginUser");
int uNo = loginUser.getUserNo();
ArrayList<CampInfo> cList = new CampService().selectSubmitResult(uNo);
request.setAttribute("cList", cList);
request.getRequestDispatcher("views/camp/campSubmitResultView.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
doGet(request, response);
}
}
| [
"user1@user1-PC"
] | user1@user1-PC |
2d19444ae773dd097b9858c0a61d7731d98668ae | 8176e6ecef92c733d1da4667e68f793a1769888d | /runtime/src/main/java/com/kotcrab/vis/runtime/system/delegate/DeferredEntityProcessingSystem.java | 1341d8f214403debde11b7d4ba537f58f3af8e02 | [
"Apache-2.0"
] | permissive | mbrlabs/vis-editor | 190811d37d7414d5dc78ce721bc1a5fd26b09009 | 2ffbb29027a0e4727bb090176ca1e6e25e7a53b2 | refs/heads/master | 2020-04-05T22:59:11.021635 | 2016-11-20T16:57:36 | 2016-11-20T16:57:36 | 60,613,512 | 1 | 0 | null | 2016-06-07T13:03:00 | 2016-06-07T13:02:59 | null | UTF-8 | Java | false | false | 3,185 | java | /*
* Copyright 2014-2016 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.kotcrab.vis.runtime.system.delegate;
import com.artemis.Aspect;
import com.artemis.BaseEntitySystem;
/**
* Actor for a principal system.
* <p>
* Deferred entity systems are a drop in replacement for
* EntityProcessingSystem, where you need to delegate order of
* entity processing to an overarching system.
* <p>
* One example would be an animation, font and map rendering
* subsystem of a simplistic render pipeline principal,
* sorting render calls by z-layer.
* <p>
* Upon entity insertion/removal, the system registers the entity
* and itself with the principal. The principal can then register
* and basic upon this information, and call begin/process(entity)/end
* methods whenever desired.
* @author Daan van Yperen
* @see EntityProcessAgent
* @see EntityProcessPrincipal
*/
public abstract class DeferredEntityProcessingSystem extends BaseEntitySystem {
private final Aspect.Builder aspect;
private final EntityProcessPrincipal principal;
/**
* Creates an entity system that uses the specified aspect as a matcher
* against entities.
* @param aspect to match against entities
* @param principal principal that will organize process calls to this system.
*/
public DeferredEntityProcessingSystem (Aspect.Builder aspect, EntityProcessPrincipal principal) {
super(aspect);
this.aspect = aspect;
this.principal = principal;
}
@Override
protected void initialize () {
super.initialize();
setEnabled(false);
}
/**
* Process a entity this system is interested in.
* @param e the entity to process
*/
protected abstract void process (int e);
@Override
protected void removed (int entityId) {
// inform delegation handler
principal.unregisterAgent(entityId, localProcessingAgent);
super.removed(entityId);
}
@Override
protected void inserted (int entityId) {
super.inserted(entityId);
// warn delegation handler we've lost interest in this entity.
principal.registerAgent(entityId, localProcessingAgent);
}
@Override
protected void processSystem () {
}
/**
* Simple processing agent that delegates to this system.
* Workaround for naming collisions, so the all callers
* can use the methods they are used to.
*/
protected EntityProcessAgent localProcessingAgent = new EntityProcessAgent() {
@Override
public void begin () {
DeferredEntityProcessingSystem.this.begin();
}
@Override
public void end () {
DeferredEntityProcessingSystem.this.end();
}
@Override
public void process (int e) {
DeferredEntityProcessingSystem.this.process(e);
}
};
}
| [
"kotcrab@gmail.com"
] | kotcrab@gmail.com |
7783360423a47173d466b63f7982d530e91e8be0 | 6402338098947f597731fc56058d77bf4e9229ec | /src/com/ery/hadoop/hq/common/Mailer.java | a7c280693073c3fff17bcc203b6d7838cd974b95 | [] | no_license | hans511002/mrddx-web | 57f582e4863899df9869ba9887b7c468edceb7cc | 4a907fa0e0db13e7358a5b149a6b4c1058ac124c | refs/heads/master | 2021-01-18T16:51:20.332247 | 2017-07-18T06:39:07 | 2017-07-18T06:39:07 | 86,774,312 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,184 | java | package com.ery.hadoop.hq.common;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
public class Mailer {
private MimeMessage mimeMsg;
private Session session;
private Properties props;
private String username = "";
private String password = "";
private Multipart mp;
public Mailer() {
setSmtpHost("sohu.com");
createMimeMessage();
}
public Mailer(String smtp) {
setSmtpHost(smtp);
createMimeMessage();
}
public void setSmtpHost(String hostName) {
if (props == null)
props = System.getProperties();
props.put("mail.smtp.host", hostName);
}
public boolean createMimeMessage() {
try {
session = Session.getDefaultInstance(props, null);
} catch (Exception e) {
return false;
}
try {
mimeMsg = new MimeMessage(session);
mp = new MimeMultipart();
return true;
} catch (Exception e) {
return false;
}
}
public void setNeedAuth(boolean need) {
if (props == null)
props = System.getProperties();
if (need) {
props.put("mail.smtp.auth", "true");
} else {
props.put("mail.smtp.auth", "false");
}
}
public void setNamePass(String name, String pass) {
username = name;
password = pass;
}
public boolean setSubject(String mailSubject) {
try {
mimeMsg.setSubject(mailSubject);
return true;
} catch (Exception e) {
System.err.println("�����ʼ��������?");
return false;
}
}
public boolean setBody(String mailBody, boolean b_html) {
try {
BodyPart bp = new MimeBodyPart();
mailBody = new String(mailBody.getBytes("ISO8859-1"), "UTF-8");
if (b_html)
bp.setContent("<meta http-equiv=Content-Type content=text/html; charset=UTF-8>" + mailBody,
"text/html;charset=UTF-8");
else
bp.setText(mailBody);
mp.addBodyPart(bp);
return true;
} catch (Exception e) {
System.err.println("�����ʼ����ij���?" + e);
return false;
}
}
public boolean setFrom(String from) {
try {
mimeMsg.setFrom(new InternetAddress(from));
return true;
} catch (Exception e) {
return false;
}
}
public boolean setTo(String to) {
if (to == null)
return false;
try {
mimeMsg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
return true;
} catch (Exception e) {
return false;
}
}
public boolean addTo(String to) {
if (to == null)
return false;
try {
mimeMsg.addRecipients(Message.RecipientType.TO, to);
return true;
} catch (MessagingException e) {
e.printStackTrace();
return false;
}
}
public boolean setCopyTo(String copyto) {
if (copyto == null)
return false;
try {
mimeMsg.setRecipients(Message.RecipientType.CC, (Address[]) InternetAddress.parse(copyto));
return true;
} catch (Exception e) {
return false;
}
}
public boolean addCopyTo(String to) {
if (to == null)
return false;
try {
mimeMsg.addRecipients(Message.RecipientType.CC, to);
return true;
} catch (MessagingException e) {
e.printStackTrace();
return false;
}
}
public boolean sendout() {
try {
mimeMsg.setContent(mp);
mimeMsg.saveChanges();
System.out.println("���ڷ����ʼ�......");
Session mailSession = Session.getInstance(props, null);
Transport transport = mailSession.getTransport("smtp");
transport.connect((String) props.get("mail.smtp.host"), username, password);
transport.sendMessage(mimeMsg, mimeMsg.getAllRecipients());
System.out.println("�ʼ����ͳɹ���");
transport.close();
return true;
} catch (Exception e) {
System.err.println("�ʼ�����ʧ�ܣ�" + e);
return false;
}
}
}
| [
"hans511002@sohu.com"
] | hans511002@sohu.com |
b5a5a98ad8b186aac371b457420cff8c54c13753 | 555d6b6b63dc7a1dac12ed5629307796f1bcf537 | /net/minecraft/client/model/ModelZombieVillager.java | 0122bb4da5cbf2e3e6ab95c01b65b522b0389387 | [] | no_license | CrxsCode/Minecraft-Hack-Client-1.8 | 179d992cc41d8564b4ed6aaccdd99e1710f7cccf | ea2901180d51806c432d7acd85ecf430f9a6167c | refs/heads/master | 2020-03-19T10:12:05.310557 | 2018-06-06T16:01:24 | 2018-06-06T16:01:24 | 136,345,526 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,240 | java | package net.minecraft.client.model;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class ModelZombieVillager extends ModelBiped {
public ModelZombieVillager() {
this(0.0F, 0.0F, false);
}
public ModelZombieVillager(float p_i1165_1_, float p_i1165_2_, boolean p_i1165_3_) {
super(p_i1165_1_, 0.0F, 64, p_i1165_3_?32:64);
if(p_i1165_3_) {
this.bipedHead = new ModelRenderer(this, 0, 0);
this.bipedHead.addBox(-4.0F, -10.0F, -4.0F, 8, 8, 8, p_i1165_1_);
this.bipedHead.setRotationPoint(0.0F, 0.0F + p_i1165_2_, 0.0F);
} else {
this.bipedHead = new ModelRenderer(this);
this.bipedHead.setRotationPoint(0.0F, 0.0F + p_i1165_2_, 0.0F);
this.bipedHead.setTextureOffset(0, 32).addBox(-4.0F, -10.0F, -4.0F, 8, 10, 8, p_i1165_1_);
this.bipedHead.setTextureOffset(24, 32).addBox(-1.0F, -3.0F, -6.0F, 2, 4, 2, p_i1165_1_);
}
}
public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entityIn) {
super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, entityIn);
float f = MathHelper.sin(this.swingProgress * (float)Math.PI);
float f1 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * (float)Math.PI);
this.bipedRightArm.rotateAngleZ = 0.0F;
this.bipedLeftArm.rotateAngleZ = 0.0F;
this.bipedRightArm.rotateAngleY = -(0.1F - f * 0.6F);
this.bipedLeftArm.rotateAngleY = 0.1F - f * 0.6F;
this.bipedRightArm.rotateAngleX = -((float)Math.PI / 2F);
this.bipedLeftArm.rotateAngleX = -((float)Math.PI / 2F);
this.bipedRightArm.rotateAngleX -= f * 1.2F - f1 * 0.4F;
this.bipedLeftArm.rotateAngleX -= f * 1.2F - f1 * 0.4F;
this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
}
}
| [
"mail.pxline@gmail.com"
] | mail.pxline@gmail.com |
23bc809274a61463a950e9849b4e52a05d8e0155 | 327d615dbf9e4dd902193b5cd7684dfd789a76b1 | /base_source_from_JADX/sources/com/cyberneid/p105d/p114g/p126f/p128b/C1888l.java | 53e3fe4a678cfee32bb9573c96420f86006a595d | [] | no_license | dnosauro/singcie | e53ce4c124cfb311e0ffafd55b58c840d462e96f | 34d09c2e2b3497dd452246b76646b3571a18a100 | refs/heads/main | 2023-01-13T23:17:49.094499 | 2020-11-20T10:46:19 | 2020-11-20T10:46:19 | 314,513,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 900 | java | package com.cyberneid.p105d.p114g.p126f.p128b;
import com.cyberneid.p105d.p108b.C1605b;
import com.cyberneid.p105d.p108b.C1607d;
import com.cyberneid.p105d.p108b.C1613i;
/* renamed from: com.cyberneid.d.g.f.b.l */
public class C1888l extends C1877a {
public C1888l() {
mo7505d().mo7523a(C1613i.f5258gV, "Widget");
}
public C1888l(C1607d dVar) {
super(dVar);
mo7505d().mo7523a(C1613i.f5258gV, "Widget");
}
/* renamed from: g */
public C1889m mo8349g() {
C1605b c = mo7505d().mo7539c(C1613i.f5175es);
if (c instanceof C1607d) {
return new C1889m((C1607d) c);
}
return null;
}
/* renamed from: h */
public C1893q mo8350h() {
C1607d dVar = (C1607d) mo7505d().mo7554k(C1613i.f4917Z);
if (dVar != null) {
return new C1893q(dVar);
}
return null;
}
}
| [
"dno_sauro@yahoo.it"
] | dno_sauro@yahoo.it |
d851319ee4e5e95c6c8c93c7e45ebc1d09d8ea97 | d68b23a8af66b07f6e443e1ad485fa16150b0dc0 | /csharp-impl/src/main/java/consulo/csharp/impl/ide/findUsage/usageType/CSharpUsageTypeProvider.java | 4677a46cfdbe8814dee29c8fdd57209e06231a05 | [
"Apache-2.0"
] | permissive | consulo/consulo-csharp | 34e1f591b31411cfa4ac6b96e82522e5ffbf80ad | ccb078d27b4ba37be9bb3f2c258aad9fb152a640 | refs/heads/master | 2023-08-31T16:12:36.841763 | 2023-08-17T10:56:13 | 2023-08-17T10:56:13 | 21,350,424 | 51 | 9 | Apache-2.0 | 2023-01-01T16:33:23 | 2014-06-30T12:35:16 | Java | UTF-8 | Java | false | false | 3,960 | java | /*
* Copyright 2013-2017 consulo.io
*
* 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 consulo.csharp.impl.ide.findUsage.usageType;
import consulo.annotation.access.RequiredReadAction;
import consulo.annotation.component.ExtensionImpl;
import consulo.csharp.lang.impl.psi.source.CSharpAsExpressionImpl;
import consulo.csharp.lang.impl.psi.source.CSharpIsExpressionImpl;
import consulo.csharp.lang.impl.psi.source.CSharpTypeCastExpressionImpl;
import consulo.csharp.lang.impl.psi.source.CSharpTypeOfExpressionImpl;
import consulo.csharp.lang.psi.*;
import consulo.dotnet.psi.DotNetAttribute;
import consulo.dotnet.psi.DotNetParameter;
import consulo.dotnet.psi.DotNetType;
import consulo.language.psi.PsiElement;
import consulo.language.psi.util.PsiTreeUtil;
import consulo.usage.UsageType;
import consulo.usage.UsageTypeProvider;
import javax.annotation.Nullable;
/**
* @author VISTALL
* @since 01.11.14
*/
@ExtensionImpl
public class CSharpUsageTypeProvider implements UsageTypeProvider
{
public static final UsageType AS_METHOD_REF = new UsageType("As method reference expression");
public static final UsageType METHOD_CALL = new UsageType("Method call");
public static final UsageType ATTRIBUTE = new UsageType("Attribute");
public static final UsageType CLASS_IN_AS = new UsageType("Usage in 'as' expression");
public static final UsageType CLASS_IN_IS = new UsageType("Usage in 'is' expression");
public static final UsageType TYPE_OF_EXPRESSION = new UsageType("Usage in 'typeof' expression");
@Nullable
@Override
@RequiredReadAction
public UsageType getUsageType(PsiElement element)
{
if(element instanceof CSharpReferenceExpression)
{
PsiElement resolvedElement = ((CSharpReferenceExpression) element).resolve();
if(resolvedElement == null)
{
return null;
}
CSharpReferenceExpression.ResolveToKind kind = ((CSharpReferenceExpression) element).kind();
switch(kind)
{
case METHOD:
return METHOD_CALL;
case CONSTRUCTOR:
if(element.getParent() instanceof DotNetAttribute)
{
return ATTRIBUTE;
}
return UsageType.CLASS_NEW_OPERATOR;
case TYPE_LIKE:
DotNetType type = PsiTreeUtil.getParentOfType(element, DotNetType.class);
if(type == null)
{
return null;
}
PsiElement parent = type.getParent();
if(parent instanceof CSharpLocalVariable)
{
return UsageType.CLASS_LOCAL_VAR_DECLARATION;
}
else if(parent instanceof CSharpFieldDeclaration)
{
return UsageType.CLASS_FIELD_DECLARATION;
}
else if(parent instanceof DotNetParameter)
{
return UsageType.CLASS_METHOD_PARAMETER_DECLARATION;
}
else if(parent instanceof CSharpSimpleLikeMethodAsElement)
{
return UsageType.CLASS_METHOD_RETURN_TYPE;
}
else if(parent instanceof CSharpTypeCastExpressionImpl)
{
return UsageType.CLASS_CAST_TO;
}
else if(parent instanceof CSharpAsExpressionImpl)
{
return CLASS_IN_AS;
}
else if(parent instanceof CSharpIsExpressionImpl)
{
return CLASS_IN_IS;
}
else if(parent instanceof CSharpTypeOfExpressionImpl)
{
return TYPE_OF_EXPRESSION;
}
break;
case ANY_MEMBER:
if(resolvedElement instanceof CSharpMethodDeclaration && !((CSharpMethodDeclaration) resolvedElement).isDelegate())
{
return AS_METHOD_REF;
}
break;
}
}
return null;
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
a45bc6aa61b8e147ae5dc00aea957da4acb4a93d | 024cc651169340a2609e99c6e7ce7544f6ebf483 | /authorization-service/src/main/java/com/zhcx/authorization/controller/netcar/kafka/KafkaStreamController.java | a7563367d2e7983adaad767ab096fba9922a13e5 | [] | no_license | 3103509329/transfer_trolley | cb1df2df0c05013615091c36f87460b85a98239e | e8b8cd0f17062457a00188771c8d99ed2340e02b | refs/heads/master | 2023-01-28T23:11:45.245311 | 2020-12-09T03:30:00 | 2020-12-09T03:30:00 | 319,565,360 | 0 | 0 | null | 2020-12-10T14:11:46 | 2020-12-08T07:51:32 | Java | UTF-8 | Java | false | false | 1,439 | java | package com.zhcx.authorization.controller.netcar.kafka;
import com.zhcx.authorization.utils.MessageResp;
import com.zhcx.netcarbasic.facade.kafka.StreamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Lee
* @email 570815140@qq.com
* @date 2019/6/9 11:52
**/
@RestController
@RequestMapping("/netcar/kafka/stream")
public class KafkaStreamController {
@Autowired
private StreamService streamService;
@GetMapping("/startOrderStream")
public MessageResp startOrderStream(){
MessageResp messageResp = new MessageResp();
int result = streamService.startOrderStream();
messageResp.setData(result);
return messageResp;
}
@GetMapping("/startDistanceStream")
public MessageResp startDistanceStream(){
MessageResp messageResp = new MessageResp();
int result = streamService.startDistanceStream();
messageResp.setData(result);
return messageResp;
}
@GetMapping("/startComplaintStream")
public MessageResp startComplaintStream(){
MessageResp messageResp = new MessageResp();
int result = streamService.startComplaintStream();
messageResp.setData(result);
return messageResp;
}
}
| [
"3103509329@qq.com"
] | 3103509329@qq.com |
f6f8b95d2d0d37f43c174585f4255b7eb7366925 | 72bf7b3c0ac194703cb91d954dd9e611acf88865 | /PokemonToronto/core/src/com/pokemon/toronto/game/com/pokemon/toronto/skill/Electric/ThunderWave.java | 70ca7152bf1fde590133534d104804b8278833b0 | [] | no_license | amitkpandey/pokemon | a41537ac3d05bfd85b73730316eaf82d9ae37776 | 51d62203b28147511d96ed4e2cbfd60c8777e76f | refs/heads/master | 2022-04-27T02:48:50.607800 | 2020-04-26T00:24:26 | 2020-04-26T00:24:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,330 | java | package com.pokemon.toronto.game.com.pokemon.toronto.skill.Electric;
import com.pokemon.toronto.game.com.pokemon.toronto.Field.Field;
import com.pokemon.toronto.game.com.pokemon.toronto.Field.SubField;
import com.pokemon.toronto.game.com.pokemon.toronto.Pokemon.Pokemon;
import com.pokemon.toronto.game.com.pokemon.toronto.animation.SkillAnimation;
import com.pokemon.toronto.game.com.pokemon.toronto.animation.skill.TackleAnimation;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.EffectSkill;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.FailResult;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.SecondaryEffect;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.Skill;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.SkillDescription;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.SkillFactory;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.skill_effects.ParalysisEffect;
import com.pokemon.toronto.game.com.pokemon.toronto.skill.skill_effects.SpecialDefenseEffect;
import java.util.List;
/**
* Created by Gregory on 10/22/2017.
*/
public class ThunderWave extends EffectSkill {
/**
* - Name: Thunder Wave
* - Type: Electric
* - PP: 20
* - Cat: Misc
* - Accuracy: 90
*/
public ThunderWave() {
super(SkillFactory.THUNDER_WAVE, "Thunder Wave", SkillDescription.THUNDER_WAVE, 20,
Pokemon.Type.ELECTRIC, 90);
effects.add(new ParalysisEffect(SecondaryEffect.Target.ENEMY));
}
@Override
public FailResult willFail(Pokemon skillUser, Pokemon enemyPokemon, Field field,
SubField userField, SubField enemyField, boolean isFirstAttacker,
Skill targetsSkill) {
if (enemyPokemon.isStatused()) {
return new FailResult("It failed...");
}
return new FailResult(false);
}
/**
* Return Thunder Wave's skill animation.
* @param userAnimation Whether or not the skill's animation is from the user
* using the skill or the enemy using the skill.
* @return Thunder Wave's skill animation.
*/
@Override
public SkillAnimation getAnimation(boolean userAnimation) {
return new TackleAnimation(userAnimation);
}
}
| [
"gregory.kelsie@gmail.com"
] | gregory.kelsie@gmail.com |
05bbe6d7cb00909d75d1adc453aedc908bdd6103 | 2daea090c54d11688b7e2f40fbeeda22fe3d01f6 | /header/src/main/java/org/zstack/header/tag/APICreateTagMsg.java | 55b1962a963b478dffa2fca61d47fa21eb1e52d1 | [
"Apache-2.0"
] | permissive | jxg01713/zstack | 1f0e474daa6ca4647d0481c7e44d86a860ac209c | 182fb094e9a6ef89cf010583d457a9bf4f033f33 | refs/heads/1.0.x | 2021-06-20T12:36:16.609798 | 2016-03-17T08:03:29 | 2016-03-17T08:03:29 | 197,339,567 | 0 | 0 | Apache-2.0 | 2021-03-19T20:23:19 | 2019-07-17T07:36:39 | Java | UTF-8 | Java | false | false | 862 | java | package org.zstack.header.tag;
import org.zstack.header.message.APIMessage;
import org.zstack.header.message.APIParam;
/**
*/
public abstract class APICreateTagMsg extends APIMessage {
@APIParam
private String resourceType;
@APIParam(checkAccount = true)
private String resourceUuid;
@APIParam
private String tag;
public String getResourceType() {
return resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public String getResourceUuid() {
return resourceUuid;
}
public void setResourceUuid(String resourceUuid) {
this.resourceUuid = resourceUuid;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
}
| [
"xing5820@gmail.com"
] | xing5820@gmail.com |
38edb2ddb75f096a65cc8279c3e3532e61237fee | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.horizon-Horizon/sources/X/AnonymousClass1uS.java | 7a112ec0c6849e30b38fae5503c21ffeebae11df | [] | 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 | 176 | java | package X;
/* renamed from: X.1uS reason: invalid class name */
public final class AnonymousClass1uS implements AbstractC10671uj {
public static AnonymousClass1uS A00;
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
30f6edc94a371b2be7e0b5e32e39bc3f5a9eebda | 4984bb50d3b19fe7d64ae76207a55549356bbdea | /goods/src/cn/itcast/goods/order/service/OrderService.java | 779c80216d64d2962b29c50dad280e8c28c1af67 | [] | no_license | MyInta/ssm | 1524e1ab86181c4addf476ec3d98835b38f10bdf | 09857e49a91cee4479d0ef6aeda0225199552ece | refs/heads/master | 2020-04-25T19:53:55.861710 | 2019-03-25T13:47:41 | 2019-03-25T13:47:44 | 173,036,636 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,853 | java | package cn.itcast.goods.order.service;
import java.sql.SQLException;
import cn.itcast.goods.order.dao.OrderDao;
import cn.itcast.goods.order.domain.Order;
import cn.itcast.goods.pager.PageBean;
import cn.itcast.jdbc.JdbcUtils;
public class OrderService {
private OrderDao orderDao = new OrderDao();
/**
* 修改订单状态
* @param oid
* @param status
*/
public void updateStatus(String oid,int status) {
try {
orderDao.updateStatus(oid,status);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 查询订单状态
* @param oid
* @return
*/
public int findStatus(String oid) {
try {
return orderDao.findStatus(oid);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 加载订单
* @param oid
* @return
*/
public Order load(String oid) {
try {
//添加事务
JdbcUtils.beginTransaction();
Order order = orderDao.load(oid);
//提交事务
JdbcUtils.commitTransaction();
return order;
} catch (SQLException e) {
try {
JdbcUtils.rollbackTransaction();
} catch (SQLException e1) {}
throw new RuntimeException(e);
}
}
/**
* 生成订单
* @param order
*/
public void createOrder(Order order){
try {
//添加事务
JdbcUtils.beginTransaction();
orderDao.add(order);
//提交事务
JdbcUtils.commitTransaction();
} catch (SQLException e) {
try {
JdbcUtils.rollbackTransaction();
} catch (SQLException e1) {}
throw new RuntimeException(e);
}
}
/**
* 我的订单
* @param uid
* @param pc
* @return
*/
public PageBean<Order> myOrders(String uid,int pc){
try {
//添加事务
JdbcUtils.beginTransaction();
PageBean<Order> pb = orderDao.findByUser(uid, pc);
//提交事务
JdbcUtils.commitTransaction();
return pb;
} catch (SQLException e) {
try {
JdbcUtils.rollbackTransaction();
} catch (SQLException e1) {}
throw new RuntimeException(e);
}
}
/**
* 查询所有
* @param pc
* @return
*/
public PageBean<Order> findAll(int pc){
try {
//添加事务
JdbcUtils.beginTransaction();
PageBean<Order> pb = orderDao.findAll( pc);
//提交事务
JdbcUtils.commitTransaction();
return pb;
} catch (SQLException e) {
try {
JdbcUtils.rollbackTransaction();
} catch (SQLException e1) {}
throw new RuntimeException(e);
}
}
/**
* 按照状态查询
* @param status
* @param pc
* @return
*/
public PageBean<Order> findByStatus(int status,int pc){
try {
//添加事务
JdbcUtils.beginTransaction();
PageBean<Order> pb = orderDao.findByStatus(status, pc);
//提交事务
JdbcUtils.commitTransaction();
return pb;
} catch (SQLException e) {
try {
JdbcUtils.rollbackTransaction();
} catch (SQLException e1) {}
throw new RuntimeException(e);
}
}
}
| [
"782720519@qq.com"
] | 782720519@qq.com |
da00425f09c1f284c5e952ddf893e9fb85d4665c | f009dc33f9624aac592cb66c71a461270f932ffa | /src/main/java/com/alipay/api/response/AlipayInsSceneInsserviceprodSyncResponse.java | 45ead5c411b91c9907e3f9063dc478352d213974 | [
"Apache-2.0"
] | permissive | 1093445609/alipay-sdk-java-all | d685f635af9ac587bb8288def54d94e399412542 | 6bb77665389ba27f47d71cb7fa747109fe713f04 | refs/heads/master | 2021-04-02T16:49:18.593902 | 2020-03-06T03:04:53 | 2020-03-06T03:04:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 883 | java | package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ins.scene.insserviceprod.sync response.
*
* @author auto create
* @since 1.0, 2019-05-28 10:04:49
*/
public class AlipayInsSceneInsserviceprodSyncResponse extends AlipayResponse {
private static final long serialVersionUID = 4135721621949711126L;
/**
* 节点描述信息
*/
@ApiField("node_desc")
private String nodeDesc;
/**
* 节点名称
*/
@ApiField("node_name")
private String nodeName;
public void setNodeDesc(String nodeDesc) {
this.nodeDesc = nodeDesc;
}
public String getNodeDesc( ) {
return this.nodeDesc;
}
public void setNodeName(String nodeName) {
this.nodeName = nodeName;
}
public String getNodeName( ) {
return this.nodeName;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
b08174ee4e6a0b1d8a6a93e06157d67d634c948a | 468f91882cc8fffd2d684cb063a25ce4c22432c6 | /domain/domain-model/src/main/java/com/codigo/aplios/domain/model/common/EntityRowInfo.java | 578bbe465ca7db88c2a5026a0a992c0fb61d5925 | [] | no_license | andyradz/codigo.aplios | 09b314fcc02ee45ac2916466dd9f965290433624 | d5e232ca71b382b7cae60566e12ade093b39e597 | refs/heads/master | 2020-03-30T12:26:12.863331 | 2019-03-28T15:19:08 | 2019-03-28T15:19:08 | 151,224,085 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package com.codigo.aplios.domain.model.common;
public enum EntityRowInfo {
/**
* Zaakceptiowany, zatwierdzony
*/
APPROVED,
/**
* Oczekujacy na zatwierdzenie
*/
PENDING,
/**
* Anulowany, odwołany
*/
CANCELLED
}
| [
"and.radz@wp.pl"
] | and.radz@wp.pl |
8e8f8b99ba15534782ef082d5179cfcbdb53deb7 | 9bd44366119e74271c0e7a47d84cde1d8aa8e183 | /control_panel/server/src/main/java/ge/edu/tsu/hrs/control_panel/server/dao/normalizeddata/GroupedNormalizedDataDAO.java | 51938ffa9bed59cd0de3e422a05c7abc06712813 | [] | no_license | igobronidze/HandwritingRecognitionSystem | b1794b9fe75f3ff4f56d1989388c85cfa220b36d | 8792fd4b8d63215d0f58055b0b71eafd476df788 | refs/heads/master | 2021-03-24T10:00:48.686563 | 2017-07-11T06:37:17 | 2017-07-11T06:37:17 | 81,675,994 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 584 | java | package ge.edu.tsu.hrs.control_panel.server.dao.normalizeddata;
import ge.edu.tsu.hrs.control_panel.model.network.normalizeddata.GroupedNormalizedData;
import ge.edu.tsu.hrs.control_panel.model.network.normalizeddata.NormalizationType;
import java.util.List;
public interface GroupedNormalizedDataDAO {
Integer addOrGetGroupedNormalizedDataId(GroupedNormalizedData groupedNormalizedData);
List<GroupedNormalizedData> getGroupedNormalizedDatum(Integer id, Integer height, Integer width, Float minValue, Float maxValue, NormalizationType normalizationType, String name);
}
| [
"gobronidze.ioseb@gmail.com"
] | gobronidze.ioseb@gmail.com |
75944bf373ff2f8c17b89bd54918e8dfbd4851ad | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/26/org/jfree/chart/labels/StandardPieSectionLabelGenerator_equals_197.java | 9f2205b9a1e3d4c2878c4124f804c2908be0769f | [] | 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 | 835 | java |
org jfree chart label
standard item label gener plot data
link pie dataset piedataset
label format pie section kei insert
absolut section percent amount pie
section code code displai
code appl code
standard pie section label gener standardpiesectionlabelgener
test gener equal arbitrari object
param obj object test code code permit
equal object obj
obj
obj standard pie section label gener standardpiesectionlabelgener
standard pie section label gener standardpiesectionlabelgener
standard pie section label gener standardpiesectionlabelgener obj
attribut label attributedlabel equal attribut label attributedlabel
equal obj
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
736accb5d847934e1c37f33f22f52ff597b989e7 | 613201ce7f5aa310ff0839d6f3551d4e3973f026 | /javaweb-framework/smart-framework/src/main/java/com/leolian/javaweb/smart/framework/proxy/Proxy.java | 94e6c873846566bfda8c83463bd34b5e437a6f90 | [] | no_license | comeonlian/code-set | 10586410390c1c7c19e51b0f9db605aac9da5dcf | 5f78ac702bc3d3611be9bdcc7899c60a8e1ecfa0 | refs/heads/master | 2023-03-18T16:41:43.025657 | 2021-03-04T03:23:09 | 2021-03-04T03:23:09 | 336,192,819 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 212 | java | package com.leolian.javaweb.smart.framework.proxy;
/**
* 代理接口
* @since 2017-07-11.
*/
public interface Proxy {
// 执行链式代理
Object doProxy(ProxyChain proxyChain) throws Throwable;
}
| [
"lianliang@oppo.com"
] | lianliang@oppo.com |
b87b4389dee1ee34ee927d24d102500b03d69b97 | 604a51043485b8f07d7a69843a1ae106e08b53de | /versions/1.12.2/src/minecraft/net/minecraft/block/BlockStructure.java | 86a3c357c187ed150520d3f6fbca059f576ae011 | [] | no_license | wjbaker101/CustomCrosshairMod | a46aaa3985b9745d7e49bb4f2203825db508bd2e | 11fb8ed0768ae1d3da9c0b03be7ccde254190818 | refs/heads/master | 2020-03-21T05:50:39.865837 | 2018-06-21T14:51:14 | 2018-06-21T14:51:14 | 138,184,703 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,429 | java | package net.minecraft.block;
import java.util.Random;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityStructure;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class BlockStructure extends BlockContainer
{
public static final PropertyEnum<TileEntityStructure.Mode> MODE = PropertyEnum.<TileEntityStructure.Mode>create("mode", TileEntityStructure.Mode.class);
public BlockStructure()
{
super(Material.IRON, MapColor.SILVER);
this.setDefaultState(this.blockState.getBaseState());
}
/**
* Returns a new instance of a block's tile entity class. Called on placing the block.
*/
public TileEntity createNewTileEntity(World worldIn, int meta)
{
return new TileEntityStructure();
}
/**
* Called when the block is right clicked by a player.
*/
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity instanceof TileEntityStructure ? ((TileEntityStructure)tileentity).usedBy(playerIn) : false;
}
/**
* Called by ItemBlocks after a block is set in the world, to allow post-place logic
*/
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
if (!worldIn.isRemote)
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityStructure)
{
TileEntityStructure tileentitystructure = (TileEntityStructure)tileentity;
tileentitystructure.createdBy(placer);
}
}
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random random)
{
return 0;
}
/**
* The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
* LIQUID for vanilla liquids, INVISIBLE to skip all rendering
*/
public EnumBlockRenderType getRenderType(IBlockState state)
{
return EnumBlockRenderType.MODEL;
}
/**
* Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
* IBlockstate
*/
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
return this.getDefaultState().withProperty(MODE, TileEntityStructure.Mode.DATA);
}
/**
* Convert the given metadata into a BlockState for this Block
*/
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(MODE, TileEntityStructure.Mode.getById(meta));
}
/**
* Convert the BlockState into the correct metadata value
*/
public int getMetaFromState(IBlockState state)
{
return ((TileEntityStructure.Mode)state.getValue(MODE)).getModeId();
}
protected BlockStateContainer createBlockState()
{
return new BlockStateContainer(this, new IProperty[] {MODE});
}
/**
* Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
* change. Cases may include when redstone power is updated, cactus blocks popping off due to a neighboring solid
* block, etc.
*/
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
{
if (!worldIn.isRemote)
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityStructure)
{
TileEntityStructure tileentitystructure = (TileEntityStructure)tileentity;
boolean flag = worldIn.isBlockPowered(pos);
boolean flag1 = tileentitystructure.isPowered();
if (flag && !flag1)
{
tileentitystructure.setPowered(true);
this.trigger(tileentitystructure);
}
else if (!flag && flag1)
{
tileentitystructure.setPowered(false);
}
}
}
}
private void trigger(TileEntityStructure p_189874_1_)
{
switch (p_189874_1_.getMode())
{
case SAVE:
p_189874_1_.save(false);
break;
case LOAD:
p_189874_1_.load(false);
break;
case CORNER:
p_189874_1_.unloadStructure();
case DATA:
}
}
}
| [
"willbaker10198@gmail.com"
] | willbaker10198@gmail.com |
02b98b28c147f5e5d35743fffd38fbc50e41e99b | fc5f16c7dd1cd7aee2d2ca0eb414860b5ad6d384 | /src/src/minecraft/net/minecraft/src/RenderSorter.java | 816b0c3f17ab6f2e218ce52950ca0706fc2a3c56 | [] | no_license | Nickorama21/Minecraft--TI-Nspire-CX-Port | 44eeca7a742d199e223d712866352a9e12b3290c | 95acc13c310f519ed8d4ed5a755ef70712da532f | refs/heads/master | 2020-05-17T11:31:43.456900 | 2012-09-01T17:24:47 | 2012-09-01T17:24:52 | 5,623,326 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,175 | java | package net.minecraft.src;
import java.util.Comparator;
public class RenderSorter implements Comparator
{
/** The entity (usually the player) that the camera is inside. */
private EntityLiving baseEntity;
public RenderSorter(EntityLiving par1EntityLiving)
{
this.baseEntity = par1EntityLiving;
}
public int doCompare(WorldRenderer par1WorldRenderer, WorldRenderer par2WorldRenderer)
{
if (par1WorldRenderer.isInFrustum && !par2WorldRenderer.isInFrustum)
{
return 1;
}
else if (par2WorldRenderer.isInFrustum && !par1WorldRenderer.isInFrustum)
{
return -1;
}
else
{
double var3 = (double)par1WorldRenderer.distanceToEntitySquared(this.baseEntity);
double var5 = (double)par2WorldRenderer.distanceToEntitySquared(this.baseEntity);
return var3 < var5 ? 1 : (var3 > var5 ? -1 : (par1WorldRenderer.chunkIndex < par2WorldRenderer.chunkIndex ? 1 : -1));
}
}
public int compare(Object par1Obj, Object par2Obj)
{
return this.doCompare((WorldRenderer)par1Obj, (WorldRenderer)par2Obj);
}
}
| [
"nickparker.stl@gmail.com"
] | nickparker.stl@gmail.com |
526918260a31ce665033883087de7742f8a9212a | 48f8d144f34d7fd00a4eb8893e2d02bff2206cfa | /app/src/main/java/com/exomatik/desacenranabaru/ui/struktur/adapter/RecyclerStruktur.java | 85231b51630073329eba1744bf6a157bbf9ceaaf | [] | no_license | IrfanRZ44/DesaCenranaBaru | 20cbeee866b6ad835a1563b757187e26c6cd0cd0 | 42afbba6ef9535b2b0b4dcdb5c01737c0173e985 | refs/heads/master | 2020-12-03T17:50:28.645934 | 2020-01-10T13:29:27 | 2020-01-10T13:29:27 | 231,416,372 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,096 | java | package com.exomatik.desacenranabaru.ui.struktur.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.recyclerview.widget.RecyclerView;
import com.exomatik.desacenranabaru.R;
import com.exomatik.desacenranabaru.model.ModelStruktur;
import com.exomatik.desacenranabaru.model.ModelWisata;
import com.exomatik.desacenranabaru.utils.Constant;
import java.util.ArrayList;
/**
* Created by IrfanRZ on 17/09/2018.
*/
public class RecyclerStruktur extends RecyclerView.Adapter<RecyclerStruktur.bidangViewHolder> {
private ArrayList<ModelStruktur> dataList;
private Context context;
public RecyclerStruktur(ArrayList<ModelStruktur> dataList, Context context) {
this.dataList = dataList;
this.context = context;
}
@Override
public bidangViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.list_struktur, parent, false);
this.context = parent.getContext();
return new bidangViewHolder(view);
}
@Override
public void onBindViewHolder(bidangViewHolder holder, final int position) {
holder.textNama.setText(dataList.get(position).getNama());
holder.textKontak.setText(dataList.get(position).getKontak());
holder.textJabatan.setText(Constant.listJabatan[position]);
}
@Override
public int getItemCount() {
return (dataList != null) ? dataList.size() : 0;
}
public class bidangViewHolder extends RecyclerView.ViewHolder {
private AppCompatTextView textNama, textKontak, textJabatan;
public bidangViewHolder(View itemView) {
super(itemView);
textNama = itemView.findViewById(R.id.textNama);
textKontak = itemView.findViewById(R.id.textKontak);
textJabatan = itemView.findViewById(R.id.textJabatan);
}
}
}
| [
"irfan.rozal44@gmail.com"
] | irfan.rozal44@gmail.com |
5165f264138306de69e1789dbdd5854b67eb0198 | bf390e6589e240c6ccc325355cfd0c21fbe9d884 | /1.JavaSyntax/src/com/javarush/task/task04/task0418/Solution.java | 1e463f51a93a1530f80bb61eb9ed10027e36113b | [] | no_license | vladmeh/jrt | 84878788fbb1f10aa55d320d205f886d1df9e417 | 0272ded03ac8eced7bf901bdfcc503a4eb6da12a | refs/heads/master | 2020-04-05T11:20:15.441176 | 2019-05-22T22:24:56 | 2019-05-22T22:24:56 | 81,300,849 | 4 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,161 | java | package com.javarush.task.task04.task0418;
/*
Минимум двух чисел
Ввести с клавиатуры два числа, и вывести на экран минимальное из них.
Если два числа равны между собой, необходимо вывести любое.
Требования:
1. Программа должна считывать числа c клавиатуры.
2. Программа должна выводить число на экран.
3. Программа должна выводить на экран минимальное из двух чисел.
4. Если два числа равны между собой, необходимо вывести любое.
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
if (a < b)
System.out.println(a);
else
System.out.println(b);
}
} | [
"vladmeh@gmail.com"
] | vladmeh@gmail.com |
77638fb4ace22b94a927ab90f4800315867655c0 | c6fc08081010f425c7b4f2581c1f857c292a7b1a | /app/src/main/java/com/example/kimanikogi/study/CustomAndroidGridViewAdapter.java | 6514aa3d256f98636b4924ab6b9b7638ccb724e4 | [] | no_license | erickogi/Study | 8c973e866c251de2bdf8f11a0389e0d9b80b8eb2 | 1b0c29af7929f2fb2a516a0e4f622d92b81563db | refs/heads/master | 2020-01-23T22:02:40.098859 | 2017-01-08T11:15:14 | 2017-01-08T11:15:14 | 78,338,088 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,666 | java | package com.example.kimanikogi.study;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
/**
* Created by kimani kogi on 11/3/2016.
*/
public class CustomAndroidGridViewAdapter extends BaseAdapter {
private Context mContext;
private final String[] string;
private final int[] Imageid;
public CustomAndroidGridViewAdapter(Context c,String[] string,int[] Imageid ) {
mContext = c;
this.Imageid = Imageid;
this.string = string;
}
@Override
public int getCount() {
return string.length;
}
@Override
public Object getItem(int p) {
return null;
}
@Override
public long getItemId(int p) {
return 0;
}
@Override
public View getView(int p, View convertView, ViewGroup parent) {
View grid;
LayoutInflater inflater = (LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (convertView == null) {
grid = new View(mContext);
grid = inflater.inflate(R.layout.gridview_custom_layout, null);
TextView textView = (TextView) grid.findViewById(R.id.gridview_text);
ImageView imageView = (ImageView)grid.findViewById(R.id.gridview_image);
textView.setText(string[p]);
imageView.setImageResource(Imageid[p]);
} else {
grid = (View) convertView;
}
return grid;
}
}
| [
"erickogi14@gmail.com"
] | erickogi14@gmail.com |
0ccb9a8e7ff8bc8546a71a3af01e72668c2161d6 | 2ce0b1fa77b5f109aa87a54149f93a23116fe38e | /demo/src/main/java/com/fengdi/baseproject/di/module/MainModule.java | 38976b6d67e4afc48026c0b4306da10c2612f575 | [
"Apache-2.0"
] | permissive | Spriteing/BaseProject | 3940637949abadbb83a977a6652f8499869c877d | 974f06c0f84cc8556d8671be4eaa5fc158bbbde7 | refs/heads/master | 2022-12-14T13:35:18.287706 | 2020-09-05T03:18:59 | 2020-09-05T03:18:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 917 | java | package com.fengdi.baseproject.di.module;
import com.jess.arms.di.scope.ActivityScope;
import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import com.fengdi.baseproject.mvp.contract.MainContract;
import com.fengdi.baseproject.mvp.model.MainModel;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 08/14/2020 16:15
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@Module
public abstract class MainModule {
@Binds
abstract MainContract.Model bindMainModel(MainModel model);
} | [
"2295360491@qq.com"
] | 2295360491@qq.com |
6ff6b5401b54d082655fc3add9fc3cc14e0006f5 | 53ecffd2fd37462f693680c6967ee4f0b2a4b75e | /api/src/main/java/biz/janux/people/Party.java | 63f6e60aaac8d4af618370b359b9c9793744ffe3 | [] | no_license | moradaniel/janux | 97b3bb9317b199463d031b7e79a89509ebdfe74e | af7738faf0988944d01d5db9e2525072fdcd26e9 | refs/heads/master | 2016-09-05T17:42:53.138274 | 2015-10-14T13:24:19 | 2015-10-14T13:24:19 | 15,080,884 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,855 | java | package biz.janux.people;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.janux.bus.persistence.Persistent;
// import org.janux.adapt.Extensible;
import biz.janux.commerce.FormOfPayment;
/**
*************************************************************************************************
* Organization and people have common characteristics that describe them, such as addresses, phone
* numbers and email addresses; they can also play similar roles as parties to contracts, such as
* buyers/sellers, client/provider, etc; this interface is the super type for the Person and
* Organization interfaces and provides a mean to refer to their implementing classes as a whole
*************************************************************************************************
*/
public interface Party extends Persistent, Contacteable, Serializable, Cloneable
{
/** optional string identifier for this Party */
String getCode();
void setCode(String code);
/**
* The name(s) by which this Party is known; sub-classes may implement this in different ways; for
* Persons, for example, it may the concatenation of the first and last name, while for an
* Organization it may be a short name or legal name
*/
PartyName getPartyName();
/**
* returns the matching type of form of payment
*/
FormOfPayment getFormOfPayment(final Class aFormOfPaymentClass);
/**
* Forms of payment associated with this party
* @return a list containing all the forms of payment associated with the party
*/
List<FormOfPayment> getFormsOfPayment();
/**
* @param fopList The fopList to set.
*/
void setFormsOfPayment(List<FormOfPayment> fopList);
Map<String, ContactMethod> getContactMethods();
void setContactMethods(Map<String, ContactMethod> aContactMethods);
Object clone();
}
| [
"moradaniel@gmail.com"
] | moradaniel@gmail.com |
ef7220459b8734db393a8a88642c87ddda7f6bfa | 9cf0b608fc6884e4dc6b85564397583e1ff6084e | /salesforce/src/main/java/salesforce/app/server/repository/CurrencyRepository.java | f53526f585995fd621e2d722f2ca353ee40da6a9 | [] | no_license | applifireAlgo/test | 3110439a7b143c419a76708580d75737637739cf | 7bcddc41518af021b1608e4e55622250c71a91cd | refs/heads/master | 2016-08-12T04:09:14.640199 | 2015-10-23T11:49:36 | 2015-10-23T11:49:36 | 44,667,116 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,273 | java | package salesforce.app.server.repository;
import com.athena.server.repository.SearchInterface;
import com.athena.annotation.Complexity;
import com.athena.annotation.SourceCodeAuthorClass;
import com.athena.framework.server.exception.repository.SpartanPersistenceException;
import java.util.List;
import com.athena.framework.server.exception.biz.SpartanConstraintViolationException;
@SourceCodeAuthorClass(createdBy = "john.doe", updatedBy = "", versionNumber = "1", comments = "Repository for Currency Master table Entity", complexity = Complexity.LOW)
public interface CurrencyRepository<T> extends SearchInterface {
public List<T> findAll() throws SpartanPersistenceException;
public T save(T entity) throws SpartanPersistenceException;
public List<T> save(List<T> entity) throws SpartanPersistenceException;
public void delete(String id) throws SpartanPersistenceException;
public void update(T entity) throws SpartanConstraintViolationException, SpartanPersistenceException;
public void update(List<T> entity) throws SpartanPersistenceException;
public List<T> findByCountryId(String countryId) throws Exception, SpartanPersistenceException;
public T findById(String currencyId) throws Exception, SpartanPersistenceException;
}
| [
"anant@algorhythm.co.in"
] | anant@algorhythm.co.in |
2ad2b481de664dc6ee939fa4646932a1b318f15f | b162956df616b70d3adb53293b751e757e6b6202 | /src/main/java/SuanFaNeiGong/SortBasic/BubbleSort/SortTestHelper.java | fd6096fd23c93757c4d127c98651f45677bdab0d | [] | no_license | bijiaha0/leetcode-practice | a200418e341a24e40853bd6ec521a69191b03221 | 3d72dfaff05ef64cf555a2df5259903aecdd1b69 | refs/heads/master | 2020-12-10T04:12:19.715015 | 2020-01-13T03:08:36 | 2020-01-13T03:08:36 | 233,496,869 | 1 | 0 | null | 2020-10-13T18:48:41 | 2020-01-13T02:42:35 | Java | UTF-8 | Java | false | false | 3,041 | java | package SuanFaNeiGong.SortBasic.BubbleSort;
import java.lang.reflect.Method;
import java.lang.Class;
public class SortTestHelper {
// SortTestHelper不允许产生任何实例
private SortTestHelper(){}
// 生成有n个元素的随机数组,每个元素的随机范围为[rangeL, rangeR]
public static Integer[] generateRandomArray(int n, int rangeL, int rangeR) {
assert rangeL <= rangeR;
Integer[] arr = new Integer[n];
for (int i = 0; i < n; i++)
arr[i] = new Integer((int)(Math.random() * (rangeR - rangeL + 1) + rangeL));
return arr;
}
// 生成一个近乎有序的数组
// 首先生成一个含有[0...n-1]的完全有序数组, 之后随机交换swapTimes对数据
// swapTimes定义了数组的无序程度:
// swapTimes == 0 时, 数组完全有序
// swapTimes 越大, 数组越趋向于无序
public static Integer[] generateNearlyOrderedArray(int n, int swapTimes){
Integer[] arr = new Integer[n];
for( int i = 0 ; i < n ; i ++ )
arr[i] = new Integer(i);
for( int i = 0 ; i < swapTimes ; i ++ ){
int a = (int)(Math.random() * n);
int b = (int)(Math.random() * n);
int t = arr[a];
arr[a] = arr[b];
arr[b] = t;
}
return arr;
}
// 打印arr数组的所有内容
public static void printArray(Object[] arr) {
for (int i = 0; i < arr.length; i++){
System.out.print( arr[i] );
System.out.print( ' ' );
}
System.out.println();
return;
}
// 判断arr数组是否有序
public static boolean isSorted(Comparable[] arr){
for( int i = 0 ; i < arr.length - 1 ; i ++ )
if( arr[i].compareTo(arr[i+1]) > 0 )
return false;
return true;
}
// 测试sortClassName所对应的排序算法排序arr数组所得到结果的正确性和算法运行时间
public static void testSort(String sortClassName, Comparable[] arr){
// 通过Java的反射机制,通过排序的类名,运行排序函数
try{
// 通过sortClassName获得排序函数的Class对象
Class sortClass = Class.forName(sortClassName);
// 通过排序函数的Class对象获得排序方法
Method sortMethod = sortClass.getMethod("sort",new Class[]{Comparable[].class});
// 排序参数只有一个,是可比较数组arr
Object[] params = new Object[]{arr};
long startTime = System.currentTimeMillis();
// 调用排序函数
sortMethod.invoke(null,params);
long endTime = System.currentTimeMillis();
if(!isSorted( arr ))
throw new IllegalArgumentException("Sort failed");
System.out.println( sortClass.getSimpleName()+ " : " + (endTime-startTime) + "ms" );
}
catch(Exception e){
e.printStackTrace();
}
}
} | [
"jiahao.bee@gmail.com"
] | jiahao.bee@gmail.com |
a94242bb57d10952c4d69a82ba9613b4ca559925 | 82e2fa3b1128edc8abd2bd84ecfc01c932831bc0 | /jena-core/src/main/java/org/apache/jena/graph/impl/WrappedGraph.java | af57d05be4549cf951a469fc43e27c35792e2fd4 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | apache/jena | b64f6013582f2b5aa38d1c9972d7b14e55686316 | fb41e79d97f065b8df9ebbc6c69b3f983b6cde04 | refs/heads/main | 2023-08-14T15:16:21.086308 | 2023-08-03T08:34:08 | 2023-08-03T08:34:08 | 7,437,073 | 966 | 760 | Apache-2.0 | 2023-09-02T09:04:08 | 2013-01-04T08:00:32 | Java | UTF-8 | Java | false | false | 3,499 | 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.jena.graph.impl;
import org.apache.jena.graph.* ;
import org.apache.jena.shared.PrefixMapping ;
import org.apache.jena.util.iterator.ExtendedIterator ;
/**
A wrapper class which simply defers all operations to its base.
*/
public class WrappedGraph implements GraphWithPerform
{
protected final Graph base;
public Graph getWrapped() { return base ; }
protected GraphEventManager gem;
public WrappedGraph( Graph base )
{ this.base = base; }
@Override
public boolean dependsOn( Graph other )
{ return base.dependsOn( other ); }
@Override
public TransactionHandler getTransactionHandler()
{ return base.getTransactionHandler(); }
@Override
public Capabilities getCapabilities()
{ return base.getCapabilities(); }
@Override
public GraphEventManager getEventManager()
{
if (gem == null) gem = new SimpleEventManager( );
return gem;
}
@Override
public PrefixMapping getPrefixMapping()
{ return base.getPrefixMapping(); }
@Override
public void add(Triple t)
{
base.add(t) ;
getEventManager().notifyAddTriple(this, t) ;
}
@Override
public void delete(Triple t)
{
base.delete(t) ;
getEventManager().notifyDeleteTriple(this, t) ;
}
@Override
public void clear()
{
base.clear() ;
getEventManager().notifyEvent(this, GraphEvents.removeAll ) ;
}
@Override
public void remove(Node s, Node p, Node o)
{
base.remove(s,p,o) ;
getEventManager().notifyEvent(this, GraphEvents.remove(s, p, o) ) ;
}
@Override
public ExtendedIterator<Triple> find( Triple m )
{ return SimpleEventManager.notifyingRemove( this, base.find( m ) ); }
@Override
public ExtendedIterator<Triple> find( Node s, Node p, Node o )
{ return SimpleEventManager.notifyingRemove( this, base.find( s, p, o ) ); }
@Override
public boolean isIsomorphicWith( Graph g )
{ return base.isIsomorphicWith( g ); }
@Override
public boolean contains( Node s, Node p, Node o )
{ return base.contains( s, p, o ); }
@Override
public boolean contains( Triple t )
{ return base.contains( t ); }
@Override
public void close()
{ base.close(); }
@Override
public boolean isClosed()
{ return base.isClosed(); }
@Override
public boolean isEmpty()
{ return base.isEmpty(); }
@Override
public int size()
{ return base.size(); }
@Override
public void performAdd(Triple t)
{ base.add( t ); }
@Override
public void performDelete(Triple t)
{ base.delete( t ); }
}
| [
"andy@apache.org"
] | andy@apache.org |
1229f83c2a0932f974630b0f64d72911dd597c04 | cb8104708bcb83eea8250845258bab8159ce1415 | /src/main/java/org/silnith/browser/organic/parser/HTMLParser.java | 9ec82a5cd9f43f11b282894a69fa7cf81667004f | [] | no_license | silnith/organic-browser | 4ec4850c9e56c1fa6578fe44309d82b96c449b72 | 1d479c92f1a099ecad597c9f033164e0e0a4b68a | refs/heads/development | 2021-01-10T03:20:41.413932 | 2020-03-29T00:30:07 | 2020-03-29T00:30:07 | 50,687,654 | 0 | 0 | null | 2020-10-12T22:24:56 | 2016-01-29T19:57:18 | Java | UTF-8 | Java | false | false | 2,108 | java | package org.silnith.browser.organic.parser;
import java.io.IOException;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.Locale;
import java.util.StringTokenizer;
import org.silnith.browser.organic.network.Download;
import org.w3c.dom.Document;
public class HTMLParser implements FileParser<Document> {
public HTMLParser() {
}
@Override
public Document parse(final Download download) throws IOException {
final Document document = null;
final String content = download.getContent();
int index = 0;
char character = content.charAt(index);
if (character == '\ufeff') {
// byte order marker
index++ ;
character = content.charAt(index);
}
// skip over as many comments and whitespace characters as exist
// parse DOCTYPE
final StringBuilder builder = new StringBuilder();
for (int i = 0; i < 9; i++ ) {
builder.append(character);
index++ ;
character = content.charAt(index);
}
consume(builder.toString().toLowerCase(Locale.ENGLISH), "<!doctype");
final StringTokenizer tokenizer = new StringTokenizer(content);
tokenizer.nextToken("<");
final CharacterIterator iter = new StringCharacterIterator(content);
character = iter.next();
return document;
}
private void consume(final char expected, final char actual) {
if (expected != actual) {
throw new IllegalArgumentException("Parse error, expected: '" + expected + "', got: '" + actual + "'.");
}
}
private void consume(final String expected, final String actual) {
if ( !expected.equals(actual)) {
throw new IllegalArgumentException("Parse error, expected: \"" + expected + "\", got: \"" + actual + "\".");
}
}
@Override
public void dispose() {
}
}
| [
"silnith@gmail.com"
] | silnith@gmail.com |
50c97dbf072cad844e2a3b13d7967fb3e0e755fd | 5e6a8813892ddb6f793f6e54567ead4bd5741255 | /aktera-configuration/src/main/java/de/iritgo/aktera/configuration/NullConfiguration.java | a377db9277d35d2919ae13bac42f392e43f7a14b | [
"Apache-2.0"
] | permissive | iritgo/iritgo-aktera | 0da89d3f69e9a8e653040639fbc78104dcfbb87d | 4013360ca0731f79dee5603a5e315b0fe83c3931 | refs/heads/master | 2021-05-15T02:33:03.156520 | 2012-10-24T15:05:59 | 2012-10-24T15:05:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,808 | java | /**
* This file is part of the Iritgo/Aktera Framework.
*
* Copyright (C) 2005-2011 Iritgo Technologies.
* Copyright (C) 2003-2005 BueroByte GbR.
*
* Iritgo 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 de.iritgo.aktera.configuration;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
public class NullConfiguration implements Configuration
{
public String getAttribute(String name) throws ConfigurationException
{
throw new ConfigurationException("No attribute named \"" + name
+ "\" is associated with the null configuration");
}
public String getAttribute(String name, String defaultValue)
{
return defaultValue;
}
public boolean getAttributeAsBoolean(String name) throws ConfigurationException
{
throw new ConfigurationException("No attribute named \"" + name
+ "\" is associated with the null configuration");
}
public boolean getAttributeAsBoolean(String name, boolean defaultValue)
{
return defaultValue;
}
public double getAttributeAsDouble(String name) throws ConfigurationException
{
throw new ConfigurationException("No attribute named \"" + name
+ "\" is associated with the null configuration");
}
public double getAttributeAsDouble(String name, double defaultValue)
{
return defaultValue;
}
public float getAttributeAsFloat(String name) throws ConfigurationException
{
throw new ConfigurationException("No attribute named \"" + name
+ "\" is associated with the null configuration");
}
public float getAttributeAsFloat(String name, float defaultValue)
{
return defaultValue;
}
public int getAttributeAsInteger(String name) throws ConfigurationException
{
throw new ConfigurationException("No attribute named \"" + name
+ "\" is associated with the null configuration");
}
public int getAttributeAsInteger(String name, int defaultValue)
{
return defaultValue;
}
public long getAttributeAsLong(String name) throws ConfigurationException
{
throw new ConfigurationException("No attribute named \"" + name
+ "\" is associated with the null configuration");
}
public long getAttributeAsLong(String name, long defaultValue)
{
return defaultValue;
}
public String[] getAttributeNames()
{
return new String[0];
}
public Configuration getChild(String name)
{
return this;
}
public Configuration getChild(String name, boolean createNew)
{
return createNew ? this : null;
}
public Configuration[] getChildren()
{
return new Configuration[0];
}
public Configuration[] getChildren(String name)
{
return new Configuration[0];
}
public String getLocation()
{
return null;
}
public String getName()
{
return "<null>";
}
public String getNamespace() throws ConfigurationException
{
return "";
}
public String getValue() throws ConfigurationException
{
throw new ConfigurationException("No value is associated with the null configuration");
}
public String getValue(String defaultValue)
{
return defaultValue;
}
public boolean getValueAsBoolean() throws ConfigurationException
{
throw new ConfigurationException("No value is associated with the null configuration");
}
public boolean getValueAsBoolean(boolean defaultValue)
{
return defaultValue;
}
public double getValueAsDouble() throws ConfigurationException
{
throw new ConfigurationException("No value is associated with the null configuration");
}
public double getValueAsDouble(double defaultValue)
{
return defaultValue;
}
public float getValueAsFloat() throws ConfigurationException
{
throw new ConfigurationException("No value is associated with the null configuration");
}
public float getValueAsFloat(float defaultValue)
{
return defaultValue;
}
public int getValueAsInteger() throws ConfigurationException
{
throw new ConfigurationException("No value is associated with the null configuration");
}
public int getValueAsInteger(int defaultValue)
{
return defaultValue;
}
public long getValueAsLong() throws ConfigurationException
{
throw new ConfigurationException("No value is associated with the null configuration");
}
public long getValueAsLong(long defaultValue)
{
return defaultValue;
}
}
| [
"grapelabs@gmail.com@71e8ea69-9a4e-8955-45a5-bfab6559e1dc"
] | grapelabs@gmail.com@71e8ea69-9a4e-8955-45a5-bfab6559e1dc |
c4c5ae4747dafc3b4e58c2cefad23219d86ae793 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/12/12_8c6bf458f2fe71684cc26235b9713b32550adb60/Configuration/12_8c6bf458f2fe71684cc26235b9713b32550adb60_Configuration_s.java | 9a86b62be5e87020ec3e3cd4e7779f7fa6b3950d | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,975 | java | /*
* This file is part of the aidGer project.
*
* Copyright (C) 2010-2011 The aidGer Team
*
* 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 de.aidger.utils;
import static de.aidger.utils.Translation._;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.text.MessageFormat;
import java.util.Properties;
import de.aidger.model.Runtime;
/**
* Gets and sets the settings
*
* @author aidGer Team
*/
public final class Configuration {
/**
* The settings of the program.
*/
private final Properties properties = new Properties();
/**
* The file name of the configuration.
*/
private final String file;
/**
* The current version of the configuration file.
*/
private static final int version = 2;
/**
* Initializes the Configuration.
*/
public Configuration() {
this("settings.cfg");
}
/**
* Initializes the Configuration with a given filename.
*
* @param filename
* The filename of the configuration.
*/
public Configuration(String filename) {
file = Runtime.getInstance().getConfigPath() + filename;
/* Check if the configuration exists and create it if it does not */
File config = new File(file);
if (!config.exists()) {
createFile();
} else {
/* Read the settings from the file. */
try {
FileInputStream inputStream = new FileInputStream(config);
properties.load(inputStream);
inputStream.close();
} catch (Exception e) {
createFile();
}
}
/* Get the version of the config and migrate if necessary */
String confVersion = get("config-version");
if (confVersion == null) {
migrate(0);
} else if (Integer.parseInt(confVersion) < version) {
migrate(Integer.parseInt(confVersion));
}
}
/**
* Gets the value of a property.
*
* @param option
* The property of which to get the value from
* @return The value of the specified property.
*/
public String get(String option) {
return properties.getProperty(option);
}
/**
* Sets the value of a property.
*
* @param option
* The property to change.
* @param value
* The value to change the property to.
*/
public void set(String option, String value) {
properties.setProperty(option, value);
try {
File outputFile = new File(file);
FileOutputStream outputStream = new FileOutputStream(outputFile);
properties.store(outputStream, "");
outputStream.close();
} catch (Exception e) {
createFile();
}
}
/**
* Remove an option from the config.
*
* @param option
* The option to remove
*/
public void remove(String option) {
properties.remove(option);
try {
File outputFile = new File(file);
FileOutputStream outputStream = new FileOutputStream(outputFile);
properties.store(outputStream, "");
outputStream.close();
} catch (Exception e) {
createFile();
}
}
/**
* Writes the default settings to the settings file.
*/
private void createFile() {
try {
File outputFile = new File(file);
FileOutputStream outputStream = new FileOutputStream(outputFile);
migrate(0);
properties.store(outputStream, "");
outputStream.close();
} catch (Exception e) {
Logger.error(MessageFormat.format(
_("Could not create file \"{0}\"."), new Object[] { file }));
}
}
/**
* Migrate an old configuration file to the current version.
*
* @param oldVersion
* The version of the config file
*/
private void migrate(int oldVersion) {
if (oldVersion < 1 && properties.getProperty("name") == null) {
properties.setProperty("name", "");
properties.setProperty("pdf-viewer", "");
properties.setProperty("activities", "10");
properties.setProperty("auto-open", "n");
properties.setProperty("auto-save", "n");
properties.setProperty("pessimistic-factor", "1.0");
properties.setProperty("historic-factor", "1.0");
properties.setProperty("anonymize-time", "365");
properties.setProperty("tolerance", "0.0");
properties.setProperty("calc-method", "1");
properties.setProperty("rounding", "2");
properties.setProperty("debug", "false");
}
if (oldVersion < 2) {
properties.setProperty("database-uri", "jdbc:derby:"
+ Runtime.getInstance().getConfigPath()
+ "/database;create=true");
}
properties.setProperty("config-version", Integer.toString(version));
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
b004ba2234884b4f82364bb6016d0699c2272649 | 6b6d62df39141cead65cb93b6ffcd39e720eb3eb | /src/main/java/com/demik/designparttens/createpatterns/abstractfactory/factory/AbstractTotalFactory.java | 08a8c1a5728e2da76e648883519715863473b53e | [] | no_license | AthyLau/designparttens | b43ef5dc64521655318d2ad9a219f896c787b4a0 | ce2662a7991ced001359f493977be9a9f76a5d7e | refs/heads/master | 2020-07-02T07:27:51.040221 | 2019-09-03T07:19:08 | 2019-09-03T07:19:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,314 | java | package com.demik.designparttens.createpatterns.abstractfactory.factory;
import com.demik.designparttens.createpatterns.abstractfactory.ConstType;
import com.demik.designparttens.createpatterns.abstractfactory.product.headphone.Headphone;
import com.demik.designparttens.createpatterns.abstractfactory.product.headphone.HpHeadphone;
import com.demik.designparttens.createpatterns.abstractfactory.product.keyboard.HpKeyboard;
import com.demik.designparttens.createpatterns.abstractfactory.product.keyboard.Keyboard;
import com.demik.designparttens.createpatterns.abstractfactory.product.mouse.HpMouse;
import com.demik.designparttens.createpatterns.abstractfactory.product.mouse.Mouse;
/**
* Function:
*
* @author liubing
* Date: 2019/8/5 7:19 PM
* @since JDK 1.8
*/
public abstract class AbstractTotalFactory {
public abstract Headphone getHeadphone();
public abstract Keyboard getKeyboard();
public abstract Mouse getMouse();
public static AbstractTotalFactory getFactory(String factoryType){
switch (factoryType){
case "hp":
return new HpFactory();
case "hw":
return new HwFactory();
case "dell":
return new DellFactory();
default:
return null;
}
}
}
| [
"1015141113@qq.com"
] | 1015141113@qq.com |
377b6fa585bcffaefa6810f95a4f6d3bfcf75e96 | 52dd205230ba5ddbe46fa16e8ca6a869ede52096 | /mysql/com-fintech-platform-fdfsclient/src/main/java/com/fintech/platform/core/fastdfs/common/NameValuePair.java | c8b53cd7a77f1af42a3ae571cbcebb3a99108491 | [] | no_license | wangshuaibo123/BI | f5bfca6bcc0d3d0d1bec973ae5864e1bca697ac3 | a44f8621a208cfb02e4ab5dc1e576056d62ff37c | refs/heads/master | 2021-05-04T16:20:22.382751 | 2018-01-29T11:02:05 | 2018-01-29T11:02:05 | 120,247,955 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 590 | java | package com.fintech.platform.core.fastdfs.common;
public class NameValuePair
{
protected String name;
protected String value;
public NameValuePair(){
}
public NameValuePair(String name)
{
this.name = name;
}
public NameValuePair(String name, String value)
{
this.name = name;
this.value = value;
}
public String getName()
{
return this.name;
}
public String getValue()
{
return this.value;
}
public void setName(String name)
{
this.name = name;
}
public void setValue(String value)
{
this.value = value;
}
} | [
"gangchen1@jieyuechina.com"
] | gangchen1@jieyuechina.com |
c7a6212f8ab9735616468a5535fb5a4f21448f59 | e2c54b52ff5962dea6d86a8e11737f904260421d | /src/controller/BookController.java | 93175573d654acad1d49c769f41d7ca108ad7350 | [] | no_license | tanyinqing/MyFragmentMyEclipse | 6dfb6e0acca025e8321a5cbb5005be22c3b78628 | ef4d1ddc073fec437ab2c449bc2db0e81c3ec2ed | refs/heads/master | 2020-03-21T20:45:16.121187 | 2018-09-06T02:08:13 | 2018-09-06T02:08:13 | 139,025,931 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,458 | java | package controller;
import model.Book;
import model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import service.BookService;
import java.util.Arrays;
/**
* 控制器
* 注解方式来写
* 请求映射
*/
@Controller
@RequestMapping("book")
public class BookController extends BaseController {
/* @Autowired
private SqlSession sqlSession;*/
// @Qualifier("bookDaoImpl") 用那一个版本
// @Qualifier("JDBCBookDaoImpl")
/*@Autowired
private BookDao bookDao;*/
@Autowired
private BookService bookService;
@RequestMapping("create")
private String create(Book book) {
// System.out.println("user..."+user.toString());
//运用mybatis框架把用户存储到数据库中 隐含的对应关系
// try (SqlSession sqlSession = MyBatisSession.getSqlSession(true)) {
// sqlSession.insert("book.create", book);
// }
bookService.create(book);
// return "redirect:/home.jsp";
return queryAll();
// return queryById(4);
}
@RequestMapping("queryAll")
private String queryAll() {
// System.out.println("user..."+user.toString());
//运用mybatis框架把用户存储到数据库中 隐含的对应关系
// try (SqlSession sqlSession = MyBatisSession.getSqlSession(true)) {
// session.setAttribute("books", sqlSession.selectList("book.queryAll"));
// }
User user= (User) session.getAttribute("user");
session.setAttribute("books",bookService.queryList("queryBooksByUserId",user.getId()));
// session.setAttribute("books",bookService.queryAll());
return "redirect:/home.jsp";
}
@RequestMapping("queryById/{id}") //路径参数发设置和获取
private String queryById(@PathVariable int id) {
// System.out.println("user..."+user.toString());
//运用mybatis框架把用户存储到数据库中 隐含的对应关系 false 查询和事务无关
// try (SqlSession sqlSession = MyBatisSession.getSqlSession(false)) {
// session.setAttribute("book", sqlSession.selectOne("book.queryById", id));
// }
session.setAttribute("book", bookService.queryById(id));
return "redirect:/edit.jsp";
}
@RequestMapping("update") //路径参数
private String update(Book book) {
// System.out.println("user..."+user.toString());
//运用mybatis框架把用户存储到数据库中 隐含的对应关系 false 查询和事务无关
// try (SqlSession sqlSession = MyBatisSession.getSqlSession(true)) {
// sqlSession.update("book.update", book);
// }
bookService.update(book);
return queryAll();
}
@RequestMapping("remove/{id}") //路径参数
private String remove(@PathVariable int id) {
// System.out.println("user..."+user.toString());
//运用mybatis框架把用户存储到数据库中 隐含的对应关系 false 查询和事务无关
// try (SqlSession sqlSession = MyBatisSession.getSqlSession(true)) {
// sqlSession.delete("book.remove", id);
// }
bookService.remove(id);
return queryAll();
}
@RequestMapping("removeBooks") //路径参数removeBooks
private String removeBooks(Integer[] ids) {
System.out.println(Arrays.toString(ids));
// System.out.println("user..."+user.toString());
//运用mybatis框架把用户存储到数据库中 隐含的对应关系 false 查询和事务无关
// try (SqlSession sqlSession = MyBatisSession.getSqlSession(true)) {
// for (int id : ids) {
// sqlSession.delete("book.remove", id);
// }
// }
// bookDao.removeBooks(ids);
bookService.removeSelected(ids);
return queryAll();
}
@RequestMapping("queryAllBooks")
private String queryAllbooks() {
session.setAttribute("books", bookService.queryAll());
return "redirect:/books.jsp";
}
@RequestMapping("queryUserByBookId/{id}")
private String queryUserByBookId(@PathVariable int id) {
session.setAttribute("book", bookService.queryOne("queryUserByBookId", id));
return "redirect:/book.jsp";
}
}
| [
"289367447@qq.com"
] | 289367447@qq.com |
aa948d09f3d9be6a7dc265334aa297add29bc758 | 17181bbb5b7f6316ff9d48766598b9b1ffb0710d | /main/src/main/java/com/yunbao/main/adapter/ImageAdapter.java | dfc50b39f5c4ebe939a03dbd2192798d1d4ec948 | [] | no_license | hyb1234hi/anyu_an | 91c177f7af121f1e9dd64f73584646cac3e82a1f | 1fa94f31602a704fa0dda4dfea8b03a66ffa09c5 | refs/heads/main | 2023-07-29T08:39:32.230456 | 2021-09-06T01:55:59 | 2021-09-06T01:55:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,228 | java | package com.yunbao.main.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.SizeUtils;
import com.youth.banner.adapter.BannerAdapter;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.bean.BannerBean;
import com.yunbao.common.utils.IMImageLoadUtil;
import com.yunbao.main.R;
import java.util.List;
/**
* Created by Administrator on 2020/5/6.
* Describe:
*/
public class ImageAdapter extends BannerAdapter<BannerBean, ImageAdapter.BannerViewHolder> {
private final Context mContext;
public ImageAdapter(List<BannerBean> mDatas, Context mContext) {
//设置数据,也可以调用banner提供的方法,或者自己在adapter中实现
super(mDatas);
this.mContext=mContext;
}
//创建ViewHolder,可以用viewType这个字段来区分不同的ViewHolder
@Override
public BannerViewHolder onCreateHolder(ViewGroup parent, int viewType) {
ImageView imageView = new ImageView(parent.getContext());
//注意,必须设置为match_parent,这个是viewpager2强制要求的
imageView.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
return new BannerViewHolder(imageView);
}
@Override
public void onBindView(BannerViewHolder holder, BannerBean data, int position, int size) {
//// holder.imageView.setImageResource(data.getImageUrl());
// Glide.with(mContext).load(data.getImageUrl()).
// skipMemoryCache(false).into((ImageView) holder.imageView);
IMImageLoadUtil.CommonImageRoundLoad3(CommonAppContext.sInstance,data.getImageUrl(),holder.imageView, R.mipmap.banner_defualt);
}
class BannerViewHolder extends RecyclerView.ViewHolder {
ImageView imageView;
public BannerViewHolder(@NonNull ImageView view) {
super(view);
this.imageView = view;
}
}
}
| [
"qiuql@daqsoft.com"
] | qiuql@daqsoft.com |
22080a94ebf56ff70201e0059c7fd508b1de725d | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/yauaa/learning/1484/StepConcatPostfix.java | d78eb0da5bd50609edce4fb67ed96ebaed160895 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,479 | java | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2018 Niels Basjes
*
* 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 nl.basjes.parse.useragent.analyze.treewalker.steps.value;
import nl.basjes.parse.useragent.analyze.treewalker.steps.Step;
import nl.basjes.parse.useragent.analyze.treewalker.steps.WalkList.WalkResult;
import org.antlr.v4.runtime.tree.ParseTree;
public class StepConcatPostfix extends Step {
private final String postfix;
public StepConcatPostfix(String postfix) {
this.postfix = postfix;
}
@Override
public WalkResult walk(ParseTree tree, String value) {
String actualValue = getActualValue(tree, value);
String filteredValue = actualValue + postfix;
return walkNextStep(tree, filteredValue);
}
@Override
public boolean canFail(){
return false;
}
@Override
public String toString() {
return "ConcatPostfix(" + postfix + ")";
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
a461157f94b7832264436d3e0d20d9bac81b4f27 | 5d070f3bccd54cddb3259102f2019443298126db | /mf/javax/xml/validation/SecuritySupport.java | b151393bf449bd5e44561f955bd37966bc247e90 | [] | no_license | ajayscariya/Touch2Kill-files | 683e5d002df2d23b084ab5b0786762e14f038ba0 | 7660e584c5b7f743a1535b75476d1c0ef050dc7e | refs/heads/master | 2020-04-10T19:06:11.795665 | 2016-09-14T17:19:20 | 2016-09-14T17:19:20 | 68,216,032 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,652 | java | package mf.javax.xml.validation;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Enumeration;
class SecuritySupport {
/* renamed from: mf.javax.xml.validation.SecuritySupport.1 */
class C10041 implements PrivilegedAction {
C10041() {
}
public Object run() {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
return ClassLoader.getSystemClassLoader();
}
return cl;
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.2 */
class C10052 implements PrivilegedAction {
private final /* synthetic */ String val$propName;
C10052(String str) {
this.val$propName = str;
}
public Object run() {
return System.getProperty(this.val$propName);
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.3 */
class C10063 implements PrivilegedExceptionAction {
private final /* synthetic */ File val$file;
C10063(File file) {
this.val$file = file;
}
public Object run() throws FileNotFoundException {
return new FileInputStream(this.val$file);
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.4 */
class C10074 implements PrivilegedExceptionAction {
private final /* synthetic */ URL val$url;
C10074(URL url) {
this.val$url = url;
}
public Object run() throws IOException {
return this.val$url.openStream();
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.5 */
class C10085 implements PrivilegedAction {
private final /* synthetic */ ClassLoader val$cl;
private final /* synthetic */ String val$name;
C10085(ClassLoader classLoader, String str) {
this.val$cl = classLoader;
this.val$name = str;
}
public Object run() {
if (this.val$cl == null) {
return Object.class.getResource(this.val$name);
}
return this.val$cl.getResource(this.val$name);
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.6 */
class C10096 implements PrivilegedExceptionAction {
private final /* synthetic */ ClassLoader val$cl;
private final /* synthetic */ String val$name;
C10096(ClassLoader classLoader, String str) {
this.val$cl = classLoader;
this.val$name = str;
}
public Object run() throws IOException {
if (this.val$cl == null) {
return ClassLoader.getSystemResources(this.val$name);
}
return this.val$cl.getResources(this.val$name);
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.7 */
class C10107 implements PrivilegedAction {
private final /* synthetic */ ClassLoader val$cl;
private final /* synthetic */ String val$name;
C10107(ClassLoader classLoader, String str) {
this.val$cl = classLoader;
this.val$name = str;
}
public Object run() {
if (this.val$cl == null) {
return Object.class.getResourceAsStream(this.val$name);
}
return this.val$cl.getResourceAsStream(this.val$name);
}
}
/* renamed from: mf.javax.xml.validation.SecuritySupport.8 */
class C10118 implements PrivilegedAction {
private final /* synthetic */ File val$f;
C10118(File file) {
this.val$f = file;
}
public Object run() {
return new Boolean(this.val$f.exists());
}
}
SecuritySupport() {
}
ClassLoader getContextClassLoader() {
return (ClassLoader) AccessController.doPrivileged(new C10041());
}
String getSystemProperty(String propName) {
return (String) AccessController.doPrivileged(new C10052(propName));
}
FileInputStream getFileInputStream(File file) throws FileNotFoundException {
try {
return (FileInputStream) AccessController.doPrivileged(new C10063(file));
} catch (PrivilegedActionException e) {
throw ((FileNotFoundException) e.getException());
}
}
InputStream getURLInputStream(URL url) throws IOException {
try {
return (InputStream) AccessController.doPrivileged(new C10074(url));
} catch (PrivilegedActionException e) {
throw ((IOException) e.getException());
}
}
URL getResourceAsURL(ClassLoader cl, String name) {
return (URL) AccessController.doPrivileged(new C10085(cl, name));
}
Enumeration getResources(ClassLoader cl, String name) throws IOException {
try {
return (Enumeration) AccessController.doPrivileged(new C10096(cl, name));
} catch (PrivilegedActionException e) {
throw ((IOException) e.getException());
}
}
InputStream getResourceAsStream(ClassLoader cl, String name) {
return (InputStream) AccessController.doPrivileged(new C10107(cl, name));
}
boolean doesFileExist(File f) {
return ((Boolean) AccessController.doPrivileged(new C10118(f))).booleanValue();
}
}
| [
"arjunwarrier2000@gmail.com"
] | arjunwarrier2000@gmail.com |
8fb5b6570f692eb912750489fb81b6d372a860d1 | 692a7b9325014682d72bd41ad0af2921a86cf12e | /iZhejiang/src/com/ta/util/db/entity/TAMapArrayList.java | 66a6cf183c3655d75795f73c84025d89deb135c7 | [] | no_license | syanle/WiFi | f76fbd9086236f8a005762c1c65001951affefb6 | d58fb3d9ae4143cbe92f6f893248e7ad788d3856 | refs/heads/master | 2021-01-20T18:39:13.181843 | 2015-10-29T12:38:57 | 2015-10-29T12:38:57 | 45,156,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 755 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.ta.util.db.entity;
import java.util.ArrayList;
// Referenced classes of package com.ta.util.db.entity:
// TAHashMap
public class TAMapArrayList extends ArrayList
{
private static final long serialVersionUID = 1L;
public TAMapArrayList()
{
}
public boolean add(TAHashMap tahashmap)
{
if (tahashmap != null)
{
return super.add(tahashmap);
} else
{
return false;
}
}
public volatile boolean add(Object obj)
{
return add((TAHashMap)obj);
}
}
| [
"arehigh@gmail.com"
] | arehigh@gmail.com |
59b879a05b3ed677c91903439246dcd22fe0d1da | 694b6cfe51530a8133a9fed519dd2867b61d7db5 | /decompile_apk/sources/kotlinx/coroutines/channels/ChannelsKt__Channels_commonKt$mapIndexedTo$1.java | 69aa7280490de29e89d91430954568363e8eed28 | [] | no_license | phyothinzaraung/tgif3 | f94fbac8ee65517c45ec382665c8d25d91f91619 | 19890fb80fe3da432b2edf77e4135c592030564f | refs/heads/master | 2022-04-05T19:35:03.684368 | 2019-01-06T12:27:07 | 2019-01-06T12:27:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,528 | java | package kotlinx.coroutines.channels;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000*\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u001f\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\u0010\u0000\u001a\u0004\u0018\u00010\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u0003\"\u0010\b\u0002\u0010\u0004*\n\u0012\u0006\b\u0000\u0012\u0002H\u00030\u0005*\b\u0012\u0004\u0012\u0002H\u00020\u00062\u0006\u0010\u0007\u001a\u0002H\u00042'\u0010\b\u001a#\u0012\u0013\u0012\u00110\n¢\u0006\f\b\u000b\u0012\b\b\f\u0012\u0004\b\b(\r\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\t2\f\u0010\u000e\u001a\b\u0012\u0004\u0012\u0002H\u00040\u000fHHø\u0001\u0000"}, d2 = {"mapIndexedTo", "", "E", "R", "C", "", "Lkotlinx/coroutines/channels/ReceiveChannel;", "destination", "transform", "Lkotlin/Function2;", "", "Lkotlin/ParameterName;", "name", "index", "continuation", "Lkotlin/coroutines/Continuation;"}, k = 3, mv = {1, 1, 13})
@DebugMetadata(c = "kotlinx/coroutines/channels/ChannelsKt__Channels_commonKt", f = "Channels.common.kt", i = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, l = {1291, 1291, 1294}, m = "mapIndexedTo", n = {"$receiver", "destination", "transform", "index", "$receiver$iv", "$receiver$iv$iv", "cause$iv$iv", "$receiver$iv", "$receiver", "destination", "transform", "index", "$receiver$iv", "$receiver$iv$iv", "cause$iv$iv", "$receiver$iv"}, s = {"L$0", "L$1", "L$2", "L$3", "L$4", "L$5", "L$6", "L$7", "L$0", "L$1", "L$2", "L$3", "L$4", "L$5", "L$6", "L$7"})
/* compiled from: Channels.common.kt */
public final class ChannelsKt__Channels_commonKt$mapIndexedTo$1 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
Object L$6;
Object L$7;
Object L$8;
int label;
/* synthetic */ Object result;
public ChannelsKt__Channels_commonKt$mapIndexedTo$1(Continuation continuation) {
super(continuation);
}
@Nullable
public final Object invokeSuspend(@NotNull Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return ChannelsKt.mapIndexedTo(null, null, null, (Continuation) this);
}
}
| [
"saturngod@gmail.com"
] | saturngod@gmail.com |
cdfddb2db3d4acbfb6780e7c55b6d21de2d1512f | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_30513.java | 21f97588370c3069c55f9c4050dcd000d03992c2 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 181 | java | public String getRebroadcastedBy(Context context){
return rebroadcastedBroadcast != null ? context.getString(R.string.broadcast_rebroadcasted_by_format,getAuthorName()) : null;
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
fd2afe7d048489a14c17cd596091fe0d01f8e3cc | 4ec890f950005505f0434429392e866af0299526 | /src/main/java/com/m2advertise/games/scratch/config/CacheConfiguration.java | b41f8880f14e7aedd3751e83e0ad9bfb5d71776a | [
"MIT"
] | permissive | SaifJerbi/m2-advertise-scratch-game | 12f9b12dede979352252edf025a580e7d904dcda | 6652089d476153042d2b951a8c9f71a5db34c19b | refs/heads/master | 2021-07-22T04:14:04.432556 | 2017-11-02T14:03:43 | 2017-11-02T14:03:43 | 109,272,136 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,941 | java | package com.m2advertise.games.scratch.config;
import io.github.jhipster.config.JHipsterProperties;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.ResourcePoolsBuilder;
import org.ehcache.expiry.Duration;
import org.ehcache.expiry.Expirations;
import org.ehcache.jsr107.Eh107Configuration;
import java.util.concurrent.TimeUnit;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.serviceregistry.Registration;
import org.springframework.context.annotation.*;
@Configuration
@EnableCaching
@AutoConfigureAfter(value = { MetricsConfiguration.class })
@AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class })
public class CacheConfiguration {
private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration;
public CacheConfiguration(JHipsterProperties jHipsterProperties) {
JHipsterProperties.Cache.Ehcache ehcache =
jHipsterProperties.getCache().getEhcache();
jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration(
CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class,
ResourcePoolsBuilder.heap(ehcache.getMaxEntries()))
.withExpiry(Expirations.timeToLiveExpiration(Duration.of(ehcache.getTimeToLiveSeconds(), TimeUnit.SECONDS)))
.build());
}
@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
return cm -> {
// jhipster-needle-ehcache-add-entry
};
}
}
| [
"m.jerbi.saif@gmail.com"
] | m.jerbi.saif@gmail.com |
7b0a2f2c6bc51ef42388c536e64bb3f376176194 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/neo4j--neo4j/43b73156f44a61a07035d60df470551ccbebb5d1/before/TxPollingClientTest.java | ba3503c12a09ec6b5ba558fb4ecec2e2c67e4f57 | [] | 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 | 7,263 | java | /*
* Copyright (c) 2002-2016 "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 Affero 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.causalclustering.catchup.tx;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import java.io.File;
import org.neo4j.causalclustering.catchup.CatchUpClient;
import org.neo4j.causalclustering.catchup.CatchUpResponseCallback;
import org.neo4j.causalclustering.catchup.CatchupResult;
import org.neo4j.causalclustering.catchup.storecopy.CopiedStoreRecovery;
import org.neo4j.causalclustering.catchup.storecopy.LocalDatabase;
import org.neo4j.causalclustering.catchup.storecopy.StoreFetcher;
import org.neo4j.causalclustering.core.consensus.schedule.ControlledRenewableTimeoutService;
import org.neo4j.causalclustering.identity.MemberId;
import org.neo4j.causalclustering.identity.StoreId;
import org.neo4j.causalclustering.messaging.routing.CoreMemberSelectionStrategy;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.kernel.impl.transaction.CommittedTransactionRepresentation;
import org.neo4j.kernel.impl.transaction.log.TransactionIdStore;
import org.neo4j.kernel.lifecycle.Lifecycle;
import org.neo4j.kernel.monitoring.Monitors;
import org.neo4j.logging.NullLogProvider;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.neo4j.causalclustering.catchup.tx.TxPollingClient.Timeouts.TX_PULLER_TIMEOUT;
import static org.neo4j.kernel.impl.transaction.log.TransactionIdStore.BASE_TX_ID;
public class TxPollingClientTest
{
private final CatchUpClient catchUpClient = mock( CatchUpClient.class );
private final CoreMemberSelectionStrategy serverSelection = mock( CoreMemberSelectionStrategy.class );
private final MemberId coreMemberId = mock( MemberId.class );
private final TransactionIdStore idStore = mock( TransactionIdStore.class );
private final BatchingTxApplier txApplier = mock( BatchingTxApplier.class );
private final ControlledRenewableTimeoutService timeoutService = new ControlledRenewableTimeoutService();
private final long txPullIntervalMillis = 100;
private final FileSystemAbstraction fs = mock( FileSystemAbstraction.class );
private final StoreFetcher storeFetcher = mock( StoreFetcher.class );
private final CopiedStoreRecovery copiedStoreRecovery = mock( CopiedStoreRecovery.class );
private final StoreId storeId = new StoreId( 1, 2, 3, 4 );
private final LocalDatabase localDatabase = mock( LocalDatabase.class );
{
when( localDatabase.storeId() ).thenReturn( storeId );
}
private final Lifecycle startStopOnStoreCopy = mock( Lifecycle.class );
private final TxPollingClient txPuller =
new TxPollingClient( NullLogProvider.getInstance(), fs, localDatabase, startStopOnStoreCopy, storeFetcher,
catchUpClient, serverSelection, timeoutService, txPullIntervalMillis, txApplier, new Monitors(),
copiedStoreRecovery );
@Before
public void before() throws Throwable
{
when( idStore.getLastCommittedTransactionId() ).thenReturn( BASE_TX_ID );
when( serverSelection.coreMember() ).thenReturn( coreMemberId );
txPuller.start();
}
@Test
public void shouldSendPullRequestOnTick() throws Throwable
{
// given
long lastAppliedTxId = 99L;
when( txApplier.lastQueuedTxId() ).thenReturn( lastAppliedTxId );
// when
timeoutService.invokeTimeout( TX_PULLER_TIMEOUT );
// then
verify( catchUpClient ).makeBlockingRequest( any( MemberId.class ), any( TxPullRequest.class ),
any( CatchUpResponseCallback.class ) );
}
@Test
public void shouldKeepMakingPullRequestsUntilEndOfStream() throws Throwable
{
// given
long lastAppliedTxId = 99L;
when( txApplier.lastQueuedTxId() ).thenReturn( lastAppliedTxId );
// when
when(catchUpClient.<CatchupResult>makeBlockingRequest( any( MemberId.class ), any( TxPullRequest.class ),
any( CatchUpResponseCallback.class ) ))
.thenReturn( CatchupResult.SUCCESS_END_OF_BATCH, CatchupResult.SUCCESS_END_OF_STREAM );
timeoutService.invokeTimeout( TX_PULLER_TIMEOUT );
// then
verify( catchUpClient, times( 2 ) ).makeBlockingRequest( any( MemberId.class ), any( TxPullRequest.class ),
any( CatchUpResponseCallback.class ) );
}
@Test
public void shouldResetTxReceivedTimeoutOnTxReceived() throws Throwable
{
timeoutService.invokeTimeout( TX_PULLER_TIMEOUT );
StoreId storeId = new StoreId( 1, 2, 3, 4 );
ArgumentCaptor<CatchUpResponseCallback> captor = ArgumentCaptor.forClass( CatchUpResponseCallback.class );
verify( catchUpClient ).makeBlockingRequest( any( MemberId.class ), any( TxPullRequest.class ),
captor.capture() );
captor.getValue().onTxPullResponse( null,
new TxPullResponse( storeId, mock( CommittedTransactionRepresentation.class ) ) );
verify( timeoutService.getTimeout( TX_PULLER_TIMEOUT ), times( 2 ) ).renew();
}
@Test
public void shouldRenewTxPullTimeoutOnTick() throws Throwable
{
// when
timeoutService.invokeTimeout( TX_PULLER_TIMEOUT );
// then
verify( timeoutService.getTimeout( TX_PULLER_TIMEOUT ) ).renew();
}
@Test
public void shouldCopyStoreIfCatchUpClientFails() throws Throwable
{
// given
when( catchUpClient.makeBlockingRequest( any( MemberId.class ), any( TxPullRequest.class ),
any( CatchUpResponseCallback.class ) ) ).thenReturn( CatchupResult.E_TRANSACTION_PRUNED );
// when
timeoutService.invokeTimeout( TX_PULLER_TIMEOUT );
// then
verify( timeoutService.getTimeout( TX_PULLER_TIMEOUT ) ).cancel();
verify( localDatabase ).stop();
verify( startStopOnStoreCopy ).stop();
verify( storeFetcher ).copyStore( any( MemberId.class ), eq( storeId ), any( File.class ) );
verify( localDatabase ).start();
verify( startStopOnStoreCopy ).start();
verify( txApplier ).refreshFromNewStore();
verify( timeoutService.getTimeout( TX_PULLER_TIMEOUT ),
times( 2 ) /* at the beginning and after store copy */ ).renew();
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
eb7e1c1ea96365ac7f5b735c4f6ef50a9dd28625 | 5017e89e42adaf46e790d5f0e76ad79baaf797ec | /src/main/java/com/fhd/ra/interfaces/risk/IKpiRelaRiskBO.java | 5a76f2aa29f47a87cedcca463c054f3825c22fde | [] | no_license | songjiavc/fhd-fdc | 41425584c266ea72c842ccba00b6207ca75cf2e1 | 96d96c1fdba9bcbdaffb17c023e8dbbda82ef630 | refs/heads/master | 2021-01-15T18:22:26.114087 | 2017-08-09T09:41:50 | 2017-08-09T09:41:50 | 99,781,566 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,265 | java | /**
* IRiskOrgBO.java
* com.fhd.risk.interfaces
* ver date author
* ──────────────────────────────────
* 2012-11-19 金鹏祥
*
* Copyright (c) 2012, Firsthuida All Rights Reserved.
*/
/**
* IRiskOrgBO.java
* com.fhd.risk.interfaces
*
* ver date author
* ──────────────────────────────────
* 2012-11-19 金鹏祥
*
* Copyright (c) 2012, FirstHuida All Rights Reserved.
*/
package com.fhd.ra.interfaces.risk;
import java.util.List;
import java.util.Set;
import com.fhd.entity.risk.KpiRelaRisk;
import com.fhd.entity.risk.Risk;
import com.fhd.entity.risk.RiskOrg;
/**
* 风险、部门关联接口
*
* @author zhengjunxiang
* @version
* @since Ver 1.1
* @Date 2012-11-19 上午09:34:53
*
* @see
*/
public interface IKpiRelaRiskBO {
/**
* 保存风险指标和影响指标
* @author zhengjunxiang
*/
public void saveKpiRelaRisk(KpiRelaRisk kpiRelaRisk);
/**
* 删除风险指标和影响指标
* @author zhengjunxiang
*/
public void removeKpiRelaRiskById(String id);
}
| [
"jia.song@pcitc.com"
] | jia.song@pcitc.com |
46f9b411747ade69b017919f39a94cd772becaf2 | d71e879b3517cf4fccde29f7bf82cff69856cfcd | /ExtractedJars/Shopkick_com.shopkick.app/javafiles/android/arch/lifecycle/DefaultLifecycleObserver$_2D_CC.java | dcd35d691085be611493b368c9ea0872cd4c1255 | [
"MIT"
] | permissive | Andreas237/AndroidPolicyAutomation | b8e949e072d08cf6c6166c3f15c9c63379b8f6ce | c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a | refs/heads/master | 2020-04-10T02:14:08.789751 | 2019-05-16T19:29:11 | 2019-05-16T19:29:11 | 160,739,088 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,303 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package android.arch.lifecycle;
// Referenced classes of package android.arch.lifecycle:
// DefaultLifecycleObserver, LifecycleOwner
public final class DefaultLifecycleObserver$_2D_CC
{
public static void $default$onCreate(DefaultLifecycleObserver defaultlifecycleobserver, LifecycleOwner lifecycleowner)
{
// 0 0:return
}
public static void $default$onDestroy(DefaultLifecycleObserver defaultlifecycleobserver, LifecycleOwner lifecycleowner)
{
// 0 0:return
}
public static void $default$onPause(DefaultLifecycleObserver defaultlifecycleobserver, LifecycleOwner lifecycleowner)
{
// 0 0:return
}
public static void $default$onResume(DefaultLifecycleObserver defaultlifecycleobserver, LifecycleOwner lifecycleowner)
{
// 0 0:return
}
public static void $default$onStart(DefaultLifecycleObserver defaultlifecycleobserver, LifecycleOwner lifecycleowner)
{
// 0 0:return
}
public static void $default$onStop(DefaultLifecycleObserver defaultlifecycleobserver, LifecycleOwner lifecycleowner)
{
// 0 0:return
}
}
| [
"silenta237@gmail.com"
] | silenta237@gmail.com |
26846985bd397263f826f9301a3c7caf0abfd01d | 0e49eee4f85024e0857b77bce1e78030beb47b1f | /src/main/java/com/tencentcloudapi/dayu/v20180709/models/ModifyCCFrequencyRulesResponse.java | 954ead83697475c2546d21233501e4fef0cd0273 | [
"Apache-2.0"
] | permissive | arbing/tencentcloud-sdk-java | 7b880af16540fac10a785a1bef0d529eec89c525 | c1bdd3f711c92f950ffe15e6506426a8e340a638 | refs/heads/master | 2021-03-31T15:58:36.276205 | 2020-03-18T00:28:16 | 2020-03-18T00:28:16 | 248,117,938 | 1 | 0 | Apache-2.0 | 2020-03-18T02:15:34 | 2020-03-18T02:15:33 | null | UTF-8 | Java | false | false | 2,516 | java | /*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.tencentcloudapi.dayu.v20180709.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ModifyCCFrequencyRulesResponse extends AbstractModel{
/**
* 成功码
*/
@SerializedName("Success")
@Expose
private SuccessCode Success;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 成功码
* @return Success 成功码
*/
public SuccessCode getSuccess() {
return this.Success;
}
/**
* Set 成功码
* @param Success 成功码
*/
public void setSuccess(SuccessCode Success) {
this.Success = Success;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamObj(map, prefix + "Success.", this.Success);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
| [
"zhiqiangfan@tencent.com"
] | zhiqiangfan@tencent.com |
e7bf382156bfbf8ba170a2794bf7935a8ff65180 | bd2139703c556050403c10857bde66f688cd9ee6 | /skara/585/webrev.00/cli/src/main/java/org/openjdk/skara/cli/GitProxy.java | b95212f59e126ce17a19dc67e867b62aa56a43fd | [] | no_license | isabella232/cr-archive | d03427e6fbc708403dd5882d36371e1b660ec1ac | 8a3c9ddcfacb32d1a65d7ca084921478362ec2d1 | refs/heads/master | 2023-02-01T17:33:44.383410 | 2020-12-17T13:47:48 | 2020-12-17T13:47:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,385 | java | /*
* Copyright (c) 2019, 2020, 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.
*
* 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.
*/
package org.openjdk.skara.cli;
import org.openjdk.skara.proxy.HttpProxy;
import java.io.IOException;
import java.nio.file.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
public class GitProxy {
private static String gitConfig(String key) throws IOException, InterruptedException {
var pb = new ProcessBuilder("git", "config", key);
pb.redirectOutput(ProcessBuilder.Redirect.PIPE);
pb.redirectError(ProcessBuilder.Redirect.INHERIT);
var p = pb.start();
var bytes = p.getInputStream().readAllBytes();
var res = p.waitFor();
if (res == 0) {
return new String(bytes, StandardCharsets.UTF_8).trim();
}
return "";
}
private static String proxyEnvironmentVariable() {
for (var key : List.of("http_proxy", "https_proxy")) {
var proxy = System.getenv(key);
if (proxy == null) {
proxy = System.getenv(key.toUpperCase());
}
if (proxy != null) {
return proxy;
}
}
return "";
}
public static void main(String[] args) throws IOException, InterruptedException {
String proxyArgument = null;
for (var i = 0; i < args.length; i++) {
var arg = args[i];
if (arg.equals("-c") && i < (args.length - 1)) {
var next = args[i + 1];
if (next.startsWith("http.proxy")) {
var parts = next.split("=");
if (parts.length == 2) {
proxyArgument = parts[1];
break;
}
}
}
}
HttpProxy.setup(proxyArgument);
var httpsProxyHost = System.getProperty("https.proxyHost");
var httpProxyHost = System.getProperty("http.proxyHost");
if (httpsProxyHost == null && httpProxyHost == null) {
System.err.println("error: no proxy host specified");
System.err.println("");
System.err.println("Either set the git config variable 'http.proxy' or");
System.err.println("set the environment variables HTTP_PROXY and/or HTTPS_PROXY");
System.exit(1);
}
var httpsProxyPort = System.getProperty("https.proxyPort");
var httpProxyPort = System.getProperty("http.proxyPort");
var proxyHost = httpsProxyHost != null ? httpsProxyHost : httpProxyHost;
var proxyPort = httpsProxyPort != null ? httpsProxyPort : httpProxyPort;
var proxy = proxyHost + ":" + proxyPort;
System.out.println("info: using proxy " + proxy);
var gitArgs = new ArrayList<String>();
gitArgs.add("git");
gitArgs.addAll(Arrays.asList(args));
var pb = new ProcessBuilder(gitArgs);
var env = pb.environment();
if (httpProxyHost != null) {
env.put("HTTP_PROXY", proxy);
env.put("http_proxy", proxy);
}
if (httpsProxyHost != null) {
env.put("HTTPS_PROXY", proxy);
env.put("https_proxy", proxy);
}
var os = System.getProperty("os.name").toLowerCase();
if (os.startsWith("win")) {
for (var dir : System.getenv("PATH").split(";")) {
if (dir.endsWith("Git\\cmd") || dir.endsWith("Git\\bin")) {
var gitDir = Path.of(dir).getParent();
var connect = gitDir.resolve("mingw64").resolve("bin").resolve("connect.exe");
if (Files.exists(connect)) {
env.put("GIT_SSH_COMMAND", "ssh -o ProxyCommand='" + connect.toAbsolutePath() +
" -H " + proxy + " %h %p'");
break;
}
}
}
} else if (os.startsWith("mac")) {
// Need to use the BSD netcat since homebrew might install GNU netcat
env.put("GIT_SSH_COMMAND", "ssh -o ProxyCommand='/usr/bin/nc -X connect -x " + proxy + " %h %p'");
} else {
// Assume GNU/Linux and GNU netcat
env.put("GIT_SSH_COMMAND", "ssh -o ProxyCommand='nc --proxy " + proxy + " %h %p'");
}
pb.inheritIO();
System.exit(pb.start().waitFor());
}
}
| [
"robin.westberg@oracle.com"
] | robin.westberg@oracle.com |
f5c6a08c1d7ff209c21b2a071ac3748823c78d26 | c7997c29d06b974ca61f47b38243b59f3e66c786 | /app/src/main/java/network/minter/bipwallet/internal/common/Lazy.java | 87ef3fc8b1379b08d8a4e7ed33ee97bf56eaf41c | [
"MIT"
] | permissive | MinterTeam/minter-android-wallet | bd17ef0de9d94bd72901a6f63918fc4f5ead5208 | a7c254e6e3744d9304d5bf6f9133096263727bfa | refs/heads/master | 2022-07-31T22:10:32.629402 | 2022-06-12T15:46:54 | 2022-06-12T15:46:54 | 139,714,727 | 20 | 10 | null | null | null | null | UTF-8 | Java | false | false | 1,691 | java | /*
* Copyright (C) by MinterTeam. 2018
* @link <a href="https://github.com/MinterTeam">Org Github</a>
* @link <a href="https://github.com/edwardstock">Maintainer Github</a>
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package network.minter.bipwallet.internal.common;
/**
* minter-android-wallet. 2018
*
* @author Eduard Maximovich <edward.vstock@gmail.com>
*/
public interface Lazy<T> {
/**
* Retrieves an instance of the appropriate type. The returned object may or may not be a new
* instance, depending on the implementation.
*
* @return an instance of the appropriate type
*/
T get();
}
| [
"edward.vstock@gmail.com"
] | edward.vstock@gmail.com |
d9520a60968cf9f742be690c6d733499761e49ca | be6ad8e1ff900875b74283f8028d76c224d9c5c0 | /10.concrete-core/src/main/java/org/coodex/concrete/common/AbstractBeanProvider.java | d4a0077f0817ae7f9424a34e58a67fe2ae6d1e73 | [] | no_license | changqingjiuxing/concrete.coodex.org | 072c8d41ad8edf1600582d50c470560e11072199 | 2bb17628cb28a0d9761f6766f720da48d8bd9f63 | refs/heads/master | 2021-01-22T19:17:53.759894 | 2017-03-15T05:12:26 | 2017-03-15T05:12:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,485 | java | package org.coodex.concrete.common;
import org.coodex.concrete.common.conflictsolutions.ThrowException;
import java.util.Map;
/**
* Created by davidoff shen on 2016-12-03.
*/
public abstract class AbstractBeanProvider implements BeanProvider {
private static final ConflictSolution DEFAULT_CONFLICT_SOLUTION = new ThrowException();
private static final ConcreteSPIFacade<ConflictSolution> SOLUTION_CONCRETE_SPI_FACADE =
new ConcreteSPIFacade<ConflictSolution>() {};
private static final ConflictSolution getSolution(Class<?> clz) {
// 1 从BeanProvider里找
try {
Map<String, ConflictSolution> map = BeanProviderFacade.getBeanProvider().getBeansOfType(ConflictSolution.class);
if (map != null) {
for (ConflictSolution solution : map.values()) {
if (solution != null && solution.accepted(clz))
return solution;
}
}
} catch (Throwable th) {
}
// 2 ServiceLoader
try {
for (ConflictSolution solution : SOLUTION_CONCRETE_SPI_FACADE.getAllInstances()) {
if (solution != null && solution.accepted(clz))
return solution;
}
} catch (Throwable th) {
}
// 3 从配置文件中读取
try {
Class c = Class.forName(ConcreteHelper.getProfile().getString(ConflictSolution.class.getCanonicalName()));
return (ConflictSolution) c.newInstance();
} catch (Throwable th) {
}
return DEFAULT_CONFLICT_SOLUTION;
}
@Override
public final <T> T getBean(Class<T> type) {
Map<String, T> instanceMap = getBeansOfType(type);
switch (instanceMap.size()) {
case 0:
// no service instance found.
throw new ConcreteException(ErrorCodes.NO_SERVICE_INSTANCE_FOUND, type.getName());
case 1:
return instanceMap.values().iterator().next();
default:
// conflict
return getSolution(type).conflict(instanceMap, type);
}
}
// @Override
// public <T> T getBean(String name) {
// return null;
// }
// @Override
// public <T> T getBean(Class<T> type, String name) {
// return null;
// }
// @Override
// public <T> Map<String, T> getBeansOfType(Class<T> type) {
// return null;
// }
}
| [
"jujus.shen@126.com"
] | jujus.shen@126.com |
dfcbbf5635a0fc19c1a92d21fe0e905bfc95544d | 2acf522966be43cf0a1c8e60229314b2b15e8fb9 | /org/spacehq/mc/protocol/ServerLoginHandler.java | 6b332d64d4b472c0a49fe72afca81bbf82b66b81 | [] | no_license | jarrettFord/Test | b23cecf07c5ab424bccddf52deab86c648a004a0 | 5a4534971cebeec74510f22569454553e16291bb | refs/heads/master | 2016-09-06T11:43:36.297712 | 2014-12-17T19:05:58 | 2014-12-17T19:05:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | package org.spacehq.mc.protocol;
import org.spacehq.packetlib.Session;
public abstract interface ServerLoginHandler
{
public abstract void loggedIn(Session paramSession);
}
/* Location: C:\Users\User\Desktop\spam.jar
* Qualified Name: org.spacehq.mc.protocol.ServerLoginHandler
* JD-Core Version: 0.7.0.1
*/ | [
"jarrettjamesford@gmail.com"
] | jarrettjamesford@gmail.com |
0d3cf9464424717334b9fc15622fc92d9e86f49a | 9d1870a895c63f540937f04a6285dd25ada5e52a | /chromecast-app-reverse-engineering/src/from-jd-gui/avi.java | 3e881313452e59115cb947132db5b0c12d1b7103 | [] | no_license | Churritosjesus/Chromecast-Reverse-Engineering | 572aa97eb1fd65380ca0549b4166393505328ed4 | 29fae511060a820f2500a4e6e038dfdb591f4402 | refs/heads/master | 2023-06-04T10:27:15.869608 | 2015-10-27T10:43:11 | 2015-10-27T10:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 580 | java | import android.os.Handler;
import android.os.Looper;
import android.os.Message;
final class avi
extends Handler
{
avi(ava paramava, Looper paramLooper, bdn parambdn)
{
super(paramLooper);
}
public final void handleMessage(Message paramMessage)
{
switch (paramMessage.what)
{
}
for (;;)
{
return;
this.b.c(this.a);
continue;
this.a.b_(-1);
}
}
}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\avi.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"v.richomme@gmail.com"
] | v.richomme@gmail.com |
92408b211f5ff1dd5c9db8ba099c2a58d32feefd | d1ea5077c83cb2e93fe69e3d19a2e26efe894a0e | /src/main/java/com/rograndec/feijiayun/chain/business/storage/goodshandle/vo/UserDestroyVO.java | 1990aab76731a4ee5fa6a8a20ccc75ebe6949b9c | [] | no_license | Catfeeds/rog-backend | e89da5a3bf184e4636169e7492a97dfd0deef2a1 | 109670cfec6cbe326b751e93e49811f07045e531 | refs/heads/master | 2020-04-05T17:36:50.097728 | 2018-10-22T16:23:55 | 2018-10-22T16:23:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package com.rograndec.feijiayun.chain.business.storage.goodshandle.vo;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
/**
* 商品列表
* @author 孙帮祥
* */
public class UserDestroyVO implements Serializable{
@ApiModelProperty(value = "人员ID")
private Long id;
@ApiModelProperty(value = "人员名称")
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
| [
"ruifeng.jia@rograndec.com"
] | ruifeng.jia@rograndec.com |
fc15d55e03a4df2103c941caca480e314f3b06f5 | 6b72776ce826b22efdf7534e8f86c21332f1a897 | /src/org/darkstorm/minecraft/darkmod/hooks/client/Arrow.java | f226e5095be2be40e8ae004dc60af597d7daba6a | [] | no_license | DarkStorm652/DarkMod | e2019cca13f46020ee15389b7e1725594beb040f | 4ee1f4e6a933d1928b02b6868aefcbf3c331e6b1 | refs/heads/master | 2021-01-02T22:30:58.546298 | 2012-04-30T20:25:22 | 2012-04-30T20:25:22 | 1,762,805 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 629 | java | package org.darkstorm.minecraft.darkmod.hooks.client;
public interface Arrow extends Entity {
public int getXTile();
public void setXTile(int xTile);
public int getYTile();
public void setYTile(int yTile);
public int getZTile();
public void setZTile(int zTile);
public int getInTile();
public void setInTile(int inTile);
public int getInData();
public void setInData(int inData);
public boolean isInGround();
public void setInGround(boolean inGround);
public boolean isFiredByPlayer();
public void setFiredByPlayer(boolean firedByPlayer);
public int getShake();
public void setShake(int shake);
}
| [
"darkstorm@evilminecraft.net"
] | darkstorm@evilminecraft.net |
363d9cb3418cf4057046f739800636672b6c46f4 | fde9532fa38ea69e745bc9c338a6c952c32df1ac | /Chp. 10 - Sorting and Searching/_10_11_Peaks_and_Valleys/PeaksAndValleys.java | 1165617f017d321ff3a70c842af82372361bcb64 | [] | no_license | SKPanigrahi-Forking/Cracking-the-Coding-Interview_solutions | 5e66b6c10d69fe876ab93ef88446d35c10e776a4 | 5719a045c5921ec64e4de94515588663179ed7b7 | refs/heads/master | 2020-07-06T00:27:02.515919 | 2019-08-06T08:23:52 | 2019-08-06T08:23:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 711 | java | package _10_11_Peaks_and_Valleys;
// Algorithm: Look at groups of 3 and put the "valleys" in the right place.
// This will also make the "peaks" fall in the right place.
public class PeaksAndValleys {
public static void sortValleyPeak(int[] array) {
for (int i = 1; i < array.length; i += 2) {
if (array[i - 1] < array[i]) {
swap(array, i - 1, i);
}
if (i + 1 < array.length && array[i + 1] < array[i]) {
swap(array, i + 1, i);
}
}
}
private static void swap(int[] array, int left, int right) {
int temp = array[left];
array[left] = array[right];
array[right] = temp;
}
}
| [
"9rodney@gmail.com"
] | 9rodney@gmail.com |
93266a24ed20021421d99b01e583620554cf5f1a | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/be005fc7697c2f5923ddb52e5dab27e24d974ad3/before/MavenConstantListConverter.java | 6e13db52bcc3ee1d90a6b6b4fa15861fb9e89da5 | [] | 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,335 | java | package org.jetbrains.idea.maven.dom.converters;
import com.intellij.util.xml.ConvertContext;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.maven.dom.converters.MavenPropertyResolvingConverter;
import java.util.Collection;
import java.util.List;
public abstract class MavenConstantListConverter extends MavenPropertyResolvingConverter<String> {
private boolean myStrict;
protected MavenConstantListConverter() {
this(true);
}
protected MavenConstantListConverter(boolean strict) {
myStrict = strict;
}
@Override
public String fromResolvedString(@Nullable @NonNls String s, ConvertContext context) {
if (!myStrict) return s;
return getValues().contains(s) ? s : null;
}
public String toString(@Nullable String s, ConvertContext context) {
return s;
}
@NotNull
public Collection<String> getVariants(ConvertContext context) {
return getValues();
}
protected abstract List<String> getValues();
@Override
public String getErrorMessage(@Nullable String s, ConvertContext context) {
return "<html>Specified value is not acceptable here.<br>Acceptable values: " + StringUtil.join(getValues(), ", ") + "</html>";
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
93f3df13b672e77003e944383640eeb387200011 | 66879fb5e25987ec0374f05445859c3069c47290 | /src/main/java/com/hs3/models/lotts/LotterySaleTimeEx.java | 6ceb8ac73d3f3896a8df8089f6248d6be8849928 | [] | no_license | wangpiju/java-kernal | 0aceb90aa7705e18175a660fa64fa8f3b998779b | 17ef494cc4a1a3f86013f0330642d76965fc502c | refs/heads/master | 2020-04-01T09:18:18.310531 | 2018-10-15T07:20:51 | 2018-10-15T07:20:51 | 153,069,500 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package com.hs3.models.lotts;
import com.hs3.entity.lotts.LotterySaleTime;
public class LotterySaleTimeEx
extends LotterySaleTime {
private static final long serialVersionUID = 1L;
private String serviceTime;
public String getServiceTime() {
return this.serviceTime;
}
public void setServiceTime(String serviceTime) {
this.serviceTime = serviceTime;
}
}
| [
"wangpiju0420@gmail.com"
] | wangpiju0420@gmail.com |
16e96c4db5fd294ebc95fdc041cd634a0e7da214 | 8a8254c83cc2ec2c401f9820f78892cf5ff41384 | /baseline/AntennaPod/core/src/main/java/baseline/de/danoeh/antennapod/core/DBTasksCallbacks.java | ceb46f4e643a848824fd5855e9c664a06eb7eead | [
"MIT"
] | permissive | VU-Thesis-2019-2020-Wesley-Shann/subjects | 46884bc6f0f9621be2ab3c4b05629e3f6d3364a0 | 14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88 | refs/heads/master | 2022-12-03T05:52:23.309727 | 2020-08-19T12:18:54 | 2020-08-19T12:18:54 | 261,718,101 | 0 | 0 | null | 2020-07-11T12:19:07 | 2020-05-06T09:54:05 | Java | UTF-8 | Java | false | false | 642 | java | package baseline.de.danoeh.antennapod.core;
import baseline.de.danoeh.antennapod.core.storage.AutomaticDownloadAlgorithm;
import baseline.de.danoeh.antennapod.core.storage.EpisodeCleanupAlgorithm;
/**
* Callbacks for the DBTasks class of the storage module.
*/
public interface DBTasksCallbacks {
/**
* Returns the client's implementation of the AutomaticDownloadAlgorithm interface.
*/
AutomaticDownloadAlgorithm getAutomaticDownloadAlgorithm();
/**
* Returns the client's implementation of the EpisodeCacheCleanupAlgorithm interface.
*/
EpisodeCleanupAlgorithm getEpisodeCacheCleanupAlgorithm();
}
| [
"sshann95@outlook.com"
] | sshann95@outlook.com |
b3ac25858aaffa8ce0e011ecc938c3216ba42591 | ec5ee0c75640206efcb7f7bc4a3f46f0a55b7652 | /src/main/java/com/bitmovin/api/sdk/notifications/webhooks/encoding/manifest/ManifestApi.java | c49eec3237c913cec9cdced389876c98f7c3da26 | [
"MIT"
] | permissive | mcherif/bitmovinexp | eb831c18b041c9c86f6d9520b1028dc9b2ea72f6 | d4d746794f26c8e9692c834e63d5d19503693bbf | refs/heads/main | 2023-04-30T08:14:33.171375 | 2021-05-11T11:19:04 | 2021-05-11T11:19:04 | 368,218,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,181 | java | package com.bitmovin.api.sdk.notifications.webhooks.encoding.manifest;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import feign.Body;
import feign.Headers;
import com.bitmovin.api.sdk.model.*;
import com.bitmovin.api.sdk.common.BitmovinException;
import static com.bitmovin.api.sdk.common.BitmovinExceptionFactory.buildBitmovinException;
import com.bitmovin.api.sdk.common.BitmovinDateExpander;
import com.bitmovin.api.sdk.common.QueryMapWrapper;
import com.bitmovin.api.sdk.common.BitmovinApiBuilder;
import com.bitmovin.api.sdk.common.BitmovinApiClientFactory;
import com.bitmovin.api.sdk.notifications.webhooks.encoding.manifest.error.ErrorApi;
import com.bitmovin.api.sdk.notifications.webhooks.encoding.manifest.finished.FinishedApi;
public class ManifestApi {
public final ErrorApi error;
public final FinishedApi finished;
private final ManifestApiClient apiClient;
public ManifestApi(BitmovinApiClientFactory clientFactory) {
if (clientFactory == null)
{
throw new IllegalArgumentException("Parameter 'clientFactory' may not be null.");
}
this.apiClient = clientFactory.createApiClient(ManifestApiClient.class);
this.error = new ErrorApi(clientFactory);
this.finished = new FinishedApi(clientFactory);
}
/**
* Fluent builder for creating an instance of ManifestApi
*/
public static BitmovinApiBuilder<ManifestApi> builder() {
return new BitmovinApiBuilder<>(ManifestApi.class);
}
/**
* List Webhook Notifications (Specific Manifest)
*
* @param manifestId Id of the manifest resource (required)
* @return List<Notification>
* @throws BitmovinException if fails to make API call
*/
public PaginationResponse<Notification> list(String manifestId) throws BitmovinException {
try {
return this.apiClient.list(manifestId, new QueryMapWrapper()).getData().getResult();
} catch (Exception ex) {
throw buildBitmovinException(ex);
}
}
/**
* List Webhook Notifications (Specific Manifest)
*
* @param manifestId Id of the manifest resource (required)
* @param queryParams The query parameters for sorting, filtering and paging options (optional)
* @return List<Notification>
* @throws BitmovinException if fails to make API call
*/
public PaginationResponse<Notification> list(String manifestId, NotificationListQueryParams queryParams) throws BitmovinException {
try {
return this.apiClient.list(manifestId, new QueryMapWrapper(queryParams)).getData().getResult();
} catch (Exception ex) {
throw buildBitmovinException(ex);
}
}
interface ManifestApiClient {
@RequestLine("GET /notifications/webhooks/encoding/manifest/{manifest_id}")
ResponseEnvelope<PaginationResponse<Notification>> list(@Param(value = "manifest_id") String manifestId, @QueryMap QueryMapWrapper queryParams) throws BitmovinException;
}
}
| [
"openapi@bitmovin.com"
] | openapi@bitmovin.com |
78cd0c9082537c84ea7a5789da3852a4a1053d72 | bd69661f67730b2cc05083489dc9b394f5619c57 | /SpiderX/src/perfer/org/apache/http/cookie/Cookie.java | b7d2185da76f4c13877f1e4a9bc9e3dac6f7536b | [] | no_license | WoYang/WebSpiderAndroid | 6292763823fe5792b542e6b1e60264267337a068 | 4a5f713bf97fa3f6f3242bd19750afd78c562887 | refs/heads/master | 2021-01-12T10:53:42.601043 | 2018-11-12T08:55:51 | 2018-11-12T08:55:51 | 72,708,475 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,343 | 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package perfer.org.apache.http.cookie;
import java.util.Date;
/**
* Cookie interface represents a token or short packet of state information
* (also referred to as "magic-cookie") that the HTTP agent and the target
* server can exchange to maintain a session. In its simples form an HTTP
* cookie is merely a name / value pair.
*
* @since 4.0
*/
public interface Cookie {
/**
* Returns the name.
*
* @return String name The name
*/
String getName();
/**
* Returns the value.
*
* @return String value The current value.
*/
String getValue();
/**
* Returns the comment describing the purpose of this cookie, or
* <tt>null</tt> if no such comment has been defined.
*
* @return comment
*/
String getComment();
/**
* If a user agent (web browser) presents this cookie to a user, the
* cookie's purpose will be described by the information at this URL.
*/
String getCommentURL();
/**
* Returns the expiration {@link Date} of the cookie, or <tt>null</tt>
* if none exists.
* <p><strong>Note:</strong> the object returned by this method is
* considered immutable. Changing it (e.g. using setTime()) could result
* in undefined behaviour. Do so at your peril. </p>
* @return Expiration {@link Date}, or <tt>null</tt>.
*/
Date getExpiryDate();
/**
* Returns <tt>false</tt> if the cookie should be discarded at the end
* of the "session"; <tt>true</tt> otherwise.
*
* @return <tt>false</tt> if the cookie should be discarded at the end
* of the "session"; <tt>true</tt> otherwise
*/
boolean isPersistent();
/**
* Returns domain attribute of the cookie. The value of the Domain
* attribute specifies the domain for which the cookie is valid.
*
* @return the value of the domain attribute.
*/
String getDomain();
/**
* Returns the path attribute of the cookie. The value of the Path
* attribute specifies the subset of URLs on the origin server to which
* this cookie applies.
*
* @return The value of the path attribute.
*/
String getPath();
/**
* Get the Port attribute. It restricts the ports to which a cookie
* may be returned in a Cookie request header.
*/
int[] getPorts();
/**
* Indicates whether this cookie requires a secure connection.
*
* @return <code>true</code> if this cookie should only be sent
* over secure connections, <code>false</code> otherwise.
*/
boolean isSecure();
/**
* Returns the version of the cookie specification to which this
* cookie conforms.
*
* @return the version of the cookie.
*/
int getVersion();
/**
* Returns true if this cookie has expired.
* @param date Current time
*
* @return <tt>true</tt> if the cookie has expired.
*/
boolean isExpired(final Date date);
}
| [
"564477645@qq.com"
] | 564477645@qq.com |
fcb00fd5a9866502f97fea101a98404ae009cd4e | 3e3a5e2643e4ed8519ecfd6b66ae937f2da42939 | /BasicJava/StringDemo_String_length_App/StringDemo/src/StringTest.java | 64578ae087fb57569648bea4b92795b99bce6c31 | [] | no_license | neel2811/Java | a5249b19b3c3923c44f5b9528adee7a54a978be6 | fcafcf634cbf9ce849ecf43bf8e05f770cb85ac1 | refs/heads/master | 2021-10-26T03:42:57.532886 | 2017-03-24T10:25:27 | 2017-03-24T10:25:27 | 87,059,721 | 0 | 1 | null | 2017-04-03T09:50:10 | 2017-04-03T09:50:10 | null | UTF-8 | Java | false | false | 431 | java | /*
* public int length()
*
* Returns the length of this string. The length is
* equal to the number of Unicode code units in the
* string.
*
* Returns:
* -------
*
* the length of the sequence of characters
* represented by this object.
*/
public class StringTest
{
public static void main(String[] args)
{
String str = "Welcome";
int length = str.length();
System.out.println("length = " + length);
}
}
| [
"ramram_43210@yahoo.com"
] | ramram_43210@yahoo.com |
211892185c00a1ad7f827608bc09512d2a7c3dec | 34b8e226da9f7b8427c43bd1327deb5d129537c1 | /intersky/src/main/java/com/intersky/android/view/activity/MainActivity.java | 9a37c40038d56776c4f96488564065d0ae0eadcd | [] | no_license | xpx456/xpxproject | 11485d4a475c10f19dbbfed2b44cfb4644a87d12 | c19c69bc998cbbb3ebc0076c394db9746e906dce | refs/heads/master | 2021-04-23T08:46:43.530627 | 2021-03-04T09:38:24 | 2021-03-04T09:38:24 | 249,913,946 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,970 | java | package com.intersky.android.view.activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.PopupWindow;
import com.intersky.android.presenter.MainPresenter;
import com.intersky.android.tools.IatHelper;
import java.util.ArrayList;
import intersky.appbase.BaseActivity;
import intersky.appbase.PermissionCode;
import intersky.appbase.entity.Conversation;
import intersky.apputils.AppUtils;
/**
* Created by xpx on 2017/8/18.
*/
public class MainActivity extends BaseActivity {
public static final String ACTION_UPDATA_CONVERSATION = "ACTION_UPDATA_CONVERSATION";
public static final String ACTION_UPDATA_IWEB_MESSAGE = "ACTION_UPDATA_IWEB_MESSAGE";
public static final String ACTION_KIKOUT = "ACTION_KIKOUT";
public static final int PAGE_CONTACTS = 2;
public static final int PAGE_CONVERSATION = 0;
public static final int PAGE_MY = 3;
public static final int PAGE_WORK = 1;
public boolean isResum = true;
public boolean dismissflag= true;
public PopupWindow popupWindow;
public ArrayList<Conversation> temp = new ArrayList<Conversation>();
public String readid = "";
public int unreadcount = 0;
public int messagePage = 1;
public MainPresenter mMainPresenter = new MainPresenter(this);
public IatHelper iatHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMainPresenter.Create();
}
@Override
protected void onDestroy() {
mMainPresenter.Destroy();
super.onDestroy();
}
@Override
protected void onResume() {
mMainPresenter.Resume();
super.onResume();
}
@Override
protected void onPause() {
mMainPresenter.Pause();
super.onPause();
}
public View.OnClickListener showWorkListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
mMainPresenter.setContent(PAGE_WORK);
}
};
public View.OnClickListener showContactsListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
mMainPresenter.setContent(PAGE_CONTACTS);
}
};
public View.OnClickListener showCoversationListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
mMainPresenter.setContent(PAGE_CONVERSATION);
}
};
public View.OnClickListener showMyListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
mMainPresenter.setContent(PAGE_MY);
}
};
public View.OnClickListener mMoreListener = new View.OnClickListener()
{
@Override
public void onClick(View view) {
mMainPresenter.showMore();
}
};
public View.OnClickListener mScanListener = new View.OnClickListener()
{
@Override
public void onClick(View view) {
mMainPresenter.doSafeLogin();
}
};
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (mMainPresenter.onKeyDown(keyCode, event)) {
return true;
} else {
return super.onKeyDown(keyCode, event);
}
}
@Override
public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1) {
return false;
}
public View.OnClickListener speachListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
permissionRepuest = iatHelper.doStart();
}
};
public View.OnClickListener mtestAdd = new View.OnClickListener()
{
@Override
public void onClick(View view) {
mMainPresenter.getReceive();
}
};
}
| [
"xpx456@163.com"
] | xpx456@163.com |
b4939846b583b3eba3ef62aa248af0220f9c90e3 | cb8104708bcb83eea8250845258bab8159ce1415 | /src/main/java/org/silnith/grammar/xml/syntax/ElementDecl.java | bb38469588bb95ebe362498d588df49d566efb8b | [] | no_license | silnith/organic-browser | 4ec4850c9e56c1fa6578fe44309d82b96c449b72 | 1d479c92f1a099ecad597c9f033164e0e0a4b68a | refs/heads/development | 2021-01-10T03:20:41.413932 | 2020-03-29T00:30:07 | 2020-03-29T00:30:07 | 50,687,654 | 0 | 0 | null | 2020-10-12T22:24:56 | 2016-01-29T19:57:18 | Java | UTF-8 | Java | false | false | 244 | java | package org.silnith.grammar.xml.syntax;
public class ElementDecl {
public String name;
public ContentSpec contentSpec;
public ElementDecl() {
// TODO Auto-generated constructor stub
}
}
| [
"silnith@gmail.com"
] | silnith@gmail.com |
2b0181d33290a86fafd66879d1a7e8316f68310c | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_4d8a38be64bbb1603f46501a0ff6ea46847ff39c/ColumnTag/2_4d8a38be64bbb1603f46501a0ff6ea46847ff39c_ColumnTag_s.java | 874749607b5ff698f84a4e2f372cfd7142c27c77 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,220 | java | /*
* [The "BSD licence"]
* Copyright (c) 2012 Dandelion
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Dandelion 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 AUTHOR ``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 AUTHOR 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.github.dandelion.datatables.jsp.tag;
import javax.servlet.jsp.JspException;
import com.github.dandelion.datatables.core.html.HtmlColumn;
import com.github.dandelion.datatables.core.html.HtmlRow;
import com.github.dandelion.datatables.core.util.StringUtils;
/**
* <p>
* Tag used to generate a HTML table's column.
*
* @author Thibault Duchateau
* @since 0.1.0
*/
public class ColumnTag extends AbstractColumnTag {
private static final long serialVersionUID = -8928415196287387948L;
/**
* Nothing happens in doStartTag.
*/
public int doStartTag() throws JspException {
return EVAL_BODY_BUFFERED;
}
/**
* <p>
* Configure the current {@link HtmlColumn}.
* <p>
* Note that when using an AJAX source, since there is only one iteration,
* it just adds a header column to the last header {@link HtmlRow} added.
* When using a DOM source, first a header {@link HtmlColumn} is added at
* first iteration and a {@link HtmlColumn} is added for each iteration.
*/
public int doEndTag() throws JspException {
TableTag parent = (TableTag) getParent();
// A header column must be added at first iteration
if(parent.isFirstIteration()){
// The 'title' attribute has precendence over 'titleKey'
String columnTitle = title;
// If the 'titleKey' attribute is used, the column's title must be
// retrieved from the current ResourceBundle
if(columnTitle == null && StringUtils.isNotBlank(titleKey)){
columnTitle = parent.getTable().getTableConfiguration().getInternalMessageResolver()
.getResource(titleKey, title, this, pageContext);
}
if ("DOM".equals(parent.getLoadingType())) {
addDomColumn(true, columnTitle);
}
else if ("AJAX".equals(parent.getLoadingType())) {
addAjaxColumn(true, columnTitle);
return EVAL_PAGE;
}
}
// At this point, only DOM sources are concerned
if(parent.getCurrentObject() != null){
// The 'property' attribute has precedence over the body of the
// column tag
if (getBodyContent() == null) {
addDomColumn(false, getColumnContent());
}
// No 'property' attribute is used but a body is set instead
else{
String bodyString = getBodyContent().getString().trim().replaceAll("[\n\r]", "");
addDomColumn(false, bodyString);
}
}
return EVAL_PAGE;
}
public String getTitle() {
return title;
}
public void setTitle(String titleKey) {
this.title = titleKey;
}
public String getTitleKey() {
return titleKey;
}
public void setTitleKey(String titleKey) {
this.titleKey = titleKey;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
127239674c13c6443e63537f479023cd956516aa | 2dbc902760e62ab021382f6e03e8e39a8aab03ba | /JavaCourse/src/jarden/cards/CardPack.java | 77f3f1f8c5e7c0e19b90cd6c690c21979188c523 | [] | no_license | jdenny/Jarden | aca00e60baff7498eee18feeccc960b1f695a8b6 | 6e70e1a15f6c7cf278d0dd7ac55a1f9d0cc7caf1 | refs/heads/master | 2021-01-10T09:02:12.853707 | 2016-02-22T09:52:09 | 2016-02-22T09:52:09 | 46,224,165 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,303 | java | package jarden.cards;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
public class CardPack {
public final static int DECK_SIZE = 52;
public final static int PLAYERS = 4;
public final static int HAND_SIZE = DECK_SIZE / PLAYERS;
private Card[] cards;
private Hand[] hands;
public CardPack() {
cards = new Card[DECK_SIZE];
int i = 0;
for (Suit suit: Suit.values()) {
for (Rank rank: Rank.values()) {
cards[i++] = new Card(suit, rank);
}
}
}
public Card[] getCards() {
return cards;
}
public void shuffle() {
Random random = new Random();
Card swap;
for (int i = 0; i < DECK_SIZE; i++) {
int j = random.nextInt(DECK_SIZE);
swap = cards[j];
cards[j] = cards[i];
cards[i] = swap;
}
}
/**
* Actually, deal and sort. We're good like that.
*/
public void deal() {
hands = new Hand[PLAYERS];
ArrayList<Card> cardList;
for (int p = 0; p < PLAYERS; p++) {
cardList = new ArrayList<Card>();
for (int i = 0; i < HAND_SIZE; i++) {
cardList.add(cards[i * PLAYERS + p]);
}
Collections.sort(cardList);
hands[p] = new Hand();
hands[p].cards = cardList;
}
}
public Hand getHand(Player player) {
return hands[player.ordinal()];
}
}
| [
"john.denny@gmail.com"
] | john.denny@gmail.com |
8a8425eceac3b921fa473943918e8ca754b92213 | beb0d41398fbda2a2f14ef783d43cd60b636fe81 | /app/src/main/java/com/shoaibnwar/facilitymanagement/ChatSystem/ComplexChat/model/Room.java | a9a3388073b384b46bd35f209995e25bbf0907a4 | [] | no_license | iamrahulyadav/FacilityManagement | 9487e195f5224da08e49510c9b7b8312f23621f0 | b9ad1d92fee743e7644aab1a33bf8dfecf0071de | refs/heads/master | 2020-03-27T18:32:17.579646 | 2018-08-29T12:50:12 | 2018-08-29T12:50:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package com.shoaibnwar.facilitymanagement.ChatSystem.ComplexChat.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/**
* Created by gold on 8/29/2018.
*/
public class Room {
public ArrayList<String> member;
public Map<String, String> groupInfo;
public Room(){
member = new ArrayList<>();
groupInfo = new HashMap<String, String>();
}
}
| [
"shoaibanwar.vu@gmail.com"
] | shoaibanwar.vu@gmail.com |
9a373de418605f469a7d49b4b54cecf43d92d042 | efcf3233a2a21411eb1ae2bff3b71baa548c6f04 | /tracking/src/main/java/org/lcsim/recon/tracking/vsegment/ExampleDriver1.java | dc2d27442af280b88e9b9cacdac57b09faae600c | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | slaclab/lcsim | 95af8a8821bd1e7638f3c9c039655f9b4f797a92 | afdee47b0e511a6f96595deae758dedaef2f4ae3 | refs/heads/master | 2023-07-06T19:40:04.589633 | 2023-03-20T21:38:33 | 2023-03-20T21:38:33 | 95,500,068 | 1 | 7 | NOASSERTION | 2023-03-20T21:10:47 | 2017-06-27T00:08:43 | Java | UTF-8 | Java | false | false | 4,344 | java | package org.lcsim.recon.tracking.vsegment;
import java.util.*;
import hep.aida.*;
import org.lcsim.event.EventHeader;
import org.lcsim.units.clhep.SystemOfUnits;
import org.lcsim.util.Driver;
import org.lcsim.util.aida.AIDA;
import org.lcsim.recon.tracking.vsegment.clustering.ClusteringDriver;
import org.lcsim.recon.tracking.vsegment.clustering.clusterers.NearestNeighborClusterer;
import org.lcsim.recon.tracking.vsegment.digitization.SimToDigiDriver;
import org.lcsim.recon.tracking.vsegment.digitization.SimToDigiConverter;
import org.lcsim.recon.tracking.vsegment.digitization.algorithms.ConverterSimple;
import org.lcsim.recon.tracking.vsegment.geom.SegmentationManager;
import org.lcsim.recon.tracking.vsegment.geom.Segmenter;
import org.lcsim.recon.tracking.vsegment.geom.Sensor;
import org.lcsim.recon.tracking.vsegment.geom.segmenters.CylindricalBarrelSegmenter;
import org.lcsim.recon.tracking.vsegment.geom.segmenters.DiskTrackerToWedgesSegmenter;
import org.lcsim.recon.tracking.vsegment.geom.segmenters.DiskTrackerToRingsSegmenter;
import org.lcsim.recon.tracking.vsegment.geom.segmenters.SubdetectorBasedSegmenter;
import org.lcsim.recon.tracking.vsegment.hit.DigiTrackerHit;
import org.lcsim.recon.tracking.vsegment.hit.TrackerCluster;
import org.lcsim.recon.tracking.vsegment.hit.TrackerHit;
import org.lcsim.recon.tracking.vsegment.hitmaking.HitMakingDriver;
import org.lcsim.recon.tracking.vsegment.hitmaking.TrackerHitMaker;
import org.lcsim.recon.tracking.vsegment.hitmaking.hitmakers.TrackerHitMakerBasic;
import org.lcsim.recon.tracking.vsegment.mctruth.MCTruthDriver;
/**
* An Example of how to define virtual segmentation of the tracker,
* run digitization, clustering, and hit creation.
* Parameters are chosen to define reasonable segmentation for SiD01.
*
* @author D.Onoprienko
* @version $Id: ExampleDriver1.java,v 1.1 2008/12/06 21:53:43 onoprien Exp $
*/
public class ExampleDriver1 extends Driver {
private AIDA aida = AIDA.defaultInstance();
public ExampleDriver1() {
add(new MCTruthDriver());
// Segmentation description :
Segmenter segmenter = new ExampleSegmenter1();
SegmentationManager segMan = new SegmentationManager(segmenter);
SegmentationManager.setDefaultInstance(segMan);
add(segMan);
// Digitization :
SimToDigiConverter converter = new ConverterSimple();
SimToDigiDriver conversionDriver = new SimToDigiDriver(converter);
conversionDriver.set("OUTPUT_MAP_NAME", "DigiTrackerHits");
add(conversionDriver);
// Clustering :
ClusteringDriver clusteringDriver = new ClusteringDriver(new NearestNeighborClusterer());
clusteringDriver.set("INPUT_MAP_NAME","DigiTrackerHits");
clusteringDriver.set("OUTPUT_MAP_NAME","TrackerClusters");
add(clusteringDriver);
// Hit making :
TrackerHitMaker hitMaker = new TrackerHitMakerBasic();
HitMakingDriver hitMakingDriver = new HitMakingDriver(hitMaker);
hitMakingDriver.set("INPUT_MAP_NAME","TrackerClusters");
hitMakingDriver.set("OUTPUT_MAP_NAME","NewTrackerHits");
add(hitMakingDriver);
}
public void process(EventHeader event) {
System.out.println(" ");
System.out.println("Event "+event.getEventNumber());
super.process(event);
System.out.println(" ");
int n = 0;
HashMap<Sensor, List<DigiTrackerHit>> digiMap =
(HashMap<Sensor, List<DigiTrackerHit>>) event.get("DigiTrackerHits");
for (List<DigiTrackerHit> digiList : digiMap.values()) n += digiList.size();
System.out.println("Created " + n + " DigiTrackerHits on " + digiMap.keySet().size() + " sensors");
n = 0;
HashMap<Sensor, List<TrackerCluster>> clusterMap =
(HashMap<Sensor, List<TrackerCluster>>) event.get("TrackerClusters");
for (List<TrackerCluster> clusterList : clusterMap.values()) n += clusterList.size();
System.out.println("Created " + n + " TrackerClusters on " + clusterMap.keySet().size() + " sensors");
n = 0;
HashMap<Sensor, List<TrackerHit>> hitMap =
(HashMap<Sensor, List<TrackerHit>>) event.get("NewTrackerHits");
for (List<TrackerHit> hitList : hitMap.values()) n += hitList.size();
System.out.println("Created " + n + " TrackerHits on " + hitMap.keySet().size() + " sensors");
}
}
| [
"jermccormick@gmail.com"
] | jermccormick@gmail.com |
239f315a6cb73c8fefd6b6acf1d96c096a6d418d | cc9b979c3c32a45d1031b1b9a100ed3234fbafcc | /app/src/main/java/com/bjjy/buildtalk/ui/mine/WalletContract.java | 180e1d33803c185415dd81438c80c7a7d3611335 | [] | no_license | Power-Android/BuildTalk | 5e66f15d5300ac73e6abb0934831a0465b9f8a14 | 4bdb54cd6009da89eb014e03e6640b815ada74d6 | refs/heads/master | 2022-11-12T13:35:45.050616 | 2020-07-06T01:58:39 | 2020-07-06T01:58:39 | 183,206,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 438 | java | package com.bjjy.buildtalk.ui.mine;
import com.bjjy.buildtalk.base.presenter.IPresenter;
import com.bjjy.buildtalk.base.view.IView;
import com.bjjy.buildtalk.entity.IEntity;
/**
* @author power
* @date 2019/5/28 9:21 AM
* @project BuildTalk
* @description:
*/
public class WalletContract {
interface View extends IView{
void handlerWallet(String s);
}
interface Presenter extends IPresenter<View>{
}
}
| [
"power_android@163.com"
] | power_android@163.com |
a9b61c3470f02640abb86712a2fc8a4f1a1a1718 | c2edebdc20213a10206c39ced85c8855fa565d02 | /drools-compiler/src/main/java/org/drools/lang/api/PatternDescrBuilderImpl.java | c960c488a7c40e68da2a0788d9cd6068648a6efc | [
"Apache-2.0"
] | permissive | acwest-cc/droolsjbpm | abfdd9615a1ff33cc1a6caea7d02a2eb376b624b | 3e89a7afce9837517958a7069b0285def242b9cd | refs/heads/master | 2021-01-09T06:59:10.834074 | 2011-02-17T19:02:25 | 2011-02-17T19:02:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,031 | java | /**
* Copyright 2011 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.drools.lang.api;
import org.drools.lang.descr.BindingDescr;
import org.drools.lang.descr.ExprConstraintDescr;
import org.drools.lang.descr.PatternDescr;
/**
* A descr builder implementation for Patterns
*
*/
public class PatternDescrBuilderImpl<P extends DescrBuilder<?>> extends BaseDescrBuilderImpl<PatternDescr>
implements
PatternDescrBuilder<P> {
private P parent;
protected PatternDescrBuilderImpl( P parent ) {
this( parent, null );
}
protected PatternDescrBuilderImpl(P parent, String type) {
super( new PatternDescr( type ) );
this.parent = parent;
}
public PatternDescrBuilder<P> id( String id ) {
descr.setIdentifier( id );
return this;
}
public PatternDescrBuilder<P> type( String type ) {
descr.setObjectType( type );
return this;
}
public PatternDescrBuilder<P> constraint( String constraint ) {
descr.addConstraint( new ExprConstraintDescr( constraint ) );
return this;
}
public PatternDescrBuilder<P> bind( String var,
String target ) {
descr.addBinding( new BindingDescr( var, target ) );
return this;
}
public SourceDescrBuilder<PatternDescrBuilder<P>> from() {
return new SourceDescrBuilderImpl<PatternDescrBuilder<P>>( this );
}
public P end() {
return parent;
}
}
| [
"ed.tirelli@gmail.com"
] | ed.tirelli@gmail.com |
f28ef50f3bfc2b2ceb0803534670bb4a0c198fdd | 0cc6e6c16bf427ca9afba6b835d1eb406702e8c8 | /Core/java/com/l2jserver/gameserver/skills/effects/EffectClanGate.java | 62b34eab2dd982584e40aaee159b9594a33f16e1 | [] | no_license | Kryspo/blaion | a19087d1533d763d977d4dcc8235a2d1a61890b8 | 7e34627b01f30aacc290b87e1ad69e81b9e9cc33 | refs/heads/master | 2020-03-21T15:01:15.618199 | 2018-06-28T07:35:50 | 2018-06-28T07:35:50 | 138,689,668 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,393 | 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 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.l2jserver.gameserver.skills.effects;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.L2Effect;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.skills.AbnormalEffect;
import com.l2jserver.gameserver.skills.Env;
import com.l2jserver.gameserver.templates.effects.EffectTemplate;
import com.l2jserver.gameserver.templates.skills.L2EffectType;
/**
* @author ZaKaX (Ghost @ L2D)
*/
public class EffectClanGate extends L2Effect
{
public EffectClanGate(Env env, EffectTemplate template)
{
super(env, template);
}
/**
* @see com.l2jserver.gameserver.model.L2Effect#onStart()
*/
@Override
public boolean onStart()
{
getEffected().startAbnormalEffect(AbnormalEffect.MAGIC_CIRCLE);
if (getEffected() instanceof L2PcInstance)
{
L2Clan clan = ((L2PcInstance) getEffected()).getClan();
if (clan != null)
{
SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.COURT_MAGICIAN_CREATED_PORTAL);
clan.broadcastToOtherOnlineMembers(msg, ((L2PcInstance) getEffected()));
}
}
return true;
}
/**
* @see com.l2jserver.gameserver.model.L2Effect#onActionTime()
*/
@Override
public boolean onActionTime()
{
return false;
}
/**
* @see com.l2jserver.gameserver.model.L2Effect#onExit()
*/
@Override
public void onExit()
{
getEffected().stopAbnormalEffect(AbnormalEffect.MAGIC_CIRCLE);
}
/**
* @see com.l2jserver.gameserver.model.L2Effect#getEffectType()
*/
@Override
public L2EffectType getEffectType()
{
return L2EffectType.CLAN_GATE;
}
}
| [
"cristianleon48@gmail.com"
] | cristianleon48@gmail.com |
75389fbc46c8232bf357dbe6468f2f4aa0bc4aad | df290d57e06afa36cf9b33494b21ad3dcd62de8f | /pivo-dao/src/main/java/pe/com/tintegro/connection/SICConnection.java | 8ec5d905d3f3ebc59557f44eca0d4c61d72fc808 | [] | no_license | vgaray/sic-tintegro | ac766f28f0c8769fe8efb63498bc2f4e5ecf1500 | ddb62bdaafe1d6d136c32a758e51eca92dcf365b | refs/heads/master | 2022-12-21T15:14:06.168702 | 2019-09-30T02:09:35 | 2019-09-30T02:09:35 | 211,740,401 | 0 | 0 | null | 2022-12-16T07:46:49 | 2019-09-29T23:40:44 | Java | UTF-8 | Java | false | false | 2,096 | java | package pe.com.tintegro.connection;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.dbcp2.ConnectionFactory;
import org.apache.commons.dbcp2.PoolableConnection;
import org.apache.commons.dbcp2.PoolableConnectionFactory;
import org.apache.commons.dbcp2.PoolingDriver;
import org.apache.commons.pool2.ObjectPool;
import org.apache.commons.pool2.impl.GenericObjectPool;
public class SICConnection
{
private static List<String> ipList;
private static SICConnection INSTANCE;
private SICConnection(){}
public static Connection getInstance(String user, String password, String IP, String port, String database) throws Exception
{
Connection connection = null;
if (INSTANCE == null)
{
INSTANCE = new SICConnection();
ipList = new ArrayList<>();
}
boolean existIP = ipList.contains(IP);
if (!existIP)
{
String URI = String.format("jdbc:postgresql://%s:%s/%s", IP, port, database);
// 1. Registra el driver en la propiedad jdbc.driver de java
PoolConnectionFactory.registerJDBCDriver(PoolConnectionFactory.POSTGRESQL_DRIVER);
// 2. Crea el Connection Factory (DriverManagerConnectionFactory)
ConnectionFactory connectionFactory = PoolConnectionFactory.getConnFactory(URI, user, password);
// 3. Instancia el factory de pool de objetos
PoolableConnectionFactory poolfactory = new PoolableConnectionFactory(connectionFactory, null);
// 4. Crea el pool con PoolableConnection objects
ObjectPool<PoolableConnection> connectionPool = new GenericObjectPool<PoolableConnection>(poolfactory);
// 5. Establece el pool para imponer la asociacion (evita errores)
poolfactory.setPool(connectionPool);
// 6. Obtiene el driver del pool y lo registra
PoolingDriver dbcpDriver = PoolConnectionFactory.getDBCPDriver();
dbcpDriver.registerPool(String.format("sic-dbcp-%s", IP), connectionPool);
ipList.add(IP);
}
connection = DriverManager.getConnection(String.format("jdbc:apache:commons:dbcp:sic-dbcp-%s", IP));
return connection;
}
}
| [
"victorgaray1296.vg@gmail.com"
] | victorgaray1296.vg@gmail.com |
bd8e3d522fd4174dfe8d309e117ccd8490bdab38 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/7/7_9a4f51e4a8724c3d0c8b04622b1f4db411cc9651/FailedTests/7_9a4f51e4a8724c3d0c8b04622b1f4db411cc9651_FailedTests_s.java | 5417c2a9901c3a086a670ccb58d4e5556d44d7ea | [] | 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 | 715 | java | import java.io.IOException;
import org.instructionexecutor.FunRbTreeTest;
import org.instructionexecutor.InstructionTranslatorTest;
import org.junit.Test;
import org.suite.Suite;
import org.suite.doer.ProverConfig;
import org.suite.kb.RuleSet;
import org.suite.node.Node;
import org.suite.search.CompiledProverBuilder.CompiledProverBuilderLevel2;
import org.suite.search.ProverBuilder.Builder;
public class FailedTests {
// Type check take 11 seconds
@Test
public void test0() throws IOException {
new FunRbTreeTest().test();
}
// Strange error message "Unknown expression if b"
@Test
public void test1() throws IOException {
Suite.evaluateFun("if a then b", false);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
76e1f1c6b28286b436e191959c792805a2fa42c2 | c6f145685b7d5de6b4d9b9460edc9e52d54b9f81 | /test_cases/CWE259/CWE259_Hard_Coded_Password__keyStoreGetKey/CWE259_Hard_Coded_Password__keyStoreGetKey_67b.java | 7dd4d7cf5cc2a66598e2d156147ccd960a39f844 | [] | no_license | Johndoetheone/new-test-repair | 531ca91dab608abd52eb474c740c0a211ba8eb9f | 7fa0e221093a60c340049e80ce008e233482269c | refs/heads/master | 2022-04-26T03:44:51.807603 | 2020-04-25T01:10:47 | 2020-04-25T01:10:47 | 258,659,310 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,022 | java | /*
* TEMPLATE GENERATED TESTCASE FILE
* @description
* CWE: 259 Hard Coded Password
* BadSource: hardcodedPassword Set data to a hardcoded string
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
* */
package test_cases.CWE259.CWE259_Hard_Coded_Password__keyStoreGetKey;
import testcasesupport.*;
import java.util.Arrays;
import java.util.Properties;
import java.util.logging.Level;
import java.io.*;
import java.security.Key;
import java.security.KeyStore;
public class CWE259_Hard_Coded_Password__keyStoreGetKey_67b
{
public void badSink(CWE259_Hard_Coded_Password__keyStoreGetKey_67a.Container dataContainer) throws Throwable
{
String data = dataContainer.containerOne;
if (data != null)
{
try
{
KeyStore keystore = KeyStore.getInstance("JKS");
Key key = keystore.getKey("alias", data.toCharArray());
IO.writeLine(key.toString());
}
catch (Exception e)
{
IO.logger.log(Level.WARNING, "Unknown error", e);
}
}
}
public void goodG2BSink(CWE259_Hard_Coded_Password__keyStoreGetKey_67a.Container dataContainer) throws Throwable
{
String data = dataContainer.containerOne;
if (data != null)
{
try
{
KeyStore keystore = KeyStore.getInstance("JKS");
Key key = keystore.getKey("alias", data.toCharArray());
IO.writeLine(key.toString());
}
catch (Exception e)
{
IO.logger.log(Level.WARNING, "Unknown error", e);
}
}
}
public void goodCharSink(CWE259_Hard_Coded_Password__keyStoreGetKey_67a.ContainerTwo dataContainer) throws Throwable
{
char[] data = dataContainer.containerOne;
if (data != null)
{
try
{
KeyStore keystore = KeyStore.getInstance("JKS");
Key key = keystore.getKey("alias", data);
IO.writeLine(key.toString());
}
catch (Exception e)
{
IO.logger.log(Level.WARNING, "Unknown error", e);
}
/* Cleanup the password */
Arrays.fill(data, 'x');
}
}
public void goodExpectedSink(CWE259_Hard_Coded_Password__keyStoreGetKey_67a.ContainerThree dataContainer) throws Throwable
{
Properties properties = dataContainer.containerOne;
if (properties != null)
{
try
{
KeyStore keystore = KeyStore.getInstance("JKS");
Key key = keystore.getKey("alias", properties.getProperty("password").toCharArray());
IO.writeLine(key.toString());
}
catch (Exception e)
{
IO.logger.log(Level.WARNING, "Unknown error", e);
}
}
}
} | [
"root@Delta.localdomain"
] | root@Delta.localdomain |
64e65ece4d8667232fad851d6b1c8b53434499c6 | 5f79cada0986856ea165068a433757fc03725ce5 | /src/main/java/org/bouncycastle2/jce/interfaces/ElGamalPublicKey.java | f26fb5536a4aff73c3b04f5e7db2b3f2609110b0 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | votingsystem/votingsystem-android-bouncycastle | 4ab973bf873580ea67f6d891c70b0a4ac11be20d | e50d48400893e2d9847e75ed3bcecb8fe416f0d4 | refs/heads/master | 2020-12-10T21:26:57.110743 | 2016-09-10T18:14:08 | 2016-09-10T18:14:08 | 34,624,496 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package org.bouncycastle2.jce.interfaces;
import java.math.BigInteger;
import java.security.PublicKey;
public interface ElGamalPublicKey
extends ElGamalKey, PublicKey
{
public BigInteger getY();
}
| [
"jgzornoza@gmail.com"
] | jgzornoza@gmail.com |
7099d6c4d3bc3c8f7600b03b7771c7bd607a6073 | 926a628796557c976c4a558a8999b3c1925f62d5 | /domino-api/src/main/java/com/boot/controller/InitController.java | 76c189b9fdb36475a42cece35645969a0c227bca | [] | no_license | cubemoon/domino | 7f4557b04ae5730be92edbd9b19389dd180c5d89 | c7c490e8f7547e13ac6cd8fa344819a4d8625667 | refs/heads/master | 2023-04-15T22:36:18.587446 | 2019-08-01T03:15:43 | 2019-08-01T03:15:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 692 | java | package com.boot.controller;
import com.boot.config.AppConfig;
import com.jule.domino.base.service.ItemServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PostConstruct;
/**
* 初始化服务
*
* @author
*
* @since 2018/7/19 15:07
*
*/
@RestController
public class InitController extends AbstractController{
@Autowired
private AppConfig appConfig;
@PostConstruct
public void init(){
log.info("初始化启动");
//TODO 需要初始化加載項
ItemServer.OBJ.init(appConfig.getItemServer(), appConfig.getGameId());
}
}
| [
"xiaokang_0826@163.com"
] | xiaokang_0826@163.com |
eccb9df96e49d6528dee39bf41bada7b7d431561 | 01f42cfde33bca228d2bbe4c82818f39a353a57e | /10. Sboj-workshop/Sboj-workshop/src/main/java/service/UserServiceImpl.java | 5480ccf66d8301b7701f46b457ed011c327ea288 | [] | no_license | vdjalov/Java-Web | 31f43518d0f3437179d7848247e036311ba3bea9 | db8a629023cba586978025772f6266e39b9f8fa6 | refs/heads/master | 2022-07-05T01:55:02.466511 | 2020-01-24T17:55:52 | 2020-01-24T17:55:52 | 228,460,601 | 0 | 0 | null | 2022-06-21T02:39:44 | 2019-12-16T19:32:35 | Java | UTF-8 | Java | false | false | 2,662 | java | package service;
import java.io.IOException;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import org.modelmapper.ModelMapper;
import context.SessionContext;
import domain.entity.User;
import domain.model.service.UserServiceModel;
import repository.UserRepository;
import utils.UserValidation;
import utils.ValidationUtils;
public class UserServiceImpl implements UserService {
private ModelMapper modelMapper;
private UserRepository userRepository;
private HashingService hashingService;
private ValidationUtils validationUtils;
private UserValidation userValidation;
private SessionContext context;
private ServletRequest request;
@Inject
public UserServiceImpl(ModelMapper modelMapper, UserRepository userRepository, HashingService hashingService,
ValidationUtils validationUtils, UserValidation userValidation, SessionContext context, ServletRequest request) {
this.modelMapper = modelMapper;
this.userRepository = userRepository;
this.hashingService = hashingService;
this.validationUtils = validationUtils;
this.userValidation = userValidation;
this.context = context;
this.request = request;
}
@Override
public void saveUser(UserServiceModel userServiceModel) throws IOException {
if(this.userValidation.checkUserPassword(userServiceModel)) {
String hashedPassword = this.hashingService.hashPassword(userServiceModel.getPassword());
userServiceModel.setPassword(hashedPassword);
User user = this.modelMapper.map(userServiceModel, User.class);
if(this.validationUtils.isValid(user) && this.userValidation.checkDuplicateUser(user)) {
FacesContext.getCurrentInstance().addMessage("register", new FacesMessage("Success")); // Not working check how to properly do it!
this.userRepository.createUser(user);
this.context.redirect("login");
}
}
}
@Override
public void verifyLogin(String username, String password) throws IOException {
if(this.userRepository.veryfyUserLogin(username, password).size() > 0) {
HttpServletRequest req = (HttpServletRequest) this.request;
req.setAttribute("username", username);
FacesContext.getCurrentInstance()
.getExternalContext()
.getSessionMap()
.put("username", username);
this.context.redirect("home");
} else {
// Display unable to log in message
String message = "Username or password are incorrect.";
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(message));
}
}
}
| [
"vdjalov@gmail.com"
] | vdjalov@gmail.com |
8e98ed419020d4275477735cef8a9b7f0ae5ee61 | 98190029d1de72d493e6a730ff4607a50a858946 | /src/main/java/l2d/game/serverpackets/CharSelected.java | 7bb31482aac538092e74aecaac63cf47d98eb800 | [] | no_license | iBezneR/interlude | e9777e24330b0342c2657eee8ada7914cfd6d1d0 | 764c889874034cf04d8e7b67792d705bee4ef719 | refs/heads/master | 2023-03-02T13:48:24.884131 | 2018-08-29T09:37:41 | 2018-08-29T09:37:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,196 | java | package l2d.game.serverpackets;
import l2d.game.GameTimeController;
import l2d.game.model.L2Player;
import l2d.util.Location;
public class CharSelected extends L2GameServerPacket
{
// SdSddddddddddffddddddddddddddddddddddddddddddddddddddddd d
private int _sessionId, char_id, clan_id, sex, race, class_id;
private String _name, _title;
private Location _loc;
private double curHp, curMp;
private int _sp, level, karma, _int, _str, _con, _men, _dex, _wit;
private long _exp;
public CharSelected(final L2Player cha, final int sessionId)
{
_sessionId = sessionId;
_name = cha.getName();
char_id = cha.getObjectId(); //FIXME 0x00030b7a ??
_title = cha.getTitle();
clan_id = cha.getClanId();
sex = cha.getSex();
race = cha.getRace().ordinal();
class_id = cha.getClassId().getId();
_loc = cha.getLoc();
curHp = cha.getCurrentHp();
curMp = cha.getCurrentMp();
_sp = cha.getSp();
_exp = cha.getExp();
level = cha.getLevel();
karma = cha.getKarma();
_int = cha.getINT();
_str = cha.getSTR();
_con = cha.getCON();
_men = cha.getMEN();
_dex = cha.getDEX();
_wit = cha.getWIT();
}
@Override
protected final void writeImpl()
{
writeC(0x15);
writeS(_name);
writeD(char_id);
writeS(_title);
writeD(_sessionId);
writeD(clan_id);
writeD(0x00); //??
writeD(sex);
writeD(race);
writeD(class_id);
writeD(0x01); // active ??
writeD(_loc.x);
writeD(_loc.y);
writeD(_loc.z);
writeF(curHp);
writeF(curMp);
writeD(_sp);
writeQ(_exp);
writeD(level);
writeD(karma); //?
writeD(0x0); //?
writeD(_int);
writeD(_str);
writeD(_con);
writeD(_men);
writeD(_dex);
writeD(_wit);
for(int i = 0; i < 30; i++)
writeD(0x00);
writeD(0x00); //c3 work
writeD(0x00); //c3 work
// extra info
writeD(GameTimeController.getInstance().getGameTime()); // in-game time
writeD(0x00); //
writeD(0x00); //c3
writeD(0x00); //c3 InspectorBin
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3 InspectorBin for 528 client
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3
writeD(0x00); //c3
}
} | [
"vadim.didenko84@gmail.com"
] | vadim.didenko84@gmail.com |
272f61740f9be1c6832a596b28fd671c68491efa | 7e0ebf2fc9010e569698e9a4c502a8e53f4454c5 | /src/main/java/me/reb4ck/hyperskills/commands/AbilitiesListCommand.java | 3a0e02b943a88dbcf1057685b91ea235deb6cc84 | [] | no_license | EnZiiK/HyperSkills | e6b1dab3f869ceddb012500ab82dbedaeebf5c20 | 83f0f79d1bcf92a97065255278656707194d0c78 | refs/heads/master | 2023-05-31T06:46:42.281875 | 2021-06-29T06:13:21 | 2021-06-29T06:13:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,353 | java | package me.reb4ck.hyperskills.commands;
import me.reb4ck.hyperskills.HyperSkills;
import me.reb4ck.hyperskills.objects.abilities.Ability;
import me.reb4ck.hyperskills.utils.StringUtils;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Collections;
import java.util.List;
public class AbilitiesListCommand extends HyperCommand {
public AbilitiesListCommand() {
super(Collections.singletonList("abilitylist"), "To view available abilities", "ultraskills.abilitylist", true, "/Skills abilitylist");
}
@Override
public void execute(CommandSender sender, String[] args) {
Player p = (Player) sender;
if (args.length == 1) {
p.sendMessage(StringUtils.color("&6&lAbilities List"));
for(Ability ability : Ability.values())
p.sendMessage(StringUtils.color("&7- &e"+ability.getName()));
p.sendMessage("");
} else {
p.sendMessage(StringUtils.color(HyperSkills.getInstance().getMessages().getMessage("invalidArguments").replace("%prefix%", HyperSkills.getInstance().getConfiguration().prefix)));
}
}
@Override
public List<String> onTabComplete(CommandSender commandSender, org.bukkit.command.Command command, String label, String[] args) {
return null;
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
3f35dfe6db57fc9b7309f2aa520f4b2cfa9ca0a3 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/9/9_a158c6883dbfc0fcd532d4586f56925820f7c3b9/PlainImporterBase/9_a158c6883dbfc0fcd532d4586f56925820f7c3b9_PlainImporterBase_s.java | 80f95d476ae4343d18893a06b7f6bfbba153e9c4 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 7,365 | java | // Copyright MWC 1999, Debrief 3 Project
// $RCSfile: PlainImporterBase.java,v $
// @author $Author: ian.mayo $
// @version $Revision: 1.7 $
// $Log: PlainImporterBase.java,v $
// Revision 1.7 2007/06/01 13:46:06 ian.mayo
// Improve performance of export text to clipboard
//
// Revision 1.6 2006/05/24 14:46:02 Ian.Mayo
// Reflect change in exportThis method (return string exported)
//
// Revision 1.5 2005/05/18 09:13:51 Ian.Mayo
// Tidy javadoc
//
// Revision 1.4 2005/05/12 09:47:10 Ian.Mayo
// Refactor, to make it easier to over-ride
//
// Revision 1.3 2005/05/12 08:12:46 Ian.Mayo
// Lots of eclipse-style tidying, add handler for not able to find file in order to count lines
//
// Revision 1.2 2004/05/24 16:24:38 Ian.Mayo
// Commit updates from home
//
// Revision 1.1.1.1 2004/03/04 20:31:27 ian
// no message
//
// Revision 1.1.1.1 2003/07/17 10:07:51 Ian.Mayo
// Initial import
//
// Revision 1.2 2002-05-28 09:26:06+01 ian_mayo
// after switch to new system
//
// Revision 1.1 2002-05-28 09:13:56+01 ian_mayo
// Initial revision
//
// Revision 1.1 2002-04-11 13:03:25+01 ian_mayo
// Initial revision
//
// Revision 1.3 2001-08-17 07:55:46+01 administrator
// Clear up memory leak
//
// Revision 1.2 2001-08-06 12:43:26+01 administrator
// Add method to count lines in file (used in support of progress monitor)
//
// Revision 1.1 2001-08-01 20:09:03+01 administrator
// Create object to return list of layers - hey, we may want to use it!
//
// Revision 1.0 2001-07-17 08:42:46+01 administrator
// Initial revision
//
// Revision 1.1 2001-01-03 13:41:35+00 novatech
// Initial revision
//
// Revision 1.1.1.1 2000/12/12 21:52:10 ianmayo
// initial version
//
package MWC.Utilities.ReaderWriter;
import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;
import MWC.GUI.*;
/**
* class to provide general (non file-type specific) for importing a whole file.
* The class performs layers management tasks
*/
public abstract class PlainImporterBase implements PlainImporter
{
// //////////////////////////////////////
// member variables
// //////////////////////////////////////
/**
* the layers object being created/extended in this process
*/
private Layers _theLayers;
/**
* the suffixes which we import with this import manager (set by the
* instantiation)
*/
protected String[] _myTypes;
/** the block of text we're collating
*
*/
private StringBuffer _beingExported;
// //////////////////////////////////////
// member methods
// //////////////////////////////////////
/**
* general command used to import a whole file of a specific type
*/
public void importThis(String fName, java.io.InputStream is, Layers theData)
{
_theLayers = theData;
importThis(fName, is);
// ok, forget about the layers object now that we're finished
_theLayers = null;
}
abstract public void importThis(String fName, java.io.InputStream is);
/**
* create a new layer in the data using this name
*
* @return the new layer
*/
public Layer createLayer(String theName)
{
Layer res = new BaseLayer();
res.setName(theName);
return res;
}
/**
* add the specified layer to our data
*/
public void addLayer(Layer theLayer)
{
// add it to the manager
_theLayers.addThisLayer(theLayer);
}
/**
* retrieve the layer of the given name (and create it if necessary)
*
* @return the requested layer, or null if not found
*/
public Layer getLayerFor(String theName)
{
Layer theLayer = _theLayers.findLayer(theName);
return theLayer;
}
/**
* add the provided data item to the indicated layer, creating the layer if
* necessary
*/
public void addToLayer(Plottable theItem, Layer theLayer)
{
// add this item to the layer
theLayer.add(theItem);
}
/**
* signal problem importing data
*/
public void readError(String fName, int line, String msg, String thisLine)
{
String res = "Problem reading in " + fName + " at line " + line;
res = res + ", " + msg + ":" + thisLine;
MWC.GUI.Dialogs.DialogFactory.showMessage("Import Error", res);
}
/**
* provide setter function for the layers object
*/
public void setLayers(Layers theData)
{
_theLayers = theData;
}
/**
* get the layers object we are editing
*/
protected Layers getLayers()
{
return _theLayers;
}
public int countLinesFor(String fName)
{
int counter = 0;
try
{
// see if we can find the required file
File findIt = new File(fName);
if (findIt.exists())
{
java.io.InputStream is = new java.io.FileInputStream(fName);
counter = countLinesInStream(is);
is.close();
}
else
{
System.err.println("Can't find input file:" + fName);
}
}
catch (Exception e)
{
e.printStackTrace();
}
return counter;
}
/**
* @param is
* @return
* @throws IOException
*/
public int countLinesInStream(java.io.InputStream is) throws IOException
{
int counter = 0;
java.io.InputStreamReader ir = new java.io.InputStreamReader(is);
java.io.BufferedReader br = new java.io.BufferedReader(ir);
String line = br.readLine();
while (line != null)
{
counter++;
line = br.readLine();
}
br.close();
ir.close();
return counter;
}
/** get everything ready for the export
*
* @param item
*/
public void startExport(Plottable item)
{
java.awt.datatransfer.Clipboard cl = java.awt.Toolkit.getDefaultToolkit()
.getSystemClipboard();
// see if there is currently text on the cliboard
// since we will 'add' rather than 'replace' it if so.
java.awt.datatransfer.Transferable tr = cl.getContents(this);
// was there anything on the clipboard?
if (tr != null)
{
if (tr.isDataFlavorSupported(java.awt.datatransfer.DataFlavor.stringFlavor))
{
try
{
// get the current contents
Object oj = tr.getTransferData(java.awt.datatransfer.DataFlavor.stringFlavor);
_beingExported = new StringBuffer((String) oj);
}
catch (Exception e)
{
MWC.Utilities.Errors.Trace.trace(e);
}
}
else
{
// don't bother, lets just put the string on the clipboard
}
}
}
/**
* ok, we've build up our string to export. put it on the clipboard
*
* @param item
*/
public void endExport(Plottable item)
{
// get the clipboard;
java.awt.datatransfer.Clipboard cl = Toolkit.getDefaultToolkit().getSystemClipboard();
// create the string to write
java.awt.datatransfer.StringSelection ss = new java.awt.datatransfer.StringSelection(
_beingExported.toString());
// dump it on there.
cl.setContents(ss, ss);
}
/** append this line to what we're building up
*
* @param txt
*/
protected void addThisToExport(String txt)
{
_beingExported.append('\n');
_beingExported.append(txt);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
c3b1a1feb0d046349253567141b119fd9c0f56cc | 0c993ac3c8ac60aa0765561530959feb9847c0a3 | /geek-spring-part-two-19/shop-picture-service-app/src/test/java/ru/geekbrains/ShopPictureServiceAppApplicationTests.java | fdeae9ba6f2e913b4aeb762d6013f813cbfc8b7f | [] | no_license | D1mkaGit/GeekBrains | 0b96bb871b70708e6ad3f8f7ca74ad3908d9205e | a638f697e3380c2c1461156fa8b8153f825f220e | refs/heads/master | 2023-04-06T06:47:20.423827 | 2022-12-25T19:31:18 | 2022-12-25T19:31:18 | 221,762,240 | 1 | 1 | null | 2023-03-24T01:17:50 | 2019-11-14T18:30:42 | Java | UTF-8 | Java | false | false | 161 | java | package ru.geekbrains;
import org.junit.jupiter.api.Test;
//@SpringBootTest
class ShopPictureServiceAppApplicationTests {
@Test
void contextLoads() {
}
}
| [
"30922998+D1mkaGit@users.noreply.github.com"
] | 30922998+D1mkaGit@users.noreply.github.com |
3153d945b9c8559cfd5258085473184870d87375 | 842857cb89ecc4a5f0ef0323e652aa4c90e347a4 | /uml/dependency/src/test/java/br/com/studies/uml/dependency/Report.java | cb6ae15c23a8f4734212616ee31764cd2b7bd68a | [] | no_license | r3wa/my-studies | 964fde36f7c35ef7c7974f7a535a22f557344b5c | 65197c11e62189158021d00209dcc9c9ae1f482c | refs/heads/master | 2020-12-11T07:17:29.496206 | 2013-07-30T11:51:29 | 2013-07-30T11:51:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 367 | java | /**
*
*/
package br.com.studies.uml.dependency;
/**
*
* This interface don't have relation with ReportPrint
*
* @author rduarte
*
*
* @see <a href='http://refcardz.dzone.com/assets/download/refcard/2bfde79c85c0c1ee91a91c273c36fc3d/rc112-010d-uml.pdf'>Refcard about UML</a>
*
*/
public interface Report {
public void report();
}
| [
"robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531"
] | robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531 |
3ec7b2263434b87c4db5fa6812e3db2e94eaba58 | 2529e8040ca696fe665227ea551c20d0479c4f07 | /src/main/java/net/simpleframework/common/AlgorithmUtils.java | 3a5c0bf2accf415657c700edcf584cef0cac1a12 | [] | no_license | toinfinity/simple-common | 38bc3363118c74612b6f236ff0e66d63c0fb91bc | 98c3e2b7add307ba79c6fcb90ebea07a5e19b200 | refs/heads/master | 2021-01-15T14:59:04.923879 | 2015-11-16T08:14:19 | 2015-11-16T08:14:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,993 | java | package net.simpleframework.common;
import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Licensed under the Apache License, Version 2.0
*
* @author 陈侃(cknet@126.com, 13910090885) https://github.com/simpleframework
* http://www.simpleframework.net
*/
public abstract class AlgorithmUtils {
public static byte[] base64Decode(final String encoded) {
return encoded == null ? null : Base64.decode(encoded);
}
public static String base64Encode(final byte[] binaryData) {
return binaryData == null ? null : Base64.encodeToString(binaryData);
}
static final int BUFFER = 8 * 1024;
public static String md(final InputStream inputStream, final String algorithm)
throws IOException {
if (inputStream == null) {
return null;
}
try {
final MessageDigest digest = MessageDigest.getInstance(algorithm);
final byte[] buf = new byte[BUFFER];
for (;;) {
final int numRead = inputStream.read(buf);
if (numRead == -1) {
break;
}
digest.update(buf);
}
return StringUtils.encodeHex(digest.digest());
} catch (final NoSuchAlgorithmException e) {
return null;
}
}
public static String md5Hex(final InputStream inputStream) throws IOException {
return md(inputStream, "MD5");
}
public static String md(final byte[] bytes, final String algorithm) {
try {
final MessageDigest digest = MessageDigest.getInstance(algorithm);
digest.update(bytes);
return StringUtils.encodeHex(digest.digest());
} catch (final NoSuchAlgorithmException e) {
return null;
}
}
public static String md5Hex(final byte[] bytes) {
return md(bytes, "MD5");
}
public static String md5Hex(final String message) {
return md5Hex(message.getBytes());
}
public static String sha1Hex(final byte[] bytes) {
return md(bytes, "SHA1");
}
public static String sha1Hex(final String message) {
return sha1Hex(message.getBytes());
}
}
| [
"cknet@126.com"
] | cknet@126.com |
e81917ac5776e2312c4288a8392b9dcdacb3b097 | a8de4bf8b1b6f3fe7214d8cf0de2036eab49a91f | /land-management-assist/.history/src/main/java/com/xz/landmanagementassist/domain/dto/admin/UserDTO_20210318212504.java | ad734aa16027d13f11efc0b346e0183220e9551d | [] | no_license | xuzhu2017/land-management-assist | cb384430373fd2b09d67b9a3857927989f1c5a42 | c0d4a3625d3ca4e92451be42b3548c9dde577b11 | refs/heads/master | 2023-04-15T19:54:16.148789 | 2021-05-07T07:04:11 | 2021-05-07T07:04:11 | 333,630,288 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,101 | java | package com.xz.landmanagementassist.domain.dto.admin;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import com.xz.landmanagementassist.domain.dto.base.BaseDTO;
/**
* 用户DTO
*
* @author xuzhu
* @Date 2021-1-29 10:09:44
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class UserDTO extends BaseDTO {
/**
* 用户名
*/
@NotEmpty(message = "用户名不能为空")
private String username;
/**
* 密码
*/
private String password;
/**
* Salt for encoding.
*/
private String salt;
/**
* 真实姓名
*/
private String name;
/**
* 手机号码
*/
private String phone;
/**
* 逻辑删除
*/
private boolean deleted;
/**
* 用户拥有的角色列表
*/
private List<AdminRoleDTO> roleList;
}
| [
"a753090302@163.com"
] | a753090302@163.com |
83b21ff3cec12479d62d129ebcf415fc981b37ab | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/3/3_28b89ec7c04b03a6db95611e92d653fd9ad99d36/TedPopupMenu/3_28b89ec7c04b03a6db95611e92d653fd9ad99d36_TedPopupMenu_s.java | 59df574c777ab493482d38a15cc64000ff1a4717 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,318 | java | package ted;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.util.Vector;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
/**
* TED: Torrent Episode Downloader (2005 - 2006)
*
* This is the mainwindow of ted
* It shows all the shows with their urls, status and more and includes menus
* and buttons for the user to interact with ted.
*
* @author Roel
* @author Joost
*
* ted License:
* This file is part of ted. ted and all of it's parts are licensed
* under GNU General Public License (GPL) version 2.0
*
* for more details see: http://en.wikipedia.org/wiki/GNU_General_Public_License
*
*/
import ted.ui.editshowdialog.EditShowDialog;
/**
* @author Joost
* The TedPopupMenu receives a Vector of TedPopupItems. These menu items are seperated by
* type and shown in the popup menu. After selecting an item the action that has to be
* done is determined by the type the menu item has.
*
*/
public class TedPopupMenu extends JPopupMenu implements ActionListener
{
private static final long serialVersionUID = 1L;
private Vector allItems = new Vector();
private Vector search = new Vector();
private Vector category = new Vector();
private Vector general = new Vector();
private TedPopupItem help;
private TedPopupItem empty;
private EditShowDialog dialog;
/**
* Constructs a new TedPopupMenu
* @param v The vector containing the JPopupItems
* @param dialog2 The Episode Dialog that initialized this menu
*/
public TedPopupMenu(EditShowDialog dialog2, Vector v)
{
dialog = dialog2;
// make a copy determine which action has to be done later on
this.allItems = v;
// divide the vector in groups
this.divideMenu(allItems);
// add the "add empty" item
String s = Lang.getString("TedEpisodeDialog.FeedsTable.UserDefined");
JMenuItem item = new JMenuItem(s);
item.addActionListener(this);
item.setActionCommand(s);
this.add(item);
this.addSeparator();
// add the groups to the menu (divided by a seperator)
this.setMenu(search);
this.setMenu(category);
this.setMenu(general);
try
{
// retrieve help item text
s = Lang.getString("TedEpisodeDialog.Help");
}
catch(Exception e)
{
// no help item was available in the vector
s = Lang.getString("TedEpisodeDialog.NoHelp");
}
// add help item to menu
item = new JMenuItem(s);
item.addActionListener(this);
item.setActionCommand(item.getName());
this.add(item);
}
/**
* Divides the given vector in groups based on the type of the
* JPopupItem
*/
private void divideMenu(Vector v)
{
TedPopupItem item;
for(int i=0; i<v.size(); i++)
{
item = (TedPopupItem)v.get(i);
if(item.getType()==TedPopupItem.IS_SEARCH_BASED)
search.add(item);
else if(item.getType()==TedPopupItem.IS_CATEGORY_BASED)
category.add(item);
else if(item.getType()==TedPopupItem.IS_GENERAL_FEED)
general.add(item);
else if(item.getType()==TedPopupItem.IS_HELP)
help = item;
else if(item.getType()==TedPopupItem.IS_EMPTY)
empty = item;
}
}
/**
* Add the items from the vector to the menu
*/
private void setMenu(Vector v)
{
if(v.size()!=0)
{
JMenuItem item;
for(int i=0; i<v.size(); i++)
{
TedPopupItem pi = (TedPopupItem)v.get(i);
item = new JMenuItem(pi.getName());
item.addActionListener(this);
item.setActionCommand(pi.getName());
this.add(item);
}
this.addSeparator();
}
}
public void actionPerformed(ActionEvent arg0)
{
TedPopupItem item;
String action = arg0.getActionCommand();
for(int i=0; i<allItems.size(); i++)
{
item = (TedPopupItem)allItems.get(i);
if(item.getName().equals(action))
{
if(item.getType()==TedPopupItem.IS_SEARCH_BASED)
this.openOptionDialog(item.getUrl(), item.getWebsite(), item.getType());
else if(item.getType()==TedPopupItem.IS_CATEGORY_BASED)
this.openUrl(item.getUrl());
else if(item.getType()==TedPopupItem.IS_GENERAL_FEED)
this.openOptionDialog(item.getUrl(), item.getWebsite(), item.getType());
else if(item.getType()==TedPopupItem.IS_HELP)
this.openUrl(item.getUrl());
else if(item.getType()==TedPopupItem.IS_EMPTY)
dialog.addFeed();
return;
}
}
}
private void openUrl(String url)
{
try
{
BrowserLauncher.openURL(url);
}
catch (IOException e)
{
e.printStackTrace();
}
}
private void openOptionDialog(String url, String website, int type)
{
String question;
// decide which question has to be shown
if(type==TedPopupItem.IS_SEARCH_BASED)
question = Lang.getString("TedEpisodeDialog.DialogFindSearch");
else
question = Lang.getString("TedEpisodeDialog.DialogFindGeneral");
// show question dialog
Object[] options = { Lang.getString("TedGeneral.Yes"), Lang.getString("TedGeneral.No"), Lang.getString("TedGeneral.Website") };
int selectedValue = JOptionPane.showOptionDialog(null,
question, Lang.getString("TedGeneral.Question"),
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
null, options, options[0]);
if(selectedValue == 0) //Yes
{
String name = dialog.getShowName();
if(!name.equals(""))
{
// do action based on type
if(type==TedPopupItem.IS_SEARCH_BASED)
url = url.replace("#NAME#", name); // add name to rss query
else if(type==TedPopupItem.IS_GENERAL_FEED)
dialog.addKeywords(name); // use general feeds combined with keywords
dialog.addFeed(url);
}
else
{
JOptionPane.showMessageDialog(null, Lang.getString("TedEpisodeDialog.DialogFindError"));
}
}
else if(selectedValue == 1) //No
{ }
else if(selectedValue == 2) //Go to website
{
this.openUrl(website);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
e0276466309241cd2aef6b85253e784e8799289d | 6e3f5c2d0c5e6ce2ad3660e6e4b3fd711e39b828 | /demo-base/src/main/java/com/demo/base/example/redis/service/impl/RedPackServiceImpl.java | 9d386f20f26599aa537a826a0842dfc574d7d426 | [] | no_license | Alisurice/web-shop-demo | 4ffb7bc44d0a17966b8d54fdec2be708ab5ac0fc | 73d1cb90409604be982a579c2e8cbe590b6c1acb | refs/heads/master | 2023-07-15T23:56:50.614460 | 2021-09-03T04:22:02 | 2021-09-03T04:24:04 | 396,676,980 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 796 | java | package com.demo.base.example.redis.service.impl;
import com.demo.base.example.redis.dao.RedPackDao;
import com.demo.base.example.redis.service.RedPackService;
import com.demo.mbg.mapper.TRedPacketMapper;
import com.demo.mbg.model.TRedPacket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class RedPackServiceImpl implements RedPackService {
@Autowired
private RedPackDao redPackDao = null;
@Autowired
private TRedPacketMapper tRedPacketMapper = null;
@Override
public TRedPacket getRedPacket(Integer id) {
return tRedPacketMapper.selectByPrimaryKey(id);
}
@Override
public int decreaseRedPacket(Integer id) {
return redPackDao.decreaseRedPack(id);
}
}
| [
"test"
] | test |
22a8f4fe1f2ef5fab09c37f14fb7161bceea8ef2 | 6e683d24ac5e4d154aad646c26dba71d0dd0dc7a | /library/core/src/main/java/com/google/android/exoplayer2/NoSampleRenderer.java | 45d6537b84f065166f8dba229431c69baef92958 | [
"Apache-2.0"
] | permissive | sridhard/ExoPlayer | ba9ab6ed2d7aa01ecc6fa4a1f68691b9167cf5c8 | f2e4287e75ee4ef26923f6892c28e867fc82cd80 | refs/heads/release-v2 | 2020-04-04T02:08:16.570928 | 2019-01-24T14:30:00 | 2019-01-24T14:30:00 | 155,690,358 | 0 | 1 | Apache-2.0 | 2018-12-20T05:17:16 | 2018-11-01T09:17:06 | Java | UTF-8 | Java | false | false | 7,943 | java | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.exoplayer2;
import android.support.annotation.Nullable;
import com.google.android.exoplayer2.source.SampleStream;
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.MediaClock;
import java.io.IOException;
/**
* A {@link Renderer} implementation whose track type is {@link C#TRACK_TYPE_NONE} and does not
* consume data from its {@link SampleStream}.
*/
public abstract class NoSampleRenderer implements Renderer, RendererCapabilities {
private RendererConfiguration configuration;
private int index;
private int state;
private SampleStream stream;
private boolean streamIsFinal;
@Override
public final int getTrackType() {
return C.TRACK_TYPE_NONE;
}
@Override
public final RendererCapabilities getCapabilities() {
return this;
}
@Override
public final void setIndex(int index) {
this.index = index;
}
@Override
public MediaClock getMediaClock() {
return null;
}
@Override
public final int getState() {
return state;
}
/**
* Replaces the {@link SampleStream} that will be associated with this renderer.
* <p>
* This method may be called when the renderer is in the following states:
* {@link #STATE_DISABLED}.
*
* @param configuration The renderer configuration.
* @param formats The enabled formats. Should be empty.
* @param stream The {@link SampleStream} from which the renderer should consume.
* @param positionUs The player's current position.
* @param joining Whether this renderer is being enabled to join an ongoing playback.
* @param offsetUs The offset that should be subtracted from {@code positionUs}
* to get the playback position with respect to the media.
* @throws ExoPlaybackException If an error occurs.
*/
@Override
public final void enable(RendererConfiguration configuration, Format[] formats,
SampleStream stream, long positionUs, boolean joining, long offsetUs)
throws ExoPlaybackException {
Assertions.checkState(state == STATE_DISABLED);
this.configuration = configuration;
state = STATE_ENABLED;
onEnabled(joining);
replaceStream(formats, stream, offsetUs);
onPositionReset(positionUs, joining);
}
@Override
public final void start() throws ExoPlaybackException {
Assertions.checkState(state == STATE_ENABLED);
state = STATE_STARTED;
onStarted();
}
/**
* Replaces the {@link SampleStream} that will be associated with this renderer.
* <p>
* This method may be called when the renderer is in the following states:
* {@link #STATE_ENABLED}, {@link #STATE_STARTED}.
*
* @param formats The enabled formats. Should be empty.
* @param stream The {@link SampleStream} to be associated with this renderer.
* @param offsetUs The offset that should be subtracted from {@code positionUs} in
* {@link #render(long, long)} to get the playback position with respect to the media.
* @throws ExoPlaybackException If an error occurs.
*/
@Override
public final void replaceStream(Format[] formats, SampleStream stream, long offsetUs)
throws ExoPlaybackException {
Assertions.checkState(!streamIsFinal);
this.stream = stream;
onRendererOffsetChanged(offsetUs);
}
@Override
public final SampleStream getStream() {
return stream;
}
@Override
public final boolean hasReadStreamToEnd() {
return true;
}
@Override
public final void setCurrentStreamFinal() {
streamIsFinal = true;
}
@Override
public final boolean isCurrentStreamFinal() {
return streamIsFinal;
}
@Override
public final void maybeThrowStreamError() throws IOException {
}
@Override
public final void resetPosition(long positionUs) throws ExoPlaybackException {
streamIsFinal = false;
onPositionReset(positionUs, false);
}
@Override
public final void stop() throws ExoPlaybackException {
Assertions.checkState(state == STATE_STARTED);
state = STATE_ENABLED;
onStopped();
}
@Override
public final void disable() {
Assertions.checkState(state == STATE_ENABLED);
state = STATE_DISABLED;
stream = null;
streamIsFinal = false;
onDisabled();
}
@Override
public boolean isReady() {
return true;
}
@Override
public boolean isEnded() {
return true;
}
// RendererCapabilities implementation.
@Override
public int supportsFormat(Format format) throws ExoPlaybackException {
return FORMAT_UNSUPPORTED_TYPE;
}
@Override
public int supportsMixedMimeTypeAdaptation() throws ExoPlaybackException {
return ADAPTIVE_NOT_SUPPORTED;
}
// PlayerMessage.Target implementation.
@Override
public void handleMessage(int what, @Nullable Object object) throws ExoPlaybackException {
// Do nothing.
}
// Methods to be overridden by subclasses.
/**
* Called when the renderer is enabled.
* <p>
* The default implementation is a no-op.
*
* @param joining Whether this renderer is being enabled to join an ongoing playback.
* @throws ExoPlaybackException If an error occurs.
*/
protected void onEnabled(boolean joining) throws ExoPlaybackException {
// Do nothing.
}
/**
* Called when the renderer's offset has been changed.
* <p>
* The default implementation is a no-op.
*
* @param offsetUs The offset that should be subtracted from {@code positionUs} in
* {@link #render(long, long)} to get the playback position with respect to the media.
* @throws ExoPlaybackException If an error occurs.
*/
protected void onRendererOffsetChanged(long offsetUs) throws ExoPlaybackException {
// Do nothing.
}
/**
* Called when the position is reset. This occurs when the renderer is enabled after
* {@link #onRendererOffsetChanged(long)} has been called, and also when a position
* discontinuity is encountered.
* <p>
* The default implementation is a no-op.
*
* @param positionUs The new playback position in microseconds.
* @param joining Whether this renderer is being enabled to join an ongoing playback.
* @throws ExoPlaybackException If an error occurs.
*/
protected void onPositionReset(long positionUs, boolean joining) throws ExoPlaybackException {
// Do nothing.
}
/**
* Called when the renderer is started.
* <p>
* The default implementation is a no-op.
*
* @throws ExoPlaybackException If an error occurs.
*/
protected void onStarted() throws ExoPlaybackException {
// Do nothing.
}
/**
* Called when the renderer is stopped.
* <p>
* The default implementation is a no-op.
*
* @throws ExoPlaybackException If an error occurs.
*/
protected void onStopped() throws ExoPlaybackException {
// Do nothing.
}
/**
* Called when the renderer is disabled.
* <p>
* The default implementation is a no-op.
*/
protected void onDisabled() {
// Do nothing.
}
// Methods to be called by subclasses.
/**
* Returns the configuration set when the renderer was most recently enabled.
*/
protected final RendererConfiguration getConfiguration() {
return configuration;
}
/**
* Returns the index of the renderer within the player.
*/
protected final int getIndex() {
return index;
}
}
| [
"olly@google.com"
] | olly@google.com |
23d0cd1a61e151a94fca0e36e69f8c8afb780e4c | afa1cfbfb813d80910c49df964ab36537b0d29db | /src/main/java/io/github/hako/application/web/rest/AuditResource.java | 4d3adf9c0079d4c6b15ed88a207345ffd3fe05b4 | [] | no_license | akiroussama/hako-blank-application | 784bd2624e5164f8fed21b8109c6088bfc0790cf | 2d35dcacb9efe48d29b872b56a78d144eb6ec38a | refs/heads/master | 2020-05-03T11:45:27.914802 | 2019-03-30T20:34:50 | 2019-03-30T20:34:50 | 178,608,571 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,994 | java | package io.github.hako.application.web.rest;
import io.github.hako.application.service.AuditEventService;
import io.github.hako.application.web.rest.util.PaginationUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.List;
/**
* REST controller for getting the audit events.
*/
@RestController
@RequestMapping("/management/audits")
public class AuditResource {
private final AuditEventService auditEventService;
public AuditResource(AuditEventService auditEventService) {
this.auditEventService = auditEventService;
}
/**
* GET /audits : get a page of AuditEvents.
*
* @param pageable the pagination information
* @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body
*/
@GetMapping
public ResponseEntity<List<AuditEvent>> getAll(Pageable pageable) {
Page<AuditEvent> page = auditEventService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
/**
* GET /audits : get a page of AuditEvents between the fromDate and toDate.
*
* @param fromDate the start of the time period of AuditEvents to get
* @param toDate the end of the time period of AuditEvents to get
* @param pageable the pagination information
* @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body
*/
@GetMapping(params = {"fromDate", "toDate"})
public ResponseEntity<List<AuditEvent>> getByDates(
@RequestParam(value = "fromDate") LocalDate fromDate,
@RequestParam(value = "toDate") LocalDate toDate,
Pageable pageable) {
Page<AuditEvent> page = auditEventService.findByDates(
fromDate.atStartOfDay(ZoneId.systemDefault()).toInstant(),
toDate.atStartOfDay(ZoneId.systemDefault()).plusDays(1).toInstant(),
pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
/**
* GET /audits/:id : get an AuditEvent by id.
*
* @param id the id of the entity to get
* @return the ResponseEntity with status 200 (OK) and the AuditEvent in body, or status 404 (Not Found)
*/
@GetMapping("/{id:.+}")
public ResponseEntity<AuditEvent> get(@PathVariable Long id) {
return ResponseUtil.wrapOrNotFound(auditEventService.find(id));
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
e877b519eea52ece90a5f48efdafe80b9ea66ead | b510f685c2ac71940a8a01e8148041bf43aa4e4f | /components/org.wso2.carbon.identity.application.authenticator.samlsso/src/main/java/org/wso2/carbon/identity/application/authenticator/samlsso/SAMLSSOConstants.java | 8ac7a82f75a46de011f87207e91ae6db9c29c195 | [
"Apache-2.0"
] | permissive | Kanapriya/saml-sso-outbound | 91b57d88a1d76731540b27b0bdf3f863cf5caa5d | e0575705be1084e1ee64ca9659acfd696394c15d | refs/heads/master | 2021-05-11T18:38:09.656129 | 2018-01-22T11:13:22 | 2018-01-22T11:13:22 | 117,832,819 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 861 | java | /*
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.wso2.carbon.identity.application.authenticator.samlsso;
public class SAMLSSOConstants {
public static final String COMMON_AUTH_LOGOUT = "commonAuthLogout";
}
| [
"you@example.com"
] | you@example.com |
42003de7e0c4855f403528ac0d39cfb11724387f | 52a9d1b5b55ce2159da00fbb2376f798ded4d0bd | /ClassWorks/Task6/src/ru/itis/Main.java | 41ea1cce4d47194cba1db3f741cf4194e05ddd74 | [] | no_license | MarselSidikov/JavaItis7 | 6dfaca0a26fc918fb87a425ad9806ba52d89cdad | 1f5b33be869c3b47cc9429554e88115fc498c44c | refs/heads/master | 2021-08-08T22:26:17.100720 | 2017-11-11T12:20:20 | 2017-11-11T12:20:20 | 106,092,098 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,006 | java | package ru.itis;
import java.io.InputStream;
import java.util.Scanner;
public class Main {
public static boolean isLetter(char c) {
if (c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z') {
return true;
} else {
return false;
}
}
public static boolean isDigit(char c) {
return (c >= '0' && c <= '9');
}
// '1' -> 1
// '8' -> 8
public static int convertToIntFromDigit(char c) {
// c = '1', код - 49
// '1' - '0' = 49 - 48 = 1
// c = '5', код - 53
// '5' - '0' = 53 - 48 = 5
return c - '0';
}
// ['2','3','1','6'] -> 2316
public static int parseNumber(char digits[]) {
int result = 0;
int pow = 1;
for (int i = digits.length - 1; i >= 0; i--) {
result = result + convertToIntFromDigit(digits[i]) * pow;
pow = pow * 10;
}
return result;
}
public static void main(String[] args) {
// создаем scanner, который будет считывать с консоли
Scanner scanner = new Scanner(System.in);
// просим пользователя ввести длину числа, которое он введет (сколько в нем цифр?)
int lengthNumber = scanner.nextInt();
// создаем массив символов для этого числа
char number[] = new char[lengthNumber];
// посимвольно считываем цифры числа
for (int i = 0; i < number.length; i++) {
// scanner.next() - возвращает строку
// charAt(0) - первый строки
number[i] = scanner.next().charAt(0);
}
// в итоге в массиве number будут цифры числа, введенных пользователем
int x = parseNumber(number);
System.out.println(x);
InputStream
}
}
| [
"sidikov.marsel@gmail.com"
] | sidikov.marsel@gmail.com |
d9d4c659f089cf951e93708f307d8bac0c1673b6 | 183732491ccf0693b044163c3eb9a0e657fcce94 | /phloc-commons-jdk5/src/test/java/com/phloc/commons/id/ComparatorHasSimpleLongIDTest.java | 3c822eaa31108abd868849ad90731b02a1ab4895 | [] | no_license | phlocbg/phloc-commons | 9b0d6699af33d67ee832c14e0594c97cef44c05d | 6f86abe9c4bb9f9f94fe53fc5ba149356f88a154 | refs/heads/master | 2023-04-23T22:25:52.355734 | 2023-03-31T18:09:10 | 2023-03-31T18:09:10 | 41,243,446 | 0 | 0 | null | 2022-07-01T22:17:52 | 2015-08-23T09:19:38 | Java | UTF-8 | Java | false | false | 2,204 | java | /**
* Copyright (C) 2006-2014 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* 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.phloc.commons.id;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Test;
import com.phloc.commons.collections.ContainerHelper;
import com.phloc.commons.compare.ESortOrder;
/**
* Test class for class {@link ComparatorHasSimpleLongID}.
*
* @author Philip Helger
*/
public final class ComparatorHasSimpleLongIDTest
{
@Test
public void testAll ()
{
final List <? extends IHasSimpleLongID> aList = ContainerHelper.newList (new MockHasSimpleLongID (5),
new MockHasSimpleLongID (3),
new MockHasSimpleLongID (7));
ContainerHelper.getSortedInline (aList, new ComparatorHasSimpleLongID <IHasSimpleLongID> ());
assertEquals (3, aList.get (0).getID ());
assertEquals (5, aList.get (1).getID ());
assertEquals (7, aList.get (2).getID ());
ContainerHelper.getSortedInline (aList, new ComparatorHasSimpleLongID <IHasSimpleLongID> (ESortOrder.ASCENDING));
assertEquals (3, aList.get (0).getID ());
assertEquals (5, aList.get (1).getID ());
assertEquals (7, aList.get (2).getID ());
ContainerHelper.getSortedInline (aList, new ComparatorHasSimpleLongID <IHasSimpleLongID> (ESortOrder.DESCENDING));
assertEquals (7, aList.get (0).getID ());
assertEquals (5, aList.get (1).getID ());
assertEquals (3, aList.get (2).getID ());
}
}
| [
"ph@phloc.com"
] | ph@phloc.com |
9edb0ecf392b187ca50a032fc9c3ec8deb5be467 | 84fbc1625824ba75a02d1777116fe300456842e5 | /Engagement_Challenges/Engagement_4/airplan_4/source/net/techpoint/server/manager/LogoutGuide.java | 3a9607d1bd286621295ab8464a8076fe036c3622 | [] | no_license | unshorn-forks/STAC | bd41dee06c3ab124177476dcb14a7652c3ddd7b3 | 6919d7cc84dbe050cef29ccced15676f24bb96de | refs/heads/master | 2023-03-18T06:37:11.922606 | 2018-04-18T17:01:03 | 2018-04-18T17:01:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 816 | java | package net.techpoint.server.manager;
import net.techpoint.server.WebSessionService;
import com.sun.net.httpserver.HttpExchange;
public class LogoutGuide extends AbstractHttpGuide {
private final WebSessionService webSessionService;
public static final String TRAIL = "/logout";
public static final String TITLE = "Logout";
public LogoutGuide(WebSessionService webSessionService) {
this.webSessionService = webSessionService;
}
@Override
public String obtainTrail() {
return TRAIL;
}
@Override
protected HttpGuideResponse handleGrab(HttpExchange httpExchange) {
// invalidate the cookies for this session and redirect to the "/" page
webSessionService.invalidateSession(httpExchange);
return takeDefaultRedirectResponse();
}
}
| [
"rborbely@cyberpointllc.com"
] | rborbely@cyberpointllc.com |
1599448040f7537e94e0c12f7d2b324533e684f5 | f1bdf504e0be626dc3e3001c2de384d993c0fc48 | /src/main/java/org/contentmine/graphics/html/HtmlDt.java | dd5ea3769bdc52c62cf7a4949a5af1bf7988d569 | [
"Apache-2.0"
] | permissive | anjackson/ami3 | 61cae21f2eca6b9906930eff08ca78b4b8246456 | d58c8420ddd3cee07429738f4495499e1a850207 | refs/heads/master | 2021-05-17T23:13:04.884140 | 2020-06-09T21:50:50 | 2020-06-09T21:50:50 | 250,989,085 | 0 | 0 | Apache-2.0 | 2020-06-09T21:50:51 | 2020-03-29T08:47:06 | HTML | UTF-8 | Java | false | false | 993 | java | /**
* Copyright 2011 Peter Murray-Rust et. al.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.contentmine.graphics.html;
import org.apache.log4j.Logger;
/**
* @author pm286
*/
public class HtmlDt extends HtmlElement {
private final static Logger LOG = Logger.getLogger(HtmlDt.class);
public final static String TAG = "dt";
/** constructor.
*
*/
public HtmlDt() {
super(TAG);
}
}
| [
"peter.murray.rust@googlemail.com"
] | peter.murray.rust@googlemail.com |
55c2cf18837cfa5a0174ef619c5ea78b97e7db4e | ca70baa3177bb9f5f57ae0e0edef7b176ee51930 | /easycode-login/src/main/java/com/easycodebox/login/shiro/ShiroSecurityInfoHandler.java | 8ab22285acdc0a31f5a0cfd6a370a109580b0be1 | [
"Apache-2.0"
] | permissive | easycodebox/easycode | 5e492af4a6194806a9629fa509e0aec9d3e9a23d | 802168ffd8cbaa761aee41958ab2bce93890e74a | refs/heads/master | 2023-03-16T06:37:35.245270 | 2020-07-01T11:32:19 | 2020-07-01T11:32:19 | 67,392,510 | 24 | 6 | null | null | null | null | UTF-8 | Java | false | false | 2,224 | java | package com.easycodebox.login.shiro;
import com.easycodebox.common.lang.dto.UserInfo;
import com.easycodebox.common.net.Https;
import com.easycodebox.common.security.*;
import com.easycodebox.common.validate.Assert;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author WangXiaoJin
*
*/
public class ShiroSecurityInfoHandler extends AbstractSecurityInfoHandler<Session, UserInfo> {
@Override
public SecurityContext<UserInfo> newSecurityContext(Session storage, HttpServletRequest request,
HttpServletResponse response) {
if (storage == null) {
storage = SecurityUtils.getSubject().getSession(false);
}
SecurityContext<UserInfo> context = new SecurityContext<>();
UserInfo user = getSecurityInfo(storage);
if (storage != null) {
context.setSessionId(storage.getId());
}
if(user != null) {
context.setSecurity(user);
}
if (request != null) {
context.setIp(Https.getIpAddr(request));
context.setUserAgent(request.getHeader("User-Agent"));
context.setRequest(request);
}
if (response != null) {
context.setResponse(response);
}
return context;
}
@Override
public UserInfo getSecurityInfo(Session storage) {
return storage == null ? null : (UserInfo)storage.getAttribute(getKey());
}
@Override
@SuppressWarnings("unchecked")
public void storeSecurityInfo(Session storage, UserInfo securityInfo) {
Assert.notNull(storage);
storage.setAttribute(getKey(), securityInfo);
SecurityContext<UserInfo> sc = (SecurityContext<UserInfo>)SecurityContexts.getCurSecurityContext();
if(sc == null) {
SecurityContext<UserInfo> tmp = new SecurityContext<>();
tmp.setSecurity(securityInfo);
tmp.setSessionId(storage.getId());
SecurityContexts.setCurSecurityContext(tmp);
} else {
sc.setSecurity(securityInfo);
sc.setSessionId(storage.getId());
}
}
@Override
public void destroySecurityInfo(Session storage) {
if (storage == null) return ;
storage.removeAttribute(getKey());
SecurityContexts.setCurSecurityContext(null);
}
}
| [
"381954728@qq.com"
] | 381954728@qq.com |
23be8adc2b26c562eb75c54dbbc6d13e26a2432c | 4b187352b226c9286945ea975f03690200b9d60d | /4.JavaCollections/src/com/javarush/task/task34/task3410/view/View.java | 44697afc0d021c9c1bed8c5fd1c989c2c3f055b1 | [] | no_license | Artemsetko/JavaRushTasks | f5fb912627e74f157090988b1cd2e4a26bb1d067 | 9ebfd5319184778647ba986232fe28c2e836ba0f | refs/heads/master | 2020-03-19T11:56:08.212683 | 2018-06-25T08:23:45 | 2018-06-25T08:23:45 | 136,482,702 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,205 | java | package com.javarush.task.task34.task3410.view;
import com.javarush.task.task34.task3410.controller.Controller;
import com.javarush.task.task34.task3410.controller.EventListener;
import com.javarush.task.task34.task3410.model.GameObjects;
import javax.swing.*;
public class View extends JFrame {
private Controller controller;
private Field field;
public View(Controller controller) {
this.controller = controller;
}
public void init() {
field = new Field(this);
add(field);
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setSize(500, 500);
setLocationRelativeTo(null);
setTitle("Сокобан");
setVisible(true);
}
public void update() {
field.repaint();
}
public GameObjects getGameObjects(){
return controller.getGameObjects();
}
public void setEventListener(EventListener eventListener) {
field.setEventListener(eventListener);
}
public void completed(int level){
update();
JOptionPane.showMessageDialog(null, level + " Completed" , "LEVEL", JOptionPane.INFORMATION_MESSAGE);
controller.startNextLevel();
}
}
| [
"setkoartem@gmail.com"
] | setkoartem@gmail.com |
5150d5e1046ae21d197318604780e088164d3fc1 | cc66a11bfc637063bdd1cb703072ced8caf942e9 | /mule/mule32/MuleContext/src/main/java/com/dhenton9000/mulecontext/App.java | daedd8d0ceac7b345ac9f93689af76cd3ccf24bf | [] | no_license | donhenton/code-attic | e905840a4d53181d8a6d7c8b983c7b2dc553074b | e8588bea7af3d3a168958ae96ea8a476fcb6969f | refs/heads/master | 2016-09-05T14:47:39.348847 | 2015-07-20T17:37:38 | 2015-07-20T17:37:38 | 39,396,691 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 190 | java | package com.dhenton9000.mulecontext;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
| [
"donhenton@gmail.com"
] | donhenton@gmail.com |
884a6f689e6f566d680dfc81063c583f438b5c63 | d1eb6e875f89e3e751e5629b9c22c20da2bf42e2 | /mid_lab_solutions/FinalExam_Interfaces/src/hashcodefix/Main.java | 648ca0a8e2754911a719216318f25bb2dd34666d | [] | no_license | tsitotaw/CS_401_MPP | c8825403c9513dfb97b437c3f4506c6b0b879070 | 6be79542b4436ab33b6678fc01416fb15168df06 | refs/heads/main | 2023-09-05T19:45:55.104466 | 2021-10-22T12:52:18 | 2021-10-22T12:52:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 911 | java | package hashcodefix;
import java.util.GregorianCalendar;
import java.util.HashMap;
/**
* Shows what goes wrong when you use a user-defined
* class as a key in a hashtable when you override equals
* but do not override hashcode
*
* @author pcorazza
*
*/
public class Main {
public static void main(String[] args) {
Person p1 = new Person("Joe", "Smith", 100000, new GregorianCalendar(1988, 5, 5));
Person p2 = new Person("Anne", "Jones", 80000, new GregorianCalendar(1986, 3, 9));
HashMap h = new HashMap();
Pair key1 = new Pair(p1.getFirstName(), p1.getLastName());
Pair key2 = new Pair(p2.getFirstName(), p2.getLastName());
h.put(key1, p1);
h.put(key2, p2);
Pair lookup = new Pair("Joe", "Smith");
System.out.println(lookup.equals(key1));
System.out.println(h.containsKey(lookup));
System.out.println(h.get(lookup));
}
}
| [
"tamiratfissehasitotaw@gmail.com"
] | tamiratfissehasitotaw@gmail.com |
d851c9d0c16232b8dd2faab3a2a0cde64701304d | 72cee097005539f1860cd2381d12108236741a03 | /eagle-core/eagle-common/src/main/java-templates/org/apache/eagle/common/Version.java | d110fa814c4f2253dc30b32636b25400ab02bc16 | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | phenixmzy/apache-eagle-0.5.0 | f43247ff9c2aea85d2c066794ef5bb00a093f839 | 0598e55d027083838c013b9a7171c0d72a7072a1 | refs/heads/master | 2022-11-22T18:28:13.891207 | 2019-08-19T03:02:25 | 2019-08-19T03:02:25 | 182,820,976 | 0 | 1 | Apache-2.0 | 2022-11-15T02:57:01 | 2019-04-22T15:58:42 | Java | UTF-8 | Java | false | false | 2,448 | 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
* <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.apache.eagle.common;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class Version {
public static final String projectName = "Apache Eagle";
public static final String moduleName = "${project.name}";
public static final String version = "${project.version}";
public static final String buildNumber = "${buildNumber}";
public static String gitRevision = "${revision}";
public static final String userName = "${user.name}";
public static final String timestamp = "${timestamp}";
private static final Logger LOG = LoggerFactory.getLogger(Version.class);
static {
InputStream resourceAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("build.properties");
Properties p = new Properties();
try {
p.load(resourceAsStream);
gitRevision = p.getProperty("revision", "unknown");
} catch (IOException e) {
LOG.error(e.getMessage(),e);
} finally {
LOG.info("{} {} ({}, {})", projectName,Version.version,gitRevision,DateTimeUtil.millisecondsToHumanDateWithSecondsAndTimezone(Long.parseLong(Version.timestamp)));
}
}
@Override
public String toString() {
return String.format("%s %s buildNumber=%s gitRevision=%s built by %s on %s",
projectName, version, buildNumber, gitRevision, userName, new Date(Long.parseLong(timestamp)));
}
public static String str() {
return new Version().toString();
}
}
| [
"wingmazhiyong@gmail.com"
] | wingmazhiyong@gmail.com |
db91ce692746bf12cd35aaa7dfb75e66c858a6fe | 750f1c9beaa046495b2cc9f329c32b628d33c997 | /orangelala/orangelala-framework-model/src/main/java/com/orangelala/framework/model/order/Order.java | 3e8889a678e1c805e610b3db7a9da3086806279d | [] | no_license | chrilwe/orangelala-shop | 7d58f4c5ac3cb0ece1138079a0ec1478d024dc0d | 129ea7343452364de6226e09e2cebf5477e9ca78 | refs/heads/master | 2022-12-01T17:40:15.449360 | 2019-10-21T14:44:42 | 2019-10-21T14:44:42 | 199,277,088 | 1 | 0 | null | 2022-11-24T06:26:44 | 2019-07-28T11:10:47 | Java | UTF-8 | Java | false | false | 840 | java | package com.orangelala.framework.model.order;
import java.util.Date;
import lombok.Data;
import lombok.ToString;
/**
* 订单基本信息
*
* @author chrilwe
*
*/
@Data
@ToString
public class Order {
private String orderNumber;
private String addressId;
private int initPrice;//订单未优惠之前总金额
private int price;//订单优惠后 的金额
private Date createTime;//订单创建时间
private int expireSec;//订单超时支付时间(秒)
private String status;//订单状态:未支付,已支付,已撤销
private String userId;
private String details;//买家留言
private String payDetailId;//支付类型:银联支付,支付宝支付,微信支付
private String shippingId;//物流类型:圆通快递,申通快递,韵达快递,顺丰快递,中通快递
private String shopId;
}
| [
"1129864619@qq.com"
] | 1129864619@qq.com |
9a6205533c8718e46354e51dde72a47f37b9ecd3 | 3e3a5e2643e4ed8519ecfd6b66ae937f2da42939 | /CollectionFramework/TreeSetDemoAscNumbersComparator/TreeSetDemo/src/TreeSetExample.java | 767dc18923683d3e21a73c4ceb6e83fdd005943b | [] | no_license | neel2811/Java | a5249b19b3c3923c44f5b9528adee7a54a978be6 | fcafcf634cbf9ce849ecf43bf8e05f770cb85ac1 | refs/heads/master | 2021-10-26T03:42:57.532886 | 2017-03-24T10:25:27 | 2017-03-24T10:25:27 | 87,059,721 | 0 | 1 | null | 2017-04-03T09:50:10 | 2017-04-03T09:50:10 | null | UTF-8 | Java | false | false | 1,192 | java | import java.util.TreeSet;
/*
* Example of TreeSet(Comparator<? super E> comparator) Constructor.
*/
public class TreeSetExample
{
public static void main(String[] args)
{
/*
* Constructs a new, empty tree set, sorted according to the specified
* comparator.
*
* All elements inserted into the set must be mutually comparable by the
* specified comparator: comparator.compare(e1, e2) must not throw a
* ClassCastException for any elements e1 and e2 in the set.
*
* If the user attempts to add an element to the set that violates this
* constraint, the add call will throw a ClassCastException.
*/
AscendingNumberComparator ascendingNumberComparator = new AscendingNumberComparator();
TreeSet<Integer> treeSet = new TreeSet<Integer>(
ascendingNumberComparator);
System.out.println(20 + " is going to be add in treeSet");
treeSet.add(20);
System.out.println(40 + " is going to be add in treeSet");
treeSet.add(40);
System.out.println(30 + " is going to be add in treeSet");
treeSet.add(30);
System.out.println(10 + " is going to be add in treeSet");
treeSet.add(10);
System.out.println("treeSet : " + treeSet + "\n");
}
}
| [
"ramram_43210@yahoo.com"
] | ramram_43210@yahoo.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.