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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f4e1f42632b68df1ec94b87e82dff615c6122b74
|
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
|
/DecompiledViberSrc/app/src/main/java/org/simpleframework/xml/core/OverrideValue.java
|
e8815b4190accced6178d01f0f3f9ee74243d5d5
|
[] |
no_license
|
cga2351/code
|
703f5d49dc3be45eafc4521e931f8d9d270e8a92
|
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
|
refs/heads/master
| 2021-07-08T15:11:06.299852
| 2021-05-06T13:22:21
| 2021-05-06T13:22:21
| 60,314,071
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 912
|
java
|
package org.simpleframework.xml.core;
import org.simpleframework.xml.strategy.Value;
class OverrideValue
implements Value
{
private final Class type;
private final Value value;
public OverrideValue(Value paramValue, Class paramClass)
{
this.value = paramValue;
this.type = paramClass;
}
public int getLength()
{
return this.value.getLength();
}
public Class getType()
{
return this.type;
}
public Object getValue()
{
return this.value.getValue();
}
public boolean isReference()
{
return this.value.isReference();
}
public void setValue(Object paramObject)
{
this.value.setValue(paramObject);
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_4_dex2jar.jar
* Qualified Name: org.simpleframework.xml.core.OverrideValue
* JD-Core Version: 0.6.2
*/
|
[
"yu.liang@navercorp.com"
] |
yu.liang@navercorp.com
|
df940c82e5c81b924613461fe35564388e637b37
|
3c6f4bb030a42d19ce8c25a931138641fb6fd495
|
/finance-payment/finance-payment-api/src/main/java/com/hongkun/finance/payment/service/FinPlatformPaywayService.java
|
f754d23c98abcd1edfe56db2fed8ce2202f4be0a
|
[] |
no_license
|
happyjianguo/finance-hkjf
|
93195df26ebb81a8b951a191e25ab6267b73aaca
|
0389a6eac966ee2e4887b6db4f99183242ba2d4e
|
refs/heads/master
| 2020-07-28T13:42:40.924633
| 2019-08-03T00:22:19
| 2019-08-03T00:22:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,456
|
java
|
package com.hongkun.finance.payment.service;
import java.util.List;
import com.hongkun.finance.payment.model.FinPlatformPayway;
import com.yirun.framework.core.enums.PlatformSourceEnums;
import com.yirun.framework.core.enums.SystemTypeEnums;
import com.yirun.framework.core.utils.pager.Pager;
/**
* @Project : finance
* @Program Name :
* com.hongkun.finance.payment.service.FinPlatformPaywayService.java
* @Class Name : FinPlatformPaywayService.java
* @Description : GENERATOR SERVICE类
* @Author : generator
*/
public interface FinPlatformPaywayService {
/**
* @Described : 单条插入
* @param finPlatformPayway
* 持久化的数据对象
* @return : void
*/
void insertFinPlatformPayway(FinPlatformPayway finPlatformPayway);
/**
* @Described : 批量插入
* @param List<FinPlatformPayway>
* 批量插入的数据
* @return : void
*/
void insertFinPlatformPaywayBatch(List<FinPlatformPayway> list);
/**
* @Described : 批量插入
* @param List<FinPlatformPayway>
* 批量插入的数据
* @param count
* 多少条数提交一次
* @return : void
*/
void insertFinPlatformPaywayBatch(List<FinPlatformPayway> list, int count);
/**
* @Described : 更新数据
* @param finPlatformPayway
* 要更新的数据
* @return : void
*/
void updateFinPlatformPayway(FinPlatformPayway finPlatformPayway);
/**
* @Described : 批量更新数据
* @param finPlatformPayway
* 要更新的数据
* @param count
* 多少条数提交一次
* @return : void
*/
void updateFinPlatformPaywayBatch(List<FinPlatformPayway> list, int count);
/**
* @Described : 通过id查询数据
* @param id
* id值
* @return FinPlatformPayway
*/
FinPlatformPayway findFinPlatformPaywayById(int id);
/**
* @Described : 条件检索数据
* @param finPlatformPayway
* 检索条件
* @return List<FinPlatformPayway>
*/
List<FinPlatformPayway> findFinPlatformPaywayList(FinPlatformPayway finPlatformPayway);
/**
* @Described : 条件检索数据
* @param finPlatformPayway
* 检索条件
* @param start
* 起始页
* @param limit
* 检索条数
* @return List<FinPlatformPayway>
*/
List<FinPlatformPayway> findFinPlatformPaywayList(FinPlatformPayway finPlatformPayway, int start, int limit);
/**
* @Described : 条件检索数据
* @param finPlatformPayway
* 检索条件
* @param pager
* 分页数据
* @return List<FinPlatformPayway>
*/
Pager findFinPlatformPaywayList(FinPlatformPayway finPlatformPayway, Pager pager);
/**
* @Described : 统计条数
* @param finPlatformPayway
* 检索条件
* @param pager
* 分页数据
* @return int
*/
int findFinPlatformPaywayCount(FinPlatformPayway finPlatformPayway);
/**
* @Description : 查询某个系统的某个平台下有哪几种支付渠道
* @Method_Name : findPayChannelInfo;
* @param systemTypeEnums
* 系统枚举类
* @param platformSourceEnums
* 平台枚举类
* @return
* @return : List<FinPlatformPayway>;
* @Creation Date : 2017年12月6日 下午1:43:14;
* @Author : yanbinghuang@hongkun.com.cn 黄艳兵;
*/
List<FinPlatformPayway> findPayChannelInfo(SystemTypeEnums systemTypeEnums,
PlatformSourceEnums platformSourceEnums);
}
|
[
"zc.ding@foxmail.com"
] |
zc.ding@foxmail.com
|
fbedce48fe22e613817c597dc7a74a43ed1c6161
|
314f17f60baf9f2faa1720cb9e6e5dc1d733a97e
|
/.svn/pristine/4f/4ffc9278f232b7d0807b48fcfee403ae3440e99d.svn-base
|
4e7b2a3a6e6404e48093d33bd6ad341431a4fd58
|
[] |
no_license
|
lc4t/payment
|
8a18d08cb65b778bff48a36e86c3412324159fc0
|
9cfd839ef92b74594259b1a6d3737e11ce4e441e
|
refs/heads/master
| 2020-03-31T07:15:31.731886
| 2017-05-23T05:15:15
| 2017-05-23T05:15:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 871
|
package noumena.payment.googleplay;
import java.util.Vector;
public class GooglePlayParams
{
public static final String SIGNATURE_ALGORITHM = "SHA1withRSA";
public static final String GOOGLEPLAY = "GooglePlay";
private Vector<GooglePlayParamApp> apps = new Vector<GooglePlayParamApp>();
public Vector<GooglePlayParamApp> getApps()
{
return apps;
}
public void addApp(GooglePlayParamApp app)
{
this.getApps().add(app);
}
public void addApp(String appname, String appid, String appkey)
{
GooglePlayParamApp app = new GooglePlayParamApp();
app.setAppname(appname);
app.setAppid(appid);
app.setAppkey(appkey);
this.getApps().add(app);
}
public String getAppKeyById(String appid)
{
for (GooglePlayParamApp app : this.getApps())
{
if (app.getAppid().equals(appid))
{
return app.getAppkey();
}
}
return null;
}
}
|
[
"you@example.com"
] |
you@example.com
|
|
c938dec60f0159bf78b2f861fbdc2a0bdf3bd0c9
|
39bf0b411d94ecbd8be5370cc8f106782523463e
|
/aliyun-java-sdk-scsp/src/main/java/com/aliyuncs/scsp/model/v20200702/GetEntityRouteListResponse.java
|
2ff2014aebbba94cfa25bfc5ca483edce5f97701
|
[
"Apache-2.0"
] |
permissive
|
15022515596/aliyun-openapi-java-sdk
|
cdde8fa03d414841187e0c2817e7694c80bab14e
|
cddaed401d41d15f30685891c173b861af4b6374
|
refs/heads/master
| 2023-03-23T10:01:06.951652
| 2021-03-21T08:34:12
| 2021-03-21T08:34:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,896
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.scsp.model.v20200702;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.scsp.transform.v20200702.GetEntityRouteListResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class GetEntityRouteListResponse extends AcsResponse {
private String code;
private String message;
private String requestId;
private Boolean success;
private Data data;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Boolean getSuccess() {
return this.success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Data getData() {
return this.data;
}
public void setData(Data data) {
this.data = data;
}
public static class Data {
private Long total;
private Integer pageSize;
private Integer pageNo;
private List<EntityRouteListItem> entityRouteList;
public Long getTotal() {
return this.total;
}
public void setTotal(Long total) {
this.total = total;
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getPageNo() {
return this.pageNo;
}
public void setPageNo(Integer pageNo) {
this.pageNo = pageNo;
}
public List<EntityRouteListItem> getEntityRouteList() {
return this.entityRouteList;
}
public void setEntityRouteList(List<EntityRouteListItem> entityRouteList) {
this.entityRouteList = entityRouteList;
}
public static class EntityRouteListItem {
private Long uniqueId;
private String entityId;
private String entityName;
private String entityBizCode;
private String entityBizCodeType;
private String entityRelationNumber;
private String departmentId;
private String groupId;
private String serviceId;
private String extInfo;
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public String getEntityId() {
return this.entityId;
}
public void setEntityId(String entityId) {
this.entityId = entityId;
}
public String getEntityName() {
return this.entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public String getEntityBizCode() {
return this.entityBizCode;
}
public void setEntityBizCode(String entityBizCode) {
this.entityBizCode = entityBizCode;
}
public String getEntityBizCodeType() {
return this.entityBizCodeType;
}
public void setEntityBizCodeType(String entityBizCodeType) {
this.entityBizCodeType = entityBizCodeType;
}
public String getEntityRelationNumber() {
return this.entityRelationNumber;
}
public void setEntityRelationNumber(String entityRelationNumber) {
this.entityRelationNumber = entityRelationNumber;
}
public String getDepartmentId() {
return this.departmentId;
}
public void setDepartmentId(String departmentId) {
this.departmentId = departmentId;
}
public String getGroupId() {
return this.groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getServiceId() {
return this.serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
public String getExtInfo() {
return this.extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
}
}
@Override
public GetEntityRouteListResponse getInstance(UnmarshallerContext context) {
return GetEntityRouteListResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
7cacaf1532df7cd7ee90747564448cf1ed45eaf4
|
92029ee3efee26a310d0265c21973af456fea6d1
|
/src/main/java/com/tele2test/dao/AppRoleDAO.java
|
20b774163339a5a92b7f46225716252185c127c7
|
[] |
no_license
|
HappyRomio/chat2
|
dabc34e77e626a422dadb7f1e820bb1adf699147
|
faa1864e3a2ac1a3caaa3bd0c026d090760aae4e
|
refs/heads/master
| 2022-02-06T00:44:32.827065
| 2020-02-17T12:58:05
| 2020-02-17T12:58:05
| 241,236,831
| 0
| 0
| null | 2022-01-21T23:38:03
| 2020-02-18T00:25:10
|
Java
|
UTF-8
|
Java
| false
| false
| 241
|
java
|
package com.tele2test.dao;
import com.tele2test.entity.AppRole;
import org.springframework.data.repository.CrudRepository;
public interface AppRoleDAO extends CrudRepository<AppRole, Long> {
AppRole findByRoleName(String roleName);
}
|
[
"maltsevroma@rambler.ru"
] |
maltsevroma@rambler.ru
|
100088c97fd00a78f8519b4584477e9f5a1fed39
|
c24e883bba5235840239de3bd5640d92e0c8db66
|
/activite/src/main/java/com/smart/website/activite/SmsBasicGiftsEntityPK.java
|
22807c49e2474eab2bbeb7d82b9cc31ef88d2884
|
[] |
no_license
|
hotHeart48156/mallwebsite
|
12fe2f7d4e108ceabe89b82eacca75898d479357
|
ba865c7ea22955009e2de7b688038ddd8bc9febf
|
refs/heads/master
| 2022-11-23T23:22:28.967449
| 2020-01-07T15:27:27
| 2020-01-07T15:27:27
| 231,905,626
| 0
| 0
| null | 2022-11-15T23:54:56
| 2020-01-05T11:14:43
|
Java
|
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
package com.smart.website.activite;
import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
public class SmsBasicGiftsEntityPK implements Serializable {
private int storeId;
private long id;
@Column(name = "store_id", nullable = false)
@Id
public int getStoreId() {
return storeId;
}
public void setStoreId(int storeId) {
this.storeId = storeId;
}
@Column(name = "id", nullable = false)
@Id
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SmsBasicGiftsEntityPK that = (SmsBasicGiftsEntityPK) o;
if (storeId != that.storeId) return false;
if (id != that.id) return false;
return true;
}
@Override
public int hashCode() {
int result = storeId;
result = 31 * result + (int) (id ^ (id >>> 32));
return result;
}
}
|
[
"2680323775@qq.com"
] |
2680323775@qq.com
|
cd9afed614f5410e8e0bb75587c0458fd405bd1f
|
2b40d55e06270926fcae044043ae5beb95d74f3c
|
/actividades/prog/files/java/mil-ejemplos/darwin/database/User.java
|
59d424fc652180b15e825f37693ba4196b18535d
|
[
"BSD-2-Clause",
"CC0-1.0",
"CC-BY-SA-3.0"
] |
permissive
|
jsuabur/libro-de-actividades
|
15af2318407420b5cd81f4c4bc8a8371ee0c1eee
|
2941e34a5112962403d965e53435951981652503
|
refs/heads/master
| 2020-04-07T16:40:10.388462
| 2018-11-21T11:25:44
| 2018-11-21T11:25:44
| 158,537,991
| 0
| 0
|
CC0-1.0
| 2018-11-21T11:30:22
| 2018-11-21T11:30:22
| null |
UTF-8
|
Java
| false
| false
| 5,758
|
java
|
package database;
// package jabadot;
import java.util.Date;
/** Represents one logged in user
*/
public class User implements java.io.Serializable {
private static final long serialVersionUID = 5394392565088707959L;
// #name:password:name:email:City:Prov:Country:privs
/** The login name */
protected String name;
protected String password;
protected String firstName;
protected String lastName;
protected String fullName; // derived
protected String email; // 5
protected String address;
protected String address2;
protected String company;
protected String city;
protected String prov; // 10
protected String country;
protected Date creationDate;
protected Date lastLoginDate;
protected String jobDescr;
protected String os; // 15
protected String unixGUI;
protected String proglang;
/** user preference */
protected String skin;
// // privs is 19
protected boolean editPrivs = false;
protected boolean adminPrivs = false;
public static final int P_ADMIN = 01000;
public static final int P_EDIT = 0100;
/** Construct a user with no data -- must be a no-argument
* constructor for use in jsp:useBean.
*/
public User() {
creationDate = new Date();
}
/** Construct a user with just the name */
public User(String n) {
this(); // set credt
name = n;
}
/** Construct a user with all text fields. */
public User(String nick, String pw, String fname, String lName,
String emaddr,
String comp,
String addr1, String addr2,
String cty, String pr, String cntry,
String jd, String os, String gui, String lang,
String skin) {
this(); // set credt
name = nick;
password = pw;
firstName = fname;
lastName = lName;
email = emaddr;
address = addr1;
address2 = addr2;
company = comp;
city = cty;
prov = pr;
country = cntry;
this.skin = skin;
jobDescr = jd;
this.os = os;
unixGUI = gui;
proglang = lang;
}
/** Construct a user with common text fields. */
public User(String nick, String pw, String fname, String lName,
String emaddr, String prov, String cntry,
Date credt, Date lastlog, String skin, boolean e, boolean a) {
this(); // set credt
name = nick;
password = pw;
firstName = fname;
lastName = lName;
email = emaddr;
this.prov = prov;
this.country = cntry;
this.skin = skin;
creationDate = (Date) credt.clone();
lastLoginDate = (Date) lastlog.clone();
adminPrivs = a;
editPrivs = e;
}
/**
* @param nick
* @param pass
* @param full
* @param email2
* @param city2
* @param prov2
* @param ctry
*/
public User(String nick, String pass, String full, String email2, String city2, String prov2, String ctry) {
// TODO Auto-generated constructor stub
}
/** Return the nickname. */
public String getName() {
return name;
}
/** The name should not be changeable, but we
* want to be able to say <jsp:setProperty property="*"/>
* and get it all...
*/
public void setName(String nick) {
name = nick;
}
public String getPassword() {
return password;
}
/** Validate a given password against the user's. */
public boolean checkPassword(String userInput) {
return password.equals(userInput);
}
/** Set password */
public void setPassword(String password) {
this.password = password;
}
/** Get email */
public String getEmail() {
return email;
}
/** Set email */
public void setEmail(String email) {
this.email = email;
}
/** Get fullName */
public String getFullName() {
return firstName + ' ' + lastName;
}
/** Set firstName */
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/** Set lastName */
public void setlastName(String lastName) {
this.lastName = lastName;
}
/** Get city */
public String getCity() {
return city;
}
/** Set city */
public void setCity(String city) {
this.city = city;
}
/** Get prov */
public String getProv() {
return prov;
}
/** Set prov */
public void setProv(String prov) {
this.prov = prov;
}
/** Get country */
public String getCountry() {
return country;
}
/** Set country */
public void setCountry(String country) {
this.country = country;
}
/** Get adminPrivs */
public boolean isAdminPrivileged() {
return adminPrivs;
}
/** Set adminPrivs */
public void setAdminPrivileged(boolean adminPrivs) {
this.adminPrivs = adminPrivs;
}
/** Get EditPrivs */
public boolean isEditPrivileged() {
return editPrivs;
}
/** Set EditPrivs */
public void setEditPrivileged(boolean editPrivs) {
this.editPrivs = editPrivs;
}
/** Get all privs, as an int, for use in the database */
public int getPrivs() {
int i = 0;
if (adminPrivs)
i |= P_ADMIN;
if (editPrivs)
i |= P_EDIT;
return i;
}
/** Get the Creation Date (read only field) */
public Date getCreationDate() {
return (Date) creationDate.clone();
}
/** Set the Creation Date (read only field) */
public void setCreationDate(Date date) {
creationDate = (Date) date.clone();
}
/** Get the LastLog Date (read only field) */
public Date getLastLoginDate() {
return (Date) lastLoginDate.clone();
}
/** Get the LastLog Date (read only field) */
public void setLastLoginDate(Date d) {
lastLoginDate = (Date) d.clone();
}
/** Return a String representation. */
public String toString() {
return new StringBuffer("User[").append(name).append(',').
append(firstName).append(' ').append(lastName).
append(']').toString();
}
/** Check if all required fields have been set */
public boolean isComplete() {
if (name == null || name.length()==0 ||
firstName == null || firstName.length()==0 ||
lastName == null || lastName.length()==0 ||
email == null || email.length()==0)
return false;
return true;
}
}
|
[
"dvarrui@gmail.com"
] |
dvarrui@gmail.com
|
3656506dc711e95c28fd29b88cc34151e8ea75ca
|
5f4e7b18c82bca2f3f8ff944a5b0ef31aaf5248e
|
/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/util/PatternMatcher.java
|
cf126c64ee782d7e172656b5be0c5ac8b376fc75
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
shayaanmunshi/hapi-fhir
|
1e080ac18393f43cbe069229b674a34dd42a6535
|
be07ebc4ef73feb776192cc7ce91d95fde466d8d
|
refs/heads/master
| 2021-06-30T18:53:51.655542
| 2017-09-21T12:33:20
| 2017-09-21T12:33:20
| 201,999,525
| 1
| 0
|
Apache-2.0
| 2019-08-12T19:55:49
| 2019-08-12T19:55:49
| null |
UTF-8
|
Java
| false
| false
| 1,927
|
java
|
package ca.uhn.fhir.util;
import java.util.regex.Pattern;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
/**
* Tests if the argument is a {@link CharSequence} that matches a regular expression.
*/
public class PatternMatcher extends TypeSafeMatcher<CharSequence> {
/**
* Creates a matcher that matches if the examined {@link CharSequence} matches the specified regular expression.
* <p/>
* For example:
*
* <pre>
* assertThat("myStringOfNote", pattern("[0-9]+"))
* </pre>
*
* @param regex
* the regular expression that the returned matcher will use to match any examined {@link CharSequence}
*/
@Factory
public static Matcher<CharSequence> pattern(String regex) {
return pattern(Pattern.compile(regex));
}
/**
* Creates a matcher that matches if the examined {@link CharSequence} matches the specified {@link Pattern}.
* <p/>
* For example:
*
* <pre>
* assertThat("myStringOfNote", Pattern.compile("[0-9]+"))
* </pre>
*
* @param pattern
* the pattern that the returned matcher will use to match any examined {@link CharSequence}
*/
@Factory
public static Matcher<CharSequence> pattern(Pattern pattern) {
return new PatternMatcher(pattern);
}
private final Pattern pattern;
public PatternMatcher(Pattern pattern) {
this.pattern = pattern;
}
@Override
public boolean matchesSafely(CharSequence item) {
return pattern.matcher(item).find();
}
@Override
public void describeMismatchSafely(CharSequence item, org.hamcrest.Description mismatchDescription) {
mismatchDescription.appendText("was \"").appendText(String.valueOf(item)).appendText("\"");
}
@Override
public void describeTo(org.hamcrest.Description description) {
description.appendText("a string with pattern \"").appendText(String.valueOf(pattern)).appendText("\"");
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
0253fe394fab4ea6bfa82bb5862a329b36172739
|
a54afc897f883165410a7361a1ff41d25435775b
|
/src/main/java/com/fengdai/qa/meta/CallbackInfo.java
|
b4474eb09113fa319966c58d6e5a398a15932c98
|
[] |
no_license
|
shichaowei/qacms
|
8fa607c307e5ed505c3297f222fe23954d135ab1
|
31b33937d8df92d94dbfe5f2d2d8eb65d8547094
|
refs/heads/master
| 2020-12-02T16:18:35.835852
| 2018-05-03T09:25:11
| 2018-05-03T09:25:11
| 96,530,080
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 646
|
java
|
package com.fengdai.qa.meta;
public class CallbackInfo {
int id;
String requestip;
String callbackinfo;
String createtime;
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRequestip() {
return requestip;
}
public void setRequestip(String requestip) {
this.requestip = requestip;
}
public String getCallbackinfo() {
return callbackinfo;
}
public void setCallbackinfo(String callbackinfo) {
this.callbackinfo = callbackinfo;
}
}
|
[
"1239378293@qq.com"
] |
1239378293@qq.com
|
8e3a77acee541edaa70c6cef2a57069f010a6010
|
25fcf3b3d515f569bdeafc38a5cfaa835fcec3fc
|
/src/main/java/eu/verdelhan/bitraac/indicators/TrueRange.java
|
952b0cf6863a7e86eeb91c3e10ae5db3adefe1ae
|
[
"MIT"
] |
permissive
|
talkvip/Bitraac
|
8835a0ea6df063fb66d1856df589bae5ac90dc28
|
5fddc0dd19b37ebe4db3bf937f683f81177a9f6f
|
refs/heads/master
| 2020-06-02T04:33:53.617905
| 2013-12-06T12:12:00
| 2013-12-06T12:12:00
| 15,041,395
| 3
| 6
| null | 2017-10-19T14:37:07
| 2013-12-09T07:56:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,981
|
java
|
package eu.verdelhan.bitraac.indicators;
import eu.verdelhan.bitraac.data.Period;
import java.math.BigDecimal;
import org.apache.commons.lang3.Validate;
/**
* True range indicator.
*/
public class TrueRange implements Indicator<Double> {
private Period previousPeriod;
private Period currentPeriod;
/**
* @param period the period for which we want the true range
*/
public TrueRange(Period period) {
this(null, period);
}
/**
* @param previousPeriod the previous period
* @param currentPeriod the current period for which we want the true range
*/
public TrueRange(Period previousPeriod, Period currentPeriod) {
Validate.notNull(currentPeriod, "Current period can't be null");
this.previousPeriod = previousPeriod;
this.currentPeriod = currentPeriod;
}
/**
* @return the true range for the current period
*/
@Override
public Double execute() {
// Current extrema prices
BigDecimal currentHighPrice = currentPeriod.getHigh().getPrice().getAmount();
BigDecimal currentLowPrice = currentPeriod.getLow().getPrice().getAmount();
double trueRange;
if (previousPeriod == null) {
// No previous period
trueRange = currentHighPrice.subtract(currentLowPrice).doubleValue();
} else {
// Using the previous close price
BigDecimal previousClosePrice = previousPeriod.getLast().getPrice().getAmount();
BigDecimal trueRangeMethod1 = currentHighPrice.subtract(currentLowPrice);
BigDecimal trueRangeMethod2 = currentHighPrice.subtract(previousClosePrice).abs();
BigDecimal trueRangeMethod3 = currentLowPrice.subtract(previousClosePrice).abs();
trueRange = trueRangeMethod1.max(trueRangeMethod2).max(trueRangeMethod3).doubleValue();
}
return trueRange;
}
}
|
[
"marc.deverdelhan@yahoo.com"
] |
marc.deverdelhan@yahoo.com
|
2d95b7833d230198d02fe916d7f445e3b68cc58c
|
fc6c869ee0228497e41bf357e2803713cdaed63e
|
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/scanner/ui/HighlightRectSideView.java
|
412db5f4a9848ee61108b70f385e2a0eba20863f
|
[] |
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
| 4,334
|
java
|
package com.tencent.mm.plugin.scanner.ui;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import com.tencent.gmtrace.GMTrace;
import com.tencent.mm.R.g;
import com.tencent.mm.compatible.f.a;
import com.tencent.mm.sdk.platformtools.aj;
import com.tencent.mm.sdk.platformtools.aj.a;
import com.tencent.mm.sdk.platformtools.w;
public class HighlightRectSideView
extends View
{
private aj htb;
private Paint mk;
private boolean[] ovN;
private Rect ovO;
private int ovP;
private int ovQ;
private int ovR;
private int ovS;
public HighlightRectSideView(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
GMTrace.i(6060601507840L, 45155);
this.ovS = 0;
this.htb = new aj(new aj.a()
{
public final boolean pM()
{
GMTrace.i(6084760698880L, 45335);
HighlightRectSideView.a(HighlightRectSideView.this);
HighlightRectSideView.this.invalidate();
GMTrace.o(6084760698880L, 45335);
return true;
}
}, true);
paramContext = a.decodeResource(getResources(), R.g.aZJ);
this.ovP = paramContext.getWidth();
this.ovQ = paramContext.getHeight();
if (this.ovQ != this.ovP) {
w.e("MicroMsg.HighlightRectSideView", "width is not same as height");
}
this.ovR = (this.ovP * 6 / 24);
this.ovN = new boolean[4];
this.mk = new Paint();
this.mk.setColor(6676738);
this.mk.setAlpha(255);
this.mk.setStrokeWidth(this.ovR);
this.mk.setStyle(Paint.Style.STROKE);
this.htb.z(300L, 300L);
GMTrace.o(6060601507840L, 45155);
}
public final void a(boolean[] paramArrayOfBoolean)
{
int i = 0;
GMTrace.i(6061138378752L, 45159);
if ((paramArrayOfBoolean == null) || (4 != paramArrayOfBoolean.length))
{
GMTrace.o(6061138378752L, 45159);
return;
}
w.d("MicroMsg.HighlightRectSideView", "%s, %s, %s, %s", new Object[] { Boolean.valueOf(paramArrayOfBoolean[0]), Boolean.valueOf(paramArrayOfBoolean[1]), Boolean.valueOf(paramArrayOfBoolean[2]), Boolean.valueOf(paramArrayOfBoolean[3]) });
while (i < 4)
{
this.ovN[i] = paramArrayOfBoolean[i];
i += 1;
}
invalidate();
GMTrace.o(6061138378752L, 45159);
}
public final void i(Rect paramRect)
{
GMTrace.i(6060735725568L, 45156);
this.ovO = paramRect;
w.d("MicroMsg.HighlightRectSideView", "rect:%s", new Object[] { paramRect });
GMTrace.o(6060735725568L, 45156);
}
protected void onDetachedFromWindow()
{
GMTrace.i(6060869943296L, 45157);
super.onDetachedFromWindow();
if (this.htb != null)
{
this.htb.stopTimer();
this.htb = null;
}
GMTrace.o(6060869943296L, 45157);
}
protected void onDraw(Canvas paramCanvas)
{
GMTrace.i(6061004161024L, 45158);
super.onDraw(paramCanvas);
int i = 0;
if (i < 4) {
if (this.ovN[i] != 0) {}
}
for (i = 0;; i = 1)
{
int j = this.ovR / 2;
if ((this.ovN[0] != 0) && ((1 == i) || (this.ovS % 2 == 0))) {
paramCanvas.drawLine(this.ovO.left + j, this.ovO.top + this.ovQ, this.ovO.left + j, this.ovO.bottom - this.ovQ, this.mk);
}
if ((this.ovN[1] != 0) && ((1 == i) || (this.ovS % 2 == 0))) {
paramCanvas.drawLine(this.ovO.right - j, this.ovO.top + this.ovQ, this.ovO.right - j, this.ovO.bottom - this.ovQ, this.mk);
}
if ((this.ovN[2] != 0) && ((1 == i) || (this.ovS % 3 == 0))) {
paramCanvas.drawLine(this.ovO.left + this.ovP, this.ovO.top + j, this.ovO.right - this.ovP, this.ovO.top + j, this.mk);
}
if ((this.ovN[3] != 0) && ((1 == i) || (this.ovS % 3 == 0))) {
paramCanvas.drawLine(this.ovO.left + this.ovP, this.ovO.bottom - j, this.ovO.right - this.ovP, this.ovO.bottom - j, this.mk);
}
GMTrace.o(6061004161024L, 45158);
return;
i += 1;
break;
}
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\plugin\scanner\ui\HighlightRectSideView.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"robert0825@gmail.com"
] |
robert0825@gmail.com
|
75339880f899c50623189e005c36aff43089c5f2
|
83dd6f92c880f51357a5a557437460f8b90dd847
|
/framework/src/main/java/com/example/framework/backend/service/IPushService.java
|
003c1b1d1c673920368b857c493774ea4190be37
|
[] |
no_license
|
seasunny1229/Meet
|
462eeb8ebbb6ba72d11b73fd04479bf44ddf8229
|
0b239fbcf3faea88570d6a1e98bf67d900f4a6cb
|
refs/heads/master
| 2021-04-01T20:42:33.535298
| 2020-04-22T23:49:05
| 2020-04-22T23:49:05
| 248,214,118
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.example.framework.backend.service;
import com.example.framework.backend.callback.BackendServiceCallback;
import com.example.framework.backend.pushing.bean.PushInfo;
import com.example.framework.backend.pushing.constant.PushType;
import java.util.List;
public interface IPushService {
void push(PushType type, String text, String mediaUrl, BackendServiceCallback<Void> backendServiceCallback);
void fetchPushedData(BackendServiceCallback<List<PushInfo>> backendServiceCallback);
}
|
[
"sea_sunny1229@163.com"
] |
sea_sunny1229@163.com
|
2245c32f76c8809ec2a1cb7ed94fcaccd3a99b2b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/35/35_ab704fdc79e2413016e0c4de9f7e1e979c652727/ServiceLevelAgreements/35_ab704fdc79e2413016e0c4de9f7e1e979c652727_ServiceLevelAgreements_t.java
|
07197a4a15153614b21fffa45c833c2ec06d0083
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,039
|
java
|
/*
* Copyright to the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.rioproject.sla;
import org.rioproject.deploy.SystemRequirements;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* The {@code ServiceLevelAgreements} class provides context on the attributes required to
* meet and monitor service level agreements for a service. Included in this
* class are the {@link org.rioproject.deploy.SystemRequirements} that
* must be met in order for the service to be provisioned, and
* {@link org.rioproject.sla.SLA} declarations that will monitor service behavior
* and be managed by provided service level agreement manager.
*
* @author Dennis Reedy
*/
public class ServiceLevelAgreements implements Serializable {
@SuppressWarnings("unused")
static final long serialVersionUID = 1L;
/** System requirements */
private SystemRequirements systemRequirements;
/** Array of service SLAs */
private final List<SLA> serviceSLAs = new ArrayList<SLA>();
public void setServiceRequirements(SystemRequirements systemRequirements) {
this.systemRequirements = systemRequirements;
}
public synchronized SystemRequirements getSystemRequirements() {
if(systemRequirements==null)
systemRequirements = new SystemRequirements();
return systemRequirements;
}
/**
* Add a service specified SLAs
*
* @param sla An SLA specifying service specific operational criteria
*/
public void addServiceSLA(SLA sla) {
if(sla == null)
throw new IllegalArgumentException("sla is null");
synchronized(serviceSLAs) {
serviceSLAs.add(sla);
}
}
/**
* Get the service specified SLAs
*
* @return Array of service SLAs. A new array is allocated each time. If
* there are no service SLAs, a zero-length array is returned
*/
public SLA[] getServiceSLAs() {
SLA[] slas;
synchronized(serviceSLAs) {
slas = serviceSLAs.toArray(new SLA[serviceSLAs.size()]);
}
return (slas);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("ServiceLevelAgreements: ").append(systemRequirements);
builder.append(", serviceSLAs=").append(serviceSLAs);
return builder.toString();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1603b555eac7cfb683f1844dc8582c0dab14e202
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/imp-20210630/src/main/java/com/aliyun/imp20210630/models/CreateAppTemplateRequest.java
|
f4ae3d336437dcb21cd157fa16b28b3862a0bdaa
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,777
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.imp20210630.models;
import com.aliyun.tea.*;
public class CreateAppTemplateRequest extends TeaModel {
// 应用模板名称
@NameInMap("AppTemplateName")
public String appTemplateName;
// 应用模板场景,电商business,课堂classroom
@NameInMap("Scene")
public String scene;
// 集成方式(一体化SDK:paasSDK,样板间:standardRoom)
@NameInMap("IntegrationMode")
public String integrationMode;
// 组件列表
@NameInMap("ComponentList")
public java.util.List<String> componentList;
public static CreateAppTemplateRequest build(java.util.Map<String, ?> map) throws Exception {
CreateAppTemplateRequest self = new CreateAppTemplateRequest();
return TeaModel.build(map, self);
}
public CreateAppTemplateRequest setAppTemplateName(String appTemplateName) {
this.appTemplateName = appTemplateName;
return this;
}
public String getAppTemplateName() {
return this.appTemplateName;
}
public CreateAppTemplateRequest setScene(String scene) {
this.scene = scene;
return this;
}
public String getScene() {
return this.scene;
}
public CreateAppTemplateRequest setIntegrationMode(String integrationMode) {
this.integrationMode = integrationMode;
return this;
}
public String getIntegrationMode() {
return this.integrationMode;
}
public CreateAppTemplateRequest setComponentList(java.util.List<String> componentList) {
this.componentList = componentList;
return this;
}
public java.util.List<String> getComponentList() {
return this.componentList;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
8c45777456fa3da1f27ef173827fc09bcec70ee5
|
8b224ac579b59df432942861c9b880fe584cb66c
|
/src/main/java/se/lexicon/java_33_first_rest/Java33FirstRestApplication.java
|
8014b15454fc90057a4c722173c644c1b06cc80c
|
[] |
no_license
|
ErikSvensson76/G33_Rest_Lecture_1
|
8506b3ce6244573b0d0210105fd32ed1aae93c2f
|
68967a5b56fcc3f4a9d1f64bc845099672273a24
|
refs/heads/master
| 2023-03-28T17:50:27.296613
| 2021-04-06T09:54:35
| 2021-04-06T09:54:35
| 355,138,129
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 352
|
java
|
package se.lexicon.java_33_first_rest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Java33FirstRestApplication {
public static void main(String[] args) {
SpringApplication.run(Java33FirstRestApplication.class, args);
}
}
|
[
"eosvensson@gmail.com"
] |
eosvensson@gmail.com
|
96e9b898e718aef02b9eef53f3153a4791b8ea4d
|
7005851126f6a30ae637f28d0aa9b3ef639556cd
|
/core/tags/1.1/service/src/main/java/org/extensiblecatalog/ncip/v2/service/AuthenticationDataFormatType.java
|
be6b9c1ae24ed05c121ddbb0b2b747df5e9830f4
|
[
"MIT"
] |
permissive
|
eXtensibleCatalog/NCIP2-Toolkit
|
c1c0f482e7fa34c3ac5dd8e2842ea0c0db6764a7
|
3e2603c2010dd2bcbdbe104eb46d64c38c539dc6
|
refs/heads/master
| 2022-09-19T23:43:55.650756
| 2017-02-20T08:39:02
| 2017-02-20T08:39:02
| 44,343,498
| 0
| 3
| null | 2022-08-25T20:20:18
| 2015-10-15T20:25:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,612
|
java
|
/**
* Copyright (c) 2010 eXtensible Catalog Organization
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the MIT/X11 license. The text of the license can be
* found at http://www.opensource.org/licenses/mit-license.php.
*/
package org.extensiblecatalog.ncip.v2.service;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.log4j.Logger;
import java.util.List;
/**
* Identifies the type of AuthenticationDataFormatType.
*/
public class AuthenticationDataFormatType extends SchemeValuePair {
private static final Logger LOG = Logger.getLogger(AuthenticationDataFormatType.class);
private static final List<AuthenticationDataFormatType> VALUES_LIST = new CopyOnWriteArrayList<AuthenticationDataFormatType>();
public AuthenticationDataFormatType(String scheme, String value) {
super(scheme, value);
VALUES_LIST.add(this);
}
/**
* Find the AuthenticationDataFormatType that matches the scheme & value strings supplied.
*
* @param scheme a String representing the Scheme URI.
* @param value a String representing the Value in the Scheme.
* @return an AuthenticationDataFormatType that matches, or null if none is found to match.
*/
public static AuthenticationDataFormatType find(String scheme, String value) throws ServiceException {
return (AuthenticationDataFormatType)find(scheme, value, VALUES_LIST, AuthenticationDataFormatType.class);
}
}
|
[
"xrosecky@gmail.com"
] |
xrosecky@gmail.com
|
cb2d49ab49bea493c346c2ba8b69e7882bff656c
|
0c64c8997ea66d0611d4895e0bf8e5d8ac4bae7e
|
/src/day18/DropdownExcel.java
|
eae333a0671a64b45ac1cd9b5331fdd1468e5f0c
|
[] |
no_license
|
SaiKrishna12/June8Batch
|
1e7db5d86e81802172609e757e1db454979e36c6
|
be741ce2486973b40935c4c33f7f264248b84a46
|
refs/heads/master
| 2021-01-20T10:37:07.094023
| 2015-07-15T04:56:54
| 2015-07-15T04:56:54
| 39,117,331
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,541
|
java
|
package day18;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class DropdownExcel {
FirefoxDriver driver=null;
@BeforeMethod
public void setUp()
{
driver=new FirefoxDriver();
driver.get("http://newtours.demoaut.com");
driver.findElement(By.linkText("REGISTER")).click();
}
@Test
public void dropdownTest() throws IOException
{
FileInputStream f=new FileInputStream("c:\\users\\sai\\desktop\\dropdown.xlsx");
XSSFWorkbook wb=new XSSFWorkbook(f);
XSSFSheet ws=wb.getSheet("Sheet1");
Row r=null;
WebElement drop=driver.findElement(By.name("country"));
List<WebElement> dropdown=drop.findElements(By.tagName("option"));
for(int i=0;i<dropdown.size();i++)
{
r=ws.createRow(i);
r.createCell(0).setCellValue(dropdown.get(i).getText());
dropdown.get(i).click();
if(dropdown.get(i).isSelected())
{
r.createCell(1).setCellValue("True");
}
else
{
r.createCell(1).setCellValue("False");
}
}
FileOutputStream f1=new FileOutputStream("c:\\users\\sai\\desktop\\dropdown.xlsx");
wb.write(f1);
f1.close();
}
}
|
[
"saikrishna_gandham@yahoo.co.in"
] |
saikrishna_gandham@yahoo.co.in
|
cc50d6ba806c2fbcb75b01fd69cda1552aa5f227
|
affe223efe18ba4d5e676f685c1a5e73caac73eb
|
/clients/webservice/src/main/java/com/vmware/vim/AlarmTriggeringAction.java
|
2c0b18d3c88b90cdd50d590626636c93abefaec3
|
[] |
no_license
|
RohithEngu/VM27
|
486f6093e0af2f6df1196115950b0d978389a985
|
f0f4f177210fd25415c2e058ec10deb13b7c9247
|
refs/heads/master
| 2021-01-16T00:42:30.971054
| 2009-08-14T19:58:16
| 2009-08-14T19:58:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,040
|
java
|
/**
* AlarmTriggeringAction.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.vmware.vim;
public class AlarmTriggeringAction extends com.vmware.vim.AlarmAction implements
java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private com.vmware.vim.Action action;
private boolean green2Yellow;
private boolean yellow2Red;
private boolean red2Yellow;
private boolean yellow2Green;
public AlarmTriggeringAction() {
}
public AlarmTriggeringAction(java.lang.String dynamicType,
com.vmware.vim.DynamicProperty[] dynamicProperty,
com.vmware.vim.Action action, boolean green2Yellow,
boolean yellow2Red, boolean red2Yellow, boolean yellow2Green) {
super(dynamicType, dynamicProperty);
this.action = action;
this.green2Yellow = green2Yellow;
this.yellow2Red = yellow2Red;
this.red2Yellow = red2Yellow;
this.yellow2Green = yellow2Green;
}
/**
* Gets the action value for this AlarmTriggeringAction.
*
* @return action
*/
public com.vmware.vim.Action getAction() {
return action;
}
/**
* Sets the action value for this AlarmTriggeringAction.
*
* @param action
*/
public void setAction(com.vmware.vim.Action action) {
this.action = action;
}
/**
* Gets the green2Yellow value for this AlarmTriggeringAction.
*
* @return green2Yellow
*/
public boolean isGreen2Yellow() {
return green2Yellow;
}
/**
* Sets the green2Yellow value for this AlarmTriggeringAction.
*
* @param green2Yellow
*/
public void setGreen2Yellow(boolean green2Yellow) {
this.green2Yellow = green2Yellow;
}
/**
* Gets the yellow2Red value for this AlarmTriggeringAction.
*
* @return yellow2Red
*/
public boolean isYellow2Red() {
return yellow2Red;
}
/**
* Sets the yellow2Red value for this AlarmTriggeringAction.
*
* @param yellow2Red
*/
public void setYellow2Red(boolean yellow2Red) {
this.yellow2Red = yellow2Red;
}
/**
* Gets the red2Yellow value for this AlarmTriggeringAction.
*
* @return red2Yellow
*/
public boolean isRed2Yellow() {
return red2Yellow;
}
/**
* Sets the red2Yellow value for this AlarmTriggeringAction.
*
* @param red2Yellow
*/
public void setRed2Yellow(boolean red2Yellow) {
this.red2Yellow = red2Yellow;
}
/**
* Gets the yellow2Green value for this AlarmTriggeringAction.
*
* @return yellow2Green
*/
public boolean isYellow2Green() {
return yellow2Green;
}
/**
* Sets the yellow2Green value for this AlarmTriggeringAction.
*
* @param yellow2Green
*/
public void setYellow2Green(boolean yellow2Green) {
this.yellow2Green = yellow2Green;
}
private java.lang.Object __equalsCalc = null;
@Override
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof AlarmTriggeringAction)) {
return false;
}
AlarmTriggeringAction other = (AlarmTriggeringAction) obj;
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj)
&& ((this.action == null && other.getAction() == null) || (this.action != null && this.action
.equals(other.getAction())))
&& this.green2Yellow == other.isGreen2Yellow()
&& this.yellow2Red == other.isYellow2Red()
&& this.red2Yellow == other.isRed2Yellow()
&& this.yellow2Green == other.isYellow2Green();
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
@Override
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getAction() != null) {
_hashCode += getAction().hashCode();
}
_hashCode += (isGreen2Yellow() ? Boolean.TRUE : Boolean.FALSE)
.hashCode();
_hashCode += (isYellow2Red() ? Boolean.TRUE : Boolean.FALSE).hashCode();
_hashCode += (isRed2Yellow() ? Boolean.TRUE : Boolean.FALSE).hashCode();
_hashCode += (isYellow2Green() ? Boolean.TRUE : Boolean.FALSE)
.hashCode();
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
AlarmTriggeringAction.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim2",
"AlarmTriggeringAction"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("action");
elemField
.setXmlName(new javax.xml.namespace.QName("urn:vim2", "action"));
elemField
.setXmlType(new javax.xml.namespace.QName("urn:vim2", "Action"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("green2Yellow");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim2",
"green2yellow"));
elemField.setXmlType(new javax.xml.namespace.QName(
"http://www.w3.org/2001/XMLSchema", "boolean"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("yellow2Red");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim2",
"yellow2red"));
elemField.setXmlType(new javax.xml.namespace.QName(
"http://www.w3.org/2001/XMLSchema", "boolean"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("red2Yellow");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim2",
"red2yellow"));
elemField.setXmlType(new javax.xml.namespace.QName(
"http://www.w3.org/2001/XMLSchema", "boolean"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("yellow2Green");
elemField.setXmlName(new javax.xml.namespace.QName("urn:vim2",
"yellow2green"));
elemField.setXmlType(new javax.xml.namespace.QName(
"http://www.w3.org/2001/XMLSchema", "boolean"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
_xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
_xmlType, typeDesc);
}
}
|
[
"sankarachary@intalio.com"
] |
sankarachary@intalio.com
|
ffabd62fdf1b423894ead50ccd2266b978988199
|
097df92ce1bfc8a354680725c7d10f0d109b5b7d
|
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/s3/AmazonS3ClientBuilder.java
|
eb947a818befb58644aab6afd795cbc8b9af4e72
|
[] |
no_license
|
cozos/emrfs-hadoop
|
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
|
ba5dfa631029cb5baac2f2972d2fdaca18dac422
|
refs/heads/master
| 2022-10-14T15:03:51.500050
| 2022-10-06T05:38:49
| 2022-10-06T05:38:49
| 233,979,996
| 2
| 2
| null | 2022-10-06T05:41:46
| 2020-01-15T02:24:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,631
|
java
|
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.s3;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.ClientConfigurationFactory;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.annotation.NotThreadSafe;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.annotation.SdkTestInternalApi;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.client.AwsSyncClientParams;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.internal.SdkFunction;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.regions.AwsRegionProvider;
@NotThreadSafe
public final class AmazonS3ClientBuilder
extends AmazonS3Builder<AmazonS3ClientBuilder, AmazonS3>
{
private AmazonS3ClientBuilder() {}
@SdkTestInternalApi
AmazonS3ClientBuilder(SdkFunction<AmazonS3ClientParamsWrapper, AmazonS3> clientFactory, ClientConfigurationFactory clientConfigFactory, AwsRegionProvider regionProvider)
{
super(clientFactory, clientConfigFactory, regionProvider);
}
public static AmazonS3ClientBuilder standard()
{
return (AmazonS3ClientBuilder)new AmazonS3ClientBuilder().withCredentials(new S3CredentialsProviderChain());
}
public static AmazonS3 defaultClient()
{
return (AmazonS3)standard().build();
}
protected AmazonS3 build(AwsSyncClientParams clientParams)
{
return (AmazonS3)clientFactory.apply(new AmazonS3ClientParamsWrapper(clientParams, resolveS3ClientOptions()));
}
}
/* Location:
* Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.s3.AmazonS3ClientBuilder
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"Arwin.tio@adroll.com"
] |
Arwin.tio@adroll.com
|
1e042f42d1ea4e1f9b8e62a7237e01b237a4cab5
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/zhihu/android/app/nextebook/p1215b/EBookThemeChangedEvent.java
|
36bcfaf79353eebdb6f775cd3fd9588fe049656a
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 233
|
java
|
package com.zhihu.android.app.nextebook.p1215b;
import kotlin.Metadata;
@Metadata
/* renamed from: com.zhihu.android.app.nextebook.b.f */
/* compiled from: EBookThemeChangedEvent.kt */
public final class EBookThemeChangedEvent {
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
75b3aaf71fcfd19124d745d1c461d2b85d416248
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.browser-base/sources/defpackage/St1.java
|
4fa017bbbb5657a3fb956fef9a0b296caede4477
|
[] |
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,748
|
java
|
package defpackage;
import android.view.View;
/* renamed from: St1 reason: default package */
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public class St1 {
/* renamed from: a reason: collision with root package name */
public final Rt1 f8923a;
public Qt1 b = new Qt1();
public St1(Rt1 rt1) {
this.f8923a = rt1;
}
public View a(int i, int i2, int i3, int i4) {
int d = this.f8923a.d();
int a2 = this.f8923a.a();
int i5 = i2 > i ? 1 : -1;
View view = null;
while (i != i2) {
View c = this.f8923a.c(i);
int b2 = this.f8923a.b(c);
int e = this.f8923a.e(c);
Qt1 qt1 = this.b;
qt1.b = d;
qt1.c = a2;
qt1.d = b2;
qt1.e = e;
if (i3 != 0) {
qt1.f8791a = 0;
qt1.f8791a = i3 | 0;
if (qt1.a()) {
return c;
}
}
if (i4 != 0) {
Qt1 qt12 = this.b;
qt12.f8791a = 0;
qt12.f8791a = i4 | 0;
if (qt12.a()) {
view = c;
}
}
i += i5;
}
return view;
}
public boolean b(View view, int i) {
Qt1 qt1 = this.b;
int d = this.f8923a.d();
int a2 = this.f8923a.a();
int b2 = this.f8923a.b(view);
int e = this.f8923a.e(view);
qt1.b = d;
qt1.c = a2;
qt1.d = b2;
qt1.e = e;
if (i == 0) {
return false;
}
Qt1 qt12 = this.b;
qt12.f8791a = 0;
qt12.f8791a = 0 | i;
return qt12.a();
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
c0456f552b808da9a980908ce38eaa83018dd526
|
072216667ef59e11cf4994220ea1594538db10a0
|
/googleplay/com/google/android/finsky/utils/Utils.java
|
4ba8b5ca54d01b0d7cb5e6e387171531bc25b1ea
|
[] |
no_license
|
jackTang11/REMIUI
|
896037b74e90f64e6f7d8ddfda6f3731a8db6a74
|
48d65600a1b04931a510e1f036e58356af1531c0
|
refs/heads/master
| 2021-01-18T05:43:37.754113
| 2015-07-03T04:01:06
| 2015-07-03T04:01:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,380
|
java
|
package com.google.android.finsky.utils;
import android.content.ComponentName;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.DetailedState;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build.VERSION;
import android.os.Looper;
import com.google.android.finsky.activities.DebugActivity;
import com.google.android.finsky.config.G;
import com.google.android.play.utils.PlayUtils;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.regex.Pattern;
public class Utils {
private static Pattern COMMA_PATTERN;
private static String[] EMPTY_ARRAY;
static {
COMMA_PATTERN = Pattern.compile(",");
EMPTY_ARRAY = new String[0];
}
public static void ensureOnMainThread() {
if (Looper.myLooper() != Looper.getMainLooper()) {
throw new IllegalStateException("This method must be called from the UI thread.");
}
}
public static void ensureNotOnMainThread() {
if (Looper.myLooper() == Looper.getMainLooper()) {
throw new IllegalStateException("This method cannot be called from the UI thread.");
}
}
public static <P> void executeMultiThreaded(AsyncTask<P, ?, ?> asyncTask, P... params) {
if (VERSION.SDK_INT >= 11) {
asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
} else {
asyncTask.execute(params);
}
}
public static String getPreferenceKey(String key, String accountName) {
return accountName + ":" + key;
}
public static boolean isBackgroundDataEnabled(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (VERSION.SDK_INT < 14) {
return connectivityManager.getBackgroundDataSetting();
}
for (NetworkInfo info : connectivityManager.getAllNetworkInfo()) {
if (info != null && info.getDetailedState() == DetailedState.BLOCKED) {
return false;
}
}
return true;
}
public static String urlEncode(String decodedUrl) {
try {
return URLEncoder.encode(decodedUrl, "UTF-8");
} catch (UnsupportedEncodingException e) {
FinskyLog.wtf("%s", e);
throw new RuntimeException(e);
}
}
public static String urlDecode(String encodedUrl) {
try {
return URLDecoder.decode(encodedUrl, "UTF-8");
} catch (IllegalArgumentException e) {
FinskyLog.d("Unable to parse %s - %s", encodedUrl, e.getMessage());
return null;
} catch (UnsupportedEncodingException e2) {
FinskyLog.wtf("%s", e2);
throw new RuntimeException(e2);
}
}
public static void checkUrlIsSecure(String url) {
checkUrlIsSecure(url, PlayUtils.isTestDevice());
}
static void checkUrlIsSecure(String url, boolean isTestDevice) {
Uri parsed = Uri.parse(url);
if (!parsed.getScheme().equals("https")) {
if (!isTestDevice || (!parsed.getHost().toLowerCase().endsWith("corp.google.com") && !parsed.getHost().startsWith("192.168.0") && !parsed.getHost().startsWith("127.0.0"))) {
throw new RuntimeException("Insecure URL: " + url);
}
}
}
public static String commaPackStrings(String[] strings) {
if (strings == null || strings.length == 0) {
return "";
}
if (strings.length == 1) {
return strings[0];
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < strings.length; i++) {
if (i != 0) {
sb.append(',');
}
sb.append(strings[i]);
}
return sb.toString();
}
public static String[] commaUnpackStrings(String stringsList) {
if (stringsList == null || stringsList.length() == 0) {
return EMPTY_ARRAY;
}
if (stringsList.indexOf(44) != -1) {
return COMMA_PATTERN.split(stringsList);
}
return new String[]{stringsList};
}
public static void syncDebugActivityStatus(Context context) {
context.getPackageManager().setComponentEnabledSetting(new ComponentName(context, DebugActivity.class), ((Boolean) G.debugOptionsEnabled.get()).booleanValue() ? 1 : 2, 1);
}
public static byte[] readBytes(InputStream in) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
copy(in, out);
byte[] toByteArray = out.toByteArray();
return toByteArray;
} finally {
out.close();
}
}
public static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[8192];
while (true) {
try {
int bytesRead = in.read(buffer);
if (bytesRead == -1) {
break;
}
out.write(buffer, 0, bytesRead);
} finally {
in.close();
}
}
}
public static void safeClose(Closeable resource) {
if (resource != null) {
try {
resource.close();
} catch (IOException e) {
}
}
}
public static boolean isEmptyOrSpaces(CharSequence text) {
return text == null || text.length() == 0 || trim(text).length() == 0;
}
public static CharSequence trim(CharSequence text) {
if (text == null) {
return null;
}
int start = 0;
int last = text.length() - 1;
int end = last;
while (start <= end && text.charAt(start) <= ' ') {
start++;
}
while (end >= start && text.charAt(end) <= ' ') {
end--;
}
return (start == 0 && end == last) ? text : text.subSequence(start, end + 1);
}
public static String getItalicSafeString(String source) {
return source + " ";
}
}
|
[
"songjd@putao.com"
] |
songjd@putao.com
|
eafaeb0f0f8bc05866175190507dbf25e7626be5
|
5765c87fd41493dff2fde2a68f9dccc04c1ad2bd
|
/Variant Programs/1-4/35/memorialize/SymposiumSufferance.java
|
bafb9524a6ca2cde45c04985d08ff09a8c45dcb1
|
[
"MIT"
] |
permissive
|
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism
|
42e4c2061c3f8da0dfce760e168bb9715063645f
|
a42ced1d5a92963207e3565860cac0946312e1b3
|
refs/heads/master
| 2020-08-09T08:10:08.888384
| 2019-11-25T01:14:23
| 2019-11-25T01:14:23
| 214,041,532
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,305
|
java
|
package memorialize;
import disk.ArrangedRanking;
public class SymposiumSufferance {
public synchronized int indictment() {
int higherChained = 208444887;
return this.expositionPlaylist.consider();
}
static String jesusExtent = "tvciVN3nR3wUGgAk";
public synchronized memorialize.VintnerGathering firstParade() {
String significance = "lHbm9eZNKAje6";
return this.expositionPlaylist.installForemost();
}
public static memorialize.SymposiumSufferance typicalCola;
public synchronized void embedCarnival(memorialize.VintnerGathering radicalForum) {
int souvenir = -1871893965;
this.expositionPlaylist.infix(radicalForum);
}
public SymposiumSufferance() {
this.expositionPlaylist = new disk.ArrangedRanking<VintnerGathering>();
typicalCola = this;
}
public synchronized String toString() {
String ister = "NFtjB941g";
return this.expositionPlaylist.toString();
}
public disk.ArrangedRanking<VintnerGathering> expositionPlaylist;
public static synchronized memorialize.SymposiumSufferance prevailingWaiting() {
int numberPieces = -1813770757;
return typicalCola;
}
public synchronized memorialize.VintnerGathering overviewLast() {
int asset = 2110285583;
return this.expositionPlaylist.premierOppose();
}
}
|
[
"hayden.cheers@me.com"
] |
hayden.cheers@me.com
|
21c929c4dccb4dbbd7d60a70271bc44a7834a414
|
f66fc1aca1c2ed178ac3f8c2cf5185b385558710
|
/reladomo/src/main/java/com/gs/fw/common/mithra/cacheloader/ConfigParameter.java
|
75af00aace60b2c05e47141ccf84730acbfe648e
|
[
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-public-domain"
] |
permissive
|
goldmansachs/reladomo
|
9cd3e60e92dbc6b0eb59ea24d112244ffe01bc35
|
a4f4e39290d8012573f5737a4edc45d603be07a5
|
refs/heads/master
| 2023-09-04T10:30:12.542924
| 2023-07-20T09:29:44
| 2023-07-20T09:29:44
| 68,020,885
| 431
| 122
|
Apache-2.0
| 2023-07-07T21:29:52
| 2016-09-12T15:17:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,634
|
java
|
/*
Copyright 2016 Goldman Sachs.
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.gs.fw.common.mithra.cacheloader;
public class ConfigParameter
{
private final String key;
private final String value;
public ConfigParameter(String key, String value)
{
this.key = key;
this.value = value;
}
public String getKey()
{
return key;
}
public String getValue()
{
return value;
}
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ConfigParameter that = (ConfigParameter) o;
if (key != null ? !key.equals(that.key) : that.key != null) return false;
if (value != null ? !value.equals(that.value) : that.value != null) return false;
return true;
}
@Override
public int hashCode()
{
int result = key != null ? key.hashCode() : 0;
result = 31 * result + (value != null ? value.hashCode() : 0);
return result;
}
}
|
[
"mohammad.rezaei@gs.com"
] |
mohammad.rezaei@gs.com
|
b6693682bad6ca72104cfe6d96c5b50b86202cd4
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/MATH-58b-1-5-Single_Objective_GGA-IntegrationSingleObjective-/org/apache/commons/math/analysis/function/Gaussian$Parametric_ESTest_scaffolding.java
|
cc57813b3bf843e362d5f294fd63783bc6518c75
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,113
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat May 16 22:32:20 UTC 2020
*/
package org.apache.commons.math.analysis.function;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class Gaussian$Parametric_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.function.Gaussian$Parametric";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Gaussian$Parametric_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.exception.util.Localizable",
"org.apache.commons.math.exception.NumberIsTooSmallException",
"org.apache.commons.math.analysis.function.Gaussian$Parametric",
"org.apache.commons.math.exception.MathRuntimeException",
"org.apache.commons.math.exception.MathIllegalArgumentException",
"org.apache.commons.math.exception.NullArgumentException",
"org.apache.commons.math.analysis.ParametricUnivariateRealFunction",
"org.apache.commons.math.util.FastMath",
"org.apache.commons.math.exception.DimensionMismatchException",
"org.apache.commons.math.exception.NotStrictlyPositiveException",
"org.apache.commons.math.exception.util.LocalizedFormats",
"org.apache.commons.math.exception.util.MessageFactory",
"org.apache.commons.math.exception.MathIllegalNumberException",
"org.apache.commons.math.exception.MathThrowable",
"org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction",
"org.apache.commons.math.analysis.UnivariateRealFunction",
"org.apache.commons.math.analysis.function.Gaussian",
"org.apache.commons.math.exception.util.ArgUtils"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
4183025f5c9da724df5eb23785086f31cb7ebc02
|
0ca9a0873d99f0d69b78ed20292180f513a20d22
|
/saved/sources/com/google/android/gms/common/api/internal/zzcp.java
|
ab5374bfd61fd24ff9b33e6efd11820708097eac
|
[] |
no_license
|
Eliminater74/com.google.android.tvlauncher
|
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
|
e8284f9970d77a05042a57e9c2173856af7c4246
|
refs/heads/master
| 2021-01-14T23:34:04.338366
| 2020-02-24T16:39:53
| 2020-02-24T16:39:53
| 242,788,539
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,613
|
java
|
package com.google.android.gms.common.api.internal;
import android.support.annotation.NonNull;
import com.google.android.gms.common.api.OptionalPendingResult;
import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.common.api.ResultStore;
import com.google.android.gms.common.api.ResultTransform;
import com.google.android.gms.common.api.TransformedResult;
import com.google.android.gms.common.internal.Hide;
import java.util.concurrent.TimeUnit;
/* compiled from: OptionalPendingResultImpl */
public final class zzcp<R extends Result> extends OptionalPendingResult<R> {
private final BasePendingResult<R> zza;
public zzcp(PendingResult<R> pendingResult) {
if (pendingResult instanceof BasePendingResult) {
this.zza = (BasePendingResult) pendingResult;
return;
}
throw new IllegalArgumentException("OptionalPendingResult can only wrap PendingResults generated by an API call.");
}
public final boolean isDone() {
return this.zza.zze();
}
public final R get() {
if (isDone()) {
return await(0, TimeUnit.MILLISECONDS);
}
throw new IllegalStateException("Result is not available. Check that isDone() returns true before calling get().");
}
public final R await() {
return this.zza.await();
}
public final R await(long j, TimeUnit timeUnit) {
return this.zza.await(j, timeUnit);
}
public final void cancel() {
this.zza.cancel();
}
public final boolean isCanceled() {
return this.zza.isCanceled();
}
public final void setResultCallback(ResultCallback<? super R> resultCallback) {
this.zza.setResultCallback(resultCallback);
}
public final void setResultCallback(ResultCallback<? super R> resultCallback, long j, TimeUnit timeUnit) {
this.zza.setResultCallback(resultCallback, j, timeUnit);
}
public final void store(ResultStore resultStore, int i) {
this.zza.store(resultStore, i);
}
@Hide
public final void zza(PendingResult.zza zza2) {
this.zza.zza(zza2);
}
@NonNull
public final <S extends Result> TransformedResult<S> then(@NonNull ResultTransform<? super R, ? extends S> resultTransform) {
return this.zza.then(resultTransform);
}
@Hide
public final void zzb(int i) {
this.zza.zzb(i);
}
@Hide
public final Integer zzb() {
return this.zza.zzb();
}
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
742ce15366034bc0f8feb7d93aea83ce26505edb
|
567429dcb0ef3f2216a555469764d1336625a778
|
/src/gsontest/People.java
|
d5beb58fd3a806e6a77508bf1d6857479075c97c
|
[] |
no_license
|
star1606/JavaStudyNew3
|
73af9b6a01aa0ef6e74d89e20a5a92c5703c2fc3
|
0a0b0688a6f6f9fad6e2eff2575bdae81de072d8
|
refs/heads/master
| 2021-05-24T07:29:29.310793
| 2020-04-29T03:22:41
| 2020-04-29T03:22:41
| 253,450,493
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 683
|
java
|
package gsontest;
import java.util.HashMap;
import java.util.Map;
public class People { //자바오브젝트 원형을 만들었음
private String name;
private Integer age;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
|
[
"you@example.com"
] |
you@example.com
|
dcc9a05db3712b8945c7b270717594bce22180e9
|
efad5ac5b4388dff15aedd80ad76483f25eb09b8
|
/retrofit/src/main/java/com/hannesdorfmann/mosby/retrofit/exception/NetworkException.java
|
4f99f8a0372cf4d61d11b69bac73b5f8ef628c3a
|
[
"Apache-2.0"
] |
permissive
|
princepspolycap/mosby
|
f1e90d3d84e2955e1f532079d3528576a5ade8a0
|
f5ae114edb6eb8f25c85de554583415d36f56820
|
refs/heads/master
| 2021-06-01T01:03:12.545205
| 2015-09-01T12:20:10
| 2015-09-01T12:20:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,209
|
java
|
/*
* Copyright 2015 Hannes Dorfmann.
*
* 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.hannesdorfmann.mosby.retrofit.exception;
/**
* Used to wrap network errors (like no active internet connection)
* into a Exception so that the view can generate the desired error message
*
* @author Hannes Dorfmann
* @since 1.0.0
*/
public class NetworkException extends Exception {
public NetworkException() {
}
public NetworkException(String detailMessage) {
super(detailMessage);
}
public NetworkException(String detailMessage, Throwable throwable) {
super(detailMessage, throwable);
}
public NetworkException(Throwable throwable) {
super(throwable);
}
}
|
[
"hannes.dorfmann@gmail.com"
] |
hannes.dorfmann@gmail.com
|
8222c5e6a6066c9a69ede3ac013f4880251e5487
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/airrequest/TransformResponseOperator.java
|
e722fa059432aa483d8ff07724d2827352d6e41a
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 778
|
java
|
package com.airbnb.airrequest;
import p032rx.Observable;
import p032rx.functions.Func1;
final class TransformResponseOperator<T> implements Func1<AirResponse<T>, Observable<AirResponse<T>>> {
private final AirRequest request;
TransformResponseOperator(AirRequest request2) {
this.request = request2;
}
public Observable<AirResponse<T>> call(AirResponse<T> airResponse) {
if (!(this.request instanceof BaseRequest)) {
return Observable.just(airResponse);
}
try {
return Observable.just(((BaseRequest) this.request).transformResponse(airResponse));
} catch (RuntimeException e) {
return Observable.error(new AirRequestNetworkException(this.request, (Throwable) e));
}
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
07141c2e834ff65c639f053aed1722a3e712d20d
|
91b9f6e6824e7655c37f66ce5755fee9aacf9b00
|
/src/main/java/br/com/soujava/dinamico/JavaDinamicoException.java
|
34c54aaa2c63b2b356540890eae78d0d2dc65931
|
[
"Apache-2.0"
] |
permissive
|
assaduzzaman-dsi/java_dinamico
|
f6b4bf4b2da3c3b0619441819a832e9a3b309929
|
5c9f64d6b44fd4ba763806f78ad7baef287a4fc9
|
refs/heads/master
| 2021-01-18T02:04:33.756940
| 2014-01-20T09:34:52
| 2014-01-20T09:34:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
package br.com.soujava.dinamico;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticCollector;
import javax.tools.JavaFileObject;
/**
* Classe Exceção para a compilacao dinamica.
* Seu objetivo é apenas reportar os erros de compilação em tempo real
*/
public class JavaDinamicoException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* O coletor de informações da compilação
*/
private DiagnosticCollector<JavaFileObject> collector;
public JavaDinamicoException(String message) {
super(message);
}
public JavaDinamicoException(String message, DiagnosticCollector<JavaFileObject> collector) {
super(message);
this.collector = collector;
}
public JavaDinamicoException(Throwable e, DiagnosticCollector<JavaFileObject> collector) {
super(e);
this.collector = collector;
}
public String getCompilationError() {
StringBuilder sb = new StringBuilder();
for (Diagnostic<? extends JavaFileObject> diagnostic : collector.getDiagnostics()) {
sb.append(diagnostic.getMessage(null));
}
return sb.toString();
}
@Override
public String toString() {
return getCompilationError();
}
}
|
[
"otaviojava@java.net"
] |
otaviojava@java.net
|
96cb07c10c1cdf218212aef20425066178ebabcf
|
2f3c04382a66dbf222c8587edd67a5df4bc80422
|
/src/com/cedar/cp/dto/model/virement/VirementAuthPointCK.java
|
e0e5add509ed24a92bf87b11dff95c306907da0d
|
[] |
no_license
|
arnoldbendaa/cppro
|
d3ab6181cc51baad2b80876c65e11e92c569f0cc
|
f55958b85a74ad685f1360ae33c881b50d6e5814
|
refs/heads/master
| 2020-03-23T04:18:00.265742
| 2018-09-11T08:15:28
| 2018-09-11T08:15:28
| 141,074,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,749
|
java
|
/* */ package com.cedar.cp.dto.model.virement;
/* */
/* */ import com.cedar.cp.dto.base.PrimaryKey;
/* */ import com.cedar.cp.dto.model.ModelCK;
/* */ import com.cedar.cp.dto.model.ModelPK;
/* */ import java.io.Serializable;
/* */
/* */ public class VirementAuthPointCK extends VirementRequestCK
/* */ implements Serializable
/* */ {
/* */ protected VirementAuthPointPK mVirementAuthPointPK;
/* */
/* */ public VirementAuthPointCK(ModelPK paramModelPK, VirementRequestPK paramVirementRequestPK, VirementAuthPointPK paramVirementAuthPointPK)
/* */ {
/* 32 */ super(paramModelPK, paramVirementRequestPK);
/* */
/* 36 */ this.mVirementAuthPointPK = paramVirementAuthPointPK;
/* */ }
/* */
/* */ public VirementAuthPointPK getVirementAuthPointPK()
/* */ {
/* 44 */ return this.mVirementAuthPointPK;
/* */ }
/* */
/* */ public PrimaryKey getPK()
/* */ {
/* 52 */ return this.mVirementAuthPointPK;
/* */ }
/* */
/* */ public int hashCode()
/* */ {
/* 60 */ return this.mVirementAuthPointPK.hashCode();
/* */ }
/* */
/* */ public boolean equals(Object obj)
/* */ {
/* 69 */ if ((obj instanceof VirementAuthPointPK)) {
/* 70 */ return obj.equals(this);
/* */ }
/* 72 */ if (!(obj instanceof VirementAuthPointCK)) {
/* 73 */ return false;
/* */ }
/* 75 */ VirementAuthPointCK other = (VirementAuthPointCK)obj;
/* 76 */ boolean eq = true;
/* */
/* 78 */ eq = (eq) && (this.mModelPK.equals(other.mModelPK));
/* 79 */ eq = (eq) && (this.mVirementRequestPK.equals(other.mVirementRequestPK));
/* 80 */ eq = (eq) && (this.mVirementAuthPointPK.equals(other.mVirementAuthPointPK));
/* */
/* 82 */ return eq;
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 90 */ StringBuffer sb = new StringBuffer();
/* 91 */ sb.append(super.toString());
/* 92 */ sb.append("[");
/* 93 */ sb.append(this.mVirementAuthPointPK);
/* 94 */ sb.append("]");
/* 95 */ return sb.toString();
/* */ }
/* */
/* */ public String toTokens()
/* */ {
/* 103 */ StringBuffer sb = new StringBuffer();
/* 104 */ sb.append("VirementAuthPointCK|");
/* 105 */ sb.append(super.getPK().toTokens());
/* 106 */ sb.append('|');
/* 107 */ sb.append(this.mVirementAuthPointPK.toTokens());
/* 108 */ return sb.toString();
/* */ }
/* */
/* */ public static ModelCK getKeyFromTokens(String extKey)
/* */ {
/* 113 */ String[] token = extKey.split("[|]");
/* 114 */ int i = 0;
/* 115 */ checkExpected("VirementAuthPointCK", token[(i++)]);
/* 116 */ checkExpected("ModelPK", token[(i++)]);
/* 117 */ i++;
/* 118 */ checkExpected("VirementRequestPK", token[(i++)]);
/* 119 */ i++;
/* 120 */ checkExpected("VirementAuthPointPK", token[(i++)]);
/* 121 */ i = 1;
/* 122 */ return new VirementAuthPointCK(ModelPK.getKeyFromTokens(token[(i++)] + '|' + token[(i++)]), VirementRequestPK.getKeyFromTokens(token[(i++)] + '|' + token[(i++)]), VirementAuthPointPK.getKeyFromTokens(token[(i++)] + '|' + token[(i++)]));
/* */ }
/* */
/* */ private static void checkExpected(String expected, String found)
/* */ {
/* 131 */ if (!expected.equals(found))
/* 132 */ throw new IllegalArgumentException("expected=" + expected + " found=" + found);
/* */ }
/* */ }
/* Location: /home/oracle/coa/cp.ear/cp-extracted/utc.war/cp-common.jar
* Qualified Name: com.cedar.cp.dto.model.virement.VirementAuthPointCK
* JD-Core Version: 0.6.0
*/
|
[
"arnoldbendaa@gmail.com"
] |
arnoldbendaa@gmail.com
|
0550c75a98c34739a5331d7eda5dbabf0a26fcac
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/20/20_612e2af21fdf0061b04ac493e0d9b3c89785aeda/GameScreen/20_612e2af21fdf0061b04ac493e0d9b3c89785aeda_GameScreen_t.java
|
26664d8ed5089b6714670e56e61df68a26d06d64
|
[] |
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,059
|
java
|
package ch.zhaw.arsphema.screen;
import java.util.ArrayList;
import java.util.List;
import ch.zhaw.arsphema.MyGdxGame;
import ch.zhaw.arsphema.controller.HeroController;
import ch.zhaw.arsphema.model.Background;
import ch.zhaw.arsphema.model.Hero;
import ch.zhaw.arsphema.model.NavigationOverlay;
import ch.zhaw.arsphema.model.enemies.AbstractEnemy;
import ch.zhaw.arsphema.model.enemies.EnemyFactory;
import ch.zhaw.arsphema.model.shot.OverHeatBar;
import ch.zhaw.arsphema.model.shot.Shot;
import ch.zhaw.arsphema.services.Services;
import ch.zhaw.arsphema.services.SoundManager;
import ch.zhaw.arsphema.util.Paths;
import ch.zhaw.arsphema.util.Sizes;
import ch.zhaw.arsphema.util.Textures;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
public class GameScreen extends AbstractScreen {
private float ppuX; // pixels per unit on the X axis
private float ppuY; // pixels per unit on the Y axis
private boolean showOverlay = true;
private Hero hero;
private HeroController controller;
private NavigationOverlay overlay;
private List<AbstractEnemy> enemies, killedEnemies;
private List<Shot> heroShots, enemyShots, shotsToRemove;
private EnemyFactory enemyFactory;
private float elapsed = 0;
private Background bg1,bg2;
private OverHeatBar overheatbar;
public GameScreen(MyGdxGame game) {
super(game);
}
@Override
public void show() {
loadTextures();
controller = new HeroController(hero);
enemies = new ArrayList<AbstractEnemy>();
killedEnemies = new ArrayList<AbstractEnemy>();
heroShots = new ArrayList<Shot>();
enemyShots = new ArrayList<Shot>();
shotsToRemove = new ArrayList<Shot>();
enemyFactory = EnemyFactory.getInstance();
Gdx.input.setInputProcessor(controller);
Services.setSoundManager(new SoundManager());
}
private void loadTextures() {
hero = new Hero(5, Sizes.DEFAULT_WORLD_HEIGHT / 2 + Sizes.SHIP_HEIGHT / 2, Textures.HERO);
overlay = new NavigationOverlay(Textures.OVERLAY_SPRITE);
bg1 = new Background(new TextureRegion(Textures.BACKGROUND_STARS),0,0,Sizes.DEFAULT_WORLD_WIDTH,Sizes.DEFAULT_WORLD_HEIGHT);
bg2 = new Background(new TextureRegion(Textures.BACKGROUND_STARS),bg1.getWidth(),0,Sizes.DEFAULT_WORLD_WIDTH,Sizes.DEFAULT_WORLD_HEIGHT);
overheatbar = OverHeatBar.getInstance();
//TODO create one wide file for background and move with textureregion?
}
@Override
public void render(float delta) {
elapsed += delta;
drawGame(delta);
//hero stuff
hero.move(delta);
heroShots.addAll(hero.shoot(delta));
heroSuffering();
killEnemies();
enemies.addAll(enemyFactory.dropEnemy(delta, elapsed));
computeEnemyMovements(delta);
enemies.addAll(enemyFactory.dropEnemy(delta, elapsed));
controller.update(delta);
updateShots();
}
private void drawGame(float delta) {
Gdx.gl.glClearColor(0f, 0f, 0f, 0);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
batch.begin();
bg1.draw(batch,delta, elapsed,ppuX,ppuY); // draw Background
bg2.draw(batch,delta, elapsed,ppuX,ppuY); // draw Background
hero.draw(batch,delta, elapsed,ppuX,ppuY);
overheatbar.draw(batch,delta, elapsed,ppuX,ppuY);
for(AbstractEnemy enemy : enemies)
{
enemy.move(delta);//TODO remove out of view enemies
}
for(AbstractEnemy enemy : enemies)
{
enemy.draw(batch, delta, elapsed, ppuX, ppuY);
}
drawShots(delta);
// start overlay is displayed 5 sec
if(showOverlay)
{
// start overlay is displayed 5 sec
batch.draw(overlay.getTexture(NavigationOverlay.START), ppuX * overlay.x, ppuY * overlay.y, ppuX * overlay.width, ppuY * overlay.height);
if (elapsed >= 5)
{
enemyFactory.setDropEnemies(true);
showOverlay = false;
}
} else {
batch.draw(overlay.getTexture(NavigationOverlay.GAME), ppuX * overlay.x, ppuY * overlay.y, ppuX * overlay.width, ppuY * overlay.height);
}
batch.end();
}
private void drawShots(float delta)
{
for (Shot shot : heroShots) {
shot.draw(batch, delta, elapsed, ppuX, ppuY);
if (shot.shouldBeRemoved()) {
shotsToRemove.add(shot);
}
}
for (Shot shot : enemyShots) {
shot.draw(batch, delta, elapsed, ppuX, ppuY);
if (shot.shouldBeRemoved()) {
shotsToRemove.add(shot);
}
}
}
@Override
public void resize(int width, int height) {
super.resize(width, height);
controller.resize(width, height);
ppuX = (float) width / Sizes.DEFAULT_WORLD_WIDTH;
ppuY = (float) height / Sizes.DEFAULT_WORLD_HEIGHT;
}
private void heroSuffering() {
for(Shot shot : enemyShots)
{
if(shot.overlaps(hero))
{
if(hero.lowerHealth(shot.getDamage())){
//TODO gameover screen... hero suffered too much :'(
}
}
}
}
private void computeEnemyMovements(float delta) {
for(AbstractEnemy enemy : enemies)
{
if(enemy.move(delta))
killedEnemies.add(enemy);
}
killEnemies();
enemies.removeAll(killedEnemies);
killedEnemies.clear();
}
private void killEnemies() {
for(Shot shot : heroShots)
{
for(AbstractEnemy enemy : enemies)
if(shot.overlaps(enemy))
{
if(enemy.lowerHealth(shot.getDamage())){
//TODO enemy is dead... loot him!!! (point berechnung)
// enemy.getBasePoints();
killedEnemies.add(enemy);
}
shotsToRemove.add(shot);
}
}
enemies.removeAll(killedEnemies);
killedEnemies.clear();
}
private void updateShots() {
heroShots.removeAll(shotsToRemove);
enemyShots.removeAll(shotsToRemove);
shotsToRemove.clear();
}
@Override
public void hide() {}
@Override
public void pause() {}
@Override
public void resume() {}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
413f8737b267d23aa9c54b31aaf4134b41dfd2fa
|
2d02a3a650cb4ce2425858c1d3ef2dfd294c6cd7
|
/src/main/java/com/mycompany/filmgo/config/ApplicationProperties.java
|
e6e253b06e09c8485f2338c9659ecae7f2de0047
|
[] |
no_license
|
jslowbro/filmgo
|
6c1f65ed3cfb93b3e5aa0e427ae7326bc4c1ad90
|
47441f0cba46ae2d9b22daf1b566943eab7f99ed
|
refs/heads/master
| 2022-09-03T07:31:51.721245
| 2020-05-29T08:20:20
| 2020-05-29T08:20:20
| 267,804,620
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 426
|
java
|
package com.mycompany.filmgo.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Properties specific to Filmgo.
* <p>
* Properties are configured in the {@code application.yml} file.
* See {@link io.github.jhipster.config.JHipsterProperties} for a good example.
*/
@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
public class ApplicationProperties {}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
e7e95915b68c8d9d04f84d752819d0b8ffce7a8f
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/newEvaluatedBugs/Jsoup_42_buggy/mutated/727/Tokeniser.java
|
164347ff87adb2c172563954cb97ad08a6ee5db1
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,098
|
java
|
package org.jsoup.parser;
import org.jsoup.helper.Validate;
import org.jsoup.nodes.Entities;
import java.util.ArrayList;
import java.util.List;
/**
* Readers the input stream into tokens.
*/
class Tokeniser {
static final char replacementChar = '\uFFFD'; // replaces null character
private CharacterReader reader; // html input
private ParseErrorList errors; // errors found while tokenising
private TokeniserState state = TokeniserState.Data; // current tokenisation state
private Token emitPending; // the token we are about to emit on next read
private boolean isEmitPending = false;
private StringBuilder charBuffer = new StringBuilder(); // buffers characters to output as one token
StringBuilder dataBuffer; // buffers data looking for </script>
Token.Tag tagPending; // tag we are building up
Token.Doctype doctypePending; // doctype building up
Token.Comment commentPending; // comment building up
private Token.StartTag lastStartTag; // the last start tag emitted, to test appropriate end tag
private boolean selfClosingFlagAcknowledged = true;
Tokeniser(CharacterReader reader, ParseErrorList errors) {
this.reader = reader;
this.errors = errors;
}
Token read() {
if (!selfClosingFlagAcknowledged) {
error("Self closing flag not acknowledged");
selfClosingFlagAcknowledged = true;
}
while (!isEmitPending)
state.read(this, reader);
// if emit is pending, a non-character token was found: return any chars in buffer, and leave token for next read:
if (charBuffer.length() > 0) {
String str = charBuffer.toString();
charBuffer.delete(0, charBuffer.length());
return new Token.Character(str);
} else {
isEmitPending = false;
return emitPending;
}
}
void emit(Token token) {
Validate.isFalse(isEmitPending, "There is an unread token pending!");
emitPending = token;
isEmitPending = true;
if (token.type == Token.TokenType.StartTag) {
Token.StartTag startTag = (Token.StartTag) token;
lastStartTag = startTag;
if (startTag.selfClosing)
selfClosingFlagAcknowledged = false;
} else if (token.type == Token.TokenType.EndTag) {
Token.EndTag endTag = (Token.EndTag) token;
if (endTag.attributes.size() > 0)
error("Attributes incorrectly present on end tag");
}
}
void emit(String str) {
// buffer strings up until last string token found, to emit only one token for a run of character refs etc.
// does not set isEmitPending; read checks that
charBuffer.append(str);
}
void emit(char c) {
charBuffer.append(c);
}
TokeniserState getState() {
return state;
}
void transition(TokeniserState state) {
this.state = state;
}
void advanceTransition(TokeniserState state) {
reader.advance();
this.state = state;
}
void acknowledgeSelfClosingFlag() {
selfClosingFlagAcknowledged = true;
}
Character consumeCharacterReference(Character additionalAllowedCharacter, boolean inAttribute) {
if (reader.isEmpty())
return null;
if (additionalAllowedCharacter != null && additionalAllowedCharacter == reader.current())
return null;
if (reader.matchesAny('\t', '\n', '\f', ' ', '<', '&'))
return null;
reader.mark();
if (reader.matchConsume("#")) { // numbered
boolean isHexMode = reader.matchConsumeIgnoreCase("X");
String numRef = isHexMode ? reader.consumeHexSequence() : reader.consumeDigitSequence();
if (numRef.length() == 0) { // didn't match anything
characterReferenceError("numeric reference with no numerals");
reader.rewindToMark();
return null;
}
if (!reader.matchConsume(";"))
characterReferenceError("missing semicolon"); // missing semi
int charval = -1;
try {
int base = isHexMode ? 16 : 10;
charval = Integer.valueOf(numRef, base);
} catch (NumberFormatException e) {
} // skip
if (charval == -1 || (charval >= 0xD800 && charval <= 0xDFFF) || charval > 0x10FFFF) {
characterReferenceError("character outside of valid range");
return replacementChar;
} else {
// todo: implement number replacement table
// todo: check for extra illegal unicode points as parse errors
return (char) charval;
}
} else { // named
// get as many letters as possible, and look for matching entities. unconsume backwards till a match is found
String nameRef = reader.consumeLetterThenDigitSequence();
String origNameRef = new String(nameRef); // for error reporting. nameRef gets chomped looking for matches
boolean looksLegit = reader.matches(';');
boolean found = false;
while (nameRef.length() > 0 && !found) {
if (Entities.isNamedEntity(nameRef))
found = true;
else {
nameRef = nameRef.substring(0, nameRef.length()-1);
reader.unconsume();
}
}
if (!found) {
if (looksLegit) // named with semicolon
characterReferenceError(String.format("invalid named referenece '%s'", origNameRef));
reader.rewindToMark();
return null;
}
if (inAttribute && (reader.matchesLetter() || reader.matchesDigit() || reader.matchesAny('=', '-', '_'))) {
// don't want that to match
reader.rewindToMark();
return null;
}
if (!reader.matchConsume(";"))
characterReferenceError("missing semicolon"); // missing semi
return Entities.getCharacterByName(nameRef);
}
}
Token.Tag createTagPending(boolean start) {
tagPending = start ? new Token.StartTag() : new Token.EndTag();
return tagPending;
}
void emitTagPending() {
tagPending.finaliseTag();
emit(tagPending);
}
void createCommentPending() {
commentPending = new Token.Comment();
}
void emitCommentPending() {
emit(commentPending);
}
void createDoctypePending() {
doctypePending = new Token.Doctype();
}
void emitDoctypePending() {
emit(doctypePending);
}
void createTempBuffer() {
charBuffer = new StringBuilder();
}
boolean isAppropriateEndTagToken() {
return tagPending.tagName.equals(lastStartTag.tagName);
}
String appropriateEndTagName() {
return lastStartTag.tagName;
}
void error(TokeniserState state) {
if (errors.canAddError())
errors.add(new ParseError(reader.pos(), "Unexpected character '%s' in input state [%s]", reader.current(), state));
}
void eofError(TokeniserState state) {
if (errors.canAddError())
errors.add(new ParseError(reader.pos(), "Unexpectedly reached end of file (EOF) in input state [%s]", state));
}
private void characterReferenceError(String message) {
if (errors.canAddError())
errors.add(new ParseError(reader.pos(), "Invalid character reference: %s", message));
}
private void error(String errorMsg) {
if (errors.canAddError())
errors.add(new ParseError(reader.pos(), errorMsg));
}
boolean currentNodeInHtmlNS() {
// todo: implememnt namespaces correctly
return true;
// Element currentNode = currentNode();
// return currentNode != null && currentNode.namespace().equals("HTML");
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
490ac26488d292f46f36c716a9f0f9972f7b6ce0
|
2d93c27772c7e51d51ec05d6e7621a22a5eb6db6
|
/app/src/main/java/com/tyiroad/tyiroad/yjbs/YsbsPopowindow.java
|
9911d31e757d8e19de5638560a229016ac6b6bc6
|
[] |
no_license
|
zhangchengku/TYiroad
|
75e2e91e49910d3d0b9de26b780a3e4e5c2c87f6
|
03b26598fc9f3beb217e43ccaa614a39fb6a4ca2
|
refs/heads/master
| 2022-02-26T00:12:21.298317
| 2019-08-26T08:33:07
| 2019-08-26T08:33:07
| 198,362,292
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,473
|
java
|
package com.tyiroad.tyiroad.yjbs;
/**
* Created by 张成昆 on 2019-5-21.
*/
import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;
import com.tooklkit.Tooklkit;
import com.tyiroad.tyiroad.R;
import com.tyiroad.tyiroad.popuwindo.EditSearchAdapter;
import com.tyiroad.tyiroad.utils.DiseaseNewSelectObjectListener;
import com.tyiroad.tyiroad.utils.Utils;
import java.util.ArrayList;
import java.util.ArrayList;
public class YsbsPopowindow extends PopupWindow {
private Activity activity;
private ArrayList<String> listDataStr;
private ListView listView;
private TextView vTitleTxt;
private EditSearchAdapter adapter;
private DiseaseNewSelectObjectListener listener;
private String titleStr;
public YsbsPopowindow(Activity activity, String titleStr, ArrayList<String> listDataStr, DiseaseNewSelectObjectListener listener){
this.activity = activity;
this.listDataStr=listDataStr;
this.listener=listener;
this.titleStr=titleStr;
View contentView = LayoutInflater.from(activity).inflate(
R.layout.disease_new_sel_obj_pop, null);
setContentView(contentView);
setWidth(Tooklkit.getWidth(activity)- Tooklkit.dip2px(activity,25));
setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
setFocusable(true);
setTouchable(true);
setOutsideTouchable(true);
setBackgroundDrawable(new ColorDrawable(0));
setAnimationStyle(R.style.mypopwindow_anim_style);
initViews(contentView);
}
private void initViews(View contentView){
vTitleTxt=(TextView)contentView.findViewById(R.id.disease_new_sel_obj_title_txt);
listView=contentView.findViewById(R.id.disease_new_sel_obj_list);
adapter=new EditSearchAdapter(activity,listDataStr);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
listener.selectPosition(position);
close();
}
});
if(!Utils.isNull(titleStr)){
vTitleTxt.setVisibility(View.VISIBLE);
vTitleTxt.setText(titleStr);
}else{
vTitleTxt.setVisibility(View.GONE);
}
setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
if(activity instanceof YjbsActivity){
((YjbsActivity)activity).hideZheZhaoView();
}
}
});
}
/**
* 显示筛选窗口
*/
public void show(View anchor) {
if (isShowing()) {
return;
}
if (anchor != null) {
showAtLocation(anchor, Gravity.BOTTOM, 0, 0);
}
if (activity instanceof YjbsActivity) {
((YjbsActivity)activity).showZheZhaoView();
}
}
/**
* 关闭筛选窗口
*/
public void close() {
if (isShowing()) {
dismiss();
}
}
public void notifityData(){
adapter.notifyDataSetChanged();
}
}
|
[
"13552008150@163.com"
] |
13552008150@163.com
|
17fe47ba507741fb82fe51503aff5ed1dd54dda4
|
82019dbd61bc71dafb60baeb736e3733fb4ffd4a
|
/src/Java0513/ex07_reverseStar.java
|
2c602572132c3841d6a639353a553aefb0804d07
|
[] |
no_license
|
ohr5446/Java
|
969c78eada08dd39d426f80dde90a97ab4fcc532
|
a3984726f51b17fcc477e630f84fd95ef93c2337
|
refs/heads/master
| 2022-12-28T05:04:59.594896
| 2020-10-13T10:00:50
| 2020-10-13T10:00:50
| 263,823,119
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 352
|
java
|
/*
Date : 2020.05.13
Author : HyeongRok
Description : reverseStar
Version : 1.3
*/
package Java0513;
public class ex07_reverseStar {
public static void main(String[] args) {
for (int i = 1; i <= 5; i++) {
for (int j = 5; j >= i; j--) {
System.out.print("*");
}
System.out.println();
}
}
}
|
[
"1@1-PC"
] |
1@1-PC
|
7d0d01f0021c671c9bc7ff7387e96b8272078116
|
2a662cfdf91e0cded6b9d272cbcea8a2d4377d4c
|
/Matrix Client/src/main/java/com/jagex/Class298_Sub32_Sub12.java
|
6dfd28113ed6c20d0708354b3083e10b0d15d217
|
[] |
no_license
|
primnoprotogen/718_RS_Build
|
38293df71eb08d0cc64bce5e19cc64b46172463a
|
84ddd7138d8ea7dede51814e62868696932ec303
|
refs/heads/master
| 2023-04-04T04:21:25.263022
| 2021-04-20T22:17:11
| 2021-04-20T22:17:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
package com.jagex;/* Class298_Sub32_Sub12 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
public class Class298_Sub32_Sub12 extends Class298_Sub32 {
int[] method3209(int i) {
return Class250.anIntArray2762;
}
public Class298_Sub32_Sub12() {
super(0, true);
}
int[] method3210(int i) {
return Class250.anIntArray2762;
}
int[] method3131(int i, int i_0_) {
try {
return Class250.anIntArray2762;
} catch (RuntimeException runtimeexception) {
throw Class346.method4175(runtimeexception, new StringBuilder()
.append("aha.i(").append(')').toString());
}
}
}
|
[
"jesseguerrero1991@gmail.com"
] |
jesseguerrero1991@gmail.com
|
4331f3611ad41ffc9c0b480a3716b8e05555b483
|
586dad5a6d6313896ba275b8ee5b2dea302c4148
|
/freetuts-backend/src/main/java/net/freetuts/backend/security/JwtAuthenticationEntryPoint.java
|
5b31b72619a7453ee1fb4a9caa186dede23ab50a
|
[] |
no_license
|
phatnt99/thuctap
|
4cffb0dfae72edba78f4f86de000800afcd0f395
|
21e36b26855d770f47de0b45312e459eedf5f886
|
refs/heads/main
| 2023-09-01T09:18:40.429289
| 2021-10-15T04:26:34
| 2021-10-15T04:26:34
| 381,909,809
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,524
|
java
|
package net.freetuts.backend.security;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.freetuts.backend.exception.ExceptionResponse;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.Http403ForbiddenEntryPoint;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
@Component
public class JwtAuthenticationEntryPoint extends Http403ForbiddenEntryPoint {
@Autowired
private ObjectMapper mapper;
@Override
public void commence(HttpServletRequest request,
HttpServletResponse response, AuthenticationException exception)
throws IOException {
ExceptionResponse httpResponse = new ExceptionResponse();
httpResponse.setTimestamp(new Date());
httpResponse.setStatus(FORBIDDEN.value());
httpResponse.setError(FORBIDDEN.getReasonPhrase());
httpResponse.setMessage(SecurityConstant.FORBIDDEN_MESSAGE);
response.setContentType(APPLICATION_JSON_VALUE);
response.setStatus(FORBIDDEN.value());
response.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.print(mapper.writeValueAsString(httpResponse));
out.flush();
}
}
|
[
"phatnguyen2499@gmail.com"
] |
phatnguyen2499@gmail.com
|
8c3ed072da8bddbea3d0045968f8af781ed548f3
|
6c52903f326b43f5339b18b1525a6623a4f9de0f
|
/src/leetcode/datastructure/tree/ValidateBinaryTreeNodes1361.java
|
98865202c5bf31f370cc4981dcb8476d7183ea78
|
[] |
no_license
|
underwindfall/Algorithme
|
19f31710cc2a6bf2f4e3f0652225c7ab8858e5ac
|
2284b7791c99354a3132366131290e2f37aae6dc
|
refs/heads/master
| 2022-10-17T14:25:52.815940
| 2022-09-29T08:32:20
| 2022-09-29T08:32:20
| 203,821,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,511
|
java
|
package leetcode.datastructure.tree;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;
// https://leetcode.cn/problems/validate-binary-tree-nodes/
public class ValidateBinaryTreeNodes1361 {
/**
* 查找入度为0的节点
* 即root点 可能会有多个 如果有多个就不是二叉树
* 然后再判断连通性 用广搜统计每个节点遍历的情况 如果一个节点遍历次数为0或者大于1则都不是二叉树
* 此时也算是对有两个root的情况下做了判断 因为只遍历一个root 另一个节点的访问次数肯定为0
* leftChild[i]=j 表明i节点指向j
*/
public boolean validateBinaryTreeNodes(int n, int[] leftChild, int[] rightChild) {
int[] in = new int[n];// 记录每个节点的入度
for (int i = 0; i < n; i++) {
if (leftChild[i] != -1)
in[leftChild[i]]++;
if (rightChild[i] != -1)
in[rightChild[i]]++;
}
int root = -1;// 看看根节点是哪个
for (int i = 0; i < n; i++) {
if (in[i] == 0) {
root = i;
break;
}
}
if (root == -1) {
// 没有入度为0的 也就是没有根节点
return false;
}
// 开始广搜
Queue<Integer> queue = new LinkedList<>();
Set<Integer> set = new HashSet<>();// 记录访问过的节点 如果有重复说明不是二叉树
queue.offer(root);
set.add(root);
while (!queue.isEmpty()) {
int temp = queue.poll();
if (leftChild[temp] != -1) {
// 左子树不为空
if (set.contains(leftChild[temp])) {
// 左子节点 被访问过
return false;
}
queue.offer(leftChild[temp]);
set.add(leftChild[temp]);
}
if (rightChild[temp] != -1) {
// 右子树不为空
if (set.contains(rightChild[temp])) {
// 有子节点 被访问过
return false;
}
queue.offer(rightChild[temp]);
set.add(rightChild[temp]);
}
}
// 如果set里节点数量就为n那么说明全部节点被访问 因为上面有重复的已经判断了 只剩下没访问的没判断
return set.size() == n;
}
}
|
[
"14819756+underwindfall@users.noreply.github.com"
] |
14819756+underwindfall@users.noreply.github.com
|
01dc6213270a92ebfa1fe8612d0aa9f45affea21
|
c416e00dc55710c18b94eab0800a7b4bf40d05e1
|
/app/src/main/java/com/example/win7/ytdemo/activity/JiankongActivity.java
|
3415a55fd42ca65576a81d4e0ef4d9d67a843178
|
[] |
no_license
|
AndyYan1010/yuetong
|
f71d13d41b2975e5ee17b9736bb9c46f7c5eae61
|
c67aa052fb021d3751c40b5d5f213a61a011b966
|
refs/heads/master
| 2020-03-10T05:34:27.552963
| 2018-04-12T07:49:11
| 2018-04-12T07:49:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,172
|
java
|
package com.example.win7.ytdemo.activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import com.example.win7.ytdemo.R;
public class JiankongActivity extends AppCompatActivity {
Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jiankong);
setTool();
setViews();
setListeners();
}
protected void setTool(){
toolbar = (Toolbar)findViewById(R.id.id_toolbar);
toolbar.setTitle(getResources().getString(R.string.jiankong));
toolbar.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(android.R.drawable.ic_menu_revert);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
protected void setViews(){
}
protected void setListeners(){
}
}
|
[
"794429910@qq.com"
] |
794429910@qq.com
|
ef98310dd3d407e16bcfe942bcff5c13cdad7732
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/android/contentframework/viewcomponents/viewmodels/StoryCreationPickTripRowEpoxyModel.java
|
b1f6ec1b9bb6826c8249e912c25028f2df44b21a
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 968
|
java
|
package com.airbnb.android.contentframework.viewcomponents.viewmodels;
import android.view.View.OnClickListener;
import com.airbnb.android.contentframework.views.StoryCreationPickTripRowView;
import com.airbnb.android.core.models.Reservation;
import com.airbnb.p027n2.epoxy.AirEpoxyModel;
public abstract class StoryCreationPickTripRowEpoxyModel extends AirEpoxyModel<StoryCreationPickTripRowView> {
OnClickListener clickListener;
Reservation reservation;
public void bind(StoryCreationPickTripRowView view) {
super.bind(view);
view.setImageUrl(this.reservation.getCityPhotoUrl());
view.setTitle(this.reservation.getListing().getLocation());
view.setSubtitle(this.reservation.getStartDate().getDateString(view.getContext()));
view.setOnClickListener(this.clickListener);
}
public void unbind(StoryCreationPickTripRowView view) {
super.unbind(view);
view.setOnClickListener(null);
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
0ac5265fe9a800c191ef9cc0cc4bd4fb32d2444f
|
7a18eea9ccc603ef2cae895d7822eb65f94c9d56
|
/app/src/main/java/com/example/android/abstract_mediator/WulinAlliance.java
|
99cc86459eff9f3a6812b630b8e2cebdcceeca48
|
[] |
no_license
|
wangchao1994/AndroidDesighPattern
|
09e53aaf992e88897f5a96168aedbe5b7f5dd518
|
298ed7eaa7213e58902f47a4006873059fbe69fc
|
refs/heads/master
| 2020-06-11T01:05:17.309197
| 2019-06-26T08:35:05
| 2019-06-26T08:35:05
| 193,811,511
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 185
|
java
|
package com.example.android.abstract_mediator;
/**
* 抽象中介者父类
*/
public abstract class WulinAlliance {
public abstract void notice(String message, United united);
}
|
[
"wchao0829@163.com"
] |
wchao0829@163.com
|
c5c399312f9353e7a20479f966c3e2aab0da530c
|
eeab78a90a2ca993f26fe4e00923d6a2426c9c98
|
/e3-search/e3-search-service/src/main/java/guo/ping/e3mall/search/message/ItemAddMessageReceiver.java
|
878a2a4e608ebe1e6a2154e9a5a3f32f3ca99fa5
|
[] |
no_license
|
wjpit1990/e3-springboot
|
3dabfbd2c41b18cd57f235af1eb93d90cc6133e3
|
c442606c7e99e2a6ef18847a4f1c72d03448927c
|
refs/heads/master
| 2020-05-09T09:49:39.622799
| 2019-03-05T06:41:39
| 2019-03-05T06:41:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,018
|
java
|
package guo.ping.e3mall.search.message;
import guo.ping.e3mall.common.pojo.SearchItem;
import guo.ping.e3mall.search.mapper.SearchItemMapper;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.common.SolrInputDocument;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;
import java.io.IOException;
@Component
public class ItemAddMessageReceiver {
@Autowired
private SearchItemMapper searchItemMapper;
@Autowired
private SolrClient solrClient;
@JmsListener(destination = "itemAddTopic", containerFactory = "jmsTopicListenerContainerFactory")
public void itemAddReceiver(Long msg) {
try {
// 0、等待1s让e3-manager-service提交完事务,商品添加成功
Thread.sleep(1000);
// 1、根据商品id查询商品信息
SearchItem searchItem = searchItemMapper.getItemById(msg);
// 2、创建一SolrInputDocument对象。
SolrInputDocument document = new SolrInputDocument();
// 3、使用SolrServer对象写入索引库。
document.addField("id", searchItem.getId());
document.addField("item_title", searchItem.getTitle());
document.addField("item_sell_point", searchItem.getSell_point());
document.addField("item_price", searchItem.getPrice());
document.addField("item_image", searchItem.getImage());
document.addField("item_category_name", searchItem.getCategory_name());
// 5、向索引库中添加文档。
solrClient.add(document);
solrClient.commit();
} catch (SolrServerException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"Kingdompin@163.com"
] |
Kingdompin@163.com
|
e4f3304aeffd8ac5552ce544698df37775e7aafc
|
c60f5e9ffefa9c42988e40124fb0849e32ba4df1
|
/hutool-jwt/src/main/java/cn/hutool/jwt/signers/AlgorithmUtil.java
|
a9f6752bb5ea6d28bce73d03e63b009502af9aa0
|
[
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-mulanpsl-2.0-en",
"MulanPSL-2.0"
] |
permissive
|
kingour/hutool
|
421d914930da3a45a3d7f289df02369018a031d8
|
1d85b66be10631671438786e6d051877293409f8
|
refs/heads/v5-master
| 2021-08-18T07:19:41.720943
| 2021-08-13T01:57:41
| 2021-08-13T01:57:41
| 218,266,013
| 0
| 0
|
NOASSERTION
| 2021-08-13T01:57:42
| 2019-10-29T10:56:28
| null |
UTF-8
|
Java
| false
| false
| 2,183
|
java
|
package cn.hutool.jwt.signers;
import cn.hutool.core.map.BiMap;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.crypto.asymmetric.SignAlgorithm;
import cn.hutool.crypto.digest.HmacAlgorithm;
import java.util.HashMap;
/**
* 算法工具类,算法和JWT算法ID对应表
*
* @author looly
* @since 5.7.0
*/
public class AlgorithmUtil {
private static final BiMap<String, String> map;
static {
map = new BiMap<>(new HashMap<>());
map.put("HS256", HmacAlgorithm.HmacSHA256.getValue());
map.put("HS384", HmacAlgorithm.HmacSHA384.getValue());
map.put("HS512", HmacAlgorithm.HmacSHA512.getValue());
map.put("RS256", SignAlgorithm.SHA256withRSA.getValue());
map.put("RS384", SignAlgorithm.SHA384withRSA.getValue());
map.put("RS512", SignAlgorithm.SHA512withRSA.getValue());
map.put("ES256", SignAlgorithm.SHA256withECDSA.getValue());
map.put("ES384", SignAlgorithm.SHA384withECDSA.getValue());
map.put("ES512", SignAlgorithm.SHA512withECDSA.getValue());
map.put("PS256", SignAlgorithm.SHA256withRSA_PSS.getValue());
map.put("PS384", SignAlgorithm.SHA384withRSA_PSS.getValue());
map.put("PS512", SignAlgorithm.SHA512withRSA_PSS.getValue());
}
/**
* 获取算法,用户传入算法ID返回算法名,传入算法名返回本身
* @param idOrAlgorithm 算法ID或算法名
* @return 算法名
*/
public static String getAlgorithm(String idOrAlgorithm){
return ObjectUtil.defaultIfNull(getAlgorithmById(idOrAlgorithm), idOrAlgorithm);
}
/**
* 获取算法ID,用户传入算法名返回ID,传入算法ID返回本身
* @param idOrAlgorithm 算法ID或算法名
* @return 算法ID
*/
public static String getId(String idOrAlgorithm){
return ObjectUtil.defaultIfNull(getIdByAlgorithm(idOrAlgorithm), idOrAlgorithm);
}
/**
* 根据JWT算法ID获取算法
*
* @param id JWT算法ID
* @return 算法
*/
private static String getAlgorithmById(String id) {
return map.get(id.toUpperCase());
}
/**
* 根据算法获取JWT算法ID
*
* @param algorithm 算法
* @return JWT算法ID
*/
private static String getIdByAlgorithm(String algorithm) {
return map.getInverse().get(algorithm);
}
}
|
[
"loolly@gmail.com"
] |
loolly@gmail.com
|
fb08f1066bf04feb60fd7dea2e7204b8b39aa37a
|
798e3563930a7f5098a790d86cba09a53a9030bd
|
/src/com/uas/mobile/controller/common/QueryInfoController.java
|
2f8802eb3c8e52730e9861bfe08743d3207832df
|
[] |
no_license
|
dreamvalley/6.0.0
|
c5cabed6f34cab783df16de9ff6ddfc118b7c4fe
|
12ed81bf7a46a649711bcf654bf9bcafe70054c2
|
refs/heads/master
| 2022-02-17T02:31:57.439726
| 2018-07-25T02:52:27
| 2018-07-25T02:52:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,743
|
java
|
package com.uas.mobile.controller.common;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.uas.mobile.service.QueryInfoService;
@Controller
public class QueryInfoController {
@Autowired
private QueryInfoService queryInfoService;
@RequestMapping("/mobile/qry/getReport.action")
@ResponseBody
public Map<String,Object> getInfoByCode(String emcode,String condition){
Map<String, Object> data = queryInfoService.getInfoByCode(emcode,condition);
return data;
}
@RequestMapping("/mobile/qry/reportCondition.action")
@ResponseBody
public Map<String,Object> getReportCondition(String caller,String title){
Map<String, Object> condition = queryInfoService.getReportCondition(caller,title);
return condition;
}
@RequestMapping("/mobile/qry/queryJsp.action")
@ResponseBody
public Map<String,Object> getQueryJsp(String emcode){
Map<String, Object> map = queryInfoService.getQueryJsp(emcode);
return map;
}
@RequestMapping("/mobile/qry/schemeCondition.action")
@ResponseBody
public Map<String,Object> getSchemeCondition(String caller,String id){
Map<String,Object> map=queryInfoService.getSchemeConditin(caller, id);
return map;
}
@RequestMapping("/mobile/qry/schemeResult.action")
@ResponseBody
public Map<String,Object>getSchemeResult(String caller,Integer id,int pageIndex,int pageSize,String condition){
return queryInfoService.getSchemeResult(caller,id,pageIndex,pageSize,condition);
}
}
|
[
"812669424@qq.com"
] |
812669424@qq.com
|
7a8c9561748a14c4150628141e811251098970f3
|
7ce64c7b3219b4932dcd9fbd2688d06e53c2d980
|
/cocoatouch/src/main/java/org/robovm/cocoatouch/foundation/NSUUID.java
|
26114ca1da3ccd7664a18d4c262e0adc156aac36
|
[
"Apache-2.0"
] |
permissive
|
shannah/robovm
|
d410764a717055c76ec7981bc547b3385692a486
|
17b723a0485cbf0700af9ec55ff3272879c112b3
|
refs/heads/master
| 2021-01-18T08:58:33.598527
| 2013-09-09T19:28:44
| 2013-09-09T19:28:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,847
|
java
|
/*
* Copyright (C) 2012 Trillian AB
*
* 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.robovm.cocoatouch.foundation;
/*<imports>*/
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
/*</imports>*/
/**
*
* <div class="javadoc">
* @see <a href="http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/ObjC_classic/../../../../Foundation/Reference/NSUUID_Class/Reference/Reference.html">NSUUID Class Reference</a>
* @since Available in iOS 6.0 and later.
* </div>
*/
/*<library>*/@Library("Foundation")/*</library>*/
@NativeClass public class /*<name>*/ NSUUID /*</name>*/
extends /*<extends>*/ NSObject /*</extends>*/
/*<implements>*/ /*</implements>*/ {
static {
ObjCRuntime.bind(/*<name>*/ NSUUID /*</name>*/.class);
}
private static final ObjCClass objCClass = ObjCClass.getByType(/*<name>*/ NSUUID /*</name>*/.class);
/*<constructors>*/
protected NSUUID(SkipInit skipInit) { super(skipInit); }
public NSUUID() {}
/*</constructors>*/
/*<properties>*/
/*</properties>*/
/*<methods>*/
/*</methods>*/
/*<callbacks>*/
/*</callbacks>*/
}
|
[
"niklas@therning.org"
] |
niklas@therning.org
|
baf33e17bbb1344a0024d93c428145ab61bcf336
|
adf22b8fea4d94790b10cc77358dca4ce07b31fd
|
/app/src/main/java/com/linkloving/taiwan/logic/UI/HeartRate/DayDatefragment.java
|
c465bc81566bd76889d166ff174f06eb10db242c
|
[] |
no_license
|
shangdinvxu/taiwan
|
eec5ed9cd6b3b3c540f09fba5a2ef42ac1d8c7d1
|
5cbf483d1de1a27e9780add3b389034f0e53adf5
|
refs/heads/master
| 2021-01-22T20:25:38.878891
| 2017-05-06T14:43:28
| 2017-05-06T14:43:28
| 85,319,569
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,501
|
java
|
package com.linkloving.taiwan.logic.UI.HeartRate;
import android.annotation.TargetApi;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.linkloving.taiwan.R;
import com.linkloving.taiwan.utils.ViewUtils.calendar.MonthDateView;
import butterknife.ButterKnife;
/**
* Created by Daniel.Xu on 2016/11/3.
*/
public class DayDatefragment extends Fragment {
public ImageView left_btn ;
public ImageView right_btn;
public MonthDateView monthDateView;
private IDataChangeListener dataChangeListener;
private View view ;
public String date;
private int type = 0;
public void setDataChangeListener(IDataChangeListener dataChangeListener){
this.dataChangeListener = dataChangeListener;
}
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.inflate(R.layout.tw_dayview_fragment, container, false);
LinearLayout totalView = (LinearLayout) view.findViewById(R.id.step_linear_day);
totalView.setPadding(0,200,0,0);
ButterKnife.inject(this, view);
left_btn = (ImageView) view.findViewById(R.id.step_calendar_iv_left);
right_btn = (ImageView) view.findViewById(R.id.step_calendar_iv_right);
monthDateView = (MonthDateView) view.findViewById(R.id.monthDateView);
monthDateView.setDateClick(new MonthDateView.DateClick() {
@TargetApi(Build.VERSION_CODES.M)
@Override
public void onClickOnDate() {
//拼接日期字符串(可以自己定义)
if (monthDateView.getmSelDay()==0){
return ;
}
String checkDate =monthDateView.getmSelYear()+"-"+monthDateView.getmSelMonth()+"-"+monthDateView.getmSelDay();
dataChangeListener.onDataChange(checkDate);
if (type == 0) {
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
DayFragment dayFragment = new DayFragment();
Bundle bundle = new Bundle();
bundle.putString("checkDate", checkDate);
dayFragment.setArguments(bundle);
transaction.replace(R.id.middle_framelayout, dayFragment);
fragmentManager.popBackStack(null,1);
transaction.addToBackStack(null);
transaction.commit();
}
}
});
left_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
type = 1;
monthDateView.onLeftClick();
type = 0;
}
});
right_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
type = 1;
monthDateView.onRightClick();
type = 0;
}
});
return view;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
}
|
[
"997399759@qq.com"
] |
997399759@qq.com
|
471c8dc41642617d336a1d286562e5532160b877
|
e553161c3adba5c1b19914adbacd58f34f27788e
|
/synoptic-ea407ba0a750/src/synoptic/tests/integration/TOMiningPerformanceTests.java
|
9580bb6caea3e4a98b072c4a5ebe4c2788e2c09c
|
[] |
no_license
|
ReedOei/dependent-tests-experiments
|
57daf82d1feb23165651067b7ac004dd74d1e23d
|
9fccc06ec13ff69a1ac8fb2a4dd6f93c89ebd29b
|
refs/heads/master
| 2020-03-20T02:50:59.514767
| 2018-08-23T16:46:01
| 2018-08-23T16:46:01
| 137,126,354
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,210
|
java
|
package synoptic.tests.integration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import synoptic.invariants.miners.ChainWalkingTOInvMiner;
import synoptic.invariants.miners.ITOInvariantMiner;
import synoptic.invariants.miners.TransitiveClosureInvMiner;
import synoptic.main.SynopticMain;
import synoptic.main.parser.ParseException;
import synoptic.main.parser.TraceParser;
import synoptic.model.ChainsTraceGraph;
import synoptic.model.EventNode;
import synoptic.tests.SynopticTest;
@RunWith(value = Parameterized.class)
public class TOMiningPerformanceTests extends SynopticTest {
ITOInvariantMiner miner = null;
int numIterations;
int totalEvents;
int numPartitions;
int numEventTypes;
/**
* Generates parameters for this unit test.
*
* @return The set of parameters to pass to the constructor the unit test.
*/
@Parameters
public static Collection<Object[]> data() {
Object[][] data = new Object[][] {
{ new TransitiveClosureInvMiner(false), 3, 1000, 10, 50 },
{ new TransitiveClosureInvMiner(true), 3, 1000, 10, 50 },
{ new ChainWalkingTOInvMiner(), 3, 10000, 10, 50 } };
return Arrays.asList(data);
}
public TOMiningPerformanceTests(ITOInvariantMiner minerToUse,
int numIterations, int totalEvents, int numPartitions,
int numEventTypes) {
miner = minerToUse;
this.numIterations = numIterations;
this.totalEvents = totalEvents;
this.numPartitions = numPartitions;
this.numEventTypes = numEventTypes;
}
@Before
public void setUp() throws ParseException {
super.setUp();
SynopticMain syn = synoptic.main.SynopticMain
.getInstanceWithExistenceCheck();
syn.options.logLvlExtraVerbose = false;
syn.options.logLvlQuiet = true;
}
public void reportTime(long msTime) {
System.out.println(testName.getMethodName() + ":" + "\n\ttotalEvents "
+ totalEvents + "\n\tnumPartitions " + numPartitions
+ "\n\tnumEventTypes " + numEventTypes + "\n\t==> TIME: "
+ msTime + "ms (averaged over " + numIterations
+ " iterations)\n");
}
@Test
public void mineInvariantsPerfTest() throws Exception {
long total_delta = 0;
long delta = 0;
for (int iter = 0; iter < numIterations; iter++) {
TraceParser parser = new TraceParser();
parser.addRegex("^(?<TYPE>)$");
parser.addPartitionsSeparator("^--$");
// //////
long startTime = System.currentTimeMillis();
String[] traces = partitionTrace(structure1Trace());
delta = System.currentTimeMillis() - startTime;
// ////////
System.out
.println("Done with generating trace in: " + delta + "ms");
// //////
startTime = System.currentTimeMillis();
ArrayList<EventNode> parsedEvents = parseLogEvents(traces, parser);
delta = System.currentTimeMillis() - startTime;
// ////////
System.out.println("Done with parsing trace in: " + delta + "ms");
// //////
startTime = System.currentTimeMillis();
ChainsTraceGraph inputGraph = parser
.generateDirectTORelation(parsedEvents);
delta = System.currentTimeMillis() - startTime;
// ////////
System.out.println("Done with generateDirectTemporalRelation in: "
+ delta + "ms");
System.out.println("Starting mining..");
// /////////////
startTime = System.currentTimeMillis();
miner.computeInvariants(inputGraph, false);
total_delta += System.currentTimeMillis() - startTime;
// /////////////
}
delta = total_delta / numIterations;
reportTime(delta);
}
private String[] structure1Trace() {
String[] trace = new String[totalEvents];
for (int i = 0; i < totalEvents; i++) {
trace[i] = "" + i % numEventTypes;
}
return trace;
}
private String[] partitionTrace(String[] trace) {
if (trace.length % numPartitions != 0) {
throw new IllegalArgumentException(
"Cannot evenly divide trace into partitions");
}
int perPartition = trace.length / numPartitions;
String[] partitioned = new String[trace.length + numPartitions - 1];
int inPartCnt = 0;
int j = 0;
for (int i = 0; i < trace.length; i++) {
partitioned[j] = trace[i];
if (inPartCnt == perPartition) {
partitioned[j + 1] = "--";
j += 2;
inPartCnt = 0;
continue;
}
j++;
inPartCnt += 1;
}
return partitioned;
}
}
|
[
"oei.reed@gmail.com"
] |
oei.reed@gmail.com
|
7391d81c0ca354478211d1024369a8365cfb2f2c
|
8d5e1f1dc8348560c401922f8cbb72e03bc04394
|
/app/build/generated/source/apt/debug/talex/zsw/baseproject/activity/ScrollerNumberPickerActivity$$ViewBinder.java
|
06655d4b8399fb9b44d540021c5f6f4715254d8c
|
[] |
no_license
|
luyulove001/BaseLibrary-master
|
7d5f9ec16b1bbd30fab4e971d0a6ed93bb9f24c4
|
5338a1f02b66646d0bfdca43ea2a4705ceb93c90
|
refs/heads/master
| 2021-01-21T19:40:05.968511
| 2017-06-06T08:27:47
| 2017-06-06T08:28:14
| 92,149,283
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,234
|
java
|
// Generated code from Butter Knife. Do not modify!
package talex.zsw.baseproject.activity;
import android.view.View;
import butterknife.ButterKnife.Finder;
import butterknife.ButterKnife.ViewBinder;
public class ScrollerNumberPickerActivity$$ViewBinder<T extends talex.zsw.baseproject.activity.ScrollerNumberPickerActivity> implements ViewBinder<T> {
@Override public void bind(final Finder finder, final T target, Object source) {
View view;
view = finder.findRequiredView(source, 2131427660, "field 'mPicker1'");
target.mPicker1 = finder.castView(view, 2131427660, "field 'mPicker1'");
view = finder.findRequiredView(source, 2131427661, "field 'mPicker2'");
target.mPicker2 = finder.castView(view, 2131427661, "field 'mPicker2'");
view = finder.findRequiredView(source, 2131427662, "field 'mPicker3'");
target.mPicker3 = finder.castView(view, 2131427662, "field 'mPicker3'");
view = finder.findRequiredView(source, 2131427558, "field 'mTextView'");
target.mTextView = finder.castView(view, 2131427558, "field 'mTextView'");
}
@Override public void unbind(T target) {
target.mPicker1 = null;
target.mPicker2 = null;
target.mPicker3 = null;
target.mTextView = null;
}
}
|
[
"540302096@qq.com"
] |
540302096@qq.com
|
411b6300576280bcc9cfdf29f106a0ebe4dc2c90
|
f2d85e3f5d6dcac0a7b18cbfef6d6b7c62ab570a
|
/rdma-based-storm/storm-core/src/jvm/org/apache/storm/utils/ShellBoltMessageQueue.java
|
33505f7e2d30d256a793bd00d11869affb9c6a10
|
[
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-1.0-or-later"
] |
permissive
|
dke-knu/i2am
|
82bb3cf07845819960f1537a18155541a1eb79eb
|
0548696b08ef0104b0c4e6dec79c25300639df04
|
refs/heads/master
| 2023-07-20T01:30:07.029252
| 2023-07-07T02:00:59
| 2023-07-07T02:00:59
| 71,136,202
| 8
| 14
|
Apache-2.0
| 2023-07-07T02:00:31
| 2016-10-17T12:29:48
|
Java
|
UTF-8
|
Java
| false
| false
| 4,249
|
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.storm.utils;
import org.apache.storm.multilang.BoltMsg;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
/**
* A data structure for ShellBolt which includes two queues (FIFO),
* which one is for task ids (unbounded), another one is for bolt msg (bounded).
*/
public class ShellBoltMessageQueue implements Serializable {
private final LinkedList<List<Integer>> taskIdsQueue = new LinkedList<>();
private final LinkedBlockingQueue<BoltMsg> boltMsgQueue;
private final ReentrantLock takeLock = new ReentrantLock();
private final Condition notEmpty = takeLock.newCondition();
public ShellBoltMessageQueue(int boltMsgCapacity) {
if (boltMsgCapacity <= 0) {
throw new IllegalArgumentException();
}
this.boltMsgQueue = new LinkedBlockingQueue<>(boltMsgCapacity);
}
public ShellBoltMessageQueue() {
this(Integer.MAX_VALUE);
}
/**
* put list of task id to its queue
* @param taskIds task ids that received the tuples
*/
public void putTaskIds(List<Integer> taskIds) {
takeLock.lock();
try {
taskIdsQueue.add(taskIds);
notEmpty.signal();
} finally {
takeLock.unlock();
}
}
/**
* put bolt message to its queue
* @param boltMsg BoltMsg to pass to subprocess
* @throws InterruptedException
*/
public void putBoltMsg(BoltMsg boltMsg) throws InterruptedException {
boltMsgQueue.put(boltMsg);
takeLock.lock();
try {
notEmpty.signal();
} finally {
takeLock.unlock();
}
}
/**
* poll() is a core feature of ShellBoltMessageQueue.
* It retrieves and removes the head of one queues, waiting up to the
* specified wait time if necessary for an element to become available.
* There's priority that what queue it retrieves first, taskIds is higher than boltMsgQueue.
*
* @param timeout how long to wait before giving up, in units of unit
* @param unit a TimeUnit determining how to interpret the timeout parameter
* @return List\<Integer\> if task id is available,
* BoltMsg if task id is not available but bolt message is available,
* null if the specified waiting time elapses before an element is available.
* @throws InterruptedException
*/
public Object poll(long timeout, TimeUnit unit) throws InterruptedException {
takeLock.lockInterruptibly();
long nanos = unit.toNanos(timeout);
try {
// wait for available queue
while (taskIdsQueue.peek() == null && boltMsgQueue.peek() == null) {
if (nanos <= 0) {
return null;
}
nanos = notEmpty.awaitNanos(nanos);
}
// taskIds first
List<Integer> taskIds = taskIdsQueue.peek();
if (taskIds != null) {
taskIds = taskIdsQueue.poll();
return taskIds;
}
// boltMsgQueue should have at least one entry at the moment
return boltMsgQueue.poll();
} finally {
takeLock.unlock();
}
}
}
|
[
"wnghd9999@naver.com"
] |
wnghd9999@naver.com
|
7c23284cf88daa8e276a23240117010d05cca64f
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.systemux-SystemUX/sources/com/google/errorprone/annotations/Immutable.java
|
f6f3377526a2477de24de0bdabf85e266d524b26
|
[] |
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
| 443
|
java
|
package com.google.errorprone.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Inherited
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface Immutable {
String[] containerOf() default {};
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
346175ae56c0c388027ea8353bcd93fa57a80e93
|
b91a7a28c51380504b9ae5a9ea05a753484f6ab4
|
/test/com/atuldwivedi/dsusingjava/stack/StackUsingArrayTest.java
|
520b4a540c9a726f16902d937a1b37c4e5224949
|
[] |
no_license
|
AtulDwivedi/ds-and-algo
|
4cb96ef0976b2917e83ea5e19180a4bd19eb5762
|
b2c93c1db8d96bcf76a7022b351cf325c8c04370
|
refs/heads/master
| 2021-07-18T23:53:58.596172
| 2017-10-27T17:16:23
| 2017-10-27T17:16:23
| 87,726,660
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 684
|
java
|
package com.atuldwivedi.dsusingjava.stack;
import com.atuldwivedi.dsa.ds.stack.StackUsingArray;
public class StackUsingArrayTest {
public static void main(String[] args) {
StackUsingArray stack = new StackUsingArray();
//true
System.out.println(stack.empty());
System.out.println("Added: "+stack.push("Dwivedi"));
System.out.println("Added: "+stack.push("Atul"));
System.out.println("Added: "+stack.push("Anuj"));
System.out.println("Removed: "+stack.pop());
System.out.println("Added: "+stack.push("Amar"));
System.out.println(stack.peek());
//false
System.out.println(stack.empty());
System.out.println(stack.search("Dwivedi"));
}
}
|
[
"er.dwivediatul@gmail.com"
] |
er.dwivediatul@gmail.com
|
1eddb02b0133cc55cbb9956fcc56d3a451c30e1c
|
cec2ba559d91cc99f5be395e081ea1d05a0341ec
|
/vividus-plugin-web-app/src/test/java/org/vividus/ui/web/action/search/LinkUrlPartSearchTests.java
|
78ce1334eb95af25fcac05bf9190a94fb872e2be
|
[
"Apache-2.0"
] |
permissive
|
fireflysvet/vividus
|
66aed830b446272f6aef6c9b06f36a23f63a7ec6
|
00efe48704c26e4002a0b6e43f45b0fc09190c13
|
refs/heads/master
| 2023-04-04T01:20:12.500911
| 2020-08-03T10:42:13
| 2020-08-03T10:42:13
| 285,602,526
| 0
| 1
|
Apache-2.0
| 2020-08-06T15:12:07
| 2020-08-06T15:12:06
| null |
UTF-8
|
Java
| false
| false
| 5,333
|
java
|
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.vividus.ui.web.action.search;
import static com.github.valfirst.slf4jtest.LoggingEvent.info;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
import com.github.valfirst.slf4jtest.TestLogger;
import com.github.valfirst.slf4jtest.TestLoggerFactory;
import com.github.valfirst.slf4jtest.TestLoggerFactoryExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import org.openqa.selenium.By;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.WebElement;
import org.vividus.ui.web.util.LocatorUtil;
@ExtendWith({ MockitoExtension.class, TestLoggerFactoryExtension.class })
class LinkUrlPartSearchTests
{
private static final String HREF = "href";
private static final String URL_PART = "urlPart";
private static final String URL = "url" + URL_PART;
private static final String OTHER_URL = "otherUrl";
private static final By LINK_URL_PART_LOCATOR = By.xpath(".//a[contains (translate(@href,"
+ " 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), \"urlpart\")]");
private static final String LINK_WITH_PART_URL_PATTERN = ".//a[contains(@href, %s)]";
private static final String TOTAL_NUMBER_OF_ELEMENTS = "Total number of elements found {} is equal to {}";
private final TestLogger logger = TestLoggerFactory.getTestLogger(AbstractElementSearchAction.class);
private List<WebElement> webElements;
@Mock
private WebElement webElement;
@Mock
private SearchContext searchContext;
@Mock
private SearchParameters parameters;
@Spy
private LinkUrlPartSearch spy;
@InjectMocks
private LinkUrlPartSearch search;
@BeforeEach
void beforeEach()
{
webElements = new ArrayList<>();
webElements.add(webElement);
}
@Test
void testSearchLinksByUrlPart()
{
assertEquals(webElements, captureFoundElements(true, URL, HREF, URL_PART));
}
@Test
void testSearchLinksByUrlPartCaseInsensitive()
{
assertEquals(webElements, captureFoundElements(false, URL, HREF, URL_PART));
}
@Test
void testSearchLinksByUrlPartNotMatch()
{
assertTrue(captureFoundElements(true, OTHER_URL, HREF, URL_PART).isEmpty());
}
@Test
void testSearchLinksByUrlPartNotMatchCaseInsensitive()
{
assertTrue(captureFoundElements(false, OTHER_URL, HREF, URL_PART).isEmpty());
}
@Test
void testSearchLinksByUrlPartNoHref()
{
when(webElement.getAttribute(HREF)).thenReturn(null);
List<WebElement> foundElements = search.filter(webElements, URL_PART);
assertTrue(foundElements.isEmpty());
}
@Test
void testSearchContextCaseSensitive()
{
when(parameters.getValue()).thenReturn(URL_PART);
search.setCaseSensitiveSearch(true);
spy = Mockito.spy(search);
spy.search(searchContext, parameters);
By locator = LocatorUtil.getXPathLocator(LINK_WITH_PART_URL_PATTERN, URL_PART);
verify(spy).findElements(searchContext, locator, parameters);
assertThat(logger.getLoggingEvents(), equalTo(List.of(info(TOTAL_NUMBER_OF_ELEMENTS, locator, 0))));
}
@Test
void testSearchContextCaseInsensitive()
{
when(parameters.getValue()).thenReturn(URL_PART);
search.setCaseSensitiveSearch(false);
spy = Mockito.spy(search);
spy.search(searchContext, parameters);
verify(spy).findElements(searchContext, LINK_URL_PART_LOCATOR, parameters);
assertThat(logger.getLoggingEvents(),
equalTo(List.of(info(TOTAL_NUMBER_OF_ELEMENTS, LINK_URL_PART_LOCATOR, 0))));
}
@Test
void testSearchContextNull()
{
when(parameters.getValue()).thenReturn(URL_PART);
List<WebElement> foundElements = search.search(null, parameters);
assertTrue(foundElements.isEmpty());
}
private List<WebElement> captureFoundElements(Boolean equals, String url, String actualHref, String currentUrl)
{
search.setCaseSensitiveSearch(equals);
when(webElement.getAttribute(actualHref)).thenReturn(url);
return search.filter(webElements, currentUrl);
}
}
|
[
"valfirst@yandex.ru"
] |
valfirst@yandex.ru
|
78d2db4e71b7a095ceeb448b1173b63f1e55aa45
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/MATE-20_EMUI_11.0.0/src/main/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java
|
7381a5e53ee352cc8798a4d8cc7693b0ec6e5b24
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,768
|
java
|
package com.android.server.webkit;
import android.os.RemoteException;
import android.os.ShellCommand;
import android.webkit.IWebViewUpdateService;
import java.io.PrintWriter;
class WebViewUpdateServiceShellCommand extends ShellCommand {
final IWebViewUpdateService mInterface;
WebViewUpdateServiceShellCommand(IWebViewUpdateService service) {
this.mInterface = service;
}
/* JADX WARNING: Removed duplicated region for block: B:23:0x0045 A[Catch:{ RemoteException -> 0x005d }] */
/* JADX WARNING: Removed duplicated region for block: B:31:0x0058 A[Catch:{ RemoteException -> 0x005d }] */
public int onCommand(String cmd) {
boolean z;
if (cmd == null) {
return handleDefaultCommands(cmd);
}
PrintWriter pw = getOutPrintWriter();
try {
int hashCode = cmd.hashCode();
if (hashCode != -1857752288) {
if (hashCode != -1381305903) {
if (hashCode == 436183515 && cmd.equals("disable-multiprocess")) {
z = true;
if (z) {
return setWebViewImplementation();
}
if (z) {
return enableMultiProcess(true);
}
if (!z) {
return handleDefaultCommands(cmd);
}
return enableMultiProcess(false);
}
} else if (cmd.equals("set-webview-implementation")) {
z = false;
if (z) {
}
}
} else if (cmd.equals("enable-multiprocess")) {
z = true;
if (z) {
}
}
z = true;
if (z) {
}
} catch (RemoteException e) {
pw.println("Remote exception: " + e);
return -1;
}
}
private int setWebViewImplementation() throws RemoteException {
PrintWriter pw = getOutPrintWriter();
String shellChosenPackage = getNextArg();
if (shellChosenPackage == null) {
pw.println("Failed to switch, no PACKAGE provided.");
pw.println("");
helpSetWebViewImplementation();
return 1;
}
String newPackage = this.mInterface.changeProviderAndSetting(shellChosenPackage);
if (shellChosenPackage.equals(newPackage)) {
pw.println("Success");
return 0;
}
pw.println(String.format("Failed to switch to %s, the WebView implementation is now provided by %s.", shellChosenPackage, newPackage));
return 1;
}
private int enableMultiProcess(boolean enable) throws RemoteException {
PrintWriter pw = getOutPrintWriter();
this.mInterface.enableMultiProcess(enable);
pw.println("Success");
return 0;
}
public void helpSetWebViewImplementation() {
PrintWriter pw = getOutPrintWriter();
pw.println(" set-webview-implementation PACKAGE");
pw.println(" Set the WebView implementation to the specified package.");
}
public void onHelp() {
PrintWriter pw = getOutPrintWriter();
pw.println("WebView updater commands:");
pw.println(" help");
pw.println(" Print this help text.");
pw.println("");
helpSetWebViewImplementation();
pw.println(" enable-multiprocess");
pw.println(" Enable multi-process mode for WebView");
pw.println(" disable-multiprocess");
pw.println(" Disable multi-process mode for WebView");
pw.println();
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
1c264a8b656a8e5e8ae38d6dd4e4047cfd57d56c
|
f464830cf9c9e750f56331c778d18c518a1733ce
|
/src/leetCode/_79_单词搜索/test.java
|
b3b64a5eb5065219cde2876f807c82bc9db528b4
|
[] |
no_license
|
scanf-liu/untitled
|
59b21d5af10a0a2f5fc7ebea31e06b8c69933894
|
925dab892ec7d65d38a2913d923d2f5ff32c234e
|
refs/heads/master
| 2023-05-08T14:25:45.304357
| 2021-05-31T09:24:25
| 2021-05-31T09:24:25
| 328,845,043
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,470
|
java
|
package leetCode._79_单词搜索;
/*给定一个二维网格和一个单词,找出该单词是否存在于网格中。
单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母不允许被重复使用。
示例:
board =
[
['A','B','C','E'],
['S','F','C','S'],
['A','D','E','E']
]
给定 word = "ABCCED", 返回 true
给定 word = "SEE", 返回 true
给定 word = "ABCB", 返回 false
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/word-search
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。*/
public class test {
public static void main(String[] args) {
char[][] board = {{'a', 'b', 'a', 'b'}, {'a', 'd', 'a', 'b'}, {'a', 'b', 'a', 'b'}};
System.out.println(Solution.exist(board, "abda"));
}
}
class Solution {
public static boolean exist(char[][] board, String word) {
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board[0].length; j++) {
if (board[i][j] == word.charAt(0)) {
if (dfs(board, word.toCharArray(), i, j, 0) == true) return true;
}
}
}
return false;
}
static boolean dfs(char[][] board, char[] word, int i, int j, int index) {
//边界的判断,如果越界直接返回false。index表示的是查找到字符串word的第几个字符,
//如果这个字符不等于board[i][j],说明验证这个坐标路径是走不通的,直接返回false
if (i >= board.length || i < 0 || j >= board[0].length || j < 0 || board[i][j] != word[index])
return false;
//如果word的每个字符都查找完了,直接返回true
if (index == word.length - 1)
return true;
//把当前坐标的值保存下来,为了在最后复原
char tmp = board[i][j];
//然后修改当前坐标的值
board[i][j] = '.';
//走递归,沿着当前坐标的上下左右4个方向查找
boolean res = dfs(board, word, i + 1, j, index + 1) || dfs(board, word, i - 1, j, index + 1) ||
dfs(board, word, i, j + 1, index + 1) || dfs(board, word, i, j - 1, index + 1);
//递归之后再把当前的坐标复原
board[i][j] = tmp;
return res;
}
}
|
[
"952985202@qq.com"
] |
952985202@qq.com
|
7b199f9c3fbc6385de63fc5faa95b3e0dd9fcb9c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/19/19_512bc3381b96c08d2daecb4ce24af28d1374f174/FileFunction/19_512bc3381b96c08d2daecb4ce24af28d1374f174_FileFunction_t.java
|
79168249b499089da4a92aa8695c672959003db7
|
[] |
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,631
|
java
|
package org.smoothbuild.builtin.file;
import static org.smoothbuild.builtin.file.PathArgValidator.validatedPath;
import org.smoothbuild.builtin.file.err.NoSuchPathError;
import org.smoothbuild.builtin.file.err.PathIsNotAFileError;
import org.smoothbuild.fs.base.FileSystem;
import org.smoothbuild.plugin.api.File;
import org.smoothbuild.plugin.api.Path;
import org.smoothbuild.plugin.api.Required;
import org.smoothbuild.plugin.api.SmoothFunction;
import org.smoothbuild.plugin.internal.SandboxImpl;
import org.smoothbuild.plugin.internal.StoredFile;
public class FileFunction {
public interface Parameters {
@Required
public String path();
}
@SmoothFunction("file")
public static File execute(SandboxImpl sandbox, Parameters params) {
return new Worker(sandbox, params).execute();
}
private static class Worker {
private final SandboxImpl sandbox;
private final Parameters params;
public Worker(SandboxImpl sandbox, Parameters params) {
this.sandbox = sandbox;
this.params = params;
}
public File execute() {
return createFile(validatedPath("path", params.path()));
}
private File createFile(Path path) {
FileSystem fileSystem = sandbox.projectFileSystem();
if (!fileSystem.pathExists(path)) {
sandbox.report(new NoSuchPathError("path", path));
return null;
}
if (fileSystem.pathExistsAndIsDirectory(path)) {
sandbox.report(new PathIsNotAFileError("path", path));
return null;
}
return new StoredFile(fileSystem, path);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
109e75778d3fdb12a921d0e37b0079fba4f3c355
|
dcb64d4a551470dc077b6502a2fe583e78275abc
|
/Fathom_com.brynk.fathom-dex2jar.src/android/support/v4/text/TextDirectionHeuristicCompat.java
|
d404360bfb07fd7caaccf203747da17bfc332fa5
|
[] |
no_license
|
lenjonemcse/Fathom-Drone-Android-App
|
d82799ee3743404dd5d7103152964a2f741b88d3
|
f3e3f0225680323fa9beb05c54c98377f38c1499
|
refs/heads/master
| 2022-01-13T02:10:31.014898
| 2019-07-10T19:42:02
| 2019-07-10T19:42:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 514
|
java
|
package android.support.v4.text;
public abstract interface TextDirectionHeuristicCompat
{
public abstract boolean isRtl(CharSequence paramCharSequence, int paramInt1, int paramInt2);
public abstract boolean isRtl(char[] paramArrayOfChar, int paramInt1, int paramInt2);
}
/* Location: C:\Users\c_jealom1\Documents\Scripts\Android\Fathom_com.brynk.fathom\Fathom_com.brynk.fathom-dex2jar.jar
* Qualified Name: android.support.v4.text.TextDirectionHeuristicCompat
* JD-Core Version: 0.6.0
*/
|
[
"jean-francois.lombardo@exfo.com"
] |
jean-francois.lombardo@exfo.com
|
00ded8bc9a25c849ddc2b8d0dfa61cfe9812b1b6
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/97/186.java
|
dff876f02ebf295c86f7755092e4bcf08393980a
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,450
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int a;
int b;
int c;
int d;
int e;
int f;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
a = n / 100;
if ((n % 100) / 10 == 9)
{
b = 1;
c = 2;
d = 0;
}
else if ((n % 100) / 10 == 8)
{
b = 1;
c = 1;
d = 1;
}
else if ((n % 100) / 10 == 7)
{
b = 1;
c = 1;
d = 0;
}
else if ((n % 100) / 10 == 6)
{
b = 1;
c = 0;
d = 1;
}
else if ((n % 100) / 10 == 5)
{
b = 1;
c = 0;
d = 0;
}
else if ((n % 100) / 10 == 4)
{
b = 0;
c = 2;
d = 0;
}
else if ((n % 100) / 10 == 3)
{
b = 0;
c = 1;
d = 1;
}
else if ((n % 100) / 10 == 2)
{
b = 0;
c = 1;
d = 0;
}
else if ((n % 100) / 10 == 1)
{
b = 0;
c = 0;
d = 1;
}
else if ((n % 100) / 10 == 0)
{
b = 0;
c = 0;
d = 0;
}
if ((n % 10) == 9)
{
e = 1;
f = 4;
}
else if ((n % 10) == 8)
{
e = 1;
f = 3;
}
else if ((n % 10) == 7)
{
e = 1;
f = 2;
}
else if ((n % 10) == 6)
{
e = 1;
f = 1;
}
else if ((n % 10) == 5)
{
e = 1;
f = 0;
}
else if ((n % 10) == 4)
{
e = 0;
f = 4;
}
else if ((n % 10) == 3)
{
e = 0;
f = 3;
}
else if ((n % 10) == 2)
{
e = 0;
f = 2;
}
else if ((n % 10) == 1)
{
e = 0;
f = 1;
}
else if ((n % 10) == 0)
{
e = 0;
f = 0;
}
System.out.printf("%d\n%d\n%d\n%d\n%d\n%d\n",a,b,c,d,e,f);
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
fea5ae2a195e77f51d40ec709aab7086b364a523
|
aae49c4e518bb8cb342044758c205a3e456f2729
|
/GeogebraiOS/javasources/org/geogebra/common/main/AppCompanion.java
|
f0afbc96151187e1519c0df201af5486d05af833
|
[] |
no_license
|
kwangkim/GeogebraiOS
|
00919813240555d1f2da9831de4544f8c2d9776d
|
ca3b9801dd79a889da6cb2fdf24b761841fd3f05
|
refs/heads/master
| 2021-01-18T05:29:52.050694
| 2015-10-04T02:29:03
| 2015-10-04T02:29:03
| 45,118,575
| 4
| 2
| null | 2015-10-28T14:36:32
| 2015-10-28T14:36:31
| null |
UTF-8
|
Java
| false
| false
| 3,512
|
java
|
package org.geogebra.common.main;
import org.geogebra.common.euclidian.EuclidianViewCompanion;
import org.geogebra.common.gui.layout.DockPanel;
import org.geogebra.common.kernel.Kernel;
import org.geogebra.common.kernel.commands.CommandsConstants;
import org.geogebra.common.kernel.geos.GeoElement;
import org.geogebra.common.kernel.kernelND.ViewCreator;
import org.geogebra.common.main.settings.Settings;
/**
*
* @author mathieu
*
* Companion for application
*/
public class AppCompanion {
protected App app;
/**
* Constructor
*
* @param app
* application
*/
public AppCompanion(App app) {
this.app = app;
}
/**
*
* @return new kernel
*/
public Kernel newKernel() {
return new Kernel(app);
}
/**
* return true if commands of this table should be visible in input bar help
* and autocomplete
*
* @param table
* table number, see CommandConstants.TABLE_*
* @return true for visible tables
*/
protected boolean tableVisible(int table) {
return !(table == CommandsConstants.TABLE_CAS
|| table == CommandsConstants.TABLE_3D || table == CommandsConstants.TABLE_ENGLISH);
}
/**
* XML settings for both EVs
*
* @param sb
* string builder
* @param asPreference
* whether we need this for preference XML
*/
public void getEuclidianViewXML(StringBuilder sb, boolean asPreference) {
app.getEuclidianView1().getXML(sb, asPreference);
if (app.hasEuclidianView2EitherShowingOrNot(1)) {
app.getEuclidianView2(1).getXML(sb, asPreference);
}
}
/**
* @param plane
* plane creator
* @param panelSettings
* panel settings
* @return create a new euclidian view for the plane
*/
public EuclidianViewCompanion createEuclidianViewForPlane(
ViewCreator plane, boolean panelSettings) {
return null;
}
/**
* store view creators (for undo)
*/
public void storeViewCreators() {
// used in 3D
}
/**
* recall view creators (for undo)
*/
public void recallViewCreators() {
// used in 3D
}
/**
* reset ids for 2D view created by planes, etc. Used in 3D.
*/
public void resetEuclidianViewForPlaneIds() {
// used in 3D
}
/**
* @return new EuclidianDockPanelForPlane
*/
public DockPanel createEuclidianDockPanelForPlane(int id, String plane) {
return null;
}
/**
*
* @return new settings
*/
public Settings newSettings() {
return new Settings(2);
}
/**
* Update font sizes of all components to match current GUI font size
*/
public void resetFonts() {
app.getFontManager().setFontSize(app.getGUIFontSize());
if (app.euclidianView != null) {
app.euclidianView.updateFonts();
}
if (app.getGuiManager() != null) {
app.getGuiManager().updateFonts();
if (app.hasEuclidianView2(1)) {
app.getEuclidianView2(1).updateFonts();
}
}
}
/**
*
* @return true if some view for plane exists
*/
public boolean hasEuclidianViewForPlane() {
return false;
}
/**
* add to views for plane (if any)
*
* @param geo
* geo
*/
public void addToViewsForPlane(GeoElement geo) {
// implemented in App3DCompanion
}
/**
* remove to views for plane (if any)
*
* @param geo
* geo
*/
public void removeFromViewsForPlane(GeoElement geo) {
// implemented in App3DCompanion
}
}
|
[
"kuoyichun1102@gmail.com"
] |
kuoyichun1102@gmail.com
|
ee0759e06881a9cf8af564a296943ba6b5b81db6
|
14452cc65ad3f8642cc9e7bf687f4e868406dda1
|
/src/main/java/il/ac/bgu/cs/bp/bpjs/execution/tasks/BPEngineTask.java
|
08baa42ea0b9332d98df2939fc21bead4f28f9ce
|
[
"MIT"
] |
permissive
|
potashkeren/BPjs
|
36c1ec52f495842109ec0b6822dc56a72a4f862f
|
3c89a0455d559e3f90badf38719a0b80bc9ae91e
|
refs/heads/master
| 2020-04-03T21:11:08.217849
| 2018-10-17T23:00:41
| 2018-10-17T23:00:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,129
|
java
|
package il.ac.bgu.cs.bp.bpjs.execution.tasks;
import il.ac.bgu.cs.bp.bpjs.model.BProgram;
import il.ac.bgu.cs.bp.bpjs.model.BSyncStatement;
import java.util.concurrent.Callable;
import il.ac.bgu.cs.bp.bpjs.model.BThreadSyncSnapshot;
import il.ac.bgu.cs.bp.bpjs.model.FailedAssertion;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.ContinuationPending;
import org.mozilla.javascript.WrappedException;
/**
* Base interface for a parallel task executed during the execution of a {@link BProgram}.
* @author Michael
*/
public abstract class BPEngineTask implements Callable<BThreadSyncSnapshot>{
/**
* Callback interface for when assertions fail.
*/
public static interface Listener {
public void assertionFailed( FailedAssertion fa );
}
protected final BThreadSyncSnapshot bss;
protected final Listener listener;
BPEngineTask(BThreadSyncSnapshot aBss, Listener aListener) {
listener = aListener;
bss = aBss;
}
abstract BThreadSyncSnapshot callImpl(Context jsContext);
@Override
public BThreadSyncSnapshot call() {
try {
Context jsContext = Context.enter();
return callImpl( jsContext );
} catch (ContinuationPending cbs) {
final BSyncStatement capturedStatement = (BSyncStatement) cbs.getApplicationState();
capturedStatement.setBthread(bss);
return bss.copyWith(cbs.getContinuation(), capturedStatement);
} catch ( WrappedException wfae ) {
if ( wfae.getCause() instanceof FailedAssertionException ) {
FailedAssertionException fae = (FailedAssertionException) wfae.getCause();
FailedAssertion fa = new FailedAssertion( fae.getMessage(), bss.getName() );
listener.assertionFailed( fa );
return null;
} else {
throw wfae;
}
} finally {
if (Context.getCurrentContext() != null) {
Context.exit();
}
}
}
}
|
[
"mich.barsinai@gmail.com"
] |
mich.barsinai@gmail.com
|
31743874bf86f5105b9ec284496c91a349e7fa26
|
de179509b1b53c3753a82b57030fc06bb552d3de
|
/app/src/main/java/com/zongke/hapilolauncher/utils/ViewUtils.java
|
d93026f46894f8ef04d9243dd2215661b090f11f
|
[] |
no_license
|
13767004362/ZongKeLauncher
|
70b79a41cda3db86e43c2cc0689d4d1e285fd717
|
9e901fc9561fcb1841d49f55d7c9b8a9babad81a
|
refs/heads/master
| 2021-05-10T15:07:50.327537
| 2018-04-28T01:47:43
| 2018-04-28T01:47:43
| 118,541,291
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,532
|
java
|
package com.zongke.hapilolauncher.utils;
import android.graphics.Paint;
import android.os.Build;
import android.text.TextUtils;
import android.view.View;
import java.lang.reflect.Field;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by ${xingen} on 2017/6/20.
*/
public class ViewUtils {
/**
* 随机分配一个新的Id
*
* @return
*/
public static int getViewId() {
int viewId;
if (Build.VERSION.SDK_INT < 17) {
//采用View中源码
viewId = generateViewId();
} else {
//采用View中generateViewId()静态方法
viewId = View.generateViewId();
}
return viewId;
}
private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);
/**
* Generate a value suitable for use in {@link #setId(int)}.
* This value will not collide with ID values generated at build time by aapt for R.id.
*
* @return a generated ID value
*/
private static int generateViewId() {
for (; ; ) {
final int result = sNextGeneratedId.get();
// aapt-generated IDs have the high byte nonzero; clamp to the range under that.
int newValue = result + 1;
if (newValue > 0x00FFFFFF) {newValue = 1;} // Roll over to 1, not 0.
if (sNextGeneratedId.compareAndSet(result, newValue)) {
return result;
}
}
}
/**
* 计算字体的高度
*
* @param paint
* @return
*/
public static float calculationDigitalHeight(Paint paint) {
return ((-paint.ascent()) + paint.descent());
}
/**
* 计算字体的长度
* @param paint
* @param text
* @return
*/
public static float calculationDigitalWith(Paint paint, String text) {
return paint.measureText(text);
}
/**
* 检查文本是否为空
* @param msg
* @return
*/
public static boolean isNull(String msg){
return TextUtils.isEmpty(msg);
}
/**
* 反射获取状态栏高度
* @return
*/
public static int getStatusBarHeight(){
int x=0;
try {
Class<?> c = Class.forName("com.android.internal.R$dimen");
Object o = c.newInstance();
Field field = c.getField("status_bar_height");
x = (Integer) field.get(o);
} catch (Exception e) {
e.printStackTrace();
}
return x;
}
}
|
[
"13767004362@163.com"
] |
13767004362@163.com
|
9e8c93afb3a0d36d1939e76dd3a22cfa5fea8e28
|
5049eb5596de23b23026c8ea688f9e9714aba09b
|
/src/test/java/ru/job4j/loop/LeapYearTest.java
|
00c367d26a4aa2d7259f0661a27e65dbe923ea2b
|
[] |
no_license
|
RamonOga/elementary
|
63b85161481d1146f8a10b2b1b6dad4f3aae0b15
|
7c639907eb7c399410068dfa49648641258d8436
|
refs/heads/master
| 2023-01-11T21:29:02.546501
| 2020-11-14T08:14:55
| 2020-11-14T08:14:55
| 305,797,182
| 0
| 0
| null | 2020-11-14T08:15:41
| 2020-10-20T18:20:57
|
Java
|
UTF-8
|
Java
| false
| false
| 707
|
java
|
package ru.job4j.loop;
import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
import ru.job4j.loop.LeapYear;
public class LeapYearTest {
@Test
public void checkYearFalse() {
boolean b = LeapYear.checkYear(2019);
assertThat(b, is(false));
}
@Test
public void checkYearFalse1() {
boolean b = LeapYear.checkYear(1800);
assertThat(b, is(false));
}
@Test
public void checkYearTrue() {
boolean b = LeapYear.checkYear(2020);
assertThat(b, is(true));
}
@Test
public void checkYearTrue1() {
boolean b = LeapYear.checkYear(2000);
assertThat(b, is(true));
}
}
|
[
"roman.sercent@gmail.com"
] |
roman.sercent@gmail.com
|
52dd0d5e5da186e84f6cd9cbf7936ea7a55780bd
|
64f0a73f1f35078d94b1bc229c1ce6e6de565a5f
|
/dataset/Top APKs Java Files/com.greyhound.mobile.consumer-com-iovation-mobile-android-details-a-a.java
|
08d67acfcd5f926c96a5230c3673024501fa2a06
|
[
"MIT"
] |
permissive
|
S2-group/mobilesoft-2020-iam-replication-package
|
40d466184b995d7d0a9ae6e238f35ecfb249ccf0
|
600d790aaea7f1ca663d9c187df3c8760c63eacd
|
refs/heads/master
| 2021-02-15T21:04:20.350121
| 2020-10-05T12:48:52
| 2020-10-05T12:48:52
| 244,930,541
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,272
|
java
|
package com.iovation.mobile.android.details.a;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.location.Location;
import android.location.LocationManager;
import android.provider.Settings.Secure;
import android.provider.Settings.SettingNotFoundException;
import com.iovation.mobile.android.details.c;
import com.iovation.mobile.android.details.j;
import com.iovation.mobile.android.details.k;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class a
implements c
{
private static boolean b = false;
private static Location f;
protected int a = 0;
private Context c;
private long d = 0L;
private com.iovation.mobile.android.details.a.a.a e = new com.iovation.mobile.android.details.a.a.a(this);
public a() {}
public void a(int paramInt)
{
this.a = paramInt;
}
public void a(Context paramContext)
{
((LocationManager)paramContext.getSystemService("location")).removeUpdates(this.e);
}
public void a(Context paramContext, j paramJ)
{
int i = 0;
if (k.a("android.permission.ACCESS_FINE_LOCATION", paramContext))
{
LocationManager localLocationManager = (LocationManager)paramContext.getSystemService("location");
do
{
for (;;)
{
try
{
bool1 = localLocationManager.isProviderEnabled("gps");
try
{
boolean bool2 = localLocationManager.isProviderEnabled("network");
i = bool2;
}
catch (Exception localException2)
{
String str1;
Object localObject;
continue;
String str2 = "gps";
continue;
}
paramJ.a("LSEN", "TRUE");
if ((bool1) && (i == 0))
{
paramJ.a("LSG", "GPS");
str1 = "gps";
if (str1 != null) {
break;
}
return;
}
}
catch (Exception localException1)
{
boolean bool1 = false;
continue;
if ((!bool1) && (i != 0))
{
paramJ.a("LSG", "NET");
localObject = "network";
continue;
}
if ((!bool1) && (i == 0))
{
paramJ.a("LSG", "NONE");
localObject = "gps";
continue;
}
if (!bool1) {
break label334;
}
}
if (i == 0) {
break label334;
}
paramJ.a("LSG", "BOTH");
localObject = "gps";
}
if (f == null) {
f = localLocationManager.getLastKnownLocation((String)localObject);
}
if (f != null) {
break;
}
f = localLocationManager.getLastKnownLocation("network");
} while (f == null);
localObject = b(paramContext);
paramJ.a("LAT", Double.toString(f.getLatitude()));
paramJ.a("LON", Double.toString(f.getLongitude()));
paramJ.a("ALT", Double.toString(f.getAltitude()));
paramJ.a("GLA", Float.toString(f.getAccuracy()));
paramJ.a("GLD", Long.toString(f.getTime()));
paramJ.a("MOCK", Integer.toString(((ArrayList)localObject).size()));
paramJ.a("MLS", Integer.toString(c(paramContext)));
paramJ.a("NMEA", Integer.toString(this.a));
return;
}
paramJ.a("LSEN", "FALSE");
}
public void a(Location paramLocation)
{
f = paramLocation;
if (f.getAccuracy() <= 100.0F) {
a(this.c);
}
}
public ArrayList b(Context paramContext)
{
ArrayList localArrayList = new ArrayList();
PackageManager localPackageManager = paramContext.getPackageManager();
Iterator localIterator = localPackageManager.getInstalledApplications(128).iterator();
for (;;)
{
ApplicationInfo localApplicationInfo;
if (localIterator.hasNext()) {
localApplicationInfo = (ApplicationInfo)localIterator.next();
}
try
{
String[] arrayOfString = localPackageManager.getPackageInfo(localApplicationInfo.packageName, 4096).requestedPermissions;
if (arrayOfString != null)
{
int i = 0;
while (i < arrayOfString.length)
{
if ((arrayOfString[i].equals("android.permission.ACCESS_MOCK_LOCATION")) && (!localApplicationInfo.packageName.equals(paramContext.getPackageName()))) {
localArrayList.add(localApplicationInfo.packageName);
}
i += 1;
}
return localArrayList;
}
}
catch (Exception localException) {}catch (PackageManager.NameNotFoundException localNameNotFoundException) {}
}
}
public int c(Context paramContext)
{
try
{
int i = Settings.Secure.getInt(paramContext.getContentResolver(), "mock_location");
if (i == 1) {
return 1;
}
}
catch (Settings.SettingNotFoundException paramContext)
{
return -1;
}
return 0;
}
}
|
[
"ibrahimkanj@outlook.com"
] |
ibrahimkanj@outlook.com
|
69ef1acff2b4542381cbe51d931a7a85db8dac70
|
6cae767cd14888bedae7adb11a38d28f856b77a0
|
/Kymdan/src/main/java/com/kymdan/backend/repository/NhanVienRepository.java
|
62a5d1ce7bfa14474cbbc24402d0816deb22135c
|
[] |
no_license
|
LinhhGiangg/KymDanProject
|
d7f06ec3daf3883898138cf874877876aa0d8734
|
c1f3547e26d1235a2987643210e75e1d14dacfd6
|
refs/heads/main
| 2023-08-17T12:42:47.090116
| 2021-09-11T10:33:05
| 2021-09-11T10:33:05
| 388,663,689
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 720
|
java
|
package com.kymdan.backend.repository;
import com.kymdan.backend.entity.NhanVien;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
import java.util.List;
@Repository
public interface NhanVienRepository extends JpaRepository<NhanVien, String> {
NhanVien findByTen(String ten);
NhanVien findByEmail(String email);
@Query(value = "call thong_ke(:ngayBatDau, :ngayKetThuc)", nativeQuery = true)
List<?> thongKe(@Param("ngayBatDau") LocalDate ngayBatDau, @Param("ngayKetThuc") LocalDate ngayKetThuc);
}
|
[
"supea52795@gmail.com"
] |
supea52795@gmail.com
|
131dc0f72cda5b72d364221deecac92b3706419d
|
78c990f287df4886edc0db7094a8c2f77eb16461
|
/icetone-core/src/main/java/icetone/effects/DesaturateEffect.java
|
df0628381407a54c8df869a537dd5f6df551e51e
|
[
"BSD-2-Clause",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
Scrappers-glitch/icetone
|
a91a104571fba25cacc421ef1c3e774de6769a53
|
1684c2a6da1b1228ddcabafbbbee56286ccc4adb
|
refs/heads/master
| 2022-01-08T10:53:47.263080
| 2019-06-27T11:10:54
| 2019-06-27T11:10:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 578
|
java
|
package icetone.effects;
public class DesaturateEffect extends Effect {
public DesaturateEffect(float duration) {
super(duration);
}
@Override
public void update(float tpf) {
if (!init) {
element.getMaterial().setBoolean("UseEffect", true);
element.getMaterial().setBoolean("EffectFade", false);
element.getMaterial().setBoolean("EffectPulse", false);
element.getMaterial().setBoolean("EffectSaturate", true);
init = true;
}
element.getMaterial().setFloat("EffectStep", pass);
if (pass >= 1.0) {
isActive = false;
}
updatePass(tpf);
}
}
|
[
"rockfire.redmoon@gmail.com"
] |
rockfire.redmoon@gmail.com
|
6c1b2992564ccbf168dca2ceda39ca4473f6c442
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/orientechnologies--orientdb/73811cc450789ef070778e13693229657c3cd8c6/after/OStorageEmbedded.java
|
02704cafa43e17b685ba4103731f0d761b9cae26
|
[] |
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
| 6,418
|
java
|
/*
* Copyright 1999-2010 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.core.storage;
import java.io.IOException;
import com.orientechnologies.common.concur.lock.OLockManager;
import com.orientechnologies.common.exception.OException;
import com.orientechnologies.common.log.OLogManager;
import com.orientechnologies.common.profiler.OProfiler;
import com.orientechnologies.orient.core.command.OCommandExecutor;
import com.orientechnologies.orient.core.command.OCommandManager;
import com.orientechnologies.orient.core.command.OCommandRequestText;
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
import com.orientechnologies.orient.core.db.record.ODatabaseRecord;
import com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract;
import com.orientechnologies.orient.core.exception.OCommandExecutionException;
import com.orientechnologies.orient.core.exception.OStorageException;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.id.ORecordId;
import com.orientechnologies.orient.core.iterator.ORecordIteratorCluster;
import com.orientechnologies.orient.core.record.ORecordInternal;
import com.orientechnologies.orient.core.record.impl.ODocument;
/**
* Interface for embedded storage.
*
* @see OStorageLocal, OStorageMemory
* @author Luca Garulli
*
*/
public abstract class OStorageEmbedded extends OStorageAbstract {
protected final OLockManager<ORID, Runnable> lockManager;
public OStorageEmbedded(final String iName, final String iFilePath, final String iMode) {
super(iName, iFilePath, iMode);
lockManager = new OLockManager<ORID, Runnable>(OGlobalConfiguration.STORAGE_LOCK_TIMEOUT.getValueAsInteger());
}
protected abstract ORawBuffer readRecord(final OCluster iClusterSegment, final ORecordId iRid, boolean iAtomicLock);
public abstract OCluster getClusterByName(final String iClusterName);
/**
* Execute the command request and return the result back.
*/
public Object command(final OCommandRequestText iCommand) {
final OCommandExecutor executor = OCommandManager.instance().getExecutor(iCommand);
executor.setProgressListener(iCommand.getProgressListener());
executor.parse(iCommand);
try {
return executor.execute(iCommand.getParameters());
} catch (OException e) {
// PASS THROUGHT
throw e;
} catch (Exception e) {
throw new OCommandExecutionException("Error on execution of command: " + iCommand, e);
}
}
/**
* Browse N clusters. The entire operation use a shared lock on the storage and lock the cluster from the external avoiding atomic
* lock at every record read.
*
* @param iClusterId
* Array of cluster ids
* @param iListener
* The listener to call for each record found
* @param ioRecord
*/
public void browse(final int[] iClusterId, final ORID iBeginRange, final ORID iEndRange,
final ORecordBrowsingListener iListener, ORecordInternal<?> ioRecord, final boolean iLockEntireCluster) {
checkOpeness();
final long timer = OProfiler.getInstance().startChrono();
try {
for (int clusterId : iClusterId) {
if (iBeginRange != null)
if (clusterId < iBeginRange.getClusterId())
// JUMP THIS
continue;
if (iEndRange != null)
if (clusterId > iEndRange.getClusterId())
// STOP
break;
final OCluster cluster = getClusterById(clusterId);
final long beginClusterPosition = iBeginRange != null && iBeginRange.getClusterId() == clusterId ? iBeginRange
.getClusterPosition() : 0;
final long endClusterPosition = iEndRange != null && iEndRange.getClusterId() == clusterId ? iEndRange.getClusterPosition()
: -1;
ioRecord = browseCluster(iListener, ioRecord, cluster, beginClusterPosition, endClusterPosition, iLockEntireCluster);
}
} catch (IOException e) {
OLogManager.instance().error(this, "Error on browsing elements of cluster: " + iClusterId, e);
} finally {
OProfiler.getInstance().stopChrono("OStorageLocal.foreach", timer);
}
}
public ORecordInternal<?> browseCluster(final ORecordBrowsingListener iListener, ORecordInternal<?> ioRecord,
final OCluster cluster, final long iBeginRange, final long iEndRange, final boolean iLockEntireCluster) throws IOException {
ORecordInternal<?> record;
if (iLockEntireCluster)
// LOCK THE ENTIRE CLUSTER AVOIDING TO LOCK EVERY SINGLE RECORD
cluster.lock();
try {
final ODatabaseRecord db = ODatabaseRecordThreadLocal.INSTANCE.get();
ORecordIteratorCluster<ORecordInternal<?>> iterator = new ORecordIteratorCluster<ORecordInternal<?>>(db,
(ODatabaseRecordAbstract) db, cluster.getId(), iBeginRange, iEndRange);
// BROWSE ALL THE RECORDS
while (iterator.hasNext()) {
record = iterator.next();
if (record != null && record.getRecordType() != ODocument.RECORD_TYPE)
// WRONG RECORD TYPE: JUMP IT
continue;
ORecordInternal<?> recordToCheck = null;
try {
// GET THE CACHED RECORD
recordToCheck = record;
if (!iListener.foreach(recordToCheck))
// LISTENER HAS INTERRUPTED THE EXECUTION
break;
} catch (OCommandExecutionException e) {
// PASS THROUGH
throw e;
} catch (Exception e) {
OLogManager.instance().exception("Error on loading record %s. Cause: %s", e, OStorageException.class,
recordToCheck != null ? recordToCheck.getIdentity() : null, e);
}
}
} finally {
if (iLockEntireCluster)
// UNLOCK THE ENTIRE CLUSTER
cluster.unlock();
}
return ioRecord;
}
/**
* Check if the storage is open. If it's closed an exception is raised.
*/
protected void checkOpeness() {
if (status != STATUS.OPEN)
throw new OStorageException("Storage " + name + " is not opened.");
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
65fdd19c3a74989813dc974c7c8e3af32aebd24e
|
c9b8db6ceff0be3420542d0067854dea1a1e7b12
|
/web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb14/Rule_Grp_Other_Participant_Office_Message_Address.java
|
51170b9d1bc9f87a5427d962a0827eceb956d346
|
[
"Apache-2.0"
] |
permissive
|
ganzijo/portfolio
|
12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a
|
a31834b23308be7b3a992451ab8140bef5a61728
|
refs/heads/master
| 2021-04-15T09:25:07.189213
| 2018-03-22T12:11:00
| 2018-03-22T12:11:00
| 126,326,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,259
|
java
|
package com.ke.css.cimp.fwb.fwb14;
/* -----------------------------------------------------------------------------
* Rule_Grp_Other_Participant_Office_Message_Address.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Tue Mar 06 10:34:51 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_Grp_Other_Participant_Office_Message_Address extends Rule
{
public Rule_Grp_Other_Participant_Office_Message_Address(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_Grp_Other_Participant_Office_Message_Address parse(ParserContext context)
{
context.push("Grp_Other_Participant_Office_Message_Address");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
int g1 = context.index;
ArrayList<ParserAlternative> as2 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s2 = context.index;
ParserAlternative a2 = new ParserAlternative(s2);
parsed = true;
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
Rule rule = Rule_OTHER_PARTY_MSG_AIRPORT_CODE.parse(context);
if ((f2 = rule != null))
{
a2.add(rule, context.index);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
Rule rule = Rule_OTHER_PARTY_MSG_OFFICE_DESIG.parse(context);
if ((f2 = rule != null))
{
a2.add(rule, context.index);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
Rule rule = Rule_OTHER_PARTY_MSG_COMPANY_DESIG.parse(context);
if ((f2 = rule != null))
{
a2.add(rule, context.index);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
{
as2.add(a2);
}
context.index = s2;
}
ParserAlternative b = ParserAlternative.getBest(as2);
parsed = b != null;
if (parsed)
{
a1.add(b.rules, b.end);
context.index = b.end;
}
f1 = context.index > g1;
if (parsed) c1++;
}
parsed = c1 == 1;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_Grp_Other_Participant_Office_Message_Address(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("Grp_Other_Participant_Office_Message_Address", parsed);
return (Rule_Grp_Other_Participant_Office_Message_Address)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
|
[
"whdnfka111@gmail.com"
] |
whdnfka111@gmail.com
|
cca2a874f286b8f72e98a014cf2f6171da894e76
|
eaaf6a5fcf4799384bac9cfe5a5c89c8c516e2a5
|
/androidapp/customer_app/src/main/java/com/hkm/taxicallandroid/iotesting.java
|
794d87b3498f7a226a23e35de8af6d6c3f8762bb
|
[] |
no_license
|
DevHossamHassan/TaxiOneCall
|
37e8f400c842b36f1c18743f2da951d2d7ae48f1
|
e660b25aa6a795db7144c7955273f2fb9d425777
|
refs/heads/master
| 2021-01-17T23:34:07.822273
| 2015-12-23T10:57:58
| 2015-12-23T10:57:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,602
|
java
|
package com.hkm.taxicallandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import com.asynhkm.productchecker.Util.Tool;
import com.github.nkzawa.socketio.client.Socket;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;import com.hkm.taxicallandroid.life.Config;
import com.hkm.taxicallandroid.schema.ConfirmCall;
import com.koushikdutta.async.http.AsyncHttpClient;
import com.koushikdutta.async.http.socketio.Acknowledge;
import com.koushikdutta.async.http.socketio.ConnectCallback;
import com.koushikdutta.async.http.socketio.EventCallback;
import com.koushikdutta.async.http.socketio.JSONCallback;
import com.koushikdutta.async.http.socketio.SocketIOClient;
import com.koushikdutta.async.http.socketio.StringCallback;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* Created by hesk on 1/23/2015.
*/
public class iotesting extends Activity {
private String rawjson;
private TextView edtv, from, to;
private Socket socket;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.orderconfirm);
edtv = (TextView) findViewById(R.id._order_debug_line);
from = (TextView) findViewById(R.id.from_spot);
to = (TextView) findViewById(R.id.to_spot);
// GsonBuilder gb = new GsonBuilder();
// Gson gs = gb.create();
// ConfirmCall CCdata = gs.fromJson(rawjson, ConfirmCall.class);
// edtv.setText(rawjson);
// from.setText(CCdata.pickup);
// to.setText(CCdata.destination);
// socketIOInit();
getSocketWorking();
}
SocketIOClient clientio;
@Override
protected void onDestroy() {
// if (clientio != null)
// clientio.disconnect();
super.onDestroy();
}
private void socketIOInitOff() {
}
private void getSocketWorkingOff() {
}
//https://github.com/koush/AndroidAsync
private void getSocketWorking() {
SocketIOClient.connect(AsyncHttpClient.getDefaultInstance(), Config.domain, new ConnectCallback() {
@Override
public void onConnectCompleted(Exception ex, SocketIOClient client) {
if (ex != null) {
ex.printStackTrace();
return;
}
clientio = client;
client.setStringCallback(new StringCallback() {
@Override
public void onString(String string, Acknowledge acknowledge) {
System.out.println(string);
}
});
// Tool.trace(getApplicationContext(), "success connected");
client.on("ordered", new EventCallback() {
@Override
public void onEvent(JSONArray argument, Acknowledge acknowledge) {
System.out.println("args: " + argument.toString());
// Tool.trace(getApplicationContext(), argument.toString());
}
});
client.setJSONCallback(new JSONCallback() {
@Override
public void onJSON(JSONObject json, Acknowledge acknowledge) {
System.out.println("args: " + json.toString());
// Tool.trace(getApplicationContext(), json.toString());
}
});
// client.emit("ordered");
}
});
}
}
|
[
"jobhesk@gmail.com"
] |
jobhesk@gmail.com
|
78dd87d04daca71532c2dc39184441445ada2a28
|
7060bd58c47bb36484cfaad59b50d9c0df41846d
|
/JavaRushTasks/1.JavaSyntax/src/com/javarush/task/pro/task14/task1403/Solution.java
|
cb70996b5a9c1c480b22af003cb2c51ae5929ea6
|
[] |
no_license
|
KhaliullinArR/java-rush-tasks
|
4e6a60282e4d218bd114d19e950f8bf2861d0182
|
7fa398e85c0f6d2843b74193396ec73ee3f69549
|
refs/heads/main
| 2023-04-08T09:52:02.711984
| 2021-04-20T17:41:24
| 2021-04-20T17:41:24
| 357,000,449
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,951
|
java
|
package com.javarush.task.pro.task14.task1403;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
/*
Помощник преподавателя-2
*/
public class Solution {
public static final String PROMPT_STRING = "Введите номер студента, или exit для выхода: ";
public static final String EXIT = "exit";
public static final String ANSWERING = "Отвечает ";
public static final String NOT_EXIST = "Студента с таким номером не существует";
public static final String INTEGER_REQUIRED = "Нужно ввести целое число";
static List<String> studentsJournal = Arrays.asList(
"Тимур Мясной"
, "Пенелопа Сиволап"
, "Орест Злобин"
, "Ирида Продувалова"
, "Гектор Гадюкин"
, "Электра Чемоданова"
, "Гвидон Недумов"
, "Роксана Борисенко"
, "Юлиан Мумбриков"
, "Зигфрид Горемыкин");
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
System.out.print(PROMPT_STRING);
String input = scanner.nextLine();
if (input.toLowerCase().equals(EXIT)) {
break;
}
int studentId;
try {
studentId = Integer.parseInt(input);
try {
System.out.println(ANSWERING + studentsJournal.get(studentId));
} catch (Exception e) {
System.out.println(NOT_EXIST);
}
} catch (Exception e) {
System.out.println("Нужно ввести целое число" );
}
}
}
}
|
[
"74345012+KhaliullinArR@users.noreply.github.com"
] |
74345012+KhaliullinArR@users.noreply.github.com
|
b4a588fd1c984fca6691f18583a94e718ddb7869
|
96d71f73821cfbf3653f148d8a261eceedeac882
|
/external/tools/Bin_Coddec_2008-7-16_11.37_coddec/net/rim/tools/compiler/analysis/InstructionInts.java
|
da43467732cefa751431d57cbf4ec2ea34a8cc85
|
[] |
no_license
|
JaapSuter/Niets
|
9a9ec53f448df9b866a8c15162a5690b6bcca818
|
3cc42f8c2cefd9c3193711cbf15b5304566e08cb
|
refs/heads/master
| 2020-04-09T19:09:40.667155
| 2012-09-28T18:11:33
| 2012-09-28T18:11:33
| 5,751,595
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,671
|
java
|
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
package net.rim.tools.compiler.analysis;
import net.rim.tools.compiler.codfile.Code;
import net.rim.tools.compiler.util.CompileException;
// Referenced classes of package net.rim.tools.compiler.g:
// q, g, e
public final class InstructionInts extends InstructionBranch
{
private int z_qxaI[];
public InstructionInts(int i, int j, int ai[])
{
this(i, j, ai, false);
}
public InstructionInts(int i, int j, int ai[], boolean flag)
{
super(i, j, flag ? 1 : 0);
int k = ai.length;
if(k == 0)
{
z_qxaI = ai;
} else
{
z_qxaI = new int[k];
for(int l = 0; l < k; l++)
z_qxaI[l] = ai[l];
}
}
public Instruction _eLvg()
{
return (new InstructionInts(getIp(), getOpcode(), z_qxaI, super._op != 0)).setValueOp(super.z_qpI);
}
public int[] _eZvaI()
{
return z_qxaI;
}
public void walkInstruction(InstructionWalker e1)
throws CompileException
{
e1.walkInstruction(this);
}
public int setOffset(int i, boolean flag)
{
setIp(i);
return i + Code._aIIaII(getOpcode(), 0, z_qxaI, flag, true);
}
public boolean _eYvZ()
{
return super._op != 0;
}
public void _bNIV(int i)
{
int ai[] = z_qxaI;
int j = ai.length;
int k = j - 1;
int ai1[] = new int[k];
if(i != 0)
System.arraycopy(ai, 0, ai1, 0, i);
if(i != k)
System.arraycopy(ai, i + 1, ai1, i, j - (i + 1));
z_qxaI = ai1;
}
boolean _eXvZ()
{
if(_eYvZ())
return false;
int ai[] = z_qxaI;
int i = ai.length;
for(int j = 1; j < i; j++)
if(ai[j] <= ai[j - 1])
return false;
return true;
}
public boolean equals(Object obj)
{
if(obj instanceof InstructionInts)
{
InstructionInts h1 = (InstructionInts)obj;
if(!super.equals(h1))
return false;
int ai[] = z_qxaI;
int ai1[] = h1.z_qxaI;
if(ai == ai1)
return true;
int i = ai.length;
if(i == ai1.length)
{
for(int j = 0; j < i; j++)
if(ai[j] != ai1[j])
return false;
return true;
}
}
return false;
}
}
|
[
"git@jaapsuter.com"
] |
git@jaapsuter.com
|
259111c9912bf5f03bdd651fd703a27d65069c15
|
7cab6fe085f321c794ac7bb35a55a94cd0b7bb82
|
/mybaselibrary/src/main/java/com/fivefivelike/mybaselibrary/utils/DialogDeclare.java
|
8ebf1346c61c807913cefbcbeb1b8727e8e4d53f
|
[] |
no_license
|
beyondzzz/erp_android
|
ef3fa2a3e1f3ad55e5e27fcbd471cf7d4bf90eb0
|
df77ceb4f39d868252560ecc6e5c6c48a378b071
|
refs/heads/master
| 2020-04-26T23:01:35.572421
| 2019-03-06T07:23:36
| 2019-03-06T07:23:36
| 173,890,126
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,138
|
java
|
package com.fivefivelike.mybaselibrary.utils;
import android.graphics.Color;
import android.os.Handler;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AppCompatActivity;
import android.view.Gravity;
import android.view.View;
import android.widget.AdapterView;
import com.circledialog.CircleDialog;
import com.circledialog.callback.ConfigButton;
import com.circledialog.callback.ConfigDialog;
import com.circledialog.callback.ConfigInput;
import com.circledialog.callback.ConfigText;
import com.circledialog.params.ButtonParams;
import com.circledialog.params.DialogParams;
import com.circledialog.params.InputParams;
import com.circledialog.params.ProgressParams;
import com.circledialog.params.TextParams;
import com.circledialog.view.listener.OnInputClickListener;
import java.util.Timer;
import java.util.TimerTask;
/**
* Created by liugongce on 2017/9/15.
*/
public class DialogDeclare {
public void show(final AppCompatActivity context) {
// 单个按钮
new CircleDialog.Builder(context)
.setTitle("标题")
.setText("提示框")
.configText(new ConfigText() {
@Override
public void onConfig(TextParams params) {
params.gravity = Gravity.LEFT;
params.padding = new int[]{50, 50, 50, 50};
}
})
.setPositive("确定", null)
.show();
// 两个按钮
new CircleDialog.Builder(context)
.setCanceledOnTouchOutside(false)
.setCancelable(false)
.setTitle("标题")
.setText("确定框")
.setNegative("取消", null)
.setPositive("确定", new View.OnClickListener() {
@Override
public void onClick(View v) {
}
})
.show();
// 底部多选
final String[] items = {"拍照", "从相册选择", "小视频"};
new CircleDialog.Builder(context)
.configDialog(new ConfigDialog() {
@Override
public void onConfig(DialogParams params) {
//增加弹出动画
// params.animStyle = R.style.dialogWindowAnim;
}
})
.setTitle("标题")
.setTitleColor(Color.BLUE)
.setItems(items, new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int
position, long id) {
}
})
.setNegative("取消", null)
.configNegative(new ConfigButton() {
@Override
public void onConfig(ButtonParams params) {
//取消按钮字体颜色
params.textColor = Color.RED;
}
})
.show();
// 输入弹出框
new CircleDialog.Builder(context)
.setCanceledOnTouchOutside(false)
.setCancelable(true)
.setTitle("输入框")
.setInputHint("请输入条件")
.configInput(new ConfigInput() {
@Override
public void onConfig(InputParams params) {
// params.inputBackgroundResourceId = R.drawable.bg_input;
}
})
.setNegative("取消", null)
.setPositiveInput("确定", new OnInputClickListener() {
@Override
public void onClick(String text, View v) {
}
})
.show();
// 进度弹出框
final Timer timer = new Timer();
final CircleDialog.Builder builder = new CircleDialog.Builder(context);
builder.setCancelable(false).setCanceledOnTouchOutside(false)
.setTitle("下载")
.setProgressText("已经下载")
// .setProgressText("已经下载%s了")
// .setProgressDrawable(R.drawable.bg_progress_h)
.setNegative("取消", new View.OnClickListener() {
@Override
public void onClick(View v) {
timer.cancel();
}
})
.show();
TimerTask timerTask = new TimerTask() {
final int max = 222;
int progress = 0;
@Override
public void run() {
progress++;
if (progress >= max) {
context.runOnUiThread(new Runnable() {
@Override
public void run() {
builder.setProgressText("下载完成").create();
timer.cancel();
}
});
} else {
builder.setProgress(max, progress).create();
}
}
};
timer.schedule(timerTask, 0, 50);
// 等待弹出框
final DialogFragment dialogFragment = new CircleDialog.Builder(context)
.setProgressText("登录中...")
.setProgressStyle(ProgressParams.STYLE_SPINNER)
// .setProgressDrawable(R.drawable.bg_progress_s)
.show();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
dialogFragment.dismiss();
}
}, 3000);
// 动态改变内容弹出框
builder.configDialog(new ConfigDialog() {
@Override
public void onConfig(DialogParams params) {
params.gravity = Gravity.TOP;
// TranslateAnimation refreshAnimation = new TranslateAnimation(15, -15,
// 0, 0);
// refreshAnimation.setInterpolator(new OvershootInterpolator());
// refreshAnimation.setDuration(100);
// refreshAnimation.setRepeatCount(3);
// refreshAnimation.setRepeatMode(Animation.RESTART);
// params.refreshAnimation = R.anim.refresh_animation;
}
})
.setTitle("动态改变内容")
.setText("3秒后更新其它内容")
.show();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
builder.setText("已经更新内容").create();
}
}, 3000);
}
}
|
[
"zhangyuanzhen@zhidaoauto.com"
] |
zhangyuanzhen@zhidaoauto.com
|
7205945e026a6ef95ae8c677bcb15fffe87b3066
|
d6c041879c662f4882892648fd02e0673a57261c
|
/com/planet_ink/coffee_mud/Items/Basic/GenResource.java
|
b9103c6e912c11ea8af8f173d7342471c047a084
|
[
"Apache-2.0"
] |
permissive
|
linuxshout/CoffeeMud
|
15a2c09c1635f8b19b0d4e82c9ef8cd59e1233f6
|
a418aa8685046b08c6d970083e778efb76fd3716
|
refs/heads/master
| 2020-04-14T04:17:39.858690
| 2018-12-29T20:50:15
| 2018-12-29T20:50:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,349
|
java
|
package com.planet_ink.coffee_mud.Items.Basic;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.GenCow;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2002-2018 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class GenResource extends GenItem implements RawMaterial
{
@Override
public String ID()
{
return "GenResource";
}
public GenResource()
{
super();
setName("a pile of resources");
setDisplayText("a pile of resources sits here.");
setDescription("");
setMaterial(RawMaterial.RESOURCE_IRON);
basePhyStats().setWeight(0);
recoverPhyStats();
}
protected String domainSource = null;
protected String resourceSubType = "";
@Override
public String domainSource()
{
return domainSource;
}
@Override
public void setDomainSource(final String src)
{
domainSource = src;
}
@Override
public void setSubType(final String subType)
{
resourceSubType = (subType == null)?"":subType;
}
@Override
public String getSubType()
{
return resourceSubType;
}
@Override
public boolean rebundle()
{
return CMLib.materials().rebundle(this);
}
@Override
public void quickDestroy()
{
CMLib.materials().quickDestroy(this);
}
private final static String[] MYCODES={"DOMAINSRC","RSUBTYPE"};
@Override
public String getStat(final String code)
{
if(super.isStat(code))
return super.getStat(code);
else
switch(getCodeNum(code))
{
case 0:
return this.domainSource();
case 1:
return this.getSubType();
default:
return CMProps.getStatCodeExtensionValue(getStatCodes(), xtraValues, code);
}
}
@Override
public void setStat(final String code, final String val)
{
if(super.isStat(code))
super.setStat(code, val);
else
switch(getCodeNum(code))
{
case 0:
setDomainSource(val);
break;
case 1:
this.setSubType(val);
break;
default:
CMProps.setStatCodeExtensionValue(getStatCodes(), xtraValues, code, val);
break;
}
}
@Override
protected int getCodeNum(final String code)
{
for(int i=0;i<MYCODES.length;i++)
{
if(code.equalsIgnoreCase(MYCODES[i]))
return i;
}
return -1;
}
private static String[] codes = null;
@Override
public String[] getStatCodes()
{
if(codes!=null)
return codes;
final String[] MYCODES=CMProps.getStatCodesList(GenResource.MYCODES,this);
final String[] superCodes=CMParms.toStringArray(super.getStatCodes());
codes=new String[superCodes.length+MYCODES.length];
int i=0;
for(;i<superCodes.length;i++)
codes[i]=superCodes[i];
for(int x=0;x<MYCODES.length;i++,x++)
codes[i]=MYCODES[x];
return codes;
}
@Override
public boolean sameAs(final Environmental E)
{
if(!(E instanceof GenResource))
return false;
final String[] codes=getStatCodes();
for(int i=0;i<codes.length;i++)
{
if(!E.getStat(codes[i]).equals(getStat(codes[i])))
return false;
}
return true;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
2438533b184036610b7e9289296cac67b8120cd0
|
ed2f41c3e04d825457e6b3a406fa3abe29ea41de
|
/citations/citations-osid/xserver/src/java/org/sakaibrary/osid/repository/xserver/LongValueIterator.java
|
4df1fc24909d50b8ec9b91af118e3c4259604ae6
|
[
"ECL-2.0"
] |
permissive
|
lancespeelmon/sakai-travis-test
|
38d5d4fe978392dc241d60fd8cf4cbe47d24cff4
|
c3eca9d97f959e73fd3f227ccd29b274969c95c3
|
refs/heads/master
| 2021-01-10T08:06:43.259585
| 2013-02-27T04:56:14
| 2013-02-27T16:55:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,064
|
java
|
/**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/citations/tags/sakai-2.9.1/citations-osid/xserver/src/java/org/sakaibrary/osid/repository/xserver/LongValueIterator.java $
* $Id: LongValueIterator.java 59673 2009-04-03 23:02:03Z arwhyte@umich.edu $
***********************************************************************************
*
* Copyright (c) 2006, 2007, 2008 The Sakai Foundation
*
* Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaibrary.osid.repository.xserver;
/**
* @author Massachusetts Institute of Techbology, Sakai Software Development Team
* @version
*/
public class LongValueIterator
implements org.osid.shared.LongValueIterator
{
private java.util.Vector vector = new java.util.Vector();
private int i = 0;
public LongValueIterator(java.util.Vector vector)
throws org.osid.shared.SharedException
{
this.vector = vector;
}
public boolean hasNextLongValue()
throws org.osid.shared.SharedException
{
return i < vector.size();
}
public long nextLongValue()
throws org.osid.shared.SharedException
{
if (i < vector.size())
{
return ((Long)vector.elementAt(i++)).longValue();
}
else
{
throw new org.osid.shared.SharedException(org.osid.shared.SharedException.NO_MORE_ITERATOR_ELEMENTS);
}
}
}
|
[
"lance@speelmon.com"
] |
lance@speelmon.com
|
a7a98be8a6ee4eeecff0461d93822866d70f47ab
|
642e9fe4368989572a7baa0f61eae4174ce78041
|
/FlightsClient/build/generated/jax-wsCache/FlightWSService/ru/javabegin/training/flight/ws/BuyTicketResponse.java
|
a9f644b73cebd325cdd776e51da7755fc2897d8c
|
[] |
no_license
|
ansurakin/FlightsWS
|
5f09e47819b53b1d0236940b7ffe16d59bb99780
|
d2ce5c8ab251ccc288ca27e7ac14f441cfebc6c5
|
refs/heads/master
| 2021-04-30T11:08:45.547572
| 2018-02-19T08:07:36
| 2018-02-19T08:07:36
| 121,347,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,262
|
java
|
package ru.javabegin.training.flight.ws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for buyTicketResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="buyTicketResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "buyTicketResponse", propOrder = {
"_return"
})
public class BuyTicketResponse {
@XmlElement(name = "return")
protected boolean _return;
/**
* Gets the value of the return property.
*
*/
public boolean isReturn() {
return _return;
}
/**
* Sets the value of the return property.
*
*/
public void setReturn(boolean value) {
this._return = value;
}
}
|
[
"Alex@Alex-PC"
] |
Alex@Alex-PC
|
0c665d70482a357e7f00a658e879544dafa937af
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/eclipse.jdt.core/870.java
|
b1edf6c55bb7efd9e617cc13f21996fb9c1c6452
|
[
"MIT"
] |
permissive
|
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
|
d3fd21745dfddb2979e8ac262588cfdfe471899f
|
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
|
refs/heads/master
| 2020-03-31T15:52:01.005505
| 2018-10-01T23:38:50
| 2018-10-01T23:38:50
| 152,354,327
| 1
| 0
|
MIT
| 2018-10-10T02:57:02
| 2018-10-10T02:57:02
| null |
UTF-8
|
Java
| false
| false
| 421
|
java
|
package test.copyright;
/**
* Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: IBM Corporation - initial API and implementation
*/
public class X1 {
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
0a2420fac3cd547b55fe76d1a61486a31e92ba22
|
4c9d35da30abf3ec157e6bad03637ebea626da3f
|
/eclipse/libs_src/org/ripple/bouncycastle/asn1/esf/SPUserNotice.java
|
3d6b0bd30c405ab867b8ae507e7505e71bf54cdf
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Apache-2.0"
] |
permissive
|
youweixue/RipplePower
|
9e6029b94a057e7109db5b0df3b9fd89c302f743
|
61c0422fa50c79533e9d6486386a517565cd46d2
|
refs/heads/master
| 2020-04-06T04:40:53.955070
| 2015-04-02T12:22:30
| 2015-04-02T12:22:30
| 33,860,735
| 0
| 0
| null | 2015-04-13T09:52:14
| 2015-04-13T09:52:11
| null |
UTF-8
|
Java
| false
| false
| 2,148
|
java
|
package org.ripple.bouncycastle.asn1.esf;
import java.util.Enumeration;
import org.ripple.bouncycastle.asn1.ASN1Encodable;
import org.ripple.bouncycastle.asn1.ASN1EncodableVector;
import org.ripple.bouncycastle.asn1.ASN1Object;
import org.ripple.bouncycastle.asn1.ASN1Primitive;
import org.ripple.bouncycastle.asn1.ASN1Sequence;
import org.ripple.bouncycastle.asn1.ASN1String;
import org.ripple.bouncycastle.asn1.DERSequence;
import org.ripple.bouncycastle.asn1.x509.DisplayText;
import org.ripple.bouncycastle.asn1.x509.NoticeReference;
public class SPUserNotice extends ASN1Object {
private NoticeReference noticeRef;
private DisplayText explicitText;
public static SPUserNotice getInstance(Object obj) {
if (obj instanceof SPUserNotice) {
return (SPUserNotice) obj;
} else if (obj != null) {
return new SPUserNotice(ASN1Sequence.getInstance(obj));
}
return null;
}
private SPUserNotice(ASN1Sequence seq) {
Enumeration e = seq.getObjects();
while (e.hasMoreElements()) {
ASN1Encodable object = (ASN1Encodable) e.nextElement();
if (object instanceof DisplayText || object instanceof ASN1String) {
explicitText = DisplayText.getInstance(object);
} else if (object instanceof NoticeReference
|| object instanceof ASN1Sequence) {
noticeRef = NoticeReference.getInstance(object);
} else {
throw new IllegalArgumentException(
"Invalid element in 'SPUserNotice': "
+ object.getClass().getName());
}
}
}
public SPUserNotice(NoticeReference noticeRef, DisplayText explicitText) {
this.noticeRef = noticeRef;
this.explicitText = explicitText;
}
public NoticeReference getNoticeRef() {
return noticeRef;
}
public DisplayText getExplicitText() {
return explicitText;
}
/**
* <pre>
* SPUserNotice ::= SEQUENCE {
* noticeRef NoticeReference OPTIONAL,
* explicitText DisplayText OPTIONAL }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
if (noticeRef != null) {
v.add(noticeRef);
}
if (explicitText != null) {
v.add(explicitText);
}
return new DERSequence(v);
}
}
|
[
"longwind2012@hotmail.com"
] |
longwind2012@hotmail.com
|
eb104811f03ba99d550dfd60580aced1427f52e3
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.debug/11.java
|
a718bfd991447a73f7f62d68d47b0e424f6679c0
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,809
|
java
|
/*******************************************************************************
* Copyright (c) 2002, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.debug.tests.eval;
import org.eclipse.jdt.debug.core.IJavaPrimitiveValue;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.jdt.internal.debug.core.model.JDIObjectValue;
public class TestsOperators1 extends Tests {
/**
* Constructor for TypeHierarchy.
* @param name
*/
public TestsOperators1(String name) {
super(name);
}
public void init() throws Exception {
initializeFrame("EvalSimpleTests", 37, 1, 1);
}
protected void end() throws Exception {
destroyFrame();
}
public void testIntPlusInt() throws Throwable {
try {
init();
IValue value = eval(xInt + plusOp + yInt);
String typeName = value.getReferenceTypeName();
assertEquals("int plus int : wrong type : ", "int", typeName);
int intValue = ((IJavaPrimitiveValue) value).getIntValue();
assertEquals("int plus int : wrong result : ", xIntValue + yIntValue, intValue);
value = eval(yInt + plusOp + xInt);
typeName = value.getReferenceTypeName();
assertEquals("int plus int : wrong type : ", "int", typeName);
intValue = ((IJavaPrimitiveValue) value).getIntValue();
assertEquals("int plus int : wrong result : ", yIntValue + xIntValue, intValue);
} finally {
end();
}
}
public void testStringPlusString() throws Throwable {
try {
init();
IValue value = eval(xString + plusOp + yString);
String typeName = value.getReferenceTypeName();
assertEquals("java.lang.String plus java.lang.String : wrong type : ", "java.lang.String", typeName);
String stringValue = ((JDIObjectValue) value).getValueString();
assertEquals("java.lang.String plus java.lang.String : wrong result : ", xStringValue + yStringValue, stringValue);
value = eval(yString + plusOp + xString);
typeName = value.getReferenceTypeName();
assertEquals("java.lang.String plus java.lang.String : wrong type : ", "java.lang.String", typeName);
stringValue = ((JDIObjectValue) value).getValueString();
assertEquals("java.lang.String plus java.lang.String : wrong result : ", yStringValue + xStringValue, stringValue);
} finally {
end();
}
}
public void testInt() throws Throwable {
try {
init();
IValue value = eval(xVarInt);
String typeName = value.getReferenceTypeName();
assertEquals("int local variable value : wrong type : ", "int", typeName);
int intValue = ((IJavaPrimitiveValue) value).getIntValue();
assertEquals("int local variable value : wrong result : ", xVarIntValue, intValue);
value = eval(yVarInt);
typeName = value.getReferenceTypeName();
assertEquals("int local variable value : wrong type : ", "int", typeName);
intValue = ((IJavaPrimitiveValue) value).getIntValue();
assertEquals("int local variable value : wrong result : ", yVarIntValue, intValue);
} finally {
end();
}
}
public void testString() throws Throwable {
try {
init();
IValue value = eval(xVarString);
String typeName = value.getReferenceTypeName();
assertEquals("java.lang.String local variable value : wrong type : ", "java.lang.String", typeName);
String stringValue = ((JDIObjectValue) value).getValueString();
assertEquals("java.lang.String local variable value : wrong result : ", xVarStringValue, stringValue);
value = eval(yVarString);
typeName = value.getReferenceTypeName();
assertEquals("java.lang.String local variable value : wrong type : ", "java.lang.String", typeName);
stringValue = ((JDIObjectValue) value).getValueString();
assertEquals("java.lang.String local variable value : wrong result : ", yVarStringValue, stringValue);
} finally {
end();
}
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
f5f6ed3cb41aae00c69d99347bc3103b01c8bbef
|
0e719c6700400b547ca62cfb2d1ab4c74f8218ff
|
/P2Pproj/src/main/java/top/zzh/bean/Bz.java
|
4935061bfe0b2327d402136e4d0a1a4261906a53
|
[] |
no_license
|
ChenZhenCZ/JavaWeb
|
688a6ad92622af24e238c12ce15cdc5c19e75fd9
|
cc308c4decc3ef5d65ccae26453cbcfbbc3871b4
|
refs/heads/master
| 2021-05-16T05:09:47.967350
| 2018-03-22T00:02:24
| 2018-03-22T00:02:24
| 106,273,182
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package top.zzh.bean;
//标种表
public class Bz {
private Long bzid;
private String bzname;//标种名称
private Byte state;
public Bz(Long bzid, String bzname, Byte state) {
this.bzid = bzid;
this.bzname = bzname;
this.state = state;
}
public Bz() {
super();
}
public Long getBzid() {
return bzid;
}
public void setBzid(Long bzid) {
this.bzid = bzid;
}
public String getBzname() {
return bzname;
}
public void setBzname(String bzname) {
this.bzname = bzname == null ? null : bzname.trim();
}
public Byte getState() {
return state;
}
public void setState(Byte state) {
this.state = state;
}
}
|
[
"2908903432@qq.com"
] |
2908903432@qq.com
|
3c8af5479b9141288fa765c9c325290fab9f85ca
|
f36c29c44e93b4c86741a7de4ab9dd85b7cd1b43
|
/core-customize/hybris/bin/custom/theBodyShopfulfilmentprocess/src/uk/co/thebodyshop/fulfilmentprocess/actions/consignment/CheckConsignmentStatusAction.java
|
7982d6bb1e1d785f4d4d7c18b85868aa89deb92a
|
[] |
no_license
|
genabush/en-shop
|
22f2a3aed5867825b53409fb0bbcd9fefa9a81e7
|
3d5a4741e7af071c77374769410ec8a46d62a027
|
refs/heads/master
| 2023-01-28T23:23:26.086256
| 2020-01-25T16:02:22
| 2020-01-25T16:02:22
| 235,858,083
| 0
| 0
| null | 2023-01-05T05:42:42
| 2020-01-23T18:23:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,970
|
java
|
/*
* Copyright (c)
* 2019 THE BODY SHOP INTERNATIONAL LIMITED.
* All rights reserved.
*/
package uk.co.thebodyshop.fulfilmentprocess.actions.consignment;
import java.util.HashSet;
import java.util.Set;
import org.springframework.util.Assert;
import de.hybris.platform.basecommerce.enums.ConsignmentStatus;
import de.hybris.platform.ordersplitting.model.ConsignmentModel;
import de.hybris.platform.ordersplitting.model.ConsignmentProcessModel;
import de.hybris.platform.processengine.action.AbstractAction;
import de.hybris.platform.task.RetryLaterException;
/**
* @author vasanthramprakasam
*/
public class CheckConsignmentStatusAction extends AbstractAction<ConsignmentProcessModel>
{
public enum Transition
{
SHIPPED, CANCELLED, WAIT;
public static Set<String> getStringValues()
{
final Set<String> res = new HashSet<>();
for (final Transition transition : Transition.values())
{
res.add(transition.toString());
}
return res;
}
}
@Override
public String execute(final ConsignmentProcessModel consignmentProcess) throws RetryLaterException, Exception
{
// Check Order status and payment status and return NOK
final ConsignmentModel consignment = consignmentProcess.getConsignment();
Assert.notNull(consignment, "consignment can't be null");
final ConsignmentStatus consignmentStatus = consignment.getStatus();
if (consignmentStatus != null && (consignmentStatus.equals(ConsignmentStatus.SHIPPED) || consignmentStatus.equals(ConsignmentStatus.PART_SHIPPED) || consignmentStatus.equals(ConsignmentStatus.PICKUP_COMPLETE)))
{
return Transition.SHIPPED.toString();
}
if (consignmentStatus != null && (consignmentStatus.equals(ConsignmentStatus.CANCELLED) || consignmentStatus.equals(ConsignmentStatus.NOT_SHIPPED)))
{
return Transition.CANCELLED.toString();
}
return Transition.WAIT.toString();
}
@Override
public Set<String> getTransitions()
{
return Transition.getStringValues();
}
}
|
[
"gennadiykulabukhov@ratiose.com"
] |
gennadiykulabukhov@ratiose.com
|
74c42a7a8d84113e6089699ef2c5a6ca76740785
|
1977757fa8a337e3346795cfb1ceca9ae95b97fb
|
/src/code11/LogicalOperatorSingleAmpersend.java
|
a7803ce057b1d348dfb7e287b6aeabc1d0bf795d
|
[] |
no_license
|
Tarana82/MyFirstProject
|
fcb3e81c3659e9f846a71c7856fcf4ba914e15ad
|
6fe9bb5f1d90812f6c2e5ef68ba275435a7cabce
|
refs/heads/master
| 2021-02-11T16:22:21.801471
| 2020-03-03T03:33:39
| 2020-03-03T03:33:39
| 244,509,280
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,682
|
java
|
package code11;
public class LogicalOperatorSingleAmpersend {
public static void main(String[] args) {
// && 2 ampersand & 1 ampersand -->> Logical AND operator
// This is used to check both conditions are true at the same time
// && is called short circuit AND
// -->> it does not check the next condition as long as the first condition is false
// -->> just like if you have multiple condition for rocket launching
// isEngineRunning , isCommunicationSystemWorking , isAirEnough
// isEngineRunning && isCommunicationSystemWorking && isAirEnough
// if isEngineRunning is false then it does not go and check next conditions
// & -->> CHECK EACH AND every condition no matter what
// isEngineRunning & isCommunicationSystemWorking & isAirEnough
// if isEngineRunning is false
// it still check isCommunicationSystemWorking
// it still check isAirEnough
// and eventually give you the outcome
// System.out.println( 7>5 && 1>7 );
// System.out.println( 5>5 && 1>7 );
// System.out.println( 1>5 && 9>7 );
//
// System.out.println( 7>5 & 1>7 );
// System.out.println( 5>5 & 1>7 );
// System.out.println( 1>5 & 9>7 );
//System.out.println( 9/0 ); // ERROR!! CAN NOT DIVIDE BY 0
// I want to check whether dividing 9 by 0 is 3
// System.out.println( 9/0 ==3 );
// combine the result of
// checking 5 is more than 10
// and 9 divided by 0 is 3
System.out.println(5 > 10 && 9 / 0 == 3);
System.out.println(5 > 10 & 9 / 0 == 3);
}
}
|
[
"tahmadova1982@gmail.com"
] |
tahmadova1982@gmail.com
|
874c8bc59bde56ea394a7b8e58100da57aaa0973
|
9623f83defac3911b4780bc408634c078da73387
|
/PC_for_1_3/src/minecraft/net/minecraft/src/EntitySpider.java
|
d73a8acc2396ac2063ace29d1595f7980b972338
|
[] |
no_license
|
BlearStudio/powercraft-legacy
|
42b839393223494748e8b5d05acdaf59f18bd6c6
|
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
|
refs/heads/master
| 2021-01-21T21:18:55.774908
| 2015-04-06T20:45:25
| 2015-04-06T20:45:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,589
|
java
|
package net.minecraft.src;
public class EntitySpider extends EntityMob
{
public EntitySpider(World par1World)
{
super(par1World);
this.texture = "/mob/spider.png";
this.setSize(1.4F, 0.9F);
this.moveSpeed = 0.8F;
}
protected void entityInit()
{
super.entityInit();
this.dataWatcher.addObject(16, new Byte((byte)0));
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
super.onUpdate();
if (!this.worldObj.isRemote)
{
this.setBesideClimbableBlock(this.isCollidedHorizontally);
}
}
public int getMaxHealth()
{
return 16;
}
/**
* Returns the Y offset from the entity's position for any entity riding this one.
*/
public double getMountedYOffset()
{
return (double)this.height * 0.75D - 0.5D;
}
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
*/
protected boolean canTriggerWalking()
{
return false;
}
/**
* Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
* (Animals, Spiders at day, peaceful PigZombies).
*/
protected Entity findPlayerToAttack()
{
float var1 = this.getBrightness(1.0F);
if (var1 < 0.5F)
{
double var2 = 16.0D;
return this.worldObj.getClosestVulnerablePlayerToEntity(this, var2);
}
else
{
return null;
}
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.spider";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.spider";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.spiderdeath";
}
/**
* Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
*/
protected void attackEntity(Entity par1Entity, float par2)
{
float var3 = this.getBrightness(1.0F);
if (var3 > 0.5F && this.rand.nextInt(100) == 0)
{
this.entityToAttack = null;
}
else
{
if (par2 > 2.0F && par2 < 6.0F && this.rand.nextInt(10) == 0)
{
if (this.onGround)
{
double var4 = par1Entity.posX - this.posX;
double var6 = par1Entity.posZ - this.posZ;
float var8 = MathHelper.sqrt_double(var4 * var4 + var6 * var6);
this.motionX = var4 / (double)var8 * 0.5D * 0.800000011920929D + this.motionX * 0.20000000298023224D;
this.motionZ = var6 / (double)var8 * 0.5D * 0.800000011920929D + this.motionZ * 0.20000000298023224D;
this.motionY = 0.4000000059604645D;
}
}
else
{
super.attackEntity(par1Entity, par2);
}
}
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return Item.silk.shiftedIndex;
}
/**
* Drop 0-2 items of this living's type
*/
protected void dropFewItems(boolean par1, int par2)
{
super.dropFewItems(par1, par2);
if (par1 && (this.rand.nextInt(3) == 0 || this.rand.nextInt(1 + par2) > 0))
{
this.dropItem(Item.spiderEye.shiftedIndex, 1);
}
}
/**
* returns true if this entity is by a ladder, false otherwise
*/
public boolean isOnLadder()
{
return this.isBesideClimbableBlock();
}
/**
* Sets the Entity inside a web block.
*/
public void setInWeb() {}
/**
* How large the spider should be scaled.
*/
public float spiderScaleAmount()
{
return 1.0F;
}
/**
* Get this Entity's EnumCreatureAttribute
*/
public EnumCreatureAttribute getCreatureAttribute()
{
return EnumCreatureAttribute.ARTHROPOD;
}
public boolean isPotionApplicable(PotionEffect par1PotionEffect)
{
return par1PotionEffect.getPotionID() == Potion.poison.id ? false : super.isPotionApplicable(par1PotionEffect);
}
/**
* Returns true if the WatchableObject (Byte) is 0x01 otherwise returns false. The WatchableObject is updated using
* setBesideClimableBlock.
*/
public boolean isBesideClimbableBlock()
{
return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
/**
* Updates the WatchableObject (Byte) created in entityInit(), setting it to 0x01 if par1 is true or 0x00 if it is
* false.
*/
public void setBesideClimbableBlock(boolean par1)
{
byte var2 = this.dataWatcher.getWatchableObjectByte(16);
if (par1)
{
var2 = (byte)(var2 | 1);
}
else
{
var2 &= -2;
}
this.dataWatcher.updateObject(16, Byte.valueOf(var2));
}
}
|
[
"rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c"
] |
rapus95@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
|
dc4cb42d8a1df0b55cc31bcc90d78d80a968815d
|
591b2221b5aa48d310982cfb4207e03e22d6c5c8
|
/src/day11/SortArrayListClass.java
|
e0b8eff24371131fad5f0fed5fc659bf1085b8b3
|
[] |
no_license
|
mnmythri/BasicPrograms
|
3f8ed7d383ff665b055620a26ee0b293acf70cfd
|
43505f574407c240d07df2b2fa6758ab0e78d978
|
refs/heads/master
| 2022-06-08T16:50:07.613445
| 2020-04-29T06:44:24
| 2020-04-29T06:44:24
| 257,574,159
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 472
|
java
|
package day11;
import java.util.ArrayList;
import java.util.Collections;
public class SortArrayListClass {
public static void main(String[] args) {
ArrayList<String> fruits = new ArrayList<String>();
fruits.add("Orange");
fruits.add("Apple");
fruits.add("Banana");
fruits.add("Pineapple");
Collections.sort(fruits);
for (String str : fruits) {
System.out.println(str);
}
}
}
|
[
"user.email"
] |
user.email
|
ead0bde079e9595c0a9d9e732531f30798c63ee3
|
b1c7d854d6a2257330b0ea137c5b4e24b2e5078d
|
/com/google/android/gms/internal/zzbku.java
|
b77208e1bacd711d3cdf552c944eea18b3a848df
|
[] |
no_license
|
nayebare/mshiriki_android_app
|
45fd0061332f5253584b351b31b8ede2f9b56387
|
7b6b729b5cbc47f109acd503b57574d48511ee70
|
refs/heads/master
| 2020-06-21T20:01:59.725854
| 2017-06-12T13:55:51
| 2017-06-12T13:55:51
| 94,205,275
| 1
| 1
| null | 2017-06-13T11:22:51
| 2017-06-13T11:22:51
| null |
UTF-8
|
Java
| false
| false
| 2,046
|
java
|
package com.google.android.gms.internal;
import android.content.Context;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import java.util.concurrent.TimeUnit;
public final class zzbku {
public static final zzapn<Boolean> zzbXh;
public static final zzapn<String> zzbXi;
public static final zzapn<Integer> zzbXj;
public static final zzapn<Integer> zzbXk;
public static final zzapn<Integer> zzbXl;
public static final zzapn<Long> zzbXm;
public static final zzapn<Long> zzbXn;
public static final zzapn<Long> zzbXo;
public static final zzapn<Integer> zzbXp;
public static final zzapn<Integer> zzbXq;
public static final zzapn<Long> zzbXr;
public static final zzapn<Integer> zzbXs;
public static final zzapn<Integer> zzbXt;
public static final zzapn<Integer> zzbXu;
static {
zzbXh = zzapn.zzb(0, "crash:enabled", Boolean.valueOf(true));
zzbXi = zzapn.zzc(0, "crash:gateway_url", "https://mobilecrashreporting.googleapis.com/v1/crashes:batchCreate?key=");
zzbXj = zzapn.zzb(0, "crash:log_buffer_capacity", 100);
zzbXk = zzapn.zzb(0, "crash:log_buffer_max_total_size", (int) AccessibilityNodeInfoCompat.ACTION_PASTE);
zzbXl = zzapn.zzb(0, "crash:crash_backlog_capacity", 5);
zzbXm = zzapn.zzb(0, "crash:crash_backlog_max_age", 604800000);
zzbXn = zzapn.zzb(0, "crash:starting_backoff", TimeUnit.SECONDS.toMillis(1));
zzbXo = zzapn.zzb(0, "crash:backoff_limit", TimeUnit.MINUTES.toMillis(60));
zzbXp = zzapn.zzb(0, "crash:retry_num_attempts", 12);
zzbXq = zzapn.zzb(0, "crash:batch_size", 5);
zzbXr = zzapn.zzb(0, "crash:batch_throttle", TimeUnit.MINUTES.toMillis(5));
zzbXs = zzapn.zzb(0, "crash:frame_depth", 60);
zzbXt = zzapn.zzb(0, "crash:receiver_delay", 100);
zzbXu = zzapn.zzb(0, "crash:thread_idle_timeout", 10);
}
public static final void initialize(Context context) {
zzapr.zzCQ();
zzapo.initialize(context);
}
}
|
[
"cwanziguya@gmail.com"
] |
cwanziguya@gmail.com
|
a6cb5bcfab1d94be0124f8a5bd8ce7ee790c2189
|
5258119b2dc75638dfda789909930601fbd18acd
|
/src/com/akudrin/io_8/Reverse.java
|
42f9fbff8bbde72b85b672e3996b53b4f49c4b76
|
[] |
no_license
|
akudrin/Java8_OCP_Exam
|
1ffacf3d244e77af26187ba1ab79e7c63e8ba119
|
91027f450b6ddebacb72a597e8e4d2f64040e2d5
|
refs/heads/master
| 2020-04-10T13:14:41.976168
| 2018-12-09T13:58:26
| 2018-12-09T13:58:26
| 161,045,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,408
|
java
|
package com.akudrin.io_8;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.*;
import java.net.*;
public class Reverse {
public static void main(String[] args) throws Exception {
System.out.println(args[0] + " " + args[1]);
if (args.length != 2) {
System.err.println("Usage: java Reverse "
+ "http://localhost:8080/ServletApp/ReverseServlet"
+ " string_to_reverse");
System.exit(1);
}
String stringToReverse = URLEncoder.encode(args[1], "UTF-8");
URL url = new URL(args[0]);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
try (OutputStreamWriter out = new OutputStreamWriter(
connection.getOutputStream())) {
out.write("string=" + stringToReverse);
}
try (BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()))) {
String decodedString;
while ((decodedString = in.readLine()) != null) {
System.out.println(decodedString);
}
}
}
}
|
[
"andreikudrin@gmail.com"
] |
andreikudrin@gmail.com
|
1374689e070a24e44dfc8ffdf032836e00b4b465
|
d1ea5077c83cb2e93fe69e3d19a2e26efe894a0e
|
/src/main/java/com/rograndec/feijiayun/chain/business/report/quality/storage/service/GoodsLockReportService.java
|
9513d43a719069d4672c32567fb63ed82e6ca395
|
[] |
no_license
|
Catfeeds/rog-backend
|
e89da5a3bf184e4636169e7492a97dfd0deef2a1
|
109670cfec6cbe326b751e93e49811f07045e531
|
refs/heads/master
| 2020-04-05T17:36:50.097728
| 2018-10-22T16:23:55
| 2018-10-22T16:23:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,215
|
java
|
package com.rograndec.feijiayun.chain.business.report.quality.storage.service;
import com.rograndec.feijiayun.chain.business.report.common.vo.BaseGoodsReportTotalVO;
import com.rograndec.feijiayun.chain.business.report.quality.storage.vo.GoodsLockReportVO;
import com.rograndec.feijiayun.chain.business.report.quality.storage.vo.RequestReportGoodsLockVO;
import com.rograndec.feijiayun.chain.common.Page;
import com.rograndec.feijiayun.chain.common.vo.UserVO;
import org.springframework.stereotype.Service;
import java.io.OutputStream;
/**
* 版权:融贯资讯 <br/>
* 作者:xingjian.lan@rograndec.com <br/>
* 生成日期:2017/10/19 <br/>
* 描述:商品锁定报表
*/
@Service
public interface GoodsLockReportService {
/**
* <根据条件查询商品锁定报表数据>
*/
Page getGoodsLockReportList(RequestReportGoodsLockVO requestGoodsLockListVo, Page page, UserVO userVO) throws Exception;
/**
* 导出商品锁定
* @param output
* @param goodsLockReportTotalVO
* @param userVO
*/
void excelExport(OutputStream output, BaseGoodsReportTotalVO<GoodsLockReportVO> goodsLockReportTotalVO, UserVO userVO);
}
|
[
"ruifeng.jia@rograndec.com"
] |
ruifeng.jia@rograndec.com
|
24111fbd14e604395d22272c0f664143fce0a2ed
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module608/src/main/java/module608packageJava0/Foo802.java
|
848ff1a67993d5e44af6755067d2aa31f4959a60
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 351
|
java
|
package module608packageJava0;
import java.lang.Integer;
public class Foo802 {
Integer int0;
Integer int1;
public void foo0() {
new module608packageJava0.Foo801().foo4();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
3b79413395d7e5091352895b38dabd59a3c372b5
|
fb96cac5c9dd130d94aea33583107346a31a22ba
|
/cloudmall-admin/src/main/java/io/renren/modules/sys/dao/SysRoleMenuDao.java
|
0a28dcc0837b4fb5225b511318ea472e9819d7ad
|
[] |
no_license
|
hungwen0425/cloudmall
|
4caf9699eb8b2fb5977555a49f8acef9c16ccf5d
|
8a9f131fb27f60b8b44a51879e6bb9368810542d
|
refs/heads/master
| 2023-04-15T20:34:37.975606
| 2021-05-03T05:48:17
| 2021-05-03T05:48:17
| 290,043,457
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 692
|
java
|
/**
* Copyright (c) 2016-2019 人人開源 All rights reserved.
*
* https://www.renren.io
*
* 版權所有,侵權必究!
*/
package io.renren.modules.sys.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.sys.entity.SysRoleMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色與選單對應關係
*
* @author hungwen.tseng@gmail.com
*/
@Mapper
public interface SysRoleMenuDao extends BaseMapper<SysRoleMenuEntity> {
/**
* 根據角色ID,取得選單ID列表
*/
List<Long> queryMenuIdList(Long roleId);
/**
* 根據角色ID陣列,批量删除
*/
int deleteBatch(Long[] roleIds);
}
|
[
"hungwen.tseng@gmail.com"
] |
hungwen.tseng@gmail.com
|
939f503e90930eee088d10d2b52e2bd94cc9a0a5
|
827bf064e482700d7ded2cd0a3147cb9657db883
|
/AndroidPOS/src/com/aadhk/restpos/d/bs.java
|
6a4642df7e97f7ac26d18f129b13d16765ab99c6
|
[] |
no_license
|
cody0117/LearnAndroid
|
d30b743029f26568ccc6dda4313a9d3b70224bb6
|
02fd4d2829a0af8a1706507af4b626783524813e
|
refs/heads/master
| 2021-01-21T21:10:18.553646
| 2017-02-12T08:43:24
| 2017-02-12T08:43:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,552
|
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.aadhk.restpos.d;
import android.widget.Toast;
import com.aadhk.product.library.a.c;
import com.aadhk.restpos.bean.POSPrinterSetting;
import com.aadhk.restpos.g.u;
import com.aadhk.restpos.util.f;
import com.aadhk.restpos.util.q;
import java.util.Map;
// Referenced classes of package com.aadhk.restpos.d:
// bq
final class bs
implements c
{
final bq a;
private Map b;
private bs(bq bq1)
{
a = bq1;
super();
}
bs(bq bq1, byte byte0)
{
this(bq1);
}
public final void a()
{
bq.a(a).setLogoName("");
com.aadhk.product.library.c.f.a(f.f);
b = bq.b(a).b(bq.a(a).getId(), bq.a(a).getLogoName());
}
public final void b()
{
String s = (String)b.get("serviceStatus");
if ("1".equals(s))
{
com.aadhk.restpos.d.bq.f(a);
Toast.makeText(bq.e(a), 0x7f0802c8, 1).show();
return;
}
if ("10".equals(s) || "11".equals(s))
{
q.a(bq.e(a));
Toast.makeText(bq.e(a), 0x7f080246, 1).show();
return;
}
if ("9".equals(s))
{
Toast.makeText(bq.e(a), 0x7f080248, 1).show();
return;
} else
{
Toast.makeText(bq.e(a), 0x7f080247, 1).show();
return;
}
}
}
|
[
"em3888@gmail.com"
] |
em3888@gmail.com
|
071b6e59daa5c34948c75bf4a074ad77615624bc
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE78_OS_Command_Injection/CWE78_OS_Command_Injection__PropertiesFile_09.java
|
1c43dea02766fa1f17a9dbd985701d522642abbb
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 7,070
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__PropertiesFile_09.java
Label Definition File: CWE78_OS_Command_Injection.label.xml
Template File: sources-sink-09.tmpl.java
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: PropertiesFile Read data from a .properties file (in property named data)
* GoodSource: A hardcoded string
* BadSink: exec dynamic command execution with Runtime.getRuntime().exec()
* Flow Variant: 09 Control flow: if(IO.static_final_t) and if(IO.static_final_f)
*
* */
package testcases.CWE78_OS_Command_Injection;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.Properties;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE78_OS_Command_Injection__PropertiesFile_09 extends AbstractTestCase
{
/* uses badsource and badsink */
public void bad() throws Throwable
{
String data;
if(IO.static_final_t)
{
data = ""; /* Initialize data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
/* POTENTIAL FLAW: Read data from a .properties file */
data = props.getProperty("data");
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally
{
/* Close stream reading object */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded string */
data = "foo";
}
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process p = Runtime.getRuntime().exec(osCommand + data);
p.waitFor();
}
/* goodG2B1() - use goodsource and badsink by changing IO.static_final_t to IO.static_final_f */
private void goodG2B1() throws Throwable
{
String data;
if(IO.static_final_f)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = ""; /* Initialize data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
/* POTENTIAL FLAW: Read data from a .properties file */
data = props.getProperty("data");
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally
{
/* Close stream reading object */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
else {
/* FIX: Use a hardcoded string */
data = "foo";
}
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process p = Runtime.getRuntime().exec(osCommand + data);
p.waitFor();
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2() throws Throwable
{
String data;
if(IO.static_final_t)
{
/* FIX: Use a hardcoded string */
data = "foo";
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = ""; /* Initialize data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try {
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
/* POTENTIAL FLAW: Read data from a .properties file */
data = props.getProperty("data");
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally {
/* Close stream reading object */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
String osCommand;
if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0)
{
/* running on Windows */
osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir ";
}
else
{
/* running on non-Windows */
osCommand = "/bin/ls ";
}
/* POTENTIAL FLAW: command injection */
Process p = Runtime.getRuntime().exec(osCommand + data);
p.waitFor();
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
a2f367600523b37bb18375bace63e3800d5b1c42
|
57e336ee001e59a350c919877d79886b2af8f2ef
|
/app/src/main/java/com/gsatechworld/spexkart/adapter/AddressAdapter.java
|
0f18cd72c0d74593b90ec5fbd1d90ca85d9c9e9c
|
[] |
no_license
|
dprasad554/Spexkart
|
e3588d516cbc92aa0a2050e239c08b23612902ae
|
e964d0bd8d699eadd7495a8e3811da426adc9c21
|
refs/heads/master
| 2023-04-20T00:25:27.455758
| 2021-05-03T09:04:05
| 2021-05-03T09:04:05
| 363,872,584
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,108
|
java
|
package com.gsatechworld.spexkart.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView;
import com.google.gson.Gson;
import com.gsatechworld.spexkart.R;
import com.gsatechworld.spexkart.activity.AddAddressActivity;
import com.gsatechworld.spexkart.activity.CheckOutActivity;
import com.gsatechworld.spexkart.activity.ProductDetailsActivity;
import com.gsatechworld.spexkart.activity.SizeGuideActivity;
import com.gsatechworld.spexkart.beans.addresslist.AddressList;
import java.util.ArrayList;
public class AddressAdapter extends RecyclerView.Adapter<AddressAdapter.ViewHolder> {
//Variables
private Context context;
AddressList addressList;
UserAddress userAddress;
String action;
private int checkedPosition = -1;
public interface UserAddress {
void Addresslist(String address_id,String action,String position);
}
public AddressAdapter(Context context,AddressList addressList,UserAddress userAddress) {
this.context = context;
this.addressList = addressList;
this.userAddress = userAddress;
}
@NonNull
@Override
public AddressAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_addresslist,parent,false);
return new AddressAdapter.ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull final AddressAdapter.ViewHolder holder, final int position) {
holder.tv_name.setText(addressList.getAddressList().get(position).getContactName());
final String address = addressList.getAddressList().get(position).getLocality()+","+
addressList.getAddressList().get(position).getLandmark()+","+addressList.getAddressList().get(position).getCity()+
","+addressList.getAddressList().get(position).getState()+","+addressList.getAddressList().get(position).getPincode()+","+
addressList.getAddressList().get(position).getCountry();
holder.tv_address.setText(address);
holder.tv_mobile.setText(addressList.getAddressList().get(position).getMobileNumber());
holder.btnEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(context, AddAddressActivity.class);
intent.putExtra("address_details",(String)new Gson().toJson(addressList.getAddressList().get(position)));
context.startActivity(intent);
}
});
holder.btndelete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
action = "delete";
userAddress.Addresslist(addressList.getAddressList().get(position).getId().toString(),action, String.valueOf(position));
}
});
if(addressList.getAddressList().get(position).getStatus()==0){
}else {
holder.ll_address.setBackgroundResource(R.drawable.square_drawable_red);
}
holder.ll_address.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (checkedPosition != -1 && checkedPosition != position) {
addressList.getAddressList().get(checkedPosition).setStatus(0);
notifyItemChanged(checkedPosition);
}
addressList.getAddressList().get(position).setStatus(1);
notifyItemChanged(position);
checkedPosition = position;
action = "select";
userAddress.Addresslist(addressList.getAddressList().get(position).getId().toString(),action, String.valueOf(position));
}
});
}
@Override
public int getItemCount() {
return addressList.getAddressList().size();
}
public class ViewHolder extends RecyclerView.ViewHolder{
TextView tv_name,tv_address,tv_mobile;
Button btnEdit,btndelete;
LinearLayout ll_address;
public ViewHolder(@NonNull View itemView) {
super(itemView);
tv_name = itemView.findViewById(R.id.tv_name);
tv_address = itemView.findViewById(R.id.tv_address);
tv_mobile = itemView.findViewById(R.id.tv_mobile);
btnEdit = itemView.findViewById(R.id.btnEdit);
btndelete = itemView.findViewById(R.id.btndelete);
ll_address = itemView.findViewById(R.id.ll_address);
}
}
}
|
[
"rohitkumar.kr92@gmail.com"
] |
rohitkumar.kr92@gmail.com
|
96713951bb2c1021656b1a32ec10c9bf7223e3ef
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_4bb6fa9e8763d2e9094ece07b849cde9009be39f/TypesTest/6_4bb6fa9e8763d2e9094ece07b849cde9009be39f_TypesTest_s.java
|
81f3ef11babb1359023cbc435ee31e66da68acf6
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,385
|
java
|
package org.genericsystem.test;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import org.genericsystem.core.Cache;
import org.genericsystem.core.Generic;
import org.genericsystem.example.Example.MyVehicle;
import org.genericsystem.example.Example.Vehicle;
import org.genericsystem.generic.Attribute;
import org.genericsystem.generic.Holder;
import org.genericsystem.generic.Link;
import org.genericsystem.generic.Relation;
import org.genericsystem.generic.Type;
import org.genericsystem.map.ConstraintsMapProvider;
import org.genericsystem.myadmin.beans.GuiGenericsTreeBean;
import org.genericsystem.myadmin.beans.Structural;
import org.genericsystem.myadmin.beans.StructuralImpl;
import org.testng.annotations.Test;
@Test
public class TypesTest extends AbstractTest {
@Inject
private Cache cache;
@Inject
private GuiGenericsTreeBean genericTreeBean;
public void testExample() {
Generic vehicle = cache.find(Vehicle.class);
Generic myVehicle = cache.find(MyVehicle.class);
assert myVehicle.inheritsFrom(vehicle);
assert vehicle.getInheritings().contains(myVehicle);
}
public void testGetAttributes() {
Type human = cache.setType("Human");
Generic michael = human.newInstance("Michael");
Generic quentin = human.newInstance("Quentin");
Relation isBrotherOf = human.setRelation("isBrotherOf", human);
// isBrotherOf.enableMultiDirectional();
quentin.bind(isBrotherOf, michael);
List<Structural> structurals = new ArrayList<>();
for (Attribute attribute : ((Type) quentin).getAttributes()) {
structurals.add(new StructuralImpl(attribute, 0));
}
assert structurals.size() >= 2 : structurals.size();
assert structurals.contains(new StructuralImpl(isBrotherOf, 0));
List<Structural> structurals2 = new ArrayList<>();
for (Attribute attribute : ((Type) quentin).getAttributes()) {
structurals2.add(new StructuralImpl(attribute, 0));
}
assert structurals2.size() >= 2 : structurals2.size();
assert structurals2.contains(new StructuralImpl(isBrotherOf, 0));
}
public void testGetOtherTargets() {
Type human = cache.setType("Human");
Generic michael = human.newInstance("Michael");
Generic quentin = human.newInstance("Quentin");
Relation isBrotherOf = human.setRelation("isBrotherOf", human);
// isBrotherOf.enableMultiDirectional();
Link link = quentin.bind(isBrotherOf, michael);
List<Generic> targetsFromQuentin = quentin.getOtherTargets(link);
assert targetsFromQuentin.size() == 1 : targetsFromQuentin.size();
assert targetsFromQuentin.contains(michael);
assert !targetsFromQuentin.contains(quentin);
List<Generic> targetsFromMichael = michael.getOtherTargets(link);
assert targetsFromMichael.size() == 1 : targetsFromMichael.size();
assert targetsFromMichael.contains(quentin);
assert !targetsFromMichael.contains(michael);
}
public void testContraint() {
Type vehicle = cache.setType("Vehicle");
Attribute vehiclePower = vehicle.setProperty("power");
Generic myVehicle = vehicle.newInstance("myVehicle");
myVehicle.getMap(ConstraintsMapProvider.class);
Holder myVehicle123 = myVehicle.setValue(vehiclePower, "123");
myVehicle.cancel(myVehicle123);
assert !myVehicle123.isAlive();
vehicle.cancel(vehiclePower);
assert !vehiclePower.isAlive();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ae396448bba0f3314e6c11875353686a0a61a00f
|
3b74fbedd3001512dfe49bc0f5a18090c2e34564
|
/hvip-common-api/src/main/java/com/huazhu/hvip/common/vo/WxMenuVO.java
|
0d7b4a996280a1021c802d7935f8a1be7e239e6e
|
[] |
no_license
|
xuelu520/cjiaclean-core
|
b148a78da67b45a0c0e5d5cf07c67b5cfc6d47dc
|
a96f574a8ec2b4ab7884130461671f095762995a
|
refs/heads/master
| 2020-03-27T10:19:57.138235
| 2017-11-16T01:41:23
| 2017-11-16T01:41:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,432
|
java
|
package com.huazhu.hvip.common.vo;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @author cmy
* @create 2017-08-03 10:17
**/
public class WxMenuVO implements Serializable {
private Long wxMenuId;
private String menuName;
private String menuType;
private String menuKey;
private String authorize;
private String url;
private Long parentId;
private List<WxMenuVO> children;
private Date createTime;
private String createUser;
private Date updateTime;
private String updateUser;
public String getAuthorize() {
return authorize;
}
public void setAuthorize(String authorize) {
this.authorize = authorize;
}
public Long getWxMenuId() {
return wxMenuId;
}
public void setWxMenuId(Long wxMenuId) {
this.wxMenuId = wxMenuId;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getMenuType() {
return menuType;
}
public void setMenuType(String menuType) {
this.menuType = menuType;
}
public String getMenuKey() {
return menuKey;
}
public void setMenuKey(String menuKey) {
this.menuKey = menuKey;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUser() {
return updateUser;
}
public void setUpdateUser(String updateUser) {
this.updateUser = updateUser;
}
public List<WxMenuVO> getChildren() {
return children;
}
public void setChildren(List<WxMenuVO> children) {
this.children = children;
}
}
|
[
"zxc,./123"
] |
zxc,./123
|
a38b327b8958465a2124b850b1b7da05c9c51a6f
|
c83d0b6dabfcdcff8699a2696cc9bf5c2ea48c7f
|
/src/main/java/com/test/service/Greeting.java
|
7a6acd6aeb6086f356a3396d30f2f4884a159af7
|
[] |
no_license
|
zongweiyang/WebsocketTest
|
e532627c8267ebfb43fc35c06efaf306b0e239b3
|
3152dc120e0ee2078b87ca0c3b856cdbd8106c3d
|
refs/heads/master
| 2021-01-10T01:47:25.293530
| 2016-08-13T00:43:13
| 2016-08-13T00:43:13
| 49,779,982
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package com.test.service;
/**
* Created by yzw on 2016/1/18.
* message content
*/
public class Greeting {
private String content;
public Greeting(String content) {
this.content = content;
}
public String getContent(){
return this.content;
}
}
|
[
"yzwok@sina.cn"
] |
yzwok@sina.cn
|
03038f93a7a850c71c71fde9f9f1a4ee5828faac
|
7c20e36b535f41f86b2e21367d687ea33d0cb329
|
/Capricornus/src/com/gopawpaw/erp/hibernate/s/ScMstrDAO.java
|
957979a80b378e534eaea98e2895a7f2f2402705
|
[] |
no_license
|
fazoolmail89/gopawpaw
|
50c95b924039fa4da8f309e2a6b2ebe063d48159
|
b23ccffce768a3d58d7d71833f30b85186a50cc5
|
refs/heads/master
| 2016-09-08T02:00:37.052781
| 2014-05-14T11:46:18
| 2014-05-14T11:46:18
| 35,091,153
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,942
|
java
|
package com.gopawpaw.erp.hibernate.s;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
/**
* A data access object (DAO) providing persistence and search support for
* ScMstr entities. Transaction control of the save(), update() and delete()
* operations can directly support Spring container-managed transactions or they
* can be augmented to handle user-managed Spring transactions. Each of these
* methods provides additional information for how to configure it for the
* desired type of transaction control.
*
* @see com.gopawpaw.erp.hibernate.s.ScMstr
* @author MyEclipse Persistence Tools
*/
public class ScMstrDAO extends HibernateDaoSupport {
private static final Log log = LogFactory.getLog(ScMstrDAO.class);
protected void initDao() {
// do nothing
}
public void save(ScMstr transientInstance) {
log.debug("saving ScMstr instance");
try {
getHibernateTemplate().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(ScMstr persistentInstance) {
log.debug("deleting ScMstr instance");
try {
getHibernateTemplate().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public ScMstr findById(com.gopawpaw.erp.hibernate.s.ScMstrId id) {
log.debug("getting ScMstr instance with id: " + id);
try {
ScMstr instance = (ScMstr) getHibernateTemplate().get(
"com.gopawpaw.erp.hibernate.s.ScMstr", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(ScMstr instance) {
log.debug("finding ScMstr instance by example");
try {
List results = getHibernateTemplate().findByExample(instance);
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding ScMstr instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from ScMstr as model where model."
+ propertyName + "= ?";
return getHibernateTemplate().find(queryString, value);
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findAll() {
log.debug("finding all ScMstr instances");
try {
String queryString = "from ScMstr";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public ScMstr merge(ScMstr detachedInstance) {
log.debug("merging ScMstr instance");
try {
ScMstr result = (ScMstr) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(ScMstr instance) {
log.debug("attaching dirty ScMstr instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(ScMstr instance) {
log.debug("attaching clean ScMstr instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public static ScMstrDAO getFromApplicationContext(ApplicationContext ctx) {
return (ScMstrDAO) ctx.getBean("ScMstrDAO");
}
}
|
[
"ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5"
] |
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
|
46b8752e8ae8d2ab1480a31c05e6b9a38f3f69d4
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/grade/9c9308d4cdf5bc5dfe6efc2b1a9c9bc9a44fbff73c5367c97e3be37861bbb3ba9ac7ad3ddec74dc66e34fe8f0804e46186819b4e90e8f9a59d1b82d9cf0a6218/007/mutations/60/grade_9c9308d4_007.java
|
597c6741bd6238816117e4c489ff841eed6977fe
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,418
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class grade_9c9308d4_007 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
grade_9c9308d4_007 mainClass = new grade_9c9308d4_007 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
DoubleObj A = new DoubleObj (), B = new DoubleObj (), C =
new DoubleObj (), D = new DoubleObj(value)
, studentscore = new DoubleObj ();
CharObj lettergrade = new CharObj ();
output +=
(String.format
("Enter thresholds for A, B, C, D \nin that order, decreasing percentages > Thank you. "));
A.value = scanner.nextDouble ();
B.value = scanner.nextDouble ();
C.value = scanner.nextDouble ();
D.value = scanner.nextDouble ();
output += (String.format ("Now enter student score (perecnt) >"));
studentscore.value = scanner.nextDouble ();
if (studentscore.value >= A.value) {
lettergrade.value = 'A';
} else if (studentscore.value >= B.value) {
lettergrade.value = 'B';
} else if (studentscore.value >= C.value) {
lettergrade.value = 'C';
} else if (studentscore.value >= D.value) {
lettergrade.value = 'D';
} else {
lettergrade.value = 'F';
}
output +=
(String.format ("Student has an %c grade\n", lettergrade.value));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
51ab0875a93a0f1414e2f04caeff284735697fcd
|
8b3356787d18e3a28cfc8fb1d26f0c3b42fcdd10
|
/src/Tridion/ContentManager/CoreService/Client/DeleteTaxonomyNodeMode.java
|
7dc7659d7cf926a935b892ba1bac6204da9b9553
|
[] |
no_license
|
Javonet-io-user/3f371929-ca97-4d2c-8d99-7483da08ce0f
|
0e0b75aa8df218e25eeca56d6508fdcb2c698946
|
36b8d7a0267ca29f1921b83ed6534a110ac42cf7
|
refs/heads/master
| 2020-07-03T23:55:37.546059
| 2019-08-13T07:45:15
| 2019-08-13T07:45:15
| 202,091,767
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
package Tridion.ContentManager.CoreService.Client;
public enum DeleteTaxonomyNodeMode {
DeleteBranch(0L),
DeleteBranchIncludeChildPublications(1L),
RemoveParentFromChildren(2L),
AssignChildrenToGrandparents(3L),
;
private long numVal;
DeleteTaxonomyNodeMode(long numVal) {
this.numVal = numVal;
}
public long getNumVal() {
return numVal;
}
}
|
[
"support@javonet.com"
] |
support@javonet.com
|
f8f8a8e091d9d709584b519dec414b95e0c52696
|
cca87c4ade972a682c9bf0663ffdf21232c9b857
|
/com/tencent/mm/plugin/setting/ui/setting/PersonalPreference.java
|
47e37d29f99503bed66558fd96e95113d169fbf4
|
[] |
no_license
|
ZoranLi/wechat_reversing
|
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
|
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
|
refs/heads/master
| 2021-07-05T01:17:20.533427
| 2017-09-25T09:07:33
| 2017-09-25T09:07:33
| 104,726,592
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,462
|
java
|
package com.tencent.mm.plugin.setting.ui.setting;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.tencent.mm.R;
import com.tencent.mm.pluginsdk.ui.a.b;
import com.tencent.mm.pluginsdk.ui.d.h;
import com.tencent.mm.sdk.platformtools.bg;
import com.tencent.mm.storage.x;
import com.tencent.mm.ui.base.preference.Preference;
public class PersonalPreference extends Preference {
private String fSe;
private String gtR;
Bitmap hqW = null;
private TextView jZz = null;
ImageView lMX = null;
private TextView piH = null;
int piI = -1;
String piJ = null;
private OnClickListener piK;
private String username;
public PersonalPreference(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public PersonalPreference(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
setLayoutResource(R.i.diC);
setWidgetLayoutResource(R.i.djm);
}
public final View onCreateView(ViewGroup viewGroup) {
View onCreateView = super.onCreateView(viewGroup);
ViewGroup viewGroup2 = (ViewGroup) onCreateView.findViewById(R.h.content);
viewGroup2.removeAllViews();
View.inflate(this.mContext, R.i.diQ, viewGroup2);
return onCreateView;
}
public final void onBindView(View view) {
if (this.lMX == null) {
this.lMX = (ImageView) view.findViewById(R.h.bWV);
}
if (this.hqW != null) {
this.lMX.setImageBitmap(this.hqW);
} else if (this.piI > 0) {
this.lMX.setImageResource(this.piI);
} else if (this.piJ != null) {
b.a(this.lMX, this.piJ);
}
this.lMX.setOnClickListener(this.piK);
if (!(this.jZz == null || this.fSe == null)) {
this.jZz.setText(h.b(this.mContext, this.fSe, this.jZz.getTextSize()));
}
if (this.piH != null) {
String str = bg.mA(this.gtR) ? this.username : this.gtR;
if (bg.mA(this.gtR) && x.QQ(this.username)) {
this.piH.setVisibility(8);
}
this.piH.setText(this.mContext.getString(R.l.dHi) + str);
}
super.onBindView(view);
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
e1854eae081deeda16d4dffca3b5196381e0c764
|
97b361864cf3a44ec62dcc893c456ccdb6fa55a9
|
/src/com/yufan/pojo/TbRoleFunction.java
|
77b391aa5224ec24771deae94f9bf4bf9dca4d5f
|
[] |
no_license
|
lirf2018/rs_store_manage
|
63d1aa30ebc11260f34c0408c24c8970bdc5933c
|
8b0f0e6618df4ce692450e25a7e693c6c53e05fe
|
refs/heads/master
| 2020-06-24T23:36:16.069642
| 2019-07-09T02:37:54
| 2019-07-09T02:38:26
| 195,915,502
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,648
|
java
|
package com.yufan.pojo;
import java.util.Date;
/**
* TbRoleFunction entity. @author MyEclipse Persistence Tools
*/
public class TbRoleFunction implements java.io.Serializable {
// Fields
private Integer roleFunctionId;
private Integer roleId;
private Integer functionId;
private String createman;
private Date createtime;
// Constructors
/**
* default constructor
*/
public TbRoleFunction() {
}
/**
* full constructor
*/
public TbRoleFunction(Integer roleId, Integer functionId, String createman,
Date createtime) {
this.roleId = roleId;
this.functionId = functionId;
this.createman = createman;
this.createtime = createtime;
}
// Property accessors
public Integer getRoleFunctionId() {
return this.roleFunctionId;
}
public void setRoleFunctionId(Integer roleFunctionId) {
this.roleFunctionId = roleFunctionId;
}
public Integer getRoleId() {
return this.roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public Integer getFunctionId() {
return this.functionId;
}
public void setFunctionId(Integer functionId) {
this.functionId = functionId;
}
public String getCreateman() {
return this.createman;
}
public void setCreateman(String createman) {
this.createman = createman;
}
public Date getCreatetime() {
return this.createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
}
|
[
"512164882@qq.com"
] |
512164882@qq.com
|
89f6e47627bf23035ed126f50236ccec4045318d
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/gradle--gradle/0b643d2767ccef06763829a27fc07d642cbe4c64/after/GradlePropertiesConfigurer.java
|
774f6977b6d4cec790955d9b208d47215c214df0
|
[] |
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,679
|
java
|
/*
* Copyright 2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.launcher.daemon.configuration;
import org.gradle.StartParameter;
import java.io.File;
import java.util.Map;
/**
* by Szczepan Faber, created at: 1/22/13
*/
public class GradlePropertiesConfigurer {
public GradleProperties prepareProperties(File projectDir, boolean searchUpwards, File gradleUserHomeDir, Map<?, ?> systemProperties) {
return new GradleProperties()
.configureFromBuildDir(projectDir, searchUpwards)
.configureFromGradleUserHome(gradleUserHomeDir)
.configureFromSystemProperties(systemProperties);
}
public DaemonParameters configureParameters(StartParameter startParameter) {
DaemonParameters out = new DaemonParameters();
GradleProperties properties = this.prepareProperties(startParameter.getCurrentDir(), startParameter.isSearchUpwards(), startParameter.getGradleUserHomeDir(), startParameter.getMergedSystemProperties());
properties.updateStartParameter(startParameter);
out.configureFrom(properties);
return out;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
b5f3bcf0b49441bfbc3b425db8aeefa9871ddcf8
|
58df55b0daff8c1892c00369f02bf4bf41804576
|
/src/gia.java
|
76d37b62a2bee0155469324af24e3b9794c0b476
|
[] |
no_license
|
gafesinremedio/com.google.android.gm
|
0b0689f869a2a1161535b19c77b4b520af295174
|
278118754ea2a262fd3b5960ef9780c658b1ce7b
|
refs/heads/master
| 2020-05-04T15:52:52.660697
| 2016-07-21T03:39:17
| 2016-07-21T03:39:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 501
|
java
|
import android.content.ContentResolver;
import android.os.Handler;
import android.os.Looper;
final class gia
extends Thread
{
gia(String paramString, ContentResolver paramContentResolver)
{
super(paramString);
}
public final void run()
{
Looper.prepare();
a.registerContentObserver(ghz.a, true, new gib(this, new Handler(Looper.myLooper())));
Looper.loop();
}
}
/* Location:
* Qualified Name: gia
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.