blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2
values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 132
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 9.45M | extension stringclasses 28
values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
da24ecc429c122aea0c844ae340e027696d06e62 | f0438bcc4323d5d3893ab72c01cbb34eca34740c | /flow-server-v1/src/main/java/com/jflop/server/feature/FeatureManager.java | d22edc2efaa4728dbff44ebb9def086024cd0c7f | [] | no_license | artem-spector/flow-server | 0321bcb01bdfb8907ad43b42dda45ea5426ac4f1 | d53fcace93d8e08f74e17f1013e4e2f25ae6a090 | refs/heads/master | 2020-05-21T19:01:41.181466 | 2017-09-09T16:20:25 | 2017-09-09T16:20:25 | 62,444,053 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,090 | java | package com.jflop.server.feature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
/**
* TODO: Document!
*
* @author artem
* Date: 9/11/16
*/
@Component
public class FeatureManager {
private Map<String, AgentFeature> allFeatures = new HashMap<>();
private String[] defaultFeatures;
@Autowired
public void setFeatures(Collection<AgentFeature> features) {
List<String> defaultFeatures = new ArrayList<>();
for (AgentFeature feature : features) {
allFeatures.put(feature.featureId, feature);
defaultFeatures.add(feature.featureId);
}
this.defaultFeatures = defaultFeatures.toArray(new String[defaultFeatures.size()]);
}
public AgentFeature getFeature(String featureId) {
AgentFeature res = allFeatures.get(featureId);
if (res == null) throw new RuntimeException("Invalid feature ID");
return res;
}
public String[] getDefaultFeatures() {
return defaultFeatures;
}
}
| [
"artem_spector@yahoo.com"
] | artem_spector@yahoo.com |
612cc02fe9b8cbc4ed65fd2fde68e93d4936ae5a | b029d0d3a83d473da17608cb0ecd2222c2098850 | /src/main/java/com/panditg/demo/service/impl/BookingService.java | 2c86bf53daf531cd2f7f0a11533b739d0cf493f5 | [] | no_license | VishwajeetLatpate/spring-panditg | 51fed0cd4ab79104c05aba2f681fb67a2193c8ec | cdac87fdfe94f4d4c1660faaab34a64832245f0d | refs/heads/master | 2023-03-05T23:16:57.229175 | 2021-01-31T04:01:24 | 2021-02-21T08:58:05 | 328,345,400 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,230 | java | package com.panditg.demo.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.panditg.demo.dao.BookingDao;
import com.panditg.demo.dao.PanditDao;
import com.panditg.demo.dao.VidhiDao;
import com.panditg.demo.dao.VidhiPanditDao;
import com.panditg.demo.entities.Pandit;
import com.panditg.demo.entities.Vidhi;
import com.panditg.demo.model.BookedPandit;
import com.panditg.demo.model.BookingInfoModel;
import com.panditg.demo.model.VidhiPanditModel;
@Service
public class BookingService {
@Autowired
private BookingDao bookingDao;
@Autowired
private VidhiPanditDao vidhiPanditDao;
@Autowired
private PanditDao panditDao;
@Autowired
private VidhiDao vidhiDao;
public int bookPandit(final BookingInfoModel bookingInfo) {
return bookingDao.postBookPandit(bookingInfo);
}
public List<BookedPandit> getBooking(long clientId) {
final List<BookedPandit> bookedPandits = new ArrayList<>();
// Get all bookings related to given client id
List<BookingInfoModel> bookings = this.bookingDao.getBookingsByClientId(clientId);
for (final BookingInfoModel bookingInfoModel : bookings) {
// Get dakshina, pandit_id, vidhi_id from vidhi_pandit_id
final VidhiPanditModel vidhiPandit = this.vidhiPanditDao
.getVidhiPandit(bookingInfoModel.getVidhiPanditId());
// Get pandit from pandit_id
final Pandit pandit = this.panditDao.findById(vidhiPandit.getPanditId()).get();
// Get vidhi from vidhi_id
final Vidhi vidhi = this.vidhiDao.findById(vidhiPandit.getVidhiId()).get();
final BookedPandit bookedPandit = new BookedPandit();
bookedPandit.setBookingId(bookingInfoModel.getBookingId());
bookedPandit.setDate(bookingInfoModel.getDate());
bookedPandit.setVidhiPanditId(vidhiPandit.getId());
bookedPandit.setDakshina(vidhiPandit.getDakshina());
bookedPandit.setPanditId(pandit.getId());
bookedPandit.setPanditName(pandit.getFirstName() + " " + pandit.getLastName());
bookedPandit.setVidhiId(vidhi.getId());
bookedPandit.setVidhiName(vidhi.getName());
bookedPandits.add(bookedPandit);
}
return bookedPandits;
}
}
| [
"vlatpate@gmail.com"
] | vlatpate@gmail.com |
34e283688551add4f06690757c84312567328c69 | 8727b1cbb8ca63d30340e8482277307267635d81 | /PolarServer/src/com/game/fight/structs/ResultType.java | fa84d92c5a702d3414de623cfa59ec0d1e6973ff | [] | no_license | taohyson/Polar | 50026903ded017586eac21a7905b0f1c6b160032 | b0617f973fd3866bed62da14f63309eee56f6007 | refs/heads/master | 2021-05-08T12:22:18.884688 | 2015-12-11T01:44:18 | 2015-12-11T01:44:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | package com.game.fight.structs;
/**
* 战斗结果枚举
* @author heyang
*
*/
public enum ResultType {
//未命中
MISS (1),
//暴击
LUCK (2),
//无效
NULLITY (3),
;
private int value;
private ResultType(int value){
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
}
| [
"zhuyuanbiao@ZHUYUANBIAO.rd.com"
] | zhuyuanbiao@ZHUYUANBIAO.rd.com |
5e1dc3b2abdfac65304b79e3fcf92207dca78773 | e4aeeb6559438ce9031a4ce0a81d6123f58b3976 | /goals/src/main/java/com/deeaae/legilimens/goals/model/Milestones.java | 1bccd39f6bfcb52ff9339f90ca51677d09ecb6c4 | [] | no_license | Anunay-Sinha/Legilimens | 8d4f1684a2bec64d40779d037b49f0f07a59e0e9 | befb0feaa76a7605f678fc89ddfbd2458440e5f7 | refs/heads/main | 2022-12-26T19:47:17.549794 | 2020-10-10T19:54:17 | 2020-10-10T19:54:17 | 300,338,411 | 0 | 0 | null | 2020-10-10T19:54:18 | 2020-10-01T16:00:57 | Java | UTF-8 | Java | false | false | 151 | java | package com.deeaae.legilimens.goals.model;
import java.util.List;
import lombok.Data;
@Data
public class Milestones {
List<String> milestones;
}
| [
"anunay@sinha.in"
] | anunay@sinha.in |
0d109733d4ea466fde995953fe58ff6d266ebf8f | 02533ed4e8c8e15d4b60d9804a57a29c8c82825b | /sid/rpc/src/main/java/com/hq/sid/dubbo/impl/MerchantRPCServiceImpl.java | 164c64ce8a5b4f3b8dce933846597e04e33833db | [] | no_license | douglashu/hq-forecast | 804449d11c5e39f0cfa110214b6431d1d7ac8e23 | 7aa8d9c459d4aa1e62ed3827e1f951773ac249a9 | refs/heads/master | 2021-06-15T15:19:14.566905 | 2017-04-12T07:54:17 | 2017-04-12T07:54:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,940 | java | package com.hq.sid.dubbo.impl;
import com.alibaba.dubbo.common.json.JSON;
import com.alibaba.dubbo.common.json.ParseException;
import com.alibaba.dubbo.config.annotation.Service;
import com.alipay.api.request.AlipayOpenAuthTokenAppRequest;
import com.alipay.api.response.AlipayOpenAuthTokenAppResponse;
import com.github.pagehelper.PageInfo;
import com.hq.scrati.common.exception.BusinessException;
import com.hq.scrati.common.exception.HqBaseException;
import com.hq.scrati.common.exception.ParamException;
import com.hq.scrati.common.log.Logger;
import com.hq.scrati.common.util.BeanUtils;
import com.hq.scrati.common.util.StringUtils;
import com.hq.scrati.model.HqRequest;
import com.hq.sid.alipay.gateway.service.MerchantSettledService;
import com.hq.sid.dao.generate.TSidMercAliauthMapper;
import com.hq.sid.dubbo.MerchantRPCService;
import com.hq.sid.entity.generate.TSidMercAliauth;
import com.hq.sid.service.MercService;
import com.hq.sid.service.OpertorService;
import com.hq.sid.service.entity.request.*;
import com.hq.sid.service.entity.response.AliAuthResp;
import com.hq.sid.service.entity.response.MercResp;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
/**
* Created by Zale on 2016/12/30.
*/
@Service(version = "1.0",interfaceClass = MerchantRPCService.class)
public class MerchantRPCServiceImpl implements MerchantRPCService {
private Logger logger = Logger.getLogger();
@Autowired
private MercService mercService;
@Autowired
private OpertorService opertorService;
@Autowired
private MerchantSettledService merchantSettledService;
@Autowired
private TSidMercAliauthMapper tSidMercAliauthMapper;
@Override
public MercResp mercRegister(HqRequest hqRequest) {
try {
MercReq req = JSON.parse(hqRequest.getBizContent(), MercReq.class);
req.setOperId(hqRequest.getUserId());
OperSearchReq operReq = new OperSearchReq();
operReq.setId(Integer.valueOf(hqRequest.getUserId()));
if(req.getCoreId()==null&& com.hq.scrati.common.util.StringUtils.isBlank(req.getMercId())){
return mercService.createMerc(req);
}else{
mercService.uptMerc(req);
MercResp resp = new MercResp();
BeanUtils.copyProperties(req,resp);
return resp;
}
} catch (ParseException e) {
logger.error(e);
throw new BusinessException("商户进件失败");
} catch (HqBaseException e) {
logger.error(e);
throw e;
}
catch (Exception e) {
logger.error(e);
throw new BusinessException("商户进件失败");
}
}
@Override
public AliAuthResp exchangeAliAuthToken(HqRequest hqRequest) {
try {
ExchangeTokenReq req = JSON.parse(hqRequest.getBizContent(), ExchangeTokenReq.class);
if(StringUtils.isBlank(req.getAuth_code())|| req.getCore_id()==null){
throw new ParamException("参数不正确");
}
AlipayOpenAuthTokenAppRequest request = new AlipayOpenAuthTokenAppRequest();
request.setBizContent("{" +
" \"grant_type\":\"authorization_code\"," +
" \"code\":\"" +req.getAuth_code()+"\""+
" }");
AlipayOpenAuthTokenAppResponse aliResp = merchantSettledService.alipayOpenAuthToken(request);
if("10000".equals(aliResp.getCode())) {
TSidMercAliauth tSidMercAliauth = tSidMercAliauthMapper.selectByPrimaryKey(req.getCore_id());
if (tSidMercAliauth == null) {
tSidMercAliauth = new TSidMercAliauth();
}
tSidMercAliauth.setAppAuthToken(aliResp.getAppAuthToken());
tSidMercAliauth.setAppRefreshToken(aliResp.getAppRefreshToken());
tSidMercAliauth.setUserId(aliResp.getUserId());
tSidMercAliauth.setAuthAppId(aliResp.getAuthAppId());
if(aliResp.getExpiresIn()!=null) {
tSidMercAliauth.setExpDate(new DateTime().plusSeconds(Integer.parseInt(aliResp.getExpiresIn())).toDate());
}
if(aliResp.getReExpiresIn()!=null) {
tSidMercAliauth.setReExpDate(new DateTime().plusSeconds(Integer.parseInt(aliResp.getReExpiresIn())).toDate());
}
if (tSidMercAliauth.getCoreId() == null) {
tSidMercAliauth.setCoreId(req.getCore_id());
tSidMercAliauthMapper.insert(tSidMercAliauth);
} else {
tSidMercAliauthMapper.updateByPrimaryKeySelective(tSidMercAliauth);
}
AliAuthResp resp = new AliAuthResp();
resp.setCoreId(tSidMercAliauth.getCoreId());
resp.setAuthToken(aliResp.getAppAuthToken());
return resp;
}else{
throw new BusinessException(aliResp.getCode(),aliResp.getSubCode()+"-"+aliResp.getSubMsg());
}
} catch (ParseException e) {
logger.error(e);
throw new BusinessException("交换商户token失败"+hqRequest);
}
}
@Override
public AliAuthResp refreshAliAuthToken(HqRequest hqRequest) {
try {
RefreshTokenReq req = JSON.parse(hqRequest.getBizContent(), RefreshTokenReq.class);
TSidMercAliauth tSidMercAliauth = tSidMercAliauthMapper.selectByPrimaryKey(req.getCoreId());
if(tSidMercAliauth == null|| StringUtils.isBlank(tSidMercAliauth.getAppRefreshToken())){
throw new BusinessException("无此商户授权信息"+hqRequest);
}
AlipayOpenAuthTokenAppRequest request = new AlipayOpenAuthTokenAppRequest();
request.setBizContent("{" +
" \"grant_type\":\"authorization_code\"," +
" \"refresh_token\":\"" +tSidMercAliauth.getAppRefreshToken()+"\""+
" }");
AlipayOpenAuthTokenAppResponse aliResp = merchantSettledService.alipayOpenAuthToken(request);
if("10000".equals(aliResp.getCode())) {
tSidMercAliauth.setAppAuthToken(aliResp.getAppAuthToken());
tSidMercAliauth.setAppRefreshToken(aliResp.getAppRefreshToken());
tSidMercAliauth.setUserId(aliResp.getUserId());
tSidMercAliauth.setAuthAppId(aliResp.getAuthAppId());
if(aliResp.getExpiresIn()!=null) {
tSidMercAliauth.setExpDate(new DateTime().plusSeconds(Integer.parseInt(aliResp.getExpiresIn())).toDate());
}
if(aliResp.getReExpiresIn()!=null) {
tSidMercAliauth.setReExpDate(new DateTime().plusSeconds(Integer.parseInt(aliResp.getReExpiresIn())).toDate());
}
tSidMercAliauthMapper.updateByPrimaryKeySelective(tSidMercAliauth);
AliAuthResp resp = new AliAuthResp();
resp.setCoreId(tSidMercAliauth.getCoreId());
resp.setAuthToken(aliResp.getAppAuthToken());
return resp;
}else{
throw new BusinessException(aliResp.getCode(),aliResp.getSubCode()+"-"+aliResp.getSubMsg());
}
} catch (ParseException e) {
logger.error(e);
throw new BusinessException("刷新商户token失败"+hqRequest);
}
}
@Override
public MercResp getMercInfo(HqRequest hqRequest) {
try {
MercSearchReq req = JSON.parse(hqRequest.getBizContent(), MercSearchReq.class);
if(req.getCoreId()!=null){
return mercService.getMercByCoreId(req.getCoreId());
}
if(req.getMercId()!=null) {
return mercService.getMercByMercId(req.getMercId());
}
} catch (ParseException e) {
logger.error(e);
throw new BusinessException("查询商户信息失败");
}
throw new BusinessException("没有找到对应的商户信息");
}
@Override
public PageInfo<MercResp> getMercList(HqRequest hqRequest){
try {
MercListSearchReq listSearchReq = JSON.parse(hqRequest.getBizContent(), MercListSearchReq.class);
MercSearchReq req = listSearchReq.getReq();
if(req==null){
req = new MercSearchReq();
}
Integer page = listSearchReq.getPage();
if(page==null){
page=0;
}
Integer pageSize = listSearchReq.getPageSize();
if(pageSize == null){
pageSize=20;
}
return mercService.getMercList(req,page,pageSize);
} catch (ParseException e) {
logger.error(e);
throw new BusinessException("查询商户列表失败");
}
}
}
| [
"46773109@qq.com"
] | 46773109@qq.com |
fd4e918cb673497fc6c74471bfc2428bdd09c06e | 60eab9b092bb9d5a50b807f45cbe310774d0e456 | /dataset/cm3/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java | 8c3bc8fadce10c6a94694abf378f806dd03c4b20 | [
"Apache-2.0"
] | permissive | SpoonLabs/nopol-experiments | 7b691c39b09e68c3c310bffee713aae608db61bc | 2cf383cb84a00df568a6e41fc1ab01680a4a9cc6 | refs/heads/master | 2022-02-13T19:44:43.869060 | 2022-01-22T22:06:28 | 2022-01-22T22:14:45 | 56,683,489 | 6 | 1 | null | 2019-03-05T11:02:20 | 2016-04-20T12:05:51 | Java | UTF-8 | Java | false | false | 2,909 | java | /*
* Copyright 2003-2004 The Apache Software Foundation.
*
* 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.apache.commons.math.analysis;
/**
* A concrete {@link UnivariateRealSolverFactory}. This is the default solver factory
* used by commons-math.
* <p>
* The default solver returned by this factory is a {@link BrentSolver}.
*
* @version $Revision: 1.13 $ $Date: 2004/06/23 16:26:14 $
*/
public class UnivariateRealSolverFactoryImpl extends UnivariateRealSolverFactory {
/**
* Default constructor.
*/
public UnivariateRealSolverFactoryImpl() {
}
/**
* Create a new {@link UnivariateRealSolver} for the given function. The
* actual solver returned is determined by the underlying factory.
*
* This factory returns a {@link BrentSolver} instance.
*
* @param f the function.
* @return the new solver.
*/
public UnivariateRealSolver newDefaultSolver(UnivariateRealFunction f) {
return newBrentSolver(f);
}
/**
* Create a new {@link UnivariateRealSolver} for the given function. The
* solver is an implementation of the bisection method.
* @param f the function.
* @return the new solver.
*/
public UnivariateRealSolver newBisectionSolver(UnivariateRealFunction f) {
return new BisectionSolver(f);
}
/**
* Create a new {@link UnivariateRealSolver} for the given function. The
* solver is an implementation of the Brent method.
* @param f the function.
* @return the new solver.
*/
public UnivariateRealSolver newBrentSolver(UnivariateRealFunction f) {
return new BrentSolver(f);
}
/**
* Create a new {@link UnivariateRealSolver} for the given function. The
* solver is an implementation of Newton's Method.
* @param f the function.
* @return the new solver.
*/
public UnivariateRealSolver newNewtonSolver(
DifferentiableUnivariateRealFunction f) {
return new NewtonSolver(f);
}
/**
* Create a new {@link UnivariateRealSolver} for the given function. The
* solver is an implementation of the secant method.
* @param f the function.
* @return the new solver.
*/
public UnivariateRealSolver newSecantSolver(UnivariateRealFunction f) {
return new SecantSolver(f);
}
}
| [
"durieuxthomas@hotmail.com"
] | durieuxthomas@hotmail.com |
2f24fd8c6d6d8d927e925e397aa5fac064ad3b97 | 34741573085cef38cb564988a0c613e412cbec11 | /spring-boot-app-parent/ingleash-misc-utils/src/main/java/com/ingleash/misc/CipherMain.java | ef01b39ab95eef89790d1a10453e6421d79b27c1 | [] | no_license | ashishgingledev/spring-boot-apps | 075decbcb81e3fd734d7da73c4b5080eed0bd625 | c5ee3ad47b187bba6e99c790445307660662f08a | refs/heads/master | 2023-01-24T14:42:10.363492 | 2020-11-25T12:04:12 | 2020-11-25T12:04:12 | 285,815,755 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,805 | java | package com.ingleash.misc;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
interface AnonymousInterface {
void getCipher(ArrayList<String> list);
}
class Cipher_Anonymous {
void anonymousClass(ArrayList<String> list) {
AnonymousInterface cyberCreateAndPrint = (e) -> {
list
.stream()
.map(each -> each == " " ? "$#" : new StringBuilder(((int) each.charAt(0)) + each.substring(1)).reverse().toString())
.collect(Collectors.toList())
.forEach(System.out::print);
};
cyberCreateAndPrint.getCipher(list);
}
}
class Cipher_MethodRef {
void methodReference(ArrayList<String> list) {
list
.stream()
.map(each -> each == " " ? "$#" : new StringBuilder(((int) each.charAt(0)) + each.substring(1)).reverse().toString())
.collect(Collectors.toList())
.forEach(System.out::print);
}
}
class Cipher_LambdaExp {
void lambdaExpression(ArrayList<String> list) {
/*String cyphered = (list.stream().map(each -> {
if (each == " ") {
each = "#$";
} else {
int a = (int) each.charAt(0);
each = a + each.substring(1);
}
return new StringBuilder(each).reverse().toString() ;
} ).collect(Collectors.toList())).stream()
.map(Object::toString).collect(Collectors.joining());*/
String cyphered = list
.stream()
.filter(each -> each != " ")
.map(each -> new StringBuilder(((int) each.charAt(0)) + each.substring(1)).reverse())
.collect(Collectors.joining("$#"));
System.out.print(cyphered);
}
}
public class CipherMain {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> list = new ArrayList<>();
String input = "Hi, how are you?";
String inputarr[] = input.split(" ");
list.add(inputarr[0]);
for (int i = 0; i < inputarr.length - 1; i++) {
list.add(" ");
list.add(inputarr[i + 1]);
}
Cipher_LambdaExp l1 = new Cipher_LambdaExp();
System.out.print("Lambda Expression : ");
l1.lambdaExpression(list);
Cipher_MethodRef m1 = new Cipher_MethodRef();
System.out.print("\nMethod Reference : ");
m1.methodReference(list);
Cipher_Anonymous a1 = new Cipher_Anonymous();
System.out.print("\nAnonymous Class : ");
a1.anonymousClass(list);
}
}
| [
"ashish17417@users.noreply.github.com"
] | ashish17417@users.noreply.github.com |
81dd9c5d230a1e5ccc654a15cad6d419c39656c9 | 325f7994268d65fa320e71ba192fec1ba75e66ba | /small_projects/JavaJMSSimpleChat_WIP/src/com/chat/test/LoginDialog.java | 77a811d760569b22ed9e31acbcb8f0c19e451a6b | [] | no_license | zahariaca/Java | c115bcad50e5526b52dd414143e00272f328516b | 79af93965f04d600d041feff2a6da5cdcccd72c8 | refs/heads/master | 2022-12-22T14:07:53.603261 | 2021-10-26T19:20:27 | 2021-10-26T19:20:27 | 53,354,442 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,910 | java | package com.chat.test;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
/**
* Created by Alex on 6/7/2016.
*/
public class LoginDialog {
private String username;
private String password;
private static boolean cancelled;
public void display(){
Label label1 = new Label();
Label username = new Label();
Label password = new Label();
TextField usernameField = new TextField();
TextField passwordField = new TextField();
Button okButton;
Button closeButton;
Stage window = new Stage();
window.initModality(Modality.APPLICATION_MODAL);
window.setTitle("Login");
window.setMinWidth(250);
label1.setText("Please enter your credentials!");
username.setText("Username");
password.setText("Password");
okButton = new Button("OK");
okButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
setUsername(usernameField.getText());
setPassword(passwordField.getText());
cancelled = false;
window.close();
}
});
closeButton = new Button("Close the window!");
closeButton.setOnAction(event -> {
cancelled = true;
window.close();
});
GridPane grid = new GridPane();
grid.setPadding(new Insets(10, 10, 10, 10));
grid.setVgap(5);
grid.setHgap(8);
grid.add(username,0,0);
grid.add(password,0,1);
grid.add(usernameField,1,0);
grid.add(passwordField,1,1);
grid.add(okButton,0,2);
grid.add(closeButton,1,2);
BorderPane layout = new BorderPane();
layout.setPadding(new Insets(5,5,5,5));
layout.setTop(label1);
layout.setCenter(grid);
Scene scene = new Scene(layout);
window.setScene(scene);
window.showAndWait();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public static boolean isCancelled(){
return cancelled;
}
}
| [
"zaharia.c.alexandru@gmail.com"
] | zaharia.c.alexandru@gmail.com |
44adc98e2b5bf7ab27bf9d344246e0843ca80312 | a31aea3816b20f6b01fa556f070dea815e9ff547 | /LockerWAR/JavaSource/com/vh/locker/base/TokenProcessor.java | f9722dbfbdd6b888b8a01ca44fb412714e509c91 | [
"Apache-2.0"
] | permissive | pitanyc/desktop | 0bce100802ccfc43f34fc5bb48a23aa672fe45f1 | 362071719c808dab01a288eb6fdab0847112c400 | refs/heads/master | 2020-04-10T18:24:25.885590 | 2015-08-29T19:45:03 | 2015-08-29T19:45:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,763 | java | /**
* @file TokenProcessor
* @author peter.szocs
* @version 1.0
*
* Utility class for token related functionality.
*/
package com.vh.locker.base;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import com.vh.locker.util.Constants_Scope;
/**
* TokenProcessor is responsible for handling all token related functionality. The
* methods in this class are synchronized to protect token processing from multiple
* threads. Servlet containers are allowed to return a different HttpSession object
* for two threads accessing the same session so it is not possible to synchronize
* on the session.
*
* @since 3/2/2005
*/
public class TokenProcessor {
/**
* The singleton instance of this class.
*/
private static TokenProcessor instance = new TokenProcessor();
/**
* Retrieves the singleton instance of this class.
*/
public static TokenProcessor getInstance() {
return instance;
}
/**
* Protected constructor for TokenProcessor. Use TokenProcessor.getInstance()
* to obtain a reference to the processor.
*/
protected TokenProcessor() {
super();
}
/**
* Return <code>true</code> if there is a transaction token stored in
* the user's current session, and the value submitted as a request
* parameter with this action matches it. Returns <code>false</code>
* under any of the following circumstances:
* <ul>
* <li>No session associated with this request</li>
* <li>No transaction token saved in the session</li>
* <li>No transaction token included as a request parameter</li>
* <li>The included transaction token value does not match the
* transaction token in the user's session</li>
* </ul>
*
* @param request The servlet request we are processing
*/
public synchronized boolean isTokenValid(HttpServletRequest request) {
return this.isTokenValid(request, false);
}
/**
* Return <code>true</code> if there is a transaction token stored in
* the user's current session, and the value submitted as a request
* parameter with this action matches it. Returns <code>false</code>
* <ul>
* <li>No session associated with this request</li>
* <li>No transaction token saved in the session</li>
* <li>No transaction token included as a request parameter</li>
* <li>The included transaction token value does not match the
* transaction token in the user's session</li>
* </ul>
*
* @param request The servlet request we are processing
* @param reset Should we reset the token after checking it?
*/
public synchronized boolean isTokenValid(HttpServletRequest request, boolean reset) {
String token = getRequestToken(request);
Set s = getSessionTokenSet(request);
try {
return s.contains(token);
} finally {
if(reset) s.remove(token);
}
}
/**
* Reset the saved transaction token in the user's session. This
* indicates that transactional token checking will not be needed
* on the next request that is submitted.
*
* @param request The servlet request we are processing
*/
public synchronized void resetToken(HttpServletRequest request) {
String token = getRequestToken(request);
Set s = getSessionTokenSet(request);
s.remove(token);
}
/**
* Save a new transaction token in the user's current session, creating
* a new session if necessary.
*
* @param request The servlet request we are processing
*/
public synchronized static String saveToken(HttpServletRequest request) {
String token = generateToken(request);
Set s = getSessionTokenSet(request);
s.add(token);
return token;
}
/**
* Returns the token set from session.
*
* @param request The request we are processing
*/
public static Set getSessionTokenSet(HttpServletRequest request) {
Set s = (Set)request.getSession().getAttribute(Constants_Scope.TOKENS_KEY);
if(s==null) {
s = new HashSet();
request.getSession().setAttribute(Constants_Scope.TOKENS_KEY, s);
}
return s;
}
/**
* Returns the token String from request.
*
* @param request The request we are processing
*/
public static String getRequestToken(HttpServletRequest request) {
return request.getParameter(Constants_Scope.REQUEST_TOKEN_KEY);
}
/**
* Generate a new transaction token, to be used for enforcing a single
* request for a particular transaction.
*
* @param request The request we are processing
*/
private static long i = 0;
private synchronized static String generateToken(HttpServletRequest request) {
i++;
if(i<0) i=0;
return ""+i;
}
}
| [
"gepesz@gmail.com"
] | gepesz@gmail.com |
b69274d214eebd5e81fc527deee4260d463924c9 | c9d973c0fa1e078848445ecadc7e0f24cefff2d6 | /backend/interfaces/src/main/java/ar/edu/itba/paw/interfaces/UserRatesService.java | 048eeaf86667f1b9c0dd7eb30067b5698f11e56a | [] | no_license | FelipeGorostiaga/PAW-TravelApp | 2bce6f630954f727a6ea6a8ee392293c35a67adb | 4d558dc89904eacce1088dd5daba07dc36423fea | refs/heads/main | 2023-06-23T23:14:11.501548 | 2021-07-23T17:26:19 | 2021-07-23T17:26:19 | 388,873,491 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 389 | java | package ar.edu.itba.paw.interfaces;
import ar.edu.itba.paw.model.Trip;
import ar.edu.itba.paw.model.User;
import ar.edu.itba.paw.model.UserRate;
import java.util.Optional;
public interface UserRatesService {
UserRate createRate(Trip trip, User ratedBy, User ratedUser);
boolean rateUser(long rateId, int rate, String comment);
Optional<UserRate> findById(long rateId);
}
| [
"fgorostiaga@itba.edu.ar"
] | fgorostiaga@itba.edu.ar |
9734023702fab7a4111eb425f4dc1eec8782cf15 | dd8ab753ee6fd873d3957799667cfa905b25a853 | /SourceAnalysisTopic/SpringDesignPatterns/spring-design-pattern/src/main/java/com/denny/spring/design/pattern/proxy/RealSubject.java | 7782c97bce290fc9f8e976a38ed534ca598c570b | [] | no_license | Vadin/gupaoedu | 78a5d44a1b4cde76fd5513fcad3cb1802eb2fdb2 | 33d24ed733b492c2b2979d5802f2d1d90c2accc2 | refs/heads/master | 2021-10-21T08:47:17.310778 | 2019-03-03T23:08:25 | 2019-03-03T23:08:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 201 | java | package com.denny.spring.design.pattern.proxy;
public class RealSubject implements Subject {
@Override
public void operation() {
System.out.println("目标对象执行!");
}
}
| [
"denny9527@qq.com"
] | denny9527@qq.com |
10377a3df36cdd1a88a1b625fe5c597266b55a22 | f95d1defcf129979e5b02d6b9eb69d24ca14d872 | /PoissonSource-CS348-Lab2/src/UniqueLambda.java | 0cec6c33cbcc3d9af8375e5b2b4540fd22e5f899 | [] | no_license | EmberCS15/CS348-Network-Lab-Projects | 1b5654f290002c7f8b9a81c3708c1704da2c271b | dac12bb08997bbd737fc6bec6371028156f8062c | refs/heads/master | 2020-03-10T13:29:14.021586 | 2018-05-07T07:37:06 | 2018-05-07T07:37:06 | 117,948,208 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,336 | java | import objectclass.*;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.Random;
public class UniqueLambda {
static boolean link_occupied=false;
static double outputTime=0;
private static class Data{
double packetDrop;
double packetDelay;
public Data(double packetDrop,double packetDelay){
this.packetDrop=packetDrop;
this.packetDelay = packetDelay;
}
}
static double getNextTimeInterval(double lambda){
int itr=0;
double timeAvg = 0.0,R=0.0;
for(itr=1;itr<=50;itr++){
R = Math.random();
R = (-1/lambda)*Math.log(1-R);
timeAvg+=R;
}
timeAvg/=50;
//System.out.println("Time : "+timeAvg);
return timeAvg;
}
static void packetDropSimulate(int n, PriorityQueue<Event> globalQueue, Link outputLink, Switch sw, double bss, int bitPacket, HashMap<String,Link> linkMap, HashMap<String, Source> sourceMap,String filename,final int num_rounds,final int simulation_time) throws Exception{
FileWriter fw1=new FileWriter(filename);
BufferedWriter bw1=new BufferedWriter(fw1);
Random random=new Random();
int i=0,j=0,k=0;
Data srcArray[][]=new Data[n][num_rounds];
for(i=0;i<n;i++){
for(j=0;j<num_rounds;j++){
srcArray[i][j]=new Data(0,0.0);
}
}
for(j=0;j<num_rounds;j++) {
globalQueue.clear();
outputLink.setBs(bss);
sw.setNumOfPackets(0);
link_occupied=false;outputTime=0;
//Initialising Global Priority Queue with n generation events
for (i = 0; i < n; i++) {
double t = random.nextDouble();
Packet packetGenerated = new Packet("p" + i, "s" + i, bitPacket, t, 0.0);
sourceMap.get("s"+i).setNumOfPacketsGenerated(1);
Event e = new Event("PACKET_GENERATED", t, packetGenerated);
globalQueue.add(e);
}
//Simulation Loop running
while (globalQueue.size()!=0) {
Event e = globalQueue.poll(), temp1, temp2;
//System.out.println("Event Type : "+e.getEventType()+" PacketId : "+e.getEventPacket().getPacketId()+" TimeStampp: "+e.getTimeStamp());
double transRate = 0, queueOutTime = 0,timeSw=0,packetGenTime=0.0;
Packet pkt=null, packetGenerated=null;
Link l=null;
Source src = null;
String id="";
switch (e.getEventType()) {
case "PACKET_GENERATED":id = e.getEventPacket().getSrcId();
l = linkMap.get(sourceMap.get(id).getLinkId());
transRate = e.getEventPacket().getPktLength() / l.getBs();
src = sourceMap.get(id);
temp1 = new Event("PACKET_QUEUE", e.getTimeStamp() + transRate, e.getEventPacket());
packetGenTime = getNextTimeInterval(src.getPacketSendingRate());
packetGenerated = new Packet("p" + i, e.getEventPacket().getSrcId(), bitPacket, e.getTimeStamp() + packetGenTime, 0.0);
temp2 = new Event("PACKET_GENERATED", e.getTimeStamp() + packetGenTime, packetGenerated);
globalQueue.add(temp1);
if (temp2.getTimeStamp() < simulation_time) {
globalQueue.add(temp2);
sourceMap.get(e.getEventPacket().getSrcId()).setNumOfPacketsGenerated(sourceMap.get(e.getEventPacket().getSrcId()).getNumOfPacketsGenerated()+1);
i++;
}
break;
case "PACKET_QUEUE":
if(sw.getNumOfPackets()>=sw.getMaxSize()){
//System.out.println("I am greater then = "+sw.getMaxSize());
srcArray[Integer.parseInt(e.getEventPacket().getSrcId().substring(1))][j].packetDrop+=1;
}else{
pkt = e.getEventPacket();
//System.out.println("Queue Size for pkt:"+e.getEventPacket().getPacketId()+" is "+sw.getNumOfPackets()+" OutputLink :"+outputLink.getBs());
queueOutTime = Math.max(e.getTimeStamp(),outputTime) + ((sw.getNumOfPackets() * pkt.getPktLength())/outputLink.getBs());
if(link_occupied) queueOutTime-=(pkt.getPktLength()/outputLink.getBs());
temp1 = new Event("PACKET_DEQUEUE", queueOutTime , pkt);
globalQueue.add(temp1);
sw.incrementPacketQueueSize();
}
break;
case "PACKET_DEQUEUE":
pkt = e.getEventPacket();
transRate = (pkt.getPktLength() / outputLink.getBs());
timeSw = e.getTimeStamp()+transRate;
temp1 = new Event("PACKET_SWITCH", timeSw, pkt);
globalQueue.add(temp1);
link_occupied=true;
//System.out.println("Queue Size for pkt:"+e.getEventPacket().getPacketId()+" is "+sw.getNumOfPackets()+" Time Dequeue :"+e.getTimeStamp()+" Output Time : "+outputTime+" timeSw : "+timeSw);
outputTime = timeSw;
break;
case "PACKET_SWITCH":
link_occupied=false;
sw.decrementPacketQueueSize();
e.getEventPacket().setTerminationTime(e.getTimeStamp());
srcArray[Integer.parseInt(e.getEventPacket().getSrcId().substring(1))][j].packetDelay+=(e.getTimeStamp()-e.getEventPacket().getGenerationTime());
if(e.getEventPacket().getGenerationTime()>e.getEventPacket().getTerminationTime())
System.out.println("Pkt .Id = "+e.getEventPacket().getPacketId()+" Gen Time: "+e.getEventPacket().getGenerationTime()+" Term Time: "+e.getEventPacket().getTerminationTime());
break;
default:System.out.println("Event ID MISMATCH ERROR.Process Exiting .......... ");
return;
}
}
for(k=0;k<n;k++){
//System.out.println("Delay : "+srcArray[k][j].packetDelay);
srcArray[k][j].packetDelay/=sourceMap.get("s"+k).getNumOfPacketsGenerated();
srcArray[k][j].packetDrop/=sourceMap.get("s"+k).getNumOfPacketsGenerated();
}
}
for(j=0;j<n;j++){
for(k=0;k<num_rounds;k++){
if(sw.getMaxSize()==Integer.MAX_VALUE) bw1.write(j+","+srcArray[j][k].packetDelay+"\n");
else bw1.write(j+","+srcArray[j][k].packetDrop+"\n");
//System.out.println("Source : "+j+" Average Packet Delay : "+srcArray[j][k].packetDelay+" Average Packet Drop : "+srcArray[j][k].packetDrop);
}
}
bw1.close();
fw1.close();
}
}
| [
"abhijitroy996@gmail.com"
] | abhijitroy996@gmail.com |
cfa01b0077a0eb9d52884f0bb7ce59b9e1ac01fb | 776cdbbd53a6ec64ca486e97685302fb615c183e | /src/com/niranjan/ai/session3/Assignment2.java | fa6ccebdd662708be79060275b4e9b1d0ef611a5 | [] | no_license | niranjandroid/AcadGild | 7119a41e42341495ee22534d786f7d806e2e2d8c | 717d000f92239eae837249872541a7c52b13a2a8 | refs/heads/master | 2021-05-30T01:39:54.264658 | 2015-10-13T03:17:22 | 2015-10-13T03:17:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 643 | java | package com.niranjan.ai.session3;
import java.util.Scanner;
/*Write a simple Java program to check whether a given number is a prime number or not.
*/
public class Assignment2 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int val = in.nextInt();
in.close();
//System.out.println(val+" : " + );
isPrime(val);
}
private static boolean isPrime(int val) {
// TODO Auto-generated method stub
for(int i = 2; i <= val/2; i++) {
if(val % i == 0) {
System.out.println(val + " is not a prime ");
return false;
}
}
System.out.println(val + " is a prime ");
return true;
}
}
| [
"niranjan.ece1@gmail.com"
] | niranjan.ece1@gmail.com |
a554cf0f3e4704baf0d38a04ab0dc6a1ce781040 | ba0b1e4a932041b8f00cd83630902c3ab51437e1 | /src/es/studium/Cadenas/SubCadena2.java | 3000cc249e5b2d0227142a8a74ae6195fa1d53f0 | [] | no_license | DavidSanchezCabello/Cadenas | 1324438f1c3a17f3606b3beb52c2b92e0c33b8c5 | 7b8659da1af3847fa4e534d0f378bf65fc0721e0 | refs/heads/master | 2020-09-20T04:43:14.287149 | 2019-11-27T08:16:36 | 2019-11-27T08:16:36 | 224,379,313 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 813 | java | package es.studium.Cadenas;
import java.util.Scanner;
public class SubCadena2
{
public static void main(String[] args)
{
String cadena="";
int numCaracteres,posicion,longitud;
int aux;
Scanner teclado= new Scanner(System.in);
System.out.println("Introduzca una cadena");
cadena = teclado.next();
System.out.println("Introduzca una posicion");
posicion = teclado.nextInt();
aux=cadena.length();
System.out.println("Introduzca una longitud de la subcadena (<"+aux+")");
longitud = teclado.nextInt();
System.out.println("la subcadena es: "+ funSubcadena(cadena,posicion,longitud));
teclado.close();
}
public static String funSubcadena(String cadena, int posicion, int longitud) {
return (cadena.substring(posicion-1,(posicion+longitud-1)));
}
}
| [
"thorald.batallador@gmail.com"
] | thorald.batallador@gmail.com |
94863763415bd986d4abec1ea49be426f23aeb52 | 79f22c5f60daf34801ebf38b5b5275b918325e12 | /app/src/main/java/com/example/listacontactos/MuestroContacto.java | 99f2f0f307a23d6f61f933a0b0888fb47caf5fad | [] | no_license | sergizgz/Listacontactos | e1b1376dca1f27d701c47b5bda133780e91d430e | c259dfc157a619ae8b4ce788fa425eb7f1a5a990 | refs/heads/master | 2023-01-12T19:34:35.217297 | 2020-11-13T19:36:25 | 2020-11-13T19:36:25 | 310,132,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,002 | java | package com.example.listacontactos;
import androidx.appcompat.app.AppCompatActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.widget.TextView;
public class MuestroContacto extends AppCompatActivity {
TextView txt1;
TextView txt2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_muestro_contacto);
txt1=findViewById(R.id.txt1);
txt2=findViewById(R.id.txt2);
String contacto=getIntent().getStringExtra("contacto");
Cursor cursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, new String[] { ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER,}, "DISPLAY_NAME = '"+contacto+"'", null, null);
cursor.moveToFirst();
txt1.setText(cursor.getString(0));
txt2.setText(cursor.getString(1));
}
} | [
"sergiociria2@gmail.com"
] | sergiociria2@gmail.com |
d0c80242bad9b93ab0b8cd1f972bd40827d5a09e | 1d59800412ec9b3efaece24a6ef7140487f76828 | /src/com/company/Main.java | 0126095a94e4a9297bba088e9fe20eed34dce20b | [] | no_license | raakostOnCph/lix_aftenundervisning | dfaab6f509d8a2c1b681c73eb4adcb6cbd2deb65 | 04f2dd28f1fa62f3a8bb49c0e0a0145b365cfc4f | refs/heads/main | 2023-04-09T00:49:41.740478 | 2021-04-13T07:00:50 | 2021-04-13T07:00:50 | 342,509,329 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,660 | java | package com.company;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
// write your code here
// ints, Strings, arrays.
// int [] tal = new int[4];
//
// tal[0] = 313;
// tal[1] = 666;
// tal[2] = 42;
// tal[3] = 7;
// String [] ord = new String[5];
//
// ord[0] = "velkommen ";
// ord[1] = "til ";
// ord[2] = "den ";
// ord[3] = "første ";
// ord[4] = "undervisningsgang ";
//
//
//
// for (int i = 0; i < ord.length ; i++) {
//
// System.out.println( "på plads nr " + i + " : " + ord[i]);
//
// }
// int [] ints = {33,1,34,32,1,3,4,4,3,2,22};
//
// System.out.println("længden er " + ints.length);
//
// System.out.println(ints[3]);
// String [] strings = {"hej " , "med ", "dig "};
// sådan her deler efter ord.
// String [] ord = "hej med dig".split( " ");
//
// String [] bogstaver = "hej med dig".split( "");
//
//
// udskriv(ord);
//
// System.out.println("\n\n");
//
// udskriv(bogstaver);
//
//
//
// String sætning = læsFil(getTekst("angiv filnavn : "));
//System.out.println("DET VI LÆSTE AF FILEN : " + sætning);
// String indhold = FilHaandtering.læsFil("tekst.txt");
//
//
// String max = findLængsteOrd(indhold);
//
// System.out.println(max);
//
// String maxRens = rensOrd(max);
//
// System.out.println(maxRens);
//
// System.out.println(markerOrd(indhold, findLængsteOrd(indhold)));
String teksten = FilHaandtering.læsFil("tekst.txt").toLowerCase();
String s = "hej med dig hej med dig hej Meeeeeeed dig hej med digggg hej med dig ".toLowerCase();
// todo finde ud af hvad om vi kan slette markerOrdVirker ?
// todo omdøb tilHører -> erSpecialTegn
// todo omdøb normaliser -> fixMellemrum
// todo Lav en util klasse og træk følgende metoder ud i den.
// fixMellemrum, delefterord , deleftertegn,rensOrd, tilhøre ,etafhvert,
// udskriv
// todo Lav en statestik klasse og træk følgende metoder ud i den.
// tilForekomster, histogram
// todo lav en metode som kun returnere histoindex'er
// todo Marker det ord der optræder flest gange
// todo slet et ord (husk at fixe mellemrum).
// todo Slet det ord der optræder flest gange
// todo byt et ord ud med et andet.
// System.out.println("\n\n\n");
//
// System.out.println(sletOrd(teksten, "men"));
//
// System.out.println("\n\n\n");
//
// System.out.println(sletOrd(teksten, udksrivHyppigesteOrd(teksten)));
//
// System.out.println("\n\n\n");
//
// System.out.println(erstatOrd(teksten, "men", "Andreas"));
System.out.println(vokalerMax(teksten).s);
System.out.println(konsonanterMax(teksten).s);
} // her slutter min main metode
//
// private static MaxOrdne maxOrdVK(String s, ) {
// String [] ordListe = Util.delEfterOrd(s);
//
// int vMax = 0;
// String vMaxOrd ="";
//
// int kMax =0;
// String kMaxOrd = "";
//
//
//
// for (int i = 0; i < ordListe.length; i++) {
//
// int antalV = tælVokaler(ordListe[i]);
// int antalK = tælKonsonanter(ordListe[i]);
//
//
// if (antalK > kMax) {
//
// kMax = antalK;
// kMaxOrd = ordListe[i];
// }
//
// if (antalV > vMax ) {
//
// vMax = antalV;
// vMaxOrd = ordListe[i];
//
// }
//
// }
//
// Ordet vOrdet = new Ordet();
//
// vOrdet.i = vMax;
// vOrdet.s = vMaxOrd;
//
// Ordet kOrdet = new Ordet();
//
// kOrdet.i = kMax;
// kOrdet.s = kMaxOrd;
//
//
// MaxOrdne maxOrdne = new MaxOrdne();
//
// maxOrdne.ordMedFlestVokaler = vOrdet;
// maxOrdne.ordMedFlestKonsonanter = kOrdet;
//
//
//
// return maxOrdne;
//
// }
public static Ordet vokalerMax(String s ) {
return tælForekomster(s, "aeyuioæøå");
}
public static Ordet konsonanterMax(String s) {
return tælForekomster(s, "qzxswdcvfrtgbnhjmkl");
}
private static Ordet tælForekomster(String s, String tegn ) {
String [] ordListe = Util.delEfterOrd(s);
int Max = 0;
String MaxOrd ="";
for (int i = 0; i < ordListe.length; i++) {
int antalV = tælForkomsterAfTegn(ordListe[i], tegn);
if (antalV > Max ) {
Max = antalV;
MaxOrd = ordListe[i];
}
}
Ordet ordet = new Ordet();
ordet.i = Max;
ordet.s = MaxOrd;
return ordet ;
}
public static int tælForkomsterAfTegn(String ord, String tegn) {
String[] bogstaver = Util.delEfterTegn(ord);
int antal = 0;
for (int i = 0; i < bogstaver.length; i++) {
if (tegn.contains(bogstaver[i])) {
antal++;
}
}
return antal;
}
public static int tælKonsonanter(String ord) {
String konsonanter = "qzxswdcvfrtgbnhjmklp";
String[] bogstaver = Util.delEfterTegn(ord);
int antal = 0;
for (int i = 0; i < bogstaver.length; i++) {
if (konsonanter.contains(bogstaver[i])) {
antal++;
}
}
return antal;
}
public static String erstatOrd(String tekst, String gammelt, String nyt) {
String[] ordliste = tekst.split(" ");
for (int i = 0; i < ordliste.length; i++) {
String temp = Util.rensOrd(ordliste[i]);
if (temp.equalsIgnoreCase(gammelt)) {
ordliste[i] = nyt;
}
}
return String.join(" ", ordliste);
}
public static String sletOrd(String tekst, String ord) {
String[] ordListe = Util.delEfterOrd(tekst);
for (int i = 0; i < ordListe.length; i++) {
if (ordListe[i].equalsIgnoreCase(ord)) {
ordListe[i] = "";
}
}
String samletTekst = String.join(" ", ordListe);
return Util.fixMellemrum(samletTekst);
}
public static String findeOgMarkerDetLængste(String tekst) {
return markerOrd(tekst, findLængsteOrd(tekst));
}
public static String markHyppigst(String tekst) {
String ord = udksrivHyppigesteOrd(tekst);
return markerOrd(tekst, ord);
}
public static String udksrivHyppigesteOrd(String tekst) {
return hyppigesteOrd(tekst, hyppistIndex(tekst));
}
public static int hyppistIndex(String tekst) {
int[] hyppighed = Statestik.hisogramIndex(tekst);
// System.out.println(Arrays.toString(hyppighed));
int index = -1;
int antal = 0;
for (int i = 0; i < hyppighed.length; i++) {
if (antal < hyppighed[i]) {
antal = hyppighed[i];
//System.out.println("opdatere index til : " + i );
//System.out.println("opdatere variablen antal er : " + antal );
index = i;
}
}
return index;
}
public static String hyppigesteOrd(String tekst, int i) {
String ord = Statestik.etOrdAfHver(tekst);
String[] ordListe = Util.delEfterOrd(ord);
return ordListe[i];
}
public static String markerOrd(String tekst, String ord) {
String ANSI_RED = "\u001B[31m";
String ANSI_RESET = "\u001B[0m";
String[] ordliste = tekst.split(" ");
for (int i = 0; i < ordliste.length; i++) {
String temp = Util.rensOrd(ordliste[i]);
if (temp.equalsIgnoreCase(ord)) {
ordliste[i] = ANSI_RED + ordliste[i] + ANSI_RESET;
}
}
return String.join(" ", ordliste);
}
public static boolean slutterPå(String s) {
int i = s.length() - 1;
String sidste = s.substring(i);
return Util.erSpecialTegn(sidste);
}
public static String findLængsteOrd(String s) {
String[] ord = s.split(" ");
String res = "";
for (int i = 0; i < ord.length; i++) {
if (ord[i].length() > res.length()) {
res = ord[i]; // her opdatere jeg res.
}
}
return Util.rensOrd(res);
}
} // her slutter min main klasse
| [
"nbh@cphbusiness.dk"
] | nbh@cphbusiness.dk |
b7b0e89804a9f0ecaa4353187f075f43b0cd1c91 | be0ab62a3640737394547db38d686a7d859383ec | /src/main/java/com/aurospaces/neighbourhood/controller/DonorController.java | d5439cc5fb748f07678ab67110af7e9583965893 | [] | no_license | kotaiahandraju/Temple | c6644ab9d1b06e8c0bb2fc999d1918fd74df969a | 18bc3d8847b2c315076437c07104b7361f093d25 | refs/heads/master | 2021-04-15T17:12:20.391004 | 2018-03-22T04:26:21 | 2018-03-22T04:26:21 | 126,278,882 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 21,721 | java | package com.aurospaces.neighbourhood.controller;
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.*;
import java.nio.charset.StandardCharsets;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import javax.servlet.http.*;
import org.apache.log4j.Logger;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.*;
import org.springframework.transaction.support.*;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import com.aurospaces.neighbourhood.bean.DonorBean;
import com.aurospaces.neighbourhood.bean.UsersBean;
import com.aurospaces.neighbourhood.db.dao.DonorsDao;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.databind.JsonMappingException;
@Controller
public class DonorController {
@Autowired DonorsDao objDonorsDao;
@Autowired DataSourceTransactionManager transactionManager;
private Logger logger = Logger.getLogger(DonorController.class);
@RequestMapping(value = "/DonorHome")
public String adminLogin(@ModelAttribute("packCmd") DonorBean objDonorBean,ModelMap model,HttpServletRequest request,HttpSession session) throws JsonGenerationException, JsonMappingException, IOException {
List<Map<String, String>> listOrderBeans = null;
ObjectMapper objectMapper = null;
UsersBean objUserBean = null;
String sJson=null;
try{
listOrderBeans = objDonorsDao.getDonors(null);
if(listOrderBeans != null && listOrderBeans.size() > 0) {
objectMapper = new ObjectMapper();
sJson =objectMapper.writeValueAsString(listOrderBeans);
request.setAttribute("allOrders1", sJson);
// System.out.println(sJson);
}else{
objectMapper = new ObjectMapper();
sJson =objectMapper.writeValueAsString(listOrderBeans);
request.setAttribute("allOrders1", "''");
}
}catch(Exception e){
e.printStackTrace();
System.out.println(e);
logger.error(e);
logger.fatal("error in userLogin method in school LoginController class SchemeHome method ");
return "login";
}
return "DonorHome";
}
@RequestMapping(value = "/AddDonor")
public String addDonor(@ModelAttribute("packCmd") DonorBean objDonorBean,ModelMap model,HttpServletRequest request,HttpSession session) throws JsonGenerationException, JsonMappingException, IOException {
String sJson=null;
String mobileNumber = null;
String requestUrl = null;
String username = "mopidevi ";
String password = "Mopidevi@123";
String from = "SSSTMD";
try{
String name = objDonorBean.getName();
byte[] bytes = name.getBytes(StandardCharsets.ISO_8859_1);
name = new String(bytes, StandardCharsets.UTF_8);
objDonorBean.setName(name);
String gotram = objDonorBean.getGotram();
byte[] bytes1 = gotram.getBytes(StandardCharsets.ISO_8859_1);
gotram = new String(bytes1, StandardCharsets.UTF_8);
objDonorBean.setGotram(gotram);
String address = objDonorBean.getAddress();
byte[] bytes2 = address.getBytes(StandardCharsets.ISO_8859_1);
address = new String(bytes2, StandardCharsets.UTF_8);
objDonorBean.setAddress(address);
String information = objDonorBean.getOtherInformation();
byte[] bytes3 = information.getBytes(StandardCharsets.ISO_8859_1);
information = new String(bytes3, StandardCharsets.UTF_8);
objDonorBean.setOtherInformation(information);
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMMM-yyyy");
if(StringUtils.isNotBlank(objDonorBean.getDor())){
Date date1 = formatter.parse(objDonorBean.getDor());
objDonorBean.setDor1(date1);
}
if(StringUtils.isNotBlank(objDonorBean.getAmount())){
double amount = Double.parseDouble(objDonorBean.getAmount());
objDonorBean.setAmount1(amount);
}
if(objDonorBean.getId() != 0){
session.setAttribute("d_updated", "Donor Updated Successfully");
}else{
session.setAttribute("d_created", "Donor Created Successfully");
}
boolean isInsert = objDonorsDao.save(objDonorBean);
if(isInsert)
{
String message = "Dear "+objDonorBean.getName()+",Thank you for Registering with us.\nSri Subrahmanyeswara Swamy Temple, Mopidevi.";
// String message = "Dear "+objDonorBean.getName()+",\n Thanks for Registering with us.";
mobileNumber = objDonorBean.getMobile();
// String message = "Dear Parent your son, Results in Foundation grand Test-1 Conducted on .\nYour Login details,\n Username: "+objStudentBean1.getFatherName()+"\n Password: 12345";
if(StringUtils.isNotBlank(mobileNumber)){
requestUrl = "http://182.18.160.225/index.php/api/bulk-sms?username="+URLEncoder.encode(username, "UTF-8")+"&password="+ URLEncoder.encode(password, "UTF-8")+"&from="+from+"&to="+URLEncoder.encode(mobileNumber, "UTF-8")+"&message="+URLEncoder.encode(message, "UTF-8")+"&sms_type=2";
URL url = new URL(requestUrl);
HttpURLConnection uc = (HttpURLConnection)url.openConnection();
System.out.println(uc.getResponseMessage());
uc.disconnect();
System.out.println(message);
}
// toAddress= objMarksBean.getEmail();
// toAddress = "nitunchinta@gmail.com";
// if(StringUtils.isNotBlank(toAddress)){
// MailSender.sendEmailWithAttachment(toAddress, "Regarding Test/Exam Results",message,null);
// }
// else{ System.out.println("No Email-ID"); }
}
}catch(Exception e){
e.printStackTrace();
System.out.println(e);
logger.error(e);
logger.fatal("error in addDonor method in DonorController class");
return "redirect:DonorHome";
}
return "redirect:DonorHome";
}
@RequestMapping(value = "/processDonorList", method = RequestMethod.POST)
public String processDonorList(Model model, @RequestParam("excelfile2007") MultipartFile excelfile,HttpSession session) {
TransactionStatus objTransStatus = null;
TransactionDefinition objTransDef = null;
boolean isInsert =false;
DonorBean objDonorBean = null;
String val ="";
/*UsersBean userBean = null;
UsersBean isexist = null;
String mobileNumber = null;
String username = "mopidevi";
String password = "Mopidevi@123";
String from = "SSSTMD";
String requestUrl = null;
String toAddress = null;*/
try
{
objTransDef = new DefaultTransactionDefinition();
objTransStatus = transactionManager.getTransaction(objTransDef);
int i = 0;
int count = 0;
int dupCount = 0;
// Creates a workbook object from the uploaded excelfile
Workbook workbook = WorkbookFactory.create(excelfile.getInputStream());
// Creates a worksheet object representing the first sheet
Sheet worksheet = workbook.getSheetAt(0);
// Reads the data in excel file until last row is encountered
// Creates an object for the UserInfo Model
int mm =worksheet.getLastRowNum();
while (i <= worksheet.getLastRowNum())
{
// Creates an object representing a single row in excel
Row row = worksheet.getRow(i++);
int i1 = row.getRowNum();
if(i1>=1)
{
// Sets the Read data to the model class
DonorBean objDonorBean1 = new DonorBean();
// System.out.println(row.getCell(0).getStringCellValue());
/*DataFormatter dataFormatter = new DataFormatter();
String cellStringValue = dataFormatter.formatCellValue(row.getCell(1));
System.out.println ("Is shows data as show in Excel file" + cellStringValue);*/
// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
Date d = null;
if(row.getCell(1) != null)
{
d = row.getCell(1).getDateCellValue();
SimpleDateFormat formatter = new SimpleDateFormat("E MMM dd HH:mm:ss Z yyyy");
Date date1 = formatter.parse(d.toString());
Calendar cal = Calendar.getInstance();
cal.setTime(date1);
String formatedDate = cal.get(Calendar.DATE) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.YEAR);
System.out.println("formatedDate : " + formatedDate);
objDonorBean1.setDor(formatedDate);
objDonorBean1.setDor1(date1);
SimpleDateFormat formatter1 = new SimpleDateFormat("dd/M/yyyy");
Date date11 = formatter1.parse(formatedDate);
System.out.println(date11);
}
/* if(d !=null)
{objDonorBean1.setDor1(d);}*/
// String schemeTitle =row.getCell(2).getStringCellValue();
// String schemeTitle =NumberFormat.getInstance().format(row.getCell(2).getNumericCellValue());
String schemeTitle = null;
if(row.getCell(2) != null)
{
switch(row.getCell(2).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : schemeTitle = ""+row.getCell(2).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : schemeTitle = row.getCell(2).getStringCellValue(); break;
default :
}
}
if(schemeTitle != null)
{
schemeTitle =schemeTitle.replace(".0", "");
objDonorBean1.setSchemeTitle(schemeTitle);
}
// String name = row.getCell(3).getStringCellValue();
String name = null;
if(row.getCell(3) != null)
{
switch(row.getCell(3).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : name = ""+row.getCell(3).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : name = row.getCell(3).getStringCellValue(); break;
default :
}
}
if(name != null)
{objDonorBean1.setName(name);}
// String address = row.getCell(4).getStringCellValue();
String address = null;
if(row.getCell(4) != null)
{
switch(row.getCell(4).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : address = ""+row.getCell(4).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : address = row.getCell(4).getStringCellValue(); break;
default :
}
}
if(address != null)
{objDonorBean1.setAddress(address);}
/*Cell cellValue = row.getCell(5);
if(cellValue.getCellType() == Cell.CELL_TYPE_NUMERIC)
{
String mobile =NumberFormat.getInstance().format(row.getCell(5).getNumericCellValue());
if(mobile != null)
{
mobile =mobile.replace(",", "");
objDonorBean1.setMobile(mobile);
}
}*/
// String mobile =NumberFormat.getInstance().format(row.getCell(5).getNumericCellValue());
String mobile = null;
if(row.getCell(5) != null)
{
switch(row.getCell(5).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : mobile = ""+row.getCell(5).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : mobile = row.getCell(5).getStringCellValue(); break;
default :
}
}
if(mobile != null)
{
mobile =mobile.replace(".", "");
mobile = mobile.replace("E9","");
objDonorBean1.setMobile(mobile);
}
// String datha = row.getCell(6).getStringCellValue();
String datha = null;
if(row.getCell(6) != null)
{
switch(row.getCell(6).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : datha = ""+row.getCell(6).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : datha = row.getCell(6).getStringCellValue(); break;
default :
}
}
if(datha != null)
{objDonorBean1.setDatha(datha);}
// String gotram = row.getCell(7).getStringCellValue();
String gotram = null;
if(row.getCell(7) != null)
{
switch(row.getCell(7).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : gotram = ""+row.getCell(7).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : gotram = row.getCell(7).getStringCellValue(); break;
default :
}
}
if(gotram != null)
{objDonorBean1.setGotram(gotram);}
// String schemeType =NumberFormat.getInstance().format(row.getCell(8).getNumericCellValue());
String schemeType = null;
if(row.getCell(8) != null)
{
switch(row.getCell(8).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : schemeType = ""+row.getCell(8).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : schemeType = row.getCell(8).getStringCellValue(); break;
default :
}
}
if(schemeType != null)
{
schemeType = schemeType.replace(".0", "");
objDonorBean1.setSchemeType(schemeType);
}
// String month =NumberFormat.getInstance().format(row.getCell(9).getNumericCellValue());
String month = null;
if(row.getCell(9) != null)
{
switch(row.getCell(9).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : month = ""+row.getCell(9).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : month = row.getCell(9).getStringCellValue(); break;
default :
}
}
if(month != null)
{
month = month.replace(".0", "");
objDonorBean1.setMonth(month);
}
// String day =NumberFormat.getInstance().format(row.getCell(10).getNumericCellValue());
String day = null;
if(row.getCell(10) != null)
{
switch(row.getCell(10).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : day = ""+row.getCell(10).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : day = row.getCell(10).getStringCellValue(); break;
default :
}
}
if(day != null)
{
day= day.replace(".0", "");
objDonorBean1.setDay(day);
}
// String amount =NumberFormat.getInstance().format(row.getCell(11).getNumericCellValue());
// double amount =row.getCell(11).getNumericCellValue();
// int value = 0;
// value = new BigDecimal(amount).setScale(0, RoundingMode.HALF_UP).intValue();
double amount = 0.00;
if(row.getCell(11) != null)
{
switch(row.getCell(11).getCellType())
{
case Cell.CELL_TYPE_NUMERIC : amount = row.getCell(11).getNumericCellValue(); break;
default :
}
}
if(amount != 0)
{
System.out.println("Donation: "+amount);
objDonorBean1.setAmount1(amount);
}
// String receiptNo =NumberFormat.getInstance().format(row.getCell(12).getNumericCellValue());
String receiptNo = null;
if(row.getCell(12) != null)
{
switch(row.getCell(12).getCellType())
{
// case Cell.CELL_TYPE_FORMULA : receiptNo = "FORMULA "; break;
case Cell.CELL_TYPE_NUMERIC : receiptNo = ""+row.getCell(12).getNumericCellValue(); break;
case Cell.CELL_TYPE_STRING : receiptNo = row.getCell(12).getStringCellValue(); break;
default :
}
}
if(receiptNo != null)
{
receiptNo = receiptNo.replace(".0", "");
objDonorBean1.setReceiptNo(receiptNo);
}
// isInsert = objDonorsDao.save(objDonorBean1);
DonorBean sbean = objDonorsDao.duplicateCheckDonor(objDonorBean1);
if(sbean == null){
isInsert= objDonorsDao.save(objDonorBean1);
count++;
}else{
dupCount++;
isInsert = false;
}
}
// persist data into database in here
}
transactionManager.commit(objTransStatus);
workbook.close();
// Creates an object representing a single row in excel
((Closeable) workbook).close();
if (isInsert)
{
String s1=String.valueOf(count);
session.setAttribute("d_created", s1+" Donor(s) Imported Successfully");
// return "redirect:DonorHome.htm?UploadSuccess=Success?no="+s1;
}
else
{
String s2=String.valueOf(dupCount);
session.setAttribute("d_error", s2+" Duplicate Donor Record(s) are Skipped");
// return "redirect:DonorHome.htm?UploadFail=fail";
}
} catch (Exception e) {
transactionManager.rollback(objTransStatus);
e.printStackTrace();
System.out.println(e);
logger.error(e);
logger.fatal("error in Donorcontroller class processDonorList method");
}
return "redirect:DonorHome";
}
@RequestMapping(value = "/getSchemeType")
public @ResponseBody String getSchemeType(ModelMap model,HttpServletRequest request,HttpSession session) throws JsonGenerationException, JsonMappingException, IOException {
String sJson=null;
String schemeTitle = null;
String num =null;
try{
schemeTitle = request.getParameter("schemeTitle");
num = objDonorsDao.getSchemeType(Integer.parseInt(schemeTitle));
System.out.println(num);
}catch(Exception e){
e.printStackTrace();
System.out.println(e);
logger.error(e);
logger.fatal("error in Controller class DonorController");
return "login";
}
return num;
}
@RequestMapping(value = "/deleteDonor")
public @ResponseBody List<Map<String, String>> deleteDonor( ModelMap model,HttpServletRequest request) {
System.out.println("Scheme controller...");
List<Map<String, String>> listOrderBeans = null;
ObjectMapper objectMapper = null;
String sJson = "";
String message =null;
String id = null;
try{
id = request.getParameter("id");
objDonorsDao.delete(Integer.parseInt(id));
listOrderBeans = objDonorsDao.getDonors(null);
if(listOrderBeans != null && listOrderBeans.size() > 0) {
objectMapper = new ObjectMapper();
sJson =objectMapper.writeValueAsString(listOrderBeans);
request.setAttribute("allOrders1", sJson);
// System.out.println(sJson);
}else{
objectMapper = new ObjectMapper();
sJson =objectMapper.writeValueAsString(listOrderBeans);
request.setAttribute("allOrders1", "''");
}
}catch(Exception e){
e.printStackTrace();
System.out.println(e);
logger.error(e);
logger.fatal("error in userLogin method in school Homecontroller class deleteStudent method");
}
return listOrderBeans;
}
@ModelAttribute("schemeTitle")
public Map<Integer, String> populateScheme() {
Map<Integer, String> statesMap = new LinkedHashMap<Integer, String>();
try {
String sSql = "select id,name from scheme order by name asc";
List<DonorBean> list= objDonorsDao.populate(sSql);
for(DonorBean bean: list){
statesMap.put(bean.getId(), bean.getName());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
return statesMap;
}
@ModelAttribute("telugumasalu")
public Map<Integer, String> populatetelugumasalu() {
Map<Integer, String> statesMap = new LinkedHashMap<Integer, String>();
try {
String sSql = "select id,name from months where schemetype=2";
List<DonorBean> list= objDonorsDao.populate(sSql);
for(DonorBean bean: list){
statesMap.put(bean.getId(), bean.getName());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
return statesMap;
}
@ModelAttribute("telugudays")
public Map<Integer, String> populatetelugudays() {
Map<Integer, String> statesMap = new LinkedHashMap<Integer, String>();
try {
String sSql = "select id,name from days where schemetype =2";
System.out.println(sSql);
List<DonorBean> list= objDonorsDao.populate(sSql);
for(DonorBean bean: list){
statesMap.put(bean.getId(), bean.getName());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
return statesMap;
}
@ModelAttribute("englishmonths")
public Map<Integer, String> populateteenglishmonths() {
Map<Integer, String> statesMap = new LinkedHashMap<Integer, String>();
try {
String sSql = "select id,name from months where schemetype=1";
List<DonorBean> list= objDonorsDao.populate(sSql);
for(DonorBean bean: list){
statesMap.put(bean.getId(), bean.getName());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
return statesMap;
}
@ModelAttribute("englishdays")
public Map<Integer, String> populateenglishdays() {
Map<Integer, String> statesMap = new LinkedHashMap<Integer, String>();
try {
String sSql = "select id,name from days where schemetype =1";
List<DonorBean> list= objDonorsDao.populate(sSql);
for(DonorBean bean: list){
statesMap.put(bean.getId(), bean.getName());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
return statesMap;
}
@ModelAttribute("schemetype")
public Map<Integer, String> populateschemetype() {
Map<Integer, String> statesMap = new LinkedHashMap<Integer, String>();
try {
String sSql = "select id,name from schemetype where id not in(3) order by name asc";
List<DonorBean> list= objDonorsDao.populate(sSql);
for(DonorBean bean: list){
statesMap.put(bean.getId(), bean.getName());
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
return statesMap;
}
}
| [
"a.kotaiah12@gmail.com"
] | a.kotaiah12@gmail.com |
2c6d6a7d1ff3b88e486f85eac8d5f82d3671d852 | 83326da7c5d4e020acd0d29bf2bd884f1f636f2e | /src/test/ExcelImageTest.java | 3a4ce512538b9a7a000362cec41a963b6eb8e8bc | [] | no_license | JinXiGuo/Test | 447475e41e8a8b8e64e3def3319c56321f48c7cc | 070bf5d1b89595fd934c6e54480f399e18fc98fd | refs/heads/master | 2021-07-21T07:11:46.807668 | 2016-10-10T00:59:40 | 2016-10-10T00:59:40 | 56,757,209 | 2 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,140 | java | package test;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
import org.apache.poi.hssf.usermodel.HSSFPatriarch;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class ExcelImageTest
{
public static void main(String[] args) {
FileOutputStream fileOut = null;
BufferedImage bufferImg = null;
//先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
try {
ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
bufferImg = ImageIO.read(new File("d:/t/t01.png"));
ImageIO.write(bufferImg, "jpg", byteArrayOut);
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet1 = wb.createSheet("test picture");
//画图的顶级管理器,一个sheet只能获取一个(一定要注意这点)
HSSFPatriarch patriarch = sheet1.createDrawingPatriarch();
//anchor主要用于设置图片的属性
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 255, 255,(short) 1, 1, (short) 5, 8);
anchor.setAnchorType(3);
//插入图片
patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG));
fileOut = new FileOutputStream("D:/Excel.xls");
// 写入excel文件
wb.write(fileOut);
System.out.println("----Excle文件已生成------");
} catch (Exception e) {
e.printStackTrace();
}finally{
if(fileOut != null){
try {
fileOut.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
| [
"347735154@qq.com"
] | 347735154@qq.com |
3c3a36987c4e23dd27a6275d59300cae1c756d3c | 8c1aeb190130e37dfd726f8c8dd413e9d9af4f54 | /tt-manager/tt-manager-service/src/main/java/com/ttmall/service/impl/PictureServiceImpl.java | 94042f3a8025604fa5e44235d0b62e9488fd2b14 | [] | no_license | LouisTuo/TTMall | 07b42eaa763794c96bc07d074a8b1267867110eb | abd4f5d034c4432907ac4998353b1977f0c57101 | refs/heads/master | 2021-09-10T01:50:18.250265 | 2018-03-20T16:19:53 | 2018-03-20T16:19:53 | 124,897,522 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,509 | java | package com.ttmall.service.impl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.databind.deser.Deserializers.Base;
import com.ttmall.service.PictureService;
import com.ttmall.utils.FastDFSClient;
import com.ttmall.utils.PictureResult;
/**
* 图片上传service
* @author Administrator
*
*/
@Service
public class PictureServiceImpl implements PictureService {
@Value("${IMAGE_SERVER_BASE_URL}")
private String IMAGE_SERVER_BASE_URL ;
@Override
public PictureResult uploadPic(MultipartFile picFile) {
PictureResult result = new PictureResult();
//判断图片是否为空
if(picFile.isEmpty()){
result.setError(1);
result.setMessage("图片为空");
return result;
}
//图片上传到服务器
try {
// 取图片扩展名
String originalFilename = picFile.getOriginalFilename();
String extName = originalFilename.substring(originalFilename.lastIndexOf(".")+1);
FastDFSClient client = new FastDFSClient("classpath:properties/client.conf");
String url = client.uploadFile(picFile.getBytes(), extName);
//把URL响应给客户端
result.setError(0);
//拼接图片服务器的IP
result.setUrl(IMAGE_SERVER_BASE_URL+url);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
result.setError(1);
result.setMessage("图片上传失败");
}
return result;
}
}
| [
"958053629@qq.com"
] | 958053629@qq.com |
2b50ffd4d1ef93fd2e23721fbaeac009392220c1 | b924c3e0c72f5e6abd9d2b62617162b8bc907f0e | /src/main/java/com/hz1202/miaosha/MiaoshaApplication.java | 2bcc03754635104941383b94c8854ffe3b37ccdc | [] | no_license | haoyuehong/miaosha | a3831ae34d6d4911c0b626ab0de31936fe35de8c | 38c88bd12a37b788d05c0307ea9294a6b5098aea | refs/heads/master | 2020-03-14T22:49:28.747750 | 2018-07-16T07:55:59 | 2018-07-16T07:55:59 | 131,829,668 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 507 | java | package com.hz1202.miaosha;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MiaoshaApplication /*extends SpringBootServletInitializer*/{
public static void main(String[] args) {
SpringApplication.run(MiaoshaApplication.class, args);
}
/*@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(MiaoshaApplication.class);
}*/
}
| [
"haoyuehong91@163.com"
] | haoyuehong91@163.com |
3a19c0ac92a0f80e655f63796102b28e4bb49893 | ceb527a2166e10dad480d6533c18785635bacbc1 | /kodilla-basic-tests/src/main/java/com/kodilla/abstracts/homework/employees/Developer.java | 5d4d1b733d68cf83a6ff1bd5d7ea849068a94169 | [] | no_license | awojciechowicz/adrian_wojciechowicz-kodilla_tester | 8347355b5fc3b37f0f2290266f4da096e7ad15ac | 101a1b48ca7fa86827d5d75634bad0dc906e1ee1 | refs/heads/master | 2023-05-04T23:58:00.441761 | 2021-05-24T20:49:53 | 2021-05-24T20:49:53 | 334,507,686 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 199 | java | package com.kodilla.abstracts.homework.employees;
public class Developer extends Job{
public Developer(double salary, String responsibilities) {
super(salary, responsibilities);
}
}
| [
"adrianwojciechowicz@gmail.com"
] | adrianwojciechowicz@gmail.com |
f6d84a96ce55bafb736e2ece981f0a8e37a100bc | f91290b43c675f3657994f0b0485c1fc1eac786a | /src/com/pdd/pop/sdk/http/api/request/PddDdkMerchantListGetRequest.java | 584d15a673745ffe0c42f01d1e1a57de6f47147f | [] | no_license | lywx215/http-client | 49462178ebbbd3469f798f53b16f5cb52db56d72 | 29871ab097e2e6dfc1bd2ab5f1a63b6146797c5a | refs/heads/master | 2021-10-09T09:01:07.389764 | 2018-12-25T05:06:11 | 2018-12-25T05:06:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,243 | java | package com.pdd.pop.sdk.http.api.request;
import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonProperty;
import com.pdd.pop.sdk.http.api.response.PddDdkMerchantListGetResponse;
import com.pdd.pop.sdk.http.HttpMethod;
import com.pdd.pop.sdk.http.PopBaseHttpRequest;
import com.pdd.pop.sdk.common.util.JsonUtil;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
public class PddDdkMerchantListGetRequest extends PopBaseHttpRequest<PddDdkMerchantListGetResponse>{
/**
* 店铺id
*/
@JsonProperty("mall_id_list")
private List<Long> mallIdList;
/**
* 店铺类型
*/
@JsonProperty("merchant_type_list")
private List<Integer> merchantTypeList;
/**
* 查询范围0----商品拼团价格区间;1----商品券后价价格区间;2----佣金比例区间;3----优惠券金额区间;4----加入多多进宝时间区间;5----销量区间;6----佣金金额区间
*/
@JsonProperty("query_range_str")
private Integer queryRangeStr;
/**
* 商品类目ID,使用pdd.goods.cats.get接口获取
*/
@JsonProperty("cat_id")
private Long catId;
/**
* 是否有优惠券 (0 所有;1 必须有券。)
*/
@JsonProperty("has_coupon")
private Integer hasCoupon;
/**
* 每页数量
*/
@JsonProperty("page_number")
private Integer pageNumber;
/**
* 分页数
*/
@JsonProperty("page_size")
private Integer pageSize;
/**
* 筛选范围
*/
@JsonProperty("range_vo_list")
private String rangeVoList;
@Override
public String getVersion() {
return "V1";
}
@Override
public String getDataType() {
return "JSON";
}
@Override
public String getType() {
return "pdd.ddk.merchant.list.get";
}
@Override
public HttpMethod getHttpMethod() {
return HttpMethod.POST;
}
@Override
public Class<PddDdkMerchantListGetResponse> getResponseClass() {
return PddDdkMerchantListGetResponse.class;
}
@Override
public Map<String, String> getParamsMap() {
Map<String, String> paramsMap = new TreeMap<String, String>();
paramsMap.put("version", getVersion());
paramsMap.put("data_type", getDataType());
paramsMap.put("type", getType());
paramsMap.put("timestamp", getTimestamp().toString());
if(mallIdList != null) {
paramsMap.put("mall_id_list", mallIdList.toString());
}
if(merchantTypeList != null) {
paramsMap.put("merchant_type_list", merchantTypeList.toString());
}
if(queryRangeStr != null) {
paramsMap.put("query_range_str", queryRangeStr.toString());
}
if(catId != null) {
paramsMap.put("cat_id", catId.toString());
}
if(hasCoupon != null) {
paramsMap.put("has_coupon", hasCoupon.toString());
}
if(pageNumber != null) {
paramsMap.put("page_number", pageNumber.toString());
}
if(pageSize != null) {
paramsMap.put("page_size", pageSize.toString());
}
if(rangeVoList != null) {
paramsMap.put("range_vo_list", rangeVoList.toString());
}
return paramsMap;
}
public void setMallIdList(List<Long> mallIdList) {
this.mallIdList = mallIdList;
}
public void setMerchantTypeList(List<Integer> merchantTypeList) {
this.merchantTypeList = merchantTypeList;
}
public void setQueryRangeStr(Integer queryRangeStr) {
this.queryRangeStr = queryRangeStr;
}
public void setCatId(Long catId) {
this.catId = catId;
}
public void setHasCoupon(Integer hasCoupon) {
this.hasCoupon = hasCoupon;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public void setRangeVoList(String rangeVoList) {
this.rangeVoList = rangeVoList;
}
} | [
"lenzhao@yahoo.com"
] | lenzhao@yahoo.com |
528234fe4df31915fdd857cf3b6a151cd305fb26 | fd86b4973723b99962b892e90da49750b6d3b88e | /src/main/java/ru/zettai/controllers/PeopleController.java | 4c6b9d4f2a8edca4164df6c6b0901e8c1ae81bde | [] | no_license | Zettai-777/First_CRUD_App | d05c5b4292f7e3c4eac4d0cde0dc814a16e4d9f9 | e9fb9a52846be91d8963ac6c911eb4bd3a3f9e71 | refs/heads/master | 2023-02-27T00:36:13.117040 | 2021-01-22T13:14:36 | 2021-01-22T13:14:36 | 322,668,168 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,081 | java | package ru.zettai.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import ru.zettai.dao.PersonDAO;
import ru.zettai.models.Person;
import javax.validation.Valid;
@Controller
@RequestMapping("/people")
public class PeopleController {
private final PersonDAO personDAO;
@Autowired
public PeopleController(PersonDAO personDAO) {
this.personDAO = personDAO;
}
@GetMapping()
//получаем всех людей из DAO и передадим на отображение в представление
public String index(Model model){
model.addAttribute("people", personDAO.index());
return "people/index";
}
@GetMapping("/{id}")
//получаем одного человека по id из DAO и отобразим его
public String show(@PathVariable("id") int id, Model model){
model.addAttribute("person", personDAO.show(id));
return "people/show";
}
@GetMapping("/new")
//получаем из браузера по указанному адресу html форму для создания нового человека
public String newPerson(@ModelAttribute("person") Person person){
return "people/new";
}
@PostMapping()
//создаём нового человека по полученной html форме и передаём его в базу данных
public String create(@ModelAttribute("person") @Valid Person person, BindingResult bindingResult){
//проверка на ошибки валидации
if(bindingResult.hasErrors())
return "people/new";
personDAO.save(person);
return "redirect:/people"; //перенаправление на базовую страницу со всеми людьми с помошью redirect
}
@GetMapping("/{id}/edit")
//получаем html страницу человека для редактирования по его id номеру
public String edit(Model model, @PathVariable("id") int id){
model.addAttribute("person", personDAO.show(id));
return "people/edit";
}
@PatchMapping("/{id}")
// вытаскиваем из модели форму человека и из адреса его id, затем обновляем в DAO информацию по человеку
public String update(@ModelAttribute("person") @Valid Person person, BindingResult bindingResult, @PathVariable("id") int id){
if(bindingResult.hasErrors())
return "people/edit";
personDAO.update(id, person);
return "redirect:/people";
}
@DeleteMapping("/{id}")
//удаление человека по его id
public String delete(@PathVariable("id") int id){
personDAO.delete(id);
return "redirect:/people";
}
}
| [
"zettai777@gmail.com"
] | zettai777@gmail.com |
6320dfb48673e24f12a0155ace0a2653d56fd33b | 34ec49768395c202e3a29d7649f028338e3a62b7 | /app/src/main/java/com/example/mapdemo/EventsDemoActivity.java | e3c306f5ba46220076036d879126b1af4188572b | [] | no_license | cpufan44/MapsDemo | 88deb6cbf7f676173d13a63e87cc50cc60719340 | 0cfbde10e91c48d55bc4d3ff6adb8ae479f03178 | refs/heads/master | 2020-12-30T08:14:07.442483 | 2020-02-07T12:59:17 | 2020-02-07T12:59:17 | 238,922,943 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,620 | java | /*
* Copyright (C) 2012 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.example.mapdemo;
import com.google.android.libraries.maps.GoogleMap;
import com.google.android.libraries.maps.GoogleMap.OnCameraIdleListener;
import com.google.android.libraries.maps.GoogleMap.OnMapClickListener;
import com.google.android.libraries.maps.GoogleMap.OnMapLongClickListener;
import com.google.android.libraries.maps.OnMapReadyCallback;
import com.google.android.libraries.maps.SupportMapFragment;
import com.google.android.libraries.maps.model.LatLng;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
/**
* This shows how to listen to some {@link GoogleMap} events.
*/
public class EventsDemoActivity extends AppCompatActivity
implements OnMapClickListener, OnMapLongClickListener, OnCameraIdleListener,
OnMapReadyCallback {
private TextView mTapTextView;
private TextView mCameraTextView;
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.events_demo);
mTapTextView = (TextView) findViewById(R.id.tap_text);
mCameraTextView = (TextView) findViewById(R.id.camera_text);
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap map) {
mMap = map;
mMap.setOnMapClickListener(this);
mMap.setOnMapLongClickListener(this);
mMap.setOnCameraIdleListener(this);
}
@Override
public void onMapClick(LatLng point) {
mTapTextView.setText("tapped, point=" + point);
}
@Override
public void onMapLongClick(LatLng point) {
mTapTextView.setText("long pressed, point=" + point);
}
@Override
public void onCameraIdle() {
mCameraTextView.setText(mMap.getCameraPosition().toString());
}
}
| [
"anzor-kharazishvili@gmail.com"
] | anzor-kharazishvili@gmail.com |
f00a439000b616b99d5a81563e5b2022e13c7a93 | f4f987371c909d8d69e32b838dc40edd77f0d574 | /app/src/main/java/fragment/TopFragment.java | b59f761d8c534af6297c599190716f5c8af6270c | [] | no_license | itguang/GooglePlay | 80fdc0b2774624bea15bd5ccd5164da6686bc2ad | f7ce212db884969eaf2c36c2f0f826268e8d4aee | refs/heads/master | 2021-01-16T20:38:04.607038 | 2016-08-03T14:07:47 | 2016-08-03T14:07:47 | 64,395,886 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | package fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class TopFragment extends BaseFragment {
@Override
protected LoadResult load() {
return LoadResult.error;
}
@Override
public View createSuccessView() {
TextView view = new TextView(getActivity());
view.setText("我是TopFragment");
return view;
}
}
| [
"1445037803@qq.com"
] | 1445037803@qq.com |
84342cd8635564fbff01c9dca07d19447f0501c3 | f584dd65434bee47f2b437c9ed7dac05ab5b43c6 | /src/main/java/oscarf/springtest/User.java | 902f46f9c3582c896b2542fbd0b9470cdaa3c1e4 | [] | no_license | oscarfmdc/SpringTests | 563d36e1d01589904e97b218b0ae8ff0eedf3b7e | 621d323e81afe47cd5bd2815cef5390609b3eb6e | refs/heads/master | 2021-07-07T04:19:14.381791 | 2017-10-05T18:58:22 | 2017-10-05T18:58:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 783 | java | package oscarf.springtest;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity // This tells Hibernate to make a table out of this class
public class User {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Integer id;
private String name;
private String email;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
} | [
"k3ther@gmail.com"
] | k3ther@gmail.com |
190a04c131455824224a4fcbf4d5522e35bac0c7 | 554bae15b58e90082a43aff0adaaf23bb2db21e9 | /src/test/java/com/gui/automation/test/TestTitleOfThePage.java | e3b02f6b638e70fb350e096bc66d36b39bda1925 | [] | no_license | yogeshpatil10/GUIAutomation | 88db1caada325bb217a918b57095c786af49b6da | 7c27ff166e08fb9172cdaf789efcdbf170605b24 | refs/heads/master | 2023-06-14T05:58:20.312098 | 2021-07-10T17:17:44 | 2021-07-10T17:17:44 | 382,945,363 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 934 | java | package com.gui.automation.test;
import static org.testng.Assert.assertEquals;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.testng.annotations.Test;
import com.automate.web.firstcode.AbstractLaunchChromeBrowser;
public class TestTitleOfThePage extends AbstractLaunchChromeBrowser {
@Test
public void getTitleOfPage() {
Logger logger = LogManager.getLogger(TestTitleOfThePage.class);
test = report.createTest("Title Of The Page Test").assignAuthor("Yogesh").assignCategory("Smoke");
// driver.get("https://www.rahulshettyacademy.com/AutomationPractice/");
driver.get("https://www.rahulshettyacademy.com/AutomationPractice/");
logger.info("Practice page is launched");
driver.manage().window().maximize();
sleep(2);
String title = driver.getTitle();
assertEquals(title, "Practice Page");
logger.info("Page title has been validated successfully");
}
}
| [
"yogesh10patil@gmail.com"
] | yogesh10patil@gmail.com |
43359fd0770bc21e9e47d0d49a30982125a96d63 | d2bb7852c5fc6e8365bf1c9f2c3a8f1ad726bfa6 | /src/main/java/xsir/BrokenCalculator.java | 831ca73473268c27631e437f48219872f3fdb3cd | [] | no_license | xsirfly/leetcode | 6e51953e5c6666bebc4337f4ddd54e894cc503fe | c04fb76616eac04dc95d2825971a7d96ad524a17 | refs/heads/master | 2021-01-01T16:58:29.444484 | 2020-03-27T00:35:30 | 2020-03-27T00:35:30 | 97,964,685 | 1 | 0 | null | 2020-10-13T00:13:38 | 2017-07-21T15:55:25 | Java | UTF-8 | Java | false | false | 947 | java | package xsir;
public class BrokenCalculator {
public static int brokenCalc(int X, int Y) {
int cur = Y, target = X, res = 0;
while (cur != target) {
if (cur > target * 2) {
cur = cur % 2 == 0 ? cur / 2 : cur + 1;
} else if (cur < target) {
cur++;
} else {
if (cur % 2 != 0) {
cur++;
} else {
int m = (target - cur / 2) + 1;
int n = (target * 2 - cur) + 1;
res += Math.min(m, n);
break;
}
}
res++;
}
return res;
}
public static void main(String[] args) {
System.out.println(brokenCalc(5, 8));
System.out.println(brokenCalc(3, 10));
System.out.println(brokenCalc(1024, 1));
System.out.println(brokenCalc(1, 1000000000));
}
}
| [
"zhangcong.xman@bytedance.com"
] | zhangcong.xman@bytedance.com |
9fd0abb2f2e159e84d9bdae581cdfab5226c8f53 | 70c7c9e1ecc96002f2028085865357dd752f5ada | /java8/src/java8/ScanEx2.java | 446dbd14d1aa8ede33875282192fc58465a63c4f | [] | no_license | pc1111/java8 | 0ef26ab8fb40d1ee68c100e1dfbacd24ade708cf | e07a8b76726384c0a166f2f6b179164ded7a7dc8 | refs/heads/master | 2021-03-25T02:56:19.952291 | 2020-04-13T06:18:21 | 2020-04-13T06:18:21 | 247,583,967 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 415 | java | package java8;
import java.*;
import java.util.Scanner;
public class ScanEx2 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("이름을 입력해 주세요. : ");
String text = s.next();
System.out.println(text);
System.out.println(s.hasNext());
System.out.println(s.next());
System.out.println(s.hasNext());
s.close();
}
}
| [
"seunghoon.ryu.dev@gmail.com"
] | seunghoon.ryu.dev@gmail.com |
fa6007d065eb80cac478e206098c40042e4af1ae | 1de7d1c152d7a9a7d6bd5d7b3e3dedf4fbc8e8c2 | /IRCBot/src/main/java/twitchplays/irc/bot/chat/Message.java | cdbe4e7046e19f7dbe226278ef152097fdd821e8 | [] | no_license | MAkcanca/twitchplaysreborn | 8975342e6404066a7ad50f6d6a1b8ae003257c82 | 12c5fa3e1737a7c534d0ee655194400af6446f10 | refs/heads/master | 2021-01-21T18:39:02.663973 | 2016-06-19T14:00:48 | 2016-06-19T14:00:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,158 | java | package twitchplays.irc.bot.chat;
/**
* Chat message.
*
* @author Kevin Buisson
*/
public class Message {
/** Message nickname */
private String nickname;
/** Message text */
private String message;
/** Message time */
private long time;
/**
* Creates a new message.
*
* @param nickname
* message nickname
* @param message
* message text
* @param time
* message time
*/
public Message(String nickname, String message, long time)
{
this.nickname = nickname;
this.message = message;
this.time = time;
}
/**
* Gets nickname.
*
* @return the nickname
*/
public String getNickname()
{
return nickname;
}
/**
* Gets message.
*
* @return the message
*/
public String getMessage()
{
return message;
}
/**
* Gets time.
*
* @return the time
*/
public long getTime()
{
return time;
}
@Override
public String toString()
{
return nickname + ":" + message;
}
}
| [
"buisson.kevin2@gmail.com"
] | buisson.kevin2@gmail.com |
febd9dc58c4e02d5af6f754851818b54c4135288 | 4dd0d3dfa9ebb4c9aebe601a4ba5b2f97f89f488 | /java/org/apache/jasper/xmlparser/UTF8Reader.java | 6f8f642f6844ab5cb9eae2ac43501f0093327865 | [
"Zlib",
"LZMA-exception",
"Apache-2.0",
"bzip2-1.0.6",
"CPL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.0",
"EPL-1.0"
] | permissive | yiluxiangnan820/tomcat7-research | ae96a5748b18ee0aedc0134d10ba1842f7f56c80 | 1a98b983d813cf545fe0cbe22da846ed73f035db | refs/heads/master | 2023-07-27T20:06:31.134189 | 2023-05-06T06:19:46 | 2023-05-06T06:19:46 | 230,877,104 | 1 | 0 | Apache-2.0 | 2023-07-07T21:57:12 | 2019-12-30T08:21:36 | Java | UTF-8 | Java | false | false | 21,677 | 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.jasper.xmlparser;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.UTFDataFormatException;
import org.apache.jasper.compiler.Localizer;
/**
* @author Andy Clark, IBM
*/
public class UTF8Reader
extends Reader {
private final org.apache.juli.logging.Log log=
org.apache.juli.logging.LogFactory.getLog( UTF8Reader.class );
// debugging
/** Debug read. */
private static final boolean DEBUG_READ = false;
//
// Data
//
/** Input stream. */
protected InputStream fInputStream;
/** Byte buffer. */
protected byte[] fBuffer;
/** Offset into buffer. */
protected int fOffset;
/** Surrogate character. */
private int fSurrogate = -1;
//
// Constructors
//
/**
* Constructs a UTF-8 reader from the specified input stream,
* buffer size and MessageFormatter.
*
* @param inputStream The input stream.
* @param size The initial buffer size.
*/
public UTF8Reader(InputStream inputStream, int size) {
fInputStream = inputStream;
fBuffer = new byte[size];
}
//
// Reader methods
//
/**
* Read a single character. This method will block until a character is
* available, an I/O error occurs, or the end of the stream is reached.
*
* <p> Subclasses that intend to support efficient single-character input
* should override this method.
*
* @return The character read, as an integer in the range 0 to 16383
* (<code>0x00-0xffff</code>), or -1 if the end of the stream has
* been reached
*
* @exception IOException If an I/O error occurs
*/
@Override
public int read() throws IOException {
// decode character
int c = fSurrogate;
if (fSurrogate == -1) {
// NOTE: We use the index into the buffer if there are remaining
// bytes from the last block read. -Ac
int index = 0;
// get first byte
int b0 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b0 == -1) {
return -1;
}
// UTF-8: [0xxx xxxx]
// Unicode: [0000 0000] [0xxx xxxx]
if (b0 < 0x80) {
c = (char)b0;
}
// UTF-8: [110y yyyy] [10xx xxxx]
// Unicode: [0000 0yyy] [yyxx xxxx]
else if ((b0 & 0xE0) == 0xC0) {
int b1 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b1 == -1) {
expectedByte(2, 2);
}
if ((b1 & 0xC0) != 0x80) {
invalidByte(2, 2);
}
c = ((b0 << 6) & 0x07C0) | (b1 & 0x003F);
}
// UTF-8: [1110 zzzz] [10yy yyyy] [10xx xxxx]
// Unicode: [zzzz yyyy] [yyxx xxxx]
else if ((b0 & 0xF0) == 0xE0) {
int b1 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b1 == -1) {
expectedByte(2, 3);
}
if ((b1 & 0xC0) != 0x80) {
invalidByte(2, 3);
}
int b2 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b2 == -1) {
expectedByte(3, 3);
}
if ((b2 & 0xC0) != 0x80) {
invalidByte(3, 3);
}
c = ((b0 << 12) & 0xF000) | ((b1 << 6) & 0x0FC0) |
(b2 & 0x003F);
}
// UTF-8: [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
// Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
// [1101 11yy] [yyxx xxxx] (low surrogate)
// * uuuuu = wwww + 1
else if ((b0 & 0xF8) == 0xF0) {
int b1 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b1 == -1) {
expectedByte(2, 4);
}
if ((b1 & 0xC0) != 0x80) {
invalidByte(2, 3);
}
int b2 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b2 == -1) {
expectedByte(3, 4);
}
if ((b2 & 0xC0) != 0x80) {
invalidByte(3, 3);
}
int b3 = index == fOffset
? fInputStream.read() : fBuffer[index++] & 0x00FF;
if (b3 == -1) {
expectedByte(4, 4);
}
if ((b3 & 0xC0) != 0x80) {
invalidByte(4, 4);
}
int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003);
if (uuuuu > 0x10) {
invalidSurrogate(uuuuu);
}
int wwww = uuuuu - 1;
int hs = 0xD800 |
((wwww << 6) & 0x03C0) | ((b1 << 2) & 0x003C) |
((b2 >> 4) & 0x0003);
int ls = 0xDC00 | ((b2 << 6) & 0x03C0) | (b3 & 0x003F);
c = hs;
fSurrogate = ls;
}
// error
else {
invalidByte(1, 1);
}
}
// use surrogate
else {
fSurrogate = -1;
}
// return character
if (DEBUG_READ) {
if (log.isDebugEnabled())
log.debug("read(): 0x"+Integer.toHexString(c));
}
return c;
} // read():int
/**
* Read characters into a portion of an array. This method will block
* until some input is available, an I/O error occurs, or the end of the
* stream is reached.
*
* @param ch Destination buffer
* @param offset Offset at which to start storing characters
* @param length Maximum number of characters to read
*
* @return The number of characters read, or -1 if the end of the
* stream has been reached
*
* @exception IOException If an I/O error occurs
*/
@Override
public int read(char ch[], int offset, int length) throws IOException {
// handle surrogate
int out = offset;
if (fSurrogate != -1) {
ch[offset + 1] = (char)fSurrogate;
fSurrogate = -1;
length--;
out++;
}
// read bytes
int count = 0;
if (fOffset == 0) {
// adjust length to read
if (length > fBuffer.length) {
length = fBuffer.length;
}
// perform read operation
count = fInputStream.read(fBuffer, 0, length);
if (count == -1) {
return -1;
}
count += out - offset;
}
// skip read; last character was in error
// NOTE: Having an offset value other than zero means that there was
// an error in the last character read. In this case, we have
// skipped the read so we don't consume any bytes past the
// error. By signaling the error on the next block read we
// allow the method to return the most valid characters that
// it can on the previous block read. -Ac
else {
count = fOffset;
fOffset = 0;
}
// convert bytes to characters
final int total = count;
for (int in = 0; in < total; in++) {
int b0 = fBuffer[in] & 0x00FF;
// UTF-8: [0xxx xxxx]
// Unicode: [0000 0000] [0xxx xxxx]
if (b0 < 0x80) {
ch[out++] = (char)b0;
continue;
}
// UTF-8: [110y yyyy] [10xx xxxx]
// Unicode: [0000 0yyy] [yyxx xxxx]
if ((b0 & 0xE0) == 0xC0) {
int b1 = -1;
if (++in < total) {
b1 = fBuffer[in] & 0x00FF;
}
else {
b1 = fInputStream.read();
if (b1 == -1) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fOffset = 1;
return out - offset;
}
expectedByte(2, 2);
}
count++;
}
if ((b1 & 0xC0) != 0x80) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fOffset = 2;
return out - offset;
}
invalidByte(2, 2);
}
int c = ((b0 << 6) & 0x07C0) | (b1 & 0x003F);
ch[out++] = (char)c;
count -= 1;
continue;
}
// UTF-8: [1110 zzzz] [10yy yyyy] [10xx xxxx]
// Unicode: [zzzz yyyy] [yyxx xxxx]
if ((b0 & 0xF0) == 0xE0) {
int b1 = -1;
if (++in < total) {
b1 = fBuffer[in] & 0x00FF;
}
else {
b1 = fInputStream.read();
if (b1 == -1) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fOffset = 1;
return out - offset;
}
expectedByte(2, 3);
}
count++;
}
if ((b1 & 0xC0) != 0x80) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fOffset = 2;
return out - offset;
}
invalidByte(2, 3);
}
int b2 = -1;
if (++in < total) {
b2 = fBuffer[in] & 0x00FF;
}
else {
b2 = fInputStream.read();
if (b2 == -1) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fOffset = 2;
return out - offset;
}
expectedByte(3, 3);
}
count++;
}
if ((b2 & 0xC0) != 0x80) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fBuffer[2] = (byte)b2;
fOffset = 3;
return out - offset;
}
invalidByte(3, 3);
}
int c = ((b0 << 12) & 0xF000) | ((b1 << 6) & 0x0FC0) |
(b2 & 0x003F);
ch[out++] = (char)c;
count -= 2;
continue;
}
// UTF-8: [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
// Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
// [1101 11yy] [yyxx xxxx] (low surrogate)
// * uuuuu = wwww + 1
if ((b0 & 0xF8) == 0xF0) {
int b1 = -1;
if (++in < total) {
b1 = fBuffer[in] & 0x00FF;
}
else {
b1 = fInputStream.read();
if (b1 == -1) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fOffset = 1;
return out - offset;
}
expectedByte(2, 4);
}
count++;
}
if ((b1 & 0xC0) != 0x80) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fOffset = 2;
return out - offset;
}
invalidByte(2, 4);
}
int b2 = -1;
if (++in < total) {
b2 = fBuffer[in] & 0x00FF;
}
else {
b2 = fInputStream.read();
if (b2 == -1) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fOffset = 2;
return out - offset;
}
expectedByte(3, 4);
}
count++;
}
if ((b2 & 0xC0) != 0x80) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fBuffer[2] = (byte)b2;
fOffset = 3;
return out - offset;
}
invalidByte(3, 4);
}
int b3 = -1;
if (++in < total) {
b3 = fBuffer[in] & 0x00FF;
}
else {
b3 = fInputStream.read();
if (b3 == -1) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fBuffer[2] = (byte)b2;
fOffset = 3;
return out - offset;
}
expectedByte(4, 4);
}
count++;
}
if ((b3 & 0xC0) != 0x80) {
if (out > offset) {
fBuffer[0] = (byte)b0;
fBuffer[1] = (byte)b1;
fBuffer[2] = (byte)b2;
fBuffer[3] = (byte)b3;
fOffset = 4;
return out - offset;
}
invalidByte(4, 4);
}
// decode bytes into surrogate characters
int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003);
if (uuuuu > 0x10) {
invalidSurrogate(uuuuu);
}
int wwww = uuuuu - 1;
int zzzz = b1 & 0x000F;
int yyyyyy = b2 & 0x003F;
int xxxxxx = b3 & 0x003F;
int hs = 0xD800 | ((wwww << 6) & 0x03C0) | (zzzz << 2) | (yyyyyy >> 4);
int ls = 0xDC00 | ((yyyyyy << 6) & 0x03C0) | xxxxxx;
// set characters
ch[out++] = (char)hs;
ch[out++] = (char)ls;
count -= 2;
continue;
}
// error
if (out > offset) {
fBuffer[0] = (byte)b0;
fOffset = 1;
return out - offset;
}
invalidByte(1, 1);
}
// return number of characters converted
if (DEBUG_READ) {
if (log.isDebugEnabled())
log.debug("read(char[],"+offset+','+length+"): count="+count);
}
return count;
} // read(char[],int,int)
/**
* Skip characters. This method will block until some characters are
* available, an I/O error occurs, or the end of the stream is reached.
*
* @param n The number of characters to skip
*
* @return The number of characters actually skipped
*
* @exception IOException If an I/O error occurs
*/
@Override
public long skip(long n) throws IOException {
long remaining = n;
final char[] ch = new char[fBuffer.length];
do {
int length = ch.length < remaining ? ch.length : (int)remaining;
int count = read(ch, 0, length);
if (count > 0) {
remaining -= count;
}
else {
break;
}
} while (remaining > 0);
long skipped = n - remaining;
return skipped;
} // skip(long):long
/**
* Tell whether this stream is ready to be read.
*
* @return True if the next read() is guaranteed not to block for input,
* false otherwise. Note that returning false does not guarantee that the
* next read will block.
*
* @exception IOException If an I/O error occurs
*/
@Override
public boolean ready() throws IOException {
return false;
} // ready()
/**
* Tell whether this stream supports the mark() operation.
*/
@Override
public boolean markSupported() {
return false;
} // markSupported()
/**
* Mark the present position in the stream. Subsequent calls to reset()
* will attempt to reposition the stream to this point. Not all
* character-input streams support the mark() operation.
*
* @param readAheadLimit Limit on the number of characters that may be
* read while still preserving the mark. After
* reading this many characters, attempting to
* reset the stream may fail.
*
* @exception IOException If the stream does not support mark(),
* or if some other I/O error occurs
*/
@Override
public void mark(int readAheadLimit) throws IOException {
throw new IOException(
Localizer.getMessage("jsp.error.xml.operationNotSupported",
"mark()", "UTF-8"));
}
/**
* Reset the stream. If the stream has been marked, then attempt to
* reposition it at the mark. If the stream has not been marked, then
* attempt to reset it in some way appropriate to the particular stream,
* for example by repositioning it to its starting point. Not all
* character-input streams support the reset() operation, and some support
* reset() without supporting mark().
*
* @exception IOException If the stream has not been marked,
* or if the mark has been invalidated,
* or if the stream does not support reset(),
* or if some other I/O error occurs
*/
@Override
public void reset() throws IOException {
fOffset = 0;
fSurrogate = -1;
} // reset()
/**
* Close the stream. Once a stream has been closed, further read(),
* ready(), mark(), or reset() invocations will throw an IOException.
* Closing a previously-closed stream, however, has no effect.
*
* @exception IOException If an I/O error occurs
*/
@Override
public void close() throws IOException {
fInputStream.close();
} // close()
//
// Private methods
//
/** Throws an exception for expected byte. */
private void expectedByte(int position, int count)
throws UTFDataFormatException {
throw new UTFDataFormatException(
Localizer.getMessage("jsp.error.xml.expectedByte",
Integer.toString(position),
Integer.toString(count)));
}
/** Throws an exception for invalid byte. */
private void invalidByte(int position, int count)
throws UTFDataFormatException {
throw new UTFDataFormatException(
Localizer.getMessage("jsp.error.xml.invalidByte",
Integer.toString(position),
Integer.toString(count)));
}
/** Throws an exception for invalid surrogate bits. */
private void invalidSurrogate(int uuuuu) throws UTFDataFormatException {
throw new UTFDataFormatException(
Localizer.getMessage("jsp.error.xml.invalidHighSurrogate",
Integer.toHexString(uuuuu)));
}
} // class UTF8Reader
| [
"hhg_gwh@163.com"
] | hhg_gwh@163.com |
5a0e2f8c73b17201e079910bf618278696f4357e | d5ddbe2bc8703d284357cf9d1618b70d78b71b08 | /10-企业权限管理系统/10-企业权限管理系统/已完成项目代码以及Sql/heima_ssm_Enter_Pri_Management/heima_ssm_web/src/main/java/com/itheima/ssm/controller/RoleController.java | 25582d19cf69313e4e779a4227b1be25717f5f35 | [] | no_license | KCWang152253/SSM_Enter_Pri_Man | a41658c6caac681ead6154bb6351858823273c86 | 19390a527c869de684e33dfb6050281a046978c5 | refs/heads/main | 2023-02-08T22:43:32.074038 | 2021-01-03T05:50:28 | 2021-01-03T05:50:28 | 326,306,036 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,586 | java | package com.itheima.ssm.controller;
import com.itheima.ssm.domain.Permission;
import com.itheima.ssm.domain.Role;
import com.itheima.ssm.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
/**
* @Author panghl
* @Date 2020/11/7 21:55
* @Description TODO
**/
@Controller
@RequestMapping("/role")
public class RoleController {
@Autowired
private IRoleService iRoleService;
//根据roleId查询role,并查询出可以添加的权限
@RequestMapping("/findRoleByIdAndPermission.do")
public ModelAndView findRoleByIdAndPermission(@RequestParam(value = "roleId",required = true) String roleId) throws Exception {
ModelAndView mv = new ModelAndView();
Role role = iRoleService.findById(roleId);
mv.addObject("role",role);
List<Permission> permissionList = iRoleService.findOtherPermission(roleId);
mv.addObject("permissionList",permissionList);
mv.setViewName("role-permission-add");
return mv;
}
@RequestMapping("/addPermissionToRole")
public String addRoleToUser(@RequestParam("roleId") String roleId,
@RequestParam("ids") String[] permissionIds){
iRoleService.addRoleToUser(roleId,permissionIds);
return "redirect:/role/findAll.do";
}
@RequestMapping("/findAll.do")
public ModelAndView findAll() throws Exception {
ModelAndView mv = new ModelAndView();
List<Role> roleList = iRoleService.findAll();
mv.addObject("roleList",roleList);
mv.setViewName("role-list");
return mv;
}
@RequestMapping("/save.do")
public String save(Role role) throws Exception{
iRoleService.save(role);
return "redirect:/role/findAll.do";
}
@RequestMapping("/findById.do")
public ModelAndView findById(String id) throws Exception{
ModelAndView mv = new ModelAndView();
Role role = iRoleService.findById(id);
mv.addObject("role",role);
mv.setViewName("role-show");
return mv;
}
@RequestMapping("/deleteRole.do")
public String deleteRole(String id) throws Exception{
iRoleService.deleteRoleById(id);
return "redirect:/role/findAll.do";
}
}
| [
"2747962529@qq.com"
] | 2747962529@qq.com |
a735d8cc660b53986e61b0770ed872685bd55302 | 934d7c57c541dff18ef3a73b59eee3e1c15a2e91 | /app/build/generated/source/r/debug/android/support/design/R.java | acc5cd770ea1b27ba9d0a63965ae636426e7d80a | [] | no_license | Rex7/GstCalculator | 0340f49af0590215dce2571e6552f8fb9337769a | f86ff4fac937db79bda0e9a596dce95a73e17edb | refs/heads/master | 2020-03-11T08:14:03.867625 | 2018-04-17T09:20:14 | 2018-04-17T09:20:14 | 129,878,418 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 144,910 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.design;
public final class R {
public static final class anim {
public static final int abc_fade_in = 0x7f010000;
public static final int abc_fade_out = 0x7f010001;
public static final int abc_grow_fade_in_from_bottom = 0x7f010002;
public static final int abc_popup_enter = 0x7f010003;
public static final int abc_popup_exit = 0x7f010004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f010005;
public static final int abc_slide_in_bottom = 0x7f010006;
public static final int abc_slide_in_top = 0x7f010007;
public static final int abc_slide_out_bottom = 0x7f010008;
public static final int abc_slide_out_top = 0x7f010009;
public static final int design_bottom_sheet_slide_in = 0x7f01000a;
public static final int design_bottom_sheet_slide_out = 0x7f01000b;
public static final int design_snackbar_in = 0x7f01000c;
public static final int design_snackbar_out = 0x7f01000d;
public static final int tooltip_enter = 0x7f01000e;
public static final int tooltip_exit = 0x7f01000f;
}
public static final class animator {
public static final int design_appbar_state_list_animator = 0x7f020000;
}
public static final class attr {
public static final int actionBarDivider = 0x7f030000;
public static final int actionBarItemBackground = 0x7f030001;
public static final int actionBarPopupTheme = 0x7f030002;
public static final int actionBarSize = 0x7f030003;
public static final int actionBarSplitStyle = 0x7f030004;
public static final int actionBarStyle = 0x7f030005;
public static final int actionBarTabBarStyle = 0x7f030006;
public static final int actionBarTabStyle = 0x7f030007;
public static final int actionBarTabTextStyle = 0x7f030008;
public static final int actionBarTheme = 0x7f030009;
public static final int actionBarWidgetTheme = 0x7f03000a;
public static final int actionButtonStyle = 0x7f03000b;
public static final int actionDropDownStyle = 0x7f03000c;
public static final int actionLayout = 0x7f03000d;
public static final int actionMenuTextAppearance = 0x7f03000e;
public static final int actionMenuTextColor = 0x7f03000f;
public static final int actionModeBackground = 0x7f030010;
public static final int actionModeCloseButtonStyle = 0x7f030011;
public static final int actionModeCloseDrawable = 0x7f030012;
public static final int actionModeCopyDrawable = 0x7f030013;
public static final int actionModeCutDrawable = 0x7f030014;
public static final int actionModeFindDrawable = 0x7f030015;
public static final int actionModePasteDrawable = 0x7f030016;
public static final int actionModePopupWindowStyle = 0x7f030017;
public static final int actionModeSelectAllDrawable = 0x7f030018;
public static final int actionModeShareDrawable = 0x7f030019;
public static final int actionModeSplitBackground = 0x7f03001a;
public static final int actionModeStyle = 0x7f03001b;
public static final int actionModeWebSearchDrawable = 0x7f03001c;
public static final int actionOverflowButtonStyle = 0x7f03001d;
public static final int actionOverflowMenuStyle = 0x7f03001e;
public static final int actionProviderClass = 0x7f03001f;
public static final int actionViewClass = 0x7f030020;
public static final int activityChooserViewStyle = 0x7f030021;
public static final int alertDialogButtonGroupStyle = 0x7f030022;
public static final int alertDialogCenterButtons = 0x7f030023;
public static final int alertDialogStyle = 0x7f030024;
public static final int alertDialogTheme = 0x7f030025;
public static final int allowStacking = 0x7f030026;
public static final int alpha = 0x7f030027;
public static final int alphabeticModifiers = 0x7f030028;
public static final int arrowHeadLength = 0x7f030029;
public static final int arrowShaftLength = 0x7f03002a;
public static final int autoCompleteTextViewStyle = 0x7f03002b;
public static final int autoSizeMaxTextSize = 0x7f03002c;
public static final int autoSizeMinTextSize = 0x7f03002d;
public static final int autoSizePresetSizes = 0x7f03002e;
public static final int autoSizeStepGranularity = 0x7f03002f;
public static final int autoSizeTextType = 0x7f030030;
public static final int background = 0x7f030031;
public static final int backgroundSplit = 0x7f030032;
public static final int backgroundStacked = 0x7f030033;
public static final int backgroundTint = 0x7f030034;
public static final int backgroundTintMode = 0x7f030035;
public static final int barLength = 0x7f030036;
public static final int behavior_autoHide = 0x7f030037;
public static final int behavior_hideable = 0x7f030038;
public static final int behavior_overlapTop = 0x7f030039;
public static final int behavior_peekHeight = 0x7f03003a;
public static final int behavior_skipCollapsed = 0x7f03003b;
public static final int borderWidth = 0x7f03003c;
public static final int borderlessButtonStyle = 0x7f03003d;
public static final int bottomSheetDialogTheme = 0x7f03003e;
public static final int bottomSheetStyle = 0x7f03003f;
public static final int buttonBarButtonStyle = 0x7f030040;
public static final int buttonBarNegativeButtonStyle = 0x7f030041;
public static final int buttonBarNeutralButtonStyle = 0x7f030042;
public static final int buttonBarPositiveButtonStyle = 0x7f030043;
public static final int buttonBarStyle = 0x7f030044;
public static final int buttonGravity = 0x7f030045;
public static final int buttonPanelSideLayout = 0x7f030046;
public static final int buttonStyle = 0x7f030047;
public static final int buttonStyleSmall = 0x7f030048;
public static final int buttonTint = 0x7f030049;
public static final int buttonTintMode = 0x7f03004a;
public static final int checkboxStyle = 0x7f030051;
public static final int checkedTextViewStyle = 0x7f030052;
public static final int closeIcon = 0x7f030053;
public static final int closeItemLayout = 0x7f030054;
public static final int collapseContentDescription = 0x7f030055;
public static final int collapseIcon = 0x7f030056;
public static final int collapsedTitleGravity = 0x7f030057;
public static final int collapsedTitleTextAppearance = 0x7f030058;
public static final int color = 0x7f030059;
public static final int colorAccent = 0x7f03005a;
public static final int colorBackgroundFloating = 0x7f03005b;
public static final int colorButtonNormal = 0x7f03005c;
public static final int colorControlActivated = 0x7f03005d;
public static final int colorControlHighlight = 0x7f03005e;
public static final int colorControlNormal = 0x7f03005f;
public static final int colorError = 0x7f030060;
public static final int colorPrimary = 0x7f030061;
public static final int colorPrimaryDark = 0x7f030062;
public static final int colorSwitchThumbNormal = 0x7f030063;
public static final int commitIcon = 0x7f030064;
public static final int contentDescription = 0x7f030066;
public static final int contentInsetEnd = 0x7f030067;
public static final int contentInsetEndWithActions = 0x7f030068;
public static final int contentInsetLeft = 0x7f030069;
public static final int contentInsetRight = 0x7f03006a;
public static final int contentInsetStart = 0x7f03006b;
public static final int contentInsetStartWithNavigation = 0x7f03006c;
public static final int contentScrim = 0x7f030072;
public static final int controlBackground = 0x7f030073;
public static final int counterEnabled = 0x7f030074;
public static final int counterMaxLength = 0x7f030075;
public static final int counterOverflowTextAppearance = 0x7f030076;
public static final int counterTextAppearance = 0x7f030077;
public static final int customNavigationLayout = 0x7f030078;
public static final int defaultQueryHint = 0x7f030079;
public static final int dialogPreferredPadding = 0x7f03007a;
public static final int dialogTheme = 0x7f03007b;
public static final int displayOptions = 0x7f03007c;
public static final int divider = 0x7f03007d;
public static final int dividerHorizontal = 0x7f03007e;
public static final int dividerPadding = 0x7f03007f;
public static final int dividerVertical = 0x7f030080;
public static final int drawableSize = 0x7f030081;
public static final int drawerArrowStyle = 0x7f030082;
public static final int dropDownListViewStyle = 0x7f030083;
public static final int dropdownListPreferredItemHeight = 0x7f030084;
public static final int editTextBackground = 0x7f030085;
public static final int editTextColor = 0x7f030086;
public static final int editTextStyle = 0x7f030087;
public static final int elevation = 0x7f030088;
public static final int errorEnabled = 0x7f030089;
public static final int errorTextAppearance = 0x7f03008a;
public static final int expandActivityOverflowButtonDrawable = 0x7f03008b;
public static final int expanded = 0x7f03008c;
public static final int expandedTitleGravity = 0x7f03008d;
public static final int expandedTitleMargin = 0x7f03008e;
public static final int expandedTitleMarginBottom = 0x7f03008f;
public static final int expandedTitleMarginEnd = 0x7f030090;
public static final int expandedTitleMarginStart = 0x7f030091;
public static final int expandedTitleMarginTop = 0x7f030092;
public static final int expandedTitleTextAppearance = 0x7f030093;
public static final int fabSize = 0x7f030094;
public static final int fastScrollEnabled = 0x7f030095;
public static final int fastScrollHorizontalThumbDrawable = 0x7f030096;
public static final int fastScrollHorizontalTrackDrawable = 0x7f030097;
public static final int fastScrollVerticalThumbDrawable = 0x7f030098;
public static final int fastScrollVerticalTrackDrawable = 0x7f030099;
public static final int font = 0x7f03009a;
public static final int fontFamily = 0x7f03009b;
public static final int fontProviderAuthority = 0x7f03009c;
public static final int fontProviderCerts = 0x7f03009d;
public static final int fontProviderFetchStrategy = 0x7f03009e;
public static final int fontProviderFetchTimeout = 0x7f03009f;
public static final int fontProviderPackage = 0x7f0300a0;
public static final int fontProviderQuery = 0x7f0300a1;
public static final int fontStyle = 0x7f0300a2;
public static final int fontWeight = 0x7f0300a3;
public static final int foregroundInsidePadding = 0x7f0300a4;
public static final int gapBetweenBars = 0x7f0300a5;
public static final int goIcon = 0x7f0300a6;
public static final int headerLayout = 0x7f0300a7;
public static final int height = 0x7f0300a8;
public static final int hideOnContentScroll = 0x7f0300a9;
public static final int hintAnimationEnabled = 0x7f0300aa;
public static final int hintEnabled = 0x7f0300ab;
public static final int hintTextAppearance = 0x7f0300ac;
public static final int homeAsUpIndicator = 0x7f0300ad;
public static final int homeLayout = 0x7f0300ae;
public static final int icon = 0x7f0300af;
public static final int iconTint = 0x7f0300b0;
public static final int iconTintMode = 0x7f0300b1;
public static final int iconifiedByDefault = 0x7f0300b2;
public static final int imageButtonStyle = 0x7f0300b3;
public static final int indeterminateProgressStyle = 0x7f0300b4;
public static final int initialActivityCount = 0x7f0300b5;
public static final int insetForeground = 0x7f0300b6;
public static final int isLightTheme = 0x7f0300b7;
public static final int itemBackground = 0x7f0300b8;
public static final int itemIconTint = 0x7f0300b9;
public static final int itemPadding = 0x7f0300ba;
public static final int itemTextAppearance = 0x7f0300bb;
public static final int itemTextColor = 0x7f0300bc;
public static final int keylines = 0x7f0300bd;
public static final int layout = 0x7f0300be;
public static final int layoutManager = 0x7f0300bf;
public static final int layout_anchor = 0x7f0300c0;
public static final int layout_anchorGravity = 0x7f0300c1;
public static final int layout_behavior = 0x7f0300c2;
public static final int layout_collapseMode = 0x7f0300c3;
public static final int layout_collapseParallaxMultiplier = 0x7f0300c4;
public static final int layout_dodgeInsetEdges = 0x7f0300e7;
public static final int layout_insetEdge = 0x7f0300f0;
public static final int layout_keyline = 0x7f0300f1;
public static final int layout_scrollFlags = 0x7f0300f3;
public static final int layout_scrollInterpolator = 0x7f0300f4;
public static final int listChoiceBackgroundIndicator = 0x7f0300f5;
public static final int listDividerAlertDialog = 0x7f0300f6;
public static final int listItemLayout = 0x7f0300f7;
public static final int listLayout = 0x7f0300f8;
public static final int listMenuViewStyle = 0x7f0300f9;
public static final int listPopupWindowStyle = 0x7f0300fa;
public static final int listPreferredItemHeight = 0x7f0300fb;
public static final int listPreferredItemHeightLarge = 0x7f0300fc;
public static final int listPreferredItemHeightSmall = 0x7f0300fd;
public static final int listPreferredItemPaddingLeft = 0x7f0300fe;
public static final int listPreferredItemPaddingRight = 0x7f0300ff;
public static final int logo = 0x7f030100;
public static final int logoDescription = 0x7f030101;
public static final int maxActionInlineWidth = 0x7f030102;
public static final int maxButtonHeight = 0x7f030103;
public static final int measureWithLargestChild = 0x7f030104;
public static final int menu = 0x7f030105;
public static final int multiChoiceItemLayout = 0x7f030106;
public static final int navigationContentDescription = 0x7f030107;
public static final int navigationIcon = 0x7f030108;
public static final int navigationMode = 0x7f030109;
public static final int numericModifiers = 0x7f03010a;
public static final int overlapAnchor = 0x7f03010b;
public static final int paddingBottomNoButtons = 0x7f03010c;
public static final int paddingEnd = 0x7f03010d;
public static final int paddingStart = 0x7f03010e;
public static final int paddingTopNoTitle = 0x7f03010f;
public static final int panelBackground = 0x7f030110;
public static final int panelMenuListTheme = 0x7f030111;
public static final int panelMenuListWidth = 0x7f030112;
public static final int passwordToggleContentDescription = 0x7f030113;
public static final int passwordToggleDrawable = 0x7f030114;
public static final int passwordToggleEnabled = 0x7f030115;
public static final int passwordToggleTint = 0x7f030116;
public static final int passwordToggleTintMode = 0x7f030117;
public static final int popupMenuStyle = 0x7f030118;
public static final int popupTheme = 0x7f030119;
public static final int popupWindowStyle = 0x7f03011a;
public static final int preserveIconSpacing = 0x7f03011b;
public static final int pressedTranslationZ = 0x7f03011c;
public static final int progressBarPadding = 0x7f03011d;
public static final int progressBarStyle = 0x7f03011e;
public static final int queryBackground = 0x7f03011f;
public static final int queryHint = 0x7f030120;
public static final int radioButtonStyle = 0x7f030121;
public static final int ratingBarStyle = 0x7f030122;
public static final int ratingBarStyleIndicator = 0x7f030123;
public static final int ratingBarStyleSmall = 0x7f030124;
public static final int reverseLayout = 0x7f030125;
public static final int rippleColor = 0x7f030126;
public static final int scrimAnimationDuration = 0x7f030127;
public static final int scrimVisibleHeightTrigger = 0x7f030128;
public static final int searchHintIcon = 0x7f030129;
public static final int searchIcon = 0x7f03012a;
public static final int searchViewStyle = 0x7f03012b;
public static final int seekBarStyle = 0x7f03012c;
public static final int selectableItemBackground = 0x7f03012d;
public static final int selectableItemBackgroundBorderless = 0x7f03012e;
public static final int showAsAction = 0x7f03012f;
public static final int showDividers = 0x7f030130;
public static final int showText = 0x7f030131;
public static final int showTitle = 0x7f030132;
public static final int singleChoiceItemLayout = 0x7f030133;
public static final int spanCount = 0x7f030134;
public static final int spinBars = 0x7f030135;
public static final int spinnerDropDownItemStyle = 0x7f030136;
public static final int spinnerStyle = 0x7f030137;
public static final int splitTrack = 0x7f030138;
public static final int srcCompat = 0x7f030139;
public static final int stackFromEnd = 0x7f03013a;
public static final int state_above_anchor = 0x7f03013b;
public static final int state_collapsed = 0x7f03013c;
public static final int state_collapsible = 0x7f03013d;
public static final int statusBarBackground = 0x7f03013e;
public static final int statusBarScrim = 0x7f03013f;
public static final int subMenuArrow = 0x7f030140;
public static final int submitBackground = 0x7f030141;
public static final int subtitle = 0x7f030142;
public static final int subtitleTextAppearance = 0x7f030143;
public static final int subtitleTextColor = 0x7f030144;
public static final int subtitleTextStyle = 0x7f030145;
public static final int suggestionRowLayout = 0x7f030146;
public static final int switchMinWidth = 0x7f030147;
public static final int switchPadding = 0x7f030148;
public static final int switchStyle = 0x7f030149;
public static final int switchTextAppearance = 0x7f03014a;
public static final int tabBackground = 0x7f03014b;
public static final int tabContentStart = 0x7f03014c;
public static final int tabGravity = 0x7f03014d;
public static final int tabIndicatorColor = 0x7f03014e;
public static final int tabIndicatorHeight = 0x7f03014f;
public static final int tabMaxWidth = 0x7f030150;
public static final int tabMinWidth = 0x7f030151;
public static final int tabMode = 0x7f030152;
public static final int tabPadding = 0x7f030153;
public static final int tabPaddingBottom = 0x7f030154;
public static final int tabPaddingEnd = 0x7f030155;
public static final int tabPaddingStart = 0x7f030156;
public static final int tabPaddingTop = 0x7f030157;
public static final int tabSelectedTextColor = 0x7f030158;
public static final int tabTextAppearance = 0x7f030159;
public static final int tabTextColor = 0x7f03015a;
public static final int textAllCaps = 0x7f03015b;
public static final int textAppearanceLargePopupMenu = 0x7f03015c;
public static final int textAppearanceListItem = 0x7f03015d;
public static final int textAppearanceListItemSecondary = 0x7f03015e;
public static final int textAppearanceListItemSmall = 0x7f03015f;
public static final int textAppearancePopupMenuHeader = 0x7f030160;
public static final int textAppearanceSearchResultSubtitle = 0x7f030161;
public static final int textAppearanceSearchResultTitle = 0x7f030162;
public static final int textAppearanceSmallPopupMenu = 0x7f030163;
public static final int textColorAlertDialogListItem = 0x7f030164;
public static final int textColorError = 0x7f030165;
public static final int textColorSearchUrl = 0x7f030166;
public static final int theme = 0x7f030167;
public static final int thickness = 0x7f030168;
public static final int thumbTextPadding = 0x7f030169;
public static final int thumbTint = 0x7f03016a;
public static final int thumbTintMode = 0x7f03016b;
public static final int tickMark = 0x7f03016c;
public static final int tickMarkTint = 0x7f03016d;
public static final int tickMarkTintMode = 0x7f03016e;
public static final int tint = 0x7f03016f;
public static final int tintMode = 0x7f030170;
public static final int title = 0x7f030171;
public static final int titleEnabled = 0x7f030172;
public static final int titleMargin = 0x7f030173;
public static final int titleMarginBottom = 0x7f030174;
public static final int titleMarginEnd = 0x7f030175;
public static final int titleMarginStart = 0x7f030176;
public static final int titleMarginTop = 0x7f030177;
public static final int titleMargins = 0x7f030178;
public static final int titleTextAppearance = 0x7f030179;
public static final int titleTextColor = 0x7f03017a;
public static final int titleTextStyle = 0x7f03017b;
public static final int toolbarId = 0x7f03017c;
public static final int toolbarNavigationButtonStyle = 0x7f03017d;
public static final int toolbarStyle = 0x7f03017e;
public static final int tooltipForegroundColor = 0x7f03017f;
public static final int tooltipFrameBackground = 0x7f030180;
public static final int tooltipText = 0x7f030181;
public static final int track = 0x7f030182;
public static final int trackTint = 0x7f030183;
public static final int trackTintMode = 0x7f030184;
public static final int useCompatPadding = 0x7f030185;
public static final int voiceIcon = 0x7f030186;
public static final int windowActionBar = 0x7f030187;
public static final int windowActionBarOverlay = 0x7f030188;
public static final int windowActionModeOverlay = 0x7f030189;
public static final int windowFixedHeightMajor = 0x7f03018a;
public static final int windowFixedHeightMinor = 0x7f03018b;
public static final int windowFixedWidthMajor = 0x7f03018c;
public static final int windowFixedWidthMinor = 0x7f03018d;
public static final int windowMinWidthMajor = 0x7f03018e;
public static final int windowMinWidthMinor = 0x7f03018f;
public static final int windowNoTitle = 0x7f030190;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f040000;
public static final int abc_allow_stacked_button_bar = 0x7f040001;
public static final int abc_config_actionMenuItemAllCaps = 0x7f040002;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f040003;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f040004;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f050000;
public static final int abc_background_cache_hint_selector_material_light = 0x7f050001;
public static final int abc_btn_colored_borderless_text_material = 0x7f050002;
public static final int abc_btn_colored_text_material = 0x7f050003;
public static final int abc_color_highlight_material = 0x7f050004;
public static final int abc_hint_foreground_material_dark = 0x7f050005;
public static final int abc_hint_foreground_material_light = 0x7f050006;
public static final int abc_input_method_navigation_guard = 0x7f050007;
public static final int abc_primary_text_disable_only_material_dark = 0x7f050008;
public static final int abc_primary_text_disable_only_material_light = 0x7f050009;
public static final int abc_primary_text_material_dark = 0x7f05000a;
public static final int abc_primary_text_material_light = 0x7f05000b;
public static final int abc_search_url_text = 0x7f05000c;
public static final int abc_search_url_text_normal = 0x7f05000d;
public static final int abc_search_url_text_pressed = 0x7f05000e;
public static final int abc_search_url_text_selected = 0x7f05000f;
public static final int abc_secondary_text_material_dark = 0x7f050010;
public static final int abc_secondary_text_material_light = 0x7f050011;
public static final int abc_tint_btn_checkable = 0x7f050012;
public static final int abc_tint_default = 0x7f050013;
public static final int abc_tint_edittext = 0x7f050014;
public static final int abc_tint_seek_thumb = 0x7f050015;
public static final int abc_tint_spinner = 0x7f050016;
public static final int abc_tint_switch_track = 0x7f050017;
public static final int accent_material_dark = 0x7f050018;
public static final int accent_material_light = 0x7f050019;
public static final int background_floating_material_dark = 0x7f05001a;
public static final int background_floating_material_light = 0x7f05001b;
public static final int background_material_dark = 0x7f05001c;
public static final int background_material_light = 0x7f05001d;
public static final int bright_foreground_disabled_material_dark = 0x7f05001e;
public static final int bright_foreground_disabled_material_light = 0x7f05001f;
public static final int bright_foreground_inverse_material_dark = 0x7f050020;
public static final int bright_foreground_inverse_material_light = 0x7f050021;
public static final int bright_foreground_material_dark = 0x7f050022;
public static final int bright_foreground_material_light = 0x7f050023;
public static final int button_material_dark = 0x7f050024;
public static final int button_material_light = 0x7f050025;
public static final int design_bottom_navigation_shadow_color = 0x7f05002d;
public static final int design_error = 0x7f05002e;
public static final int design_fab_shadow_end_color = 0x7f05002f;
public static final int design_fab_shadow_mid_color = 0x7f050030;
public static final int design_fab_shadow_start_color = 0x7f050031;
public static final int design_fab_stroke_end_inner_color = 0x7f050032;
public static final int design_fab_stroke_end_outer_color = 0x7f050033;
public static final int design_fab_stroke_top_inner_color = 0x7f050034;
public static final int design_fab_stroke_top_outer_color = 0x7f050035;
public static final int design_snackbar_background_color = 0x7f050036;
public static final int design_tint_password_toggle = 0x7f050037;
public static final int dim_foreground_disabled_material_dark = 0x7f050038;
public static final int dim_foreground_disabled_material_light = 0x7f050039;
public static final int dim_foreground_material_dark = 0x7f05003a;
public static final int dim_foreground_material_light = 0x7f05003b;
public static final int error_color_material = 0x7f05003c;
public static final int foreground_material_dark = 0x7f05003d;
public static final int foreground_material_light = 0x7f05003e;
public static final int highlighted_text_material_dark = 0x7f05003f;
public static final int highlighted_text_material_light = 0x7f050040;
public static final int material_blue_grey_800 = 0x7f050041;
public static final int material_blue_grey_900 = 0x7f050042;
public static final int material_blue_grey_950 = 0x7f050043;
public static final int material_deep_teal_200 = 0x7f050044;
public static final int material_deep_teal_500 = 0x7f050045;
public static final int material_grey_100 = 0x7f050046;
public static final int material_grey_300 = 0x7f050047;
public static final int material_grey_50 = 0x7f050048;
public static final int material_grey_600 = 0x7f050049;
public static final int material_grey_800 = 0x7f05004a;
public static final int material_grey_850 = 0x7f05004b;
public static final int material_grey_900 = 0x7f05004c;
public static final int notification_action_color_filter = 0x7f05004d;
public static final int notification_icon_bg_color = 0x7f05004e;
public static final int notification_material_background_media_default_color = 0x7f05004f;
public static final int primary_dark_material_dark = 0x7f050050;
public static final int primary_dark_material_light = 0x7f050051;
public static final int primary_material_dark = 0x7f050052;
public static final int primary_material_light = 0x7f050053;
public static final int primary_text_default_material_dark = 0x7f050054;
public static final int primary_text_default_material_light = 0x7f050055;
public static final int primary_text_disabled_material_dark = 0x7f050056;
public static final int primary_text_disabled_material_light = 0x7f050057;
public static final int ripple_material_dark = 0x7f050058;
public static final int ripple_material_light = 0x7f050059;
public static final int secondary_text_default_material_dark = 0x7f05005a;
public static final int secondary_text_default_material_light = 0x7f05005b;
public static final int secondary_text_disabled_material_dark = 0x7f05005c;
public static final int secondary_text_disabled_material_light = 0x7f05005d;
public static final int switch_thumb_disabled_material_dark = 0x7f05005e;
public static final int switch_thumb_disabled_material_light = 0x7f05005f;
public static final int switch_thumb_material_dark = 0x7f050060;
public static final int switch_thumb_material_light = 0x7f050061;
public static final int switch_thumb_normal_material_dark = 0x7f050062;
public static final int switch_thumb_normal_material_light = 0x7f050063;
public static final int tooltip_background_dark = 0x7f050064;
public static final int tooltip_background_light = 0x7f050065;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f060000;
public static final int abc_action_bar_content_inset_with_nav = 0x7f060001;
public static final int abc_action_bar_default_height_material = 0x7f060002;
public static final int abc_action_bar_default_padding_end_material = 0x7f060003;
public static final int abc_action_bar_default_padding_start_material = 0x7f060004;
public static final int abc_action_bar_elevation_material = 0x7f060005;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f060006;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f060007;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f060008;
public static final int abc_action_bar_progress_bar_size = 0x7f060009;
public static final int abc_action_bar_stacked_max_height = 0x7f06000a;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f06000b;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f06000c;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f06000d;
public static final int abc_action_button_min_height_material = 0x7f06000e;
public static final int abc_action_button_min_width_material = 0x7f06000f;
public static final int abc_action_button_min_width_overflow_material = 0x7f060010;
public static final int abc_alert_dialog_button_bar_height = 0x7f060011;
public static final int abc_button_inset_horizontal_material = 0x7f060012;
public static final int abc_button_inset_vertical_material = 0x7f060013;
public static final int abc_button_padding_horizontal_material = 0x7f060014;
public static final int abc_button_padding_vertical_material = 0x7f060015;
public static final int abc_cascading_menus_min_smallest_width = 0x7f060016;
public static final int abc_config_prefDialogWidth = 0x7f060017;
public static final int abc_control_corner_material = 0x7f060018;
public static final int abc_control_inset_material = 0x7f060019;
public static final int abc_control_padding_material = 0x7f06001a;
public static final int abc_dialog_fixed_height_major = 0x7f06001b;
public static final int abc_dialog_fixed_height_minor = 0x7f06001c;
public static final int abc_dialog_fixed_width_major = 0x7f06001d;
public static final int abc_dialog_fixed_width_minor = 0x7f06001e;
public static final int abc_dialog_list_padding_bottom_no_buttons = 0x7f06001f;
public static final int abc_dialog_list_padding_top_no_title = 0x7f060020;
public static final int abc_dialog_min_width_major = 0x7f060021;
public static final int abc_dialog_min_width_minor = 0x7f060022;
public static final int abc_dialog_padding_material = 0x7f060023;
public static final int abc_dialog_padding_top_material = 0x7f060024;
public static final int abc_dialog_title_divider_material = 0x7f060025;
public static final int abc_disabled_alpha_material_dark = 0x7f060026;
public static final int abc_disabled_alpha_material_light = 0x7f060027;
public static final int abc_dropdownitem_icon_width = 0x7f060028;
public static final int abc_dropdownitem_text_padding_left = 0x7f060029;
public static final int abc_dropdownitem_text_padding_right = 0x7f06002a;
public static final int abc_edit_text_inset_bottom_material = 0x7f06002b;
public static final int abc_edit_text_inset_horizontal_material = 0x7f06002c;
public static final int abc_edit_text_inset_top_material = 0x7f06002d;
public static final int abc_floating_window_z = 0x7f06002e;
public static final int abc_list_item_padding_horizontal_material = 0x7f06002f;
public static final int abc_panel_menu_list_width = 0x7f060030;
public static final int abc_progress_bar_height_material = 0x7f060031;
public static final int abc_search_view_preferred_height = 0x7f060032;
public static final int abc_search_view_preferred_width = 0x7f060033;
public static final int abc_seekbar_track_background_height_material = 0x7f060034;
public static final int abc_seekbar_track_progress_height_material = 0x7f060035;
public static final int abc_select_dialog_padding_start_material = 0x7f060036;
public static final int abc_switch_padding = 0x7f060037;
public static final int abc_text_size_body_1_material = 0x7f060038;
public static final int abc_text_size_body_2_material = 0x7f060039;
public static final int abc_text_size_button_material = 0x7f06003a;
public static final int abc_text_size_caption_material = 0x7f06003b;
public static final int abc_text_size_display_1_material = 0x7f06003c;
public static final int abc_text_size_display_2_material = 0x7f06003d;
public static final int abc_text_size_display_3_material = 0x7f06003e;
public static final int abc_text_size_display_4_material = 0x7f06003f;
public static final int abc_text_size_headline_material = 0x7f060040;
public static final int abc_text_size_large_material = 0x7f060041;
public static final int abc_text_size_medium_material = 0x7f060042;
public static final int abc_text_size_menu_header_material = 0x7f060043;
public static final int abc_text_size_menu_material = 0x7f060044;
public static final int abc_text_size_small_material = 0x7f060045;
public static final int abc_text_size_subhead_material = 0x7f060046;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f060047;
public static final int abc_text_size_title_material = 0x7f060048;
public static final int abc_text_size_title_material_toolbar = 0x7f060049;
public static final int compat_button_inset_horizontal_material = 0x7f06004d;
public static final int compat_button_inset_vertical_material = 0x7f06004e;
public static final int compat_button_padding_horizontal_material = 0x7f06004f;
public static final int compat_button_padding_vertical_material = 0x7f060050;
public static final int compat_control_corner_material = 0x7f060051;
public static final int design_appbar_elevation = 0x7f060052;
public static final int design_bottom_navigation_active_item_max_width = 0x7f060053;
public static final int design_bottom_navigation_active_text_size = 0x7f060054;
public static final int design_bottom_navigation_elevation = 0x7f060055;
public static final int design_bottom_navigation_height = 0x7f060056;
public static final int design_bottom_navigation_item_max_width = 0x7f060057;
public static final int design_bottom_navigation_item_min_width = 0x7f060058;
public static final int design_bottom_navigation_margin = 0x7f060059;
public static final int design_bottom_navigation_shadow_height = 0x7f06005a;
public static final int design_bottom_navigation_text_size = 0x7f06005b;
public static final int design_bottom_sheet_modal_elevation = 0x7f06005c;
public static final int design_bottom_sheet_peek_height_min = 0x7f06005d;
public static final int design_fab_border_width = 0x7f06005e;
public static final int design_fab_elevation = 0x7f06005f;
public static final int design_fab_image_size = 0x7f060060;
public static final int design_fab_size_mini = 0x7f060061;
public static final int design_fab_size_normal = 0x7f060062;
public static final int design_fab_translation_z_pressed = 0x7f060063;
public static final int design_navigation_elevation = 0x7f060064;
public static final int design_navigation_icon_padding = 0x7f060065;
public static final int design_navigation_icon_size = 0x7f060066;
public static final int design_navigation_max_width = 0x7f060067;
public static final int design_navigation_padding_bottom = 0x7f060068;
public static final int design_navigation_separator_vertical_padding = 0x7f060069;
public static final int design_snackbar_action_inline_max_width = 0x7f06006a;
public static final int design_snackbar_background_corner_radius = 0x7f06006b;
public static final int design_snackbar_elevation = 0x7f06006c;
public static final int design_snackbar_extra_spacing_horizontal = 0x7f06006d;
public static final int design_snackbar_max_width = 0x7f06006e;
public static final int design_snackbar_min_width = 0x7f06006f;
public static final int design_snackbar_padding_horizontal = 0x7f060070;
public static final int design_snackbar_padding_vertical = 0x7f060071;
public static final int design_snackbar_padding_vertical_2lines = 0x7f060072;
public static final int design_snackbar_text_size = 0x7f060073;
public static final int design_tab_max_width = 0x7f060074;
public static final int design_tab_scrollable_min_width = 0x7f060075;
public static final int design_tab_text_size = 0x7f060076;
public static final int design_tab_text_size_2line = 0x7f060077;
public static final int disabled_alpha_material_dark = 0x7f060078;
public static final int disabled_alpha_material_light = 0x7f060079;
public static final int fastscroll_default_thickness = 0x7f06007a;
public static final int fastscroll_margin = 0x7f06007b;
public static final int fastscroll_minimum_range = 0x7f06007c;
public static final int highlight_alpha_material_colored = 0x7f06007d;
public static final int highlight_alpha_material_dark = 0x7f06007e;
public static final int highlight_alpha_material_light = 0x7f06007f;
public static final int hint_alpha_material_dark = 0x7f060080;
public static final int hint_alpha_material_light = 0x7f060081;
public static final int hint_pressed_alpha_material_dark = 0x7f060082;
public static final int hint_pressed_alpha_material_light = 0x7f060083;
public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f060084;
public static final int item_touch_helper_swipe_escape_max_velocity = 0x7f060085;
public static final int item_touch_helper_swipe_escape_velocity = 0x7f060086;
public static final int notification_action_icon_size = 0x7f060087;
public static final int notification_action_text_size = 0x7f060088;
public static final int notification_big_circle_margin = 0x7f060089;
public static final int notification_content_margin_start = 0x7f06008a;
public static final int notification_large_icon_height = 0x7f06008b;
public static final int notification_large_icon_width = 0x7f06008c;
public static final int notification_main_column_padding_top = 0x7f06008d;
public static final int notification_media_narrow_margin = 0x7f06008e;
public static final int notification_right_icon_size = 0x7f06008f;
public static final int notification_right_side_padding_top = 0x7f060090;
public static final int notification_small_icon_background_padding = 0x7f060091;
public static final int notification_small_icon_size_as_large = 0x7f060092;
public static final int notification_subtext_size = 0x7f060093;
public static final int notification_top_pad = 0x7f060094;
public static final int notification_top_pad_large_text = 0x7f060095;
public static final int tooltip_corner_radius = 0x7f060096;
public static final int tooltip_horizontal_padding = 0x7f060097;
public static final int tooltip_margin = 0x7f060098;
public static final int tooltip_precise_anchor_extra_offset = 0x7f060099;
public static final int tooltip_precise_anchor_threshold = 0x7f06009a;
public static final int tooltip_vertical_padding = 0x7f06009b;
public static final int tooltip_y_offset_non_touch = 0x7f06009c;
public static final int tooltip_y_offset_touch = 0x7f06009d;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f070007;
public static final int abc_action_bar_item_background_material = 0x7f070008;
public static final int abc_btn_borderless_material = 0x7f070009;
public static final int abc_btn_check_material = 0x7f07000a;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f07000b;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f07000c;
public static final int abc_btn_colored_material = 0x7f07000d;
public static final int abc_btn_default_mtrl_shape = 0x7f07000e;
public static final int abc_btn_radio_material = 0x7f07000f;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f070010;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f070011;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f070012;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f070013;
public static final int abc_cab_background_internal_bg = 0x7f070014;
public static final int abc_cab_background_top_material = 0x7f070015;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f070016;
public static final int abc_control_background_material = 0x7f070017;
public static final int abc_dialog_material_background = 0x7f070018;
public static final int abc_edit_text_material = 0x7f070019;
public static final int abc_ic_ab_back_material = 0x7f07001a;
public static final int abc_ic_arrow_drop_right_black_24dp = 0x7f07001b;
public static final int abc_ic_clear_material = 0x7f07001c;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f07001d;
public static final int abc_ic_go_search_api_material = 0x7f07001e;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f07001f;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f070020;
public static final int abc_ic_menu_overflow_material = 0x7f070021;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f070022;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f070023;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f070024;
public static final int abc_ic_search_api_material = 0x7f070025;
public static final int abc_ic_star_black_16dp = 0x7f070026;
public static final int abc_ic_star_black_36dp = 0x7f070027;
public static final int abc_ic_star_black_48dp = 0x7f070028;
public static final int abc_ic_star_half_black_16dp = 0x7f070029;
public static final int abc_ic_star_half_black_36dp = 0x7f07002a;
public static final int abc_ic_star_half_black_48dp = 0x7f07002b;
public static final int abc_ic_voice_search_api_material = 0x7f07002c;
public static final int abc_item_background_holo_dark = 0x7f07002d;
public static final int abc_item_background_holo_light = 0x7f07002e;
public static final int abc_list_divider_mtrl_alpha = 0x7f07002f;
public static final int abc_list_focused_holo = 0x7f070030;
public static final int abc_list_longpressed_holo = 0x7f070031;
public static final int abc_list_pressed_holo_dark = 0x7f070032;
public static final int abc_list_pressed_holo_light = 0x7f070033;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f070034;
public static final int abc_list_selector_background_transition_holo_light = 0x7f070035;
public static final int abc_list_selector_disabled_holo_dark = 0x7f070036;
public static final int abc_list_selector_disabled_holo_light = 0x7f070037;
public static final int abc_list_selector_holo_dark = 0x7f070038;
public static final int abc_list_selector_holo_light = 0x7f070039;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f07003a;
public static final int abc_popup_background_mtrl_mult = 0x7f07003b;
public static final int abc_ratingbar_indicator_material = 0x7f07003c;
public static final int abc_ratingbar_material = 0x7f07003d;
public static final int abc_ratingbar_small_material = 0x7f07003e;
public static final int abc_scrubber_control_off_mtrl_alpha = 0x7f07003f;
public static final int abc_scrubber_control_to_pressed_mtrl_000 = 0x7f070040;
public static final int abc_scrubber_control_to_pressed_mtrl_005 = 0x7f070041;
public static final int abc_scrubber_primary_mtrl_alpha = 0x7f070042;
public static final int abc_scrubber_track_mtrl_alpha = 0x7f070043;
public static final int abc_seekbar_thumb_material = 0x7f070044;
public static final int abc_seekbar_tick_mark_material = 0x7f070045;
public static final int abc_seekbar_track_material = 0x7f070046;
public static final int abc_spinner_mtrl_am_alpha = 0x7f070047;
public static final int abc_spinner_textfield_background_material = 0x7f070048;
public static final int abc_switch_thumb_material = 0x7f070049;
public static final int abc_switch_track_mtrl_alpha = 0x7f07004a;
public static final int abc_tab_indicator_material = 0x7f07004b;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f07004c;
public static final int abc_text_cursor_material = 0x7f07004d;
public static final int abc_text_select_handle_left_mtrl_dark = 0x7f07004e;
public static final int abc_text_select_handle_left_mtrl_light = 0x7f07004f;
public static final int abc_text_select_handle_middle_mtrl_dark = 0x7f070050;
public static final int abc_text_select_handle_middle_mtrl_light = 0x7f070051;
public static final int abc_text_select_handle_right_mtrl_dark = 0x7f070052;
public static final int abc_text_select_handle_right_mtrl_light = 0x7f070053;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f070054;
public static final int abc_textfield_default_mtrl_alpha = 0x7f070055;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070056;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070057;
public static final int abc_textfield_search_material = 0x7f070058;
public static final int abc_vector_test = 0x7f070059;
public static final int avd_hide_password = 0x7f07005a;
public static final int avd_show_password = 0x7f07005b;
public static final int design_bottom_navigation_item_background = 0x7f07005c;
public static final int design_fab_background = 0x7f07005d;
public static final int design_ic_visibility = 0x7f07005e;
public static final int design_ic_visibility_off = 0x7f07005f;
public static final int design_password_eye = 0x7f070060;
public static final int design_snackbar_background = 0x7f070061;
public static final int navigation_empty_icon = 0x7f070064;
public static final int notification_action_background = 0x7f070065;
public static final int notification_bg = 0x7f070066;
public static final int notification_bg_low = 0x7f070067;
public static final int notification_bg_low_normal = 0x7f070068;
public static final int notification_bg_low_pressed = 0x7f070069;
public static final int notification_bg_normal = 0x7f07006a;
public static final int notification_bg_normal_pressed = 0x7f07006b;
public static final int notification_icon_background = 0x7f07006c;
public static final int notification_template_icon_bg = 0x7f07006d;
public static final int notification_template_icon_low_bg = 0x7f07006e;
public static final int notification_tile_bg = 0x7f07006f;
public static final int notify_panel_notification_icon_bg = 0x7f070070;
public static final int tooltip_frame_dark = 0x7f070073;
public static final int tooltip_frame_light = 0x7f070074;
}
public static final class id {
public static final int action0 = 0x7f080007;
public static final int action_bar = 0x7f080008;
public static final int action_bar_activity_content = 0x7f080009;
public static final int action_bar_container = 0x7f08000a;
public static final int action_bar_root = 0x7f08000b;
public static final int action_bar_spinner = 0x7f08000c;
public static final int action_bar_subtitle = 0x7f08000d;
public static final int action_bar_title = 0x7f08000e;
public static final int action_container = 0x7f08000f;
public static final int action_context_bar = 0x7f080010;
public static final int action_divider = 0x7f080011;
public static final int action_image = 0x7f080012;
public static final int action_menu_divider = 0x7f080013;
public static final int action_menu_presenter = 0x7f080014;
public static final int action_mode_bar = 0x7f080015;
public static final int action_mode_bar_stub = 0x7f080016;
public static final int action_mode_close_button = 0x7f080017;
public static final int action_text = 0x7f080018;
public static final int actions = 0x7f080019;
public static final int activity_chooser_view_content = 0x7f08001a;
public static final int add = 0x7f08001b;
public static final int alertTitle = 0x7f08001c;
public static final int async = 0x7f080020;
public static final int auto = 0x7f080021;
public static final int blocking = 0x7f080024;
public static final int bottom = 0x7f080025;
public static final int buttonPanel = 0x7f080032;
public static final int cancel_action = 0x7f080033;
public static final int center = 0x7f080034;
public static final int checkbox = 0x7f080038;
public static final int chronometer = 0x7f080039;
public static final int container = 0x7f08003e;
public static final int contentPanel = 0x7f08003f;
public static final int coordinator = 0x7f080040;
public static final int custom = 0x7f080041;
public static final int customPanel = 0x7f080042;
public static final int decor_content_parent = 0x7f080043;
public static final int default_activity_button = 0x7f080044;
public static final int design_bottom_sheet = 0x7f080045;
public static final int design_menu_item_action_area = 0x7f080046;
public static final int design_menu_item_action_area_stub = 0x7f080047;
public static final int design_menu_item_text = 0x7f080048;
public static final int design_navigation_view = 0x7f080049;
public static final int edit_query = 0x7f08004d;
public static final int end = 0x7f08004e;
public static final int end_padder = 0x7f08004f;
public static final int expand_activities_button = 0x7f080054;
public static final int expanded_menu = 0x7f080055;
public static final int fill = 0x7f080057;
public static final int fixed = 0x7f08005a;
public static final int forever = 0x7f08005b;
public static final int ghost_view = 0x7f08005c;
public static final int home = 0x7f08005e;
public static final int icon = 0x7f080060;
public static final int icon_group = 0x7f080061;
public static final int image = 0x7f080063;
public static final int info = 0x7f080064;
public static final int italic = 0x7f080067;
public static final int item_touch_helper_previous_elevation = 0x7f080068;
public static final int largeLabel = 0x7f080069;
public static final int left = 0x7f08006a;
public static final int line1 = 0x7f08006b;
public static final int line3 = 0x7f08006c;
public static final int listMode = 0x7f08006d;
public static final int list_item = 0x7f08006f;
public static final int masked = 0x7f080070;
public static final int media_actions = 0x7f080071;
public static final int message = 0x7f080072;
public static final int mini = 0x7f080074;
public static final int multiply = 0x7f080075;
public static final int navigation_header_container = 0x7f080077;
public static final int none = 0x7f080079;
public static final int normal = 0x7f08007a;
public static final int notification_background = 0x7f08007b;
public static final int notification_main_column = 0x7f08007c;
public static final int notification_main_column_container = 0x7f08007d;
public static final int parallax = 0x7f08007f;
public static final int parentPanel = 0x7f080081;
public static final int parent_matrix = 0x7f080082;
public static final int pin = 0x7f080087;
public static final int progress_circular = 0x7f08008c;
public static final int progress_horizontal = 0x7f08008d;
public static final int radio = 0x7f08008e;
public static final int right = 0x7f080090;
public static final int right_icon = 0x7f080091;
public static final int right_side = 0x7f080092;
public static final int save_image_matrix = 0x7f080093;
public static final int save_non_transition_alpha = 0x7f080094;
public static final int save_scale_type = 0x7f080095;
public static final int screen = 0x7f080096;
public static final int scrollIndicatorDown = 0x7f080098;
public static final int scrollIndicatorUp = 0x7f080099;
public static final int scrollView = 0x7f08009a;
public static final int scrollable = 0x7f08009b;
public static final int search_badge = 0x7f08009c;
public static final int search_bar = 0x7f08009d;
public static final int search_button = 0x7f08009e;
public static final int search_close_btn = 0x7f08009f;
public static final int search_edit_frame = 0x7f0800a0;
public static final int search_go_btn = 0x7f0800a1;
public static final int search_mag_icon = 0x7f0800a2;
public static final int search_plate = 0x7f0800a3;
public static final int search_src_text = 0x7f0800a4;
public static final int search_voice_btn = 0x7f0800a5;
public static final int select_dialog_listview = 0x7f0800a6;
public static final int shortcut = 0x7f0800a7;
public static final int smallLabel = 0x7f0800ab;
public static final int snackbar_action = 0x7f0800ac;
public static final int snackbar_text = 0x7f0800ad;
public static final int spacer = 0x7f0800af;
public static final int split_action_bar = 0x7f0800b0;
public static final int src_atop = 0x7f0800b3;
public static final int src_in = 0x7f0800b4;
public static final int src_over = 0x7f0800b5;
public static final int start = 0x7f0800b6;
public static final int status_bar_latest_event_content = 0x7f0800b7;
public static final int submenuarrow = 0x7f0800b8;
public static final int submit_area = 0x7f0800b9;
public static final int tabMode = 0x7f0800ba;
public static final int text = 0x7f0800bb;
public static final int text2 = 0x7f0800bc;
public static final int textSpacerNoButtons = 0x7f0800bd;
public static final int textSpacerNoTitle = 0x7f0800be;
public static final int text_input_password_toggle = 0x7f0800bf;
public static final int textinput_counter = 0x7f0800c0;
public static final int textinput_error = 0x7f0800c1;
public static final int time = 0x7f0800c2;
public static final int title = 0x7f0800c3;
public static final int titleDividerNoCustom = 0x7f0800c4;
public static final int title_template = 0x7f0800c5;
public static final int top = 0x7f0800c6;
public static final int topPanel = 0x7f0800c7;
public static final int touch_outside = 0x7f0800c8;
public static final int transition_current_scene = 0x7f0800c9;
public static final int transition_layout_save = 0x7f0800ca;
public static final int transition_position = 0x7f0800cb;
public static final int transition_scene_layoutid_cache = 0x7f0800cc;
public static final int transition_transform = 0x7f0800cd;
public static final int uniform = 0x7f0800ce;
public static final int up = 0x7f0800cf;
public static final int view_offset_helper = 0x7f0800d1;
public static final int visible = 0x7f0800d2;
public static final int wrap_content = 0x7f0800d5;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f090000;
public static final int abc_config_activityShortDur = 0x7f090001;
public static final int app_bar_elevation_anim_duration = 0x7f090002;
public static final int bottom_sheet_slide_duration = 0x7f090003;
public static final int cancel_button_image_alpha = 0x7f090004;
public static final int config_tooltipAnimTime = 0x7f090005;
public static final int design_snackbar_text_max_lines = 0x7f090006;
public static final int hide_password_duration = 0x7f090007;
public static final int show_password_duration = 0x7f090008;
public static final int status_bar_notification_info_maxnum = 0x7f090009;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f0a0000;
public static final int abc_action_bar_up_container = 0x7f0a0001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f0a0002;
public static final int abc_action_menu_item_layout = 0x7f0a0003;
public static final int abc_action_menu_layout = 0x7f0a0004;
public static final int abc_action_mode_bar = 0x7f0a0005;
public static final int abc_action_mode_close_item_material = 0x7f0a0006;
public static final int abc_activity_chooser_view = 0x7f0a0007;
public static final int abc_activity_chooser_view_list_item = 0x7f0a0008;
public static final int abc_alert_dialog_button_bar_material = 0x7f0a0009;
public static final int abc_alert_dialog_material = 0x7f0a000a;
public static final int abc_alert_dialog_title_material = 0x7f0a000b;
public static final int abc_dialog_title_material = 0x7f0a000c;
public static final int abc_expanded_menu_layout = 0x7f0a000d;
public static final int abc_list_menu_item_checkbox = 0x7f0a000e;
public static final int abc_list_menu_item_icon = 0x7f0a000f;
public static final int abc_list_menu_item_layout = 0x7f0a0010;
public static final int abc_list_menu_item_radio = 0x7f0a0011;
public static final int abc_popup_menu_header_item_layout = 0x7f0a0012;
public static final int abc_popup_menu_item_layout = 0x7f0a0013;
public static final int abc_screen_content_include = 0x7f0a0014;
public static final int abc_screen_simple = 0x7f0a0015;
public static final int abc_screen_simple_overlay_action_mode = 0x7f0a0016;
public static final int abc_screen_toolbar = 0x7f0a0017;
public static final int abc_search_dropdown_item_icons_2line = 0x7f0a0018;
public static final int abc_search_view = 0x7f0a0019;
public static final int abc_select_dialog_material = 0x7f0a001a;
public static final int design_bottom_navigation_item = 0x7f0a001f;
public static final int design_bottom_sheet_dialog = 0x7f0a0020;
public static final int design_layout_snackbar = 0x7f0a0021;
public static final int design_layout_snackbar_include = 0x7f0a0022;
public static final int design_layout_tab_icon = 0x7f0a0023;
public static final int design_layout_tab_text = 0x7f0a0024;
public static final int design_menu_item_action_area = 0x7f0a0025;
public static final int design_navigation_item = 0x7f0a0026;
public static final int design_navigation_item_header = 0x7f0a0027;
public static final int design_navigation_item_separator = 0x7f0a0028;
public static final int design_navigation_item_subheader = 0x7f0a0029;
public static final int design_navigation_menu = 0x7f0a002a;
public static final int design_navigation_menu_item = 0x7f0a002b;
public static final int design_text_input_password_icon = 0x7f0a002c;
public static final int notification_action = 0x7f0a002f;
public static final int notification_action_tombstone = 0x7f0a0030;
public static final int notification_media_action = 0x7f0a0031;
public static final int notification_media_cancel_action = 0x7f0a0032;
public static final int notification_template_big_media = 0x7f0a0033;
public static final int notification_template_big_media_custom = 0x7f0a0034;
public static final int notification_template_big_media_narrow = 0x7f0a0035;
public static final int notification_template_big_media_narrow_custom = 0x7f0a0036;
public static final int notification_template_custom_big = 0x7f0a0037;
public static final int notification_template_icon_group = 0x7f0a0038;
public static final int notification_template_lines_media = 0x7f0a0039;
public static final int notification_template_media = 0x7f0a003a;
public static final int notification_template_media_custom = 0x7f0a003b;
public static final int notification_template_part_chronometer = 0x7f0a003c;
public static final int notification_template_part_time = 0x7f0a003d;
public static final int select_dialog_item_material = 0x7f0a003e;
public static final int select_dialog_multichoice_material = 0x7f0a003f;
public static final int select_dialog_singlechoice_material = 0x7f0a0040;
public static final int support_simple_spinner_dropdown_item = 0x7f0a0041;
public static final int tooltip = 0x7f0a0042;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f0d0000;
public static final int abc_action_bar_home_description_format = 0x7f0d0001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f0d0002;
public static final int abc_action_bar_up_description = 0x7f0d0003;
public static final int abc_action_menu_overflow_description = 0x7f0d0004;
public static final int abc_action_mode_done = 0x7f0d0005;
public static final int abc_activity_chooser_view_see_all = 0x7f0d0006;
public static final int abc_activitychooserview_choose_application = 0x7f0d0007;
public static final int abc_capital_off = 0x7f0d0008;
public static final int abc_capital_on = 0x7f0d0009;
public static final int abc_font_family_body_1_material = 0x7f0d000a;
public static final int abc_font_family_body_2_material = 0x7f0d000b;
public static final int abc_font_family_button_material = 0x7f0d000c;
public static final int abc_font_family_caption_material = 0x7f0d000d;
public static final int abc_font_family_display_1_material = 0x7f0d000e;
public static final int abc_font_family_display_2_material = 0x7f0d000f;
public static final int abc_font_family_display_3_material = 0x7f0d0010;
public static final int abc_font_family_display_4_material = 0x7f0d0011;
public static final int abc_font_family_headline_material = 0x7f0d0012;
public static final int abc_font_family_menu_material = 0x7f0d0013;
public static final int abc_font_family_subhead_material = 0x7f0d0014;
public static final int abc_font_family_title_material = 0x7f0d0015;
public static final int abc_search_hint = 0x7f0d0016;
public static final int abc_searchview_description_clear = 0x7f0d0017;
public static final int abc_searchview_description_query = 0x7f0d0018;
public static final int abc_searchview_description_search = 0x7f0d0019;
public static final int abc_searchview_description_submit = 0x7f0d001a;
public static final int abc_searchview_description_voice = 0x7f0d001b;
public static final int abc_shareactionprovider_share_with = 0x7f0d001c;
public static final int abc_shareactionprovider_share_with_application = 0x7f0d001d;
public static final int abc_toolbar_collapse_description = 0x7f0d001e;
public static final int appbar_scrolling_view_behavior = 0x7f0d0020;
public static final int bottom_sheet_behavior = 0x7f0d0021;
public static final int character_counter_pattern = 0x7f0d0022;
public static final int password_toggle_content_description = 0x7f0d002f;
public static final int path_password_eye = 0x7f0d0030;
public static final int path_password_eye_mask_strike_through = 0x7f0d0031;
public static final int path_password_eye_mask_visible = 0x7f0d0032;
public static final int path_password_strike_through = 0x7f0d0033;
public static final int search_menu_title = 0x7f0d0039;
public static final int status_bar_notification_info_overflow = 0x7f0d003c;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0e0000;
public static final int AlertDialog_AppCompat_Light = 0x7f0e0001;
public static final int Animation_AppCompat_Dialog = 0x7f0e0002;
public static final int Animation_AppCompat_DropDownUp = 0x7f0e0003;
public static final int Animation_AppCompat_Tooltip = 0x7f0e0004;
public static final int Animation_Design_BottomSheetDialog = 0x7f0e0005;
public static final int Base_AlertDialog_AppCompat = 0x7f0e0007;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0e0008;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0e0009;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0e000a;
public static final int Base_Animation_AppCompat_Tooltip = 0x7f0e000b;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0e000e;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0e000d;
public static final int Base_TextAppearance_AppCompat = 0x7f0e000f;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0e0010;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0e0011;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0e0012;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0e0013;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0e0014;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0e0015;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0e0016;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0e0017;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0e0018;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0e0019;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0e001a;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0e001b;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0e001c;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0e001d;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0e001e;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0e001f;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0e0020;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0e0021;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0e0022;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0e0023;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0e0024;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0e0025;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0e0026;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0e0027;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0e0028;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0e0029;
public static final int Base_TextAppearance_AppCompat_Tooltip = 0x7f0e002a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0e002b;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0e002c;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0e002d;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0e002e;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0e002f;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0e0030;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0e0031;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0e0032;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0e0033;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0e0034;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0e0035;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0e0036;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0e0037;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0e0038;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0e0039;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0e003a;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0e003b;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0e003c;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0e003d;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0e003e;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0e004d;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0e004e;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0e004f;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0e0050;
public static final int Base_ThemeOverlay_AppCompat_Dialog = 0x7f0e0051;
public static final int Base_ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0e0052;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0e0053;
public static final int Base_Theme_AppCompat = 0x7f0e003f;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0e0040;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0e0041;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0e0045;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0e0042;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0e0043;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0e0044;
public static final int Base_Theme_AppCompat_Light = 0x7f0e0046;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0e0047;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0e0048;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0e004c;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0e0049;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0e004a;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0e004b;
public static final int Base_V11_ThemeOverlay_AppCompat_Dialog = 0x7f0e0056;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0e0054;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0e0055;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0e0057;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0e0058;
public static final int Base_V14_Widget_Design_AppBarLayout = 0x7f0e0059;
public static final int Base_V21_ThemeOverlay_AppCompat_Dialog = 0x7f0e005e;
public static final int Base_V21_Theme_AppCompat = 0x7f0e005a;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0e005b;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0e005c;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0e005d;
public static final int Base_V21_Widget_Design_AppBarLayout = 0x7f0e005f;
public static final int Base_V22_Theme_AppCompat = 0x7f0e0060;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0e0061;
public static final int Base_V23_Theme_AppCompat = 0x7f0e0062;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0e0063;
public static final int Base_V26_Theme_AppCompat = 0x7f0e0064;
public static final int Base_V26_Theme_AppCompat_Light = 0x7f0e0065;
public static final int Base_V26_Widget_AppCompat_Toolbar = 0x7f0e0066;
public static final int Base_V26_Widget_Design_AppBarLayout = 0x7f0e0067;
public static final int Base_V7_ThemeOverlay_AppCompat_Dialog = 0x7f0e006c;
public static final int Base_V7_Theme_AppCompat = 0x7f0e0068;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0e0069;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0e006a;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0e006b;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0e006d;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0e006e;
public static final int Base_V7_Widget_AppCompat_Toolbar = 0x7f0e006f;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0e0070;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0e0071;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0e0072;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0e0073;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0e0074;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0e0075;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0e0076;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0e0077;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0e0078;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0e0079;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0e007a;
public static final int Base_Widget_AppCompat_Button = 0x7f0e007b;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0e0081;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0e0082;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0e007c;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0e007d;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0e007e;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0e007f;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0e0080;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0e0083;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0e0084;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0e0085;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0e0086;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0e0087;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0e0088;
public static final int Base_Widget_AppCompat_EditText = 0x7f0e0089;
public static final int Base_Widget_AppCompat_ImageButton = 0x7f0e008a;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0e008b;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0e008c;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0e008d;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0e008e;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0e008f;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0e0090;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0e0091;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0e0092;
public static final int Base_Widget_AppCompat_ListMenuView = 0x7f0e0093;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0e0094;
public static final int Base_Widget_AppCompat_ListView = 0x7f0e0095;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0e0096;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0e0097;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0e0098;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0e0099;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0e009a;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0e009b;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0e009c;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0e009d;
public static final int Base_Widget_AppCompat_RatingBar_Indicator = 0x7f0e009e;
public static final int Base_Widget_AppCompat_RatingBar_Small = 0x7f0e009f;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0e00a0;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0e00a1;
public static final int Base_Widget_AppCompat_SeekBar = 0x7f0e00a2;
public static final int Base_Widget_AppCompat_SeekBar_Discrete = 0x7f0e00a3;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0e00a4;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0e00a5;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0e00a6;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0e00a7;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0e00a8;
public static final int Base_Widget_Design_AppBarLayout = 0x7f0e00a9;
public static final int Base_Widget_Design_TabLayout = 0x7f0e00aa;
public static final int Platform_AppCompat = 0x7f0e00ae;
public static final int Platform_AppCompat_Light = 0x7f0e00af;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0e00b0;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0e00b1;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0e00b2;
public static final int Platform_V11_AppCompat = 0x7f0e00b3;
public static final int Platform_V11_AppCompat_Light = 0x7f0e00b4;
public static final int Platform_V14_AppCompat = 0x7f0e00b5;
public static final int Platform_V14_AppCompat_Light = 0x7f0e00b6;
public static final int Platform_V21_AppCompat = 0x7f0e00b7;
public static final int Platform_V21_AppCompat_Light = 0x7f0e00b8;
public static final int Platform_V25_AppCompat = 0x7f0e00b9;
public static final int Platform_V25_AppCompat_Light = 0x7f0e00ba;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0e00bb;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0e00bc;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0e00bd;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0e00be;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0e00bf;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0e00c0;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0e00c1;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0e00c7;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0e00c2;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0e00c3;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0e00c4;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0e00c5;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0e00c6;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton = 0x7f0e00c8;
public static final int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0e00c9;
public static final int TextAppearance_AppCompat = 0x7f0e00ca;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0e00cb;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0e00cc;
public static final int TextAppearance_AppCompat_Button = 0x7f0e00cd;
public static final int TextAppearance_AppCompat_Caption = 0x7f0e00ce;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0e00cf;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0e00d0;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0e00d1;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0e00d2;
public static final int TextAppearance_AppCompat_Headline = 0x7f0e00d3;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0e00d4;
public static final int TextAppearance_AppCompat_Large = 0x7f0e00d5;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0e00d6;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0e00d7;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0e00d8;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0e00d9;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0e00da;
public static final int TextAppearance_AppCompat_Medium = 0x7f0e00db;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0e00dc;
public static final int TextAppearance_AppCompat_Menu = 0x7f0e00dd;
public static final int TextAppearance_AppCompat_Notification = 0x7f0e00de;
public static final int TextAppearance_AppCompat_Notification_Info = 0x7f0e00df;
public static final int TextAppearance_AppCompat_Notification_Info_Media = 0x7f0e00e0;
public static final int TextAppearance_AppCompat_Notification_Line2 = 0x7f0e00e1;
public static final int TextAppearance_AppCompat_Notification_Line2_Media = 0x7f0e00e2;
public static final int TextAppearance_AppCompat_Notification_Media = 0x7f0e00e3;
public static final int TextAppearance_AppCompat_Notification_Time = 0x7f0e00e4;
public static final int TextAppearance_AppCompat_Notification_Time_Media = 0x7f0e00e5;
public static final int TextAppearance_AppCompat_Notification_Title = 0x7f0e00e6;
public static final int TextAppearance_AppCompat_Notification_Title_Media = 0x7f0e00e7;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0e00e8;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0e00e9;
public static final int TextAppearance_AppCompat_Small = 0x7f0e00ea;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0e00eb;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0e00ec;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0e00ed;
public static final int TextAppearance_AppCompat_Title = 0x7f0e00ee;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0e00ef;
public static final int TextAppearance_AppCompat_Tooltip = 0x7f0e00f0;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0e00f1;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0e00f2;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0e00f3;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0e00f4;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0e00f5;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0e00f6;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0e00f7;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0e00f8;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0e00f9;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0e00fa;
public static final int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 0x7f0e00fb;
public static final int TextAppearance_AppCompat_Widget_Button_Colored = 0x7f0e00fc;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0e00fd;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0e00fe;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Header = 0x7f0e00ff;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0e0100;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0e0101;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0e0102;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0e0103;
public static final int TextAppearance_Compat_Notification = 0x7f0e0104;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0e0105;
public static final int TextAppearance_Compat_Notification_Info_Media = 0x7f0e0106;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0e0107;
public static final int TextAppearance_Compat_Notification_Line2_Media = 0x7f0e0108;
public static final int TextAppearance_Compat_Notification_Media = 0x7f0e0109;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0e010a;
public static final int TextAppearance_Compat_Notification_Time_Media = 0x7f0e010b;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0e010c;
public static final int TextAppearance_Compat_Notification_Title_Media = 0x7f0e010d;
public static final int TextAppearance_Design_CollapsingToolbar_Expanded = 0x7f0e010e;
public static final int TextAppearance_Design_Counter = 0x7f0e010f;
public static final int TextAppearance_Design_Counter_Overflow = 0x7f0e0110;
public static final int TextAppearance_Design_Error = 0x7f0e0111;
public static final int TextAppearance_Design_Hint = 0x7f0e0112;
public static final int TextAppearance_Design_Snackbar_Message = 0x7f0e0113;
public static final int TextAppearance_Design_Tab = 0x7f0e0114;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0e0115;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0e0116;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0e0117;
public static final int ThemeOverlay_AppCompat = 0x7f0e0133;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0e0134;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0e0135;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0e0136;
public static final int ThemeOverlay_AppCompat_Dialog = 0x7f0e0137;
public static final int ThemeOverlay_AppCompat_Dialog_Alert = 0x7f0e0138;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0e0139;
public static final int Theme_AppCompat = 0x7f0e0118;
public static final int Theme_AppCompat_CompactMenu = 0x7f0e0119;
public static final int Theme_AppCompat_DayNight = 0x7f0e011a;
public static final int Theme_AppCompat_DayNight_DarkActionBar = 0x7f0e011b;
public static final int Theme_AppCompat_DayNight_Dialog = 0x7f0e011c;
public static final int Theme_AppCompat_DayNight_DialogWhenLarge = 0x7f0e011f;
public static final int Theme_AppCompat_DayNight_Dialog_Alert = 0x7f0e011d;
public static final int Theme_AppCompat_DayNight_Dialog_MinWidth = 0x7f0e011e;
public static final int Theme_AppCompat_DayNight_NoActionBar = 0x7f0e0120;
public static final int Theme_AppCompat_Dialog = 0x7f0e0121;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0e0124;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0e0122;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0e0123;
public static final int Theme_AppCompat_Light = 0x7f0e0125;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0e0126;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0e0127;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0e012a;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0e0128;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0e0129;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0e012b;
public static final int Theme_AppCompat_NoActionBar = 0x7f0e012c;
public static final int Theme_Design = 0x7f0e012d;
public static final int Theme_Design_BottomSheetDialog = 0x7f0e012e;
public static final int Theme_Design_Light = 0x7f0e012f;
public static final int Theme_Design_Light_BottomSheetDialog = 0x7f0e0130;
public static final int Theme_Design_Light_NoActionBar = 0x7f0e0131;
public static final int Theme_Design_NoActionBar = 0x7f0e0132;
public static final int Widget_AppCompat_ActionBar = 0x7f0e013a;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0e013b;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0e013c;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0e013d;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0e013e;
public static final int Widget_AppCompat_ActionButton = 0x7f0e013f;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0e0140;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0e0141;
public static final int Widget_AppCompat_ActionMode = 0x7f0e0142;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0e0143;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0e0144;
public static final int Widget_AppCompat_Button = 0x7f0e0145;
public static final int Widget_AppCompat_ButtonBar = 0x7f0e014b;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0e014c;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0e0146;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0e0147;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0e0148;
public static final int Widget_AppCompat_Button_Colored = 0x7f0e0149;
public static final int Widget_AppCompat_Button_Small = 0x7f0e014a;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0e014d;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0e014e;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0e014f;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0e0150;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0e0151;
public static final int Widget_AppCompat_EditText = 0x7f0e0152;
public static final int Widget_AppCompat_ImageButton = 0x7f0e0153;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0e0154;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0e0155;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0e0156;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0e0157;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0e0158;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0e0159;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0e015a;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0e015b;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0e015c;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0e015d;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0e015e;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0e015f;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0e0160;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0e0161;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0e0162;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0e0163;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0e0164;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0e0165;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0e0166;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0e0167;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0e0168;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0e0169;
public static final int Widget_AppCompat_ListMenuView = 0x7f0e016a;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0e016b;
public static final int Widget_AppCompat_ListView = 0x7f0e016c;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0e016d;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0e016e;
public static final int Widget_AppCompat_PopupMenu = 0x7f0e016f;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0e0170;
public static final int Widget_AppCompat_PopupWindow = 0x7f0e0171;
public static final int Widget_AppCompat_ProgressBar = 0x7f0e0172;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0e0173;
public static final int Widget_AppCompat_RatingBar = 0x7f0e0174;
public static final int Widget_AppCompat_RatingBar_Indicator = 0x7f0e0175;
public static final int Widget_AppCompat_RatingBar_Small = 0x7f0e0176;
public static final int Widget_AppCompat_SearchView = 0x7f0e0177;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0e0178;
public static final int Widget_AppCompat_SeekBar = 0x7f0e0179;
public static final int Widget_AppCompat_SeekBar_Discrete = 0x7f0e017a;
public static final int Widget_AppCompat_Spinner = 0x7f0e017b;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0e017c;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0e017d;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0e017e;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0e017f;
public static final int Widget_AppCompat_Toolbar = 0x7f0e0180;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0e0181;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0e0182;
public static final int Widget_Compat_NotificationActionText = 0x7f0e0183;
public static final int Widget_Design_AppBarLayout = 0x7f0e0184;
public static final int Widget_Design_BottomNavigationView = 0x7f0e0185;
public static final int Widget_Design_BottomSheet_Modal = 0x7f0e0186;
public static final int Widget_Design_CollapsingToolbar = 0x7f0e0187;
public static final int Widget_Design_CoordinatorLayout = 0x7f0e0188;
public static final int Widget_Design_FloatingActionButton = 0x7f0e0189;
public static final int Widget_Design_NavigationView = 0x7f0e018a;
public static final int Widget_Design_ScrimInsetsFrameLayout = 0x7f0e018b;
public static final int Widget_Design_Snackbar = 0x7f0e018c;
public static final int Widget_Design_TabLayout = 0x7f0e018d;
public static final int Widget_Design_TextInputLayout = 0x7f0e018e;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f030031, 0x7f030032, 0x7f030033, 0x7f030067, 0x7f030068, 0x7f030069, 0x7f03006a, 0x7f03006b, 0x7f03006c, 0x7f030078, 0x7f03007c, 0x7f03007d, 0x7f030088, 0x7f0300a8, 0x7f0300a9, 0x7f0300ad, 0x7f0300ae, 0x7f0300af, 0x7f0300b4, 0x7f0300ba, 0x7f030100, 0x7f030109, 0x7f030119, 0x7f03011d, 0x7f03011e, 0x7f030142, 0x7f030145, 0x7f030171, 0x7f03017b };
public static final int ActionBar_background = 0;
public static final int ActionBar_backgroundSplit = 1;
public static final int ActionBar_backgroundStacked = 2;
public static final int ActionBar_contentInsetEnd = 3;
public static final int ActionBar_contentInsetEndWithActions = 4;
public static final int ActionBar_contentInsetLeft = 5;
public static final int ActionBar_contentInsetRight = 6;
public static final int ActionBar_contentInsetStart = 7;
public static final int ActionBar_contentInsetStartWithNavigation = 8;
public static final int ActionBar_customNavigationLayout = 9;
public static final int ActionBar_displayOptions = 10;
public static final int ActionBar_divider = 11;
public static final int ActionBar_elevation = 12;
public static final int ActionBar_height = 13;
public static final int ActionBar_hideOnContentScroll = 14;
public static final int ActionBar_homeAsUpIndicator = 15;
public static final int ActionBar_homeLayout = 16;
public static final int ActionBar_icon = 17;
public static final int ActionBar_indeterminateProgressStyle = 18;
public static final int ActionBar_itemPadding = 19;
public static final int ActionBar_logo = 20;
public static final int ActionBar_navigationMode = 21;
public static final int ActionBar_popupTheme = 22;
public static final int ActionBar_progressBarPadding = 23;
public static final int ActionBar_progressBarStyle = 24;
public static final int ActionBar_subtitle = 25;
public static final int ActionBar_subtitleTextStyle = 26;
public static final int ActionBar_title = 27;
public static final int ActionBar_titleTextStyle = 28;
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMode = { 0x7f030031, 0x7f030032, 0x7f030054, 0x7f0300a8, 0x7f030145, 0x7f03017b };
public static final int ActionMode_background = 0;
public static final int ActionMode_backgroundSplit = 1;
public static final int ActionMode_closeItemLayout = 2;
public static final int ActionMode_height = 3;
public static final int ActionMode_subtitleTextStyle = 4;
public static final int ActionMode_titleTextStyle = 5;
public static final int[] ActivityChooserView = { 0x7f03008b, 0x7f0300b5 };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static final int ActivityChooserView_initialActivityCount = 1;
public static final int[] AlertDialog = { 0x010100f2, 0x7f030046, 0x7f0300f7, 0x7f0300f8, 0x7f030106, 0x7f030132, 0x7f030133 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 2;
public static final int AlertDialog_listLayout = 3;
public static final int AlertDialog_multiChoiceItemLayout = 4;
public static final int AlertDialog_showTitle = 5;
public static final int AlertDialog_singleChoiceItemLayout = 6;
public static final int[] AppBarLayout = { 0x010100d4, 0x0101048f, 0x01010540, 0x7f030088, 0x7f03008c };
public static final int AppBarLayout_android_background = 0;
public static final int AppBarLayout_android_touchscreenBlocksFocus = 1;
public static final int AppBarLayout_android_keyboardNavigationCluster = 2;
public static final int AppBarLayout_elevation = 3;
public static final int AppBarLayout_expanded = 4;
public static final int[] AppBarLayoutStates = { 0x7f03013c, 0x7f03013d };
public static final int AppBarLayoutStates_state_collapsed = 0;
public static final int AppBarLayoutStates_state_collapsible = 1;
public static final int[] AppBarLayout_Layout = { 0x7f0300f3, 0x7f0300f4 };
public static final int AppBarLayout_Layout_layout_scrollFlags = 0;
public static final int AppBarLayout_Layout_layout_scrollInterpolator = 1;
public static final int[] AppCompatImageView = { 0x01010119, 0x7f030139, 0x7f03016f, 0x7f030170 };
public static final int AppCompatImageView_android_src = 0;
public static final int AppCompatImageView_srcCompat = 1;
public static final int AppCompatImageView_tint = 2;
public static final int AppCompatImageView_tintMode = 3;
public static final int[] AppCompatSeekBar = { 0x01010142, 0x7f03016c, 0x7f03016d, 0x7f03016e };
public static final int AppCompatSeekBar_android_thumb = 0;
public static final int AppCompatSeekBar_tickMark = 1;
public static final int AppCompatSeekBar_tickMarkTint = 2;
public static final int AppCompatSeekBar_tickMarkTintMode = 3;
public static final int[] AppCompatTextHelper = { 0x01010034, 0x0101016d, 0x0101016e, 0x0101016f, 0x01010170, 0x01010392, 0x01010393 };
public static final int AppCompatTextHelper_android_textAppearance = 0;
public static final int AppCompatTextHelper_android_drawableTop = 1;
public static final int AppCompatTextHelper_android_drawableBottom = 2;
public static final int AppCompatTextHelper_android_drawableLeft = 3;
public static final int AppCompatTextHelper_android_drawableRight = 4;
public static final int AppCompatTextHelper_android_drawableStart = 5;
public static final int AppCompatTextHelper_android_drawableEnd = 6;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f03002c, 0x7f03002d, 0x7f03002e, 0x7f03002f, 0x7f030030, 0x7f03009b, 0x7f03015b };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_autoSizeMaxTextSize = 1;
public static final int AppCompatTextView_autoSizeMinTextSize = 2;
public static final int AppCompatTextView_autoSizePresetSizes = 3;
public static final int AppCompatTextView_autoSizeStepGranularity = 4;
public static final int AppCompatTextView_autoSizeTextType = 5;
public static final int AppCompatTextView_fontFamily = 6;
public static final int AppCompatTextView_textAllCaps = 7;
public static final int[] AppCompatTheme = { 0x01010057, 0x010100ae, 0x7f030000, 0x7f030001, 0x7f030002, 0x7f030003, 0x7f030004, 0x7f030005, 0x7f030006, 0x7f030007, 0x7f030008, 0x7f030009, 0x7f03000a, 0x7f03000b, 0x7f03000c, 0x7f03000e, 0x7f03000f, 0x7f030010, 0x7f030011, 0x7f030012, 0x7f030013, 0x7f030014, 0x7f030015, 0x7f030016, 0x7f030017, 0x7f030018, 0x7f030019, 0x7f03001a, 0x7f03001b, 0x7f03001c, 0x7f03001d, 0x7f03001e, 0x7f030021, 0x7f030022, 0x7f030023, 0x7f030024, 0x7f030025, 0x7f03002b, 0x7f03003d, 0x7f030040, 0x7f030041, 0x7f030042, 0x7f030043, 0x7f030044, 0x7f030047, 0x7f030048, 0x7f030051, 0x7f030052, 0x7f03005a, 0x7f03005b, 0x7f03005c, 0x7f03005d, 0x7f03005e, 0x7f03005f, 0x7f030060, 0x7f030061, 0x7f030062, 0x7f030063, 0x7f030073, 0x7f03007a, 0x7f03007b, 0x7f03007e, 0x7f030080, 0x7f030083, 0x7f030084, 0x7f030085, 0x7f030086, 0x7f030087, 0x7f0300ad, 0x7f0300b3, 0x7f0300f5, 0x7f0300f6, 0x7f0300f9, 0x7f0300fa, 0x7f0300fb, 0x7f0300fc, 0x7f0300fd, 0x7f0300fe, 0x7f0300ff, 0x7f030110, 0x7f030111, 0x7f030112, 0x7f030118, 0x7f03011a, 0x7f030121, 0x7f030122, 0x7f030123, 0x7f030124, 0x7f03012b, 0x7f03012c, 0x7f03012d, 0x7f03012e, 0x7f030136, 0x7f030137, 0x7f030149, 0x7f03015c, 0x7f03015d, 0x7f03015e, 0x7f03015f, 0x7f030160, 0x7f030161, 0x7f030162, 0x7f030163, 0x7f030164, 0x7f030166, 0x7f03017d, 0x7f03017e, 0x7f03017f, 0x7f030180, 0x7f030187, 0x7f030188, 0x7f030189, 0x7f03018a, 0x7f03018b, 0x7f03018c, 0x7f03018d, 0x7f03018e, 0x7f03018f, 0x7f030190 };
public static final int AppCompatTheme_android_windowIsFloating = 0;
public static final int AppCompatTheme_android_windowAnimationStyle = 1;
public static final int AppCompatTheme_actionBarDivider = 2;
public static final int AppCompatTheme_actionBarItemBackground = 3;
public static final int AppCompatTheme_actionBarPopupTheme = 4;
public static final int AppCompatTheme_actionBarSize = 5;
public static final int AppCompatTheme_actionBarSplitStyle = 6;
public static final int AppCompatTheme_actionBarStyle = 7;
public static final int AppCompatTheme_actionBarTabBarStyle = 8;
public static final int AppCompatTheme_actionBarTabStyle = 9;
public static final int AppCompatTheme_actionBarTabTextStyle = 10;
public static final int AppCompatTheme_actionBarTheme = 11;
public static final int AppCompatTheme_actionBarWidgetTheme = 12;
public static final int AppCompatTheme_actionButtonStyle = 13;
public static final int AppCompatTheme_actionDropDownStyle = 14;
public static final int AppCompatTheme_actionMenuTextAppearance = 15;
public static final int AppCompatTheme_actionMenuTextColor = 16;
public static final int AppCompatTheme_actionModeBackground = 17;
public static final int AppCompatTheme_actionModeCloseButtonStyle = 18;
public static final int AppCompatTheme_actionModeCloseDrawable = 19;
public static final int AppCompatTheme_actionModeCopyDrawable = 20;
public static final int AppCompatTheme_actionModeCutDrawable = 21;
public static final int AppCompatTheme_actionModeFindDrawable = 22;
public static final int AppCompatTheme_actionModePasteDrawable = 23;
public static final int AppCompatTheme_actionModePopupWindowStyle = 24;
public static final int AppCompatTheme_actionModeSelectAllDrawable = 25;
public static final int AppCompatTheme_actionModeShareDrawable = 26;
public static final int AppCompatTheme_actionModeSplitBackground = 27;
public static final int AppCompatTheme_actionModeStyle = 28;
public static final int AppCompatTheme_actionModeWebSearchDrawable = 29;
public static final int AppCompatTheme_actionOverflowButtonStyle = 30;
public static final int AppCompatTheme_actionOverflowMenuStyle = 31;
public static final int AppCompatTheme_activityChooserViewStyle = 32;
public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33;
public static final int AppCompatTheme_alertDialogCenterButtons = 34;
public static final int AppCompatTheme_alertDialogStyle = 35;
public static final int AppCompatTheme_alertDialogTheme = 36;
public static final int AppCompatTheme_autoCompleteTextViewStyle = 37;
public static final int AppCompatTheme_borderlessButtonStyle = 38;
public static final int AppCompatTheme_buttonBarButtonStyle = 39;
public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40;
public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41;
public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42;
public static final int AppCompatTheme_buttonBarStyle = 43;
public static final int AppCompatTheme_buttonStyle = 44;
public static final int AppCompatTheme_buttonStyleSmall = 45;
public static final int AppCompatTheme_checkboxStyle = 46;
public static final int AppCompatTheme_checkedTextViewStyle = 47;
public static final int AppCompatTheme_colorAccent = 48;
public static final int AppCompatTheme_colorBackgroundFloating = 49;
public static final int AppCompatTheme_colorButtonNormal = 50;
public static final int AppCompatTheme_colorControlActivated = 51;
public static final int AppCompatTheme_colorControlHighlight = 52;
public static final int AppCompatTheme_colorControlNormal = 53;
public static final int AppCompatTheme_colorError = 54;
public static final int AppCompatTheme_colorPrimary = 55;
public static final int AppCompatTheme_colorPrimaryDark = 56;
public static final int AppCompatTheme_colorSwitchThumbNormal = 57;
public static final int AppCompatTheme_controlBackground = 58;
public static final int AppCompatTheme_dialogPreferredPadding = 59;
public static final int AppCompatTheme_dialogTheme = 60;
public static final int AppCompatTheme_dividerHorizontal = 61;
public static final int AppCompatTheme_dividerVertical = 62;
public static final int AppCompatTheme_dropDownListViewStyle = 63;
public static final int AppCompatTheme_dropdownListPreferredItemHeight = 64;
public static final int AppCompatTheme_editTextBackground = 65;
public static final int AppCompatTheme_editTextColor = 66;
public static final int AppCompatTheme_editTextStyle = 67;
public static final int AppCompatTheme_homeAsUpIndicator = 68;
public static final int AppCompatTheme_imageButtonStyle = 69;
public static final int AppCompatTheme_listChoiceBackgroundIndicator = 70;
public static final int AppCompatTheme_listDividerAlertDialog = 71;
public static final int AppCompatTheme_listMenuViewStyle = 72;
public static final int AppCompatTheme_listPopupWindowStyle = 73;
public static final int AppCompatTheme_listPreferredItemHeight = 74;
public static final int AppCompatTheme_listPreferredItemHeightLarge = 75;
public static final int AppCompatTheme_listPreferredItemHeightSmall = 76;
public static final int AppCompatTheme_listPreferredItemPaddingLeft = 77;
public static final int AppCompatTheme_listPreferredItemPaddingRight = 78;
public static final int AppCompatTheme_panelBackground = 79;
public static final int AppCompatTheme_panelMenuListTheme = 80;
public static final int AppCompatTheme_panelMenuListWidth = 81;
public static final int AppCompatTheme_popupMenuStyle = 82;
public static final int AppCompatTheme_popupWindowStyle = 83;
public static final int AppCompatTheme_radioButtonStyle = 84;
public static final int AppCompatTheme_ratingBarStyle = 85;
public static final int AppCompatTheme_ratingBarStyleIndicator = 86;
public static final int AppCompatTheme_ratingBarStyleSmall = 87;
public static final int AppCompatTheme_searchViewStyle = 88;
public static final int AppCompatTheme_seekBarStyle = 89;
public static final int AppCompatTheme_selectableItemBackground = 90;
public static final int AppCompatTheme_selectableItemBackgroundBorderless = 91;
public static final int AppCompatTheme_spinnerDropDownItemStyle = 92;
public static final int AppCompatTheme_spinnerStyle = 93;
public static final int AppCompatTheme_switchStyle = 94;
public static final int AppCompatTheme_textAppearanceLargePopupMenu = 95;
public static final int AppCompatTheme_textAppearanceListItem = 96;
public static final int AppCompatTheme_textAppearanceListItemSecondary = 97;
public static final int AppCompatTheme_textAppearanceListItemSmall = 98;
public static final int AppCompatTheme_textAppearancePopupMenuHeader = 99;
public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 100;
public static final int AppCompatTheme_textAppearanceSearchResultTitle = 101;
public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 102;
public static final int AppCompatTheme_textColorAlertDialogListItem = 103;
public static final int AppCompatTheme_textColorSearchUrl = 104;
public static final int AppCompatTheme_toolbarNavigationButtonStyle = 105;
public static final int AppCompatTheme_toolbarStyle = 106;
public static final int AppCompatTheme_tooltipForegroundColor = 107;
public static final int AppCompatTheme_tooltipFrameBackground = 108;
public static final int AppCompatTheme_windowActionBar = 109;
public static final int AppCompatTheme_windowActionBarOverlay = 110;
public static final int AppCompatTheme_windowActionModeOverlay = 111;
public static final int AppCompatTheme_windowFixedHeightMajor = 112;
public static final int AppCompatTheme_windowFixedHeightMinor = 113;
public static final int AppCompatTheme_windowFixedWidthMajor = 114;
public static final int AppCompatTheme_windowFixedWidthMinor = 115;
public static final int AppCompatTheme_windowMinWidthMajor = 116;
public static final int AppCompatTheme_windowMinWidthMinor = 117;
public static final int AppCompatTheme_windowNoTitle = 118;
public static final int[] BottomNavigationView = { 0x7f030088, 0x7f0300b8, 0x7f0300b9, 0x7f0300bc, 0x7f030105 };
public static final int BottomNavigationView_elevation = 0;
public static final int BottomNavigationView_itemBackground = 1;
public static final int BottomNavigationView_itemIconTint = 2;
public static final int BottomNavigationView_itemTextColor = 3;
public static final int BottomNavigationView_menu = 4;
public static final int[] BottomSheetBehavior_Layout = { 0x7f030038, 0x7f03003a, 0x7f03003b };
public static final int BottomSheetBehavior_Layout_behavior_hideable = 0;
public static final int BottomSheetBehavior_Layout_behavior_peekHeight = 1;
public static final int BottomSheetBehavior_Layout_behavior_skipCollapsed = 2;
public static final int[] ButtonBarLayout = { 0x7f030026 };
public static final int ButtonBarLayout_allowStacking = 0;
public static final int[] CollapsingToolbarLayout = { 0x7f030057, 0x7f030058, 0x7f030072, 0x7f03008d, 0x7f03008e, 0x7f03008f, 0x7f030090, 0x7f030091, 0x7f030092, 0x7f030093, 0x7f030127, 0x7f030128, 0x7f03013f, 0x7f030171, 0x7f030172, 0x7f03017c };
public static final int CollapsingToolbarLayout_collapsedTitleGravity = 0;
public static final int CollapsingToolbarLayout_collapsedTitleTextAppearance = 1;
public static final int CollapsingToolbarLayout_contentScrim = 2;
public static final int CollapsingToolbarLayout_expandedTitleGravity = 3;
public static final int CollapsingToolbarLayout_expandedTitleMargin = 4;
public static final int CollapsingToolbarLayout_expandedTitleMarginBottom = 5;
public static final int CollapsingToolbarLayout_expandedTitleMarginEnd = 6;
public static final int CollapsingToolbarLayout_expandedTitleMarginStart = 7;
public static final int CollapsingToolbarLayout_expandedTitleMarginTop = 8;
public static final int CollapsingToolbarLayout_expandedTitleTextAppearance = 9;
public static final int CollapsingToolbarLayout_scrimAnimationDuration = 10;
public static final int CollapsingToolbarLayout_scrimVisibleHeightTrigger = 11;
public static final int CollapsingToolbarLayout_statusBarScrim = 12;
public static final int CollapsingToolbarLayout_title = 13;
public static final int CollapsingToolbarLayout_titleEnabled = 14;
public static final int CollapsingToolbarLayout_toolbarId = 15;
public static final int[] CollapsingToolbarLayout_Layout = { 0x7f0300c3, 0x7f0300c4 };
public static final int CollapsingToolbarLayout_Layout_layout_collapseMode = 0;
public static final int CollapsingToolbarLayout_Layout_layout_collapseParallaxMultiplier = 1;
public static final int[] ColorStateListItem = { 0x010101a5, 0x0101031f, 0x7f030027 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] CompoundButton = { 0x01010107, 0x7f030049, 0x7f03004a };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] CoordinatorLayout = { 0x7f0300bd, 0x7f03013e };
public static final int CoordinatorLayout_keylines = 0;
public static final int CoordinatorLayout_statusBarBackground = 1;
public static final int[] CoordinatorLayout_Layout = { 0x010100b3, 0x7f0300c0, 0x7f0300c1, 0x7f0300c2, 0x7f0300e7, 0x7f0300f0, 0x7f0300f1 };
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0;
public static final int CoordinatorLayout_Layout_layout_anchor = 1;
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2;
public static final int CoordinatorLayout_Layout_layout_behavior = 3;
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
public static final int CoordinatorLayout_Layout_layout_insetEdge = 5;
public static final int CoordinatorLayout_Layout_layout_keyline = 6;
public static final int[] DesignTheme = { 0x7f03003e, 0x7f03003f, 0x7f030165 };
public static final int DesignTheme_bottomSheetDialogTheme = 0;
public static final int DesignTheme_bottomSheetStyle = 1;
public static final int DesignTheme_textColorError = 2;
public static final int[] DrawerArrowToggle = { 0x7f030029, 0x7f03002a, 0x7f030036, 0x7f030059, 0x7f030081, 0x7f0300a5, 0x7f030135, 0x7f030168 };
public static final int DrawerArrowToggle_arrowHeadLength = 0;
public static final int DrawerArrowToggle_arrowShaftLength = 1;
public static final int DrawerArrowToggle_barLength = 2;
public static final int DrawerArrowToggle_color = 3;
public static final int DrawerArrowToggle_drawableSize = 4;
public static final int DrawerArrowToggle_gapBetweenBars = 5;
public static final int DrawerArrowToggle_spinBars = 6;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] FloatingActionButton = { 0x7f030034, 0x7f030035, 0x7f03003c, 0x7f030088, 0x7f030094, 0x7f03011c, 0x7f030126, 0x7f030185 };
public static final int FloatingActionButton_backgroundTint = 0;
public static final int FloatingActionButton_backgroundTintMode = 1;
public static final int FloatingActionButton_borderWidth = 2;
public static final int FloatingActionButton_elevation = 3;
public static final int FloatingActionButton_fabSize = 4;
public static final int FloatingActionButton_pressedTranslationZ = 5;
public static final int FloatingActionButton_rippleColor = 6;
public static final int FloatingActionButton_useCompatPadding = 7;
public static final int[] FloatingActionButton_Behavior_Layout = { 0x7f030037 };
public static final int FloatingActionButton_Behavior_Layout_behavior_autoHide = 0;
public static final int[] FontFamily = { 0x7f03009c, 0x7f03009d, 0x7f03009e, 0x7f03009f, 0x7f0300a0, 0x7f0300a1 };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x7f03009a, 0x7f0300a2, 0x7f0300a3 };
public static final int FontFamilyFont_font = 0;
public static final int FontFamilyFont_fontStyle = 1;
public static final int FontFamilyFont_fontWeight = 2;
public static final int[] ForegroundLinearLayout = { 0x01010109, 0x01010200, 0x7f0300a4 };
public static final int ForegroundLinearLayout_android_foreground = 0;
public static final int ForegroundLinearLayout_android_foregroundGravity = 1;
public static final int ForegroundLinearLayout_foregroundInsidePadding = 2;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f03007d, 0x7f03007f, 0x7f030104, 0x7f030130 };
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 6;
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
public static final int LinearLayoutCompat_showDividers = 8;
public static final int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_visible = 2;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f03000d, 0x7f03001f, 0x7f030020, 0x7f030028, 0x7f030066, 0x7f0300b0, 0x7f0300b1, 0x7f03010a, 0x7f03012f, 0x7f030181 };
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_actionLayout = 13;
public static final int MenuItem_actionProviderClass = 14;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_alphabeticModifiers = 16;
public static final int MenuItem_contentDescription = 17;
public static final int MenuItem_iconTint = 18;
public static final int MenuItem_iconTintMode = 19;
public static final int MenuItem_numericModifiers = 20;
public static final int MenuItem_showAsAction = 21;
public static final int MenuItem_tooltipText = 22;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f03011b, 0x7f030140 };
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_preserveIconSpacing = 7;
public static final int MenuView_subMenuArrow = 8;
public static final int[] NavigationView = { 0x010100d4, 0x010100dd, 0x0101011f, 0x7f030088, 0x7f0300a7, 0x7f0300b8, 0x7f0300b9, 0x7f0300bb, 0x7f0300bc, 0x7f030105 };
public static final int NavigationView_android_background = 0;
public static final int NavigationView_android_fitsSystemWindows = 1;
public static final int NavigationView_android_maxWidth = 2;
public static final int NavigationView_elevation = 3;
public static final int NavigationView_headerLayout = 4;
public static final int NavigationView_itemBackground = 5;
public static final int NavigationView_itemIconTint = 6;
public static final int NavigationView_itemTextAppearance = 7;
public static final int NavigationView_itemTextColor = 8;
public static final int NavigationView_menu = 9;
public static final int[] PopupWindow = { 0x01010176, 0x010102c9, 0x7f03010b };
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_android_popupAnimationStyle = 1;
public static final int PopupWindow_overlapAnchor = 2;
public static final int[] PopupWindowBackgroundState = { 0x7f03013b };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int[] RecycleListView = { 0x7f03010c, 0x7f03010f };
public static final int RecycleListView_paddingBottomNoButtons = 0;
public static final int RecycleListView_paddingTopNoTitle = 1;
public static final int[] RecyclerView = { 0x010100c4, 0x010100f1, 0x7f030095, 0x7f030096, 0x7f030097, 0x7f030098, 0x7f030099, 0x7f0300bf, 0x7f030125, 0x7f030134, 0x7f03013a };
public static final int RecyclerView_android_orientation = 0;
public static final int RecyclerView_android_descendantFocusability = 1;
public static final int RecyclerView_fastScrollEnabled = 2;
public static final int RecyclerView_fastScrollHorizontalThumbDrawable = 3;
public static final int RecyclerView_fastScrollHorizontalTrackDrawable = 4;
public static final int RecyclerView_fastScrollVerticalThumbDrawable = 5;
public static final int RecyclerView_fastScrollVerticalTrackDrawable = 6;
public static final int RecyclerView_layoutManager = 7;
public static final int RecyclerView_reverseLayout = 8;
public static final int RecyclerView_spanCount = 9;
public static final int RecyclerView_stackFromEnd = 10;
public static final int[] ScrimInsetsFrameLayout = { 0x7f0300b6 };
public static final int ScrimInsetsFrameLayout_insetForeground = 0;
public static final int[] ScrollingViewBehavior_Layout = { 0x7f030039 };
public static final int ScrollingViewBehavior_Layout_behavior_overlapTop = 0;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f030053, 0x7f030064, 0x7f030079, 0x7f0300a6, 0x7f0300b2, 0x7f0300be, 0x7f03011f, 0x7f030120, 0x7f030129, 0x7f03012a, 0x7f030141, 0x7f030146, 0x7f030186 };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_closeIcon = 4;
public static final int SearchView_commitIcon = 5;
public static final int SearchView_defaultQueryHint = 6;
public static final int SearchView_goIcon = 7;
public static final int SearchView_iconifiedByDefault = 8;
public static final int SearchView_layout = 9;
public static final int SearchView_queryBackground = 10;
public static final int SearchView_queryHint = 11;
public static final int SearchView_searchHintIcon = 12;
public static final int SearchView_searchIcon = 13;
public static final int SearchView_submitBackground = 14;
public static final int SearchView_suggestionRowLayout = 15;
public static final int SearchView_voiceIcon = 16;
public static final int[] SnackbarLayout = { 0x0101011f, 0x7f030088, 0x7f030102 };
public static final int SnackbarLayout_android_maxWidth = 0;
public static final int SnackbarLayout_elevation = 1;
public static final int SnackbarLayout_maxActionInlineWidth = 2;
public static final int[] Spinner = { 0x010100b2, 0x01010176, 0x0101017b, 0x01010262, 0x7f030119 };
public static final int Spinner_android_entries = 0;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_popupTheme = 4;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f030131, 0x7f030138, 0x7f030147, 0x7f030148, 0x7f03014a, 0x7f030169, 0x7f03016a, 0x7f03016b, 0x7f030182, 0x7f030183, 0x7f030184 };
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 3;
public static final int SwitchCompat_splitTrack = 4;
public static final int SwitchCompat_switchMinWidth = 5;
public static final int SwitchCompat_switchPadding = 6;
public static final int SwitchCompat_switchTextAppearance = 7;
public static final int SwitchCompat_thumbTextPadding = 8;
public static final int SwitchCompat_thumbTint = 9;
public static final int SwitchCompat_thumbTintMode = 10;
public static final int SwitchCompat_track = 11;
public static final int SwitchCompat_trackTint = 12;
public static final int SwitchCompat_trackTintMode = 13;
public static final int[] TabItem = { 0x01010002, 0x010100f2, 0x0101014f };
public static final int TabItem_android_icon = 0;
public static final int TabItem_android_layout = 1;
public static final int TabItem_android_text = 2;
public static final int[] TabLayout = { 0x7f03014b, 0x7f03014c, 0x7f03014d, 0x7f03014e, 0x7f03014f, 0x7f030150, 0x7f030151, 0x7f030152, 0x7f030153, 0x7f030154, 0x7f030155, 0x7f030156, 0x7f030157, 0x7f030158, 0x7f030159, 0x7f03015a };
public static final int TabLayout_tabBackground = 0;
public static final int TabLayout_tabContentStart = 1;
public static final int TabLayout_tabGravity = 2;
public static final int TabLayout_tabIndicatorColor = 3;
public static final int TabLayout_tabIndicatorHeight = 4;
public static final int TabLayout_tabMaxWidth = 5;
public static final int TabLayout_tabMinWidth = 6;
public static final int TabLayout_tabMode = 7;
public static final int TabLayout_tabPadding = 8;
public static final int TabLayout_tabPaddingBottom = 9;
public static final int TabLayout_tabPaddingEnd = 10;
public static final int TabLayout_tabPaddingStart = 11;
public static final int TabLayout_tabPaddingTop = 12;
public static final int TabLayout_tabSelectedTextColor = 13;
public static final int TabLayout_tabTextAppearance = 14;
public static final int TabLayout_tabTextColor = 15;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x0101009a, 0x0101009b, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x010103ac, 0x7f03009b, 0x7f03015b };
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textColorHint = 4;
public static final int TextAppearance_android_textColorLink = 5;
public static final int TextAppearance_android_shadowColor = 6;
public static final int TextAppearance_android_shadowDx = 7;
public static final int TextAppearance_android_shadowDy = 8;
public static final int TextAppearance_android_shadowRadius = 9;
public static final int TextAppearance_android_fontFamily = 10;
public static final int TextAppearance_fontFamily = 11;
public static final int TextAppearance_textAllCaps = 12;
public static final int[] TextInputLayout = { 0x0101009a, 0x01010150, 0x7f030074, 0x7f030075, 0x7f030076, 0x7f030077, 0x7f030089, 0x7f03008a, 0x7f0300aa, 0x7f0300ab, 0x7f0300ac, 0x7f030113, 0x7f030114, 0x7f030115, 0x7f030116, 0x7f030117 };
public static final int TextInputLayout_android_textColorHint = 0;
public static final int TextInputLayout_android_hint = 1;
public static final int TextInputLayout_counterEnabled = 2;
public static final int TextInputLayout_counterMaxLength = 3;
public static final int TextInputLayout_counterOverflowTextAppearance = 4;
public static final int TextInputLayout_counterTextAppearance = 5;
public static final int TextInputLayout_errorEnabled = 6;
public static final int TextInputLayout_errorTextAppearance = 7;
public static final int TextInputLayout_hintAnimationEnabled = 8;
public static final int TextInputLayout_hintEnabled = 9;
public static final int TextInputLayout_hintTextAppearance = 10;
public static final int TextInputLayout_passwordToggleContentDescription = 11;
public static final int TextInputLayout_passwordToggleDrawable = 12;
public static final int TextInputLayout_passwordToggleEnabled = 13;
public static final int TextInputLayout_passwordToggleTint = 14;
public static final int TextInputLayout_passwordToggleTintMode = 15;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f030045, 0x7f030055, 0x7f030056, 0x7f030067, 0x7f030068, 0x7f030069, 0x7f03006a, 0x7f03006b, 0x7f03006c, 0x7f030100, 0x7f030101, 0x7f030103, 0x7f030107, 0x7f030108, 0x7f030119, 0x7f030142, 0x7f030143, 0x7f030144, 0x7f030171, 0x7f030173, 0x7f030174, 0x7f030175, 0x7f030176, 0x7f030177, 0x7f030178, 0x7f030179, 0x7f03017a };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_buttonGravity = 2;
public static final int Toolbar_collapseContentDescription = 3;
public static final int Toolbar_collapseIcon = 4;
public static final int Toolbar_contentInsetEnd = 5;
public static final int Toolbar_contentInsetEndWithActions = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 9;
public static final int Toolbar_contentInsetStartWithNavigation = 10;
public static final int Toolbar_logo = 11;
public static final int Toolbar_logoDescription = 12;
public static final int Toolbar_maxButtonHeight = 13;
public static final int Toolbar_navigationContentDescription = 14;
public static final int Toolbar_navigationIcon = 15;
public static final int Toolbar_popupTheme = 16;
public static final int Toolbar_subtitle = 17;
public static final int Toolbar_subtitleTextAppearance = 18;
public static final int Toolbar_subtitleTextColor = 19;
public static final int Toolbar_title = 20;
public static final int Toolbar_titleMargin = 21;
public static final int Toolbar_titleMarginBottom = 22;
public static final int Toolbar_titleMarginEnd = 23;
public static final int Toolbar_titleMarginStart = 24;
public static final int Toolbar_titleMarginTop = 25;
public static final int Toolbar_titleMargins = 26;
public static final int Toolbar_titleTextAppearance = 27;
public static final int Toolbar_titleTextColor = 28;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f03010d, 0x7f03010e, 0x7f030167 };
public static final int View_android_theme = 0;
public static final int View_android_focusable = 1;
public static final int View_paddingEnd = 2;
public static final int View_paddingStart = 3;
public static final int View_theme = 4;
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f030034, 0x7f030035 };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_layout = 1;
public static final int ViewStubCompat_android_inflatedId = 2;
}
}
| [
"regischarles7@gmail.com"
] | regischarles7@gmail.com |
4267e1a226dd5354d6ad06e13c12aff1ea630ef9 | b64ef70461fc0b47ec2d109fcfac23ba4957815d | /app/src/main/java/com/hodanet/charge/info/channel/ChannelInfo.java | a5e9dead34cd0dfa99dfc3a8563fde42ce111784 | [] | no_license | bostrich/githubcharge | 734d4a88b8cc5432e65ccdef96467e59ddfb690e | 4895857f98a1c119664699c04faab7f76cfe8f1a | refs/heads/master | 2020-03-08T07:06:26.841681 | 2018-04-19T07:26:14 | 2018-04-19T07:26:14 | 127,986,594 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 421 | java | package com.hodanet.charge.info.channel;
/**
*
*/
public class ChannelInfo {
private int splash;
private String channel;
public int getSplash() {
return splash;
}
public void setSplash(int splash) {
this.splash = splash;
}
public String getChannel() {
return channel;
}
public void setChannel(String channel) {
this.channel = channel;
}
}
| [
"13057506020@163.com"
] | 13057506020@163.com |
875bf95252a44d064e39e3df7ee0e22119987dbc | a8d3140d7468e12f5fc249b28854489d70d9992e | /src/main/java/com/manager/enums/BusinessStatusEnum.java | 6789e79597d188d54d0482d28c1c1aaa99392cbb | [] | no_license | shenchengxiao/jinan_wuliu | c5b34f1fe2ef46c195a986210d91883ffa0bc427 | de41ef68ac362ad0349b47accff32914ea291609 | refs/heads/master | 2021-01-19T21:55:19.757362 | 2017-05-27T03:39:34 | 2017-05-27T03:39:34 | 88,723,642 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,206 | java | /**
*
*/
package com.manager.enums;
import com.manager.service.IBusinessStatusEnum;
/**
* 业务异常状态定义<br/>
* 定义公共的异常状态,各个业务系统的异常状态由各个系统自行定义.<br/>
* 但必须实现{@link com.manager.service.IBusinessStatusEnum}接口.<br/>
* APIResponse包装业务状态时,会接收该接口的对象.<br/>
*
* @date Aug 18, 2014
* @desc 业务状态
*/
public enum BusinessStatusEnum implements IBusinessStatusEnum {
SUCCESS( 0, "操作成功."),
FAIL( -1,"发生错误."),
/** 1001XXXXX参数类错误*/
PARAM_EMPTY( 100100000, "参数为空."),
PARAM_ILLEGAL( 100100001, "参数格式不正确."),
/** 1002XXXXX业务数据验证错误*/
VALIDATE_ERROR( 100200000, "验证错误."),
USER_FORGETPWD_SMS_ERR( 100200001, "短信验证码输入错误."),
VERIFY_CODE_ERROR( 100200002, "验证码错误"),
/** 100200[1,2,3]XX操作类错误*/
INSERT_FAIL( 100200101, "插入失败."),
UPDATE_FAIL( 100200201, "更新失败."),
DELETE_FAIL( 100200301, "删除失败."),
/** 1004XXXXX权限、安全、敏感信息类问题*/
SECURITY_ERROR( 100400000, "权限/安全验证出错."),
USER_LOGIN_STATUS_INVALID( 100400001, "用户未登录."),
USER_MODIFY_PASSWORD_OLD_WRONG( 100400002, "原密码不正确."),
USER_PASSWORD_WRONG( 100400003, "密码不正确."),
LOGIN_ACCOUNT_LOG_ON_OTHER_WEB( 100400100, "您的账号已经在其他浏览器登录."),
LOGIN_ACCOUNT_LOG_ON_OTHER_CLIENT( 100400101, "您的账号已经在其他移动设备登录."),
/** 1005XXXXX系统错误 */
SYSTEM_ERROR( 100500000, "系统错误."),
/** 1009XXXXX描述无法从系统中获得数据*/
EMPTY_RESULT( 100900000, "数据不存在."),
;
BusinessStatusEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
public static BusinessStatusEnum create(int code) {
for (BusinessStatusEnum ase : values()) {
if (ase.getCode() == code) {
return ase;
}
}
return null;
}
private int code;
private String desc;
public int getStatus() {
return code;
}
public void setStatus(int code) {
this.code = code;
}
public String getStatusmsg() {
return desc;
}
public void setStatusmsg(String desc) {
this.desc = desc;
}
public int getCode() {
return this.code;
}
public void setCode(int code) {this.code = code;}
public String getDesc() {
return this.desc;
}
public void setDesc(String desc) {this.desc = desc;}
}
| [
"2517674925@qq.com"
] | 2517674925@qq.com |
b934ea2c66b88076f42726cd29ed4c98f93e01d2 | fbbb62c93f9199619cfa1dd494ceca1f0e2fa0de | /cloud-gateway/src/main/java/com/example/cloud/gateway/repository/UserRepository.java | a2674564f58e4eeb529032902aeca6fd3f547e68 | [] | no_license | raikikien/E-Invoice-System | 3d6636d81f0dbf94031d35cca09185230a38d367 | f640704a7df9a6a3d6c524807723f2e659e9632c | refs/heads/main | 2023-03-31T07:22:42.089458 | 2021-04-02T10:40:31 | 2021-04-02T10:40:31 | 344,711,518 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 401 | java | //package com.example.cloud.gateway.repository;
//
//
//import com.example.cloud.gateway.models.User;
//import org.springframework.data.jpa.repository.JpaRepository;
//import org.springframework.stereotype.Repository;
//
//import java.util.Optional;
//
//@Repository
//public interface UserRepository extends JpaRepository<User, Integer> {
// Optional<User> findByUsername(String username);
//}
//
| [
"raikikien@gmail.com"
] | raikikien@gmail.com |
f53a9e070b98c12656e7e780bb8d4660aed3a643 | 5a90af10d9f735a513561ac6781925b798c1a312 | /ErreurFormule.java | 2f5788345d4bb39d578e91fdb23442da72defb54 | [] | no_license | valeriemontoya90/JavaTableur | b51dead00caaf2276531a4f22de7b23beae4d4ad | af4031d3f760b28499b772d460e2c0c5e6e0e61d | refs/heads/master | 2016-09-06T18:52:52.497437 | 2014-08-30T12:03:02 | 2014-08-30T12:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 113 | java | class ErreurFormule extends Exception{
ErreurFormule(){}
ErreurFormule(String msg){
super(msg);
}
}
| [
"valeriemontoya90@gmail.com"
] | valeriemontoya90@gmail.com |
4b450b24944b70b3e3c62ee2d1ffb44b7f6ad069 | 68291223928d3ca2a3c77968e5ed4e1174b46952 | /sia/src/main/java/com/lr/sia/ui/moudle5/activity/PrivateLockActivity.java | 2c599be7e2d6e43d26c56340759ba7be11ff8a2c | [] | no_license | wodx521/TestDemo1111 | 42105eb5778b06f9946891322a4dd99912b6d136 | e6581e5e68bb2a4150a502057f9e529eb3aa3bcb | refs/heads/master | 2020-12-14T10:05:01.540839 | 2020-01-23T10:00:32 | 2020-01-23T10:00:32 | 234,703,750 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,991 | java | package com.lr.sia.ui.moudle5.activity;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.RecyclerView;
import com.jaeger.library.StatusBarUtil;
import com.lr.sia.R;
import com.lr.sia.api.MethodUrl;
import com.lr.sia.basic.BasicActivity;
import com.lr.sia.basic.MbsConstans;
import com.lr.sia.ui.moudle.activity.LoginActivity1;
import com.lr.sia.ui.moudle5.adapter.PrivateLockListAdapter;
import com.lr.sia.utils.tool.SPUtils;
import com.lr.sia.utils.tool.UtilTools;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.constant.RefreshState;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PrivateLockActivity extends BasicActivity implements View.OnClickListener {
private ImageView backImg;
private TextView tvReleaseLog, tvReleased;
private SmartRefreshLayout srlRefresh;
private RecyclerView rvLockLog;
private LinearLayout pageViewEmpty;
private List<Map<String, Object>> tempList = new ArrayList<>();
private PrivateLockListAdapter privateLockListAdapter;
private int page = 1;
private Intent intent;
private DecimalFormat decimalFormat;
@Override
public int getContentView() {
return R.layout.activity_lock_empty1;
}
@Override
public void init() {
backImg = findViewById(R.id.backImg);
tvReleaseLog = findViewById(R.id.tvReleaseLog);
tvReleased = findViewById(R.id.tvReleased);
srlRefresh = findViewById(R.id.srlRefresh);
rvLockLog = findViewById(R.id.rvLockLog);
pageViewEmpty = findViewById(R.id.page_view_empty);
rvLockLog.addItemDecoration(new DividerItemDecoration(PrivateLockActivity.this, DividerItemDecoration.VERTICAL));
backImg.setOnClickListener(this);
tvReleaseLog.setOnClickListener(this);
pageViewEmpty.setOnClickListener(this);
StatusBarUtil.setColorForSwipeBack(this, ContextCompat.getColor(this, MbsConstans.TOP_BAR_COLOR), MbsConstans.ALPHA);
decimalFormat = new DecimalFormat("#.########");
String lock = getIntent().getStringExtra("lock");
tvReleased.setText(getString(R.string.defaultReleased).replace("0.00",decimalFormat.format(Double.parseDouble(lock))));
privateLockListAdapter = new PrivateLockListAdapter(PrivateLockActivity.this);
rvLockLog.setAdapter(privateLockListAdapter);
getLockListAction();
srlRefresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
@Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
page += 1;
getLockListAction();
}
@Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
page = 1;
tempList.clear();
getLockListAction();
}
});
}
private void getLockListAction() {
Map<String, Object> map = new HashMap<>();
if (UtilTools.empty(MbsConstans.ACCESS_TOKEN)) {
MbsConstans.ACCESS_TOKEN = SPUtils.get(PrivateLockActivity.this, MbsConstans.SharedInfoConstans.ACCESS_TOKEN, "").toString();
}
map.put("token", MbsConstans.ACCESS_TOKEN);
map.put("page", page + "");
map.put("type", "2");
Map<String, String> mHeaderMap = new HashMap<String, String>();
mRequestPresenterImp.requestPostToMap(mHeaderMap, MethodUrl.USER_GETUSERKTLIST, map);
}
@Override
public void showProgress() {
}
@Override
public void disimissProgress() {
}
@Override
public void loadDataSuccess(Map<String, Object> tData, String mType) {
Intent intent;
switch (mType) {
case MethodUrl.USER_GETUSERKTLIST:
if (srlRefresh.getState() == RefreshState.Loading || srlRefresh.getState() == RefreshState.Refreshing) {
srlRefresh.finishLoadMore();
srlRefresh.finishRefresh();
}
switch (tData.get("code") + "") {
case "1": //请求成功
Map<String, Object> dataMap = (Map<String, Object>) tData.get("data");
String currentPage = dataMap.get("current_page") + "";
String lastPage = dataMap.get("last_page") + "";
int last = Integer.parseInt(lastPage);
int current = Integer.parseInt(currentPage);
if (last > current) {
srlRefresh.setEnableLoadMore(true);
} else {
srlRefresh.setEnableLoadMore(false);
}
List<Map<String, Object>> mapList = (List<Map<String, Object>>) dataMap.get("data");
tempList.addAll(mapList);
if (tempList != null && tempList.size() > 0) {
privateLockListAdapter.setDataList(tempList);
rvLockLog.setVisibility(View.VISIBLE);
pageViewEmpty.setVisibility(View.GONE);
} else {
pageViewEmpty.setVisibility(View.VISIBLE);
rvLockLog.setVisibility(View.GONE);
}
break;
case "0": //请求失败
showToastMsg(tData.get("msg") + "");
break;
case "-1": //token过期
finish();
intent = new Intent(PrivateLockActivity.this, LoginActivity1.class);
startActivity(intent);
break;
default:
}
break;
default:
}
}
@Override
public void loadDataError(Map<String, Object> map, String mType) {
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.backImg:
finish();
break;
case R.id.page_view_empty:
getLockListAction();
break;
case R.id.tvReleaseLog:
intent = new Intent(PrivateLockActivity.this, ReleaseLockActivity.class);
intent.putExtra("type", "2");
startActivity(intent);
break;
default:
}
}
}
| [
"wodx521@163.com"
] | wodx521@163.com |
24bcfe8a88825964e5a1bd066b426dad10093a09 | d530e932875494ad817885b3a1aa86c1a9bd349e | /login/src/main/java/ventanas/ModificarDatosUserListado.java | 271788abceae5d769f428153083811ced8187ed8 | [] | no_license | jmr779/Sesion09 | c0c0da4ec1ae8fcd03f5a7192f8f61e9609c541e | 0f9a6131fc7bb086ab4233ab370a319026357a3d | refs/heads/master | 2020-03-19T03:12:40.794313 | 2018-06-21T17:42:37 | 2018-06-21T17:42:37 | 135,705,450 | 0 | 3 | null | 2018-06-13T13:51:26 | 2018-06-01T10:41:54 | CSS | UTF-8 | Java | false | false | 233 | java | package ventanas;
public class ModificarDatosUserListado extends ModificaDatos {
public Pag_Administrador _unnamed_Pag_Administrador_;
public Usuario cargarDatosUser(String aID) {
throw new UnsupportedOperationException();
}
} | [
"acg125@inlumine.ual.es"
] | acg125@inlumine.ual.es |
93313871fa7498e2f9ac8ac3d871a89036515a11 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /newEvaluatedBugs/Jsoup_42_buggy/mutated/1143/HtmlTreeBuilderState.java | 0c0d704c53e1ae988b677a773521844746744224 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 68,259 | java | package org.jsoup.parser;
import org.jsoup.helper.DescendableLinkedList;
import org.jsoup.helper.StringUtil;
import org.jsoup.nodes.*;
import java.util.Iterator;
import java.util.LinkedList;
/**
* The Tree Builder's current state. Each state embodies the processing for the state, and transitions to other states.
*/
enum HtmlTreeBuilderState {
Initial {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return true; // ignore whitespace
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
// todo: parse error check on expected doctypes
// todo: quirk state check on doctype ids
Token.Doctype d = t.asDoctype();
DocumentType doctype = new DocumentType(d.getName(), d.getPublicIdentifier(), d.getSystemIdentifier(), tb.getBaseUri());
tb.getDocument().appendChild(doctype);
if (d.isForceQuirks())
tb.getDocument().quirksMode(Document.QuirksMode.quirks);
tb.transition(BeforeHtml);
} else {
// todo: check not iframe srcdoc
tb.transition(BeforeHtml);
return tb.process(t); // re-process token
}
return true;
}
},
BeforeHtml {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (isWhitespace(t)) {
return true; // ignore whitespace
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
tb.insert(t.asStartTag());
tb.transition(BeforeHead);
} else if (t.isEndTag() && (StringUtil.in(t.asEndTag().name(), "head", "body", "html", "br"))) {
return anythingElse(t, tb);
} else if (t.isEndTag()) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.insert("html");
tb.transition(BeforeHead);
return tb.process(t);
}
},
BeforeHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return true;
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return InBody.process(t, tb); // does not transition
} else if (t.isStartTag() && t.asStartTag().name().equals("head")) {
Element head = tb.insert(t.asStartTag());
tb.setHeadElement(head);
tb.transition(InHead);
} else if (t.isEndTag() && (StringUtil.in(t.asEndTag().name(), "head", "body", "html", "br"))) {
tb.process(new Token.StartTag("head"));
return tb.process(t);
} else if (t.isEndTag()) {
tb.error(this);
return false;
} else {
tb.process(new Token.StartTag("head"));
return tb.process(t);
}
return true;
}
},
InHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
return true;
}
switch (t.type) {
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
return false;
case StartTag:
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html")) {
return InBody.process(t, tb);
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link")) {
Element el = tb.insertEmpty(start);
// jsoup special: update base the frist time it is seen
if (name.equals("base") && el.hasAttr("href"))
tb.maybeSetBaseUri(el);
} else if (name.equals("meta")) {
Element meta = tb.insertEmpty(start);
// todo: charset switches
} else if (name.equals("title")) {
handleRcData(start, tb);
} else if (StringUtil.in(name, "noframes", "style")) {
handleRawtext(start, tb);
} else if (name.equals("noscript")) {
// else if noscript && scripting flag = true: rawtext (jsoup doesn't run script, to handle as noscript)
tb.insert(start);
tb.transition(InHeadNoscript);
} else if (name.equals("script")) {
// skips some script rules as won't execute them
tb.insert(start);
tb.tokeniser.transition(TokeniserState.ScriptData);
tb.process(new org.jsoup.parser.Token.EndTag("select"));
tb.markInsertionMode();
tb.transition(Text);
} else if (name.equals("head")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
break;
case EndTag:
Token.EndTag end = t.asEndTag();
name = end.name();
if (name.equals("head")) {
tb.pop();
tb.transition(AfterHead);
} else if (StringUtil.in(name, "body", "html", "br")) {
return anythingElse(t, tb);
} else {
tb.error(this);
return false;
}
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, TreeBuilder tb) {
tb.process(new Token.EndTag("head"));
return tb.process(t);
}
},
InHeadNoscript {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isDoctype()) {
tb.error(this);
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("noscript")) {
tb.pop();
tb.transition(InHead);
} else if (isWhitespace(t) || t.isComment() || (t.isStartTag() && StringUtil.in(t.asStartTag().name(),
"basefont", "bgsound", "link", "meta", "noframes", "style"))) {
return tb.process(t, InHead);
} else if (t.isEndTag() && t.asEndTag().name().equals("br")) {
return anythingElse(t, tb);
} else if ((t.isStartTag() && StringUtil.in(t.asStartTag().name(), "head", "noscript")) || t.isEndTag()) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
tb.process(new Token.EndTag("noscript"));
return tb.process(t);
}
},
AfterHead {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
} else if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html")) {
return tb.process(t, InBody);
} else if (name.equals("body")) {
tb.insert(startTag);
tb.framesetOk(false);
tb.transition(InBody);
} else if (name.equals("frameset")) {
tb.insert(startTag);
tb.transition(InFrameset);
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "title")) {
tb.error(this);
Element head = tb.getHeadElement();
tb.push(head);
tb.process(t, InHead);
tb.removeFromStack(head);
} else if (name.equals("head")) {
tb.error(this);
return false;
} else {
anythingElse(t, tb);
}
} else if (t.isEndTag()) {
if (StringUtil.in(t.asEndTag().name(), "body", "html")) {
anythingElse(t, tb);
} else {
tb.error(this);
return false;
}
} else {
anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.process(new Token.StartTag("body"));
tb.framesetOk(true);
return tb.process(t);
}
},
InBody {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character: {
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
// todo confirm that check
tb.error(this);
return false;
} else if (isWhitespace(c)) {
tb.reconstructFormattingElements();
tb.insert(c);
} else {
tb.reconstructFormattingElements();
tb.insert(c);
tb.framesetOk(false);
}
break;
}
case Comment: {
tb.insert(t.asComment());
break;
}
case Doctype: {
tb.error(this);
return false;
}
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html")) {
tb.error(this);
// merge attributes onto real html
Element html = tb.getStack().getFirst();
for (Attribute attribute : startTag.getAttributes()) {
if (!html.hasAttr(attribute.getKey()))
html.attributes().put(attribute);
}
} else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link", "meta", "noframes", "script", "style", "title")) {
return tb.process(t, InHead);
} else if (name.equals("body")) {
tb.error(this);
LinkedList<Element> stack = tb.getStack();
if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
// only in fragment case
return false; // ignore
} else {
tb.framesetOk(false);
Element body = stack.get(1);
for (Attribute attribute : startTag.getAttributes()) {
if (!body.hasAttr(attribute.getKey()))
body.attributes().put(attribute);
}
}
} else if (name.equals("frameset")) {
tb.error(this);
LinkedList<Element> stack = tb.getStack();
if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
// only in fragment case
return false; // ignore
} else if (!tb.framesetOk()) {
return false; // ignore frameset
} else {
Element second = stack.get(1);
if (second.parent() != null)
second.remove();
// pop up to html element
while (stack.size() > 1)
stack.removeLast();
tb.insert(startTag);
tb.transition(InFrameset);
}
} else if (StringUtil.in(name,
"address", "article", "aside", "blockquote", "center", "details", "dir", "div", "dl",
"fieldset", "figcaption", "figure", "footer", "header", "hgroup", "menu", "nav", "ol",
"p", "section", "summary", "ul")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (StringUtil.in(name, "h1", "h2", "h3", "h4", "h5", "h6")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
if (StringUtil.in(tb.currentElement().nodeName(), "h1", "h2", "h3", "h4", "h5", "h6")) {
tb.error(this);
tb.pop();
}
tb.insert(startTag);
} else if (StringUtil.in(name, "pre", "listing")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
// todo: ignore LF if next token
tb.framesetOk(false);
} else if (name.equals("form")) {
if (tb.getFormElement() != null) {
tb.error(this);
return false;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
Element form = tb.insert(startTag);
tb.setFormElement(form);
} else if (name.equals("li")) {
tb.framesetOk(false);
LinkedList<Element> stack = tb.getStack();
for (int i = stack.size() - 1; i > 0; i--) {
Element el = stack.get(i);
if (el.nodeName().equals("li")) {
tb.process(new Token.EndTag("li"));
break;
}
if (tb.isSpecial(el) && !StringUtil.in(el.nodeName(), "address", "div", "p"))
break;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (StringUtil.in(name, "dd", "dt")) {
tb.framesetOk(false);
LinkedList<Element> stack = tb.getStack();
for (int i = stack.size() - 1; i > 0; i--) {
Element el = stack.get(i);
if (StringUtil.in(el.nodeName(), "dd", "dt")) {
tb.process(new Token.EndTag(el.nodeName()));
break;
}
if (tb.isSpecial(el) && !StringUtil.in(el.nodeName(), "address", "div", "p"))
break;
}
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
} else if (name.equals("plaintext")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.PLAINTEXT); // once in, never gets out
} else if (name.equals("button")) {
if (tb.inButtonScope("button")) {
// close and reprocess
tb.error(this);
tb.process(new Token.EndTag("button"));
tb.process(startTag);
} else {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.framesetOk(false);
}
} else if (name.equals("a")) {
if (tb.getActiveFormattingElement("a") != null) {
tb.error(this);
tb.process(new Token.EndTag("a"));
// still on stack?
Element remainingA = tb.getFromStack("a");
if (remainingA != null) {
tb.removeFromActiveFormattingElements(remainingA);
tb.removeFromStack(remainingA);
}
}
tb.reconstructFormattingElements();
Element a = tb.insert(startTag);
tb.pushActiveFormattingElements(a);
} else if (StringUtil.in(name,
"b", "big", "code", "em", "font", "i", "s", "small", "strike", "strong", "tt", "u")) {
tb.reconstructFormattingElements();
Element el = tb.insert(startTag);
tb.pushActiveFormattingElements(el);
} else if (name.equals("nobr")) {
tb.reconstructFormattingElements();
if (tb.inScope("nobr")) {
tb.error(this);
tb.process(new Token.EndTag("nobr"));
tb.reconstructFormattingElements();
}
Element el = tb.insert(startTag);
tb.pushActiveFormattingElements(el);
} else if (StringUtil.in(name, "applet", "marquee", "object")) {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.insertMarkerToFormattingElements();
tb.framesetOk(false);
} else if (name.equals("table")) {
if (tb.getDocument().quirksMode() != Document.QuirksMode.quirks && tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insert(startTag);
tb.framesetOk(false);
tb.transition(InTable);
} else if (StringUtil.in(name, "area", "br", "embed", "img", "keygen", "wbr")) {
tb.reconstructFormattingElements();
tb.insertEmpty(startTag);
tb.framesetOk(false);
} else if (name.equals("input")) {
tb.reconstructFormattingElements();
Element el = tb.insertEmpty(startTag);
if (!el.attr("type").equalsIgnoreCase("hidden"))
tb.framesetOk(false);
} else if (StringUtil.in(name, "param", "source", "track")) {
tb.insertEmpty(startTag);
} else if (name.equals("hr")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.insertEmpty(startTag);
tb.framesetOk(false);
} else if (name.equals("image")) {
// we're not supposed to ask.
startTag.name("img");
return tb.process(startTag);
} else if (name.equals("isindex")) {
// how much do we care about the early 90s?
tb.error(this);
if (tb.getFormElement() != null)
return false;
tb.tokeniser.acknowledgeSelfClosingFlag();
tb.process(new Token.StartTag("form"));
if (startTag.attributes.hasKey("action")) {
Element form = tb.getFormElement();
form.attr("action", startTag.attributes.get("action"));
}
tb.process(new Token.StartTag("hr"));
tb.process(new Token.StartTag("label"));
// hope you like english.
String prompt = startTag.attributes.hasKey("prompt") ?
startTag.attributes.get("prompt") :
"This is a searchable index. Enter search keywords: ";
tb.process(new Token.Character(prompt));
// input
Attributes inputAttribs = new Attributes();
for (Attribute attr : startTag.attributes) {
if (!StringUtil.in(attr.getKey(), "name", "action", "prompt"))
inputAttribs.put(attr);
}
inputAttribs.put("name", "isindex");
tb.process(new Token.StartTag("input", inputAttribs));
tb.process(new Token.EndTag("label"));
tb.process(new Token.StartTag("hr"));
tb.process(new Token.EndTag("form"));
} else if (name.equals("textarea")) {
tb.insert(startTag);
// todo: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)
tb.tokeniser.transition(TokeniserState.Rcdata);
tb.markInsertionMode();
tb.framesetOk(false);
tb.transition(Text);
} else if (name.equals("xmp")) {
if (tb.inButtonScope("p")) {
tb.process(new Token.EndTag("p"));
}
tb.reconstructFormattingElements();
tb.framesetOk(false);
handleRawtext(startTag, tb);
} else if (name.equals("iframe")) {
tb.framesetOk(false);
handleRawtext(startTag, tb);
} else if (name.equals("noembed")) {
// also handle noscript if script enabled
handleRawtext(startTag, tb);
} else if (name.equals("select")) {
tb.reconstructFormattingElements();
tb.insert(startTag);
tb.framesetOk(false);
HtmlTreeBuilderState state = tb.state();
if (state.equals(InTable) || state.equals(InCaption) || state.equals(InTableBody) || state.equals(InRow) || state.equals(InCell))
tb.transition(InSelectInTable);
else
tb.transition(InSelect);
} else if (StringUtil.in("optgroup", "option")) {
if (tb.currentElement().nodeName().equals("option"))
tb.process(new Token.EndTag("option"));
tb.reconstructFormattingElements();
tb.insert(startTag);
} else if (StringUtil.in("rp", "rt")) {
if (tb.inScope("ruby")) {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals("ruby")) {
tb.error(this);
tb.popStackToBefore("ruby"); // i.e. close up to but not include name
}
tb.insert(startTag);
}
} else if (name.equals("math")) {
tb.reconstructFormattingElements();
// todo: handle A start tag whose tag name is "math" (i.e. foreign, mathml)
tb.insert(startTag);
tb.tokeniser.acknowledgeSelfClosingFlag();
} else if (name.equals("svg")) {
tb.reconstructFormattingElements();
// todo: handle A start tag whose tag name is "svg" (xlink, svg)
tb.insert(startTag);
tb.tokeniser.acknowledgeSelfClosingFlag();
} else if (StringUtil.in(name,
"caption", "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
tb.reconstructFormattingElements();
tb.insert(startTag);
}
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (name.equals("body")) {
if (!tb.inScope("body")) {
tb.error(this);
return false;
} else {
// todo: error if stack contains something not dd, dt, li, optgroup, option, p, rp, rt, tbody, td, tfoot, th, thead, tr, body, html
tb.transition(AfterBody);
}
} else if (name.equals("html")) {
boolean notIgnored = tb.process(new Token.EndTag("body"));
if (notIgnored)
return tb.process(endTag);
} else if (StringUtil.in(name,
"address", "article", "aside", "blockquote", "button", "center", "details", "dir", "div",
"dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "menu",
"nav", "ol", "pre", "section", "summary", "ul")) {
// todo: refactor these lookups
if (!tb.inScope(name)) {
// nothing to close
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (name.equals("form")) {
Element currentForm = tb.getFormElement();
tb.setFormElement(null);
if (currentForm == null || !tb.inScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
// remove currentForm from stack. will shift anything under up.
tb.removeFromStack(currentForm);
}
} else if (name.equals("p")) {
if (!tb.inButtonScope(name)) {
tb.error(this);
tb.process(new Token.StartTag(name)); // if no p to close, creates an empty <p></p>
return tb.process(endTag);
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (name.equals("li")) {
if (!tb.inListItemScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (StringUtil.in(name, "dd", "dt")) {
if (!tb.inScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
}
} else if (StringUtil.in(name, "h1", "h2", "h3", "h4", "h5", "h6")) {
if (!tb.inScope(new String[]{"h1", "h2", "h3", "h4", "h5", "h6"})) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags(name);
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose("h1", "h2", "h3", "h4", "h5", "h6");
}
} else if (name.equals("sarcasm")) {
// *sigh*
return anyOtherEndTag(t, tb);
} else if (StringUtil.in(name,
"a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u")) {
// Adoption Agency Algorithm.
OUTER:
for (int i = 0; i < 8; i++) {
Element formatEl = tb.getActiveFormattingElement(name);
if (formatEl == null)
return anyOtherEndTag(t, tb);
else if (!tb.onStack(formatEl)) {
tb.error(this);
tb.removeFromActiveFormattingElements(formatEl);
return true;
} else if (!tb.inScope(formatEl.nodeName())) {
tb.error(this);
return false;
} else if (tb.currentElement() != formatEl)
tb.error(this);
Element furthestBlock = null;
Element commonAncestor = null;
boolean seenFormattingElement = false;
LinkedList<Element> stack = tb.getStack();
for (int si = 0; si < stack.size(); si++) {
Element el = stack.get(si);
if (el == formatEl) {
commonAncestor = stack.get(si - 1);
seenFormattingElement = true;
} else if (seenFormattingElement && tb.isSpecial(el)) {
furthestBlock = el;
break;
}
}
if (furthestBlock == null) {
tb.popStackToClose(formatEl.nodeName());
tb.removeFromActiveFormattingElements(formatEl);
return true;
}
// todo: Let a bookmark note the position of the formatting element in the list of active formatting elements relative to the elements on either side of it in the list.
// does that mean: int pos of format el in list?
Element node = furthestBlock;
Element lastNode = furthestBlock;
INNER:
for (int j = 0; j < 3; j++) {
if (tb.onStack(node))
node = tb.aboveOnStack(node);
if (!tb.isInActiveFormattingElements(node)) { // note no bookmark check
tb.removeFromStack(node);
continue INNER;
} else if (node == formatEl)
break INNER;
Element replacement = new Element(Tag.valueOf(node.nodeName()), tb.getBaseUri());
tb.replaceActiveFormattingElement(node, replacement);
tb.replaceOnStack(node, replacement);
node = replacement;
if (lastNode == furthestBlock) {
// todo: move the aforementioned bookmark to be immediately after the new node in the list of active formatting elements.
// not getting how this bookmark both straddles the element above, but is inbetween here...
}
if (lastNode.parent() != null)
lastNode.remove();
node.appendChild(lastNode);
lastNode = node;
}
if (StringUtil.in(commonAncestor.nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
if (lastNode.parent() != null)
lastNode.remove();
tb.insertInFosterParent(lastNode);
} else {
if (lastNode.parent() != null)
lastNode.remove();
commonAncestor.appendChild(lastNode);
}
Element adopter = new Element(Tag.valueOf(name), tb.getBaseUri());
Node[] childNodes = furthestBlock.childNodes().toArray(new Node[furthestBlock.childNodes().size()]);
for (Node childNode : childNodes) {
adopter.appendChild(childNode); // append will reparent. thus the clone to avvoid concurrent mod.
}
furthestBlock.appendChild(adopter);
tb.removeFromActiveFormattingElements(formatEl);
// todo: insert the new element into the list of active formatting elements at the position of the aforementioned bookmark.
tb.removeFromStack(formatEl);
tb.insertOnStackAfter(furthestBlock, adopter);
}
} else if (StringUtil.in(name, "applet", "marquee", "object")) {
if (!tb.inScope("name")) {
if (!tb.inScope(name)) {
tb.error(this);
return false;
}
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
tb.clearFormattingElementsToLastMarker();
}
} else if (name.equals("br")) {
tb.error(this);
tb.process(new Token.StartTag("br"));
return false;
} else {
return anyOtherEndTag(t, tb);
}
break;
case EOF:
// todo: error if stack contains something not dd, dt, li, p, tbody, td, tfoot, th, thead, tr, body, html
// stop parsing
break;
}
return true;
}
boolean anyOtherEndTag(Token t, HtmlTreeBuilder tb) {
String name = t.asEndTag().name();
DescendableLinkedList<Element> stack = tb.getStack();
Iterator<Element> it = stack.descendingIterator();
while (it.hasNext()) {
Element node = it.next();
if (node.nodeName().equals(name)) {
tb.generateImpliedEndTags(name);
if (!name.equals(tb.currentElement().nodeName()))
tb.error(this);
tb.popStackToClose(name);
break;
} else {
if (tb.isSpecial(node)) {
tb.error(this);
return false;
}
}
}
return true;
}
},
Text {
// in script, style etc. normally treated as data tags
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isCharacter()) {
tb.insert(t.asCharacter());
} else if (t.isEOF()) {
tb.error(this);
// if current node is script: already started
tb.pop();
tb.transition(tb.originalState());
return tb.process(t);
} else if (t.isEndTag()) {
// if: An end tag whose tag name is "script" -- scripting nesting level, if evaluating scripts
tb.pop();
tb.transition(tb.originalState());
}
return true;
}
},
InTable {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isCharacter()) {
tb.newPendingTableCharacters();
tb.markInsertionMode();
tb.transition(InTableText);
return tb.process(t);
} else if (t.isComment()) {
tb.insert(t.asComment());
return true;
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("caption")) {
tb.clearStackToTableContext();
tb.insertMarkerToFormattingElements();
tb.insert(startTag);
tb.transition(InCaption);
} else if (name.equals("colgroup")) {
tb.clearStackToTableContext();
tb.insert(startTag);
tb.transition(InColumnGroup);
} else if (name.equals("col")) {
tb.process(new Token.StartTag("colgroup"));
return tb.process(t);
} else if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
tb.clearStackToTableContext();
tb.insert(startTag);
tb.transition(InTableBody);
} else if (StringUtil.in(name, "td", "th", "tr")) {
tb.process(new Token.StartTag("tbody"));
return tb.process(t);
} else if (name.equals("table")) {
tb.error(this);
boolean processed = tb.process(new Token.EndTag("table"));
if (processed) // only ignored if in fragment
return tb.process(t);
} else if (StringUtil.in(name, "style", "script")) {
return tb.process(t, InHead);
} else if (name.equals("input")) {
if (!startTag.attributes.get("type").equalsIgnoreCase("hidden")) {
return anythingElse(t, tb);
} else {
tb.insertEmpty(startTag);
}
} else if (name.equals("form")) {
tb.error(this);
if (tb.getFormElement() != null)
return false;
else {
Element form = tb.insertEmpty(startTag);
tb.setFormElement(form);
}
} else {
return anythingElse(t, tb);
}
} else if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (name.equals("table")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.popStackToClose("table");
}
tb.resetInsertionMode();
} else if (StringUtil.in(name,
"body", "caption", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
} else if (t.isEOF()) {
if (tb.currentElement().nodeName().equals("html"))
tb.error(this);
return true; // stops parsing
}
return anythingElse(t, tb);
}
boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
boolean processed = true;
if (StringUtil.in(tb.currentElement().nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
tb.setFosterInserts(true);
processed = tb.process(t, InBody);
tb.setFosterInserts(false);
} else {
processed = tb.process(t, InBody);
}
return processed;
}
},
InTableText {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character:
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
tb.error(this);
return false;
} else {
tb.getPendingTableCharacters().add(c);
}
break;
default:
if (tb.getPendingTableCharacters().size() > 0) {
for (Token.Character character : tb.getPendingTableCharacters()) {
if (!isWhitespace(character)) {
// InTable anything else section:
tb.error(this);
if (StringUtil.in(tb.currentElement().nodeName(), "table", "tbody", "tfoot", "thead", "tr")) {
tb.setFosterInserts(true);
tb.process(character, InBody);
tb.setFosterInserts(false);
} else {
tb.process(character, InBody);
}
} else
tb.insert(character);
}
tb.newPendingTableCharacters();
}
tb.transition(tb.originalState());
return tb.process(t);
}
return true;
}
},
InCaption {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isEndTag() && t.asEndTag().name().equals("caption")) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals("caption"))
tb.error(this);
tb.popStackToClose("caption");
tb.clearFormattingElementsToLastMarker();
tb.transition(InTable);
}
} else if ((
t.isStartTag() && StringUtil.in(t.asStartTag().name(),
"caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr") ||
t.isEndTag() && t.asEndTag().name().equals("table"))
) {
tb.error(this);
boolean processed = tb.process(new Token.EndTag("caption"));
if (processed)
return tb.process(t);
} else if (t.isEndTag() && StringUtil.in(t.asEndTag().name(),
"body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr")) {
tb.error(this);
return false;
} else {
return tb.process(t, InBody);
}
return true;
}
},
InColumnGroup {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
return true;
}
switch (t.type) {
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
break;
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("html"))
return tb.process(t, InBody);
else if (name.equals("col"))
tb.insertEmpty(startTag);
else
return anythingElse(t, tb);
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (name.equals("colgroup")) {
if (tb.currentElement().nodeName().equals("html")) { // frag case
tb.error(this);
return false;
} else {
tb.pop();
tb.transition(InTable);
}
} else
return anythingElse(t, tb);
break;
case EOF:
if (tb.currentElement().nodeName().equals("html"))
return true; // stop parsing; frag case
else
return anythingElse(t, tb);
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, TreeBuilder tb) {
boolean processed = tb.process(new Token.EndTag("colgroup"));
if (processed) // only ignored in frag case
return tb.process(t);
return true;
}
},
InTableBody {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case StartTag:
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (name.equals("tr")) {
tb.clearStackToTableBodyContext();
tb.insert(startTag);
tb.transition(InRow);
} else if (StringUtil.in(name, "th", "td")) {
tb.error(this);
tb.process(new Token.StartTag("tr"));
return tb.process(startTag);
} else if (StringUtil.in(name, "caption", "col", "colgroup", "tbody", "tfoot", "thead")) {
return exitTableBody(t, tb);
} else
return anythingElse(t, tb);
break;
case EndTag:
Token.EndTag endTag = t.asEndTag();
name = endTag.name();
if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
} else {
tb.clearStackToTableBodyContext();
tb.pop();
tb.transition(InTable);
}
} else if (name.equals("table")) {
return exitTableBody(t, tb);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html", "td", "th", "tr")) {
tb.error(this);
return false;
} else
return anythingElse(t, tb);
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean exitTableBody(Token t, HtmlTreeBuilder tb) {
if (!(tb.inTableScope("tbody") || tb.inTableScope("thead") || tb.inScope("tfoot"))) {
// frag case
tb.error(this);
return false;
}
tb.clearStackToTableBodyContext();
tb.process(new Token.EndTag(tb.currentElement().nodeName())); // tbody, tfoot, thead
return tb.process(t);
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InTable);
}
},
InRow {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isStartTag()) {
Token.StartTag startTag = t.asStartTag();
String name = startTag.name();
if (StringUtil.in(name, "th", "td")) {
tb.clearStackToTableRowContext();
tb.insert(startTag);
tb.transition(InCell);
tb.insertMarkerToFormattingElements();
} else if (StringUtil.in(name, "caption", "col", "colgroup", "tbody", "tfoot", "thead", "tr")) {
return handleMissingTr(t, tb);
} else {
return anythingElse(t, tb);
}
} else if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (name.equals("tr")) {
if (!tb.inTableScope(name)) {
tb.error(this); // frag
return false;
}
tb.clearStackToTableRowContext();
tb.pop(); // tr
tb.transition(InTableBody);
} else if (name.equals("table")) {
return handleMissingTr(t, tb);
} else if (StringUtil.in(name, "tbody", "tfoot", "thead")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
}
tb.process(new Token.EndTag("tr"));
return tb.process(t);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html", "td", "th")) {
tb.error(this);
return false;
} else {
return anythingElse(t, tb);
}
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InTable);
}
private boolean handleMissingTr(Token t, TreeBuilder tb) {
boolean processed = tb.process(new Token.EndTag("tr"));
if (processed)
return tb.process(t);
else
return false;
}
},
InCell {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isEndTag()) {
Token.EndTag endTag = t.asEndTag();
String name = endTag.name();
if (StringUtil.in(name, "td", "th")) {
if (!tb.inTableScope(name)) {
tb.error(this);
tb.transition(InRow); // might not be in scope if empty: <td /> and processing fake end tag
return false;
}
tb.generateImpliedEndTags();
if (!tb.currentElement().nodeName().equals(name))
tb.error(this);
tb.popStackToClose(name);
tb.clearFormattingElementsToLastMarker();
tb.transition(InRow);
} else if (StringUtil.in(name, "body", "caption", "col", "colgroup", "html")) {
tb.error(this);
return false;
} else if (StringUtil.in(name, "table", "tbody", "tfoot", "thead", "tr")) {
if (!tb.inTableScope(name)) {
tb.error(this);
return false;
}
closeCell(tb);
return tb.process(t);
} else {
return anythingElse(t, tb);
}
} else if (t.isStartTag() &&
StringUtil.in(t.asStartTag().name(),
"caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr")) {
if (!(tb.inTableScope("td") || tb.inTableScope("th"))) {
tb.error(this);
return false;
}
closeCell(tb);
return tb.process(t);
} else {
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
return tb.process(t, InBody);
}
private void closeCell(HtmlTreeBuilder tb) {
if (tb.inTableScope("td"))
tb.process(new Token.EndTag("td"));
else
tb.process(new Token.EndTag("th")); // only here if th or td in scope
}
},
InSelect {
boolean process(Token t, HtmlTreeBuilder tb) {
switch (t.type) {
case Character:
Token.Character c = t.asCharacter();
if (c.getData().equals(nullString)) {
tb.error(this);
return false;
} else {
tb.insert(c);
}
break;
case Comment:
tb.insert(t.asComment());
break;
case Doctype:
tb.error(this);
return false;
case StartTag:
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html"))
return tb.process(start, InBody);
else if (name.equals("option")) {
tb.process(new Token.EndTag("option"));
tb.insert(start);
} else if (name.equals("optgroup")) {
if (tb.currentElement().nodeName().equals("option"))
tb.process(new Token.EndTag("option"));
else if (tb.currentElement().nodeName().equals("optgroup"))
tb.process(new Token.EndTag("optgroup"));
tb.insert(start);
} else if (name.equals("select")) {
tb.error(this);
return tb.process(new Token.EndTag("select"));
} else if (StringUtil.in(name, "input", "keygen", "textarea")) {
tb.error(this);
if (!tb.inSelectScope("select"))
return false; // frag
tb.process(new Token.EndTag("select"));
return tb.process(start);
} else if (name.equals("script")) {
return tb.process(t, InHead);
} else {
return anythingElse(t, tb);
}
break;
case EndTag:
Token.EndTag end = t.asEndTag();
name = end.name();
if (name.equals("optgroup")) {
if (tb.currentElement().nodeName().equals("option") && tb.aboveOnStack(tb.currentElement()) != null && tb.aboveOnStack(tb.currentElement()).nodeName().equals("optgroup"))
tb.process(new Token.EndTag("option"));
if (tb.currentElement().nodeName().equals("optgroup"))
tb.pop();
else
tb.error(this);
} else if (name.equals("option")) {
if (tb.currentElement().nodeName().equals("option"))
tb.pop();
else
tb.error(this);
} else if (name.equals("select")) {
if (!tb.inSelectScope(name)) {
tb.error(this);
return false;
} else {
tb.popStackToClose(name);
tb.resetInsertionMode();
}
} else
return anythingElse(t, tb);
break;
case EOF:
if (!tb.currentElement().nodeName().equals("html"))
tb.error(this);
break;
default:
return anythingElse(t, tb);
}
return true;
}
private boolean anythingElse(Token t, HtmlTreeBuilder tb) {
tb.error(this);
return false;
}
},
InSelectInTable {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isStartTag() && StringUtil.in(t.asStartTag().name(), "caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th")) {
tb.error(this);
tb.process(new Token.EndTag("select"));
return tb.process(t);
} else if (t.isEndTag() && StringUtil.in(t.asEndTag().name(), "caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th")) {
tb.error(this);
if (tb.inTableScope(t.asEndTag().name())) {
tb.process(new Token.EndTag("select"));
return (tb.process(t));
} else
return false;
} else {
return tb.process(t, InSelect);
}
}
},
AfterBody {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
return tb.process(t, InBody);
} else if (t.isComment()) {
tb.insert(t.asComment()); // into html node
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("html")) {
if (tb.isFragmentParsing()) {
tb.error(this);
return false;
} else {
tb.transition(AfterAfterBody);
}
} else if (t.isEOF()) {
// chillax! we're done
} else {
tb.error(this);
tb.transition(InBody);
return tb.process(t);
}
return true;
}
},
InFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag()) {
Token.StartTag start = t.asStartTag();
String name = start.name();
if (name.equals("html")) {
return tb.process(start, InBody);
} else if (name.equals("frameset")) {
tb.insert(start);
} else if (name.equals("frame")) {
tb.insertEmpty(start);
} else if (name.equals("noframes")) {
return tb.process(start, InHead);
} else {
tb.error(this);
return false;
}
} else if (t.isEndTag() && t.asEndTag().name().equals("frameset")) {
if (tb.currentElement().nodeName().equals("html")) { // frag
tb.error(this);
return false;
} else {
tb.pop();
if (!tb.isFragmentParsing() && !tb.currentElement().nodeName().equals("frameset")) {
tb.transition(AfterFrameset);
}
}
} else if (t.isEOF()) {
if (!tb.currentElement().nodeName().equals("html")) {
tb.error(this);
return true;
}
} else {
tb.error(this);
return false;
}
return true;
}
},
AfterFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (isWhitespace(t)) {
tb.insert(t.asCharacter());
} else if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype()) {
tb.error(this);
return false;
} else if (t.isStartTag() && t.asStartTag().name().equals("html")) {
return tb.process(t, InBody);
} else if (t.isEndTag() && t.asEndTag().name().equals("html")) {
tb.transition(AfterAfterFrameset);
} else if (t.isStartTag() && t.asStartTag().name().equals("noframes")) {
return tb.process(t, InHead);
} else if (t.isEOF()) {
// cool your heels, we're complete
} else {
tb.error(this);
return false;
}
return true;
}
},
AfterAfterBody {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype() || isWhitespace(t) || (t.isStartTag() && t.asStartTag().name().equals("html"))) {
return tb.process(t, InBody);
} else if (t.isEOF()) {
// nice work chuck
} else {
tb.error(this);
tb.transition(InBody);
return tb.process(t);
}
return true;
}
},
AfterAfterFrameset {
boolean process(Token t, HtmlTreeBuilder tb) {
if (t.isComment()) {
tb.insert(t.asComment());
} else if (t.isDoctype() || isWhitespace(t) || (t.isStartTag() && t.asStartTag().name().equals("html"))) {
return tb.process(t, InBody);
} else if (t.isEOF()) {
// nice work chuck
} else if (t.isStartTag() && t.asStartTag().name().equals("noframes")) {
return tb.process(t, InHead);
} else {
tb.error(this);
return false;
}
return true;
}
},
ForeignContent {
boolean process(Token t, HtmlTreeBuilder tb) {
return true;
// todo: implement. Also; how do we get here?
}
};
private static String nullString = String.valueOf('\u0000');
abstract boolean process(Token t, HtmlTreeBuilder tb);
private static boolean isWhitespace(Token t) {
if (t.isCharacter()) {
String data = t.asCharacter().getData();
// todo: this checks more than spec - "\t", "\n", "\f", "\r", " "
for (int i = 0; i < data.length(); i++) {
char c = data.charAt(i);
if (!StringUtil.isWhitespace(c))
return false;
}
return true;
}
return false;
}
private static void handleRcData(Token.StartTag startTag, HtmlTreeBuilder tb) {
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.Rcdata);
tb.markInsertionMode();
tb.transition(Text);
}
private static void handleRawtext(Token.StartTag startTag, HtmlTreeBuilder tb) {
tb.insert(startTag);
tb.tokeniser.transition(TokeniserState.Rawtext);
tb.markInsertionMode();
tb.transition(Text);
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
5f15cdf4b2a1404762253b95fc864f3fe3f6b8d8 | 5fd3d2d20539d4e160f8ac293e0d4f1566a98a2c | /hz-fine-master/src/main/java/com/hz/fine/master/core/model/strategy/StrategyModel.java | 5f0048a42a5fcff5e3a201c24224b436fbc94ae8 | [] | no_license | hzhuazhi/hz-fine | eeac8ba3b7eecebf1934abab5a4610d3f7e0cd6f | addc43d2fe849e01ebd5b78300aae6fdf2171719 | refs/heads/master | 2022-12-14T12:24:59.982673 | 2020-09-05T11:02:02 | 2020-09-05T11:02:02 | 262,562,132 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,236 | java | package com.hz.fine.master.core.model.strategy;
import com.hz.fine.master.core.protocol.page.BasePage;
import java.io.Serializable;
/**
* @Description 策略表:关于一些策略配置的部署的Dao层
* @Author yoko
* @Date 2020/5/19 11:49
* @Version 1.0
*/
public class StrategyModel extends BasePage implements Serializable {
private static final long serialVersionUID = 1233223301149L;
/**
* 自增主键ID
*/
private Long id;
/**
* 策略名称
*/
private String stgName;
/**
* 策略类型:1注册分享链接,2
*/
private Integer stgType;
/**
* 策略的key:等同于策略类型
*/
private String stgKey;
/**
* 策略整形值
*/
private Integer stgNumValue;
/**
* 策略值
*/
private String stgValue;
/**
* 策略大的值: 存储json数据
*/
private String stgBigValue;
/**
* 数据类型:1普通数据,2英文逗号数据(多字段,英文逗号分割),3json数据
*/
private Integer dataType;
/**
* 数据说明:描述,简介
*/
private String stgExplain;
/**
* 创建时间
*/
private String createTime;
/**
* 更新时间
*/
private String updateTime;
/**
* 是否有效:0有效,1无效/删除
*/
private Integer yn;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getStgName() {
return stgName;
}
public void setStgName(String stgName) {
this.stgName = stgName;
}
public Integer getStgType() {
return stgType;
}
public void setStgType(Integer stgType) {
this.stgType = stgType;
}
public String getStgKey() {
return stgKey;
}
public void setStgKey(String stgKey) {
this.stgKey = stgKey;
}
public Integer getStgNumValue() {
return stgNumValue;
}
public void setStgNumValue(Integer stgNumValue) {
this.stgNumValue = stgNumValue;
}
public String getStgValue() {
return stgValue;
}
public void setStgValue(String stgValue) {
this.stgValue = stgValue;
}
public String getStgBigValue() {
return stgBigValue;
}
public void setStgBigValue(String stgBigValue) {
this.stgBigValue = stgBigValue;
}
public Integer getDataType() {
return dataType;
}
public void setDataType(Integer dataType) {
this.dataType = dataType;
}
public String getStgExplain() {
return stgExplain;
}
public void setStgExplain(String stgExplain) {
this.stgExplain = stgExplain;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public Integer getYn() {
return yn;
}
public void setYn(Integer yn) {
this.yn = yn;
}
}
| [
"duanfeng_1712@qq.com"
] | duanfeng_1712@qq.com |
5dcf7d7eba2c70b4666334cf012bc2f0332d18d8 | e03d408cbc6cddda0fc4f6028aa5344a52cd3194 | /src/com/example/multithreading/MainActivity.java | 085c41d613abd260c672796e66001aa951ece220 | [] | no_license | praveendurai/multi-threading | 0b0a3a8f275fb4233b630b1f88b9a753cdb56367 | 59c0ca54cc1d8663842093bd2b3d52f3910f48e5 | refs/heads/master | 2021-01-21T10:19:51.952645 | 2017-02-28T08:55:52 | 2017-02-28T08:55:52 | 83,410,795 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,071 | java | package com.example.multithreading;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"ITLAB@IT208"
] | ITLAB@IT208 |
025c1c9886143cde586c75e4ccc7b2f4e51f1362 | 123b5012c00ab3d99e28273e84fbac86b9fec86e | /JvmStudy/src/com/dsh/jvmp2/chapter03/java1/PassiveUse1.java | 34de12506768e94810b00dae158cdf775837b733 | [] | no_license | shanluhaiya/java-learning | f5f01712c3cc3fc71950a3b06829b7a6bd0be195 | ff803da314f2793f22b64485126fc975805d2f97 | refs/heads/master | 2023-05-14T11:47:55.872858 | 2021-06-09T13:46:55 | 2021-06-09T13:46:55 | 367,238,012 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,490 | java | package com.dsh.jvmp2.chapter03.java1;
import org.junit.Test;
/**
*
* 关于类的被动使用,即不会进行类的初始化操作,即不会调用<clinit>()
* 说明:没有初始化的类,不意味着没有加载!
*/
public class PassiveUse1 {
/**
* 1. 当访问一个静态字段时,只有真正声明这个字段的类才会被初始化。
* > 当通过子类引用父类的静态变量,不会导致子类初始化
*/
@Test
public void test1(){
System.out.println(Child.num);
//输出情况
//Parent的初始化过程 -> 子类不需要初始化
//1
}
/**
* 2. 通过数组定义类引用,不会触发此类的初始化
*/
@Test
public void test2(){
Parent[] parents = new Parent[10];//不打印 —> 没有初始化,运行时才会加载进来
System.out.println(parents.getClass());//class [Lcom.dsh.jvmp2.chapter03.java1.Parent;
System.out.println(parents.getClass().getSuperclass());//class java.lang.Object
parents[0] = new Parent();//Parent的初始化过程 -> 类初始化
parents[1] = new Parent();//不打印 -> 类已经初始化过了
}
}
class Parent{
static{
System.out.println("Parent的初始化过程");
}
public static int num = 1;
}
class Child extends Parent{
static{
System.out.println("Child的初始化过程");
}
}
| [
"qiaoguoqiang@wsecar.com"
] | qiaoguoqiang@wsecar.com |
c3e98eb542762ef4a680998dc951deb563b5140f | e54cd009e340679c4be3384cb0381f8a6562f0dc | /src/main/java/eu/hansolo/medusa/skins/TextClockSkin.java | 1f1b4a427209ea1ae06855818f73f7d0ec7648bc | [
"Apache-2.0"
] | permissive | PatrickKutch/Medusa | 241bff32426bf08222467bc0c98e3ac920d2683d | c0d39c5a30b91d0db95edc6812c20e0e0ce9d62c | refs/heads/master | 2021-01-17T21:06:40.495510 | 2016-10-29T16:47:43 | 2016-10-29T16:47:43 | 57,459,779 | 1 | 0 | null | 2016-10-29T16:47:43 | 2016-04-30T20:10:04 | Java | UTF-8 | Java | false | false | 9,723 | java | /*
* Copyright (c) 2016 by Gerrit Grunwald
*
* 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 eu.hansolo.medusa.skins;
import eu.hansolo.medusa.Clock;
import eu.hansolo.medusa.Fonts;
import eu.hansolo.medusa.tools.Helper;
import javafx.geometry.Insets;
import javafx.geometry.VPos;
import javafx.scene.control.Skin;
import javafx.scene.control.SkinBase;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.Border;
import javafx.scene.layout.BorderStroke;
import javafx.scene.layout.BorderStrokeStyle;
import javafx.scene.layout.BorderWidths;
import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
/**
* Created by hansolo on 29.09.16.
*/
public class TextClockSkin extends SkinBase<Clock> implements Skin<Clock> {
private static final double PREFERRED_WIDTH = 250;
private static final double PREFERRED_HEIGHT = 100;
private static final double MINIMUM_WIDTH = 50;
private static final double MINIMUM_HEIGHT = 20;
private static final double MAXIMUM_WIDTH = 1024;
private static final double MAXIMUM_HEIGHT = 1024;
private static final DateTimeFormatter HHMM_FORMATTER = DateTimeFormatter.ofPattern("HH:mm");
private static final DateTimeFormatter HHMMSS_FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss");
private static final DateTimeFormatter AMPM_HHMM_FORMATTER = DateTimeFormatter.ofPattern("hh:mm a");
private static final DateTimeFormatter AMPM_HHMMSS_FORMATTER = DateTimeFormatter.ofPattern("hh:mm:ss a");
private double aspectRatio = 0.4;
private double width;
private double height;
private DateTimeFormatter dateFormat;
private Text timeText;
private Text dateText;
private Pane pane;
private Color textColor;
private Color dateColor;
private Font customFont;
// ******************** Constructors **************************************
public TextClockSkin(Clock clock) {
super(clock);
textColor = clock.getTextColor();
dateColor = clock.getDateColor();
dateFormat = Helper.getDateFormat(clock.getLocale());
customFont = clock.getCustomFont();
init();
initGraphics();
registerListeners();
}
// ******************** Initialization ************************************
private void init() {
if (Double.compare(getSkinnable().getPrefWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getPrefHeight(), 0.0) <= 0 ||
Double.compare(getSkinnable().getWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getHeight(), 0.0) <= 0) {
if (getSkinnable().getPrefWidth() < 0 && getSkinnable().getPrefHeight() < 0) {
getSkinnable().setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
}
}
if (Double.compare(getSkinnable().getMinWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getMinHeight(), 0.0) <= 0) {
getSkinnable().setMinSize(MINIMUM_WIDTH, MINIMUM_HEIGHT);
}
if (Double.compare(getSkinnable().getMaxWidth(), 0.0) <= 0 || Double.compare(getSkinnable().getMaxHeight(), 0.0) <= 0) {
getSkinnable().setMaxSize(MAXIMUM_WIDTH, MAXIMUM_HEIGHT);
}
}
private void initGraphics() {
timeText = new Text();
timeText.setTextOrigin(VPos.CENTER);
timeText.setFill(textColor);
dateText = new Text();
dateText.setTextOrigin(VPos.CENTER);
dateText.setFill(dateColor);
pane = new Pane(timeText, dateText);
pane.setBorder(new Border(new BorderStroke(getSkinnable().getBorderPaint(), BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(getSkinnable().getBorderWidth()))));
pane.setBackground(new Background(new BackgroundFill(getSkinnable().getBackgroundPaint(), CornerRadii.EMPTY, Insets.EMPTY)));
getChildren().setAll(pane);
}
private void registerListeners() {
getSkinnable().widthProperty().addListener(o -> handleEvents("RESIZE"));
getSkinnable().heightProperty().addListener(o -> handleEvents("RESIZE"));
getSkinnable().setOnUpdate(e -> handleEvents(e.eventType.name()));
if (getSkinnable().isAnimated()) {
getSkinnable().currentTimeProperty().addListener(o -> updateTime(
ZonedDateTime.ofInstant(Instant.ofEpochSecond(getSkinnable().getCurrentTime()), ZoneId.of(ZoneId.systemDefault().getId()))));
} else {
getSkinnable().timeProperty().addListener(o -> updateTime(getSkinnable().getTime()));
}
}
// ******************** Methods *******************************************
private void handleEvents(final String EVENT_TYPE) {
if ("RESIZE".equals(EVENT_TYPE)) {
resize();
redraw();
} else if ("REDRAW".equals(EVENT_TYPE)) {
redraw();
} else if ("VISIBILITY".equals(EVENT_TYPE)) {
} else if ("SECTION".equals(EVENT_TYPE)) {
redraw();
}
}
// ******************** Canvas ********************************************
private void drawTime(final ZonedDateTime TIME) {
// draw the time
if (getSkinnable().isTextVisible()) {
if (Locale.US == getSkinnable().getLocale()) {
timeText.setText(getSkinnable().isSecondsVisible() ? AMPM_HHMMSS_FORMATTER.format(TIME) : AMPM_HHMM_FORMATTER.format(TIME));
} else {
timeText.setText(getSkinnable().isSecondsVisible() ? HHMMSS_FORMATTER.format(TIME) : HHMM_FORMATTER.format(TIME));
}
timeText.setX((width - timeText.getLayoutBounds().getWidth()) * 0.5);
}
// draw the date
if (getSkinnable().isDateVisible()) {
dateText.setText(dateFormat.format(TIME));
dateText.setX((width - dateText.getLayoutBounds().getWidth()) * 0.5);
}
}
private void updateTime(final ZonedDateTime TIME) {
drawTime(TIME);
}
// ******************** Resizing ******************************************
private void resize() {
width = getSkinnable().getWidth() - getSkinnable().getInsets().getLeft() - getSkinnable().getInsets().getRight();
height = getSkinnable().getHeight() - getSkinnable().getInsets().getTop() - getSkinnable().getInsets().getBottom();
if (aspectRatio * width > height) {
width = 1 / (aspectRatio / height);
} else if (1 / (aspectRatio / height) > width) {
height = aspectRatio * width;
}
if (width > 0 && height > 0) {
pane.setMaxSize(width, height);
pane.relocate((getSkinnable().getWidth() - height) * 0.5, (getSkinnable().getHeight() - height) * 0.5);
if (getSkinnable().isTextVisible()) {
if (null == customFont) {
timeText.setFont(Locale.US == getSkinnable().getLocale() ? Fonts.robotoLight(0.5 * height) : Fonts.robotoLight(0.6 * height));
} else {
timeText.setFont(Locale.US == getSkinnable().getLocale() ? new Font(customFont.getName(), 0.5 * height) : new Font(customFont.getName(), 0.6 * height));
}
timeText.setX((width - timeText.getLayoutBounds().getWidth()) * 0.5);
if (getSkinnable().isDateVisible()) {
timeText.setY(height * 0.3);
} else {
timeText.setY(height * 0.5);
}
}
if (getSkinnable().isDateVisible()) {
if (null == customFont) {
dateText.setFont(Fonts.robotoLight(0.3 * height));
} else {
dateText.setFont(new Font(customFont.getName(), 0.3 * height));
}
dateText.setX((width - dateText.getLayoutBounds().getWidth()) * 0.5);
dateText.setY(height * 0.8);
}
}
}
private void redraw() {
pane.setBorder(new Border(new BorderStroke(getSkinnable().getBorderPaint(), BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(getSkinnable().getBorderWidth() / PREFERRED_WIDTH * height))));
pane.setBackground(new Background(new BackgroundFill(getSkinnable().getBackgroundPaint(), CornerRadii.EMPTY, Insets.EMPTY)));
ZonedDateTime time = getSkinnable().getTime();
textColor = getSkinnable().getTextColor();
timeText.setFill(textColor);
dateColor = getSkinnable().getDateColor();
dateText.setFill(dateColor);
drawTime(time);
}
}
| [
"han.solo@mac.com"
] | han.solo@mac.com |
ad9f6a5806a9ea4d1fead76b83b2eafc12551644 | ff5755b8f4ada97d441968ee8fbe86c05056c47e | /invoicing-module/src/main/java/com/glacier/frame/entity/system/UserSettingExample.java | 594665b7b68a0c3bb826a93e65074742728f8c1d | [] | no_license | hitmm/invoicing-project | 7b18e3463f7b7d67f90260d82638bed52f6ddf8e | 8b935af6f8f8c94433b6c15d25c2da2de32dffa7 | refs/heads/master | 2022-12-22T14:12:49.282617 | 2019-09-14T15:17:52 | 2019-09-14T15:17:52 | 197,218,692 | 0 | 0 | null | 2022-12-16T09:59:26 | 2019-07-16T15:19:19 | Java | UTF-8 | Java | false | false | 18,804 | java | package com.glacier.frame.entity.system;
import java.util.ArrayList;
import java.util.List;
public class UserSettingExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected int limitStart = -1;
protected int limitEnd = -1;
public UserSettingExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimitStart(int limitStart) {
this.limitStart=limitStart;
}
public int getLimitStart() {
return limitStart;
}
public void setLimitEnd(int limitEnd) {
this.limitEnd=limitEnd;
}
public int getLimitEnd() {
return limitEnd;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andUserIdIsNull() {
addCriterion("temp_user_setting.user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("temp_user_setting.user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(String value) {
addCriterion("temp_user_setting.user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(String value) {
addCriterion("temp_user_setting.user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(String value) {
addCriterion("temp_user_setting.user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(String value) {
addCriterion("temp_user_setting.user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(String value) {
addCriterion("temp_user_setting.user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(String value) {
addCriterion("temp_user_setting.user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLike(String value) {
addCriterion("temp_user_setting.user_id like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotLike(String value) {
addCriterion("temp_user_setting.user_id not like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<String> values) {
addCriterion("temp_user_setting.user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> values) {
addCriterion("temp_user_setting.user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(String value1, String value2) {
addCriterion("temp_user_setting.user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(String value1, String value2) {
addCriterion("temp_user_setting.user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andSetKeyIsNull() {
addCriterion("temp_user_setting.set_key is null");
return (Criteria) this;
}
public Criteria andSetKeyIsNotNull() {
addCriterion("temp_user_setting.set_key is not null");
return (Criteria) this;
}
public Criteria andSetKeyEqualTo(String value) {
addCriterion("temp_user_setting.set_key =", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyNotEqualTo(String value) {
addCriterion("temp_user_setting.set_key <>", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyGreaterThan(String value) {
addCriterion("temp_user_setting.set_key >", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyGreaterThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_key >=", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyLessThan(String value) {
addCriterion("temp_user_setting.set_key <", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyLessThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_key <=", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyLike(String value) {
addCriterion("temp_user_setting.set_key like", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyNotLike(String value) {
addCriterion("temp_user_setting.set_key not like", value, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyIn(List<String> values) {
addCriterion("temp_user_setting.set_key in", values, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyNotIn(List<String> values) {
addCriterion("temp_user_setting.set_key not in", values, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_key between", value1, value2, "setKey");
return (Criteria) this;
}
public Criteria andSetKeyNotBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_key not between", value1, value2, "setKey");
return (Criteria) this;
}
public Criteria andSetNameIsNull() {
addCriterion("temp_user_setting.set_name is null");
return (Criteria) this;
}
public Criteria andSetNameIsNotNull() {
addCriterion("temp_user_setting.set_name is not null");
return (Criteria) this;
}
public Criteria andSetNameEqualTo(String value) {
addCriterion("temp_user_setting.set_name =", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameNotEqualTo(String value) {
addCriterion("temp_user_setting.set_name <>", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameGreaterThan(String value) {
addCriterion("temp_user_setting.set_name >", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameGreaterThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_name >=", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameLessThan(String value) {
addCriterion("temp_user_setting.set_name <", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameLessThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_name <=", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameLike(String value) {
addCriterion("temp_user_setting.set_name like", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameNotLike(String value) {
addCriterion("temp_user_setting.set_name not like", value, "setName");
return (Criteria) this;
}
public Criteria andSetNameIn(List<String> values) {
addCriterion("temp_user_setting.set_name in", values, "setName");
return (Criteria) this;
}
public Criteria andSetNameNotIn(List<String> values) {
addCriterion("temp_user_setting.set_name not in", values, "setName");
return (Criteria) this;
}
public Criteria andSetNameBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_name between", value1, value2, "setName");
return (Criteria) this;
}
public Criteria andSetNameNotBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_name not between", value1, value2, "setName");
return (Criteria) this;
}
public Criteria andSetValueIsNull() {
addCriterion("temp_user_setting.set_value is null");
return (Criteria) this;
}
public Criteria andSetValueIsNotNull() {
addCriterion("temp_user_setting.set_value is not null");
return (Criteria) this;
}
public Criteria andSetValueEqualTo(String value) {
addCriterion("temp_user_setting.set_value =", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueNotEqualTo(String value) {
addCriterion("temp_user_setting.set_value <>", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueGreaterThan(String value) {
addCriterion("temp_user_setting.set_value >", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueGreaterThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_value >=", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueLessThan(String value) {
addCriterion("temp_user_setting.set_value <", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueLessThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_value <=", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueLike(String value) {
addCriterion("temp_user_setting.set_value like", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueNotLike(String value) {
addCriterion("temp_user_setting.set_value not like", value, "setValue");
return (Criteria) this;
}
public Criteria andSetValueIn(List<String> values) {
addCriterion("temp_user_setting.set_value in", values, "setValue");
return (Criteria) this;
}
public Criteria andSetValueNotIn(List<String> values) {
addCriterion("temp_user_setting.set_value not in", values, "setValue");
return (Criteria) this;
}
public Criteria andSetValueBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_value between", value1, value2, "setValue");
return (Criteria) this;
}
public Criteria andSetValueNotBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_value not between", value1, value2, "setValue");
return (Criteria) this;
}
public Criteria andSetDescriptionIsNull() {
addCriterion("temp_user_setting.set_description is null");
return (Criteria) this;
}
public Criteria andSetDescriptionIsNotNull() {
addCriterion("temp_user_setting.set_description is not null");
return (Criteria) this;
}
public Criteria andSetDescriptionEqualTo(String value) {
addCriterion("temp_user_setting.set_description =", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionNotEqualTo(String value) {
addCriterion("temp_user_setting.set_description <>", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionGreaterThan(String value) {
addCriterion("temp_user_setting.set_description >", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_description >=", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionLessThan(String value) {
addCriterion("temp_user_setting.set_description <", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionLessThanOrEqualTo(String value) {
addCriterion("temp_user_setting.set_description <=", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionLike(String value) {
addCriterion("temp_user_setting.set_description like", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionNotLike(String value) {
addCriterion("temp_user_setting.set_description not like", value, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionIn(List<String> values) {
addCriterion("temp_user_setting.set_description in", values, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionNotIn(List<String> values) {
addCriterion("temp_user_setting.set_description not in", values, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_description between", value1, value2, "setDescription");
return (Criteria) this;
}
public Criteria andSetDescriptionNotBetween(String value1, String value2) {
addCriterion("temp_user_setting.set_description not between", value1, value2, "setDescription");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | [
"960830lll"
] | 960830lll |
7e712bd2f1e790ea103159baeb42733fc34e0496 | 3ed6ef9ac5e0704d2418fad0cfb44e3097792539 | /chapter05/src/main/java/com/blogspot/toomuchcoding/book/chapter5/voidmethod/TaxFactorService.java | f93eda378993307cf9756cd0a525c1ecc1d46e72 | [
"Apache-2.0"
] | permissive | a5535772/mockito-cookbook | 6655967798eb90e283e2738acc6cee63ec173a1a | 54350c74741d26d8750990b33631ba75f3b751c9 | refs/heads/master | 2020-03-18T11:54:54.597899 | 2018-05-25T03:28:58 | 2018-05-25T03:28:58 | 134,697,791 | 0 | 0 | Apache-2.0 | 2018-05-24T10:11:34 | 2018-05-24T10:11:34 | null | UTF-8 | Java | false | false | 533 | java | package com.blogspot.toomuchcoding.book.chapter5.voidmethod;
import java.net.ConnectException;
import com.blogspot.toomuchcoding.person.Person;
public class TaxFactorService {
private static final double MEAN_TAX_FACTOR = 0.5;
public void updateMeanTaxFactor(Person person, double meanTaxFactor) throws ConnectException {
System.out.printf("Updating mean tax factor [%s] for person with defined country%n", meanTaxFactor);
}
public double calculateMeanTaxFactor() {
return MEAN_TAX_FACTOR;
}
}
| [
"marcin@grzejszczak.pl"
] | marcin@grzejszczak.pl |
d2b2867db09c55ff79af568c180e688acbe0c7bf | 7447d4d77eadd9fb9ad863510cfd9afdfb51fc05 | /src/main/java/controller/TestServlet.java | 6ce11a5ccbf03f551263e8971dcfcd2f98346a88 | [] | no_license | 1252158112/AccountSystem | c328fc5f7d43b2aa82e4c5877026171303ec8d16 | cc5c565628348e74fd9151d8291c8fad8a9259c3 | refs/heads/master | 2023-06-08T14:21:49.056931 | 2021-06-23T05:44:37 | 2021-06-23T05:44:37 | 379,492,349 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package controller;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
@WebServlet(name = "testServlet",value = "/home")
public class TestServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.getRequestDispatcher("WEB-INF/views/login.jsp").forward(request,response);
}
}
| [
"1252158112@qq.com"
] | 1252158112@qq.com |
a27237667bca54af319cf121f3d215682350cb78 | fe5537e4905032825f36295a8a41a24c59c19589 | /BurppleFoodPlaces/app/src/main/java/xyz/htooaungnaing/burpplefoodplaces/adapters/ItemNewsAndTrendingNewsAdapter.java | 60ed6cbfb348e5119d0b8dd605a95b5d3d6b8466 | [
"Apache-2.0"
] | permissive | Htoo1993/PADC-3-F-HAN-BurppleFoodPlace | b5a4e3007c5bbc10da326efbe6189041ec3068fe | c83d8d672ca6eedfd531e2bd849e0c8cb3f776f2 | refs/heads/master | 2021-09-05T10:57:27.917939 | 2018-01-26T17:20:56 | 2018-01-26T17:20:56 | 116,288,511 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,137 | java | package xyz.htooaungnaing.burpplefoodplaces.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import xyz.htooaungnaing.burpplefoodplaces.R;
import xyz.htooaungnaing.burpplefoodplaces.viewholders.ItemNewsAndTrendingNewsViewHolder;
/**
* Created by htoo on 1/8/2018.
*/
public class ItemNewsAndTrendingNewsAdapter extends RecyclerView.Adapter {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
Context context = parent.getContext();
LayoutInflater inflater = LayoutInflater.from(context);
View view = inflater.inflate(R.layout.item_news_and_tending_news,parent,false);
ItemNewsAndTrendingNewsViewHolder itemNewsAndTrendingNewsViewHolder = new ItemNewsAndTrendingNewsViewHolder(view);
return itemNewsAndTrendingNewsViewHolder;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 3;
}
}
| [
"htooaungnaing1102@gmail.com"
] | htooaungnaing1102@gmail.com |
f9bc888428a9e29037f4f4714808c245ef230edb | c36d08386a88e139e6325ea7f5de64ba00a45c9f | /hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurationException.java | 90314f46292837a362f2315f33b609baac9f67be | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"CC0-1.0",
"CC-BY-3.0",
"EPL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Classpath-exception-2.0",
"CC-PDDC",
"GCC-exception-3.1",
"CDDL-1.0",
"MIT",
"GPL-2.0-only",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-on... | permissive | dmgerman/hadoop | 6197e3f3009196fb4ca528ab420d99a0cd5b9396 | 70c015914a8756c5440cd969d70dac04b8b6142b | refs/heads/master | 2020-12-01T06:30:51.605035 | 2019-12-19T19:37:17 | 2019-12-19T19:37:17 | 230,528,747 | 0 | 0 | Apache-2.0 | 2020-01-31T18:29:52 | 2019-12-27T22:48:25 | Java | UTF-8 | Java | false | false | 5,337 | java | begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/** * 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. */
end_comment
begin_package
DECL|package|org.apache.hadoop.conf
package|package
name|org
operator|.
name|apache
operator|.
name|hadoop
operator|.
name|conf
package|;
end_package
begin_comment
comment|/** * Exception indicating that configuration property cannot be changed * at run time. */
end_comment
begin_class
DECL|class|ReconfigurationException
specifier|public
class|class
name|ReconfigurationException
extends|extends
name|Exception
block|{
DECL|field|serialVersionUID
specifier|private
specifier|static
specifier|final
name|long
name|serialVersionUID
init|=
literal|1L
decl_stmt|;
DECL|field|property
specifier|private
name|String
name|property
decl_stmt|;
DECL|field|newVal
specifier|private
name|String
name|newVal
decl_stmt|;
DECL|field|oldVal
specifier|private
name|String
name|oldVal
decl_stmt|;
comment|/** * Construct the exception message. */
DECL|method|constructMessage (String property, String newVal, String oldVal)
specifier|private
specifier|static
name|String
name|constructMessage
parameter_list|(
name|String
name|property
parameter_list|,
name|String
name|newVal
parameter_list|,
name|String
name|oldVal
parameter_list|)
block|{
name|String
name|message
init|=
literal|"Could not change property "
operator|+
name|property
decl_stmt|;
if|if
condition|(
name|oldVal
operator|!=
literal|null
condition|)
block|{
name|message
operator|+=
literal|" from \'"
operator|+
name|oldVal
expr_stmt|;
block|}
if|if
condition|(
name|newVal
operator|!=
literal|null
condition|)
block|{
name|message
operator|+=
literal|"\' to \'"
operator|+
name|newVal
operator|+
literal|"\'"
expr_stmt|;
block|}
return|return
name|message
return|;
block|}
comment|/** * Create a new instance of {@link ReconfigurationException}. */
DECL|method|ReconfigurationException ()
specifier|public
name|ReconfigurationException
parameter_list|()
block|{
name|super
argument_list|(
literal|"Could not change configuration."
argument_list|)
expr_stmt|;
name|this
operator|.
name|property
operator|=
literal|null
expr_stmt|;
name|this
operator|.
name|newVal
operator|=
literal|null
expr_stmt|;
name|this
operator|.
name|oldVal
operator|=
literal|null
expr_stmt|;
block|}
comment|/** * Create a new instance of {@link ReconfigurationException}. */
DECL|method|ReconfigurationException (String property, String newVal, String oldVal, Throwable cause)
specifier|public
name|ReconfigurationException
parameter_list|(
name|String
name|property
parameter_list|,
name|String
name|newVal
parameter_list|,
name|String
name|oldVal
parameter_list|,
name|Throwable
name|cause
parameter_list|)
block|{
name|super
argument_list|(
name|constructMessage
argument_list|(
name|property
argument_list|,
name|newVal
argument_list|,
name|oldVal
argument_list|)
argument_list|,
name|cause
argument_list|)
expr_stmt|;
name|this
operator|.
name|property
operator|=
name|property
expr_stmt|;
name|this
operator|.
name|newVal
operator|=
name|newVal
expr_stmt|;
name|this
operator|.
name|oldVal
operator|=
name|oldVal
expr_stmt|;
block|}
comment|/** * Create a new instance of {@link ReconfigurationException}. */
DECL|method|ReconfigurationException (String property, String newVal, String oldVal)
specifier|public
name|ReconfigurationException
parameter_list|(
name|String
name|property
parameter_list|,
name|String
name|newVal
parameter_list|,
name|String
name|oldVal
parameter_list|)
block|{
name|super
argument_list|(
name|constructMessage
argument_list|(
name|property
argument_list|,
name|newVal
argument_list|,
name|oldVal
argument_list|)
argument_list|)
expr_stmt|;
name|this
operator|.
name|property
operator|=
name|property
expr_stmt|;
name|this
operator|.
name|newVal
operator|=
name|newVal
expr_stmt|;
name|this
operator|.
name|oldVal
operator|=
name|oldVal
expr_stmt|;
block|}
comment|/** * Get property that cannot be changed. */
DECL|method|getProperty ()
specifier|public
name|String
name|getProperty
parameter_list|()
block|{
return|return
name|property
return|;
block|}
comment|/** * Get value to which property was supposed to be changed. */
DECL|method|getNewValue ()
specifier|public
name|String
name|getNewValue
parameter_list|()
block|{
return|return
name|newVal
return|;
block|}
comment|/** * Get old value of property that cannot be changed. */
DECL|method|getOldValue ()
specifier|public
name|String
name|getOldValue
parameter_list|()
block|{
return|return
name|oldVal
return|;
block|}
block|}
end_class
end_unit
| [
"dhruba@apache.org"
] | dhruba@apache.org |
6aad9af5720bb73bccf1995d2f0b20cad32e24fc | c4d1992bbfe4552ad16ff35e0355b08c9e4998d6 | /releases/2.3.0/src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java | e308b05f6213ff9a22a6bec611a9616e71fa1540 | [] | no_license | BGCX261/zkpoi-svn-to-git | 36f2a50d2618c73e40f24ddc2d3df5aadc8eca30 | 81a63fb1c06a2dccff20cab1291c7284f1687508 | refs/heads/master | 2016-08-04T08:42:59.622864 | 2015-08-25T15:19:51 | 2015-08-25T15:19:51 | 41,594,557 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,359 | 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.poi.ddf;
import java.util.List;
import junit.framework.TestCase;
import org.apache.poi.POIDataSamples;
import org.apache.poi.util.HexDump;
import org.apache.poi.util.HexRead;
/**
* Tests for {@link EscherContainerRecord}
*/
public final class TestEscherContainerRecord extends TestCase {
private static final POIDataSamples _samples = POIDataSamples.getDDFInstance();
public void testFillFields() {
EscherRecordFactory f = new DefaultEscherRecordFactory();
byte[] data = HexRead.readFromString("0F 02 11 F1 00 00 00 00");
EscherRecord r = f.createRecord(data, 0);
r.fillFields(data, 0, f);
assertTrue(r instanceof EscherContainerRecord);
assertEquals((short) 0x020F, r.getOptions());
assertEquals((short) 0xF111, r.getRecordId());
data = HexRead.readFromString("0F 02 11 F1 08 00 00 00" +
" 02 00 22 F2 00 00 00 00");
r = f.createRecord(data, 0);
r.fillFields(data, 0, f);
EscherRecord c = r.getChild(0);
assertFalse(c instanceof EscherContainerRecord);
assertEquals((short) 0x0002, c.getOptions());
assertEquals((short) 0xF222, c.getRecordId());
}
public void testSerialize() {
UnknownEscherRecord r = new UnknownEscherRecord();
r.setOptions((short) 0x123F);
r.setRecordId((short) 0xF112);
byte[] data = new byte[8];
r.serialize(0, data, new NullEscherSerializationListener());
assertEquals("[3F, 12, 12, F1, 00, 00, 00, 00]", HexDump.toHex(data));
EscherRecord childRecord = new UnknownEscherRecord();
childRecord.setOptions((short) 0x9999);
childRecord.setRecordId((short) 0xFF01);
r.addChildRecord(childRecord);
data = new byte[16];
r.serialize(0, data, new NullEscherSerializationListener());
assertEquals("[3F, 12, 12, F1, 08, 00, 00, 00, 99, 99, 01, FF, 00, 00, 00, 00]", HexDump.toHex(data));
}
public void testToString() {
EscherContainerRecord r = new EscherContainerRecord();
r.setRecordId(EscherContainerRecord.SP_CONTAINER);
r.setOptions((short) 0x000F);
String nl = System.getProperty("line.separator");
assertEquals("org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl +
" isContainer: true" + nl +
" version: 0x000F" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF004" + nl +
" numchildren: 0" + nl
, r.toString());
EscherOptRecord r2 = new EscherOptRecord();
// don't try to shoot in foot, please -- vlsergey
// r2.setOptions((short) 0x9876);
r2.setRecordId(EscherOptRecord.RECORD_ID);
String expected;
r.addChildRecord(r2);
expected = "org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl +
" isContainer: true" + nl +
" version: 0x000F" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF004" + nl +
" numchildren: 1" + nl +
" children: " + nl +
" Child 0:" + nl +
" org.apache.poi.ddf.EscherOptRecord:" + nl +
" isContainer: false" + nl +
" version: 0x0003" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" " + nl;
assertEquals(expected, r.toString());
r.addChildRecord(r2);
expected = "org.apache.poi.ddf.EscherContainerRecord (SpContainer):" + nl +
" isContainer: true" + nl +
" version: 0x000F" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF004" + nl +
" numchildren: 2" + nl +
" children: " + nl +
" Child 0:" + nl +
" org.apache.poi.ddf.EscherOptRecord:" + nl +
" isContainer: false" + nl +
" version: 0x0003" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" " + nl +
" Child 1:" + nl +
" org.apache.poi.ddf.EscherOptRecord:" + nl +
" isContainer: false" + nl +
" version: 0x0003" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" " + nl;
assertEquals(expected, r.toString());
}
private static final class DummyEscherRecord extends EscherRecord {
public DummyEscherRecord() { }
public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) { return 0; }
public int serialize(int offset, byte[] data, EscherSerializationListener listener) { return 0; }
public int getRecordSize() { return 10; }
public String getRecordName() { return ""; }
}
public void testGetRecordSize() {
EscherContainerRecord r = new EscherContainerRecord();
r.addChildRecord(new DummyEscherRecord());
assertEquals(18, r.getRecordSize());
}
/**
* We were having problems with reading too much data on an UnknownEscherRecord,
* but hopefully we now read the correct size.
*/
public void testBug44857() throws Exception {
byte[] data = _samples.readFile("Container.dat");
// This used to fail with an OutOfMemory
EscherContainerRecord record = new EscherContainerRecord();
record.fillFields(data, 0, new DefaultEscherRecordFactory());
}
/**
* Ensure {@link EscherContainerRecord} doesn't spill its guts everywhere
*/
public void testChildren() {
EscherContainerRecord ecr = new EscherContainerRecord();
List<EscherRecord> children0 = ecr.getChildRecords();
assertEquals(0, children0.size());
EscherRecord chA = new DummyEscherRecord();
EscherRecord chB = new DummyEscherRecord();
EscherRecord chC = new DummyEscherRecord();
ecr.addChildRecord(chA);
ecr.addChildRecord(chB);
children0.add(chC);
List<EscherRecord> children1 = ecr.getChildRecords();
assertTrue(children0 != children1);
assertEquals(2, children1.size());
assertEquals(chA, children1.get(0));
assertEquals(chB, children1.get(1));
assertEquals(1, children0.size()); // first copy unchanged
ecr.setChildRecords(children0);
ecr.addChildRecord(chA);
List<EscherRecord> children2 = ecr.getChildRecords();
assertEquals(2, children2.size());
assertEquals(chC, children2.get(0));
assertEquals(chA, children2.get(1));
}
}
| [
"you@example.com"
] | you@example.com |
7cda235457d10ac4a99923c58e250fe02bd008fd | 63cff39606ed63cfe63e03b70820f620d11c0d43 | /CGB-1811-DNYXW/src/main/java/com/db/common/cache/CacheKey.java | 1d5f4611bf723007711a11db4daf69a5951cd2be | [] | no_license | zhangyan1224/dnyxw | 0904c83009abdcb8b2c112acf6ecc051543e8af7 | 3dd07b1844d63e13ee37d107fdf0507132ad8803 | refs/heads/master | 2020-04-26T09:33:59.318378 | 2019-03-03T02:50:18 | 2019-03-03T02:50:18 | 173,423,116 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,785 | java | package com.db.common.cache;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Arrays;
/**
@author ifsy
@create 2019年2月14日 下午5:22:46
*/
public class CacheKey implements Serializable {
private static final long serialVersionUID = -7108628554422067195L;
/**
* 目标类
*/
private Class<?> targetClass;
/**
* 目标方法
*/
private Method targetMethod;
/**
* 实际参数
*/
private Object[] args;
public Class<?> getTargetClass() {
return targetClass;
}
public void setTargetClass(Class<?> targetClass) {
this.targetClass = targetClass;
}
public Method getTargetMethod() {
return targetMethod;
}
public void setTargetMethod(Method targetMethod) {
this.targetMethod = targetMethod;
}
public Object[] getArgs() {
return args;
}
public void setArgs(Object[] args) {
this.args = args;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Arrays.deepHashCode(args);
result = prime * result + ((targetClass == null) ? 0 : targetClass.hashCode());
result = prime * result + ((targetMethod == null) ? 0 : targetMethod.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CacheKey other = (CacheKey) obj;
if (!Arrays.deepEquals(args, other.args))
return false;
if (targetClass == null) {
if (other.targetClass != null)
return false;
} else if (!targetClass.equals(other.targetClass))
return false;
if (targetMethod == null) {
if (other.targetMethod != null)
return false;
} else if (!targetMethod.equals(other.targetMethod))
return false;
return true;
}
}
| [
"1300727172@qq.com"
] | 1300727172@qq.com |
362c36d2c159ac04f92f8616c03d09cd16047b6e | 5394abbd0d7148e440c6b80dbc8821519a63a761 | /src/chat/view/ChatPanel.java | a36da60866f839b03cabd431c21a5c008894c82c | [] | no_license | willwpearson/ChatbotProject | 396672f31251c71a6f2370234b8c44d32d455896 | cf73ff986261a2b712fa746efec11787f400cda9 | refs/heads/master | 2021-05-15T14:35:35.486833 | 2018-02-21T19:07:37 | 2018-02-21T19:07:37 | 107,312,908 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,869 | java | package chat.view;
import javax.swing.*;
import chat.controller.ChatbotController;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
*
* @author William Pearson
*
*/
public class ChatPanel extends JPanel
{
private ChatbotController appController;
private JButton chatButton;
private JButton searchButton;
private JButton saveButton;
private JButton loadButton;
private JButton tweetButton;
private JTextField inputField;
private JTextArea chatArea;
private SpringLayout appLayout;
private JButton checkerButton;
private JLabel infoLabel;
private JScrollPane chatScrollPane;
/**
* Initializes the data members needed.
* @param appController The controller for the chatbot.
*/
public ChatPanel(ChatbotController appController)
{
super();
this.appController = appController;
//Initialize GUI data members
chatButton = new JButton("Chat", new ImageIcon(getClass().getResource("/chat/view/images/Chat Image.png")));
searchButton = new JButton("Search", new ImageIcon(getClass().getResource("/chat/view/images/Search Image.png")));
saveButton = new JButton("Save", new ImageIcon(getClass().getResource("/chat/view/images/Save Image.png")));
loadButton = new JButton("Load", new ImageIcon(getClass().getResource("/chat/view/images/Load Image.png")));
tweetButton = new JButton("Tweet", new ImageIcon(getClass().getResource("/chat/view/images/Tweet Image.png")));
chatArea = new JTextArea(10,25);
inputField = new JTextField(20);
infoLabel = new JLabel("Type to chat with Oshabot.");
appLayout = new SpringLayout();
chatScrollPane = new JScrollPane();
checkerButton = new JButton("Check");
setupScrollPane();
setupPanel();
setupLayout();
setupListeners();
}
private void setupScrollPane()
{
chatScrollPane.setViewportView(chatArea);
chatScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
chatScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
chatArea.setLineWrap(true);
chatArea.setWrapStyleWord(true);
}
/**
* Sets up the panel with the proper parameters and contents.
*/
private void setupPanel()
{
this.setBackground(new Color(0, 102, 102));
this.setLayout(appLayout);
this.add(chatButton);
this.add(searchButton);
this.add(saveButton);
this.add(loadButton);
this.add(tweetButton);
this.add(inputField);
this.add(chatScrollPane);
this.add(checkerButton);
this.add(infoLabel);
chatArea.setEnabled(false);
chatArea.setEditable(false);
}
/**
* Sets up the layout for each of the content pieces in the panel.
*/
private void setupLayout()
{
appLayout.putConstraint(SpringLayout.NORTH, chatScrollPane, 20, SpringLayout.NORTH, this);
appLayout.putConstraint(SpringLayout.WEST, chatScrollPane, 25, SpringLayout.WEST, this);
appLayout.putConstraint(SpringLayout.EAST, chatScrollPane, -25, SpringLayout.EAST, this);
appLayout.putConstraint(SpringLayout.WEST, inputField, 0, SpringLayout.WEST, chatScrollPane);
appLayout.putConstraint(SpringLayout.SOUTH, chatButton, -31, SpringLayout.SOUTH, this);
appLayout.putConstraint(SpringLayout.EAST, chatButton, 0, SpringLayout.EAST, chatScrollPane);
appLayout.putConstraint(SpringLayout.NORTH, checkerButton, 35, SpringLayout.SOUTH, chatScrollPane);
appLayout.putConstraint(SpringLayout.WEST, checkerButton, 0, SpringLayout.WEST, chatButton);
appLayout.putConstraint(SpringLayout.SOUTH, checkerButton, 5, SpringLayout.NORTH, chatButton);
appLayout.putConstraint(SpringLayout.EAST, checkerButton, 0, SpringLayout.EAST, chatButton);
appLayout.putConstraint(SpringLayout.EAST, infoLabel, -135, SpringLayout.EAST, this);
appLayout.putConstraint(SpringLayout.EAST, inputField, 0, SpringLayout.WEST, searchButton);
appLayout.putConstraint(SpringLayout.WEST, searchButton, 304, SpringLayout.WEST, this);
appLayout.putConstraint(SpringLayout.SOUTH, searchButton, 0, SpringLayout.SOUTH, chatButton);
appLayout.putConstraint(SpringLayout.EAST, searchButton, 0, SpringLayout.WEST, chatButton);
appLayout.putConstraint(SpringLayout.WEST, saveButton, 0, SpringLayout.WEST, searchButton);
appLayout.putConstraint(SpringLayout.SOUTH, saveButton, 0, SpringLayout.NORTH, searchButton);
appLayout.putConstraint(SpringLayout.WEST, loadButton, 0, SpringLayout.EAST, saveButton);
appLayout.putConstraint(SpringLayout.SOUTH, loadButton, 0, SpringLayout.NORTH, searchButton);
appLayout.putConstraint(SpringLayout.EAST, loadButton, 0, SpringLayout.EAST, searchButton);
appLayout.putConstraint(SpringLayout.EAST, saveButton, 98, SpringLayout.WEST, searchButton);
appLayout.putConstraint(SpringLayout.NORTH, inputField, 25, SpringLayout.NORTH, chatButton);
appLayout.putConstraint(SpringLayout.SOUTH, inputField, 0, SpringLayout.SOUTH, searchButton);
appLayout.putConstraint(SpringLayout.WEST, tweetButton, 0, SpringLayout.WEST, searchButton);
appLayout.putConstraint(SpringLayout.SOUTH, tweetButton, 0, SpringLayout.NORTH, saveButton);
appLayout.putConstraint(SpringLayout.EAST, tweetButton, 0, SpringLayout.EAST, searchButton);
}
/**
* Sets up the listeners for actions with the objects in the panel.
*/
private void setupListeners()
{
chatButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent click)
{
String userText = inputField.getText();
String displayText = appController.interactWithChatbot(userText);
chatArea.append(displayText);
inputField.setText("");
}
});
checkerButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent click)
{
String userText = inputField.getText();
String displayText = appController.useCheckers(userText);
chatArea.append(displayText);
inputField.setText("");
}
});
}
}
| [
"31518711+willwpearson@users.noreply.github.com"
] | 31518711+willwpearson@users.noreply.github.com |
6b2873f2805b9b85a6f229b4e93b06b872d5b12f | 63c46f5955bd4f9559ec2731d16d0961a5415f22 | /JXTADroid/src/net/jxta/socket/JxtaSocketAddress.java | 2f0454b52fcdd110b5bd514177acfd913c06c9fd | [] | no_license | dineshone/JXTA_Android | 7dfc24f30a547c26743a8e7a149335486f09b86d | 6a6ec4ed18db34f62ccc123b02fa8999d32f9ed6 | refs/heads/master | 2020-06-03T22:43:39.441912 | 2014-07-22T01:04:59 | 2014-07-22T01:04:59 | 16,534,945 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,245 | java | /*
* Copyright (c) 2001-2007 Sun Microsystems, Inc. All rights reserved.
*
* The Sun Project JXTA(TM) Software License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by Sun Microsystems, Inc. for JXTA(TM) technology."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
* not be used to endorse or promote products derived from this software
* without prior written permission. For written permission, please contact
* Project JXTA at http://www.jxta.org.
*
* 5. Products derived from this software may not be called "JXTA", nor may
* "JXTA" appear in their name, without prior written permission of Sun.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
* MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* JXTA is a registered trademark of Sun Microsystems, Inc. in the United
* States and other countries.
*
* Please see the license information page at :
* <http://www.jxta.org/project/www/license.html> for instructions on use of
* the license in source files.
*
* ====================================================================
*
* This software consists of voluntary contributions made by many individuals
* on behalf of Project JXTA. For more information on Project JXTA, please see
* http://www.jxta.org.
*
* This license is based on the BSD license adopted by the Apache Foundation.
*/
package net.jxta.socket;
import java.net.SocketAddress;
import net.jxta.document.MimeMediaType;
import net.jxta.peer.PeerID;
import net.jxta.peergroup.PeerGroup;
import net.jxta.peergroup.PeerGroupID;
import net.jxta.protocol.PeerAdvertisement;
import net.jxta.protocol.PipeAdvertisement;
/**
* This class implements a JxtaSocket address (PeerGroup ID + Pipe Advertisement
* + (optional) Peer ID).
* <p/>
* It provides an immutable object used by sockets for binding, connecting, or as
* returned values.
*
* @author vwilliams
* @see net.jxta.socket.JxtaSocket
* @see net.jxta.socket.JxtaServerSocket
* @see java.net.SocketAddress
* @see java.net.Socket
* @see java.net.ServerSocket
*/
public class JxtaSocketAddress extends SocketAddress {
private final PeerGroupID peerGroupId;
private final PipeAdvertisement pipeAdv;
private final PeerID peerId;
private final PeerAdvertisement peerAdv;
private transient String pipeDoc; // convenience, see getPipeDocAsString()
/**
* Creates a new instance of JxtaSocketAddress.
*
* @param peerGroup peer group within which this socket exists
* @param pipeAdv the advertisement of a pipe for the socket to listen on
*/
public JxtaSocketAddress(PeerGroup peerGroup, PipeAdvertisement pipeAdv) {
this.pipeAdv = pipeAdv.clone();
this.peerGroupId = peerGroup.getPeerGroupID();
this.peerId = null;
this.peerAdv = null;
}
/**
* Creates a new instance of JxtaSocketAddress.
*
* @param peerGroup peer group within which this socket exists
* @param pipeAdv the advertisement of a pipe for the socket to listen on
* @param peerAdv the PeerAdvertisement (may not be null)
*/
public JxtaSocketAddress(PeerGroup peerGroup, PipeAdvertisement pipeAdv, PeerAdvertisement peerAdv) {
if (peerGroup == null) {
throw new IllegalArgumentException("peerGroupId is required.");
}
if (pipeAdv == null) {
throw new IllegalArgumentException("pipeAdv is required.");
}
if (peerAdv == null) {
throw new IllegalArgumentException("pipeAdv is required.");
}
this.pipeAdv = pipeAdv.clone();
this.peerGroupId = peerGroup.getPeerGroupID();
this.peerId = peerAdv.getPeerID();
this.peerAdv = peerAdv.clone();
}
/**
* Returns the PeerGroupID element of the address
*
* @return the PeerGroupID
*/
public PeerGroupID getPeerGroupId() {
return this.peerGroupId;
}
/**
* Returns the PipeAdvertisement element of the address
*
* @return the PipeAdvertisement
*/
public PipeAdvertisement getPipeAdv() {
// preserve immutability
return pipeAdv.clone();
}
/**
* Returns the PeerID element of the address. May be null.
*
* @return the PeerID, if there is one, null otherwise
*/
public PeerID getPeerId() {
return this.peerId;
}
/**
* Returns the PeerID element of the address. May be null.
*
* @return the PeerAdvertisement, if there is one, null otherwise
*/
public PeerAdvertisement getPeerAdvertisement() {
return this.peerAdv;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof JxtaSocketAddress) {
JxtaSocketAddress addr = (JxtaSocketAddress) obj;
if (!peerGroupId.equals(addr.getPeerGroupId())) {
return false;
}
if (!pipeAdv.equals(addr.getPipeAdv())) {
return false;
}
if (peerId != null) {
if (!peerId.equals(addr.getPeerId())) {
return false;
}
} else if (addr.getPeerId() != null) {
return false;
}
return true;
}
return false;
}
@Override
public int hashCode() {
int result = 17;
result = 37 * result + peerGroupId.hashCode();
result = 37 * result + pipeAdv.hashCode();
if (peerId != null) {
result = 37 * result + peerId.hashCode();
}
return result;
}
@Override
public String toString() {
StringBuilder result = new StringBuilder();
String lineSep = System.getProperty("line.separator");
result.append(lineSep).append("JxtaSocketAdress:").append(lineSep);
result.append(" PeerGroupID: ").append(peerGroupId.toString()).append(lineSep);
if (peerId != null) {
result.append(lineSep).append(" PeerID: ").append(peerId.toString()).append(lineSep);
}
result.append(" Pipe Adv: ").append(lineSep).append(" ").append(getPipeDocAsString());
return result.toString();
}
/*
* A convenience function to lazily-initialize a variable with the string
* representaiton of the pipe advertisement and return it as needed.
*/
private synchronized String getPipeDocAsString() {
if (pipeDoc == null) {
// Using plain text to avoid unpredictable white space
// nodes. [vwilliams]
pipeDoc = pipeAdv.getDocument(MimeMediaType.TEXTUTF8).toString();
}
return pipeDoc;
}
}
| [
"dinesh.one@gmail.com"
] | dinesh.one@gmail.com |
8d27e18c938c587f755e89b48f8ac3e4d07a4a6b | 76473285c7740bcab28b48a06e3381adbd777b4d | /src/main/java/com/intern/tdd/Account.java | b6377a4feba55250a19b51eb5cf139080b7857ea | [] | no_license | AMaiyndy/junit-controller | aaa1eb47b0e31a0c51f9bdbece3dcaa7a522ce24 | 051e99e43aff2d14b1b08c1e5edc74139aaa1def | refs/heads/master | 2021-05-07T16:28:19.850793 | 2017-11-08T08:50:24 | 2017-11-08T08:50:24 | 108,561,674 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 291 | java | package com.intern.tdd;
public class Account {
private long balance;
public Account(long balance) {
this.balance = balance;
}
public long getBalance() {
return balance;
}
public void withdraw(long amount) {
this.balance -= amount;
}
}
| [
"aratmay@gmail.com"
] | aratmay@gmail.com |
5061d25f6835d0e5d6b9b6f14eeecde314f39ba3 | e5e91b645201bb71ba1d2e4f561d10d2b7f05d75 | /Java - VideoPlayer/src/videoPlayer2/Control.java | 6046aecdf78bcce59b06504fc1713ffde669567c | [] | no_license | Bojana5/ITBootcamp-workshop---Java | 8ab5bea22c64d7810f378fe4d4e492390f69bf1d | 8600e2f28c064a2200fa98fe0cebf2fac343eccc | refs/heads/main | 2023-03-02T12:24:57.494783 | 2021-02-10T14:21:04 | 2021-02-10T14:21:04 | 337,745,996 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 119 | java | package videoPlayer2;
public abstract class Control {
public abstract void izvrsiAkciju(VideoPlayer video);
}
| [
"bojana.miljanovic.5@gmail.com"
] | bojana.miljanovic.5@gmail.com |
ad48272622397b8419ee467dfdedc0932aa016a5 | 828bc04856605869a6605f9a97678a426607ef9f | /app/src/main/java/com/android/incallui/video/impl/CheckableImageButton.java | c5def9a1bf63a3f1a1131de578daad3ab3aaaac7 | [] | no_license | artillerymans/Dialer_Support | 14925695e8b6a7d12d33973c665e6e06b082019a | c460b7b9a9a1da0c0d91aaf253098b96a5c5d384 | refs/heads/master | 2022-11-23T07:55:11.819343 | 2020-08-02T05:57:26 | 2020-08-02T05:57:26 | 284,218,783 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,523 | java | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.incallui.video.impl;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.SoundEffectConstants;
import android.widget.Checkable;
import android.widget.ImageButton;
import com.android.dialer.R;
/** Image button that maintains a checked state. */
public class CheckableImageButton extends ImageButton implements Checkable {
private static final int[] CHECKED_STATE_SET = {android.R.attr.state_checked};
/** Callback interface to notify when the button's checked state has changed */
public interface OnCheckedChangeListener {
void onCheckedChanged(CheckableImageButton button, boolean isChecked);
}
private boolean broadcasting;
private boolean isChecked;
private OnCheckedChangeListener onCheckedChangeListener;
private CharSequence contentDescriptionChecked;
private CharSequence contentDescriptionUnchecked;
public CheckableImageButton(Context context) {
this(context, null);
}
public CheckableImageButton(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CheckableImageButton(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs);
}
private void init(Context context, AttributeSet attrs) {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.CheckableImageButton);
setChecked(typedArray.getBoolean(R.styleable.CheckableImageButton_android_checked, false));
contentDescriptionChecked =
typedArray.getText(R.styleable.CheckableImageButton_contentDescriptionChecked);
contentDescriptionUnchecked =
typedArray.getText(R.styleable.CheckableImageButton_contentDescriptionUnchecked);
typedArray.recycle();
updateContentDescription();
setClickable(true);
setFocusable(true);
}
@Override
public void setChecked(boolean checked) {
performSetChecked(checked);
}
/**
* Called when the state of the button should be updated, this should not be the result of user
* interaction.
*
* @param checked {@code true} if the button should be in the checked state, {@code false}
* otherwise.
*/
private void performSetChecked(boolean checked) {
if (isChecked() == checked) {
return;
}
isChecked = checked;
CharSequence contentDescription = updateContentDescription();
announceForAccessibility(contentDescription);
refreshDrawableState();
}
private CharSequence updateContentDescription() {
CharSequence contentDescription =
isChecked ? contentDescriptionChecked : contentDescriptionUnchecked;
setContentDescription(contentDescription);
return contentDescription;
}
/**
* Called when the user interacts with a button. This should not result in the button updating
* state, rather the request should be propagated to the associated listener.
*
* @param checked {@code true} if the button should be in the checked state, {@code false}
* otherwise.
*/
private void userRequestedSetChecked(boolean checked) {
if (isChecked() == checked) {
return;
}
if (broadcasting) {
return;
}
broadcasting = true;
if (onCheckedChangeListener != null) {
onCheckedChangeListener.onCheckedChanged(this, checked);
}
broadcasting = false;
}
@Override
public boolean isChecked() {
return isChecked;
}
@Override
public void toggle() {
userRequestedSetChecked(!isChecked());
}
@Override
public int[] onCreateDrawableState(int extraSpace) {
final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
if (isChecked()) {
mergeDrawableStates(drawableState, CHECKED_STATE_SET);
}
return drawableState;
}
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
invalidate();
}
public void setOnCheckedChangeListener(OnCheckedChangeListener listener) {
this.onCheckedChangeListener = listener;
}
@Override
public boolean performClick() {
if (!isCheckable()) {
return super.performClick();
}
toggle();
final boolean handled = super.performClick();
if (!handled) {
// View only makes a sound effect if the onClickListener was
// called, so we'll need to make one here instead.
playSoundEffect(SoundEffectConstants.CLICK);
}
return handled;
}
private boolean isCheckable() {
return onCheckedChangeListener != null;
}
@Override
protected void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState) state;
super.onRestoreInstanceState(savedState.getSuperState());
performSetChecked(savedState.isChecked);
requestLayout();
}
@Override
protected Parcelable onSaveInstanceState() {
return new SavedState(isChecked(), super.onSaveInstanceState());
}
private static class SavedState extends BaseSavedState {
public final boolean isChecked;
private SavedState(boolean isChecked, Parcelable superState) {
super(superState);
this.isChecked = isChecked;
}
protected SavedState(Parcel in) {
super(in);
isChecked = in.readByte() != 0;
}
public static final Creator<SavedState> CREATOR =
new Creator<SavedState>() {
@Override
public SavedState createFromParcel(Parcel in) {
return new SavedState(in);
}
@Override
public SavedState[] newArray(int size) {
return new SavedState[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeByte((byte) (isChecked ? 1 : 0));
}
}
}
| [
"zhiwei.zhurj@gmail.com"
] | zhiwei.zhurj@gmail.com |
85190c7752cc7eb606f784594f80d69454cfe1fe | 5ad0daa4de717f9fe847f52106c7853f0d629564 | /spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java | 8ec9c3a2c6844872068adb5e4ebd99950efdbbf9 | [
"Apache-2.0"
] | permissive | jasonSunhu/spring-code | aba5bafb6f9829ef528d8fb34dc97bea81b4b401 | dc18e9191f9291d5b83fb9aff79fdf8f4776c03a | refs/heads/master | 2023-05-04T02:29:00.355057 | 2021-05-24T07:24:35 | 2021-05-24T07:24:35 | 345,549,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 35,719 | java | /*
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.factory.support;
import java.lang.reflect.Constructor;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.BeanMetadataAttributeAccessor;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.core.io.DescriptiveResource;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* Base class for concrete, full-fledged
* {@link org.springframework.beans.factory.config.BeanDefinition} classes,
* factoring out common properties of {@link GenericBeanDefinition},
* {@link RootBeanDefinition} and {@link ChildBeanDefinition}.
*
* <p>The autowire constants match the ones defined in the
* {@link org.springframework.beans.factory.config.AutowireCapableBeanFactory}
* interface.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Rob Harrop
* @author Mark Fisher
* @see RootBeanDefinition
* @see ChildBeanDefinition
*/
@SuppressWarnings("serial")
public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccessor
implements BeanDefinition, Cloneable {
/**
* Constant for the default scope name: "", equivalent to singleton status
* but to be overridden from a parent bean definition (if applicable).
*/
public static final String SCOPE_DEFAULT = "";
/**
* Constant that indicates no autowiring at all.
* @see #setAutowireMode
*/
public static final int AUTOWIRE_NO = AutowireCapableBeanFactory.AUTOWIRE_NO;
/**
* Constant that indicates autowiring bean properties by name.
* @see #setAutowireMode
*/
public static final int AUTOWIRE_BY_NAME = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;
/**
* Constant that indicates autowiring bean properties by type.
* @see #setAutowireMode
*/
public static final int AUTOWIRE_BY_TYPE = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE;
/**
* Constant that indicates autowiring a constructor.
* @see #setAutowireMode
*/
public static final int AUTOWIRE_CONSTRUCTOR = AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR;
/**
* Constant that indicates determining an appropriate autowire strategy
* through introspection of the bean class.
* @see #setAutowireMode
* @deprecated as of Spring 3.0: If you are using mixed autowiring strategies,
* use annotation-based autowiring for clearer demarcation of autowiring needs.
*/
@Deprecated
public static final int AUTOWIRE_AUTODETECT = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT;
/**
* Constant that indicates no dependency check at all.
* @see #setDependencyCheck
*/
public static final int DEPENDENCY_CHECK_NONE = 0;
/**
* Constant that indicates dependency checking for object references.
* @see #setDependencyCheck
*/
public static final int DEPENDENCY_CHECK_OBJECTS = 1;
/**
* Constant that indicates dependency checking for "simple" properties.
* @see #setDependencyCheck
* @see org.springframework.beans.BeanUtils#isSimpleProperty
*/
public static final int DEPENDENCY_CHECK_SIMPLE = 2;
/**
* Constant that indicates dependency checking for all properties
* (object references as well as "simple" properties).
* @see #setDependencyCheck
*/
public static final int DEPENDENCY_CHECK_ALL = 3;
/**
* Constant that indicates the container should attempt to infer the
* {@link #setDestroyMethodName destroy method name} for a bean as opposed to
* explicit specification of a method name. The value {@value} is specifically
* designed to include characters otherwise illegal in a method name, ensuring
* no possibility of collisions with legitimately named methods having the same
* name.
* <p>Currently, the method names detected during destroy method inference
* are "close" and "shutdown", if present on the specific bean class.
*/
public static final String INFER_METHOD = "(inferred)";
private volatile Object beanClass;
private String scope = SCOPE_DEFAULT;
private boolean singleton = true;
private boolean prototype = false;
private boolean abstractFlag = false;
private boolean lazyInit = false;
private int autowireMode = AUTOWIRE_NO;
private int dependencyCheck = DEPENDENCY_CHECK_NONE;
private String[] dependsOn;
private boolean autowireCandidate = true;
private boolean primary = false;
private final Map<String, AutowireCandidateQualifier> qualifiers =
new LinkedHashMap<String, AutowireCandidateQualifier>(0);
private boolean nonPublicAccessAllowed = true;
private boolean lenientConstructorResolution = true;
private ConstructorArgumentValues constructorArgumentValues;
private MutablePropertyValues propertyValues;
private MethodOverrides methodOverrides = new MethodOverrides();
private String factoryBeanName;
private String factoryMethodName;
private String initMethodName;
private String destroyMethodName;
private boolean enforceInitMethod = true;
private boolean enforceDestroyMethod = true;
private boolean synthetic = false;
private int role = BeanDefinition.ROLE_APPLICATION;
private String description;
private Resource resource;
/**
* Create a new AbstractBeanDefinition with default settings.
*/
protected AbstractBeanDefinition() {
this(null, null);
}
/**
* Create a new AbstractBeanDefinition with the given
* constructor argument values and property values.
*/
protected AbstractBeanDefinition(ConstructorArgumentValues cargs, MutablePropertyValues pvs) {
setConstructorArgumentValues(cargs);
setPropertyValues(pvs);
}
/**
* Create a new AbstractBeanDefinition as a deep copy of the given
* bean definition.
* @param original the original bean definition to copy from
* @deprecated since Spring 2.5, in favor of {@link #AbstractBeanDefinition(BeanDefinition)}
*/
@Deprecated
protected AbstractBeanDefinition(AbstractBeanDefinition original) {
this((BeanDefinition) original);
}
/**
* Create a new AbstractBeanDefinition as a deep copy of the given
* bean definition.
* @param original the original bean definition to copy from
*/
protected AbstractBeanDefinition(BeanDefinition original) {
setParentName(original.getParentName());
setBeanClassName(original.getBeanClassName());
setFactoryBeanName(original.getFactoryBeanName());
setFactoryMethodName(original.getFactoryMethodName());
setScope(original.getScope());
setAbstract(original.isAbstract());
setLazyInit(original.isLazyInit());
setRole(original.getRole());
setConstructorArgumentValues(new ConstructorArgumentValues(original.getConstructorArgumentValues()));
setPropertyValues(new MutablePropertyValues(original.getPropertyValues()));
setSource(original.getSource());
copyAttributesFrom(original);
if (original instanceof AbstractBeanDefinition) {
AbstractBeanDefinition originalAbd = (AbstractBeanDefinition) original;
if (originalAbd.hasBeanClass()) {
setBeanClass(originalAbd.getBeanClass());
}
setAutowireMode(originalAbd.getAutowireMode());
setDependencyCheck(originalAbd.getDependencyCheck());
setDependsOn(originalAbd.getDependsOn());
setAutowireCandidate(originalAbd.isAutowireCandidate());
copyQualifiersFrom(originalAbd);
setPrimary(originalAbd.isPrimary());
setNonPublicAccessAllowed(originalAbd.isNonPublicAccessAllowed());
setLenientConstructorResolution(originalAbd.isLenientConstructorResolution());
setInitMethodName(originalAbd.getInitMethodName());
setEnforceInitMethod(originalAbd.isEnforceInitMethod());
setDestroyMethodName(originalAbd.getDestroyMethodName());
setEnforceDestroyMethod(originalAbd.isEnforceDestroyMethod());
setMethodOverrides(new MethodOverrides(originalAbd.getMethodOverrides()));
setSynthetic(originalAbd.isSynthetic());
setResource(originalAbd.getResource());
}
else {
setResourceDescription(original.getResourceDescription());
}
}
/**
* Override settings in this bean definition (presumably a copied parent
* from a parent-child inheritance relationship) from the given bean
* definition (presumably the child).
* @deprecated since Spring 2.5, in favor of {@link #overrideFrom(BeanDefinition)}
*/
@Deprecated
public void overrideFrom(AbstractBeanDefinition other) {
overrideFrom((BeanDefinition) other);
}
/**
* Override settings in this bean definition (presumably a copied parent
* from a parent-child inheritance relationship) from the given bean
* definition (presumably the child).
* <ul>
* <li>Will override beanClass if specified in the given bean definition.
* <li>Will always take {@code abstract}, {@code scope},
* {@code lazyInit}, {@code autowireMode}, {@code dependencyCheck},
* and {@code dependsOn} from the given bean definition.
* <li>Will add {@code constructorArgumentValues}, {@code propertyValues},
* {@code methodOverrides} from the given bean definition to existing ones.
* <li>Will override {@code factoryBeanName}, {@code factoryMethodName},
* {@code initMethodName}, and {@code destroyMethodName} if specified
* in the given bean definition.
* </ul>
*/
public void overrideFrom(BeanDefinition other) {
if (StringUtils.hasLength(other.getBeanClassName())) {
setBeanClassName(other.getBeanClassName());
}
if (StringUtils.hasLength(other.getFactoryBeanName())) {
setFactoryBeanName(other.getFactoryBeanName());
}
if (StringUtils.hasLength(other.getFactoryMethodName())) {
setFactoryMethodName(other.getFactoryMethodName());
}
if (StringUtils.hasLength(other.getScope())) {
setScope(other.getScope());
}
setAbstract(other.isAbstract());
setLazyInit(other.isLazyInit());
setRole(other.getRole());
getConstructorArgumentValues().addArgumentValues(other.getConstructorArgumentValues());
getPropertyValues().addPropertyValues(other.getPropertyValues());
setSource(other.getSource());
copyAttributesFrom(other);
if (other instanceof AbstractBeanDefinition) {
AbstractBeanDefinition otherAbd = (AbstractBeanDefinition) other;
if (otherAbd.hasBeanClass()) {
setBeanClass(otherAbd.getBeanClass());
}
setAutowireCandidate(otherAbd.isAutowireCandidate());
setAutowireMode(otherAbd.getAutowireMode());
copyQualifiersFrom(otherAbd);
setPrimary(otherAbd.isPrimary());
setDependencyCheck(otherAbd.getDependencyCheck());
setDependsOn(otherAbd.getDependsOn());
setNonPublicAccessAllowed(otherAbd.isNonPublicAccessAllowed());
setLenientConstructorResolution(otherAbd.isLenientConstructorResolution());
if (StringUtils.hasLength(otherAbd.getInitMethodName())) {
setInitMethodName(otherAbd.getInitMethodName());
setEnforceInitMethod(otherAbd.isEnforceInitMethod());
}
if (StringUtils.hasLength(otherAbd.getDestroyMethodName())) {
setDestroyMethodName(otherAbd.getDestroyMethodName());
setEnforceDestroyMethod(otherAbd.isEnforceDestroyMethod());
}
getMethodOverrides().addOverrides(otherAbd.getMethodOverrides());
setSynthetic(otherAbd.isSynthetic());
setResource(otherAbd.getResource());
}
else {
setResourceDescription(other.getResourceDescription());
}
}
/**
* Apply the provided default values to this bean.
* @param defaults the defaults to apply
*/
public void applyDefaults(BeanDefinitionDefaults defaults) {
setLazyInit(defaults.isLazyInit());
setAutowireMode(defaults.getAutowireMode());
setDependencyCheck(defaults.getDependencyCheck());
setInitMethodName(defaults.getInitMethodName());
setEnforceInitMethod(false);
setDestroyMethodName(defaults.getDestroyMethodName());
setEnforceDestroyMethod(false);
}
/**
* Return whether this definition specifies a bean class.
*/
public boolean hasBeanClass() {
return (this.beanClass instanceof Class);
}
/**
* Specify the class for this bean.
*/
public void setBeanClass(Class<?> beanClass) {
this.beanClass = beanClass;
}
/**
* Return the class of the wrapped bean, if already resolved.
* @return the bean class, or {@code null} if none defined
* @throws IllegalStateException if the bean definition does not define a bean class,
* or a specified bean class name has not been resolved into an actual Class
*/
public Class<?> getBeanClass() throws IllegalStateException {
Object beanClassObject = this.beanClass;
if (beanClassObject == null) {
throw new IllegalStateException("No bean class specified on bean definition");
}
if (!(beanClassObject instanceof Class)) {
throw new IllegalStateException(
"Bean class name [" + beanClassObject + "] has not been resolved into an actual Class");
}
return (Class<?>) beanClassObject;
}
public void setBeanClassName(String beanClassName) {
this.beanClass = beanClassName;
}
public String getBeanClassName() {
Object beanClassObject = this.beanClass;
if (beanClassObject instanceof Class) {
return ((Class<?>) beanClassObject).getName();
}
else {
return (String) beanClassObject;
}
}
/**
* Determine the class of the wrapped bean, resolving it from a
* specified class name if necessary. Will also reload a specified
* Class from its name when called with the bean class already resolved.
* @param classLoader the ClassLoader to use for resolving a (potential) class name
* @return the resolved bean class
* @throws ClassNotFoundException if the class name could be resolved
*/
public Class<?> resolveBeanClass(ClassLoader classLoader) throws ClassNotFoundException {
String className = getBeanClassName();
if (className == null) {
return null;
}
Class<?> resolvedClass = ClassUtils.forName(className, classLoader);
this.beanClass = resolvedClass;
return resolvedClass;
}
/**
* Set the name of the target scope for the bean.
* <p>Default is singleton status, although this is only applied once
* a bean definition becomes active in the containing factory. A bean
* definition may eventually inherit its scope from a parent bean definitionFor this
* reason, the default scope name is empty (empty String), with
* singleton status being assumed until a resolved scope will be set.
* @see #SCOPE_SINGLETON
* @see #SCOPE_PROTOTYPE
*/
public void setScope(String scope) {
this.scope = scope;
this.singleton = SCOPE_SINGLETON.equals(scope) || SCOPE_DEFAULT.equals(scope);
this.prototype = SCOPE_PROTOTYPE.equals(scope);
}
/**
* Return the name of the target scope for the bean.
*/
public String getScope() {
return this.scope;
}
/**
* Set if this a <b>Singleton</b>, with a single, shared instance returned
* on all calls. In case of "false", the BeanFactory will apply the <b>Prototype</b>
* design pattern, with each caller requesting an instance getting an independent
* instance. How this is exactly defined will depend on the BeanFactory.
* <p>"Singletons" are the commoner type, so the default is "true".
* Note that as of Spring 2.0, this flag is just an alternative way to
* specify scope="singleton" or scope="prototype".
* @deprecated since Spring 2.5, in favor of {@link #setScope}
* @see #setScope
* @see #SCOPE_SINGLETON
* @see #SCOPE_PROTOTYPE
*/
@Deprecated
public void setSingleton(boolean singleton) {
this.scope = (singleton ? SCOPE_SINGLETON : SCOPE_PROTOTYPE);
this.singleton = singleton;
this.prototype = !singleton;
}
/**
* Return whether this a <b>Singleton</b>, with a single shared instance
* returned from all calls.
* @see #SCOPE_SINGLETON
*/
public boolean isSingleton() {
return this.singleton;
}
/**
* Return whether this a <b>Prototype</b>, with an independent instance
* returned for each call.
* @see #SCOPE_PROTOTYPE
*/
public boolean isPrototype() {
return this.prototype;
}
/**
* Set if this bean is "abstract", i.e. not meant to be instantiated itself but
* rather just serving as parent for concrete child bean definitions.
* <p>Default is "false". Specify true to tell the bean factory to not try to
* instantiate that particular bean in any case.
*/
public void setAbstract(boolean abstractFlag) {
this.abstractFlag = abstractFlag;
}
/**
* Return whether this bean is "abstract", i.e. not meant to be instantiated
* itself but rather just serving as parent for concrete child bean definitions.
*/
public boolean isAbstract() {
return this.abstractFlag;
}
/**
* Set whether this bean should be lazily initialized.
* <p>If {@code false}, the bean will get instantiated on startup by bean
* factories that perform eager initialization of singletons.
*/
public void setLazyInit(boolean lazyInit) {
this.lazyInit = lazyInit;
}
/**
* Return whether this bean should be lazily initialized, i.e. not
* eagerly instantiated on startup. Only applicable to a singleton bean.
*/
public boolean isLazyInit() {
return this.lazyInit;
}
/**
* Set the autowire mode. This determines whether any automagical detection
* and setting of bean references will happen. Default is AUTOWIRE_NO,
* which means there's no autowire.
* @param autowireMode the autowire mode to set.
* Must be one of the constants defined in this class.
* @see #AUTOWIRE_NO
* @see #AUTOWIRE_BY_NAME
* @see #AUTOWIRE_BY_TYPE
* @see #AUTOWIRE_CONSTRUCTOR
* @see #AUTOWIRE_AUTODETECT
*/
public void setAutowireMode(int autowireMode) {
this.autowireMode = autowireMode;
}
/**
* Return the autowire mode as specified in the bean definition.
*/
public int getAutowireMode() {
return this.autowireMode;
}
/**
* Return the resolved autowire code,
* (resolving AUTOWIRE_AUTODETECT to AUTOWIRE_CONSTRUCTOR or AUTOWIRE_BY_TYPE).
* @see #AUTOWIRE_AUTODETECT
* @see #AUTOWIRE_CONSTRUCTOR
* @see #AUTOWIRE_BY_TYPE
*/
public int getResolvedAutowireMode() {
if (this.autowireMode == AUTOWIRE_AUTODETECT) {
// Work out whether to apply setter autowiring or constructor autowiring.
// If it has a no-arg constructor it's deemed to be setter autowiring,
// otherwise we'll try constructor autowiring.
Constructor<?>[] constructors = getBeanClass().getConstructors();
for (Constructor<?> constructor : constructors) {
if (constructor.getParameterTypes().length == 0) {
return AUTOWIRE_BY_TYPE;
}
}
return AUTOWIRE_CONSTRUCTOR;
}
else {
return this.autowireMode;
}
}
/**
* Set the dependency check code.
* @param dependencyCheck the code to set.
* Must be one of the four constants defined in this class.
* @see #DEPENDENCY_CHECK_NONE
* @see #DEPENDENCY_CHECK_OBJECTS
* @see #DEPENDENCY_CHECK_SIMPLE
* @see #DEPENDENCY_CHECK_ALL
*/
public void setDependencyCheck(int dependencyCheck) {
this.dependencyCheck = dependencyCheck;
}
/**
* Return the dependency check code.
*/
public int getDependencyCheck() {
return this.dependencyCheck;
}
/**
* Set the names of the beans that this bean depends on being initialized.
* The bean factory will guarantee that these beans get initialized first.
* <p>Note that dependencies are normally expressed through bean properties or
* constructor arguments. This property should just be necessary for other kinds
* of dependencies like statics (*ugh*) or database preparation on startup.
*/
public void setDependsOn(String[] dependsOn) {
this.dependsOn = dependsOn;
}
/**
* Return the bean names that this bean depends on.
*/
public String[] getDependsOn() {
return this.dependsOn;
}
/**
* Set whether this bean is a candidate for getting autowired into some other bean.
*/
public void setAutowireCandidate(boolean autowireCandidate) {
this.autowireCandidate = autowireCandidate;
}
/**
* Return whether this bean is a candidate for getting autowired into some other bean.
*/
public boolean isAutowireCandidate() {
return this.autowireCandidate;
}
/**
* Set whether this bean is a primary autowire candidate.
* If this value is true for exactly one bean among multiple
* matching candidates, it will serve as a tie-breaker.
*/
public void setPrimary(boolean primary) {
this.primary = primary;
}
/**
* Return whether this bean is a primary autowire candidate.
* If this value is true for exactly one bean among multiple
* matching candidates, it will serve as a tie-breaker.
*/
public boolean isPrimary() {
return this.primary;
}
/**
* Register a qualifier to be used for autowire candidate resolution,
* keyed by the qualifier's type name.
* @see AutowireCandidateQualifier#getTypeName()
*/
public void addQualifier(AutowireCandidateQualifier qualifier) {
this.qualifiers.put(qualifier.getTypeName(), qualifier);
}
/**
* Return whether this bean has the specified qualifier.
*/
public boolean hasQualifier(String typeName) {
return this.qualifiers.keySet().contains(typeName);
}
/**
* Return the qualifier mapped to the provided type name.
*/
public AutowireCandidateQualifier getQualifier(String typeName) {
return this.qualifiers.get(typeName);
}
/**
* Return all registered qualifiers.
* @return the Set of {@link AutowireCandidateQualifier} objects.
*/
public Set<AutowireCandidateQualifier> getQualifiers() {
return new LinkedHashSet<AutowireCandidateQualifier>(this.qualifiers.values());
}
/**
* Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition.
* @param source the AbstractBeanDefinition to copy from
*/
public void copyQualifiersFrom(AbstractBeanDefinition source) {
Assert.notNull(source, "Source must not be null");
this.qualifiers.putAll(source.qualifiers);
}
/**
* Specify whether to allow access to non-public constructors and methods,
* for the case of externalized metadata pointing to those. The default is
* {@code true}; switch this to {@code false} for public access only.
* <p>This applies to constructor resolution, factory method resolution,
* and also init/destroy methods. Bean property accessors have to be public
* in any case and are not affected by this setting.
* <p>Note that annotation-driven configuration will still access non-public
* members as far as they have been annotated. This setting applies to
* externalized metadata in this bean definition only.
*/
public void setNonPublicAccessAllowed(boolean nonPublicAccessAllowed) {
this.nonPublicAccessAllowed = nonPublicAccessAllowed;
}
/**
* Return whether to allow access to non-public constructors and methods.
*/
public boolean isNonPublicAccessAllowed() {
return this.nonPublicAccessAllowed;
}
/**
* Specify whether to resolve constructors in lenient mode ({@code true},
* which is the default) or to switch to strict resolution (throwing an exception
* in case of ambiguous constructors that all match when converting the arguments,
* whereas lenient mode would use the one with the 'closest' type matches).
*/
public void setLenientConstructorResolution(boolean lenientConstructorResolution) {
this.lenientConstructorResolution = lenientConstructorResolution;
}
/**
* Return whether to resolve constructors in lenient mode or in strict mode.
*/
public boolean isLenientConstructorResolution() {
return this.lenientConstructorResolution;
}
/**
* Specify constructor argument values for this bean.
*/
public void setConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) {
this.constructorArgumentValues =
(constructorArgumentValues != null ? constructorArgumentValues : new ConstructorArgumentValues());
}
/**
* Return constructor argument values for this bean (never {@code null}).
*/
public ConstructorArgumentValues getConstructorArgumentValues() {
return this.constructorArgumentValues;
}
/**
* Return if there are constructor argument values defined for this bean.
*/
public boolean hasConstructorArgumentValues() {
return !this.constructorArgumentValues.isEmpty();
}
/**
* Specify property values for this bean, if any.
*/
public void setPropertyValues(MutablePropertyValues propertyValues) {
this.propertyValues = (propertyValues != null ? propertyValues : new MutablePropertyValues());
}
/**
* Return property values for this bean (never {@code null}).
*/
public MutablePropertyValues getPropertyValues() {
return this.propertyValues;
}
/**
* Specify method overrides for the bean, if any.
*/
public void setMethodOverrides(MethodOverrides methodOverrides) {
this.methodOverrides = (methodOverrides != null ? methodOverrides : new MethodOverrides());
}
/**
* Return information about methods to be overridden by the IoC
* container. This will be empty if there are no method overrides.
* Never returns null.
*/
public MethodOverrides getMethodOverrides() {
return this.methodOverrides;
}
public void setFactoryBeanName(String factoryBeanName) {
this.factoryBeanName = factoryBeanName;
}
public String getFactoryBeanName() {
return this.factoryBeanName;
}
public void setFactoryMethodName(String factoryMethodName) {
this.factoryMethodName = factoryMethodName;
}
public String getFactoryMethodName() {
return this.factoryMethodName;
}
/**
* Set the name of the initializer method. The default is {@code null}
* in which case there is no initializer method.
*/
public void setInitMethodName(String initMethodName) {
this.initMethodName = initMethodName;
}
/**
* Return the name of the initializer method.
*/
public String getInitMethodName() {
return this.initMethodName;
}
/**
* Specify whether or not the configured init method is the default.
* Default value is {@code false}.
* @see #setInitMethodName
*/
public void setEnforceInitMethod(boolean enforceInitMethod) {
this.enforceInitMethod = enforceInitMethod;
}
/**
* Indicate whether the configured init method is the default.
* @see #getInitMethodName()
*/
public boolean isEnforceInitMethod() {
return this.enforceInitMethod;
}
/**
* Set the name of the destroy method. The default is {@code null}
* in which case there is no destroy method.
*/
public void setDestroyMethodName(String destroyMethodName) {
this.destroyMethodName = destroyMethodName;
}
/**
* Return the name of the destroy method.
*/
public String getDestroyMethodName() {
return this.destroyMethodName;
}
/**
* Specify whether or not the configured destroy method is the default.
* Default value is {@code false}.
* @see #setDestroyMethodName
*/
public void setEnforceDestroyMethod(boolean enforceDestroyMethod) {
this.enforceDestroyMethod = enforceDestroyMethod;
}
/**
* Indicate whether the configured destroy method is the default.
* @see #getDestroyMethodName
*/
public boolean isEnforceDestroyMethod() {
return this.enforceDestroyMethod;
}
/**
* Set whether this bean definition is 'synthetic', that is, not defined
* by the application itself (for example, an infrastructure bean such
* as a helper for auto-proxying, created through {@code <aop:config>}).
*/
public void setSynthetic(boolean synthetic) {
this.synthetic = synthetic;
}
/**
* Return whether this bean definition is 'synthetic', that is,
* not defined by the application itself.
*/
public boolean isSynthetic() {
return this.synthetic;
}
/**
* Set the role hint for this {@code BeanDefinition}.
*/
public void setRole(int role) {
this.role = role;
}
/**
* Return the role hint for this {@code BeanDefinition}.
*/
public int getRole() {
return this.role;
}
/**
* Set a human-readable description of this bean definition.
*/
public void setDescription(String description) {
this.description = description;
}
public String getDescription() {
return this.description;
}
/**
* Set the resource that this bean definition came from
* (for the purpose of showing context in case of errors).
*/
public void setResource(Resource resource) {
this.resource = resource;
}
/**
* Return the resource that this bean definition came from.
*/
public Resource getResource() {
return this.resource;
}
/**
* Set a description of the resource that this bean definition
* came from (for the purpose of showing context in case of errors).
*/
public void setResourceDescription(String resourceDescription) {
this.resource = new DescriptiveResource(resourceDescription);
}
public String getResourceDescription() {
return (this.resource != null ? this.resource.getDescription() : null);
}
/**
* Set the originating (e.g. decorated) BeanDefinition, if any.
*/
public void setOriginatingBeanDefinition(BeanDefinition originatingBd) {
this.resource = new BeanDefinitionResource(originatingBd);
}
public BeanDefinition getOriginatingBeanDefinition() {
return (this.resource instanceof BeanDefinitionResource ?
((BeanDefinitionResource) this.resource).getBeanDefinition() : null);
}
/**
* Validate this bean definition.
* @throws BeanDefinitionValidationException in case of validation failure
*/
public void validate() throws BeanDefinitionValidationException {
if (!getMethodOverrides().isEmpty() && getFactoryMethodName() != null) {
throw new BeanDefinitionValidationException(
"Cannot combine static factory method with method overrides: " +
"the static factory method must create the instance");
}
if (hasBeanClass()) {
prepareMethodOverrides();
}
}
/**
* Validate and prepare the method overrides defined for this bean.
* Checks for existence of a method with the specified name.
* @throws BeanDefinitionValidationException in case of validation failure
*/
public void prepareMethodOverrides() throws BeanDefinitionValidationException {
// Check that lookup methods exists.
MethodOverrides methodOverrides = getMethodOverrides();
if (!methodOverrides.isEmpty()) {
for (MethodOverride mo : methodOverrides.getOverrides()) {
// ->
prepareMethodOverride(mo);
}
}
}
/**
* Validate and prepare the given method override.
* Checks for existence of a method with the specified name,
* marking it as not overloaded if none found.
* @param mo the MethodOverride object to validate
* @throws BeanDefinitionValidationException in case of validation failure
*/
protected void prepareMethodOverride(MethodOverride mo) throws BeanDefinitionValidationException {
// 获取对应类中对应方法名的个数
int count = ClassUtils.getMethodCountForName(getBeanClass(), mo.getMethodName());
if (count == 0) {
throw new BeanDefinitionValidationException(
"Invalid method override: no method with name '" + mo.getMethodName() +
"' on class [" + getBeanClassName() + "]");
}
else if (count == 1) {
// Mark override as not overloaded, to avoid the overhead of arg type checking.
// 标记方法未重载,避免后续检查的开销
mo.setOverloaded(false);
}
}
/**
* Public declaration of Object's {@code clone()} method.
* Delegates to {@link #cloneBeanDefinition()}.
* @see Object#clone()
*/
@Override
public Object clone() {
return cloneBeanDefinition();
}
/**
* Clone this bean definition.
* To be implemented by concrete subclasses.
* @return the cloned bean definition object
*/
public abstract AbstractBeanDefinition cloneBeanDefinition();
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof AbstractBeanDefinition)) {
return false;
}
AbstractBeanDefinition that = (AbstractBeanDefinition) other;
if (!ObjectUtils.nullSafeEquals(getBeanClassName(), that.getBeanClassName())) return false;
if (!ObjectUtils.nullSafeEquals(this.scope, that.scope)) return false;
if (this.abstractFlag != that.abstractFlag) return false;
if (this.lazyInit != that.lazyInit) return false;
if (this.autowireMode != that.autowireMode) return false;
if (this.dependencyCheck != that.dependencyCheck) return false;
if (!Arrays.equals(this.dependsOn, that.dependsOn)) return false;
if (this.autowireCandidate != that.autowireCandidate) return false;
if (!ObjectUtils.nullSafeEquals(this.qualifiers, that.qualifiers)) return false;
if (this.primary != that.primary) return false;
if (this.nonPublicAccessAllowed != that.nonPublicAccessAllowed) return false;
if (this.lenientConstructorResolution != that.lenientConstructorResolution) return false;
if (!ObjectUtils.nullSafeEquals(this.constructorArgumentValues, that.constructorArgumentValues)) return false;
if (!ObjectUtils.nullSafeEquals(this.propertyValues, that.propertyValues)) return false;
if (!ObjectUtils.nullSafeEquals(this.methodOverrides, that.methodOverrides)) return false;
if (!ObjectUtils.nullSafeEquals(this.factoryBeanName, that.factoryBeanName)) return false;
if (!ObjectUtils.nullSafeEquals(this.factoryMethodName, that.factoryMethodName)) return false;
if (!ObjectUtils.nullSafeEquals(this.initMethodName, that.initMethodName)) return false;
if (this.enforceInitMethod != that.enforceInitMethod) return false;
if (!ObjectUtils.nullSafeEquals(this.destroyMethodName, that.destroyMethodName)) return false;
if (this.enforceDestroyMethod != that.enforceDestroyMethod) return false;
if (this.synthetic != that.synthetic) return false;
if (this.role != that.role) return false;
return super.equals(other);
}
@Override
public int hashCode() {
int hashCode = ObjectUtils.nullSafeHashCode(getBeanClassName());
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.scope);
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.constructorArgumentValues);
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.propertyValues);
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.factoryBeanName);
hashCode = 29 * hashCode + ObjectUtils.nullSafeHashCode(this.factoryMethodName);
hashCode = 29 * hashCode + super.hashCode();
return hashCode;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("class [");
sb.append(getBeanClassName()).append("]");
sb.append("; scope=").append(this.scope);
sb.append("; abstract=").append(this.abstractFlag);
sb.append("; lazyInit=").append(this.lazyInit);
sb.append("; autowireMode=").append(this.autowireMode);
sb.append("; dependencyCheck=").append(this.dependencyCheck);
sb.append("; autowireCandidate=").append(this.autowireCandidate);
sb.append("; primary=").append(this.primary);
sb.append("; factoryBeanName=").append(this.factoryBeanName);
sb.append("; factoryMethodName=").append(this.factoryMethodName);
sb.append("; initMethodName=").append(this.initMethodName);
sb.append("; destroyMethodName=").append(this.destroyMethodName);
if (this.resource != null) {
sb.append("; defined in ").append(this.resource.getDescription());
}
return sb.toString();
}
}
| [
"hsun@luopan88.com"
] | hsun@luopan88.com |
52e9f65f9188d19aceda1645e4a1efaf13f622f6 | bfbf29caa480a2bb52537a832433a8389b18da17 | /src/test/java/com/baomidou/test/generator/CodeGenerator.java | c026b71dbaa69c94409bae072c1b62c6440c92cb | [] | no_license | tonehao/haoGit | 8d9e0d7e53c620a2bb38e235406476d97be38db8 | f9d9aab92b56ff6edd00062efa67116b3111944e | refs/heads/master | 2021-12-14T19:49:56.779504 | 2021-11-29T10:12:28 | 2021-11-29T10:12:28 | 252,624,046 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,207 | java | package com.baomidou.test.generator;
import java.util.HashMap;
import java.util.Map;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import com.baomidou.mybatisplus.generator.config.TemplateConfig;
import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;
import com.baomidou.mybatisplus.generator.config.rules.DbColumnType;
import com.baomidou.mybatisplus.generator.config.rules.DbType;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
/**
* 根据模板自动生成controller、entity、server、xml
* @Auther
* @Create
*/
public class CodeGenerator {
/**
* <p>
* MySQL 生成演示
* </p>
*/
public static void main(String[] args) {
AutoGenerator mpg = new AutoGenerator();
// 选择 freemarker 引擎,默认 Veloctiy
// mpg.setTemplateEngine(new FreemarkerTemplateEngine());
//new File 为了获取项目路径
// File file = new File("mode");
// String path = file.getAbsolutePath();
// path = path.substring(0, path.lastIndexOf(File.separator));
String path=System.getProperty("user.dir");
// 全局配置
GlobalConfig gc = new GlobalConfig();
gc.setOutputDir(path+"/src/main/java");
gc.setFileOverride(true);
gc.setActiveRecord(true);// 不需要ActiveRecord特性的请改为false
gc.setEnableCache(false);// XML 二级缓存
gc.setBaseResultMap(true);// XML ResultMap
gc.setBaseColumnList(true);// XML columList
//gc.setKotlin(true);//是否生成 kotlin 代码
gc.setAuthor("hao.tone");
// 自定义文件命名,注意 %s 会自动填充表实体属性!
gc.setMapperName("%sMapper");
gc.setXmlName("%sMapper");
gc.setServiceName("%sService");
gc.setServiceImplName("%sServiceImpl");
gc.setControllerName("%sController");
mpg.setGlobalConfig(gc);
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setDbType(DbType.MYSQL);
dsc.setTypeConvert(new MySqlTypeConvert(){
// 自定义数据库表字段类型转换【可选】
@Override
public DbColumnType processTypeConvert(String fieldType) {
System.out.println("转换类型:" + fieldType);
// 注意!!processTypeConvert 存在默认类型转换,如果不是你要的效果请自定义返回、非如下直接返回。
return super.processTypeConvert(fieldType);
}
});
dsc.setDriverName("com.mysql.jdbc.Driver");
dsc.setUsername("root");
dsc.setPassword("root");
dsc.setUrl("jdbc:mysql://localhost:3306/test?characterEncoding=utf8");
mpg.setDataSource(dsc);
// 策略配置
StrategyConfig strategy = new StrategyConfig();
// strategy.setCapitalMode(true);// 全局大写命名 ORACLE 注意
//strategy.setTablePrefix(new String[] { "tlog_", "tsys_" });// 此处可以修改为您的表前缀
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
//strategy.setInclude(new String[] { "tcm_business_info" }); // 需要生成的表
strategy.setInclude(new String[] { "tom_order","tsm_staff" }); // 需要生成的表
// strategy.setExclude(new String[]{"test"}); // 排除生成的表
// 自定义实体父类
// strategy.setSuperEntityClass("com.baomidou.demo.TestEntity");
// 自定义实体,公共字段
// strategy.setSuperEntityColumns(new String[] { "test_id", "age" });
// 自定义 mapper 父类
// strategy.setSuperMapperClass("com.baomidou.demo.TestMapper");
// 自定义 service 父类
// strategy.setSuperServiceClass("com.baomidou.demo.TestService");
// 自定义 service 实现类父类
// strategy.setSuperServiceImplClass("com.baomidou.demo.TestServiceImpl");
// 自定义 controller 父类
// strategy.setSuperControllerClass("com.baomidou.demo.TestController");
// 【实体】是否生成字段常量(默认 false)
// public static final String ID = "test_id";
strategy.setEntityColumnConstant(true);
// 【实体】是否为构建者模型(默认 false)
// public User setName(String name) {this.name = name; return this;}
//strategy.setEntityBuilderModel(true);
mpg.setStrategy(strategy);
// 包配置
PackageConfig pc = new PackageConfig();
// pc.setParent("com.dcy");
// pc.setController("controller");
// pc.setEntity("model");
pc.setParent("com.baomidou");
pc.setController("controller");
pc.setEntity("entity");
pc.setMapper("mapper");
pc.setService("service");
pc.setServiceImpl("service.impl");
mpg.setPackageInfo(pc);
// 注入自定义配置,可以在 VM 中使用 cfg.abc 【可无】 ${cfg.abc}
InjectionConfig cfg = new InjectionConfig() {
@Override
public void initMap() {
Map<String, Object> map = new HashMap<String, Object>();
map.put("abc", this.getConfig().getGlobalConfig().getAuthor() + "-mp");
this.setMap(map);
}
};
/* // 自定义 xxListIndex.html 生成
List<FileOutConfig> focList = new ArrayList<FileOutConfig>();
focList.add(new FileOutConfig("/templatesMybatis/list.html.vm") {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输入文件名称
return "E://test//html//" + tableInfo.getEntityName() + "ListIndex.html";
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
// 自定义 xxAdd.html 生成
focList.add(new FileOutConfig("/templatesMybatis/add.html.vm") {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输入文件名称
return "E://test//html//" + tableInfo.getEntityName() + "Add.html";
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
// 自定义 xxUpdate.html生成
focList.add(new FileOutConfig("/templatesMybatis/update.html.vm") {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输入文件名称
return "E://test//html//" + tableInfo.getEntityName() + "Update.html";
}
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg); */
// 关闭默认 xml 生成,调整生成 至 根目录
/*TemplateConfig tc = new TemplateConfig();
tc.setXml(null);
mpg.setTemplate(tc);*/
// 自定义模板配置,可以 copy 源码 mybatis-plus/src/main/resources/templates 下面内容修改,
// 放置自己项目的 src/main/resources/templates 目录下, 默认名称一下可以不配置,也可以自定义模板名称
TemplateConfig tc = new TemplateConfig();
tc.setController("/template/controller.java.vm");
tc.setService("/template/service.java.vm");
tc.setServiceImpl("/template/serviceImpl.java.vm");
tc.setEntity("/template/entity.java.vm");
tc.setMapper("/template/mapper.java.vm");
tc.setXml("/template/mapper.xml.vm");
// 如上任何一个模块如果设置 空 OR Null 将不生成该模块。
mpg.setTemplate(tc);
// 执行生成
mpg.execute();
// 打印注入设置【可无】
//System.err.println(mpg.getCfg().getMap().get("abc"));
}
}
| [
"tonghao@sunline.cn"
] | tonghao@sunline.cn |
e453a45afc9198f58af838e475251b6b7126ba6c | 7347094b7a574abcc06a8eb207fcff2bf0b2ba0e | /hive-code/hive-core/src/edu/unc/ils/mrc/hive/api/impl/elmo/SKOSConceptImpl.java | 3687a1d5b6de0ecc19e49d8aacad4d1c4ebec423 | [] | no_license | DICE-UNC/irods-hive | 776feea03d9e8e1c605e93b0bd2bc7789a9dbc62 | f9548931656eec930fe3b17ec37dbe912b8d0e9e | refs/heads/master | 2016-09-05T21:42:43.160413 | 2015-05-01T14:57:50 | 2015-05-01T14:57:50 | 17,442,815 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,310 | java | /**
* Copyright (c) 2010, UNC-Chapel Hill and Nescent
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and
* the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the UNC-Chapel Hill or Nescent nor the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@author Jose R. Perez-Aguera
*/
package edu.unc.ils.mrc.hive.api.impl.elmo;
import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;
import javax.xml.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.unc.ils.mrc.hive.api.SKOSConcept;
public class SKOSConceptImpl implements SKOSConcept {
private static final Log logger = LogFactory.getLog(SKOSConceptImpl.class);
private QName qname;
private String prefLabel;
private TreeMap<String, QName> broaders;
private TreeMap<String, QName> relateds;
private TreeMap<String, QName> narrowers;
private List<String> altLabels;
private List<String> scopeNotes;
private List<String> schemes;
private double score;
private boolean isLeaf = false;
private String tree = "";
public SKOSConceptImpl(final QName uri) {
qname = uri;
broaders = new TreeMap<String, QName>();
narrowers = new TreeMap<String, QName>();
relateds = new TreeMap<String, QName>();
altLabels = new ArrayList<String>();
schemes = new ArrayList<String>();
scopeNotes = new ArrayList<String>();
}
@Override
public int getNumberOfChildren() {
return narrowers.size();
}
@Override
public List<String> getAltLabels() {
return altLabels;
}
@Override
public TreeMap<String, QName> getBroaders() {
return broaders;
}
@Override
public TreeMap<String, QName> getNarrowers() {
return narrowers;
}
@Override
public String getPrefLabel() {
return prefLabel;
}
@Override
public void setPrefLabel(final String prefLabel) {
this.prefLabel = prefLabel;
}
@Override
public TreeMap<String, QName> getRelated() {
return relateds;
}
@Override
public List<String> getSchemes() {
return schemes;
}
@Override
public List<String> getScopeNote() {
return scopeNotes;
}
@Override
public QName getQName() {
return qname;
}
@Override
public void addAltLabel(final String altLabel) {
altLabels.add(altLabel);
}
@Override
public void addBroader(final String broader, final QName uri) {
broaders.put(broader, uri);
}
@Override
public void addNarrower(final String narrower, final QName uri) {
narrowers.put(narrower, uri);
}
@Override
public void addRelated(final String related, final QName uri) {
relateds.put(related, uri);
}
@Override
public void addScheme(final String scheme) {
schemes.add(scheme);
}
@Override
public void addScopeNote(final String scopeNote) {
scopeNotes.add(scopeNote);
}
@Override
public String getSKOSFormat() {
logger.trace("getSKOSFormat");
StringBuffer skos = new StringBuffer();
skos.append("<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" "
+ "xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\">" + "\n");
skos.append(" <rdf:Description rdf:about=\"");
skos.append(getQName().getNamespaceURI());
skos.append(getQName().getLocalPart());
skos.append("\">\n");
skos.append(" <rdf:type rdf:resource=\"http://www.w3.org/2004/02/skos/core#Concept\"/>\n");
skos.append(" <skos:prefLabel>");
skos.append(prefLabel);
skos.append("</skos:prefLabel>\n");
for (String alt : altLabels) {
skos.append(" <skos:altLabel>");
skos.append(alt);
skos.append("</skos:altLabel>\n");
}
for (String broader : broaders.keySet()) {
skos.append(" <skos:broader rdf:resource=\"");
skos.append(broaders.get(broader).getNamespaceURI());
skos.append(broaders.get(broader).getLocalPart());
skos.append("\"/>\n");
}
for (String narrower : narrowers.keySet()) {
skos.append(" <skos:narrower rdf:resource=\"");
skos.append(narrowers.get(narrower).getNamespaceURI());
skos.append(narrowers.get(narrower).getLocalPart());
skos.append("\"/>\n");
}
for (String related : relateds.keySet()) {
skos.append(" <skos:related rdf:resource=\"");
skos.append(relateds.get(related).getNamespaceURI());
skos.append(relateds.get(related).getLocalPart());
skos.append("\"/>\n");
}
skos.append(" <skos:inScheme rdf:resource=\"");
skos.append(getQName().getNamespaceURI());
skos.append("\"/>\n");
for (String scopeNote : scopeNotes) {
skos.append(" <skos:scopeNote>");
skos.append(scopeNote);
skos.append("</skos:scopeNote>\n");
}
skos.append(" </rdf:Description>\n");
skos.append("</rdf:RDF>");
return skos.toString();
}
@Override
public void setScore(final double score) {
this.score = score;
}
@Override
public double getScore() {
return score;
}
@Override
public boolean isLeaf() {
return isLeaf;
}
public void setIsLeaf(final boolean isLeaf) {
this.isLeaf = isLeaf;
}
@Override
public String getTree() {
return tree;
}
@Override
public void setTree(final String tree) {
this.tree = tree;
}
}
| [
"michael.c.conway@gmail.com"
] | michael.c.conway@gmail.com |
17ab504b17077698c80d736aa0cd0cb890fb74e7 | f864a98838074cfb96e045b3870075df673b381c | /src/animalhouse/Pig.java | 1c00271fae5b3465903c31725fc79f7c4be6f431 | [] | no_license | Runeslayer10/AnimalHouse | 44f77636fe2ea60131f5ea714c5a03dcf8dc21ee | b207e0b99833e36707f9f0bb54f6bb3e94815298 | refs/heads/master | 2020-04-09T14:53:59.630069 | 2018-12-04T19:48:33 | 2018-12-04T19:48:33 | 160,410,595 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 460 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package animalhouse;
/**
*
* @author blhad3491
*/
public class Pig extends Mammal {
public Pig() {
//Call Mammal constructor
super();
}
//override the Mammal speak method
public void speak() {
System.out.println("Oink!");
}
} | [
"blhad3491@7KXL6Y1.Student.UGDSB.ED"
] | blhad3491@7KXL6Y1.Student.UGDSB.ED |
2a84ab9f0fd6cd5be9bc6164bb2545d150c6e668 | 446613963cda46298ef119c954184d962499aca1 | /Obiekty z Klasą - Rozdział 15 - Interfejsy/src/zadanie_132/AudioBook.java | 6c078bf00de147462a22183e55d0659de9220e6f | [] | no_license | lDante93/Learning-Java | 3ab2444b336d26f99002e987edcf120f90ed06af | 5bd1a9d70a762d0cc3eef15ad0162f32fd13001f | refs/heads/master | 2020-07-03T18:46:00.222480 | 2016-11-19T22:46:36 | 2016-11-19T22:46:36 | 74,239,772 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,318 | java | package zadanie_132;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class AudioBook implements Czasochlonne, Wielojezyczne
{
private String tytul, autor;
public int godziny,minuty,sekundy;
private Calendar czas;
private int jezyk=Wielojezyczne.PL;
public void ustawJezyk(int jak)
{
this.jezyk=jak;
}
public String zwrocPrzetlumaczony(int jak)
{
return "zmiana";
}
public String zwrocPrzetlumaczony()
{
return zwrocPrzetlumaczony(jezyk);
}
public AudioBook(String tytul, String autor, int godziny, int minuty, int sekundy)
{
this.tytul = tytul;
this.autor = autor;
this.godziny = godziny;
this.minuty = minuty;
this.sekundy = sekundy;
}
public String zwrocInfoJakoString()
{
return "----------------------------"
+"\ntytul: "+tytul
+"\nautor: "+autor
+"\nczas: "+godziny+":"+minuty+":"+sekundy+"(hh:mm:ss)"
+"\n----------------------------\n";
}
public Calendar podajCzas()
{
czas = new GregorianCalendar(0,0,0,godziny,minuty,sekundy);
return czas;
}
public Calendar podajCzasWSekundach()
{
czas = new GregorianCalendar(0,0,0,0,0,sekundy);
return czas;
}
public Calendar podajCzasWMinutach()
{
czas = new GregorianCalendar(0,0,0,0,minuty,0);
return czas;
}
public Calendar podajCzasWGodzinach()
{
czas = new GregorianCalendar(0,0,0,0,0,0);
return czas;
}
}
| [
"niletuv@gmail.com"
] | niletuv@gmail.com |
fbf2b9b8eb606c392d440f9f11a325c9693e09c8 | 2a60bef49c147e2e19681b91c036687c5223df75 | /src/com/bissonthomas/gamefarm/controler/states/State.java | bef6c8d2247c89365325a110320ea5ad5b135701 | [] | no_license | ThomasBisson/GameFarm2.0 | b41a09745f3140d6e3d9ed95fbe14d4ccc0dfb5f | 12569b97fb10959f83f03649fdf54aa76c584054 | refs/heads/master | 2021-05-09T23:00:41.977490 | 2018-02-07T23:08:23 | 2018-02-07T23:08:23 | 118,769,580 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 532 | java | package com.bissonthomas.gamefarm.controler.states;
import com.bissonthomas.gamefarm.controler.StateManager;
import com.bissonthomas.gamefarm.model.DBMongoConnection;
import javax.swing.*;
import java.awt.*;
public abstract class State {
protected StateManager sm;
protected JPanel panel;
protected DBMongoConnection dbmc;
public State(StateManager sm, DBMongoConnection dbmc) {
this.sm = sm;
this.dbmc = dbmc;
}
public abstract void init();
public abstract Component getPanel();
}
| [
"bisson.th@gmail.com"
] | bisson.th@gmail.com |
bb791a836cd7376d301253964527a33a150a1922 | e6856ce771a300f9192dd2ba601309e3aab0e313 | /src/main/java/com/gears42/surelock/pages/BasePage.java | 465f545cf0faaca58996f835e9bf5cdc88a6c6c9 | [] | no_license | bvmgkarthik4u/Appium-Automation | 30a00a9c0ed03f9111caa3e183fc5c1cfe342557 | 7280d4ec8faa3d7c57237f5aeb1b7683642e7b6c | refs/heads/master | 2023-03-09T07:43:57.742133 | 2021-02-28T17:06:02 | 2021-02-28T17:06:02 | 343,100,353 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,749 | java | package com.gears42.surelock.pages;
import com.gears42.surelock.properties.TestProperties;
import com.gears42.surelock.util.WebDriverCommonLib;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileBy;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.PageFactory;
import org.testng.Reporter;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
public abstract class BasePage extends WebDriverCommonLib {
public AppiumDriver<WebElement> driver;
public BasePage(AppiumDriver<WebElement> driver) {
PageFactory.initElements(driver, this);
this.driver = driver;
driver.manage().timeouts().implicitlyWait(TestProperties.INSTANCE.IMP_WAIT, TimeUnit.SECONDS);
}
public static void sleep(int a) throws InterruptedException {
a = a * 1000;
Thread.sleep(a);
}
public void scrollTo(String string) {
driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textMatches(\"" + string + "\").instance(0))")).isDisplayed();
Reporter.log("Scrolling till : " + string, true);
}
public void goBack() throws InterruptedException, IOException {
sleep(1);
Runtime.getRuntime().exec("adb " + " shell input keyevent 4");
sleep(1);
Reporter.log("Tapped on Back Button", true);
}
public void launchSureLock() throws IOException, InterruptedException {
Runtime.getRuntime().exec("adb " + " shell am start -a android.intent.action.MAIN -n " + TestProperties.INSTANCE.PACKAGE_ID + "/.ClearDefaultsActivity");
sleep(4);
Reporter.log("Launched SureLock", true);
}
} | [
"bvmg.karthik@42gears.com"
] | bvmg.karthik@42gears.com |
34ea738bcbd2310b5bfe95805eec725d969da9fe | c5fb50b8bd93f75472aaf76ca7d0cad3e0aa5f74 | /src/controller/WebCamController.java | d36b77c3121d2f7337b1c4a0047e0aaa74f587c0 | [] | no_license | MalindaIroshana/Faces-Recognizer | 5cc2598567bed5a5ec1dfd2b45fa787b0bde8b37 | dfceada00a7e68a9ccd9301880a2fbe43504174a | refs/heads/master | 2020-06-30T02:06:19.479270 | 2014-06-30T22:18:31 | 2014-06-30T22:18:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,522 | java | /*
* Todos os direitos reservados ao autor pedro_ha@yahoo.com.br
* Este programa deve ser distribuido junto à sua licença
*
* Aviso:
* Este programa de computador é protegido por leis de direitos autorais.
* Qualquer reprodução, distribuição ou modificação não autorizada deste
* programa de computador, em sua totalidade ou parcial, resultará em
* severas punições civis e criminais, e os infratores serão punidos sob a
* máxima extensão possível dentro da lei.
* Este programa de computador é distribuído sem nenhuma garantia
* implícita ou explicita, em nenhum caso o licenciante será responsável
* por quaisquer danos diretos, indiretos, incidental, incluindo, mas não
* limitado, a perda de uso, dados, lucros ou interrupções de negócios.
*/
package controller;
import com.googlecode.javacv.FrameGrabber;
import com.googlecode.javacv.OpenCVFrameGrabber;
import com.googlecode.javacv.cpp.opencv_core.*;
import java.awt.image.BufferedImage;
/**
* @since 02/06/2013, 21:53:53
* @author pedro_ha@yahoo.com.br
*/
public class WebCamController {
private static final WebCamController INSTANCE = new WebCamController(1);
public static WebCamController getDefaultInstance(){
return INSTANCE;
}
public WebCamController() {
initializeGrabber();
}
public WebCamController(int webcam) {
this.webcamDevice = webcam;
initializeGrabber();
}
private void initializeGrabber(){
grabber = new OpenCVFrameGrabber(webcamDevice);
}
public void initWebCam(Runnable runnable){
callback = runnable;
continuePlaying = true;
thread = new Thread(normalCapture);
thread.start();
}
public void stopWebCam(){
continuePlaying = false;
if(thread != null && !thread.isInterrupted()){
thread.interrupt();
}
}
public void shutDownWebCam(){
continuePlaying = false;
if(thread != null && thread.isAlive()){
thread.interrupt();
}
try {
grabber.release();
} catch (Exception ex) {
ex.printStackTrace();
}
}
// <editor-fold defaultstate="collapsed" desc="Getter e Setters - running, webcamDevice, selectedImage">
public boolean isRunning(){
return continuePlaying;
}
public Integer getWebcamDevice() {
return webcamDevice;
}
public void setWebcamDevice(Integer webcamDevice) {
this.webcamDevice = webcamDevice;
initializeGrabber();
}
public Object getSelectedImage() {
return selectedImage;
}
public BufferedImage getBufferedImage() {
return selectedImage.getBufferedImage();
}
//</editor-fold>
private final Runnable normalCapture = new Runnable() {
@Override
public void run() {
try {
grabber.start();
while (continuePlaying) {
selectedImage = grabber.grab();
callback.run();
}
grabber.stop();
} catch (Exception e) {
e.printStackTrace();
}
}
};
private FrameGrabber grabber;
private boolean continuePlaying = false;
private IplImage selectedImage;
private Runnable callback;
private Integer webcamDevice = 0;
private Thread thread;
} | [
"pedro@pedroassis.com.br"
] | pedro@pedroassis.com.br |
7974568abfbcd3feb009cc1e0eb4b392242d4b8a | 3c665400f7a3adb749665cdbcefa821fbce775f4 | /chapter_003/src/test/java/ru/job4j/bank/UserTest.java | f8109502feea1a8c4a7501533aa74c09df4e9c46 | [
"Apache-2.0"
] | permissive | MaximShavva/job4j | 27afb855be23d9716264cecb4c1d14f7d7495f5a | 8c943829d1b8b19a86a5ef9adb21722008f9df4a | refs/heads/master | 2020-04-28T21:45:24.026538 | 2019-04-29T21:28:06 | 2019-04-29T21:28:06 | 175,593,662 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | package ru.job4j.bank;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
/**
* Класс для тестирования класса User.
*
* @author Шавва Максим.
* @version 1.
* @since 17.04.2019г.
*/
public class UserTest {
/**
* Метод Hashcode.
*/
@Test
public void whenHashCodeThen() {
User vasya = new User("Vasily", "147918");
User misha = new User("Michail", "997613");
User eugen = new User("Michail", "997613");
assertThat(eugen.hashCode() == misha.hashCode(), is(true));
assertThat(eugen.hashCode() == vasya.hashCode(), is(false));
}
/**
* Метод Equals.
*/
@Test
public void whenEqualsThen() {
User vasya = new User("Vasily", "147918");
User misha = new User("Michail", "997613");
User eugen = new User("Michail", "997613");
assertThat(eugen.equals(misha), is(true));
assertThat(eugen.equals(vasya), is(false));
}
} | [
"saloedos@yandex.ru"
] | saloedos@yandex.ru |
ff7db1ac05dad517b80997ee9770fd926a37e0b6 | 2bb5081dc0cc6d6d7b955600eb64c8d428d257dd | /sta3/shop/src/main/java/com/bjpowernode/shop/utils/ApplicationContext.java | 8873b840c110feff9e7028e1a8331d2dcdce5f7a | [] | no_license | 98feng/RBAC | a102bbb3f4ab5f9f7c7d41f4e611e169a5f8ade2 | a02d6551b5f541bca5d45115419c5229f08b4ed3 | refs/heads/master | 2023-04-02T16:56:17.395194 | 2021-04-19T10:43:50 | 2021-04-19T10:43:50 | 359,396,867 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,423 | java | package com.bjpowernode.shop.utils;
import com.bjpowernode.shop.annotation.AutoWrite;
import com.bjpowernode.shop.annotation.Bean;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
/**
* @author feng
* @date 2021/1/8
* @Description
*/
public class ApplicationContext<T> {
private HashMap<Class, Object> beanFactory = new HashMap<>();
private String filePath;
//获取容器的bean
public T getBean(Class clazz) {
return (T) beanFactory.get(clazz);
}
//初始化容器
public void initContext() {
InputStream resource = ApplicationContext.class.getClassLoader()
.getResourceAsStream("config/bean.config");
Properties properties = new Properties();
try {
properties.load(resource);
Set<Object> keys = properties.keySet();
for (Object key : keys) {
beanFactory.put(Class.forName(key.toString()),
Class.forName(properties.getProperty(key.toString())).newInstance());
}
} catch (Exception e) {
e.printStackTrace();
}
}
//加载全部的类的实例
public void initContextByAnnotation() {
filePath = ApplicationContext.class.getClassLoader().getResource("").getFile();
loadOne(new File(filePath));
assembleObject();
}
//是不是给所有的字符赋值
private void assembleObject() {
for (Map.Entry<Class, Object> entry : beanFactory.entrySet()) {
//就是咱们放在容器的对象
Object obj = entry.getValue();
Class<?> aClass = obj.getClass();
Field[] declaredFields = aClass.getDeclaredFields();
for (Field field : declaredFields) {
AutoWrite annotation = field.getAnnotation(AutoWrite.class);
if (annotation != null) {
field.setAccessible(true);
try {
System.out.println("正在给【" + obj.getClass().getName() + "】属性【" + field.getName() + "】注入值【" + beanFactory.get(field.getType()).getClass().getName() + "】");
field.set(obj, beanFactory.get(field.getType()));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
}
/**
* 加载一个文件夹的类
*
* @param fileParent
*/
private void loadOne(File fileParent) {
if (fileParent.isDirectory()) {
File[] childrenFiles = fileParent.listFiles();
if (childrenFiles == null || childrenFiles.length == 0) {
return;
}
for (File child : childrenFiles) {
if (child.isDirectory()) {
//如果是个文件夹就继续调用该方法,使用了递归
loadOne(child);
} else {
//通过文件路径转变成全类名,第一步把绝对路径部分去掉
// D:\mytools
// com\xinzhi\dao\UserDao.class
String pathWithClass = child.getAbsolutePath().substring(filePath.length() - 1);
//选中class文件
if (pathWithClass.contains(".class")) {
// com.xinzhi.dao.UserDao
//去掉.class后缀,并且把 \ 替换成 .
String fullName = pathWithClass.replaceAll("\\\\", ".").replace(".class", "");
try {
Class<?> aClass = Class.forName(fullName);
//把非接口的类实例化放在map中
if (!aClass.isInterface()) {
Bean annotation = aClass.getAnnotation(Bean.class);
if (annotation != null) {
Object instance = aClass.newInstance();
//判断一下有没有接口
if (aClass.getInterfaces().length > 0) {
//如果有接口把接口的class当成key,实例对象当成value
System.out.println("正在加载【" + aClass.getInterfaces()[0] + "】,实例对象是:" + instance.getClass().getName());
beanFactory.put(aClass.getInterfaces()[0], instance);
} else {
//如果有接口把自己的class当成key,实例对象当成value
System.out.println("正在加载【" + aClass.getName() + "】,实例对象是:" + instance.getClass().getName());
beanFactory.put(aClass, instance);
}
}
}
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
e.printStackTrace();
}
}
}
}
}
}
}
| [
"canlong012"
] | canlong012 |
0faf3eba857227d007e79cae9886c6b38a73530b | b7cd41a37ea667a90e6f769d3a805cb0e3ab8ebe | /Lesson7/Sample1.java | c5404a5b6c5d41e5f0d3da37739c8d62a53b9f7b | [] | no_license | yuri9129/yasashii_java | ceeebc3965de345e779dd92c5a3a5a11008be7c0 | f3d88262400589a0595350ab1aa031ee5012e851 | refs/heads/master | 2021-01-21T17:53:13.085060 | 2017-05-25T08:29:45 | 2017-05-25T08:29:45 | 91,997,360 | 0 | 0 | null | null | null | null | SHIFT_JIS | Java | false | false | 357 | java | class Sample1
{
public static void main(String[] args)
{
//配列の宣言方法その1
int[] test;
test = new int[5];
test[0] = 80;
test[1] = 60;
test[2] = 22;
test[3] = 50;
test[4] = 75;
for(int i = 0; i<5; i++){
System.out.println((i+1) + "番目の人の点数は" + test[i] + "です。");
}
}
}
| [
"hiroki-hayashi-2@alpsgiken.co.jp"
] | hiroki-hayashi-2@alpsgiken.co.jp |
18fb66bcbf715502e4e42397d2a4e9a4c766f988 | 029010881febc6c5b7e2f0dee144f20559e6bd38 | /Notes/Java SE/Collection/src/set/TreeSetDemo.java | e0c6f8eb5644f246767571dcc997c6f800ed5f41 | [] | no_license | chuishengzhang/zcs | 127d48751447d31f7e2602c0e7eeb3d84f6f459d | 332d724c9c3e7c2518b169e1e7ed64419e542d61 | refs/heads/master | 2020-03-08T15:05:03.088784 | 2018-05-04T10:45:58 | 2018-05-04T10:45:58 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,453 | java | package set;
import java.util.Iterator;
import java.util.TreeSet;
/* Collection
* |--set
* |--HashSet
*
* |--TreeSet 可以对集合中的元素进行排序
* 要将自定义对象存入集合,改自定义对象必须具备比较性
* (该对象所属类实现Comparable接口)
*
*
*
* 第一种方法:使元素本身具备比较性
*
* */
class Person1 implements Comparable<Person1>{//实现Comparable接口使Person具有比较性
private String name;
private int age;
Person1(String name,int age){
this.name=name;
this.age=age;
}
public String getName(){
return name;
}
public int getAge(){
return age;
}
//实现接口中的方法(自定义按年龄顺序排序,年龄相同比较名字)
public int compareTo(Person1 p){
if(this.age>p.age){
return 1;
}if(this.age==p.age){
return this.name.compareTo(p.name);
}
return -1;
}
//重写toString方法
public String toString(){
return this.getName()+this.getAge();
}
}
public class TreeSetDemo {
public static void main(String[] args) {
TreeSet<Person1> ts=new TreeSet<Person1>();
ts.add(new Person1("zhangsan",18));
ts.add(new Person1("lisi",19));
ts.add(new Person1("wangwu",20));
ts.add(new Person1("zhangsan",18));//姓名年龄一样,添加失败
//取出元素
for(Iterator<Person1> it=ts.iterator();it.hasNext();){
System.out.println(it.next());
}
}
}
| [
"you@example.com"
] | you@example.com |
21e47cababd4a075e3375bf5117911e16e713b15 | d355f3e08103d8782c0edb580b33a03573ac0a51 | /jomplc/trunk/src/main/org/pereni/ctrl/DataImp.java | 70126bab1b47288549397e5fadf50b334566e4b7 | [] | no_license | gaoyan0571/jomplc | 0d79016787fc2b4739dc2b38ea85eea766dc0ad5 | 4e0fdafcd7382846bc2be2fd0b29280b88f3a107 | refs/heads/master | 2021-01-01T17:00:07.570421 | 2006-09-19T16:48:58 | 2006-09-19T16:48:58 | 37,973,023 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,896 | java | /*
* $Id: DataImp.java,v 1.6 2005/10/24 13:53:51 remus Exp $
*
* Copyright [2005] [Remus Pereni http://remus.pereni.org]
*
* 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.pereni.ctrl;
/**
* @author <a href="http://remus.pereni.org>Remus Pereni</a>
*
*/
public class DataImp implements Data {
protected int[] store;
protected int length = 0;
/**
*
*/
public DataImp() {
}
public DataImp(int[] data) {
set(data);
}
public DataImp(String data) {
set(data);
}
/**
*
*/
public DataImp(int size) {
createStore(size);
}
public void set(String value) {
if( value == null ) return;
length = value.length();
createStore(length);
for( int cnt = 0; cnt < value.length(); cnt++) {
store[cnt] = (char)value.charAt(cnt);
}
}
public void set(int[] value) {
if( value == null ) return;
store = value;
length = value.length;
}
public void set(int value) {
createStore(1);
store[0] = value;
}
/* (non-Javadoc)
* @see org.pereni.ctrl.Data#getLength()
*/
public int getLength() {
return length;
}
/* (non-Javadoc)
* @see org.pereni.ctrl.Data#toIntArray()
*/
public int[] toIntArray() {
if( length == 0 ) return null;
if( store != null && length == store.length ) return store;
int[] result = new int[length];
System.arraycopy(store, 0, result, 0, length);
return result;
}
protected void createStore(int size) {
store = new int[size];
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
String result = "";
int[] messageBody = toIntArray();
for( int idx = 0 ; idx < length; idx++) {
if( Character.isLetter(messageBody[idx])) {
result += (char) messageBody[idx];
} else {
result += (char) messageBody[idx];
}
}
return result;
}
}
| [
"Remus@67df4f6e-bcb8-faca-fd4a-303898a44b1e"
] | Remus@67df4f6e-bcb8-faca-fd4a-303898a44b1e |
fba3c2509c17a3bec3d2a5b55ff307e384a2ef8a | f89e35eb3e34fa42abd601c1ef361086eeb203c9 | /gamesdk_utils/src/main/java/com/creative/gamesdk/common/utils_base/config/ErrCode.java | b69fa26d70b692ac061a747bee2452668481de59 | [] | no_license | chengdongba/GameSDKFrame | 624752eb755459a764448658463b97b4c2dcf9e0 | 5aab2740b758751777ae261bef79be1300e69d70 | refs/heads/master | 2020-04-24T03:41:28.030753 | 2019-03-06T09:27:31 | 2019-03-06T09:27:31 | 171,678,226 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,024 | java | package com.creative.gamesdk.common.utils_base.config;
/**
* Created by Administrator on 2019/2/18.
* 全局错误码类
*/
public class ErrCode {
//--------------------- 公共(1000~1200) -------------------------
public static final int SUCCESS = 1000; //成功
public static final int FAILURE = 1001; //失败
public static final int CANCEL = 1002; //取消
public static final int UNKONW = 1003; //未知错误
public static final int PARAMS_ERROR = 1004; //参数错误
public static final int NO_LOGIN = 1005; //没有登录
public static final int NO_PAY_RESULT = 1006; //渠道没有正确返回支付结果
public static final int NO_EXIT_DIALOG = 1007; //渠道没有退出框
public static final int CHANNEL_LOGIN_CLOSE = 1008; //后台关闭当前渠道登录
public static final int CHANNEL_PAY_CLOSE = 1009; //后台关闭当前渠道支付
//---------------------网络(1200 ~ 1500 )-------------------------
public static final int NET_DISCONNET = 1201; //无网络连接
public static final int NET_ERROR = 1202; //访问网络异常
public static final int NET_TIME_OUT = 1203; //超时
public static final int NET_DATA_NULL = 1204; ////网络请求成功,但是数据为空
public static final int NET_DATA_ERROR = 1205; ////网络请求成功,但是数据类型错误。
public static final int NET_DATA_EXCEPTION = 1206; //网络请求成功,但是数据解析异常。
//--------------------- 针对渠道的错误码 -------------------------
public static final int CHANNEL_LOGIN_FAIL = 1501; //登录失败
public static final int CHANNEL_LOGIN_CANCEL = 1502; //登录取消
public static final int CHANNEL_SWITCH_ACCOUNT_FAIL = 1503; //切换账号失败
public static final int CHANNEL_SWITCH_ACCOUNT_CANCEL = 1504; //切换账号取消
public static final int CHANNEL_LOGOUT_FAIL = 1505; //注销失败
public static final int CHANNEL_LOGOUT_CANCEL = 1506; //注销取消
}
| [
"chendongqi@9377.com"
] | chendongqi@9377.com |
ad70647757523324809d66c0a97430f927212d03 | 6cbb46d3aa306b7e46ca47b81cac6401e12e8209 | /src/main/java/com/n26/controller/TransactionController.java | af46c980db3aea0bb232ba0407ae474007d63a5e | [] | no_license | dogukanduman/Transaction-Statistics | fc8921d2739338c4f60962681312883339550136 | de69f683527a646476d9126c3a803448e4c9260f | refs/heads/master | 2021-06-25T23:11:01.199661 | 2019-11-21T21:25:17 | 2019-11-21T21:25:17 | 150,414,264 | 0 | 0 | null | 2020-10-13T07:02:48 | 2018-09-26T11:14:14 | Java | UTF-8 | Java | false | false | 1,777 | java | package com.n26.controller;
import com.n26.dto.TransactionDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import com.n26.service.TransactionService;
import javax.validation.Valid;
/**
* Transaction Rest controller.
*
* @author ttdduman
*/
@RestController("TransactionController")
@RequestMapping("/transactions")
public class TransactionController {
private static final Logger logger = LoggerFactory.getLogger(TransactionController.class);
@Autowired
TransactionService transactionService;
/**
* Saves transaction
* @param transactionDto
* @return HttpStatus.CREATED in header
*/
@RequestMapping( method = RequestMethod.POST)
public ResponseEntity<Void> createTransaction(@Valid @RequestBody TransactionDto transactionDto) {
logger.debug("createTransaction is called with data:{}",transactionDto);
transactionService.save(transactionDto);
HttpHeaders responseHeaders = new HttpHeaders();
return new ResponseEntity<>(null, responseHeaders, HttpStatus.CREATED);
}
/**
* Deletes all transactions.
* @return HttpStatus.NO_CONTENT in header
*/
@RequestMapping( method = RequestMethod.DELETE)
public ResponseEntity<Void> deleteAllTransactions() {
logger.debug("deleteAllTransactions is called");
transactionService.deleteAll();
HttpHeaders responseHeaders = new HttpHeaders();
return new ResponseEntity<>(null, responseHeaders, HttpStatus.NO_CONTENT);
}
}
| [
"dogukan.duman@turkcell.com.tr"
] | dogukan.duman@turkcell.com.tr |
8edadd9b9aae91ae7b3c4a27fcfa4e436b042494 | 44e5d21d39e2fe55dd40dbbcd016d33bc33d3036 | /common/src/main/java/com/group_six/tools/JDBCTools.java | 5d91629e213e1c16253be50558e9d9f83db4262a | [] | no_license | SzSsZd/yyjh-datasource | 3aa043df440bfc1be34b5c78835eb5d504cb0e4f | 36e5eee53cb43cd5429228b24120427f3f5a0505 | refs/heads/master | 2022-11-22T17:56:06.971761 | 2019-10-15T01:04:31 | 2019-10-15T01:04:31 | 207,505,036 | 0 | 0 | null | 2022-10-19T01:20:21 | 2019-09-10T08:28:26 | CSS | UTF-8 | Java | false | false | 12,390 | java | package com.group_six.tools;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.io.IOException;
import java.sql.*;
import java.util.*;
public class JDBCTools {
private static String url = "yyjh_datasource";
private static String username = "root";
private static String password = "545825";
private static Connection conn = null;
/**
* 建表方法
* 没有字段类型,默认全是varchar,
* */
public static boolean createTable(String tableName, List<String> keys, ArrayNode datas,String primary_key) throws SQLException {
conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/"+url+"?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true",username,password);
int count = -1;
if (conn != null){
//拼接建表语句
String tableSql = "create table t_" + tableName + " (";
for (String key : keys){
tableSql += key + " varchar(50),";
}
tableSql += "PRIMARY KEY (" + primary_key + "));\n";
//拼接insert语句
tableSql += "insert into t_"+ tableName + " (";
for (String key: keys){
tableSql += key + ",";
}
tableSql = tableSql.substring(0,tableSql.length()-1);
tableSql += ") values(";
for (int i = 0; i < datas.size(); i++){
JsonNode jn = datas.get(i);
for (int j = 0; j < keys.size(); j++) {
try {
String value = jn.get(keys.get(j)).asText();
tableSql += "'" + jn.get(keys.get(j)).asText() + "',";
}catch (NullPointerException e){
tableSql += "null,";
}
}
tableSql = tableSql.substring(0, tableSql.length() - 1);
tableSql += "),(";
}
tableSql = tableSql.substring(0,tableSql.length()-2);
tableSql += ";";
Statement smt = conn.createStatement();
count = smt.executeUpdate(tableSql);
}
if (count==0){
conn.close();
return true;
}else{
conn.close();
return false;
}
}
/**
* 建表方法
* 没有字段类型,默认全是varchar,
* */
public static boolean createTable(String tableName, List<String> keys, ArrayNode datas) throws SQLException {
conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/"+url+"?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true",username,password);
int count = -1;
if (conn != null){
//拼接建表语句
String tableSql = "create table t_" + tableName + " (id int(10) auto_increment primary key,";
for (String key : keys){
tableSql += key + " varchar(50),";
}
tableSql = tableSql.substring(0,tableSql.length()-1);
tableSql += ");\n";
//拼接insert语句
tableSql += "insert into t_"+ tableName + " (";
for (String key: keys){
tableSql += key + ",";
}
tableSql = tableSql.substring(0,tableSql.length()-1);
tableSql += ") values(";
for (int i = 0; i < datas.size(); i++){
JsonNode jn = datas.get(i);
for (int j = 0; j < keys.size(); j++) {
try {
String value = jn.get(keys.get(j)).asText();
tableSql += "'" + jn.get(keys.get(j)).asText() + "',";
}catch (NullPointerException e){
tableSql += "null,";
}
}
tableSql = tableSql.substring(0, tableSql.length() - 1);
tableSql += "),(";
}
tableSql = tableSql.substring(0,tableSql.length()-2);
tableSql += ";";
Statement smt = conn.createStatement();
System.out.println(tableSql);
count = smt.executeUpdate(tableSql);
}
if (count==0){
conn.close();
return true;
}else{
conn.close();
return false;
}
}
/**
* 获取某数据库的所有表名的方法
* */
public static List<String> getTables(String url,String username,String password) throws SQLException {
conn = DriverManager.getConnection(url,username,password);
List<String> result = new ArrayList<String>();
DatabaseMetaData dmd = conn.getMetaData();
ResultSet rs = dmd.getTables(null, "%","%",new String[]{"TABLE"});
while (rs.next()) {
result.add(rs.getString("TABLE_NAME"));
}
return result;
}
/**
* 复制一个库的某些表复制入本地库
* */
public static boolean copyTables(ObjectNode db_conf,List<String> tables) throws SQLException, IOException {
String fromurl = db_conf.get("url").asText();
String fromusername = db_conf.get("username").asText();
String frompassword = db_conf.get("password").asText();
conn = DriverManager.getConnection(fromurl,fromusername,frompassword);
ObjectMapper om = new ObjectMapper();
List<Map<String,Object>> tablesdatas = new ArrayList<>();
if (conn != null){//取出要存入的表的数据
DatabaseMetaData md = conn.getMetaData();
String catalog = conn.getCatalog();
for (int i = 0; i < tables.size(); i++){//遍历需要入库的表
Map<String,Object> tabledata = new LinkedHashMap<>();
String tablename = tables.get(i);
tabledata.put("tablename",tablename);
ResultSet priset = md.getPrimaryKeys(catalog,null,tablename);
String primarykey = "";
while (priset.next()){
primarykey = priset.getString("COLUMN_NAME");
}
ResultSet colRet = md.getColumns(null,"%", tablename,"%");
List<String> create_sqls = new ArrayList<>();
List<String> cols = new ArrayList<>();
List<String> colTypes = new ArrayList<>();
while (colRet.next()){//遍历表的列信息
String columnName = colRet.getString("COLUMN_NAME");
String columnType = colRet.getString("TYPE_NAME");
int datasize = colRet.getInt("COLUMN_SIZE");
int digits = colRet.getInt("DECIMAL_DIGITS");
int nullable = colRet.getInt("NULLABLE");
cols.add(columnName);
if (columnType.equals("INT UNSIGNED"))
columnType = "INT";
if (columnType.equals("DATETIME"))
datasize = 6;
colTypes.add(columnType);
String create_sql = columnName + " " + columnType + "(" + datasize;
if (0 == digits){
create_sql += ") ";
}else {
create_sql += "," + digits + ") ";
}
if (nullable == 0){
create_sql += "not null,";
}else {
create_sql += ",";
}
create_sqls.add(create_sql);
}
create_sqls.add("PRIMARY KEY (" + primarykey + ")");
tabledata.put("create_sqls",create_sqls);
tabledata.put("cols",cols);
tabledata.put("colsType",colTypes);
//获取表内数据
Statement smt = conn.createStatement();
ResultSet rs = smt.executeQuery("SELECT * FROM " + tablename);
List<Map<String,Object>> rows = new ArrayList<>();
int rownum = 0;
while (rs.next()){//获取行数
rownum++;
}
for (int j = 0; j < rownum; j++){//代表第几行
Map<String,Object> row = new LinkedHashMap<>();
rows.add(row);
}
rs = smt.executeQuery("SELECT * FROM " + tablename);
int index = 0;
while (rs.next()){
for (int colnum = 0; colnum < cols.size(); colnum++){
switch (colTypes.get(colnum)){
case "INT" : rows.get(index).put(cols.get(colnum),rs.getInt(cols.get(colnum)));break;
case "VARCHAR" : rows.get(index).put(cols.get(colnum),rs.getString(cols.get(colnum)));break;
case "CHAR" : rows.get(index).put(cols.get(colnum),rs.getString(cols.get(colnum)));break;
case "DOUBLE" : rows.get(index).put(cols.get(colnum),rs.getDouble(cols.get(colnum)));break;
case "DATETIME" : rows.get(index).put(cols.get(colnum),rs.getString(cols.get(colnum)).substring(0,rs.getString(cols.get(colnum)).length()-2));break;
}
}
index++;
}
tabledata.put("datas",rows);
tablesdatas.add(tabledata);
}
}
conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/"+url+"?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true",username,password);
if (conn != null){//连接本地数据库,把表存入
String ts_datas_str = om.writeValueAsString(tablesdatas);
ArrayNode ts_datas = om.readValue(ts_datas_str,ArrayNode.class);
for (int i = 0; i < ts_datas.size(); i++){//遍历每一张表
JsonNode table = ts_datas.get(i);
String tablename = table.get("tablename").asText();
ArrayNode crete_sqls_json = (ArrayNode) table.get("create_sqls");
String sql = "create table " + tablename + "(";
for (int j = 0; j < crete_sqls_json.size(); j++){//遍历形成建表语句
sql += crete_sqls_json.get(j).asText();
}
sql += ");\n";
ArrayNode cols = (ArrayNode) table.get("cols");
ArrayNode table_datas = (ArrayNode) table.get("datas");
ArrayNode colsTypes = (ArrayNode) table.get("colsType");
sql += "insert into " + tablename + "(";
for (int j = 0; j < cols.size(); j++){
sql += cols.get(j).asText() + ",";
}
sql = sql.substring(0,sql.length()-1) + ")values(";
for (int j = 0; j < table_datas.size(); j++){//遍历每一行的数据
JsonNode row_datas = table_datas.get(j);
for (int k = 0; k < cols.size(); k++){
switch (colsTypes.get(k).asText()){
case "INT" : sql += row_datas.get(cols.get(k).asText()).asInt() + ",";break;
case "VARCHAR" : sql += "\"" + row_datas.get(cols.get(k).asText()).asText() + "\",";break;
case "CHAR" : sql += "'" + row_datas.get(cols.get(k).asText()).asText() + "',";break;
case "DOUBLE" : sql += row_datas.get(cols.get(k).asText()).asDouble() + ",";break;
case "DATETIME" : sql += "\"" + row_datas.get(cols.get(k).asText()).asText() + "\",";break;
}
}
sql = sql.substring(0,sql.length()-1) + "),(";
}
sql = sql.substring(0,sql.length()-2) + ";";
Statement smt = conn.createStatement();
if (smt.executeUpdate(sql) == 0){
conn.close();
return true;
}
}
}
conn.close();
return false;
}
}
| [
"38211333+SzSsZd@users.noreply.github.com"
] | 38211333+SzSsZd@users.noreply.github.com |
2b082e14718d68c609e849d5aa49a774f69ee770 | e49ddf6e23535806c59ea175b2f7aa4f1fb7b585 | /tags/release-2.4/mipav/src/gov/nih/mipav/view/dialogs/JDialogGridOptions.java | 2829f95a37d2009528bc4bafc19102eed2c32543 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | svn2github/mipav | ebf07acb6096dff8c7eb4714cdfb7ba1dcace76f | eb76cf7dc633d10f92a62a595e4ba12a5023d922 | refs/heads/master | 2023-09-03T12:21:28.568695 | 2019-01-18T23:13:53 | 2019-01-18T23:13:53 | 130,295,718 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,465 | java | package gov.nih.mipav.view.dialogs;
import gov.nih.mipav.model.file.*;
import gov.nih.mipav.view.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
/**
* Sets options for overlaying a grid on the image.
* @author ben
* @version 1.0
*/
public class JDialogGridOptions
extends JDialogBase {
private ViewJComponentEditImage comp;
private JButton colorButton;
private JTextField widthField;
private JTextField heightField;
private String unitsStr;
private float width;
private float height;
private Color color;
private ViewJColorChooser chooser;
/**
* Creates new dialog for entering parameters for entropy minimization.
* @param theParentFrame Parent frame
* @param im Source image
*/
public JDialogGridOptions(Frame theParentFrame, ViewJComponentEditImage comp) {
super(theParentFrame, false);
this.comp = comp;
unitsStr = FileInfoBase.getUnitsOfMeasureAbbrevStr(comp.getActiveImage().getFileInfo()[0].getUnitsOfMeasure(0));
this.width = comp.getGridSpacingX();
this.height = comp.getGridSpacingY();
this.color = comp.getGridColor();
init();
}
/**
* Sets up the GUI (panels, buttons, etc) and displays it on the screen.
*/
private void init() {
setTitle("Grid Overlay Options");
GridBagConstraints gbc = new GridBagConstraints();
gbc.weightx = 1;
gbc.gridwidth = 1;
int yPos = 0;
gbc.anchor = gbc.WEST;
gbc.fill = gbc.HORIZONTAL;
JPanel paramPanel = new JPanel(new GridBagLayout());
JLabel widthLabel = new JLabel("width (" + unitsStr + "): ");
JLabel heightLabel = new JLabel("height (" + unitsStr + "): " );
JLabel colorLabel = new JLabel("color: ");
widthField = new JTextField(Float.toString(width), 4);
heightField = new JTextField(Float.toString(height), 4);
MipavUtil.makeNumericsOnly(widthField, true);
MipavUtil.makeNumericsOnly(heightField, true);
colorButton = new JButton(MipavUtil.getIcon("transparent.gif"));
colorButton.setForeground(color);
colorButton.setBackground(color);
colorButton.addActionListener(this);
colorButton.setActionCommand("Color");
gbc.insets = new Insets(0,5,0,5);
paramPanel.add(widthLabel, gbc);
gbc.gridx = 1;
paramPanel.add(widthField, gbc);
gbc.gridx = 2;
paramPanel.add(heightLabel, gbc);
gbc.gridx = 3;
paramPanel.add(heightField, gbc);
gbc.gridx = 4;
paramPanel.add(colorLabel, gbc);
gbc.gridx = 5;
gbc.weightx = 0;
gbc.fill = gbc.NONE;
paramPanel.add(colorButton, gbc);
JPanel mainPanel = new JPanel();
mainPanel.add(paramPanel);
mainPanel.setBorder(buildTitledBorder(""));
JPanel buttonPanel = new JPanel();
buildOKButton();
OKButton.setText("Apply");
buttonPanel.add(OKButton);
buildCancelButton();
cancelButton.setText("Close");
buttonPanel.add(cancelButton);
getContentPane().add(mainPanel);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
pack();
setResizable(false);
setVisible(true);
}
/**
* Check width and height for validity
* @return boolean is okay
*/
private boolean setVariables() {
try {
width = Float.parseFloat(widthField.getText());
height = Float.parseFloat(heightField.getText());
if (width <= 0 || height <= 0) {
MipavUtil.displayError("Values must be greater than 0");
return false;
}
}
catch (Exception ex) {
return false;
}
return true;
}
/**
* actionPerformed - Closes dialog box when the OK button is pressed and
* calls the algorithm
* @param event event that triggers function
*/
public void actionPerformed(ActionEvent event) {
String command = event.getActionCommand();
Object source = event.getSource();
if (command.equals("Apply")) {
if (setVariables()) {
comp.setGridSpacingX(width);
comp.setGridSpacingY(height);
comp.setGridColor(color);
if (comp.getGridOverlay()) {
comp.paintComponent(comp.getGraphics());
}
}
}
else if (command.equals("Color")) {
chooser = new ViewJColorChooser(new Frame(),
"Pick VOI color",
new OkColorListener(),
new CancelListener());
}
else if (command.equals("Close")) {
setVisible(false);
dispose();
}
}
/**
* Pick up the selected color and call method to change the VOI color
*
*/
class OkColorListener
implements ActionListener {
/**
* Get color from chooser and set button
* and VOI color.
* @param e Event that triggered function.
*/
public void actionPerformed(ActionEvent e) {
Color newColor = chooser.getColor();
colorButton.setBackground(newColor);
color = newColor;
}
}
/**
* Does nothing.
*/
class CancelListener
implements ActionListener {
/**
* Does nothing.
*/
public void actionPerformed(ActionEvent e) {
}
}
}
| [
"NIH\\mccreedy@ba61647d-9d00-f842-95cd-605cb4296b96"
] | NIH\mccreedy@ba61647d-9d00-f842-95cd-605cb4296b96 |
45f238c1296200b126984c47702f55138dd4d160 | 41972da770ede5a26909a95e3717b283029bce89 | /src/com/wiseweb/ui/Code.java | 009876fd6dcb51ef1a105617febe82166d3c09e8 | [] | no_license | feng99721480/movieApp | 1d44074354a26f8d7fa61164bbe04bf8bd939086 | 597d659f9d4870849366ba69cb7e1fe7832407af | refs/heads/master | 2021-01-10T11:27:09.245478 | 2015-06-04T02:44:09 | 2015-06-04T02:44:09 | 36,779,148 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,714 | java | package com.wiseweb.ui;
import java.util.Random;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Bitmap.Config;
public class Code {
private static final char[] CHARS = {
'2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm',
'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
private static Code bmpCode;
public static Code getInstance() {
if(bmpCode == null)
bmpCode = new Code();
return bmpCode;
}
//default settings
private static final int DEFAULT_CODE_LENGTH = 4;
private static final int DEFAULT_FONT_SIZE = 30;
private static final int DEFAULT_LINE_NUMBER = 2;
private static final int BASE_PADDING_LEFT = 10, RANGE_PADDING_LEFT = 15, BASE_PADDING_TOP = 15, RANGE_PADDING_TOP = 20;
private static final int DEFAULT_WIDTH = 100, DEFAULT_HEIGHT = 50;
//settings decided by the layout xml
//canvas width and height
private int width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT;
//random word space and pading_top
private int base_padding_left = BASE_PADDING_LEFT, range_padding_left = RANGE_PADDING_LEFT,
base_padding_top = BASE_PADDING_TOP, range_padding_top = RANGE_PADDING_TOP;
//number of chars, lines; font size
private int codeLength = DEFAULT_CODE_LENGTH, line_number = DEFAULT_LINE_NUMBER, font_size = DEFAULT_FONT_SIZE;
//variables
private String code;
private int padding_left, padding_top;
private Random random = new Random();
//��֤��ͼƬ
public Bitmap createBitmap() {
padding_left = 0;
Bitmap bp = Bitmap.createBitmap(width, height, Config.ARGB_8888);
Canvas c = new Canvas(bp);
code = createCode();
c.drawColor(Color.WHITE);
Paint paint = new Paint();
paint.setTextSize(font_size);
for (int i = 0; i < code.length(); i++) {
randomTextStyle(paint);
randomPadding();
c.drawText(code.charAt(i) + "", padding_left, padding_top, paint);
}
for (int i = 0; i < line_number; i++) {
drawLine(c, paint);
}
c.save( Canvas.ALL_SAVE_FLAG );//����
c.restore();//
return bp;
}
public String getCode() {
return code;
}
//��֤��
private String createCode() {
StringBuilder buffer = new StringBuilder();
for (int i = 0; i < codeLength; i++) {
buffer.append(CHARS[random.nextInt(CHARS.length)]);
}
return buffer.toString();
}
private void drawLine(Canvas canvas, Paint paint) {
int color = randomColor();
int startX = random.nextInt(width);
int startY = random.nextInt(height);
int stopX = random.nextInt(width);
int stopY = random.nextInt(height);
paint.setStrokeWidth(1);
paint.setColor(color);
canvas.drawLine(startX, startY, stopX, stopY, paint);
}
private int randomColor() {
return randomColor(1);
}
private int randomColor(int rate) {
int red = random.nextInt(256) / rate;
int green = random.nextInt(256) / rate;
int blue = random.nextInt(256) / rate;
return Color.rgb(red, green, blue);
}
private void randomTextStyle(Paint paint) {
int color = randomColor();
paint.setColor(color);
paint.setFakeBoldText(random.nextBoolean()); //trueΪ���壬falseΪ�Ǵ���
float skewX = random.nextInt(11) / 10;
skewX = random.nextBoolean() ? skewX : -skewX;
paint.setTextSkewX(skewX); //float���Ͳ������ʾ��б��������б
// paint.setUnderlineText(true); //trueΪ�»��ߣ�falseΪ���»���
// paint.setStrikeThruText(true); //trueΪɾ���ߣ�falseΪ��ɾ����
}
private void randomPadding() {
padding_left += base_padding_left + random.nextInt(range_padding_left);
padding_top = base_padding_top + random.nextInt(range_padding_top);
}
}
| [
"Lenovo@Lenovo-PC"
] | Lenovo@Lenovo-PC |
7dc4ae264075b3428019af836d6001d73a0a584a | c58bb8db16dca4eb104d60104a5f1551f4129092 | /net.certware.sacm.edit/bin/src-gen/net/certware/sacm/SACM/parts/impl/TaggedValuePropertiesEditionPartImpl.java | b2d8e34a3343b23f12d3ff92e494048c60d7d720 | [
"Apache-2.0"
] | permissive | johnsteele/CertWare | 361537d76a76e8c7eb55cc652da5b3beb5b26b66 | f63ff91edaaf2b0718b51a34cda0136f3cdbb085 | refs/heads/master | 2021-01-16T19:16:08.546554 | 2014-07-03T16:49:40 | 2014-07-03T16:49:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,341 | java | // Copyright (c) 2013 United States Government as represented by the National Aeronautics and Space Administration. All rights reserved.
package net.certware.sacm.SACM.parts.impl;
// Start of user code for imports
import net.certware.sacm.SACM.parts.SACMViewsRepository;
import net.certware.sacm.SACM.parts.TaggedValuePropertiesEditionPart;
import net.certware.sacm.SACM.providers.SACMMessages;
import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
// End of user code
/**
* @author Kestrel Technology LLC
*
*/
public class TaggedValuePropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, TaggedValuePropertiesEditionPart {
protected Text key;
protected Text value;
/**
* Default constructor
* @param editionComponent the {@link IPropertiesEditionComponent} that manage this part
*
*/
public TaggedValuePropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
super(editionComponent);
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
* createFigure(org.eclipse.swt.widgets.Composite)
*
*/
public Composite createFigure(final Composite parent) {
view = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
view.setLayout(layout);
createControls(view);
return view;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
* createControls(org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(Composite view) {
CompositionSequence taggedValueStep = new BindingCompositionSequence(propertiesEditionComponent);
CompositionStep propertiesStep = taggedValueStep.addStep(SACMViewsRepository.TaggedValue.Properties.class);
propertiesStep.addStep(SACMViewsRepository.TaggedValue.Properties.key);
propertiesStep.addStep(SACMViewsRepository.TaggedValue.Properties.value);
composer = new PartComposer(taggedValueStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == SACMViewsRepository.TaggedValue.Properties.class) {
return createPropertiesGroup(parent);
}
if (key == SACMViewsRepository.TaggedValue.Properties.key) {
return createKeyText(parent);
}
if (key == SACMViewsRepository.TaggedValue.Properties.value) {
return createValueText(parent);
}
return parent;
}
};
composer.compose(view);
}
/**
*
*/
protected Composite createPropertiesGroup(Composite parent) {
Group propertiesGroup = new Group(parent, SWT.NONE);
propertiesGroup.setText(SACMMessages.TaggedValuePropertiesEditionPart_PropertiesGroupLabel);
GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
propertiesGroupData.horizontalSpan = 3;
propertiesGroup.setLayoutData(propertiesGroupData);
GridLayout propertiesGroupLayout = new GridLayout();
propertiesGroupLayout.numColumns = 3;
propertiesGroup.setLayout(propertiesGroupLayout);
return propertiesGroup;
}
protected Composite createKeyText(Composite parent) {
createDescription(parent, SACMViewsRepository.TaggedValue.Properties.key, SACMMessages.TaggedValuePropertiesEditionPart_KeyLabel);
key = SWTUtils.createScrollableText(parent, SWT.BORDER);
GridData keyData = new GridData(GridData.FILL_HORIZONTAL);
key.setLayoutData(keyData);
key.addFocusListener(new FocusAdapter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*
*/
@Override
@SuppressWarnings("synthetic-access")
public void focusLost(FocusEvent e) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TaggedValuePropertiesEditionPartImpl.this, SACMViewsRepository.TaggedValue.Properties.key, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, key.getText()));
}
});
key.addKeyListener(new KeyAdapter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
*
*/
@Override
@SuppressWarnings("synthetic-access")
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TaggedValuePropertiesEditionPartImpl.this, SACMViewsRepository.TaggedValue.Properties.key, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, key.getText()));
}
}
});
EditingUtils.setID(key, SACMViewsRepository.TaggedValue.Properties.key);
EditingUtils.setEEFtype(key, "eef::Text"); //$NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(SACMViewsRepository.TaggedValue.Properties.key, SACMViewsRepository.SWT_KIND), null); //$NON-NLS-1$
// Start of user code for createKeyText
// End of user code
return parent;
}
protected Composite createValueText(Composite parent) {
createDescription(parent, SACMViewsRepository.TaggedValue.Properties.value, SACMMessages.TaggedValuePropertiesEditionPart_ValueLabel);
value = SWTUtils.createScrollableText(parent, SWT.BORDER);
GridData valueData = new GridData(GridData.FILL_HORIZONTAL);
value.setLayoutData(valueData);
value.addFocusListener(new FocusAdapter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*
*/
@Override
@SuppressWarnings("synthetic-access")
public void focusLost(FocusEvent e) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TaggedValuePropertiesEditionPartImpl.this, SACMViewsRepository.TaggedValue.Properties.value, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, value.getText()));
}
});
value.addKeyListener(new KeyAdapter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
*
*/
@Override
@SuppressWarnings("synthetic-access")
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TaggedValuePropertiesEditionPartImpl.this, SACMViewsRepository.TaggedValue.Properties.value, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, value.getText()));
}
}
});
EditingUtils.setID(value, SACMViewsRepository.TaggedValue.Properties.value);
EditingUtils.setEEFtype(value, "eef::Text"); //$NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(SACMViewsRepository.TaggedValue.Properties.value, SACMViewsRepository.SWT_KIND), null); //$NON-NLS-1$
// Start of user code for createValueText
// End of user code
return parent;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
*
*/
public void firePropertiesChanged(IPropertiesEditionEvent event) {
// Start of user code for tab synchronization
// End of user code
}
/**
* {@inheritDoc}
*
* @see net.certware.sacm.SACM.parts.TaggedValuePropertiesEditionPart#getKey()
*
*/
public String getKey() {
return key.getText();
}
/**
* {@inheritDoc}
*
* @see net.certware.sacm.SACM.parts.TaggedValuePropertiesEditionPart#setKey(String newValue)
*
*/
public void setKey(String newValue) {
if (newValue != null) {
key.setText(newValue);
} else {
key.setText(""); //$NON-NLS-1$
}
boolean eefElementEditorReadOnlyState = isReadOnly(SACMViewsRepository.TaggedValue.Properties.key);
if (eefElementEditorReadOnlyState && key.isEnabled()) {
key.setEnabled(false);
key.setToolTipText(SACMMessages.TaggedValue_ReadOnly);
} else if (!eefElementEditorReadOnlyState && !key.isEnabled()) {
key.setEnabled(true);
}
}
/**
* {@inheritDoc}
*
* @see net.certware.sacm.SACM.parts.TaggedValuePropertiesEditionPart#getValue()
*
*/
public String getValue() {
return value.getText();
}
/**
* {@inheritDoc}
*
* @see net.certware.sacm.SACM.parts.TaggedValuePropertiesEditionPart#setValue(String newValue)
*
*/
public void setValue(String newValue) {
if (newValue != null) {
value.setText(newValue);
} else {
value.setText(""); //$NON-NLS-1$
}
boolean eefElementEditorReadOnlyState = isReadOnly(SACMViewsRepository.TaggedValue.Properties.value);
if (eefElementEditorReadOnlyState && value.isEnabled()) {
value.setEnabled(false);
value.setToolTipText(SACMMessages.TaggedValue_ReadOnly);
} else if (!eefElementEditorReadOnlyState && !value.isEnabled()) {
value.setEnabled(true);
}
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
*
*/
public String getTitle() {
return SACMMessages.TaggedValue_Part_Title;
}
// Start of user code additional methods
// End of user code
}
| [
"mrbcuda@mac.com"
] | mrbcuda@mac.com |
98de85ad3981beb3f94a65f4419e5a337db415b3 | d89577506ae8ae3dcf1069c0a2e95fe89e841a99 | /omd-dao/src/test/java/me/glux/omd/dao/test/package-info.java | 9f638e67fce0b3f663b10de7700e94155b47623c | [] | no_license | gluxhappy/bms-fs | 8d03fa006d1bccd066000917f70af126362294b9 | 54e3a458e6774e7763836517de14508c370555d1 | refs/heads/master | 2016-09-12T14:26:33.640921 | 2016-05-19T01:46:52 | 2016-05-19T01:46:52 | 56,482,477 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 61 | java | /**
* @author gluxhappy
*
*/
package me.glux.omd.dao.test; | [
"gluxhappy@gmail.com"
] | gluxhappy@gmail.com |
3fe98d01a0346e529b8537ec733662a41cda9252 | 389d31580f426b020add2d5fbeabb776d9195c5b | /src/com/xtb4/sortfromfiles/sorter/MergeSorter.java | 98621d201adfbbce5006b884e75d0465edee8afe | [] | no_license | Xtb4/SortFromFiles | 9d3a3e360966ba5b0f6c2f8bd8af88e941090a73 | 8aff8c64152b05241afcbfdb31b4a2bd4669a38d | refs/heads/master | 2020-07-23T13:33:58.431352 | 2019-09-13T08:15:01 | 2019-09-13T08:15:01 | 207,574,531 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,147 | java | package com.xtb4.sortfromfiles.sorter;
import com.xtb4.sortfromfiles.sorter.data.Input;
import com.xtb4.sortfromfiles.sorter.data.Output;
import com.xtb4.sortfromfiles.sorter.exceptions.InputTypeException;
import com.xtb4.sortfromfiles.sorter.exceptions.SorterException;
import java.io.IOException;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
public class MergeSorter<T extends Comparable<? super T>> {
private final Comparator<T> comparator;
public MergeSorter(Comparator<T> comparator){
this.comparator = comparator;
}
public void sort(List<Input<T>> inputs, Output<T> output) throws SorterException {
if (inputs == null || inputs.isEmpty()) {
throw new SorterException(SorterException.ErrorType.NO_INPUT_SOURCES);
}
if (output == null) {
throw new SorterException(SorterException.ErrorType.NO_OUTPUT_SOURCE);
}
LinkedList<InputValue<T>> values = new LinkedList<>();
for (Input<T> input : inputs) {
InputValue<T> inputValue = new InputValue<>(input);
inputValue.nextValue(comparator);
addValue(values, inputValue);
}
try {
while (!values.isEmpty()) {
InputValue<T> first = values.getFirst();
output.write(first.lastVal);
first.nextValue(comparator);
if (first.lastVal == null) {
values.removeFirst();
}
if (values.size() > 1 && comparator.compare(values.get(0).lastVal, values.get(1).lastVal) > 0) {
first = values.getFirst();
values.removeFirst();
addValue(values, first);
}
}
} catch (IOException ex) {
throw new SorterException(SorterException.ErrorType.ERROR_WRITE_OUTPUT);
}
}
private void addValue(LinkedList<InputValue<T>> values, InputValue<T> value){
if (value.lastVal == null) {
return;
}
for(int position = 0; position < values.size(); position++) {
if (comparator.compare(values.get(position).lastVal, value.lastVal) >= 0) {
values.add(position, value);
return;
}
}
values.addLast(value);
}
private static class InputValue<T> {
Input<T> input;
T lastVal;
InputValue(Input<T> input) {
this.input = input;
}
void nextValue(Comparator<T> comparator) {
while (input.hasNext()) {
try {
T val = input.next();
if (lastVal == null || comparator.compare(val, lastVal) >= 0) {
lastVal = val;
return;
}
}
catch (InputTypeException e) {
//ignore
}
}
lastVal = null;
}
@Override
public String toString() {
return String.valueOf(lastVal);
}
}
} | [
"Pavel.92.nsk@gmail.com"
] | Pavel.92.nsk@gmail.com |
7d1b73e9d3e65841ecc49c3b4d810b3e058ed949 | 49b75f183a3c947a46fe61986816e5bc4faa2fcc | /src/main/java/com/example/priority/dto/responce/ResAllPriority.java | 207aeec7c35f7b3a0dba816607c76d28f9703c0b | [] | no_license | komal2831/priority_tatsam | 0a1cd107ffe5090651352ee5f2ae0dad38c4c365 | 0761d7a07835d133095d5232a29cd9cb9e3a4dd9 | refs/heads/main | 2023-06-16T17:32:09.251755 | 2021-07-02T12:34:46 | 2021-07-02T12:34:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 295 | java | package com.example.priority.dto.responce;
import lombok.Data;
import java.util.List;
@Data
public class ResAllPriority extends GenericResponse{
List<Priority> priorityList;
@Data
public static class Priority{
private Long priorityId;
private String Name;
}
}
| [
"ranjeet@anvayaanalytics.com"
] | ranjeet@anvayaanalytics.com |
6ceced30208d4fa8cb7730e942ac1e1fc88292ef | 40df2cb0cf4cdc8261a88fc507ffb7cd113282c3 | /micro-film-cloud/nacos-gateway/src/main/java/com/zjservice/gateway/pojo/OperationLog.java | ca20996fadc118fa8c96e0819e960b47dab8f429 | [] | no_license | zj19950922/micro-film-cloud | d51794c2b217618fcad40569f590e8950eb35808 | 3f726f99826c4a3fc6011f950cd7a2d2dea7d350 | refs/heads/master | 2023-07-20T05:02:03.584333 | 2020-03-30T01:02:37 | 2020-03-30T01:02:37 | 241,000,356 | 3 | 0 | null | 2023-07-11T02:31:33 | 2020-02-17T02:04:10 | TSQL | UTF-8 | Java | false | false | 521 | java | package com.zjservice.gateway.pojo;
import lombok.Data;
import java.io.Serializable;
/**
* @author zj
* @date 2020/1/6 9:36
* @Description
*/
@Data
public class OperationLog implements Serializable {
private String id;
/** 用户名*/
private String userName;
/** 请求服务*/
private String visitorService;
/** 请求API资源*/
private String visitorUrl;
/** 请求方式*/
private String visitorMethod;
/** 访问者远程地址*/
private String remoteAddress;
}
| [
"zhujun19950922@163.com"
] | zhujun19950922@163.com |
1c9573f0e0ff26d9d4c7524c4612623e5fdffeb4 | 3eab3fb0f444a7d6e19205dba17a5bea6ee59221 | /Message/gen/com/example/message/R.java | 1fd6b22326b9a37f5ab93fac4a120a530a32830a | [] | no_license | fang1994042128/Android-- | 9c13018247c685d2cee6baa9e50eae123058499b | 6ed06137fb78b9a8a2571886b9d491785b61d247 | refs/heads/master | 2016-09-03T07:26:39.637180 | 2015-05-03T09:16:45 | 2015-05-03T09:16:45 | 31,646,002 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,300 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.message;
public final class R {
public static final class attr {
}
public static final class dimen {
public static final int padding_large=0x7f040002;
public static final int padding_medium=0x7f040001;
public static final int padding_small=0x7f040000;
}
public static final class drawable {
public static final int ic_action_search=0x7f020000;
public static final int ic_launcher=0x7f020001;
public static final int messager=0x7f020002;
public static final int people=0x7f020003;
}
public static final class id {
public static final int contact=0x7f080007;
public static final int edbody=0x7f080009;
public static final int ednum=0x7f080008;
public static final int imag=0x7f080000;
public static final int listmsg=0x7f080002;
public static final int listnum=0x7f080001;
public static final int listtime=0x7f080003;
public static final int menu_settings=0x7f08000b;
public static final int msg_list=0x7f080006;
public static final int newsms=0x7f080005;
public static final int send=0x7f08000a;
public static final int type=0x7f080004;
}
public static final class layout {
public static final int listview=0x7f030000;
public static final int main=0x7f030001;
public static final int write=0x7f030002;
}
public static final class menu {
public static final int activity_main=0x7f070000;
}
public static final class string {
public static final int app_name=0x7f050000;
public static final int body=0x7f050007;
public static final int hello_world=0x7f050001;
public static final int menu_settings=0x7f050002;
public static final int newsms=0x7f050004;
public static final int reply=0x7f050005;
public static final int sendnum=0x7f050006;
public static final int title_activity_main=0x7f050003;
}
public static final class style {
public static final int AppTheme=0x7f060000;
}
}
| [
"624941450@qq.com"
] | 624941450@qq.com |
3922c6b610b5f8430cf7fc675421712ea34e656c | 3544d676049e38eac8610c13d2e8b629bd89b938 | /Factory Pattern Sample/src/com/company/Main.java | 1b87ecdc3970b2d82cd423bdbb55686de2c18895 | [
"MIT"
] | permissive | Ahmedsafwat101/DesignPatterns | cb51c274e86d77eaa0ce46f801a69691a7b2a225 | 2f52c470b21cd93c28fce1e2ffef26bffa8809db | refs/heads/main | 2023-04-18T17:05:18.220587 | 2021-04-20T22:42:14 | 2021-04-20T22:42:14 | 359,957,325 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package com.company;
import com.Factory.DialogFactory;
public class Main {
public static void main(String[] args) {
/**Calling the factory**/
DialogFactory factory = new DialogFactory();
/**Create HTML Button from DialogFactory that will return Button class **/
factory.createButton("HTML").render();
/**Create HTML Button from DialogFactory that will return Button class **/
factory.createButton("Windows").render();
}
}
| [
"42112466+Ahmedsafwat101@users.noreply.github.com"
] | 42112466+Ahmedsafwat101@users.noreply.github.com |
0f9b50d20d754fce5b3dae5a0b8ee17cf908669b | 559ea64c50ae629202d0a9a55e9a3d87e9ef2072 | /com/cnmobi/im/util/DateUtils.java | 06f05f6ee6b32f7d947c5985a450ce0c8108d8f6 | [] | no_license | CrazyWolf2014/VehicleBus | 07872bf3ab60756e956c75a2b9d8f71cd84e2bc9 | 450150fc3f4c7d5d7230e8012786e426f3ff1149 | refs/heads/master | 2021-01-03T07:59:26.796624 | 2016-06-10T22:04:02 | 2016-06-10T22:04:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,719 | java | package com.cnmobi.im.util;
import com.google.protobuf.DescriptorProtos.FieldOptions;
import com.google.protobuf.DescriptorProtos.MessageOptions;
import com.google.protobuf.DescriptorProtos.UninterpretedOption;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.xbill.DNS.KEYRecord;
public class DateUtils {
public static Date parse(String dateStr, String format) {
Date result = null;
try {
result = new SimpleDateFormat(format).parse(dateStr);
} catch (ParseException e) {
e.printStackTrace();
}
return result;
}
public static String format(Date date, String format) {
return new SimpleDateFormat(format).format(date);
}
public static String getWeekDay(Date date) {
switch (date.getDay()) {
case KEYRecord.OWNER_USER /*0*/:
return "\u661f\u671f\u5929";
case MessageOptions.MESSAGE_SET_WIRE_FORMAT_FIELD_NUMBER /*1*/:
return "\u661f\u671f\u4e00";
case MessageOptions.NO_STANDARD_DESCRIPTOR_ACCESSOR_FIELD_NUMBER /*2*/:
return "\u661f\u671f\u4e8c";
case FieldOptions.DEPRECATED_FIELD_NUMBER /*3*/:
return "\u661f\u671f\u4e09";
case UninterpretedOption.POSITIVE_INT_VALUE_FIELD_NUMBER /*4*/:
return "\u661f\u671f\u56db";
case UninterpretedOption.NEGATIVE_INT_VALUE_FIELD_NUMBER /*5*/:
return "\u661f\u671f\u4e94";
case UninterpretedOption.DOUBLE_VALUE_FIELD_NUMBER /*6*/:
return "\u661f\u671f\u516d";
default:
return null;
}
}
}
| [
"ahhmedd16@hotmail.com"
] | ahhmedd16@hotmail.com |
daf0d492a50f7123e8db5af668d70d1043ec68c0 | 9370cc5bc214ad377200ca41ed6f556140cbb06a | /src/com/mysteel/banksteel/view/adapters/SourceSearchAdapter.java | 0add1e425e101fe927160b44107fce951de3c3f4 | [] | no_license | caocf/2.1.0 | db5286d5e9317e1ae70e1186b222e736b1e7a2ce | f2ba501e317eb1f5e9f77cf94ef9c52cc606b252 | refs/heads/master | 2021-01-16T20:50:52.899829 | 2015-11-06T17:29:05 | 2015-11-06T17:29:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,753 | java | package com.mysteel.banksteel.view.adapters;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import android.widget.Toast;
import com.mysteel.banksteel.ao.IOrderTrade;
import com.mysteel.banksteel.ao.impl.OrderTradeImpl;
import com.mysteel.banksteel.entity.BaseData;
import com.mysteel.banksteel.entity.SearchResourceData.Data.Datas;
import com.mysteel.banksteel.util.Constants;
import com.mysteel.banksteel.util.RequestUrl;
import com.mysteel.banksteel.util.Tools;
import com.mysteel.banksteel.view.activity.ChatActivity;
import com.mysteel.banksteel.view.activity.LoginActivity;
import com.mysteel.banksteel.view.interfaceview.IOrderTradeView;
import com.mysteel.banksteeltwo.R;
import java.util.ArrayList;
import java.util.List;
public class SourceSearchAdapter extends BaseAdapter implements IOrderTradeView
{
@Override
public void updateView(BaseData data)
{
if (Tools.isLogin(mContext))
{
Intent i = new Intent(mContext, ChatActivity.class);
i.putExtra("userId", datas.get(listNum).getPhone());
i.putExtra("userName", datas.get(listNum).getUserName());
mContext.startActivity(i);
} else
{
Intent i = new Intent(mContext, LoginActivity.class);
mContext.startActivity(i);
}
}
private int mRightWidth = 0;
@Override
public void isShowDialog(boolean flag)
{
}
public interface ClickToggleItem
{
void selOpenItem(int position);
}
private Context mContext;
private ClickToggleItem clickToggleItem;
private IOrderTrade orderTrade;
private int listNum;
private List<Datas> datas = new ArrayList<Datas>();
public SourceSearchAdapter(Context mContext, int rightWidth)
{
this.mContext = mContext;
orderTrade = new OrderTradeImpl(mContext, this);
this.mRightWidth = rightWidth;
}
public void reSetListView(ArrayList<Datas> datas)
{
this.datas = datas;
notifyDataSetChanged();
}
public void setClickToggleItem(ClickToggleItem clickToggleItem)
{
this.clickToggleItem = clickToggleItem;
}
// @Override
// public int getSwipeLayoutResourceId(int position) {
// return R.id.swipe;
// }
// @Override
// public View generateView(int position, ViewGroup parent) {
// View v =
// LayoutInflater.from(mContext).inflate(R.layout.listview_search_item,
// null);
// SwipeLayout swipeLayout = (SwipeLayout) v
// .findViewById(getSwipeLayoutResourceId(position));
// swipeLayout.setShowMode(SwipeLayout.ShowMode.LayDown);
// swipeLayout.setShowMode(SwipeLayout.ShowMode.PullOut);
//
// // Datas datasTemp = datas.get(position);
// // if(datasTemp.isToogleItemFlag()){
// // swipeLayout.open();
// // }else{
// // swipeLayout.close();
// // }
// swipeLayout.addSwipeListener(new SwipeLayout.SwipeListener() {
// @Override
// public void onClose(SwipeLayout layout) {
//
// }
//
// @Override
// public void onUpdate(SwipeLayout layout, int leftOffset,
// int topOffset) {
//
// }
//
// @Override
// public void onOpen(SwipeLayout layout) {
// //LogUtils.e("打开啦啦啦");
// //YoYo.with(Techniques.Tada).duration(500).delay(100).playOn(layout.findViewById(R.id.trash));
// }
//
// @Override
// public void onHandRelease(SwipeLayout layout, float xvel, float yvel) {
//
// }
// });
// return v;
// }
// @Override
// public void fillValues(int position, View convertView) {
// TextView tv_name = (TextView) convertView.findViewById(R.id.tv_name);
// TextView tv_type = (TextView) convertView.findViewById(R.id.tv_type);
// TextView tv_num = (TextView) convertView.findViewById(R.id.tv_num);
// TextView tv_price = (TextView) convertView.findViewById(R.id.tv_price);
// TextView tv_unit = (TextView) convertView.findViewById(R.id.tv_unit);
// TextView tv_company = (TextView)
// convertView.findViewById(R.id.tv_company);
// TextView tv_sell = (TextView) convertView.findViewById(R.id.tv_sell);
// tv_sell.setVisibility(View.GONE);
// LinearLayout ll_item_phone = (LinearLayout)
// convertView.findViewById(R.id.ll_item_phone);
// LinearLayout ll_item_msg = (LinearLayout)
// convertView.findViewById(R.id.ll_item_msg);
//
//
// final Datas datasTemp = datas.get(position);
//
// tv_name.setText(datasTemp.getBreedName());
// tv_type.setText(datasTemp.getMaterial());
// tv_num.setText(datasTemp.getSpec());
//
// if(Float.parseFloat(datasTemp.getPrice())<1000){
// tv_price.setText("面议价");
// tv_unit.setVisibility(View.INVISIBLE);
// }else{
// tv_price.setText(datasTemp.getPrice());
// tv_unit.setVisibility(View.VISIBLE);
// }
// tv_company.setText(datasTemp.getMemberName());
//
// ll_item_phone.setOnClickListener(new OnClickListener() {
// @Override
// public void onClick(View v) {
// if(!TextUtils.isEmpty(datasTemp.getPhone())){
// Tools.makeCall(mContext, datasTemp.getPhone());
// }else{
// Tools.showToast(mContext, "货主尚未上传他的手机号!");
// }
// }
// });
//
// listNum = position;
// ll_item_msg.setOnClickListener(new OnClickListener()
// {
// @Override
// public void onClick(View v)
// {
// if (!TextUtils.isEmpty(datasTemp.getPhone()))
// {
// String url = RequestUrl.getInstance(mContext).getUrl_Register(mContext,
// datasTemp.getPhone(), "");
// orderTrade.getHuanXinRegister(url, Constants.INTERFACE_hxuserregister);
// } else
// {
// Toast.makeText(mContext, "暂时获取不到卖家电话!", Toast.LENGTH_SHORT).show();
// }
// }
// });
//
// }
@Override
public int getCount()
{
if (datas.size() > 0)
{
return datas.size();
}
return 0;
}
@Override
public Object getItem(int position)
{
return null;
}
@Override
public long getItemId(int position)
{
return position;
}
public IOrderTrade getOrderTrade()
{
return orderTrade;
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
ViewHolder holder;
if (convertView == null)
{
convertView = LayoutInflater.from(mContext).inflate(
R.layout.listview_search_item, parent, false);
holder = new ViewHolder();
holder.tv_name = (TextView) convertView.findViewById(R.id.tv_name);
holder.tv_type = (TextView) convertView.findViewById(R.id.tv_type);
holder.tv_price = (TextView) convertView
.findViewById(R.id.tv_price);
holder.tv_num = (TextView) convertView.findViewById(R.id.tv_num);
holder.tv_unit = (TextView) convertView.findViewById(R.id.tv_unit);
holder.tv_company = (TextView) convertView
.findViewById(R.id.tv_company);
holder.tv_sell = (TextView) convertView.findViewById(R.id.tv_sell);
holder.ll_item_phone = (LinearLayout) convertView
.findViewById(R.id.ll_item_phone);
holder.ll_item_msg = (LinearLayout) convertView
.findViewById(R.id.ll_item_msg);
holder.item_left = (LinearLayout) convertView
.findViewById(R.id.item_left);
holder.item_right = (LinearLayout) convertView
.findViewById(R.id.item_right);
convertView.setTag(holder);
} else
{// 有直接获得ViewHolder
holder = (ViewHolder) convertView.getTag();
}
holder.tv_sell.setVisibility(View.GONE);
LinearLayout.LayoutParams lp1 = new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
holder.item_left.setLayoutParams(lp1);
LinearLayout.LayoutParams lp2 = new LayoutParams(mRightWidth,
LayoutParams.MATCH_PARENT);
holder.item_right.setLayoutParams(lp2);
final Datas datasTemp = datas.get(position);
holder.tv_name.setText(datasTemp.getBreedName());
holder.tv_type.setText(datasTemp.getMaterial());
holder.tv_num.setText(datasTemp.getSpec());
if (Float.parseFloat(datasTemp.getPrice()) < 1000)
{
holder.tv_price.setText("面议价");
holder.tv_unit.setVisibility(View.INVISIBLE);
} else
{
holder.tv_price.setText(datasTemp.getPrice());
holder.tv_unit.setVisibility(View.VISIBLE);
}
if(!TextUtils.isEmpty(datasTemp.getWarehouse())){
holder.tv_company.setText(datasTemp.getWarehouse());
}else{
holder.tv_company.setText("厂提");
}
holder.ll_item_phone.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
if (!TextUtils.isEmpty(datasTemp.getPhone()))
{
Tools.makeCall(mContext, datasTemp.getPhone());
} else
{
Tools.showToast(mContext, "货主尚未上传他的手机号!");
}
}
});
listNum = position;
holder.ll_item_msg.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
if (!TextUtils.isEmpty(datasTemp.getPhone()))
{
String url = RequestUrl
.getInstance(mContext)
.getUrl_Register(mContext, datasTemp.getPhone(), "");
orderTrade.getHuanXinRegister(url,
Constants.INTERFACE_hxuserregister);
} else
{
Toast.makeText(mContext, "暂时获取不到卖家电话!", Toast.LENGTH_SHORT)
.show();
}
}
});
return convertView;
}
public class ViewHolder
{
TextView tv_name;
TextView tv_type;
TextView tv_num;
TextView tv_price;
TextView tv_unit;
TextView tv_company;
TextView tv_sell;
LinearLayout ll_item_phone;
LinearLayout ll_item_msg;
LinearLayout item_left;
LinearLayout item_right;
}
}
| [
"529500098@qq.com"
] | 529500098@qq.com |
1ccb20781bcea5c344e3406dfae58c58445778f6 | 2431af653419370f5b5fd955b8c5408f1ef94dae | /src/com/javaintroduction/TaskOnVariables.java | f8527df472289a037b4639b332a11c225be4b19d | [] | no_license | prathapSEDT/TMSEL-DailyCODE | d38acd8d3e8194f94b4e8973574cc426d773b3b5 | 4031154f323606d3c41fee4ecc15c59d90dccbd7 | refs/heads/master | 2023-03-14T20:08:22.837083 | 2021-02-23T05:11:46 | 2021-02-23T05:11:46 | 341,436,163 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 313 | java | package com.javaintroduction;
public class TaskOnVariables {
public static void main(String[] args) {
int a,b;
a=30;
b=40;
// swap two numbers, a==> 40 b==>30
a=a+b;// 70
b=a-b;//70-40=30
a=a-b;//70-30=40
System.out.println(a+" "+b);
}
}
| [
"prathap.ufttest@gmail.com"
] | prathap.ufttest@gmail.com |
774cf554a6c634b39c0cf46ea6128d73e2beaf5f | a6b5e84baad67354a7c215828c16a186f354faa3 | /bootcampmanagement/src/main/java/com/bm/bootcampmanagement/repository/el/ProvinceRepository.java | f429424d6c901f0e7a59c8d08f7254057e8e62c7 | [] | no_license | bootcamp23-mii/SpringBoot-BootcampManagement | c310339787d0d780d3adc41efc2648786025fd4e | c84dc598f7ff84cdcce5147535eaa85f57fef92b | refs/heads/master | 2020-05-01T02:58:45.188924 | 2019-05-09T14:43:53 | 2019-05-09T14:43:53 | 177,234,302 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 790 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.bm.bootcampmanagement.repository.el;
import com.bm.bootcampmanagement.entities.Province;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
/**
*
* @author Firsta
*/
@Repository
public interface ProvinceRepository extends CrudRepository<Province, String>{
@Modifying
@Query (value = "DELETE FROM tb_m_province where id = ?1", nativeQuery = true)
public void deleteById(String id);
}
| [
"restaarayaning@gmail.com"
] | restaarayaning@gmail.com |
b7b175e93432ffdf786199b5feff6b5ee89310d2 | eb2690583fc03c0d9096389e1c07ebfb80e7f8d5 | /src/main/java/org/owasp/benchmark/testcode/BenchmarkTest01733.java | e16fc956f1c9f8dc5de34f0eeb80c1e8221121b3 | [] | no_license | leroy-habberstad/java-benchmark | 126671f074f81bd7ab339654ed1b2d5d85be85dd | bce2a30bbed61a7f717a9251ca2cbb38b9e6a732 | refs/heads/main | 2023-03-15T03:02:42.714614 | 2021-03-23T00:03:36 | 2021-03-23T00:03:36 | 350,495,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,498 | java | /**
* OWASP Benchmark Project v1.2
*
* This file is part of the Open Web Application Security Project (OWASP)
* Benchmark Project. For details, please see
* <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>.
*
* The OWASP Benchmark 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, version 2.
*
* The OWASP Benchmark 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.
*
* @author Dave Wichers <a href="https://www.aspectsecurity.com">Aspect Security</a>
* @created 2015
*/
package org.owasp.benchmark.testcode;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(value="/sqli-03/BenchmarkTest01733")
public class BenchmarkTest01733 extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String queryString = request.getQueryString();
String paramval = "BenchmarkTest01733"+"=";
int paramLoc = -1;
if (queryString != null) paramLoc = queryString.indexOf(paramval);
if (paramLoc == -1) {
response.getWriter().println("getQueryString() couldn't find expected parameter '" + "BenchmarkTest01733" + "' in query string.");
return;
}
String param = queryString.substring(paramLoc + paramval.length()); // 1st assume "BenchmarkTest01733" param is last parameter in query string.
// And then check to see if its in the middle of the query string and if so, trim off what comes after.
int ampersandLoc = queryString.indexOf("&", paramLoc);
if (ampersandLoc != -1) {
param = queryString.substring(paramLoc + paramval.length(), ampersandLoc);
}
param = java.net.URLDecoder.decode(param, "UTF-8");
String bar = new Test().doSomething(request, param);
String sql = "INSERT INTO users (username, password) VALUES ('foo','"+ bar + "')";
try {
java.sql.Statement statement = org.owasp.benchmark.helpers.DatabaseHelper.getSqlStatement();
int count = statement.executeUpdate( sql, new String[] {"USERNAME","PASSWORD"} );
org.owasp.benchmark.helpers.DatabaseHelper.outputUpdateComplete(sql, response);
} catch (java.sql.SQLException e) {
if (org.owasp.benchmark.helpers.DatabaseHelper.hideSQLErrors) {
response.getWriter().println(
"Error processing request."
);
return;
}
else throw new ServletException(e);
}
} // end doPost
private class Test {
public String doSomething(HttpServletRequest request, String param) throws ServletException, IOException {
org.owasp.benchmark.helpers.ThingInterface thing = org.owasp.benchmark.helpers.ThingFactory.createThing();
String bar = thing.doSomething(param);
return bar;
}
} // end innerclass Test
} // end DataflowThruInnerClass
| [
"jjohnson@gitlab.com"
] | jjohnson@gitlab.com |
ca2a71dea01ef97318d7f5ed47f504c2c6e1b13f | 5604ba8b171cc374ca78e7a165a7e26498d12e34 | /it.polimi.mdir.crawler.graphmlmodel/code/gen/it/polimi/mdir/crawler/graphmlmodel/messages/ObjectFactory.java | cd2c4135e3ebcf6b98c253c04ea5c79c71573783 | [] | no_license | zefang/model-driven-information-retrieval | 9019c4c1ca0b0a5f544866c80e7c2207841717ea | 446027dd10e809d07e5280b164347792169c7282 | refs/heads/master | 2020-04-06T03:34:33.489980 | 2011-10-08T14:44:39 | 2011-10-08T14:44:39 | 37,524,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,316 | java |
// CHECKSTYLE:OFF
package it.polimi.mdir.crawler.graphmlmodel.messages;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the it.polimi.mdir.crawler.graphmlmodel.messages package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: it.polimi.mdir.crawler.graphmlmodel.messages
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link Process }
*
*/
public Process createProcess() {
return new Process();
}
/**
* Create an instance of {@link Process.Filter }
*
*/
public Process.Filter createProcessFilter() {
return new Process.Filter();
}
/**
* Create an instance of {@link Attribute }
*
*/
public Attribute createAttribute() {
return new Attribute();
}
/**
* Create an instance of {@link OriginalAttribute }
*
*/
public OriginalAttribute createOriginalAttribute() {
return new OriginalAttribute();
}
/**
* Create an instance of {@link OriginalProcess }
*
*/
public OriginalProcess createOriginalProcess() {
return new OriginalProcess();
}
/**
* Create an instance of {@link Process.Filter.Include }
*
*/
public Process.Filter.Include createProcessFilterInclude() {
return new Process.Filter.Include();
}
/**
* Create an instance of {@link Process.Filter.Exclude }
*
*/
public Process.Filter.Exclude createProcessFilterExclude() {
return new Process.Filter.Exclude();
}
}
// CHECKSTYLE:ON
| [
"stefano.celentano87@gmail.com"
] | stefano.celentano87@gmail.com |
3ace2d12ec730068c33557c86c28ba7492c8e85c | 099028e82771d0939d2a65e81ab188ea5b9084c3 | /src/main/java/com/carndos/modules/res/pojo/ResRoleBO.java | e80e0f1e563f39969fa257f87f6a2de61b4851fa | [] | no_license | yanghj7425/carndos | 65f8e37e466dd58336435cd5f9cb1d52ed88a755 | 1cbefe125303729a8f547ee4dbac24a9f48c4cef | refs/heads/master | 2022-06-22T10:17:10.434917 | 2019-06-20T10:10:19 | 2019-06-20T10:10:19 | 140,275,326 | 0 | 0 | null | 2022-06-17T02:00:58 | 2018-07-09T11:22:16 | Java | UTF-8 | Java | false | false | 837 | java | package com.carndos.modules.res.pojo;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
/**
* @description 角色资源映射
*/
@Data
@Builder
public class ResRoleBO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 映射id
*/
private Long id;
/**
* 角色
*/
private String roleName;
/**
* 资源 URL
*/
private String resUrl;
/**
* 资源名称
*/
private String resName;
/**
* 资源描述
*/
private String resDesc;
public ResRoleBO(Long id, String roleName, String resUrl, String resName, String resDesc) {
this.id = id;
this.roleName = roleName;
this.resUrl = resUrl;
this.resName = resName;
this.resDesc = resDesc;
}
} | [
"1501587673@qq.com"
] | 1501587673@qq.com |
3f461858c29e6d2e17443f88ff11fe7af23d14a1 | bd1de34bb9cef9c7c382a82dc849f35b18ed28c7 | /src/main/java/com/cursomc/services/validation/ClienteUpdate.java | fc3286c30d83b570c9d02b0ec05bf74182e426b9 | [] | no_license | emersonabreu/Crud-Spring-Ionic | b9ccd14e5a37a03e27142f8be64fb10b443288ec | e8298b0bd3eef42b6026e969f240b67ac4734ef4 | refs/heads/master | 2020-03-08T05:10:02.242154 | 2018-06-16T12:09:53 | 2018-06-16T12:09:53 | 127,941,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 565 | java | package com.cursomc.services.validation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
@Constraint(validatedBy = ClienteUpdateValidator.class)
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface ClienteUpdate {
String message() default "Erro de validação";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
| [
"emersondamiaosouza@gmail.com"
] | emersondamiaosouza@gmail.com |
0a4a74916f624ddf63305770184cfec1b0d9c955 | 59e5d71dd5eb187fcbd544e92000525961f3541d | /integration-tests/src/test/java/org/apache/stanbol/enhancer/it/MultiThreadedTest.java | e9fb37522c561ae85dc9d821e4ef87ffcf1a7b7c | [
"Apache-2.0"
] | permissive | alansaid/stanbol | 532ca3eaf752b240920762e174387f243eecbdad | ad9fb1c880d17c29f9dad0e23e7c8899fff37512 | refs/heads/trunk | 2021-01-14T12:21:46.554231 | 2015-12-07T09:40:48 | 2015-12-07T09:40:48 | 46,792,648 | 0 | 1 | null | 2015-11-24T13:15:28 | 2015-11-24T13:15:27 | null | UTF-8 | Java | false | false | 1,430 | 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.stanbol.enhancer.it;
import org.junit.Test;
/**
* Default MultiThreadedTest tool. Supports the use of System properties to
* configure the test. See the <a href="http://stanbol.apache.org/docs/trunk/utils/enhancerstresstest">
* Stanbol Enhancer Stress Test Utility</a> documentation for details
* @author Rupert Westenthaler
*
*/
public final class MultiThreadedTest extends MultiThreadedTestBase {
public MultiThreadedTest(){
super();
}
@Test
public void testMultipleParallelRequests() throws Exception {
performTest(TestSettings.fromSystemProperties());
}
}
| [
"rwesten@apache.org"
] | rwesten@apache.org |
89fe8e3ae8e907a75851c58c57c2249e99d57c1a | c83d9a429fa8754619eb2de55a4b36a27afb198a | /src/util/ChartUtils.java | abe8a1f490ad5bb754934794edd25cc3114082f7 | [] | no_license | yongchengmin/jfreecharts_demo_01 | 0675e724c7ba49b3be469bf75454f883559fa9ae | 975650f18cd8989438697254430c32ebeaf206cc | refs/heads/master | 2020-03-10T11:57:49.650581 | 2018-04-13T07:37:35 | 2018-04-13T07:37:35 | 129,366,706 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 16,138 | java | package util;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Paint;
import java.awt.Rectangle;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.StandardChartTheme;
import org.jfree.chart.axis.DateAxis;
import org.jfree.chart.axis.DateTickUnit;
import org.jfree.chart.axis.DateTickUnitType;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.block.BlockBorder;
import org.jfree.chart.labels.ItemLabelAnchor;
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.labels.StandardCategoryItemLabelGenerator;
import org.jfree.chart.labels.StandardPieSectionLabelGenerator;
import org.jfree.chart.labels.StandardXYItemLabelGenerator;
import org.jfree.chart.labels.StandardXYToolTipGenerator;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.DefaultDrawingSupplier;
import org.jfree.chart.plot.PieLabelLinkStyle;
import org.jfree.chart.plot.PiePlot;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.category.BarRenderer;
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
import org.jfree.chart.renderer.category.StackedBarRenderer;
import org.jfree.chart.renderer.category.StandardBarPainter;
import org.jfree.chart.renderer.xy.StandardXYBarPainter;
import org.jfree.chart.renderer.xy.XYBarRenderer;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.time.Day;
import org.jfree.data.time.TimeSeries;
import org.jfree.ui.RectangleInsets;
import org.jfree.ui.TextAnchor;
/**
* Jfreechart工具类
* <p>
* 解决中午乱码问题<br>
* 用来创建类别图表数据集、创建饼图数据集、时间序列图数据集<br>
* 用来对柱状图、折线图、饼图、堆积柱状图、时间序列图的样式进行渲染<br>
* 设置X-Y坐标轴样式
* <p>
*
*
* @author chenchangwen
* @since:2014-2-18
*
*/
public class ChartUtils {
private static String NO_DATA_MSG = "数据加载失败";
private static Font FONT = new Font("宋体", Font.PLAIN, 12);
public static Color[] CHART_COLORS = {
new Color(31,129,188), new Color(92,92,97), new Color(144,237,125), new Color(255,188,117),
new Color(153,158,255), new Color(255,117,153), new Color(253,236,109), new Color(128,133,232),
new Color(158,90,102),new Color(255, 204, 102) };// 颜色
static {
setChartTheme();
}
public ChartUtils() {
}
/**
* 中文主题样式 解决乱码
*/
public static void setChartTheme() {
// 设置中文主题样式 解决乱码
StandardChartTheme chartTheme = new StandardChartTheme("CN");
// 设置标题字体
chartTheme.setExtraLargeFont(FONT);
// 设置图例的字体
chartTheme.setRegularFont(FONT);
// 设置轴向的字体
chartTheme.setLargeFont(FONT);
chartTheme.setSmallFont(FONT);
chartTheme.setTitlePaint(new Color(51, 51, 51));
chartTheme.setSubtitlePaint(new Color(85, 85, 85));
chartTheme.setLegendBackgroundPaint(Color.WHITE);// 设置标注
chartTheme.setLegendItemPaint(Color.BLACK);//
chartTheme.setChartBackgroundPaint(Color.WHITE);
// 绘制颜色绘制颜色.轮廓供应商
// paintSequence,outlinePaintSequence,strokeSequence,outlineStrokeSequence,shapeSequence
Paint[] OUTLINE_PAINT_SEQUENCE = new Paint[] { Color.WHITE };
// 绘制器颜色源
DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(CHART_COLORS, CHART_COLORS, OUTLINE_PAINT_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
chartTheme.setDrawingSupplier(drawingSupplier);
chartTheme.setPlotBackgroundPaint(Color.WHITE);// 绘制区域
chartTheme.setPlotOutlinePaint(Color.WHITE);// 绘制区域外边框
chartTheme.setLabelLinkPaint(new Color(8, 55, 114));// 链接标签颜色
chartTheme.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);
chartTheme.setAxisOffset(new RectangleInsets(5, 12, 5, 12));
chartTheme.setDomainGridlinePaint(new Color(192, 208, 224));// X坐标轴垂直网格颜色
chartTheme.setRangeGridlinePaint(new Color(192, 192, 192));// Y坐标轴水平网格颜色
chartTheme.setBaselinePaint(Color.WHITE);
chartTheme.setCrosshairPaint(Color.BLUE);// 不确定含义
chartTheme.setAxisLabelPaint(new Color(51, 51, 51));// 坐标轴标题文字颜色
chartTheme.setTickLabelPaint(new Color(67, 67, 72));// 刻度数字
chartTheme.setBarPainter(new StandardBarPainter());// 设置柱状图渲染
chartTheme.setXYBarPainter(new StandardXYBarPainter());// XYBar 渲染
chartTheme.setItemLabelPaint(Color.black);
chartTheme.setThermometerPaint(Color.white);// 温度计
ChartFactory.setChartTheme(chartTheme);
}
/**
* 必须设置文本抗锯齿
*/
public static void setAntiAlias(JFreeChart chart) {
chart.setTextAntiAlias(false);
}
/**
* 设置图例无边框,默认黑色边框
*/
public static void setLegendEmptyBorder(JFreeChart chart) {
chart.getLegend().setFrame(new BlockBorder(Color.WHITE));
}
/**
* 创建类别数据集合
*/
public static DefaultCategoryDataset createDefaultCategoryDataset(Vector<Serie> series, String[] categories) {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
for (Serie serie : series) {
String name = serie.getName();
Vector<Object> data = serie.getData();
if (data != null && categories != null && data.size() == categories.length) {
for (int index = 0; index < data.size(); index++) {
String value = data.get(index) == null ? "" : data.get(index).toString();
if (isPercent(value)) {
value = value.substring(0, value.length() - 1);
}
if (isNumber(value)) {
dataset.setValue(Double.parseDouble(value), name, categories[index]);
}
}
}
}
return dataset;
}
/**
* 创建饼图数据集合
*/
public static DefaultPieDataset createDefaultPieDataset(String[] categories, Object[] datas) {
DefaultPieDataset dataset = new DefaultPieDataset();
for (int i = 0; i < categories.length && categories != null; i++) {
String value = datas[i].toString();
if (isPercent(value)) {
value = value.substring(0, value.length() - 1);
}
if (isNumber(value)) {
dataset.setValue(categories[i], Double.valueOf(value));
}
}
return dataset;
}
/**
* 创建时间序列数据
*
* @param category
* 类别
* @param dateValues
* 日期-值 数组
* @param xAxisTitle
* X坐标轴标题
* @return
*/
public static TimeSeries createTimeseries(String category, Vector<Object[]> dateValues) {
TimeSeries timeseries = new TimeSeries(category);
if (dateValues != null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
for (Object[] objects : dateValues) {
Date date = null;
try {
date = dateFormat.parse(objects[0].toString());
} catch (ParseException e) {
}
String sValue = objects[1].toString();
double dValue = 0;
if (date != null && isNumber(sValue)) {
dValue = Double.parseDouble(sValue);
timeseries.add(new Day(date), dValue);
}
}
}
return timeseries;
}
/**
* 设置 折线图样式
*
* @param plot
* @param isShowDataLabels
* 是否显示数据标签 默认不显示节点形状
*/
public static void setLineRender(CategoryPlot plot, boolean isShowDataLabels) {
setLineRender(plot, isShowDataLabels, false);
}
/**
* 设置折线图样式
*
* @param plot
* @param isShowDataLabels
* 是否显示数据标签
*/
public static void setLineRender(CategoryPlot plot, boolean isShowDataLabels, boolean isShapesVisible) {
plot.setNoDataMessage(NO_DATA_MSG);
plot.setInsets(new RectangleInsets(10, 10, 0, 10), false);
LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer();
renderer.setStroke(new BasicStroke(1.5F));
if (isShowDataLabels) {
renderer.setBaseItemLabelsVisible(true);
renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator(StandardCategoryItemLabelGenerator.DEFAULT_LABEL_FORMAT_STRING,
NumberFormat.getInstance()));
renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE1, TextAnchor.BOTTOM_CENTER));// weizhi
}
renderer.setBaseShapesVisible(isShapesVisible);// 数据点绘制形状
setXAixs(plot);
setYAixs(plot);
}
/**
* 设置时间序列图样式
*
* @param plot
* @param isShowData
* 是否显示数据
* @param isShapesVisible
* 是否显示数据节点形状
*/
public static void setTimeSeriesRender(Plot plot, boolean isShowData, boolean isShapesVisible) {
XYPlot xyplot = (XYPlot) plot;
xyplot.setNoDataMessage(NO_DATA_MSG);
xyplot.setInsets(new RectangleInsets(10, 10, 5, 10));
XYLineAndShapeRenderer xyRenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();
xyRenderer.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator());
xyRenderer.setBaseShapesVisible(false);
if (isShowData) {
xyRenderer.setBaseItemLabelsVisible(true);
xyRenderer.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator());
xyRenderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE1, TextAnchor.BOTTOM_CENTER));// weizhi
}
xyRenderer.setBaseShapesVisible(isShapesVisible);// 数据点绘制形状
DateAxis domainAxis = (DateAxis) xyplot.getDomainAxis();
domainAxis.setAutoTickUnitSelection(false);
DateTickUnit dateTickUnit = new DateTickUnit(DateTickUnitType.YEAR, 1, new SimpleDateFormat("yyyy-MM")); // 第二个参数是时间轴间距
domainAxis.setTickUnit(dateTickUnit);
StandardXYToolTipGenerator xyTooltipGenerator = new StandardXYToolTipGenerator("{1}:{2}", new SimpleDateFormat("yyyy-MM-dd"), new DecimalFormat("0"));
xyRenderer.setBaseToolTipGenerator(xyTooltipGenerator);
setXY_XAixs(xyplot);
setXY_YAixs(xyplot);
}
/**
* 设置时间序列图样式 -默认不显示数据节点形状
*
* @param plot
* @param isShowData
* 是否显示数据
*/
public static void setTimeSeriesRender(Plot plot, boolean isShowData) {
setTimeSeriesRender(plot, isShowData, false);
}
/**
* 设置时间序列图渲染:但是存在一个问题:如果timeseries里面的日期是按照天组织, 那么柱子的宽度会非常小,和直线一样粗细
*
* @param plot
* @param isShowDataLabels
*/
public static void setTimeSeriesBarRender(Plot plot, boolean isShowDataLabels) {
XYPlot xyplot = (XYPlot) plot;
xyplot.setNoDataMessage(NO_DATA_MSG);
XYBarRenderer xyRenderer = new XYBarRenderer(0.1D);
xyRenderer.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator());
if (isShowDataLabels) {
xyRenderer.setBaseItemLabelsVisible(true);
xyRenderer.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator());
}
StandardXYToolTipGenerator xyTooltipGenerator = new StandardXYToolTipGenerator("{1}:{2}", new SimpleDateFormat("yyyy-MM-dd"), new DecimalFormat("0"));
xyRenderer.setBaseToolTipGenerator(xyTooltipGenerator);
setXY_XAixs(xyplot);
setXY_YAixs(xyplot);
}
/**
* 设置柱状图渲染
*
* @param plot
* @param isShowDataLabels
*/
public static void setBarRenderer(CategoryPlot plot, boolean isShowDataLabels) {
plot.setNoDataMessage(NO_DATA_MSG);
plot.setInsets(new RectangleInsets(10, 10, 5, 10));
BarRenderer renderer = (BarRenderer) plot.getRenderer();
renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
renderer.setMaximumBarWidth(0.075);// 设置柱子最大宽度
if (isShowDataLabels) {
renderer.setBaseItemLabelsVisible(true);
}
setXAixs(plot);
setYAixs(plot);
}
/**
* 设置堆积柱状图渲染
*
* @param plot
*/
public static void setStackBarRender(CategoryPlot plot) {
plot.setNoDataMessage(NO_DATA_MSG);
plot.setInsets(new RectangleInsets(10, 10, 5, 10));
StackedBarRenderer renderer = (StackedBarRenderer) plot.getRenderer();
renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
plot.setRenderer(renderer);
setXAixs(plot);
setYAixs(plot);
}
/**
* 设置类别图表(CategoryPlot) X坐标轴线条颜色和样式
*
* @param axis
*/
public static void setXAixs(CategoryPlot plot) {
Color lineColor = new Color(31, 121, 170);
plot.getDomainAxis().setAxisLinePaint(lineColor);// X坐标轴颜色
plot.getDomainAxis().setTickMarkPaint(lineColor);// X坐标轴标记|竖线颜色
}
/**
* 设置类别图表(CategoryPlot) Y坐标轴线条颜色和样式 同时防止数据无法显示
*
* @param axis
*/
public static void setYAixs(CategoryPlot plot) {
Color lineColor = new Color(192, 208, 224);
ValueAxis axis = plot.getRangeAxis();
axis.setAxisLinePaint(lineColor);// Y坐标轴颜色
axis.setTickMarkPaint(lineColor);// Y坐标轴标记|竖线颜色
// 隐藏Y刻度
axis.setAxisLineVisible(false);
axis.setTickMarksVisible(false);
// Y轴网格线条
plot.setRangeGridlinePaint(new Color(192, 192, 192));
plot.setRangeGridlineStroke(new BasicStroke(1));
plot.getRangeAxis().setUpperMargin(0.1);// 设置顶部Y坐标轴间距,防止数据无法显示
plot.getRangeAxis().setLowerMargin(0.1);// 设置底部Y坐标轴间距
}
/**
* 设置XY图表(XYPlot) X坐标轴线条颜色和样式
*
* @param axis
*/
public static void setXY_XAixs(XYPlot plot) {
Color lineColor = new Color(31, 121, 170);
plot.getDomainAxis().setAxisLinePaint(lineColor);// X坐标轴颜色
plot.getDomainAxis().setTickMarkPaint(lineColor);// X坐标轴标记|竖线颜色
}
/**
* 设置XY图表(XYPlot) Y坐标轴线条颜色和样式 同时防止数据无法显示
*
* @param axis
*/
public static void setXY_YAixs(XYPlot plot) {
Color lineColor = new Color(192, 208, 224);
ValueAxis axis = plot.getRangeAxis();
axis.setAxisLinePaint(lineColor);// X坐标轴颜色
axis.setTickMarkPaint(lineColor);// X坐标轴标记|竖线颜色
// 隐藏Y刻度
axis.setAxisLineVisible(false);
axis.setTickMarksVisible(false);
// Y轴网格线条
plot.setRangeGridlinePaint(new Color(192, 192, 192));
plot.setRangeGridlineStroke(new BasicStroke(1));
plot.setDomainGridlinesVisible(false);
plot.getRangeAxis().setUpperMargin(0.12);// 设置顶部Y坐标轴间距,防止数据无法显示
plot.getRangeAxis().setLowerMargin(0.12);// 设置底部Y坐标轴间距
}
/**
* 设置饼状图渲染
*/
public static void setPieRender(Plot plot) {
plot.setNoDataMessage(NO_DATA_MSG);
plot.setInsets(new RectangleInsets(10, 10, 5, 10));
PiePlot piePlot = (PiePlot) plot;
piePlot.setInsets(new RectangleInsets(0, 0, 0, 0));
piePlot.setCircular(true);// 圆形
// piePlot.setSimpleLabels(true);// 简单标签
piePlot.setLabelGap(0.01);
piePlot.setInteriorGap(0.05D);
piePlot.setLegendItemShape(new Rectangle(10, 10));// 图例形状
piePlot.setIgnoreNullValues(true);
piePlot.setLabelBackgroundPaint(null);// 去掉背景色
piePlot.setLabelShadowPaint(null);// 去掉阴影
piePlot.setLabelOutlinePaint(null);// 去掉边框
piePlot.setShadowPaint(null);
// 0:category 1:value:2 :percentage
piePlot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}:{2}"));// 显示标签数据
}
/**
* 是不是一个%形式的百分比
*
* @param str
* @return
*/
public static boolean isPercent(String str) {
return str != null ? str.endsWith("%") && isNumber(str.substring(0, str.length() - 1)) : false;
}
/**
* 是不是一个数字
*
* @param str
* @return
*/
public static boolean isNumber(String str) {
return str != null ? str.matches("^[-+]?(([0-9]+)((([.]{0})([0-9]*))|(([.]{1})([0-9]+))))$") : false;
}
}
| [
"minyongcheng@qq.com"
] | minyongcheng@qq.com |
1f865d55f2e2ff992892b77e11190f0314ccd311 | 580d37ac030ee333cf47ffa5ad5aca0ccb608459 | /src/test/java/com/springboot/DemoApplicationTest.java | 1199ea2a66e24e73d584b126982e932435beb5cd | [] | no_license | zhuyupeiwmq/springboot | 906994fc408f220c72dfc7b44382ae7f01bb1b8e | e47d2671aa16680418665d123f4c95def32c10f9 | refs/heads/master | 2023-03-12T20:32:28.563272 | 2020-12-21T09:57:38 | 2020-12-21T09:57:38 | 323,290,569 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 106 | java | package com.springboot;
import static org.junit.jupiter.api.Assertions.*;
class DemoApplicationTest {
} | [
"103zypZ#"
] | 103zypZ# |
70cd2034f6c36b6e9692f679f1c95c904da8dcd9 | f2e41adb54b8bd00fd8bca4990af9ee1e1006a5e | /spring_step06_jdbc/src/test02/JdbcExample6.java | e701a98d90ca67aed75877156369b5cde931b59f | [] | no_license | bsgpark/Springworkspace | 3eaac88b5fae0b55604d280f1c376bee25d2e4f0 | 0127f82bee54463f5a4e783d1554ce95fb7de370 | refs/heads/master | 2022-12-24T10:24:54.540943 | 2020-09-22T07:15:51 | 2020-09-22T07:15:51 | 295,885,382 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 842 | java | package test02;
/* 수정
[문제] p0001을 jQuery, 35000, 인포믹스로 변경하시오
[결과] 상품 1개를 수정하였습니다
*/
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class JdbcExample6 {
public static void main(String[] args) {
ApplicationContext factory = new ClassPathXmlApplicationContext("test02/application.xml");
GoodsEntity entity=new GoodsEntity();
entity.setCode("p0001");
entity.setName("jQuery");
entity.setPrice(35000);
entity.setMaker("인포믹스");
FirstJdbcDao dao=factory.getBean("test", FirstJdbcDao.class);
int n=dao.update(entity);
if(n>0) {
System.out.println("상품 " + n + "개를 수정하였습니다");
}
((ClassPathXmlApplicationContext)factory).close();
}
}
| [
"bsgpark@naver.com"
] | bsgpark@naver.com |
e8888c8cd701fa12e592157c0f9811c765efdd04 | 228d30af9aeb9d97873b56d72e65f6c42eedd34d | /src/main/java/week2/Day1/IrctcSignUp.java | e453c10aebecce57160bb7835d7e2df7e7855150 | [] | no_license | tnkarthick14/Selenium-Codes | b00b7edc9afe6047b3d199b15b6057bf37e9453f | be36461f1fe4a1bd1ca6dfdf12159dc375b88877 | refs/heads/master | 2020-04-29T08:08:31.320929 | 2019-04-13T12:56:15 | 2019-04-13T12:56:15 | 175,975,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,869 | java | package week2.Day1;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;
public class IrctcSignUp {
public static void main(String[] args) throws InterruptedException {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver","./drivers/chromedriver.exe");
//Invoking Built in ChromeDriver Class using object driver to launch Chrome driver
ChromeDriver driver = new ChromeDriver();
//Launches the IRCTC Website
driver.get("https://www.irctc.co.in/eticketing/userSignUp.jsf");
//To Maximize the opened chrome window
driver.manage().window().maximize();
//To Click the register button
//driver.findElementByLinkText("REGISTER").click();
//To select the username field
driver.findElementByXPath("//input[@id='userRegistrationForm:userName']").sendKeys("sampletestleaf123");
//To Check availability :
driver.findElementByXPath("//a[text()='Check Availability']").click();
//To Enter Password
driver.findElementByXPath("//input[@id='userRegistrationForm:password']").sendKeys("Testleaf123");
//To confirm the entered Password
driver.findElementByXPath("//input[@id='userRegistrationForm:confpasword']").sendKeys("Testleaf123");
//Invoking method to select dropdown webelement and storing in a local variable securityqn
//@SuppressWarnings("unused")
//IrctcSignUPSelect select1 = new IrctcSignUPSelect("//select[@id='userRegistrationForm:securityQ']","Who was your Childhood hero?");
WebElement secqn = driver.findElementByXPath("//select[@id='userRegistrationForm:securityQ']");
secqn.click();
Select dropdown = new Select(secqn);
dropdown.selectByVisibleText("Who was your Childhood hero?");
/*
//Invoking Select Class using Object Dropdown and passing the variable securityqn
Select dropdown = new Select(secqn);
dropdown.selectByVisibleText("Who was your Childhood hero?");
*/
//To Select Security Answer field and enter text
driver.findElementByXPath("//input[@id='userRegistrationForm:securityAnswer']").sendKeys("MyDad");
//Invoking method to select dropdown webelement and storing in a local variable preflang
//@SuppressWarnings("unused")
//IrctcSignUPSelect select2 = new IrctcSignUPSelect("//select[@id='userRegistrationForm:prelan']","English");
WebElement preflang = driver.findElementByXPath("//select[@id='userRegistrationForm:prelan']");
preflang.click();
Select dropdown1 = new Select(preflang);
dropdown1.selectByVisibleText("English");
//To Select First Name field
driver.findElementByXPath("//input[@id='userRegistrationForm:firstName']").sendKeys("Babu");
//To Select Second Name field
driver.findElementByXPath("//input[@id='userRegistrationForm:lastName']").sendKeys("Manickam");
//To Select Gender
driver.findElementByXPath("(//input[@value='M'])[1]").click();
//To Select Marital Status
driver.findElementByXPath("(//input[@value='M'])[2]").click();
// To Select DOB
WebElement dobd = driver.findElementByXPath("//select[@id='userRegistrationForm:dobDay']");
dobd.click();
Select dropdown2 = new Select(dobd);
dropdown2.selectByValue("14");
dobd.click();
WebElement dobm = driver.findElementByXPath("//select[@id='userRegistrationForm:dobMonth']");
dobm.click();
Select dropdown3 = new Select(dobm);
dropdown3.selectByVisibleText("NOV");
dobm.click();
WebElement doby = driver.findElementByXPath("//select[@id='userRegistrationForm:dateOfBirth']");
doby.click();
Select dropdown4 = new Select(doby);
dropdown4.selectByVisibleText("1994");
doby.click();
//To Select occupation :
WebElement occup = driver.findElementByXPath("//select[@id='userRegistrationForm:occupation']");
occup.click();
Select dropdown5 = new Select(occup);
dropdown5.selectByVisibleText("Private");
//To Select country :
WebElement country = driver.findElementByXPath("//select[@id='userRegistrationForm:countries']");
country.click();
Select dropdown6 = new Select(country);
dropdown6.selectByVisibleText("India");
//to enter email id :
driver.findElementByXPath("//input[@id='userRegistrationForm:email']").sendKeys("babumanickam@testleaf.com");
//to enter mobile :
driver.findElementByXPath("//input[@id='userRegistrationForm:mobile']").sendKeys("9191919191");
//To Select Nationality :
WebElement nationality = driver.findElementByXPath("//select[@id='userRegistrationForm:nationalityId']");
nationality.click();
Select dropdown7 = new Select(nationality);
dropdown7.selectByVisibleText("India");
nationality.click();
//To Enter Address
driver.findElementByXPath("//input[@id='userRegistrationForm:address']").sendKeys("India");
//To Enter Pincode and press Tab
driver.findElementByXPath("//input[@id='userRegistrationForm:pincode']").sendKeys("600042",Keys.TAB);
Thread.sleep(3000);
//To Enter City name :
WebElement city = driver.findElementByXPath("//select[@id='userRegistrationForm:cityName']");
city.click();
Select dropdown8 = new Select(city);
dropdown8.selectByVisibleText("Chennai");
Thread.sleep(3000);
//To Select PO :
WebElement post = driver.findElementByXPath("//select[@id='userRegistrationForm:postofficeName']");
post.click();
Select dropdown9 = new Select(post);
dropdown9.selectByVisibleText("Velacheri S.O");
Thread.sleep(3000);
driver.findElementByXPath("//input[@value='Y']").click();
Thread.sleep(1000);
driver.findElementByXPath("//input[@id='userRegistrationForm:landline']").sendKeys("9191919191");
System.out.println("Hurray!!! It worked ");
driver.close();
}
}
| [
"tnkar@SARKAR"
] | tnkar@SARKAR |
4354c8518a394c0baa9d6471a2bcc0117579a429 | 3482685392a16465aba102874c701707343e8d95 | /app/src/main/java/com/epita/mti/tinytube/request/OkHttpStack.java | 1d3d2b1f9df0daf2c00db0f74c9da414c89dfbdc | [] | no_license | matthieu-rollin/TinyTube | d26d8f736fef9195e2e020e37a07287eda239337 | cb5df5895f5bd39578e884e6e2ec9a76ebd366ed | refs/heads/master | 2021-01-23T15:41:45.371727 | 2014-12-20T00:24:21 | 2014-12-20T00:24:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,029 | java | package com.epita.mti.tinytube.request;
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.OkUrlFactory;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Created by _Gary_ on 28/11/2014.
* Simple stack to use OkHttp with Volley
*/
public class OkHttpStack extends HurlStack {
/**
* The TAG for logs
*/
private static final String TAG = OkHttpStack.class.getSimpleName();
/**
* The url factory
*/
private final OkUrlFactory okUrlFactory;
public OkHttpStack() {
this(new OkUrlFactory(new OkHttpClient()));
}
public OkHttpStack(OkUrlFactory okUrlFactory) {
if (okUrlFactory == null) {
throw new NullPointerException("Client must not be null.");
}
this.okUrlFactory = okUrlFactory;
}
@Override
protected HttpURLConnection createConnection(URL url) throws IOException {
return okUrlFactory.open(url);
}
}
| [
"gary.dameme@gmail.com"
] | gary.dameme@gmail.com |
d87e8d3c8c08a1b2051ba2d820d3fb66bd442d1b | 23ba003d18a2580c40b47f2c2648655631265ec0 | /src/main/java/io/agileintelligence/config/SecurityConfig.java | c16ea9da925248c58f3681eabac85d77431e66cf | [] | no_license | carlosag0712/AgileIntelligenceBookstoreFrontEnd | f2c1a503d4f97a894df858f19d7a7eb1e5ab1c2e | 585800f1a354f1854cb2e315363ba9b44f5fb047 | refs/heads/master | 2021-01-21T14:40:43.283562 | 2017-06-28T19:28:26 | 2017-06-28T19:28:26 | 95,325,942 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,631 | java | package io.agileintelligence.config;
import io.agileintelligence.service.Impl.UserSecurityService;
import io.agileintelligence.utility.SecurityUtility;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.util.matcher.AndRequestMatcher;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
/**
* Created by carlosarosemena on 2017-06-10.
*/
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private Environment env;
@Autowired
private UserSecurityService userSecurityService;
private BCryptPasswordEncoder passwordEncoder(){
return SecurityUtility.passwordEncoder();
}
private static final String[] PUBLIC_MATCHERS = {
"/css/**",
"/js/**",
"/image/**",
"/",
"/newUser",
"/forgetPassword",
"/login",
"/bookshelf",
"/bookDetail"
};
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers(PUBLIC_MATCHERS)
.permitAll().anyRequest().authenticated();
http
.csrf().disable().cors().disable()
.formLogin().failureUrl("/login?error").defaultSuccessUrl("/")
.loginPage("/login").permitAll()
.and()
.logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/?logout").deleteCookies("remember-me").permitAll()
.and()
.rememberMe();
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userSecurityService).passwordEncoder(passwordEncoder());
}
}
| [
"ceag68@hotmail.com"
] | ceag68@hotmail.com |
43c21de4bfc839e42a6487ca3164b8cc6d99d1f4 | cb771861b684a287407cff8f10165bdf3bd66ff1 | /core/src/com/itesm/pixelwars/Sprites/Animations/AnimationTower.java | 01980f46a6de071ccab4644180f5bb9a4e9012a1 | [] | no_license | PedroCorsob/PixelWar_Videogame | b2572f9b231c1144f3d673e00fb6344c46c7921b | 75548e38c509daf827af39d9aa1f856917bb0fa2 | refs/heads/master | 2023-03-16T00:52:19.173211 | 2019-05-21T03:46:27 | 2019-05-21T03:46:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,100 | java | package com.itesm.pixelwars.Sprites.Animations;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
public class AnimationTower {
private int hp;
private boolean isAlive;
private final Animation animacion;
private final Animation animacionDaño1;
private final Animation animacionDaño2;
private final Animation animacionDaño3;
private Sprite sprite;
private float timerAnimacion;
private EStateTower estadoTorre;
private final TextureRegion[][] texturaTorre;
private final TextureRegion[][] texturaTorreDaño1;
private final TextureRegion[][] texturaTorreDaño2;
private final TextureRegion[][] texturaTorreDaño3;
public AnimationTower(float x, float y, Texture torre, Texture torreDaño1, Texture torreDaño2, Texture torreDaño3){
this.isAlive=true;
this.hp=500;
// Cargar textura
//Texture textura = new Texture("torreAzul"); // 400x66 = tamaño de la imagen
// Crea una region
TextureRegion region = new TextureRegion(torre);
// Divide la región en frames de 32x64
texturaTorre = region.split(69,124);
animacion = new Animation(0.15f,texturaTorre[0][5],texturaTorre[0][4],texturaTorre[0][3],texturaTorre[0][2],texturaTorre[0][1],texturaTorre[0][0]);
animacion.setPlayMode(Animation.PlayMode.LOOP);
//Primer Daño
TextureRegion regionDaño1 = new TextureRegion(torreDaño1);
// Divide la región en frames de 32x64
texturaTorreDaño1 = regionDaño1.split(69,124);
animacionDaño1 = new Animation(0.15f,texturaTorreDaño1[0][5],texturaTorreDaño1[0][4],texturaTorreDaño1[0][3],texturaTorreDaño1[0][2],texturaTorreDaño1[0][1]);
animacionDaño1.setPlayMode(Animation.PlayMode.LOOP);
//Segundo Daño
TextureRegion regionDaño2 = new TextureRegion(torreDaño2);
// Divide la región en frames de 32x64
texturaTorreDaño2 = regionDaño2.split(69,124);
animacionDaño2 = new Animation(0f,texturaTorreDaño2[0][1]);
animacionDaño2.setPlayMode(Animation.PlayMode.LOOP);
//Segundo Tercer Daño
TextureRegion regionDaño3 = new TextureRegion(torreDaño3);
// Divide la región en frames de 32x64
texturaTorreDaño3 = regionDaño3.split(69,124);
animacionDaño3 = new Animation(0f,texturaTorreDaño3[0][1]);
animacionDaño3.setPlayMode(Animation.PlayMode.LOOP);
estadoTorre = EStateTower.SINDAÑO;
timerAnimacion = 0;
// Quieto
sprite = new Sprite(texturaTorre[0][0]);
sprite.setPosition(x,y);
}
public void render(SpriteBatch batch){
timerAnimacion += Gdx.graphics.getDeltaTime();
/**if(getHp()>350){
sprite.setRegion(texturaTorreDaño1[0][0]);
TextureRegion region = (TextureRegion) animacion.getKeyFrame(timerAnimacion);
batch.draw(region, sprite.getX(), sprite.getY());
}else {
if(getHp()<=350 && getHp()>225){
sprite.setRegion(texturaTorreDaño1[0][1]);
TextureRegion regionDaño1 = (TextureRegion) animacionDaño1.getKeyFrame(timerAnimacion);
batch.draw(regionDaño1, sprite.getX(), sprite.getY());
}else{
if(getHp()<=225 && getHp()>100){
sprite.setRegion(texturaTorreDaño2[0][1]);
TextureRegion regionDaño2 = (TextureRegion) animacionDaño2.getKeyFrame(timerAnimacion);
batch.draw(regionDaño2, sprite.getX(), sprite.getY());
}else {
sprite.setRegion(texturaTorreDaño3[0][1]);
TextureRegion regionDaño3 = (TextureRegion) animacionDaño3.getKeyFrame(timerAnimacion);
batch.draw(regionDaño3, sprite.getX(), sprite.getY());
}
}
}**/
switch (estadoTorre){
case SINDAÑO:
sprite.setRegion(texturaTorre[0][0]);
TextureRegion region = (TextureRegion) animacion.getKeyFrame(timerAnimacion);
batch.draw(region, sprite.getX(), sprite.getY());
break;
case DAÑO1:
sprite.setRegion(texturaTorreDaño1[0][1]);
TextureRegion regionDaño1 = (TextureRegion) animacionDaño1.getKeyFrame(timerAnimacion);
batch.draw(regionDaño1, sprite.getX(), sprite.getY());
break;
case DAÑO2:
sprite.setRegion(texturaTorreDaño2[0][1]);
TextureRegion regionDaño2 = (TextureRegion) animacionDaño2.getKeyFrame(timerAnimacion);
batch.draw(regionDaño2, sprite.getX(), sprite.getY());
break;
case DAÑO3:
sprite.setRegion(texturaTorreDaño3[0][1]);
TextureRegion regionDaño3 = (TextureRegion) animacionDaño3.getKeyFrame(timerAnimacion);
batch.draw(regionDaño3, sprite.getX(), sprite.getY());
break;
}
}
public void setHp(int hp) {
this.hp = hp;
}
public int getHp() {
return hp;
}
public void setAlive(boolean alive) {
isAlive = alive;
}
public boolean isAlive() {
return isAlive;
}
public void setEstado(EStateTower estadoTorre) {
this.estadoTorre = estadoTorre;
}
public float getX() {
return sprite.getX();
}
public float getY() {
return sprite.getY();
}
public float getHeight() {
return sprite.getHeight();
}
public float getWidth() {
return sprite.getWidth();
}
public void setX(float x){
sprite.setX(x);
}
public void setY(float y){
sprite.setY(y);
}
public Sprite getSprite() {
return sprite;
}
}
| [
"A01379404@itesm.mx"
] | A01379404@itesm.mx |
58cc46ca508dc90f0b05eb4c9cc790bec3359610 | ec07073b1fc084b86ff99caa0b7b5c23b172529e | /src/br/com/caelum/struts/action/MudaIdiomaAction.java | 29ad0d815db6e87c21091580782d86801f8dc2f5 | [] | no_license | clebsons/struts | 50cefbfb08941cf9a728d025434b8b19dea074be | 4f764a7c7804bdc340e07f93a0ee2256bae2e81b | refs/heads/master | 2020-06-02T17:04:02.790804 | 2014-07-10T21:53:14 | 2014-07-10T21:53:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | package br.com.caelum.struts.action;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class MudaIdiomaAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
String idioma = request.getParameter("idioma");
Locale locale = new Locale(idioma);
System.out.println("mudando o locale para " + locale);
setLocale(request, locale);
return mapping.findForward("ok");
}
}
| [
"clebson@atlanticsolutions.com.br"
] | clebson@atlanticsolutions.com.br |
e7616b8311d11a5802945a90f1a05bb79ddc9b7f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_15fa01a72f25d2828339cd116a2a7d7972b980a9/TwitterManagerImpl/29_15fa01a72f25d2828339cd116a2a7d7972b980a9_TwitterManagerImpl_s.java | 151b5b8d8c3d59ebcfe7269626e1a6918ae9ea7a | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,636 | java | /**
*
*/
package org.soluvas.web.login;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
/**
* @author haidar
*
*/
public class TwitterManagerImpl implements TwitterManager {
private final String consumerKey;
private final String consumerSecret;
private final Twitter twitter;
public TwitterManagerImpl(String consumerKey, String consumerSecret) {
super();
this.consumerKey = consumerKey;
this.consumerSecret = consumerSecret;
twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(consumerKey, consumerSecret);
}
@Override
public Twitter getTwitter() {
return twitter;
}
@Override
public Twitter createTwitter(String accessToken, String accessTokenSecret) {
final Twitter twitter = new TwitterFactory().getInstance();
twitter.setOAuthConsumer(consumerKey, consumerSecret);
twitter.setOAuthAccessToken(new AccessToken(accessToken, accessTokenSecret));
return twitter;
}
/* (non-Javadoc)
* @see org.soluvas.web.login.FacebookManager#getAppId()
*/
@Override
public String getConsumerKey() {
return consumerKey;
}
/* (non-Javadoc)
* @see org.soluvas.web.login.FacebookManager#getAppSecret()
*/
@Override
public String getConsumerSecret() {
return consumerSecret;
}
// String appId = "260800077384280";
// String appSecret = "21f77dcd8501b12354b889ff32f96fad";
// String redirectUri = "http://www.berbatik5.haidar.dev/fb_recipient/";
// UUID state = UUID.randomUUID();
// String facebookRedirectUri = "https://www.facebook.com/dialog/oauth";
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
8089e8b6315d865c165e72b6e9b40948d94caf72 | 6cb64364c931af163127635693a89116f7b00428 | /src/com/khoahuy/exception/UnauthorizedException.java | d72fbe86de117e859d05663aa8ae13bba2f59145 | [] | no_license | khdb/phototag | ac2a5ea7ac1f5eeda5701f899427d468ad695a09 | 62f8774fbec8a2dad83c10b3f9049fd48515c04d | refs/heads/master | 2016-09-05T20:15:47.319696 | 2013-11-27T17:54:11 | 2013-11-27T17:54:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 238 | java | package com.khoahuy.exception;
public class UnauthorizedException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
public UnauthorizedException(String message) {
super(message);
}
}
| [
"thanhhuy89vn@gmail.com"
] | thanhhuy89vn@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.