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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
301374606f8dc8c7cff4204bde436b8257cf51fa | 23f42b163c0a58ad61c38498befa1219f53a2c10 | /src/main/java/weldstartup/a/AppScopedBean0821.java | 24ed048dcc6b4cb5975879b87e19809ad9be25fb | [] | no_license | 99sono/wls-jsf-2-2-12-jersey-weldstartup-bottleneck | 9637d2f14a1053159c6fc3c5898a91057a65db9d | b81697634cceca79f1b9a999002a1a02c70b8648 | refs/heads/master | 2021-05-15T17:54:39.040635 | 2017-10-24T07:27:23 | 2017-10-24T07:27:23 | 107,673,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,630 | java | package weldstartup.a;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import javax.transaction.TransactionSynchronizationRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import weldstartup.nondynamicclasses.AppScopedNonDynamicBean;
import weldstartup.nondynamicclasses.DependentScopedNonDynamicBean;
import weldstartup.nondynamicclasses.RequestScopedNonDynamicBean;
/**
* A dynamically created CDI bean meant to demonstrate meant to demonstrate that the WeldStartup performance on weblogic
* is really under-performing.
*
*/
@ApplicationScoped
// appScopedName will be turned into a name like AppScopedBean0001
public class AppScopedBean0821 {
private static final Logger LOGGER = LoggerFactory.getLogger(AppScopedBean0821.class);
@Inject
AppScopedNonDynamicBean appScopedNonDynamicBean;
@Inject
DependentScopedNonDynamicBean rependentScopedNonDynamicBean;
@Inject
RequestScopedNonDynamicBean requestScopedNonDynamicBean;
@Inject
BeanManager beanManager;
@Resource
TransactionSynchronizationRegistry tsr;
@PostConstruct
public void postConstruct() {
LOGGER.info("Post construct method invoked. AppScopedBean0821");
}
@PreDestroy
public void preDestroy() {
LOGGER.info("Pre-destroy method invoked. AppScopedBean0821");
}
public void dummyLogic() {
LOGGER.info("Dummy logic invoked. AppScopedBean0821");
}
}
| [
"99sono@users.noreply.github.com"
] | 99sono@users.noreply.github.com |
bd4e191a11aa8787863461b7e9bc7a90e06deee9 | a651a2bcaa8cc1400d78da92a0ae24fdb5ebf676 | /org.activiti.designer.gui/src/main/java/org/activiti/designer/property/PropertyDataPropertyFilter.java | 85de559d2e447226817ccd3480cfaef0075188a6 | [] | no_license | chrisrobbo/Activiti-Designer | 3612af031324d2c701e031ef3a3c1af0f01d6b29 | 051b1d6d262b8cdb5c39f764237c0e91b038498f | refs/heads/master | 2020-12-30T22:56:16.300038 | 2018-10-18T00:18:09 | 2018-10-18T00:18:09 | 56,194,583 | 0 | 1 | null | 2016-04-14T00:17:10 | 2016-04-14T00:17:10 | null | UTF-8 | Java | false | false | 497 | java | package org.activiti.designer.property;
import org.activiti.bpmn.model.SubProcess;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class PropertyDataPropertyFilter extends ActivitiPropertyFilter {
@Override
protected boolean accept(PictogramElement pe) {
Object bo = getBusinessObject(pe);
if (pe instanceof Diagram) {
return true;
} else if (bo instanceof SubProcess) {
return true;
}
return false;
}
}
| [
"tijs.rademakers@gmail.com"
] | tijs.rademakers@gmail.com |
3ad4440e7f1f82dd432a3f8bf0053f76888dce30 | 26ee104ade4ed89db571535f51b07e4880251a16 | /slyak-group/src/main/java/com/slyak/group/dao/GroupAccessDao.java | 3b7501d06d4eecbb6e633fd201f5a2856bb2939b | [] | no_license | stormning/slyak | db5b22304bc1d68c08a78547993ffb47b9005987 | 645286c951de9b264853850d28e250d1e796230d | refs/heads/master | 2020-04-10T16:17:04.159284 | 2014-03-21T03:01:12 | 2014-03-21T03:01:12 | 9,048,753 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 501 | java | /**
* Project name : slyak-group
* File name : GroupAccessDao.java
* Package name : com.slyak.group.dao
* Date : 2013-11-27
* Copyright : 2013 , SLYAK.COM All Rights Reserved
* Author : stormning@163.com
*/
package com.slyak.group.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import com.slyak.group.model.GroupAccess;
public interface GroupAccessDao extends JpaRepository<GroupAccess, Long> {
List<GroupAccess> findByGroupId(Long groupId);
}
| [
"stormning@163.com"
] | stormning@163.com |
730fd7294e864e4a61e60a8bc3d1bf6399e3d423 | d4bf818fb304449a7e703d679daf19d6b3035ee5 | /src/main/java/com/appCrawler/pagePro/fullstack/Qianzhan.java | 60f93c63beb03f5204b0e8c122ca57814ee1cc23 | [] | no_license | muyundefeng/SpringLearning | 11524d754c97bf20f18c5810556b084200d4da70 | 15821700372be76d33ca943c38c76d7117c489d2 | refs/heads/master | 2020-04-06T05:01:16.391956 | 2016-10-25T02:58:02 | 2016-10-25T02:58:02 | 57,977,720 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,257 | java | package com.appCrawler.pagePro.fullstack;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.appCrawler.pagePro.apkDetails.Apk3310_Detail;
import com.appCrawler.pagePro.apkDetails.Qianzhan_Detail;
import com.appCrawler.utils.PropertiesUtil;
import com.google.common.collect.Sets;
import us.codecraft.webmagic.Apk;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.processor.PageProcessor;
import us.codecraft.webmagic.utils.PageProUrlFilter;
/**
* 前瞻之家
* 网站主页:http://www.qianzhan.com/
* Aawap #598
* @author lisheng
*/
public class Qianzhan implements PageProcessor{
Site site = Site.me().setCharset("utf-8").setRetryTimes(PropertiesUtil.getRetryTimes()).
setSleepTime(PropertiesUtil.getInterval());
private Logger LOGGER = LoggerFactory.getLogger(Qianzhan.class);
public Apk process(Page page) {
if("http://www.qianzhan.com/".equals(page.getUrl().toString()))
{
page.addTargetRequest("http://yx.qianzhan.com/game/search?q=&type=&theme=&classify=&dimensions=&pn=1");
return null;
}
if(page.getHtml().links().regex("http://yx.qianzhan.com/game/search\\?q=&type=&theme=&classify=&dimensions=&pn=\\d+").match())
{
//List<String> categoryList=page.getHtml().xpath("//div[@class='apply-menu']/ul/li/a/@href").all();
List<String> apps=page.getHtml().links("//div[@class='g_list']").all();
//apps.addAll(categoryList);
apps.addAll(apps);
System.out.println(apps);
Set<String> cacheSet = Sets.newHashSet();
cacheSet.addAll(apps);
for(String url : cacheSet){
if(PageProUrlFilter.isUrlReasonable(url)){
page.addTargetRequest(url);
}
}
}
//提取页面信息
if(page.getUrl().regex("http://yx.qianzhan.com/game/page/.*").match())
{
Apk apk = Qianzhan_Detail.getApkDetail(page);
page.putField("apk", apk);
if(page.getResultItems().get("apk") == null){
page.setSkip(true);
}
}
else{
page.setSkip(true);
}
return null;
}
@Override
public List<Apk> processMulti(Page page) {
// TODO Auto-generated method stub
return null;
}
public Site getSite() {
return site;
}
}
| [
"2533604335@qq.com"
] | 2533604335@qq.com |
03aca01a4f2ac674510e6eddc1cacc20fae3b2d6 | b844043af2a13e24c9a322dbb4afc51af7cf8dcc | /ib-terminal-api/src/main/java/com/henyep/ib/terminal/api/dto/db/MarginOutBean.java | 0f7cb79b3aee9e6c081e7c1f698e4b1f62861e88 | [] | no_license | oscarYeung/ib_terminal | 37b372ab9d33f4b029ee9a02bc519c0cc7e31c38 | c83e464752e45aa356f1aad24ed2f2f5066b2e90 | refs/heads/master | 2022-12-24T04:49:03.603352 | 2019-12-11T04:09:26 | 2019-12-11T04:09:26 | 218,199,664 | 1 | 2 | null | 2022-12-16T09:45:08 | 2019-10-29T03:49:19 | Java | UTF-8 | Java | false | false | 4,808 | java | package com.henyep.ib.terminal.api.dto.db;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.henyep.ib.terminal.api.global.Constants;
public class MarginOutBean {
private Integer id;
private String brand_code;
private String category;
private String method;
private String account;
private String currency;
private Double amount;
private String account_currency;
private Double exchange_rate;
private Double account_amount;
@JsonFormat(pattern = Constants.FORMAT_DATETIME)
private Date trade_date;
private String status;
private String comment;
private String batch_file_id;
private String create_user;
@JsonFormat(pattern = Constants.FORMAT_DATETIME)
private Date create_time;
private String last_update_user;
@JsonFormat(pattern = Constants.FORMAT_DATETIME)
private Date last_update_time;
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setBrand_code(String brand_code) {
this.brand_code = brand_code;
}
public String getBrand_code() {
return brand_code;
}
public void setCategory(String category) {
this.category = category;
}
public String getCategory() {
return category;
}
public void setMethod(String method) {
this.method = method;
}
public String getMethod() {
return method;
}
public void setAccount(String account) {
this.account = account;
}
public String getAccount() {
return account;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getCurrency() {
return currency;
}
public void setAmount(Double amount) {
this.amount = amount;
}
public Double getAmount() {
return amount;
}
public void setAccount_currency(String account_currency) {
this.account_currency = account_currency;
}
public String getAccount_currency() {
return account_currency;
}
public void setExchange_rate(Double exchange_rate) {
this.exchange_rate = exchange_rate;
}
public Double getExchange_rate() {
return exchange_rate;
}
public void setAccount_amount(Double account_amount) {
this.account_amount = account_amount;
}
public Double getAccount_amount() {
return account_amount;
}
public void setTrade_date(Date trade_date) {
this.trade_date = trade_date;
}
public Date getTrade_date() {
return trade_date;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getComment() {
return comment;
}
public void setCreate_user(String create_user) {
this.create_user = create_user;
}
public String getCreate_user() {
return create_user;
}
public void setCreate_time(Date create_time) {
this.create_time = create_time;
}
public Date getCreate_time() {
return create_time;
}
public void setLast_update_user(String last_update_user) {
this.last_update_user = last_update_user;
}
public String getLast_update_user() {
return last_update_user;
}
public void setLast_update_time(Date last_update_time) {
this.last_update_time = last_update_time;
}
public Date getLast_update_time() {
return last_update_time;
}
public String getBatch_file_id() {
return batch_file_id;
}
public void setBatch_file_id(String batch_file_id) {
this.batch_file_id = batch_file_id;
}
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("id: " + id + ", ");
if (brand_code != null)
builder.append("brand_code: " + brand_code + ", ");
if (category != null)
builder.append("category: " + category + ", ");
if (method != null)
builder.append("method: " + method + ", ");
if (account != null)
builder.append("account: " + account + ", ");
if (currency != null)
builder.append("currency: " + currency + ", ");
builder.append("amount: " + amount + ", ");
if (account_currency != null)
builder.append("account_currency: " + account_currency + ", ");
builder.append("exchange_rate: " + exchange_rate + ", ");
builder.append("account_amount: " + account_amount + ", ");
if (trade_date != null)
builder.append("trade_date: " + trade_date.toString() + ", ");
if (status != null)
builder.append("status: " + status + ", ");
if (comment != null)
builder.append("comment: " + comment + ", ");
if (create_user != null)
builder.append("create_user: " + create_user + ", ");
if (create_time != null)
builder.append("create_time: " + create_time.toString() + ", ");
if (last_update_user != null)
builder.append("last_update_user: " + last_update_user + ", ");
if (last_update_time != null)
builder.append("last_update_time: " + last_update_time.toString() + ", ");
return builder.toString();
}
}
| [
"oscar.yeung@gmail.com"
] | oscar.yeung@gmail.com |
22c4c5775956197e94930d0e43003b49ec6bb42d | caddff9764c16aee4f0b7364a15c94710e6f43f8 | /app/build/generated/data_binding_base_class_source_out/debug/out/ontime/app/databinding/ActivityCartpendingBinding.java | 2ab24db87da9a8c19635e960e0154b476ef9da54 | [] | no_license | sumitkumarc/maindata | 451ea583bfc7ade8f5a99777f852563b23ae94cd | 3548e5124d20d504631a58d2be5cbc56f108f444 | refs/heads/master | 2023-02-28T04:15:29.496699 | 2021-02-03T02:24:08 | 2021-02-03T02:24:08 | 331,492,414 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,403 | java | // Generated by view binder compiler. Do not edit!
package ontime.app.databinding;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.viewbinding.ViewBinding;
import com.google.android.material.navigation.NavigationView;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import ontime.app.R;
public final class ActivityCartpendingBinding implements ViewBinding {
@NonNull
private final DrawerLayout rootView;
@NonNull
public final LinearLayout back;
@NonNull
public final DrawerLayout drawerLayout;
@NonNull
public final TextView loginBtn;
@NonNull
public final ImageView menu;
@NonNull
public final NavigationView navView;
@NonNull
public final RelativeLayout rly;
private ActivityCartpendingBinding(@NonNull DrawerLayout rootView, @NonNull LinearLayout back,
@NonNull DrawerLayout drawerLayout, @NonNull TextView loginBtn, @NonNull ImageView menu,
@NonNull NavigationView navView, @NonNull RelativeLayout rly) {
this.rootView = rootView;
this.back = back;
this.drawerLayout = drawerLayout;
this.loginBtn = loginBtn;
this.menu = menu;
this.navView = navView;
this.rly = rly;
}
@Override
@NonNull
public DrawerLayout getRoot() {
return rootView;
}
@NonNull
public static ActivityCartpendingBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static ActivityCartpendingBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.activity_cartpending, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static ActivityCartpendingBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.back;
LinearLayout back = rootView.findViewById(id);
if (back == null) {
break missingId;
}
DrawerLayout drawerLayout = (DrawerLayout) rootView;
id = R.id.login_btn;
TextView loginBtn = rootView.findViewById(id);
if (loginBtn == null) {
break missingId;
}
id = R.id.menu;
ImageView menu = rootView.findViewById(id);
if (menu == null) {
break missingId;
}
id = R.id.nav_view;
NavigationView navView = rootView.findViewById(id);
if (navView == null) {
break missingId;
}
id = R.id.rly;
RelativeLayout rly = rootView.findViewById(id);
if (rly == null) {
break missingId;
}
return new ActivityCartpendingBinding((DrawerLayout) rootView, back, drawerLayout, loginBtn,
menu, navView, rly);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}
| [
"psumit88666@gmail.com"
] | psumit88666@gmail.com |
d418e5cb2811bd74ac127c5aabafd1e1cda02726 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/spoon/learning/3415/CtConstructorCallImpl.java | 98666f03f06c1426c8a0ec71b3d6625076b0d137 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,902 | java | /**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.support.reflect.code;
import spoon.reflect.annotations.MetamodelPropertyField;
import spoon.reflect.code.CtAbstractInvocation;
import spoon.reflect.code.CtConstructorCall;
import spoon.reflect.code.CtExpression;
import spoon.reflect.code.CtStatement;
import spoon.reflect.code.CtStatementList;
import spoon.reflect.declaration.CtTypedElement;
import spoon.reflect.reference.CtActualTypeContainer;
import spoon.reflect.reference.CtExecutableReference;
import spoon.reflect.reference.CtTypeReference;
import spoon.reflect.visitor.CtVisitor;
import spoon.support.DerivedProperty;
import spoon.support.reflect.declaration.CtElementImpl;
import java.util.ArrayList;
import java.util.List;
import static spoon.reflect.ModelElementContainerDefaultCapacities.PARAMETERS_CONTAINER_DEFAULT_CAPACITY;
import static spoon.reflect.path.CtRole.ARGUMENT;
import static spoon.reflect.path.CtRole.EXECUTABLE_REF;
import static spoon.reflect.path.CtRole.LABEL;
public class CtConstructorCallImpl<T> extends CtTargetedExpressionImpl<T, CtExpression<?>> implements CtConstructorCall<T> {
private static final long serialVersionUID = 1L;
@MetamodelPropertyField(role = ARGUMENT)
List<CtExpression<?>> arguments = emptyList();
@MetamodelPropertyField(role = EXECUTABLE_REF)
CtExecutableReference<T> executable;
@MetamodelPropertyField(role = LABEL)
String label;
@Override
public void accept(CtVisitor visitor) {
visitor.visitCtConstructorCall(this);
}
@Override
public List<CtExpression<?>> getArguments() {
return arguments;
}
@Override
public CtExecutableReference<T> getExecutable() {
if (executable == null) {
// default reference
executable = getFactory().Core().createExecutableReference();
executable.setParent(this);
}
return executable;
}
@Override
public String getLabel() {
return label;
}
@Override
public <C extends CtStatement> C insertAfter(CtStatement statement) {
CtStatementImpl.insertAfter(this, statement);
return (C) this;
}
@Override
public <C extends CtStatement> C insertBefore(CtStatement statement) {
CtStatementImpl.insertBefore(this, statement);
return (C) this;
}
@Override
public <C extends CtStatement> C insertAfter(CtStatementList statements) {
CtStatementImpl.insertAfter(this, statements);
return (C) this;
}
@Override
public <C extends CtStatement> C insertBefore(CtStatementList statements) {
CtStatementImpl.insertBefore(this, statements);
return (C) this;
}
@Override
public <C extends CtAbstractInvocation<T>> C setArguments(List<CtExpression<?>> arguments) {
if (arguments == null || arguments.isEmpty()) {
this.arguments = CtElementImpl.emptyList();
return (C) this;
}
if (this.arguments == CtElementImpl.<CtExpression<?>>emptyList()) {
this.arguments = new ArrayList<>(PARAMETERS_CONTAINER_DEFAULT_CAPACITY);
}
getFactory().getEnvironment().getModelChangeListener().onListDeleteAll(this, ARGUMENT, this.arguments, new ArrayList<>(this.arguments));
this.arguments.clear();
for (CtExpression<?> expr : arguments) {
addArgument(expr);
}
return (C) this;
}
private <C extends CtAbstractInvocation<T>> C addArgument(int position, CtExpression<?> argument) {
if (argument == null) {
return (C) this;
}
if (arguments == CtElementImpl.<CtExpression<?>>emptyList()) {
arguments = new ArrayList<>(PARAMETERS_CONTAINER_DEFAULT_CAPACITY);
}
argument.setParent(this);
getFactory().getEnvironment().getModelChangeListener().onListAdd(this, ARGUMENT, this.arguments, position, argument);
arguments.add(position, argument);
return (C) this;
}
@Override
public <C extends CtAbstractInvocation<T>> C addArgument(CtExpression<?> argument) {
return addArgument(arguments.size(), argument);
}
@Override
public void removeArgument(CtExpression<?> argument) {
if (arguments == CtElementImpl.<CtExpression<?>>emptyList()) {
return;
}
getFactory().getEnvironment().getModelChangeListener().onListDelete(this, ARGUMENT, arguments, arguments.indexOf(argument), argument);
arguments.remove(argument);
}
@Override
public <C extends CtAbstractInvocation<T>> C setExecutable(CtExecutableReference<T> executable) {
if (executable != null) {
executable.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, EXECUTABLE_REF, executable, this.executable);
this.executable = executable;
return (C) this;
}
@Override
public <C extends CtStatement> C setLabel(String label) {
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, LABEL, label, this.label);
this.label = label;
return (C) this;
}
@Override
@DerivedProperty
public List<CtTypeReference<?>> getActualTypeArguments() {
return getExecutable() == null ? CtElementImpl.<CtTypeReference<?>>emptyList() : getExecutable().getActualTypeArguments();
}
@Override
@DerivedProperty
public <T extends CtActualTypeContainer> T setActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments) {
if (getExecutable() != null) {
getExecutable().setActualTypeArguments(actualTypeArguments);
}
return (T) this;
}
@Override
@DerivedProperty
public <T extends CtActualTypeContainer> T addActualTypeArgument(CtTypeReference<?> actualTypeArgument) {
if (getExecutable() != null) {
getExecutable().addActualTypeArgument(actualTypeArgument);
}
return (T) this;
}
@Override
@DerivedProperty
public boolean removeActualTypeArgument(CtTypeReference<?> actualTypeArgument) {
if (getExecutable() != null) { return getExecutable().removeActualTypeArgument(actualTypeArgument);
}
return false;
}
@Override
@DerivedProperty
public CtTypeReference<T> getType() {
return getExecutable() == null ? null : getExecutable().getType();
}
@Override
@DerivedProperty
public <C extends CtTypedElement> C setType(CtTypeReference<T> type) {
if (type != null) {
type.setParent(this);
}
if (getExecutable() != null) {
getExecutable().setType(type);
}
return (C) this;
}
@Override
public CtConstructorCall<T> clone() {
return (CtConstructorCall<T>) super.clone();
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
be3136e1eb18dbd0604a6214069cfe36f89bb290 | 9c7074a2467350bd855cbacba2857199cda5ebc7 | /20210809(ZJYD_v2.6.0)/app/src/main/java/com/pukka/ydepg/common/http/v6bean/v6node/PlaySession.java | 91a9acc2d6f305088ef2d61207a78f30961ac9e2 | [] | no_license | wangkk24/testgit | ce6c3f371bcac56832f62f9631cdffb32d9f2ed2 | 0eb6d2cc42f61cf28ce50b77d754dcfbd152d91c | refs/heads/main | 2023-07-15T21:45:24.674154 | 2021-08-31T07:13:14 | 2021-08-31T07:13:14 | 401,544,031 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,179 | java | package com.pukka.ydepg.common.http.v6bean.v6node;
import com.google.gson.annotations.SerializedName;
/**
* 在此写用途
*
* @version V1.0 <描述当前版本功能>
* @FileName: PlaySession.java
* @author: yh
* @date: 2017-04-21 17:32
*/
public class PlaySession {
/**
* sessionKey :
* profileID :
* deviceID :
*/
/**
*播放会话主键。
*/
@SerializedName("sessionKey")
private String sessionKey;
/**
*播放会话的ProfileID。
*/
@SerializedName("profileID")
private String profileID;
/**
*播放会话的逻辑设备ID。
*/
@SerializedName("deviceID")
private String deviceID;
public String getSessionKey() {
return sessionKey;
}
public void setSessionKey(String sessionKey) {
this.sessionKey = sessionKey;
}
public String getProfileID() {
return profileID;
}
public void setProfileID(String profileID) {
this.profileID = profileID;
}
public String getDeviceID() {
return deviceID;
}
public void setDeviceID(String deviceID) {
this.deviceID = deviceID;
}
}
| [
"wangkk@easier.cn"
] | wangkk@easier.cn |
6b3716f634b49f4e158eb45d4ff8f76695afdef3 | c78b0a90bb56982a51e73f6fbbc030166a3a08bd | /website/src/main/java/com/acme/homeloans/service/CreditScoreException.java | 346c63c82d19e171e9b0c05a7fb6f0eec25425f7 | [] | no_license | conor10/homeloans | e77584e291e3810b6bb2476e3c9f3bcef6ba9a6a | 353456f8514e7a10cea8d8e6edfd90d75ee8253c | refs/heads/master | 2021-01-10T13:14:38.614752 | 2016-02-29T03:27:57 | 2016-02-29T03:27:57 | 51,405,457 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 322 | java | package com.acme.homeloans.service;
/**
* Credit score exception wrapper.
*/
public class CreditScoreException extends Exception {
public CreditScoreException(String message) {
super(message);
}
public CreditScoreException(String message, Throwable cause) {
super(message, cause);
}
}
| [
"conor10@gmail.com"
] | conor10@gmail.com |
20200108f131007b919fc3ee4221af2faa68c030 | 3efa417c5668b2e7d1c377c41d976ed31fd26fdc | /src/br/com/mind5/masterData/cartItemCategory/dao/CaritegDaoSelect.java | 40f8278e116964d8c12c7af2e1245a45c8665ab6 | [] | no_license | grazianiborcai/Agenda_WS | 4b2656716cc49a413636933665d6ad8b821394ef | e8815a951f76d498eb3379394a54d2aa1655f779 | refs/heads/master | 2023-05-24T19:39:22.215816 | 2023-05-15T15:15:15 | 2023-05-15T15:15:15 | 109,902,084 | 0 | 0 | null | 2022-06-29T19:44:56 | 2017-11-07T23:14:21 | Java | UTF-8 | Java | false | false | 876 | java | package br.com.mind5.masterData.cartItemCategory.dao;
import java.sql.SQLException;
import java.util.List;
import br.com.mind5.dao.DaoStmtExecHelper;
import br.com.mind5.dao.DaoStmtExecOption;
import br.com.mind5.dao.DaoStmtExec;
import br.com.mind5.masterData.cartItemCategory.info.CaritegInfo;
public final class CaritegDaoSelect implements DaoStmtExec<CaritegInfo> {
private DaoStmtExec<CaritegInfo> helper;
public CaritegDaoSelect(List<DaoStmtExecOption<CaritegInfo>> options) {
helper = new DaoStmtExecHelper<>(options, CaritegDaoSelectSingle.class, CaritegInfo.class);
}
@Override public void executeStmt() throws SQLException {
helper.executeStmt();
}
@Override public List<CaritegInfo> getResultset() {
return helper.getResultset();
}
@Override public void close() {
helper.close();
}
}
| [
"mmaciel@mind5.com"
] | mmaciel@mind5.com |
30c57c41ccc2f87f65737f44c0c0975f1b4177cb | 678a3d58c110afd1e9ce195d2f20b2531d45a2e0 | /sources/com/airbnb/android/booking/fragments/ExpirationDateFragment_ViewBinding.java | ff43001d8bc19ab99238c456228f5e7f195fb6cf | [] | 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 | 1,922 | java | package com.airbnb.android.booking.fragments;
import android.view.View;
import butterknife.Unbinder;
import butterknife.internal.DebouncingOnClickListener;
import butterknife.internal.Utils;
import com.airbnb.android.booking.C0704R;
import com.airbnb.p027n2.components.SheetInputText;
import com.airbnb.p027n2.components.jellyfish.JellyfishView;
import com.airbnb.p027n2.primitives.AirButton;
public class ExpirationDateFragment_ViewBinding implements Unbinder {
private ExpirationDateFragment target;
private View view2131755474;
public ExpirationDateFragment_ViewBinding(final ExpirationDateFragment target2, View source) {
this.target = target2;
target2.sheetInput = (SheetInputText) Utils.findRequiredViewAsType(source, C0704R.C0706id.expiration_date_sheetInput, "field 'sheetInput'", SheetInputText.class);
View view = Utils.findRequiredView(source, C0704R.C0706id.next_button, "field 'nextButton' and method 'onClickNextButton'");
target2.nextButton = (AirButton) Utils.castView(view, C0704R.C0706id.next_button, "field 'nextButton'", AirButton.class);
this.view2131755474 = view;
view.setOnClickListener(new DebouncingOnClickListener() {
public void doClick(View p0) {
target2.onClickNextButton();
}
});
target2.jellyfishView = (JellyfishView) Utils.findRequiredViewAsType(source, C0704R.C0706id.jellyfish_view, "field 'jellyfishView'", JellyfishView.class);
}
public void unbind() {
ExpirationDateFragment target2 = this.target;
if (target2 == null) {
throw new IllegalStateException("Bindings already cleared.");
}
this.target = null;
target2.sheetInput = null;
target2.nextButton = null;
target2.jellyfishView = null;
this.view2131755474.setOnClickListener(null);
this.view2131755474 = null;
}
}
| [
"thanhhuu2apc@gmail.com"
] | thanhhuu2apc@gmail.com |
470c9f26630dc50f3600a725039d73acda197ec3 | 9e958fb902a9040330d7f1943f5a5f5e668232f3 | /tlproject/two/src/main/java/com/neuedu/dao/GoodsDAO.java | eacfd943bdb58cadf467b2085baaa61ec4fe5a12 | [] | no_license | jeaniely/tlproject01 | 41343844c48abf6b80c44d0ccee55977b7a5b5e5 | e89e82a58cb0941e0f0b36ee3107ea611a2f1474 | refs/heads/master | 2023-03-28T19:22:42.117250 | 2021-04-02T11:35:55 | 2021-04-02T11:35:55 | 354,000,351 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,475 | java | package com.neuedu.dao;
import com.neuedu.bean.Goods;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface GoodsDAO {
/**
* 实现所有商品的提取
* @return
*/
@Select("select id,gnumber,name,price,sellnumber,stock,ifdelete,classid,createtime,updatetime from googs_t")
public List<Goods> selectALL();
/**
* 根据商品编号提取数据
* @param gnumber
* @return
*/
@Select("select id,gnumber,name,price,sellnumber,stock,ifdelete,classid,createtime,updatetime from googs_t where gnumber=#{gnumber}")
public Goods selectOneByNumber(String gnumber);
/**
* 添加数据
* @param goods
* @return
*/
@Insert("insert into \n" +
"googs_t(gnumber,name,price,sellnumber,stock,ifdelete,classid,described,createtime,updatetime)\n" +
"values(#{gnumber},#{name},#{price},0,#{stock},0,#{classid},#{described},NOW(),NOW())")
public Integer add(Goods goods);
/**
* 根据名字将进行模糊查询
* @param name
* @return
*/
/* @Select("select id,gnumber,name,price,sellnumber,stock,ifdelete,classid,createtime,updatetime from googs_t where name like #{name}")*/
@Select("select id,gnumber,name,price,sellnumber,stock,ifdelete,classid,createtime,updatetime from googs_t where name like '%${name}%'")
public List<Goods> selectByName(String name);
}
| [
"574156761@qq.com"
] | 574156761@qq.com |
f977aca442e42000984d3ce37a2c010f6349bd26 | 9b882c3dfaa41e62b15fb635599ef6780f2c8379 | /chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/DoubleCachedFieldTrialParameter.java | 1e805c7be784024f2d04c44e7d00d4a616accb1f | [
"BSD-3-Clause"
] | permissive | cqtangsong/chromium | 1e042e2f49d9cb194790674805afcc1308a08f81 | e73c1f260913f418bf5886b996b02dae372cfffa | refs/heads/master | 2023-01-14T07:34:05.166609 | 2020-03-12T03:07:32 | 2020-03-12T03:07:32 | 246,735,752 | 2 | 0 | BSD-3-Clause | 2020-03-12T03:32:44 | 2020-03-12T03:32:43 | null | UTF-8 | Java | false | false | 1,074 | java | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.flags;
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
/**
* A double-type {@link CachedFieldTrialParameter}.
*/
public class DoubleCachedFieldTrialParameter extends CachedFieldTrialParameter {
private double mDefaultValue;
public DoubleCachedFieldTrialParameter(
String featureName, String variationName, double defaultValue) {
super(featureName, variationName, FieldTrialParameterType.DOUBLE, null);
mDefaultValue = defaultValue;
}
public double getDefaultValue() {
return mDefaultValue;
}
@Override
void cacheToDisk() {
double value = ChromeFeatureList.getFieldTrialParamByFeatureAsDouble(
getFeatureName(), getParameterName(), getDefaultValue());
SharedPreferencesManager.getInstance().writeDouble(getSharedPreferenceKey(), value);
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
650fcce3cb9be01a8d0721233f0c8bee79542808 | 35483f71b227763ad37bf5766558df16a3055447 | /src/server/java/com/softwareverde/bitcoin/context/BlockStoreContext.java | 73cb722632275053b21ceea6dba9f098680bdb12 | [
"MIT"
] | permissive | SoftwareVerde/bitcoin-verde | 1f4f49ed46a2086d33053b0ed5608605902c2be9 | e9d140cac8b93a9db572bda906db9decfac1d7ae | refs/heads/master | 2023-07-11T16:28:46.730818 | 2023-04-29T13:40:44 | 2023-04-29T13:40:44 | 124,832,169 | 42 | 19 | MIT | 2022-12-21T21:59:19 | 2018-03-12T04:05:56 | Java | UTF-8 | Java | false | false | 186 | java | package com.softwareverde.bitcoin.context;
import com.softwareverde.bitcoin.server.module.node.store.BlockStore;
public interface BlockStoreContext {
BlockStore getBlockStore();
}
| [
"josh@softwareverde.com"
] | josh@softwareverde.com |
340144e3b26a610aa01880455746a91162aa419f | 775673518822d734e22c504acf050eae5f254400 | /samples/micro-weather-basic/src/main/java/com/waylau/spring/cloud/service/WeatherDataServiceImpl.java | 0758804d839f154aa3fc3088d3509818e40bd5ca | [] | no_license | JiaJia2018/spring-cloud-tutorial | 6e4ed9c737459f52e6b4b71205d472b8ecd69bcb | ee98841d2e4a398dcd6e3f639589022b83e8dfb2 | refs/heads/master | 2020-05-15T14:40:05.226901 | 2018-07-04T16:18:13 | 2018-07-04T16:18:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,524 | java | /**
*
*/
package com.waylau.spring.cloud.service;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.waylau.spring.cloud.vo.WeatherResponse;
/**
* 天气数据服务.
*
* @since 1.0.0 2017年9月2日
* @author <a href="https://waylau.com">Way Lau</a>
*/
@Service
public class WeatherDataServiceImpl implements WeatherDataService {
@Autowired
private RestTemplate restTemplate;
private final String WEATHER_API = "http://wthrcdn.etouch.cn/weather_mini";
@Override
public WeatherResponse getDataByCityId(String cityId) {
String uri = WEATHER_API + "?citykey=" + cityId;
return this.doGetWeatherData(uri);
}
@Override
public WeatherResponse getDataByCityName(String cityName) {
String uri = WEATHER_API + "?city=" + cityName;
return this.doGetWeatherData(uri);
}
private WeatherResponse doGetWeatherData(String uri) {
ResponseEntity<String> response = restTemplate.getForEntity(uri, String.class);
String strBody = null;
if (response.getStatusCodeValue() == 200) {
strBody = response.getBody();
}
ObjectMapper mapper = new ObjectMapper();
WeatherResponse weather = null;
try {
weather = mapper.readValue(strBody, WeatherResponse.class);
} catch (IOException e) {
e.printStackTrace();
}
return weather;
}
}
| [
"waylau521@gmail.com"
] | waylau521@gmail.com |
af76cebab7adb010bbe7d02f1178e10284fa5f54 | 684e018ce44456ad860b9bbd01ca0fcf40be296d | /src/test/java/com/leetcode/algorithm/No650/SolutionTest.java | 7832fc0a3fb9d45b28d183df859c4a1d588a313e | [] | no_license | Nagisa12321/LeetCode | ebcfc5d9508e9e5feb1a9d44932f28f19d1ac3e2 | 14d0bd9e95fe1eef57678e3dbf3fb6751ee196d1 | refs/heads/master | 2023-07-15T21:32:51.265786 | 2021-08-29T03:37:14 | 2021-08-29T03:37:14 | 316,138,604 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 219 | java | package com.leetcode.algorithm.No650;
import static org.junit.Assert.*;
public class SolutionTest {
public static void main(String[] args) {
System.out.println(new Solution().minSteps(30));
}
} | [
"1216414009@qq.com"
] | 1216414009@qq.com |
0cc06d6bc7c4d7fc05375cb7a1bf07ba6d66cc4b | 39f1784b2863c93f5be0762e86189fecac8b6c35 | /src/main/java/tech/wetech/admin/controller/system/ResourceController.java | d813cbbaba38d0f683cbcfed8fffd9602344f49c | [
"MIT"
] | permissive | chyj77/wetech-admin | ca2c777072497b6859d1ed2572d51f2235f5820f | b3a919bb0de27c46ed9ede24d9c196a36797ed3f | refs/heads/master | 2020-03-21T14:41:57.922525 | 2018-06-08T06:19:27 | 2018-06-08T06:19:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,075 | java | package tech.wetech.admin.controller.system;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import tech.wetech.admin.common.annotation.SystemLog;
import tech.wetech.admin.common.base.Result;
import tech.wetech.admin.controller.BaseController;
import tech.wetech.admin.model.system.Resource;
import tech.wetech.admin.service.system.ResourceService;
import tk.mybatis.mapper.weekend.Weekend;
import javax.validation.Valid;
@Controller
@RequestMapping("/resource")
public class ResourceController extends BaseController{
@Autowired
private ResourceService resourceService;
@ModelAttribute("types")
public Resource.ResourceType[] resourceTypes() {
return Resource.ResourceType.values();
}
@RequiresPermissions("resource:view")
@GetMapping
public String toPage(Model model) {
Weekend weekend = Weekend.of(Resource.class);
weekend.setOrderByClause("priority");
model.addAttribute("resourceList", resourceService.find(weekend));
return "system/resource";
}
@ResponseBody
@RequiresPermissions("resource:create")
@SystemLog("资源管理创建资源")
@PostMapping("/create")
public Result create(@Valid Resource resource) {
resourceService.createResource(resource);
return Result.Success();
}
@ResponseBody
@RequiresPermissions("resource:update")
@SystemLog("资源管理更新资源")
@PostMapping("/update")
public Result update(@Valid Resource resource) {
resourceService.updateResource(resource);
return Result.Success();
}
@ResponseBody
@RequiresPermissions("resource:delete")
@SystemLog("资源管理删除资源")
@PostMapping("/delete")
public Result delete(@RequestParam("id") Long id) {
resourceService.deleteResource(id);
return Result.Success();
}
}
| [
"cjbi@outlook.com"
] | cjbi@outlook.com |
293bccf8ba72ce59ddf9ed9e851dcc0987eed4c0 | 800b992074dcc5451ce10caf8a30efdec54e884d | /src/Ch_05/Video05_06/Start/BarGraph.java | d4d64c62df6e18afbfe8b449b7a8864145ff362f | [] | no_license | gauthierwakay/data-science-using-java | 37fe2e9b139f8fc3c35cd1404246992da5c616d0 | 284b279b0ccdd58bbc0f4cf30c0d0b8a8749302b | refs/heads/master | 2023-07-18T01:20:45.707587 | 2021-09-03T19:15:28 | 2021-09-03T19:15:28 | 402,875,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,459 | java | package Ch_05.Video05_06.Start;
import javafx.application.Application;
import javafx.scene.chart.XYChart.Data;
import javafx.scene.chart.XYChart.Series;
import javafx.stage.Stage;
import java.util.List;
import java.util.stream.Collectors;
public class BarGraph extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
List<String> lines = TextLoader.getLines("auto-mpg.data");
List<CarRecord> cars = lines.stream()
.map((line) -> CarRecordUtil.parseCar(line))
.collect(Collectors.toList());
List<CarRecord> fourCylinderCars = cars.stream()
.filter((car) -> car.numberOfCylinders == 4)
.collect(Collectors.toList());
List<CarRecord> sixCylinderCars = cars.stream()
.filter((car) -> car.numberOfCylinders == 6)
.collect(Collectors.toList());
List<CarRecord> eightCylinderCars = cars.stream()
.filter((car) -> car.numberOfCylinders == 8)
.collect(Collectors.toList());
Series series = new Series();
series.getData().add(new Data("4", CarRecordUtil.getAverageMpg(fourCylinderCars)));
series.getData().add(new Data("6", CarRecordUtil.getAverageMpg(sixCylinderCars)));
series.getData().add(new Data("8", CarRecordUtil.getAverageMpg(eightCylinderCars)));
}
}
| [
"jet9seven@gmail.com"
] | jet9seven@gmail.com |
31979aee24d458fffaa3aa92a8729bff2dfbf8cb | d5707877197947addf040d2a03bc76b458317ec3 | /app/src/main/java/com/example/ai/myapplication2/util/MD5/MD5Util.java | 43816fb9e7e94bfe498b4544da2d6f3195a0a233 | [] | no_license | StoneXL/app_demo | 0d8e4e98b6810eff52573898fba51dc6d10b777a | 19e8bec5127aa09b9025ce853f31b0a41e24eab6 | refs/heads/master | 2020-03-21T13:04:11.209838 | 2018-06-25T11:38:15 | 2018-06-25T11:38:15 | 138,586,272 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,150 | java | package com.example.ai.myapplication2.util.MD5;
import java.security.MessageDigest;
import java.util.Locale;
/**
* @author lijing
* @desc 功能描述
* @date 2016/7/26 15:26
*/
public class MD5Util {
public static String encode(String str) {
try {
MessageDigest digestMessageDigest = MessageDigest.getInstance("MD5");
digestMessageDigest.reset();
digestMessageDigest.update(str.getBytes("UTF-8"));
byte[] bs = digestMessageDigest.digest();
String md5Str = md5To32(bs).toLowerCase(Locale.getDefault());
return md5Str;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private static String md5To32(byte[] bs) {
int i;
StringBuffer sb1 = new StringBuffer();
for (int offset = 0; offset < bs.length; offset++) {
i = bs[offset];
if (i < 0) {
i += 256;
}
if (i < 16) {
sb1.append("0");
}
sb1.append(Integer.toHexString(i));
}
return sb1.toString();
}
}
| [
"3401794305@qq.com"
] | 3401794305@qq.com |
156b31dd8d2c5c92475688c878c724231dc2fee7 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_99e1a79cd9f6801efdc5e868906e8b1425071a51/BlackList/15_99e1a79cd9f6801efdc5e868906e8b1425071a51_BlackList_s.java | b0a70c3fcf670408a2803b51af932048004f8861 | [] | 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,187 | java | package me.DDoS.Quicksign.util;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import me.DDoS.Quicksign.QuickSign;
import me.DDoS.Quicksign.permission.Permission;
import org.bukkit.block.Sign;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
/**
*
* @author DDoS
*/
public class BlackList {
private final Set<String> blackList = new HashSet<String>();
private final QuickSign plugin;
public BlackList(QuickSign plugin) {
this.plugin = plugin;
YamlConfiguration config = YamlConfiguration.loadConfiguration(new File("plugins/QuickSign/black_list.yml"));
if (config.getKeys(true).isEmpty()) {
config.set("BlackList", Arrays.asList("[buy]", "[sell]"));
try {
config.save("plugins/QuickSign/black_list.yml");
} catch (IOException ex) {
QuickSign.log.info("[QuickSign] Couldn't save black list: " + ex.getMessage());
return;
}
}
List<String> bl = config.getStringList("BlackList");
for (String ble : bl) {
if (!blackList.contains(ble)) {
blackList.add(ble.toLowerCase());
}
}
QuickSign.log.info("[QuickSign] Black list loaded");
}
public boolean allows(String line, Player player) {
if (!plugin.hasPermissions(player,
Permission.IGNORE_BLACK_LIST)) {
if (blackList.contains(line.toLowerCase())) {
return false;
}
}
if (!plugin.hasPermissions(player,
Permission.ALLOW_ICS)) {
if (checkForIC(line)) {
return false;
}
}
return true;
}
public boolean allows(String[] lines, Player player) {
if (!plugin.hasPermissions(player,
Permission.IGNORE_BLACK_LIST)) {
for (String line : lines) {
if (blackList.contains(line.toLowerCase())) {
return false;
}
}
}
if (!plugin.hasPermissions(player,
Permission.ALLOW_ICS)) {
for (String line : lines) {
if (checkForIC(line)) {
return false;
}
}
}
return true;
}
public boolean allows(Sign sign, Player player) {
return allows(sign.getLines(), player);
}
private boolean checkForIC(String txt) {
//[MCXXXX]
if (txt.length() >= 8) {
if (txt.substring(0, 3).equalsIgnoreCase("[MC")
&& QSUtil.isParsableToInt(txt.substring(3, 7))
&& txt.charAt(7) == ']') {
return true;
}
}
return false;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
009a4f589f12db4167a46070e199c905e53a408a | 58da62dfc6e145a3c836a6be8ee11e4b69ff1878 | /src/main/java/com/alipay/api/response/KoubeiCateringPosPracticeDeleteResponse.java | 5a51df03366129c892b5b45266fbb53f3d2c1f0e | [
"Apache-2.0"
] | permissive | zhoujiangzi/alipay-sdk-java-all | 00ef60ed9501c74d337eb582cdc9606159a49837 | 560d30b6817a590fd9d2c53c3cecac0dca4449b3 | refs/heads/master | 2022-12-26T00:27:31.553428 | 2020-09-07T03:39:05 | 2020-09-07T03:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.catering.pos.practice.delete response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiCateringPosPracticeDeleteResponse extends AlipayResponse {
private static final long serialVersionUID = 3577242767257869652L;
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
1c6c0269719bb8e4f28b85682dabd10b92b16cda | f7c2f1c1e6fa27374fce19f422e5fa86e1595990 | /my-admin-01/app-module/app-jooq-mybatis-plus/app-db-jooq-mybatis-plus/src/main/java/org/yuan/boot/app/db/module/mybatis/jooq/plus/module/dsl/Keys.java | b0eeecd4e15c9df90b42e023e0f8062e7caa9e10 | [] | no_license | yuan50697105/my-admin-2019 | d3ecbe283fdcda67ad870bc436551eb5020f4944 | 29cc3e5e2e480277329352855c71eeacabec4314 | refs/heads/master | 2022-07-02T00:18:57.210467 | 2020-04-06T08:02:33 | 2020-04-06T08:02:33 | 253,431,240 | 0 | 0 | null | 2022-06-21T03:09:54 | 2020-04-06T07:53:13 | Java | UTF-8 | Java | false | true | 3,272 | java | /*
* This file is generated by jOOQ.
*/
package org.yuan.boot.app.db.module.mybatis.jooq.plus.module.dsl;
import org.jooq.UniqueKey;
import org.jooq.impl.Internal;
import org.yuan.boot.app.db.module.mybatis.jooq.plus.module.dsl.tables.*;
import org.yuan.boot.app.db.module.mybatis.jooq.plus.module.dsl.tables.records.*;
import javax.annotation.Generated;
/**
* A class modelling foreign key relationships and constraints of tables of
* the <code>my_admin_01</code> schema.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.12.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class Keys {
// -------------------------------------------------------------------------
// IDENTITY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------
public static final UniqueKey<AdminPermissionRecord> KEY_ADMIN_PERMISSION_PRIMARY = UniqueKeys0.KEY_ADMIN_PERMISSION_PRIMARY;
public static final UniqueKey<AdminRoleRecord> KEY_ADMIN_ROLE_PRIMARY = UniqueKeys0.KEY_ADMIN_ROLE_PRIMARY;
public static final UniqueKey<AdminRolePermissionRecord> KEY_ADMIN_ROLE_PERMISSION_PRIMARY = UniqueKeys0.KEY_ADMIN_ROLE_PERMISSION_PRIMARY;
public static final UniqueKey<AdminUserRecord> KEY_ADMIN_USER_PRIMARY = UniqueKeys0.KEY_ADMIN_USER_PRIMARY;
public static final UniqueKey<AdminUserRoleRecord> KEY_ADMIN_USER_ROLE_PRIMARY = UniqueKeys0.KEY_ADMIN_USER_ROLE_PRIMARY;
// -------------------------------------------------------------------------
// FOREIGN KEY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// [#1459] distribute members to avoid static initialisers > 64kb
// -------------------------------------------------------------------------
private static class UniqueKeys0 {
public static final UniqueKey<AdminPermissionRecord> KEY_ADMIN_PERMISSION_PRIMARY = Internal.createUniqueKey(AdminPermission.ADMIN_PERMISSION, "KEY_admin_permission_PRIMARY", AdminPermission.ADMIN_PERMISSION.ID);
public static final UniqueKey<AdminRoleRecord> KEY_ADMIN_ROLE_PRIMARY = Internal.createUniqueKey(AdminRole.ADMIN_ROLE, "KEY_admin_role_PRIMARY", AdminRole.ADMIN_ROLE.ID);
public static final UniqueKey<AdminRolePermissionRecord> KEY_ADMIN_ROLE_PERMISSION_PRIMARY = Internal.createUniqueKey(AdminRolePermission.ADMIN_ROLE_PERMISSION, "KEY_admin_role_permission_PRIMARY", AdminRolePermission.ADMIN_ROLE_PERMISSION.ID);
public static final UniqueKey<AdminUserRecord> KEY_ADMIN_USER_PRIMARY = Internal.createUniqueKey(AdminUser.ADMIN_USER, "KEY_admin_user_PRIMARY", AdminUser.ADMIN_USER.ID);
public static final UniqueKey<AdminUserRoleRecord> KEY_ADMIN_USER_ROLE_PRIMARY = Internal.createUniqueKey(AdminUserRole.ADMIN_USER_ROLE, "KEY_admin_user_role_PRIMARY", AdminUserRole.ADMIN_USER_ROLE.ID);
}
}
| [
"33301332+yuan50697105@users.noreply.github.com"
] | 33301332+yuan50697105@users.noreply.github.com |
27db8e2130edd13d5a552d2f1ce044f5ffba3fd6 | 39b6f83641d1a80a48937c42beb6a73311aebc55 | /test-framework/junit5-component/src/test/java/io/quarkus/test/component/beans/Alpha.java | 4193c66e37eb7178306d23492003c806c17d3bef | [
"Apache-2.0"
] | permissive | quarkusio/quarkus | 112ecda7236bc061920978ac49289da6259360f4 | 68af440f3081de7a26bbee655f74bb8b2c57c2d5 | refs/heads/main | 2023-09-04T06:39:33.043251 | 2023-09-04T05:44:43 | 2023-09-04T05:44:43 | 139,914,932 | 13,109 | 2,940 | Apache-2.0 | 2023-09-14T21:31:23 | 2018-07-06T00:44:20 | Java | UTF-8 | Java | false | false | 270 | java | package io.quarkus.test.component.beans;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
@Singleton
public class Alpha {
@Inject
@SimpleQualifier
Bravo bravo;
public String ping() {
return bravo.ping() + bravo.ping();
}
}
| [
"mkouba@redhat.com"
] | mkouba@redhat.com |
d76628e7849b9133d662669aea73bebd368313c6 | 5b009657de1892dd83cd9f7f91cd1369ca52fd5c | /src/com/qpidnetwork/framework/util/CompatUtil.java | 6851aac2a27dda765fd697d01bf547ddd05727d3 | [] | no_license | pangpangcc/Dating4Lady | 925c17892733eeb0ee9d149be65f35c1565eb915 | fa706ba594371a7013345bd2bcbb1db3357c5071 | refs/heads/master | 2021-01-13T15:48:47.488513 | 2016-11-30T03:55:01 | 2016-11-30T03:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,374 | java | package com.qpidnetwork.framework.util;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
/**
* 高低版本兼容工具类
* @author Hunter
* 2015.7.6
*/
public class CompatUtil {
/**
* 解决4.4及以上版本与4.4一下版本读取系统相册差异化问题
* @return
*/
public static Intent getSelectPhotoFromAlumIntent(){
Intent intent = new Intent();
intent.setType("image/*");
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
intent.setAction(Intent.ACTION_OPEN_DOCUMENT);
}else{
intent.setAction(Intent.ACTION_GET_CONTENT);
}
return intent;
}
/**
* 解决4.4及以上版本与4.4一下版本读取系统相册差异化问题
* @return
*/
@SuppressLint("NewApi")
public static String getSelectedPhotoPath(Context context, Uri contentUri){
String filePath = "";
if((android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) && (DocumentsContract.isDocumentUri(context, contentUri))){
String wholeID = DocumentsContract.getDocumentId(contentUri);
if(wholeID.contains(":")){
String id = wholeID.split(":")[1];
String[] column = { MediaStore.Images.Media.DATA };
String sel = MediaStore.Images.Media._ID + "= ?";
try{
Cursor cursor = context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, column,
sel, new String[] { id }, null);
if(cursor != null){
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(column[0]);
filePath = cursor.getString(columnIndex);
cursor.close();
}
}catch(Exception e){
}
}
}else{
String[] projection = { MediaStore.Images.Media.DATA };
try{
Cursor cursor = context.getContentResolver().query(contentUri, projection, null, null, null);
if( cursor != null ) {
cursor.moveToFirst();
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
filePath = cursor.getString(column_index);
cursor.close();
}
}catch(Exception e){
}
}
return filePath;
}
}
| [
"Kingsleyyau@gmail.com"
] | Kingsleyyau@gmail.com |
6952c1abd3b49d5bebd93524b0e70d7bf671fe26 | 279dd9e15909c3989d9655f4e1bb3d132ae3c63b | /ca-qa/src/main/java/org/xipki/ca/qa/X509IssuerInfo.java | fde089002acdef082541bb8c8235013cf751955b | [
"Apache-2.0"
] | permissive | JacketZ/xipki | 60e67a5bae2ea220da0c98248aaceca4f2ce54d7 | f211d11db1e76622120f6bfdc75b92ccb893d048 | refs/heads/master | 2021-01-24T03:42:42.228202 | 2018-02-24T10:40:00 | 2018-02-24T10:40:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,614 | java | /*
*
* Copyright (c) 2013 - 2018 Lijun Liao
*
* 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.xipki.ca.qa;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.bouncycastle.asn1.x509.Certificate;
import org.xipki.common.util.CollectionUtil;
import org.xipki.common.util.ParamUtil;
import org.xipki.security.util.X509Util;
/**
* TODO.
* @author Lijun Liao
* @since 2.0.0
*/
public class X509IssuerInfo {
private final Set<String> caIssuerUrls;
private final Set<String> ocspUrls;
private final Set<String> crlUrls;
private final Set<String> deltaCrlUrls;
private final X509Certificate cert;
private final Certificate bcCert;
private final boolean cutoffNotAfter;
private final Date caNotBefore;
private final Date caNotAfter;
private final byte[] ski;
public X509IssuerInfo(List<String> caIssuerUrls, List<String> ocspUrls, List<String> crlUrls,
List<String> deltaCrlUrls, byte[] certBytes, boolean cutoffNotAfter)
throws CertificateException {
ParamUtil.requireNonNull("certBytes", certBytes);
this.cutoffNotAfter = cutoffNotAfter;
if (CollectionUtil.isEmpty(caIssuerUrls)) {
this.caIssuerUrls = null;
} else {
Set<String> set = new HashSet<>();
set.addAll(caIssuerUrls);
this.caIssuerUrls = Collections.unmodifiableSet(set);
}
if (CollectionUtil.isEmpty(ocspUrls)) {
this.ocspUrls = null;
} else {
Set<String> set = new HashSet<>();
set.addAll(ocspUrls);
this.ocspUrls = Collections.unmodifiableSet(set);
}
if (CollectionUtil.isEmpty(crlUrls)) {
this.crlUrls = null;
} else {
Set<String> set = new HashSet<>();
set.addAll(crlUrls);
this.crlUrls = Collections.unmodifiableSet(set);
}
if (CollectionUtil.isEmpty(deltaCrlUrls)) {
this.deltaCrlUrls = null;
} else {
Set<String> set = new HashSet<>();
set.addAll(deltaCrlUrls);
this.deltaCrlUrls = Collections.unmodifiableSet(set);
}
this.cert = X509Util.parseCert(certBytes);
this.bcCert = Certificate.getInstance(certBytes);
this.ski = X509Util.extractSki(cert);
this.caNotBefore = this.cert.getNotBefore();
this.caNotAfter = this.cert.getNotAfter();
} // constructor
public Set<String> caIssuerUrls() {
return caIssuerUrls;
}
public Set<String> ocspUrls() {
return ocspUrls;
}
public Set<String> crlUrls() {
return crlUrls;
}
public Set<String> deltaCrlUrls() {
return deltaCrlUrls;
}
public X509Certificate cert() {
return cert;
}
public byte[] subjectKeyIdentifier() {
return Arrays.copyOf(ski, ski.length);
}
public Certificate bcCert() {
return bcCert;
}
public boolean isCutoffNotAfter() {
return cutoffNotAfter;
}
public Date caNotBefore() {
return caNotBefore;
}
public Date caNotAfter() {
return caNotAfter;
}
}
| [
"lijun.liao@gmail.com"
] | lijun.liao@gmail.com |
436c8acda565690b4e88602a2fa222af1366b32f | c3a3050f1344c97c661379c41b36a6fdbc5ff858 | /usermodel-initial/src/main/java/com/lambdaschool/usermodel/models/Useremail.java | c6bd2e56eff8a6ea2151864b1ab04713e4240737 | [
"MIT"
] | permissive | hyetigran/java-oauth2 | f76e48e79642982d0a246f406a016eed649ca4d4 | bb3eedbdbc13a1204eed5109b97bf8d70e6cbefd | refs/heads/master | 2022-11-13T00:31:00.332740 | 2020-06-29T17:51:29 | 2020-06-29T17:51:29 | 275,754,548 | 0 | 0 | MIT | 2020-06-29T06:54:09 | 2020-06-29T06:54:08 | null | UTF-8 | Java | false | false | 3,549 | java | package com.lambdaschool.usermodel.models;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
/**
* The entity allowing interaction with the useremails table
* <p>
* requires each combination of user and useremail to be unique. The same email cannot be assigned to the same user more than once.
*/
@Entity
@Table(name = "useremails")
public class Useremail
extends Auditable
{
/**
* The primary key (long) of the useremails table
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long useremailid;
/**
* Email (String) for this user. Cannot be nullable.
* Must be in the format userid@domain.upperLevelDomain
*/
@NotNull
@Column(nullable = false)
@Email
private String useremail;
/**
* The userid of the user assigned to this email is what is stored in the database.
* This is the entire user object!
* <p>
* Forms a Many to One relationship between useremails and users.
* A user can have many emails.
*/
@ManyToOne
@NotNull
@JoinColumn(name = "userid",
nullable = false)
@JsonIgnoreProperties(value = "useremails",
allowSetters = true)
private User user;
/**
* The default controller is required by JPA
*/
public Useremail()
{
}
/**
* Given the parameters, create a new useremail object
*
* @param user the user (User) assigned to the email
* @param useremail useremail (String) for the given user
*/
public Useremail(
User user,
String useremail)
{
this.useremail = useremail;
this.user = user;
}
/**
* Getter for useremailid
*
* @return the primary key (long) of this useremail object
*/
public long getUseremailid()
{
return useremailid;
}
/**
* Setter for useremailid. Used for seeding data
*
* @param useremailid the new primary key (long) of this useremail object
*/
public void setUseremailid(long useremailid)
{
this.useremailid = useremailid;
}
/**
* Getter for useremail
*
* @return the email (String) associated with this useremail object in lowercase
*/
public String getUseremail()
{
if (useremail == null) // this is possible when updating a user
{
return null;
} else
{
return useremail.toLowerCase();
}
}
/**
* Setter for useremail
*
* @param useremail the email (String) to replace the one currently assigned to this useremail object, in lowercase
*/
public void setUseremail(String useremail)
{
this.useremail = useremail.toLowerCase();
}
/**
* Getter for user
*
* @return the user object associated with this useremail.
*/
public User getUser()
{
return user;
}
/**
* Setter for user
*
* @param user the user object to replace the one currently assigned to this useremail object
*/
public void setUser(User user)
{
this.user = user;
}
}
| [
"jrmmba@outlook.com"
] | jrmmba@outlook.com |
e44e8d70ea7cb44813da7e42a6000f232c3dd65b | e27942cce249f7d62b7dc8c9b86cd40391c1ddd4 | /modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201708/AdRuleSlotBumper.java | 1e8d77bed57cecb53abb1984fa15b2edcf16ebb6 | [
"Apache-2.0"
] | permissive | mo4ss/googleads-java-lib | b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a | efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641 | refs/heads/master | 2022-12-05T00:30:56.740813 | 2022-11-16T10:47:15 | 2022-11-16T10:47:15 | 108,132,394 | 0 | 0 | Apache-2.0 | 2022-11-16T10:47:16 | 2017-10-24T13:41:43 | Java | UTF-8 | Java | false | false | 3,810 | java | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* AdRuleSlotBumper.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201708;
public class AdRuleSlotBumper implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected AdRuleSlotBumper(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _NONE = "NONE";
public static final java.lang.String _BEFORE = "BEFORE";
public static final java.lang.String _AFTER = "AFTER";
public static final java.lang.String _BEFORE_AND_AFTER = "BEFORE_AND_AFTER";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final AdRuleSlotBumper NONE = new AdRuleSlotBumper(_NONE);
public static final AdRuleSlotBumper BEFORE = new AdRuleSlotBumper(_BEFORE);
public static final AdRuleSlotBumper AFTER = new AdRuleSlotBumper(_AFTER);
public static final AdRuleSlotBumper BEFORE_AND_AFTER = new AdRuleSlotBumper(_BEFORE_AND_AFTER);
public static final AdRuleSlotBumper UNKNOWN = new AdRuleSlotBumper(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static AdRuleSlotBumper fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
AdRuleSlotBumper enumeration = (AdRuleSlotBumper)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static AdRuleSlotBumper fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
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.EnumSerializer(
_javaType, _xmlType);
}
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.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(AdRuleSlotBumper.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201708", "AdRuleSlotBumper"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
| [
"api.cseeley@gmail.com"
] | api.cseeley@gmail.com |
9fded2fbe27b305fa0f86c087078696668ba7027 | 75e4490624eac9ce26bf3845277cdfb7cbaf6201 | /core/src/java/codex/extract/DebugWriter.java | 832553ae5975e90c31b657ba8aa71c8a6093edb7 | [
"BSD-3-Clause"
] | permissive | scaled/codex | 0538f2fdf315ea5df4356c30a14542e897cf5c0c | c2212571302356ff468163e37c5a936b710bf1e3 | refs/heads/master | 2020-04-06T13:25:42.960754 | 2020-03-22T17:50:58 | 2020-03-22T17:50:58 | 20,330,855 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,386 | java | //
// Codex - a framework for grokking code
// http://github.com/scaled/codex/blob/master/LICENSE
package codex.extract;
import java.io.PrintWriter;
import codex.model.*;
import java.util.Collection;
/**
* A {@code Writer} implementation that emits a compact text-based representation of the metadata.
*/
public class DebugWriter extends Writer {
public DebugWriter (PrintWriter out, String source) {
_out = out;
_source = source;
}
@Override public void openSession () {
// nada
}
@Override public void openUnit (Source source) {
emit("unit", "src", source);
_indent += 1;
}
@Override public void openDef (Ref.Global id, String name, Kind kind, Flavor flavor,
boolean exported, Access access,
int offset, int bodyStart, int bodyEnd) {
emit("def", "name", name, "kind", kind, "flavor", flavor, "exp", exported, "access", access,
"off", offset, "start", bodyStart, "end", bodyEnd, "id", id);
checkName("def", offset, name);
_indent += 1;
}
@Override public void emitRelation (Relation relation, Ref.Global target) {
emit("rel", "type", relation, "tgt", target);
}
@Override public void emitSig (String text) {
emit("sig", "text", text);
}
@Override public void emitSigUse (Ref.Global target, Kind kind, int offset, int length) {
emit("siguse", "tgt", target, "kind", kind, "off", offset, "len", length);
}
@Override public void emitDoc (int offset, int length) {
emit("doc", "off", offset, "len", length);
}
@Override public void emitDocUse (Ref.Global target, Kind kind, int offset, int length) {
emit("docuse", "tgt", target, "kind", kind, "off", offset, "len", length);
}
@Override public void emitUse (Ref.Global target, Kind kind, int offset, String name) {
emit("use", "tgt", target, "kind", kind, "off", offset, "name", name);
checkName("use", offset, name);
}
@Override public void emitUse (Ref.Global target, Kind kind, int offset, int length) {
emit("use", "tgt", target, "kind", kind, "off", offset, "len", length);
}
@Override public void closeDef () {
_indent -= 1;
}
@Override public void closeUnit () {
_indent -= 1;
}
@Override public void closeSession () {
// nada
}
private void checkName (String whence, int offset, String name) {
int end = offset+name.length();
String actual = (offset < 0) ? ("<underflow: " + offset + ">") :
((end > _source.length()) ? ("<overflow:" + end + ">") : _source.substring(offset, end));
if (!actual.equals(name)) {
System.out.println("!!invalid name in " + whence +
" [name=" + name + ", offset=" + offset + ", actual=" + actual + "]");
System.out.println(_source);
}
}
private PrintWriter emit (String key, Object... keyVals) {
PrintWriter out = _out;
for (int ii = 0, ll = _indent; ii < ll; ii++) out.print(" ");
out.print(key);
if (keyVals.length > 0) {
out.print(" {");
for (int ii = 0; ii < keyVals.length; ii += 2) {
if (ii > 0) out.print(", ");
out.print(keyVals[ii]);
out.print("=");
out.print(keyVals[ii+1]);
}
out.print("}");
}
out.println();
return out;
}
private final PrintWriter _out;
private final String _source;
private int _indent = 0;
}
| [
"mdb@samskivert.com"
] | mdb@samskivert.com |
310d79b021a56ff8ae68e4fd9369fd681302e8f7 | d1ad33f6a5bd99abfc413b3c8ded8904f3d62ad0 | /1.JavaSyntax/src/com/javarush/task/task05/task0532/Solution.java | edef6b56740543967b15d1899a781eeb25f222ab | [] | no_license | nikitakoliadin/JavaRushTasks | 96872b9a2293e05129225f3a30f3a6c98f5ec677 | 9b1fbc149863043cd72150c2de7d6b7a802b3b0a | refs/heads/master | 2021-09-18T09:09:44.863281 | 2018-07-12T11:00:39 | 2018-07-12T11:00:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 732 | java | package com.javarush.task.task05.task0532;
import java.io.*;
/*
Задача по алгоритмам
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int N;
do {
N = Integer.parseInt(reader.readLine());
} while(N <= 0);
int[] mas = new int[N];
for(int i = 0; i < mas.length; i++) {
mas[i] = Integer.parseInt(reader.readLine());
}
int maximum = mas[0];
for(Integer i : mas) {
if(i > maximum) {
maximum = i;
}
}
System.out.println(maximum);
}
}
| [
"qThegamEp@gmail.com"
] | qThegamEp@gmail.com |
e553073a69228c56ac9e15d4cbc4742210de814a | 841060e745df2c24e6a4f2370ab2d50d4a66b250 | /guava/src/com/google/common/graph/MultiEdgesConnecting.java | c768e8a9d96549808bc0985406ded4e491d1f627 | [
"Apache-2.0"
] | permissive | yangfancoming/guava-parent | 2d61b596fbce5ee82896a00e02f0490a8db2dcc1 | bda34e5e2a9ebfc0d4ff29077a739d542e736299 | refs/heads/master | 2021-06-19T23:21:36.712821 | 2019-07-26T06:50:48 | 2019-07-26T06:50:48 | 198,820,961 | 0 | 0 | Apache-2.0 | 2021-03-31T21:26:52 | 2019-07-25T11:45:39 | Java | UTF-8 | Java | false | false | 1,652 | java |
package com.google.common.graph;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.AbstractIterator;
import com.google.common.collect.UnmodifiableIterator;
import java.util.AbstractSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* A class to represent the set of edges connecting an (implicit) origin node to a target node.
*
* <p>The {@link #outEdgeToNode} map allows this class to work on networks with parallel edges. See
* {@link EdgesConnecting} for a class that is more efficient but forbids parallel edges.
*
* @author James Sexton
* @param <E> Edge parameter type
*/
abstract class MultiEdgesConnecting<E> extends AbstractSet<E> {
private final Map<E, ?> outEdgeToNode;
private final Object targetNode;
MultiEdgesConnecting(Map<E, ?> outEdgeToNode, Object targetNode) {
this.outEdgeToNode = checkNotNull(outEdgeToNode);
this.targetNode = checkNotNull(targetNode);
}
@Override
public UnmodifiableIterator<E> iterator() {
final Iterator<? extends Entry<E, ?>> entries = outEdgeToNode.entrySet().iterator();
return new AbstractIterator<E>() {
@Override
protected E computeNext() {
while (entries.hasNext()) {
Entry<E, ?> entry = entries.next();
if (targetNode.equals(entry.getValue())) {
return entry.getKey();
}
}
return endOfData();
}
};
}
@Override
public boolean contains(@Nullable Object edge) {
return targetNode.equals(outEdgeToNode.get(edge));
}
}
| [
"34465021+jwfl724168@users.noreply.github.com"
] | 34465021+jwfl724168@users.noreply.github.com |
ebe4a905777c78f49b0954f83d3ccb005fe4c0fd | 2810387aa64dbf8055e68182d8df3c85a73de4a2 | /src/main/java/com/teacherfiles/common/dao/BaseDao.java | 48085b2ad1b3bd392f41056e85097a47091f2891 | [] | no_license | soldiergit/teacher_files | 0f209f28cdf36faebcc96bf1a9b0c36d7c5e3a4f | 97372a8829e4cb38eb493f709c6e1ae4bfd25e5b | refs/heads/master | 2022-02-21T23:35:28.673611 | 2019-10-10T12:28:22 | 2019-10-10T12:28:22 | 195,337,287 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,431 | java | package com.teacherfiles.common.dao;
import org.springframework.dao.DataAccessException;
import java.io.Serializable;
import java.util.List;
/**
* @Program: teacher_files
* @Author: soldier
* @Email: 583403411@qq.com
* @Create: 2019-04-29 07:41
* @Describe:
**/
public interface BaseDao<T> {
/**
*
* @param entity
* @return
*/
public T save(T entity);
/**
*
* @param entity
* @return
*/
public T merge(T entity);
/**
*
* @param entity
*/
public void update(T entity)throws DataAccessException;
/**
*
* @param entity
*/
public T saveOrUpdate(T entity);
/**
*
* @param clazz
* @param id
* @return
*/
public T get(Class<T> clazz, Serializable id);
/**
*
* @param clazz
* @param id
*/
public void remove(Class<T> clazz, Serializable id);
/**
*
* @param entity
*/
public void remove(T entity)throws DataAccessException;
/**
*
* @param entity
*/
public T getById(T entity, Integer id);
/**
*
* @return
*/
public List<T> getAll(Class<T> clazz);
/**
*
* @param queryString
* @param params
* @return
*/
public List<T> findByHql(String queryString, Object[] params);
/**
*
* @param queryString
* @param params
* @param start
* @param limit
* @return
*/
public List<T> findByHql(String queryString, Object[] params, int start, int limit);
public List<Object[]> queryByHql(String queryString);
/**
* Remove the given object from the Session cache
* @param entity
*/
public void evict(T entity);
/**
*
*/
public void flush();
/**
* @param queryString
* @param values
* @return
*/
public Long update(String queryString, Object[] values);
public Long updateBySql(String queryString, Object[] values);
public List<T> findByExample(String queryString, Object[] valueArray);
public List<Object[]> query(String queryString);
public List<Object[]> query(final String queryString, final Object[] values);
public List<T> find(String hql);
public int findCount(String hql);
// public Result findBySQL(final String sql, final Object[] values,
// final int start, final int limit);
}
| [
"soldier_wyyx@163.com"
] | soldier_wyyx@163.com |
9b13ecf422a6a280feb82104126c7df4f9478629 | 4e5aea98b2c780253ab7a0b7e5ae806d9e6cc3f0 | /SeriesGuide/src/main/java/com/battlelancer/seriesguide/ui/ConnectTraktFragment.java | dca3ed8c660c17be72250a40e14cd73f764c2461 | [
"Apache-2.0"
] | permissive | xWolfSrt/SeriesGuide | 7e5c050fa12a911d7088d2c41aa9819d28c819bc | 01020fb8d468561daee267001329061fda1170b5 | refs/heads/master | 2021-01-15T20:24:01.772125 | 2014-05-21T09:50:49 | 2014-05-21T09:50:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,649 | java |
/*
* Copyright 2014 Uwe Trottmann
*
* 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.battlelancer.seriesguide.ui;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
import com.battlelancer.seriesguide.R;
import com.battlelancer.seriesguide.util.Utils;
/**
* Tells about trakt and how it integrates with SeriesGuide, allows to proceed
* to entering credentials step.
*/
public class ConnectTraktFragment extends SherlockFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.connect_trakt_fragment, container, false);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
// connect button
getView().findViewById(R.id.buttonConnectTrakt).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
ConnectTraktCredentialsFragment f = ConnectTraktCredentialsFragment.newInstance();
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(android.R.id.content, f);
ft.commit();
}
});
// discard button
getView().findViewById(R.id.buttonDiscard).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
getActivity().finish();
}
});
// make learn more link clickable
((TextView) getView().findViewById(R.id.textViewAbout))
.setMovementMethod(LinkMovementMethod.getInstance());
}
@Override
public void onStart() {
super.onStart();
Utils.trackView(getActivity(), "Connect Trakt Intro");
}
}
| [
"uwe.trottmann@gmail.com"
] | uwe.trottmann@gmail.com |
cd994d2f2cf99440b91a4531a7a5aaa654f56b23 | 96f8d42c474f8dd42ecc6811b6e555363f168d3e | /budejie/sources/com/alibaba/mtl/log/e/r.java | f919ac2b756bb87b83d26fb317dab86fc808d7fd | [] | no_license | aheadlcx/analyzeApk | 050b261595cecc85790558a02d79739a789ae3a3 | 25cecc394dde4ed7d4971baf0e9504dcb7fabaca | refs/heads/master | 2020-03-10T10:24:49.773318 | 2018-04-13T09:44:45 | 2018-04-13T09:44:45 | 129,332,351 | 6 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,510 | java | package com.alibaba.mtl.log.e;
import android.annotation.TargetApi;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import com.alibaba.mtl.appmonitor.AppMonitor;
import com.alibaba.mtl.appmonitor.b.b;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
public class r {
private static int F = 1;
private static int G = 2;
private static int H = 10;
private static int I = 60;
public static r a;
/* renamed from: a */
private static ThreadPoolExecutor f27a;
private static final AtomicInteger f = new AtomicInteger();
private HandlerThread b = new HandlerThread(AppMonitor.TAG);
private Handler mHandler;
static class a implements ThreadFactory {
private int priority;
public a(int i) {
this.priority = i;
}
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable, "AppMonitor:" + r.a().getAndIncrement());
thread.setPriority(this.priority);
return thread;
}
}
@TargetApi(9)
private static ThreadPoolExecutor a(int i, int i2, int i3, int i4, int i5) {
BlockingQueue linkedBlockingQueue;
if (i5 > 0) {
linkedBlockingQueue = new LinkedBlockingQueue(i5);
} else {
linkedBlockingQueue = new LinkedBlockingQueue();
}
return new ThreadPoolExecutor(i2, i3, (long) i4, TimeUnit.SECONDS, linkedBlockingQueue, new a(i), new DiscardOldestPolicy());
}
/* renamed from: a */
private static synchronized ThreadPoolExecutor m19a() {
ThreadPoolExecutor threadPoolExecutor;
synchronized (r.class) {
if (f27a == null) {
f27a = a(F, G, H, I, 500);
}
threadPoolExecutor = f27a;
}
return threadPoolExecutor;
}
public static synchronized r a() {
r rVar;
synchronized (r.class) {
if (a == null) {
a = new r();
}
rVar = a;
}
return rVar;
}
private r() {
this.b.start();
this.mHandler = new Handler(this, this.b.getLooper()) {
final /* synthetic */ r b;
public void handleMessage(Message message) {
super.handleMessage(message);
try {
if (message.obj != null && (message.obj instanceof Runnable)) {
r.a().submit((Runnable) message.obj);
}
} catch (Throwable th) {
}
}
};
}
public final void a(int i, Runnable runnable, long j) {
try {
Message obtain = Message.obtain(this.mHandler, i);
obtain.obj = runnable;
this.mHandler.sendMessageDelayed(obtain, j);
} catch (Throwable e) {
b.a(e);
}
}
public final void f(int i) {
this.mHandler.removeMessages(i);
}
public final boolean b(int i) {
return this.mHandler.hasMessages(i);
}
public void b(Runnable runnable) {
try {
a().submit(runnable);
} catch (Throwable th) {
}
}
}
| [
"aheadlcxzhang@gmail.com"
] | aheadlcxzhang@gmail.com |
d4feac497f3e33e40dfd3eb1c041367d5f0f7c55 | 5a959164902dad87f927d040cb4b243d39b8ebe3 | /qafe-mobile-gwt/src/main/java/com/qualogy/qafe/mgwt/client/views/impl/AppViewImpl.java | 737633e28055ace66b3b77650e3f450276f0f83d | [
"Apache-2.0"
] | permissive | JustusM/qafe-platform | 0c8bc824d1faaa6021bc0742f26733bf78408606 | 0ef3b3d1539bcab16ecd6bfe5485d727606fecf1 | refs/heads/master | 2021-01-15T11:38:04.044561 | 2014-09-25T09:20:38 | 2014-09-25T09:20:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,954 | java | /**
* Copyright 2008-2014 Qualogy Solutions B.V.
*
* 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.qualogy.qafe.mgwt.client.views.impl;
import java.util.List;
import com.googlecode.mgwt.ui.client.widget.CellList;
import com.googlecode.mgwt.ui.client.widget.ScrollPanel;
import com.googlecode.mgwt.ui.client.widget.celllist.HasCellSelectedHandler;
import com.qualogy.qafe.mgwt.client.BasicCell;
import com.qualogy.qafe.mgwt.client.activities.home.Topic;
import com.qualogy.qafe.mgwt.client.views.AppView;
public class AppViewImpl extends AbstractViewImpl implements AppView {
private CellList<Topic> cellList;
public AppViewImpl() {
cellList = new CellList<Topic>(new BasicCell<Topic>() {
@Override
public String getDisplayString(Topic model) {
return model.getName();
}
@Override
public boolean canBeSelected(Topic model) {
return true;
}
});
cellList.setRound(true);
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setWidget(cellList);
scrollPanel.setScrollingEnabledX(false);
mainPanel.add(scrollPanel);
}
@Override
public HasCellSelectedHandler getCellSelectedHandler() {
return cellList;
}
@Override
public void setTopics(List<Topic> models) {
cellList.render(models);
}
@Override
public void setSelectedIndex(int index, boolean selected) {
cellList.setSelectedIndex(index, selected);
}
} | [
"rkha@f87ad13a-6d31-43dd-9311-282d20640c02"
] | rkha@f87ad13a-6d31-43dd-9311-282d20640c02 |
a606e3b5dc981387cbb397f5b1ad4ff65f965f21 | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/mockito/2016/4/LoggingListener.java | bed0ba682ea39520335a0de1fd02eb1b609e8da0 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 3,441 | java | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.debugging;
import org.mockito.internal.invocation.InvocationMatcher;
import org.mockito.invocation.Invocation;
import java.util.LinkedList;
import java.util.List;
import static org.mockito.internal.util.StringJoiner.join;
public class LoggingListener implements FindingsListener {
private final boolean warnAboutUnstubbed;
private List<String> argMismatchStubs = new LinkedList<String>();
private List<String> unusedStubs = new LinkedList<String>();
private List<String> unstubbedCalls = new LinkedList<String>();
public LoggingListener(boolean warnAboutUnstubbed) {
this.warnAboutUnstubbed = warnAboutUnstubbed;
}
public void foundStubCalledWithDifferentArgs(Invocation unused, InvocationMatcher unstubbed) {
//TODO there is not good reason we should get Invocation and InvocationMatcher here
// we should pass 2 InvocationMatchers and testing is easier
// it's also confusing that unstubbed invocation is passed as InvocationMatcher (should be rather Invocation)
//this information comes in pairs
String index = Integer.toString(indexOfNextPair(argMismatchStubs.size()));
//making sure indentation is correct
String padding = index.replaceAll("\\d", " ");
argMismatchStubs.add(index + ". Stubbed " + unused.getLocation());
argMismatchStubs.add(padding + " Invoked " + unstubbed.getInvocation().getLocation());
}
static int indexOfNextPair(int collectionSize) {
return (collectionSize / 2) + 1;
}
public void foundUnusedStub(Invocation unused) {
unusedStubs.add((unusedStubs.size() + 1) + ". " + unused.getLocation());
}
public void foundUnstubbed(InvocationMatcher unstubbed) {
if (warnAboutUnstubbed) {
unstubbedCalls.add((unstubbedCalls.size() + 1) + ". " + unstubbed.getInvocation().getLocation());
}
}
public String getStubbingInfo() {
if (argMismatchStubs.isEmpty() && unusedStubs.isEmpty() && unstubbedCalls.isEmpty()) {
return "";
}
List<String> lines = new LinkedList<String>();
lines.add("[Mockito] Additional stubbing information (see javadoc for StubbingInfo class):");
if (!argMismatchStubs.isEmpty()) {
lines.add("[Mockito]");
lines.add("[Mockito] Argument mismatch between stubbing and actual invocation (is stubbing correct in the test?):");
lines.add("[Mockito]");
addOrderedList(lines, argMismatchStubs);
}
if (!unusedStubs.isEmpty()) {
lines.add("[Mockito]");
lines.add("[Mockito] Unused stubbing (perhaps can be removed from the test?):");
lines.add("[Mockito]");
addOrderedList(lines, unusedStubs);
}
if (!unstubbedCalls.isEmpty()) {
lines.add("[Mockito]");
lines.add("[Mockito] Unstubbed method invocations (perhaps missing stubbing in the test?):");
lines.add("[Mockito]");
addOrderedList(lines, unstubbedCalls);
}
return join("", lines);
}
private void addOrderedList(List<String> target, List<String> additions) {
for (String a : additions) {
target.add("[Mockito] " + a);
}
}
} | [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
805c4532e9618b90718168e9d92c4422908fe8c7 | 6253283b67c01a0d7395e38aeeea65e06f62504b | /decompile/app/HwSystemManager/src/main/java/com/trustlook/sdk/cloudscan/ScanResult.java | baddb4b60a2119df2aa2cfe738e05c184aea12c9 | [] | no_license | sufadi/decompile-hw | 2e0457a0a7ade103908a6a41757923a791248215 | 4c3efd95f3e997b44dd4ceec506de6164192eca3 | refs/heads/master | 2023-03-15T15:56:03.968086 | 2017-11-08T03:29:10 | 2017-11-08T03:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.trustlook.sdk.cloudscan;
import com.trustlook.sdk.data.AppInfo;
import com.trustlook.sdk.data.Result;
import java.util.List;
public class ScanResult extends Result {
List<AppInfo> a;
public List<AppInfo> getList() {
return this.a;
}
public void setList(List<AppInfo> list) {
this.a = list;
}
}
| [
"liming@droi.com"
] | liming@droi.com |
455798939a83d15a7d02011c3bd448e7c6f6e86d | d76d10c5d04a7a5028dc26679b1e6254e95bd589 | /herd-code/herd-dao/src/test/java/org/finra/herd/dao/helper/AwsHelperTest.java | 3ef243089d33fc6290221834b37c2e87ce414719 | [
"Apache-2.0"
] | permissive | seoj/herd | 860b137215a9583cdce7e7a6c6951f0aecaafe77 | e5cbf6fb543c13377eecfbb5029b5a8d4edc8c48 | refs/heads/master | 2020-12-29T00:55:35.225483 | 2016-04-27T17:31:42 | 2016-04-27T17:31:42 | 43,754,151 | 0 | 2 | null | 2015-10-06T13:58:53 | 2015-10-06T13:58:53 | null | UTF-8 | Java | false | false | 3,626 | java | /*
* Copyright 2015 herd contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.finra.herd.dao.helper;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.util.Arrays;
import com.amazonaws.ClientConfiguration;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.finra.herd.dao.AbstractDaoTest;
import org.finra.herd.model.dto.AwsParamsDto;
import org.finra.herd.model.dto.ConfigurationValue;
/**
* This class tests functionality within the AwsHelper class.
*/
public class AwsHelperTest extends AbstractDaoTest
{
@Autowired
private AwsHelper awsHelper;
@Test
public void testGetAwsParamsDto() throws Exception
{
// Get AWS parameters DTO.
AwsParamsDto resultAwsParamsDto = awsHelper.getAwsParamsDto();
// Validate the results.
// Since local users could set environment variables with a real HTTP proxy to test the real application, we can't update the environment to test
// specific values. Instead, we can only test that the returned DTO contains the values in the environment.
assertEquals(configurationHelper.getProperty(ConfigurationValue.HTTP_PROXY_HOST), resultAwsParamsDto.getHttpProxyHost());
assertEquals(configurationHelper.getProperty(ConfigurationValue.HTTP_PROXY_PORT, Integer.class), resultAwsParamsDto.getHttpProxyPort());
assertNotNull(resultAwsParamsDto);
}
@Test
public void testGetClientConfiguration() throws Exception
{
// Try to get AWS parameters using all possible permutations of HTTP proxy settings.
for (String testHttpProxyHost : Arrays.asList(STRING_VALUE, BLANK_TEXT, null))
{
for (Integer testHttpProxyPort : Arrays.asList(INTEGER_VALUE, null))
{
// Create AWS parameters DTO.
AwsParamsDto testAwsParamsDto = awsHelper.getAwsParamsDto();
testAwsParamsDto.setHttpProxyHost(testHttpProxyHost);
testAwsParamsDto.setHttpProxyPort(testHttpProxyPort);
// Get client configuration.
ClientConfiguration resultClientConfiguration = awsHelper.getClientConfiguration(testAwsParamsDto);
// Validate the results.
assertNotNull(resultClientConfiguration);
// The proxy settings are set only when both host and port are specified in the AWS parameters DTO.
if (STRING_VALUE.equals(testHttpProxyHost) && INTEGER_VALUE.equals(testHttpProxyPort))
{
assertEquals(testHttpProxyHost, resultClientConfiguration.getProxyHost());
assertEquals(testHttpProxyPort, Integer.valueOf(resultClientConfiguration.getProxyPort()));
}
else
{
assertNull(resultClientConfiguration.getProxyHost());
assertEquals(-1, resultClientConfiguration.getProxyPort());
}
}
}
}
}
| [
"mchao47@gmail.com"
] | mchao47@gmail.com |
07a4496b6db52ea99be5f4ded24d8eb61ed1b12c | 4aa90348abcb2119011728dc067afd501f275374 | /app/src/main/java/com/tencent/mm/plugin/nearby/ui/a$5.java | b1c64b88ef8637e8af8b3347b4a7988d103fa79a | [] | no_license | jambestwick/HackWechat | 0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6 | 6a34899c8bfd50d19e5a5ec36a58218598172a6b | refs/heads/master | 2022-01-27T12:48:43.446804 | 2021-12-29T10:36:30 | 2021-12-29T10:36:30 | 249,366,791 | 0 | 0 | null | 2020-03-23T07:48:32 | 2020-03-23T07:48:32 | null | UTF-8 | Java | false | false | 342 | java | package com.tencent.mm.plugin.nearby.ui;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
class a$5 implements OnClickListener {
final /* synthetic */ a oOu;
a$5(a aVar) {
this.oOu = aVar;
}
public final void onClick(DialogInterface dialogInterface, int i) {
}
}
| [
"malin.myemail@163.com"
] | malin.myemail@163.com |
847c0cd4ffa2330b832d312362d03a67a5b4f092 | faac38ad94b701611936826413b82d5e765df4ad | /java/leetcode/src/main/java/com/vaani/leetcode/bit_manipulation/BinaryWatch.java | 29d59b95313512d6972cba9f59d461530849f6b2 | [
"MIT"
] | permissive | kinshuk4/leetcode-solutions | 8e721cd9e4d40cca1e5267557395a89c577f1c04 | a4a8c6353b6ac0ea066a0fed5ce7a6661d206711 | refs/heads/master | 2023-05-25T14:37:07.854010 | 2023-05-13T22:18:07 | 2023-05-13T22:18:07 | 170,730,125 | 1 | 0 | MIT | 2022-07-22T22:04:07 | 2019-02-14T17:24:27 | Java | UTF-8 | Java | false | false | 2,146 | java | package com.vaani.leetcode.bit_manipulation;
import java.util.ArrayList;
import java.util.List;
/**
* https://leetcode.com/problems/binary-watch/
* 401. Binary Watch
* Easy
* <p>
* A binary watch has 4 LEDs on the top which represent the hours (0-11),
* and the 6 LEDs on the bottom represent the minutes (0-59).
* <p>
* Each LED represents a zero or one, with the least significant bit on the right.
* <p>
* WatchHour = 0 0 1 1
* WatchMinute= 0 1 1 0 0 1
* For example, the above binary watch reads "3:25".
* <p>
* Given a non-negative integer n which represents the number of LEDs that are currently on, return all possible times the watch could represent.
* <p>
* Example:
* <p>
* Input: n = 1
* Return: ["1:00", "2:00", "4:00", "8:00", "0:01", "0:02", "0:04", "0:08", "0:16", "0:32"]
* <p>
* Note:
* <p>
* The order of output does not matter.
* The hour must not contain a leading zero, for example "01:00" is not valid, it should be "1:00".
* The minute must be consist of two digits and may contain a leading zero, for example "10:2" is not valid, it should be "10:02".
*/
public class BinaryWatch {
public static void main(String[] args) {
System.out.println(new BinaryWatch().readBinaryWatch(1));
}
public List<String> readBinaryWatch(int num) {
int H = 11, M = 59, X = 4, Y = 6;
List<String> result = new ArrayList<>();
if (num == 0) {
result.add("0:00");
return result;
}
for (int i = 0; i <= H; i++) {
for (int j = 0; j <= M; j++) {
int count = 0;
for (int k = 0; k < X; k++) {
if (((1 << k) & i) > 0) {
count++;
}
}
for (int k = 0; k < Y; k++) {
if (((1 << k) & j) > 0) {
count++;
}
}
if (count == num) {
result.add(i + ":" + ((String.valueOf(j).length() == 1) ? ("0" + j) : j));
}
}
}
return result;
}
}
| [
"kinshuk.ram@gmail.com"
] | kinshuk.ram@gmail.com |
11c9783664e737bddee9a45a70a537d80e9e7de5 | 46104235aea027f54d2945968979048150eedb97 | /src/main/java/libgdx/implementations/kidlearn/spec/KidLearnMultipleItemsGameCreator.java | da7e15e08aba7af18f8dec69253008deb33f9c4c | [] | no_license | horeab/SkelClassicGame | 2aed9e53535688246ff06a83f36d8e4ace35fa44 | 789d48f90d1fd08c9ac154eb86e9c22ae539d229 | refs/heads/master | 2021-06-26T04:36:05.520593 | 2021-06-11T13:13:12 | 2021-06-11T13:13:12 | 229,983,033 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,913 | java | package libgdx.implementations.kidlearn.spec;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import org.apache.commons.lang3.tuple.Pair;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import libgdx.controls.label.MyWrappedLabel;
import libgdx.resources.Res;
import libgdx.resources.dimen.MainDimen;
import libgdx.utils.ScreenDimensionsManager;
public abstract class KidLearnMultipleItemsGameCreator extends KidLearnHorizontalDragDropCreator {
private KidLearnMultipleAnswersConfig config;
private static final float SCALE = 0.2f;
private static final float SCALE_DURATION = 0.3f;
private static final String SCALED_MARKER = "scaled";
public KidLearnMultipleItemsGameCreator(KidLearnGameContext gameContext, KidLearnMultipleAnswersConfig config) {
super(gameContext);
this.config = config;
}
@Override
protected double getNumberOfCorrectUnknownItems() {
return getTotalOptions();
}
@Override
protected boolean isResponseCorrect() {
boolean isCorrect = true;
List<KidLearnImgInfo> alreadyMovedOptionImg = getAlreadyMovedOptionImg();
for (KidLearnImgInfo unk : unknownImg) {
List<String> correctAnswersForUnk = new ArrayList<>();
for (Map.Entry<KidLearnWordImgConfig, List<KidLearnWordImgConfig>> e : config.responseWithAnswers.entrySet()) {
if (e.getKey().word.equals(unk.val)) {
for (KidLearnWordImgConfig c : e.getValue()) {
correctAnswersForUnk.add(c.word);
}
}
}
for (KidLearnImgInfo opt : alreadyMovedOptionImg) {
if (opt.img.getX() == getUnkOptionX(unk.img) && !correctAnswersForUnk.contains((opt.val))) {
isCorrect = false;
break;
}
}
}
return isCorrect;
}
@Override
protected void createAllItemsContainer() {
int i = 0;
for (Map.Entry<KidLearnWordImgConfig, List<KidLearnWordImgConfig>> e : config.responseWithAnswers.entrySet()) {
Pair<Float, Float> coord = getCoordsForResponseRow(i);
Table imgStack = addResponseImg(coord, e.getKey().img, e.getKey().word);
unknownImg.add(new KidLearnImgInfo(coord, imgStack, e.getKey().word));
i++;
}
}
@Override
protected void processResponseTextLabel(MyWrappedLabel label) {
label.bottom();
label.padBottom(MainDimen.vertical_general_margin.getDimen());
}
@Override
protected float getResponsesRowY() {
return ScreenDimensionsManager.getExternalDeviceHeightValue(50);
}
@Override
protected float getVariableResponseY() {
return 0;
}
@Override
protected float getOptionWidth() {
return super.getOptionWidth() * 1f;
}
@Override
protected float getOptionHeight() {
return getOptionWidth();
}
@Override
protected float getAcceptedDistanceForDropWidth() {
return getOptionWidth() / 2;
}
@Override
protected float getAcceptedDistanceForDropHeight() {
return getOptionWidth() / 2;
}
@Override
protected float getOptionsAvailableScreenWidth() {
return ScreenDimensionsManager.getScreenWidth(95);
}
@Override
protected int getTotalItems() {
return config.responseWithAnswers.size();
}
@Override
protected int getTotalOptions() {
int totalOptions = 0;
for (Map.Entry<KidLearnWordImgConfig, List<KidLearnWordImgConfig>> e : config.responseWithAnswers.entrySet()) {
totalOptions = totalOptions + e.getValue().size();
}
return totalOptions;
}
@Override
protected List<Pair<String, Res>> getAllOptions() {
List<Pair<String, Res>> opt = new ArrayList<>();
for (Map.Entry<KidLearnWordImgConfig, List<KidLearnWordImgConfig>> e : config.responseWithAnswers.entrySet()) {
for (KidLearnWordImgConfig config : e.getValue()) {
opt.add(Pair.of(config.word, config.img));
}
}
return opt;
}
@Override
protected float dragStopMoveToY(Table unk) {
return unk.getY() + unk.getHeight() / 1.6f;
}
@Override
protected float dragStopMoveToX(Table unk) {
return getUnkOptionX(unk);
}
protected float getUnkOptionX(Table unk) {
return unk.getX() + unk.getWidth() / 5.75f;
}
protected boolean optionDragStopValidExtraCondition(KidLearnImgInfo unkInfo) {
return true;
}
@Override
protected void executeOptionResetAnimation(Table img) {
if (SCALED_MARKER.equals(img.getUserObject())) {
img.addAction(Actions.scaleBy(SCALE, SCALE, SCALE_DURATION));
img.setUserObject(null);
}
}
@Override
protected void executeAnimationAfterDragStop(Table opt, Table unk) {
List<KidLearnImgInfo> toSort = new ArrayList<>(alreadyMovedOptionImg);
Collections.reverse(toSort);
for (KidLearnImgInfo info : toSort) {
info.img.toFront();
}
if (!SCALED_MARKER.equals(opt.getUserObject())) {
opt.setTransform(true);
opt.addAction(Actions.scaleBy(-SCALE, -SCALE, SCALE_DURATION));
opt.setUserObject(SCALED_MARKER);
}
Table lastAddedImg = getLastAddedImgInContainer(getUnkOptionX(unk));
if (lastAddedImg != null) {
opt.addAction(Actions.moveTo(lastAddedImg.getX(),
lastAddedImg.getY() - lastAddedImg.getHeight() / 3, 0.3f));
}
}
@Override
protected float getVerifyBtnY() {
return MainDimen.vertical_general_margin.getDimen();
}
}
| [
"horea.bucerzan@gmail.com"
] | horea.bucerzan@gmail.com |
1ab0282edb349b909adfeb5b3d6df8ab19db0a35 | 2d617652759da2f37b9fe8e845b5936e77a3fe54 | /src/main/java/net/simpleframework/organization/IDepartment.java | 60705d0933464c7f3f252c04a85d4f8b23c56c8e | [] | no_license | simple4/simple-organization | d229cbcc266b6169b679344f57a29829dd510c74 | adcc6cd38c9c3861fd48773a5001e31d6887871f | refs/heads/master | 2021-01-25T12:07:28.989206 | 2012-11-24T16:09:10 | 2012-11-24T16:09:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 943 | java | package net.simpleframework.organization;
import net.simpleframework.common.bean.IDescriptionBeanAware;
import net.simpleframework.common.bean.IIdBeanAware;
import net.simpleframework.common.bean.INameBeanAware;
import net.simpleframework.common.bean.IOrderBeanAware;
import net.simpleframework.common.bean.ITextBeanAware;
import net.simpleframework.common.bean.ITreeBeanAware;
/**
* 这是一个开源的软件,请在LGPLv3下合法使用、修改或重新发布。
*
* @author 陈侃(cknet@126.com, 13910090885)
* http://code.google.com/p/simpleframework/
* http://www.simpleframework.net
*/
public interface IDepartment extends IIdBeanAware, INameBeanAware, ITextBeanAware,
IDescriptionBeanAware, ITreeBeanAware, IOrderBeanAware {
/**
* 获取部门的类型
*
* @return
*/
EDepartmentType getDepartmentType();
void setDepartmentType(EDepartmentType departmentType);
}
| [
"cknet@126.com"
] | cknet@126.com |
a13f9f738d43994b0ce9513a62fbc13e464d14fc | 7927344fbe02af07ef137a3b3453a9891c586238 | /net/minecraft/client/audio/GuardianSound.java | 38d3fd3c8524ccc3f8b4614d3d173b281301816a | [
"MIT"
] | permissive | Hexeption/How-to-code-an-advanced-hacked-client-for-1.9 | a9d4df9c1254402c5ccf47912dbd8c6e1d9894c3 | f23beceb4b2996e0de24b2822aae940dae1fc88e | refs/heads/master | 2021-01-18T22:41:13.800852 | 2016-12-11T18:25:26 | 2016-12-11T18:25:26 | 53,270,980 | 9 | 19 | null | 2016-06-05T07:24:26 | 2016-03-06T19:04:09 | Java | UTF-8 | Java | false | false | 1,128 | java | package net.minecraft.client.audio;
import net.minecraft.entity.monster.EntityGuardian;
import net.minecraft.init.SoundEvents;
import net.minecraft.util.SoundCategory;
public class GuardianSound extends MovingSound
{
private final EntityGuardian guardian;
public GuardianSound(EntityGuardian guardian)
{
super(SoundEvents.entity_guardian_attack, SoundCategory.HOSTILE);
this.guardian = guardian;
this.attenuationType = ISound.AttenuationType.NONE;
this.repeat = true;
this.repeatDelay = 0;
}
/**
* Like the old updateEntity(), except more generic.
*/
public void update()
{
if (!this.guardian.isDead && this.guardian.hasTargetedEntity())
{
this.xPosF = (float)this.guardian.posX;
this.yPosF = (float)this.guardian.posY;
this.zPosF = (float)this.guardian.posZ;
float f = this.guardian.func_175477_p(0.0F);
this.volume = 0.0F + 1.0F * f * f;
this.pitch = 0.7F + 0.5F * f;
}
else
{
this.donePlaying = true;
}
}
}
| [
"minecraftfun201@gmail.com"
] | minecraftfun201@gmail.com |
ba1847e0dd0b7a7a814dd25644338f7a06082461 | a421aa05e9008e8f767d0e60040fe8306b79cabe | /java/com/google/gerrit/acceptance/testsuite/project/TestProjectCreation.java | a0b130ef8089ae32d439f404ed7847262e6519b5 | [
"Apache-2.0"
] | permissive | LogtalkDotOrg/gerrit | 8e7302c60ba0d6631fdf79928f31627efce40b84 | 2139c773ea216b966bd952e74f66cc3621730f95 | refs/heads/master | 2020-03-27T01:25:44.217295 | 2018-11-26T00:35:00 | 2018-11-26T00:35:00 | 145,709,606 | 0 | 0 | Apache-2.0 | 2018-08-22T13:00:01 | 2018-08-22T13:00:00 | null | UTF-8 | Java | false | false | 2,517 | java | // Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.acceptance.testsuite.project;
import com.google.auto.value.AutoValue;
import com.google.gerrit.acceptance.testsuite.ThrowingFunction;
import com.google.gerrit.extensions.client.SubmitType;
import com.google.gerrit.reviewdb.client.Project;
import java.util.Optional;
@AutoValue
public abstract class TestProjectCreation {
public abstract Optional<String> name();
public abstract Optional<Project.NameKey> parent();
public abstract Optional<Boolean> createEmptyCommit();
public abstract Optional<SubmitType> submitType();
abstract ThrowingFunction<TestProjectCreation, Project.NameKey> projectCreator();
public static Builder builder(
ThrowingFunction<TestProjectCreation, Project.NameKey> projectCreator) {
return new AutoValue_TestProjectCreation.Builder().projectCreator(projectCreator);
}
@AutoValue.Builder
public abstract static class Builder {
public abstract TestProjectCreation.Builder name(String name);
public abstract TestProjectCreation.Builder parent(Project.NameKey parent);
public abstract TestProjectCreation.Builder submitType(SubmitType submitType);
public abstract TestProjectCreation.Builder createEmptyCommit(boolean value);
/** Skips the empty commit on creation. This means that project's branches will not exist. */
public TestProjectCreation.Builder noEmptyCommit() {
return createEmptyCommit(false);
}
abstract TestProjectCreation.Builder projectCreator(
ThrowingFunction<TestProjectCreation, Project.NameKey> projectCreator);
abstract TestProjectCreation autoBuild();
/**
* Executes the project creation as specified.
*
* @return the name of the created project
*/
public Project.NameKey create() throws Exception {
TestProjectCreation creation = autoBuild();
return creation.projectCreator().apply(creation);
}
}
}
| [
"hanwen@google.com"
] | hanwen@google.com |
23266bcfe0e5d127f96e3e3776c78eacd7f2d526 | 4be72dee04ebb3f70d6e342aeb01467e7e8b3129 | /bin/ext-backoffice/warehousingbackoffice/web/testsrc/de/hybris/platform/warehousingbackoffice/actions/ship/ConfirmShippedConsignmentActionTest.java | 5a9fe8fc33ef6cb8c7f14877325af3361bbe9d59 | [] | no_license | lun130220/hybris | da00774767ba6246d04cdcbc49d87f0f4b0b1b26 | 03c074ea76779f96f2db7efcdaa0b0538d1ce917 | refs/heads/master | 2021-05-14T01:48:42.351698 | 2018-01-07T07:21:53 | 2018-01-07T07:21:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,333 | java | package de.hybris.platform.warehousingbackoffice.actions.ship;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.commerceservices.model.PickUpDeliveryModeModel;
import de.hybris.platform.ordersplitting.model.ConsignmentEntryModel;
import de.hybris.platform.ordersplitting.model.ConsignmentModel;
import de.hybris.platform.warehousing.process.WarehousingBusinessProcessService;
import de.hybris.platform.warehousing.shipping.ShippingService;
import de.hybris.platform.warehousingbackoffice.actions.ship.ConfirmShippedConsignmentAction;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import com.google.common.collect.Sets;
import com.hybris.cockpitng.actions.ActionContext;
@UnitTest
@RunWith(MockitoJUnitRunner.class)
public class ConfirmShippedConsignmentActionTest
{
@InjectMocks
private ConfirmShippedConsignmentAction action;
@Mock
private ShippingService shippingService;
@Mock
private WarehousingBusinessProcessService<ConsignmentModel> consignmentBusinessProcessService;
@Mock
private ActionContext context;
@Mock
private ConsignmentModel consignment;
@Mock
private ConsignmentEntryModel entry1;
@Mock
private ConsignmentEntryModel entry2;
@Before
public void setUp()
{
when(context.getData()).thenReturn(consignment);
}
@Test
public void returnFalse_notInstanceOfConsignmentModel()
{
when(context.getData()).thenReturn("test");
final boolean result = action.canPerform(context);
assertFalse(result);
}
@Test
public void returnFalse_nullConsignment()
{
when(context.getData()).thenReturn(null);
final boolean result = action.canPerform(context);
assertFalse(result);
}
@Test
public void returnFalse_pickUpConsignment() {
when(consignment.getDeliveryMode()).thenReturn(new PickUpDeliveryModeModel());
final boolean result = action.canPerform(context);
assertFalse(result);
}
@Test
public void returnFalse_nullConsignmentEntries() {
when(consignment.getConsignmentEntries()).thenReturn(null);
final boolean result = action.canPerform(context);
assertFalse(result);
}
@Test
public void returnFalse_nullQuantityPending() {
when(entry1.getQuantityPending()).thenReturn(null);
when(entry2.getQuantityPending()).thenReturn(null);
when(consignment.getConsignmentEntries()).thenReturn(Sets.newHashSet(entry1, entry2));
final boolean result = action.canPerform(context);
assertFalse(result);
}
@Test
public void returnFalse_noQuantityPending()
{
when(entry1.getQuantityPending()).thenReturn(0L);
when(entry2.getQuantityPending()).thenReturn(0L);
when(consignment.getConsignmentEntries()).thenReturn(Sets.newHashSet(entry1, entry2));
final boolean result = action.canPerform(context);
assertFalse(result);
}
@Test
public void returnTrue_remainingQuantityPending()
{
when(entry1.getQuantityPending()).thenReturn(0L);
when(entry2.getQuantityPending()).thenReturn(5L);
when(consignment.getConsignmentEntries()).thenReturn(Sets.newHashSet(entry1, entry2));
final boolean result = action.canPerform(context);
assertTrue(result);
}
}
| [
"lun130220@gamil.com"
] | lun130220@gamil.com |
9cc0e28515ede5c3b244ddb939f7bb9eb615d303 | 0bdf425cd5d225f09ca8c69abc4b3cd5f0521ee1 | /app/src/main/java/dev/raghav/jobsjunction/HttpHandler.java | 64c456bd25c487b58253ae0fdd2d31b84a7fe8cf | [] | no_license | raghsahu/JOBSJUNCTION | e54bbb3e0995a703105dd16b5f8d243855e8fe0c | 40ed09a41315ee3d4d8a2da5f7744f657662a9fa | refs/heads/master | 2020-06-04T13:35:01.185414 | 2019-06-15T06:23:18 | 2019-06-15T06:23:18 | 192,044,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,284 | java | package dev.raghav.jobsjunction;
import android.os.Build;
import android.util.Log;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSocketFactory;
public class HttpHandler {
private static final String TAG = HttpHandler.class.getSimpleName();
public HttpHandler() {
}
public static String makeServiceCall(String reqUrl) {
URL url = null;
try {
url = new URL(reqUrl);
} catch (MalformedURLException e) {
e.printStackTrace();
}
String response = null;
try {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
// HttpURLConnection conn = (HttpURLConnection) url.openConnection();
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
SSLContext sslcontext = SSLContext.getInstance("TLSv1");
// SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslcontext.init(null, null, null);
SSLEngine engine = sslcontext.createSSLEngine();
sslcontext.init(null,
null,
null);
SSLSocketFactory NoSSLv3Factory = new NoSSLv3SocketFactory(sslcontext.getSocketFactory());
conn.setDefaultSSLSocketFactory(new ImprovedSSLSocketFactory());
conn.setRequestMethod("GET");
InputStream in = new BufferedInputStream(conn.getInputStream());
response = convertStreamToString(in);
}else{
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
InputStream in = new BufferedInputStream(conn.getInputStream());
response = convertStreamToString(in);
}
// read the response
} catch (MalformedURLException e) {
Log.e(TAG, "MalformedURLException: " + e.getMessage());
} catch (ProtocolException e) {
Log.e(TAG, "ProtocolException: " + e.getMessage());
} catch (IOException e) {
Log.e(TAG, "IOException: " + e.getMessage());
} catch (Exception e) {
Log.e(TAG, "Exception: " + e.getMessage());
}
return response;
}
private static String convertStreamToString(InputStream is) {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
try {
while ((line = reader.readLine()) != null) {
sb.append(line).append('\n');
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
}
}
| [
"raghvendra.19934@gmail.com"
] | raghvendra.19934@gmail.com |
50c76c50ce294914091b1bee08fd85c74694c31d | edeb76ba44692dff2f180119703c239f4585d066 | /extI18n/src/org/gvsig/i18n/extension/preferences/table/RadioButtonCell.java | 4458f03901155ac3b3052a2b2ac0b1a69426c2d1 | [] | no_license | CafeGIS/gvSIG2_0 | f3e52bdbb98090fd44549bd8d6c75b645d36f624 | 81376f304645d040ee34e98d57b4f745e0293d05 | refs/heads/master | 2020-04-04T19:33:47.082008 | 2012-09-13T03:55:33 | 2012-09-13T03:55:33 | 5,685,448 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,016 | java | /* gvSIG. Geographic Information System of the Valencian Government
*
* Copyright (C) 2007-2008 Infrastructures and Transports Department
* of the Valencian Gobernment (CIT)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
/*
* AUTHORS (In addition to CIT):
* 2008 {DiSiD Technologies} {New extension for installation and update of text translations}
*/
package org.gvsig.i18n.extension.preferences.table;
import java.awt.Component;
import javax.swing.*;
/**
* Renders a radio button on a table cell.
*
* @author <a href="mailto:dcervera@disid.com">David Cervera</a>
*/
public class RadioButtonCell {
private JRadioButton radio = new JRadioButton();
/**
* Constructor.
*/
public RadioButtonCell() {
radio.setHorizontalAlignment(SwingConstants.CENTER);
}
protected Component getTableCellComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
if (isSelected) {
radio.setForeground(table.getSelectionForeground());
radio.setBackground(table.getSelectionBackground());
}
else {
radio.setForeground(table.getForeground());
radio.setBackground(table.getBackground());
}
radio.setSelected(Boolean.TRUE.equals(value));
return radio;
}
protected JRadioButton getRadioButton() {
return radio;
}
} | [
"tranquangtruonghinh@gmail.com"
] | tranquangtruonghinh@gmail.com |
f973153e9379340b5eb653320aeee3ba481e63fe | 9c9f233ed55005ee1344d704f78448c86306c075 | /src/sqlancer/tidb/gen/TiDBHintGenerator.java | f72eafe1661f88d66734d2ecbe6d9445a267823e | [
"MIT"
] | permissive | MonetDB/sqlancer | 70e99452f96ef0028c08f191072e6adf441024cd | 2be3b061845bb534a3dafba43628c6d00149410b | refs/heads/master | 2023-08-23T08:57:56.010159 | 2022-04-28T15:07:38 | 2022-04-28T15:07:38 | 275,783,550 | 2 | 0 | MIT | 2023-02-27T16:00:51 | 2020-06-29T09:46:33 | Java | UTF-8 | Java | false | false | 4,095 | java | package sqlancer.tidb.gen;
import java.util.List;
import java.util.stream.Collectors;
import sqlancer.IgnoreMeException;
import sqlancer.Randomly;
import sqlancer.common.schema.TableIndex;
import sqlancer.tidb.TiDBBugs;
import sqlancer.tidb.TiDBSchema.TiDBTable;
import sqlancer.tidb.ast.TiDBSelect;
import sqlancer.tidb.ast.TiDBText;
public class TiDBHintGenerator {
private final TiDBSelect select;
private final List<TiDBTable> tables;
private final StringBuilder sb = new StringBuilder();
enum IndexHint {
MERGE_JOIN, //
INL_JOIN, //
INL_HASH_JOIN, //
INL_MERGE_JOIN, //
HASH_JOIN, //
HASH_AGG, //
STREAM_AGG, //
USE_INDEX, //
IGNORE_INDEX, //
AGG_TO_COP, //
// READ_FROM_STORAGE
USE_INDEX_MERGE, //
NO_INDEX_MERGE, //
USE_TOJA;
}
public TiDBHintGenerator(TiDBSelect select, List<TiDBTable> tables) {
this.select = select;
this.tables = tables;
}
public static void generateHints(TiDBSelect select, List<TiDBTable> tables) {
new TiDBHintGenerator(select, tables).generate();
}
private void generate() {
TiDBTable table = Randomly.fromList(tables);
switch (Randomly.fromOptions(IndexHint.values())) {
case MERGE_JOIN:
tablesHint("MERGE_JOIN");
break;
case INL_JOIN:
tablesHint("INL_JOIN");
break;
case INL_HASH_JOIN:
if (TiDBBugs.bug50) {
throw new IgnoreMeException();
}
tablesHint("INL_HASH_JOIN");
break;
case INL_MERGE_JOIN:
tablesHint("INL_MERGE_JOIN");
break;
case HASH_JOIN:
tablesHint("HASH_JOIN");
break;
case HASH_AGG:
sb.append("HASH_AGG()");
break;
case STREAM_AGG:
sb.append("STREAM_AGG()");
break;
case USE_INDEX:
indexesHint("USE_INDEX");
break;
case IGNORE_INDEX:
indexesHint("IGNORE_INDEX");
break;
case AGG_TO_COP:
sb.append("AGG_TO_COP()");
break;
case USE_INDEX_MERGE:
if (table.hasIndexes()) {
sb.append("USE_INDEX_MERGE(");
sb.append(table.getName());
sb.append(", ");
List<TableIndex> indexes = Randomly.nonEmptySubset(table.getIndexes());
sb.append(indexes.stream().map(i -> i.getIndexName()).collect(Collectors.joining(", ")));
sb.append(")");
} else {
throw new IgnoreMeException();
}
break;
case NO_INDEX_MERGE:
sb.append("NO_INDEX_MERGE()");
break;
case USE_TOJA:
sb.append("USE_TOJA(");
sb.append(Randomly.getBoolean());
sb.append(")");
break;
default:
throw new AssertionError();
}
select.setHint(new TiDBText(sb.toString()));
}
private void indexesHint(String string) {
sb.append(string);
sb.append("(");
// FIXME: select one table
TiDBTable table = Randomly.fromList(tables);
List<TableIndex> allIndexes = table.getIndexes();
if (allIndexes.isEmpty()) {
throw new IgnoreMeException();
}
List<TableIndex> indexSubset = Randomly.nonEmptySubset(allIndexes);
sb.append(table.getName());
sb.append(", ");
sb.append(indexSubset.stream().map(i -> i.getIndexName()).distinct().collect(Collectors.joining(", ")));
sb.append(")");
}
private void tablesHint(String string) {
sb.append(string);
sb.append("(");
appendTables();
sb.append(")");
}
private void appendTables() {
List<TiDBTable> tableSubset = Randomly.nonEmptySubset(tables);
sb.append(tableSubset.stream().map(t -> t.getName()).collect(Collectors.joining(", ")));
}
}
| [
"manuel.rigger@inf.ethz.ch"
] | manuel.rigger@inf.ethz.ch |
3a72626d69197bd3b22ee964fee806aa829ea62c | f6b90fae50ea0cd37c457994efadbd5560a5d663 | /android/nut-dex2jar.src/com/google/zxing/f/c/c.java | 0c011e00d3cf8d0b5354c3445ab58336d75ad37d | [] | no_license | dykdykdyk/decompileTools | 5925ae91f588fefa7c703925e4629c782174cd68 | 4de5c1a23f931008fa82b85046f733c1439f06cf | refs/heads/master | 2020-01-27T09:56:48.099821 | 2016-09-14T02:47:11 | 2016-09-14T02:47:11 | 66,894,502 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 217 | java | package com.google.zxing.f.c;
public enum c
{
}
/* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar
* Qualified Name: com.google.zxing.f.c.c
* JD-Core Version: 0.6.2
*/ | [
"819468107@qq.com"
] | 819468107@qq.com |
3a11ce70921f7fd8dedc0731b0061ebd0121c370 | 18d0ce394b9138b12d6b5a6c441ea80f408bc6a5 | /plugins/org.jkiss.dbeaver.ui.editors.data/src/org/jkiss/dbeaver/ui/controls/resultset/IResultSetContext.java | 31b764490fd71c6afb212df3d5db543f61dff272 | [
"EPL-1.0",
"Apache-2.0",
"LGPL-2.0-or-later"
] | permissive | ChrisYuan/dbeaver | 851dd6520fbb459f027358a996c2817bd07aaa3d | fb62c59bf96e93ccffa5588f745666ac29ee18c1 | refs/heads/devel | 2021-12-03T21:54:33.813111 | 2021-10-18T16:30:26 | 2021-10-18T16:30:26 | 215,923,469 | 0 | 1 | Apache-2.0 | 2019-10-18T02:16:43 | 2019-10-18T02:16:43 | null | UTF-8 | Java | false | false | 1,212 | java | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.ui.controls.resultset;
import org.jkiss.dbeaver.model.exec.DBCResultSet;
import org.jkiss.dbeaver.model.meta.RuntimeAction;
/**
* Result set context
*/
public interface IResultSetContext
{
@RuntimeAction
boolean supportsAttributes();
@RuntimeAction
boolean supportsDocument();
@RuntimeAction
boolean supportsGrouping();
@RuntimeAction
boolean supportsReferences();
String getDocumentContentType();
DBCResultSet getResultSet();
boolean hasAttributeOfType(String typeName);
}
| [
"serge@jkiss.org"
] | serge@jkiss.org |
8a766a31dda9c9bfe2866642a7a3809d64ba6066 | 6e9ad1b1509d6906bb678968b98061f577076211 | /src/main/java/gov/acwi/wqp/etl/codes/county/TransformCounty.java | 32441b632c77bb73fa954f4168a99c9a852e2802 | [] | no_license | ssoper-usgs/wqp-etl-core | 197af0156fe573f3151d9ea5997d0a918d9258f9 | a5378a8d9d8da949182602431501c9020830e63b | refs/heads/master | 2020-04-30T11:32:11.824085 | 2019-05-06T20:20:04 | 2019-05-06T20:20:04 | 176,803,612 | 0 | 0 | null | 2019-03-20T19:31:25 | 2019-03-20T19:31:24 | null | UTF-8 | Java | false | false | 1,408 | java | package gov.acwi.wqp.etl.codes.county;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.job.builder.FlowBuilder;
import org.springframework.batch.core.job.flow.Flow;
import org.springframework.batch.core.job.flow.support.SimpleFlow;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class TransformCounty {
@Autowired
private StepBuilderFactory stepBuilderFactory;
@Autowired
@Qualifier("setupCountySwapTableFlow")
private Flow setupCountySwapTableFlow;
@Autowired
@Qualifier("transformCountyTasklet")
private Tasklet transformCountyTasklet;
@Autowired
@Qualifier("buildCountyIndexesFlow")
private Flow buildCountyIndexesFlow;
@Bean
public Step transformCountyStep() {
return stepBuilderFactory.get("transformCountyStep")
.tasklet(transformCountyTasklet)
.build();
}
@Bean
public Flow createCountyFlow() {
return new FlowBuilder<SimpleFlow>("createCountyFlow")
.start(setupCountySwapTableFlow)
.next(transformCountyStep())
.next(buildCountyIndexesFlow)
.build();
}
}
| [
"drsteini@contractor.usgs.gov"
] | drsteini@contractor.usgs.gov |
a8910c3860250f54cc6ff7a9deca7f4505a4d22c | a2e4cd1885571d7ad3341076c16a3680ea90c637 | /guvnor-ng/guvnor-widgets/guvnor-config-resource-widget/src/main/java/org/kie/guvnor/configresource/client/resources/i18n/Constants.java | e7c204b44c19495bb60a3bf2f587baca91d9a13c | [
"Apache-2.0"
] | permissive | duongthienduc/guvnor | de51a19a2ed8187bd3e8fb43caa2e3649c02fbec | c6cdaaffbd44876d6685d9e322d2254110dc9d72 | refs/heads/master | 2021-01-20T23:31:53.050342 | 2013-01-30T14:09:45 | 2013-01-30T14:09:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,264 | java | package org.kie.guvnor.configresource.client.resources.i18n;
import com.google.gwt.core.client.GWT;
import com.google.gwt.i18n.client.Messages;
/**
*
*/
public interface Constants extends
Messages {
public static final Constants INSTANCE = GWT.create( Constants.class );
String OK();
String NewItem();
String Trash();
String Cancel();
String ImportedTypes();
String FactTypesJarTip();
String AreYouSureYouWantToRemoveThisFactType();
String ChooseAFactType();
String loadingList();
String ChooseClassType();
String TypesInThePackage();
String IfNoTypesTip();
String EnteringATypeClassName();
String EnterTypeNameTip();
String advancedClassName();
String AdvancedView();
String SwitchToTextModeEditing();
String SwitchToAdvancedTextModeForPackageEditing();
String BasicView();
String SwitchToGuidedModeEditing();
String CanNotSwitchToBasicView();
String CanNotSwitchToBasicViewDeclaredTypes();
String CanNotSwitchToBasicViewFunctions();
String CanNotSwitchToBasicViewRules();
String SwitchToGuidedModeForPackageEditing();
String ImportsSection();
String NewItemDisabled();
String Home();
}
| [
"alexandre.porcelli@gmail.com"
] | alexandre.porcelli@gmail.com |
1ebd9aa152802f627df0e0337d92f4a10534abb7 | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_14_50/API/Lte/LtePlmnEntryWs.java | 87b1c68af1193f7ba4b11292e1821ff8820e4a66 | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 1,992 | java |
package Netspan.NBI_14_50.API.Lte;
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 LtePlmnEntryWs complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LtePlmnEntryWs">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Mcc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Mnc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LtePlmnEntryWs", propOrder = {
"mcc",
"mnc"
})
public class LtePlmnEntryWs {
@XmlElement(name = "Mcc")
protected String mcc;
@XmlElement(name = "Mnc")
protected String mnc;
/**
* Gets the value of the mcc property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMcc() {
return mcc;
}
/**
* Sets the value of the mcc property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMcc(String value) {
this.mcc = value;
}
/**
* Gets the value of the mnc property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMnc() {
return mnc;
}
/**
* Sets the value of the mnc property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMnc(String value) {
this.mnc = value;
}
}
| [
"build.Airspan.com"
] | build.Airspan.com |
2874b978035455b0d2843e8bdc5d8ed3fc8ea722 | e9bac399984efe61e0e185243fb5afbf79a47703 | /udmetrics/src/main/java/com/epam/eco/kafkamanager/udmetrics/UDMetricType.java | 34ac592a2cfa558ae86f81239150025aa733dcb0 | [
"Apache-2.0"
] | permissive | epam/eco-kafka-manager | 5976c24299624771dcc5be96b693fa071311ee2a | 7a8a77e822e080ccb84e731dc8da5ab70ea70de6 | refs/heads/master | 2023-09-03T01:57:20.232902 | 2023-08-31T08:21:38 | 2023-08-31T08:21:38 | 216,547,207 | 28 | 13 | Apache-2.0 | 2023-09-01T05:54:56 | 2019-10-21T11:05:34 | Java | UTF-8 | Java | false | false | 2,536 | java | /*******************************************************************************
* Copyright 2022 EPAM Systems
*
* 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.epam.eco.kafkamanager.udmetrics;
import java.util.Collection;
import java.util.Map;
import com.epam.eco.kafkamanager.KafkaManager;
import com.epam.eco.kafkamanager.udmetrics.library.ConsumerGroupLagUDMCreator;
import com.epam.eco.kafkamanager.udmetrics.library.TopicOffsetIncreaseUDMCreator;
/**
* @author Andrei_Tytsik
*/
public enum UDMetricType {
CONSUMER_GROUP_LAG(new ConsumerGroupLagUDMCreator()) {
@Override
public String description() {
return
"Calculates consumer group lag. " +
"Separate metric is created for each topic-partition.";
}
@Override
public String formatName(String consumerGroup) {
return "consumer_group_lag_" + consumerGroup;
}
},
TOPIC_OFFSET_INCREASE(new TopicOffsetIncreaseUDMCreator()) {
@Override
public String description() {
return
"Calculates topic offset increase. " +
"Separate metric is created for each topic-partition.";
}
@Override
public String formatName(String topic) {
return "topic_offset_increase_" + topic;
}
};
private final UDMetricCreator creator;
UDMetricType(UDMetricCreator creator) {
this.creator = creator;
}
public abstract String description();
public abstract String formatName(String resourceName);
public Map<String, Object> configTemplate() {
return creator.configTemplate();
}
public Collection<Metric> create(
String resourceName,
Map<String, Object> config,
KafkaManager kafkaManager) {
return creator.create(resourceName, config, kafkaManager);
}
}
| [
"Andrei_Tytsik@epam.com"
] | Andrei_Tytsik@epam.com |
df8bbb37727d88d992a23ef6f4cf4c62d7e19abb | bf2a6af7fd7569ab3b77c021daff803bf1dfee50 | /src/main/java/com/contest/mapper/UserRealNameModelMapper.java | 65e6cb1a82b16045594867c6dac65c7194034643 | [] | no_license | juno1985/program-contest | cafde07648e2cb8e8af3f8cd6939f6300613c1e1 | 1b6ca9d8457789b28257be9535f076abca2daac5 | refs/heads/master | 2020-04-26T09:14:27.874386 | 2019-07-05T07:30:20 | 2019-07-05T07:30:20 | 173,448,910 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,174 | java | package com.contest.mapper;
import com.contest.model.UserRealNameModel;
import com.contest.model.UserRealNameModelExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UserRealNameModelMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
long countByExample(UserRealNameModelExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int deleteByExample(UserRealNameModelExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int insert(UserRealNameModel record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int insertSelective(UserRealNameModel record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
List<UserRealNameModel> selectByExample(UserRealNameModelExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
UserRealNameModel selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int updateByExampleSelective(@Param("record") UserRealNameModel record, @Param("example") UserRealNameModelExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int updateByExample(@Param("record") UserRealNameModel record, @Param("example") UserRealNameModelExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int updateByPrimaryKeySelective(UserRealNameModel record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_user_realname
*
* @mbg.generated Wed Apr 17 16:24:06 CST 2019
*/
int updateByPrimaryKey(UserRealNameModel record);
} | [
"wangzhen_tju@126.com"
] | wangzhen_tju@126.com |
4f07f6691f94464a7cbcf9f3822f06bb48aca1b7 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/filter/C29259bo.java | 2b71f18ce7658708dea7654e14480c81ca094751 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | package com.p280ss.android.ugc.aweme.filter;
import android.arch.lifecycle.C0053p;
/* renamed from: com.ss.android.ugc.aweme.filter.bo */
final /* synthetic */ class C29259bo implements C0053p {
/* renamed from: a */
private final C29254bm f77197a;
C29259bo(C29254bm bmVar) {
this.f77197a = bmVar;
}
public final void onChanged(Object obj) {
this.f77197a.mo74894a((Boolean) obj);
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
52e0cce89b044202eb1912557a10947fb495e053 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/textstatus/util/k.java | 28a2dbc9703289b406f574c9f3ea6aa9770a3ff4 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 6,718 | java | package com.tencent.mm.plugin.textstatus.util;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.b;
import com.tencent.mm.kernel.h;
import com.tencent.mm.plugin.textstatus.a.d;
import com.tencent.mm.plugin.textstatus.a.ac;
import com.tencent.mm.sdk.platformtools.Log;
import java.util.Random;
import java.util.regex.Pattern;
import kotlin.Metadata;
import kotlin.g.b.s;
@Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/textstatus/util/TextStatusPostUtil;", "", "()V", "TAG", "", "topicPattern", "Ljava/util/regex/Pattern;", "kotlin.jvm.PlatformType", "getTopicPattern", "()Ljava/util/regex/Pattern;", "getBackgroundNameById", "id", "", "getBackgroundeResIdByName", "name", "getDefaultEditBackground", "getDefaultEditBackgroundId", "printTextStatusPostInfo", "info", "Lcom/tencent/mm/plugin/textstatus/proto/TextStatusPostInfo;", "plugin-textstatus_release"}, k=1, mv={1, 5, 1}, xi=48)
public final class k
{
public static final k TBx;
private static final Pattern TBy;
static
{
AppMethodBeat.i(290414);
TBx = new k();
TBy = Pattern.compile(ac.hGa());
AppMethodBeat.o(290414);
}
public static String aoC(int paramInt)
{
if (paramInt == a.d.TbK) {
return "text_state_default_image_1";
}
if (paramInt == a.d.TbO) {
return "text_state_default_image_2";
}
if (paramInt == a.d.TbP) {
return "text_state_default_image_3";
}
if (paramInt == a.d.TbQ) {
return "text_state_default_image_4";
}
if (paramInt == a.d.TbR) {
return "text_state_default_image_5";
}
if (paramInt == a.d.TbS) {
return "text_state_default_image_6";
}
if (paramInt == a.d.TbT) {
return "text_state_default_image_7";
}
if (paramInt == a.d.TbU) {
return "text_state_default_image_8";
}
if (paramInt == a.d.TbV) {
return "text_state_default_image_9";
}
if (paramInt == a.d.TbL) {
return "text_state_default_image_10";
}
if ((paramInt != a.d.TbM) && (paramInt == a.d.TbN)) {
return "text_state_default_image_12";
}
return "text_state_default_image_11";
}
public static int bep(String paramString)
{
AppMethodBeat.i(290405);
if (paramString != null) {
switch (paramString.hashCode())
{
}
}
do
{
do
{
do
{
do
{
do
{
do
{
do
{
do
{
do
{
do
{
do
{
do
{
i = a.d.TbM;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_1"));
i = a.d.TbK;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_10"));
i = a.d.TbL;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_12"));
i = a.d.TbN;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_11"));
i = a.d.TbM;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_5"));
i = a.d.TbR;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_4"));
i = a.d.TbQ;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_3"));
i = a.d.TbP;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_2"));
i = a.d.TbO;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_9"));
i = a.d.TbV;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_8"));
i = a.d.TbU;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_7"));
i = a.d.TbT;
AppMethodBeat.o(290405);
return i;
} while (!paramString.equals("text_state_default_image_6"));
int i = a.d.TbS;
AppMethodBeat.o(290405);
return i;
}
public static int hKA()
{
AppMethodBeat.i(290389);
h.baC();
int i = b.getUin();
int j = (int)(System.currentTimeMillis() % 12L);
i = (new Random(i).nextInt(12) + j) % 12;
Log.i("MicroMsg.TextStatus.TextStatusPostUtil", s.X("getDefaultEditBackground :", Integer.valueOf(i)));
switch (i)
{
default:
i = a.d.TbM;
AppMethodBeat.o(290389);
return i;
case 1:
i = a.d.TbK;
AppMethodBeat.o(290389);
return i;
case 2:
i = a.d.TbO;
AppMethodBeat.o(290389);
return i;
case 3:
i = a.d.TbP;
AppMethodBeat.o(290389);
return i;
case 4:
i = a.d.TbQ;
AppMethodBeat.o(290389);
return i;
case 5:
i = a.d.TbR;
AppMethodBeat.o(290389);
return i;
case 6:
i = a.d.TbS;
AppMethodBeat.o(290389);
return i;
case 7:
i = a.d.TbT;
AppMethodBeat.o(290389);
return i;
case 8:
i = a.d.TbU;
AppMethodBeat.o(290389);
return i;
case 9:
i = a.d.TbV;
AppMethodBeat.o(290389);
return i;
case 10:
i = a.d.TbL;
AppMethodBeat.o(290389);
return i;
case 11:
i = a.d.TbM;
AppMethodBeat.o(290389);
return i;
}
i = a.d.TbN;
AppMethodBeat.o(290389);
return i;
}
public static Pattern hKz()
{
return TBy;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes8.jar
* Qualified Name: com.tencent.mm.plugin.textstatus.util.k
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
0be58a06f7c9fc971f268a2bfb0ab39fdaf54c29 | 704507754a9e7f300dfab163e97cd976b677661b | /src/javax/security/auth/login/CredentialExpiredException.java | dad9cef78a1f47cb98ef611c927a86773b4a585b | [] | no_license | ossaw/jdk | 60e7ca5e9f64541d07933af25c332e806e914d2a | b9d61d6ade341b4340afb535b499c09a8be0cfc8 | refs/heads/master | 2020-03-27T02:23:14.010857 | 2019-08-07T06:32:34 | 2019-08-07T06:32:34 | 145,785,700 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,436 | java | /*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.security.auth.login;
/**
* Signals that a {@code Credential} has expired.
* <p>
* This exception is thrown by LoginModules when they determine that a
* {@code Credential} has expired. For example, a {@code LoginModule}
* authenticating a user in its {@code login} method may determine that the
* user's password, although entered correctly, has expired. In this case the
* {@code LoginModule} throws this exception to notify the application. The
* application can then take the appropriate steps to assist the user in
* updating the password.
*/
public class CredentialExpiredException extends CredentialException {
private static final long serialVersionUID = -5344739593859737937L;
/**
* Constructs a CredentialExpiredException with no detail message. A detail
* message is a String that describes this particular exception.
*/
public CredentialExpiredException() {
super();
}
/**
* Constructs a CredentialExpiredException with the specified detail
* message. A detail message is a String that describes this particular
* exception.
* <p>
*
* @param msg
* the detail message.
*/
public CredentialExpiredException(String msg) {
super(msg);
}
}
| [
"jianghao7625@gmail.com"
] | jianghao7625@gmail.com |
99a01c4431377417fb2157bbc2b0cf391009c830 | cfde4e9d805f82f8ec4905ae74cf661731c4e8d2 | /JavaBase/src/main/java/com/yjl/javabase/thinkinjava/control/ForEachInt.java | e4f65fd6f2f9ef1001f93ef1446969e406f22efd | [
"Apache-2.0"
] | permissive | yangjunlin-const/WhileTrueCoding | 096ee1adff6e972240595436486d02a69eacecd1 | db45d5739483acf664d653ca8047e33e8d012377 | refs/heads/master | 2021-01-10T01:22:11.893902 | 2016-08-18T09:37:48 | 2016-08-18T09:37:48 | 47,909,082 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 583 | java | package com.yjl.javabase.thinkinjava.control;//: control/ForEachInt.java
import static com.yjl.javabase.thinkinjava.net.mindview.util.Range.*;
import static com.yjl.javabase.thinkinjava.net.mindview.util.Print.*;
public class ForEachInt {
public static void main(String[] args) {
for(int i : range(10)) // 0..9
printnb(i + " ");
print();
for(int i : range(5, 10)) // 5..9
printnb(i + " ");
print();
for(int i : range(5, 20, 3)) // 5..20 step 3
printnb(i + " ");
print();
}
} /* Output:
0 1 2 3 4 5 6 7 8 9
5 6 7 8 9
5 8 11 14 17
*///:~
| [
"519100949@qq.com"
] | 519100949@qq.com |
c8b6c0a2ec137a044fc8548c98cb4749c780d0b4 | 9d1870a895c63f540937f04a6285dd25ada5e52a | /chromecast-app-reverse-engineering/src/from-jd-gui/cod.java | 2da56da3cc90e90486bf8381b6cca1057d02cff9 | [] | no_license | Churritosjesus/Chromecast-Reverse-Engineering | 572aa97eb1fd65380ca0549b4166393505328ed4 | 29fae511060a820f2500a4e6e038dfdb591f4402 | refs/heads/master | 2023-06-04T10:27:15.869608 | 2015-10-27T10:43:11 | 2015-10-27T10:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,991 | java | import android.accounts.Account;
import android.content.Context;
import android.os.Looper;
import com.google.android.gms.location.copresence.internal.CopresenceApiOptions;
public final class cod
extends cno
{
public final coa b = new coa(paramContext, this.a);
public cod(Context paramContext, Looper paramLooper, bwg parambwg, bwh parambwh, String paramString, byl parambyl)
{
this(paramContext, paramLooper, parambwg, parambwh, paramString, parambyl, CopresenceApiOptions.a);
}
private cod(Context paramContext, Looper paramLooper, bwg parambwg, bwh parambwh, String paramString, byl parambyl, CopresenceApiOptions paramCopresenceApiOptions)
{
super(paramContext, paramLooper, parambwg, parambwh, paramString, parambyl);
if (parambyl.a != null) {}
for (paramLooper = parambyl.a.name;; paramLooper = null)
{
new cnn(paramContext, paramLooper, parambyl.e, this.a, paramCopresenceApiOptions);
return;
}
}
/* Error */
public final void a()
{
// Byte code:
// 0: aload_0
// 1: getfield 30 cod:b Lcoa;
// 4: astore_1
// 5: aload_1
// 6: monitorenter
// 7: aload_0
// 8: invokevirtual 58 cod:k ()Z
// 11: istore 6
// 13: iload 6
// 15: ifeq +110 -> 125
// 18: aload_0
// 19: getfield 30 cod:b Lcoa;
// 22: astore_3
// 23: aload_3
// 24: getfield 62 coa:c Ljava/util/Map;
// 27: astore_2
// 28: aload_2
// 29: monitorenter
// 30: aload_3
// 31: getfield 62 coa:c Ljava/util/Map;
// 34: invokeinterface 68 1 0
// 39: invokeinterface 74 1 0
// 44: astore 5
// 46: aload 5
// 48: invokeinterface 79 1 0
// 53: ifeq +79 -> 132
// 56: aload 5
// 58: invokeinterface 83 1 0
// 63: checkcast 85 coc
// 66: astore 4
// 68: aload 4
// 70: ifnull -24 -> 46
// 73: aload_3
// 74: getfield 86 coa:a Lcoh;
// 77: invokeinterface 91 1 0
// 82: checkcast 93 cnu
// 85: aload 4
// 87: invokestatic 98 com/google/android/gms/location/internal/LocationRequestUpdateData:a (Lcon;)Lcom/google/android/gms/location/internal/LocationRequestUpdateData;
// 90: invokeinterface 101 2 0
// 95: goto -49 -> 46
// 98: astore_3
// 99: aload_2
// 100: monitorexit
// 101: aload_3
// 102: athrow
// 103: astore_3
// 104: new 103 java/lang/IllegalStateException
// 107: astore_2
// 108: aload_2
// 109: aload_3
// 110: invokespecial 106 java/lang/IllegalStateException:<init> (Ljava/lang/Throwable;)V
// 113: aload_2
// 114: athrow
// 115: astore_2
// 116: ldc 108
// 118: ldc 110
// 120: aload_2
// 121: invokestatic 115 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
// 124: pop
// 125: aload_0
// 126: invokespecial 117 cno:a ()V
// 129: aload_1
// 130: monitorexit
// 131: return
// 132: aload_3
// 133: getfield 62 coa:c Ljava/util/Map;
// 136: invokeinterface 120 1 0
// 141: aload_3
// 142: getfield 123 coa:d Ljava/util/Map;
// 145: invokeinterface 68 1 0
// 150: invokeinterface 74 1 0
// 155: astore 5
// 157: aload 5
// 159: invokeinterface 79 1 0
// 164: ifeq +45 -> 209
// 167: aload 5
// 169: invokeinterface 83 1 0
// 174: checkcast 125 cob
// 177: astore 4
// 179: aload 4
// 181: ifnull -24 -> 157
// 184: aload_3
// 185: getfield 86 coa:a Lcoh;
// 188: invokeinterface 91 1 0
// 193: checkcast 93 cnu
// 196: aload 4
// 198: invokestatic 128 com/google/android/gms/location/internal/LocationRequestUpdateData:a (Lcok;)Lcom/google/android/gms/location/internal/LocationRequestUpdateData;
// 201: invokeinterface 101 2 0
// 206: goto -49 -> 157
// 209: aload_3
// 210: getfield 123 coa:d Ljava/util/Map;
// 213: invokeinterface 120 1 0
// 218: aload_2
// 219: monitorexit
// 220: aload_0
// 221: getfield 30 cod:b Lcoa;
// 224: astore_2
// 225: aload_2
// 226: getfield 131 coa:b Z
// 229: istore 6
// 231: iload 6
// 233: ifeq -108 -> 125
// 236: aload_2
// 237: getfield 86 coa:a Lcoh;
// 240: invokeinterface 132 1 0
// 245: aload_2
// 246: getfield 86 coa:a Lcoh;
// 249: invokeinterface 91 1 0
// 254: checkcast 93 cnu
// 257: iconst_0
// 258: invokeinterface 135 2 0
// 263: aload_2
// 264: iconst_0
// 265: putfield 131 coa:b Z
// 268: goto -143 -> 125
// 271: astore_2
// 272: new 103 java/lang/IllegalStateException
// 275: astore_3
// 276: aload_3
// 277: aload_2
// 278: invokespecial 106 java/lang/IllegalStateException:<init> (Ljava/lang/Throwable;)V
// 281: aload_3
// 282: athrow
// 283: astore_2
// 284: aload_1
// 285: monitorexit
// 286: aload_2
// 287: athrow
// Local variable table:
// start length slot name signature
// 0 288 0 this cod
// 4 281 1 localcoa1 coa
// 115 104 2 localException Exception
// 224 40 2 localcoa2 coa
// 271 7 2 localRemoteException1 android.os.RemoteException
// 283 4 2 localObject2 Object
// 22 52 3 localcoa3 coa
// 98 4 3 localObject3 Object
// 103 107 3 localRemoteException2 android.os.RemoteException
// 275 7 3 localIllegalStateException IllegalStateException
// 66 131 4 localObject4 Object
// 44 124 5 localIterator java.util.Iterator
// 11 221 6 bool boolean
// Exception table:
// from to target type
// 30 46 98 finally
// 46 68 98 finally
// 73 95 98 finally
// 99 101 98 finally
// 132 157 98 finally
// 157 179 98 finally
// 184 206 98 finally
// 209 220 98 finally
// 23 30 103 android/os/RemoteException
// 101 103 103 android/os/RemoteException
// 18 23 115 java/lang/Exception
// 23 30 115 java/lang/Exception
// 101 103 115 java/lang/Exception
// 104 115 115 java/lang/Exception
// 220 231 115 java/lang/Exception
// 236 268 115 java/lang/Exception
// 272 283 115 java/lang/Exception
// 236 268 271 android/os/RemoteException
// 7 13 283 finally
// 18 23 283 finally
// 23 30 283 finally
// 101 103 283 finally
// 104 115 283 finally
// 116 125 283 finally
// 125 131 283 finally
// 220 231 283 finally
// 236 268 283 finally
// 272 283 283 finally
// 284 286 283 finally
}
public final boolean p()
{
return true;
}
}
/* Location: C:\DEV\android\dex2jar-2.1-SNAPSHOT\classes-dex2jar.jar!\cod.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"v.richomme@gmail.com"
] | v.richomme@gmail.com |
7039a9883377562164243e70c43820c56a2f403d | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/webview/stub/WebViewStubTempUI$1.java | 2bd6e6cf54e8815ac333098c4e1968fd5ad07dfa | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,140 | java | package com.tencent.mm.plugin.webview.stub;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.os.Handler;
import android.os.ResultReceiver;
import com.tencent.matrix.trace.core.AppMethodBeat;
final class WebViewStubTempUI$1 extends ResultReceiver
{
WebViewStubTempUI$1(Handler paramHandler, DialogInterface.OnClickListener paramOnClickListener1, DialogInterface.OnClickListener paramOnClickListener2)
{
super(paramHandler);
}
protected final void onReceiveResult(int paramInt, Bundle paramBundle)
{
AppMethodBeat.i(7218);
switch (paramInt)
{
default:
case 0:
case 1:
}
while (true)
{
AppMethodBeat.o(7218);
while (true)
{
return;
this.uqL.onClick(null, 0);
AppMethodBeat.o(7218);
}
this.uqM.onClick(null, 0);
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.webview.stub.WebViewStubTempUI.1
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
f54b2badbc2611c83ff484897c85fbbff9040107 | cb4e96db361aa27ebf2573642cbbf9f7e2c47a96 | /wingtool-parent/wingtoolparent/wingtool-core/src/main/java/com/orangehaswing/core/lang/func/Func1.java | bba2267730c2efeaed9a762437390ac75503e4f3 | [] | no_license | orangehaswing/wingtool | 5242fb3929185b2c8c8c8f81ffd2a53959104829 | a8851360e40a4b1c9b24345f0aeb332e50ed8c5a | refs/heads/master | 2020-05-03T12:49:44.276966 | 2019-04-16T13:16:41 | 2019-04-16T13:16:41 | 178,637,437 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 729 | java | package com.orangehaswing.core.lang.func;
/**
* 只有一个参数的函数对象<br>
* 接口灵感来自于<a href="http://actframework.org/">ActFramework</a><br>
* 一个函数接口代表一个一个函数,用于包装一个函数为对象<br>
* 在JDK8之前,Java的函数并不能作为参数传递,也不能作为返回值存在,此接口用于将一个函数包装成为一个对象,从而传递对象
*
* @author Looly
*
* @param <P> 参数类型
* @param <R> 返回值类型
* @since 4.2.2
*/
public interface Func1<P, R> {
/**
* 执行函数
*
* @param parameter 参数
* @return 函数执行结果
* @throws Exception 自定义异常
*/
R call(P parameter) throws Exception;
}
| [
"673556024@qq.com"
] | 673556024@qq.com |
753a83ad78c4c3792dc2088b5b2080f0fff1a7dc | c188408c9ec0425666250b45734f8b4c9644a946 | /open-sphere-plugins/wps/src/main/java/io/opensphere/wps/ui/detail/bbpicker/RemovableListCell.java | 6e91a3b78fcedd73d45fe7280d98d540b3d63990 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | rkausch/opensphere-desktop | ef8067eb03197c758e3af40ebe49e182a450cc02 | c871c4364b3456685411fddd22414fd40ce65699 | refs/heads/snapshot_5.2.7 | 2023-04-13T21:00:00.575303 | 2020-07-29T17:56:10 | 2020-07-29T17:56:10 | 360,594,280 | 0 | 0 | Apache-2.0 | 2021-04-22T17:40:38 | 2021-04-22T16:58:41 | null | UTF-8 | Java | false | false | 1,738 | java | package io.opensphere.wps.ui.detail.bbpicker;
import javafx.collections.ObservableList;
import javafx.scene.control.Button;
import javafx.scene.control.ListCell;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import io.opensphere.core.util.fx.FXUtilities;
import io.opensphere.core.util.image.IconUtil.IconType;
/**
* A removable ListCell.
*
* @param <T> the type of the items
*/
public abstract class RemovableListCell<T> extends ListCell<T>
{
/** The items model. */
private final ObservableList<T> myItems;
/** The box. */
private final HBox myBox = new HBox(4);
/**
* Constructor.
*
* @param items the items model
*/
public RemovableListCell(ObservableList<T> items)
{
myItems = items;
}
@Override
public void updateItem(T item, boolean empty)
{
super.updateItem(item, empty);
if (item != null && !empty)
{
updateItem(item);
setGraphic(myBox);
}
else
{
setGraphic(null);
}
}
/**
* Method to handle updating the item.
*
* @param item the item
*/
protected abstract void updateItem(T item);
/**
* Gets the box.
*
* @return the box
*/
protected HBox getBox()
{
return myBox;
}
/**
* Creates the remove button.
*
* @return the button
*/
protected Button createRemoveButton()
{
Button button = FXUtilities.newIconButton(IconType.CLOSE, Color.RED);
button.setTooltip(new Tooltip("Remove"));
button.setOnAction(e -> myItems.remove(getIndex()));
return button;
}
}
| [
"kauschr@opensphere.io"
] | kauschr@opensphere.io |
0dfa08acce7cc9af93f9fe1bbf71d6b787f12d22 | 6c986b31636574dc9a7c4f5a1e23b1e09f209211 | /JavaCoreTutors/src/main/java/Util/Collections/ArrayList/EnumerationToArrayList.java | daa82c5f7995e9346be921223ebf0bd74d3c2dcd | [] | no_license | kidaak/Examples | 62f27c0e09e44fd5177b4168e2b4cdafb1fbe4a8 | d782b337ef5da415a61f31031268308926a7a3ab | refs/heads/master | 2021-01-17T19:55:00.456881 | 2015-12-22T22:50:29 | 2015-12-22T22:50:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 750 | java | package Util.Collections.ArrayList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Vector;
/**
* Created by O1e6 <NsN> on 12/1/2015.
*/
public class EnumerationToArrayList {
public static void main(String[] args) {
Vector vector = new Vector();
vector.add("element_1");
vector.add("element_3");
vector.add("element_4");
vector.add("element_2");
vector.add("element_5");
System.out.println("Vector elements : " + vector);
Enumeration elementsEnumeration = vector.elements();
ArrayList arrayList = Collections.list(elementsEnumeration);
System.out.println("Arraylist elements : " + arrayList);
}
}
| [
"marloncheg182@gmail.com"
] | marloncheg182@gmail.com |
a5cac67ef441fa42a4a7e8dfa81a83f731a24b6f | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/skylot--jadx/c1292dff75104250960faac387b0b742599bbb26/before/Typed.java | 5f9d390fefa0a3e8add6c15477dda7ad0c6f6e72 | [] | 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 | 513 | java | package jadx.core.dex.instructions.args;
public abstract class Typed {
protected ArgType type;
public ArgType getType() {
return type;
}
public void setType(ArgType type) {
this.type = type;
}
public boolean isTypeImmutable() {
return false;
}
public boolean merge(ArgType newType) {
ArgType m = ArgType.merge(type, newType);
if (m != null && !m.equals(type)) {
setType(m);
return true;
}
return false;
}
public boolean merge(InsnArg arg) {
return merge(arg.getType());
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
4886eef67f597beca234fecbf658de220143481c | 0c3c07d64468c375613cf80064eb273192be35f6 | /portlets/edison-search-2017-portlet/docroot/WEB-INF/src/org/kisti/edison/search/service/service/impl/SearchConditionLocalServiceImpl.java | d41a0efc96aaa18a82238c96be68380b6f9da3a1 | [] | no_license | jerryhseo/OSP | 032d270c76f8410482efafabc68641fdb95f7f0e | 509307f9207b4d4c2ce80805998a53e6a5b340fa | refs/heads/devel | 2021-07-13T02:51:45.676311 | 2020-06-16T02:18:48 | 2020-06-16T02:18:48 | 157,665,981 | 0 | 0 | null | 2020-06-16T02:19:55 | 2018-11-15T06:53:56 | HTML | UTF-8 | Java | false | false | 5,124 | java | /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package org.kisti.edison.search.service.service.impl;
import java.util.Locale;
import java.util.Map;
import javax.portlet.PortletRequest;
import org.kisti.edison.search.service.model.SearchCondition;
import org.kisti.edison.search.service.service.base.SearchConditionLocalServiceBaseImpl;
import org.springframework.util.StringUtils;
import com.google.common.collect.Maps;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portal.util.PortalUtil;
/**
* The implementation of the search condition local service.
*
* <p>
* All custom service methods should be put in this class. Whenever methods are
* added, rerun ServiceBuilder to copy their definitions into the
* {@link org.kisti.edison.search.service.service.SearchConditionLocalService}
* interface.
*
* <p>
* This is a local service. Methods of this service will not have security
* checks based on the propagated JAAS credentials because this service can only
* be accessed from within the same VM.
* </p>
*
* @author yjpark
* @see org.kisti.edison.search.service.service.base.SearchConditionLocalServiceBaseImpl
* @see org.kisti.edison.search.service.service.SearchConditionLocalServiceUtil
*/
public class SearchConditionLocalServiceImpl
extends SearchConditionLocalServiceBaseImpl {
/*
* NOTE FOR DEVELOPERS:
*
* Never reference this interface directly. Always use {@link
* org.kisti.edison.search.service.service.SearchConditionLocalServiceUtil} to
* access the search condition local service.
*/
public SearchCondition createSearchCondition(Map<String, Object> modelAttribute){
SearchCondition searchCondition = this.createSearchCondition(0);
if(modelAttribute != null && !modelAttribute.isEmpty()){
searchCondition.setCustomModelAttributes(modelAttribute);
}
return searchCondition;
}
//companyGroupId, groupId, locale, categoryIds, searchText, begin, end
public SearchCondition createSearchCondition(Map<String, Object> modelAttribute,
long companyGroupId, long groupId, Locale locale){
SearchCondition searchCondition = this.createSearchCondition(0);
if(modelAttribute != null && !modelAttribute.isEmpty()){
searchCondition.setCustomModelAttributes(modelAttribute);
searchCondition
.setSearchKeyword(StringUtils.trimWhitespace(searchCondition.getSearchKeyword()));
}
searchCondition.setCompanyGroupId(companyGroupId);
searchCondition.setGroupId(groupId);
searchCondition.setLocale(locale);
return searchCondition;
}
public String createSearchParameters(
SearchCondition searchCondition, String namespace, String p_p_id){
StringBuffer sb = new StringBuffer();
sb.append("?p_p_id=");
sb.append(p_p_id);
Map<String, Object> searchConditionMap = searchCondition.getModelAttributes();
for(String key : searchConditionMap.keySet()){
Object value = searchConditionMap.get(key);
if(key.equals("companyGroupId") || key.equals("currentPage") || key.equals("id")
|| key.equals("groupId") || key.equals("blockSize") || key.equals("listSize")
|| value == null){
continue;
}
if(value instanceof String && !StringUtils.hasText((String)value)){
continue;
}
sb.append("&");
sb.append(namespace);
sb.append(key);
sb.append("=");
sb.append(String.valueOf(value));
}
return sb.toString();
}
public SearchCondition createSearchCondition(PortletRequest request)
throws PortalException, SystemException{
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
long companyGroupId = PortalUtil.getCompany(request).getGroupId();
long groupId = PortalUtil.getScopeGroupId(request);
Locale locale = themeDisplay.getLocale();
return createSearchCondition(transformParameterToModelAttribute(request.getParameterMap()),
companyGroupId, groupId, locale);
}
public Map<String, Object> transformParameterToModelAttribute(Map<String, String[]> params){
Map<String, Object> result = Maps.newHashMap();
if(params != null && !params.isEmpty()){
for(String key : params.keySet()){
String[] value = params.get(key);
if(value != null && value.length > 0){
result.put(key, value[0]);
}
}
}
return result;
}
} | [
"yjpark@gplusit.co.kr"
] | yjpark@gplusit.co.kr |
c4a0ffdefb7f3feea73423c249bedc04f5382111 | d4d680301730e70f539675a989f0c5252a847811 | /core/src/test/java/juzu/impl/inject/spi/supertype/SuperTypeTestCase.java | 6d6285c420ce3bfd39ba78ee82374f30c50b0299 | [] | no_license | nscavell/juzu | 90dd3fddb7b0d78ada178cd9136f0838cabacafa | 1f59725ec16d9d1a061800f68265be2f153dcaac | refs/heads/master | 2021-01-24T16:47:54.629944 | 2012-10-10T04:29:52 | 2012-10-10T04:41:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,551 | java | /*
* Copyright (C) 2012 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package juzu.impl.inject.spi.supertype;
import juzu.impl.inject.spi.AbstractInjectTestCase;
import juzu.impl.inject.spi.InjectImplementation;
import org.junit.Test;
/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
public class SuperTypeTestCase<B, I> extends AbstractInjectTestCase<B, I> {
public SuperTypeTestCase(InjectImplementation di) {
super(di);
}
@Test
public void testSuperType() throws Exception {
init();
bootstrap.declareBean(Apple.class, null, null, null);
bootstrap.declareBean(Injected.class, null, null, null);
boot();
//
Injected beanObject = getBean(Injected.class);
assertNotNull(beanObject);
assertNotNull(beanObject.fruit);
}
}
| [
"julien@julienviet.com"
] | julien@julienviet.com |
9a4f7708b366397721c1fefc4a89645492a83491 | a4a51084cfb715c7076c810520542af38a854868 | /src/main/java/butterknife/a/a.java | 634e7f39aae5e641d3f2058a19f838afbd7cfabe | [] | no_license | BharathPalanivelu/repotest | ddaf56a94eb52867408e0e769f35bef2d815da72 | f78ae38738d2ba6c9b9b4049f3092188fabb5b59 | refs/heads/master | 2020-09-30T18:55:04.802341 | 2019-12-02T10:52:08 | 2019-12-02T10:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 640 | java | package butterknife.a;
import android.view.View;
public abstract class a implements View.OnClickListener {
/* access modifiers changed from: package-private */
/* renamed from: a reason: collision with root package name */
public static boolean f3074a = true;
/* renamed from: b reason: collision with root package name */
private static final Runnable f3075b = $$Lambda$a$tP0vbs2w0lu_2d1hIDuVH_tltU.INSTANCE;
public abstract void a(View view);
public final void onClick(View view) {
if (f3074a) {
f3074a = false;
view.post(f3075b);
a(view);
}
}
}
| [
"noiz354@gmail.com"
] | noiz354@gmail.com |
9794addfdc9b49cb9961f89fc26f019cdde6d632 | a4029855999381b8cbdf74d567b3e1a4fcdc13dd | /FIINFRA-APP/src/main/java/in/fiinfra/serviceportal/service/BroadcastServiceImpl.java | 8e0fd66782a64647a318b31252287ece057b8a6d | [] | no_license | saubhagya1987/myproj1 | 033acc59710417ab9db9b4981e7dc8eae9ee8384 | 41aa58225447e60bb9fc13985aad86bf39ba3241 | refs/heads/master | 2021-01-22T18:15:00.169659 | 2018-05-28T16:31:28 | 2018-05-28T16:31:28 | 85,070,716 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,335 | java | package in.fiinfra.serviceportal.service;
import in.fiinfra.common.service.vo.Broadcast;
import in.fiinfra.serviceportal.dao.BroadcastDao;
import javax.ws.rs.core.Response;
import org.springframework.beans.factory.annotation.Autowired;
public class BroadcastServiceImpl implements BroadcastService {
@Autowired
private BroadcastDao broadcastDao;
public BroadcastDao getBroadcastDao() {
return broadcastDao;
}
public void setBroadcastDao(BroadcastDao broadcastDao) {
this.broadcastDao = broadcastDao;
}
@Override
public Response showBroadcastList(Broadcast broadcast) {
Response broadcastList = broadcastDao.showBroadcastList(broadcast);
return broadcastList;
}
@Override
public Response getUserTypeList(Broadcast broadcast) {
Response userTypeList = broadcastDao.getUserTypeList(broadcast);
return userTypeList;
}
@Override
public Response getAllRoleList(Broadcast broadcast) {
Response roleList = broadcastDao.getAllRoleList(broadcast);
return roleList;
}
@Override
public Response deleteBroadCastList(Broadcast broadcast) {
Response delBrodcast = broadcastDao.deleteBroadCastList(broadcast);
return delBrodcast;
}
@Override
public Response insertOrUpdateBroadcast(Broadcast broadcast) {
Response result = broadcastDao.insertOrUpdateBroadcast(broadcast);
return result;
}
}
| [
"saubhagya.bapu@gmail.com"
] | saubhagya.bapu@gmail.com |
73eb89512d2c7ced0dea65dd719bc062d0fb9fec | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/actorapp--actor-platform/4407699c6ab66b3954b19bb46609d37177a8aa5f/after/UpdateGroupAvatarChanged.java | a41b708cf5388e3185bdd5e5d9a41799456f7474 | [] | 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 | 2,360 | java | package im.actor.core.api.updates;
/*
* Generated by the Actor API Scheme generator. DO NOT EDIT!
*/
import im.actor.runtime.bser.*;
import im.actor.core.network.parser.*;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
import im.actor.core.api.*;
public class UpdateGroupAvatarChanged extends Update {
public static final int HEADER = 0x27;
public static UpdateGroupAvatarChanged fromBytes(byte[] data) throws IOException {
return Bser.parse(new UpdateGroupAvatarChanged(), data);
}
private int groupId;
private long rid;
private int uid;
private ApiAvatar avatar;
private long date;
public UpdateGroupAvatarChanged(int groupId, long rid, int uid, @Nullable ApiAvatar avatar, long date) {
this.groupId = groupId;
this.rid = rid;
this.uid = uid;
this.avatar = avatar;
this.date = date;
}
public UpdateGroupAvatarChanged() {
}
public int getGroupId() {
return this.groupId;
}
public long getRid() {
return this.rid;
}
public int getUid() {
return this.uid;
}
@Nullable
public ApiAvatar getAvatar() {
return this.avatar;
}
public long getDate() {
return this.date;
}
@Override
public void parse(BserValues values) throws IOException {
this.groupId = values.getInt(1);
this.rid = values.getLong(5);
this.uid = values.getInt(2);
this.avatar = values.optObj(3, new ApiAvatar());
this.date = values.getLong(4);
}
@Override
public void serialize(BserWriter writer) throws IOException {
writer.writeInt(1, this.groupId);
writer.writeLong(5, this.rid);
writer.writeInt(2, this.uid);
if (this.avatar != null) {
writer.writeObject(3, this.avatar);
}
writer.writeLong(4, this.date);
}
@Override
public String toString() {
String res = "update GroupAvatarChanged{";
res += "groupId=" + this.groupId;
res += ", rid=" + this.rid;
res += ", uid=" + this.uid;
res += ", avatar=" + (this.avatar != null ? "set":"empty");
res += ", date=" + this.date;
res += "}";
return res;
}
@Override
public int getHeaderKey() {
return HEADER;
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
be59ed3e795f68387633cab16f7a98a4526def9c | a29ed4ff3f9ae11ac3373813f890cbddee9c4f59 | /src/main/java/mine/io/BeanIO.java | 38e84169ba0003577e67db80a5211a4a9860a4f3 | [] | no_license | piropiro/map_editor | 21b564a541a4790c295530c84d34ddc096b3e3b4 | a1854d722b8abe12f00784beca0ebc1188242b2e | refs/heads/master | 2020-12-25T14:38:36.238440 | 2016-08-22T01:20:18 | 2016-08-22T01:20:18 | 66,231,441 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,386 | java | package mine.io;
import java.beans.XMLDecoder;
import java.beans.XMLEncoder;
import mine.MineException;
/**
* BeansXMLファイルを読み書きするクラス。
*
* @author k-saito
* @version 1.0
*/
public class BeanIO {
/**
* ファイルからオブジェクトを読み込む。
*
* @param path - データファイルのパス
* @return ファイルから読み込まれたオブジェクト
* @throws MineException データの読み込みに失敗した。
*/
public static Object read(String path) throws MineException {
try (XMLDecoder in = new XMLDecoder(FileIO.getInputStream(path))) {
Object obj = in.readObject();
if (obj != null) {
return obj;
} else {
throw new MineException("Failed to read Beans.");
}
}
}
/**
* オブジェクトをファイルに書き出す。
*
* @param path - データファイルのパス
* @param Object - 書き出すオブジェクト
* @throws MineException データの書き込みに失敗した。
*/
public static void write(String path, Object obj) throws MineException {
try (XMLEncoder out = new XMLEncoder(FileIO.getOutputStream(path))) {
out.writeObject(obj);
}
}
}
| [
"mela825@gmail.com"
] | mela825@gmail.com |
9c0b93bdb351eed782c0a301a7ec37745697a856 | ef8c444e8d494d27ab248707d12d7c30fc407702 | /ledger/ledger-database/src/main/java/com/jd/blockchain/ledger/core/SmartContract.java | a76934283647da57de028ebc0c0902db1707aac1 | [] | permissive | blockchain-jd-com/jdchain-core | 334e45928da4eccfada97be14b13bbbddc9986bb | 5a85be3e7fcff00dd5203dcfc835fd180260c9cd | refs/heads/master | 2023-06-25T08:56:59.183504 | 2022-10-18T09:10:09 | 2022-10-18T09:10:09 | 229,806,492 | 5 | 14 | Apache-2.0 | 2023-06-14T22:48:08 | 2019-12-23T18:51:35 | Java | UTF-8 | Java | false | false | 192 | java | package com.jd.blockchain.ledger.core;
import com.jd.binaryproto.DataContract;
@DataContract(code=0x01)
public interface SmartContract {
String getName();
String getDescription();
}
| [
"huanghaiquan@jd.com"
] | huanghaiquan@jd.com |
8cf1915d17c3a62f4b10b6ed1d197c85d0d6a0ac | a7ab01318fb853b54b0eeb776c2fba209edc0b3a | /erp-parent/erp-masterData/src/main/java/com/erp/masterdata/customer/dao/model/MdCustomer.java | 3ab004b16d50072c8bafda398a4ad436fb43481c | [
"Apache-2.0"
] | permissive | BestJex/redragon-erp | 3ae1b0ee72ab7b7f5bc8669712a14d79b5aeb256 | 8449aff0ac3cc9ec2cd7ec260210191667d3f0d3 | refs/heads/master | 2022-12-01T09:06:00.084842 | 2020-08-11T15:20:09 | 2020-08-11T15:20:09 | 286,910,065 | 1 | 0 | null | 2020-08-12T03:48:31 | 2020-08-12T03:48:30 | null | UTF-8 | Java | false | false | 6,856 | java | package com.erp.masterdata.customer.dao.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
@Entity
@Table(name="md_customer", schema="erp")
@DynamicInsert(true)
@DynamicUpdate(true)
public class MdCustomer implements java.io.Serializable {
//serialVersionUID
private static final long serialVersionUID = 1L;
//Constructors
public MdCustomer() {
}
//Fields
//主键
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "customer_id", unique = true, nullable = false)
private Integer customerId;
public Integer getCustomerId() {
return this.customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
//客户编码
@NotBlank(message="{code.NotBlank}")
@Column(name = "customer_code", unique = true, nullable = false, length = 45)
private String customerCode;
public String getCustomerCode() {
return this.customerCode;
}
public void setCustomerCode(String customerCode) {
this.customerCode = customerCode;
}
//客户名称
@NotBlank(message="{name.NotBlank}")
@Column(name = "customer_name", unique = true, nullable = false, length = 45)
private String customerName;
public String getCustomerName() {
return this.customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
//客户类型(个人、公司)
@Column(name = "customer_type", unique = false, nullable = false, length = 45)
private String customerType;
public String getCustomerType() {
return this.customerType;
}
public void setCustomerType(String customerType) {
this.customerType = customerType;
}
//客户地址
@Column(name = "customer_address", unique = false, nullable = true, length = 100)
private String customerAddress;
public String getCustomerAddress() {
return this.customerAddress;
}
public void setCustomerAddress(String customerAddress) {
this.customerAddress = customerAddress;
}
//客户电话
@Column(name = "customer_telephone", unique = false, nullable = true, length = 45)
private String customerTelephone;
public String getCustomerTelephone() {
return this.customerTelephone;
}
public void setCustomerTelephone(String customerTelephone) {
this.customerTelephone = customerTelephone;
}
//客户国家
@NotBlank(message="客户国家必填")
@Column(name = "customer_country", unique = false, nullable = false, length = 45)
private String customerCountry;
public String getCustomerCountry() {
return this.customerCountry;
}
public void setCustomerCountry(String customerCountry) {
this.customerCountry = customerCountry;
}
//客户城市
@Column(name = "customer_city", unique = false, nullable = true, length = 45)
private String customerCity;
public String getCustomerCity() {
return this.customerCity;
}
public void setCustomerCity(String customerCity) {
this.customerCity = customerCity;
}
//客户类型
@Column(name = "customer_category", unique = false, nullable = true, length = 45)
private String customerCategory;
public String getCustomerCategory() {
return this.customerCategory;
}
public void setCustomerCategory(String customerCategory) {
this.customerCategory = customerCategory;
}
//客户标签
@Column(name = "customer_label", unique = false, nullable = true, length = 100)
private String customerLabel;
public String getCustomerLabel() {
return this.customerLabel;
}
public void setCustomerLabel(String customerLabel) {
this.customerLabel = customerLabel;
}
//本公司标识
@Column(name = "own_flag", unique = false, nullable = false, length = 1)
private String ownFlag;
public String getOwnFlag() {
return ownFlag;
}
public void setOwnFlag(String ownFlag) {
this.ownFlag = ownFlag;
}
//客户状态
@Column(name = "status", unique = false, nullable = false, length = 1)
private String status;
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
//审批状态(未提交UNSUBMIT、已提交SUBMIT、已审批APPROVE、已驳回REJECT)
@Column(name = "approve_status", unique = false, nullable = false, length = 45)
private String approveStatus;
public String getApproveStatus() {
return approveStatus;
}
public void setApproveStatus(String approveStatus) {
this.approveStatus = approveStatus;
}
//创建时间
@Column(name = "created_date", unique = false, nullable = false)
private Date createdDate;
public Date getCreatedDate() {
return this.createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
//创建人
@Column(name = "created_by", unique = false, nullable = false, length = 45)
private String createdBy;
public String getCreatedBy() {
return this.createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
//最后修改时间
@Column(name = "last_updated_date", unique = false, nullable = true)
private Date lastUpdatedDate;
public Date getLastUpdatedDate() {
return this.lastUpdatedDate;
}
public void setLastUpdatedDate(Date lastUpdatedDate) {
this.lastUpdatedDate = lastUpdatedDate;
}
//最后修改人
@Column(name = "last_updated_by", unique = false, nullable = true, length = 45)
private String lastUpdatedBy;
public String getLastUpdatedBy() {
return this.lastUpdatedBy;
}
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
//组织机构
@Column(name = "org_code", unique = false, nullable = false, length = 10)
private String orgCode;
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
} | [
"dongbind@163.com"
] | dongbind@163.com |
e8aee3d642a2b9edcfc81e34f05349e197f0c67f | 74c0d9045182918895e5b4b429db4b0dff831784 | /.svn/pristine/6e/6e0e3a4fabd6adbddc518e2858620c85e3886152.svn-base | 21d15746708b7c2d2ff8b6ff53a32a0d516316d0 | [] | no_license | yuyuliuyu/LAOBAO | c7d43c5e0bb62caacdb81b9417aee1382cd560d7 | b7e832d53ed6fd148d235d70db7ba6e868c5ca29 | refs/heads/master | 2020-03-15T10:40:21.773695 | 2018-05-08T06:10:09 | 2018-05-08T06:10:09 | 132,104,336 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 417 | package com.lingnet.hcm.service.empdata;
import java.util.HashMap;
import com.lingnet.common.service.BaseService;
import com.lingnet.hcm.entity.person.Relation;
import com.lingnet.hcm.entity.person.SoldierBack;
import com.lingnet.util.Pager;
/**
* 军人复转service
*/
public interface SoldierBackService extends BaseService<SoldierBack, String>{
public HashMap getListData(Pager pager, String searchData);
}
| [
"392544641@qq.com"
] | 392544641@qq.com | |
8dc9fc3d469e95dbd0c60e8369d01ea73cdbb668 | 02127aef528ff9ba18ae478f481ab37cf3c2fb4c | /src/main/java/com/wanliang/small/dao/impl/ParameterDaoImpl.java | 0d8d2643ac8323013b0ab2e80cb58b9ddee56738 | [] | no_license | pf5512/small | 2f2c78a9fcc7f0fc9df56fb4d251df49ea037ae8 | 923eda30e9c85214a9efb78fc3750b7fc3e572d4 | refs/heads/master | 2021-01-01T06:53:32.059039 | 2015-04-13T01:15:50 | 2015-04-13T01:15:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,645 | java |
package com.wanliang.small.dao.impl;
import java.util.List;
import java.util.Set;
import javax.persistence.FlushModeType;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import com.wanliang.small.dao.ParameterDao;
import com.wanliang.small.entity.ParameterGroup;
import com.wanliang.small.dao.ParameterDao;
import com.wanliang.small.entity.Parameter;
import com.wanliang.small.entity.ParameterGroup;
import org.springframework.stereotype.Repository;
/**
* Dao - 参数
*
* @author wan_liang@126.com Team
* @version 3.0
*/
@Repository("parameterDaoImpl")
public class ParameterDaoImpl extends BaseDaoImpl<Parameter, Long> implements ParameterDao {
public List<Parameter> findList(ParameterGroup parameterGroup, Set<Parameter> excludes) {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Parameter> criteriaQuery = criteriaBuilder.createQuery(Parameter.class);
Root<Parameter> root = criteriaQuery.from(Parameter.class);
criteriaQuery.select(root);
Predicate restrictions = criteriaBuilder.conjunction();
if (parameterGroup != null) {
restrictions = criteriaBuilder.and(restrictions, criteriaBuilder.equal(root.get("parameterGroup"), parameterGroup));
}
if (excludes != null && !excludes.isEmpty()) {
restrictions = criteriaBuilder.and(restrictions, criteriaBuilder.not(root.in(excludes)));
}
criteriaQuery.where(restrictions);
return entityManager.createQuery(criteriaQuery).setFlushMode(FlushModeType.COMMIT).getResultList();
}
} | [
"wan_liang@126.com"
] | wan_liang@126.com |
b4d85b6eac9881f1df5e65d8bde9126e611cb3a2 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/XRENDERING-481-89-29-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/render/DefaultVelocityManager_ESTest.java | b2b43a520d09d7f36778fcc9a9285b231c934309 | [
"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 | 571 | java | /*
* This file was automatically generated by EvoSuite
* Tue Mar 31 19:13:23 UTC 2020
*/
package com.xpn.xwiki.render;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityManager_ESTest extends DefaultVelocityManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
a15678be47db2a6241f0b7207e7d59abcd090600 | 10017e6e4fae86ba9c7d6ac891c5ca8988d8b3e4 | /app/src/main/java/cn/see/chat/utils/SortTopConvList.java | a995b219de0b054599dee2b5fbde33224c0717be | [] | no_license | TiAmoGxb/See | e5f94cb139d4c00f242fab1a564eea8a6b983d6b | 4e7d774218828978733e6ef551bfb439e0a17978 | refs/heads/master | 2020-03-22T17:47:06.596872 | 2018-12-27T07:46:48 | 2018-12-27T07:46:48 | 140,415,559 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 645 | java | package cn.see.chat.utils;
import android.text.TextUtils;
import java.util.Comparator;
import cn.jpush.im.android.api.model.Conversation;
public class SortTopConvList implements Comparator<Conversation> {
@Override
public int compare(Conversation o, Conversation o2) {
if (!TextUtils.isEmpty(o.getExtra()) && !TextUtils.isEmpty(o2.getExtra())) {
if (Integer.parseInt(o.getExtra()) > Integer.parseInt(o2.getExtra())) {
return 1;
} else if (Integer.parseInt(o.getExtra()) < Integer.parseInt(o2.getExtra())) {
return -1;
}
}
return 0;
}
}
| [
"78997767@qq.com"
] | 78997767@qq.com |
7088572079dff5a74a482ad08b32189c64906be8 | 11f065c8882721e1877561e663fd271509f3ece9 | /Chapter_15/src/MethodReferences/ToInstanceMethods/HighTemp.java | 6e17fd7a195723269ea37413d202805aff6f3303 | [] | no_license | Anjali-225/Java-Adv-Herb-Book | 445260dbab6254de66c8a4ff1c2f1ea35164888a | 7286782f8e97594efc7e36e1c55d640ede7d14eb | refs/heads/master | 2023-02-22T23:54:35.268985 | 2021-01-22T09:16:05 | 2021-01-22T09:16:05 | 314,249,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 537 | java | package MethodReferences.ToInstanceMethods;
// A class that stores the temperature high for a day.
public class HighTemp {
private int hTemp;
HighTemp(int ht) { hTemp = ht; }
// Return true if the invoking HighTemp object has the same
// temperature as ht2.
boolean sameTemp(HighTemp ht2) {
return hTemp == ht2.hTemp;
}
// Return true if the invoking HighTemp object has a temperature
// that is less than ht2.
boolean lessThanTemp(HighTemp ht2) {
return hTemp < ht2.hTemp;
}
} | [
"anjali.payal69@gmail.com"
] | anjali.payal69@gmail.com |
4e98d7e26e8fb7bda8f27662f987f6fcf29db530 | 71641e9dbf3f709a32e2aa5847dee5e74aa22113 | /android-Ultra-Pull-To-Refresh-Demo/src/com/example/android_ultra_pull_to_refresh_demo/data/DemoRequestData.java | bc9bd059413667ebd7e1925bf1b41c1ed9ed15b3 | [] | no_license | xunleji/ListView-RecycleView | 72c7076be51449146b397a94018807c7e61fda9e | 95dc2681700aacdd2cecc9879f8bc7ee7aef6043 | refs/heads/master | 2021-01-10T01:18:24.865926 | 2016-03-16T03:17:46 | 2016-03-16T03:21:26 | 53,997,090 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,204 | java | package com.example.android_ultra_pull_to_refresh_demo.data;
import in.srain.cube.request.CacheAbleRequest;
import in.srain.cube.request.CacheAbleRequestHandler;
import in.srain.cube.request.CacheAbleRequestJsonHandler;
import in.srain.cube.request.JsonData;
import in.srain.cube.request.RequestFinishHandler;
public class DemoRequestData {
public static void getImageList(final RequestFinishHandler<JsonData> requestFinishHandler) {
CacheAbleRequestHandler requestHandler = new CacheAbleRequestJsonHandler() {
@Override
public void onCacheAbleRequestFinish(JsonData data, CacheAbleRequest.ResultType type, boolean outOfDate) {
requestFinishHandler.onRequestFinish(data);
}
};
CacheAbleRequest<JsonData> request = new CacheAbleRequest<JsonData>(requestHandler);
String url = "http://cube-server.liaohuqiu.net/api_demo/image-list.php";
request.setCacheTime(3600);
request.setTimeout(1000);
request.getRequestData().setRequestUrl(url);
request.setAssertInitDataPath("request_init/demo/image-list.json");
request.setCacheKey("image-list-1");
request.send();
}
}
| [
"you@example.com"
] | you@example.com |
8b38797d0d2d1612b0a42a5b29742f6fdb73e7ec | 6dd54f02d7dd6dcb22a91c6d3f591263f5615b2e | /KmuttSuperKpi/src/th/ac/chandra/eduqa/form/ResultMonthForm.java | e082b067954ee3a0d0e29f89e2d387702e39b447 | [] | no_license | GJ-jirayu/Kmutt-Super-KPI | 145c885de98a21f63dcc19cd54a27c2327a4da01 | aaa8052460fbb9b2f5d382d09ee8242842d4ef06 | refs/heads/master | 2020-04-06T07:01:04.602015 | 2016-08-19T08:30:07 | 2016-08-19T08:30:07 | 58,532,131 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 989 | java | package th.ac.chandra.eduqa.form;
import java.io.Serializable;
import java.util.List;
public class ResultMonthForm extends CommonForm implements Serializable{
/**
*
*/
private static final long serialVersionUID = -6498711139841794347L;
/**
*
*/
private Integer kpiId;
private Integer frequency;
private Integer startMonthNo;
private List<Integer> resultMonth;
public ResultMonthForm() {
super();
}
public Integer getKpiId() {
return kpiId;
}
public void setKpiId(Integer kpiId) {
this.kpiId = kpiId;
}
public Integer getFrequency() {
return frequency;
}
public void setFrequency(Integer frequency) {
this.frequency = frequency;
}
public Integer getStartMonthNo() {
return startMonthNo;
}
public void setStartMonthNo(Integer startMonthNo) {
this.startMonthNo = startMonthNo;
}
public List<Integer> getResultMonth() {
return resultMonth;
}
public void setResultMonth(List<Integer> resultMonth) {
this.resultMonth = resultMonth;
}
}
| [
"wirun@goingjesse.com"
] | wirun@goingjesse.com |
f267a54991cfc9c23b4cb3eabadacd4b85bea8cd | c7b70bfc62c76c6ee4c2c3dab1414c47f6af1754 | /server/src/com/rs/game/npc/combat/impl/RefugeOfFearSOLMageMininionCombat.java | a4e673e85dfaedd237518a9b671123571cc838ee | [] | no_license | EnlistedGhost/MorrowRealm-v718 | 4459bb58f5ceb4dca8e4ef5ee7dcd55e57951a6b | 8608210d1a3a3bd4374200ffe938fc56d071b554 | refs/heads/master | 2020-06-01T21:26:28.610346 | 2019-06-24T18:48:29 | 2019-06-24T18:48:29 | 190,932,255 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,029 | java | package com.rs.game.npc.combat.impl;
import java.util.Random;
import com.rs.game.Animation;
import com.rs.game.Entity;
import com.rs.game.Graphics;
import com.rs.game.World;
import com.rs.game.npc.NPC;
import com.rs.game.npc.combat.CombatScript;
import com.rs.game.npc.combat.NPCCombatDefinitions;
import com.rs.game.player.Player;
import com.rs.game.tasks.WorldTask;
import com.rs.game.tasks.WorldTasksManager;
public class RefugeOfFearSOLMageMininionCombat extends CombatScript {
@Override
public Object[] getKeys() {
return new Object[] { 15172 };
}
@Override
public int attack(final NPC npc, final Entity target) {
final NPCCombatDefinitions defs = npc.getCombatDefinitions();
boolean player = target instanceof Player; // shouldn't have player as
// target unless bind spell.
startAttack(npc, target, player, player ? 4 : new Random().nextInt(4));
return defs.getAttackDelay();
}
private void startAttack(final NPC npc, final Entity entity,
boolean player, int attack) {
switch (attack) {
case 0: // Vengeance other - to be casted on one of the minions.
if (entity.getAttributes().get("vengeance_activated") == Boolean.TRUE) {
startAttack(npc, entity, player, new Random().nextInt(3) + 1);
return;
}
npc.setNextAnimation(new Animation(4411));
entity.setNextGraphics(new Graphics(725, 0, 96));
break;
case 1: // Heal other - to be casted on one of the minions.
case 2: // ?
case 3: // ?
case 4: // Entangle - to be casted on the player.
if (!player) {
startAttack(npc, entity, player, new Random().nextInt(4));
return;
}
final Player p = (Player) entity;
npc.setNextGraphics(new Graphics(177, 0, 96));
npc.setNextAnimation(new Animation(710));
WorldTasksManager.schedule(new WorldTask() {
@Override
public void run() {
super.stop();
p.setNextGraphics(new Graphics(179, 0, 96));
}
}, 2);
p.addFreezeDelay(20000, true);
World.sendProjectile(npc, p, 178, 36, 32, 50, 70, 0, 0);
break;
}
}
}
| [
"enlisted.ghost@gmail.com"
] | enlisted.ghost@gmail.com |
6ecc1409e791c3cd86c6ece49fb4a7ce852f03ea | 7d01d0ee1bab9ed80d02dc766feeb7d88956f2a7 | /src/main/java/gov/usgs/cida/pubs/domain/sipp/Author.java | 5c3613ca896ff40f2d3bf6cab97ba60136070399 | [
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | usgs/pubs-services | db39ccda73ed24d33dfc53953048c6cb18f9649e | 56703c9c69c05c17c45e642b71f930a4ad7c5ef0 | refs/heads/master | 2021-12-24T16:51:57.382707 | 2021-08-18T17:36:24 | 2021-08-18T17:36:24 | 199,486,310 | 4 | 7 | NOASSERTION | 2021-08-18T17:36:25 | 2019-07-29T16:09:30 | Java | UTF-8 | Java | false | false | 3,445 | java | package gov.usgs.cida.pubs.domain.sipp;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Author {
@JsonProperty("IPNumber")
private String ipNumber;
@JsonProperty("AuthorName")
private String authorName;
@JsonProperty("AuthorNameText")
private String authorNameText;
@JsonProperty("ORCID")
private String orcid;
@JsonProperty("CostCenter")
private String costCenter;
@JsonProperty("ContributorRole")
private String contributorRole;
@JsonProperty("NonUSGSAffiliation")
private String nonUSGSAffiliation;
@JsonProperty("NonUSGSContributor")
private String nonUSGSContributor;
@JsonProperty("Rank")
private String rank;
@JsonProperty("Created")
private String created;
@JsonProperty("CreatedBy")
private String createdBy;
@JsonProperty("Modified")
private String modified;
@JsonProperty("ModifiedBy")
private String modifiedBy;
public String getIpNumber() {
return ipNumber;
}
public void setIpNumber(String ipNumber) {
this.ipNumber = ipNumber;
}
public String getAuthorName() {
return StringUtils.trimToNull(authorName);
}
public void setAuthorName(String authorName) {
this.authorName = authorName;
}
public String getAuthorNameText() {
return StringUtils.trimToNull(authorNameText);
}
public void setAuthorNameText(String authorNameText) {
this.authorNameText = authorNameText;
}
public String getOrcid() {
return StringUtils.trimToNull(orcid);
}
public void setOrcid(String orcid) {
this.orcid = orcid;
}
public String getCostCenter() {
return StringUtils.trimToNull(costCenter);
}
public void setCostCenter(String costCenter) {
this.costCenter = costCenter;
}
public String getContributorRole() {
return StringUtils.trimToNull(contributorRole);
}
public void setContributorRole(String contributorRole) {
this.contributorRole = contributorRole;
}
public String getNonUSGSAffiliation() {
return StringUtils.trimToNull(nonUSGSAffiliation);
}
public void setNonUSGSAffiliation(String nonUSGSAffiliation) {
this.nonUSGSAffiliation = nonUSGSAffiliation;
}
public String getNonUSGSContributor() {
return StringUtils.trimToNull(nonUSGSContributor);
}
public void setNonUSGSContributor(String nonUSGSContributor) {
this.nonUSGSContributor = nonUSGSContributor;
}
public String getRank() {
return StringUtils.trimToNull(rank);
}
public void setRank(String rank) {
this.rank = rank;
}
public String getCreated() {
return StringUtils.trimToNull(created);
}
public void setCreated(String created) {
this.created = created;
}
public String getCreatedBy() {
return StringUtils.trimToNull(createdBy);
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getModified() {
return StringUtils.trimToNull(modified);
}
public void setModified(String modified) {
this.modified = modified;
}
public String getModifiedBy() {
return StringUtils.trimToNull(modifiedBy);
}
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
}
public String[] splitFullName() {
String[] familyGiven = new String[] {null, null};
if (null != StringUtils.trimToNull(authorNameText)) {
String[] nameParts = authorNameText.split(",");
if (0 < nameParts.length) {
familyGiven[0] = nameParts[0].trim();
}
if (1 < nameParts.length) {
familyGiven[1] = nameParts[1].trim();
}
}
return familyGiven;
}
}
| [
"drsteini@contractor.usgs.gov"
] | drsteini@contractor.usgs.gov |
a75fcb4578027b2aa0d9c104f2ccf1b1d3f22f5c | 2c42d04cba77776514bc15407cd02f6e9110b554 | /src/org/processmining/framework/models/transitionsystem/TransitionSystemVertex.java | 001886d651c5a12ecfd2f4337e97c8ccf5292b21 | [] | no_license | pinkpaint/BPMNCheckingSoundness | 7a459b55283a0db39170c8449e1d262e7be21e11 | 48cc952d389ab17fc6407a956006bf2e05fac753 | refs/heads/master | 2021-01-10T06:17:58.632082 | 2015-06-22T14:58:16 | 2015-06-22T14:58:16 | 36,382,761 | 0 | 1 | null | 2015-06-14T10:15:32 | 2015-05-27T17:11:29 | null | UTF-8 | Java | false | false | 941 | java | package org.processmining.framework.models.transitionsystem;
import java.util.Collection;
import java.util.HashSet;
import org.processmining.framework.models.fsm.FSMState;
public abstract class TransitionSystemVertex extends FSMState
{
protected HashSet<String> exLogs;
public TransitionSystemVertex(TransitionSystem g)
{
super(g, "");
}
public void addExLog(String exLog)
{
exLogs.add(exLog);
}
public void addExLogs(Collection<String> logs)
{
exLogs.addAll(logs);
}
public HashSet<String> getExLogs()
{
return exLogs;
}
public void setExLogs(HashSet<String> exLogs)
{
this.exLogs = exLogs;
}
public abstract boolean equalsV(TransitionSystemVertex v1);
public abstract void makeIdentifier();
public abstract void addDocument(String doc);
public abstract void addDocuments(Collection<String> docs);
public abstract Collection<String> getDocs();
public abstract void setDocs(Collection<String> docs);
}
| [
"pinkpaint.ict@gmail.com"
] | pinkpaint.ict@gmail.com |
1ced92a73042cbf329ec3ebdcdf7634141081e27 | 59a19bb8c3e2c59a7f7a354f5cafc106e0116e59 | /modules/bluima_abbreviations/src/main/java/com/wcohen/ss/AbstractStatisticalTokenDistance.java | 434e78086f9f502977a4fced04e00841b18b0730 | [
"Apache-2.0"
] | permissive | KnowledgeGarden/bluima | ffd5d54d69e42078598a780bdf6e67a6325d695a | 793ea3f46761dce72094e057a56cddfa677156ae | refs/heads/master | 2021-01-01T06:21:54.919609 | 2016-01-25T22:37:43 | 2016-01-25T22:37:43 | 97,415,950 | 1 | 0 | null | 2017-07-16T22:53:46 | 2017-07-16T22:53:46 | null | UTF-8 | Java | false | false | 2,700 | java | package com.wcohen.ss;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.wcohen.ss.api.StringWrapper;
import com.wcohen.ss.api.StringWrapperIterator;
import com.wcohen.ss.api.Token;
import com.wcohen.ss.api.Tokenizer;
/**
* Abstract token distance metric that uses frequency statistics.
*/
abstract public class AbstractStatisticalTokenDistance extends AbstractTokenizedStringDistance
{
private static Logger log=LoggerFactory.getLogger(AbstractTokenizedStringDistance.class);
// to save space, allocate the small numbers only once in the documentFrequency map
private static final Integer ONE = new Integer(1);
private static final Integer TWO = new Integer(2);
private static final Integer THREE = new Integer(3);
// maps tokens to document frequency
protected Map documentFrequency = new HashMap();
// count number of documents
protected int collectionSize = 0;
// count number of tokens
protected int totalTokenCount = 0;
// count warnings
private int warningCounter = 0;
public AbstractStatisticalTokenDistance(Tokenizer tokenizer) { super(tokenizer); }
public AbstractStatisticalTokenDistance() { super(); }
/** Accumulate statistics on how often each token value occurs
*/
public void train(StringWrapperIterator i)
{
Set seenTokens = new HashSet();
while (i.hasNext()) {
BagOfTokens bag = asBagOfTokens(i.nextStringWrapper());
seenTokens.clear();
for (Iterator j=bag.tokenIterator(); j.hasNext(); ) {
totalTokenCount++;
Token tokj = (Token)j.next();
if (!seenTokens.contains(tokj)) {
seenTokens.add(tokj);
// increment documentFrequency counts
Integer df = (Integer)documentFrequency.get(tokj);
if (df==null) documentFrequency.put(tokj,ONE);
else if (df==ONE) documentFrequency.put(tokj,TWO);
else if (df==TWO) documentFrequency.put(tokj,THREE);
else documentFrequency.put(tokj, new Integer(df.intValue()+1));
}
}
collectionSize++;
}
}
protected void checkTrainingHasHappened(StringWrapper s, StringWrapper t)
{
if (collectionSize==0 && ++warningCounter<=10) {
log.warn(this.getClass()+" not yet trained for sim('"+s+"','"+t+"')");
if (warningCounter == 10) {
log.warn("(By the way, that's the last warning you'll get about this.)");
}
}
}
public int getDocumentFrequency(Token tok) {
Integer freqInteger = (Integer)documentFrequency.get(tok);
if (freqInteger==null) return 0;
else return freqInteger.intValue();
}
public Iterator tokenIterator() { return documentFrequency.keySet().iterator(); }
}
| [
"renaud@apache.org"
] | renaud@apache.org |
4fed861ece0e9891d5532928b8ceed3f89c77b37 | e553161c3adba5c1b19914adbacd58f34f27788e | /ambari/ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/EvaluatorTest.java | f54842d1cee2c605cfa733583b1e300309de0695 | [] | 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 | 7,434 | 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.ambari.server.state.quicklinksprofile;
import static org.apache.ambari.server.state.quicklinksprofile.Filter.acceptAllFilter;
import static org.apache.ambari.server.state.quicklinksprofile.Filter.linkAttributeFilter;
import static org.apache.ambari.server.state.quicklinksprofile.Filter.linkNameFilter;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.apache.ambari.server.state.quicklinks.Link;
import org.junit.Test;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
public class EvaluatorTest {
static final String NAMENODE = "NAMENODE";
static final String NAMENODE_UI = "namenode_ui";
static final String AUTHENTICATED = "authenticated";
static final String NAMENODE_JMX = "namenode_jmx";
static final String SSO = "sso";
private Link namenodeUi;
private Link nameNodeJmx;
public EvaluatorTest() {
namenodeUi = new Link();
namenodeUi.setComponentName(NAMENODE);
namenodeUi.setName(NAMENODE_UI);
namenodeUi.setAttributes(ImmutableList.of(AUTHENTICATED));
nameNodeJmx = new Link();
nameNodeJmx.setComponentName(NAMENODE);
nameNodeJmx.setName(NAMENODE_JMX);
}
/**
* Evaluators should work when initialized with {@code null} or an empty list of filters.
*/
@Test
public void testWithEmptyFilters() throws Exception {
Evaluator evaluator = new Evaluator(new ArrayList<Filter>());
assertEquals(Optional.absent(), evaluator.isVisible(namenodeUi));
Evaluator evaluator2 = new Evaluator(null);
assertEquals(Optional.absent(), evaluator2.isVisible(namenodeUi));
}
/**
* Evaluator should return {@link Optional#absent()} when the link doesn't match any filters
*/
@Test
public void testNoMatchingFilter() throws Exception {
List<Filter> filters = Lists.newArrayList(
linkNameFilter(NAMENODE_JMX, true),
linkAttributeFilter(SSO, false));
Evaluator evaluator = new Evaluator(filters);
assertEquals(Optional.absent(), evaluator.isVisible(namenodeUi));
}
/**
* Link name filters should be evaluated first
*/
@Test
public void testLinkNameFiltersEvaluatedFirst() throws Exception {
List<Filter> filters = Lists.newArrayList(
acceptAllFilter(false),
linkNameFilter(NAMENODE_UI, true),
linkNameFilter(NAMENODE_JMX, false),
linkAttributeFilter(AUTHENTICATED, false),
linkAttributeFilter(SSO, false));
Evaluator evaluator = new Evaluator(filters);
assertEquals(Optional.of(true), evaluator.isVisible(namenodeUi));
}
/**
* Link attribute filters should be evaluated only if the link does not match any link name filters.
*/
@Test
public void testLinkAttributeFiltersEvaluatedSecondly() throws Exception {
List<Filter> filters = Lists.newArrayList(
acceptAllFilter(false),
linkNameFilter(NAMENODE_JMX, false),
linkAttributeFilter(AUTHENTICATED, true),
linkAttributeFilter(SSO, true));
Evaluator evaluator = new Evaluator(filters);
assertEquals(Optional.of(true), evaluator.isVisible(namenodeUi));
}
/**
* Link attribute filters work with links with null attributes. (No NPE is thrown)
*/
@Test
public void testLinkAttributeFiltersWorkWithNullAttributes() throws Exception {
List<Filter> filters = Lists.newArrayList(
acceptAllFilter(true),
linkAttributeFilter(AUTHENTICATED, false),
linkAttributeFilter(SSO, false));
Evaluator evaluator = new Evaluator(filters);
assertEquals(Optional.of(true), evaluator.isVisible(nameNodeJmx));
}
/**
* If the link matches both a show and hide type link attribute filter, then it will be evaluated as hidden.
*/
@Test
public void testHideFilterTakesPrecedence() throws Exception {
List<Filter> filters = Lists.<Filter>newArrayList(
linkAttributeFilter(AUTHENTICATED, false),
linkAttributeFilter(SSO, true));
Evaluator evaluator = new Evaluator(filters);
namenodeUi.setAttributes(ImmutableList.of(AUTHENTICATED, SSO));
assertEquals(Optional.of(false), evaluator.isVisible(namenodeUi));
}
/**
* Accept-all filters are only evaluated if the link does not match any link name or link attribute filters.
*/
@Test
public void acceptAllFilterEvaluatedLast() throws Exception {
List<Filter> filters = Lists.newArrayList(
acceptAllFilter(false),
linkNameFilter(NAMENODE_JMX, true),
linkAttributeFilter(SSO, true));
Evaluator evaluator = new Evaluator(filters);
assertEquals(Optional.of(false), evaluator.isVisible(namenodeUi));
}
/**
* Contradicting link name filters should result in {@link QuickLinksProfileEvaluatorException}.
*/
@Test(expected = QuickLinksProfileEvaluatorException.class)
public void contradictingLinkNameFiltersRejected() throws Exception {
List<Filter> filters = Lists.newArrayList(
linkNameFilter(NAMENODE_JMX, true),
linkNameFilter(NAMENODE_JMX, false),
linkAttributeFilter(SSO, true));
new Evaluator(filters);
}
/**
* Contradicting link attribute filters should result in {@link QuickLinksProfileEvaluatorException}.
*/
@Test(expected = QuickLinksProfileEvaluatorException.class)
public void contradictingLinkAttributeFiltersRejected() throws Exception {
List<Filter> filters = Lists.<Filter>newArrayList(
linkAttributeFilter(SSO, true),
linkAttributeFilter(SSO, false));
new Evaluator(filters);
}
/**
* Contradicting accept-all filters should result in {@link QuickLinksProfileEvaluatorException}.
*/
@Test(expected = QuickLinksProfileEvaluatorException.class)
public void contradictingAcceptAllFiltersRejected() throws Exception {
List<Filter> filters = Lists.newArrayList(
linkNameFilter(NAMENODE_JMX, true),
linkAttributeFilter(SSO, true),
acceptAllFilter(true),
acceptAllFilter(false));
new Evaluator(filters);
}
/**
* Duplicate filter declarations are ok if their visibility rule is the same
*/
@Test
public void duplicateFiltersAreOkIfDoNotContradict() throws Exception {
List<Filter> filters = Lists.newArrayList(
acceptAllFilter(true),
acceptAllFilter(true),
linkNameFilter(NAMENODE_JMX, false),
linkNameFilter(NAMENODE_JMX, false),
linkAttributeFilter(SSO, false),
linkAttributeFilter(SSO, false));
Evaluator evaluator = new Evaluator(filters);
assertEquals(Optional.of(true), evaluator.isVisible(namenodeUi));
}
} | [
"oei.reed@gmail.com"
] | oei.reed@gmail.com |
564945d1fbd13e7e611ba41a38fa71df3d8406fe | e3a37aaf17ec41ddc7051f04b36672db62a7863d | /common-service/user-service-project/user-service/src/main/java/com/iot/user/controller/FeedbackApiController.java | 6d80ca45367a5982b2fa0acd18db38fec02f11d7 | [] | no_license | github4n/cloud | 68477a7ecf81d1526b1b08876ca12cfe575f7788 | 7974042dca1ee25b433177e2fe6bda1de28d909a | refs/heads/master | 2020-04-18T02:04:33.509889 | 2019-01-13T02:19:32 | 2019-01-13T02:19:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package com.iot.user.controller;
import com.iot.user.api.FeedbackApi;
import com.iot.user.service.UserFeedbackService;
import com.iot.user.vo.FeedbackFileVo;
import com.iot.user.vo.FeedbackReq;
import com.iot.user.vo.FeedbackVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class FeedbackApiController implements FeedbackApi {
@Autowired
private UserFeedbackService userFeedbackService;
@Override
public int saveFeedback(@RequestBody FeedbackReq feedbackReq) {
return userFeedbackService.saveFeedback(feedbackReq);
}
@Override
public int saveFeedbackFile(@RequestBody FeedbackFileVo feedbackFileVo) {
return userFeedbackService.saveFeedbackFileId(feedbackFileVo);
}
@Override
public void save(@RequestBody FeedbackVo feedbackVo) {
userFeedbackService.save(feedbackVo);
}
}
| [
"qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL"
] | qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL |
5b1757fba172677aa305c4543860d2f40a383c58 | bbf8fd9f280686495467a312a0ac2117cd0d39f4 | /src/main/java/create_model/abstractfactory/Video.java | 2360515bfa03ec48d7f86cb21f93aef1514f13c3 | [] | no_license | codeChengWenY/design_model | d96cb8d7aaf4e2cbfde56b76fc009c7e7c36cb86 | 2338eb6ea1a0abb2c144cf2e80c9b0b148d700d3 | refs/heads/master | 2022-11-30T08:13:15.517795 | 2020-08-14T06:04:56 | 2020-08-14T06:04:56 | 287,456,316 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 361 | java | package create_model.abstractfactory;
/**
* 一句话功能描述:
* @author CoderCheng
* @description 抽象工厂 以 不同语言的工厂视频和文章 但是 视频和文章都是以自己的语言为例
* @date 2020/5/13
* @time 17:40
* @param null:
* @return null
**/
public abstract class Video {
public abstract void produce();
}
| [
"1042732167@qq.com"
] | 1042732167@qq.com |
ad7723298e1d9a9e023be0e4c51fb240fbaf1242 | 5da2534bc582022c54d50c20c93a7c1872ac37d5 | /metrics/src/test/java/com/facebook/battery/metrics/cpu/CpuMetricsTest.java | faeed4523e9fb1874756d62d477a5f0f9b06c231 | [
"MIT"
] | permissive | z4zzaman/Battery-Metrics | 4ba3b4b2bc7d2c8c87616570e812880d12ebad6c | 52941f03f7cc02b599b172208fbf719162e8b51e | refs/heads/master | 2020-08-03T03:33:22.464613 | 2019-09-13T02:38:47 | 2019-09-13T02:41:30 | 211,612,867 | 1 | 0 | MIT | 2019-09-29T06:13:18 | 2019-09-29T06:13:18 | null | UTF-8 | Java | false | false | 572 | java | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.facebook.battery.metrics.cpu;
import com.facebook.battery.metrics.core.SystemMetricsTest;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class CpuMetricsTest extends SystemMetricsTest<CpuMetrics> {
@Override
protected Class<CpuMetrics> getClazz() {
return CpuMetrics.class;
}
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
6dde1e8d1ecd38346124fb6181aaa7ab4f2baa86 | 3657b6f5b30ac061e2ab1db7cd745e2ca8183af3 | /homeProject/src/com/house/home/client/controller/ClientWorkerItemAppController.java | ff49cdfe636f520ee2920475cec4439689113a86 | [] | no_license | Lxt000806/eclipse_workspace | b25f4f81bd0aa6f8d55fc834dd09cdb473af1f3f | 04376681ec91c3f8dbde2908d35612c4842a868c | refs/heads/main | 2023-05-23T12:05:26.989438 | 2021-06-13T05:49:26 | 2021-06-13T05:49:26 | 376,452,726 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,487 | java | package com.house.home.client.controller;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.DirectFieldBindingResult;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import org.springframework.web.bind.annotation.RequestMapping;
import com.house.framework.commons.orm.Page;
import com.house.framework.commons.utils.BeanConvertUtil;
import com.house.framework.commons.utils.ServletUtils;
import com.house.framework.commons.utils.StringUtil;
import com.house.home.client.service.evt.WorkerItemAppEvt;
import com.house.home.client.service.resp.BasePageQueryResp;
import com.house.home.client.service.resp.ItemBatchHeaderQueryResp;
import com.house.home.entity.basic.InterfaceLog;
import com.house.home.service.project.WorkerService;
@RequestMapping("/client/workerItemApp")
@Controller
public class ClientWorkerItemAppController extends ClientBaseController{
@Autowired
private WorkerService workerService;
@Autowired
protected Validator springValidator;
@SuppressWarnings({ "rawtypes", "unchecked" })
@RequestMapping("/getItemBatchHeaderList")
public void getItemBatchHeaderList(HttpServletRequest request, HttpServletResponse response){
StringBuilder msg = new StringBuilder();
JSONObject json = new JSONObject();
WorkerItemAppEvt evt=new WorkerItemAppEvt();
BasePageQueryResp<ItemBatchHeaderQueryResp> respon=new BasePageQueryResp<ItemBatchHeaderQueryResp>();
String clazz = Thread.currentThread().getStackTrace()[1].getClassName();
String javaFun = Thread.currentThread().getStackTrace()[1].getMethodName();
InterfaceLog interfaceLog = new InterfaceLog(clazz, javaFun);
interfaceLog.setRequestIp(request.getRemoteAddr());
interfaceLog.setRequestTime(new Date());
try {
json = StringUtil.queryStringToJSONObject(request);
evt = (WorkerItemAppEvt)JSONObject.toBean(json,WorkerItemAppEvt.class);
interfaceLog.setRequestContent(json.toString());
//对象字段合法性验证
Errors errors = new DirectFieldBindingResult(evt, "evt");
springValidator.validate(evt, errors);
if(errors.hasErrors()){
respon.setReturnCode("400001");
respon.setReturnInfo(ServletUtils.convertErrors2Msg(errors));
returnJson(respon,response,msg,respon,request,interfaceLog);
return;
}
Page page = new Page();
page.setPageNo(1);
page.setPageSize(100);
/*if(StringUtils.isNotBlank(itemBatchHeader.getCustCode())){
Customer customer = itemBatchHeaderService.get(Customer.class, itemBatchHeader.getCustCode());
if(customer != null){
itemBatchHeader.setCustType(customer.getCustType());
}
}*/
workerService.getItemBatchList(page,evt.getItemType1(),evt.getCustWkPk());
List<ItemBatchHeaderQueryResp> listBean = BeanConvertUtil.mapToBeanList(page.getResult(), ItemBatchHeaderQueryResp.class);
respon.setDatas(listBean);
respon.setHasNext(page.getTotalPages()>page.getPageNo()?true:false);
respon.setRecordSum(page.getTotalCount());
respon.setTotalPage(page.getTotalPages());
returnJson(respon,response,msg,respon,request,interfaceLog);
} catch (Exception e) {
e.printStackTrace();
super.exceptionHandle(respon,response,msg,request,interfaceLog);
}
}
}
| [
"1728490992@qq.com"
] | 1728490992@qq.com |
877d09dc980c62e496659090daa4fe0f1aefd388 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/16/org/apache/commons/math3/util/FastMath_tanh_559.java | b5a412e5ad6767ca68a8d238eec511c867b81b1b | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 5,974 | java |
org apach common math3 util
faster accur portabl altern link math
link strict math strictmath larg scale comput
fast math fastmath drop replac math strict math strictmath
mean method math code math sin
code math cbrt user directli chang
method code fast math fastmath sin code fast math fastmath cbrt
previou
fast math fastmath speed achiev reli heavili optim compil
code present jvm todai larg tabl
larger tabl lazili initialis setup
time penalis method
note fast math fastmath
extens insid apach common math call algorithm
overhead tabl intialis occur
end user call fast math fastmath method directli
perform figur specif jvm hardwar evalu
run fast math test perform fastmathtestperform test test directori sourc
distribut
fast math fastmath accuraci independ jvm reli
ieee basic oper embed tabl oper
accur ulp domain rang statement
rough global observ behavior
guarante number input william kahan'
href http wikipedia org wiki round tabl maker 27 dilemma tabl
maker' dilemma
fast math fastmath addition method found math strict math strictmath
link asinh
link acosh
link atanh
method found math strict math strictmath provid
fast math fastmath java virtual machin
link copi sign copysign
link expon getexpon
link nextaft
link nextup
link scalb
link copi sign copysign
link expon getexpon
link nextaft
link nextup
link scalb
version
fast math fastmath
comput hyperbol tangent number
param number evalu
hyperbol tangent
tanh
negat
tanh sinh cosh
exp exp exp exp
exp exp
magnitud sinh cosh precis
negat
result
prec hiprec
tanh exp exp
exp prec hiprec
prec hiprec prec hiprec
prec hiprec prec hiprec
numer
temp
temp
temp
denomin
temp
temp
temp
temp hex
daa temp temp
dab daa
ratio
ratio
temp ratio hex
ratioa ratio temp temp
ratiob ratio ratioa
correct round divis
ratiob daa ratioa daa ratiob dab ratioa dab ratiob
account
ratiob
account
ratiob
result ratioa ratiob
prec hiprec
tanh expm1 expm1
expm1 prec hiprec
prec hiprec prec hiprec
prec hiprec prec hiprec
numer
denomin
temp
temp
temp
temp hex
daa temp temp
dab daa
ratio
ratio
temp ratio hex
ratioa ratio temp temp
ratiob ratio ratioa
correct round divis
ratiob daa ratioa daa ratiob dab ratioa dab ratiob
account
ratiob
account
ratiob
result ratioa ratiob
negat
result result
result
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
539c1fec524b3f0477b5bf07fa1f4f40335a5c1e | 35832c97bff471aa55dfbdf1dee9d1effeb5cca7 | /善知堂android就业视频第三季游戏开发源代码/android3_10/gen/com/itszt/freethinker/ui/BuildConfig.java | 44cee6f5dc1f01023c1013f8985973a8a3932b53 | [] | no_license | salingers/Android | 6f3f0022ef0ba995936ec9285702e2eeba1b036f | 0cf1bd18cee770071cf76603995e297c4f48859a | refs/heads/master | 2021-01-11T15:56:52.429655 | 2017-01-23T20:35:24 | 2017-01-23T20:35:24 | 79,963,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | /** Automatically generated file. DO NOT MODIFY */
package com.itszt.freethinker.ui;
public final class BuildConfig {
public final static boolean DEBUG = true;
} | [
"salingersms@msn.com"
] | salingersms@msn.com |
d882cf379bdd3b604e755380955a8f0796be5545 | 76fb56478a30c95a4dd3db64ceb4cfafe6d53dda | /services/hrdb/src/com/auto_ifbaithanr/hrdb/service/DepartmentService.java | b59d73e5a6df94591b9fe26fa478081d3ebcea7e | [] | no_license | wavemakerapps/Auto_IfBaITHANR | 59236bd54b00780d26f3d9190c6d24b53abe9f70 | 67f45fb499c3904afccaf090c9aeadd70fe72200 | refs/heads/master | 2021-08-28T18:26:45.541690 | 2017-12-12T23:23:15 | 2017-12-12T23:23:15 | 114,049,187 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,726 | java | /*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved.
This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
with the terms of the source code license agreement you entered into with wavemaker.com*/
package com.auto_ifbaithanr.hrdb.service;
/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/
import java.util.Map;
import javax.validation.Valid;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.wavemaker.runtime.data.exception.EntityNotFoundException;
import com.wavemaker.runtime.data.export.ExportType;
import com.wavemaker.runtime.data.expression.QueryFilter;
import com.wavemaker.runtime.data.model.AggregationInfo;
import com.wavemaker.runtime.file.model.Downloadable;
import com.auto_ifbaithanr.hrdb.Department;
import com.auto_ifbaithanr.hrdb.Employee;
/**
* Service object for domain model class {@link Department}.
*/
public interface DepartmentService {
/**
* Creates a new Department. It does cascade insert for all the children in a single transaction.
*
* This method overrides the input field values using Server side or database managed properties defined on Department if any.
*
* @param department Details of the Department to be created; value cannot be null.
* @return The newly created Department.
*/
Department create(@Valid Department department);
/**
* Returns Department by given id if exists.
*
* @param departmentId The id of the Department to get; value cannot be null.
* @return Department associated with the given departmentId.
* @throws EntityNotFoundException If no Department is found.
*/
Department getById(Integer departmentId) throws EntityNotFoundException;
/**
* Find and return the Department by given id if exists, returns null otherwise.
*
* @param departmentId The id of the Department to get; value cannot be null.
* @return Department associated with the given departmentId.
*/
Department findById(Integer departmentId);
/**
* Find and return the Department for given deptCode if exists.
*
* @param deptCode value of deptCode; value cannot be null.
* @return Department associated with the given inputs.
* @throws EntityNotFoundException if no matching Department found.
*/
Department getByDeptCode(String deptCode)throws EntityNotFoundException;
/**
* Updates the details of an existing Department. It replaces all fields of the existing Department with the given department.
*
* This method overrides the input field values using Server side or database managed properties defined on Department if any.
*
* @param department The details of the Department to be updated; value cannot be null.
* @return The updated Department.
* @throws EntityNotFoundException if no Department is found with given input.
*/
Department update(@Valid Department department) throws EntityNotFoundException;
/**
* Deletes an existing Department with the given id.
*
* @param departmentId The id of the Department to be deleted; value cannot be null.
* @return The deleted Department.
* @throws EntityNotFoundException if no Department found with the given id.
*/
Department delete(Integer departmentId) throws EntityNotFoundException;
/**
* Find all Departments matching the given QueryFilter(s).
* All the QueryFilter(s) are ANDed to filter the results.
* This method returns Paginated results.
*
* @deprecated Use {@link #findAll(String, Pageable)} instead.
*
* @param queryFilters Array of queryFilters to filter the results; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null returns all matching records.
* @return Paginated list of matching Departments.
*
* @see QueryFilter
* @see Pageable
* @see Page
*/
@Deprecated
Page<Department> findAll(QueryFilter[] queryFilters, Pageable pageable);
/**
* Find all Departments matching the given input query. This method returns Paginated results.
* Note: Go through the documentation for <u>query</u> syntax.
*
* @param query The query to filter the results; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null returns all matching records.
* @return Paginated list of matching Departments.
*
* @see Pageable
* @see Page
*/
Page<Department> findAll(String query, Pageable pageable);
/**
* Exports all Departments matching the given input query to the given exportType format.
* Note: Go through the documentation for <u>query</u> syntax.
*
* @param exportType The format in which to export the data; value cannot be null.
* @param query The query to filter the results; No filters applied if the input is null/empty.
* @param pageable Details of the pagination information along with the sorting options. If null exports all matching records.
* @return The Downloadable file in given export type.
*
* @see Pageable
* @see ExportType
* @see Downloadable
*/
Downloadable export(ExportType exportType, String query, Pageable pageable);
/**
* Retrieve the count of the Departments in the repository with matching query.
* Note: Go through the documentation for <u>query</u> syntax.
*
* @param query query to filter results. No filters applied if the input is null/empty.
* @return The count of the Department.
*/
long count(String query);
/**
* Retrieve aggregated values with matching aggregation info.
*
* @param aggregationInfo info related to aggregations.
* @param pageable Details of the pagination information along with the sorting options. If null exports all matching records.
* @return Paginated data with included fields.
* @see AggregationInfo
* @see Pageable
* @see Page
*/
Page<Map<String, Object>> getAggregatedValues(AggregationInfo aggregationInfo, Pageable pageable);
/*
* Returns the associated employees for given Department id.
*
* @param deptId value of deptId; value cannot be null
* @param pageable Details of the pagination information along with the sorting options. If null returns all matching records.
* @return Paginated list of associated Employee instances.
*
* @see Pageable
* @see Page
*/
Page<Employee> findAssociatedEmployees(Integer deptId, Pageable pageable);
}
| [
"automate1@wavemaker.com"
] | automate1@wavemaker.com |
b2d3326cba5b0f58783fabbdc64332d88e1c5955 | 8f92c94f949b1da5f09ec37cfb6995925b0dd227 | /src/main/java/th/co/baiwa/buckwaframework/preferences/persistence/repository/GeoSectorRepository.java | 68e65fdce1f35929e1b8ff6fa8c98edfa94ed69f | [] | no_license | flame123flame/backend-springboot-ims | f36af2ed1797e1a0003f09067e31f1ce60d7fde7 | 4ee8a4e6f85e7f3f28976bdf6b4a314d1e54b20f | refs/heads/master | 2022-07-05T14:08:53.055975 | 2019-09-10T09:30:04 | 2019-09-10T09:30:04 | 207,516,525 | 0 | 1 | null | 2022-06-29T17:38:16 | 2019-09-10T09:22:01 | Java | UTF-8 | Java | false | false | 332 | java | package th.co.baiwa.buckwaframework.preferences.persistence.repository;
import th.co.baiwa.buckwaframework.common.persistence.repository.CommonJpaCrudRepository;
import th.co.baiwa.buckwaframework.preferences.persistence.entity.GeoSector;
public interface GeoSectorRepository extends CommonJpaCrudRepository<GeoSector, Long> {
}
| [
"flame.tana@gmail.com"
] | flame.tana@gmail.com |
a4e08493b08e095ab9c43ad0997bceca9253564c | a4a51084cfb715c7076c810520542af38a854868 | /src/main/java/com/airbnb/lottie/c/b/o.java | ed2fda088544a964a3429a221fe1e73c43d219b5 | [] | no_license | BharathPalanivelu/repotest | ddaf56a94eb52867408e0e769f35bef2d815da72 | f78ae38738d2ba6c9b9b4049f3092188fabb5b59 | refs/heads/master | 2020-09-30T18:55:04.802341 | 2019-12-02T10:52:08 | 2019-12-02T10:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 960 | java | package com.airbnb.lottie.c.b;
import com.airbnb.lottie.a.a.b;
import com.airbnb.lottie.a.a.p;
import com.airbnb.lottie.c.a.h;
import com.airbnb.lottie.c.c.a;
import com.airbnb.lottie.f;
public class o implements b {
/* renamed from: a reason: collision with root package name */
private final String f3584a;
/* renamed from: b reason: collision with root package name */
private final int f3585b;
/* renamed from: c reason: collision with root package name */
private final h f3586c;
public o(String str, int i, h hVar) {
this.f3584a = str;
this.f3585b = i;
this.f3586c = hVar;
}
public String a() {
return this.f3584a;
}
public h b() {
return this.f3586c;
}
public b a(f fVar, a aVar) {
return new p(fVar, aVar, this);
}
public String toString() {
return "ShapePath{name=" + this.f3584a + ", index=" + this.f3585b + '}';
}
}
| [
"noiz354@gmail.com"
] | noiz354@gmail.com |
74b7ee342344ce43f3d5e8fbe7eafc13e7add500 | 25ff5e17fcb08f66919b7cd6637f30a57a9edae0 | /src/com/guidebee/game/ui/drawable/SpriteDrawable.java | 9ccd05ecd7f038fbf93399a170513a140190a0bf | [] | no_license | guidebee/AndroidGameEngine | a2467c6aa28d0a7da15e520a4c77c41bd2304230 | 2cf24ef3ceb8898f24c363818ef5e0bdfeead2cb | refs/heads/master | 2020-12-28T04:38:36.626410 | 2015-10-17T12:53:06 | 2015-10-17T12:53:06 | 26,942,806 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,636 | java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
//--------------------------------- PACKAGE ------------------------------------
package com.guidebee.game.ui.drawable;
//--------------------------------- IMPORTS ------------------------------------
import com.guidebee.game.graphics.Batch;
import com.guidebee.game.graphics.Color;
import com.guidebee.game.graphics.Sprite;
//[------------------------------ MAIN CLASS ----------------------------------]
/**
* Drawable for a {@link com.guidebee.game.graphics.Sprite}.
*
* @author Nathan Sweet
*/
public class SpriteDrawable extends BaseDrawable implements TransformDrawable {
private Sprite sprite;
/**
* Creates an uninitialized SpriteDrawable. The sprite must be set before use.
*/
public SpriteDrawable() {
}
public SpriteDrawable(Sprite sprite) {
setSprite(sprite);
}
public SpriteDrawable(SpriteDrawable drawable) {
super(drawable);
setSprite(drawable.sprite);
}
public void draw(Batch batch, float x, float y, float width, float height) {
draw(batch, x, y, width / 2f, height / 2f, width, height, 1f, 1f, 0f);
}
public void draw(Batch batch, float x, float y, float originX, float originY,
float width, float height, float scaleX,
float scaleY, float rotation) {
sprite.setOrigin(originX, originY);
sprite.setRotation(rotation);
sprite.setScale(scaleX, scaleY);
sprite.setBounds(x, y, width, height);
Color color = sprite.getColor();
sprite.setColor(Color.tmp.set(color).mul(batch.getColor()));
sprite.draw(batch);
sprite.setColor(color);
}
public void setSprite(Sprite sprite) {
this.sprite = sprite;
setMinWidth(sprite.getWidth());
setMinHeight(sprite.getHeight());
}
public Sprite getSprite() {
return sprite;
}
}
| [
"james.shen@guidebee.com"
] | james.shen@guidebee.com |
895d35a0dcec8a74f835506c708d429e34039b2d | 1de67e55d65589b76bb2fcdd6da92610911f5690 | /SpringMVCApplication/src/java/section2/section5/Layout.java | 28d770da9667ceeca60395e4ddf62bbc240ae3c1 | [] | no_license | Kamurai/NetbeansRepository | 6305baf4640a68260d46c304a4559e6f66936b08 | 4a683a7ead302c44e0686d5a649b1a8617885ae0 | refs/heads/master | 2023-04-16T01:19:33.737268 | 2023-04-05T02:01:05 | 2023-04-05T02:01:05 | 101,127,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,932 | java | package section2.section5;
public class Layout extends master.Layout
{
public Layout(Custom custom)
{
super(custom);
}
public String Navigation(int level, int extension)
{
String Result = "";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Section1/Index'>Gynowars</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project2'>Assault</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project3'>Mars</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Section4/Index'>Renley</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Section5/Index'>Antarrea</a><br/><br/>";
Result += "<a class=\"navlinkB\" href='"+universal.GetPath(level)+"Section2/Section5/Section1/Index'>Global</a><br/><br/>";
Result += "<a class=\"navlinkB\" href='"+universal.GetPath(level)+"Section2/Section5/Section2/Index'>Grendol</a><br/><br/>";
Result += "<a class=\"navlinkB\" href='"+universal.GetPath(level)+"Section2/Section5/Section3/Index'>Utopia</a><br/><br/>";
Result += "<a class=\"navlinkB\" href='"+universal.GetPath(level)+"Section2/Section5/Section4/Index'>Elvia</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project6'>Truth</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project7'>Kingdoms</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project8'>Terminal World</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project9'>Monster Office Workplace</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project10'>Battle Princesses</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project11'>Sacred Offerings</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project12'>The Way</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project13'>Conspiratorium</a><br/><br/>";
Result += "<a class=\"navlinkA\" href='"+universal.GetPath(level)+"Section2/Project14'>Conversion</a><br/><br/>";
return Result;
}
public String WriteWebpage(int input, int level, int extension)
{
String Result = "";
Result += "<body id=\"idBody\">";
Result += "<table id=\"idTableMain\">";
Result += "<tr id=\"idHeaderRow\">";
Result += "<td id=\"idHeaderRowCenter\" colspan=\"3\">";
Result += universal.TitlePicture(level);
Result += "</td>";
Result += "</tr>";
Result += "<tr id=\"idNavigationRow\">";
Result += "<td id=\"idNavigationBar\" colspan=\"3\">";
Result += universal.NavBar(level, extension);
Result += "</td>";
Result += "</tr>";
Result += "<tr id=\"idCenterRow\">";
Result += "<td id=\"idCenterRowLeft\">";
Result += "<h4>";
Result += "Navigation";
Result += "</h4>";
Result += Navigation(level, extension);
Result += "</td>";
Result += "<td id=\"idCenterRowMain\">";
Result += custom.Title(input);
Result += custom.Header(input);
Result += custom.Content(input);
Result += "</td>";
Result += "<td id=\"idCenterRowRight\">";
Result += "<h4>";
Result += "Information";
Result += "</h4>";
Result += universal.Information();
Result += custom.Versions(input);
Result += "</td>";
Result += "</tr>";
Result += "<tr id=\"idFooterRow\">";
Result += "<td id=\"idFooterMain\" colspan=\"3\">";
Result += "<p id=\"idFooterContent\">";
Result += universal.Footer();
Result += "</p>";
Result += "<p id=\"idFooterContent\">";
Result += universal.WebMaster();
Result += "</p>";
Result += "</td>";
Result += "</tr>";
Result += "</table>";
Result += "</body>";
return Result;
}
}
| [
"KamuraiBlue25@gmail.com"
] | KamuraiBlue25@gmail.com |
e7acf2c29c0c8ffa57d1a5e5109d222377547f6d | 858a32a537520a11aa69c552af5d4dedafd2e0fc | /app/src/main/java/com/cniao/ui/fragment/BaseAppInfoFragment.java | 32fbe9d4dcfc4c9f05cfdec40a702d7a278b52b8 | [] | no_license | xxchenqi/Cniao | ecfd66e10f03993cf0ef0991c5270aff6ebf9908 | 6688d56238e686d4e086fab27136e06fe18ee73a | refs/heads/master | 2021-01-25T04:58:22.641383 | 2017-12-19T15:12:35 | 2017-12-19T15:12:35 | 93,492,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,960 | java | package com.cniao.ui.fragment;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemClickListener;
import com.cniao.R;
import com.cniao.bean.AppInfo;
import com.cniao.bean.PageBean;
import com.cniao.di.component.AppComponent;
import com.cniao.presenter.AppInfoPresenter;
import com.cniao.presenter.contract.AppInfoContract;
import com.cniao.ui.activity.AppDetailActivity;
import com.cniao.ui.adapter.AppInfoAdapter;
import com.cniao.ui.widget.DividerItemDecoration;
import javax.inject.Inject;
import butterknife.BindView;
import zlc.season.rxdownload2.RxDownload;
/**
* Created by chenqi on 2017/9/18.
*/
public abstract class BaseAppInfoFragment extends ProgressFragment<AppInfoPresenter> implements
AppInfoContract.AppInfoView, BaseQuickAdapter.RequestLoadMoreListener {
@BindView(R.id.recycler_view)
RecyclerView mRecyclerView;
@Inject
RxDownload mRxDownload;
int page = 0;
protected AppInfoAdapter mAdapter;
@Override
public void init() {
mPresenter.requestData(type(), page);
initRecyclerView();
}
protected void initRecyclerView() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
DividerItemDecoration itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST);
mRecyclerView.addItemDecoration(itemDecoration);
mAdapter = buildAdapter();
mAdapter.setOnLoadMoreListener(this);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.addOnItemTouchListener(new OnItemClickListener() {
@Override
public void onSimpleItemClick(BaseQuickAdapter adapter, View view, int position) {
AppInfo appInfo = mAdapter.getItem(position);
mApplication.setView(view);
Intent intent = new Intent(getActivity(), AppDetailActivity.class);
intent.putExtra("appinfo",appInfo);
startActivity(intent);
}
});
}
abstract int type();
abstract AppInfoAdapter buildAdapter();
@Override
public int setLayout() {
return R.layout.template_recycle_view;
}
@Override
public void setupActivityComponent(AppComponent appComponent) {
}
@Override
public void showResult(PageBean<AppInfo> appInfoPageBean) {
mAdapter.addData(appInfoPageBean.getDatas());
if (appInfoPageBean.isHasMore()) {
page++;
}
mAdapter.setEnableLoadMore(appInfoPageBean.isHasMore());
}
@Override
public void onLoadMoreComplete() {
mAdapter.loadMoreComplete();
}
@Override
public void onLoadMoreRequested() {
mPresenter.requestData(type(), page);
}
}
| [
"812046652@qq.com"
] | 812046652@qq.com |
8ac0cdaec3764e2e16255a15a182aaa5cdd44f30 | fee80e730c0a9d2ede2721d4441970bafaaaa646 | /src/org/ace/insurance/report/farmer/FarmerDailyReport.java | 3767a0d0075d621c0c3fcbbb7cbb0d5d36352ec0 | [] | no_license | LifeTeam-TAT/GGLI-Core | 242360ba9a6dd7cb3841fa495f9124a327df8450 | d000f3068b863a581775f5cd7b78b2bfd06b378f | refs/heads/master | 2023-03-29T06:26:44.456523 | 2021-04-02T15:03:18 | 2021-04-02T15:03:18 | 354,049,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,895 | java | package org.ace.insurance.report.farmer;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;
import org.ace.insurance.common.ISorter;
public class FarmerDailyReport implements ISorter {
private static final long serialVersionUID = 288430480510991981L;
private String id;
private String policyNo;
private String groupFarmerProposalNo;
private String insuredPersonName;
private String fullIdNo;
private String address;
private List<FarmerBeneficiaryReportDTO> beneficiaryList = new ArrayList<FarmerBeneficiaryReportDTO>();
private Date activedPolicyStartDate;
private double sumInsured;
private double premium;
private String agentName;
private String remark;
private String proposalNo;
private String salepoint;
private String branch;
// For Beneficiary Data
private StringTokenizer st1;
private StringTokenizer st2;
private List<String> nameList = new ArrayList<String>();
private List<String> fullIdNoList = new ArrayList<String>();
private List<String> addressList = new ArrayList<String>();
private String[] dataArray = new String[3];
private final String PERSON_DELIMITER = "#";
private final String DATA_DELIMITER = "$^";
public FarmerDailyReport() {
}
public FarmerDailyReport(FarmerDailyReportView view) {
id = view.getId();
policyNo = view.getPolicyNo();
groupFarmerProposalNo = view.getGroupFarmerProposalNo();
proposalNo = view.getProposalNo();
insuredPersonName = view.getInsuredPersonName();
fullIdNo = view.getFullIdNo();
address = view.getAddress();
/* Set Beneficiary Data */
if (null != view.getBeneficiaryInfo()) {
setBeneficiaryData(view.getBeneficiaryInfo());
}
activedPolicyStartDate = view.getActivedPolicyStartDate();
sumInsured = view.getSumInsured();
premium = view.getPremium();
agentName = view.getAgentName();
remark = view.getRemark();
salepoint = view.getSalePointName();
branch = view.getBranchName();
}
private void setBeneficiaryData(String beneficiaryInfo) {
st1 = new StringTokenizer(beneficiaryInfo, PERSON_DELIMITER);
while (st1.hasMoreTokens()) {
st2 = new StringTokenizer(st1.nextToken(), DATA_DELIMITER);
int i = 0;
while (st2.hasMoreTokens()) {
dataArray[i] = st2.nextToken();
i++;
}
beneficiaryList.add(new FarmerBeneficiaryReportDTO(dataArray[0], dataArray[1], dataArray[2]));
nameList.add(dataArray[0]);
fullIdNoList.add(dataArray[1]);
addressList.add(dataArray[2]);
}
}
public String getId() {
return id;
}
public String getPolicyNo() {
return policyNo;
}
public String getInsuredPersonName() {
return insuredPersonName;
}
public String getFullIdNo() {
return fullIdNo;
}
public String getAddress() {
return address;
}
public List<FarmerBeneficiaryReportDTO> getBeneficiaryList() {
return beneficiaryList;
}
public List<String> getNameList() {
return nameList;
}
public List<String> getFullIdNoList() {
return fullIdNoList;
}
public List<String> getAddressList() {
return addressList;
}
public Date getActivedPolicyStartDate() {
return activedPolicyStartDate;
}
public double getSumInsured() {
return sumInsured;
}
public double getPremium() {
return premium;
}
public String getAgentName() {
return agentName;
}
public String getRemark() {
return remark;
}
public String getGroupFarmerProposalNo() {
return groupFarmerProposalNo;
}
public String getProposalNo() {
return proposalNo;
}
public void setProposalNo(String proposalNo) {
this.proposalNo = proposalNo;
}
@Override
public String getRegistrationNo() {
return policyNo;
}
public String getSalepoint() {
return salepoint;
}
public void setSalepoint(String salepoint) {
this.salepoint = salepoint;
}
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
}
| [
"lifeteam.tat@gmail.com"
] | lifeteam.tat@gmail.com |
3257f8ae6c58e1d63742250d0d0b1e9c660f18e5 | 83954d3f263f2e735888ac0dd7f495be8ff6270e | /src/test/java/org/oddjob/state/StateExchangeTest.java | 0007e75a688542a269132daa2f28ad8b03fddf02 | [
"BSD-2-Clause",
"Apache-2.0"
] | permissive | robjg/oddjob | d8e4d6a68d21751e0bba6dbc5ef307d69a18e366 | 61c1e0980830c430be00210ab1a7b9d77a3aa8c4 | refs/heads/master | 2023-07-05T20:37:22.644093 | 2023-07-04T06:29:28 | 2023-07-04T06:29:28 | 1,803,653 | 20 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,634 | java | package org.oddjob.state;
import org.junit.Test;
import org.oddjob.MockStateful;
import org.oddjob.OjTestCase;
public class StateExchangeTest extends OjTestCase {
private static class OurStateful extends MockStateful {
StateListener listener;
public void addStateListener(StateListener listener) {
assertNull(this.listener);
this.listener = listener;
}
public void removeStateListener(StateListener listener) {
assertEquals(this.listener, listener);
this.listener = null;
}
}
private static class OurChanger extends MockStateChanger {
ParentState state;
@Override
public void setState(ParentState state, StateInstant date) {
this.state = state;
}
}
/**
* Destroyed not passed on. Should it be?
*/
@Test
public void testDestroyedState() {
OurStateful stateful = new OurStateful();
OurChanger changer = new OurChanger();
StateExchange<ParentState> test =
new StateExchange<>(stateful, changer);
assertNull(stateful.listener);
test.start();
assertNotNull(stateful.listener);
assertNull(changer.state);
stateful.listener.jobStateChange(StateEvent.now(stateful, ParentState.COMPLETE));
assertEquals(ParentState.COMPLETE, changer.state);
try {
stateful.listener.jobStateChange(StateEvent.now(stateful, ParentState.DESTROYED));
fail("Should throw an Exception.");
}
catch (IllegalStateException e) {
// expected.
}
assertEquals(ParentState.COMPLETE, changer.state);
test.stop();
assertNull(stateful.listener);
}
}
| [
"rob@rgordon.co.uk"
] | rob@rgordon.co.uk |
1c6d90a8825e0bc822048b30a37a984984f1b182 | 1b599e3a9adee5dd8af011fdf82972824562a872 | /sa_center/sacenter-parent/sacenter-core/src/main/java/com/ai/sacenter/base/competence/bo/SAComponent.java | b022a217a5425b15077643b08e35105da8514663 | [] | no_license | mtbdc-dy/zhongds01 | e1381d44b0562d576cfdff6b7a5fb7297990a2a4 | ceb5e90d468add16d982f3eb10d5503a7a5c1cea | refs/heads/master | 2020-07-07T10:30:32.012016 | 2019-08-07T08:18:08 | 2019-08-07T08:18:08 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 7,266 | java | package com.ai.sacenter.base.competence.bo;
import java.sql.*;
import com.ai.appframe2.bo.DataContainer;
import com.ai.appframe2.common.DataContainerInterface;
import com.ai.appframe2.common.AIException;
import com.ai.appframe2.common.ServiceManager;
import com.ai.appframe2.common.ObjectType;
import com.ai.appframe2.common.DataType;
public class SAComponent extends DataContainer implements DataContainerInterface, ISAComponent {
private static final long serialVersionUID = -7296129176296212056L;
private static String m_boName = "com.ai.sacenter.base.competence.bo.SAComponent";
public final static String S_State = "STATE";
public final static String S_Name = "NAME";
public final static String S_Description = "DESCRIPTION";
public final static String S_Control = "CONTROL";
public final static String S_Implclass = "IMPLCLASS";
public final static String S_ModifyDate = "MODIFY_DATE";
public final static String S_Category = "CATEGORY";
public final static String S_Complex = "COMPLEX";
public final static String S_Creater = "CREATER";
public final static String S_Id = "ID";
public final static String S_CreateDate = "CREATE_DATE";
public final static String S_Modifier = "MODIFIER";
public final static String S_SortBy = "SORT_BY";
public static ObjectType S_TYPE = null;
static {
try {
S_TYPE = ServiceManager.getObjectTypeFactory()
.getInstance(m_boName);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public SAComponent() throws AIException {
super(S_TYPE);
}
public static ObjectType getObjectTypeStatic() throws AIException {
return S_TYPE;
}
public void setObjectType(ObjectType value) throws AIException {
// 此种数据容器不能重置业务对象类型
throw new AIException("Cannot reset ObjectType");
}
public void initState(String value) {
this.initProperty(S_State, value);
}
public void setState(String value) {
this.set(S_State, value);
}
public void setStateNull() {
this.set(S_State, null);
}
public String getState() {
return DataType.getAsString(this.get(S_State));
}
public String getStateInitialValue() {
return DataType.getAsString(this.getOldObj(S_State));
}
public void initName(String value) {
this.initProperty(S_Name, value);
}
public void setName(String value) {
this.set(S_Name, value);
}
public void setNameNull() {
this.set(S_Name, null);
}
public String getName() {
return DataType.getAsString(this.get(S_Name));
}
public String getNameInitialValue() {
return DataType.getAsString(this.getOldObj(S_Name));
}
public void initDescription(String value) {
this.initProperty(S_Description, value);
}
public void setDescription(String value) {
this.set(S_Description, value);
}
public void setDescriptionNull() {
this.set(S_Description, null);
}
public String getDescription() {
return DataType.getAsString(this.get(S_Description));
}
public String getDescriptionInitialValue() {
return DataType.getAsString(this.getOldObj(S_Description));
}
public void initControl(String value) {
this.initProperty(S_Control, value);
}
public void setControl(String value) {
this.set(S_Control, value);
}
public void setControlNull() {
this.set(S_Control, null);
}
public String getControl() {
return DataType.getAsString(this.get(S_Control));
}
public String getControlInitialValue() {
return DataType.getAsString(this.getOldObj(S_Control));
}
public void initImplclass(String value) {
this.initProperty(S_Implclass, value);
}
public void setImplclass(String value) {
this.set(S_Implclass, value);
}
public void setImplclassNull() {
this.set(S_Implclass, null);
}
public String getImplclass() {
return DataType.getAsString(this.get(S_Implclass));
}
public String getImplclassInitialValue() {
return DataType.getAsString(this.getOldObj(S_Implclass));
}
public void initModifyDate(Timestamp value) {
this.initProperty(S_ModifyDate, value);
}
public void setModifyDate(Timestamp value) {
this.set(S_ModifyDate, value);
}
public void setModifyDateNull() {
this.set(S_ModifyDate, null);
}
public Timestamp getModifyDate() {
return DataType.getAsDateTime(this.get(S_ModifyDate));
}
public Timestamp getModifyDateInitialValue() {
return DataType.getAsDateTime(this.getOldObj(S_ModifyDate));
}
public void initCategory(String value) {
this.initProperty(S_Category, value);
}
public void setCategory(String value) {
this.set(S_Category, value);
}
public void setCategoryNull() {
this.set(S_Category, null);
}
public String getCategory() {
return DataType.getAsString(this.get(S_Category));
}
public String getCategoryInitialValue() {
return DataType.getAsString(this.getOldObj(S_Category));
}
public void initComplex(String value) {
this.initProperty(S_Complex, value);
}
public void setComplex(String value) {
this.set(S_Complex, value);
}
public void setComplexNull() {
this.set(S_Complex, null);
}
public String getComplex() {
return DataType.getAsString(this.get(S_Complex));
}
public String getComplexInitialValue() {
return DataType.getAsString(this.getOldObj(S_Complex));
}
public void initCreater(long value) {
this.initProperty(S_Creater, new Long(value));
}
public void setCreater(long value) {
this.set(S_Creater, new Long(value));
}
public void setCreaterNull() {
this.set(S_Creater, null);
}
public long getCreater() {
return DataType.getAsLong(this.get(S_Creater));
}
public long getCreaterInitialValue() {
return DataType.getAsLong(this.getOldObj(S_Creater));
}
public void initId(String value) {
this.initProperty(S_Id, value);
}
public void setId(String value) {
this.set(S_Id, value);
}
public void setIdNull() {
this.set(S_Id, null);
}
public String getId() {
return DataType.getAsString(this.get(S_Id));
}
public String getIdInitialValue() {
return DataType.getAsString(this.getOldObj(S_Id));
}
public void initCreateDate(Timestamp value) {
this.initProperty(S_CreateDate, value);
}
public void setCreateDate(Timestamp value) {
this.set(S_CreateDate, value);
}
public void setCreateDateNull() {
this.set(S_CreateDate, null);
}
public Timestamp getCreateDate() {
return DataType.getAsDateTime(this.get(S_CreateDate));
}
public Timestamp getCreateDateInitialValue() {
return DataType.getAsDateTime(this.getOldObj(S_CreateDate));
}
public void initModifier(long value) {
this.initProperty(S_Modifier, new Long(value));
}
public void setModifier(long value) {
this.set(S_Modifier, new Long(value));
}
public void setModifierNull() {
this.set(S_Modifier, null);
}
public long getModifier() {
return DataType.getAsLong(this.get(S_Modifier));
}
public long getModifierInitialValue() {
return DataType.getAsLong(this.getOldObj(S_Modifier));
}
public void initSortBy(int value) {
this.initProperty(S_SortBy, new Integer(value));
}
public void setSortBy(int value) {
this.set(S_SortBy, new Integer(value));
}
public void setSortByNull() {
this.set(S_SortBy, null);
}
public int getSortBy() {
return DataType.getAsInt(this.get(S_SortBy));
}
public int getSortByInitialValue() {
return DataType.getAsInt(this.getOldObj(S_SortBy));
}
}
| [
"1246696804@qq.com"
] | 1246696804@qq.com |
9579552d2670098570cffe97e72bf248e0840897 | 9b64cc2bcc89c7c7aa692d04afcd9cb1edb4d6f2 | /src/main/java/com/bizseer/auth/util/http/JsonResponse.java | 1864a57ca3606660c4f73645f1617b760cd0a58a | [] | no_license | AthyLau/auth | a44d4c52eda572120582c868ec73227890c16a87 | ac892dab944a63792e6fcb4d8baa443479fda367 | refs/heads/master | 2021-06-16T19:43:00.003405 | 2019-09-06T08:18:44 | 2019-09-06T08:18:44 | 201,379,323 | 0 | 0 | null | 2021-04-26T19:42:54 | 2019-08-09T03:08:55 | Java | UTF-8 | Java | false | false | 2,624 | java | package com.bizseer.auth.util.http;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Setter;
import lombok.ToString;
import org.springframework.http.HttpStatus;
/**
* Created by chengshiwen on 2017/9/23.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@ToString
@Setter
public class JsonResponse {
private int code;
private String msg;
private Object data;
public static final JsonResponse SUCCESS = new JsonResponse();
public static final JsonResponse BAD_REQUEST = new JsonResponse(HttpStatus.BAD_REQUEST);
public static final JsonResponse NOT_FOUND = new JsonResponse(HttpStatus.NOT_FOUND);
public static final JsonResponse UNAUTHORIZED = new JsonResponse(HttpStatus.UNAUTHORIZED);
public static final JsonResponse NO_CONTENT = new JsonResponse(HttpStatus.NO_CONTENT);
private static final String PERSIST_ERROR_MESSAGE = "persistError";
public JsonResponse() {
this.code = HttpStatus.OK.value();
this.msg = HttpStatus.OK.getReasonPhrase();
}
public JsonResponse(Object data) {
this.code = HttpStatus.OK.value();
this.msg = HttpStatus.OK.getReasonPhrase();
this.data = data;
}
public JsonResponse(HttpStatus httpStatus) {
this.code = httpStatus.value();
this.msg = httpStatus.getReasonPhrase();
}
public JsonResponse(HttpStatus httpStatus, Object data) {
this.code = httpStatus.value();
this.msg = httpStatus.getReasonPhrase();
this.data = data;
}
public JsonResponse(HttpStatus httpStatus, String msg) {
this.code = httpStatus.value();
this.msg = msg;
}
public JsonResponse(int code, String msg) {
this.code = code;
this.msg = msg;
}
public JsonResponse(int code, String msg, Object data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public static JsonResponse success() {
return SUCCESS;
}
public static JsonResponse success(Object object) {
return new JsonResponse(HttpStatus.OK, object);
}
public static JsonResponse accepted(Object object) {
return new JsonResponse(HttpStatus.ACCEPTED, object);
}
public static JsonResponse error(HttpStatus httpStatus) {
return new JsonResponse(httpStatus);
}
public static JsonResponse persistError() {
return new JsonResponse(200, PERSIST_ERROR_MESSAGE);
}
public int getCode() {
return code;
}
public String getMsg() {
return msg;
}
public Object getData() {
return data;
}
}
| [
"1015141113@qq.com"
] | 1015141113@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.