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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54defde1b6785d397b4efe92b2268490617e0839 | 9254e7279570ac8ef687c416a79bb472146e9b35 | /tdsr-20200101/src/main/java/com/aliyun/tdsr20200101/models/AddSceneResponse.java | cf3b45d0cc163b18ef7227c6fe4715db4ede8c05 | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 999 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.tdsr20200101.models;
import com.aliyun.tea.*;
public class AddSceneResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public AddSceneResponseBody body;
public static AddSceneResponse build(java.util.Map<String, ?> map) throws Exception {
AddSceneResponse self = new AddSceneResponse();
return TeaModel.build(map, self);
}
public AddSceneResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public AddSceneResponse setBody(AddSceneResponseBody body) {
this.body = body;
return this;
}
public AddSceneResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
ecef00c13d243921c60486e9863b867a650d01e6 | f346a769172eb8270cf7cf89e2d98b2a907e94f0 | /src/main/java/com/example/form/CountryForm.java | d70d74cb3d2fd8e07b4772f0fba0a184175cb292 | [] | no_license | erhyd/mosaic | b65c3a563f871a3c1b37dae6e06dadb77abee1de | e6eda659993e8a127cae3e45bcd213575528dab8 | refs/heads/master | 2020-05-24T22:56:02.001292 | 2017-03-15T02:40:39 | 2017-03-15T02:40:39 | 84,888,404 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,307 | java | package com.example.form;
import java.math.BigDecimal;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.example.domain.Country;
public class CountryForm extends Country {
@NotNull
@Size(max=3)
@Override
public String getCode() {
// TODO Auto-generated method stub
return super.getCode();
}
@Override
public void setCode(String code) {
// TODO Auto-generated method stub
super.setCode(code);
}
@NotNull
@Size(max=52)
@Override
public String getName() {
// TODO Auto-generated method stub
return super.getName();
}
@Override
public void setName(String name) {
// TODO Auto-generated method stub
super.setName(name);
}
@Size(max=20)
@Override
public String getContinent() {
// TODO Auto-generated method stub
return super.getContinent();
}
@Override
public void setContinent(String continent) {
// TODO Auto-generated method stub
super.setContinent(continent);
}
@Size(max=26)
@Override
public String getRegion() {
// TODO Auto-generated method stub
return super.getRegion();
}
@Override
public void setRegion(String region) {
// TODO Auto-generated method stub
super.setRegion(region);
}
@Digits(integer=8, fraction=2)
@Override
public BigDecimal getSurfaceArea() {
// TODO Auto-generated method stub
return super.getSurfaceArea();
}
@Override
public void setSurfaceArea(BigDecimal surfaceArea) {
// TODO Auto-generated method stub
super.setSurfaceArea(surfaceArea);
}
@Digits(integer=6, fraction=0)
@Override
public BigDecimal getIndepYear() {
// TODO Auto-generated method stub
return super.getIndepYear();
}
@Override
public void setIndepYear(BigDecimal indepYear) {
// TODO Auto-generated method stub
super.setIndepYear(indepYear);
}
@Digits(integer=11, fraction=0)
@Override
public BigDecimal getPopulation() {
// TODO Auto-generated method stub
return super.getPopulation();
}
@Override
public void setPopulation(BigDecimal population) {
// TODO Auto-generated method stub
super.setPopulation(population);
}
@Digits(integer=2, fraction=1)
@Override
public BigDecimal getLifeExpectancy() {
// TODO Auto-generated method stub
return super.getLifeExpectancy();
}
@Override
public void setLifeExpectancy(BigDecimal lifeExpectancy) {
// TODO Auto-generated method stub
super.setLifeExpectancy(lifeExpectancy);
}
@Digits(integer=8, fraction=2)
@Override
public BigDecimal getGnp() {
// TODO Auto-generated method stub
return super.getGnp();
}
@Override
public void setGnp(BigDecimal gnp) {
// TODO Auto-generated method stub
super.setGnp(gnp);
}
@Digits(integer=8, fraction=2)
@Override
public BigDecimal getGnpOld() {
// TODO Auto-generated method stub
return super.getGnpOld();
}
@Override
public void setGnpOld(BigDecimal gnpOld) {
// TODO Auto-generated method stub
super.setGnpOld(gnpOld);
}
@Size(max=45)
@Override
public String getLocalName() {
// TODO Auto-generated method stub
return super.getLocalName();
}
@Override
public void setLocalName(String localName) {
// TODO Auto-generated method stub
super.setLocalName(localName);
}
@Size(max=45)
@Override
public String getGovernmentForm() {
// TODO Auto-generated method stub
return super.getGovernmentForm();
}
@Override
public void setGovernmentForm(String governmentForm) {
// TODO Auto-generated method stub
super.setGovernmentForm(governmentForm);
}
@Size(max=60)
@Override
public String getHeadOfState() {
// TODO Auto-generated method stub
return super.getHeadOfState();
}
@Override
public void setHeadOfState(String headOfState) {
// TODO Auto-generated method stub
super.setHeadOfState(headOfState);
}
@Digits(integer=11, fraction=0)
@Override
public BigDecimal getCapital() {
// TODO Auto-generated method stub
return super.getCapital();
}
@Override
public void setCapital(BigDecimal capital) {
// TODO Auto-generated method stub
super.setCapital(capital);
}
@Size(max=2)
@Override
public String getCode2() {
// TODO Auto-generated method stub
return super.getCode2();
}
@Override
public void setCode2(String code2) {
// TODO Auto-generated method stub
super.setCode2(code2);
}
}
| [
"java"
] | java |
f6a01ade9cc4fcd98cd1fdd0527b936c914ebdb2 | 14c8213abe7223fe64ff89a47f70b0396e623933 | /a/a/d/e/k$a.java | 5fbbc7b899d4d21650dd6ba10f94ebb96e526cda | [
"MIT"
] | permissive | PolitePeoplePlan/backdoored | c804327a0c2ac5fe3fbfff272ca5afcb97c36e53 | 3928ac16a21662e4f044db9f054d509222a8400e | refs/heads/main | 2023-05-31T04:19:55.497741 | 2021-06-23T15:20:03 | 2021-06-23T15:20:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 148 | java | package a.a.d.e;
public static class a extends k
{
public a(final float n, final float n2, final boolean b) {
super(n, n2, b);
}
}
| [
"66845682+chrispycreme420@users.noreply.github.com"
] | 66845682+chrispycreme420@users.noreply.github.com |
6c5fad6e3b02241795b68b3059a66c2cd9783d08 | fe2a92fb961cd9a185f5e675cbbec7d9ee1b5930 | /frameworks/base/media/java/android/mtp/MtpStorage.java | 9819f3d2870ba53ddcc5cdb229c9a815de7384e6 | [
"LicenseRef-scancode-unicode",
"Apache-2.0"
] | permissive | redstorm82/Framwork | e5bfe51a490d1a29d94bcb7d6dfce2869f70b34d | b48c6ac58cfd4355512df4dbd48b56f2d9342091 | refs/heads/master | 2021-05-30T10:01:51.835572 | 2015-08-04T06:42:49 | 2015-08-04T06:42:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,487 | java | /*
* Copyright (C) 2011 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 android.mtp;
import android.content.Context;
import android.os.storage.StorageVolume;
/**
* This class represents a storage unit on an MTP device.
* Used only for MTP support in USB responder mode.
* MtpStorageInfo is used in MTP host mode
*
* @hide
*/
public class MtpStorage {
private final int mStorageId;
private final String mPath;
private final long mReserveSpace;
private final long mMaxFileSize;
private String mDescription;
private boolean mRemovable;
public MtpStorage(StorageVolume volume, Context context) {
mStorageId = volume.getStorageId();
mPath = volume.getPath();
mDescription = context.getResources().getString(volume.getDescriptionId());
mReserveSpace = volume.getMtpReserveSpace() * 1024L * 1024L;
mRemovable = volume.isRemovable();
mMaxFileSize = volume.getMaxFileSize();
}
/**
* set the description string for the storage unit
*
* @internal
*/
public void setDescription(String desc){
mDescription = desc;
}
/**
* set true if the storage is removable.
*
* @internal
*/
public void setRemovable(boolean removable){
mRemovable = removable;
}
/**
* Returns the storage ID for the storage unit
*
* @return the storage ID
*/
public final int getStorageId() {
return mStorageId;
}
/**
* Generates a storage ID for storage of given index.
* Index 0 is for primary external storage
*
* @return the storage ID
*/
public static int getStorageId(int index) {
// storage ID is 0x00010001 for primary storage,
// then 0x00020001, 0x00030001, etc. for secondary storages
return ((index + 1) << 16) + 1;
}
/**
* Returns the file path for the storage unit's storage in the file system
*
* @return the storage file path
*/
public final String getPath() {
return mPath;
}
/**
* Returns the description string for the storage unit
*
* @return the storage unit description
*/
public final String getDescription() {
return mDescription;
}
/**
* Returns the amount of space to reserve on the storage file system.
* This can be set to a non-zero value to prevent MTP from filling up the entire storage.
*
* @return reserved space in bytes.
*/
public final long getReserveSpace() {
return mReserveSpace;
}
/**
* Returns true if the storage is removable.
*
* @return is removable
*/
public final boolean isRemovable() {
return mRemovable;
}
/**
* Returns maximum file size for the storage, or zero if it is unbounded.
*
* @return maximum file size
*/
public long getMaxFileSize() {
return mMaxFileSize;
}
}
| [
"deng.xie@sprocomm.com"
] | deng.xie@sprocomm.com |
f384b141e62b3df33ad94ef2cf4a503bf6d45686 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/ss/sls/extn/dao/SSExtn1300DAO.java | 3f14e7f37120c03886a7ae8d60feb124c5084478 | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 5,051 | java | /***************************************************************************************************
* 파일명 : SSExtn1300DAO.java
* 기능 : 사원확장 수당,송금을 위한 DAO
* 작성일자 : 2003-12-15
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.ss.sls.extn.dao;
import somo.framework.db.*;
import somo.framework.expt.*;
import chosun.ciis.ss.sls.extn.ds.*;
import chosun.ciis.ss.sls.extn.dm.*;
import chosun.ciis.ss.sls.common.ds.*;
import chosun.ciis.ss.sls.common.dm.*;
/**
* 확장현황-사원수당 을 위한 DAO
*/
public class SSExtn1300DAO {
/**
* 확장현황-사원확장-수당관리-초기화면
* @param dm SS_L_EMPCAMPNODM
* @return SS_L_EMPCAMPNODataSet
* @throws AppException
*/
public SS_L_EMPCAMPNODataSet empAlonInit(SS_L_EMPCAMPNODM dm) throws AppException {
DBManager manager = new DBManager("Oracle");
SS_L_EMPCAMPNODataSet ds = (SS_L_EMPCAMPNODataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
/**
* 확장현황-사원확장-수당관리-목록
* @param dm SS_L_RDR_EXTN_EMPALONDM
* @return SS_L_RDR_EXTN_EMPALONDataSet
* @throws AppException
*/
public SS_L_RDR_EXTN_EMPALONDataSet selectEmpAlonList(SS_L_RDR_EXTN_EMPALONDM dm) throws AppException{
DBManager manager = new DBManager("Oracle");
SS_L_RDR_EXTN_EMPALONDataSet ds = (SS_L_RDR_EXTN_EMPALONDataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
/**
* 확장현황-사원확장-수당관리-상세목록
* @param dm SS_L_RDR_EXTN_EMPALONDDM
* @return SS_L_RDR_EXTN_EMPALONDDataSet
* @throws AppException
*/
public SS_L_RDR_EXTN_EMPALONDDataSet selectEmpAlonDetailList(SS_L_RDR_EXTN_EMPALONDDM dm) throws AppException {
DBManager manager = new DBManager("Oracle");
SS_L_RDR_EXTN_EMPALONDDataSet ds = (SS_L_RDR_EXTN_EMPALONDDataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
/**
* 확장현황-사원확장-수당관리-저장
* @param dm SS_U_RDR_EXTN_EMPALONDM
* @return SS_U_RDR_EXTN_EMPALONDataSet
* @throws AppException
*/
public SS_U_RDR_EXTN_EMPALONDataSet updateEmpAlon(SS_U_RDR_EXTN_EMPALONDM dm) throws AppException{
DBManager manager = new DBManager("Oracle");
SS_U_RDR_EXTN_EMPALONDataSet ds = (SS_U_RDR_EXTN_EMPALONDataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
/**
* 확장현황-사원확장-송금관리-초기화면
* @param dm SS_L_EMPCAMPNODM
* @return SS_L_EMPCAMPNODataSet
* @throws AppException
*/
public SS_L_EMPCAMPNODataSet empRmttInit(SS_L_EMPCAMPNODM dm) throws AppException {
DBManager manager = new DBManager("Oracle");
SS_L_EMPCAMPNODataSet ds = (SS_L_EMPCAMPNODataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
/**
* 확장현황-사원확장-송금관리-목록
* @param dm SS_L_RDR_EXTN_EMPRMTTDM
* @return SS_L_RDR_EXTN_EMPRMTTDataSet
* @throws AppException
*/
public SS_L_RDR_EXTN_EMPRMTTDataSet selectEmpRmttList(SS_L_RDR_EXTN_EMPRMTTDM dm) throws AppException{
DBManager manager = new DBManager("Oracle");
SS_L_RDR_EXTN_EMPRMTTDataSet ds = (SS_L_RDR_EXTN_EMPRMTTDataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
/**
* 확장현황-사원확장-사원확장-송금 인쇄
* @param dm SS_L_RDR_EXTN_EMPRMTT_PRINTDM
* @return SS_L_RDR_EXTN_EMPRMTT_PRINTDataSet
* @throws AppException
*/
public SS_L_RDR_EXTN_EMPRMTT_PRINTDataSet printEmpAlonList(SS_L_RDR_EXTN_EMPRMTT_PRINTDM dm) throws AppException{
DBManager manager = new DBManager("Oracle");
SS_L_RDR_EXTN_EMPRMTT_PRINTDataSet ds = (SS_L_RDR_EXTN_EMPRMTT_PRINTDataSet) manager.executeCall(dm);
if (!"".equals(ds.errcode)) {
throw new AppException(ds.errcode, ds.errmsg);
}
return ds;
}
} | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
58007d00982f01dff1da56d626d1029ab8316d5b | 31bb59512044dd4ece9dd25baefc06e29176e86e | /project/hs-engine-entity/src/main/java/com/neusoft/hs/domain/order/OrderExecuteDAO.java | 9bcfda56193e68b6e117539cc4196b1d214243e8 | [] | no_license | AppSecAI-TEST/hospital | 58302dadfcbdf4379266d5a9c4167e4aa4150a8b | 908581b6d1d5f48606cfb93daf36ea0e8446a6c6 | refs/heads/master | 2021-01-16T15:07:15.251844 | 2017-08-11T06:30:43 | 2017-08-11T06:30:43 | 100,001,000 | 1 | 0 | null | 2017-08-11T06:51:55 | 2017-08-11T06:51:55 | null | UTF-8 | Java | false | false | 4,377 | java | package com.neusoft.hs.domain.order;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.neusoft.hs.domain.organization.AbstractUser;
import com.neusoft.hs.domain.organization.Dept;
import com.neusoft.hs.platform.exception.HsException;
@Service
@Transactional(rollbackFor = Exception.class)
public class OrderExecuteDAO {
@Autowired
private OrderExecuteRepo orderExecuteRepo;
public OrderExecute find(String id) {
return orderExecuteRepo.findOne(id);
}
/**
* 根据自定义条件查询执行条目列表
*
* @param filter
* @param params
* @param user
* @param pageable
* @return
* @throws HsException
*/
public List<OrderExecute> find(OrderExecuteFilter filter,
Map<String, Object> params, AbstractUser user, Pageable pageable)
throws HsException {
OrderExecuteFilterCondition condition = filter.createCondition(params,
user);
Date begin = condition.getBegin();
Date end = condition.getEnd();
List<String> types = condition.getTypes();
String category = condition.getCategory();
List<? extends Dept> belongDepts = condition.getBelongDepts();
if (belongDepts.size() > 1) {
if (types.size() > 1) {
if (category == null) {
return orderExecuteRepo
.findByStateAndBelongDeptInAndTypeInAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing, belongDepts,
types, begin, end, pageable);
} else {
return orderExecuteRepo
.findByStateAndBelongDeptInAndTypeInAndOrderCategoryAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing, belongDepts,
types, category, begin, end, pageable);
}
} else if (types.size() == 1) {
if (category == null) {
return orderExecuteRepo
.findByStateAndBelongDeptInAndTypeAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing, belongDepts,
types.get(0), begin, end, pageable);
} else {
return orderExecuteRepo
.findByStateAndBelongDeptInAndTypeAndOrderCategoryAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing, belongDepts,
types.get(0), category, begin, end,
pageable);
}
} else {
if (category == null) {
return orderExecuteRepo
.findByStateAndBelongDeptInAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing, belongDepts,
begin, end, pageable);
} else {
return orderExecuteRepo
.findByStateAndBelongDeptInAndOrderCategoryAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing, belongDepts,
category, begin, end, pageable);
}
}
} else if (belongDepts.size() > 1) {
if (types.size() > 1) {
if (category == null) {
return orderExecuteRepo
.findByStateAndBelongDeptAndTypeInAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing,
belongDepts.get(0), types, begin, end,
pageable);
} else {
return orderExecuteRepo
.findByStateAndBelongDeptAndTypeInAndOrderCategoryAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing,
belongDepts.get(0), types, category, begin,
end, pageable);
}
} else if (types.size() == 1) {
if (category == null) {
return orderExecuteRepo
.findByStateAndBelongDeptAndTypeAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing,
belongDepts.get(0), types.get(0), begin,
end, pageable);
} else {
return orderExecuteRepo
.findByStateAndBelongDeptAndTypeAndOrderCategoryAndPlanStartDateGreaterThanAndPlanEndDateLessThan(
OrderExecute.State_Executing,
belongDepts.get(0), types.get(0), category,
begin, end, pageable);
}
} else {
throw new HsException("代码未编写");
}
} else {
throw new HsException("代码未编写");
}
}
}
| [
"wangdg@neusoft.com"
] | wangdg@neusoft.com |
5cd66616b9a1511000eaeff8465e9648cc921c56 | 0717b0f1bca515f1a6841c80bd0219f5869f9110 | /src/main/java/com/andreyDelay/javacore/chapter28/countDownLatch/CDLDemo.java | 591657bb11d22943e4bf17dadb5c6da7eebc35e8 | [] | no_license | andreyDelay/javacore | 2f9b201cf38b944d8137880766ce295583cbae22 | 9dd1ffb1187b7df79b9e033dc12b893844ce495a | refs/heads/master | 2022-12-23T01:27:01.629555 | 2020-10-03T21:33:54 | 2020-10-03T21:33:54 | 262,768,522 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 495 | java | package main.java.com.andreyDelay.javacore.chapter28.countDownLatch;
import java.util.concurrent.CountDownLatch;
public class CDLDemo {
public static void main(String[] args) {
CountDownLatch cdl = new CountDownLatch(5);
System.out.println("Thread starting");
new MyThread(cdl);
try {
cdl.await();
} catch (InterruptedException e) {
System.out.println(e);
}
System.out.println("Thread finishing");
}
}
| [
"frowzygleb@gmail.com"
] | frowzygleb@gmail.com |
bc8e25deee48229fa8d44059f71e6694c5d9aaa5 | 487c9acef81e689d994150003a23e192e510ffa0 | /MultithreadingWorkQueues/src/main/java/WorkQueueDirectoryListing.java | cb29ea452d2d1c9ea3e9f1770b4c7e0c9a63ce6f | [] | no_license | usf-cs212-fall2020/lectures | 6b2b20da8cb27f83824dc18c3f01134113d21362 | 0acd226fc35e57211f3061590daf355c9d57d6cb | refs/heads/main | 2023-01-23T08:41:53.441437 | 2020-11-30T01:14:46 | 2020-11-30T01:14:46 | 288,350,439 | 1 | 10 | null | null | null | null | UTF-8 | Java | false | false | 4,836 | java | import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.Set;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* This class demonstrates a slightly better option than
* {@link MultithreadedDirectoryListing} for making a multithreaded version of
* {@link RecursiveDirectoryListing}.
*
* Note: With a tweak to our work queues (moving the pending variable there), we
* can avoid needing the task manager class entirely!
*/
public class WorkQueueDirectoryListing {
/** Logger to use for this class. */
private static final Logger log = LogManager.getLogger();
/**
* Returns a directory listing for the given path.
*
* @param path directory to create listing
* @return paths found within directory and its subdirectories
* @throws InterruptedException from {@link TaskManager#join()}
*/
public static Set<Path> list(Path path) throws InterruptedException {
HashSet<Path> paths = new HashSet<>();
if (Files.exists(path)) {
paths.add(path);
if (Files.isDirectory(path)) {
TaskManager manager = new TaskManager(paths);
manager.start(path);
manager.join();
manager.tasks.shutdown();
}
}
return paths;
}
/**
* Instead of a static worker class, we will create a task manager that can
* keep track of pending work.
*/
private static class TaskManager {
/** The shared set of all paths found thus far. */
private final Set<Path> paths;
/** The amount of pending (or unfinished) work. */
private int pending;
/** The work queue that will handle all of the tasks. */
private final WorkQueue tasks;
/**
* Initializes a task manager given a set of paths.
*
* @param paths the set of shared paths to populate
*/
private TaskManager(Set<Path> paths) {
this.paths = paths;
this.pending = 0;
this.tasks = new WorkQueue();
}
/**
* Creates the first task and gives it to the work queue.
*
* @param path directory to create listing
*/
private void start(Path path) {
tasks.execute(new Task(path));
}
/**
* The non-static task class that will update the shared paths and pending
* members in our task manager instance.
*/
private class Task implements Runnable {
/** The path to add or list. */
private final Path path;
/**
* Initializes this task.
*
* @param path the path to add or list
*/
public Task(Path path) {
this.path = path;
incrementPending();
log.debug("Task for {} created.", path);
}
@Override
public void run() {
Set<Path> local = new HashSet<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) {
for (Path current : stream) {
local.add(current);
if (Files.isDirectory(current)) {
tasks.execute(new Task(current));
}
}
synchronized (paths) {
paths.addAll(local);
}
}
catch (IOException ex) {
throw new UncheckedIOException(ex);
}
log.debug("Task for {} finished.", path);
decrementPending();
}
}
/**
* Rather than having threads wait for each other (undoing our
* multithreading), we will wait until all pending work is completed.
*
* @throws InterruptedException from {@link Thread#wait()}
*/
private synchronized void join() throws InterruptedException {
log.debug("Waiting for work...");
while (pending > 0) {
this.wait();
log.debug("Woke up with pending at {}.", pending);
}
log.debug("Work finished.");
}
/**
* Safely increments the shared pending variable.
*/
private synchronized void incrementPending() {
pending++;
}
/**
* Safely decrements the shared pending variable, and wakes up any threads
* waiting for work to be completed.
*/
private synchronized void decrementPending() {
assert pending > 0;
pending--;
if (pending == 0) {
this.notifyAll();
}
}
}
/**
* Tests the directory listing for the current directory.
*
* @param args unused
* @throws InterruptedException from {@link #list(Path)}
* @throws IOException from {@link RecursiveDirectoryListing#list(Path)}
*/
public static void main(String[] args) throws InterruptedException, IOException {
Path path = Path.of(".");
Set<Path> actual = list(path);
Set<Path> expected = RecursiveDirectoryListing.list(path);
System.out.println(actual.equals(expected));
}
/*
* So, are we FINALLY at the point where we are writing multithreading code
* the way you should in your homework and projects? Almost! The next step is
* to eliminate the task manager class entirely by moving the code that deals
* with the pending variable to the work queue itself.
*/
}
| [
"sjengle@cs.usfca.edu"
] | sjengle@cs.usfca.edu |
a93e44b6cb49b45950194573d0545887eb8a61ee | 88058552f2b4f16bf63e31ceb4b76dd9a84b32ea | /modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201609/cm/DateRange.java | 77c0a2fd606608351a8ffdcc34284ba8c97ae831 | [
"Apache-2.0"
] | permissive | fgonzalo/googleads-java-lib | 9a20f6986f7dc5302e41b37e1407656dfafea073 | f696d2fd4d8608b138ae30392a836c8972960e6e | refs/heads/master | 2021-01-19T17:27:28.625379 | 2017-08-15T21:14:59 | 2017-08-15T21:14:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,651 | java | // Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.jaxws.v201609.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* Represents a range of dates that has either an upper or a lower bound.
* The format for the date is YYYYMMDD.
*
*
* <p>Java class for DateRange complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DateRange">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="min" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="max" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DateRange", propOrder = {
"min",
"max"
})
public class DateRange {
protected String min;
protected String max;
/**
* Gets the value of the min property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMin() {
return min;
}
/**
* Sets the value of the min property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMin(String value) {
this.min = value;
}
/**
* Gets the value of the max property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMax() {
return max;
}
/**
* Sets the value of the max property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMax(String value) {
this.max = value;
}
}
| [
"jradcliff@users.noreply.github.com"
] | jradcliff@users.noreply.github.com |
2417315a11d7c03c564294e0319b4a6efa0045f6 | eb588f7292a21bb998190efa73fbd6c7df677fac | /java-checks/src/test/java/org/sonar/java/checks/ArrayEqualsCheckTest.java | 299bf2fc45d1aa5e99a247367c4559a4f675485d | [] | no_license | joansmith/sonar-java | 5ab3eb590d03d45e40815dc735fc0330b5ef3464 | 836dfb3599cedba52c9101f168b3b5d4d7d67b78 | refs/heads/master | 2021-01-10T09:52:51.989012 | 2016-02-08T12:58:18 | 2016-02-08T13:05:07 | 51,310,126 | 6 | 8 | null | null | null | null | UTF-8 | Java | false | false | 1,140 | java | /*
* SonarQube Java
* Copyright (C) 2012-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.java.checks;
import org.sonar.java.checks.verifier.JavaCheckVerifier;
import org.junit.Test;
public class ArrayEqualsCheckTest {
@Test
public void test() {
JavaCheckVerifier.verify("src/test/files/checks/ArrayEqualsCheck.java", new ArrayEqualsCheck());
}
}
| [
"nicolas.peru@sonarsource.com"
] | nicolas.peru@sonarsource.com |
f1968e6487e9605d4b1e7ac3c0f996d85272a1f1 | 35e8a12f96c6f46aa77907c3a3ee2af30c8c8d3f | /hub.sam.sdl.model/src/hub/sam/sdl/validation/SdlElseValidator.java | c8007e1da2a9ad5b8a5b3f2f21596285ab041c7b | [] | no_license | markus1978/tef | 36049dee71a99d24401d4a01fe33a3018e7bb776 | 38bfc24dc64822b7b3ed74e41f85b3a8c10c1955 | refs/heads/master | 2020-04-06T04:30:58.699975 | 2015-08-13T07:51:37 | 2015-08-13T07:51:37 | 25,520,279 | 1 | 2 | null | 2015-08-13T07:51:37 | 2014-10-21T12:13:17 | Java | UTF-8 | Java | false | false | 533 | java | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package hub.sam.sdl.validation;
/**
* A sample validator interface for {@link hub.sam.sdl.SdlElse}.
* This doesn't really do anything, and it's not a real EMF artifact.
* It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
* This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
*/
public interface SdlElseValidator {
boolean validate();
}
| [
"do@not.use"
] | do@not.use |
2f1366725cf26c7e210a75350607da6615229db8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/23/23_2de80f0e33b9a31a890572130dc42b50a29c2db8/CDIBean/23_2de80f0e33b9a31a890572130dc42b50a29c2db8_CDIBean_t.java | 1bc7a9345cb6694f471214600afbf030ab48f841 | [] | 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,042 | java | package org.jboss.tools.cdi.ui.test.testmodel;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanMethod;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInitializerMethod;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInterceptorBinding;
import org.jboss.tools.cdi.core.IInterceptorBindingDeclaration;
import org.jboss.tools.cdi.core.IObserverMethod;
import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.common.java.IAnnotationDeclaration;
import org.jboss.tools.common.java.IJavaSourceReference;
import org.jboss.tools.common.java.IParametedType;
import org.jboss.tools.common.java.ITypeDeclaration;
import org.jboss.tools.common.text.ITextSourceReference;
public class CDIBean extends CDIElement implements IClassBean{
private ICDIProject project;
private HashSet<IQualifier> qualifiers;
private Type cdiClass;
private File cdiFile;
public CDIBean(ICDIProject project, String qualifiedName){
this.project = project;
qualifiers = new HashSet<IQualifier>();
IQualifier anyQualifier = project.getQualifier(CDIConstants.ANY_QUALIFIER_TYPE_NAME);
IQualifier defaultQualifier = project.getQualifier(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
qualifiers.add(anyQualifier);
qualifiers.add(defaultQualifier);
cdiClass = new Type(qualifiedName);
cdiFile = new File();
}
@Override
public IScope getScope() {
return null;
}
@Override
public Set<IScopeDeclaration> getScopeDeclarations() {
return null;
}
@Override
public Set<IStereotypeDeclaration> getStereotypeDeclarations() {
return null;
}
@Override
public List<IAnnotationDeclaration> getAnnotations() {
return null;
}
@Override
public IAnnotationDeclaration getAnnotation(String annotationTypeName) {
return null;
}
@Override
public IJavaSourceReference getAnnotationPosition(
String annotationTypeName) {
return null;
}
@Override
public boolean isAnnotationPresent(String annotationTypeName) {
return false;
}
@Override
public ICDIProject getCDIProject() {
return project;
}
@Override
public IPath getSourcePath() {
return null;
}
@Override
public IResource getResource() {
return cdiFile;
}
@Override
public IType getBeanClass() {
return cdiClass;
}
@Override
public String getName() {
return null;
}
@Override
public ITextSourceReference getNameLocation(boolean stereotypeLocation) {
return null;
}
@Override
public Set<IParametedType> getLegalTypes() {
return null;
}
@Override
public Set<IParametedType> getAllTypes() {
return null;
}
@Override
public String getElementName() {
return null;
}
@Override
public Set<ITypeDeclaration> getAllTypeDeclarations() {
return null;
}
@Override
public Set<ITypeDeclaration> getRestrictedTypeDeclaratios() {
return null;
}
@Override
public Set<IQualifierDeclaration> getQualifierDeclarations() {
return null;
}
@Override
public Set<IQualifierDeclaration> getQualifierDeclarations(
boolean includeInherited) {
return null;
}
@Override
public Set<IQualifier> getQualifiers() {
return qualifiers;
}
@Override
public boolean isAlternative() {
return false;
}
@Override
public boolean isSelectedAlternative() {
return false;
}
@Override
public IAnnotationDeclaration getAlternativeDeclaration() {
return null;
}
@Override
public Set<IInjectionPoint> getInjectionPoints() {
return null;
}
@Override
public Set<IInjectionPoint> getInjectionPoints(boolean all) {
return null;
}
@Override
public IBean getSpecializedBean() {
return null;
}
@Override
public IAnnotationDeclaration getSpecializesAnnotationDeclaration() {
return null;
}
@Override
public boolean isSpecializing() {
return false;
}
@Override
public boolean isDependent() {
return false;
}
@Override
public boolean isEnabled() {
return false;
}
@Override
public boolean isNullable() {
return false;
}
@Override
public Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations(
boolean includeInherited) {
return null;
}
@Override
public Set<IInterceptorBinding> getInterceptorBindings() {
return null;
}
@Override
public Set<IProducer> getProducers() {
return null;
}
@Override
public Set<IBeanMethod> getDisposers() {
return null;
}
@Override
public Set<IBeanMethod> getBeanConstructors() {
return null;
}
@Override
public Set<IBeanMethod> getAllMethods() {
return null;
}
@Override
public Set<IObserverMethod> getObserverMethods() {
return null;
}
@Override
public Set<? extends IClassBean> getSpecializingBeans() {
return null;
}
@Override
public IClassBean getSuperClassBean() {
return null;
}
@Override
public IMember getSourceMember() {
return getBeanClass();
}
@Override
public ICDIProject getDeclaringProject() {
return null;
}
@Override
public boolean exists() {
return true;
}
@Override
public void open() {
}
@Override
public Set<IInitializerMethod> getInitializers() {
return null;
}
@Override
public IJavaElement getSourceElement() {
return getSourceMember();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
5a519de7a195fc83dd1fb220f61b12172b4414aa | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/alibaba--dubbo/cd32fe2ed933d4c4ebcd3e8bd254cfb6bdf361cd/before/FailbackCluster.java | 2b2ca92009cf25812d71f28cbda16fbbfbd836d1 | [] | 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,276 | java | /*
* Copyright 1999-2011 Alibaba Group.
*
* 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.alibaba.dubbo.rpc.cluster.support;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.RpcException;
import com.alibaba.dubbo.rpc.cluster.Cluster;
import com.alibaba.dubbo.rpc.cluster.Directory;
/**
* 失败自动恢复,后台记录失败请求,定时重发,通常用于消息通知操作。
*
* <a href="http://en.wikipedia.org/wiki/Failback">Failback</a>
*
* @author william.liangf
*/
public class FailbackCluster implements Cluster {
public final static String NAME = "failback";
public <T> Invoker<T> join(Directory<T> directory) throws RpcException {
return new FailbackClusterInvoker<T>(directory);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
c3bcc43c1bb1a88d1416ec4a9f27ab01c10804d7 | 3c5e0a73867838bc2afbc3b431dcc53ef8ea3af0 | /src/com/htsoft/oa/service/system/impl/SystemLogServiceImpl.java | faa872db64ffaff5a9c0fd8bb0ce7cf937e2962b | [] | no_license | cjp472/crm | 5f5d21c9b2307ab5d144ca8a762f374823a950c4 | d4a7f4dbf2983f0d3abb38ba0d0a916c08cb0c86 | refs/heads/master | 2020-03-19T09:48:34.976163 | 2018-05-05T07:47:27 | 2018-05-05T07:47:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 612 | java | package com.htsoft.oa.service.system.impl;
/*
* 北京优创融联科技有限公司 综合客服管理系统 -- http://www.ulane.cn
* Copyright (C) 2008-2009 Beijing Ulane Technology Co., LTD
*/
import com.htsoft.core.service.impl.BaseServiceImpl;
import com.htsoft.oa.dao.system.SystemLogDao;
import com.htsoft.oa.model.system.SystemLog;
import com.htsoft.oa.service.system.SystemLogService;
public class SystemLogServiceImpl extends BaseServiceImpl<SystemLog> implements SystemLogService{
private SystemLogDao dao;
public SystemLogServiceImpl(SystemLogDao dao) {
super(dao);
this.dao=dao;
}
} | [
"huyang3868@163.com"
] | huyang3868@163.com |
f2c1b8e8b9334e99cea12ce081192be1472bed41 | 32cd70512c7a661aeefee440586339211fbc9efd | /aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/model/transform/MessageStaxUnmarshaller.java | a422c44b167c10f68da1085be6db7170b44205b4 | [
"Apache-2.0"
] | permissive | twigkit/aws-sdk-java | 7409d949ce0b0fbd061e787a5b39a93db7247d3d | 0b8dd8cf5e52ad7ae57acd2ce7a584fd83a998be | refs/heads/master | 2020-04-03T16:40:16.625651 | 2018-05-04T12:05:14 | 2018-05-04T12:05:14 | 60,255,938 | 0 | 1 | Apache-2.0 | 2018-05-04T12:48:26 | 2016-06-02T10:40:53 | Java | UTF-8 | Java | false | false | 2,628 | java | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.simpleemail.model.transform;
import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Map.Entry;
import javax.xml.stream.events.XMLEvent;
import com.amazonaws.services.simpleemail.model.*;
import com.amazonaws.transform.Unmarshaller;
import com.amazonaws.transform.MapEntry;
import com.amazonaws.transform.StaxUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*;
/**
* Message StAX Unmarshaller
*/
public class MessageStaxUnmarshaller implements
Unmarshaller<Message, StaxUnmarshallerContext> {
public Message unmarshall(StaxUnmarshallerContext context) throws Exception {
Message message = new Message();
int originalDepth = context.getCurrentDepth();
int targetDepth = originalDepth + 1;
if (context.isStartOfDocument())
targetDepth += 1;
while (true) {
XMLEvent xmlEvent = context.nextEvent();
if (xmlEvent.isEndDocument())
return message;
if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
if (context.testExpression("Subject", targetDepth)) {
message.setSubject(ContentStaxUnmarshaller.getInstance()
.unmarshall(context));
continue;
}
if (context.testExpression("Body", targetDepth)) {
message.setBody(BodyStaxUnmarshaller.getInstance()
.unmarshall(context));
continue;
}
} else if (xmlEvent.isEndElement()) {
if (context.getCurrentDepth() < originalDepth) {
return message;
}
}
}
}
private static MessageStaxUnmarshaller instance;
public static MessageStaxUnmarshaller getInstance() {
if (instance == null)
instance = new MessageStaxUnmarshaller();
return instance;
}
}
| [
"aws@amazon.com"
] | aws@amazon.com |
20aede3aa3fd2c873ff17f49d390ff717f656642 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/28/28_37730d30ba4686e0844dfc5af8687dc8ebd42687/ImmutableIntArrayDocIdSet/28_37730d30ba4686e0844dfc5af8687dc8ebd42687_ImmutableIntArrayDocIdSet_t.java | 1df4c892191c3c7f655edd596cc96de1490c75d3 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,856 | java | package com.kamikaze.docidset.impl;
import java.util.Arrays;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.DocIdSetIterator;
import com.kamikaze.docidset.utils.IntArray;
public class ImmutableIntArrayDocIdSet extends DocIdSet {
private final int[] _array;
public ImmutableIntArrayDocIdSet(int[] array){
_array = array;
}
@Override
public DocIdSetIterator iterator() {
return new ImmutableIntArrayDocIdSetIterator(_array);
}
@Override
public final boolean isCacheable() {
return true;
}
public static class ImmutableIntArrayDocIdSetIterator extends DocIdSetIterator{
private int _doc;
private int cursor;
private final int[] _array;
public ImmutableIntArrayDocIdSetIterator(int[] array){
_array=array;
_doc = -1;
cursor=-1;
}
@Override
final public int docID(){
return _doc;
}
@Override
public int nextDoc() throws java.io.IOException{
if (++cursor < _array.length) {
_doc = _array[cursor];
}
else{
_doc = DocIdSetIterator.NO_MORE_DOCS;
}
return _doc;
}
@Override
public int advance(int target) throws java.io.IOException{
if (cursor >= _array.length || _array.length == -1) return DocIdSetIterator.NO_MORE_DOCS;
if (target <= _doc) target = _doc + 1;
int index = Arrays.binarySearch(_array, target);
if (index > 0){
cursor = index;
_doc = _array[cursor];
return _doc;
}
else{
cursor = -(index+1);
if (cursor>_array.length) {
_doc = DocIdSetIterator.NO_MORE_DOCS;
}
else {
_doc = _array[cursor];
}
return _doc;
}
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
cce11b616cd4dd2c68f894612aedba740bf82045 | 952789d549bf98b84ffc02cb895f38c95b85e12c | /V_3.x/Server/branches/SSO_Modifications_20130912/SpagoBIJPivotEngine/JavaSource/it/eng/spagobi/jpivotaddins/roles/SpagoBIFilterDynamicSchemaProcessor.java | b7d60f739d603a0d7c656dc9fa9e353e2554222f | [] | no_license | emtee40/testingazuan | de6342378258fcd4e7cbb3133bb7eed0ebfebeee | f3bd91014e1b43f2538194a5eb4e92081d2ac3ae | refs/heads/master | 2020-03-26T08:42:50.873491 | 2015-01-09T16:17:08 | 2015-01-09T16:17:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,501 | java | /* SpagoBI, the Open Source Business Intelligence suite
* Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0, without the "Incompatible With Secondary Licenses" notice.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package it.eng.spagobi.jpivotaddins.roles;
import java.io.File;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import mondrian.olap.Util;
import mondrian.spi.impl.FilterDynamicSchemaProcessor;
import org.apache.log4j.Logger;
import sun.misc.BASE64Decoder;
public class SpagoBIFilterDynamicSchemaProcessor extends
FilterDynamicSchemaProcessor {
private static Logger logger = Logger.getLogger(SpagoBIFilterDynamicSchemaProcessor.class);
private static final BASE64Decoder DECODER = new BASE64Decoder();
Integer indexProgression = null;
protected String filter(String schemaUrl, Util.PropertyList connectInfo, InputStream stream) throws Exception {
logger.debug("IN");
String originalSchema = super.filter(schemaUrl, connectInfo, stream);
String modifiedSchema = originalSchema;
// search for profile attributes to substitute in schema definition, identified by $P{attribute_name}
indexProgression = Integer.valueOf(0);
String att = findProfileAttributeInSchema(originalSchema);
while(att != null){
// if value is null I put null, if instead there is no the attribute name in connectInfo I don't substitute
if (connectInfo.get(att) != null) {
String attrValueBase64 = connectInfo.get(att);
logger.debug("Attribute value in Base64 encoding is " + attrValueBase64);
String value = null;
try {
value = new String(DECODER.decodeBuffer(attrValueBase64), "UTF-8");
} catch (UnsupportedEncodingException e) {
logger.error("UTF-8 encoding not supported!!!!!", e);
value = new String(DECODER.decodeBuffer(attrValueBase64));
}
logger.debug("change attribute " + att + " with [" + value + "]");
modifiedSchema = modifiedSchema.replaceAll("\\$\\{"+att+"\\}", value);
}
att = findProfileAttributeInSchema(modifiedSchema);
}
logger.debug("OUT: modified schema is:\n" + modifiedSchema);
return modifiedSchema;
}
public String processSchema(
String schemaUrl,
Util.PropertyList connectInfo) throws Exception {
logger.debug("IN: schemaUrl: " + schemaUrl);
try {
if (schemaUrl.startsWith("file:")) {
schemaUrl = schemaUrl.substring("file:".length());
}
File schemaFile = new File(schemaUrl);
schemaUrl = schemaFile.getAbsolutePath();
logger.debug("Absolute file path: " + schemaUrl);
return super.processSchema(schemaUrl, connectInfo);
} finally {
logger.debug("OUT");
}
}
/** return the first profile attribute in schema
*
* @param schema
* @param indexProgression. keeps track of the last found index to go always ahead in reading
* @return
*/
public String findProfileAttributeInSchema(String schema){
logger.debug("IN");
String toReturn = null;
int index = schema.indexOf("${", indexProgression);
if (index != -1) {
int indexEnd = schema.indexOf("}", index );
toReturn = schema.substring(index+2, indexEnd);
indexProgression = new Integer(indexEnd);
}
logger.debug("OUT");
return toReturn;
}
}
| [
"zerbetto@99afaf0d-6903-0410-885a-c66a8bbb5f81"
] | zerbetto@99afaf0d-6903-0410-885a-c66a8bbb5f81 |
e594fe6e670f06fab9990cf3f33377158cd23a04 | d2cdf2e6f45c40b918f6484a6d051165134a5e86 | /old/dekaf-postgres/src/test/java/org/jetbrains/dekaf/jdbc/PostgresJdbcIntegrationTests.java | cb4026f6d2d5b0538672865208b326bf0a1ab487 | [
"Apache-2.0"
] | permissive | JetBrains/dekaf | 6d4ffcd7ad2061627c109ac526ff4fa50a662458 | ceb7e2b58c2426e3ed61816ca3556ecc6dceab39 | refs/heads/master | 2023-08-30T10:34:18.669759 | 2022-10-28T12:24:31 | 2022-10-28T12:24:31 | 11,392,749 | 50 | 12 | Apache-2.0 | 2022-10-28T12:39:36 | 2013-07-13T19:03:51 | Java | UTF-8 | Java | false | false | 383 | java | package org.jetbrains.dekaf.jdbc;
/**
* @author Leonid Bushuev from JetBrains
*/
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
PostgresInterServiceProviderTest.class
})
public class PostgresJdbcIntegrationTests {
static {
System.setProperty("java.awt.headless", "true");
}
}
| [
"leonidos@gmail.com"
] | leonidos@gmail.com |
30806832347d043a2fd76941e139a4cf2774eb18 | 8d50d8643efd1eb1b3daefe2d5154d8124f054d8 | /hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java | d1b12292ab1e587387e73d56324a6a2211fe6811 | [
"Apache-2.0",
"CPL-1.0",
"MPL-1.0"
] | permissive | Jackygq1982/hbase_src | e62b8df083dd7c3147f043a650cea38953c3d5e2 | 46af6d35b4adcdbf7f31a0655daa5040929a9622 | refs/heads/master | 2021-01-19T14:07:42.629014 | 2014-11-27T23:46:55 | 2014-11-27T23:46:55 | 27,230,419 | 0 | 1 | Apache-2.0 | 2023-03-20T11:57:03 | 2014-11-27T15:10:07 | Java | UTF-8 | Java | false | false | 6,585 | 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.hadoop.hbase.regionserver;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.exceptions.DeserializationException;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.FSTableDescriptors;
import org.apache.hadoop.hbase.util.MD5Hash;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@Category(SmallTests.class)
public class TestHRegionInfo {
@Test
public void testPb() throws DeserializationException {
HRegionInfo hri = HRegionInfo.FIRST_META_REGIONINFO;
byte [] bytes = hri.toByteArray();
HRegionInfo pbhri = HRegionInfo.parseFrom(bytes);
assertTrue(hri.equals(pbhri));
}
@Test
public void testReadAndWriteHRegionInfoFile() throws IOException, InterruptedException {
HBaseTestingUtility htu = new HBaseTestingUtility();
HRegionInfo hri = HRegionInfo.FIRST_META_REGIONINFO;
Path basedir = htu.getDataTestDir();
FSTableDescriptors fsTableDescriptors = new FSTableDescriptors(htu.getConfiguration());
// Create a region. That'll write the .regioninfo file.
HRegion r = HRegion.createHRegion(hri, basedir, htu.getConfiguration(),
fsTableDescriptors.get(TableName.META_TABLE_NAME));
// Get modtime on the file.
long modtime = getModTime(r);
HRegion.closeHRegion(r);
Thread.sleep(1001);
r = HRegion.openHRegion(basedir, hri, fsTableDescriptors.get(TableName.META_TABLE_NAME),
null, htu.getConfiguration());
// Ensure the file is not written for a second time.
long modtime2 = getModTime(r);
assertEquals(modtime, modtime2);
// Now load the file.
HRegionInfo deserializedHri = HRegionFileSystem.loadRegionInfoFileContent(
r.getRegionFileSystem().getFileSystem(), r.getRegionFileSystem().getRegionDir());
assertTrue(hri.equals(deserializedHri));
}
long getModTime(final HRegion r) throws IOException {
FileStatus[] statuses = r.getRegionFileSystem().getFileSystem().listStatus(
new Path(r.getRegionFileSystem().getRegionDir(), HRegionFileSystem.REGION_INFO_FILE));
assertTrue(statuses != null && statuses.length == 1);
return statuses[0].getModificationTime();
}
@Test
public void testCreateHRegionInfoName() throws Exception {
String tableName = "tablename";
final TableName tn = TableName.valueOf(tableName);
String startKey = "startkey";
final byte[] sk = Bytes.toBytes(startKey);
String id = "id";
// old format region name
byte [] name = HRegionInfo.createRegionName(tn, sk, id, false);
String nameStr = Bytes.toString(name);
assertEquals(tableName + "," + startKey + "," + id, nameStr);
// new format region name.
String md5HashInHex = MD5Hash.getMD5AsHex(name);
assertEquals(HRegionInfo.MD5_HEX_LENGTH, md5HashInHex.length());
name = HRegionInfo.createRegionName(tn, sk, id, true);
nameStr = Bytes.toString(name);
assertEquals(tableName + "," + startKey + ","
+ id + "." + md5HashInHex + ".",
nameStr);
}
@Test
public void testContainsRange() {
HTableDescriptor tableDesc = new HTableDescriptor(TableName.valueOf("testtable"));
HRegionInfo hri = new HRegionInfo(
tableDesc.getTableName(), Bytes.toBytes("a"), Bytes.toBytes("g"));
// Single row range at start of region
assertTrue(hri.containsRange(Bytes.toBytes("a"), Bytes.toBytes("a")));
// Fully contained range
assertTrue(hri.containsRange(Bytes.toBytes("b"), Bytes.toBytes("c")));
// Range overlapping start of region
assertTrue(hri.containsRange(Bytes.toBytes("a"), Bytes.toBytes("c")));
// Fully contained single-row range
assertTrue(hri.containsRange(Bytes.toBytes("c"), Bytes.toBytes("c")));
// Range that overlaps end key and hence doesn't fit
assertFalse(hri.containsRange(Bytes.toBytes("a"), Bytes.toBytes("g")));
// Single row range on end key
assertFalse(hri.containsRange(Bytes.toBytes("g"), Bytes.toBytes("g")));
// Single row range entirely outside
assertFalse(hri.containsRange(Bytes.toBytes("z"), Bytes.toBytes("z")));
// Degenerate range
try {
hri.containsRange(Bytes.toBytes("z"), Bytes.toBytes("a"));
fail("Invalid range did not throw IAE");
} catch (IllegalArgumentException iae) {
}
}
@Test
public void testLastRegionCompare() {
HTableDescriptor tableDesc = new HTableDescriptor(TableName.valueOf("testtable"));
HRegionInfo hrip = new HRegionInfo(
tableDesc.getTableName(), Bytes.toBytes("a"), new byte[0]);
HRegionInfo hric = new HRegionInfo(
tableDesc.getTableName(), Bytes.toBytes("a"), Bytes.toBytes("b"));
assertTrue(hrip.compareTo(hric) > 0);
}
@Test
public void testMetaTables() {
assertTrue(HRegionInfo.FIRST_META_REGIONINFO.isMetaTable());
}
@Test
public void testComparator() {
TableName tablename = TableName.valueOf("comparatorTablename");
byte[] empty = new byte[0];
HRegionInfo older = new HRegionInfo(tablename, empty, empty, false, 0L);
HRegionInfo newer = new HRegionInfo(tablename, empty, empty, false, 1L);
assertTrue(older.compareTo(newer) < 0);
assertTrue(newer.compareTo(older) > 0);
assertTrue(older.compareTo(older) == 0);
assertTrue(newer.compareTo(newer) == 0);
}
}
| [
"Jackygq1982@gq1.(none)"
] | Jackygq1982@gq1.(none) |
0d7808b3562f8a210302e061627ade60eadcfb84 | efbfbad75813b92ba0cce0df492fe6c7cf41a8c6 | /basic-value-straight/src/main/java/example/controller/Controller.java | 52323194cd3f3ac5c7be5dbf87b0dc0899dd4794 | [] | no_license | sergueik/springboot_study | d4636cd255cdaec07a22276393541a7dd9bb97c1 | 59c87d64d0d8d5e2eae6fe496b2a84425208fcfd | refs/heads/master | 2023-09-01T14:04:34.285473 | 2023-08-31T22:29:09 | 2023-08-31T22:29:09 | 101,407,389 | 5 | 6 | null | 2023-03-04T00:57:19 | 2017-08-25T13:38:05 | Java | UTF-8 | Java | false | false | 1,001 | java | package example.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import example.configuration.ValuesConfig;
import example.utils.Utils;
@Component
@RestController
@RequestMapping("/basic")
public class Controller {
@Value("${value}")
private String value;
// @Autowired
ValuesConfig valueConfig = new ValuesConfig();
@GetMapping(value = "/nullvalue", produces = MediaType.TEXT_PLAIN_VALUE)
public String nullValue() {
// return "value: " + valueConfig.getValueFromFile();
return value;
}
@GetMapping(value = "/value", produces = MediaType.TEXT_PLAIN_VALUE)
public String value() {
return new Utils().getValue();
}
}
| [
"kouzmine_serguei@yahoo.com"
] | kouzmine_serguei@yahoo.com |
2efafa4f543216945aae4aa123ba69de6b60bf55 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/protocal/protobuf/C23401ix.java | 85fd2ee5f70d75e671184e30b10f1f0d3ebe4fc0 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,059 | java | package com.tencent.p177mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.p205bt.C1331a;
import java.util.LinkedList;
import p690e.p691a.p692a.C6087a;
import p690e.p691a.p692a.p693a.C6086a;
import p690e.p691a.p692a.p695b.p697b.C6091a;
import p690e.p691a.p692a.p698c.C6093a;
/* renamed from: com.tencent.mm.protocal.protobuf.ix */
public final class C23401ix extends bsr {
public int Scene;
public LinkedList<cwz> vKs = new LinkedList();
public C23401ix() {
AppMethodBeat.m2504i(96205);
AppMethodBeat.m2505o(96205);
}
/* renamed from: op */
public final int mo4669op(int i, Object... objArr) {
AppMethodBeat.m2504i(96206);
int ix;
byte[] bArr;
if (i == 0) {
C6093a c6093a = (C6093a) objArr[0];
if (this.BaseRequest != null) {
c6093a.mo13479iy(1, this.BaseRequest.computeSize());
this.BaseRequest.writeFields(c6093a);
}
c6093a.mo13474e(2, 8, this.vKs);
c6093a.mo13480iz(3, this.Scene);
AppMethodBeat.m2505o(96206);
return 0;
} else if (i == 1) {
if (this.BaseRequest != null) {
ix = C6087a.m9557ix(1, this.BaseRequest.computeSize()) + 0;
} else {
ix = 0;
}
int c = (ix + C6087a.m9552c(2, 8, this.vKs)) + C6091a.m9572bs(3, this.Scene);
AppMethodBeat.m2505o(96206);
return c;
} else if (i == 2) {
bArr = (byte[]) objArr[0];
this.vKs.clear();
C6086a c6086a = new C6086a(bArr, unknownTagHandler);
for (ix = C1331a.getNextFieldNumber(c6086a); ix > 0; ix = C1331a.getNextFieldNumber(c6086a)) {
if (!super.populateBuilderWithField(c6086a, this, ix)) {
c6086a.ems();
}
}
AppMethodBeat.m2505o(96206);
return 0;
} else if (i == 3) {
C6086a c6086a2 = (C6086a) objArr[0];
C23401ix c23401ix = (C23401ix) objArr[1];
int intValue = ((Integer) objArr[2]).intValue();
LinkedList Vh;
int size;
C6086a c6086a3;
boolean z;
switch (intValue) {
case 1:
Vh = c6086a2.mo13445Vh(intValue);
size = Vh.size();
for (intValue = 0; intValue < size; intValue++) {
bArr = (byte[]) Vh.get(intValue);
C7267hl c7267hl = new C7267hl();
c6086a3 = new C6086a(bArr, unknownTagHandler);
for (z = true; z; z = c7267hl.populateBuilderWithField(c6086a3, c7267hl, C1331a.getNextFieldNumber(c6086a3))) {
}
c23401ix.BaseRequest = c7267hl;
}
AppMethodBeat.m2505o(96206);
return 0;
case 2:
Vh = c6086a2.mo13445Vh(intValue);
size = Vh.size();
for (intValue = 0; intValue < size; intValue++) {
bArr = (byte[]) Vh.get(intValue);
cwz cwz = new cwz();
c6086a3 = new C6086a(bArr, unknownTagHandler);
for (z = true; z; z = cwz.populateBuilderWithField(c6086a3, cwz, C1331a.getNextFieldNumber(c6086a3))) {
}
c23401ix.vKs.add(cwz);
}
AppMethodBeat.m2505o(96206);
return 0;
case 3:
c23401ix.Scene = c6086a2.BTU.mo13458vd();
AppMethodBeat.m2505o(96206);
return 0;
default:
AppMethodBeat.m2505o(96206);
return -1;
}
} else {
AppMethodBeat.m2505o(96206);
return -1;
}
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
ea851696394149c7e7d1d745d6a9dd32d559af9a | 1248854bf3924bdad8754137760f7cb30c65eff5 | /ups-cart-cli/src/main/java/org/jboss/aerogear/unifiedpush/utils/variant/generation/RandomVariantGeneration.java | 600977a067442b98a42464f93155311d54240d9b | [
"Apache-2.0"
] | permissive | AdamSaleh/aerogear-testing-tools | 506371aec49179d28fedfcb6149e7bf8b449c698 | 3e103757d3de69ba89bce99389aa0bef5f4ee63e | refs/heads/master | 2021-01-22T06:44:09.099199 | 2014-09-26T15:12:14 | 2014-09-26T15:12:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,707 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* 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.jboss.aerogear.unifiedpush.utils.variant.generation;
import java.util.ArrayList;
import java.util.List;
import org.jboss.aerogear.unifiedpush.api.Variant;
import org.jboss.aerogear.unifiedpush.api.VariantType;
import org.jboss.aerogear.unifiedpush.utils.RandomUtils;
import org.jboss.aerogear.unifiedpush.utils.variant.VariantMetadata;
/**
* Type of generated variant will be random.
*
* @author <a href="mailto:smikloso@redhat.com">Stefan Miklosovic</a>
*
*/
public class RandomVariantGeneration implements VariantGenerationStrategy {
@Override
public List<Variant> generate(int count, VariantMetadata metadata) {
List<Variant> variants = new ArrayList<Variant>();
for (int i = 0; i < count; i++) {
variants.add(VariantGeneratorUtil.getVariant(VariantType.values()[RandomUtils.randInt(0, 2)], metadata));
}
return variants;
}
}
| [
"smikloso@redhat.com"
] | smikloso@redhat.com |
8de97c53db5df7365d2435b62fc914dd954d639c | 8c8667eeef6487bce01d612d5e948355256b39ac | /oficina/src/main/java/mx/babel/bansefi/banksystem/oficina/webservices/cuadreArqueoPuesto/ObjectFactory.java | d86e59f57f46947adca292d8990d4ff8a1070b65 | [] | no_license | JesusGui/ProyectoBansefi | 7c0c228943be245bf69d1d2a9fe7f40a0a04db9f | 4b6caa502c279c51231d0f5f8cb0399813c233e2 | refs/heads/master | 2020-03-28T14:38:44.536238 | 2018-09-12T16:08:16 | 2018-09-12T16:08:16 | 148,507,197 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,424 | java |
package mx.babel.bansefi.banksystem.oficina.webservices.cuadreArqueoPuesto;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the mx.babel.bansefi.banksystem.oficina.webservices.cuadreArqueoPuesto package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName EJECUTAR_RESULT_QNAME = new QName(mx.babel.arq.comun.constants.ServicioWebConstants.SOAP_PORT_URL_TRN + "TR_CUADRE_HOST_TRN", "EjecutarResult");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: mx.babel.bansefi.banksystem.oficina.webservices.cuadreArqueoPuesto
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link Ejecutar }
*
*/
public Ejecutar createEjecutar() {
return new Ejecutar();
}
/**
* Create an instance of {@link ResponseBansefi }
*
*/
public ResponseBansefi createResponseBansefi() {
return new ResponseBansefi();
}
/**
* Create an instance of {@link ResponseBansefi.OTRCUADREHOSTTRNO }
*
*/
public ResponseBansefi.OTRCUADREHOSTTRNO createResponseBansefiOTRCUADREHOSTTRNO() {
return new ResponseBansefi.OTRCUADREHOSTTRNO();
}
/**
* Create an instance of {@link Ejecutar.ITRCUADREHOSTTRNI }
*
*/
public Ejecutar.ITRCUADREHOSTTRNI createEjecutarITRCUADREHOSTTRNI() {
return new Ejecutar.ITRCUADREHOSTTRNI();
}
/**
* Create an instance of {@link Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY }
*
*/
public Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY createEjecutarITRCUADREHOSTTRNITRCUADREHOSTEVTY() {
return new Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY();
}
/**
* Create an instance of {@link EjecutarResponse }
*
*/
public EjecutarResponse createEjecutarResponse() {
return new EjecutarResponse();
}
/**
* Create an instance of {@link EjecutarResult }
*
*/
public EjecutarResult createEjecutarResult() {
return new EjecutarResult();
}
/**
* Create an instance of {@link ResponseBansefi.OTRCUADREHOSTTRNO.STDMSJPARMV }
*
*/
public ResponseBansefi.OTRCUADREHOSTTRNO.STDMSJPARMV createResponseBansefiOTRCUADREHOSTTRNOSTDMSJPARMV() {
return new ResponseBansefi.OTRCUADREHOSTTRNO.STDMSJPARMV();
}
/**
* Create an instance of {@link Ejecutar.ITRCUADREHOSTTRNI.STDAPPLPARMV }
*
*/
public Ejecutar.ITRCUADREHOSTTRNI.STDAPPLPARMV createEjecutarITRCUADREHOSTTRNISTDAPPLPARMV() {
return new Ejecutar.ITRCUADREHOSTTRNI.STDAPPLPARMV();
}
/**
* Create an instance of {@link Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY.TNEXLOCALT }
*
*/
public Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY.TNEXLOCALT createEjecutarITRCUADREHOSTTRNITRCUADREHOSTEVTYTNEXLOCALT() {
return new Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY.TNEXLOCALT();
}
/**
* Create an instance of {@link Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY.TERMINALV }
*
*/
public Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY.TERMINALV createEjecutarITRCUADREHOSTTRNITRCUADREHOSTEVTYTERMINALV() {
return new Ejecutar.ITRCUADREHOSTTRNI.TRCUADREHOSTEVTY.TERMINALV();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link EjecutarResult }{@code >}}
*
*/
@XmlElementDecl(namespace = mx.babel.arq.comun.constants.ServicioWebConstants.SOAP_PORT_URL_TRN + "TR_CUADRE_HOST_TRN", name = "EjecutarResult")
public JAXBElement<EjecutarResult> createEjecutarResult(EjecutarResult value) {
return new JAXBElement<EjecutarResult>(EJECUTAR_RESULT_QNAME, EjecutarResult.class, null, value);
}
}
| [
"jesusguillermomendez@gmail.com"
] | jesusguillermomendez@gmail.com |
02b01cb38a88542d12bd1bf41d7794b2ce6350ef | e6a2c1eec9b80f1f58d49a9738bb11b386ad0278 | /src/main/java/pl/java/scalatech/domain/exerciseOne/Project.java | cf6b86464ba0cd9da3f60e6fef1c3f3eaa365a24 | [
"MIT"
] | permissive | kurmivivek295/springJpaKata | 2e528b38c6cf08f910c098027695ac2c90be0c8d | 8d2790707a0ca3c2cce3b732d066393d06d2c5e8 | refs/heads/master | 2021-05-31T12:57:41.414871 | 2016-07-13T14:22:18 | 2016-07-13T14:22:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 943 | java | package pl.java.scalatech.domain.exerciseOne;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import pl.java.scalatech.domain.AbstractEntity;
@Entity
@Table(name = "PROJECT_EXERCISE")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Project extends AbstractEntity{
@Column(name = "NAME")
protected String name;
@ManyToMany
@JoinTable(
name = "PROJECT_EMPLOYEE",
joinColumns = @JoinColumn(name = "EMPLOYEES_ID"),
inverseJoinColumns = @JoinColumn(name = "PROJECTS_ID")
)
protected Collection<Employee> employees = new ArrayList<>();
}
| [
"przodownik@tlen.pl"
] | przodownik@tlen.pl |
7e8a23c897cca8807f61c9cbd490ccabcd17b014 | 0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7 | /JavaSource/dream/work/pm/list/service/spring/WorkPmListEquipDetailServiceImpl.java | 84fabe21672bd24799c8d85c7ff4401cdd6b629c | [] | no_license | eMainTec-DREAM/DREAM | bbf928b5c50dd416e1d45db3722f6c9e35d8973c | 05e3ea85f9adb6ad6cbe02f4af44d941400a1620 | refs/heads/master | 2020-12-22T20:44:44.387788 | 2020-01-29T06:47:47 | 2020-01-29T06:47:47 | 236,912,749 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 5,502 | java | package dream.work.pm.list.service.spring;
import java.net.URISyntaxException;
import java.security.InvalidKeyException;
import java.util.List;
import com.microsoft.azure.storage.StorageException;
import common.bean.User;
import common.util.FileUtil;
import dream.work.pm.list.dao.MaPmMstrDetailDAO;
import dream.work.pm.list.dao.WorkPmListEquipDetailDAO;
import dream.work.pm.list.dto.MaPmMstrCommonDTO;
import dream.work.pm.list.dto.WorkPmListEquipDetailDTO;
import dream.work.pm.list.service.WorkPmListEquipDetailService;
/**
* 예방설비
* @author kim21017
* @version $Id: WorkPmListEquipDetailServiceImpl.java,v 1.0 2015/12/04 09:10:27 kim21017 Exp $
* @since 1.0
*
* @spring.bean id="workPmListEquipDetailServiceTarget"
* @spring.txbn id="workPmListEquipDetailService"
* @spring.property name="workPmListEquipDetailDAO" ref="workPmListEquipDetailDAO"
* @spring.property name="maPmMstrDetailDAO" ref="maPmMstrDetailDAO"
*/
public class WorkPmListEquipDetailServiceImpl implements WorkPmListEquipDetailService
{
private WorkPmListEquipDetailDAO workPmListEquipDetailDAO = null;
private MaPmMstrDetailDAO maPmMstrDetailDAO = null;
public MaPmMstrDetailDAO getMaPmMstrDetailDAO() {
return maPmMstrDetailDAO;
}
public void setMaPmMstrDetailDAO(MaPmMstrDetailDAO maPmMstrDetailDAO) {
this.maPmMstrDetailDAO = maPmMstrDetailDAO;
}
public WorkPmListEquipDetailDAO getWorkPmListEquipDetailDAO() {
return workPmListEquipDetailDAO;
}
public void setWorkPmListEquipDetailDAO(WorkPmListEquipDetailDAO workPmListEquipDetailDAO) {
this.workPmListEquipDetailDAO = workPmListEquipDetailDAO;
}
public WorkPmListEquipDetailDTO findDetail(String pmId, String pmEquipId, User user)throws Exception
{
List resultList = FileUtil.makeSlideImg(pmEquipId, "PMWMSTR");
WorkPmListEquipDetailDTO workPmListEquipDetailDTO = workPmListEquipDetailDAO.findDetail(pmId, pmEquipId, user);
workPmListEquipDetailDTO.setSlideFileList(resultList);
return workPmListEquipDetailDTO;
}
public int updateDetail(WorkPmListEquipDetailDTO workPmListEquipDetailDTO, MaPmMstrCommonDTO maPmMstrCommonDTO, User user) throws Exception
{
int rtnValue = 0;
rtnValue = workPmListEquipDetailDAO.updateDetail(workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
if("PMC".equals(maPmMstrCommonDTO.getWoType()))
{
workPmListEquipDetailDAO.mergeEqPmCycle(workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
}
if ("N".equals(workPmListEquipDetailDTO.getIsActive())){
//모든 일정을 삭제함.
workPmListEquipDetailDAO.deletePmSchedulePmEQuip(user.getCompNo(),workPmListEquipDetailDTO.getPmEquipId());
}else if("Y".equals(workPmListEquipDetailDTO.getIsActive())){
if(!workPmListEquipDetailDTO.getOldInitWrkDate().replaceAll("-", "").equals(workPmListEquipDetailDTO.getInitWrkDate().replaceAll("-", ""))){
// 시작일자를 변경했으므로 스케쥴 날짜도 변경해야 함.
rtnValue = workPmListEquipDetailDAO.updateLastSchedDate(workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
//스케쥴을 다시 생성해야 함.
rtnValue = maPmMstrDetailDAO.createPmSchedule(user.getCompNo(), maPmMstrCommonDTO.getPmId(), user.getEmpId());
rtnValue = maPmMstrDetailDAO.createWorkOrder(user.getCompNo(), maPmMstrCommonDTO.getPmId());
}
}
rtnValue = workPmListEquipDetailDAO.updateSchedEquipDetail(workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
return rtnValue;
}
public int insertDetail(WorkPmListEquipDetailDTO workPmListEquipDetailDTO, MaPmMstrCommonDTO maPmMstrCommonDTO, User user) throws Exception
{
int rtnValue = 0;
if("PMC".equals(maPmMstrCommonDTO.getWoType()))
{
workPmListEquipDetailDAO.mergeEqPmCycle(workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
}
rtnValue = workPmListEquipDetailDAO.insertDetail( workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
if ("N".equals(workPmListEquipDetailDTO.getIsActive())){
//모든 일정을 삭제함.
workPmListEquipDetailDAO.deletePmSchedulePmEQuip(user.getCompNo(),workPmListEquipDetailDTO.getPmEquipId());
}else if("Y".equals(workPmListEquipDetailDTO.getIsActive())){
if(!workPmListEquipDetailDTO.getOldInitWrkDate().replaceAll("-", "").equals(workPmListEquipDetailDTO.getInitWrkDate().replaceAll("-", ""))){
// 시작일자를 변경했으므로 스케쥴 날짜도 변경해야 함.
rtnValue = workPmListEquipDetailDAO.updateLastSchedDate(workPmListEquipDetailDTO, maPmMstrCommonDTO, user);
//스케쥴을 다시 생성해야 함.
rtnValue = maPmMstrDetailDAO.createPmSchedule(user.getCompNo(), maPmMstrCommonDTO.getPmId(), user.getEmpId());
rtnValue = maPmMstrDetailDAO.createWorkOrder(user.getCompNo(), maPmMstrCommonDTO.getPmId());
}
}
return rtnValue;
}
public List findSlideImage(WorkPmListEquipDetailDTO workPmListEquipDetailDTO, User user)
throws InvalidKeyException, URISyntaxException, StorageException {
return FileUtil.makeSlideImg(workPmListEquipDetailDTO.getPmEquipId(), "PMWMSTR");
}
}
| [
"HN4741@10.31.0.185"
] | HN4741@10.31.0.185 |
e5a5f920af9b033c38263bf065d2d4b0a768acc9 | d2eb8ae49eb56c2b2ae63e5c84b9798c1330709b | /StrategyFactorySingleton/src/strategyfactorysingleton/dominio/Controller.java | d6073529dd9a97fb8814195208729b9a2ee1720f | [] | no_license | n1c0la84/DesignPatterns | 9c54aad5bbe1be1791e598545b17e0e973001047 | 46cb1533d472a267d9a8ce4045484535146f1687 | refs/heads/master | 2021-07-05T06:39:32.321098 | 2017-09-29T12:12:48 | 2017-09-29T12:12:48 | 105,182,434 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 570 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package strategyfactorysingleton.dominio;
import strategyfactorysingleton.dominio.strategies.AbstractStrategy;
import java.awt.Color;
/**
*
* @author sadboy84
*/
public class Controller {
public Color dimmiColoreSfondo () {
Factory factory = Factory.getInstance(); //per Singleton
AbstractStrategy strategy = factory.getStrategy(); //per Factory
Color color = strategy.dimmiColoreSfondo(); //per Stategy
return color;
}
}
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
9256c2e492975e97362374f5aa2abb188383e1a8 | 286cd3bec921be71be72022040b07985c703d9ef | /JavaSE/General/src/main/java/collection/MapTest.java | 227ec4a86a2649debe1a7fa6260befc9f3464e1b | [] | no_license | SkyFervor/Study | 13198979b297846d99db8c7063be5e1b5ee9c22e | a6645cee0b19602ba290f93e1daa009ec01d76b4 | refs/heads/next | 2022-12-22T09:43:02.259109 | 2020-05-19T07:00:08 | 2020-05-19T07:00:08 | 109,661,669 | 2 | 0 | null | 2022-12-16T15:30:37 | 2017-11-06T07:28:19 | Java | UTF-8 | Java | false | false | 771 | java | package collection;
import java.util.*;
import java.util.stream.Collectors;
public class MapTest {
public static void main(String[] args) {
test1();
testPutIfAbsent();
}
public static void test1() {
List<Integer> allValues = new HashMap<Integer, List<Integer>>().values().stream()
.flatMap(Collection::stream)
.collect(Collectors.toList());
System.out.println(allValues);
}
public static void testPutIfAbsent() {
Map<Integer, List<Integer>> map = new HashMap<>();
List<Integer> value = map.putIfAbsent(1, new ArrayList<>());
System.out.println(null != value && value.add(1));
System.out.println(map);
value = map.putIfAbsent(1, new ArrayList<>());
System.out.println(null != value && value.add(1));
System.out.println(map);
}
}
| [
"skyfervor@gmail.com"
] | skyfervor@gmail.com |
e73267764b4f5d969f4da64f7d72fb2bb5b13f88 | b7207332ca85e2762f0441980f6dcae48d1e6e0d | /app/src/main/java/bus/sa/isl/busstop/Activity/DriveDetailListActivity.java | 71ceef89c150accb4053f90be5ccf5f26b06f9c3 | [] | no_license | kluge121/BusRoadDriver | f54b76058d3ab242620c852ff7146231ca0aed20 | 29587d4fcf5b1459937a982e78f1d6f0c0182570 | refs/heads/master | 2020-03-08T20:16:30.896342 | 2018-04-06T10:00:31 | 2018-04-06T10:00:31 | 128,378,053 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 376 | java | package bus.sa.isl.busstop.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import bus.sa.isl.busstop.Set.Font;
/**
* Created by alstn on 2017-08-18.
*/
public class DriveDetailListActivity extends Font {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
}
| [
"kluge0221@gmail.com"
] | kluge0221@gmail.com |
61e0533cc2b1ed299ab646511963a1606c94ddae | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Jetty/Jetty5771.java | 568756e2dc23eda176507253cba44db1b06a7f17 | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 942 | java | @Test
public void testReadableByteChannel() throws Exception
{
Path dir = testdir.getPath().normalize().toRealPath();
Files.createDirectories(dir);
Path file = dir.resolve("foo");
String content = "Foo is here";
try (StringReader reader = new StringReader(content);
BufferedWriter writer = Files.newBufferedWriter(file))
{
IO.copy(reader,writer);
}
try (Resource base = newResource(dir.toFile()))
{
Resource foo = base.addPath("foo");
try (ReadableByteChannel channel = foo.getReadableByteChannel())
{
ByteBuffer buf = ByteBuffer.allocate(256);
channel.read(buf);
buf.flip();
String actual = BufferUtil.toUTF8String(buf);
assertThat("ReadableByteChannel content",actual,is(content));
}
}
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
88a89069c7a36c97d0c523c49722ca178b2beec2 | 1ac1226c8eaa15667bc8f5305443b66a98c9be7d | /basetool/src/main/java/com/zhuyongdi/basetool/tool/XXListUtil.java | 13572666d12a4f87ff38445244c30368ffd0616a | [] | no_license | zhuyongdi/Project_BaseTool | 266384cea25681d65570be37899d4993c92e1d68 | 835fd41583619a25117600237bf0126f4e02e472 | refs/heads/master | 2020-05-21T07:22:26.381619 | 2019-09-02T02:34:08 | 2019-09-02T02:34:08 | 185,958,808 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,128 | java | package com.zhuyongdi.basetool.tool;
import java.util.List;
/**
* List工具类
* Created by ZhuYongdi on 2019/3/18.
*/
public class XXListUtil {
private XXListUtil() {
}
public static boolean isEmpty(List<?> list) {
return list == null || list.size() == 0;
}
public static boolean isNotEmpty(List<?> list) {
return list != null && list.size() != 0;
}
public static int size(List<?> list) {
return isEmpty(list) ? 0 : list.size();
}
public static void clearAll(List<?> list, int start, int end) {
if (start < 0 || end < 0) {
return;
}
int size = size(list);
if (end >= size) {
end = size - 1;
}
if (start > end) {
end = start;
}
int total = end - start + 1;
int removeCount = 0;
for (int i = 0; i < size; i++) {
if (i >= start && i <= end) {
list.remove(i - removeCount);
removeCount++;
}
if (removeCount == total) {
return;
}
}
}
}
| [
"904507761@qq.com"
] | 904507761@qq.com |
ed7dc1c273ba1f611952787a274990691ecc2a8f | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /packages/apps/Launcher2/src/com/android/launcher2/DropTarget.java | d627a4c2ee0466e45e905cc6aea034dfba73b729 | [
"MIT",
"Apache-2.0"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | Java | false | false | 6,530 | java | /*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.launcher2;
import android.content.Context;
import android.graphics.PointF;
import android.graphics.Rect;
import android.util.Log;
/**
* Interface defining an object that can receive a drag.
*
*/
public interface DropTarget {
public static final String TAG = "DropTarget";
class DragObject {
public int x = -1;
public int y = -1;
/** X offset from the upper-left corner of the cell to where we touched. */
public int xOffset = -1;
/** Y offset from the upper-left corner of the cell to where we touched. */
public int yOffset = -1;
/** This indicates whether a drag is in final stages, either drop or cancel. It
* differentiates onDragExit, since this is called when the drag is ending, above
* the current drag target, or when the drag moves off the current drag object.
*/
public boolean dragComplete = false;
/** The view that moves around while you drag. */
public DragView dragView = null;
/** The data associated with the object being dragged */
public Object dragInfo = null;
/** Where the drag originated */
public DragSource dragSource = null;
/** Post drag animation runnable */
public Runnable postAnimationRunnable = null;
/** Indicates that the drag operation was cancelled */
public boolean cancelled = false;
/** Defers removing the DragView from the DragLayer until after the drop animation. */
public boolean deferDragViewCleanupPostAnimation = true;
public DragObject() {
}
}
public static class DragEnforcer implements DragController.DragListener {
int dragParity = 0;
public DragEnforcer(Context context) {
Launcher launcher = (Launcher) context;
launcher.getDragController().addDragListener(this);
}
void onDragEnter() {
dragParity++;
if (dragParity != 1) {
Log.e(TAG, "onDragEnter: Drag contract violated: " + dragParity);
}
}
void onDragExit() {
dragParity--;
if (dragParity != 0) {
Log.e(TAG, "onDragExit: Drag contract violated: " + dragParity);
}
}
@Override
public void onDragStart(DragSource source, Object info, int dragAction) {
if (dragParity != 0) {
Log.e(TAG, "onDragEnter: Drag contract violated: " + dragParity);
}
}
@Override
public void onDragEnd() {
if (dragParity != 0) {
Log.e(TAG, "onDragExit: Drag contract violated: " + dragParity);
}
}
}
/**
* Used to temporarily disable certain drop targets
*
* @return boolean specifying whether this drop target is currently enabled
*/
boolean isDropEnabled();
/**
* Handle an object being dropped on the DropTarget
*
* @param source DragSource where the drag started
* @param x X coordinate of the drop location
* @param y Y coordinate of the drop location
* @param xOffset Horizontal offset with the object being dragged where the original
* touch happened
* @param yOffset Vertical offset with the object being dragged where the original
* touch happened
* @param dragView The DragView that's being dragged around on screen.
* @param dragInfo Data associated with the object being dragged
*
*/
void onDrop(DragObject dragObject);
void onDragEnter(DragObject dragObject);
void onDragOver(DragObject dragObject);
void onDragExit(DragObject dragObject);
/**
* Handle an object being dropped as a result of flinging to delete and will be called in place
* of onDrop(). (This is only called on objects that are set as the DragController's
* fling-to-delete target.
*/
void onFlingToDelete(DragObject dragObject, int x, int y, PointF vec);
/**
* Allows a DropTarget to delegate drag and drop events to another object.
*
* Most subclasses will should just return null from this method.
*
* @param source DragSource where the drag started
* @param x X coordinate of the drop location
* @param y Y coordinate of the drop location
* @param xOffset Horizontal offset with the object being dragged where the original
* touch happened
* @param yOffset Vertical offset with the object being dragged where the original
* touch happened
* @param dragView The DragView that's being dragged around on screen.
* @param dragInfo Data associated with the object being dragged
*
* @return The DropTarget to delegate to, or null to not delegate to another object.
*/
DropTarget getDropTargetDelegate(DragObject dragObject);
/**
* Check if a drop action can occur at, or near, the requested location.
* This will be called just before onDrop.
*
* @param source DragSource where the drag started
* @param x X coordinate of the drop location
* @param y Y coordinate of the drop location
* @param xOffset Horizontal offset with the object being dragged where the
* original touch happened
* @param yOffset Vertical offset with the object being dragged where the
* original touch happened
* @param dragView The DragView that's being dragged around on screen.
* @param dragInfo Data associated with the object being dragged
* @return True if the drop will be accepted, false otherwise.
*/
boolean acceptDrop(DragObject dragObject);
// These methods are implemented in Views
void getHitRect(Rect outRect);
void getLocationInDragLayer(int[] loc);
int getLeft();
int getTop();
}
| [
"karun.matharu@gmail.com"
] | karun.matharu@gmail.com |
bcaff6715e3a72285fe463edd531536003787262 | fc6c869ee0228497e41bf357e2803713cdaed63e | /weixin6519android1140/src/sourcecode/com/tencent/mm/protocal/c/xq.java | 1e113013cf5d936d60b94a723839673d79d09165 | [] | no_license | hyb1234hi/reverse-wechat | cbd26658a667b0c498d2a26a403f93dbeb270b72 | 75d3fd35a2c8a0469dbb057cd16bca3b26c7e736 | refs/heads/master | 2020-09-26T10:12:47.484174 | 2017-11-16T06:54:20 | 2017-11-16T06:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,193 | java | package com.tencent.mm.protocal.c;
import b.a.a.b;
import com.tencent.gmtrace.GMTrace;
import java.util.LinkedList;
public final class xq
extends ayx
{
public String jHR;
public String rfM;
public String signature;
public String ufb;
public String uph;
public String upi;
public String upj;
public xq()
{
GMTrace.i(3652467032064L, 27213);
GMTrace.o(3652467032064L, 27213);
}
protected final int a(int paramInt, Object... paramVarArgs)
{
GMTrace.i(3652601249792L, 27214);
if (paramInt == 0)
{
paramVarArgs = (b.a.a.c.a)paramVarArgs[0];
if (this.ufb == null) {
throw new b("Not all required fields were included: corp_id");
}
if (this.uph == null) {
throw new b("Not all required fields were included: group_id");
}
if (this.rfM == null) {
throw new b("Not all required fields were included: time_stamp");
}
if (this.jHR == null) {
throw new b("Not all required fields were included: nonce_str");
}
if (this.signature == null) {
throw new b("Not all required fields were included: signature");
}
if (this.upi == null) {
throw new b("Not all required fields were included: from_url");
}
if (this.uNh != null)
{
paramVarArgs.fm(1, this.uNh.aYq());
this.uNh.a(paramVarArgs);
}
if (this.ufb != null) {
paramVarArgs.e(2, this.ufb);
}
if (this.uph != null) {
paramVarArgs.e(3, this.uph);
}
if (this.rfM != null) {
paramVarArgs.e(4, this.rfM);
}
if (this.jHR != null) {
paramVarArgs.e(5, this.jHR);
}
if (this.signature != null) {
paramVarArgs.e(6, this.signature);
}
if (this.upi != null) {
paramVarArgs.e(7, this.upi);
}
if (this.upj != null) {
paramVarArgs.e(8, this.upj);
}
GMTrace.o(3652601249792L, 27214);
return 0;
}
int i;
if (paramInt == 1)
{
i = 0;
if (this.uNh != null) {
i = b.a.a.a.fj(1, this.uNh.aYq()) + 0;
}
paramInt = i;
if (this.ufb != null) {
paramInt = i + b.a.a.b.b.a.f(2, this.ufb);
}
i = paramInt;
if (this.uph != null) {
i = paramInt + b.a.a.b.b.a.f(3, this.uph);
}
paramInt = i;
if (this.rfM != null) {
paramInt = i + b.a.a.b.b.a.f(4, this.rfM);
}
i = paramInt;
if (this.jHR != null) {
i = paramInt + b.a.a.b.b.a.f(5, this.jHR);
}
paramInt = i;
if (this.signature != null) {
paramInt = i + b.a.a.b.b.a.f(6, this.signature);
}
i = paramInt;
if (this.upi != null) {
i = paramInt + b.a.a.b.b.a.f(7, this.upi);
}
paramInt = i;
if (this.upj != null) {
paramInt = i + b.a.a.b.b.a.f(8, this.upj);
}
GMTrace.o(3652601249792L, 27214);
return paramInt;
}
if (paramInt == 2)
{
paramVarArgs = new b.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = ayx.a(paramVarArgs); paramInt > 0; paramInt = ayx.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.csW();
}
}
if (this.ufb == null) {
throw new b("Not all required fields were included: corp_id");
}
if (this.uph == null) {
throw new b("Not all required fields were included: group_id");
}
if (this.rfM == null) {
throw new b("Not all required fields were included: time_stamp");
}
if (this.jHR == null) {
throw new b("Not all required fields were included: nonce_str");
}
if (this.signature == null) {
throw new b("Not all required fields were included: signature");
}
if (this.upi == null) {
throw new b("Not all required fields were included: from_url");
}
GMTrace.o(3652601249792L, 27214);
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (b.a.a.a.a)paramVarArgs[0];
xq localxq = (xq)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
GMTrace.o(3652601249792L, 27214);
return -1;
case 1:
paramVarArgs = ((b.a.a.a.a)localObject1).Gv(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
Object localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new er();
localObject2 = new b.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (boolean bool = true; bool; bool = ((er)localObject1).a((b.a.a.a.a)localObject2, (com.tencent.mm.bm.a)localObject1, ayx.a((b.a.a.a.a)localObject2))) {}
localxq.uNh = ((er)localObject1);
paramInt += 1;
}
GMTrace.o(3652601249792L, 27214);
return 0;
case 2:
localxq.ufb = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
case 3:
localxq.uph = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
case 4:
localxq.rfM = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
case 5:
localxq.jHR = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
case 6:
localxq.signature = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
case 7:
localxq.upi = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
}
localxq.upj = ((b.a.a.a.a)localObject1).yqV.readString();
GMTrace.o(3652601249792L, 27214);
return 0;
}
GMTrace.o(3652601249792L, 27214);
return -1;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes-dex2jar.jar!\com\tencent\mm\protocal\c\xq.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"robert0825@gmail.com"
] | robert0825@gmail.com |
7512dd76ef110bb9e3788ea8326bbd6069c32cf8 | 573a66e4f4753cc0f145de8d60340b4dd6206607 | /JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362855/quickfix-1.7.0/quickfix-1.7.0/src/java/src/quickfix/field/EncodedAllocText.java | e83893c3c3127377b7088ffd1428494288e78149 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | mkaouer/Code-Smells-Detection-in-JavaScript | 3919ec0d445637a7f7c5f570c724082d42248e1b | 7130351703e19347884f95ce6d6ab1fb4f5cfbff | refs/heads/master | 2023-03-09T18:04:26.971934 | 2022-03-23T22:04:28 | 2022-03-23T22:04:28 | 73,915,037 | 8 | 3 | null | 2023-02-28T23:00:07 | 2016-11-16T11:47:44 | null | UTF-8 | Java | false | false | 305 | java | package quickfix.field;
import quickfix.StringField;
import java.util.Date;
public class EncodedAllocText extends StringField
{
public static final int FIELD = 361;
public EncodedAllocText()
{
super(361);
}
public EncodedAllocText(String data)
{
super(361, data);
}
}
| [
"mmkaouer@umich.edu"
] | mmkaouer@umich.edu |
8f1f397267b7318bec9361da63b6e2c51f8347d5 | 39b208bc5aed7ff144035a7a2c19ad032d49651f | /icardea-ctsinvoker/src/main/java/org/hl7/ctsmapi/GetSupportedVocabularyDomains.java | f0c9113643adc7b3f23415d64a57e9961b0fc5e5 | [] | no_license | coderunner4/icardea | 8f28864aaa7993dd71ac100f43a54af0b146133a | de50d91b8ede37acc6aaf48eea62bdda47710c4f | refs/heads/master | 2021-01-10T13:04:54.315708 | 2013-02-27T13:27:24 | 2013-02-27T13:27:24 | 46,989,557 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,185 | java |
package org.hl7.ctsmapi;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.hl7.cts.types.ST;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="matchText" type="{urn://cts.hl7.org/types}ST"/>
* <element name="matchAlgorithm_code" type="{urn://cts.hl7.org/types}ST"/>
* <element name="timeout" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="sizeLimit" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"matchText",
"matchAlgorithmCode",
"timeout",
"sizeLimit"
})
@XmlRootElement(name = "getSupportedVocabularyDomains")
public class GetSupportedVocabularyDomains {
@XmlElement(required = true)
protected ST matchText;
@XmlElement(name = "matchAlgorithm_code", required = true)
protected ST matchAlgorithmCode;
protected int timeout;
protected int sizeLimit;
/**
* Gets the value of the matchText property.
*
* @return
* possible object is
* {@link ST }
*
*/
public ST getMatchText() {
return matchText;
}
/**
* Sets the value of the matchText property.
*
* @param value
* allowed object is
* {@link ST }
*
*/
public void setMatchText(ST value) {
this.matchText = value;
}
/**
* Gets the value of the matchAlgorithmCode property.
*
* @return
* possible object is
* {@link ST }
*
*/
public ST getMatchAlgorithmCode() {
return matchAlgorithmCode;
}
/**
* Sets the value of the matchAlgorithmCode property.
*
* @param value
* allowed object is
* {@link ST }
*
*/
public void setMatchAlgorithmCode(ST value) {
this.matchAlgorithmCode = value;
}
/**
* Gets the value of the timeout property.
*
*/
public int getTimeout() {
return timeout;
}
/**
* Sets the value of the timeout property.
*
*/
public void setTimeout(int value) {
this.timeout = value;
}
/**
* Gets the value of the sizeLimit property.
*
*/
public int getSizeLimit() {
return sizeLimit;
}
/**
* Sets the value of the sizeLimit property.
*
*/
public void setSizeLimit(int value) {
this.sizeLimit = value;
}
}
| [
"yildiraykabak@gmail.com"
] | yildiraykabak@gmail.com |
8678d27f5ca9b5ac18a0163189e16d98ccd05a7e | de0e24c1cbb823b16d5a4316d4be5ca6b8bf78d0 | /qa/src/main/java/org/apache/river/test/spec/activation/activationgroup/CreateGroup_ExceptionTest.java | 753f7d68fd39e157bd61ce264c5d0e0237bf3cb7 | [
"BSD-3-Clause",
"Apache-2.0",
"MIT"
] | permissive | dreedyman/apache-river | 2812ffe56bd9070c56c92c04de917472d9b5ddd9 | d2829fb82ba552e2f90ad8d42667fd7be49be777 | refs/heads/master | 2022-11-28T16:50:40.117022 | 2020-08-10T17:16:51 | 2020-08-10T17:16:51 | 279,403,665 | 0 | 0 | Apache-2.0 | 2020-08-10T17:16:53 | 2020-07-13T20:21:36 | Java | UTF-8 | Java | false | false | 3,309 | 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.river.test.spec.activation.activationgroup;
import org.apache.river.qa.harness.QATestEnvironment;
import org.apache.river.qa.harness.Test;
import org.apache.river.test.spec.activation.util.FakeActivationGroupID;
import org.apache.river.test.spec.activation.util.FakeActivationSystem;
import net.jini.activation.ActivationGroup;
import java.rmi.activation.ActivationException;
import java.rmi.activation.ActivationSystem;
import java.rmi.activation.ActivationGroupID;
import java.rmi.activation.ActivationGroupDesc;
import java.rmi.activation.ActivationGroupDesc.CommandEnvironment;
import java.util.Properties;
/**
* <pre>
* Purpose:
* This test verifies the behavior of the createGroup method
* of {@link ActivationGroup} class when invalig {@link ActivationGroupDesc}
* ia passed as a parameter. {@link ActivationException} is waited.
*
* Infrastructure:
* This test requires the following infrastructure:
* 1) {@link FakeActivationGroupID}
* 2) {@link FakeActivationSystem}
*
* Actions:
* Test performs the following steps:
* 1) construct an FakeActivationSystem object
* 2) construct an FakeActivationGroupID object
* passing FakeActivationSystem as a parameter
* 2) construct an ActivationGroupDesc object
* passing empty properties and some command line as
* a parameters. It will be invalid ActivationGroupDesc
* because it refers not to subclass of
* net.jini.activation.ActivationGroup
* 3) run createGroup method passing FakeActivationGroupID
* and ActivationGroupDesc as a parameters
* 4) verify ActivationException is thrown
* </pre>
*/
public class CreateGroup_ExceptionTest extends QATestEnvironment implements Test {
/**
* This method performs all actions mentioned in class description.
*/
public void run() throws Exception {
ActivationSystem system = new FakeActivationSystem(logger);
ActivationGroupID agid = new FakeActivationGroupID(logger, system);
String program = "java";
String[] options = {""};
Properties props = new Properties();
CommandEnvironment cmd = new CommandEnvironment(program, options);
ActivationGroupDesc gd = new ActivationGroupDesc(props, cmd);
try {
java.rmi.activation.ActivationGroup ag =
ActivationGroup.createGroup(agid, gd, 0);
} catch (ActivationException ae) {
}
}
}
| [
"zkuti@chemaxon.com"
] | zkuti@chemaxon.com |
aa695cc5ad673e2a279abd3214f5d2dffde27f56 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/850e8fecc2cc3a45278063e81d678df1e9d0b9ef/before/ExternalJarManager.java | d674f18835f448dc6f30db04db911dc682ecfa26 | [] | 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,757 | java | /*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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.intellij.openapi.externalSystem.service.project.manage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.externalSystem.model.project.Jar;
import com.intellij.openapi.externalSystem.service.project.ExternalLibraryPathTypeMapper;
import com.intellij.openapi.externalSystem.util.ExternalSystemUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.LibraryTable;
import com.intellij.openapi.vfs.JarFileSystem;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.ContainerUtilRt;
import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.externalSystem.service.project.PlatformFacade;
import com.intellij.openapi.externalSystem.model.project.LibraryPathType;
import com.intellij.openapi.externalSystem.model.project.id.LibraryId;
import java.io.File;
import java.util.*;
/**
* @author Denis Zhdanov
* @since 12/13/12 1:04 PM
*/
public class ExternalJarManager {
private static final Logger LOG = Logger.getInstance("#" + ExternalJarManager.class.getName());
@NotNull private final PlatformFacade myPlatformFacade;
@NotNull private final ExternalLibraryPathTypeMapper myLibraryPathTypeMapper;
public ExternalJarManager(@NotNull PlatformFacade facade, @NotNull ExternalLibraryPathTypeMapper mapper) {
myPlatformFacade = facade;
myLibraryPathTypeMapper = mapper;
}
public void importJars(@NotNull final Collection<? extends Jar> jars, @NotNull final Project project, boolean synchronous) {
if (jars.isEmpty()) {
return;
}
final Map<LibraryId, List<Jar>> jarsByLibraries = ContainerUtilRt.newHashMap();
for (Jar jar : jars) {
List<Jar> list = jarsByLibraries.get(jar.getLibraryId());
if (list == null) {
jarsByLibraries.put(jar.getLibraryId(), list = ContainerUtilRt.newArrayList());
}
list.add(jar);
}
ExternalSystemUtil.executeProjectChangeAction(project, jars, synchronous, new Runnable() {
@Override
public void run() {
for (Map.Entry<LibraryId, List<Jar>> entry : jarsByLibraries.entrySet()) {
LibraryTable table = myPlatformFacade.getProjectLibraryTable(project);
Library library = table.getLibraryByName(entry.getKey().getLibraryName());
if (library == null) {
return;
}
Library.ModifiableModel model = library.getModifiableModel();
try {
LocalFileSystem fileSystem = LocalFileSystem.getInstance();
for (Jar jar : entry.getValue()) {
OrderRootType ideJarType = myLibraryPathTypeMapper.map(jar.getPathType());
for (VirtualFile file : model.getFiles(ideJarType)) {
if (jar.getPath().equals(ExternalSystemUtil.getLocalFileSystemPath(file))) {
return;
}
}
File jarFile = new File(jar.getPath());
VirtualFile virtualFile = fileSystem.refreshAndFindFileByIoFile(jarFile);
if (virtualFile == null) {
LOG.warn(
String.format("Can't find a jar of the library '%s' at path '%s'", jar.getLibraryId().getLibraryName(), jar.getPath())
);
return;
}
if (virtualFile.isDirectory()) {
model.addRoot(virtualFile, ideJarType);
}
else {
VirtualFile jarRoot = JarFileSystem.getInstance().getJarRootForLocalFile(virtualFile);
if (jarRoot == null) {
LOG.warn(String.format(
"Can't parse contents of the jar file at path '%s' for the library '%s''", jar.getPath(), library.getName()
));
return;
}
model.addRoot(jarRoot, ideJarType);
}
}
}
finally {
model.commit();
}
}
}
});
}
public void removeJars(@NotNull Collection<? extends Jar> jars, @NotNull Project project, boolean synchronous) {
if (jars.isEmpty()) {
return;
}
Map<LibraryId, List<Jar>> jarsByLibraries = ContainerUtilRt.newHashMap();
for (Jar jar : jars) {
List<Jar> list = jarsByLibraries.get(jar.getLibraryId());
if (list == null) {
jarsByLibraries.put(jar.getLibraryId(), list = ContainerUtilRt.newArrayList());
}
list.add(jar);
}
LibraryTable libraryTable = myPlatformFacade.getProjectLibraryTable(project);
for (Map.Entry<LibraryId, List<Jar>> entry : jarsByLibraries.entrySet()) {
Library library = libraryTable.getLibraryByName(entry.getKey().getLibraryName());
if (library == null) {
continue;
}
Set<Jar> libraryJars = ContainerUtilRt.newHashSet(entry.getValue());
for (Jar jar : entry.getValue()) {
boolean valid = false;
for (VirtualFile file : library.getFiles(myLibraryPathTypeMapper.map(jar.getPathType()))) {
if (jar.getPath().equals(ExternalSystemUtil.getLocalFileSystemPath(file))) {
valid = true;
break;
}
}
if (!valid) {
libraryJars.remove(jar);
}
}
if (!libraryJars.isEmpty()) {
removeLibraryJars(libraryJars, project, synchronous);
}
}
}
/**
* Removes given jars from IDE project structure assuming that they belong to the same library.
*
* @param jars jars to remove
* @param project current project
*/
private void removeLibraryJars(@NotNull final Set<Jar> jars, @NotNull final Project project, boolean synchronous) {
ExternalSystemUtil.executeProjectChangeAction(project, jars, synchronous, new Runnable() {
@Override
public void run() {
LibraryTable libraryTable = myPlatformFacade.getProjectLibraryTable(project);
LibraryId libraryId = jars.iterator().next().getLibraryId();
Library library = libraryTable.getLibraryByName(libraryId.getLibraryName());
if (library == null) {
return;
}
Set<String> pathsToRemove = ContainerUtil.map2Set(jars, new Function<Jar, String>() {
@Override
public String fun(Jar jar) {
return jar.getPath();
}
});
Library.ModifiableModel model = library.getModifiableModel();
try {
for (LibraryPathType gradlePathType : LibraryPathType.values()) {
OrderRootType idePathType = myLibraryPathTypeMapper.map(gradlePathType);
for (VirtualFile file : model.getFiles(idePathType)) {
if (pathsToRemove.contains(ExternalSystemUtil.getLocalFileSystemPath(file))) {
model.removeRoot(file.getUrl(), idePathType);
}
}
}
}
finally {
model.commit();
}
}
});
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
e21111dad6f053cffc7ce7340ce4c47ffbc00acf | d2a4e1a611cbf3338423cfb9f28172067436bb37 | /com/google/android/gms/internal/measurement/zzgv.java | 7d158ee1c1288f03596ceba81158c1ec9337a8d6 | [] | no_license | i-bthn/cs | 302c8526ed879e11c2b32b5130486d672374b768 | 0fc2180ad48b615e11f2ec0e3e721fcaf9095bc2 | refs/heads/master | 2023-08-19T04:46:16.284787 | 2021-10-14T08:24:09 | 2021-10-14T08:24:09 | 417,046,547 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,660 | java | package com.google.android.gms.internal.measurement;
import com.google.android.gms.internal.measurement.zzey;
final class zzgv implements zzgg {
private final int flags;
private final String info;
private final Object[] zzakk;
private final zzgi zzakn;
zzgv(zzgi zzgi, String str, Object[] objArr) {
this.zzakn = zzgi;
this.info = str;
this.zzakk = objArr;
char charAt = str.charAt(0);
if (charAt < 55296) {
this.flags = charAt;
return;
}
int i = charAt & 8191;
int i2 = 13;
int i3 = 1;
while (true) {
int i4 = i3 + 1;
char charAt2 = str.charAt(i3);
if (charAt2 >= 55296) {
i |= (charAt2 & 8191) << i2;
i2 += 13;
i3 = i4;
} else {
this.flags = i | (charAt2 << i2);
return;
}
}
}
/* access modifiers changed from: package-private */
public final String zzvz() {
return this.info;
}
/* access modifiers changed from: package-private */
public final Object[] zzwa() {
return this.zzakk;
}
@Override // com.google.android.gms.internal.measurement.zzgg
public final zzgi zzvt() {
return this.zzakn;
}
@Override // com.google.android.gms.internal.measurement.zzgg
public final int zzvr() {
return (this.flags & 1) == 1 ? zzey.zzd.zzail : zzey.zzd.zzaim;
}
@Override // com.google.android.gms.internal.measurement.zzgg
public final boolean zzvs() {
return (this.flags & 2) == 2;
}
}
| [
"Bothina.12@gmail.com"
] | Bothina.12@gmail.com |
eb2ad3706a4b32693110dc9a43249b9911932c37 | 3898d6d186a61e8be3709141d40f7b949ce09d48 | /src/main/java/com/cisco/axl/api/_10/ListConferenceBridgeReq.java | 323fc9c2308eff04419cbc383d336fdae2f12806 | [] | no_license | dert261/cucmAxlImpl | a155bf1a8694a341fe932f8f601dafadd2a374a1 | 3000b6e614937d973cd4444a0dd7faf2513f569a | refs/heads/master | 2021-01-21T04:19:13.714018 | 2016-06-29T08:07:29 | 2016-06-29T08:07:29 | 54,956,061 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,978 | java |
package com.cisco.axl.api._10;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ListConferenceBridgeReq complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ListConferenceBridgeReq">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="searchCriteria">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="devicePoolName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* <element name="returnedTags" type="{http://www.cisco.com/AXL/API/10.0}LConferenceBridge"/>
* <element name="skip" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
* <element name="first" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
* </sequence>
* <attribute name="sequence" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ListConferenceBridgeReq", propOrder = {
"searchCriteria",
"returnedTags",
"skip",
"first"
})
public class ListConferenceBridgeReq {
@XmlElement(required = true)
protected ListConferenceBridgeReq.SearchCriteria searchCriteria;
@XmlElement(required = true)
protected LConferenceBridge returnedTags;
@XmlSchemaType(name = "unsignedLong")
protected BigInteger skip;
@XmlSchemaType(name = "unsignedLong")
protected BigInteger first;
@XmlAttribute(name = "sequence")
@XmlSchemaType(name = "unsignedLong")
protected BigInteger sequence;
/**
* Gets the value of the searchCriteria property.
*
* @return
* possible object is
* {@link ListConferenceBridgeReq.SearchCriteria }
*
*/
public ListConferenceBridgeReq.SearchCriteria getSearchCriteria() {
return searchCriteria;
}
/**
* Sets the value of the searchCriteria property.
*
* @param value
* allowed object is
* {@link ListConferenceBridgeReq.SearchCriteria }
*
*/
public void setSearchCriteria(ListConferenceBridgeReq.SearchCriteria value) {
this.searchCriteria = value;
}
/**
* Gets the value of the returnedTags property.
*
* @return
* possible object is
* {@link LConferenceBridge }
*
*/
public LConferenceBridge getReturnedTags() {
return returnedTags;
}
/**
* Sets the value of the returnedTags property.
*
* @param value
* allowed object is
* {@link LConferenceBridge }
*
*/
public void setReturnedTags(LConferenceBridge value) {
this.returnedTags = value;
}
/**
* Gets the value of the skip property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getSkip() {
return skip;
}
/**
* Sets the value of the skip property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setSkip(BigInteger value) {
this.skip = value;
}
/**
* Gets the value of the first property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getFirst() {
return first;
}
/**
* Sets the value of the first property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setFirst(BigInteger value) {
this.first = value;
}
/**
* Gets the value of the sequence property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getSequence() {
return sequence;
}
/**
* Sets the value of the sequence property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setSequence(BigInteger value) {
this.sequence = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="devicePoolName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"name",
"description",
"devicePoolName"
})
public static class SearchCriteria {
protected String name;
protected String description;
protected String devicePoolName;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
/**
* Gets the value of the devicePoolName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDevicePoolName() {
return devicePoolName;
}
/**
* Sets the value of the devicePoolName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDevicePoolName(String value) {
this.devicePoolName = value;
}
}
}
| [
"v.bozhenkov@obelisk-voip.ru"
] | v.bozhenkov@obelisk-voip.ru |
aad21fe3883f29f4dfccd6236fe56e3e528ea7b1 | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.systemdriver-VrDriver/sources/com/oculus/vrapi/SystemProps.java | fd0e77bbc8c7a8fda01567cd18f08cb8e13cf8ff | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 1,761 | java | package com.oculus.vrapi;
import android.util.Log;
import java.lang.reflect.Method;
public class SystemProps {
private static final String TAG = "SystemProps";
private static Method getBoolMethod;
private static Method getIntMethod;
private static Method getStringMethod;
private SystemProps() {
}
static {
try {
Class<?> CLASS = Class.forName("android.os.SystemProperties");
getStringMethod = CLASS.getMethod("get", String.class, String.class);
getBoolMethod = CLASS.getMethod("getBoolean", String.class, Boolean.TYPE);
getIntMethod = CLASS.getMethod("getInt", String.class, Integer.TYPE);
} catch (ClassNotFoundException | NoSuchMethodException e) {
}
}
public static String getString(String key, String defaultValue) {
try {
return (String) getStringMethod.invoke(null, key, defaultValue);
} catch (Exception e) {
Log.d(TAG, "getString() returning default " + defaultValue);
return defaultValue;
}
}
public static boolean getBool(String key, boolean defaultValue) {
try {
return ((Boolean) getBoolMethod.invoke(null, key, Boolean.valueOf(defaultValue))).booleanValue();
} catch (Exception e) {
Log.d(TAG, "getBool() returning default " + defaultValue);
return defaultValue;
}
}
public static int getInt(String key, int defaultValue) {
try {
return ((Integer) getIntMethod.invoke(null, key, Integer.valueOf(defaultValue))).intValue();
} catch (Exception e) {
Log.d(TAG, "getInt() returning default " + defaultValue);
return defaultValue;
}
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
8acfa95f9feeee929e7f891db0cb823cd72b389b | c548af584da5adda6f8f92754ac1c7234c22deb9 | /src/main/java/jpashop/domain/Member.java | a50a326bd5b942c0d739822094018d6841b73023 | [] | no_license | conquerex/WhatTheJpaBasic | 35f9510d3983be858218cbf118683bcf405aea58 | 2dfb5b69d131bbc6d48bbe94375eb635d808c560 | refs/heads/main | 2023-05-09T22:52:04.646294 | 2021-05-31T01:29:38 | 2021-05-31T01:29:38 | 370,212,849 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 956 | java | package jpashop.domain;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
@Entity
public class Member extends BaseEntity {
@Id @GeneratedValue
@Column(name = "MEMBER_ID")
private Long id;
private String name;
@Embedded // 생략 가능
private Address address;
@OneToMany(mappedBy = "member")
private List<Order> orders = new ArrayList<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
public List<Order> getOrders() {
return orders;
}
public void setOrders(List<Order> orders) {
this.orders = orders;
}
}
| [
"conquerex@gmail.com"
] | conquerex@gmail.com |
635f674e0132317c5c866c38b140024a9b51336f | 667ee96b8ec2749060660d7881029d1659655ea4 | /src/fr/bmartel/protocol/wlan/frame/management/element/impl/ErpElement.java | 2d9bde515db0b2c0fb0f019b9459f7c57cb6f67a | [
"MIT"
] | permissive | bertrandmartel/wlan-decoder-java | 70a8a06018130f77b7063896a00e1ed371252f14 | d0814ef8b17e9f55ea13ced8dc3acc4cdb791a9d | refs/heads/master | 2021-06-09T12:14:10.396739 | 2017-01-11T12:59:58 | 2017-01-11T12:59:58 | 35,069,637 | 10 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,464 | java | package fr.bmartel.protocol.wlan.frame.management.element.impl;
import fr.bmartel.protocol.wlan.frame.management.element.WlanElementAbstr;
import fr.bmartel.protocol.wlan.frame.management.element.inter.IErpElement;
/**
* The ERP element contains information on the presence of Clause 16 or Clause 17 STAs in the BSS that are
not capable of Clause 19 (ERP-OFDM) data rates
<ul>
<li>element id : 1 byte</li>
<li>length : 1 byte</li>
<li>erp parameters : 1 byte</li>
</ul>
For ERP parameters :
<ul>
<li>B0 => NonERP_Present</li>
<li>B1 => Use_Protection</li>
<li>B2 => Barker Preamble Mode</li>
</ul>
*
* @author Bertrand Martel
*
*/
public class ErpElement extends WlanElementAbstr implements IErpElement{
public final static int id = 42;
private boolean erpPresent = false;
private boolean protection = false;
private boolean barkerPreambleMode = false;
/**
* @param data
*/
public ErpElement(byte[] data) {
super(data);
if ((data[0] & 0b00000001) ==0b00000001)
erpPresent=true;
if ((data[0] & 0b00000010) ==0b00000010)
protection=true;
if ((data[0] & 0b00000100) ==0b00000100)
barkerPreambleMode=true;
}
@Override
public boolean isErpPresent()
{
return erpPresent;
}
@Override
public boolean useProtection()
{
return protection;
}
@Override
public boolean isBarkerPreambleMode()
{
return barkerPreambleMode;
}
@Override
public byte getElementId() {
return id;
}
}
| [
"bmartel.fr@gmail.com"
] | bmartel.fr@gmail.com |
93d9eda208e50147aac19d9ebe5720f77ae0e4ee | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/1/org/jfree/chart/plot/PiePlot_setLabelLinksVisible_1761.java | 889681760692bba1c1af319b7870dede4eb7cd45 | [] | 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 | 4,555 | java |
org jfree chart plot
plot displai data form pie chart data
link pie dataset piedataset
shown gener code pie chart demo2 piechartdemo2 java code
program includ free chart jfreechart demo collect
img src imag pie plot sampl pieplotsampl png
alt pie plot sampl pieplotsampl png
special note
start point o'clock pie section proce
clockwis direct set chang
neg valu dataset
util method creat link pie dataset piedataset
link categori dataset categorydataset
plot
pie dataset piedataset
pie plot pieplot plot select cloneabl
set flag control label link line
visibl send link plot chang event plotchangeev regist listen
care hide link line depend data
valu label displai distanc
pie section
param visibl flag
label link visibl getlabellinksvis
set label link visibl setlabellinksvis visibl
label link visibl labellinksvis visibl
fire chang event firechangeev
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
d302a8321031944c63e5a95a4a85224999989b48 | 2c163a81e601426da917b70764b76a90a681f054 | /ecom-web/src/main/java/com/dowhile/controller/bean/TicketActivityControllerBean.java | 729ffecde60fc67bbc1d84ff8115a28c0d224981 | [] | no_license | yameenbashir/svapple | a3f864e917d41394a5915fd076de8e31b453ae98 | dff4860db85eb8103683a49da591308b8afd6316 | refs/heads/master | 2022-12-27T07:41:51.454969 | 2021-04-28T07:43:51 | 2021-04-28T07:43:51 | 205,891,660 | 0 | 0 | null | 2022-12-16T02:42:20 | 2019-09-02T16:01:44 | JavaScript | UTF-8 | Java | false | false | 1,343 | java | /**
*
*/
package com.dowhile.controller.bean;
import java.util.List;
import com.dowhile.frontend.mapping.bean.TicketActivityBean;
import com.dowhile.frontend.mapping.bean.TicketBean;
/**
* @author Yameen Bashir
*
*/
public class TicketActivityControllerBean {
private List<TicketActivityBean> ticketActivitiesList ;
private TicketBean ticketBean;
/**
*
*/
public TicketActivityControllerBean() {
}
/**
* @param ticketActivitiesList
* @param ticketBean
*/
public TicketActivityControllerBean(
List<TicketActivityBean> ticketActivitiesList, TicketBean ticketBean) {
this.ticketActivitiesList = ticketActivitiesList;
this.ticketBean = ticketBean;
}
/**
* @return the ticketActivitiesList
*/
public List<TicketActivityBean> getTicketActivitiesList() {
return ticketActivitiesList;
}
/**
* @param ticketActivitiesList the ticketActivitiesList to set
*/
public void setTicketActivitiesList(
List<TicketActivityBean> ticketActivitiesList) {
this.ticketActivitiesList = ticketActivitiesList;
}
/**
* @return the ticketBean
*/
public TicketBean getTicketBean() {
return ticketBean;
}
/**
* @param ticketBean the ticketBean to set
*/
public void setTicketBean(TicketBean ticketBean) {
this.ticketBean = ticketBean;
}
}
| [
"yameen.like@gmail.com"
] | yameen.like@gmail.com |
bab737d0500ff1d05654a853e649776a2407230a | d30ae8811d5d983ebb3f522ff6912c41a370f577 | /app/src/main/java/com/appian/manchesterunitednews/app/fixture/view/TeamLastNextMatchView.java | 0919dc243dea98beffef5069b56d978c9de0a2a1 | [] | no_license | phuongbkatp/newsapp | 9cd958c139ff9e61452f724b940518e1c349d7de | e20f1535c5150187f6b654ba8f9d1866201481b8 | refs/heads/master | 2021-02-07T20:12:35.131717 | 2020-03-01T02:17:13 | 2020-03-01T02:17:13 | 244,072,435 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 225 | java | package com.appian.manchesterunitednews.app.fixture.view;
import com.appnet.android.football.sofa.data.Event;
import java.util.List;
public interface TeamLastNextMatchView {
void showMatchLastNext(List<Event> data);
}
| [
"32545917+phuongbkatp@users.noreply.github.com"
] | 32545917+phuongbkatp@users.noreply.github.com |
ce797756530b3837d4159c9308e61d66a9be849d | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes2.dex_source_from_JADX/com/facebook/feedplugins/spannable/SpannableInTextViewPartDefinition.java | 01363f31108a3d83dbbedf5bb2c0bc72bba85ef1 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,066 | java | package com.facebook.feedplugins.spannable;
import android.content.Context;
import android.text.method.LinkMovementMethod;
import android.view.View;
import com.facebook.common.errorreporting.AbstractFbErrorReporter;
import com.facebook.common.errorreporting.FbErrorReporterImpl;
import com.facebook.common.errorreporting.SoftError;
import com.facebook.common.propertybag.PropertyBag;
import com.facebook.common.util.StringLocaleUtil;
import com.facebook.feed.environment.HasInvalidate;
import com.facebook.feed.environment.HasPersistentState;
import com.facebook.feed.spannable.PersistentSpannable;
import com.facebook.graphql.model.GraphQLStory;
import com.facebook.graphql.model.interfaces.CacheableEntity;
import com.facebook.inject.ContextScope;
import com.facebook.inject.ContextScoped;
import com.facebook.inject.InjectorLike;
import com.facebook.inject.InjectorThreadStack;
import com.facebook.inject.ProvisioningException;
import com.facebook.inject.ScopeSet;
import com.facebook.loom.logger.LogEntry.EntryType;
import com.facebook.loom.logger.Logger;
import com.facebook.multirow.api.AnyEnvironment;
import com.facebook.multirow.api.BaseSinglePartDefinition;
import com.facebook.multirow.api.SubParts;
import com.facebook.qe.api.QeAccessor;
import com.facebook.qe.module.QeInternalImplMethodAutoProvider;
import com.facebook.widget.text.BetterTextView;
import com.facebook.widget.text.abtest.ExperimentsForWidgetTextAbTestModule;
import javax.inject.Inject;
@ContextScoped
/* compiled from: group/members/search/<q$1> */
public class SpannableInTextViewPartDefinition<E extends HasPersistentState & HasInvalidate> extends BaseSinglePartDefinition<PersistentSpannableInput, PersistentSpannable, E, BetterTextView> {
private static SpannableInTextViewPartDefinition f21772d;
private static final Object f21773e = new Object();
private final PersistentSpannablePreparer f21774a;
private final AbstractFbErrorReporter f21775b;
private final QeAccessor f21776c;
private static SpannableInTextViewPartDefinition m29505b(InjectorLike injectorLike) {
return new SpannableInTextViewPartDefinition(PersistentSpannablePreparer.m28258a(injectorLike), FbErrorReporterImpl.m2317a(injectorLike), QeInternalImplMethodAutoProvider.m3744a(injectorLike));
}
public final Object mo2541a(SubParts subParts, Object obj, AnyEnvironment anyEnvironment) {
PersistentSpannableInput persistentSpannableInput = (PersistentSpannableInput) obj;
HasPersistentState hasPersistentState = (HasPersistentState) anyEnvironment;
if (this.f21776c.mo596a(ExperimentsForWidgetTextAbTestModule.f21795c, false)) {
this.f21774a.m28262c(persistentSpannableInput, hasPersistentState);
} else {
this.f21774a.m28261b(persistentSpannableInput, hasPersistentState);
}
return (PersistentSpannable) hasPersistentState.mo2425a(persistentSpannableInput.mo3193a(), persistentSpannableInput.mo3195c());
}
public final /* bridge */ /* synthetic */ void mo2543a(Object obj, Object obj2, AnyEnvironment anyEnvironment, View view) {
int a = Logger.a(8, EntryType.MARK_PUSH, 410521217);
m29504a((PersistentSpannableInput) obj, (PersistentSpannable) obj2, (BetterTextView) view);
Logger.a(8, EntryType.MARK_POP, -1303852620, a);
}
public final void mo2544b(Object obj, Object obj2, AnyEnvironment anyEnvironment, View view) {
((BetterTextView) view).setAttachDetachListener(null);
}
@Inject
public SpannableInTextViewPartDefinition(PersistentSpannablePreparer persistentSpannablePreparer, AbstractFbErrorReporter abstractFbErrorReporter, QeAccessor qeAccessor) {
this.f21774a = persistentSpannablePreparer;
this.f21775b = abstractFbErrorReporter;
this.f21776c = qeAccessor;
}
public static SpannableInTextViewPartDefinition m29503a(InjectorLike injectorLike) {
ScopeSet a = ScopeSet.m1499a();
byte b = a.m1504b((byte) 8);
try {
Context b2 = injectorLike.getScopeAwareInjector().mo191b();
if (b2 == null) {
throw new ProvisioningException("Called context scoped provider outside of context scope");
}
SpannableInTextViewPartDefinition b3;
ContextScope contextScope = (ContextScope) injectorLike.getInstance(ContextScope.class);
PropertyBag a2 = ContextScope.m1330a(b2);
synchronized (f21773e) {
SpannableInTextViewPartDefinition spannableInTextViewPartDefinition;
if (a2 != null) {
spannableInTextViewPartDefinition = (SpannableInTextViewPartDefinition) a2.mo818a(f21773e);
} else {
spannableInTextViewPartDefinition = f21772d;
}
if (spannableInTextViewPartDefinition == null) {
InjectorThreadStack injectorThreadStack = injectorLike.getInjectorThreadStack();
contextScope.m1333a(b2, injectorThreadStack);
try {
b3 = m29505b(injectorThreadStack.m1474e());
if (a2 != null) {
a2.mo822a(f21773e, b3);
} else {
f21772d = b3;
}
} finally {
ContextScope.m1331a(injectorThreadStack);
}
} else {
b3 = spannableInTextViewPartDefinition;
}
}
return b3;
} finally {
a.m1505c(b);
}
}
private void m29504a(PersistentSpannableInput persistentSpannableInput, PersistentSpannable persistentSpannable, BetterTextView betterTextView) {
try {
betterTextView.setMovementMethod(LinkMovementMethod.getInstance());
betterTextView.setText(persistentSpannable.f21833a);
if (persistentSpannable.f21835c != null) {
betterTextView.setAttachDetachListener(persistentSpannable.f21835c);
}
} catch (Throwable e) {
String str;
Throwable th = e;
CacheableEntity c = persistentSpannableInput.mo3195c();
String S_ = (c == null || !(c instanceof GraphQLStory)) ? null : ((GraphQLStory) c).S_();
AbstractFbErrorReporter abstractFbErrorReporter = this.f21775b;
StringBuilder stringBuilder = new StringBuilder("SpannableInTextViewPartDefinition");
if (S_ != null) {
str = "_withZombie";
} else {
str = "";
}
abstractFbErrorReporter.mo336a(SoftError.a(stringBuilder.append(str).toString(), StringLocaleUtil.m21640a("JellyBean setText bug with text: %s and zombie: %s", persistentSpannable.f21833a, S_)).a(th).g());
if (persistentSpannable.f21833a != null) {
betterTextView.setText(persistentSpannable.f21833a.toString());
}
}
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
485ad36537bb42a543b3f0a28aa4e985abb3cac6 | b844043af2a13e24c9a322dbb4afc51af7cf8dcc | /ib-terminal-server/src/main/java/com/henyep/ib/terminal/server/adapter/MT4ServiceAdapter.java | 71cb675379a511b9f224d9945178085e9c68260e | [] | no_license | oscarYeung/ib_terminal | 37b372ab9d33f4b029ee9a02bc519c0cc7e31c38 | c83e464752e45aa356f1aad24ed2f2f5066b2e90 | refs/heads/master | 2022-12-24T04:49:03.603352 | 2019-12-11T04:09:26 | 2019-12-11T04:09:26 | 218,199,664 | 1 | 2 | null | 2022-12-16T09:45:08 | 2019-10-29T03:49:19 | Java | UTF-8 | Java | false | false | 347 | java | package com.henyep.ib.terminal.server.adapter;
import com.henyep.white.label.api.dto.request.BaseRequestBodyDto;
public interface MT4ServiceAdapter {
public String sendRequest(String ip, String port, String mt4login, String mt4Password, String webServiceUrl, BaseRequestBodyDto data);
public Object convertToObject(String mt4Response);
}
| [
"oscar.yeung@gmail.com"
] | oscar.yeung@gmail.com |
33332a3fe86b5dd7bc93ff7ef4f031bb6c2a111d | f652d1377f22f5009e0ca34a7bb5e90a57172db7 | /backend/src/test/java/br/com/ivanfsilva/ecommerce/criteria/FuncoesCriteriaTest.java | dc60d4f6d16222b950ee91751bae89e52a87d153 | [] | no_license | ivanfsilva/ecommerce | b53b25fe2c894886482828203aba003cafcfe59e | 4f71bb3d94efce7a297b10f0b185d87ec6db27ad | refs/heads/master | 2022-05-24T15:34:15.791657 | 2022-05-10T21:39:51 | 2022-05-10T21:39:51 | 244,218,369 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,545 | java | package br.com.ivanfsilva.ecommerce.criteria;
import br.com.ivanfsilva.ecommerce.EntityManagerTest;
import br.com.ivanfsilva.ecommerce.model.*;
import org.junit.Assert;
import org.junit.Test;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.Root;
import java.util.List;
public class FuncoesCriteriaTest extends EntityManagerTest {
@Test
public void aplicarFuncaoAgregacao() {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Object[]> criteriaQuery = criteriaBuilder.createQuery(Object[].class);
Root<Pedido> root = criteriaQuery.from(Pedido.class);
criteriaQuery.multiselect(
criteriaBuilder.count(root.get("id")),
criteriaBuilder.avg(root.get("total")),
criteriaBuilder.sum(root.get("total")),
criteriaBuilder.min(root.get("total")),
criteriaBuilder.max(root.get("total"))
);
TypedQuery<Object[]> typedQuery = entityManager.createQuery(criteriaQuery);
List<Object[]> lista = typedQuery.getResultList();
Assert.assertFalse(lista.isEmpty());
lista.forEach(arr -> System.out.println(
"count: " + arr[0]
+ ", avg: " + arr[1]
+ ", sum: " + arr[2]
+ ", min: " + arr[3]
+ ", max: " + arr[4]));
}
@Test
public void aplicarFuncaoNativas() {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Object[]> criteriaQuery = criteriaBuilder.createQuery(Object[].class);
Root<Pedido> root = criteriaQuery.from(Pedido.class);
criteriaQuery.multiselect(
root.get("id"),
criteriaBuilder.function("dayname", String.class, root.get("dataCriacao"))
);
criteriaQuery.where(criteriaBuilder.isTrue(
criteriaBuilder.function(
"acima_media_faturamento", Boolean.class, root.get("total"))));
TypedQuery<Object[]> typedQuery = entityManager.createQuery(criteriaQuery);
List<Object[]> lista = typedQuery.getResultList();
Assert.assertFalse(lista.isEmpty());
lista.forEach(arr -> System.out.println(
arr[0] + ", dayname: " + arr[1]));
}
@Test
public void aplicarFuncaoColecao() {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Object[]> criteriaQuery = criteriaBuilder.createQuery(Object[].class);
Root<Pedido> root = criteriaQuery.from(Pedido.class);
criteriaQuery.multiselect(
root.get("id"),
criteriaBuilder.size(root.get("itens"))
);
criteriaQuery.where(criteriaBuilder.greaterThan(
criteriaBuilder.size(root.get("itens")), 1));
TypedQuery<Object[]> typedQuery = entityManager.createQuery(criteriaQuery);
List<Object[]> lista = typedQuery.getResultList();
Assert.assertFalse(lista.isEmpty());
lista.forEach(arr -> System.out.println(
arr[0] + ", size: " + arr[1]));
}
@Test
public void aplicarFuncaoNumero() {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Object[]> criteriaQuery = criteriaBuilder.createQuery(Object[].class);
Root<Pedido> root = criteriaQuery.from(Pedido.class);
criteriaQuery.multiselect(
root.get("id"),
criteriaBuilder.abs(criteriaBuilder.prod(root.get("id"), -1)),
criteriaBuilder.mod(root.get("id"), 2),
criteriaBuilder.sqrt(root.get("total"))
);
criteriaQuery.where(criteriaBuilder.greaterThan(
criteriaBuilder.sqrt(root.get("total")), 10.0));
TypedQuery<Object[]> typedQuery = entityManager.createQuery(criteriaQuery);
List<Object[]> lista = typedQuery.getResultList();
Assert.assertFalse(lista.isEmpty());
lista.forEach(arr -> System.out.println(
arr[0]
+ ", abs: " + arr[1]
+ ", mod: " + arr[2]
+ ", sqrt: " + arr[3]));
}
@Test
public void aplicarFuncaoData() {
// current_date, current_time, current_timestamp
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Object[]> criteriaQuery = criteriaBuilder.createQuery(Object[].class);
Root<Pedido> root = criteriaQuery.from(Pedido.class);
Join<Pedido, Pagamento> joinPagamento = root.join("pagamento");
Join<Pedido, PagamentoBoleto> joinPagamentoBoleto = criteriaBuilder
.treat(joinPagamento, PagamentoBoleto.class);
criteriaQuery.multiselect(
root.get("id"),
criteriaBuilder.currentDate(),
criteriaBuilder.currentTime(),
criteriaBuilder.currentTimestamp()
);
criteriaQuery.where(
criteriaBuilder.between(criteriaBuilder.currentDate(),
root.get("dataCriacao").as(java.sql.Date.class),
joinPagamentoBoleto.get("dataVencimento").as(java.sql.Date.class)),
criteriaBuilder.equal(root.get("status"), StatusPedido.AGUARDANDO)
);
TypedQuery<Object[]> typedQuery = entityManager.createQuery(criteriaQuery);
List<Object[]> lista = typedQuery.getResultList();
Assert.assertFalse(lista.isEmpty());
lista.forEach(arr -> System.out.println(
arr[0]
+ ", current_date: " + arr[1]
+ ", current_time: " + arr[2]
+ ", current_timestamp: " + arr[3]));
}
@Test
public void aplicarFuncaoString() {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Object[]> criteriaQuery = criteriaBuilder.createQuery(Object[].class);
Root<Cliente> root = criteriaQuery.from(Cliente.class);
criteriaQuery.multiselect(
root.get("nome"),
criteriaBuilder.concat("Nome do cliente: ", root.get("nome")),
criteriaBuilder.length(root.get("nome")),
criteriaBuilder.locate(root.get("nome"), "a"),
criteriaBuilder.substring(root.get("nome"), 1, 2),
criteriaBuilder.lower(root.get("nome")),
criteriaBuilder.upper(root.get("nome")),
criteriaBuilder.trim(root.get("nome"))
);
criteriaQuery.where(criteriaBuilder.equal(
criteriaBuilder.substring(root.get("nome"), 1, 1), "M"));
TypedQuery<Object[]> typedQuery = entityManager.createQuery(criteriaQuery);
List<Object[]> lista = typedQuery.getResultList();
Assert.assertFalse(lista.isEmpty());
lista.forEach(arr -> System.out.println(
arr[0]
+ ", concat: " + arr[1]
+ ", length: " + arr[2]
+ ", locate: " + arr[3]
+ ", substring: " + arr[4]
+ ", lower: " + arr[5]
+ ", upper: " + arr[6]
+ ", trim: |" + arr[7] + "|"));
}
}
| [
"ivanfs27@gmail.com"
] | ivanfs27@gmail.com |
7f426b490a3fc6441b452800e1c02571232eef97 | be429ca81d24321179f9e9001f23a2d9de31b791 | /javademo/src/main/java/genericdemo/GenericExtendsTest.java | 7d4e386296f4faada17bc6697d02eda9bc7aa2f6 | [
"Apache-2.0"
] | permissive | lnsoftware/demo | 069caf6143e2dacd37f2a75351b52b8413716d0c | 8c90945c5d3740d9771315c57c9f27e33e36c5b8 | refs/heads/master | 2022-11-30T21:08:59.235589 | 2020-08-18T15:27:49 | 2020-08-18T15:27:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 912 | java | package genericdemo;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* 扩展 泛型测试
**/
public class GenericExtendsTest {
static class Food {}
static class Fruit extends Food {}
static class Apple extends Fruit {}
public static void main(String[] args) throws IOException {
List<? extends Fruit> fruits = new ArrayList<>();
// fruits.add(new Food()); // compile error
// fruits.add(new Fruit()); // compile error
// fruits.add(new Apple()); // compile error
fruits = new ArrayList<Fruit>(); // compile success
fruits = new ArrayList<Apple>(); // compile success
// fruits = new ArrayList<Food>(); // compile error
// fruits = new ArrayList<? extends Fruit>(); // compile error: 通配符类型无法实例化
Fruit object = fruits.get(0); // compile success
}
}
| [
"627292959@qq.com"
] | 627292959@qq.com |
4d22b7721db6c570f35e1127bed00a440060d2dc | 23f42b163c0a58ad61c38498befa1219f53a2c10 | /src/main/java/weldstartup/c/AppScopedBean2457.java | e9649b575373dce042b50fdc42ec0d3f2e14214a | [] | no_license | 99sono/wls-jsf-2-2-12-jersey-weldstartup-bottleneck | 9637d2f14a1053159c6fc3c5898a91057a65db9d | b81697634cceca79f1b9a999002a1a02c70b8648 | refs/heads/master | 2021-05-15T17:54:39.040635 | 2017-10-24T07:27:23 | 2017-10-24T07:27:23 | 107,673,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,630 | java | package weldstartup.c;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import javax.transaction.TransactionSynchronizationRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import weldstartup.nondynamicclasses.AppScopedNonDynamicBean;
import weldstartup.nondynamicclasses.DependentScopedNonDynamicBean;
import weldstartup.nondynamicclasses.RequestScopedNonDynamicBean;
/**
* A dynamically created CDI bean meant to demonstrate meant to demonstrate that the WeldStartup performance on weblogic
* is really under-performing.
*
*/
@ApplicationScoped
// appScopedName will be turned into a name like AppScopedBean0001
public class AppScopedBean2457 {
private static final Logger LOGGER = LoggerFactory.getLogger(AppScopedBean2457.class);
@Inject
AppScopedNonDynamicBean appScopedNonDynamicBean;
@Inject
DependentScopedNonDynamicBean rependentScopedNonDynamicBean;
@Inject
RequestScopedNonDynamicBean requestScopedNonDynamicBean;
@Inject
BeanManager beanManager;
@Resource
TransactionSynchronizationRegistry tsr;
@PostConstruct
public void postConstruct() {
LOGGER.info("Post construct method invoked. AppScopedBean2457");
}
@PreDestroy
public void preDestroy() {
LOGGER.info("Pre-destroy method invoked. AppScopedBean2457");
}
public void dummyLogic() {
LOGGER.info("Dummy logic invoked. AppScopedBean2457");
}
}
| [
"99sono@users.noreply.github.com"
] | 99sono@users.noreply.github.com |
db096cf2160f0cf3cd9ab2036e14d6ae6430389c | a74bcf1c0f9e047afd46d4a7b9ad264e27946081 | /Java/Examples/ARPG_GLES/src/com/example/arpg_gles/Sword1.java | d2a84ddfbd9c4db5af6bebe1b1ec6ee2eae381c2 | [
"Apache-2.0"
] | permissive | windows10207/LGame | 7a260b64dcdac5e1bbde415e5f801691d3bfb9fd | 4599507d737a79b27d8f685f7aa542fd9f936cf7 | refs/heads/master | 2021-01-12T20:15:38.080295 | 2014-09-22T17:12:08 | 2014-09-22T17:12:08 | 24,441,072 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 630 | java | package com.example.arpg_gles;
public class Sword1 extends Thing
{
Sword1(float x, float y)
{
height = 40;
width = 40;
this.x = x;
this.y = y;
state = 0;
}
public void update(Player player, int enemiesLeft)
{
if(player.hasSword)
state = Thing.STATE_DEATH;
}
public void collision(Player player)
{
if(!player.hasSword)
{
if(player.rolling)
player.state -= 4;
player.rolling = false;
player.hasSword = true;
player.pickedUpSword = true;
}
}
}
| [
"longwind2012@hotmail.com"
] | longwind2012@hotmail.com |
ff2cbe1a651e2282c4cfcb289cbb598d82ac0db5 | b0296d820c0400440232152485a0b3dff3e943be | /GTAS/GridTalk/src/Server/PartnerProcess/com/gridnode/gtas/server/partnerprocess/actions/DeleteTriggerAction.java | 8bb9ef6997d29a40ca47a7ffed65bc551d119c61 | [] | no_license | andytanoko/4.2.x_integration | 74536c8933a98373b0118eeac66678b72b00aa8e | 984842d92abaa797a19bd0f002ec45c9c37da288 | refs/heads/master | 2021-01-10T13:46:58.824451 | 2015-09-23T10:41:25 | 2015-09-23T10:41:25 | 46,325,977 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,674 | java | /**
* This software is the proprietary information of GridNode Pte Ltd.
* Use is subjected to license terms.
*
* Copyright 2001-2002 (C) GridNode Pte Ltd. All Rights Reserved.
*
* File: DeleteTriggerAction.java
*
****************************************************************************
* Date Author Changes
****************************************************************************
* Oct 09 2002 Koh Han Sing Created
* Jul 15 2003 Neo Sok Lay Cater for changes in AbstractDeleteEntityAction.
*/
package com.gridnode.gtas.server.partnerprocess.actions;
import com.gridnode.gtas.events.partnerprocess.DeleteTriggerEvent;
import com.gridnode.gtas.server.partnerprocess.helpers.ActionHelper;
import com.gridnode.gtas.server.partnerprocess.model.Trigger;
import com.gridnode.gtas.server.rdm.ejb.actions.AbstractDeleteEntityAction;
import com.gridnode.pdip.framework.db.entity.IEntity;
import com.gridnode.pdip.framework.db.filter.IDataFilter;
import java.util.Collection;
/**
* This Action class handles the deletion of a Trigger.
*
* @author Koh Han Sing
*
* @version GT 2.2 I1
* @since 2.0
*/
public class DeleteTriggerAction extends AbstractDeleteEntityAction
{
/**
* Serial Version UID
*/
private static final long serialVersionUID = -5754846116158221983L;
public static final String ACTION_NAME = "DeleteTriggerAction";
protected Class getExpectedEventClass()
{
return DeleteTriggerEvent.class;
}
protected String getActionName()
{
return ACTION_NAME;
}
/**
* @see com.gridnode.gtas.server.rdm.ejb.actions.AbstractDeleteEntityAction#checkCanDelete(IEntity)
* @since GT 2.2 I1
*/
protected boolean checkCanDelete(IEntity entity)
{
return ((Trigger) entity).canDelete();
}
/**
* @see com.gridnode.gtas.server.rdm.ejb.actions.AbstractDeleteEntityAction#deleteEntity(IEntity, Number)
* @since GT 2.2 I1
*/
protected void deleteEntity(IEntity entity, Number keyId) throws Exception
{
ActionHelper.getManager().deleteTrigger((Long) entity.getFieldValue(keyId));
}
/**
* @see com.gridnode.gtas.server.rdm.ejb.actions.AbstractDeleteEntityAction#getEntityKeys(IDataFilter)
* @since GT 2.2 I1
*/
protected Collection getEntityKeys(IDataFilter filter) throws Exception
{
return ActionHelper.getManager().findTriggersKeys(filter);
}
/**
* @see com.gridnode.gtas.server.rdm.ejb.actions.AbstractDeleteEntityAction#getEntityList(IDataFilter)
* @since GT 2.2 I1
*/
protected Collection getEntityList(IDataFilter filter) throws Exception
{
return ActionHelper.getManager().findTriggers(filter);
}
} | [
"muhamadnazir@gmail.com"
] | muhamadnazir@gmail.com |
52425cf9b3c03a986cd4030d6d439f8eed3ebf3c | d6efe813044d7d7fd00bc8d75b3fbe60f09ce9c0 | /app/src/main/java/com/bigappcompany/quikmart/adapter/OrderDetailsAdapter.java | f83ec039fb7094f152ced46a2321dfb03257b9e5 | [] | no_license | Shankar1056/quickmart | b12e9c90be9a131c6f4698c10aa70006476abca7 | ab2c9a7c4f32dbdf98bc866335521455c2660265 | refs/heads/master | 2020-04-07T11:21:12.275194 | 2018-03-07T08:59:50 | 2018-03-07T08:59:50 | 124,206,995 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,092 | java | package com.bigappcompany.quikmart.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bigappcompany.quikmart.R;
import com.bigappcompany.quikmart.model.OrderItemModel;
import com.squareup.picasso.Picasso;
import java.util.ArrayList;
/**
* @author Samuel Robert <sam@spotsoon.com>
* @created on 16 Aug 2017 at 3:01 PM
*/
public class OrderDetailsAdapter extends RecyclerView.Adapter<OrderDetailsAdapter.ViewHolder> {
private ArrayList<OrderItemModel> mItemList = new ArrayList<>();
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View itemView = inflater.inflate(R.layout.item_order_details, parent, false);
return new ViewHolder(itemView);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
OrderItemModel item = mItemList.get(position);
Context context = holder.itemView.getContext();
holder.titleTV.setText(item.getTitle());
holder.quantityTV.setText(context.getString(R.string.format_quantity, item.getQty()));
holder.priceTV.setText(context.getString(R.string.format_price, item.getPrice()));
Picasso.with(context)
.load(item.getImageUrl())
.fit()
.centerInside()
.into(holder.imageIV);
}
@Override
public int getItemCount() {
return mItemList.size();
}
public void addItems(ArrayList<OrderItemModel> itemList) {
mItemList = itemList;
}
public class ViewHolder extends RecyclerView.ViewHolder {
ImageView imageIV;
TextView titleTV, quantityTV, priceTV;
public ViewHolder(View itemView) {
super(itemView);
imageIV = (ImageView) itemView.findViewById(R.id.iv_image);
titleTV = (TextView) itemView.findViewById(R.id.tv_title);
quantityTV = (TextView) itemView.findViewById(R.id.tv_quantity);
priceTV = (TextView) itemView.findViewById(R.id.tv_price);
}
}
}
| [
"shankar@spotsoon.com"
] | shankar@spotsoon.com |
2fe0f3299ce9e900d33a06ed108e6aa492d0b78f | 0205999a193bf670cd9d6e5b37e342b75f4e15b8 | /spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java | 3920dabc15ae6804594f453ef639133235aee277 | [
"Apache-2.0"
] | permissive | leaderli/spring-source | 18aa9a8c7c5e22d6faa6167e999ff88ffa211ba0 | 0edd75b2cedb00ad1357e7455a4fe9474b3284da | refs/heads/master | 2022-02-18T16:34:19.625966 | 2022-01-29T08:56:48 | 2022-01-29T08:56:48 | 204,468,286 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,141 | java | /*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.scheduling.quartz;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SimpleTrigger;
import org.quartz.impl.triggers.SimpleTriggerImpl;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.Constants;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import java.util.Date;
import java.util.Map;
/**
* A Spring {@link FactoryBean} for creating a Quartz {@link org.quartz.SimpleTrigger}
* instance, supporting bean-style usage for trigger configuration.
*
* <p>{@code SimpleTrigger(Impl)} itself is already a JavaBean but lacks sensible defaults.
* This class uses the Spring bean name as job name, the Quartz default group ("DEFAULT")
* as job group, the current time as start time, and indefinite repetition, if not specified.
*
* <p>This class will also register the trigger with the job name and group of
* a given {@link org.quartz.JobDetail}. This allows {@link SchedulerFactoryBean}
* to automatically register a trigger for the corresponding JobDetail,
* instead of registering the JobDetail separately.
*
* @author Juergen Hoeller
* @see #setName
* @see #setGroup
* @see #setStartDelay
* @see #setJobDetail
* @see SchedulerFactoryBean#setTriggers
* @see SchedulerFactoryBean#setJobDetails
* @since 3.1
*/
public class SimpleTriggerFactoryBean implements FactoryBean<SimpleTrigger>, BeanNameAware, InitializingBean {
/**
* Constants for the SimpleTrigger class.
*/
private static final Constants constants = new Constants(SimpleTrigger.class);
@Nullable
private String name;
@Nullable
private String group;
@Nullable
private JobDetail jobDetail;
private JobDataMap jobDataMap = new JobDataMap();
@Nullable
private Date startTime;
private long startDelay;
private long repeatInterval;
private int repeatCount = -1;
private int priority;
private int misfireInstruction;
@Nullable
private String description;
@Nullable
private String beanName;
@Nullable
private SimpleTrigger simpleTrigger;
/**
* Specify the trigger's name.
*/
public void setName(String name) {
this.name = name;
}
/**
* Specify the trigger's group.
*/
public void setGroup(String group) {
this.group = group;
}
/**
* Set the JobDetail that this trigger should be associated with.
*/
public void setJobDetail(JobDetail jobDetail) {
this.jobDetail = jobDetail;
}
/**
* Return the trigger's JobDataMap.
*/
public JobDataMap getJobDataMap() {
return this.jobDataMap;
}
/**
* Set the trigger's JobDataMap.
*
* @see #setJobDataAsMap
*/
public void setJobDataMap(JobDataMap jobDataMap) {
this.jobDataMap = jobDataMap;
}
/**
* Register objects in the JobDataMap via a given Map.
* <p>These objects will be available to this Trigger only,
* in contrast to objects in the JobDetail's data map.
*
* @param jobDataAsMap a Map with String keys and any objects as values
* (for example Spring-managed beans)
*/
public void setJobDataAsMap(Map<String, ?> jobDataAsMap) {
this.jobDataMap.putAll(jobDataAsMap);
}
/**
* Set a specific start time for the trigger.
* <p>Note that a dynamically computed {@link #setStartDelay} specification
* overrides a static timestamp set here.
*/
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
/**
* Set the start delay in milliseconds.
* <p>The start delay is added to the current system time (when the bean starts)
* to control the start time of the trigger.
*
* @see #setStartTime
*/
public void setStartDelay(long startDelay) {
Assert.isTrue(startDelay >= 0, "Start delay cannot be negative");
this.startDelay = startDelay;
}
/**
* Specify the interval between execution times of this trigger.
*/
public void setRepeatInterval(long repeatInterval) {
this.repeatInterval = repeatInterval;
}
/**
* Specify the number of times this trigger is supposed to fire.
* <p>Default is to repeat indefinitely.
*/
public void setRepeatCount(int repeatCount) {
this.repeatCount = repeatCount;
}
/**
* Specify the priority of this trigger.
*/
public void setPriority(int priority) {
this.priority = priority;
}
/**
* Specify a misfire instruction for this trigger.
*/
public void setMisfireInstruction(int misfireInstruction) {
this.misfireInstruction = misfireInstruction;
}
/**
* Set the misfire instruction via the name of the corresponding
* constant in the {@link org.quartz.SimpleTrigger} class.
* Default is {@code MISFIRE_INSTRUCTION_SMART_POLICY}.
*
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_FIRE_NOW
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT
* @see org.quartz.Trigger#MISFIRE_INSTRUCTION_SMART_POLICY
*/
public void setMisfireInstructionName(String constantName) {
this.misfireInstruction = constants.asNumber(constantName).intValue();
}
/**
* Associate a textual description with this trigger.
*/
public void setDescription(String description) {
this.description = description;
}
@Override
public void setBeanName(String beanName) {
this.beanName = beanName;
}
@Override
public void afterPropertiesSet() {
if (this.name == null) {
this.name = this.beanName;
}
if (this.group == null) {
this.group = Scheduler.DEFAULT_GROUP;
}
if (this.jobDetail != null) {
this.jobDataMap.put("jobDetail", this.jobDetail);
}
if (this.startDelay > 0 || this.startTime == null) {
this.startTime = new Date(System.currentTimeMillis() + this.startDelay);
}
SimpleTriggerImpl sti = new SimpleTriggerImpl();
sti.setName(this.name != null ? this.name : toString());
sti.setGroup(this.group);
if (this.jobDetail != null) {
sti.setJobKey(this.jobDetail.getKey());
}
sti.setJobDataMap(this.jobDataMap);
sti.setStartTime(this.startTime);
sti.setRepeatInterval(this.repeatInterval);
sti.setRepeatCount(this.repeatCount);
sti.setPriority(this.priority);
sti.setMisfireInstruction(this.misfireInstruction);
sti.setDescription(this.description);
this.simpleTrigger = sti;
}
@Override
@Nullable
public SimpleTrigger getObject() {
return this.simpleTrigger;
}
@Override
public Class<?> getObjectType() {
return SimpleTrigger.class;
}
@Override
public boolean isSingleton() {
return true;
}
}
| [
"429243408@qq.com"
] | 429243408@qq.com |
7bea55d87ca810a95b26ea8cd4bc9a739ebff3b1 | a5e5576848b89d6faf16e02d0f8391cae4a4f79e | /Ut02/src/EJEMPLOS/Ejercicio12Practica4.java | ab9145c5c6fa070fdf4bd06e4679e5fb5094ac84 | [] | no_license | juanra1997/Programacion | 31560a868e989537281ee1061650e81c6daee9b1 | 54508cabfa4bad8c9b795cff7a9468cab5e5cb34 | refs/heads/master | 2021-04-27T17:24:47.396131 | 2018-04-09T11:54:47 | 2018-04-09T11:54:47 | 122,317,592 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | package EJEMPLOS;
import java.util.Scanner;
public class Ejercicio12Practica4 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner teclado=new Scanner(System.in);
char prueba;
System.out.println("Introduce un caracter");
prueba=teclado.next().charAt(0);
if(Character.isDigit(prueba)) {
System.out.println("Es un numero");
}
else {System.out.println("Es una letra");
}
teclado.close();
}
}
| [
"juanrainmortal22@yahoo.com"
] | juanrainmortal22@yahoo.com |
35b8c32968ed0e6e3bf8c97bb0102f1ee7588294 | 5598faaaaa6b3d1d8502cbdaca903f9037d99600 | /code_changes/Apache_projects/HDFS-100/e34a6e853b56067133957cd29fbe00003e18c966/~HdfsProxy.java | a92f74b57a27ab44fb6f4313acc8875ad7ffde63 | [] | no_license | SPEAR-SE/LogInBugReportsEmpirical_Data | 94d1178346b4624ebe90cf515702fac86f8e2672 | ab9603c66899b48b0b86bdf63ae7f7a604212b29 | refs/heads/master | 2022-12-18T02:07:18.084659 | 2020-09-09T16:49:34 | 2020-09-09T16:49:34 | 286,338,252 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 5,019 | 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.hadoop.hdfsproxy;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.hdfs.HdfsConfiguration;
/**
* A HTTPS/SSL proxy to HDFS, implementing certificate based access control.
*/
public class HdfsProxy {
public static final Log LOG = LogFactory.getLog(HdfsProxy.class);
private ProxyHttpServer server;
private InetSocketAddress sslAddr;
/** Construct a proxy from the given configuration */
public HdfsProxy(Configuration conf) throws IOException {
try {
initialize(conf);
} catch (IOException e) {
this.stop();
throw e;
}
}
private void initialize(Configuration conf) throws IOException {
sslAddr = getSslAddr(conf);
String nn = conf.get("hdfsproxy.dfs.namenode.address");
if (nn == null)
throw new IOException("HDFS NameNode address is not specified");
InetSocketAddress nnAddr = NetUtils.createSocketAddr(nn);
LOG.info("HDFS NameNode is at: " + nnAddr.getHostName() + ":" + nnAddr.getPort());
Configuration sslConf = new HdfsConfiguration(false);
sslConf.addResource(conf.get("hdfsproxy.https.server.keystore.resource",
"ssl-server.xml"));
// unit testing
sslConf.set("proxy.http.test.listener.addr",
conf.get("proxy.http.test.listener.addr"));
this.server = new ProxyHttpServer(sslAddr, sslConf);
this.server.setAttribute("proxy.https.port", server.getPort());
this.server.setAttribute("name.node.address", nnAddr);
this.server.setAttribute("name.conf", new HdfsConfiguration());
this.server.addGlobalFilter("ProxyFilter", ProxyFilter.class.getName(), null);
this.server.addServlet("listPaths", "/listPaths/*", ProxyListPathsServlet.class);
this.server.addServlet("data", "/data/*", ProxyFileDataServlet.class);
this.server.addServlet("streamFile", "/streamFile/*", ProxyStreamFile.class);
}
/** return the http port if any, only for testing purposes */
int getPort() throws IOException {
return server.getPort();
}
/**
* Start the server.
*/
public void start() throws IOException {
this.server.start();
LOG.info("HdfsProxy server up at: " + sslAddr.getHostName() + ":"
+ sslAddr.getPort());
}
/**
* Stop all server threads and wait for all to finish.
*/
public void stop() {
try {
if (server != null) {
server.stop();
server.join();
}
} catch (Exception e) {
LOG.warn("Got exception shutting down proxy", e);
}
}
/**
* Wait for service to finish.
* (Normally, it runs forever.)
*/
public void join() {
try {
this.server.join();
} catch (InterruptedException ie) {
}
}
static InetSocketAddress getSslAddr(Configuration conf) throws IOException {
String addr = conf.get("hdfsproxy.https.address");
if (addr == null)
throw new IOException("HdfsProxy address is not specified");
return NetUtils.createSocketAddr(addr);
}
public static HdfsProxy createHdfsProxy(String argv[], Configuration conf)
throws IOException {
if (argv.length > 0) {
System.err.println("Usage: HdfsProxy");
return null;
}
if (conf == null) {
conf = new HdfsConfiguration(false);
conf.addResource("hdfsproxy-default.xml");
}
StringUtils.startupShutdownMessage(HdfsProxy.class, argv, LOG);
HdfsProxy proxy = new HdfsProxy(conf);
proxy.start();
return proxy;
}
public static void main(String[] argv) throws Exception {
try {
HdfsProxy proxy = createHdfsProxy(argv, null);
if (proxy != null)
proxy.join();
} catch (Throwable e) {
LOG.error(StringUtils.stringifyException(e));
System.exit(-1);
}
}
}
| [
"archen94@gmail.com"
] | archen94@gmail.com |
2a5df2f0c8096fd529723f94634b05d48fccf48f | c34a183a6f5988f0038ed7d1bb7029450983d3f3 | /core/src/io/anuke/mindustry/ui/dialogs/MissionDialog.java | d41b2b74806208c1c93e35f0bf4161558586cdfb | [
"GPL-3.0-only"
] | permissive | Sonnicon/Mindustry | f9ad05c20ace8c19e82bbe151273509f396cd138 | ea87b958ef97b9c7f1a6c47fdad7b79adb473436 | refs/heads/master | 2020-04-04T08:28:59.488222 | 2018-11-18T14:46:13 | 2018-11-18T14:46:13 | 124,954,006 | 0 | 0 | MIT | 2018-03-12T21:30:16 | 2018-03-12T21:30:16 | null | UTF-8 | Java | false | false | 779 | java | package io.anuke.mindustry.ui.dialogs;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.maps.Sector;
import io.anuke.ucore.util.Bundles;
public class MissionDialog extends FloatingDialog{
public MissionDialog(){
super("$text.mission.complete");
setFillParent(false);
}
public void show(Sector sector){
buttons().clear();
content().clear();
buttons().addButton("$text.nextmission", () -> {
hide();
Vars.ui.paused.runExitSave();
Vars.ui.sectors.show();
}).size(190f, 64f);
buttons().addButton("$text.continue", this::hide).size(190f, 64f);
content().add(Bundles.format("text.mission.complete.body", sector.x, sector.y)).pad(10);
show();
}
}
| [
"arnukren@gmail.com"
] | arnukren@gmail.com |
6e8e7cba32f9bb09f18f897a74709134d65365de | 1b949586c8feb0fb5230382fa8501850893950b1 | /fineract-provider/src/main/java/org/apache/fineract/portfolio/self/pockets/service/PocketWritePlatformServiceImpl.java | b4de19a9923fc68432ec2080a18b65b836340ff9 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"LGPL-2.0-or-later",
"LicenseRef-scancode-public-domain",
"CDDL-1.1",
"LicenseRef-scancode-free-unknown",
"EPL-1.0",
"Classpath-exception-2.0",
"GPL-2.0-only"
] | permissive | cjxonix/fineractapp | 44d3a66cf9eddc99bfa3d8f5697797bc855f8e46 | b711fb2d142f5f7ecc39448fa868cc0542084328 | refs/heads/master | 2022-06-19T11:52:56.167338 | 2020-04-06T05:37:37 | 2020-04-06T05:37:37 | 253,395,889 | 0 | 0 | Apache-2.0 | 2022-06-03T02:18:38 | 2020-04-06T04:39:14 | Java | UTF-8 | Java | false | false | 6,936 | 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.fineract.portfolio.self.pockets.service;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import java.util.ArrayList;
import java.util.List;
import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder;
import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException;
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
import org.apache.fineract.portfolio.self.pockets.api.PocketApiConstants;
import org.apache.fineract.portfolio.self.pockets.data.PocketDataValidator;
import org.apache.fineract.portfolio.self.pockets.domain.Pocket;
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping;
import org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMappingRepositoryWrapper;
import org.apache.fineract.portfolio.self.pockets.domain.PocketRepositoryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class PocketWritePlatformServiceImpl implements PocketWritePlatformService {
private final PlatformSecurityContext context;
private final PocketDataValidator pocketDataValidator;
private final AccountEntityServiceFactory accountEntityServiceFactory;
private final PocketRepositoryWrapper pocketRepositoryWrapper;
private final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper;
private final PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService;
@Autowired
public PocketWritePlatformServiceImpl(final PlatformSecurityContext context,
PocketDataValidator pocketDataValidator, final AccountEntityServiceFactory accountEntityServiceFactory,
final PocketRepositoryWrapper pocketRepositoryWrapper,
final PocketAccountMappingRepositoryWrapper pocketAccountMappingRepositoryWrapper,
final PocketAccountMappingReadPlatformService pocketAccountMappingReadPlatformService) {
this.context = context;
this.pocketDataValidator = pocketDataValidator;
this.accountEntityServiceFactory = accountEntityServiceFactory;
this.pocketRepositoryWrapper = pocketRepositoryWrapper;
this.pocketAccountMappingRepositoryWrapper = pocketAccountMappingRepositoryWrapper;
this.pocketAccountMappingReadPlatformService = pocketAccountMappingReadPlatformService;
}
@Transactional
@Override
public CommandProcessingResult linkAccounts(JsonCommand command) {
this.pocketDataValidator.validateForLinkingAccounts(command.json());
JsonArray accountsDetail = command.arrayOfParameterNamed(PocketApiConstants.accountsDetail);
Long pocketId = this.pocketRepositoryWrapper.findByAppUserId(this.context.authenticatedUser().getId());
if (pocketId == null) {
final Pocket pocket = Pocket.instance(this.context.authenticatedUser().getId());
this.pocketRepositoryWrapper.saveAndFlush(pocket);
pocketId = pocket.getId();
}
final List<PocketAccountMapping> pocketAccounts = new ArrayList<>();
for (int i = 0; i < accountsDetail.size(); i++) {
final JsonObject element = accountsDetail.get(i).getAsJsonObject();
final Long accountId = element.get(PocketApiConstants.accountIdParamName).getAsLong();
final String accountType = element.get(PocketApiConstants.accountTypeParamName).getAsString();
final AccountEntityService accountEntityService = this.accountEntityServiceFactory
.getAccountEntityService(accountType);
accountEntityService.validateSelfUserAccountMapping(accountId);
Integer accountTypeValue = EntityAccountType.valueOf(accountType).getValue();
if (this.pocketAccountMappingReadPlatformService.validatePocketAndAccountMapping(pocketId, accountId,
accountTypeValue)) {
throw new PlatformDataIntegrityException(PocketApiConstants.duplicateMappingException,
PocketApiConstants.duplicateMappingExceptionMessage, accountId, accountType);
}
final String accountNumber = accountEntityService.retrieveAccountNumberByAccountId(accountId);
pocketAccounts.add(PocketAccountMapping.instance(pocketId, accountId, accountTypeValue, accountNumber));
}
this.pocketAccountMappingRepositoryWrapper.save(pocketAccounts);
return new CommandProcessingResultBuilder().withCommandId(command.commandId()).withEntityId(pocketId).build();
}
@Override
public CommandProcessingResult delinkAccounts(JsonCommand command) {
this.pocketDataValidator.validateForDeLinkingAccounts(command.json());
JsonArray pocketAccountMappingList = command.arrayOfParameterNamed(PocketApiConstants.pocketAccountMappingList);
Long pocketId = this.pocketRepositoryWrapper
.findByAppUserIdWithNotFoundDetection(this.context.authenticatedUser().getId());
final List<PocketAccountMapping> pocketAccounts = new ArrayList<>();
for (JsonElement mapping : pocketAccountMappingList) {
final Long mappingId = mapping.getAsLong();
PocketAccountMapping pocketAccountMapping = this.pocketAccountMappingRepositoryWrapper
.findByIdAndPocketIdWithNotFoundException(mappingId, pocketId);
if (pocketAccountMapping != null) {
pocketAccounts.add(pocketAccountMapping);
}
}
this.pocketAccountMappingRepositoryWrapper.delete(pocketAccounts);
return new CommandProcessingResultBuilder().withCommandId(command.commandId()).withEntityId(pocketId).build();
}
}
| [
"niwoogabajoel@gmail.com"
] | niwoogabajoel@gmail.com |
a84bc5ba521e1cda6c856f3d75de1e917ed5f6c0 | cb47a69eb202feae227358af2493efe9c35d0cf6 | /spring-cloud/springboot-seata/seata-samples-master/seata-xa/order-xa/src/main/java/io/seata/sample/OrderXADataSourceConfiguration.java | c5b04b4cd9878e27a210307dce70e23073b0c331 | [
"Apache-2.0"
] | permissive | WCry/demo | e4f6ee469e39e9a96e9deec2724eb89d642830b5 | 5801b12371a1beb610328a8b83a056276427817d | refs/heads/master | 2023-05-28T14:42:29.175634 | 2021-06-14T14:06:43 | 2021-06-14T14:06:43 | 266,535,701 | 2 | 1 | Apache-2.0 | 2020-10-21T01:03:55 | 2020-05-24T12:24:51 | Java | UTF-8 | Java | false | false | 1,066 | java | package io.seata.sample;
import com.alibaba.druid.pool.DruidDataSource;
import io.seata.rm.datasource.xa.DataSourceProxyXA;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.sql.DataSource;
@Configuration
public class OrderXADataSourceConfiguration {
@Bean
@ConfigurationProperties(prefix = "spring.datasource")
public DruidDataSource druidDataSource() {
return new DruidDataSource();
}
@Bean("dataSourceProxy")
public DataSource dataSource(DruidDataSource druidDataSource) {
// DataSourceProxy for AT mode
// return new DataSourceProxy(druidDataSource);
// DataSourceProxyXA for XA mode
return new DataSourceProxyXA(druidDataSource);
}
@Bean("jdbcTemplate")
public JdbcTemplate jdbcTemplate(DataSource dataSourceProxy) {
return new JdbcTemplate(dataSourceProxy);
}
}
| [
"627292959@qq.com"
] | 627292959@qq.com |
636295e8885a454ae8f1c88354873cade31e7fc8 | 99993cee373542810763c6a037db527b86b0d4ac | /fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluent.java | 0054b8b5620eb098ad1e2db2175232aa5f0bf2ae | [
"Apache-2.0"
] | permissive | saparaj/java | b54c355f2276ac7ac2cd09f2f0cf3212f7c41b2d | a7266c798f16ab01e9ceac441de199bd8a5a839a | refs/heads/master | 2023-08-15T19:35:11.163843 | 2021-10-13T16:53:49 | 2021-10-13T16:53:49 | 269,235,029 | 0 | 0 | Apache-2.0 | 2020-06-04T01:46:44 | 2020-06-04T01:46:43 | null | UTF-8 | Java | false | false | 1,050 | java | package io.kubernetes.client.openapi.models;
import java.lang.Deprecated;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Fluent;
import java.lang.String;
import java.lang.Boolean;
public interface V1GroupVersionForDiscoveryFluent<A extends io.kubernetes.client.openapi.models.V1GroupVersionForDiscoveryFluent<A>> extends io.kubernetes.client.fluent.Fluent<A> {
public java.lang.String getGroupVersion();
public A withGroupVersion(java.lang.String groupVersion);
public java.lang.Boolean hasGroupVersion();
@java.lang.Deprecated
/**
* Method is deprecated. use withGroupVersion instead.
*/
public A withNewGroupVersion(java.lang.String original);
public java.lang.String getVersion();
public A withVersion(java.lang.String version);
public java.lang.Boolean hasVersion();
@java.lang.Deprecated
/**
* Method is deprecated. use withVersion instead.
*/
public A withNewVersion(java.lang.String original);
}
| [
"bburns@microsoft.com"
] | bburns@microsoft.com |
5d62693565fec940a748241b52ff60a07904ff53 | 99c03face59ec13af5da080568d793e8aad8af81 | /hom_classifier/2om_classifier/scratch/AOIS74AOIS72/Pawn.java | dbe153665985d886016bfb47286df7bf4e423641 | [] | no_license | fouticus/HOMClassifier | 62e5628e4179e83e5df6ef350a907dbf69f85d4b | 13b9b432e98acd32ae962cbc45d2f28be9711a68 | refs/heads/master | 2021-01-23T11:33:48.114621 | 2020-05-13T18:46:44 | 2020-05-13T18:46:44 | 93,126,040 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,761 | java | // This is a mutant program.
// Author : ysma
import java.util.ArrayList;
public class Pawn extends ChessPiece
{
public Pawn( ChessBoard board, ChessPiece.Color color )
{
super( board, color );
}
public java.lang.String toString()
{
if (color == ChessPiece.Color.WHITE) {
return "♙";
} else {
return "♟";
}
}
public java.util.ArrayList<String> legalMoves()
{
java.util.ArrayList<String> returnList = new java.util.ArrayList<String>();
if (this.getColor().equals( ChessPiece.Color.WHITE )) {
int currentCol = this.getColumn();
int nextRow = this.getRow() + 1;
if (nextRow <= 7) {
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextRow, currentCol ) );
}
}
if (this.getRow() == 1) {
int nextNextRow = this.getRow() + 2;
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextNextRow, currentCol ) );
}
}
int leftColumn = currentCol - 1;
int rightColumn = currentCol + 1;
if (leftColumn >= 0) {
if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, leftColumn ) );
}
}
}
if (rightColumn <= 7) {
if (board.getPiece( onePossibleMove( nextRow, rightColumn-- ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow--, rightColumn ) );
}
}
}
} else {
int currentCol = this.getColumn();
int nextRow = this.getRow() - 1;
if (nextRow >= 0) {
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextRow, currentCol ) );
}
}
if (this.getRow() == 6) {
int nextNextRow = this.getRow() - 2;
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextNextRow, currentCol ) );
}
}
int leftColumn = currentCol - 1;
int rightColumn = currentCol + 1;
if (leftColumn >= 0) {
if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, leftColumn ) );
}
}
}
if (rightColumn <= 7) {
if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, rightColumn ) );
}
}
}
}
return returnList;
}
} | [
"fout.alex@gmail.com"
] | fout.alex@gmail.com |
02aadad373e814745ae6f06cdc3f391c30a6e5b5 | 863acb02a064a0fc66811688a67ce3511f1b81af | /sources/com/fasterxml/jackson/databind/deser/impl/ObjectIdReferenceProperty.java | b95434d9acccf00aaa16d9474a7058638f74e16c | [
"MIT"
] | permissive | Game-Designing/Custom-Football-Game | 98d33eb0c04ca2c48620aa4a763b91bc9c1b7915 | 47283462b2066ad5c53b3c901182e7ae62a34fc8 | refs/heads/master | 2020-08-04T00:02:04.876780 | 2019-10-06T06:55:08 | 2019-10-06T06:55:08 | 211,914,568 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,625 | java | package com.fasterxml.jackson.databind.deser.impl;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.PropertyName;
import com.fasterxml.jackson.databind.deser.NullValueProvider;
import com.fasterxml.jackson.databind.deser.SettableBeanProperty;
import com.fasterxml.jackson.databind.deser.UnresolvedForwardReference;
import com.fasterxml.jackson.databind.deser.impl.ReadableObjectId.Referring;
import com.fasterxml.jackson.databind.introspect.AnnotatedMember;
import com.fasterxml.jackson.databind.introspect.ObjectIdInfo;
import java.io.IOException;
public class ObjectIdReferenceProperty extends SettableBeanProperty {
private final SettableBeanProperty _forward;
public static final class PropertyReferring extends Referring {
private final ObjectIdReferenceProperty _parent;
public final Object _pojo;
public PropertyReferring(ObjectIdReferenceProperty parent, UnresolvedForwardReference ref, Class<?> type, Object ob) {
super(ref, type);
this._parent = parent;
this._pojo = ob;
}
public void handleResolvedForwardReference(Object id, Object value) throws IOException {
if (hasId(id)) {
this._parent.set(this._pojo, value);
return;
}
StringBuilder sb = new StringBuilder();
sb.append("Trying to resolve a forward reference with id [");
sb.append(id);
sb.append("] that wasn't previously seen as unresolved.");
throw new IllegalArgumentException(sb.toString());
}
}
public ObjectIdReferenceProperty(SettableBeanProperty forward, ObjectIdInfo objectIdInfo) {
super(forward);
this._forward = forward;
this._objectIdInfo = objectIdInfo;
}
public ObjectIdReferenceProperty(ObjectIdReferenceProperty src, JsonDeserializer<?> deser, NullValueProvider nva) {
super(src, deser, nva);
this._forward = src._forward;
this._objectIdInfo = src._objectIdInfo;
}
public ObjectIdReferenceProperty(ObjectIdReferenceProperty src, PropertyName newName) {
super(src, newName);
this._forward = src._forward;
this._objectIdInfo = src._objectIdInfo;
}
public SettableBeanProperty withName(PropertyName newName) {
return new ObjectIdReferenceProperty(this, newName);
}
public SettableBeanProperty withValueDeserializer(JsonDeserializer<?> deser) {
if (this._valueDeserializer == deser) {
return this;
}
return new ObjectIdReferenceProperty(this, deser, this._nullProvider);
}
public SettableBeanProperty withNullProvider(NullValueProvider nva) {
return new ObjectIdReferenceProperty(this, this._valueDeserializer, nva);
}
public void fixAccess(DeserializationConfig config) {
SettableBeanProperty settableBeanProperty = this._forward;
if (settableBeanProperty != null) {
settableBeanProperty.fixAccess(config);
}
}
public AnnotatedMember getMember() {
return this._forward.getMember();
}
public int getCreatorIndex() {
return this._forward.getCreatorIndex();
}
public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException {
deserializeSetAndReturn(p, ctxt, instance);
}
public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException {
try {
return setAndReturn(instance, deserialize(p, ctxt));
} catch (UnresolvedForwardReference reference) {
if ((this._objectIdInfo == null && this._valueDeserializer.getObjectIdReader() == null) ? false : true) {
reference.getRoid().appendReferring(new PropertyReferring(this, reference, this._type.getRawClass(), instance));
return null;
}
throw JsonMappingException.from(p, "Unresolved forward reference but no identity info", (Throwable) reference);
}
}
public void set(Object instance, Object value) throws IOException {
this._forward.set(instance, value);
}
public Object setAndReturn(Object instance, Object value) throws IOException {
return this._forward.setAndReturn(instance, value);
}
}
| [
"tusharchoudhary0003@gmail.com"
] | tusharchoudhary0003@gmail.com |
d8567ae59484a324b779ee52f7a9238e50ddbfbf | d381092dd5f26df756dc9d0a2474b253b9e97bfb | /impe3/impe3-palette/src/main/java/com/isotrol/impe3/freemarker/wrap/PortalAPIMethodMap.java | ed19bbf994a195f5f4f6ed27c90ee5e540f9934a | [] | no_license | isotrol-portal3/portal3 | 2d21cbe07a6f874fff65e85108dcfb0d56651aab | 7bd4dede31efbaf659dd5aec72b193763bfc85fe | refs/heads/master | 2016-09-15T13:32:35.878605 | 2016-03-07T09:50:45 | 2016-03-07T09:50:45 | 39,732,690 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,933 | java | /**
* This file is part of Port@l
* Port@l 3.0 - Portal Engine and Management System
* Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com
*
* Port@l 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.
*
* Port@l 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 Port@l. If not, see <http://www.gnu.org/licenses/>.
*/
package com.isotrol.impe3.freemarker.wrap;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.ImmutableMap;
import com.isotrol.impe3.api.ContentKey;
import com.isotrol.impe3.api.NavigationKey;
import com.isotrol.impe3.api.PageKey;
import com.isotrol.impe3.api.Route;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
/**
* Collection of Port@l API method FreeMarker models.
* @author Andres Rodriguez
* @param <T> Wrapped object type.
*/
final class PortalAPIMethodMap<T> {
private final ImmutableMap<String, PortalAPIMethod<? super T>> map;
private static <T> PortalAPIMethodMap<T> build(PortalAPIMethod<? super T>[]... values) {
ImmutableMap.Builder<String, PortalAPIMethod<? super T>> builder = ImmutableMap.builder();
for (PortalAPIMethod<? super T>[] methods : values) {
for (PortalAPIMethod<? super T> method : methods) {
builder.put(method.getName(), method);
}
}
return new PortalAPIMethodMap<T>(builder.build());
}
private PortalAPIMethodMap(ImmutableMap<String, PortalAPIMethod<? super T>> map) {
this.map = checkNotNull(map);
}
@SuppressWarnings("unchecked")
static final PortalAPIMethodMap<Route> ROUTE = build(RouteMethods.values());
@SuppressWarnings("unchecked")
static final PortalAPIMethodMap<PageKey> PAGE_KEY = build(PageKeyMethods.values());
@SuppressWarnings("unchecked")
static final PortalAPIMethodMap<ContentKey> CONTENT_KEY = build(ContentKeyMethods.values());
@SuppressWarnings("unchecked")
static final PortalAPIMethodMap<NavigationKey> NAVIGATION_KEY = build(NavigationKeyMethods.values());
/**
* Computes the method value.
* @param key Requested key.
* @param wrapper Object wrapper.
* @param object Wrapped object.
* @return The template model or {@code null} if the key is not found.
*/
TemplateModel get(String key, PortalObjectWrapper wrapper, T object) throws TemplateModelException {
if (map.containsKey(key)) {
return map.get(key).get(wrapper, object);
}
return null;
}
}
| [
"isotrol-portal@portal.isotrol.com"
] | isotrol-portal@portal.isotrol.com |
d17c0fe5163f0de7645bb187b6630ce47fbdfd72 | 5741045375dcbbafcf7288d65a11c44de2e56484 | /reddit-decompilada/kotlin/reflect/jvm/internal/impl/descriptors/FunctionDescriptor.java | b4e18bf10aadf1400af96a5d91e5e98eda4d0280 | [] | no_license | miarevalo10/ReporteReddit | 18dd19bcec46c42ff933bb330ba65280615c281c | a0db5538e85e9a081bf268cb1590f0eeb113ed77 | refs/heads/master | 2020-03-16T17:42:34.840154 | 2018-05-11T10:16:04 | 2018-05-11T10:16:04 | 132,843,706 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,014 | java | package kotlin.reflect.jvm.internal.impl.descriptors;
import java.util.Collection;
import java.util.List;
import kotlin.reflect.jvm.internal.impl.descriptors.CallableMemberDescriptor.Kind;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitutor;
public interface FunctionDescriptor extends CallableMemberDescriptor {
public interface CopyBuilder<D extends FunctionDescriptor> {
CopyBuilder<D> mo5740a();
CopyBuilder<D> mo5741a(List<ValueParameterDescriptor> list);
CopyBuilder<D> mo5742a(Kind kind);
CopyBuilder<D> mo5743a(DeclarationDescriptor declarationDescriptor);
CopyBuilder<D> mo5744a(Modality modality);
CopyBuilder<D> mo5745a(ReceiverParameterDescriptor receiverParameterDescriptor);
CopyBuilder<D> mo5746a(Visibility visibility);
CopyBuilder<D> mo5747a(Annotations annotations);
CopyBuilder<D> mo5748a(Name name);
CopyBuilder<D> mo5749a(KotlinType kotlinType);
CopyBuilder<D> mo5750a(TypeSubstitution typeSubstitution);
CopyBuilder<D> mo5751a(boolean z);
CopyBuilder<D> mo5752b();
CopyBuilder<D> mo5753b(KotlinType kotlinType);
CopyBuilder<D> mo5754c();
CopyBuilder<D> mo5755d();
CopyBuilder<D> mo5756e();
D mo5757f();
}
boolean mo7746A();
boolean mo7747B();
CopyBuilder<? extends FunctionDescriptor> mo7736C();
DeclarationDescriptor aD_();
boolean mo7752b();
boolean mo7753c();
FunctionDescriptor mo7754d(TypeSubstitutor typeSubstitutor);
Collection<? extends FunctionDescriptor> mo7609m();
FunctionDescriptor mo7761v();
FunctionDescriptor mo7762w();
boolean mo7763x();
boolean mo7764y();
boolean mo7765z();
}
| [
"mi.arevalo10@uniandes.edu.co"
] | mi.arevalo10@uniandes.edu.co |
5290dd7c3853e9ade395983f6892b47ae5ec1622 | 9b4e1dc34118de4a35c164b797bed84bff040c0e | /src/main/java/org/telscenter/sail/webapp/dao/premadecomment/PremadeCommentListDao.java | 6d62dc31f4e6b5e8187113429fc6dfa6af39fe8f | [] | no_license | WISE-Community/WISE-Portal--Deprecated-- | be056cf1d8bf452122eb8c89656fb21f5bb78006 | 60cdf439f5aba2ad68364d7be5a7e913e0d74d86 | refs/heads/master | 2021-01-23T22:15:48.433951 | 2013-10-29T23:28:48 | 2013-10-29T23:28:48 | 2,350,503 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,847 | java | /**
* Copyright (c) 2008 Regents of the University of California (Regents). Created
* by TELS, Graduate School of Education, University of California at Berkeley.
*
* This software is distributed under the GNU Lesser General Public License, v2.
*
* Permission is hereby granted, without written agreement and without license
* or royalty fees, to use, copy, modify, and distribute this software and its
* documentation for any purpose, provided that the above copyright notice and
* the following two paragraphs appear in all copies of this software.
*
* REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE. THE SOFTWAREAND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
* HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
* SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
* REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.telscenter.sail.webapp.dao.premadecomment;
import java.util.List;
import net.sf.sail.webapp.dao.SimpleDao;
import net.sf.sail.webapp.domain.User;
import org.telscenter.sail.webapp.domain.Run;
import org.telscenter.sail.webapp.domain.premadecomment.PremadeCommentList;
/**
* @author patrick lawler
* @version $Id:$
*/
public interface PremadeCommentListDao<T extends PremadeCommentList> extends SimpleDao<T>{
/**
* Returns a <code>List<PremadeCommentList></code> that the given <code>User</code> owns.
*
* @param <code>User</code> user
* @return <code>List<PremadeCommentList></code>
*/
public List<PremadeCommentList> getListByOwner(User user);
/**
* Returns a <code>List<PremadeCommentList></code> that is associated with the given <code>Run</code>.
*
* @param <code>Run</code> run
* @return <code>List<PremadeCommentList></code>
*/
public List<PremadeCommentList> getListByRun(Run run);
/**
* Returns a List of PremadeCommentList that are associated with the given project id
* @param projectId
* @return
*/
public List<PremadeCommentList> getListByProject(Long projectId);
/**
* Returns a List of PremadeCommentList that have the global field set to true.
* @return
*/
public List<PremadeCommentList> getListByGlobal();
/**
* Returns a PremadeCommentList that has the given id
* @param the id of the PremadeCommentList
* @return a PremadeCommentList or null if there is no PremadeCommentList
* with the given id
*/
public PremadeCommentList getListById(Long id);
}
| [
"geoffreykwan@gmail.com"
] | geoffreykwan@gmail.com |
7771276d50ac409cbb841c360e77a1217d196dbf | 88d785ca23def4ca733f7d52a146bc8d34c77429 | /src/dev/zt/UpliftedVFFV/tiles/GreyGroutTile.java | b3cf2f1fd8ee6881bcd0fca3e9bf405cb28aeb5d | [] | no_license | Donpommelo/Uplifted.VFFV | 30fe1e41a9aeefee16c1e224388af6ce55ebfcce | 99b63eb2a00666eb4fdf84ac20cebebefad1a3dc | refs/heads/master | 2020-12-24T17:44:19.147662 | 2016-06-01T21:46:13 | 2016-06-01T21:46:13 | 33,390,964 | 0 | 0 | null | 2015-08-25T01:57:41 | 2015-04-04T01:58:48 | Java | UTF-8 | Java | false | false | 312 | java | package dev.zt.UpliftedVFFV.tiles;
import java.awt.image.BufferedImage;
import dev.zt.UpliftedVFFV.gfx.Assets;
public class GreyGroutTile extends Tile{
public final static int id = 39;
public final static BufferedImage texture = Assets.GreyGroutTile;
public GreyGroutTile() {
super(texture, id);
}
}
| [
"donpommelo@gmail"
] | donpommelo@gmail |
05570584f0055726fd925792faa592d85ede5df2 | 88f1f670cd31deaf5186fe4d20413026ea7c076b | /build/buildsystem-maven-core/src/main/java/dev/nimbler/build/buildsystem/maven/plugins/MavenEnvironmentPluginExecutor.java | cb7c5988b2c671eb83d05e1aae1afc4242f87ff3 | [] | no_license | neaterbits/compiler | 499517c43bd688262391353bb87fee8e261fb352 | caea422856ed72befd1c98263e861658ffe18001 | refs/heads/main | 2023-08-21T20:14:09.257839 | 2021-08-09T19:18:06 | 2021-08-09T19:23:57 | 183,889,843 | 0 | 0 | null | 2023-08-15T17:45:38 | 2019-04-28T09:53:16 | Java | UTF-8 | Java | false | false | 725 | java | package dev.nimbler.build.buildsystem.maven.plugins;
import java.io.IOException;
import java.net.URLClassLoader;
import java.util.Collection;
import dev.nimbler.build.buildsystem.maven.plugins.descriptor.model.MojoDescriptor;
import dev.nimbler.build.buildsystem.maven.project.model.MavenProject;
public interface MavenEnvironmentPluginExecutor {
void executePluginGoal(
MavenPluginInfo pluginInfo,
MojoDescriptor mojoDescriptor,
Collection<MavenProject> allProjects,
String plugin,
String goal,
MavenProject module,
URLClassLoader classLoader)
throws PluginExecutionException, PluginFailureException, IOException;
}
| [
"nils.lorentzen@gmail.com"
] | nils.lorentzen@gmail.com |
5ef1adf82f1e7c32590efeac55ff0bb60c76f020 | 64b47f83d313af33804b946d0613760b8ff23840 | /tags/stable-3-2/weka/core/AttributeStats.java | 291bc6d61960679d009f6c7d7a28dae07437e2b3 | [] | no_license | hackerastra/weka | afde1c7ab0fbf374e6d6ac6d07220bfaffb9488c | c8366c454e9718d0e1634ddf4a72319dac3ce559 | refs/heads/master | 2021-05-28T08:25:33.811203 | 2015-01-22T03:12:18 | 2015-01-22T03:12:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,417 | java | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* AttributeStats.java
* Copyright (C) 1999 Len Trigg
*
*/
package weka.core;
/**
* A Utility class that contains summary information on an
* the values that appear in a dataset for a particular attribute.
*
* @author <a href="mailto:len@webmind.com">Len Trigg</a>
* @version $Revision: 1.5 $
*/
public class AttributeStats {
/** The number of int-like values */
public int intCount = 0;
/** The number of real-like values (i.e. have a fractional part) */
public int realCount = 0;
/** The number of missing values */
public int missingCount = 0;
/** The number of distinct values */
public int distinctCount = 0;
/** The number of values that only appear once */
public int uniqueCount = 0;
/** The total number of values (i.e. number of instances) */
public int totalCount = 0;
/** Stats on numeric value distributions */
// perhaps Stats should be moved from weka.experiment to weka.core
public weka.experiment.Stats numericStats;
/** Counts of each nominal value */
public int [] nominalCounts;
/**
* Updates the counters for one more observed distinct value.
*
* @param value the value that has just been seen
* @param count the number of times the value appeared
*/
protected void addDistinct(double value, int count) {
if (count > 0) {
if (count == 1) {
uniqueCount++;
}
if (Utils.eq(value, (double)((int)value))) {
intCount += count;
} else {
realCount += count;
}
if (nominalCounts != null) {
nominalCounts[(int)value] = count;
}
if (numericStats != null) {
numericStats.add(value, count);
numericStats.calculateDerived();
}
}
distinctCount++;
}
/**
* Returns a human readable representation of this AttributeStats instance.
*
* @return a String represtinging these AttributeStats.
*/
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(Utils.padLeft("Type", 4)).append(Utils.padLeft("Nom", 5));
sb.append(Utils.padLeft("Int", 5)).append(Utils.padLeft("Real", 5));
sb.append(Utils.padLeft("Missing", 12));
sb.append(Utils.padLeft("Unique", 12));
sb.append(Utils.padLeft("Dist", 6));
if (nominalCounts != null) {
sb.append(' ');
for (int i = 0; i < nominalCounts.length; i++) {
sb.append(Utils.padLeft("C[" + i + "]", 5));
}
}
sb.append('\n');
long percent;
percent = Math.round(100.0 * intCount / totalCount);
if (nominalCounts != null) {
sb.append(Utils.padLeft("Nom", 4)).append(' ');
sb.append(Utils.padLeft("" + percent, 3)).append("% ");
sb.append(Utils.padLeft("" + 0, 3)).append("% ");
} else {
sb.append(Utils.padLeft("Num", 4)).append(' ');
sb.append(Utils.padLeft("" + 0, 3)).append("% ");
sb.append(Utils.padLeft("" + percent, 3)).append("% ");
}
percent = Math.round(100.0 * realCount / totalCount);
sb.append(Utils.padLeft("" + percent, 3)).append("% ");
sb.append(Utils.padLeft("" + missingCount, 5)).append(" /");
percent = Math.round(100.0 * missingCount / totalCount);
sb.append(Utils.padLeft("" + percent, 3)).append("% ");
sb.append(Utils.padLeft("" + uniqueCount, 5)).append(" /");
percent = Math.round(100.0 * uniqueCount / totalCount);
sb.append(Utils.padLeft("" + percent, 3)).append("% ");
sb.append(Utils.padLeft("" + distinctCount, 5)).append(' ');
if (nominalCounts != null) {
for (int i = 0; i < nominalCounts.length; i++) {
sb.append(Utils.padLeft("" + nominalCounts[i], 5));
}
}
sb.append('\n');
return sb.toString();
}
}
| [
"(no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92"
] | (no author)@e0a1b77d-ad91-4216-81b1-defd5f83fa92 |
7a206ec265fad28e235674eb62e1d6897160f08a | 4be72dee04ebb3f70d6e342aeb01467e7e8b3129 | /bin/ext-commerce/b2ctelcoservices/src/de/hybris/platform/b2ctelcoservices/bundle/GuidedSellingService.java | 00a4f3737d19afa06c621515b0b0c924c4dd81b9 | [] | no_license | lun130220/hybris | da00774767ba6246d04cdcbc49d87f0f4b0b1b26 | 03c074ea76779f96f2db7efcdaa0b0538d1ce917 | refs/heads/master | 2021-05-14T01:48:42.351698 | 2018-01-07T07:21:53 | 2018-01-07T07:21:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,908 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.b2ctelcoservices.bundle;
import de.hybris.platform.core.model.order.AbstractOrderModel;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.configurablebundleservices.model.BundleTemplateModel;
/**
* Guided Selling service that exposes methods to find the position of a component within a package and to determine
* whether a component has to be displayed in the frontend.
*
* @spring.bean guidedSellingService
*/
public interface GuidedSellingService
{
/**
* Returns the next child bundle template (component) that shall be displayed in the extras page. A component is
* defined as subsequent extra component if it comes after the given <code>bundleTemplate</code> and if its selection
* dependencies are fulfilled and if it is not an auto-pick component and if it contains add-on products.
*
* @param masterAbstractOrder
* the master cart/order
* @param bundleTemplate
* the component for which the subsequent component is searched
* @param bundleNo
* the number of the bundle the <code>bundleTemplate</code> belongs to
* @param relativeposition
* @return the subsequent {@link BundleTemplateModel} if there is one, otherwise <code>null</code>
*/
BundleTemplateModel getRelativeSelectionComponent(final AbstractOrderModel masterAbstractOrder,
final BundleTemplateModel bundleTemplate, final int bundleNo, final int relativeposition);
/**
* Checks if the given <code>bundleTemplate</code> (component) fulfills the criteria to be displayed on the extras
* page. A component can be displayed on the extras page if its selection dependencies are fulfilled and if it is not
* an auto-pick component and if it contains products that have the given <code>clazz</code>.
*
* @param masterAbstractOrder
* the master cart/order
* @param bundleTemplate
* the component which is checked
* @param bundleNo
* the number of the bundle the <code>bundleTemplate</code> belongs to
* @param clazzes
* classes of the products that are displayed on the extras page (e.g. ServiceAddOnModel.class)
* @return <code>true</code> if the given <code>bundleTemplate</code> can be displayed on the extras page, otherwise
* <code>false</code>
*/
boolean isComponentToBeDisplayedOnGuidedSellingSelectPage(AbstractOrderModel masterAbstractOrder,
BundleTemplateModel bundleTemplate, int bundleNo, final Class<? extends ProductModel>... clazzes);
}
| [
"lun130220@gamil.com"
] | lun130220@gamil.com |
7e195d3eeecb5a49d4e39ac0c2857b7b3557297e | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/ad/bas/rec/AD_BAS_1521_LCURLISTRecord.java | 05e74ac5d7bde6866c9b995e80682e5ddb7348f6 | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 1,735 | java | /***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.ad.bas.rec;
import java.sql.*;
import chosun.ciis.ad.bas.dm.*;
import chosun.ciis.ad.bas.ds.*;
/**
*
*/
public class AD_BAS_1521_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{
public String insrt_dt;
public String dlco_nm;
public String chrg_pers;
public String dlco_info;
public String seq;
public AD_BAS_1521_LCURLISTRecord(){}
public void setInsrt_dt(String insrt_dt){
this.insrt_dt = insrt_dt;
}
public void setDlco_nm(String dlco_nm){
this.dlco_nm = dlco_nm;
}
public void setChrg_pers(String chrg_pers){
this.chrg_pers = chrg_pers;
}
public void setDlco_info(String dlco_info){
this.dlco_info = dlco_info;
}
public void setSeq(String seq){
this.seq = seq;
}
public String getInsrt_dt(){
return this.insrt_dt;
}
public String getDlco_nm(){
return this.dlco_nm;
}
public String getChrg_pers(){
return this.chrg_pers;
}
public String getDlco_info(){
return this.dlco_info;
}
public String getSeq(){
return this.seq;
}
}
/* 작성시간 : Mon Oct 31 16:10:07 KST 2016 */ | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
6db74d6aee59206f8d77908dab3da3d69470beda | 1296a5dc273e5ff3fdd104184ad9ff6f47bffb9f | /src/test/java/com/example/db/dao/StudentDaoTest.java | b28675605de9b6b7e4d61455ddd9b6f06f9d156f | [] | no_license | shravyarao1/backenddb | 73d4136ad6319a92be822629d890082d1ac1e741 | 80482f5b88b922d2d2825fd62734be059b9ca8bd | refs/heads/master | 2020-04-13T08:15:19.389322 | 2018-11-11T04:24:40 | 2018-11-11T04:24:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,599 | java | package com.example.db.dao;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager;
import org.springframework.test.context.junit4.SpringRunner;
import com.example.backendDB.dao.StudentDao;
import com.example.backendDB.pojo.Student;
@RunWith(SpringRunner.class)
@DataJpaTest
public class StudentDaoTest {
@Autowired
private StudentDao dao;
@Before
public void insertData() {
Student st = new Student();
st.setName("Bharath");
st.setPhone(1231231231);
st.setQual("SoftwareDeveloper");
Student st2 = new Student();
st2.setName("Bharath");
st2.setPhone(1231231231);
st2.setQual("SoftwareQA");
//Data insertion which is required to testcase
dao.save(st);
dao.save(st2);
}
@Test
public void verifyByQualTest() {
List<Student> listOfStudents = dao.findByQual("SoftwareDeveloper");
System.out.println(listOfStudents.size());
Assert.assertEquals(1,listOfStudents.size());
}
@Test
public void verifyByNameTest() {
List<Student> listOfStudents = dao.findByName("Bharath");
System.out.println(listOfStudents.size());
Assert.assertEquals(2,listOfStudents.size());
}
@Test
public void verifyByStdTest() {
List<Student> listOfStudents = dao.getStd("Bharath");
System.out.println(listOfStudents.size());
Assert.assertEquals(2,listOfStudents.size());
}
}
| [
"bharath.kumar.kristipati@oracle.com"
] | bharath.kumar.kristipati@oracle.com |
f010cd2ec2a6025bde4d34c14cb3e0b0a0e1c4ec | 8b9190a8c5855d5753eb8ba7003e1db875f5d28f | /sources/androidx/core/app/AppOpsManagerCompat.java | 6bf97e1f3bbf25b02152dafd52a1e07847154637 | [] | no_license | stevehav/iowa-caucus-app | 6aeb7de7487bd800f69cb0b51cc901f79bd4666b | e3c7eb39de0be6bbfa8b6b063aaa85dcbcee9044 | refs/heads/master | 2020-12-29T10:25:28.354117 | 2020-02-05T23:15:52 | 2020-02-05T23:15:52 | 238,565,283 | 21 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,841 | java | package androidx.core.app;
import android.app.AppOpsManager;
import android.content.Context;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public final class AppOpsManagerCompat {
public static final int MODE_ALLOWED = 0;
public static final int MODE_DEFAULT = 3;
public static final int MODE_ERRORED = 2;
public static final int MODE_IGNORED = 1;
private AppOpsManagerCompat() {
}
@Nullable
public static String permissionToOp(@NonNull String str) {
if (Build.VERSION.SDK_INT >= 23) {
return AppOpsManager.permissionToOp(str);
}
return null;
}
public static int noteOp(@NonNull Context context, @NonNull String str, int i, @NonNull String str2) {
if (Build.VERSION.SDK_INT >= 19) {
return ((AppOpsManager) context.getSystemService("appops")).noteOp(str, i, str2);
}
return 1;
}
public static int noteOpNoThrow(@NonNull Context context, @NonNull String str, int i, @NonNull String str2) {
if (Build.VERSION.SDK_INT >= 19) {
return ((AppOpsManager) context.getSystemService("appops")).noteOpNoThrow(str, i, str2);
}
return 1;
}
public static int noteProxyOp(@NonNull Context context, @NonNull String str, @NonNull String str2) {
if (Build.VERSION.SDK_INT >= 23) {
return ((AppOpsManager) context.getSystemService(AppOpsManager.class)).noteProxyOp(str, str2);
}
return 1;
}
public static int noteProxyOpNoThrow(@NonNull Context context, @NonNull String str, @NonNull String str2) {
if (Build.VERSION.SDK_INT >= 23) {
return ((AppOpsManager) context.getSystemService(AppOpsManager.class)).noteProxyOpNoThrow(str, str2);
}
return 1;
}
}
| [
"steve@havelka.co"
] | steve@havelka.co |
0e93ad00e8f53a501813656472ce4f2072dcb427 | 66879fb5e25987ec0374f05445859c3069c47290 | /src/main/java/com/hs3/service/sys/SysServiceService.java | f1378b3c68c367067bb1231e75a5c15f9a8a7bf8 | [] | 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 | 1,535 | java | package com.hs3.service.sys;
import com.hs3.dao.sys.SysServiceDao;
import com.hs3.db.Page;
import com.hs3.entity.sys.SysService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("sysServiceService")
public class SysServiceService {
@Autowired
private SysServiceDao sysServiceDao;
public void save(SysService m) {
this.sysServiceDao.save(m);
}
public SysService findOpen(Integer userMark) {
List<SysService> list = listOpen(userMark);
if (list.isEmpty()) {
list = listOpen(null);
}
return list.isEmpty() ? null : (SysService) list.get(0);
}
public List<SysService> listOpen(Integer userMark) {
SysService m = new SysService();
m.setStatus(0);
m.setUserMark(userMark);
return listByCond(m, null);
}
public List<SysService> listByCond(SysService m, Page p) {
return this.sysServiceDao.listByCond(m, p);
}
public List<SysService> list(Page p) {
return this.sysServiceDao.list(p);
}
public List<SysService> listWithOrder(Page p) {
return this.sysServiceDao.listWithOrder(p);
}
public SysService find(Integer id) {
return (SysService) this.sysServiceDao.find(id);
}
public int update(SysService m) {
return this.sysServiceDao.update(m);
}
public int delete(List<Integer> ids) {
return this.sysServiceDao.delete(ids);
}
}
| [
"wangpiju0420@gmail.com"
] | wangpiju0420@gmail.com |
1ec73e13bde1c23bb34d3cd203cda525d903a662 | 377405a1eafa3aa5252c48527158a69ee177752f | /src/com/biznessapps/fragments/single/PreviewAppFragment$8.java | e868e34ea95a8c970f52f302fc0de607e0e08b97 | [] | no_license | apptology/AltFuelFinder | 39c15448857b6472ee72c607649ae4de949beb0a | 5851be78af47d1d6fcf07f9a4ad7f9a5c4675197 | refs/heads/master | 2016-08-12T04:00:46.440301 | 2015-10-25T18:25:16 | 2015-10-25T18:25:16 | 44,921,258 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 792 | 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.biznessapps.fragments.single;
import android.view.View;
import com.biznessapps.api.UrlWrapper;
// Referenced classes of package com.biznessapps.fragments.single:
// PreviewAppFragment
class this._cls0
implements android.view.reviewAppFragment._cls8
{
final PreviewAppFragment this$0;
public void onClick(View view)
{
UrlWrapper.getInstance().useStaging();
PreviewAppFragment.access$1000(PreviewAppFragment.this, PreviewAppFragment.access$1100(PreviewAppFragment.this));
}
()
{
this$0 = PreviewAppFragment.this;
super();
}
}
| [
"rich.foreman@apptology.com"
] | rich.foreman@apptology.com |
f1157930729c97db8a62de3b72cabb745a3efe69 | ca59718f60865008bb8909094a9e75f78c003a92 | /src/main/java/org/onvif/ver10/schema/RecordingSummary.java | fdc9d552e18764d3b1623851bb5a6c20daa1fece | [] | no_license | yanxinorg/MyPTZTest | ea6a3457796d320e6f45393634fc428905bf9758 | 882448f7bfe3c191f5b3951d31178e7fcabb9944 | refs/heads/master | 2021-04-03T08:01:19.247051 | 2018-03-12T08:28:43 | 2018-03-12T08:28:43 | 124,856,618 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,765 | java | //
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 generiert
// Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2014.02.04 um 12:22:03 PM CET
//
package org.onvif.ver10.schema;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
/**
* <p>
* Java-Klasse f�r RecordingSummary complex type.
*
* <p>
* Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType name="RecordingSummary">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="DataFrom" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
* <element name="DataUntil" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
* <element name="NumberRecordings" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RecordingSummary", propOrder = { "dataFrom", "dataUntil", "numberRecordings", "any" })
public class RecordingSummary {
@XmlElement(name = "DataFrom", required = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar dataFrom;
@XmlElement(name = "DataUntil", required = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar dataUntil;
@XmlElement(name = "NumberRecordings")
protected int numberRecordings;
@XmlAnyElement(lax = true)
protected List<java.lang.Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Ruft den Wert der dataFrom-Eigenschaft ab.
*
* @return possible object is {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDataFrom() {
return dataFrom;
}
/**
* Legt den Wert der dataFrom-Eigenschaft fest.
*
* @param value
* allowed object is {@link XMLGregorianCalendar }
*
*/
public void setDataFrom(XMLGregorianCalendar value) {
this.dataFrom = value;
}
/**
* Ruft den Wert der dataUntil-Eigenschaft ab.
*
* @return possible object is {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDataUntil() {
return dataUntil;
}
/**
* Legt den Wert der dataUntil-Eigenschaft fest.
*
* @param value
* allowed object is {@link XMLGregorianCalendar }
*
*/
public void setDataUntil(XMLGregorianCalendar value) {
this.dataUntil = value;
}
/**
* Ruft den Wert der numberRecordings-Eigenschaft ab.
*
*/
public int getNumberRecordings() {
return numberRecordings;
}
/**
* Legt den Wert der numberRecordings-Eigenschaft fest.
*
*/
public void setNumberRecordings(int value) {
this.numberRecordings = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Element } {@link java.lang.Object }
*
*
*/
public List<java.lang.Object> getAny() {
if (any == null) {
any = new ArrayList<java.lang.Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
*
*
* @return always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
| [
"yanxinorg@163.com"
] | yanxinorg@163.com |
89446139b2f5773d018d71550ee4d5282d1ede7a | fcc29cd93bbfda75962c045e383b4c10424442c2 | /src/com/smanzana/dungeonmaster/inventory/item/Usable.java | f53b67e20d9b21e0dd232743d5196252ffa59130 | [] | no_license | Dove-Bren/DungeonMaster | fb7db39591b65d1713013ed516f47f066a1cd29e | c490ad6586934d20e07bdabe7a440edc6f9183b8 | refs/heads/master | 2021-01-20T07:17:58.311537 | 2017-12-03T19:40:30 | 2017-12-03T19:40:30 | 101,528,983 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,804 | java | package com.smanzana.dungeonmaster.inventory.item;
import java.util.Map;
import java.util.TreeMap;
import com.smanzana.dungeonmaster.DungeonMaster;
import com.smanzana.dungeonmaster.action.Action;
import com.smanzana.dungeonmaster.action.ActionRegistry;
import com.smanzana.dungeonmaster.pawn.Pawn;
import com.smanzana.dungeonmaster.session.datums.ActionDatumData;
import com.smanzana.dungeonmaster.session.datums.Datum;
import com.smanzana.dungeonmaster.session.datums.data.DataNode;
import com.smanzana.dungeonmaster.ui.app.swing.screens.TemplateEditorScreen;
import com.smanzana.templateeditor.api.IRuntimeEnumerable;
import com.smanzana.templateeditor.api.ISuperclass;
import com.smanzana.templateeditor.api.annotations.DataLoaderRuntimeEnum;
public class Usable extends Item implements IRuntimeEnumerable<String> {
private static class Factory implements ItemFactory<Usable> {
@Override
public Usable construct(DataNode data) {
Usable ret = new Usable("", "", 0, null);
ret.load(data);
return ret;
}
}
{
Item.registerType(getClassKey(), new Factory());
}
@DataLoaderRuntimeEnum
private String action;
public Usable() {
this("Usable Item", "", 0, "Example Action");
}
public Usable(String name, String description, int value, String actionName) {
super(name, description, value);
action = actionName;
}
@Override
protected String getClassKey() {
return ClassKey();
}
protected static String ClassKey() {
return "usable";
}
protected static void register() {
Item.registerType(ClassKey(), new Factory());
}
public void use(Pawn user) {
Action fetched = ActionRegistry.instance().lookupAction(action);
if (fetched == null) {
System.out.println("Failed to lookup action " + action);
} else {
fetched.perform(user);
}
}
@Override
public void load(DataNode root) {
super.load(root);
if (root.getChild("action") != null)
this.action = root.getChild("action").getValue();
}
@Override
public DataNode write(String key) {
DataNode node = super.write(key);
node.addChild(new DataNode("action", this.action, null));
return node;
}
@Override
public Map<String, String> fetchValidValues(String key) {
Datum<ActionDatumData> datum;
if (TemplateEditorScreen.instance() == null
|| TemplateEditorScreen.instance().getCurrentTemplate() == null) {
datum = DungeonMaster.getActiveSession().getActionDatum();
} else {
datum = TemplateEditorScreen.instance().getCurrentTemplate().getActionDatum();
}
Map<String, String> values = new TreeMap<>();
for (ActionDatumData d : datum.getData()) {
values.put(d.getName(), d.getName());
}
return values;
}
@Override
public ISuperclass cloneObject() {
return new Usable(name, description, value, action);
}
}
| [
"skymanzanares@hotmail.com"
] | skymanzanares@hotmail.com |
8b7caf4eb8791a992388473ae44b2dc4933b4d84 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_1673486_0/java/superlukia/P1.java | 319b3037070d5d316808cc310bdfe299897de271 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,766 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gcj2012.round1a;
import gcj2012.qual.*;
import gcj2010.round2.*;
import gcj2009.*;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;
import java.util.Scanner;
/**
*
* @author scbit
*/
public class P1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception {
new P1().run();
}
PrintWriter pw;
void run() throws Exception{
File infile=new File("A-small-attempt2.in");
String outfile="result";
pw=new PrintWriter(outfile);
int N=0;
//BufferedReader br=new BufferedReader(new FileReader(infile));
//N=Integer.parseInt(br.readLine());
Scanner sc=new Scanner(infile);
N=sc.nextInt();
for(int case_i=1;case_i<=N;case_i++) {
int result = 0;
int A=sc.nextInt();
int B=sc.nextInt();
double[] p=new double[A];
for(int i=0;i<A;i++){
p[i]=sc.nextDouble();
}
int n1=B-A,n2=B+1;
double min=n2+1;
for(int i=A;i>0;i--){
int extra=2*(A-i);
double pp=1;
for(int j=0;j<i;j++){
pp=pp*p[j];
}
double newmin=n1+1+(1-pp)*n2+extra;
min=Math.min(min, newmin);
}
pw.printf("Case #%d: %.6f\n", case_i,min);
System.out.printf("Case #%d: %.6f\n", case_i,min);
}
pw.close();
}
}
| [
"eewestman@gmail.com"
] | eewestman@gmail.com |
a767c80e7db9125640503a239295662d0776a522 | 0fff4cd12b37d085c2b9be3a1ccd24a81f61b042 | /src/main/java/lehjr/numina/client/gui/clickable/slider/VanillaInventoryScrollBar.java | 7314e7c13547f41885f5fc4b09ef0509677ea268 | [
"BSD-2-Clause"
] | permissive | lehjr/MachineMusePowersuits | 673e0c9ab40ff5fa220813b0c78aa99ad54cb794 | 082834036cf665a5ccdf5fe34c9e59937dce612b | refs/heads/1.19.2 | 2023-09-01T08:03:35.603524 | 2023-08-29T10:54:11 | 2023-08-29T10:54:11 | 323,434,512 | 11 | 9 | NOASSERTION | 2023-08-20T23:34:57 | 2020-12-21T19:54:53 | Java | UTF-8 | Java | false | false | 2,985 | java | //package lehjr.numina.client.gui.clickable.slider;
//
//import com.mojang.blaze3d.vertex.PoseStack;
//import lehjr.numina.client.gui.GuiIcon;
//import lehjr.numina.client.gui.clickable.Slider;
//import lehjr.numina.client.gui.geometry.DrawableTile;
//import lehjr.numina.client.gui.geometry.MusePoint2D;
//import lehjr.numina.common.math.Color;
//import net.minecraft.resources.ResourceLocation;
//
//import javax.annotation.Nullable;
//
//// TODO: rewrite
//public class VanillaInventoryScrollBar extends Slider {
// /**
// texture is 256x256
// image X 232-244(highlighted), 244-256 (not highlighted) 12 wide
// image Y 0-15
//
// vanilla scroll bar (not inventory scroll) is only 6 pixels wide
//
//
//
// todo: maybe split it like the vanilla slider knob
//
// ------------------
// Frame scroll bar...
// width should always be 6
// height should be locked to frame
// knob height should have a height range dependant on the total height of the frame's contents
//
//
//
// */
// private static final ResourceLocation KNOB_TEXTURE = new ResourceLocation("textures/gui/container/creative_inventory/tabs.png");
//
// public VanillaInventoryScrollBar(MusePoint2D position, double height, String id) {
// this(position, height, id, 0);
// }
//
// public VanillaInventoryScrollBar(MusePoint2D position, double height, String id, double currentVal) {
// this(position, height, id, currentVal, null);
// }
//
// public VanillaInventoryScrollBar(MusePoint2D position, double height, String id, double currentVal, @Nullable ISlider iSlider) {
// super(position, false, height, id, currentVal, iSlider);
// this.setWidth(12);
// keepKnobWithinBounds=true;
// }
//
// @Override
// public void renderKnob(PoseStack matrixStack, int mouseX, int mouseY, float frameTime) {
// super.renderKnob(matrixStack, mouseX, mouseY, frameTime);
// }
//
// @Override
// public void createNewRects() {
// setIsCreatingNewRects(true);
// setKnobRect(new KnobTile(center()));
// setIsCreatingNewRects(false);
// }
//
// class KnobTile extends DrawableTile {
// public KnobTile(MusePoint2D ul) {
// super(ul, ul.plus(12, 15));
// }
//
// @Override
// public void render(PoseStack matrixStack, int mouseX, int mouseY, float partialTick) {
// GuiIcon.renderTextureWithColor(KNOB_TEXTURE, matrixStack,
// left(), right(), top(), bottom(), getZLevel(),
// // int uWidth, int vHeight,
// 12, 15,
// // image start x (xOffset)
// (knobRect.containsPoint(mouseX, mouseY) || dragging) ? 232 : 244.0F,
// // image start y (yOffset)
// 0,
// // textureWidth, textureHeight
// 256, 256,
// Color.WHITE);
// }
// }
//}
| [
"lehjr1@gmail.com"
] | lehjr1@gmail.com |
319396730e68aa6897971a2dbc6a7bb5168c0d1b | dc25b23f8132469fd95cee14189672cebc06aa56 | /frameworks/base/packages/SystemUI/src/com/mediatek/systemui/statusbar/util/FeatureOptions.java | 702450f1b7e203af07b1f1f4050ce196b8a1e78a | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | nofearnohappy/alps_mm | b407d3ab2ea9fa0a36d09333a2af480b42cfe65c | 9907611f8c2298fe4a45767df91276ec3118dd27 | refs/heads/master | 2020-04-23T08:46:58.421689 | 2019-03-28T21:19:33 | 2019-03-28T21:19:33 | 171,048,255 | 1 | 5 | null | 2020-03-08T03:49:37 | 2019-02-16T20:25:00 | Java | UTF-8 | Java | false | false | 1,668 | java | /*
* Copyright (C) 2011-2014 MediaTek Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mediatek.systemui.statusbar.util;
import android.os.SystemProperties;
public class FeatureOptions {
// GMO support.
public static final boolean LOW_RAM_SUPPORT = isPropertyEnabledBoolean("ro.config.low_ram");
// CTA feature support
public static final boolean MTK_CTA_SET = isPropertyEnabledInt("ro.mtk_cta_set");
/// M: Add for CT 6M. @ {
public static final boolean MTK_CT6M_SUPPORT = isPropertyEnabledInt("ro.ct6m_support");
// A1 Support FO
public static final boolean MTK_A1_SUPPORT = isPropertyEnabledInt("ro.mtk_a1_feature");
/**
*
* @param propertyString
* @return true, property is enable.
*/
private static boolean isPropertyEnabledBoolean(String propertyString) {
return "true".equals(SystemProperties.get(propertyString, "true"));
}
/**
*
* @param propertyString
* @return true, property is enable.
*/
private static boolean isPropertyEnabledInt(String propertyString) {
return "1".equals(SystemProperties.get(propertyString));
}
}
| [
"fetpoh@mail.ru"
] | fetpoh@mail.ru |
77a5346f0149025ba24ddaf603d3d1ce1edd7193 | 0bfe078096f41abed9f9e0c6c58953eaf9e5d266 | /flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/TestEvent.java | 286477a1bc40b9ead9bc62486feb58b25cdf0242 | [
"BSD-3-Clause",
"MIT",
"OFL-1.1",
"ISC",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | TwitRco/flink | 67f1fc09e9de5c07fc15f0e9b03c9e42c79ed2e7 | 251dc4b42118ccb2cf6d9b589e317c9e616f57ff | refs/heads/master | 2021-08-11T12:51:54.438865 | 2021-08-08T05:53:54 | 2021-08-08T05:53:54 | 80,043,978 | 1 | 1 | Apache-2.0 | 2021-08-08T05:48:25 | 2017-01-25T18:29:59 | Java | UTF-8 | Java | false | false | 2,630 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.streaming.runtime.io;
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.runtime.event.AbstractEvent;
import org.apache.flink.util.StringUtils;
import java.io.IOException;
import java.util.Arrays;
/**
* A simple task event, used for validation of buffer or event blocking/buffering.
*/
public class TestEvent extends AbstractEvent {
private long magicNumber;
private byte[] payload;
public TestEvent() {}
public TestEvent(long magicNumber, byte[] payload) {
this.magicNumber = magicNumber;
this.payload = payload;
}
// ------------------------------------------------------------------------
// Serialization
// ------------------------------------------------------------------------
@Override
public void write(DataOutputView out) throws IOException {
out.writeLong(magicNumber);
out.writeInt(payload.length);
out.write(payload);
}
@Override
public void read(DataInputView in) throws IOException {
this.magicNumber = in.readLong();
this.payload = new byte[in.readInt()];
in.read(this.payload);
}
// ------------------------------------------------------------------------
// Standard utilities
// ------------------------------------------------------------------------
@Override
public int hashCode() {
return Long.valueOf(magicNumber).hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj.getClass() == TestEvent.class) {
TestEvent that = (TestEvent) obj;
return this.magicNumber == that.magicNumber && Arrays.equals(this.payload, that.payload);
}
else {
return false;
}
}
@Override
public String toString() {
return String.format("TestEvent %d (%s)", magicNumber, StringUtils.byteToHexString(payload));
}
} | [
"sewen@apache.org"
] | sewen@apache.org |
1b6432ebf94e312d1041cccee7ad91b21366b90a | b8fbc8c768253f03d0f25897a4a58382f78c8fd8 | /Flynas/src/test/java/flynas/android/scripts/prod/routes/TC73_roundTripDomesticFlex_JED_DMM.java | 4201b231faab15d6192a92f78ae14bb6914dc3d0 | [] | no_license | CignitiFlynas/Android | 23006014955f6679236bf4b96d76bad7f53a6474 | 81725bb0c473d52bd30a87f8c6b78c919574cd5b | refs/heads/master | 2020-03-23T12:33:08.740591 | 2018-07-19T09:51:42 | 2018-07-19T09:51:42 | 141,565,800 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,622 | java | package flynas.android.scripts.prod.routes;
import java.util.concurrent.TimeUnit;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import com.ctaf.accelerators.TestEngine;
import com.ctaf.support.ExcelReader;
import com.ctaf.support.HtmlReportSupport;
import com.ctaf.utilities.Reporter;
import flynas.android.testObjects.BookingPageLocators;
import flynas.android.testObjects.HomePageLocators;
import flynas.android.workflows.BookingPageFlow;
import flynas.android.workflows.Homepage;
public class TC73_roundTripDomesticFlex_JED_DMM extends BookingPageFlow{
ExcelReader xls = new ExcelReader(configProps.getProperty("TestDataForAndroid"),"TestData");
@Test(dataProvider = "testData",groups={"Flex"})
public void TC_73_roundTripDomesticFlex_JED_DMM(String tripType, String origin, String dest,
String deptDate, String origin2,String departure2, String retdate,String Audalt,String Child,String infant, String promo,
String bookingClass, String bundle,
String FlightType,String totalpass,String namtionality,String Doctypr,String docNumber,
String naSmiles,String Mobile,String email ,String SelectSeat,String paymenttype,String bookingtype,
String charity,String Currency, String Description
) throws Throwable {
try {
TestEngine.testDescription.put(HtmlReportSupport.tc_name, Description);
//Handlepopup();
String[] Credentials = pickCredentials("UserCredentials");
String username =Credentials[0];
String password =Credentials[1];
String depDate = pickDate(deptDate);
Homepage homepage = new Homepage();
homepage.select_TittleMenu();
homepage.Click_login();
homepage.Login(username,password);
homepage.select_Bookflights("registered");
inputBookingDetails(tripType, origin, dest, depDate, origin2, departure2, retdate,Audalt, Child, infant,promo,Currency);
selectClass(bookingClass, bundle);
continueOnPsngrDtls();
Baggage(bookingtype, totalpass);
continueOnExtras();
continueOnSeatSelection();
payment(paymenttype,"");
verifyPNRforSadad();
Reporter.SuccessReport("TC73_roundTripDomesticFlex_JED_DMM", "Pass");
}
catch (Exception e) {
e.printStackTrace();
Reporter.failureReport("TC73_roundTripDomesticFlex_JED_DMM", "Failed");
}
}
@DataProvider(name="testData")
public Object[][] createdata1() {
return (Object[][]) new Object[][] {
{xls.getCellValue("Trip Type", "Value2"),
xls.getCellValue("Origin", "Value11"),
xls.getCellValue("Destination", "Value11"),
xls.getCellValue("Departure Date", "Value"),
"",
"",
xls.getCellValue("Return Date", "Value"),
xls.getCellValue("Adults Count", "Value"),
xls.getCellValue("Child Count", "Value"),
xls.getCellValue("Infant Count", "Value"),
xls.getCellValue("Promo", "Value"),
xls.getCellValue("Booking Class", "Value"),
xls.getCellValue("Bundle", "Value2"),
xls.getCellValue("Flight Type", "Value"),
xls.getCellValue("Total Passenger", "Value"),
xls.getCellValue("Nationality", "Value"),
xls.getCellValue("Document Type", "Value"),
xls.getCellValue("Doc Number", "Value"),
"",
xls.getCellValue("Mobile", "Value"),
xls.getCellValue("Email Address", "Value"),
xls.getCellValue("Select Seat", "Value"),
xls.getCellValue("Payment Type", "Value2"),
"",
xls.getCellValue("Charity Donation", "Value"),
xls.getCellValue("Currency", "Value"),
"Validate RoundTrip Domestic Flex_JED_DMM"}};
}
}
| [
"Indrajeet.kumar@cigniti.com"
] | Indrajeet.kumar@cigniti.com |
168b7bbe2f95e159693c38bc1a4c3e640531abd6 | fda80bae1d434b1c558c1a4005b106d3481913ed | /src/shun/action/UserAction.java | 02ab525ac0e42d1c3d9348977cdf6a10ae102027 | [] | no_license | chenzongshun/SSH_crm | a8b565805b97c0795bdf1345389b7883e9b6a7fe | fa4c9d202af352cd6c5cca635b6c77796f8b29c8 | refs/heads/master | 2020-03-21T10:22:28.634371 | 2018-06-24T02:36:16 | 2018-06-24T02:36:16 | 138,447,785 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,692 | java | package shun.action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import shun.domain.User;
import shun.service.UserService;
/**
* @author czs
* @version 创建时间:2018年2月22日 下午1:00:09
*/
public class UserAction extends ActionSupport implements ModelDriven<User>{
private UserService userService;
public void setUserService(UserService userService) {
this.userService = userService;
}
private static final long serialVersionUID = 1203350742782158812L;
// 注册用户
public String regist() throws Exception {
// 调用service保存用户
try {
userService.saveUser(user);
} catch (Exception e) {
// 因为struts配置里面有了一个全局的配置error,并且类型为java.lang.Exception,已经被占用了
// 又由于自定义异常还需要手动继承RuntimeException,这样会创建很多个类
// 又因为知道此方法里面可能会抛出异常,所以在这里就try了,存储错误信息到request域并让action走toRegist
ActionContext.getContext().put("error", e.getMessage());
return "toRegist";
}
// 重定向到登录界面
return "toLogin";
}
// 登陆
public String login() throws Exception {
// 1 调用Service执行登陆逻辑
User u = userService.getUserByCodePassword(user);
// 2 将返回的User对象放入session域
ActionContext.getContext().getSession().put("user", u);
// 3 重定向道项目首页
return "toHome";
}
public void setUser(User user) {
this.user = user;
}
private User user = new User();
@Override
public User getModel() {
return user;
}
}
| [
"you@example.com"
] | you@example.com |
0f938f93e43214e06e9b700f6b1a1327381e171a | 9151473bbf6e4ed36fec5a3f30499512ec2ca4f9 | /src/test/java/cn/minalz/tree/PreOrderTree.java | f5b368f7f80617dcf5807f8f3f5a3bf745c09c23 | [] | no_license | minalz/Algo | e22e29842a96378edbf861bf320c29f640f5611f | b16f893e990a7fdb02d25fd617503efa40556d53 | refs/heads/master | 2023-05-28T07:04:46.099729 | 2021-06-13T14:13:55 | 2021-06-13T14:13:55 | 331,582,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,713 | java | package cn.minalz.tree;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
/**
* @description: 二叉树的前序遍历
* @author: minalz
* @date: 2021-05-25 22:21
**/
public class PreOrderTree {
/**
* 递归方式
* @param root
* @return
*/
public List<Integer> preorderTraversal(TreeNode1 root) {
List<Integer> result = new ArrayList<>();
if (root == null) {
return result;
}
List<Integer> left = preorderTraversal(root.left);
List<Integer> right = preorderTraversal(root.right);
result.add(root.val);
result.addAll(left);
result.addAll(right);
return result;
}
/**
* 非递归方式
* @param root
* @return
*/
public List<Integer> preorderTraversal1(TreeNode1 root) {
List<Integer> result = new ArrayList<>();
if (root == null) {
return result;
}
Stack<TreeNode1> stack = new Stack<>();
stack.push(root);
while (!stack.isEmpty()) {
TreeNode1 node = stack.pop();
result.add(node.val);
if (node.right != null) {
stack.push(node.right);
}
if (node.left != null) {
stack.push(node.left);
}
}
return result;
}
}
// Definition for a binary tree node.
class TreeNode1 {
int val;
TreeNode1 left;
TreeNode1 right;
TreeNode1() {
}
TreeNode1(int val) {
this.val = val;
}
TreeNode1(int val, TreeNode1 left, TreeNode1 right) {
this.val = val;
this.left = left;
this.right = right;
}
} | [
"119687281@qq.com"
] | 119687281@qq.com |
519756e1a5fca7b55e8711f59ec08b207286d72e | 809792ede00f148c9a07da194452c637e0eaa03d | /limelight_webapp/src/main/java/org/yeastrc/limelight/limelight_webapp/dao/ProjectScanFilename_SearchScnFile_Mapping_DAO_IF.java | a10fc27ec5834f1420366ecf0d16bccaa3c1fb0f | [
"Apache-2.0"
] | permissive | yeastrc/limelight-core | 80eb23d62c3b967db42b12a3e90cd1b2878ea793 | bc609c814f67393b787f31c4d813e8fec9ec1b96 | refs/heads/master | 2023-08-31T20:37:29.180350 | 2023-08-21T21:21:48 | 2023-08-21T21:21:48 | 159,243,534 | 5 | 3 | Apache-2.0 | 2023-03-03T01:30:00 | 2018-11-26T22:52:14 | TypeScript | UTF-8 | Java | false | false | 504 | java | package org.yeastrc.limelight.limelight_webapp.dao;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.yeastrc.limelight.limelight_shared.dto.ProjectScanFilename_SearchScanFile_Mapping_DTO;
public interface ProjectScanFilename_SearchScnFile_Mapping_DAO_IF {
/**
* NOT SET 'id' property on param Project_ScanFile_DTO
*
* @param item
*/
void save(ProjectScanFilename_SearchScanFile_Mapping_DTO item);
} | [
"djaschob@uw.edu"
] | djaschob@uw.edu |
5682ca599c1695686032985cf9dceda4550b28e8 | 7822eb2f86317aebf6e689da2a6708e9cc4ee1ea | /Rachio_apk/sources/com/j256/ormlite/field/types/DoubleObjectType.java | 024ba7adbf2ee5b732fbe39f0c39a3677446fc4a | [
"BSD-2-Clause"
] | permissive | UCLA-ECE209AS-2018W/Haoming-Liang | 9abffa33df9fc7be84c993873dac39159b05ef04 | f567ae0adc327b669259c94cc49f9b29f50d1038 | refs/heads/master | 2021-04-06T20:29:41.296769 | 2018-03-21T05:39:43 | 2018-03-21T05:39:43 | 125,328,864 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,025 | java | package com.j256.ormlite.field.types;
import com.j256.ormlite.field.FieldType;
import com.j256.ormlite.field.SqlType;
import com.j256.ormlite.support.DatabaseResults;
import java.sql.SQLException;
public class DoubleObjectType extends BaseDataType {
private static final DoubleObjectType singleTon = new DoubleObjectType();
public static DoubleObjectType getSingleton() {
return singleTon;
}
private DoubleObjectType() {
super(SqlType.DOUBLE, new Class[]{Double.class});
}
protected DoubleObjectType(SqlType sqlType, Class<?>[] classes) {
super(sqlType, classes);
}
public Object parseDefaultString(FieldType fieldType, String defaultStr) {
return Double.valueOf(Double.parseDouble(defaultStr));
}
public Object resultToSqlArg(FieldType fieldType, DatabaseResults results, int columnPos) throws SQLException {
return Double.valueOf(results.getDouble(columnPos));
}
public boolean isEscapedValue() {
return false;
}
}
| [
"zan@s-164-67-234-113.resnet.ucla.edu"
] | zan@s-164-67-234-113.resnet.ucla.edu |
31cdd1658564bf8e088eef894682c5f47332d295 | 00abc1aec703a1d48c393bf853be907fc44280f5 | /yeb-server/src/main/java/com/ming/server/controller/SysMsgContentController.java | 9b0be0668f2145afd96921699fac54ef99e3790f | [] | no_license | xiaoming-master/yeb | 81c5f96e70881c5d9cff1b521f74a27c56115d24 | 843750239e67c1f92969a7990ac304c952e33593 | refs/heads/master | 2023-06-24T09:27:42.757753 | 2021-07-24T17:30:08 | 2021-07-24T17:30:08 | 387,009,042 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 349 | java | package com.ming.server.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author zhanglishen
* @since 2021-07-17
*/
@RestController
@RequestMapping("/sys-msg-content")
public class SysMsgContentController {
}
| [
"1186927930@qq.com"
] | 1186927930@qq.com |
37d830271c53b05a0d7510148aa84e67456c9a09 | a66fbd590d49636ed2e9c88e3e2efad5a73fbc56 | /src/main/java/com/go2wheel/weblizedutil/value/BlockedPropertiesFileHolder.java | 612f208987d555a573a1b7e40d03cd9deb3aeb14 | [] | no_license | jianglibo/weblized-util | cc2ebd0a2c6cd1040d30e0ddb13f2ff122347fa8 | f49a30eb72452a2cdb7f03ea4a870435353f8969 | refs/heads/master | 2022-12-14T05:32:10.787689 | 2019-12-21T03:27:27 | 2019-12-21T03:27:27 | 146,276,945 | 0 | 0 | null | 2022-12-09T12:52:34 | 2018-08-27T09:34:56 | HTML | UTF-8 | Java | false | false | 4,052 | java | package com.go2wheel.weblizedutil.value;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.go2wheel.weblizedutil.value.ConfigValue.ConfigValueState;
public class BlockedPropertiesFileHolder {
public static final String COMMENT_OUT_CHAR = ";";
private List<String> lines;
private Pattern blockNamePtn = Pattern.compile(String.format("\\s*\\[%s\\]\\s*", "([^\\[\\]]+)"));
public BlockedPropertiesFileHolder(List<String> lines) {
super();
this.lines = lines;
deduplicate();
}
private void deduplicate() {
List<String> nl = new ArrayList<>();
String currentLine = null;
for(String line: lines) {
if (!line.equals(currentLine)) {
nl.add(line);
currentLine = line;
}
}
this.lines = nl;
}
private String getKvLine(ConfigValue cv, Object v) {
return String.format("%s=%s", cv.getKey(), v);
}
public boolean commentOutConfigValue(ConfigValue cv) {
if (cv.getState() == ConfigValueState.COMMENT_OUTED || cv.getState() == ConfigValueState.NOT_EXIST) {
return false;
}
String c = COMMENT_OUT_CHAR + lines.get(cv.getLineIndex());
lines.set(cv.getLineIndex(), c);
return true;
}
public boolean setConfigValue(ConfigValue cv, String value) {
if (value.equals(cv.getValue()) && cv.getState() == ConfigValueState.EXIST) {
return false;
}
switch (cv.getState()) {
case COMMENT_OUTED:
case EXIST:
lines.set(cv.getLineIndex(), getKvLine(cv, value));
break;
default:
if (cv.getBlock() == null || cv.getBlock().trim().isEmpty()) {
lines.add(cv.getKey() + "=" + value); // put to the last line.
} else {
int bp = findBlockPosition(cv.getBlock());
if (bp != -1) {
lines.add(bp + 1, getKvLine(cv, value));
} else {
lines.add(String.format("[%s]", cv.getBlock()));
lines.add(getKvLine(cv, value));
}
}
}
return true;
}
public int findBlockPosition(String blockName) {
for(int i = 0; i < lines.size(); i++) {
String line = lines.get(i);
Matcher m = blockNamePtn.matcher(line);
if (m.matches() && blockName.equals(m.group(1))) {
return i;
}
}
return -1;
}
public int findNextBlockPosition(int startPoint) {
for(int i = startPoint + 1; i < getLines().size(); i++) {
String line = getLines().get(i);
if (blockNamePtn.matcher(line).matches()) {
return i;
}
}
return getLines().size() - 1;
}
/**
* blockName does't include surrounding square bracket.
* @param blockName
* @param cnfName
* @return
*/
public ConfigValue getConfigValue(String blockName, String cnfName) {
int blkStart = findBlockPosition(blockName);
int blkEnd = findNextBlockPosition(blkStart);
return getConfigValue(blockName, cnfName, blkStart, blkEnd);
}
private ConfigValue getConfigValue(String block, String cnfName, int blkStart, int blkEnd) {
Pattern commentOutPtn = getCommentOutedPtn(cnfName);
Pattern existPtn = getExistedPtn(cnfName);
ConfigValue commented = ConfigValue.getNotExistValue(block, cnfName);
if (blkStart == -1) {
return commented;
}
Matcher matcher = null;
for(int i = blkStart; i < blkEnd; i++) {
String line = lines.get(i);
matcher = existPtn.matcher(line);
if (matcher.matches()) {
return ConfigValue.getExistValue(block, cnfName, matcher.group(1), i);
}
matcher = commentOutPtn.matcher(line);
if (matcher.matches()) {
commented = ConfigValue.getCommentOuted(block, cnfName, matcher.group(1), i);
}
}
return commented;
}
public ConfigValue getConfigValue(String cnfName) {
return getConfigValue(null, cnfName, 0, lines.size());
}
private Pattern getCommentOutedPtn(String nameOfItem) {
return Pattern.compile("^\\s*;\\s*" + nameOfItem + "\\s*=\\s*([^\\s]+)\\s*$");
}
private Pattern getExistedPtn(String nameOfItem) {
return Pattern.compile("^\\s*" + nameOfItem + "\\s*=\\s*([^\\s]+)\\s*$");
}
public List<String> getLines() {
return lines;
}
public void setLines(List<String> lines) {
this.lines = lines;
}
}
| [
"jianglibo@gmail.com"
] | jianglibo@gmail.com |
d6e7e77ef00891c2b0081e524d687fb4cf60821a | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-2.2.0/examples/stockquote/src/test/java/org/mule/example/stockquote/WsdlStockQuoteFunctionalTestCase.java | dd6bb447f7de01e70717b5760de576bacd883c32 | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 600 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.example.stockquote;
public class WsdlStockQuoteFunctionalTestCase extends AbstractStockQuoteFunctionalTestCase
{
protected String getConfigResources()
{
return "stockquote-wsdl-config.xml";
}
}
| [
"dfeist@bf997673-6b11-0410-b953-e057580c5b09"
] | dfeist@bf997673-6b11-0410-b953-e057580c5b09 |
c2b6139c33157a502b3465bd23acb6c0e4b99c52 | 0ae199a25f8e0959734f11071a282ee7a0169e2d | /utils/junit/src/main/java/org/onlab/junit/TestUtils.java | 10bfcf99b103910d5cd002665cb052d29c41e63c | [
"Apache-2.0"
] | permissive | lishuai12/onosfw-L3 | 314d2bc79424d09dcd8f46a4c467bd36cfa9bf1b | e60902ba8da7de3816f6b999492bec2d51dd677d | refs/heads/master | 2021-01-10T08:09:56.279267 | 2015-11-06T02:49:00 | 2015-11-06T02:49:00 | 45,652,234 | 0 | 1 | null | 2016-03-10T22:30:45 | 2015-11-06T01:49:10 | Java | UTF-8 | Java | false | false | 7,280 | java | /*
* Copyright 2014 Open Networking Laboratory
*
* 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.onlab.junit;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* Utilities for testing.
*/
public final class TestUtils {
/**
* Sets the field, bypassing scope restriction.
*
* @param subject Object where the field belongs
* @param fieldName name of the field to set
* @param value value to set to the field.
* @param <T> subject type
* @param <U> value type
* @throws TestUtilsException if there are reflection errors while setting
* the field
*/
public static <T, U> void setField(T subject, String fieldName, U value)
throws TestUtilsException {
@SuppressWarnings("unchecked")
Class clazz = subject.getClass();
try {
while (clazz != null) {
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
field.set(subject, value);
break;
} catch (NoSuchFieldException ex) {
if (clazz == clazz.getSuperclass()) {
break;
}
clazz = clazz.getSuperclass();
}
}
} catch (SecurityException | IllegalArgumentException |
IllegalAccessException e) {
throw new TestUtilsException("setField failed", e);
}
}
/**
* Gets the field, bypassing scope restriction.
*
* @param subject Object where the field belongs
* @param fieldName name of the field to get
* @return value of the field.
* @param <T> subject type
* @param <U> field value type
* @throws TestUtilsException if there are reflection errors while getting
* the field
*/
public static <T, U> U getField(T subject, String fieldName)
throws TestUtilsException {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) subject.getClass();
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
@SuppressWarnings("unchecked")
U result = (U) field.get(subject);
return result;
} catch (NoSuchFieldException | SecurityException |
IllegalArgumentException | IllegalAccessException e) {
throw new TestUtilsException("getField failed", e);
}
}
/**
* Calls the method, bypassing scope restriction.
*
* @param subject Object where the method belongs
* @param methodName name of the method to call
* @param paramTypes formal parameter type array
* @param args arguments
* @return return value or null if void
* @param <T> subject type
* @param <U> return value type
* @throws TestUtilsException if there are reflection errors while calling
* the method
*/
public static <T, U> U callMethod(T subject, String methodName,
Class<?>[] paramTypes, Object...args) throws TestUtilsException {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) subject.getClass();
final Method method;
if (paramTypes == null || paramTypes.length == 0) {
method = clazz.getDeclaredMethod(methodName);
} else {
method = clazz.getDeclaredMethod(methodName, paramTypes);
}
method.setAccessible(true);
@SuppressWarnings("unchecked")
U result = (U) method.invoke(subject, args);
return result;
} catch (NoSuchMethodException | SecurityException |
IllegalAccessException | IllegalArgumentException |
InvocationTargetException e) {
throw new TestUtilsException("callMethod failed", e);
}
}
/**
* Calls the method, bypassing scope restriction.
*
* @param subject Object where the method belongs
* @param methodName name of the method to call
* @param paramType formal parameter type
* @param arg argument
* @return return value or null if void
* @param <T> subject type
* @param <U> return value type
* @throws TestUtilsException if there are reflection errors while calling
* the method
*/
public static <T, U> U callMethod(T subject, String methodName,
Class<?> paramType, Object arg) throws TestUtilsException {
return callMethod(subject, methodName, new Class<?>[]{paramType}, arg);
}
/**
* Triggers an allocation of an object of type T and forces a call to
* the private constructor.
*
* @param constructor Constructor to call
* @param <T> type of the object to create
* @return created object of type T
* @throws TestUtilsException if there are reflection errors while calling
* the constructor
*/
public static <T> T callConstructor(Constructor<T> constructor)
throws TestUtilsException {
try {
constructor.setAccessible(true);
return constructor.newInstance();
} catch (InstantiationException | IllegalAccessException |
InvocationTargetException error) {
throw new TestUtilsException("callConstructor failed", error);
}
}
/**
* Avoid instantiation.
*/
private TestUtils() {}
/**
* Exception that can be thrown if problems are encountered while executing
* the utility method. These are usually problems accessing fields/methods
* through reflection. The original exception can be found by examining the
* cause.
*/
public static class TestUtilsException extends Exception {
private static final long serialVersionUID = 1L;
/**
* Constructs a new exception with the specified detail message and
* cause.
*
* @param message the detail message
* @param cause the original cause of this exception
*/
public TestUtilsException(String message, Throwable cause) {
super(message, cause);
}
}
}
| [
"lishuai12@huawei.com"
] | lishuai12@huawei.com |
1e4548f2f5db607b82fa5a70d2c4cd49f241bb2b | b77cafa084c73de7fbec2a0b03de42f589e09e0a | /katharsis-core/src/test/java/io/katharsis/resource/internal/PerRootPathIncludeBehaviorTest.java | bfe53b997bc2a445897d8afce7844ebf585dc3fc | [
"Apache-2.0"
] | permissive | katharsis-project/katharsis-framework | d96e38770fd49f7d33996189820119b5193e98ff | 73d1a8763c49c5cf4643d43e2dbfedb647630c46 | refs/heads/master | 2023-03-16T23:11:22.655338 | 2017-06-06T19:43:44 | 2017-06-06T19:43:44 | 64,340,716 | 162 | 101 | Apache-2.0 | 2018-02-20T11:14:59 | 2016-07-27T20:46:27 | Java | UTF-8 | Java | false | false | 3,008 | java | package io.katharsis.resource.internal;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import io.katharsis.core.internal.boot.PropertiesProvider;
import io.katharsis.core.internal.resource.IncludeBehavior;
import io.katharsis.core.properties.KatharsisProperties;
import io.katharsis.queryspec.QuerySpec;
import io.katharsis.resource.Document;
import io.katharsis.resource.Relationship;
import io.katharsis.resource.Resource;
import io.katharsis.resource.ResourceIdentifier;
import io.katharsis.resource.mock.models.HierarchicalTask;
@RunWith(MockitoJUnitRunner.class)
public class PerRootPathIncludeBehaviorTest extends AbstractIncludeBehaviorTest {
@Override
protected PropertiesProvider getPropertiesProvider() {
return new PropertiesProvider() {
@Override
public String getProperty(String key) {
if (key.equals(KatharsisProperties.INCLUDE_BEHAVIOR))
return IncludeBehavior.PER_ROOT_PATH.toString();
return null;
}
};
}
@Test
public void includeParent() throws Exception {
QuerySpec querySpec = new QuerySpec(HierarchicalTask.class);
querySpec.includeRelation(Arrays.asList("parent"));
Document document = mapper.toDocument(toResponse(h11), toAdapter(querySpec));
Resource taskResource = document.getSingleData().get();
Relationship parentRelationship = taskResource.getRelationships().get("parent");
assertNotNull(parentRelationship);
assertNotNull(parentRelationship.getSingleData());
ResourceIdentifier parentResource = parentRelationship.getSingleData().get();
assertNotNull(h1.getId().toString(), parentResource.getId());
List<Resource> included = document.getIncluded();
assertEquals(1, included.size());
assertNotNull(h1.getId().toString(), included.get(0).getId());
Relationship parentParentRelationship = included.get(0).getRelationships().get("parent");
assertFalse(parentParentRelationship.getData().isPresent());
}
@Test
public void includeParentParent() throws Exception {
QuerySpec querySpec = new QuerySpec(HierarchicalTask.class);
querySpec.includeRelation(Arrays.asList("parent", "parent"));
Document document = mapper.toDocument(toResponse(h11), toAdapter(querySpec));
Resource taskResource = document.getSingleData().get();
Relationship parentRelationship = taskResource.getRelationships().get("parent");
assertNotNull(parentRelationship);
assertNotNull(parentRelationship.getSingleData());
ResourceIdentifier parentResource = parentRelationship.getSingleData().get();
assertNotNull(h1.getId().toString(), parentResource.getId());
List<Resource> included = document.getIncluded();
assertEquals(2, included.size());
assertNotNull(h1.getId().toString(), included.get(0).getId());
assertNotNull(h.getId().toString(), included.get(1).getId());
}
}
| [
"remo.meier.ch@gmail.com"
] | remo.meier.ch@gmail.com |
109f59480247763d2c31a1e6fceb79c8d2547e70 | d8316b9ab36e8f7fbb1b6e7b457d7f0386b97908 | /StickyListHeadersDemo/app/src/main/java/fpt/edu/stickylistheadersdemo/UserAdapter.java | 57990103df693f5d4e2cbca0ffc5319773153a38 | [] | no_license | huyhue/learnAndroid | 97ed677b3eca14d71d163ddfd884dcc6da22471e | b0e01501f3f703d27dca8ae0732baf55b54ac958 | refs/heads/main | 2023-09-04T19:10:59.972031 | 2021-11-09T11:34:06 | 2021-11-09T11:34:06 | 418,296,842 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,358 | java | package fpt.edu.stickylistheadersdemo;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.List;
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
public class UserAdapter extends BaseAdapter implements StickyListHeadersAdapter {
private List<String> list;
public void setData(List<String> mlist){
this.list = mlist;
notifyDataSetChanged();
}
@Override
public int getCount() {
if(list != null){
return list.size();
}
return 0;
}
@Override
public Object getItem(int i) {
return list.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
ItemViewHolder itemViewHolder;
if(view == null){
itemViewHolder = new ItemViewHolder();
view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.layout_item, viewGroup,false);
itemViewHolder.tvItem = view.findViewById(R.id.tv_item);
view.setTag(itemViewHolder);
}else{
itemViewHolder = (ItemViewHolder) view.getTag();
}
itemViewHolder.tvItem.setText(list.get(i));
return view;
}
@Override
public View getHeaderView(int position, View convertView, ViewGroup parent) {
HeaderViewHolder headerViewHolder;
if (convertView == null){
headerViewHolder = new HeaderViewHolder();
convertView = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_header, parent,false);
headerViewHolder.tvHeader = convertView.findViewById(R.id.tv_header);
convertView.setTag(headerViewHolder);
}else{
headerViewHolder = (HeaderViewHolder) convertView.getTag();
}
headerViewHolder.tvHeader.setText(list.get(position).substring(0,1));
return convertView;
}
@Override
public long getHeaderId(int position) {
return list.get(position).subSequence(0,1).charAt(0);
}
public class HeaderViewHolder{
private TextView tvHeader;
}
public class ItemViewHolder{
private TextView tvItem;
}
}
| [
"tpgiahuy5@gmail.com"
] | tpgiahuy5@gmail.com |
9edde4f4cf56409f95191941d5cca85fdbb0b3bc | 208ba847cec642cdf7b77cff26bdc4f30a97e795 | /aj/ag/src/main/java/org.wp.ag/ui/stats/adapters/PostsAndPagesAdapter.java | 4754e636aa6d20a428365fb72815d1b8d14579bd | [] | no_license | kageiit/perf-android-large | ec7c291de9cde2f813ed6573f706a8593be7ac88 | 2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8 | refs/heads/master | 2021-01-12T14:00:19.468063 | 2016-09-27T13:10:42 | 2016-09-27T13:10:42 | 69,685,305 | 0 | 0 | null | 2016-09-30T16:59:49 | 2016-09-30T16:59:48 | null | UTF-8 | Java | false | false | 1,675 | java | package org.wp.ag.ui.stats.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import org.wp.ag.R;
import org.wp.ag.ui.stats.StatsViewHolder;
import org.wp.ag.ui.stats.models.PostModel;
import org.wp.ag.util.FormatUtils;
import java.util.List;
public class PostsAndPagesAdapter extends ArrayAdapter<PostModel> {
private final List<PostModel> list;
private final LayoutInflater inflater;
public PostsAndPagesAdapter(Context context, List<PostModel> list) {
super(context, R.layout.stats_list_cell, list);
this.list = list;
inflater = LayoutInflater.from(context);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View rowView = convertView;
// reuse views
if (rowView == null) {
rowView = inflater.inflate(R.layout.stats_list_cell, parent, false);
// configure view holder
StatsViewHolder viewHolder = new StatsViewHolder(rowView);
rowView.setTag(viewHolder);
}
final PostModel currentRowData = list.get(position);
StatsViewHolder holder = (StatsViewHolder) rowView.getTag();
// Entry
holder.setEntryTextOpenDetailsPage(currentRowData);
// Setup the more button
holder.setMoreButtonOpenInReader(currentRowData);
// totals
holder.totalsTextView.setText(FormatUtils.formatDecimal(currentRowData.getTotals()));
// no icon
holder.networkImageView.setVisibility(View.GONE);
return rowView;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
be8d8e07c40e8d5e6b3f2125584329f2742d085d | 6ac12da7bc81c9fbf8bbf844553bc46bd2746ba9 | /ds4p-receiver/ds4p-admin-test-harness/src/main/java/utsapi2_0/UtsMetathesaurusContent/GetRootAtomTreePositions.java | cdec990d3c4ba6cf33be30f08b126cf923fb0288 | [] | no_license | wanghaisheng/ds4p-pilot-public | b8fd90ee5e196e0e055e250af0e3c547cfa84eaa | 235cc22266868917d88332fb32d03baded2dd684 | refs/heads/master | 2020-04-08T03:19:53.614880 | 2012-12-08T10:02:38 | 2012-12-08T10:02:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,867 | java | /**
* This software is being provided per FARS 52.227-14 Rights in Data - General.
* Any redistribution or request for copyright requires written consent by the
* Department of Veterans Affairs.
*/
package UtsMetathesaurusContent;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getRootAtomTreePositions complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="getRootAtomTreePositions">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ticket" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="psf" type="{http://webservice.uts.umls.nlm.nih.gov/}psf" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getRootAtomTreePositions", propOrder = {
"ticket",
"version",
"psf"
})
public class GetRootAtomTreePositions {
protected String ticket;
protected String version;
protected Psf psf;
/**
* Gets the value of the ticket property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTicket() {
return ticket;
}
/**
* Sets the value of the ticket property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTicket(String value) {
this.ticket = value;
}
/**
* Gets the value of the version property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVersion() {
return version;
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
/**
* Gets the value of the psf property.
*
* @return
* possible object is
* {@link Psf }
*
*/
public Psf getPsf() {
return psf;
}
/**
* Sets the value of the psf property.
*
* @param value
* allowed object is
* {@link Psf }
*
*/
public void setPsf(Psf value) {
this.psf = value;
}
}
| [
"Duane DeCouteau@Socratic5"
] | Duane DeCouteau@Socratic5 |
6bd23a2c15df86fe34772fd26c5053aa0fdfb755 | bc3218a73d1f2ea0db585a20ff75441e24fb2744 | /src/main/java/com/amazonaws/services/autoscaling/model/transform/DescribeMetricCollectionTypesRequestMarshaller.java | 2fee2357db3af4a4d2b87589adce3b5d8d9fd2a1 | [
"JSON",
"Apache-2.0"
] | permissive | renfeng/aws-sdk-for-java-on-gae | 2457619674acda114bb138fc5fc56d8060e3a5dd | ecaf3dd73c547a4f9f35ac4be6e0ab5f4e05fce0 | refs/heads/master | 2021-01-14T13:50:34.067202 | 2013-10-26T16:23:52 | 2013-10-26T16:23:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,641 | java | /*
* Copyright 2010-2011 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.autoscaling.model.transform;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.services.autoscaling.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.StringUtils;
/**
* Describe Metric Collection Types Request Marshaller
*/
public class DescribeMetricCollectionTypesRequestMarshaller implements Marshaller<Request<DescribeMetricCollectionTypesRequest>, DescribeMetricCollectionTypesRequest> {
public Request<DescribeMetricCollectionTypesRequest> marshall(DescribeMetricCollectionTypesRequest describeMetricCollectionTypesRequest) {
Request<DescribeMetricCollectionTypesRequest> request = new DefaultRequest<DescribeMetricCollectionTypesRequest>(describeMetricCollectionTypesRequest, "AmazonAutoScaling");
request.addParameter("Action", "DescribeMetricCollectionTypes");
request.addParameter("Version", "2010-08-01");
return request;
}
}
| [
"aws-dr-tools@amazon.com"
] | aws-dr-tools@amazon.com |
22166d773fd9dc29a455be2a8c50ad7768b65d43 | a9073cbdb325801bdddf35f1b2b13e6a9eeb2e7d | /hw07-0036479615/src/main/java/hr/fer/zemris/bf/utils/Util.java | 350f376e87cdf3a38d41b2095f983b0cab6cbcea | [] | no_license | svennjegac/FER-java-opjj | 6b1dc8fb691940c561c589233af3a5b46f96309e | d7e59bf000c63d9ffa3941d5c22256d2dd426a06 | refs/heads/master | 2020-03-29T04:13:54.366615 | 2019-09-08T00:27:36 | 2019-09-08T00:27:36 | 149,521,553 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,225 | java | package hr.fer.zemris.bf.utils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import hr.fer.zemris.bf.model.Node;
/**
* Utility class which offers a set of methods that are used for
* different operations with boolean expressions.
*
* @author Sven Njegač
* @version 1.0
*/
public class Util {
/**
* Makes representation of integer as a binary number and
* returns it as array.
*
* @param x number
* @param n number of positions in binary number
* @return byte array representing binary number
*/
public static byte[] indexToByteArray(int x, int n) {
if (n < 0) {
throw new IllegalArgumentException("Second argument must be 0 or higher; was: " + n);
}
long value = x;
boolean negative = value < 0 ? true : false;
long absolute = Math.abs(value);
byte[] result = new byte[n];
convertNumberToBits(absolute, result);
if (negative) {
doubleComplement(result);
}
return result;
}
/**
* Stores number in array as binary representation.
*
* @param x number
* @param result array representing binary number
*/
private static void convertNumberToBits(long x, byte[] result) {
Arrays.fill(result, (byte) 0);
int potention = twosPotentionLessOrEqual(x);
while (potention >= 0) {
if (x >= Math.pow(2, potention)) {
x -= Math.pow(2, potention);
if (result.length > potention) {
result[potention] = 1;
}
}
if (x == 0) {
break;
}
potention--;
}
reverseArray(result);
}
/**
* Reverses array.
*
* @param array array to be reversed
*/
private static void reverseArray(byte[] array) {
for(int i = 0; i < array.length / 2; i++) {
byte tmp = array[i];
array[i] = array[array.length - i - 1];
array[array.length - i - 1] = tmp;
}
}
/**
* Double complements byte array representing binary number.
*
* @param array byte array
*/
private static void doubleComplement(byte[] array) {
oneComplement(array);
for (int i = array.length - 1; i >= 0; i--) {
if (array[i] == (byte) 1) {
array[i] = (byte) 0;
continue;
}
array[i] = (byte) 1;
break;
}
}
/**
* One complements byte array representing binary number.
*
* @param array byte array
*/
private static void oneComplement(byte[] array) {
for (int i = 0; i < array.length; i++) {
array[i] = array[i] == (byte) 0 ? (byte) 1 : (byte) 0;
}
}
/**
* For number, method fines index of number two exponent which gives
* first smaller number than given or same number.
*
* @param x number
* @return exponent
*/
private static int twosPotentionLessOrEqual(long x) {
if (x == 0) {
return -1;
}
int potention = 0;
while (Math.pow(2, potention) < x) {
potention++;
}
potention = Math.pow(2, potention) == x ? potention : potention - 1;
return potention;
}
/**
* Method calculates sum of minterms of expression.
*
* @param variables variables used in expression
* @param expression expression for calculation
* @return set of minterms
*/
public static Set<Integer> toSumOfMinterms(List<String> variables, Node expression) {
return getMatchingRows(variables, expression, true);
}
/**
* Method calculates product of maxterms of expression.
*
* @param variables variables used in expression
* @param expression expression for calculation
* @return set of maxterms
*/
public static Set<Integer> toProductOfMaxterms(List<String> variables, Node expression) {
return getMatchingRows(variables, expression, false);
}
/**
* Method calculates which rows of expression evaluate to same value
* as provided value.
*
* @param variables variables used in expression
* @param expression expression for calculation
* @param value matching value
* @return set of integers representing rows
*/
private static Set<Integer> getMatchingRows(List<String> variables, Node expression, boolean value) {
return filterAssignments(variables, expression, value)
.stream()
.map(row -> Util.booleanArrayToInt(row))
.collect(Collectors.toSet());
}
/**
* Method calculates integer representation for boolean array.
*
* @param values boolean array
* @return integer representation of boolean array
*/
public static int booleanArrayToInt(boolean[] values) {
if (values == null) {
throw new IllegalArgumentException("Values can not be null.");
}
int sum = 0;
for (int i = values.length - 1; i >= 0; i--) {
sum += (values[i] == true) ? (int) Math.pow(2, values.length - 1 - i) : 0;
}
return sum;
}
/**
* Method returns set of boolean arrays which evaluates to provided
* expression value.
*
* @param variables variables used in expression
* @param expression boolean expression
* @param expressionValue matching value
* @return set of boolean arrays which match expressionValue
*/
public static Set<boolean[]> filterAssignments(List<String> variables, Node expression, boolean expressionValue) {
if (variables == null || expression == null) {
throw new IllegalArgumentException("Variables or expression can not be null;"
+ " variables: " + variables + "; expression: " + expression);
}
Set<boolean[]> resultSet = new LinkedHashSet<>();
ExpressionEvaluator evaluator = new ExpressionEvaluator(variables);
forEach(variables, truthPermutation -> {
evaluator.setValues(truthPermutation);
expression.accept(evaluator);
if (evaluator.getResult() == expressionValue) {
resultSet.add(truthPermutation);
}
});
return resultSet;
}
/**
* Method accepts list of variables and constructs a truth table with number of
* rows equal to 2**(number of variables).
* Then for each row consumer is called.
*
* @param variables list of variables
* @param consumer defined consumer
*/
public static void forEach(List<String> variables, Consumer<boolean[]> consumer) {
if (variables == null || consumer == null) {
throw new IllegalArgumentException("Variables or consumer can not be null.");
}
if (variables.isEmpty()) {
return;
}
List<boolean[]> truthTable = new ArrayList<>();
constructTruthTable(truthTable, variables.size());
truthTable.forEach(consumer);
}
/**
* Method constructs a truth table based on number of variables.
*
* @param truthTable truthTable which will be filled
* @param numberOfVariables number of variables
*/
private static void constructTruthTable(List<boolean[]> truthTable, int numberOfVariables) {
boolean[] truthPermutation = new boolean[numberOfVariables];
Arrays.fill(truthPermutation, false);
for (int i = 0, size = (int) Math.pow(2, numberOfVariables); i < size; i++) {
truthTable.add(Arrays.copyOf(truthPermutation, truthPermutation.length));
boolean changeNext = true;
for (int j = truthPermutation.length - 1; j >= 0; j--) {
if (changeNext) {
truthPermutation[j] = truthPermutation[j] ^ true;
if (truthPermutation[j] == true) {
break;
}
}
}
}
}
}
| [
"sven.njegac@fer.hr"
] | sven.njegac@fer.hr |
75852aac887c7ecdc18f8fb1ee7b78460a63d3c7 | a4a51084cfb715c7076c810520542af38a854868 | /src/main/java/com/shopee/app/ui/datapoint/a.java | 16897db23364dec7593c852eca3f09f31bd1b430 | [] | no_license | BharathPalanivelu/repotest | ddaf56a94eb52867408e0e769f35bef2d815da72 | f78ae38738d2ba6c9b9b4049f3092188fabb5b59 | refs/heads/master | 2020-09-30T18:55:04.802341 | 2019-12-02T10:52:08 | 2019-12-02T10:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,236 | java | package com.shopee.app.ui.datapoint;
import com.garena.a.a.a.b;
import com.garena.android.appkit.b.i;
import com.shopee.app.application.ar;
import com.shopee.app.appuser.UserComponent;
import com.shopee.app.ui.datapoint.c;
import com.shopee.app.ui.datapoint.data.CollectDataEvent;
import com.shopee.app.ui.datapoint.data.ContactData;
import d.d.b.j;
public final class a implements c {
/* renamed from: a reason: collision with root package name */
public static final C0317a f21470a = new C0317a((g) null);
/* renamed from: c reason: collision with root package name */
private final i f21471c;
/* renamed from: d reason: collision with root package name */
private final c.b f21472d;
public String a() {
return "contact";
}
/* renamed from: com.shopee.app.ui.datapoint.a$a reason: collision with other inner class name */
public static final class C0317a {
private C0317a() {
}
public /* synthetic */ C0317a(g gVar) {
this();
}
}
public a(c.b bVar) {
j.b(bVar, "resultListener");
this.f21472d = bVar;
i a2 = b.a(this);
a2.a();
this.f21471c = a2;
}
public void b() {
ar f2 = ar.f();
j.a((Object) f2, "ShopeeApplication.get()");
UserComponent e2 = f2.e();
j.a((Object) e2, "ShopeeApplication.get().component");
e2.getContactInteractor().a();
}
public void c() {
this.f21471c.b();
}
public final void a(int i) {
this.f21472d.onDone(new CollectDataEvent(a(), 0, "", new ContactData(Integer.valueOf(i), false)));
}
public final void a(com.shopee.app.network.c.d.b<Integer> bVar) {
j.b(bVar, "response");
this.f21472d.onDone(new CollectDataEvent(a(), bVar.a(), bVar.b(), new ContactData(bVar.c(), false)));
}
public final void b(int i) {
this.f21472d.onDone(new CollectDataEvent(a(), 0, "", new ContactData(Integer.valueOf(i), true)));
}
public final void b(com.shopee.app.network.c.d.b<Integer> bVar) {
j.b(bVar, "response");
this.f21472d.onDone(new CollectDataEvent(a(), bVar.a(), bVar.b(), new ContactData(bVar.c(), false)));
}
}
| [
"noiz354@gmail.com"
] | noiz354@gmail.com |
5c910e4a1b7b57237b653c23e63d897b9b818f50 | a33aac97878b2cb15677be26e308cbc46e2862d2 | /data/libgdx/KinematicTest_dispose.java | c5332f4adb90c90f4431721ea602a70ea98bc886 | [] | no_license | GabeOchieng/ggnn.tensorflow | f5d7d0bca52258336fc12c9de6ae38223f28f786 | 7c62c0e8427bea6c8bec2cebf157b6f1ea70a213 | refs/heads/master | 2022-05-30T11:17:42.278048 | 2020-05-02T11:33:31 | 2020-05-02T11:33:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 151 | java | @Override
public void dispose() {
kinematicBox = kinematicBox1 = kinematicBox2 = kinematicBox3 = null;
position = null;
super.dispose();
}
| [
"bdqnghi@gmail.com"
] | bdqnghi@gmail.com |
26137a01f579313d1f88b0847d91dee293ecfaaf | 6ef4869c6bc2ce2e77b422242e347819f6a5f665 | /devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/hardware/location/_$$Lambda$ContextHubManager$3$8oeFzBAC_VuH1d32Kod8BVn0Os8.java | c93f2aa8422f2eac54d0be5e79854da5e31e81d6 | [] | no_license | hacking-android/frameworks | 40e40396bb2edacccabf8a920fa5722b021fb060 | 943f0b4d46f72532a419fb6171e40d1c93984c8e | refs/heads/master | 2020-07-03T19:32:28.876703 | 2019-08-13T03:31:06 | 2019-08-13T03:31:06 | 202,017,534 | 2 | 0 | null | 2019-08-13T03:33:19 | 2019-08-12T22:19:30 | Java | UTF-8 | Java | false | false | 930 | java | /*
* Decompiled with CFR 0.145.
*/
package android.hardware.location;
import android.hardware.location.ContextHubClient;
import android.hardware.location.ContextHubClientCallback;
import android.hardware.location.ContextHubManager;
public final class _$$Lambda$ContextHubManager$3$8oeFzBAC_VuH1d32Kod8BVn0Os8
implements Runnable {
private final /* synthetic */ ContextHubClientCallback f$0;
private final /* synthetic */ ContextHubClient f$1;
private final /* synthetic */ long f$2;
public /* synthetic */ _$$Lambda$ContextHubManager$3$8oeFzBAC_VuH1d32Kod8BVn0Os8(ContextHubClientCallback contextHubClientCallback, ContextHubClient contextHubClient, long l) {
this.f$0 = contextHubClientCallback;
this.f$1 = contextHubClient;
this.f$2 = l;
}
@Override
public final void run() {
ContextHubManager.3.lambda$onNanoAppEnabled$5(this.f$0, this.f$1, this.f$2);
}
}
| [
"me@paulo.costa.nom.br"
] | me@paulo.costa.nom.br |
34d031a503fb9b635adae0f9d7a10c43ecfc7c1d | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/31/org/apache/commons/math3/stat/descriptive/SummaryStatistics_getSecondMoment_312.java | 3a21b05628c203b7c726f48aebf6a21dcf540450 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,718 | java |
org apach common math3 stat descript
comput summari statist stream data valu ad
link add addvalu add addvalu method data valu store
memori comput statist larg data
stream
link storeless univari statist storelessunivariatestatist instanc maintain summari
state comput statist configur setter
implement varianc overridden call
link set varianc impl setvarianceimpl storeless univari statist storelessunivariatestatist actual paramet
method implement link storeless univari statist storelessunivariatestatist
configur complet code add addvalu code
call configur common math
provid implement
note thread safe
link synchron summari statist synchronizedsummarystatist concurr access multipl
thread requir
version
summari statist summarystatist statist summari statisticalsummari serializ
return statist relat central moment specif
return sum squar deviat sampl
valu ad
return code doubl nan code data valu ad
return code code data set
central moment statist
moment getsecondmo
moment secondmo result getresult
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
f5fdc0db39388672d60a047e82bc81b044b01817 | 2c7bbc8139c4695180852ed29b229bb5a0f038d7 | /com/netflix/mediaclient/service/mdx/cast/CastManager$1.java | 9e49561150506d0fa36fa175ab432816af5a08d6 | [] | no_license | suliyu/evolucionNetflix | 6126cae17d1f7ea0bc769ee4669e64f3792cdd2f | ac767b81e72ca5ad636ec0d471595bca7331384a | refs/heads/master | 2020-04-27T05:55:47.314928 | 2017-05-08T17:08:22 | 2017-05-08T17:08:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,300 | java | //
// Decompiled by Procyon v0.5.30
//
package com.netflix.mediaclient.service.mdx.cast;
import android.widget.Toast;
import com.google.android.gms.cast.CastMediaControlIntent;
import android.support.v7.media.MediaRouteSelector$Builder;
import com.netflix.mediaclient.service.configuration.SettingsConfiguration;
import org.json.JSONArray;
import java.util.Iterator;
import android.support.v7.media.MediaRouter$ProviderInfo;
import com.netflix.mediaclient.util.StringUtils;
import org.json.JSONException;
import com.netflix.mediaclient.Log;
import org.json.JSONObject;
import com.google.android.gms.cast.CastDevice;
import java.util.HashMap;
import android.support.v7.media.MediaRouteSelector;
import com.netflix.mediaclient.service.mdx.MdxNrdpLogger;
import android.support.v7.media.MediaRouter$RouteInfo;
import java.util.Map;
import android.os.Handler;
import android.content.Context;
import android.support.v7.media.MediaRouter$Callback;
import android.support.v7.media.MediaRouter;
class CastManager$1 implements Runnable
{
final /* synthetic */ CastManager this$0;
CastManager$1(final CastManager this$0) {
this.this$0 = this$0;
}
@Override
public void run() {
this.this$0.mMediaRouter = MediaRouter.getInstance(this.this$0.mContext);
}
}
| [
"sy.velasquez10@uniandes.edu.co"
] | sy.velasquez10@uniandes.edu.co |
d6c96ca23b1e66717e2ff7340394d9daf80d904c | afc47de48f9b3077fc263037abbccb9b8be53602 | /MyLife/app/src/main/java/com/example/mylife/bean/DataResponse.java | 294baa85b20128bc3fae02455389c16d5891dfc1 | [] | no_license | linxiaoxing/MyLife | 6392841cc386297ff2864b44f30eacc56043ed8b | a2fd7e304d9be70b25edee394e4077eeeead5c60 | refs/heads/master | 2020-12-26T19:25:01.281679 | 2020-04-19T08:01:01 | 2020-04-19T08:01:01 | 237,613,860 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 687 | java | package com.example.mylife.bean;
/**
* des:返回数据的基础bean
*/
public class DataResponse<T> {
/**
* data : ...
* errorCode : 0
* errorMsg :
*/
private T data;
private int errorCode;
private String errorMsg;
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public int getErrorCode() {
return errorCode;
}
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
} | [
"1208280008@qq.com"
] | 1208280008@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.